ace-rails-ap 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitmodules +3 -0
- data/lib/ace/rails/version.rb +1 -1
- data/update.sh +3 -0
- data/vendor/assets/javascripts/ace-compat-noconflict.js +1 -0
- data/vendor/assets/javascripts/ace-compat-uncompressed-noconflict.js +480 -0
- data/vendor/assets/javascripts/ace-compat-uncompressed.js +480 -0
- data/vendor/assets/javascripts/ace-compat.js +1 -0
- data/vendor/assets/javascripts/ace-noconflict.js +10 -0
- data/vendor/assets/javascripts/ace-uncompressed-noconflict.js +19976 -0
- data/vendor/assets/javascripts/ace-uncompressed.js +6568 -998
- data/vendor/assets/javascripts/ace.js +1 -1
- data/vendor/assets/javascripts/keybinding-emacs-noconflict.js +1 -0
- data/vendor/assets/javascripts/keybinding-emacs-uncompressed-noconflict.js +150 -0
- data/vendor/assets/javascripts/keybinding-emacs-uncompressed.js +150 -0
- data/vendor/assets/javascripts/keybinding-emacs.js +1 -1
- data/vendor/assets/javascripts/keybinding-vim-noconflict.js +1 -0
- data/vendor/assets/javascripts/keybinding-vim-uncompressed-noconflict.js +138 -0
- data/vendor/assets/javascripts/keybinding-vim-uncompressed.js +138 -0
- data/vendor/assets/javascripts/keybinding-vim.js +1 -1
- data/vendor/assets/javascripts/mode-c_cpp-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-c_cpp-uncompressed-noconflict.js +919 -0
- data/vendor/assets/javascripts/mode-c_cpp-uncompressed.js +919 -0
- data/vendor/assets/javascripts/mode-c_cpp.js +1 -1
- data/vendor/assets/javascripts/mode-clojure-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-clojure-uncompressed-noconflict.js +422 -0
- data/vendor/assets/javascripts/mode-clojure-uncompressed.js +422 -0
- data/vendor/assets/javascripts/mode-clojure.js +1 -1
- data/vendor/assets/javascripts/mode-coffee-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-coffee-uncompressed-noconflict.js +607 -0
- data/vendor/assets/javascripts/mode-coffee-uncompressed.js +607 -0
- data/vendor/assets/javascripts/mode-coffee.js +1 -1
- data/vendor/assets/javascripts/mode-coldfusion-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-coldfusion-uncompressed-noconflict.js +2458 -0
- data/vendor/assets/javascripts/mode-coldfusion-uncompressed.js +2458 -0
- data/vendor/assets/javascripts/mode-coldfusion.js +1 -0
- data/vendor/assets/javascripts/mode-csharp-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-csharp-uncompressed-noconflict.js +769 -0
- data/vendor/assets/javascripts/mode-csharp-uncompressed.js +769 -0
- data/vendor/assets/javascripts/mode-csharp.js +1 -1
- data/vendor/assets/javascripts/mode-css-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-css-uncompressed-noconflict.js +641 -0
- data/vendor/assets/javascripts/mode-css-uncompressed.js +641 -0
- data/vendor/assets/javascripts/mode-css.js +1 -1
- data/vendor/assets/javascripts/mode-golang-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-golang-uncompressed-noconflict.js +378 -0
- data/vendor/assets/javascripts/mode-golang-uncompressed.js +378 -0
- data/vendor/assets/javascripts/mode-golang.js +1 -0
- data/vendor/assets/javascripts/mode-groovy-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-groovy-uncompressed-noconflict.js +1393 -0
- data/vendor/assets/javascripts/mode-groovy-uncompressed.js +1393 -0
- data/vendor/assets/javascripts/mode-groovy.js +1 -1
- data/vendor/assets/javascripts/mode-haxe-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-haxe-uncompressed-noconflict.js +769 -0
- data/vendor/assets/javascripts/mode-haxe-uncompressed.js +769 -0
- data/vendor/assets/javascripts/mode-haxe.js +1 -0
- data/vendor/assets/javascripts/mode-html-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-html-uncompressed-noconflict.js +2475 -0
- data/vendor/assets/javascripts/mode-html-uncompressed.js +2475 -0
- data/vendor/assets/javascripts/mode-html.js +1 -1
- data/vendor/assets/javascripts/mode-java-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-java-uncompressed-noconflict.js +1395 -0
- data/vendor/assets/javascripts/mode-java-uncompressed.js +1395 -0
- data/vendor/assets/javascripts/mode-java.js +1 -1
- data/vendor/assets/javascripts/mode-javascript-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-javascript-uncompressed-noconflict.js +1226 -0
- data/vendor/assets/javascripts/mode-javascript-uncompressed.js +1226 -0
- data/vendor/assets/javascripts/mode-javascript.js +1 -1
- data/vendor/assets/javascripts/mode-json-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-json-uncompressed-noconflict.js +701 -0
- data/vendor/assets/javascripts/mode-json-uncompressed.js +701 -0
- data/vendor/assets/javascripts/mode-json.js +1 -1
- data/vendor/assets/javascripts/mode-latex-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-latex-uncompressed-noconflict.js +95 -0
- data/vendor/assets/javascripts/mode-latex-uncompressed.js +95 -0
- data/vendor/assets/javascripts/mode-less-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-less-uncompressed-noconflict.js +655 -0
- data/vendor/assets/javascripts/mode-less-uncompressed.js +655 -0
- data/vendor/assets/javascripts/mode-less.js +1 -0
- data/vendor/assets/javascripts/mode-liquid-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-liquid-uncompressed-noconflict.js +1353 -0
- data/vendor/assets/javascripts/mode-liquid-uncompressed.js +1353 -0
- data/vendor/assets/javascripts/mode-liquid.js +1 -0
- data/vendor/assets/javascripts/mode-lua-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-lua-uncompressed-noconflict.js +523 -0
- data/vendor/assets/javascripts/mode-lua-uncompressed.js +523 -0
- data/vendor/assets/javascripts/mode-markdown-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-markdown-uncompressed-noconflict.js +2925 -0
- data/vendor/assets/javascripts/mode-markdown-uncompressed.js +2925 -0
- data/vendor/assets/javascripts/mode-markdown.js +1 -1
- data/vendor/assets/javascripts/mode-ocaml-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-ocaml-uncompressed-noconflict.js +539 -0
- data/vendor/assets/javascripts/mode-ocaml-uncompressed.js +539 -0
- data/vendor/assets/javascripts/mode-ocaml.js +1 -1
- data/vendor/assets/javascripts/mode-perl-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-perl-uncompressed-noconflict.js +574 -0
- data/vendor/assets/javascripts/mode-perl-uncompressed.js +574 -0
- data/vendor/assets/javascripts/mode-perl.js +1 -1
- data/vendor/assets/javascripts/mode-pgsql-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-pgsql-uncompressed-noconflict.js +1104 -0
- data/vendor/assets/javascripts/mode-pgsql-uncompressed.js +1104 -0
- data/vendor/assets/javascripts/mode-pgsql.js +1 -0
- data/vendor/assets/javascripts/mode-php-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-php-uncompressed-noconflict.js +1885 -0
- data/vendor/assets/javascripts/mode-php-uncompressed.js +1885 -0
- data/vendor/assets/javascripts/mode-php.js +1 -1
- data/vendor/assets/javascripts/mode-powershell-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-powershell-uncompressed-noconflict.js +710 -0
- data/vendor/assets/javascripts/mode-powershell-uncompressed.js +710 -0
- data/vendor/assets/javascripts/mode-powershell.js +1 -0
- data/vendor/assets/javascripts/mode-python-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-python-uncompressed-noconflict.js +507 -0
- data/vendor/assets/javascripts/mode-python-uncompressed.js +507 -0
- data/vendor/assets/javascripts/mode-python.js +1 -1
- data/vendor/assets/javascripts/mode-ruby-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-ruby-uncompressed-noconflict.js +391 -0
- data/vendor/assets/javascripts/mode-ruby-uncompressed.js +391 -0
- data/vendor/assets/javascripts/mode-ruby.js +1 -1
- data/vendor/assets/javascripts/mode-scad-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-scad-uncompressed-noconflict.js +907 -0
- data/vendor/assets/javascripts/mode-scad-uncompressed.js +907 -0
- data/vendor/assets/javascripts/mode-scad.js +1 -1
- data/vendor/assets/javascripts/mode-scala-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-scala-uncompressed-noconflict.js +1395 -0
- data/vendor/assets/javascripts/mode-scala-uncompressed.js +1395 -0
- data/vendor/assets/javascripts/mode-scala.js +1 -1
- data/vendor/assets/javascripts/mode-scss-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-scss-uncompressed-noconflict.js +679 -0
- data/vendor/assets/javascripts/mode-scss-uncompressed.js +679 -0
- data/vendor/assets/javascripts/mode-scss.js +1 -1
- data/vendor/assets/javascripts/mode-sh-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-sh-uncompressed-noconflict.js +289 -0
- data/vendor/assets/javascripts/mode-sh-uncompressed.js +289 -0
- data/vendor/assets/javascripts/mode-sh.js +1 -0
- data/vendor/assets/javascripts/mode-sql-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-sql-uncompressed-noconflict.js +159 -0
- data/vendor/assets/javascripts/mode-sql-uncompressed.js +159 -0
- data/vendor/assets/javascripts/mode-sql.js +1 -0
- data/vendor/assets/javascripts/mode-svg-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-svg-uncompressed-noconflict.js +2137 -0
- data/vendor/assets/javascripts/mode-svg-uncompressed.js +2137 -0
- data/vendor/assets/javascripts/mode-svg.js +1 -1
- data/vendor/assets/javascripts/mode-text-noconflict.js +0 -0
- data/vendor/assets/javascripts/mode-text-uncompressed-noconflict.js +0 -0
- data/vendor/assets/javascripts/mode-text-uncompressed.js +0 -0
- data/vendor/assets/javascripts/mode-text.js +0 -0
- data/vendor/assets/javascripts/mode-textile-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-textile-uncompressed-noconflict.js +254 -0
- data/vendor/assets/javascripts/mode-textile-uncompressed.js +254 -0
- data/vendor/assets/javascripts/mode-textile.js +1 -1
- data/vendor/assets/javascripts/mode-xml-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-xml-uncompressed-noconflict.js +1012 -0
- data/vendor/assets/javascripts/mode-xml-uncompressed.js +1012 -0
- data/vendor/assets/javascripts/mode-xml.js +1 -1
- data/vendor/assets/javascripts/mode-xquery-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-xquery-uncompressed-noconflict.js +540 -0
- data/vendor/assets/javascripts/mode-xquery-uncompressed.js +540 -0
- data/vendor/assets/javascripts/mode-xquery.js +1 -0
- data/vendor/assets/javascripts/theme-chrome-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-chrome-uncompressed-noconflict.js +207 -0
- data/vendor/assets/javascripts/theme-chrome-uncompressed.js +207 -0
- data/vendor/assets/javascripts/theme-chrome.js +1 -0
- data/vendor/assets/javascripts/theme-clouds-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-clouds-uncompressed-noconflict.js +160 -0
- data/vendor/assets/javascripts/theme-clouds-uncompressed.js +160 -0
- data/vendor/assets/javascripts/theme-clouds.js +1 -1
- data/vendor/assets/javascripts/theme-clouds_midnight-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-clouds_midnight-uncompressed-noconflict.js +161 -0
- data/vendor/assets/javascripts/theme-clouds_midnight-uncompressed.js +161 -0
- data/vendor/assets/javascripts/theme-clouds_midnight.js +1 -1
- data/vendor/assets/javascripts/theme-cobalt-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-cobalt-uncompressed-noconflict.js +187 -0
- data/vendor/assets/javascripts/theme-cobalt-uncompressed.js +187 -0
- data/vendor/assets/javascripts/theme-cobalt.js +1 -1
- data/vendor/assets/javascripts/theme-crimson_editor-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-crimson_editor-uncompressed-noconflict.js +198 -0
- data/vendor/assets/javascripts/theme-crimson_editor-uncompressed.js +198 -0
- data/vendor/assets/javascripts/theme-dawn-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-dawn-uncompressed-noconflict.js +191 -0
- data/vendor/assets/javascripts/theme-dawn-uncompressed.js +191 -0
- data/vendor/assets/javascripts/theme-dawn.js +1 -1
- data/vendor/assets/javascripts/theme-dreamweaver-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-dreamweaver-uncompressed-noconflict.js +227 -0
- data/vendor/assets/javascripts/theme-dreamweaver-uncompressed.js +227 -0
- data/vendor/assets/javascripts/theme-dreamweaver.js +1 -0
- data/vendor/assets/javascripts/theme-eclipse-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-eclipse-uncompressed-noconflict.js +147 -0
- data/vendor/assets/javascripts/theme-eclipse-uncompressed.js +147 -0
- data/vendor/assets/javascripts/theme-eclipse.js +1 -1
- data/vendor/assets/javascripts/theme-idle_fingers-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-idle_fingers-uncompressed-noconflict.js +179 -0
- data/vendor/assets/javascripts/theme-idle_fingers-uncompressed.js +179 -0
- data/vendor/assets/javascripts/theme-idle_fingers.js +1 -1
- data/vendor/assets/javascripts/theme-kr_theme-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-kr_theme-uncompressed-noconflict.js +182 -0
- data/vendor/assets/javascripts/theme-kr_theme-uncompressed.js +182 -0
- data/vendor/assets/javascripts/theme-kr_theme.js +1 -1
- data/vendor/assets/javascripts/theme-merbivore-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-merbivore-uncompressed-noconflict.js +182 -0
- data/vendor/assets/javascripts/theme-merbivore-uncompressed.js +182 -0
- data/vendor/assets/javascripts/theme-merbivore.js +1 -1
- data/vendor/assets/javascripts/theme-merbivore_soft-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-merbivore_soft-uncompressed-noconflict.js +188 -0
- data/vendor/assets/javascripts/theme-merbivore_soft-uncompressed.js +188 -0
- data/vendor/assets/javascripts/theme-merbivore_soft.js +1 -1
- data/vendor/assets/javascripts/theme-mono_industrial-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-mono_industrial-uncompressed-noconflict.js +190 -0
- data/vendor/assets/javascripts/theme-mono_industrial-uncompressed.js +190 -0
- data/vendor/assets/javascripts/theme-mono_industrial.js +1 -1
- data/vendor/assets/javascripts/theme-monokai-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-monokai-uncompressed-noconflict.js +191 -0
- data/vendor/assets/javascripts/theme-monokai-uncompressed.js +191 -0
- data/vendor/assets/javascripts/theme-monokai.js +1 -1
- data/vendor/assets/javascripts/theme-pastel_on_dark-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-pastel_on_dark-uncompressed-noconflict.js +192 -0
- data/vendor/assets/javascripts/theme-pastel_on_dark-uncompressed.js +192 -0
- data/vendor/assets/javascripts/theme-pastel_on_dark.js +1 -1
- data/vendor/assets/javascripts/theme-solarized_dark-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-solarized_dark-uncompressed-noconflict.js +176 -0
- data/vendor/assets/javascripts/theme-solarized_dark-uncompressed.js +176 -0
- data/vendor/assets/javascripts/theme-solarized_dark.js +1 -1
- data/vendor/assets/javascripts/theme-solarized_light-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-solarized_light-uncompressed-noconflict.js +172 -0
- data/vendor/assets/javascripts/theme-solarized_light-uncompressed.js +172 -0
- data/vendor/assets/javascripts/theme-solarized_light.js +1 -1
- data/vendor/assets/javascripts/theme-textmate-noconflict.js +0 -0
- data/vendor/assets/javascripts/theme-textmate-uncompressed-noconflict.js +0 -0
- data/vendor/assets/javascripts/theme-textmate-uncompressed.js +0 -0
- data/vendor/assets/javascripts/theme-tomorrow-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-tomorrow-uncompressed-noconflict.js +206 -0
- data/vendor/assets/javascripts/theme-tomorrow-uncompressed.js +206 -0
- data/vendor/assets/javascripts/theme-tomorrow.js +1 -1
- data/vendor/assets/javascripts/theme-tomorrow_night-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-tomorrow_night-uncompressed-noconflict.js +206 -0
- data/vendor/assets/javascripts/theme-tomorrow_night-uncompressed.js +206 -0
- data/vendor/assets/javascripts/theme-tomorrow_night.js +1 -1
- data/vendor/assets/javascripts/theme-tomorrow_night_blue-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-tomorrow_night_blue-uncompressed-noconflict.js +209 -0
- data/vendor/assets/javascripts/theme-tomorrow_night_blue-uncompressed.js +209 -0
- data/vendor/assets/javascripts/theme-tomorrow_night_blue.js +1 -1
- data/vendor/assets/javascripts/theme-tomorrow_night_bright-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-tomorrow_night_bright-uncompressed-noconflict.js +206 -0
- data/vendor/assets/javascripts/theme-tomorrow_night_bright-uncompressed.js +206 -0
- data/vendor/assets/javascripts/theme-tomorrow_night_bright.js +1 -1
- data/vendor/assets/javascripts/theme-tomorrow_night_eighties-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-tomorrow_night_eighties-uncompressed-noconflict.js +202 -0
- data/vendor/assets/javascripts/theme-tomorrow_night_eighties-uncompressed.js +202 -0
- data/vendor/assets/javascripts/theme-tomorrow_night_eighties.js +1 -1
- data/vendor/assets/javascripts/theme-twilight-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-twilight-uncompressed-noconflict.js +204 -0
- data/vendor/assets/javascripts/theme-twilight-uncompressed.js +204 -0
- data/vendor/assets/javascripts/theme-twilight.js +1 -1
- data/vendor/assets/javascripts/theme-vibrant_ink-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-vibrant_ink-uncompressed-noconflict.js +183 -0
- data/vendor/assets/javascripts/theme-vibrant_ink-uncompressed.js +183 -0
- data/vendor/assets/javascripts/theme-vibrant_ink.js +1 -1
- data/vendor/assets/javascripts/worker-coffee.js +2367 -1425
- data/vendor/assets/javascripts/worker-css.js +3271 -582
- data/vendor/assets/javascripts/worker-javascript.js +4313 -2934
- data/vendor/assets/javascripts/worker-json.js +3597 -0
- metadata +225 -7
@@ -1 +1 @@
|
|
1
|
-
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/xml","ace/mode/folding/html"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("./javascript").Mode,g=a("./css").Mode,h=a("../tokenizer").Tokenizer,i=a("./html_highlight_rules").HtmlHighlightRules,j=a("./behaviour/xml").XmlBehaviour,k=a("./folding/html").FoldMode,l=function(){var a=new i;this.$tokenizer=new h(a.getRules()),this.$behaviour=new j,this.$embeds=a.getEmbeds(),this.createModeDelegates({"js-":f,"css-":g}),this.foldingRules=new k};d.inherits(l,e),function(){this.toggleCommentLines=function(a,b,c,d){return 0},this.getNextLineIndent=function(a,b,c){return this.$getIndent(b)},this.checkOutdent=function(a,b,c){return!1}}.call(l.prototype),b.Mode=l}),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(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./javascript_highlight_rules").JavaScriptHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("../worker/worker_client").WorkerClient,k=a("./behaviour/cstyle").CstyleBehaviour,l=a("./folding/cstyle").FoldMode,m=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new k,this.foldingRules=new l};d.inherits(m,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)\/\//;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"||a=="regex_allowed"){var h=b.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start"||a=="regex_allowed")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new j(["ace"],"worker-javascript.js","ace/mode/javascript_worker","JavaScriptWorker");return b.attachToDocument(a.getDocument()),b.on("jslint",function(b){var c=[];for(var d=0;d<b.data.length;d++){var e=b.data[d];e&&c.push({row:e.line-1,column:e.character-1,text:e.reason,type:"warning",lint:e})}a.setAnnotations(c)}),b.on("narcissus",function(b){a.setAnnotations([b.data])}),b.on("terminate",function(){a.clearAnnotations()}),b}}.call(m.prototype),b.Mode=m}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/unicode","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("../unicode"),g=a("./doc_comment_highlight_rules").DocCommentHighlightRules,h=a("./text_highlight_rules").TextHighlightRules,i=function(){var a=e.arrayToMap("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document".split("|")),b=e.arrayToMap("break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|const|yield|import|get|set".split("|")),c="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield",d=e.arrayToMap("__parent__|__count__|escape|unescape|with|__proto__".split("|")),h=e.arrayToMap("const|let|var|function".split("|")),i=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),j=e.arrayToMap("class|enum|extends|super|export|implements|private|public|interface|package|protected|static".split("|")),k="["+f.packages.L+"\\$_]["+f.packages.L+f.packages.Mn+f.packages.Mc+f.packages.Nd+f.packages.Pc+"\\$_]*\\b";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new g).getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:["keyword.definition","text","entity.name.function"],regex:"(function)(\\s+)("+k+")"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"keyword",regex:"(?:"+c+")\\b",next:"regex_allowed"},{token:function(c){return a.hasOwnProperty(c)?"variable.language":d.hasOwnProperty(c)?"invalid.deprecated":h.hasOwnProperty(c)?"keyword.definition":b.hasOwnProperty(c)?"keyword":i.hasOwnProperty(c)?"constant.language":j.hasOwnProperty(c)?"invalid.illegal":c=="debugger"?"invalid.deprecated":"identifier"},regex:k},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",next:"regex_allowed"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\.",next:"regex_allowed"},{token:"paren.lparen",regex:"[[({]",next:"regex_allowed"},{token:"paren.rparen",regex:"[\\])}]"},{token:"keyword.operator",regex:"\\/=?",next:"regex_allowed"},{token:"comment",regex:"^#!.*$"},{token:"text",regex:"\\s+"}],regex_allowed:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/.*$"},{token:"string.regexp",regex:"\\/",next:"regex",merge:!0},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex"},{token:"string.regexp",regex:"/\\w*",next:"start",merge:!0},{token:"string.regexp",regex:"[^\\\\/\\[]+",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"\\[",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],regex_character_class:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)",next:"regex_character_class"},{token:"string.regexp.charachterclass",regex:"]",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"[^\\\\\\]]+",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],comment_regex_allowed:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"regex_allowed"},{token:"comment",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(g,"doc-",[(new g).getEndRule("start")])};d.inherits(i,h),b.JavaScriptHighlightRules=i}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};((function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}})).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return null;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;o<k.length;o++){m=k[o],m.type=="string"?n=-1:n<0&&(n=m.value.indexOf('"'));if(m.value.length+l>f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};((function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}})).call(e.prototype)}),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/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./css_highlight_rules").CssHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../worker/worker_client").WorkerClient,j=a("./folding/cstyle").FoldMode,k=function(){this.$tokenizer=new f((new g).getRules(),"i"),this.$outdent=new h,this.foldingRules=new j};d.inherits(k,e),function(){this.foldingRules="cStyle",this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a).tokens;if(e.length&&e[e.length-1].type=="comment")return d;var f=b.match(/^.*\{\s*$/);return f&&(d+=c),d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new i(["ace"],"worker-css.js","ace/mode/css_worker","Worker");return b.attachToDocument(a.getDocument()),b.on("csslint",function(b){var c=[];b.data.forEach(function(a){c.push({row:a.line-1,column:a.col-1,text:a.message,type:a.type,lint:a})}),a.setAnnotations(c)}),b}}.call(k.prototype),b.Mode=k}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("-moz-appearance|-moz-box-sizing|-webkit-box-sizing|-moz-outline-radius|-moz-transform|-webkit-transform|appearance|azimuth|background-attachment|background-color|background-image|background-origin|background-position|background-repeat|background|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border|bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|-moz-border-radius|opacity|orphans|outline-color|outline-offset|outline-radius|outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|pointer-events|position|quotes|resize|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|stress|table-layout|text-align|text-decoration|text-indent|text-shadow|text-transform|top|transform|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index".split("|")),b=e.arrayToMap("rgb|rgba|url|attr|counter|counters".split("|")),c=e.arrayToMap("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|decimal-leading-zero|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|keep-all|left|lighter|line-edge|line-through|line|list-item|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|super|sw-resize|table-footer-group|table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|zero".split("|")),d=e.arrayToMap("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow".split("|")),f="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",g=[{token:"comment",merge:!0,regex:"\\/\\*",next:"ruleset_comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:f+"(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:function(e){return a.hasOwnProperty(e.toLowerCase())?"support.type":b.hasOwnProperty(e.toLowerCase())?"support.function":c.hasOwnProperty(e.toLowerCase())?"support.constant":d.hasOwnProperty(e.toLowerCase())?"support.constant.color":"text"},regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}],h=e.copyArray(g);h.unshift({token:"paren.rparen",regex:"\\}",next:"start"});var i=e.copyArray(g);i.unshift({token:"paren.rparen",regex:"\\}",next:"media"});var j=[{token:"comment",merge:!0,regex:".+"}],k=e.copyArray(j);k.unshift({token:"comment",regex:".*?\\*\\/",next:"start"});var l=e.copyArray(j);l.unshift({token:"comment",regex:".*?\\*\\/",next:"media"});var m=e.copyArray(j);m.unshift({token:"comment",regex:".*?\\*\\/",next:"ruleset"}),this.$rules={start:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"string",regex:"@.*?{",next:"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-_]+"}],media:[{token:"comment",merge:!0,regex:"\\/\\*",next:"media_comment"},{token:"paren.lparen",regex:"\\{",next:"media_ruleset"},{token:"string",regex:"\\}",next:"start"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"}],comment:k,ruleset:h,ruleset_comment:m,media_ruleset:i,media_comment:l}};d.inherits(g,f),b.CssHighlightRules=g}),define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_util","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./css_highlight_rules").CssHighlightRules,f=a("./javascript_highlight_rules").JavaScriptHighlightRules,g=a("./xml_util"),h=a("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"text",merge:!0,regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:"xml_pe",regex:"<\\?.*?\\?>"},{token:"comment",merge:!0,regex:"<\\!--",next:"comment"},{token:"meta.tag",regex:"<(?=s*script\\b)",next:"script"},{token:"meta.tag",regex:"<(?=s*style\\b)",next:"style"},{token:"meta.tag",regex:"<\\/?",next:"tag"},{token:"text",regex:"\\s+"},{token:"text",regex:"[^<]+"}],cdata:[{token:"text",regex:"\\]\\]>",next:"start"},{token:"text",merge:!0,regex:"\\s+"},{token:"text",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?-->",next:"start"},{token:"comment",merge:!0,regex:".+"}]},g.tag(this.$rules,"tag","start"),g.tag(this.$rules,"style","css-start"),g.tag(this.$rules,"script","js-start"),this.embedRules(f,"js-",[{token:"comment",regex:"\\/\\/.*(?=<\\/script>)",next:"tag"},{token:"meta.tag",regex:"<\\/(?=script)",next:"tag"}]),this.embedRules(e,"css-",[{token:"meta.tag",regex:"<\\/(?=style)",next:"tag"}])};d.inherits(i,h),b.HtmlHighlightRules=i}),define("ace/mode/xml_util",["require","exports","module","ace/lib/lang"],function(a,b,c){function g(a){return[{token:"string",regex:'".*?"'},{token:"string",merge:!0,regex:'["].*',next:a+"_qqstring"},{token:"string",regex:"'.*?'"},{token:"string",merge:!0,regex:"['].*",next:a+"_qstring"}]}function h(a,b){return[{token:"string",merge:!0,regex:".*?"+a,next:b},{token:"string",merge:!0,regex:".+"}]}"use strict";var d=a("../lib/lang"),e=d.arrayToMap("button|form|input|label|select|textarea".split("|")),f=d.arrayToMap("table|tbody|td|tfoot|th|tr".split("|"));b.tag=function(a,b,c){a[b]=[{token:"text",regex:"\\s+"},{token:function(a){return a==="a"?"meta.tag.anchor":a==="img"?"meta.tag.image":a==="script"?"meta.tag.script":a==="style"?"meta.tag.style":e.hasOwnProperty(a.toLowerCase())?"meta.tag.form":f.hasOwnProperty(a.toLowerCase())?"meta.tag.table":"meta.tag"},merge:!0,regex:"[-_a-zA-Z0-9:!]+",next:b+"_embed_attribute_list"},{token:"empty",regex:"",next:b+"_embed_attribute_list"}],a[b+"_qstring"]=h("'",b+"_embed_attribute_list"),a[b+"_qqstring"]=h('"',b+"_embed_attribute_list"),a[b+"_embed_attribute_list"]=[{token:"meta.tag",merge:!0,regex:"/?>",next:c},{token:"keyword.operator",regex:"="},{token:"entity.other.attribute-name",regex:"[-_a-zA-Z0-9:]+"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"text",regex:"\\s+"}].concat(g(b))}}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=a("./cstyle").CstyleBehaviour,g=function(){this.inherit(f,["string_dquotes"]),this.add("brackets","insertion",function(a,b,c,d,e){if(e=="<"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?!1:{text:"<>",selection:[1,1]}}if(e==">"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==">")return{text:"",selection:[1,1]}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),k=i.substring(h.column,h.column+2);if(k=="</"){var l=this.$getIndent(d.doc.getLine(h.row))+d.getTabString(),m=this.$getIndent(d.doc.getLine(h.row));return{text:"\n"+l+"\n"+m,selection:[1,l.length,1,l.length]}}}})};d.inherits(g,e),b.XmlBehaviour=g}),define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("./mixed").FoldMode,f=a("./xml").FoldMode,g=a("./cstyle").FoldMode,h=b.FoldMode=function(){e.call(this,new f({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 g,"css-":new g})};d.inherits(h,e)}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("./fold_mode").FoldMode,f=b.FoldMode=function(a,b){this.defaultMode=a,this.subModes=b};d.inherits(f,e),function(){this.$getMode=function(a){for(var b in this.subModes)if(a.indexOf(b)===0)return this.subModes[b];return null},this.$tryMode=function(a,b,c,d){var e=this.$getMode(a);return e?e.getFoldWidget(b,c,d):""},this.getFoldWidget=function(a,b,c){return this.$tryMode(a.getState(c-1),a,b,c)||this.$tryMode(a.getState(c),a,b,c)||this.defaultMode.getFoldWidget(a,b,c)},this.getFoldWidgetRange=function(a,b,c){var d=this.$getMode(a.getState(c-1));if(!d||!d.getFoldWidget(a,b,c))d=this.$getMode(a.getState(c));if(!d||!d.getFoldWidget(a,b,c))d=this.defaultMode;return d.getFoldWidgetRange(a,b,c)}}.call(f.prototype)}),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(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../lib/lang"),f=a("../../range").Range,g=a("./fold_mode").FoldMode,h=a("../../token_iterator").TokenIterator,i=b.FoldMode=function(a){g.call(this),this.voidElements=a||{}};d.inherits(i,g),function(){this.getFoldWidget=function(a,b,c){var d=this._getFirstTagInLine(a,c);return d.closing?b=="markbeginend"?"end":"":!d.tagName||this.voidElements[d.tagName.toLowerCase()]?"":d.selfClosing?"":d.value.indexOf("/"+d.tagName)!==-1?"":"start"},this._getFirstTagInLine=function(a,b){var c=a.getTokens(b,b)[0].tokens,d="";for(var f=0;f<c.length;f++){var g=c[f];g.type.indexOf("meta.tag")===0?d+=g.value:d+=e.stringRepeat(" ",g.value.length)}return this._parseTag(d)},this.tagRe=/^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/,this._parseTag=function(a){var b=this.tagRe.exec(a),c=this.tagRe.lastIndex||0;return this.tagRe.lastIndex=0,{value:a,match:b?b[2]:"",closing:b?!!b[3]:!1,selfClosing:b?!!b[5]||b[2]=="/>":!1,tagName:b?b[4]:"",column:b[1]?c+b[1].length:c}},this._readTagForward=function(a){var b=a.getCurrentToken();if(!b)return null;var c="",d;do if(b.type.indexOf("meta.tag")===0){if(!d)var d={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()};c+=b.value;if(c.indexOf(">")!==-1){var e=this._parseTag(c);return e.start=d,e.end={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()+b.value.length},a.stepForward(),e}}while(b=a.stepForward());return null},this._readTagBackward=function(a){var b=a.getCurrentToken();if(!b)return null;var c="",d;do if(b.type.indexOf("meta.tag")===0){d||(d={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()+b.value.length}),c=b.value+c;if(c.indexOf("<")!==-1){var e=this._parseTag(c);return e.end=d,e.start={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()},a.stepBackward(),e}}while(b=a.stepBackward());return null},this._pop=function(a,b){while(a.length){var c=a[a.length-1];if(!b||c.tagName==b.tagName)return a.pop();if(this.voidElements[b.tagName])return;if(this.voidElements[c.tagName]){a.pop();continue}return null}},this.getFoldWidgetRange=function(a,b,c){var d=this._getFirstTagInLine(a,c);if(!d.match)return null;var e=d.closing||d.selfClosing,g=[],i;if(!e){var j=new h(a,c,d.column),k={row:c,column:d.column+d.tagName.length+2};while(i=this._readTagForward(j)){if(i.selfClosing){if(!g.length)return i.start.column+=i.tagName.length+2,i.end.column-=2,f.fromPoints(i.start,i.end);continue}if(i.closing){this._pop(g,i);if(g.length==0)return f.fromPoints(k,i.start)}else g.push(i)}}else{var j=new h(a,c,d.column+d.match.length),l={row:c,column:d.column};while(i=this._readTagBackward(j)){if(i.selfClosing){if(!g.length)return i.start.column+=i.tagName.length+2,i.end.column-=2,f.fromPoints(i.start,i.end);continue}if(!i.closing){this._pop(g,i);if(g.length==0)return i.start.column+=i.tagName.length+2,f.fromPoints(i.start,l)}else g.push(i)}}}}.call(i.prototype)})
|
1
|
+
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/xml","ace/mode/folding/html"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("./javascript").Mode,g=a("./css").Mode,h=a("../tokenizer").Tokenizer,i=a("./html_highlight_rules").HtmlHighlightRules,j=a("./behaviour/xml").XmlBehaviour,k=a("./folding/html").FoldMode,l=function(){var a=new i;this.$tokenizer=new h(a.getRules()),this.$behaviour=new j,this.$embeds=a.getEmbeds(),this.createModeDelegates({"js-":f,"css-":g}),this.foldingRules=new k};d.inherits(l,e),function(){this.toggleCommentLines=function(a,b,c,d){return 0},this.getNextLineIndent=function(a,b,c){return this.$getIndent(b)},this.checkOutdent=function(a,b,c){return!1}}.call(l.prototype),b.Mode=l}),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(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./javascript_highlight_rules").JavaScriptHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("../worker/worker_client").WorkerClient,k=a("./behaviour/cstyle").CstyleBehaviour,l=a("./folding/cstyle").FoldMode,m=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new k,this.foldingRules=new l};d.inherits(m,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)\/\//;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"||a=="regex_allowed"){var h=b.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start"||a=="regex_allowed")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new j(["ace"],"worker-javascript.js","ace/mode/javascript_worker","JavaScriptWorker");return b.attachToDocument(a.getDocument()),b.on("jslint",function(b){var c=[];for(var d=0;d<b.data.length;d++){var e=b.data[d];e&&c.push({row:e.line-1,column:e.character-1,text:e.reason,type:"warning",lint:e})}a.setAnnotations(c)}),b.on("narcissus",function(b){a.setAnnotations([b.data])}),b.on("terminate",function(){a.clearAnnotations()}),b}}.call(m.prototype),b.Mode=m}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/unicode","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("../unicode"),g=a("./doc_comment_highlight_rules").DocCommentHighlightRules,h=a("./text_highlight_rules").TextHighlightRules,i=function(){var a=e.arrayToMap("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document".split("|")),b=e.arrayToMap("break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|const|yield|import|get|set".split("|")),c="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield",d=e.arrayToMap("__parent__|__count__|escape|unescape|with|__proto__".split("|")),h=e.arrayToMap("const|let|var|function".split("|")),i=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),j=e.arrayToMap("class|enum|extends|super|export|implements|private|public|interface|package|protected|static".split("|")),k="["+f.packages.L+"\\$_]["+f.packages.L+f.packages.Mn+f.packages.Mc+f.packages.Nd+f.packages.Pc+"\\$_]*\\b",l="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={start:[{token:"comment",regex:/\/\/.*$/},g.getStartRule("doc-start"),{token:"comment",merge:!0,regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+k+")(\\.)(prototype)(\\.)("+k+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator","text"],regex:"("+k+")(\\.)(prototype)(\\.)("+k+")(\\s*)(=)(\\s*)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+k+")(\\.)("+k+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+k+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+k+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+k+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"constant.language.boolean",regex:/(?:true|false)\b/},{token:"keyword",regex:"(?:"+c+")\\b",next:"regex_allowed"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|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:function(c){return a.hasOwnProperty(c)?"variable.language":d.hasOwnProperty(c)?"invalid.deprecated":h.hasOwnProperty(c)?"storage.type":b.hasOwnProperty(c)?"keyword":i.hasOwnProperty(c)?"constant.language":j.hasOwnProperty(c)?"invalid.illegal":c=="debugger"?"invalid.deprecated":"identifier"},regex:k},{token:"keyword.operator",regex:/!|\$|%|&|\*|\-\-|\-|\+\+|\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=|\b(?:in|instanceof|new|delete|typeof|void)/,next:"regex_allowed"},{token:"punctuation.operator",regex:/\?|\:|\,|\;|\./,next:"regex_allowed"},{token:"paren.lparen",regex:/[\[({]/,next:"regex_allowed"},{token:"paren.rparen",regex:/[\])}]/},{token:"keyword.operator",regex:/\/=?/,next:"regex_allowed"},{token:"comment",regex:/^#!.*$/},{token:"text",regex:/\s+/}],regex_allowed:[g.getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/.*$"},{token:"string.regexp",regex:"\\/",next:"regex",merge:!0},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/\\w*",next:"start",merge:!0},{token:"string.regexp",regex:"[^\\\\/\\[]+",merge:!0},{token:"string.regexp.charachterclass",regex:"\\[",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],regex_character_class:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp.charachterclass",regex:"]",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"[^\\\\\\]]+",merge:!0},{token:"empty",regex:"",next:"start"}],function_arguments:[{token:"variable.parameter",regex:k},{token:"punctuation.operator",regex:"[, ]+",merge:!0},{token:"punctuation.operator",regex:"$",merge:!0},{token:"empty",regex:"",next:"start"}],comment_regex_allowed:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"regex_allowed"},{token:"comment",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"constant.language.escape",regex:l},{token:"string",regex:'[^"\\\\]+',merge:!0},{token:"string",regex:"\\\\$",next:"qqstring",merge:!0},{token:"string",regex:'"|$',next:"start",merge:!0}],qstring:[{token:"constant.language.escape",regex:l},{token:"string",regex:"[^'\\\\]+",merge:!0},{token:"string",regex:"\\\\$",next:"qstring",merge:!0},{token:"string",regex:"'|$",next:"start",merge:!0}]},this.embedRules(g,"doc-",[g.getEndRule("start")])};d.inherits(i,h),b.JavaScriptHighlightRules=i}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),f.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},f.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}},b.DocCommentHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};(function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}}).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'||e=="'"){var f=e,g=c.getSelectionRange(),h=d.doc.getTextRange(g);if(h!=="")return{text:f+h+f,selection:!1};var i=c.getCursorPosition(),j=d.doc.getLine(i.row),k=j.substring(i.column-1,i.column);if(k=="\\")return null;var l=d.getTokens(g.start.row,g.start.row)[0].tokens,m=0,n,o=-1;for(var p=0;p<l.length;p++){n=l[p],n.type=="string"?o=-1:o<0&&(o=n.value.indexOf(f));if(n.value.length+m>g.start.column)break;m+=l[p].value.length}if(!n||o<0&&n.type!=="comment"&&(n.type!=="string"||g.start.column!==n.value.length+m-1&&n.value.lastIndexOf(f)===n.value.length-1))return{text:f+f,selection:[1,1]};if(n&&n.type==="string"){var q=j.substring(i.column,i.column+1);if(q==f)return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&(f=='"'||f=="'")){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}}).call(e.prototype)}),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/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./css_highlight_rules").CssHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../worker/worker_client").WorkerClient,j=a("./folding/cstyle").FoldMode,k=function(){this.$tokenizer=new f((new g).getRules(),"i"),this.$outdent=new h,this.foldingRules=new j};d.inherits(k,e),function(){this.foldingRules="cStyle",this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a).tokens;if(e.length&&e[e.length-1].type=="comment")return d;var f=b.match(/^.*\{\s*$/);return f&&(d+=c),d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new i(["ace"],"worker-css.js","ace/mode/css_worker","Worker");return b.attachToDocument(a.getDocument()),b.on("csslint",function(b){var c=[];b.data.forEach(function(a){c.push({row:a.line-1,column:a.col-1,text:a.message,type:a.type,lint:a})}),a.setAnnotations(c)}),b}}.call(k.prototype),b.Mode=k}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("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".split("|")),b=e.arrayToMap("rgb|rgba|url|attr|counter|counters".split("|")),c=e.arrayToMap("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|font-size|font|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|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero".split("|")),d=e.arrayToMap("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow".split("|")),f=e.arrayToMap("arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace".split("|")),g="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",h="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",i="(:)\\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",j=[{token:"comment",merge:!0,regex:"\\/\\*",next:"ruleset_comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+g+")(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:"([0-9]+)"},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:i},{token:function(e){return a.hasOwnProperty(e.toLowerCase())?"support.type":b.hasOwnProperty(e.toLowerCase())?"support.function":c.hasOwnProperty(e.toLowerCase())?"support.constant":d.hasOwnProperty(e.toLowerCase())?"support.constant.color":f.hasOwnProperty(e.toLowerCase())?"support.constant.fonts":"text"},regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}],k=e.copyArray(j);k.unshift({token:"paren.rparen",regex:"\\}",next:"start"});var l=e.copyArray(j);l.unshift({token:"paren.rparen",regex:"\\}",next:"media"});var m=[{token:"comment",merge:!0,regex:".+"}],n=e.copyArray(m);n.unshift({token:"comment",regex:".*?\\*\\/",next:"start"});var o=e.copyArray(m);o.unshift({token:"comment",regex:".*?\\*\\/",next:"media"});var p=e.copyArray(m);p.unshift({token:"comment",regex:".*?\\*\\/",next:"ruleset"}),this.$rules={start:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"string",regex:"@.*?{",next:"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-_]+"}],media:[{token:"comment",merge:!0,regex:"\\/\\*",next:"media_comment"},{token:"paren.lparen",regex:"\\{",next:"media_ruleset"},{token:"string",regex:"\\}",next:"start"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"}],comment:n,ruleset:k,ruleset_comment:p,media_ruleset:l,media_comment:o}};d.inherits(g,f),b.CssHighlightRules=g}),define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_util","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./css_highlight_rules").CssHighlightRules,f=a("./javascript_highlight_rules").JavaScriptHighlightRules,g=a("./xml_util"),h=a("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"text",merge:!0,regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:"xml_pe",regex:"<\\?.*?\\?>"},{token:"comment",merge:!0,regex:"<\\!--",next:"comment"},{token:"xml_pe",regex:"<\\!.*?>"},{token:"meta.tag",regex:"<(?=s*script\\b)",next:"script"},{token:"meta.tag",regex:"<(?=s*style\\b)",next:"style"},{token:"meta.tag",regex:"<\\/?",next:"tag"},{token:"text",regex:"\\s+"},{token:"constant.character.entity",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"},{token:"text",regex:"[^<]+"}],cdata:[{token:"text",regex:"\\]\\]>",next:"start"},{token:"text",merge:!0,regex:"\\s+"},{token:"text",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?-->",next:"start"},{token:"comment",merge:!0,regex:".+"}]},g.tag(this.$rules,"tag","start"),g.tag(this.$rules,"style","css-start"),g.tag(this.$rules,"script","js-start"),this.embedRules(f,"js-",[{token:"comment",regex:"\\/\\/.*(?=<\\/script>)",next:"tag"},{token:"meta.tag",regex:"<\\/(?=script)",next:"tag"}]),this.embedRules(e,"css-",[{token:"meta.tag",regex:"<\\/(?=style)",next:"tag"}])};d.inherits(i,h),b.HtmlHighlightRules=i}),define("ace/mode/xml_util",["require","exports","module","ace/lib/lang"],function(a,b,c){function g(a){return[{token:"string",regex:'".*?"'},{token:"string",merge:!0,regex:'["].*',next:a+"_qqstring"},{token:"string",regex:"'.*?'"},{token:"string",merge:!0,regex:"['].*",next:a+"_qstring"}]}function h(a,b){return[{token:"string",merge:!0,regex:".*?"+a,next:b},{token:"string",merge:!0,regex:".+"}]}"use strict";var d=a("../lib/lang"),e=d.arrayToMap("button|form|input|label|select|textarea".split("|")),f=d.arrayToMap("table|tbody|td|tfoot|th|tr".split("|"));b.tag=function(a,b,c){a[b]=[{token:"text",regex:"\\s+"},{token:function(a){return a==="a"?"meta.tag.anchor":a==="img"?"meta.tag.image":a==="script"?"meta.tag.script":a==="style"?"meta.tag.style":e.hasOwnProperty(a.toLowerCase())?"meta.tag.form":f.hasOwnProperty(a.toLowerCase())?"meta.tag.table":"meta.tag"},merge:!0,regex:"[-_a-zA-Z0-9:]+",next:b+"_embed_attribute_list"},{token:"empty",regex:"",next:b+"_embed_attribute_list"}],a[b+"_qstring"]=h("'",b+"_embed_attribute_list"),a[b+"_qqstring"]=h('"',b+"_embed_attribute_list"),a[b+"_embed_attribute_list"]=[{token:"meta.tag",merge:!0,regex:"/?>",next:c},{token:"keyword.operator",regex:"="},{token:"entity.other.attribute-name",regex:"[-_a-zA-Z0-9:]+"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"text",regex:"\\s+"}].concat(g(b))}}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=a("./cstyle").CstyleBehaviour,g=function(){this.inherit(f,["string_dquotes"]),this.add("brackets","insertion",function(a,b,c,d,e){if(e=="<"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?!1:{text:"<>",selection:[1,1]}}if(e==">"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==">")return{text:"",selection:[1,1]}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),k=i.substring(h.column,h.column+2);if(k=="</"){var l=this.$getIndent(d.doc.getLine(h.row))+d.getTabString(),m=this.$getIndent(d.doc.getLine(h.row));return{text:"\n"+l+"\n"+m,selection:[1,l.length,1,l.length]}}}})};d.inherits(g,e),b.XmlBehaviour=g}),define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("./mixed").FoldMode,f=a("./xml").FoldMode,g=a("./cstyle").FoldMode,h=b.FoldMode=function(){e.call(this,new f({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 g,"css-":new g})};d.inherits(h,e)}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("./fold_mode").FoldMode,f=b.FoldMode=function(a,b){this.defaultMode=a,this.subModes=b};d.inherits(f,e),function(){this.$getMode=function(a){for(var b in this.subModes)if(a.indexOf(b)===0)return this.subModes[b];return null},this.$tryMode=function(a,b,c,d){var e=this.$getMode(a);return e?e.getFoldWidget(b,c,d):""},this.getFoldWidget=function(a,b,c){return this.$tryMode(a.getState(c-1),a,b,c)||this.$tryMode(a.getState(c),a,b,c)||this.defaultMode.getFoldWidget(a,b,c)},this.getFoldWidgetRange=function(a,b,c){var d=this.$getMode(a.getState(c-1));if(!d||!d.getFoldWidget(a,b,c))d=this.$getMode(a.getState(c));if(!d||!d.getFoldWidget(a,b,c))d=this.defaultMode;return d.getFoldWidgetRange(a,b,c)}}.call(f.prototype)}),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(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../lib/lang"),f=a("../../range").Range,g=a("./fold_mode").FoldMode,h=a("../../token_iterator").TokenIterator,i=b.FoldMode=function(a){g.call(this),this.voidElements=a||{}};d.inherits(i,g),function(){this.getFoldWidget=function(a,b,c){var d=this._getFirstTagInLine(a,c);return d.closing?b=="markbeginend"?"end":"":!d.tagName||this.voidElements[d.tagName.toLowerCase()]?"":d.selfClosing?"":d.value.indexOf("/"+d.tagName)!==-1?"":"start"},this._getFirstTagInLine=function(a,b){var c=a.getTokens(b,b)[0].tokens,d="";for(var f=0;f<c.length;f++){var g=c[f];g.type.indexOf("meta.tag")===0?d+=g.value:d+=e.stringRepeat(" ",g.value.length)}return this._parseTag(d)},this.tagRe=/^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/,this._parseTag=function(a){var b=this.tagRe.exec(a),c=this.tagRe.lastIndex||0;return this.tagRe.lastIndex=0,{value:a,match:b?b[2]:"",closing:b?!!b[3]:!1,selfClosing:b?!!b[5]||b[2]=="/>":!1,tagName:b?b[4]:"",column:b[1]?c+b[1].length:c}},this._readTagForward=function(a){var b=a.getCurrentToken();if(!b)return null;var c="",d;do if(b.type.indexOf("meta.tag")===0){if(!d)var d={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()};c+=b.value;if(c.indexOf(">")!==-1){var e=this._parseTag(c);return e.start=d,e.end={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()+b.value.length},a.stepForward(),e}}while(b=a.stepForward());return null},this._readTagBackward=function(a){var b=a.getCurrentToken();if(!b)return null;var c="",d;do if(b.type.indexOf("meta.tag")===0){d||(d={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()+b.value.length}),c=b.value+c;if(c.indexOf("<")!==-1){var e=this._parseTag(c);return e.end=d,e.start={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()},a.stepBackward(),e}}while(b=a.stepBackward());return null},this._pop=function(a,b){while(a.length){var c=a[a.length-1];if(!b||c.tagName==b.tagName)return a.pop();if(this.voidElements[b.tagName])return;if(this.voidElements[c.tagName]){a.pop();continue}return null}},this.getFoldWidgetRange=function(a,b,c){var d=this._getFirstTagInLine(a,c);if(!d.match)return null;var e=d.closing||d.selfClosing,g=[],i;if(!e){var j=new h(a,c,d.column),k={row:c,column:d.column+d.tagName.length+2};while(i=this._readTagForward(j)){if(i.selfClosing){if(!g.length)return i.start.column+=i.tagName.length+2,i.end.column-=2,f.fromPoints(i.start,i.end);continue}if(i.closing){this._pop(g,i);if(g.length==0)return f.fromPoints(k,i.start)}else g.push(i)}}else{var j=new h(a,c,d.column+d.match.length),l={row:c,column:d.column};while(i=this._readTagBackward(j)){if(i.selfClosing){if(!g.length)return i.start.column+=i.tagName.length+2,i.end.column-=2,f.fromPoints(i.start,i.end);continue}if(!i.closing){this._pop(g,i);if(g.length==0)return i.start.column+=i.tagName.length+2,f.fromPoints(i.start,l)}else g.push(i)}}}}.call(i.prototype)})
|
@@ -0,0 +1 @@
|
|
1
|
+
ace.define("ace/mode/java",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/tokenizer","ace/mode/java_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./javascript").Mode,f=a("../tokenizer").Tokenizer,g=a("./java_highlight_rules").JavaHighlightRules,h=function(){e.call(this),this.$tokenizer=new f((new g).getRules())};d.inherits(h,e),function(){this.createWorker=function(a){return null}}.call(h.prototype),b.Mode=h}),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(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./javascript_highlight_rules").JavaScriptHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("../worker/worker_client").WorkerClient,k=a("./behaviour/cstyle").CstyleBehaviour,l=a("./folding/cstyle").FoldMode,m=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new k,this.foldingRules=new l};d.inherits(m,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)\/\//;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"||a=="regex_allowed"){var h=b.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start"||a=="regex_allowed")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new j(["ace"],"worker-javascript.js","ace/mode/javascript_worker","JavaScriptWorker");return b.attachToDocument(a.getDocument()),b.on("jslint",function(b){var c=[];for(var d=0;d<b.data.length;d++){var e=b.data[d];e&&c.push({row:e.line-1,column:e.character-1,text:e.reason,type:"warning",lint:e})}a.setAnnotations(c)}),b.on("narcissus",function(b){a.setAnnotations([b.data])}),b.on("terminate",function(){a.clearAnnotations()}),b}}.call(m.prototype),b.Mode=m}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/unicode","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("../unicode"),g=a("./doc_comment_highlight_rules").DocCommentHighlightRules,h=a("./text_highlight_rules").TextHighlightRules,i=function(){var a=e.arrayToMap("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document".split("|")),b=e.arrayToMap("break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|const|yield|import|get|set".split("|")),c="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield",d=e.arrayToMap("__parent__|__count__|escape|unescape|with|__proto__".split("|")),h=e.arrayToMap("const|let|var|function".split("|")),i=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),j=e.arrayToMap("class|enum|extends|super|export|implements|private|public|interface|package|protected|static".split("|")),k="["+f.packages.L+"\\$_]["+f.packages.L+f.packages.Mn+f.packages.Mc+f.packages.Nd+f.packages.Pc+"\\$_]*\\b",l="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={start:[{token:"comment",regex:/\/\/.*$/},g.getStartRule("doc-start"),{token:"comment",merge:!0,regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+k+")(\\.)(prototype)(\\.)("+k+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator","text"],regex:"("+k+")(\\.)(prototype)(\\.)("+k+")(\\s*)(=)(\\s*)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+k+")(\\.)("+k+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+k+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+k+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+k+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"constant.language.boolean",regex:/(?:true|false)\b/},{token:"keyword",regex:"(?:"+c+")\\b",next:"regex_allowed"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|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:function(c){return a.hasOwnProperty(c)?"variable.language":d.hasOwnProperty(c)?"invalid.deprecated":h.hasOwnProperty(c)?"storage.type":b.hasOwnProperty(c)?"keyword":i.hasOwnProperty(c)?"constant.language":j.hasOwnProperty(c)?"invalid.illegal":c=="debugger"?"invalid.deprecated":"identifier"},regex:k},{token:"keyword.operator",regex:/!|\$|%|&|\*|\-\-|\-|\+\+|\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=|\b(?:in|instanceof|new|delete|typeof|void)/,next:"regex_allowed"},{token:"punctuation.operator",regex:/\?|\:|\,|\;|\./,next:"regex_allowed"},{token:"paren.lparen",regex:/[\[({]/,next:"regex_allowed"},{token:"paren.rparen",regex:/[\])}]/},{token:"keyword.operator",regex:/\/=?/,next:"regex_allowed"},{token:"comment",regex:/^#!.*$/},{token:"text",regex:/\s+/}],regex_allowed:[g.getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/.*$"},{token:"string.regexp",regex:"\\/",next:"regex",merge:!0},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/\\w*",next:"start",merge:!0},{token:"string.regexp",regex:"[^\\\\/\\[]+",merge:!0},{token:"string.regexp.charachterclass",regex:"\\[",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],regex_character_class:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp.charachterclass",regex:"]",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"[^\\\\\\]]+",merge:!0},{token:"empty",regex:"",next:"start"}],function_arguments:[{token:"variable.parameter",regex:k},{token:"punctuation.operator",regex:"[, ]+",merge:!0},{token:"punctuation.operator",regex:"$",merge:!0},{token:"empty",regex:"",next:"start"}],comment_regex_allowed:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"regex_allowed"},{token:"comment",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"constant.language.escape",regex:l},{token:"string",regex:'[^"\\\\]+',merge:!0},{token:"string",regex:"\\\\$",next:"qqstring",merge:!0},{token:"string",regex:'"|$',next:"start",merge:!0}],qstring:[{token:"constant.language.escape",regex:l},{token:"string",regex:"[^'\\\\]+",merge:!0},{token:"string",regex:"\\\\$",next:"qstring",merge:!0},{token:"string",regex:"'|$",next:"start",merge:!0}]},this.embedRules(g,"doc-",[g.getEndRule("start")])};d.inherits(i,h),b.JavaScriptHighlightRules=i}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),f.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},f.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}},b.DocCommentHighlightRules=f}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};(function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}}).call(e.prototype),b.MatchingBraceOutdent=e}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'||e=="'"){var f=e,g=c.getSelectionRange(),h=d.doc.getTextRange(g);if(h!=="")return{text:f+h+f,selection:!1};var i=c.getCursorPosition(),j=d.doc.getLine(i.row),k=j.substring(i.column-1,i.column);if(k=="\\")return null;var l=d.getTokens(g.start.row,g.start.row)[0].tokens,m=0,n,o=-1;for(var p=0;p<l.length;p++){n=l[p],n.type=="string"?o=-1:o<0&&(o=n.value.indexOf(f));if(n.value.length+m>g.start.column)break;m+=l[p].value.length}if(!n||o<0&&n.type!=="comment"&&(n.type!=="string"||g.start.column!==n.value.length+m-1&&n.value.lastIndexOf(f)===n.value.length-1))return{text:f+f,selection:[1,1]};if(n&&n.type==="string"){var q=j.substring(i.column,i.column+1);if(q==f)return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&(f=='"'||f=="'")){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}}).call(e.prototype)}),ace.define("ace/mode/java_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./doc_comment_highlight_rules").DocCommentHighlightRules,g=a("./text_highlight_rules").TextHighlightRules,h=function(){var a=e.arrayToMap("abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while".split("|")),b=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),c=e.arrayToMap("AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object".split("|")),d=e.arrayToMap("".split("|"));this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},f.getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:function(e){return e=="this"?"variable.language":a.hasOwnProperty(e)?"keyword":c.hasOwnProperty(e)?"support.function":d.hasOwnProperty(e)?"support.function":b.hasOwnProperty(e)?"constant.language":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}]},this.embedRules(f,"doc-",[f.getEndRule("start")])};d.inherits(h,g),b.JavaHighlightRules=h})
|
@@ -0,0 +1,1395 @@
|
|
1
|
+
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) {
|
2
|
+
"use strict";
|
3
|
+
|
4
|
+
var oop = require("../lib/oop");
|
5
|
+
var JavaScriptMode = require("./javascript").Mode;
|
6
|
+
var Tokenizer = require("../tokenizer").Tokenizer;
|
7
|
+
var JavaHighlightRules = require("./java_highlight_rules").JavaHighlightRules;
|
8
|
+
|
9
|
+
var Mode = function() {
|
10
|
+
JavaScriptMode.call(this);
|
11
|
+
|
12
|
+
this.$tokenizer = new Tokenizer(new JavaHighlightRules().getRules());
|
13
|
+
};
|
14
|
+
oop.inherits(Mode, JavaScriptMode);
|
15
|
+
|
16
|
+
(function() {
|
17
|
+
|
18
|
+
this.createWorker = function(session) {
|
19
|
+
return null;
|
20
|
+
};
|
21
|
+
|
22
|
+
}).call(Mode.prototype);
|
23
|
+
|
24
|
+
exports.Mode = Mode;
|
25
|
+
});
|
26
|
+
/* ***** BEGIN LICENSE BLOCK *****
|
27
|
+
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
28
|
+
*
|
29
|
+
* The contents of this file are subject to the Mozilla Public License Version
|
30
|
+
* 1.1 (the "License"); you may not use this file except in compliance with
|
31
|
+
* the License. You may obtain a copy of the License at
|
32
|
+
* http://www.mozilla.org/MPL/
|
33
|
+
*
|
34
|
+
* Software distributed under the License is distributed on an "AS IS" basis,
|
35
|
+
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
36
|
+
* for the specific language governing rights and limitations under the
|
37
|
+
* License.
|
38
|
+
*
|
39
|
+
* The Original Code is Ajax.org Code Editor (ACE).
|
40
|
+
*
|
41
|
+
* The Initial Developer of the Original Code is
|
42
|
+
* Ajax.org B.V.
|
43
|
+
* Portions created by the Initial Developer are Copyright (C) 2010
|
44
|
+
* the Initial Developer. All Rights Reserved.
|
45
|
+
*
|
46
|
+
* Contributor(s):
|
47
|
+
* Fabian Jakobs <fabian AT ajax DOT org>
|
48
|
+
*
|
49
|
+
* Alternatively, the contents of this file may be used under the terms of
|
50
|
+
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
51
|
+
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
52
|
+
* in which case the provisions of the GPL or the LGPL are applicable instead
|
53
|
+
* of those above. If you wish to allow use of your version of this file only
|
54
|
+
* under the terms of either the GPL or the LGPL, and not to allow others to
|
55
|
+
* use your version of this file under the terms of the MPL, indicate your
|
56
|
+
* decision by deleting the provisions above and replace them with the notice
|
57
|
+
* and other provisions required by the GPL or the LGPL. If you do not delete
|
58
|
+
* the provisions above, a recipient may use your version of this file under
|
59
|
+
* the terms of any one of the MPL, the GPL or the LGPL.
|
60
|
+
*
|
61
|
+
* ***** END LICENSE BLOCK ***** */
|
62
|
+
|
63
|
+
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) {
|
64
|
+
"use strict";
|
65
|
+
|
66
|
+
var oop = require("../lib/oop");
|
67
|
+
var TextMode = require("./text").Mode;
|
68
|
+
var Tokenizer = require("../tokenizer").Tokenizer;
|
69
|
+
var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
|
70
|
+
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
|
71
|
+
var Range = require("../range").Range;
|
72
|
+
var WorkerClient = require("../worker/worker_client").WorkerClient;
|
73
|
+
var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
|
74
|
+
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
|
75
|
+
|
76
|
+
var Mode = function() {
|
77
|
+
this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
|
78
|
+
this.$outdent = new MatchingBraceOutdent();
|
79
|
+
this.$behaviour = new CstyleBehaviour();
|
80
|
+
this.foldingRules = new CStyleFoldMode();
|
81
|
+
};
|
82
|
+
oop.inherits(Mode, TextMode);
|
83
|
+
|
84
|
+
(function() {
|
85
|
+
|
86
|
+
|
87
|
+
this.toggleCommentLines = function(state, doc, startRow, endRow) {
|
88
|
+
var outdent = true;
|
89
|
+
var re = /^(\s*)\/\//;
|
90
|
+
|
91
|
+
for (var i=startRow; i<= endRow; i++) {
|
92
|
+
if (!re.test(doc.getLine(i))) {
|
93
|
+
outdent = false;
|
94
|
+
break;
|
95
|
+
}
|
96
|
+
}
|
97
|
+
|
98
|
+
if (outdent) {
|
99
|
+
var deleteRange = new Range(0, 0, 0, 0);
|
100
|
+
for (var i=startRow; i<= endRow; i++)
|
101
|
+
{
|
102
|
+
var line = doc.getLine(i);
|
103
|
+
var m = line.match(re);
|
104
|
+
deleteRange.start.row = i;
|
105
|
+
deleteRange.end.row = i;
|
106
|
+
deleteRange.end.column = m[0].length;
|
107
|
+
doc.replace(deleteRange, m[1]);
|
108
|
+
}
|
109
|
+
}
|
110
|
+
else {
|
111
|
+
doc.indentRows(startRow, endRow, "//");
|
112
|
+
}
|
113
|
+
};
|
114
|
+
|
115
|
+
this.getNextLineIndent = function(state, line, tab) {
|
116
|
+
var indent = this.$getIndent(line);
|
117
|
+
|
118
|
+
var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
|
119
|
+
var tokens = tokenizedLine.tokens;
|
120
|
+
var endState = tokenizedLine.state;
|
121
|
+
|
122
|
+
if (tokens.length && tokens[tokens.length-1].type == "comment") {
|
123
|
+
return indent;
|
124
|
+
}
|
125
|
+
|
126
|
+
if (state == "start" || state == "regex_allowed") {
|
127
|
+
var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
|
128
|
+
if (match) {
|
129
|
+
indent += tab;
|
130
|
+
}
|
131
|
+
} else if (state == "doc-start") {
|
132
|
+
if (endState == "start" || state == "regex_allowed") {
|
133
|
+
return "";
|
134
|
+
}
|
135
|
+
var match = line.match(/^\s*(\/?)\*/);
|
136
|
+
if (match) {
|
137
|
+
if (match[1]) {
|
138
|
+
indent += " ";
|
139
|
+
}
|
140
|
+
indent += "* ";
|
141
|
+
}
|
142
|
+
}
|
143
|
+
|
144
|
+
return indent;
|
145
|
+
};
|
146
|
+
|
147
|
+
this.checkOutdent = function(state, line, input) {
|
148
|
+
return this.$outdent.checkOutdent(line, input);
|
149
|
+
};
|
150
|
+
|
151
|
+
this.autoOutdent = function(state, doc, row) {
|
152
|
+
this.$outdent.autoOutdent(doc, row);
|
153
|
+
};
|
154
|
+
|
155
|
+
this.createWorker = function(session) {
|
156
|
+
var worker = new WorkerClient(["ace"], "worker-javascript.js", "ace/mode/javascript_worker", "JavaScriptWorker");
|
157
|
+
worker.attachToDocument(session.getDocument());
|
158
|
+
|
159
|
+
worker.on("jslint", function(results) {
|
160
|
+
var errors = [];
|
161
|
+
for (var i=0; i<results.data.length; i++) {
|
162
|
+
var error = results.data[i];
|
163
|
+
if (error)
|
164
|
+
errors.push({
|
165
|
+
row: error.line-1,
|
166
|
+
column: error.character-1,
|
167
|
+
text: error.reason,
|
168
|
+
type: "warning",
|
169
|
+
lint: error
|
170
|
+
});
|
171
|
+
}
|
172
|
+
session.setAnnotations(errors);
|
173
|
+
});
|
174
|
+
|
175
|
+
worker.on("narcissus", function(e) {
|
176
|
+
session.setAnnotations([e.data]);
|
177
|
+
});
|
178
|
+
|
179
|
+
worker.on("terminate", function() {
|
180
|
+
session.clearAnnotations();
|
181
|
+
});
|
182
|
+
|
183
|
+
return worker;
|
184
|
+
};
|
185
|
+
|
186
|
+
}).call(Mode.prototype);
|
187
|
+
|
188
|
+
exports.Mode = Mode;
|
189
|
+
});
|
190
|
+
/* ***** BEGIN LICENSE BLOCK *****
|
191
|
+
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
192
|
+
*
|
193
|
+
* The contents of this file are subject to the Mozilla Public License Version
|
194
|
+
* 1.1 (the "License"); you may not use this file except in compliance with
|
195
|
+
* the License. You may obtain a copy of the License at
|
196
|
+
* http://www.mozilla.org/MPL/
|
197
|
+
*
|
198
|
+
* Software distributed under the License is distributed on an "AS IS" basis,
|
199
|
+
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
200
|
+
* for the specific language governing rights and limitations under the
|
201
|
+
* License.
|
202
|
+
*
|
203
|
+
* The Original Code is Ajax.org Code Editor (ACE).
|
204
|
+
*
|
205
|
+
* The Initial Developer of the Original Code is
|
206
|
+
* Ajax.org B.V.
|
207
|
+
* Portions created by the Initial Developer are Copyright (C) 2010
|
208
|
+
* the Initial Developer. All Rights Reserved.
|
209
|
+
*
|
210
|
+
* Contributor(s):
|
211
|
+
* Fabian Jakobs <fabian AT ajax DOT org>
|
212
|
+
* Mihai Sucan <mihai DOT sucan AT gmail DOT com>
|
213
|
+
*
|
214
|
+
* Alternatively, the contents of this file may be used under the terms of
|
215
|
+
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
216
|
+
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
217
|
+
* in which case the provisions of the GPL or the LGPL are applicable instead
|
218
|
+
* of those above. If you wish to allow use of your version of this file only
|
219
|
+
* under the terms of either the GPL or the LGPL, and not to allow others to
|
220
|
+
* use your version of this file under the terms of the MPL, indicate your
|
221
|
+
* decision by deleting the provisions above and replace them with the notice
|
222
|
+
* and other provisions required by the GPL or the LGPL. If you do not delete
|
223
|
+
* the provisions above, a recipient may use your version of this file under
|
224
|
+
* the terms of any one of the MPL, the GPL or the LGPL.
|
225
|
+
*
|
226
|
+
* ***** END LICENSE BLOCK ***** */
|
227
|
+
|
228
|
+
ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/unicode', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
|
229
|
+
"use strict";
|
230
|
+
|
231
|
+
var oop = require("../lib/oop");
|
232
|
+
var lang = require("../lib/lang");
|
233
|
+
var unicode = require("../unicode");
|
234
|
+
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
|
235
|
+
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
236
|
+
|
237
|
+
var JavaScriptHighlightRules = function() {
|
238
|
+
|
239
|
+
// see: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects
|
240
|
+
var globals = lang.arrayToMap(
|
241
|
+
// Constructors
|
242
|
+
("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" +
|
243
|
+
// E4X
|
244
|
+
"Namespace|QName|XML|XMLList|" +
|
245
|
+
"ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
|
246
|
+
"Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
|
247
|
+
// Errors
|
248
|
+
"Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" +
|
249
|
+
"SyntaxError|TypeError|URIError|" +
|
250
|
+
// Non-constructor functions
|
251
|
+
"decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" +
|
252
|
+
"isNaN|parseFloat|parseInt|" +
|
253
|
+
// Other
|
254
|
+
"JSON|Math|" +
|
255
|
+
// Pseudo
|
256
|
+
"this|arguments|prototype|window|document"
|
257
|
+
).split("|")
|
258
|
+
);
|
259
|
+
|
260
|
+
var keywords = lang.arrayToMap(
|
261
|
+
("break|case|catch|continue|default|delete|do|else|finally|for|function|" +
|
262
|
+
"if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|" +
|
263
|
+
"const|yield|import|get|set").split("|")
|
264
|
+
);
|
265
|
+
|
266
|
+
// keywords which can be followed by regular expressions
|
267
|
+
var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield";
|
268
|
+
|
269
|
+
var deprecated = lang.arrayToMap(
|
270
|
+
("__parent__|__count__|escape|unescape|with|__proto__").split("|")
|
271
|
+
);
|
272
|
+
|
273
|
+
var definitions = lang.arrayToMap(("const|let|var|function").split("|"));
|
274
|
+
|
275
|
+
var buildinConstants = lang.arrayToMap(
|
276
|
+
("null|Infinity|NaN|undefined").split("|")
|
277
|
+
);
|
278
|
+
|
279
|
+
var futureReserved = lang.arrayToMap(
|
280
|
+
("class|enum|extends|super|export|implements|private|" +
|
281
|
+
"public|interface|package|protected|static").split("|")
|
282
|
+
);
|
283
|
+
|
284
|
+
// TODO: Unicode escape sequences
|
285
|
+
var identifierRe = "[" + unicode.packages.L + "\\$_]["
|
286
|
+
+ unicode.packages.L
|
287
|
+
+ unicode.packages.Mn + unicode.packages.Mc
|
288
|
+
+ unicode.packages.Nd
|
289
|
+
+ unicode.packages.Pc + "\\$_]*\\b";
|
290
|
+
|
291
|
+
var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
|
292
|
+
"u[0-9a-fA-F]{4}|" + // unicode
|
293
|
+
"[0-2][0-7]{0,2}|" + // oct
|
294
|
+
"3[0-6][0-7]?|" + // oct
|
295
|
+
"37[0-7]?|" + // oct
|
296
|
+
"[4-7][0-7]?|" + //oct
|
297
|
+
".)";
|
298
|
+
|
299
|
+
// regexp must not have capturing parentheses. Use (?:) instead.
|
300
|
+
// regexps are ordered -> the first match is used
|
301
|
+
|
302
|
+
this.$rules = {
|
303
|
+
"start" : [
|
304
|
+
{
|
305
|
+
token : "comment",
|
306
|
+
regex : /\/\/.*$/
|
307
|
+
},
|
308
|
+
DocCommentHighlightRules.getStartRule("doc-start"),
|
309
|
+
{
|
310
|
+
token : "comment", // multi line comment
|
311
|
+
merge : true,
|
312
|
+
regex : /\/\*/,
|
313
|
+
next : "comment"
|
314
|
+
}, {
|
315
|
+
token : "string",
|
316
|
+
regex : "'(?=.)",
|
317
|
+
next : "qstring"
|
318
|
+
}, {
|
319
|
+
token : "string",
|
320
|
+
regex : '"(?=.)',
|
321
|
+
next : "qqstring"
|
322
|
+
}, {
|
323
|
+
token : "constant.numeric", // hex
|
324
|
+
regex : /0[xX][0-9a-fA-F]+\b/
|
325
|
+
}, {
|
326
|
+
token : "constant.numeric", // float
|
327
|
+
regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
|
328
|
+
}, { // match stuff like: Sound.prototype.play = function() { }
|
329
|
+
token : [
|
330
|
+
"storage.type",
|
331
|
+
"punctuation.operator",
|
332
|
+
"support.function",
|
333
|
+
"punctuation.operator",
|
334
|
+
"entity.name.function",
|
335
|
+
"text",
|
336
|
+
"keyword.operator",
|
337
|
+
"text",
|
338
|
+
"storage.type",
|
339
|
+
"text",
|
340
|
+
"paren.lparen"
|
341
|
+
],
|
342
|
+
regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
|
343
|
+
next: "function_arguments"
|
344
|
+
}, { // match stuff like: Sound.prototype.play = myfunc
|
345
|
+
token : [
|
346
|
+
"storage.type",
|
347
|
+
"punctuation.operator",
|
348
|
+
"support.function",
|
349
|
+
"punctuation.operator",
|
350
|
+
"entity.name.function",
|
351
|
+
"text",
|
352
|
+
"keyword.operator",
|
353
|
+
"text"
|
354
|
+
],
|
355
|
+
regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)",
|
356
|
+
next: "function_arguments"
|
357
|
+
}, { // match stuff like: Sound.play = function() { }
|
358
|
+
token : [
|
359
|
+
"storage.type",
|
360
|
+
"punctuation.operator",
|
361
|
+
"entity.name.function",
|
362
|
+
"text",
|
363
|
+
"keyword.operator",
|
364
|
+
"text",
|
365
|
+
"storage.type",
|
366
|
+
"text",
|
367
|
+
"paren.lparen"
|
368
|
+
],
|
369
|
+
regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
|
370
|
+
next: "function_arguments"
|
371
|
+
}, { // match stuff like: play = function() { }
|
372
|
+
token : [
|
373
|
+
"entity.name.function",
|
374
|
+
"text",
|
375
|
+
"keyword.operator",
|
376
|
+
"text",
|
377
|
+
"storage.type",
|
378
|
+
"text",
|
379
|
+
"paren.lparen"
|
380
|
+
],
|
381
|
+
regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
|
382
|
+
next: "function_arguments"
|
383
|
+
}, { // match regular function like: function myFunc(arg) { }
|
384
|
+
token : [
|
385
|
+
"storage.type",
|
386
|
+
"text",
|
387
|
+
"entity.name.function",
|
388
|
+
"text",
|
389
|
+
"paren.lparen"
|
390
|
+
],
|
391
|
+
regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
|
392
|
+
next: "function_arguments"
|
393
|
+
}, { // match stuff like: foobar: function() { }
|
394
|
+
token : [
|
395
|
+
"entity.name.function",
|
396
|
+
"text",
|
397
|
+
"punctuation.operator",
|
398
|
+
"text",
|
399
|
+
"storage.type",
|
400
|
+
"text",
|
401
|
+
"paren.lparen"
|
402
|
+
],
|
403
|
+
regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
|
404
|
+
next: "function_arguments"
|
405
|
+
}, { // Attempt to match : function() { } (this is for issues with 'foo': function() { })
|
406
|
+
token : [
|
407
|
+
"text",
|
408
|
+
"text",
|
409
|
+
"storage.type",
|
410
|
+
"text",
|
411
|
+
"paren.lparen"
|
412
|
+
],
|
413
|
+
regex : "(:)(\\s*)(function)(\\s*)(\\()",
|
414
|
+
next: "function_arguments"
|
415
|
+
}, {
|
416
|
+
token : "constant.language.boolean",
|
417
|
+
regex : /(?:true|false)\b/
|
418
|
+
}, {
|
419
|
+
token : "keyword",
|
420
|
+
regex : "(?:" + kwBeforeRe + ")\\b",
|
421
|
+
next : "regex_allowed"
|
422
|
+
}, {
|
423
|
+
token : ["punctuation.operator", "support.function"],
|
424
|
+
regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|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(?=\()/
|
425
|
+
}, {
|
426
|
+
token : ["punctuation.operator", "support.function.dom"],
|
427
|
+
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(?=\()/
|
428
|
+
}, {
|
429
|
+
token : ["punctuation.operator", "support.constant"],
|
430
|
+
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/
|
431
|
+
}, {
|
432
|
+
token : ["storage.type", "punctuation.operator", "support.function.firebug"],
|
433
|
+
regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
|
434
|
+
}, {
|
435
|
+
token : function(value) {
|
436
|
+
if (globals.hasOwnProperty(value))
|
437
|
+
return "variable.language";
|
438
|
+
else if (deprecated.hasOwnProperty(value))
|
439
|
+
return "invalid.deprecated";
|
440
|
+
else if (definitions.hasOwnProperty(value))
|
441
|
+
return "storage.type";
|
442
|
+
else if (keywords.hasOwnProperty(value))
|
443
|
+
return "keyword";
|
444
|
+
else if (buildinConstants.hasOwnProperty(value))
|
445
|
+
return "constant.language";
|
446
|
+
else if (futureReserved.hasOwnProperty(value))
|
447
|
+
return "invalid.illegal";
|
448
|
+
else if (value == "debugger")
|
449
|
+
return "invalid.deprecated";
|
450
|
+
else
|
451
|
+
return "identifier";
|
452
|
+
},
|
453
|
+
regex : identifierRe
|
454
|
+
}, {
|
455
|
+
token : "keyword.operator",
|
456
|
+
regex : /!|\$|%|&|\*|\-\-|\-|\+\+|\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=|\b(?:in|instanceof|new|delete|typeof|void)/,
|
457
|
+
next : "regex_allowed"
|
458
|
+
}, {
|
459
|
+
token : "punctuation.operator",
|
460
|
+
regex : /\?|\:|\,|\;|\./,
|
461
|
+
next : "regex_allowed"
|
462
|
+
}, {
|
463
|
+
token : "paren.lparen",
|
464
|
+
regex : /[\[({]/,
|
465
|
+
next : "regex_allowed"
|
466
|
+
}, {
|
467
|
+
token : "paren.rparen",
|
468
|
+
regex : /[\])}]/
|
469
|
+
}, {
|
470
|
+
token : "keyword.operator",
|
471
|
+
regex : /\/=?/,
|
472
|
+
next : "regex_allowed"
|
473
|
+
}, {
|
474
|
+
token: "comment",
|
475
|
+
regex: /^#!.*$/
|
476
|
+
}, {
|
477
|
+
token : "text",
|
478
|
+
regex : /\s+/
|
479
|
+
}
|
480
|
+
],
|
481
|
+
// regular expressions are only allowed after certain tokens. This
|
482
|
+
// makes sure we don't mix up regexps with the divison operator
|
483
|
+
"regex_allowed": [
|
484
|
+
DocCommentHighlightRules.getStartRule("doc-start"),
|
485
|
+
{
|
486
|
+
token : "comment", // multi line comment
|
487
|
+
merge : true,
|
488
|
+
regex : "\\/\\*",
|
489
|
+
next : "comment_regex_allowed"
|
490
|
+
}, {
|
491
|
+
token : "comment",
|
492
|
+
regex : "\\/\\/.*$"
|
493
|
+
}, {
|
494
|
+
token: "string.regexp",
|
495
|
+
regex: "\\/",
|
496
|
+
next: "regex",
|
497
|
+
merge: true
|
498
|
+
}, {
|
499
|
+
token : "text",
|
500
|
+
regex : "\\s+"
|
501
|
+
}, {
|
502
|
+
// immediately return to the start mode without matching
|
503
|
+
// anything
|
504
|
+
token: "empty",
|
505
|
+
regex: "",
|
506
|
+
next: "start"
|
507
|
+
}
|
508
|
+
],
|
509
|
+
"regex": [
|
510
|
+
{
|
511
|
+
token: "regexp.keyword.operator",
|
512
|
+
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
|
513
|
+
}, {
|
514
|
+
// flag
|
515
|
+
token: "string.regexp",
|
516
|
+
regex: "/\\w*",
|
517
|
+
next: "start",
|
518
|
+
merge: true
|
519
|
+
}, {
|
520
|
+
token: "string.regexp",
|
521
|
+
regex: "[^\\\\/\\[]+",
|
522
|
+
merge: true
|
523
|
+
}, {
|
524
|
+
token: "string.regexp.charachterclass",
|
525
|
+
regex: "\\[",
|
526
|
+
next: "regex_character_class",
|
527
|
+
merge: true
|
528
|
+
}, {
|
529
|
+
token: "empty",
|
530
|
+
regex: "",
|
531
|
+
next: "start"
|
532
|
+
}
|
533
|
+
],
|
534
|
+
"regex_character_class": [
|
535
|
+
{
|
536
|
+
token: "regexp.keyword.operator",
|
537
|
+
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
|
538
|
+
}, {
|
539
|
+
token: "string.regexp.charachterclass",
|
540
|
+
regex: "]",
|
541
|
+
next: "regex",
|
542
|
+
merge: true
|
543
|
+
}, {
|
544
|
+
token: "string.regexp.charachterclass",
|
545
|
+
regex: "[^\\\\\\]]+",
|
546
|
+
merge: true
|
547
|
+
}, {
|
548
|
+
token: "empty",
|
549
|
+
regex: "",
|
550
|
+
next: "start"
|
551
|
+
}
|
552
|
+
],
|
553
|
+
"function_arguments": [
|
554
|
+
{
|
555
|
+
token: "variable.parameter",
|
556
|
+
regex: identifierRe,
|
557
|
+
}, {
|
558
|
+
token: "punctuation.operator",
|
559
|
+
regex: "[, ]+",
|
560
|
+
merge: true
|
561
|
+
}, {
|
562
|
+
token: "punctuation.operator",
|
563
|
+
regex: "$",
|
564
|
+
merge: true
|
565
|
+
}, {
|
566
|
+
token: "empty",
|
567
|
+
regex: "",
|
568
|
+
next: "start"
|
569
|
+
}
|
570
|
+
],
|
571
|
+
"comment_regex_allowed" : [
|
572
|
+
{
|
573
|
+
token : "comment", // closing comment
|
574
|
+
regex : ".*?\\*\\/",
|
575
|
+
merge : true,
|
576
|
+
next : "regex_allowed"
|
577
|
+
}, {
|
578
|
+
token : "comment", // comment spanning whole line
|
579
|
+
merge : true,
|
580
|
+
regex : ".+"
|
581
|
+
}
|
582
|
+
],
|
583
|
+
"comment" : [
|
584
|
+
{
|
585
|
+
token : "comment", // closing comment
|
586
|
+
regex : ".*?\\*\\/",
|
587
|
+
merge : true,
|
588
|
+
next : "start"
|
589
|
+
}, {
|
590
|
+
token : "comment", // comment spanning whole line
|
591
|
+
merge : true,
|
592
|
+
regex : ".+"
|
593
|
+
}
|
594
|
+
],
|
595
|
+
"qqstring" : [
|
596
|
+
{
|
597
|
+
token : "constant.language.escape",
|
598
|
+
regex : escapedRe
|
599
|
+
}, {
|
600
|
+
token : "string",
|
601
|
+
regex : '[^"\\\\]+',
|
602
|
+
merge : true
|
603
|
+
}, {
|
604
|
+
token : "string",
|
605
|
+
regex : "\\\\$",
|
606
|
+
next : "qqstring",
|
607
|
+
merge : true
|
608
|
+
}, {
|
609
|
+
token : "string",
|
610
|
+
regex : '"|$',
|
611
|
+
next : "start",
|
612
|
+
merge : true
|
613
|
+
}
|
614
|
+
],
|
615
|
+
"qstring" : [
|
616
|
+
{
|
617
|
+
token : "constant.language.escape",
|
618
|
+
regex : escapedRe
|
619
|
+
}, {
|
620
|
+
token : "string",
|
621
|
+
regex : "[^'\\\\]+",
|
622
|
+
merge : true
|
623
|
+
}, {
|
624
|
+
token : "string",
|
625
|
+
regex : "\\\\$",
|
626
|
+
next : "qstring",
|
627
|
+
merge : true
|
628
|
+
}, {
|
629
|
+
token : "string",
|
630
|
+
regex : "'|$",
|
631
|
+
next : "start",
|
632
|
+
merge : true
|
633
|
+
}
|
634
|
+
]
|
635
|
+
};
|
636
|
+
|
637
|
+
this.embedRules(DocCommentHighlightRules, "doc-",
|
638
|
+
[ DocCommentHighlightRules.getEndRule("start") ]);
|
639
|
+
};
|
640
|
+
|
641
|
+
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
|
642
|
+
|
643
|
+
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
|
644
|
+
});
|
645
|
+
/* ***** BEGIN LICENSE BLOCK *****
|
646
|
+
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
647
|
+
*
|
648
|
+
* The contents of this file are subject to the Mozilla Public License Version
|
649
|
+
* 1.1 (the "License"); you may not use this file except in compliance with
|
650
|
+
* the License. You may obtain a copy of the License at
|
651
|
+
* http://www.mozilla.org/MPL/
|
652
|
+
*
|
653
|
+
* Software distributed under the License is distributed on an "AS IS" basis,
|
654
|
+
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
655
|
+
* for the specific language governing rights and limitations under the
|
656
|
+
* License.
|
657
|
+
*
|
658
|
+
* The Original Code is Ajax.org Code Editor (ACE).
|
659
|
+
*
|
660
|
+
* The Initial Developer of the Original Code is
|
661
|
+
* Ajax.org B.V.
|
662
|
+
* Portions created by the Initial Developer are Copyright (C) 2010
|
663
|
+
* the Initial Developer. All Rights Reserved.
|
664
|
+
*
|
665
|
+
* Contributor(s):
|
666
|
+
* Fabian Jakobs <fabian AT ajax DOT org>
|
667
|
+
*
|
668
|
+
* Alternatively, the contents of this file may be used under the terms of
|
669
|
+
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
670
|
+
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
671
|
+
* in which case the provisions of the GPL or the LGPL are applicable instead
|
672
|
+
* of those above. If you wish to allow use of your version of this file only
|
673
|
+
* under the terms of either the GPL or the LGPL, and not to allow others to
|
674
|
+
* use your version of this file under the terms of the MPL, indicate your
|
675
|
+
* decision by deleting the provisions above and replace them with the notice
|
676
|
+
* and other provisions required by the GPL or the LGPL. If you do not delete
|
677
|
+
* the provisions above, a recipient may use your version of this file under
|
678
|
+
* the terms of any one of the MPL, the GPL or the LGPL.
|
679
|
+
*
|
680
|
+
* ***** END LICENSE BLOCK ***** */
|
681
|
+
|
682
|
+
ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
|
683
|
+
"use strict";
|
684
|
+
|
685
|
+
var oop = require("../lib/oop");
|
686
|
+
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
687
|
+
|
688
|
+
var DocCommentHighlightRules = function() {
|
689
|
+
|
690
|
+
this.$rules = {
|
691
|
+
"start" : [ {
|
692
|
+
token : "comment.doc.tag",
|
693
|
+
regex : "@[\\w\\d_]+" // TODO: fix email addresses
|
694
|
+
}, {
|
695
|
+
token : "comment.doc",
|
696
|
+
merge : true,
|
697
|
+
regex : "\\s+"
|
698
|
+
}, {
|
699
|
+
token : "comment.doc",
|
700
|
+
merge : true,
|
701
|
+
regex : "TODO"
|
702
|
+
}, {
|
703
|
+
token : "comment.doc",
|
704
|
+
merge : true,
|
705
|
+
regex : "[^@\\*]+"
|
706
|
+
}, {
|
707
|
+
token : "comment.doc",
|
708
|
+
merge : true,
|
709
|
+
regex : "."
|
710
|
+
}]
|
711
|
+
};
|
712
|
+
};
|
713
|
+
|
714
|
+
oop.inherits(DocCommentHighlightRules, TextHighlightRules);
|
715
|
+
|
716
|
+
DocCommentHighlightRules.getStartRule = function(start) {
|
717
|
+
return {
|
718
|
+
token : "comment.doc", // doc comment
|
719
|
+
merge : true,
|
720
|
+
regex : "\\/\\*(?=\\*)",
|
721
|
+
next : start
|
722
|
+
};
|
723
|
+
};
|
724
|
+
|
725
|
+
DocCommentHighlightRules.getEndRule = function (start) {
|
726
|
+
return {
|
727
|
+
token : "comment.doc", // closing comment
|
728
|
+
merge : true,
|
729
|
+
regex : "\\*\\/",
|
730
|
+
next : start
|
731
|
+
};
|
732
|
+
};
|
733
|
+
|
734
|
+
|
735
|
+
exports.DocCommentHighlightRules = DocCommentHighlightRules;
|
736
|
+
|
737
|
+
});
|
738
|
+
/* ***** BEGIN LICENSE BLOCK *****
|
739
|
+
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
740
|
+
*
|
741
|
+
* The contents of this file are subject to the Mozilla Public License Version
|
742
|
+
* 1.1 (the "License"); you may not use this file except in compliance with
|
743
|
+
* the License. You may obtain a copy of the License at
|
744
|
+
* http://www.mozilla.org/MPL/
|
745
|
+
*
|
746
|
+
* Software distributed under the License is distributed on an "AS IS" basis,
|
747
|
+
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
748
|
+
* for the specific language governing rights and limitations under the
|
749
|
+
* License.
|
750
|
+
*
|
751
|
+
* The Original Code is Ajax.org Code Editor (ACE).
|
752
|
+
*
|
753
|
+
* The Initial Developer of the Original Code is
|
754
|
+
* Ajax.org B.V.
|
755
|
+
* Portions created by the Initial Developer are Copyright (C) 2010
|
756
|
+
* the Initial Developer. All Rights Reserved.
|
757
|
+
*
|
758
|
+
* Contributor(s):
|
759
|
+
* Fabian Jakobs <fabian AT ajax DOT org>
|
760
|
+
*
|
761
|
+
* Alternatively, the contents of this file may be used under the terms of
|
762
|
+
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
763
|
+
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
764
|
+
* in which case the provisions of the GPL or the LGPL are applicable instead
|
765
|
+
* of those above. If you wish to allow use of your version of this file only
|
766
|
+
* under the terms of either the GPL or the LGPL, and not to allow others to
|
767
|
+
* use your version of this file under the terms of the MPL, indicate your
|
768
|
+
* decision by deleting the provisions above and replace them with the notice
|
769
|
+
* and other provisions required by the GPL or the LGPL. If you do not delete
|
770
|
+
* the provisions above, a recipient may use your version of this file under
|
771
|
+
* the terms of any one of the MPL, the GPL or the LGPL.
|
772
|
+
*
|
773
|
+
* ***** END LICENSE BLOCK ***** */
|
774
|
+
|
775
|
+
ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
|
776
|
+
"use strict";
|
777
|
+
|
778
|
+
var Range = require("../range").Range;
|
779
|
+
|
780
|
+
var MatchingBraceOutdent = function() {};
|
781
|
+
|
782
|
+
(function() {
|
783
|
+
|
784
|
+
this.checkOutdent = function(line, input) {
|
785
|
+
if (! /^\s+$/.test(line))
|
786
|
+
return false;
|
787
|
+
|
788
|
+
return /^\s*\}/.test(input);
|
789
|
+
};
|
790
|
+
|
791
|
+
this.autoOutdent = function(doc, row) {
|
792
|
+
var line = doc.getLine(row);
|
793
|
+
var match = line.match(/^(\s*\})/);
|
794
|
+
|
795
|
+
if (!match) return 0;
|
796
|
+
|
797
|
+
var column = match[1].length;
|
798
|
+
var openBracePos = doc.findMatchingBracket({row: row, column: column});
|
799
|
+
|
800
|
+
if (!openBracePos || openBracePos.row == row) return 0;
|
801
|
+
|
802
|
+
var indent = this.$getIndent(doc.getLine(openBracePos.row));
|
803
|
+
doc.replace(new Range(row, 0, row, column-1), indent);
|
804
|
+
};
|
805
|
+
|
806
|
+
this.$getIndent = function(line) {
|
807
|
+
var match = line.match(/^(\s+)/);
|
808
|
+
if (match) {
|
809
|
+
return match[1];
|
810
|
+
}
|
811
|
+
|
812
|
+
return "";
|
813
|
+
};
|
814
|
+
|
815
|
+
}).call(MatchingBraceOutdent.prototype);
|
816
|
+
|
817
|
+
exports.MatchingBraceOutdent = MatchingBraceOutdent;
|
818
|
+
});
|
819
|
+
/* vim:ts=4:sts=4:sw=4:
|
820
|
+
* ***** BEGIN LICENSE BLOCK *****
|
821
|
+
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
822
|
+
*
|
823
|
+
* The contents of this file are subject to the Mozilla Public License Version
|
824
|
+
* 1.1 (the "License"); you may not use this file except in compliance with
|
825
|
+
* the License. You may obtain a copy of the License at
|
826
|
+
* http://www.mozilla.org/MPL/
|
827
|
+
*
|
828
|
+
* Software distributed under the License is distributed on an "AS IS" basis,
|
829
|
+
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
830
|
+
* for the specific language governing rights and limitations under the
|
831
|
+
* License.
|
832
|
+
*
|
833
|
+
* The Original Code is Ajax.org Code Editor (ACE).
|
834
|
+
*
|
835
|
+
* The Initial Developer of the Original Code is
|
836
|
+
* Ajax.org B.V.
|
837
|
+
* Portions created by the Initial Developer are Copyright (C) 2010
|
838
|
+
* the Initial Developer. All Rights Reserved.
|
839
|
+
*
|
840
|
+
* Contributor(s):
|
841
|
+
* Chris Spencer <chris.ag.spencer AT googlemail DOT com>
|
842
|
+
*
|
843
|
+
* Alternatively, the contents of this file may be used under the terms of
|
844
|
+
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
845
|
+
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
846
|
+
* in which case the provisions of the GPL or the LGPL are applicable instead
|
847
|
+
* of those above. If you wish to allow use of your version of this file only
|
848
|
+
* under the terms of either the GPL or the LGPL, and not to allow others to
|
849
|
+
* use your version of this file under the terms of the MPL, indicate your
|
850
|
+
* decision by deleting the provisions above and replace them with the notice
|
851
|
+
* and other provisions required by the GPL or the LGPL. If you do not delete
|
852
|
+
* the provisions above, a recipient may use your version of this file under
|
853
|
+
* the terms of any one of the MPL, the GPL or the LGPL.
|
854
|
+
*
|
855
|
+
* ***** END LICENSE BLOCK ***** */
|
856
|
+
|
857
|
+
ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
|
858
|
+
"use strict";
|
859
|
+
|
860
|
+
var oop = require("../../lib/oop");
|
861
|
+
var Behaviour = require('../behaviour').Behaviour;
|
862
|
+
|
863
|
+
var CstyleBehaviour = function () {
|
864
|
+
|
865
|
+
this.add("braces", "insertion", function (state, action, editor, session, text) {
|
866
|
+
if (text == '{') {
|
867
|
+
var selection = editor.getSelectionRange();
|
868
|
+
var selected = session.doc.getTextRange(selection);
|
869
|
+
if (selected !== "") {
|
870
|
+
return {
|
871
|
+
text: '{' + selected + '}',
|
872
|
+
selection: false
|
873
|
+
};
|
874
|
+
} else {
|
875
|
+
return {
|
876
|
+
text: '{}',
|
877
|
+
selection: [1, 1]
|
878
|
+
};
|
879
|
+
}
|
880
|
+
} else if (text == '}') {
|
881
|
+
var cursor = editor.getCursorPosition();
|
882
|
+
var line = session.doc.getLine(cursor.row);
|
883
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
884
|
+
if (rightChar == '}') {
|
885
|
+
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
|
886
|
+
if (matching !== null) {
|
887
|
+
return {
|
888
|
+
text: '',
|
889
|
+
selection: [1, 1]
|
890
|
+
};
|
891
|
+
}
|
892
|
+
}
|
893
|
+
} else if (text == "\n") {
|
894
|
+
var cursor = editor.getCursorPosition();
|
895
|
+
var line = session.doc.getLine(cursor.row);
|
896
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
897
|
+
if (rightChar == '}') {
|
898
|
+
var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
|
899
|
+
if (!openBracePos)
|
900
|
+
return null;
|
901
|
+
|
902
|
+
var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
|
903
|
+
var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
|
904
|
+
|
905
|
+
return {
|
906
|
+
text: '\n' + indent + '\n' + next_indent,
|
907
|
+
selection: [1, indent.length, 1, indent.length]
|
908
|
+
};
|
909
|
+
}
|
910
|
+
}
|
911
|
+
});
|
912
|
+
|
913
|
+
this.add("braces", "deletion", function (state, action, editor, session, range) {
|
914
|
+
var selected = session.doc.getTextRange(range);
|
915
|
+
if (!range.isMultiLine() && selected == '{') {
|
916
|
+
var line = session.doc.getLine(range.start.row);
|
917
|
+
var rightChar = line.substring(range.end.column, range.end.column + 1);
|
918
|
+
if (rightChar == '}') {
|
919
|
+
range.end.column++;
|
920
|
+
return range;
|
921
|
+
}
|
922
|
+
}
|
923
|
+
});
|
924
|
+
|
925
|
+
this.add("parens", "insertion", function (state, action, editor, session, text) {
|
926
|
+
if (text == '(') {
|
927
|
+
var selection = editor.getSelectionRange();
|
928
|
+
var selected = session.doc.getTextRange(selection);
|
929
|
+
if (selected !== "") {
|
930
|
+
return {
|
931
|
+
text: '(' + selected + ')',
|
932
|
+
selection: false
|
933
|
+
};
|
934
|
+
} else {
|
935
|
+
return {
|
936
|
+
text: '()',
|
937
|
+
selection: [1, 1]
|
938
|
+
};
|
939
|
+
}
|
940
|
+
} else if (text == ')') {
|
941
|
+
var cursor = editor.getCursorPosition();
|
942
|
+
var line = session.doc.getLine(cursor.row);
|
943
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
944
|
+
if (rightChar == ')') {
|
945
|
+
var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
|
946
|
+
if (matching !== null) {
|
947
|
+
return {
|
948
|
+
text: '',
|
949
|
+
selection: [1, 1]
|
950
|
+
};
|
951
|
+
}
|
952
|
+
}
|
953
|
+
}
|
954
|
+
});
|
955
|
+
|
956
|
+
this.add("parens", "deletion", function (state, action, editor, session, range) {
|
957
|
+
var selected = session.doc.getTextRange(range);
|
958
|
+
if (!range.isMultiLine() && selected == '(') {
|
959
|
+
var line = session.doc.getLine(range.start.row);
|
960
|
+
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
961
|
+
if (rightChar == ')') {
|
962
|
+
range.end.column++;
|
963
|
+
return range;
|
964
|
+
}
|
965
|
+
}
|
966
|
+
});
|
967
|
+
|
968
|
+
this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
|
969
|
+
if (text == '"' || text == "'") {
|
970
|
+
var quote = text;
|
971
|
+
var selection = editor.getSelectionRange();
|
972
|
+
var selected = session.doc.getTextRange(selection);
|
973
|
+
if (selected !== "") {
|
974
|
+
return {
|
975
|
+
text: quote + selected + quote,
|
976
|
+
selection: false
|
977
|
+
};
|
978
|
+
} else {
|
979
|
+
var cursor = editor.getCursorPosition();
|
980
|
+
var line = session.doc.getLine(cursor.row);
|
981
|
+
var leftChar = line.substring(cursor.column-1, cursor.column);
|
982
|
+
|
983
|
+
// We're escaped.
|
984
|
+
if (leftChar == '\\') {
|
985
|
+
return null;
|
986
|
+
}
|
987
|
+
|
988
|
+
// Find what token we're inside.
|
989
|
+
var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
|
990
|
+
var col = 0, token;
|
991
|
+
var quotepos = -1; // Track whether we're inside an open quote.
|
992
|
+
|
993
|
+
for (var x = 0; x < tokens.length; x++) {
|
994
|
+
token = tokens[x];
|
995
|
+
if (token.type == "string") {
|
996
|
+
quotepos = -1;
|
997
|
+
} else if (quotepos < 0) {
|
998
|
+
quotepos = token.value.indexOf(quote);
|
999
|
+
}
|
1000
|
+
if ((token.value.length + col) > selection.start.column) {
|
1001
|
+
break;
|
1002
|
+
}
|
1003
|
+
col += tokens[x].value.length;
|
1004
|
+
}
|
1005
|
+
|
1006
|
+
// Try and be smart about when we auto insert.
|
1007
|
+
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)))) {
|
1008
|
+
return {
|
1009
|
+
text: quote + quote,
|
1010
|
+
selection: [1,1]
|
1011
|
+
};
|
1012
|
+
} else if (token && token.type === "string") {
|
1013
|
+
// Ignore input and move right one if we're typing over the closing quote.
|
1014
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
1015
|
+
if (rightChar == quote) {
|
1016
|
+
return {
|
1017
|
+
text: '',
|
1018
|
+
selection: [1, 1]
|
1019
|
+
};
|
1020
|
+
}
|
1021
|
+
}
|
1022
|
+
}
|
1023
|
+
}
|
1024
|
+
});
|
1025
|
+
|
1026
|
+
this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
|
1027
|
+
var selected = session.doc.getTextRange(range);
|
1028
|
+
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
|
1029
|
+
var line = session.doc.getLine(range.start.row);
|
1030
|
+
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
1031
|
+
if (rightChar == '"') {
|
1032
|
+
range.end.column++;
|
1033
|
+
return range;
|
1034
|
+
}
|
1035
|
+
}
|
1036
|
+
});
|
1037
|
+
|
1038
|
+
};
|
1039
|
+
|
1040
|
+
oop.inherits(CstyleBehaviour, Behaviour);
|
1041
|
+
|
1042
|
+
exports.CstyleBehaviour = CstyleBehaviour;
|
1043
|
+
});
|
1044
|
+
/* ***** BEGIN LICENSE BLOCK *****
|
1045
|
+
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
1046
|
+
*
|
1047
|
+
* The contents of this file are subject to the Mozilla Public License Version
|
1048
|
+
* 1.1 (the "License"); you may not use this file except in compliance with
|
1049
|
+
* the License. You may obtain a copy of the License at
|
1050
|
+
* http://www.mozilla.org/MPL/
|
1051
|
+
*
|
1052
|
+
* Software distributed under the License is distributed on an "AS IS" basis,
|
1053
|
+
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
1054
|
+
* for the specific language governing rights and limitations under the
|
1055
|
+
* License.
|
1056
|
+
*
|
1057
|
+
* The Original Code is Ajax.org Code Editor (ACE).
|
1058
|
+
*
|
1059
|
+
* The Initial Developer of the Original Code is
|
1060
|
+
* Ajax.org B.V.
|
1061
|
+
* Portions created by the Initial Developer are Copyright (C) 2010
|
1062
|
+
* the Initial Developer. All Rights Reserved.
|
1063
|
+
*
|
1064
|
+
* Contributor(s):
|
1065
|
+
* Fabian Jakobs <fabian AT ajax DOT org>
|
1066
|
+
*
|
1067
|
+
* Alternatively, the contents of this file may be used under the terms of
|
1068
|
+
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
1069
|
+
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
1070
|
+
* in which case the provisions of the GPL or the LGPL are applicable instead
|
1071
|
+
* of those above. If you wish to allow use of your version of this file only
|
1072
|
+
* under the terms of either the GPL or the LGPL, and not to allow others to
|
1073
|
+
* use your version of this file under the terms of the MPL, indicate your
|
1074
|
+
* decision by deleting the provisions above and replace them with the notice
|
1075
|
+
* and other provisions required by the GPL or the LGPL. If you do not delete
|
1076
|
+
* the provisions above, a recipient may use your version of this file under
|
1077
|
+
* the terms of any one of the MPL, the GPL or the LGPL.
|
1078
|
+
*
|
1079
|
+
* ***** END LICENSE BLOCK ***** */
|
1080
|
+
|
1081
|
+
ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
|
1082
|
+
"use strict";
|
1083
|
+
|
1084
|
+
var oop = require("../../lib/oop");
|
1085
|
+
var Range = require("../../range").Range;
|
1086
|
+
var BaseFoldMode = require("./fold_mode").FoldMode;
|
1087
|
+
|
1088
|
+
var FoldMode = exports.FoldMode = function() {};
|
1089
|
+
oop.inherits(FoldMode, BaseFoldMode);
|
1090
|
+
|
1091
|
+
(function() {
|
1092
|
+
|
1093
|
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
|
1094
|
+
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
|
1095
|
+
|
1096
|
+
this.getFoldWidgetRange = function(session, foldStyle, row) {
|
1097
|
+
var line = session.getLine(row);
|
1098
|
+
var match = line.match(this.foldingStartMarker);
|
1099
|
+
if (match) {
|
1100
|
+
var i = match.index;
|
1101
|
+
|
1102
|
+
if (match[1])
|
1103
|
+
return this.openingBracketBlock(session, match[1], row, i);
|
1104
|
+
|
1105
|
+
var range = session.getCommentFoldRange(row, i + match[0].length);
|
1106
|
+
range.end.column -= 2;
|
1107
|
+
return range;
|
1108
|
+
}
|
1109
|
+
|
1110
|
+
if (foldStyle !== "markbeginend")
|
1111
|
+
return;
|
1112
|
+
|
1113
|
+
var match = line.match(this.foldingStopMarker);
|
1114
|
+
if (match) {
|
1115
|
+
var i = match.index + match[0].length;
|
1116
|
+
|
1117
|
+
if (match[2]) {
|
1118
|
+
var range = session.getCommentFoldRange(row, i);
|
1119
|
+
range.end.column -= 2;
|
1120
|
+
return range;
|
1121
|
+
}
|
1122
|
+
|
1123
|
+
var end = {row: row, column: i};
|
1124
|
+
var start = session.$findOpeningBracket(match[1], end);
|
1125
|
+
|
1126
|
+
if (!start)
|
1127
|
+
return;
|
1128
|
+
|
1129
|
+
start.column++;
|
1130
|
+
end.column--;
|
1131
|
+
|
1132
|
+
return Range.fromPoints(start, end);
|
1133
|
+
}
|
1134
|
+
};
|
1135
|
+
|
1136
|
+
}).call(FoldMode.prototype);
|
1137
|
+
|
1138
|
+
});
|
1139
|
+
/* ***** BEGIN LICENSE BLOCK *****
|
1140
|
+
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
1141
|
+
*
|
1142
|
+
* The contents of this file are subject to the Mozilla Public License Version
|
1143
|
+
* 1.1 (the "License"); you may not use this file except in compliance with
|
1144
|
+
* the License. You may obtain a copy of the License at
|
1145
|
+
* http://www.mozilla.org/MPL/
|
1146
|
+
*
|
1147
|
+
* Software distributed under the License is distributed on an "AS IS" basis,
|
1148
|
+
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
1149
|
+
* for the specific language governing rights and limitations under the
|
1150
|
+
* License.
|
1151
|
+
*
|
1152
|
+
* The Original Code is Ajax.org Code Editor (ACE).
|
1153
|
+
*
|
1154
|
+
* The Initial Developer of the Original Code is
|
1155
|
+
* Ajax.org B.V.
|
1156
|
+
* Portions created by the Initial Developer are Copyright (C) 2010
|
1157
|
+
* the Initial Developer. All Rights Reserved.
|
1158
|
+
*
|
1159
|
+
* Contributor(s):
|
1160
|
+
* Fabian Jakobs <fabian AT ajax DOT org>
|
1161
|
+
*
|
1162
|
+
* Alternatively, the contents of this file may be used under the terms of
|
1163
|
+
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
1164
|
+
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
1165
|
+
* in which case the provisions of the GPL or the LGPL are applicable instead
|
1166
|
+
* of those above. If you wish to allow use of your version of this file only
|
1167
|
+
* under the terms of either the GPL or the LGPL, and not to allow others to
|
1168
|
+
* use your version of this file under the terms of the MPL, indicate your
|
1169
|
+
* decision by deleting the provisions above and replace them with the notice
|
1170
|
+
* and other provisions required by the GPL or the LGPL. If you do not delete
|
1171
|
+
* the provisions above, a recipient may use your version of this file under
|
1172
|
+
* the terms of any one of the MPL, the GPL or the LGPL.
|
1173
|
+
*
|
1174
|
+
* ***** END LICENSE BLOCK ***** */
|
1175
|
+
|
1176
|
+
ace.define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
|
1177
|
+
"use strict";
|
1178
|
+
|
1179
|
+
var Range = require("../../range").Range;
|
1180
|
+
|
1181
|
+
var FoldMode = exports.FoldMode = function() {};
|
1182
|
+
|
1183
|
+
(function() {
|
1184
|
+
|
1185
|
+
this.foldingStartMarker = null;
|
1186
|
+
this.foldingStopMarker = null;
|
1187
|
+
|
1188
|
+
// must return "" if there's no fold, to enable caching
|
1189
|
+
this.getFoldWidget = function(session, foldStyle, row) {
|
1190
|
+
var line = session.getLine(row);
|
1191
|
+
if (this.foldingStartMarker.test(line))
|
1192
|
+
return "start";
|
1193
|
+
if (foldStyle == "markbeginend"
|
1194
|
+
&& this.foldingStopMarker
|
1195
|
+
&& this.foldingStopMarker.test(line))
|
1196
|
+
return "end";
|
1197
|
+
return "";
|
1198
|
+
};
|
1199
|
+
|
1200
|
+
this.getFoldWidgetRange = function(session, foldStyle, row) {
|
1201
|
+
return null;
|
1202
|
+
};
|
1203
|
+
|
1204
|
+
this.indentationBlock = function(session, row, column) {
|
1205
|
+
var re = /^\s*/;
|
1206
|
+
var startRow = row;
|
1207
|
+
var endRow = row;
|
1208
|
+
var line = session.getLine(row);
|
1209
|
+
var startColumn = column || line.length;
|
1210
|
+
var startLevel = line.match(re)[0].length;
|
1211
|
+
var maxRow = session.getLength()
|
1212
|
+
|
1213
|
+
while (++row < maxRow) {
|
1214
|
+
line = session.getLine(row);
|
1215
|
+
var level = line.match(re)[0].length;
|
1216
|
+
|
1217
|
+
if (level == line.length)
|
1218
|
+
continue;
|
1219
|
+
|
1220
|
+
if (level <= startLevel)
|
1221
|
+
break;
|
1222
|
+
|
1223
|
+
endRow = row;
|
1224
|
+
}
|
1225
|
+
|
1226
|
+
if (endRow > startRow) {
|
1227
|
+
var endColumn = session.getLine(endRow).length;
|
1228
|
+
return new Range(startRow, startColumn, endRow, endColumn);
|
1229
|
+
}
|
1230
|
+
};
|
1231
|
+
|
1232
|
+
this.openingBracketBlock = function(session, bracket, row, column) {
|
1233
|
+
var start = {row: row, column: column + 1};
|
1234
|
+
var end = session.$findClosingBracket(bracket, start);
|
1235
|
+
if (!end)
|
1236
|
+
return;
|
1237
|
+
|
1238
|
+
var fw = session.foldWidgets[end.row];
|
1239
|
+
if (fw == null)
|
1240
|
+
fw = this.getFoldWidget(session, end.row);
|
1241
|
+
|
1242
|
+
if (fw == "start") {
|
1243
|
+
end.row --;
|
1244
|
+
end.column = session.getLine(end.row).length;
|
1245
|
+
}
|
1246
|
+
return Range.fromPoints(start, end);
|
1247
|
+
};
|
1248
|
+
|
1249
|
+
}).call(FoldMode.prototype);
|
1250
|
+
|
1251
|
+
});
|
1252
|
+
ace.define('ace/mode/java_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) {
|
1253
|
+
"use strict";
|
1254
|
+
|
1255
|
+
var oop = require("../lib/oop");
|
1256
|
+
var lang = require("../lib/lang");
|
1257
|
+
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
|
1258
|
+
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
1259
|
+
|
1260
|
+
var JavaHighlightRules = function() {
|
1261
|
+
|
1262
|
+
// taken from http://download.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html
|
1263
|
+
var keywords = lang.arrayToMap(
|
1264
|
+
("abstract|continue|for|new|switch|" +
|
1265
|
+
"assert|default|goto|package|synchronized|" +
|
1266
|
+
"boolean|do|if|private|this|" +
|
1267
|
+
"break|double|implements|protected|throw|" +
|
1268
|
+
"byte|else|import|public|throws|" +
|
1269
|
+
"case|enum|instanceof|return|transient|" +
|
1270
|
+
"catch|extends|int|short|try|" +
|
1271
|
+
"char|final|interface|static|void|" +
|
1272
|
+
"class|finally|long|strictfp|volatile|" +
|
1273
|
+
"const|float|native|super|while").split("|")
|
1274
|
+
);
|
1275
|
+
|
1276
|
+
var buildinConstants = lang.arrayToMap(
|
1277
|
+
("null|Infinity|NaN|undefined").split("|")
|
1278
|
+
);
|
1279
|
+
|
1280
|
+
var langClasses = lang.arrayToMap(
|
1281
|
+
("AbstractMethodError|AssertionError|ClassCircularityError|"+
|
1282
|
+
"ClassFormatError|Deprecated|EnumConstantNotPresentException|"+
|
1283
|
+
"ExceptionInInitializerError|IllegalAccessError|"+
|
1284
|
+
"IllegalThreadStateException|InstantiationError|InternalError|"+
|
1285
|
+
"NegativeArraySizeException|NoSuchFieldError|Override|Process|"+
|
1286
|
+
"ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|"+
|
1287
|
+
"SuppressWarnings|TypeNotPresentException|UnknownError|"+
|
1288
|
+
"UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|"+
|
1289
|
+
"InstantiationException|IndexOutOfBoundsException|"+
|
1290
|
+
"ArrayIndexOutOfBoundsException|CloneNotSupportedException|"+
|
1291
|
+
"NoSuchFieldException|IllegalArgumentException|NumberFormatException|"+
|
1292
|
+
"SecurityException|Void|InheritableThreadLocal|IllegalStateException|"+
|
1293
|
+
"InterruptedException|NoSuchMethodException|IllegalAccessException|"+
|
1294
|
+
"UnsupportedOperationException|Enum|StrictMath|Package|Compiler|"+
|
1295
|
+
"Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|"+
|
1296
|
+
"NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|"+
|
1297
|
+
"NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|"+
|
1298
|
+
"Character|Boolean|StackTraceElement|Appendable|StringBuffer|"+
|
1299
|
+
"Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|"+
|
1300
|
+
"StackOverflowError|OutOfMemoryError|VirtualMachineError|"+
|
1301
|
+
"ArrayStoreException|ClassCastException|LinkageError|"+
|
1302
|
+
"NoClassDefFoundError|ClassNotFoundException|RuntimeException|"+
|
1303
|
+
"Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+
|
1304
|
+
"Cloneable|Class|CharSequence|Comparable|String|Object").split("|")
|
1305
|
+
);
|
1306
|
+
|
1307
|
+
var importClasses = lang.arrayToMap(
|
1308
|
+
("").split("|")
|
1309
|
+
);
|
1310
|
+
// regexp must not have capturing parentheses. Use (?:) instead.
|
1311
|
+
// regexps are ordered -> the first match is used
|
1312
|
+
|
1313
|
+
this.$rules = {
|
1314
|
+
"start" : [
|
1315
|
+
{
|
1316
|
+
token : "comment",
|
1317
|
+
regex : "\\/\\/.*$"
|
1318
|
+
},
|
1319
|
+
DocCommentHighlightRules.getStartRule("doc-start"),
|
1320
|
+
{
|
1321
|
+
token : "comment", // multi line comment
|
1322
|
+
merge : true,
|
1323
|
+
regex : "\\/\\*",
|
1324
|
+
next : "comment"
|
1325
|
+
}, {
|
1326
|
+
token : "string.regexp",
|
1327
|
+
regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
|
1328
|
+
}, {
|
1329
|
+
token : "string", // single line
|
1330
|
+
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
|
1331
|
+
}, {
|
1332
|
+
token : "string", // single line
|
1333
|
+
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
|
1334
|
+
}, {
|
1335
|
+
token : "constant.numeric", // hex
|
1336
|
+
regex : "0[xX][0-9a-fA-F]+\\b"
|
1337
|
+
}, {
|
1338
|
+
token : "constant.numeric", // float
|
1339
|
+
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
|
1340
|
+
}, {
|
1341
|
+
token : "constant.language.boolean",
|
1342
|
+
regex : "(?:true|false)\\b"
|
1343
|
+
}, {
|
1344
|
+
token : function(value) {
|
1345
|
+
if (value == "this")
|
1346
|
+
return "variable.language";
|
1347
|
+
else if (keywords.hasOwnProperty(value))
|
1348
|
+
return "keyword";
|
1349
|
+
else if (langClasses.hasOwnProperty(value))
|
1350
|
+
return "support.function";
|
1351
|
+
else if (importClasses.hasOwnProperty(value))
|
1352
|
+
return "support.function";
|
1353
|
+
else if (buildinConstants.hasOwnProperty(value))
|
1354
|
+
return "constant.language";
|
1355
|
+
else
|
1356
|
+
return "identifier";
|
1357
|
+
},
|
1358
|
+
// TODO: Unicode escape sequences
|
1359
|
+
// TODO: Unicode identifiers
|
1360
|
+
regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
|
1361
|
+
}, {
|
1362
|
+
token : "keyword.operator",
|
1363
|
+
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
|
1364
|
+
}, {
|
1365
|
+
token : "lparen",
|
1366
|
+
regex : "[[({]"
|
1367
|
+
}, {
|
1368
|
+
token : "rparen",
|
1369
|
+
regex : "[\\])}]"
|
1370
|
+
}, {
|
1371
|
+
token : "text",
|
1372
|
+
regex : "\\s+"
|
1373
|
+
}
|
1374
|
+
],
|
1375
|
+
"comment" : [
|
1376
|
+
{
|
1377
|
+
token : "comment", // closing comment
|
1378
|
+
regex : ".*?\\*\\/",
|
1379
|
+
next : "start"
|
1380
|
+
}, {
|
1381
|
+
token : "comment", // comment spanning whole line
|
1382
|
+
merge : true,
|
1383
|
+
regex : ".+"
|
1384
|
+
}
|
1385
|
+
]
|
1386
|
+
};
|
1387
|
+
|
1388
|
+
this.embedRules(DocCommentHighlightRules, "doc-",
|
1389
|
+
[ DocCommentHighlightRules.getEndRule("start") ]);
|
1390
|
+
};
|
1391
|
+
|
1392
|
+
oop.inherits(JavaHighlightRules, TextHighlightRules);
|
1393
|
+
|
1394
|
+
exports.JavaHighlightRules = JavaHighlightRules;
|
1395
|
+
});
|