ace-rails-ap 0.0.3 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/ace/rails/version.rb +1 -1
 - data/vendor/assets/javascripts/ace.js +15680 -1
 - data/vendor/assets/javascripts/keybinding-emacs.js +367 -1
 - data/vendor/assets/javascripts/keybinding-vim.js +1635 -1
 - data/vendor/assets/javascripts/mode-c9search.js +275 -0
 - data/vendor/assets/javascripts/mode-c_cpp.js +744 -1
 - data/vendor/assets/javascripts/mode-clojure.js +364 -1
 - data/vendor/assets/javascripts/mode-coffee.js +527 -1
 - data/vendor/assets/javascripts/mode-coldfusion.js +1966 -1
 - data/vendor/assets/javascripts/mode-csharp.js +633 -1
 - data/vendor/assets/javascripts/mode-css.js +499 -1
 - data/vendor/assets/javascripts/mode-diff.js +250 -0
 - data/vendor/assets/javascripts/{mode-c_cpp-uncompressed.js → mode-glsl.js} +147 -244
 - data/vendor/assets/javascripts/mode-golang.js +681 -1
 - data/vendor/assets/javascripts/mode-groovy.js +1240 -1
 - data/vendor/assets/javascripts/mode-haxe.js +633 -1
 - data/vendor/assets/javascripts/mode-html.js +2064 -1
 - data/vendor/assets/javascripts/mode-java.js +1202 -1
 - data/vendor/assets/javascripts/mode-javascript.js +1069 -1
 - data/vendor/assets/javascripts/mode-json.js +588 -1
 - data/vendor/assets/javascripts/{mode-haxe-uncompressed.js → mode-jsx.js} +189 -312
 - data/vendor/assets/javascripts/mode-latex.js +95 -1
 - data/vendor/assets/javascripts/mode-less.js +512 -1
 - data/vendor/assets/javascripts/mode-liquid.js +1125 -1
 - data/vendor/assets/javascripts/mode-lua.js +551 -1
 - data/vendor/assets/javascripts/{mode-html-uncompressed.js → mode-luahtml.js} +544 -604
 - data/vendor/assets/javascripts/{mode-coldfusion-uncompressed.js → mode-luapage.js} +2326 -2180
 - data/vendor/assets/javascripts/mode-markdown.js +2369 -1
 - data/vendor/assets/javascripts/mode-ocaml.js +464 -1
 - data/vendor/assets/javascripts/mode-perl.js +432 -1
 - data/vendor/assets/javascripts/mode-pgsql.js +970 -1
 - data/vendor/assets/javascripts/mode-php.js +1718 -1
 - data/vendor/assets/javascripts/mode-powershell.js +610 -1
 - data/vendor/assets/javascripts/mode-python.js +397 -1
 - data/vendor/assets/javascripts/mode-ruby.js +318 -1
 - data/vendor/assets/javascripts/mode-scad.js +732 -1
 - data/vendor/assets/javascripts/mode-scala.js +1237 -1
 - data/vendor/assets/javascripts/mode-scss.js +537 -1
 - data/vendor/assets/javascripts/mode-sh.js +250 -1
 - data/vendor/assets/javascripts/mode-sql.js +140 -1
 - data/vendor/assets/javascripts/mode-svg.js +1681 -1
 - data/vendor/assets/javascripts/mode-tcl.js +320 -0
 - data/vendor/assets/javascripts/mode-textile.js +182 -1
 - data/vendor/assets/javascripts/mode-xml.js +829 -1
 - data/vendor/assets/javascripts/mode-xquery.js +605 -1
 - data/vendor/assets/javascripts/mode-yaml.js +189 -0
 - data/vendor/assets/javascripts/theme-chrome.js +213 -1
 - data/vendor/assets/javascripts/theme-clouds.js +167 -1
 - data/vendor/assets/javascripts/theme-clouds_midnight.js +168 -1
 - data/vendor/assets/javascripts/theme-cobalt.js +194 -1
 - data/vendor/assets/javascripts/theme-crimson_editor.js +200 -1
 - data/vendor/assets/javascripts/theme-dawn.js +198 -1
 - data/vendor/assets/javascripts/theme-dreamweaver.js +230 -1
 - data/vendor/assets/javascripts/theme-eclipse.js +157 -1
 - data/vendor/assets/javascripts/theme-github.js +182 -0
 - data/vendor/assets/javascripts/theme-idle_fingers.js +186 -1
 - data/vendor/assets/javascripts/theme-kr_theme.js +189 -1
 - data/vendor/assets/javascripts/theme-merbivore.js +189 -1
 - data/vendor/assets/javascripts/theme-merbivore_soft.js +195 -1
 - data/vendor/assets/javascripts/theme-mono_industrial.js +197 -1
 - data/vendor/assets/javascripts/theme-monokai.js +194 -1
 - data/vendor/assets/javascripts/theme-pastel_on_dark.js +199 -1
 - data/vendor/assets/javascripts/theme-solarized_dark.js +180 -1
 - data/vendor/assets/javascripts/theme-solarized_light.js +179 -1
 - data/vendor/assets/javascripts/theme-textmate.js +216 -0
 - data/vendor/assets/javascripts/theme-tomorrow.js +213 -1
 - data/vendor/assets/javascripts/theme-tomorrow_night.js +213 -1
 - data/vendor/assets/javascripts/theme-tomorrow_night_blue.js +213 -1
 - data/vendor/assets/javascripts/theme-tomorrow_night_bright.js +213 -1
 - data/vendor/assets/javascripts/theme-tomorrow_night_eighties.js +209 -1
 - data/vendor/assets/javascripts/theme-twilight.js +211 -1
 - data/vendor/assets/javascripts/theme-vibrant_ink.js +190 -1
 - data/vendor/assets/javascripts/worker-coffee.js +83 -893
 - data/vendor/assets/javascripts/worker-css.js +88 -1402
 - data/vendor/assets/javascripts/worker-javascript.js +97 -812
 - data/vendor/assets/javascripts/worker-json.js +84 -761
 - data/vendor/assets/javascripts/worker-xquery.js +66464 -0
 - metadata +12 -195
 - data/vendor/assets/javascripts/ace-compat-noconflict.js +0 -1
 - data/vendor/assets/javascripts/ace-compat-uncompressed-noconflict.js +0 -480
 - data/vendor/assets/javascripts/ace-compat-uncompressed.js +0 -480
 - data/vendor/assets/javascripts/ace-compat.js +0 -1
 - data/vendor/assets/javascripts/ace-noconflict.js +0 -10
 - data/vendor/assets/javascripts/ace-uncompressed-noconflict.js +0 -19976
 - data/vendor/assets/javascripts/ace-uncompressed.js +0 -19976
 - data/vendor/assets/javascripts/keybinding-emacs-noconflict.js +0 -1
 - data/vendor/assets/javascripts/keybinding-emacs-uncompressed-noconflict.js +0 -150
 - data/vendor/assets/javascripts/keybinding-emacs-uncompressed.js +0 -150
 - data/vendor/assets/javascripts/keybinding-vim-noconflict.js +0 -1
 - data/vendor/assets/javascripts/keybinding-vim-uncompressed-noconflict.js +0 -138
 - data/vendor/assets/javascripts/keybinding-vim-uncompressed.js +0 -138
 - data/vendor/assets/javascripts/mode-c_cpp-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-c_cpp-uncompressed-noconflict.js +0 -919
 - data/vendor/assets/javascripts/mode-clojure-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-clojure-uncompressed-noconflict.js +0 -422
 - data/vendor/assets/javascripts/mode-clojure-uncompressed.js +0 -422
 - data/vendor/assets/javascripts/mode-coffee-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-coffee-uncompressed-noconflict.js +0 -607
 - data/vendor/assets/javascripts/mode-coffee-uncompressed.js +0 -607
 - data/vendor/assets/javascripts/mode-coldfusion-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-coldfusion-uncompressed-noconflict.js +0 -2458
 - data/vendor/assets/javascripts/mode-csharp-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-csharp-uncompressed-noconflict.js +0 -769
 - data/vendor/assets/javascripts/mode-csharp-uncompressed.js +0 -769
 - data/vendor/assets/javascripts/mode-css-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-css-uncompressed-noconflict.js +0 -641
 - data/vendor/assets/javascripts/mode-css-uncompressed.js +0 -641
 - data/vendor/assets/javascripts/mode-golang-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-golang-uncompressed-noconflict.js +0 -378
 - data/vendor/assets/javascripts/mode-golang-uncompressed.js +0 -378
 - data/vendor/assets/javascripts/mode-groovy-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-groovy-uncompressed-noconflict.js +0 -1393
 - data/vendor/assets/javascripts/mode-groovy-uncompressed.js +0 -1393
 - data/vendor/assets/javascripts/mode-haxe-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-haxe-uncompressed-noconflict.js +0 -769
 - data/vendor/assets/javascripts/mode-html-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-html-uncompressed-noconflict.js +0 -2475
 - data/vendor/assets/javascripts/mode-java-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-java-uncompressed-noconflict.js +0 -1395
 - data/vendor/assets/javascripts/mode-java-uncompressed.js +0 -1395
 - data/vendor/assets/javascripts/mode-javascript-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-javascript-uncompressed-noconflict.js +0 -1226
 - data/vendor/assets/javascripts/mode-javascript-uncompressed.js +0 -1226
 - data/vendor/assets/javascripts/mode-json-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-json-uncompressed-noconflict.js +0 -701
 - data/vendor/assets/javascripts/mode-json-uncompressed.js +0 -701
 - data/vendor/assets/javascripts/mode-latex-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-latex-uncompressed-noconflict.js +0 -95
 - data/vendor/assets/javascripts/mode-latex-uncompressed.js +0 -95
 - data/vendor/assets/javascripts/mode-less-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-less-uncompressed-noconflict.js +0 -655
 - data/vendor/assets/javascripts/mode-less-uncompressed.js +0 -655
 - data/vendor/assets/javascripts/mode-liquid-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-liquid-uncompressed-noconflict.js +0 -1353
 - data/vendor/assets/javascripts/mode-liquid-uncompressed.js +0 -1353
 - data/vendor/assets/javascripts/mode-lua-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-lua-uncompressed-noconflict.js +0 -523
 - data/vendor/assets/javascripts/mode-lua-uncompressed.js +0 -523
 - data/vendor/assets/javascripts/mode-markdown-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-markdown-uncompressed-noconflict.js +0 -2925
 - data/vendor/assets/javascripts/mode-markdown-uncompressed.js +0 -2925
 - data/vendor/assets/javascripts/mode-ocaml-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-ocaml-uncompressed-noconflict.js +0 -539
 - data/vendor/assets/javascripts/mode-ocaml-uncompressed.js +0 -539
 - data/vendor/assets/javascripts/mode-perl-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-perl-uncompressed-noconflict.js +0 -574
 - data/vendor/assets/javascripts/mode-perl-uncompressed.js +0 -574
 - data/vendor/assets/javascripts/mode-pgsql-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-pgsql-uncompressed-noconflict.js +0 -1104
 - data/vendor/assets/javascripts/mode-pgsql-uncompressed.js +0 -1104
 - data/vendor/assets/javascripts/mode-php-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-php-uncompressed-noconflict.js +0 -1885
 - data/vendor/assets/javascripts/mode-php-uncompressed.js +0 -1885
 - data/vendor/assets/javascripts/mode-powershell-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-powershell-uncompressed-noconflict.js +0 -710
 - data/vendor/assets/javascripts/mode-powershell-uncompressed.js +0 -710
 - data/vendor/assets/javascripts/mode-python-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-python-uncompressed-noconflict.js +0 -507
 - data/vendor/assets/javascripts/mode-python-uncompressed.js +0 -507
 - data/vendor/assets/javascripts/mode-ruby-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-ruby-uncompressed-noconflict.js +0 -391
 - data/vendor/assets/javascripts/mode-ruby-uncompressed.js +0 -391
 - data/vendor/assets/javascripts/mode-scad-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-scad-uncompressed-noconflict.js +0 -907
 - data/vendor/assets/javascripts/mode-scad-uncompressed.js +0 -907
 - data/vendor/assets/javascripts/mode-scala-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-scala-uncompressed-noconflict.js +0 -1395
 - data/vendor/assets/javascripts/mode-scala-uncompressed.js +0 -1395
 - data/vendor/assets/javascripts/mode-scss-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-scss-uncompressed-noconflict.js +0 -679
 - data/vendor/assets/javascripts/mode-scss-uncompressed.js +0 -679
 - data/vendor/assets/javascripts/mode-sh-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-sh-uncompressed-noconflict.js +0 -289
 - data/vendor/assets/javascripts/mode-sh-uncompressed.js +0 -289
 - data/vendor/assets/javascripts/mode-sql-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-sql-uncompressed-noconflict.js +0 -159
 - data/vendor/assets/javascripts/mode-sql-uncompressed.js +0 -159
 - data/vendor/assets/javascripts/mode-svg-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-svg-uncompressed-noconflict.js +0 -2137
 - data/vendor/assets/javascripts/mode-svg-uncompressed.js +0 -2137
 - 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-textile-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-textile-uncompressed-noconflict.js +0 -254
 - data/vendor/assets/javascripts/mode-textile-uncompressed.js +0 -254
 - data/vendor/assets/javascripts/mode-xml-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-xml-uncompressed-noconflict.js +0 -1012
 - data/vendor/assets/javascripts/mode-xml-uncompressed.js +0 -1012
 - data/vendor/assets/javascripts/mode-xquery-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-xquery-uncompressed-noconflict.js +0 -540
 - data/vendor/assets/javascripts/mode-xquery-uncompressed.js +0 -540
 - data/vendor/assets/javascripts/theme-chrome-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-chrome-uncompressed-noconflict.js +0 -207
 - data/vendor/assets/javascripts/theme-chrome-uncompressed.js +0 -207
 - data/vendor/assets/javascripts/theme-clouds-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-clouds-uncompressed-noconflict.js +0 -160
 - data/vendor/assets/javascripts/theme-clouds-uncompressed.js +0 -160
 - data/vendor/assets/javascripts/theme-clouds_midnight-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-clouds_midnight-uncompressed-noconflict.js +0 -161
 - data/vendor/assets/javascripts/theme-clouds_midnight-uncompressed.js +0 -161
 - data/vendor/assets/javascripts/theme-cobalt-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-cobalt-uncompressed-noconflict.js +0 -187
 - data/vendor/assets/javascripts/theme-cobalt-uncompressed.js +0 -187
 - data/vendor/assets/javascripts/theme-crimson_editor-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-crimson_editor-uncompressed-noconflict.js +0 -198
 - data/vendor/assets/javascripts/theme-crimson_editor-uncompressed.js +0 -198
 - data/vendor/assets/javascripts/theme-dawn-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-dawn-uncompressed-noconflict.js +0 -191
 - data/vendor/assets/javascripts/theme-dawn-uncompressed.js +0 -191
 - data/vendor/assets/javascripts/theme-dreamweaver-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-dreamweaver-uncompressed-noconflict.js +0 -227
 - data/vendor/assets/javascripts/theme-dreamweaver-uncompressed.js +0 -227
 - data/vendor/assets/javascripts/theme-eclipse-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-eclipse-uncompressed-noconflict.js +0 -147
 - data/vendor/assets/javascripts/theme-eclipse-uncompressed.js +0 -147
 - data/vendor/assets/javascripts/theme-idle_fingers-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-idle_fingers-uncompressed-noconflict.js +0 -179
 - data/vendor/assets/javascripts/theme-idle_fingers-uncompressed.js +0 -179
 - data/vendor/assets/javascripts/theme-kr_theme-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-kr_theme-uncompressed-noconflict.js +0 -182
 - data/vendor/assets/javascripts/theme-kr_theme-uncompressed.js +0 -182
 - data/vendor/assets/javascripts/theme-merbivore-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-merbivore-uncompressed-noconflict.js +0 -182
 - data/vendor/assets/javascripts/theme-merbivore-uncompressed.js +0 -182
 - data/vendor/assets/javascripts/theme-merbivore_soft-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-merbivore_soft-uncompressed-noconflict.js +0 -188
 - data/vendor/assets/javascripts/theme-merbivore_soft-uncompressed.js +0 -188
 - data/vendor/assets/javascripts/theme-mono_industrial-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-mono_industrial-uncompressed-noconflict.js +0 -190
 - data/vendor/assets/javascripts/theme-mono_industrial-uncompressed.js +0 -190
 - data/vendor/assets/javascripts/theme-monokai-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-monokai-uncompressed-noconflict.js +0 -191
 - data/vendor/assets/javascripts/theme-monokai-uncompressed.js +0 -191
 - data/vendor/assets/javascripts/theme-pastel_on_dark-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-pastel_on_dark-uncompressed-noconflict.js +0 -192
 - data/vendor/assets/javascripts/theme-pastel_on_dark-uncompressed.js +0 -192
 - data/vendor/assets/javascripts/theme-solarized_dark-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-solarized_dark-uncompressed-noconflict.js +0 -176
 - data/vendor/assets/javascripts/theme-solarized_dark-uncompressed.js +0 -176
 - data/vendor/assets/javascripts/theme-solarized_light-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-solarized_light-uncompressed-noconflict.js +0 -172
 - data/vendor/assets/javascripts/theme-solarized_light-uncompressed.js +0 -172
 - 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 +0 -1
 - data/vendor/assets/javascripts/theme-tomorrow-uncompressed-noconflict.js +0 -206
 - data/vendor/assets/javascripts/theme-tomorrow-uncompressed.js +0 -206
 - data/vendor/assets/javascripts/theme-tomorrow_night-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-tomorrow_night-uncompressed-noconflict.js +0 -206
 - data/vendor/assets/javascripts/theme-tomorrow_night-uncompressed.js +0 -206
 - data/vendor/assets/javascripts/theme-tomorrow_night_blue-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-tomorrow_night_blue-uncompressed-noconflict.js +0 -209
 - data/vendor/assets/javascripts/theme-tomorrow_night_blue-uncompressed.js +0 -209
 - data/vendor/assets/javascripts/theme-tomorrow_night_bright-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-tomorrow_night_bright-uncompressed-noconflict.js +0 -206
 - data/vendor/assets/javascripts/theme-tomorrow_night_bright-uncompressed.js +0 -206
 - data/vendor/assets/javascripts/theme-tomorrow_night_eighties-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-tomorrow_night_eighties-uncompressed-noconflict.js +0 -202
 - data/vendor/assets/javascripts/theme-tomorrow_night_eighties-uncompressed.js +0 -202
 - data/vendor/assets/javascripts/theme-twilight-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-twilight-uncompressed-noconflict.js +0 -204
 - data/vendor/assets/javascripts/theme-twilight-uncompressed.js +0 -204
 - data/vendor/assets/javascripts/theme-vibrant_ink-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-vibrant_ink-uncompressed-noconflict.js +0 -183
 - data/vendor/assets/javascripts/theme-vibrant_ink-uncompressed.js +0 -183
 
| 
         @@ -35,8 +35,8 @@ var require = function(parentId, id) { 
     | 
|
| 
       35 
35 
     | 
    
         
             
                var module = require.modules[id];
         
     | 
| 
       36 
36 
     | 
    
         
             
                if (module) {
         
     | 
| 
       37 
37 
     | 
    
         
             
                    if (!module.initialized) {
         
     | 
| 
       38 
     | 
    
         
            -
                        module.exports = module.factory().exports;
         
     | 
| 
       39 
38 
     | 
    
         
             
                        module.initialized = true;
         
     | 
| 
      
 39 
     | 
    
         
            +
                        module.exports = module.factory().exports;
         
     | 
| 
       40 
40 
     | 
    
         
             
                    }
         
     | 
| 
       41 
41 
     | 
    
         
             
                    return module.exports;
         
     | 
| 
       42 
42 
     | 
    
         
             
                }
         
     | 
| 
         @@ -56,6 +56,10 @@ require.tlns = {}; 
     | 
|
| 
       56 
56 
     | 
    
         
             
            var define = function(id, deps, factory) {
         
     | 
| 
       57 
57 
     | 
    
         
             
                if (arguments.length == 2) {
         
     | 
| 
       58 
58 
     | 
    
         
             
                    factory = deps;
         
     | 
| 
      
 59 
     | 
    
         
            +
                    if (typeof id != "string") {
         
     | 
| 
      
 60 
     | 
    
         
            +
                        deps = id;
         
     | 
| 
      
 61 
     | 
    
         
            +
                        id = require.id;
         
     | 
| 
      
 62 
     | 
    
         
            +
                    }
         
     | 
| 
       59 
63 
     | 
    
         
             
                } else if (arguments.length == 1) {
         
     | 
| 
       60 
64 
     | 
    
         
             
                    factory = id;
         
     | 
| 
       61 
65 
     | 
    
         
             
                    id = require.id;
         
     | 
| 
         @@ -149,25 +153,15 @@ onmessage = function(e) { 
     | 
|
| 
       149 
153 
     | 
    
         
             
            */
         
     | 
| 
       150 
154 
     | 
    
         | 
| 
       151 
155 
     | 
    
         
             
            define('ace/lib/fixoldbrowsers', ['require', 'exports', 'module' , 'ace/lib/regexp', 'ace/lib/es5-shim'], function(require, exports, module) {
         
     | 
| 
       152 
     | 
    
         
            -
             
     | 
| 
      
 156 
     | 
    
         
            +
             
     | 
| 
       153 
157 
     | 
    
         | 
| 
       154 
158 
     | 
    
         
             
            require("./regexp");
         
     | 
| 
       155 
159 
     | 
    
         
             
            require("./es5-shim");
         
     | 
| 
       156 
160 
     | 
    
         | 
| 
       157 
161 
     | 
    
         
             
            });
         
     | 
| 
       158 
     | 
    
         
            -
            /*
         
     | 
| 
       159 
     | 
    
         
            -
             *  Based on code from:
         
     | 
| 
       160 
     | 
    
         
            -
             *
         
     | 
| 
       161 
     | 
    
         
            -
             * XRegExp 1.5.0
         
     | 
| 
       162 
     | 
    
         
            -
             * (c) 2007-2010 Steven Levithan
         
     | 
| 
       163 
     | 
    
         
            -
             * MIT License
         
     | 
| 
       164 
     | 
    
         
            -
             * <http://xregexp.com>
         
     | 
| 
       165 
     | 
    
         
            -
             * Provides an augmented, extensible, cross-browser implementation of regular expressions,
         
     | 
| 
       166 
     | 
    
         
            -
             * including support for additional syntax, flags, and methods
         
     | 
| 
       167 
     | 
    
         
            -
             */
         
     | 
| 
       168 
162 
     | 
    
         | 
| 
       169 
163 
     | 
    
         
             
            define('ace/lib/regexp', ['require', 'exports', 'module' ], function(require, exports, module) {
         
     | 
| 
       170 
     | 
    
         
            -
             
     | 
| 
      
 164 
     | 
    
         
            +
             
     | 
| 
       171 
165 
     | 
    
         | 
| 
       172 
166 
     | 
    
         
             
                //---------------------------------
         
     | 
| 
       173 
167 
     | 
    
         
             
                //  Private variables
         
     | 
| 
         @@ -187,6 +181,9 @@ define('ace/lib/regexp', ['require', 'exports', 'module' ], function(require, ex 
     | 
|
| 
       187 
181 
     | 
    
         
             
                        return !x.lastIndex;
         
     | 
| 
       188 
182 
     | 
    
         
             
                    }();
         
     | 
| 
       189 
183 
     | 
    
         | 
| 
      
 184 
     | 
    
         
            +
                if (compliantLastIndexIncrement && compliantExecNpcg)
         
     | 
| 
      
 185 
     | 
    
         
            +
                    return;
         
     | 
| 
      
 186 
     | 
    
         
            +
             
     | 
| 
       190 
187 
     | 
    
         
             
                //---------------------------------
         
     | 
| 
       191 
188 
     | 
    
         
             
                //  Overriden native methods
         
     | 
| 
       192 
189 
     | 
    
         
             
                //---------------------------------
         
     | 
| 
         @@ -252,7 +249,7 @@ define('ace/lib/regexp', ['require', 'exports', 'module' ], function(require, ex 
     | 
|
| 
       252 
249 
     | 
    
         
             
                           (regex.multiline  ? "m" : "") +
         
     | 
| 
       253 
250 
     | 
    
         
             
                           (regex.extended   ? "x" : "") + // Proposed for ES4; included in AS3
         
     | 
| 
       254 
251 
     | 
    
         
             
                           (regex.sticky     ? "y" : "");
         
     | 
| 
       255 
     | 
    
         
            -
                } 
     | 
| 
      
 252 
     | 
    
         
            +
                }
         
     | 
| 
       256 
253 
     | 
    
         | 
| 
       257 
254 
     | 
    
         
             
                function indexOf (array, item, from) {
         
     | 
| 
       258 
255 
     | 
    
         
             
                    if (Array.prototype.indexOf) // Use the native array method if available
         
     | 
| 
         @@ -262,30 +259,9 @@ define('ace/lib/regexp', ['require', 'exports', 'module' ], function(require, ex 
     | 
|
| 
       262 
259 
     | 
    
         
             
                            return i;
         
     | 
| 
       263 
260 
     | 
    
         
             
                    }
         
     | 
| 
       264 
261 
     | 
    
         
             
                    return -1;
         
     | 
| 
       265 
     | 
    
         
            -
                } 
     | 
| 
      
 262 
     | 
    
         
            +
                }
         
     | 
| 
       266 
263 
     | 
    
         | 
| 
       267 
264 
     | 
    
         
             
            });
         
     | 
| 
       268 
     | 
    
         
            -
            // vim: ts=4 sts=4 sw=4 expandtab
         
     | 
| 
       269 
     | 
    
         
            -
            // -- kriskowal Kris Kowal Copyright (C) 2009-2011 MIT License
         
     | 
| 
       270 
     | 
    
         
            -
            // -- tlrobinson Tom Robinson Copyright (C) 2009-2010 MIT License (Narwhal Project)
         
     | 
| 
       271 
     | 
    
         
            -
            // -- dantman Daniel Friesen Copyright (C) 2010 XXX TODO License or CLA
         
     | 
| 
       272 
     | 
    
         
            -
            // -- fschaefer Florian Schäfer Copyright (C) 2010 MIT License
         
     | 
| 
       273 
     | 
    
         
            -
            // -- Gozala Irakli Gozalishvili Copyright (C) 2010 MIT License
         
     | 
| 
       274 
     | 
    
         
            -
            // -- kitcambridge Kit Cambridge Copyright (C) 2011 MIT License
         
     | 
| 
       275 
     | 
    
         
            -
            // -- kossnocorp Sasha Koss XXX TODO License or CLA
         
     | 
| 
       276 
     | 
    
         
            -
            // -- bryanforbes Bryan Forbes XXX TODO License or CLA
         
     | 
| 
       277 
     | 
    
         
            -
            // -- killdream Quildreen Motta Copyright (C) 2011 MIT Licence
         
     | 
| 
       278 
     | 
    
         
            -
            // -- michaelficarra Michael Ficarra Copyright (C) 2011 3-clause BSD License
         
     | 
| 
       279 
     | 
    
         
            -
            // -- sharkbrainguy Gerard Paapu Copyright (C) 2011 MIT License
         
     | 
| 
       280 
     | 
    
         
            -
            // -- bbqsrc Brendan Molloy (C) 2011 Creative Commons Zero (public domain)
         
     | 
| 
       281 
     | 
    
         
            -
            // -- iwyg XXX TODO License or CLA
         
     | 
| 
       282 
     | 
    
         
            -
            // -- DomenicDenicola Domenic Denicola Copyright (C) 2011 MIT License
         
     | 
| 
       283 
     | 
    
         
            -
            // -- xavierm02 Montillet Xavier XXX TODO License or CLA
         
     | 
| 
       284 
     | 
    
         
            -
            // -- Raynos Raynos XXX TODO License or CLA
         
     | 
| 
       285 
     | 
    
         
            -
            // -- samsonjs Sami Samhuri Copyright (C) 2010 MIT License
         
     | 
| 
       286 
     | 
    
         
            -
            // -- rwldrn Rick Waldron Copyright (C) 2011 MIT License
         
     | 
| 
       287 
     | 
    
         
            -
            // -- lexer Alexey Zakharov XXX TODO License or CLA
         
     | 
| 
       288 
     | 
    
         
            -
             
     | 
| 
       289 
265 
     | 
    
         
             
            /*!
         
     | 
| 
       290 
266 
     | 
    
         
             
                Copyright (c) 2009, 280 North Inc. http://280north.com/
         
     | 
| 
       291 
267 
     | 
    
         
             
                MIT License. http://github.com/280north/narwhal/blob/master/README.md
         
     | 
| 
         @@ -1324,48 +1300,9 @@ var prepareString = "a"[0] != "a", 
     | 
|
| 
       1324 
1300 
     | 
    
         
             
                    return Object(o);
         
     | 
| 
       1325 
1301 
     | 
    
         
             
                };
         
     | 
| 
       1326 
1302 
     | 
    
         
             
            });
         
     | 
| 
       1327 
     | 
    
         
            -
            /* vim:ts=4:sts=4:sw=4:
         
     | 
| 
       1328 
     | 
    
         
            -
             * ***** BEGIN LICENSE BLOCK *****
         
     | 
| 
       1329 
     | 
    
         
            -
             * Version: MPL 1.1/GPL 2.0/LGPL 2.1
         
     | 
| 
       1330 
     | 
    
         
            -
             *
         
     | 
| 
       1331 
     | 
    
         
            -
             * The contents of this file are subject to the Mozilla Public License Version
         
     | 
| 
       1332 
     | 
    
         
            -
             * 1.1 (the "License"); you may not use this file except in compliance with
         
     | 
| 
       1333 
     | 
    
         
            -
             * the License. You may obtain a copy of the License at
         
     | 
| 
       1334 
     | 
    
         
            -
             * http://www.mozilla.org/MPL/
         
     | 
| 
       1335 
     | 
    
         
            -
             *
         
     | 
| 
       1336 
     | 
    
         
            -
             * Software distributed under the License is distributed on an "AS IS" basis,
         
     | 
| 
       1337 
     | 
    
         
            -
             * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
         
     | 
| 
       1338 
     | 
    
         
            -
             * for the specific language governing rights and limitations under the
         
     | 
| 
       1339 
     | 
    
         
            -
             * License.
         
     | 
| 
       1340 
     | 
    
         
            -
             *
         
     | 
| 
       1341 
     | 
    
         
            -
             * The Original Code is Ajax.org Code Editor (ACE).
         
     | 
| 
       1342 
     | 
    
         
            -
             *
         
     | 
| 
       1343 
     | 
    
         
            -
             * The Initial Developer of the Original Code is
         
     | 
| 
       1344 
     | 
    
         
            -
             * Ajax.org B.V.
         
     | 
| 
       1345 
     | 
    
         
            -
             * Portions created by the Initial Developer are Copyright (C) 2010
         
     | 
| 
       1346 
     | 
    
         
            -
             * the Initial Developer. All Rights Reserved.
         
     | 
| 
       1347 
     | 
    
         
            -
             *
         
     | 
| 
       1348 
     | 
    
         
            -
             * Contributor(s):
         
     | 
| 
       1349 
     | 
    
         
            -
             *      Fabian Jakobs <fabian AT ajax DOT org>
         
     | 
| 
       1350 
     | 
    
         
            -
             *      Irakli Gozalishvili <rfobic@gmail.com> (http://jeditoolkit.com)
         
     | 
| 
       1351 
     | 
    
         
            -
             *      Mike de Boer <mike AT ajax DOT org>
         
     | 
| 
       1352 
     | 
    
         
            -
             *
         
     | 
| 
       1353 
     | 
    
         
            -
             * Alternatively, the contents of this file may be used under the terms of
         
     | 
| 
       1354 
     | 
    
         
            -
             * either the GNU General Public License Version 2 or later (the "GPL"), or
         
     | 
| 
       1355 
     | 
    
         
            -
             * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
         
     | 
| 
       1356 
     | 
    
         
            -
             * in which case the provisions of the GPL or the LGPL are applicable instead
         
     | 
| 
       1357 
     | 
    
         
            -
             * of those above. If you wish to allow use of your version of this file only
         
     | 
| 
       1358 
     | 
    
         
            -
             * under the terms of either the GPL or the LGPL, and not to allow others to
         
     | 
| 
       1359 
     | 
    
         
            -
             * use your version of this file under the terms of the MPL, indicate your
         
     | 
| 
       1360 
     | 
    
         
            -
             * decision by deleting the provisions above and replace them with the notice
         
     | 
| 
       1361 
     | 
    
         
            -
             * and other provisions required by the GPL or the LGPL. If you do not delete
         
     | 
| 
       1362 
     | 
    
         
            -
             * the provisions above, a recipient may use your version of this file under
         
     | 
| 
       1363 
     | 
    
         
            -
             * the terms of any one of the MPL, the GPL or the LGPL.
         
     | 
| 
       1364 
     | 
    
         
            -
             *
         
     | 
| 
       1365 
     | 
    
         
            -
             * ***** END LICENSE BLOCK ***** */
         
     | 
| 
       1366 
1303 
     | 
    
         | 
| 
       1367 
1304 
     | 
    
         
             
            define('ace/lib/event_emitter', ['require', 'exports', 'module' ], function(require, exports, module) {
         
     | 
| 
       1368 
     | 
    
         
            -
             
     | 
| 
      
 1305 
     | 
    
         
            +
             
     | 
| 
       1369 
1306 
     | 
    
         | 
| 
       1370 
1307 
     | 
    
         
             
            var EventEmitter = {};
         
     | 
| 
       1371 
1308 
     | 
    
         | 
| 
         @@ -1380,7 +1317,8 @@ EventEmitter._dispatchEvent = function(eventName, e) { 
     | 
|
| 
       1380 
1317 
     | 
    
         
             
                    return;
         
     | 
| 
       1381 
1318 
     | 
    
         | 
| 
       1382 
1319 
     | 
    
         
             
                e = e || {};
         
     | 
| 
       1383 
     | 
    
         
            -
                e.type 
     | 
| 
      
 1320 
     | 
    
         
            +
                if (!e.type)
         
     | 
| 
      
 1321 
     | 
    
         
            +
                    e.type = eventName;
         
     | 
| 
       1384 
1322 
     | 
    
         | 
| 
       1385 
1323 
     | 
    
         
             
                if (!e.stopPropagation) {
         
     | 
| 
       1386 
1324 
     | 
    
         
             
                    e.stopPropagation = function() {
         
     | 
| 
         @@ -1419,7 +1357,7 @@ EventEmitter.addEventListener = function(eventName, callback) { 
     | 
|
| 
       1419 
1357 
     | 
    
         | 
| 
       1420 
1358 
     | 
    
         
             
                var listeners = this._eventRegistry[eventName];
         
     | 
| 
       1421 
1359 
     | 
    
         
             
                if (!listeners)
         
     | 
| 
       1422 
     | 
    
         
            -
                     
     | 
| 
      
 1360 
     | 
    
         
            +
                    listeners = this._eventRegistry[eventName] = [];
         
     | 
| 
       1423 
1361 
     | 
    
         | 
| 
       1424 
1362 
     | 
    
         
             
                if (listeners.indexOf(callback) == -1)
         
     | 
| 
       1425 
1363 
     | 
    
         
             
                    listeners.push(callback);
         
     | 
| 
         @@ -1445,45 +1383,9 @@ EventEmitter.removeAllListeners = function(eventName) { 
     | 
|
| 
       1445 
1383 
     | 
    
         
             
            exports.EventEmitter = EventEmitter;
         
     | 
| 
       1446 
1384 
     | 
    
         | 
| 
       1447 
1385 
     | 
    
         
             
            });
         
     | 
| 
       1448 
     | 
    
         
            -
            /* ***** BEGIN LICENSE BLOCK *****
         
     | 
| 
       1449 
     | 
    
         
            -
             * Version: MPL 1.1/GPL 2.0/LGPL 2.1
         
     | 
| 
       1450 
     | 
    
         
            -
             *
         
     | 
| 
       1451 
     | 
    
         
            -
             * The contents of this file are subject to the Mozilla Public License Version
         
     | 
| 
       1452 
     | 
    
         
            -
             * 1.1 (the "License"); you may not use this file except in compliance with
         
     | 
| 
       1453 
     | 
    
         
            -
             * the License. You may obtain a copy of the License at
         
     | 
| 
       1454 
     | 
    
         
            -
             * http://www.mozilla.org/MPL/
         
     | 
| 
       1455 
     | 
    
         
            -
             *
         
     | 
| 
       1456 
     | 
    
         
            -
             * Software distributed under the License is distributed on an "AS IS" basis,
         
     | 
| 
       1457 
     | 
    
         
            -
             * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
         
     | 
| 
       1458 
     | 
    
         
            -
             * for the specific language governing rights and limitations under the
         
     | 
| 
       1459 
     | 
    
         
            -
             * License.
         
     | 
| 
       1460 
     | 
    
         
            -
             *
         
     | 
| 
       1461 
     | 
    
         
            -
             * The Original Code is Ajax.org Code Editor (ACE).
         
     | 
| 
       1462 
     | 
    
         
            -
             *
         
     | 
| 
       1463 
     | 
    
         
            -
             * The Initial Developer of the Original Code is
         
     | 
| 
       1464 
     | 
    
         
            -
             * Ajax.org B.V.
         
     | 
| 
       1465 
     | 
    
         
            -
             * Portions created by the Initial Developer are Copyright (C) 2010
         
     | 
| 
       1466 
     | 
    
         
            -
             * the Initial Developer. All Rights Reserved.
         
     | 
| 
       1467 
     | 
    
         
            -
             *
         
     | 
| 
       1468 
     | 
    
         
            -
             * Contributor(s):
         
     | 
| 
       1469 
     | 
    
         
            -
             *      Fabian Jakobs <fabian AT ajax DOT org>
         
     | 
| 
       1470 
     | 
    
         
            -
             *
         
     | 
| 
       1471 
     | 
    
         
            -
             * Alternatively, the contents of this file may be used under the terms of
         
     | 
| 
       1472 
     | 
    
         
            -
             * either the GNU General Public License Version 2 or later (the "GPL"), or
         
     | 
| 
       1473 
     | 
    
         
            -
             * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
         
     | 
| 
       1474 
     | 
    
         
            -
             * in which case the provisions of the GPL or the LGPL are applicable instead
         
     | 
| 
       1475 
     | 
    
         
            -
             * of those above. If you wish to allow use of your version of this file only
         
     | 
| 
       1476 
     | 
    
         
            -
             * under the terms of either the GPL or the LGPL, and not to allow others to
         
     | 
| 
       1477 
     | 
    
         
            -
             * use your version of this file under the terms of the MPL, indicate your
         
     | 
| 
       1478 
     | 
    
         
            -
             * decision by deleting the provisions above and replace them with the notice
         
     | 
| 
       1479 
     | 
    
         
            -
             * and other provisions required by the GPL or the LGPL. If you do not delete
         
     | 
| 
       1480 
     | 
    
         
            -
             * the provisions above, a recipient may use your version of this file under
         
     | 
| 
       1481 
     | 
    
         
            -
             * the terms of any one of the MPL, the GPL or the LGPL.
         
     | 
| 
       1482 
     | 
    
         
            -
             *
         
     | 
| 
       1483 
     | 
    
         
            -
             * ***** END LICENSE BLOCK ***** */
         
     | 
| 
       1484 
1386 
     | 
    
         | 
| 
       1485 
1387 
     | 
    
         
             
            define('ace/lib/oop', ['require', 'exports', 'module' ], function(require, exports, module) {
         
     | 
| 
       1486 
     | 
    
         
            -
             
     | 
| 
      
 1388 
     | 
    
         
            +
             
     | 
| 
       1487 
1389 
     | 
    
         | 
| 
       1488 
1390 
     | 
    
         
             
            exports.inherits = (function() {
         
     | 
| 
       1489 
1391 
     | 
    
         
             
                var tempCtor = function() {};
         
     | 
| 
         @@ -1506,45 +1408,9 @@ exports.implement = function(proto, mixin) { 
     | 
|
| 
       1506 
1408 
     | 
    
         
             
            };
         
     | 
| 
       1507 
1409 
     | 
    
         | 
| 
       1508 
1410 
     | 
    
         
             
            });
         
     | 
| 
       1509 
     | 
    
         
            -
            /* ***** BEGIN LICENSE BLOCK *****
         
     | 
| 
       1510 
     | 
    
         
            -
             * Version: MPL 1.1/GPL 2.0/LGPL 2.1
         
     | 
| 
       1511 
     | 
    
         
            -
             *
         
     | 
| 
       1512 
     | 
    
         
            -
             * The contents of this file are subject to the Mozilla Public License Version
         
     | 
| 
       1513 
     | 
    
         
            -
             * 1.1 (the "License"); you may not use this file except in compliance with
         
     | 
| 
       1514 
     | 
    
         
            -
             * the License. You may obtain a copy of the License at
         
     | 
| 
       1515 
     | 
    
         
            -
             * http://www.mozilla.org/MPL/
         
     | 
| 
       1516 
     | 
    
         
            -
             *
         
     | 
| 
       1517 
     | 
    
         
            -
             * Software distributed under the License is distributed on an "AS IS" basis,
         
     | 
| 
       1518 
     | 
    
         
            -
             * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
         
     | 
| 
       1519 
     | 
    
         
            -
             * for the specific language governing rights and limitations under the
         
     | 
| 
       1520 
     | 
    
         
            -
             * License.
         
     | 
| 
       1521 
     | 
    
         
            -
             *
         
     | 
| 
       1522 
     | 
    
         
            -
             * The Original Code is Ajax.org Code Editor (ACE).
         
     | 
| 
       1523 
     | 
    
         
            -
             *
         
     | 
| 
       1524 
     | 
    
         
            -
             * The Initial Developer of the Original Code is
         
     | 
| 
       1525 
     | 
    
         
            -
             * Ajax.org B.V.
         
     | 
| 
       1526 
     | 
    
         
            -
             * Portions created by the Initial Developer are Copyright (C) 2010
         
     | 
| 
       1527 
     | 
    
         
            -
             * the Initial Developer. All Rights Reserved.
         
     | 
| 
       1528 
     | 
    
         
            -
             *
         
     | 
| 
       1529 
     | 
    
         
            -
             * Contributor(s):
         
     | 
| 
       1530 
     | 
    
         
            -
             *      Fabian Jakobs <fabian AT ajax DOT org>
         
     | 
| 
       1531 
     | 
    
         
            -
             *
         
     | 
| 
       1532 
     | 
    
         
            -
             * Alternatively, the contents of this file may be used under the terms of
         
     | 
| 
       1533 
     | 
    
         
            -
             * either the GNU General Public License Version 2 or later (the "GPL"), or
         
     | 
| 
       1534 
     | 
    
         
            -
             * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
         
     | 
| 
       1535 
     | 
    
         
            -
             * in which case the provisions of the GPL or the LGPL are applicable instead
         
     | 
| 
       1536 
     | 
    
         
            -
             * of those above. If you wish to allow use of your version of this file only
         
     | 
| 
       1537 
     | 
    
         
            -
             * under the terms of either the GPL or the LGPL, and not to allow others to
         
     | 
| 
       1538 
     | 
    
         
            -
             * use your version of this file under the terms of the MPL, indicate your
         
     | 
| 
       1539 
     | 
    
         
            -
             * decision by deleting the provisions above and replace them with the notice
         
     | 
| 
       1540 
     | 
    
         
            -
             * and other provisions required by the GPL or the LGPL. If you do not delete
         
     | 
| 
       1541 
     | 
    
         
            -
             * the provisions above, a recipient may use your version of this file under
         
     | 
| 
       1542 
     | 
    
         
            -
             * the terms of any one of the MPL, the GPL or the LGPL.
         
     | 
| 
       1543 
     | 
    
         
            -
             *
         
     | 
| 
       1544 
     | 
    
         
            -
             * ***** END LICENSE BLOCK ***** */
         
     | 
| 
       1545 
1411 
     | 
    
         | 
| 
       1546 
1412 
     | 
    
         
             
            define('ace/mode/json_worker', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/worker/mirror', 'ace/mode/json/json_parse'], function(require, exports, module) {
         
     | 
| 
       1547 
     | 
    
         
            -
             
     | 
| 
      
 1413 
     | 
    
         
            +
             
     | 
| 
       1548 
1414 
     | 
    
         | 
| 
       1549 
1415 
     | 
    
         
             
            var oop = require("../lib/oop");
         
     | 
| 
       1550 
1416 
     | 
    
         
             
            var Mirror = require("../worker/mirror").Mirror;
         
     | 
| 
         @@ -1610,7 +1476,7 @@ oop.inherits(JsonWorker, Mirror); 
     | 
|
| 
       1610 
1476 
     | 
    
         | 
| 
       1611 
1477 
     | 
    
         
             
            });
         
     | 
| 
       1612 
1478 
     | 
    
         
             
            define('ace/worker/mirror', ['require', 'exports', 'module' , 'ace/document', 'ace/lib/lang'], function(require, exports, module) {
         
     | 
| 
       1613 
     | 
    
         
            -
             
     | 
| 
      
 1479 
     | 
    
         
            +
             
     | 
| 
       1614 
1480 
     | 
    
         | 
| 
       1615 
1481 
     | 
    
         
             
            var Document = require("../document").Document;
         
     | 
| 
       1616 
1482 
     | 
    
         
             
            var lang = require("../lib/lang");
         
     | 
| 
         @@ -1652,59 +1518,15 @@ var Mirror = exports.Mirror = function(sender) { 
     | 
|
| 
       1652 
1518 
     | 
    
         
             
            }).call(Mirror.prototype);
         
     | 
| 
       1653 
1519 
     | 
    
         | 
| 
       1654 
1520 
     | 
    
         
             
            });
         
     | 
| 
       1655 
     | 
    
         
            -
            /* ***** BEGIN LICENSE BLOCK *****
         
     | 
| 
       1656 
     | 
    
         
            -
             * Version: MPL 1.1/GPL 2.0/LGPL 2.1
         
     | 
| 
       1657 
     | 
    
         
            -
             *
         
     | 
| 
       1658 
     | 
    
         
            -
             * The contents of this file are subject to the Mozilla Public License Version
         
     | 
| 
       1659 
     | 
    
         
            -
             * 1.1 (the "License"); you may not use this file except in compliance with
         
     | 
| 
       1660 
     | 
    
         
            -
             * the License. You may obtain a copy of the License at
         
     | 
| 
       1661 
     | 
    
         
            -
             * http://www.mozilla.org/MPL/
         
     | 
| 
       1662 
     | 
    
         
            -
             *
         
     | 
| 
       1663 
     | 
    
         
            -
             * Software distributed under the License is distributed on an "AS IS" basis,
         
     | 
| 
       1664 
     | 
    
         
            -
             * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
         
     | 
| 
       1665 
     | 
    
         
            -
             * for the specific language governing rights and limitations under the
         
     | 
| 
       1666 
     | 
    
         
            -
             * License.
         
     | 
| 
       1667 
     | 
    
         
            -
             *
         
     | 
| 
       1668 
     | 
    
         
            -
             * The Original Code is Ajax.org Code Editor (ACE).
         
     | 
| 
       1669 
     | 
    
         
            -
             *
         
     | 
| 
       1670 
     | 
    
         
            -
             * The Initial Developer of the Original Code is
         
     | 
| 
       1671 
     | 
    
         
            -
             * Ajax.org B.V.
         
     | 
| 
       1672 
     | 
    
         
            -
             * Portions created by the Initial Developer are Copyright (C) 2010
         
     | 
| 
       1673 
     | 
    
         
            -
             * the Initial Developer. All Rights Reserved.
         
     | 
| 
       1674 
     | 
    
         
            -
             *
         
     | 
| 
       1675 
     | 
    
         
            -
             * Contributor(s):
         
     | 
| 
       1676 
     | 
    
         
            -
             *      Fabian Jakobs <fabian AT ajax DOT org>
         
     | 
| 
       1677 
     | 
    
         
            -
             *
         
     | 
| 
       1678 
     | 
    
         
            -
             * Alternatively, the contents of this file may be used under the terms of
         
     | 
| 
       1679 
     | 
    
         
            -
             * either the GNU General Public License Version 2 or later (the "GPL"), or
         
     | 
| 
       1680 
     | 
    
         
            -
             * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
         
     | 
| 
       1681 
     | 
    
         
            -
             * in which case the provisions of the GPL or the LGPL are applicable instead
         
     | 
| 
       1682 
     | 
    
         
            -
             * of those above. If you wish to allow use of your version of this file only
         
     | 
| 
       1683 
     | 
    
         
            -
             * under the terms of either the GPL or the LGPL, and not to allow others to
         
     | 
| 
       1684 
     | 
    
         
            -
             * use your version of this file under the terms of the MPL, indicate your
         
     | 
| 
       1685 
     | 
    
         
            -
             * decision by deleting the provisions above and replace them with the notice
         
     | 
| 
       1686 
     | 
    
         
            -
             * and other provisions required by the GPL or the LGPL. If you do not delete
         
     | 
| 
       1687 
     | 
    
         
            -
             * the provisions above, a recipient may use your version of this file under
         
     | 
| 
       1688 
     | 
    
         
            -
             * the terms of any one of the MPL, the GPL or the LGPL.
         
     | 
| 
       1689 
     | 
    
         
            -
             *
         
     | 
| 
       1690 
     | 
    
         
            -
             * ***** END LICENSE BLOCK ***** */
         
     | 
| 
       1691 
1521 
     | 
    
         | 
| 
       1692 
1522 
     | 
    
         
             
            define('ace/document', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter', 'ace/range', 'ace/anchor'], function(require, exports, module) {
         
     | 
| 
       1693 
     | 
    
         
            -
             
     | 
| 
      
 1523 
     | 
    
         
            +
             
     | 
| 
       1694 
1524 
     | 
    
         | 
| 
       1695 
1525 
     | 
    
         
             
            var oop = require("./lib/oop");
         
     | 
| 
       1696 
1526 
     | 
    
         
             
            var EventEmitter = require("./lib/event_emitter").EventEmitter;
         
     | 
| 
       1697 
1527 
     | 
    
         
             
            var Range = require("./range").Range;
         
     | 
| 
       1698 
1528 
     | 
    
         
             
            var Anchor = require("./anchor").Anchor;
         
     | 
| 
       1699 
1529 
     | 
    
         | 
| 
       1700 
     | 
    
         
            -
            /**
         
     | 
| 
       1701 
     | 
    
         
            -
             * class Document
         
     | 
| 
       1702 
     | 
    
         
            -
             *
         
     | 
| 
       1703 
     | 
    
         
            -
             * Contains the text of the document. Documents are controlled by a single [[EditSession `EditSession`]]. At its core, `Document`s are just an array of strings, with each row in the document matching up to the array index.
         
     | 
| 
       1704 
     | 
    
         
            -
             *
         
     | 
| 
       1705 
     | 
    
         
            -
             *
         
     | 
| 
       1706 
     | 
    
         
            -
             **/
         
     | 
| 
       1707 
     | 
    
         
            -
             
     | 
| 
       1708 
1530 
     | 
    
         
             
             /**
         
     | 
| 
       1709 
1531 
     | 
    
         
             
             * new Document([text])
         
     | 
| 
       1710 
1532 
     | 
    
         
             
             * - text (String | Array): The starting text
         
     | 
| 
         @@ -1712,16 +1534,16 @@ var Anchor = require("./anchor").Anchor; 
     | 
|
| 
       1712 
1534 
     | 
    
         
             
             * Creates a new `Document`. If `text` is included, the `Document` contains those strings; otherwise, it's empty.
         
     | 
| 
       1713 
1535 
     | 
    
         
             
             *
         
     | 
| 
       1714 
1536 
     | 
    
         
             
             **/
         
     | 
| 
      
 1537 
     | 
    
         
            +
             
     | 
| 
       1715 
1538 
     | 
    
         
             
            var Document = function(text) {
         
     | 
| 
       1716 
1539 
     | 
    
         
             
                this.$lines = [];
         
     | 
| 
       1717 
1540 
     | 
    
         | 
| 
       1718 
     | 
    
         
            -
                if (Array.isArray(text)) {
         
     | 
| 
       1719 
     | 
    
         
            -
                    this.insertLines(0, text);
         
     | 
| 
       1720 
     | 
    
         
            -
                }
         
     | 
| 
       1721 
1541 
     | 
    
         
             
                // There has to be one line at least in the document. If you pass an empty
         
     | 
| 
       1722 
1542 
     | 
    
         
             
                // string to the insert function, nothing will happen. Workaround.
         
     | 
| 
       1723 
     | 
    
         
            -
                 
     | 
| 
      
 1543 
     | 
    
         
            +
                if (text.length == 0) {
         
     | 
| 
       1724 
1544 
     | 
    
         
             
                    this.$lines = [""];
         
     | 
| 
      
 1545 
     | 
    
         
            +
                } else if (Array.isArray(text)) {
         
     | 
| 
      
 1546 
     | 
    
         
            +
                    this.insertLines(0, text);
         
     | 
| 
       1725 
1547 
     | 
    
         
             
                } else {
         
     | 
| 
       1726 
1548 
     | 
    
         
             
                    this.insert({row: 0, column:0}, text);
         
     | 
| 
       1727 
1549 
     | 
    
         
             
                }
         
     | 
| 
         @@ -1730,49 +1552,18 @@ var Document = function(text) { 
     | 
|
| 
       1730 
1552 
     | 
    
         
             
            (function() {
         
     | 
| 
       1731 
1553 
     | 
    
         | 
| 
       1732 
1554 
     | 
    
         
             
                oop.implement(this, EventEmitter);
         
     | 
| 
       1733 
     | 
    
         
            -
             
     | 
| 
       1734 
     | 
    
         
            -
                /**
         
     | 
| 
       1735 
     | 
    
         
            -
                * Document.setValue(text) -> Void
         
     | 
| 
       1736 
     | 
    
         
            -
                * - text (String): The text to use
         
     | 
| 
       1737 
     | 
    
         
            -
                *
         
     | 
| 
       1738 
     | 
    
         
            -
                * Replaces all the lines in the current `Document` with the value of `text`.
         
     | 
| 
       1739 
     | 
    
         
            -
                **/
         
     | 
| 
       1740 
1555 
     | 
    
         
             
                this.setValue = function(text) {
         
     | 
| 
       1741 
1556 
     | 
    
         
             
                    var len = this.getLength();
         
     | 
| 
       1742 
1557 
     | 
    
         
             
                    this.remove(new Range(0, 0, len, this.getLine(len-1).length));
         
     | 
| 
       1743 
1558 
     | 
    
         
             
                    this.insert({row: 0, column:0}, text);
         
     | 
| 
       1744 
1559 
     | 
    
         
             
                };
         
     | 
| 
       1745 
     | 
    
         
            -
             
     | 
| 
       1746 
     | 
    
         
            -
                /**
         
     | 
| 
       1747 
     | 
    
         
            -
                * Document.getValue() -> String
         
     | 
| 
       1748 
     | 
    
         
            -
                * 
         
     | 
| 
       1749 
     | 
    
         
            -
                * Returns all the lines in the document as a single string, split by the new line character.
         
     | 
| 
       1750 
     | 
    
         
            -
                **/
         
     | 
| 
       1751 
1560 
     | 
    
         
             
                this.getValue = function() {
         
     | 
| 
       1752 
1561 
     | 
    
         
             
                    return this.getAllLines().join(this.getNewLineCharacter());
         
     | 
| 
       1753 
1562 
     | 
    
         
             
                };
         
     | 
| 
       1754 
     | 
    
         
            -
             
     | 
| 
       1755 
     | 
    
         
            -
                /** 
         
     | 
| 
       1756 
     | 
    
         
            -
                * Document.createAnchor(row, column) -> Anchor
         
     | 
| 
       1757 
     | 
    
         
            -
                * - row (Number): The row number to use
         
     | 
| 
       1758 
     | 
    
         
            -
                * - column (Number): The column number to use
         
     | 
| 
       1759 
     | 
    
         
            -
                *
         
     | 
| 
       1760 
     | 
    
         
            -
                * Creates a new `Anchor` to define a floating point in the document.
         
     | 
| 
       1761 
     | 
    
         
            -
                **/
         
     | 
| 
       1762 
1563 
     | 
    
         
             
                this.createAnchor = function(row, column) {
         
     | 
| 
       1763 
1564 
     | 
    
         
             
                    return new Anchor(this, row, column);
         
     | 
| 
       1764 
1565 
     | 
    
         
             
                };
         
     | 
| 
       1765 
1566 
     | 
    
         | 
| 
       1766 
     | 
    
         
            -
                /** internal, hide
         
     | 
| 
       1767 
     | 
    
         
            -
                * Document.$split(text) -> [String]
         
     | 
| 
       1768 
     | 
    
         
            -
                * - text (String): The text to work with
         
     | 
| 
       1769 
     | 
    
         
            -
                * + ([String]): A String array, with each index containing a piece of the original `text` string.
         
     | 
| 
       1770 
     | 
    
         
            -
                * 
         
     | 
| 
       1771 
     | 
    
         
            -
                * Splits a string of text on any newline (`\n`) or carriage-return ('\r') characters.
         
     | 
| 
       1772 
     | 
    
         
            -
                *
         
     | 
| 
       1773 
     | 
    
         
            -
                *
         
     | 
| 
       1774 
     | 
    
         
            -
                **/
         
     | 
| 
       1775 
     | 
    
         
            -
             
     | 
| 
       1776 
1567 
     | 
    
         
             
                // check for IE split bug
         
     | 
| 
       1777 
1568 
     | 
    
         
             
                if ("aaa".split(/a/).length == 0)
         
     | 
| 
       1778 
1569 
     | 
    
         
             
                    this.$split = function(text) {
         
     | 
| 
         @@ -1782,13 +1573,6 @@ var Document = function(text) { 
     | 
|
| 
       1782 
1573 
     | 
    
         
             
                    this.$split = function(text) {
         
     | 
| 
       1783 
1574 
     | 
    
         
             
                        return text.split(/\r\n|\r|\n/);
         
     | 
| 
       1784 
1575 
     | 
    
         
             
                    };
         
     | 
| 
       1785 
     | 
    
         
            -
             
     | 
| 
       1786 
     | 
    
         
            -
             
     | 
| 
       1787 
     | 
    
         
            -
                /** internal, hide
         
     | 
| 
       1788 
     | 
    
         
            -
                * Document.$detectNewLine(text) -> Void
         
     | 
| 
       1789 
     | 
    
         
            -
                * 
         
     | 
| 
       1790 
     | 
    
         
            -
                * 
         
     | 
| 
       1791 
     | 
    
         
            -
                **/
         
     | 
| 
       1792 
1576 
     | 
    
         
             
                this.$detectNewLine = function(text) {
         
     | 
| 
       1793 
1577 
     | 
    
         
             
                    var match = text.match(/^.*?(\r\n|\r|\n)/m);
         
     | 
| 
       1794 
1578 
     | 
    
         
             
                    if (match) {
         
     | 
| 
         @@ -1797,18 +1581,6 @@ var Document = function(text) { 
     | 
|
| 
       1797 
1581 
     | 
    
         
             
                        this.$autoNewLine = "\n";
         
     | 
| 
       1798 
1582 
     | 
    
         
             
                    }
         
     | 
| 
       1799 
1583 
     | 
    
         
             
                };
         
     | 
| 
       1800 
     | 
    
         
            -
             
     | 
| 
       1801 
     | 
    
         
            -
                /**
         
     | 
| 
       1802 
     | 
    
         
            -
                * Document.getNewLineCharacter() -> String
         
     | 
| 
       1803 
     | 
    
         
            -
                * + (String): If `newLineMode == windows`, `\r\n` is returned.<br/>
         
     | 
| 
       1804 
     | 
    
         
            -
                *  If `newLineMode == unix`, `\n` is returned.<br/>
         
     | 
| 
       1805 
     | 
    
         
            -
                *  If `newLineMode == auto`, the value of `autoNewLine` is returned.
         
     | 
| 
       1806 
     | 
    
         
            -
                * 
         
     | 
| 
       1807 
     | 
    
         
            -
                * Returns the newline character that's being used, depending on the value of `newLineMode`. 
         
     | 
| 
       1808 
     | 
    
         
            -
                *
         
     | 
| 
       1809 
     | 
    
         
            -
                * 
         
     | 
| 
       1810 
     | 
    
         
            -
                * 
         
     | 
| 
       1811 
     | 
    
         
            -
                **/
         
     | 
| 
       1812 
1584 
     | 
    
         
             
                this.getNewLineCharacter = function() {
         
     | 
| 
       1813 
1585 
     | 
    
         
             
                  switch (this.$newLineMode) {
         
     | 
| 
       1814 
1586 
     | 
    
         
             
                      case "windows":
         
     | 
| 
         @@ -1824,87 +1596,30 @@ var Document = function(text) { 
     | 
|
| 
       1824 
1596 
     | 
    
         | 
| 
       1825 
1597 
     | 
    
         
             
                this.$autoNewLine = "\n";
         
     | 
| 
       1826 
1598 
     | 
    
         
             
                this.$newLineMode = "auto";
         
     | 
| 
       1827 
     | 
    
         
            -
                /**
         
     | 
| 
       1828 
     | 
    
         
            -
                 * Document.setNewLineMode(newLineMode) -> Void
         
     | 
| 
       1829 
     | 
    
         
            -
                 * - newLineMode(String): [The newline mode to use; can be either `windows`, `unix`, or `auto`]{: #Document.setNewLineMode.param}
         
     | 
| 
       1830 
     | 
    
         
            -
                 * 
         
     | 
| 
       1831 
     | 
    
         
            -
                 * [Sets the new line mode.]{: #Document.setNewLineMode.desc}
         
     | 
| 
       1832 
     | 
    
         
            -
                 **/
         
     | 
| 
       1833 
1599 
     | 
    
         
             
                this.setNewLineMode = function(newLineMode) {
         
     | 
| 
       1834 
1600 
     | 
    
         
             
                    if (this.$newLineMode === newLineMode)
         
     | 
| 
       1835 
1601 
     | 
    
         
             
                        return;
         
     | 
| 
       1836 
1602 
     | 
    
         | 
| 
       1837 
1603 
     | 
    
         
             
                    this.$newLineMode = newLineMode;
         
     | 
| 
       1838 
1604 
     | 
    
         
             
                };
         
     | 
| 
       1839 
     | 
    
         
            -
             
     | 
| 
       1840 
     | 
    
         
            -
                /**
         
     | 
| 
       1841 
     | 
    
         
            -
                * Document.getNewLineMode() -> String
         
     | 
| 
       1842 
     | 
    
         
            -
                * 
         
     | 
| 
       1843 
     | 
    
         
            -
                * [Returns the type of newlines being used; either `windows`, `unix`, or `auto`]{: #Document.getNewLineMode}
         
     | 
| 
       1844 
     | 
    
         
            -
                *
         
     | 
| 
       1845 
     | 
    
         
            -
                **/
         
     | 
| 
       1846 
1605 
     | 
    
         
             
                this.getNewLineMode = function() {
         
     | 
| 
       1847 
1606 
     | 
    
         
             
                    return this.$newLineMode;
         
     | 
| 
       1848 
1607 
     | 
    
         
             
                };
         
     | 
| 
       1849 
     | 
    
         
            -
             
     | 
| 
       1850 
     | 
    
         
            -
                /**
         
     | 
| 
       1851 
     | 
    
         
            -
                * Document.isNewLine(text) -> Boolean
         
     | 
| 
       1852 
     | 
    
         
            -
                * - text (String): The text to check
         
     | 
| 
       1853 
     | 
    
         
            -
                *
         
     | 
| 
       1854 
     | 
    
         
            -
                * Returns `true` if `text` is a newline character (either `\r\n`, `\r`, or `\n`).
         
     | 
| 
       1855 
     | 
    
         
            -
                *
         
     | 
| 
       1856 
     | 
    
         
            -
                **/
         
     | 
| 
       1857 
1608 
     | 
    
         
             
                this.isNewLine = function(text) {
         
     | 
| 
       1858 
1609 
     | 
    
         
             
                    return (text == "\r\n" || text == "\r" || text == "\n");
         
     | 
| 
       1859 
1610 
     | 
    
         
             
                };
         
     | 
| 
       1860 
     | 
    
         
            -
             
     | 
| 
       1861 
     | 
    
         
            -
                /**
         
     | 
| 
       1862 
     | 
    
         
            -
                * Document.getLine(row) -> String
         
     | 
| 
       1863 
     | 
    
         
            -
                * - row (Number): The row index to retrieve
         
     | 
| 
       1864 
     | 
    
         
            -
                * 
         
     | 
| 
       1865 
     | 
    
         
            -
                * Returns a verbatim copy of the given line as it is in the document
         
     | 
| 
       1866 
     | 
    
         
            -
                *
         
     | 
| 
       1867 
     | 
    
         
            -
                **/
         
     | 
| 
       1868 
1611 
     | 
    
         
             
                this.getLine = function(row) {
         
     | 
| 
       1869 
1612 
     | 
    
         
             
                    return this.$lines[row] || "";
         
     | 
| 
       1870 
1613 
     | 
    
         
             
                };
         
     | 
| 
       1871 
     | 
    
         
            -
             
     | 
| 
       1872 
     | 
    
         
            -
                /**
         
     | 
| 
       1873 
     | 
    
         
            -
                * Document.getLines(firstRow, lastRow) -> [String]
         
     | 
| 
       1874 
     | 
    
         
            -
                * - firstRow (Number): The first row index to retrieve
         
     | 
| 
       1875 
     | 
    
         
            -
                * - lastRow (Number): The final row index to retrieve
         
     | 
| 
       1876 
     | 
    
         
            -
                * 
         
     | 
| 
       1877 
     | 
    
         
            -
                * Returns an array of strings of the rows between `firstRow` and `lastRow`. This function is inclusive of `lastRow`.
         
     | 
| 
       1878 
     | 
    
         
            -
                *
         
     | 
| 
       1879 
     | 
    
         
            -
                **/
         
     | 
| 
       1880 
1614 
     | 
    
         
             
                this.getLines = function(firstRow, lastRow) {
         
     | 
| 
       1881 
1615 
     | 
    
         
             
                    return this.$lines.slice(firstRow, lastRow + 1);
         
     | 
| 
       1882 
1616 
     | 
    
         
             
                };
         
     | 
| 
       1883 
     | 
    
         
            -
             
     | 
| 
       1884 
     | 
    
         
            -
                /**
         
     | 
| 
       1885 
     | 
    
         
            -
                * Document.getAllLines() -> [String]
         
     | 
| 
       1886 
     | 
    
         
            -
                * 
         
     | 
| 
       1887 
     | 
    
         
            -
                * Returns all lines in the document as string array. Warning: The caller should not modify this array!
         
     | 
| 
       1888 
     | 
    
         
            -
                **/
         
     | 
| 
       1889 
1617 
     | 
    
         
             
                this.getAllLines = function() {
         
     | 
| 
       1890 
1618 
     | 
    
         
             
                    return this.getLines(0, this.getLength());
         
     | 
| 
       1891 
1619 
     | 
    
         
             
                };
         
     | 
| 
       1892 
     | 
    
         
            -
             
     | 
| 
       1893 
     | 
    
         
            -
                /**
         
     | 
| 
       1894 
     | 
    
         
            -
                * Document.getLength() -> Number
         
     | 
| 
       1895 
     | 
    
         
            -
                * 
         
     | 
| 
       1896 
     | 
    
         
            -
                * Returns the number of rows in the document.
         
     | 
| 
       1897 
     | 
    
         
            -
                **/
         
     | 
| 
       1898 
1620 
     | 
    
         
             
                this.getLength = function() {
         
     | 
| 
       1899 
1621 
     | 
    
         
             
                    return this.$lines.length;
         
     | 
| 
       1900 
1622 
     | 
    
         
             
                };
         
     | 
| 
       1901 
     | 
    
         
            -
             
     | 
| 
       1902 
     | 
    
         
            -
                /**
         
     | 
| 
       1903 
     | 
    
         
            -
                * Document.getTextRange(range) -> String
         
     | 
| 
       1904 
     | 
    
         
            -
                * - range (Range): The range to work with
         
     | 
| 
       1905 
     | 
    
         
            -
                * 
         
     | 
| 
       1906 
     | 
    
         
            -
                * [Given a range within the document, this function returns all the text within that range as a single string.]{: #Document.getTextRange.desc}
         
     | 
| 
       1907 
     | 
    
         
            -
                **/
         
     | 
| 
       1908 
1623 
     | 
    
         
             
                this.getTextRange = function(range) {
         
     | 
| 
       1909 
1624 
     | 
    
         
             
                    if (range.start.row == range.end.row) {
         
     | 
| 
       1910 
1625 
     | 
    
         
             
                        return this.$lines[range.start.row].substring(range.start.column,
         
     | 
| 
         @@ -1917,12 +1632,6 @@ var Document = function(text) { 
     | 
|
| 
       1917 
1632 
     | 
    
         
             
                        return lines.join(this.getNewLineCharacter());
         
     | 
| 
       1918 
1633 
     | 
    
         
             
                    }
         
     | 
| 
       1919 
1634 
     | 
    
         
             
                };
         
     | 
| 
       1920 
     | 
    
         
            -
             
     | 
| 
       1921 
     | 
    
         
            -
                /** internal, hide
         
     | 
| 
       1922 
     | 
    
         
            -
                * Document.$clipPosition(position) -> Number
         
     | 
| 
       1923 
     | 
    
         
            -
                * 
         
     | 
| 
       1924 
     | 
    
         
            -
                * 
         
     | 
| 
       1925 
     | 
    
         
            -
                **/
         
     | 
| 
       1926 
1635 
     | 
    
         
             
                this.$clipPosition = function(position) {
         
     | 
| 
       1927 
1636 
     | 
    
         
             
                    var length = this.getLength();
         
     | 
| 
       1928 
1637 
     | 
    
         
             
                    if (position.row >= length) {
         
     | 
| 
         @@ -1931,16 +1640,6 @@ var Document = function(text) { 
     | 
|
| 
       1931 
1640 
     | 
    
         
             
                    }
         
     | 
| 
       1932 
1641 
     | 
    
         
             
                    return position;
         
     | 
| 
       1933 
1642 
     | 
    
         
             
                };
         
     | 
| 
       1934 
     | 
    
         
            -
             
     | 
| 
       1935 
     | 
    
         
            -
                /**
         
     | 
| 
       1936 
     | 
    
         
            -
                * Document.insert(position, text) -> Number
         
     | 
| 
       1937 
     | 
    
         
            -
                * - position (Number): The position to start inserting at 
         
     | 
| 
       1938 
     | 
    
         
            -
                * - text (String): A chunk of text to insert
         
     | 
| 
       1939 
     | 
    
         
            -
                * + (Number): The position of the last line of `text`. If the length of `text` is 0, this function simply returns `position`. 
         
     | 
| 
       1940 
     | 
    
         
            -
                * Inserts a block of `text` and the indicated `position`.
         
     | 
| 
       1941 
     | 
    
         
            -
                *
         
     | 
| 
       1942 
     | 
    
         
            -
                * 
         
     | 
| 
       1943 
     | 
    
         
            -
                **/
         
     | 
| 
       1944 
1643 
     | 
    
         
             
                this.insert = function(position, text) {
         
     | 
| 
       1945 
1644 
     | 
    
         
             
                    if (!text || text.length === 0)
         
     | 
| 
       1946 
1645 
     | 
    
         
             
                        return position;
         
     | 
| 
         @@ -1963,24 +1662,40 @@ var Document = function(text) { 
     | 
|
| 
       1963 
1662 
     | 
    
         
             
                    }
         
     | 
| 
       1964 
1663 
     | 
    
         
             
                    return position;
         
     | 
| 
       1965 
1664 
     | 
    
         
             
                };
         
     | 
| 
       1966 
     | 
    
         
            -
             
     | 
| 
       1967 
1665 
     | 
    
         
             
                /**
         
     | 
| 
       1968 
     | 
    
         
            -
             
     | 
| 
       1969 
     | 
    
         
            -
             
     | 
| 
       1970 
     | 
    
         
            -
             
     | 
| 
       1971 
     | 
    
         
            -
             
     | 
| 
       1972 
     | 
    
         
            -
             
     | 
| 
       1973 
     | 
    
         
            -
             
     | 
| 
       1974 
     | 
    
         
            -
             
     | 
| 
       1975 
     | 
    
         
            -
             
     | 
| 
       1976 
     | 
    
         
            -
                *  
     | 
| 
       1977 
     | 
    
         
            -
                *
         
     | 
| 
       1978 
     | 
    
         
            -
             
     | 
| 
       1979 
     | 
    
         
            -
                 
     | 
| 
      
 1666 
     | 
    
         
            +
                 * Document@change(e)
         
     | 
| 
      
 1667 
     | 
    
         
            +
                 * - e (Object): Contains at least one property called `"action"`. `"action"` indicates the action that triggered the change. Each action also has a set of additional properties.
         
     | 
| 
      
 1668 
     | 
    
         
            +
                 *
         
     | 
| 
      
 1669 
     | 
    
         
            +
                 * Fires whenever the document changes.
         
     | 
| 
      
 1670 
     | 
    
         
            +
                 *
         
     | 
| 
      
 1671 
     | 
    
         
            +
                 * Several methods trigger different `"change"` events. Below is a list of each action type, followed by each property that's also available:
         
     | 
| 
      
 1672 
     | 
    
         
            +
                 *
         
     | 
| 
      
 1673 
     | 
    
         
            +
                 *  * `"insertLines"` (emitted by [[Document.insertLines]])
         
     | 
| 
      
 1674 
     | 
    
         
            +
                 *    * `range`: the [[Range]] of the change within the document
         
     | 
| 
      
 1675 
     | 
    
         
            +
                 *    * `lines`: the lines in the document that are changing
         
     | 
| 
      
 1676 
     | 
    
         
            +
                 *  * `"insertText"` (emitted by [[Document.insertNewLine]])
         
     | 
| 
      
 1677 
     | 
    
         
            +
                 *    * `range`: the [[Range]] of the change within the document
         
     | 
| 
      
 1678 
     | 
    
         
            +
                 *    * `text`: the text that's being added
         
     | 
| 
      
 1679 
     | 
    
         
            +
                 *  * `"removeLines"` (emitted by [[Document.insertLines]])
         
     | 
| 
      
 1680 
     | 
    
         
            +
                 *    * `range`: the [[Range]] of the change within the document
         
     | 
| 
      
 1681 
     | 
    
         
            +
                 *    * `lines`: the lines in the document that were removed
         
     | 
| 
      
 1682 
     | 
    
         
            +
                 *    * `nl`: the new line character (as defined by [[Document.getNewLineCharacter]])
         
     | 
| 
      
 1683 
     | 
    
         
            +
                 *  * `"removeText"` (emitted by [[Document.removeInLine]] and [[Document.removeNewLine]])
         
     | 
| 
      
 1684 
     | 
    
         
            +
                 *    * `range`: the [[Range]] of the change within the document
         
     | 
| 
      
 1685 
     | 
    
         
            +
                 *    * `text`: the text that's being removed
         
     | 
| 
      
 1686 
     | 
    
         
            +
                 *
         
     | 
| 
      
 1687 
     | 
    
         
            +
                 **/
         
     | 
| 
       1980 
1688 
     | 
    
         
             
                this.insertLines = function(row, lines) {
         
     | 
| 
       1981 
1689 
     | 
    
         
             
                    if (lines.length == 0)
         
     | 
| 
       1982 
1690 
     | 
    
         
             
                        return {row: row, column: 0};
         
     | 
| 
       1983 
1691 
     | 
    
         | 
| 
      
 1692 
     | 
    
         
            +
                    // apply doesn't work for big arrays (smallest threshold is on safari 0xFFFF)
         
     | 
| 
      
 1693 
     | 
    
         
            +
                    // to circumvent that we have to break huge inserts into smaller chunks here
         
     | 
| 
      
 1694 
     | 
    
         
            +
                    if (lines.length > 0xFFFF) {
         
     | 
| 
      
 1695 
     | 
    
         
            +
                        var end = this.insertLines(row, lines.slice(0xFFFF));
         
     | 
| 
      
 1696 
     | 
    
         
            +
                        lines = lines.slice(0, 0xFFFF);
         
     | 
| 
      
 1697 
     | 
    
         
            +
                    }
         
     | 
| 
      
 1698 
     | 
    
         
            +
             
     | 
| 
       1984 
1699 
     | 
    
         
             
                    var args = [row, 0];
         
     | 
| 
       1985 
1700 
     | 
    
         
             
                    args.push.apply(args, lines);
         
     | 
| 
       1986 
1701 
     | 
    
         
             
                    this.$lines.splice.apply(this.$lines, args);
         
     | 
| 
         @@ -1992,20 +1707,8 @@ var Document = function(text) { 
     | 
|
| 
       1992 
1707 
     | 
    
         
             
                        lines: lines
         
     | 
| 
       1993 
1708 
     | 
    
         
             
                    };
         
     | 
| 
       1994 
1709 
     | 
    
         
             
                    this._emit("change", { data: delta });
         
     | 
| 
       1995 
     | 
    
         
            -
                    return range.end;
         
     | 
| 
      
 1710 
     | 
    
         
            +
                    return end || range.end;
         
     | 
| 
       1996 
1711 
     | 
    
         
             
                };
         
     | 
| 
       1997 
     | 
    
         
            -
             
     | 
| 
       1998 
     | 
    
         
            -
                /**
         
     | 
| 
       1999 
     | 
    
         
            -
                * Document.insertNewLine(position) -> Object
         
     | 
| 
       2000 
     | 
    
         
            -
                * - position (String): The position to insert at
         
     | 
| 
       2001 
     | 
    
         
            -
                * + (Object): Returns an object containing the final row and column, like this:<br/>
         
     | 
| 
       2002 
     | 
    
         
            -
                *    ```{row: endRow, column: 0}```
         
     | 
| 
       2003 
     | 
    
         
            -
                * 
         
     | 
| 
       2004 
     | 
    
         
            -
                * Inserts a new line into the document at the current row's `position`. This method also triggers the `'change'` event. 
         
     | 
| 
       2005 
     | 
    
         
            -
                *
         
     | 
| 
       2006 
     | 
    
         
            -
                *   
         
     | 
| 
       2007 
     | 
    
         
            -
                *
         
     | 
| 
       2008 
     | 
    
         
            -
                **/
         
     | 
| 
       2009 
1712 
     | 
    
         
             
                this.insertNewLine = function(position) {
         
     | 
| 
       2010 
1713 
     | 
    
         
             
                    position = this.$clipPosition(position);
         
     | 
| 
       2011 
1714 
     | 
    
         
             
                    var line = this.$lines[position.row] || "";
         
     | 
| 
         @@ -2027,20 +1730,6 @@ var Document = function(text) { 
     | 
|
| 
       2027 
1730 
     | 
    
         | 
| 
       2028 
1731 
     | 
    
         
             
                    return end;
         
     | 
| 
       2029 
1732 
     | 
    
         
             
                };
         
     | 
| 
       2030 
     | 
    
         
            -
             
     | 
| 
       2031 
     | 
    
         
            -
                /**
         
     | 
| 
       2032 
     | 
    
         
            -
                * Document.insertInLine(position, text) -> Object | Number
         
     | 
| 
       2033 
     | 
    
         
            -
                * - position (Number): The position to insert at
         
     | 
| 
       2034 
     | 
    
         
            -
                * - text (String): A chunk of text
         
     | 
| 
       2035 
     | 
    
         
            -
                * + (Object): Returns an object containing the final row and column, like this:<br/>
         
     | 
| 
       2036 
     | 
    
         
            -
                *     ```{row: endRow, column: 0}```
         
     | 
| 
       2037 
     | 
    
         
            -
                * + (Number): If `text` is empty, this function returns the value of `position`
         
     | 
| 
       2038 
     | 
    
         
            -
                * 
         
     | 
| 
       2039 
     | 
    
         
            -
                * Inserts `text` into the `position` at the current row. This method also triggers the `'change'` event.
         
     | 
| 
       2040 
     | 
    
         
            -
                *
         
     | 
| 
       2041 
     | 
    
         
            -
                *
         
     | 
| 
       2042 
     | 
    
         
            -
                *
         
     | 
| 
       2043 
     | 
    
         
            -
                **/
         
     | 
| 
       2044 
1733 
     | 
    
         
             
                this.insertInLine = function(position, text) {
         
     | 
| 
       2045 
1734 
     | 
    
         
             
                    if (text.length == 0)
         
     | 
| 
       2046 
1735 
     | 
    
         
             
                        return position;
         
     | 
| 
         @@ -2064,16 +1753,6 @@ var Document = function(text) { 
     | 
|
| 
       2064 
1753 
     | 
    
         | 
| 
       2065 
1754 
     | 
    
         
             
                    return end;
         
     | 
| 
       2066 
1755 
     | 
    
         
             
                };
         
     | 
| 
       2067 
     | 
    
         
            -
             
     | 
| 
       2068 
     | 
    
         
            -
                /**
         
     | 
| 
       2069 
     | 
    
         
            -
                * Document.remove(range) -> Object
         
     | 
| 
       2070 
     | 
    
         
            -
                * - range (Range): A specified Range to remove
         
     | 
| 
       2071 
     | 
    
         
            -
                * + (Object): Returns the new `start` property of the range, which contains `startRow` and `startColumn`. If `range` is empty, this function returns the unmodified value of `range.start`.
         
     | 
| 
       2072 
     | 
    
         
            -
                * 
         
     | 
| 
       2073 
     | 
    
         
            -
                * Removes the `range` from the document.
         
     | 
| 
       2074 
     | 
    
         
            -
                *
         
     | 
| 
       2075 
     | 
    
         
            -
                *
         
     | 
| 
       2076 
     | 
    
         
            -
                **/
         
     | 
| 
       2077 
1756 
     | 
    
         
             
                this.remove = function(range) {
         
     | 
| 
       2078 
1757 
     | 
    
         
             
                    // clip to document
         
     | 
| 
       2079 
1758 
     | 
    
         
             
                    range.start = this.$clipPosition(range.start);
         
     | 
| 
         @@ -2105,18 +1784,6 @@ var Document = function(text) { 
     | 
|
| 
       2105 
1784 
     | 
    
         
             
                    }
         
     | 
| 
       2106 
1785 
     | 
    
         
             
                    return range.start;
         
     | 
| 
       2107 
1786 
     | 
    
         
             
                };
         
     | 
| 
       2108 
     | 
    
         
            -
             
     | 
| 
       2109 
     | 
    
         
            -
                /**
         
     | 
| 
       2110 
     | 
    
         
            -
                * Document.removeInLine(row, startColumn, endColumn) -> Object
         
     | 
| 
       2111 
     | 
    
         
            -
                * - row (Number): The row to remove from
         
     | 
| 
       2112 
     | 
    
         
            -
                * - startColumn (Number): The column to start removing at 
         
     | 
| 
       2113 
     | 
    
         
            -
                * - endColumn (Number): The column to stop removing at
         
     | 
| 
       2114 
     | 
    
         
            -
                * + (Object): Returns an object containing `startRow` and `startColumn`, indicating the new row and column values.<br/>If `startColumn` is equal to `endColumn`, this function returns nothing.
         
     | 
| 
       2115 
     | 
    
         
            -
                *
         
     | 
| 
       2116 
     | 
    
         
            -
                * Removes the specified columns from the `row`. This method also triggers the `'change'` event.
         
     | 
| 
       2117 
     | 
    
         
            -
                *
         
     | 
| 
       2118 
     | 
    
         
            -
                * 
         
     | 
| 
       2119 
     | 
    
         
            -
                **/
         
     | 
| 
       2120 
1787 
     | 
    
         
             
                this.removeInLine = function(row, startColumn, endColumn) {
         
     | 
| 
       2121 
1788 
     | 
    
         
             
                    if (startColumn == endColumn)
         
     | 
| 
       2122 
1789 
     | 
    
         
             
                        return;
         
     | 
| 
         @@ -2135,17 +1802,6 @@ var Document = function(text) { 
     | 
|
| 
       2135 
1802 
     | 
    
         
             
                    this._emit("change", { data: delta });
         
     | 
| 
       2136 
1803 
     | 
    
         
             
                    return range.start;
         
     | 
| 
       2137 
1804 
     | 
    
         
             
                };
         
     | 
| 
       2138 
     | 
    
         
            -
             
     | 
| 
       2139 
     | 
    
         
            -
                /**
         
     | 
| 
       2140 
     | 
    
         
            -
                * Document.removeLines(firstRow, lastRow) -> [String]
         
     | 
| 
       2141 
     | 
    
         
            -
                * - firstRow (Number): The first row to be removed
         
     | 
| 
       2142 
     | 
    
         
            -
                * - lastRow (Number): The last row to be removed
         
     | 
| 
       2143 
     | 
    
         
            -
                * + ([String]): Returns all the removed lines.
         
     | 
| 
       2144 
     | 
    
         
            -
                * 
         
     | 
| 
       2145 
     | 
    
         
            -
                * Removes a range of full lines. This method also triggers the `'change'` event.
         
     | 
| 
       2146 
     | 
    
         
            -
                * 
         
     | 
| 
       2147 
     | 
    
         
            -
                *
         
     | 
| 
       2148 
     | 
    
         
            -
                **/
         
     | 
| 
       2149 
1805 
     | 
    
         
             
                this.removeLines = function(firstRow, lastRow) {
         
     | 
| 
       2150 
1806 
     | 
    
         
             
                    var range = new Range(firstRow, 0, lastRow + 1, 0);
         
     | 
| 
       2151 
1807 
     | 
    
         
             
                    var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1);
         
     | 
| 
         @@ -2159,14 +1815,6 @@ var Document = function(text) { 
     | 
|
| 
       2159 
1815 
     | 
    
         
             
                    this._emit("change", { data: delta });
         
     | 
| 
       2160 
1816 
     | 
    
         
             
                    return removed;
         
     | 
| 
       2161 
1817 
     | 
    
         
             
                };
         
     | 
| 
       2162 
     | 
    
         
            -
             
     | 
| 
       2163 
     | 
    
         
            -
                /**
         
     | 
| 
       2164 
     | 
    
         
            -
                * Document.removeNewLine(row) -> Void
         
     | 
| 
       2165 
     | 
    
         
            -
                * - row (Number): The row to check
         
     | 
| 
       2166 
     | 
    
         
            -
                * 
         
     | 
| 
       2167 
     | 
    
         
            -
                * Removes the new line between `row` and the row immediately following it. This method also triggers the `'change'` event.
         
     | 
| 
       2168 
     | 
    
         
            -
                *
         
     | 
| 
       2169 
     | 
    
         
            -
                **/
         
     | 
| 
       2170 
1818 
     | 
    
         
             
                this.removeNewLine = function(row) {
         
     | 
| 
       2171 
1819 
     | 
    
         
             
                    var firstLine = this.getLine(row);
         
     | 
| 
       2172 
1820 
     | 
    
         
             
                    var secondLine = this.getLine(row+1);
         
     | 
| 
         @@ -2183,19 +1831,6 @@ var Document = function(text) { 
     | 
|
| 
       2183 
1831 
     | 
    
         
             
                    };
         
     | 
| 
       2184 
1832 
     | 
    
         
             
                    this._emit("change", { data: delta });
         
     | 
| 
       2185 
1833 
     | 
    
         
             
                };
         
     | 
| 
       2186 
     | 
    
         
            -
             
     | 
| 
       2187 
     | 
    
         
            -
                /**
         
     | 
| 
       2188 
     | 
    
         
            -
                * Document.replace(range, text) -> Object
         
     | 
| 
       2189 
     | 
    
         
            -
                * - range (Range): A specified Range to replace
         
     | 
| 
       2190 
     | 
    
         
            -
                * - text (String): The new text to use as a replacement
         
     | 
| 
       2191 
     | 
    
         
            -
                * + (Object): Returns an object containing the final row and column, like this:
         
     | 
| 
       2192 
     | 
    
         
            -
                *     {row: endRow, column: 0}
         
     | 
| 
       2193 
     | 
    
         
            -
                * If the text and range are empty, this function returns an object containing the current `range.start` value.
         
     | 
| 
       2194 
     | 
    
         
            -
                * If the text is the exact same as what currently exists, this function returns an object containing the current `range.end` value.
         
     | 
| 
       2195 
     | 
    
         
            -
                *
         
     | 
| 
       2196 
     | 
    
         
            -
                * Replaces a range in the document with the new `text`.
         
     | 
| 
       2197 
     | 
    
         
            -
                *
         
     | 
| 
       2198 
     | 
    
         
            -
                **/
         
     | 
| 
       2199 
1834 
     | 
    
         
             
                this.replace = function(range, text) {
         
     | 
| 
       2200 
1835 
     | 
    
         
             
                    if (text.length == 0 && range.isEmpty())
         
     | 
| 
       2201 
1836 
     | 
    
         
             
                        return range.start;
         
     | 
| 
         @@ -2215,12 +1850,6 @@ var Document = function(text) { 
     | 
|
| 
       2215 
1850 
     | 
    
         | 
| 
       2216 
1851 
     | 
    
         
             
                    return end;
         
     | 
| 
       2217 
1852 
     | 
    
         
             
                };
         
     | 
| 
       2218 
     | 
    
         
            -
             
     | 
| 
       2219 
     | 
    
         
            -
                /**
         
     | 
| 
       2220 
     | 
    
         
            -
                * Document.applyDeltas(deltas) -> Void
         
     | 
| 
       2221 
     | 
    
         
            -
                * 
         
     | 
| 
       2222 
     | 
    
         
            -
                * Applies all the changes previously accumulated. These can be either `'includeText'`, `'insertLines'`, `'removeText'`, and `'removeLines'`.
         
     | 
| 
       2223 
     | 
    
         
            -
                **/
         
     | 
| 
       2224 
1853 
     | 
    
         
             
                this.applyDeltas = function(deltas) {
         
     | 
| 
       2225 
1854 
     | 
    
         
             
                    for (var i=0; i<deltas.length; i++) {
         
     | 
| 
       2226 
1855 
     | 
    
         
             
                        var delta = deltas[i];
         
     | 
| 
         @@ -2236,12 +1865,6 @@ var Document = function(text) { 
     | 
|
| 
       2236 
1865 
     | 
    
         
             
                            this.remove(range);
         
     | 
| 
       2237 
1866 
     | 
    
         
             
                    }
         
     | 
| 
       2238 
1867 
     | 
    
         
             
                };
         
     | 
| 
       2239 
     | 
    
         
            -
             
     | 
| 
       2240 
     | 
    
         
            -
                /**
         
     | 
| 
       2241 
     | 
    
         
            -
                * Document.revertDeltas(deltas) -> Void
         
     | 
| 
       2242 
     | 
    
         
            -
                * 
         
     | 
| 
       2243 
     | 
    
         
            -
                * Reverts any changes previously applied. These can be either `'includeText'`, `'insertLines'`, `'removeText'`, and `'removeLines'`.
         
     | 
| 
       2244 
     | 
    
         
            -
                **/
         
     | 
| 
       2245 
1868 
     | 
    
         
             
                this.revertDeltas = function(deltas) {
         
     | 
| 
       2246 
1869 
     | 
    
         
             
                    for (var i=deltas.length-1; i>=0; i--) {
         
     | 
| 
       2247 
1870 
     | 
    
         
             
                        var delta = deltas[i];
         
     | 
| 
         @@ -2263,45 +1886,9 @@ var Document = function(text) { 
     | 
|
| 
       2263 
1886 
     | 
    
         | 
| 
       2264 
1887 
     | 
    
         
             
            exports.Document = Document;
         
     | 
| 
       2265 
1888 
     | 
    
         
             
            });
         
     | 
| 
       2266 
     | 
    
         
            -
            /* ***** BEGIN LICENSE BLOCK *****
         
     | 
| 
       2267 
     | 
    
         
            -
             * Version: MPL 1.1/GPL 2.0/LGPL 2.1
         
     | 
| 
       2268 
     | 
    
         
            -
             *
         
     | 
| 
       2269 
     | 
    
         
            -
             * The contents of this file are subject to the Mozilla Public License Version
         
     | 
| 
       2270 
     | 
    
         
            -
             * 1.1 (the "License"); you may not use this file except in compliance with
         
     | 
| 
       2271 
     | 
    
         
            -
             * the License. You may obtain a copy of the License at
         
     | 
| 
       2272 
     | 
    
         
            -
             * http://www.mozilla.org/MPL/
         
     | 
| 
       2273 
     | 
    
         
            -
             *
         
     | 
| 
       2274 
     | 
    
         
            -
             * Software distributed under the License is distributed on an "AS IS" basis,
         
     | 
| 
       2275 
     | 
    
         
            -
             * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
         
     | 
| 
       2276 
     | 
    
         
            -
             * for the specific language governing rights and limitations under the
         
     | 
| 
       2277 
     | 
    
         
            -
             * License.
         
     | 
| 
       2278 
     | 
    
         
            -
             *
         
     | 
| 
       2279 
     | 
    
         
            -
             * The Original Code is Ajax.org Code Editor (ACE).
         
     | 
| 
       2280 
     | 
    
         
            -
             *
         
     | 
| 
       2281 
     | 
    
         
            -
             * The Initial Developer of the Original Code is
         
     | 
| 
       2282 
     | 
    
         
            -
             * Ajax.org B.V.
         
     | 
| 
       2283 
     | 
    
         
            -
             * Portions created by the Initial Developer are Copyright (C) 2010
         
     | 
| 
       2284 
     | 
    
         
            -
             * the Initial Developer. All Rights Reserved.
         
     | 
| 
       2285 
     | 
    
         
            -
             *
         
     | 
| 
       2286 
     | 
    
         
            -
             * Contributor(s):
         
     | 
| 
       2287 
     | 
    
         
            -
             *      Fabian Jakobs <fabian AT ajax DOT org>
         
     | 
| 
       2288 
     | 
    
         
            -
             *
         
     | 
| 
       2289 
     | 
    
         
            -
             * Alternatively, the contents of this file may be used under the terms of
         
     | 
| 
       2290 
     | 
    
         
            -
             * either the GNU General Public License Version 2 or later (the "GPL"), or
         
     | 
| 
       2291 
     | 
    
         
            -
             * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
         
     | 
| 
       2292 
     | 
    
         
            -
             * in which case the provisions of the GPL or the LGPL are applicable instead
         
     | 
| 
       2293 
     | 
    
         
            -
             * of those above. If you wish to allow use of your version of this file only
         
     | 
| 
       2294 
     | 
    
         
            -
             * under the terms of either the GPL or the LGPL, and not to allow others to
         
     | 
| 
       2295 
     | 
    
         
            -
             * use your version of this file under the terms of the MPL, indicate your
         
     | 
| 
       2296 
     | 
    
         
            -
             * decision by deleting the provisions above and replace them with the notice
         
     | 
| 
       2297 
     | 
    
         
            -
             * and other provisions required by the GPL or the LGPL. If you do not delete
         
     | 
| 
       2298 
     | 
    
         
            -
             * the provisions above, a recipient may use your version of this file under
         
     | 
| 
       2299 
     | 
    
         
            -
             * the terms of any one of the MPL, the GPL or the LGPL.
         
     | 
| 
       2300 
     | 
    
         
            -
             *
         
     | 
| 
       2301 
     | 
    
         
            -
             * ***** END LICENSE BLOCK ***** */
         
     | 
| 
       2302 
1889 
     | 
    
         | 
| 
       2303 
1890 
     | 
    
         
             
            define('ace/range', ['require', 'exports', 'module' ], function(require, exports, module) {
         
     | 
| 
       2304 
     | 
    
         
            -
             
     | 
| 
      
 1891 
     | 
    
         
            +
             
     | 
| 
       2305 
1892 
     | 
    
         | 
| 
       2306 
1893 
     | 
    
         
             
            /**
         
     | 
| 
       2307 
1894 
     | 
    
         
             
             * class Range
         
     | 
| 
         @@ -2345,53 +1932,15 @@ var Range = function(startRow, startColumn, endRow, endColumn) { 
     | 
|
| 
       2345 
1932 
     | 
    
         
             
                        this.end.row == range.end.row &&
         
     | 
| 
       2346 
1933 
     | 
    
         
             
                        this.start.column == range.start.column &&
         
     | 
| 
       2347 
1934 
     | 
    
         
             
                        this.end.column == range.end.column
         
     | 
| 
       2348 
     | 
    
         
            -
                };
         
     | 
| 
       2349 
     | 
    
         
            -
             
     | 
| 
       2350 
     | 
    
         
            -
                /**
         
     | 
| 
       2351 
     | 
    
         
            -
                 * Range.toString() -> String
         
     | 
| 
       2352 
     | 
    
         
            -
                 *
         
     | 
| 
       2353 
     | 
    
         
            -
                 * Returns a string containing the range's row and column information, given like this:
         
     | 
| 
       2354 
     | 
    
         
            -
                 *
         
     | 
| 
       2355 
     | 
    
         
            -
                 *    [start.row/start.column] -> [end.row/end.column]
         
     | 
| 
       2356 
     | 
    
         
            -
                 *
         
     | 
| 
       2357 
     | 
    
         
            -
                 **/ 
         
     | 
| 
       2358 
     | 
    
         
            -
             
     | 
| 
      
 1935 
     | 
    
         
            +
                }; 
         
     | 
| 
       2359 
1936 
     | 
    
         
             
                this.toString = function() {
         
     | 
| 
       2360 
1937 
     | 
    
         
             
                    return ("Range: [" + this.start.row + "/" + this.start.column +
         
     | 
| 
       2361 
1938 
     | 
    
         
             
                        "] -> [" + this.end.row + "/" + this.end.column + "]");
         
     | 
| 
       2362 
     | 
    
         
            -
                };
         
     | 
| 
       2363 
     | 
    
         
            -
             
     | 
| 
       2364 
     | 
    
         
            -
                /** related to: Range.compare
         
     | 
| 
       2365 
     | 
    
         
            -
                 * Range.contains(row, column) -> Boolean
         
     | 
| 
       2366 
     | 
    
         
            -
                 * - row (Number): A row to check for
         
     | 
| 
       2367 
     | 
    
         
            -
                 * - column (Number): A column to check for
         
     | 
| 
       2368 
     | 
    
         
            -
                 *
         
     | 
| 
       2369 
     | 
    
         
            -
                 * Returns `true` if the `row` and `column` provided are within the given range. This can better be expressed as returning `true` if:
         
     | 
| 
       2370 
     | 
    
         
            -
                 *
         
     | 
| 
       2371 
     | 
    
         
            -
                 *    this.start.row <= row <= this.end.row &&
         
     | 
| 
       2372 
     | 
    
         
            -
                 *    this.start.column <= column <= this.end.column
         
     | 
| 
       2373 
     | 
    
         
            -
                 *
         
     | 
| 
       2374 
     | 
    
         
            -
                 **/ 
         
     | 
| 
      
 1939 
     | 
    
         
            +
                }; 
         
     | 
| 
       2375 
1940 
     | 
    
         | 
| 
       2376 
1941 
     | 
    
         
             
                this.contains = function(row, column) {
         
     | 
| 
       2377 
1942 
     | 
    
         
             
                    return this.compare(row, column) == 0;
         
     | 
| 
       2378 
     | 
    
         
            -
                };
         
     | 
| 
       2379 
     | 
    
         
            -
             
     | 
| 
       2380 
     | 
    
         
            -
                /** related to: Range.compare
         
     | 
| 
       2381 
     | 
    
         
            -
                 * Range.compareRange(range) -> Number
         
     | 
| 
       2382 
     | 
    
         
            -
                 * - range (Range): A range to compare with
         
     | 
| 
       2383 
     | 
    
         
            -
                 * + (Number): This method returns one of the following numbers:<br/>
         
     | 
| 
       2384 
     | 
    
         
            -
                 * <br/>
         
     | 
| 
       2385 
     | 
    
         
            -
                 * * `-2`: (B) is in front of (A), and doesn't intersect with (A)<br/>
         
     | 
| 
       2386 
     | 
    
         
            -
                 * * `-1`: (B) begins before (A) but ends inside of (A)<br/>
         
     | 
| 
       2387 
     | 
    
         
            -
                 * * `0`: (B) is completely inside of (A) OR (A) is completely inside of (B)<br/>
         
     | 
| 
       2388 
     | 
    
         
            -
                 * * `+1`: (B) begins inside of (A) but ends outside of (A)<br/>
         
     | 
| 
       2389 
     | 
    
         
            -
                 * * `+2`: (B) is after (A) and doesn't intersect with (A)<br/>
         
     | 
| 
       2390 
     | 
    
         
            -
                 * * `42`: FTW state: (B) ends in (A) but starts outside of (A)
         
     | 
| 
       2391 
     | 
    
         
            -
                 * 
         
     | 
| 
       2392 
     | 
    
         
            -
                 * Compares `this` range (A) with another range (B).
         
     | 
| 
       2393 
     | 
    
         
            -
                 *
         
     | 
| 
       2394 
     | 
    
         
            -
                 **/ 
         
     | 
| 
      
 1943 
     | 
    
         
            +
                }; 
         
     | 
| 
       2395 
1944 
     | 
    
         
             
                this.compareRange = function(range) {
         
     | 
| 
       2396 
1945 
     | 
    
         
             
                    var cmp,
         
     | 
| 
       2397 
1946 
     | 
    
         
             
                        end = range.end,
         
     | 
| 
         @@ -2628,30 +2177,6 @@ var Range = function(startRow, startColumn, endRow, endColumn) { 
     | 
|
| 
       2628 
2177 
     | 
    
         | 
| 
       2629 
2178 
     | 
    
         
             
                    return 0;
         
     | 
| 
       2630 
2179 
     | 
    
         
             
                };
         
     | 
| 
       2631 
     | 
    
         
            -
             
     | 
| 
       2632 
     | 
    
         
            -
                /**
         
     | 
| 
       2633 
     | 
    
         
            -
                 * Range.compareStart(row, column) -> Number
         
     | 
| 
       2634 
     | 
    
         
            -
                 * - row (Number): A row point to compare with
         
     | 
| 
       2635 
     | 
    
         
            -
                 * - column (Number): A column point to compare with
         
     | 
| 
       2636 
     | 
    
         
            -
                 * + (Number): This method returns one of the following numbers:<br/>
         
     | 
| 
       2637 
     | 
    
         
            -
                 * <br/>
         
     | 
| 
       2638 
     | 
    
         
            -
                 * * `0` if the two points are exactly equal<br/>
         
     | 
| 
       2639 
     | 
    
         
            -
                 * * `-1` if `p.row` is less then the calling range<br/>
         
     | 
| 
       2640 
     | 
    
         
            -
                 * * `1` if `p.row` is greater than the calling range, or if `isStart` is `true`.<br/>
         
     | 
| 
       2641 
     | 
    
         
            -
                 * <br/>
         
     | 
| 
       2642 
     | 
    
         
            -
                 * If the starting row of the calling range is equal to `p.row`, and:<br/>
         
     | 
| 
       2643 
     | 
    
         
            -
                 * * `p.column` is greater than or equal to the calling range's starting column, this returns `0`<br/>
         
     | 
| 
       2644 
     | 
    
         
            -
                 * * Otherwise, it returns -1<br/>
         
     | 
| 
       2645 
     | 
    
         
            -
                 * <br/>
         
     | 
| 
       2646 
     | 
    
         
            -
                 * If the ending row of the calling range is equal to `p.row`, and:<br/>
         
     | 
| 
       2647 
     | 
    
         
            -
                 * * `p.column` is less than or equal to the calling range's ending column, this returns `0`<br/>
         
     | 
| 
       2648 
     | 
    
         
            -
                 * * Otherwise, it returns 1
         
     | 
| 
       2649 
     | 
    
         
            -
                 *
         
     | 
| 
       2650 
     | 
    
         
            -
                 * Checks the row and column points with the row and column points of the calling range.
         
     | 
| 
       2651 
     | 
    
         
            -
                 *
         
     | 
| 
       2652 
     | 
    
         
            -
                 *
         
     | 
| 
       2653 
     | 
    
         
            -
                 *
         
     | 
| 
       2654 
     | 
    
         
            -
                 **/
         
     | 
| 
       2655 
2180 
     | 
    
         
             
                this.compareStart = function(row, column) {
         
     | 
| 
       2656 
2181 
     | 
    
         
             
                    if (this.start.row == row && this.start.column == column) {
         
     | 
| 
       2657 
2182 
     | 
    
         
             
                        return -1;
         
     | 
| 
         @@ -2689,7 +2214,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) { 
     | 
|
| 
       2689 
2214 
     | 
    
         
             
                    }
         
     | 
| 
       2690 
2215 
     | 
    
         
             
                }
         
     | 
| 
       2691 
2216 
     | 
    
         | 
| 
       2692 
     | 
    
         
            -
             
     | 
| 
      
 2217 
     | 
    
         
            +
                /** 
         
     | 
| 
       2693 
2218 
     | 
    
         
             
                 * Range.compareInside(row, column) -> Number
         
     | 
| 
       2694 
2219 
     | 
    
         
             
                 * - row (Number): A row point to compare with
         
     | 
| 
       2695 
2220 
     | 
    
         
             
                 * - column (Number): A column point to compare with
         
     | 
| 
         @@ -2714,7 +2239,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) { 
     | 
|
| 
       2714 
2239 
     | 
    
         
             
                    }
         
     | 
| 
       2715 
2240 
     | 
    
         
             
                }
         
     | 
| 
       2716 
2241 
     | 
    
         | 
| 
       2717 
     | 
    
         
            -
             
     | 
| 
      
 2242 
     | 
    
         
            +
                /** 
         
     | 
| 
       2718 
2243 
     | 
    
         
             
                 * Range.clipRows(firstRow, lastRow) -> Range
         
     | 
| 
       2719 
2244 
     | 
    
         
             
                 * - firstRow (Number): The starting row
         
     | 
| 
       2720 
2245 
     | 
    
         
             
                 * - lastRow (Number): The ending row
         
     | 
| 
         @@ -2752,15 +2277,6 @@ var Range = function(startRow, startColumn, endRow, endColumn) { 
     | 
|
| 
       2752 
2277 
     | 
    
         
             
                    }
         
     | 
| 
       2753 
2278 
     | 
    
         
             
                    return Range.fromPoints(start || this.start, end || this.end);
         
     | 
| 
       2754 
2279 
     | 
    
         
             
                };
         
     | 
| 
       2755 
     | 
    
         
            -
             
     | 
| 
       2756 
     | 
    
         
            -
               /** 
         
     | 
| 
       2757 
     | 
    
         
            -
                 * Range.extend(row, column) -> Range
         
     | 
| 
       2758 
     | 
    
         
            -
                 * - row (Number): A new row to extend to
         
     | 
| 
       2759 
     | 
    
         
            -
                 * - column (Number): A new column to extend to
         
     | 
| 
       2760 
     | 
    
         
            -
                 *
         
     | 
| 
       2761 
     | 
    
         
            -
                 *  Changes the row and column points for the calling range for both the starting and ending points. This method returns that range with a new row.
         
     | 
| 
       2762 
     | 
    
         
            -
                 *
         
     | 
| 
       2763 
     | 
    
         
            -
                **/
         
     | 
| 
       2764 
2280 
     | 
    
         
             
                this.extend = function(row, column) {
         
     | 
| 
       2765 
2281 
     | 
    
         
             
                    var cmp = this.compare(row, column);
         
     | 
| 
       2766 
2282 
     | 
    
         | 
| 
         @@ -2777,46 +2293,18 @@ var Range = function(startRow, startColumn, endRow, endColumn) { 
     | 
|
| 
       2777 
2293 
     | 
    
         
             
                this.isEmpty = function() {
         
     | 
| 
       2778 
2294 
     | 
    
         
             
                    return (this.start.row == this.end.row && this.start.column == this.end.column);
         
     | 
| 
       2779 
2295 
     | 
    
         
             
                };
         
     | 
| 
       2780 
     | 
    
         
            -
             
     | 
| 
       2781 
     | 
    
         
            -
               /** 
         
     | 
| 
       2782 
     | 
    
         
            -
                 * Range.isMultiLine() -> Boolean
         
     | 
| 
       2783 
     | 
    
         
            -
                 *
         
     | 
| 
       2784 
     | 
    
         
            -
                 * Returns true if the range spans across multiple lines.
         
     | 
| 
       2785 
     | 
    
         
            -
                 *
         
     | 
| 
       2786 
     | 
    
         
            -
                **/
         
     | 
| 
       2787 
2296 
     | 
    
         
             
                this.isMultiLine = function() {
         
     | 
| 
       2788 
2297 
     | 
    
         
             
                    return (this.start.row !== this.end.row);
         
     | 
| 
       2789 
2298 
     | 
    
         
             
                };
         
     | 
| 
       2790 
     | 
    
         
            -
             
     | 
| 
       2791 
     | 
    
         
            -
               /** 
         
     | 
| 
       2792 
     | 
    
         
            -
                 * Range.clone() -> Range
         
     | 
| 
       2793 
     | 
    
         
            -
                 *
         
     | 
| 
       2794 
     | 
    
         
            -
                 * Returns a duplicate of the calling range.
         
     | 
| 
       2795 
     | 
    
         
            -
                 *
         
     | 
| 
       2796 
     | 
    
         
            -
                **/
         
     | 
| 
       2797 
2299 
     | 
    
         
             
                this.clone = function() {
         
     | 
| 
       2798 
2300 
     | 
    
         
             
                    return Range.fromPoints(this.start, this.end);
         
     | 
| 
       2799 
2301 
     | 
    
         
             
                };
         
     | 
| 
       2800 
     | 
    
         
            -
             
     | 
| 
       2801 
     | 
    
         
            -
               /** 
         
     | 
| 
       2802 
     | 
    
         
            -
                 * Range.collapseRows() -> Range
         
     | 
| 
       2803 
     | 
    
         
            -
                 *
         
     | 
| 
       2804 
     | 
    
         
            -
                 * Returns a range containing the starting and ending rows of the original range, but with a column value of `0`.
         
     | 
| 
       2805 
     | 
    
         
            -
                 *
         
     | 
| 
       2806 
     | 
    
         
            -
                **/
         
     | 
| 
       2807 
2302 
     | 
    
         
             
                this.collapseRows = function() {
         
     | 
| 
       2808 
2303 
     | 
    
         
             
                    if (this.end.column == 0)
         
     | 
| 
       2809 
2304 
     | 
    
         
             
                        return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
         
     | 
| 
       2810 
2305 
     | 
    
         
             
                    else
         
     | 
| 
       2811 
2306 
     | 
    
         
             
                        return new Range(this.start.row, 0, this.end.row, 0)
         
     | 
| 
       2812 
2307 
     | 
    
         
             
                };
         
     | 
| 
       2813 
     | 
    
         
            -
             
     | 
| 
       2814 
     | 
    
         
            -
               /** 
         
     | 
| 
       2815 
     | 
    
         
            -
                 * Range.toScreenRange(session) -> Range
         
     | 
| 
       2816 
     | 
    
         
            -
                 * - session (EditSession): The `EditSession` to retrieve coordinates from
         
     | 
| 
       2817 
     | 
    
         
            -
                 * 
         
     | 
| 
       2818 
     | 
    
         
            -
                 * Given the current `Range`, this function converts those starting and ending points into screen positions, and then returns a new `Range` object.
         
     | 
| 
       2819 
     | 
    
         
            -
                **/
         
     | 
| 
       2820 
2308 
     | 
    
         
             
                this.toScreenRange = function(session) {
         
     | 
| 
       2821 
2309 
     | 
    
         
             
                    var screenPosStart =
         
     | 
| 
       2822 
2310 
     | 
    
         
             
                        session.documentToScreenPosition(this.start);
         
     | 
| 
         @@ -2830,71 +2318,19 @@ var Range = function(startRow, startColumn, endRow, endColumn) { 
     | 
|
| 
       2830 
2318 
     | 
    
         
             
                };
         
     | 
| 
       2831 
2319 
     | 
    
         | 
| 
       2832 
2320 
     | 
    
         
             
            }).call(Range.prototype);
         
     | 
| 
       2833 
     | 
    
         
            -
             
     | 
| 
       2834 
     | 
    
         
            -
            /** 
         
     | 
| 
       2835 
     | 
    
         
            -
             * Range.fromPoints(start, end) -> Range
         
     | 
| 
       2836 
     | 
    
         
            -
             * - start (Range): A starting point to use
         
     | 
| 
       2837 
     | 
    
         
            -
             * - end (Range): An ending point to use
         
     | 
| 
       2838 
     | 
    
         
            -
             * 
         
     | 
| 
       2839 
     | 
    
         
            -
             * Creates and returns a new `Range` based on the row and column of the given parameters.
         
     | 
| 
       2840 
     | 
    
         
            -
             *
         
     | 
| 
       2841 
     | 
    
         
            -
            **/
         
     | 
| 
       2842 
2321 
     | 
    
         
             
            Range.fromPoints = function(start, end) {
         
     | 
| 
       2843 
2322 
     | 
    
         
             
                return new Range(start.row, start.column, end.row, end.column);
         
     | 
| 
       2844 
2323 
     | 
    
         
             
            };
         
     | 
| 
       2845 
2324 
     | 
    
         | 
| 
       2846 
2325 
     | 
    
         
             
            exports.Range = Range;
         
     | 
| 
       2847 
2326 
     | 
    
         
             
            });
         
     | 
| 
       2848 
     | 
    
         
            -
            /* ***** BEGIN LICENSE BLOCK *****
         
     | 
| 
       2849 
     | 
    
         
            -
             * Version: MPL 1.1/GPL 2.0/LGPL 2.1
         
     | 
| 
       2850 
     | 
    
         
            -
             *
         
     | 
| 
       2851 
     | 
    
         
            -
             * The contents of this file are subject to the Mozilla Public License Version
         
     | 
| 
       2852 
     | 
    
         
            -
             * 1.1 (the "License"); you may not use this file except in compliance with
         
     | 
| 
       2853 
     | 
    
         
            -
             * the License. You may obtain a copy of the License at
         
     | 
| 
       2854 
     | 
    
         
            -
             * http://www.mozilla.org/MPL/
         
     | 
| 
       2855 
     | 
    
         
            -
             *
         
     | 
| 
       2856 
     | 
    
         
            -
             * Software distributed under the License is distributed on an "AS IS" basis,
         
     | 
| 
       2857 
     | 
    
         
            -
             * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
         
     | 
| 
       2858 
     | 
    
         
            -
             * for the specific language governing rights and limitations under the
         
     | 
| 
       2859 
     | 
    
         
            -
             * License.
         
     | 
| 
       2860 
     | 
    
         
            -
             *
         
     | 
| 
       2861 
     | 
    
         
            -
             * The Original Code is Ajax.org Code Editor (ACE).
         
     | 
| 
       2862 
     | 
    
         
            -
             *
         
     | 
| 
       2863 
     | 
    
         
            -
             * The Initial Developer of the Original Code is
         
     | 
| 
       2864 
     | 
    
         
            -
             * Ajax.org B.V.
         
     | 
| 
       2865 
     | 
    
         
            -
             * Portions created by the Initial Developer are Copyright (C) 2010
         
     | 
| 
       2866 
     | 
    
         
            -
             * the Initial Developer. All Rights Reserved.
         
     | 
| 
       2867 
     | 
    
         
            -
             *
         
     | 
| 
       2868 
     | 
    
         
            -
             * Contributor(s):
         
     | 
| 
       2869 
     | 
    
         
            -
             *      Fabian Jakobs <fabian AT ajax DOT org>
         
     | 
| 
       2870 
     | 
    
         
            -
             *
         
     | 
| 
       2871 
     | 
    
         
            -
             * Alternatively, the contents of this file may be used under the terms of
         
     | 
| 
       2872 
     | 
    
         
            -
             * either the GNU General Public License Version 2 or later (the "GPL"), or
         
     | 
| 
       2873 
     | 
    
         
            -
             * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
         
     | 
| 
       2874 
     | 
    
         
            -
             * in which case the provisions of the GPL or the LGPL are applicable instead
         
     | 
| 
       2875 
     | 
    
         
            -
             * of those above. If you wish to allow use of your version of this file only
         
     | 
| 
       2876 
     | 
    
         
            -
             * under the terms of either the GPL or the LGPL, and not to allow others to
         
     | 
| 
       2877 
     | 
    
         
            -
             * use your version of this file under the terms of the MPL, indicate your
         
     | 
| 
       2878 
     | 
    
         
            -
             * decision by deleting the provisions above and replace them with the notice
         
     | 
| 
       2879 
     | 
    
         
            -
             * and other provisions required by the GPL or the LGPL. If you do not delete
         
     | 
| 
       2880 
     | 
    
         
            -
             * the provisions above, a recipient may use your version of this file under
         
     | 
| 
       2881 
     | 
    
         
            -
             * the terms of any one of the MPL, the GPL or the LGPL.
         
     | 
| 
       2882 
     | 
    
         
            -
             *
         
     | 
| 
       2883 
     | 
    
         
            -
             * ***** END LICENSE BLOCK ***** */
         
     | 
| 
       2884 
2327 
     | 
    
         | 
| 
       2885 
2328 
     | 
    
         
             
            define('ace/anchor', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
         
     | 
| 
       2886 
     | 
    
         
            -
             
     | 
| 
      
 2329 
     | 
    
         
            +
             
     | 
| 
       2887 
2330 
     | 
    
         | 
| 
       2888 
2331 
     | 
    
         
             
            var oop = require("./lib/oop");
         
     | 
| 
       2889 
2332 
     | 
    
         
             
            var EventEmitter = require("./lib/event_emitter").EventEmitter;
         
     | 
| 
       2890 
2333 
     | 
    
         | 
| 
       2891 
     | 
    
         
            -
            /**
         
     | 
| 
       2892 
     | 
    
         
            -
             * class Anchor
         
     | 
| 
       2893 
     | 
    
         
            -
             *
         
     | 
| 
       2894 
     | 
    
         
            -
             * Defines the floating pointer in the document. Whenever text is inserted or deleted before the cursor, the position of the cursor is updated
         
     | 
| 
       2895 
     | 
    
         
            -
             *
         
     | 
| 
       2896 
     | 
    
         
            -
             **/
         
     | 
| 
       2897 
     | 
    
         
            -
             
     | 
| 
       2898 
2334 
     | 
    
         
             
            /**
         
     | 
| 
       2899 
2335 
     | 
    
         
             
             * new Anchor(doc, row, column)
         
     | 
| 
       2900 
2336 
     | 
    
         
             
             * - doc (Document): The document to associate with the anchor
         
     | 
| 
         @@ -2920,36 +2356,14 @@ var Anchor = exports.Anchor = function(doc, row, column) { 
     | 
|
| 
       2920 
2356 
     | 
    
         
             
            (function() {
         
     | 
| 
       2921 
2357 
     | 
    
         | 
| 
       2922 
2358 
     | 
    
         
             
                oop.implement(this, EventEmitter);
         
     | 
| 
       2923 
     | 
    
         
            -
                
         
     | 
| 
       2924 
     | 
    
         
            -
                /**
         
     | 
| 
       2925 
     | 
    
         
            -
                 * Anchor.getPosition() -> Object
         
     | 
| 
       2926 
     | 
    
         
            -
                 *
         
     | 
| 
       2927 
     | 
    
         
            -
                 * Returns an object identifying the `row` and `column` position of the current anchor.
         
     | 
| 
       2928 
     | 
    
         
            -
                 *
         
     | 
| 
       2929 
     | 
    
         
            -
                 **/
         
     | 
| 
       2930 
2359 
     | 
    
         | 
| 
       2931 
2360 
     | 
    
         
             
                this.getPosition = function() {
         
     | 
| 
       2932 
2361 
     | 
    
         
             
                    return this.$clipPositionToDocument(this.row, this.column);
         
     | 
| 
       2933 
2362 
     | 
    
         
             
                };
         
     | 
| 
       2934 
     | 
    
         
            -
             
         
     | 
| 
       2935 
     | 
    
         
            -
                 /**
         
     | 
| 
       2936 
     | 
    
         
            -
                 * Anchor.getDocument() -> Document
         
     | 
| 
       2937 
     | 
    
         
            -
                 *
         
     | 
| 
       2938 
     | 
    
         
            -
                 * Returns the current document.
         
     | 
| 
       2939 
     | 
    
         
            -
                 *
         
     | 
| 
       2940 
     | 
    
         
            -
                 **/
         
     | 
| 
       2941 
2363 
     | 
    
         | 
| 
       2942 
2364 
     | 
    
         
             
                this.getDocument = function() {
         
     | 
| 
       2943 
2365 
     | 
    
         
             
                    return this.document;
         
     | 
| 
       2944 
2366 
     | 
    
         
             
                };
         
     | 
| 
       2945 
     | 
    
         
            -
                
         
     | 
| 
       2946 
     | 
    
         
            -
                 /**
         
     | 
| 
       2947 
     | 
    
         
            -
                 * Anchor@onChange(e)
         
     | 
| 
       2948 
     | 
    
         
            -
                 * - e (Event): Contains data about the event
         
     | 
| 
       2949 
     | 
    
         
            -
                 *
         
     | 
| 
       2950 
     | 
    
         
            -
                 * Fires whenever the anchor position changes. Events that can trigger this function include `'includeText'`, `'insertLines'`, `'removeText'`, and `'removeLines'`.
         
     | 
| 
       2951 
     | 
    
         
            -
                 *
         
     | 
| 
       2952 
     | 
    
         
            -
                 **/
         
     | 
| 
       2953 
2367 
     | 
    
         | 
| 
       2954 
2368 
     | 
    
         
             
                this.onChange = function(e) {
         
     | 
| 
       2955 
2369 
     | 
    
         
             
                    var delta = e.data;
         
     | 
| 
         @@ -3016,16 +2430,6 @@ var Anchor = exports.Anchor = function(doc, row, column) { 
     | 
|
| 
       3016 
2430 
     | 
    
         
             
                    this.setPosition(row, column, true);
         
     | 
| 
       3017 
2431 
     | 
    
         
             
                };
         
     | 
| 
       3018 
2432 
     | 
    
         | 
| 
       3019 
     | 
    
         
            -
                 /**
         
     | 
| 
       3020 
     | 
    
         
            -
                 * Anchor.setPosition(row, column, noClip)
         
     | 
| 
       3021 
     | 
    
         
            -
                 * - row (Number): The row index to move the anchor to
         
     | 
| 
       3022 
     | 
    
         
            -
                 * - column (Number): The column index to move the anchor to
         
     | 
| 
       3023 
     | 
    
         
            -
                 * - noClip (Boolean): Identifies if you want the position to be clipped
         
     | 
| 
       3024 
     | 
    
         
            -
                 *
         
     | 
| 
       3025 
     | 
    
         
            -
                 * Sets the anchor position to the specified row and column. If `noClip` is `true`, the position is not clipped.
         
     | 
| 
       3026 
     | 
    
         
            -
                 *
         
     | 
| 
       3027 
     | 
    
         
            -
                 **/
         
     | 
| 
       3028 
     | 
    
         
            -
             
     | 
| 
       3029 
2433 
     | 
    
         
             
                this.setPosition = function(row, column, noClip) {
         
     | 
| 
       3030 
2434 
     | 
    
         
             
                    var pos;
         
     | 
| 
       3031 
2435 
     | 
    
         
             
                    if (noClip) {
         
     | 
| 
         @@ -3053,26 +2457,10 @@ var Anchor = exports.Anchor = function(doc, row, column) { 
     | 
|
| 
       3053 
2457 
     | 
    
         
             
                        value: pos
         
     | 
| 
       3054 
2458 
     | 
    
         
             
                    });
         
     | 
| 
       3055 
2459 
     | 
    
         
             
                };
         
     | 
| 
       3056 
     | 
    
         
            -
                
         
     | 
| 
       3057 
     | 
    
         
            -
                /**
         
     | 
| 
       3058 
     | 
    
         
            -
                 * Anchor.detach()
         
     | 
| 
       3059 
     | 
    
         
            -
                 *
         
     | 
| 
       3060 
     | 
    
         
            -
                 * When called, the `'change'` event listener is removed.
         
     | 
| 
       3061 
     | 
    
         
            -
                 *
         
     | 
| 
       3062 
     | 
    
         
            -
                 **/
         
     | 
| 
       3063 
2460 
     | 
    
         | 
| 
       3064 
2461 
     | 
    
         
             
                this.detach = function() {
         
     | 
| 
       3065 
2462 
     | 
    
         
             
                    this.document.removeEventListener("change", this.$onChange);
         
     | 
| 
       3066 
2463 
     | 
    
         
             
                };
         
     | 
| 
       3067 
     | 
    
         
            -
                
         
     | 
| 
       3068 
     | 
    
         
            -
                /** internal, hide
         
     | 
| 
       3069 
     | 
    
         
            -
                 * Anchor.clipPositionToDocument(row, column)
         
     | 
| 
       3070 
     | 
    
         
            -
                 * - row (Number): The row index to clip the anchor to
         
     | 
| 
       3071 
     | 
    
         
            -
                 * - column (Number): The column index to clip the anchor to
         
     | 
| 
       3072 
     | 
    
         
            -
                 *
         
     | 
| 
       3073 
     | 
    
         
            -
                 * Clips the anchor position to the specified row and column.
         
     | 
| 
       3074 
     | 
    
         
            -
                 *
         
     | 
| 
       3075 
     | 
    
         
            -
                 **/
         
     | 
| 
       3076 
2464 
     | 
    
         | 
| 
       3077 
2465 
     | 
    
         
             
                this.$clipPositionToDocument = function(row, column) {
         
     | 
| 
       3078 
2466 
     | 
    
         
             
                    var pos = {};
         
     | 
| 
         @@ -3099,45 +2487,9 @@ var Anchor = exports.Anchor = function(doc, row, column) { 
     | 
|
| 
       3099 
2487 
     | 
    
         
             
            }).call(Anchor.prototype);
         
     | 
| 
       3100 
2488 
     | 
    
         | 
| 
       3101 
2489 
     | 
    
         
             
            });
         
     | 
| 
       3102 
     | 
    
         
            -
            /* ***** BEGIN LICENSE BLOCK *****
         
     | 
| 
       3103 
     | 
    
         
            -
             * Version: MPL 1.1/GPL 2.0/LGPL 2.1
         
     | 
| 
       3104 
     | 
    
         
            -
             *
         
     | 
| 
       3105 
     | 
    
         
            -
             * The contents of this file are subject to the Mozilla Public License Version
         
     | 
| 
       3106 
     | 
    
         
            -
             * 1.1 (the "License"); you may not use this file except in compliance with
         
     | 
| 
       3107 
     | 
    
         
            -
             * the License. You may obtain a copy of the License at
         
     | 
| 
       3108 
     | 
    
         
            -
             * http://www.mozilla.org/MPL/
         
     | 
| 
       3109 
     | 
    
         
            -
             *
         
     | 
| 
       3110 
     | 
    
         
            -
             * Software distributed under the License is distributed on an "AS IS" basis,
         
     | 
| 
       3111 
     | 
    
         
            -
             * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
         
     | 
| 
       3112 
     | 
    
         
            -
             * for the specific language governing rights and limitations under the
         
     | 
| 
       3113 
     | 
    
         
            -
             * License.
         
     | 
| 
       3114 
     | 
    
         
            -
             *
         
     | 
| 
       3115 
     | 
    
         
            -
             * The Original Code is Ajax.org Code Editor (ACE).
         
     | 
| 
       3116 
     | 
    
         
            -
             *
         
     | 
| 
       3117 
     | 
    
         
            -
             * The Initial Developer of the Original Code is
         
     | 
| 
       3118 
     | 
    
         
            -
             * Ajax.org B.V.
         
     | 
| 
       3119 
     | 
    
         
            -
             * Portions created by the Initial Developer are Copyright (C) 2010
         
     | 
| 
       3120 
     | 
    
         
            -
             * the Initial Developer. All Rights Reserved.
         
     | 
| 
       3121 
     | 
    
         
            -
             *
         
     | 
| 
       3122 
     | 
    
         
            -
             * Contributor(s):
         
     | 
| 
       3123 
     | 
    
         
            -
             *      Fabian Jakobs <fabian AT ajax DOT org>
         
     | 
| 
       3124 
     | 
    
         
            -
             *
         
     | 
| 
       3125 
     | 
    
         
            -
             * Alternatively, the contents of this file may be used under the terms of
         
     | 
| 
       3126 
     | 
    
         
            -
             * either the GNU General Public License Version 2 or later (the "GPL"), or
         
     | 
| 
       3127 
     | 
    
         
            -
             * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
         
     | 
| 
       3128 
     | 
    
         
            -
             * in which case the provisions of the GPL or the LGPL are applicable instead
         
     | 
| 
       3129 
     | 
    
         
            -
             * of those above. If you wish to allow use of your version of this file only
         
     | 
| 
       3130 
     | 
    
         
            -
             * under the terms of either the GPL or the LGPL, and not to allow others to
         
     | 
| 
       3131 
     | 
    
         
            -
             * use your version of this file under the terms of the MPL, indicate your
         
     | 
| 
       3132 
     | 
    
         
            -
             * decision by deleting the provisions above and replace them with the notice
         
     | 
| 
       3133 
     | 
    
         
            -
             * and other provisions required by the GPL or the LGPL. If you do not delete
         
     | 
| 
       3134 
     | 
    
         
            -
             * the provisions above, a recipient may use your version of this file under
         
     | 
| 
       3135 
     | 
    
         
            -
             * the terms of any one of the MPL, the GPL or the LGPL.
         
     | 
| 
       3136 
     | 
    
         
            -
             *
         
     | 
| 
       3137 
     | 
    
         
            -
             * ***** END LICENSE BLOCK ***** */
         
     | 
| 
       3138 
2490 
     | 
    
         | 
| 
       3139 
2491 
     | 
    
         
             
            define('ace/lib/lang', ['require', 'exports', 'module' ], function(require, exports, module) {
         
     | 
| 
       3140 
     | 
    
         
            -
             
     | 
| 
      
 2492 
     | 
    
         
            +
             
     | 
| 
       3141 
2493 
     | 
    
         | 
| 
       3142 
2494 
     | 
    
         
             
            exports.stringReverse = function(string) {
         
     | 
| 
       3143 
2495 
     | 
    
         
             
                return string.split("").reverse().join("");
         
     | 
| 
         @@ -3202,9 +2554,13 @@ exports.arrayToMap = function(arr) { 
     | 
|
| 
       3202 
2554 
     | 
    
         | 
| 
       3203 
2555 
     | 
    
         
             
            };
         
     | 
| 
       3204 
2556 
     | 
    
         | 
| 
       3205 
     | 
    
         
            -
             
     | 
| 
       3206 
     | 
    
         
            -
              
     | 
| 
       3207 
     | 
    
         
            -
              
     | 
| 
      
 2557 
     | 
    
         
            +
            exports.createMap = function(props) {
         
     | 
| 
      
 2558 
     | 
    
         
            +
                var map = Object.create(null);
         
     | 
| 
      
 2559 
     | 
    
         
            +
                for (var i in props) {
         
     | 
| 
      
 2560 
     | 
    
         
            +
                    map[i] = props[i];
         
     | 
| 
      
 2561 
     | 
    
         
            +
                }
         
     | 
| 
      
 2562 
     | 
    
         
            +
                return map;
         
     | 
| 
      
 2563 
     | 
    
         
            +
            };
         
     | 
| 
       3208 
2564 
     | 
    
         
             
            exports.arrayRemove = function(array, value) {
         
     | 
| 
       3209 
2565 
     | 
    
         
             
              for (var i = 0; i <= array.length; i++) {
         
     | 
| 
       3210 
2566 
     | 
    
         
             
                if (value === array[i]) {
         
     | 
| 
         @@ -3217,6 +2573,20 @@ exports.escapeRegExp = function(str) { 
     | 
|
| 
       3217 
2573 
     | 
    
         
             
                return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
         
     | 
| 
       3218 
2574 
     | 
    
         
             
            };
         
     | 
| 
       3219 
2575 
     | 
    
         | 
| 
      
 2576 
     | 
    
         
            +
            exports.getMatchOffsets = function(string, regExp) {
         
     | 
| 
      
 2577 
     | 
    
         
            +
                var matches = [];
         
     | 
| 
      
 2578 
     | 
    
         
            +
             
     | 
| 
      
 2579 
     | 
    
         
            +
                string.replace(regExp, function(str) {
         
     | 
| 
      
 2580 
     | 
    
         
            +
                    matches.push({
         
     | 
| 
      
 2581 
     | 
    
         
            +
                        offset: arguments[arguments.length-2],
         
     | 
| 
      
 2582 
     | 
    
         
            +
                        length: str.length
         
     | 
| 
      
 2583 
     | 
    
         
            +
                    });
         
     | 
| 
      
 2584 
     | 
    
         
            +
                });
         
     | 
| 
      
 2585 
     | 
    
         
            +
             
     | 
| 
      
 2586 
     | 
    
         
            +
                return matches;
         
     | 
| 
      
 2587 
     | 
    
         
            +
            };
         
     | 
| 
      
 2588 
     | 
    
         
            +
             
     | 
| 
      
 2589 
     | 
    
         
            +
             
     | 
| 
       3220 
2590 
     | 
    
         
             
            exports.deferredCall = function(fcn) {
         
     | 
| 
       3221 
2591 
     | 
    
         | 
| 
       3222 
2592 
     | 
    
         
             
                var timer = null;
         
     | 
| 
         @@ -3249,60 +2619,13 @@ exports.deferredCall = function(fcn) { 
     | 
|
| 
       3249 
2619 
     | 
    
         
             
            };
         
     | 
| 
       3250 
2620 
     | 
    
         | 
| 
       3251 
2621 
     | 
    
         
             
            });
         
     | 
| 
       3252 
     | 
    
         
            -
            /*
         
     | 
| 
       3253 
     | 
    
         
            -
                http://www.JSON.org/json_parse.js
         
     | 
| 
       3254 
     | 
    
         
            -
                2008-09-18
         
     | 
| 
       3255 
     | 
    
         
            -
             
     | 
| 
       3256 
     | 
    
         
            -
                Public Domain.
         
     | 
| 
       3257 
     | 
    
         
            -
             
     | 
| 
       3258 
     | 
    
         
            -
                NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
         
     | 
| 
       3259 
     | 
    
         
            -
             
     | 
| 
       3260 
     | 
    
         
            -
                This file creates a json_parse function.
         
     | 
| 
       3261 
     | 
    
         
            -
             
     | 
| 
       3262 
     | 
    
         
            -
                    json_parse(text, reviver)
         
     | 
| 
       3263 
     | 
    
         
            -
                        This method parses a JSON text to produce an object or array.
         
     | 
| 
       3264 
     | 
    
         
            -
                        It can throw a SyntaxError exception.
         
     | 
| 
       3265 
     | 
    
         
            -
             
     | 
| 
       3266 
     | 
    
         
            -
                        The optional reviver parameter is a function that can filter and
         
     | 
| 
       3267 
     | 
    
         
            -
                        transform the results. It receives each of the keys and values,
         
     | 
| 
       3268 
     | 
    
         
            -
                        and its return value is used instead of the original value.
         
     | 
| 
       3269 
     | 
    
         
            -
                        If it returns what it received, then the structure is not modified.
         
     | 
| 
       3270 
     | 
    
         
            -
                        If it returns undefined then the member is deleted.
         
     | 
| 
       3271 
     | 
    
         
            -
             
     | 
| 
       3272 
     | 
    
         
            -
                        Example:
         
     | 
| 
       3273 
     | 
    
         
            -
             
     | 
| 
       3274 
     | 
    
         
            -
                        // Parse the text. Values that look like ISO date strings will
         
     | 
| 
       3275 
     | 
    
         
            -
                        // be converted to Date objects.
         
     | 
| 
       3276 
     | 
    
         
            -
             
     | 
| 
       3277 
     | 
    
         
            -
                        myData = json_parse(text, function (key, value) {
         
     | 
| 
       3278 
     | 
    
         
            -
                            var a;
         
     | 
| 
       3279 
     | 
    
         
            -
                            if (typeof value === 'string') {
         
     | 
| 
       3280 
     | 
    
         
            -
                                a =
         
     | 
| 
       3281 
     | 
    
         
            -
            /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
         
     | 
| 
       3282 
     | 
    
         
            -
                                if (a) {
         
     | 
| 
       3283 
     | 
    
         
            -
                                    return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
         
     | 
| 
       3284 
     | 
    
         
            -
                                        +a[5], +a[6]));
         
     | 
| 
       3285 
     | 
    
         
            -
                                }
         
     | 
| 
       3286 
     | 
    
         
            -
                            }
         
     | 
| 
       3287 
     | 
    
         
            -
                            return value;
         
     | 
| 
       3288 
     | 
    
         
            -
                        });
         
     | 
| 
       3289 
     | 
    
         
            -
             
     | 
| 
       3290 
     | 
    
         
            -
                This is a reference implementation. You are free to copy, modify, or
         
     | 
| 
       3291 
     | 
    
         
            -
                redistribute.
         
     | 
| 
       3292 
     | 
    
         
            -
             
     | 
| 
       3293 
     | 
    
         
            -
                This code should be minified before deployment.
         
     | 
| 
       3294 
     | 
    
         
            -
                See http://javascript.crockford.com/jsmin.html
         
     | 
| 
       3295 
     | 
    
         
            -
             
     | 
| 
       3296 
     | 
    
         
            -
                USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
         
     | 
| 
       3297 
     | 
    
         
            -
                NOT CONTROL.
         
     | 
| 
       3298 
     | 
    
         
            -
            */
         
     | 
| 
       3299 
2622 
     | 
    
         | 
| 
       3300 
2623 
     | 
    
         
             
            /*members "", "\"", "\/", "\\", at, b, call, charAt, f, fromCharCode,
         
     | 
| 
       3301 
2624 
     | 
    
         
             
                hasOwnProperty, message, n, name, push, r, t, text
         
     | 
| 
       3302 
2625 
     | 
    
         
             
            */
         
     | 
| 
       3303 
2626 
     | 
    
         | 
| 
       3304 
2627 
     | 
    
         
             
            define('ace/mode/json/json_parse', ['require', 'exports', 'module' ], function(require, exports, module) {
         
     | 
| 
       3305 
     | 
    
         
            -
             
     | 
| 
      
 2628 
     | 
    
         
            +
             
     | 
| 
       3306 
2629 
     | 
    
         | 
| 
       3307 
2630 
     | 
    
         
             
            // This is a function that can parse a JSON text, producing a JavaScript
         
     | 
| 
       3308 
2631 
     | 
    
         
             
            // data structure. It is a simple, recursive descent parser. It does not use
         
     |