diff --git a/build/ace/background_tokenizer.js b/build/ace/background_tokenizer.js
index 54e2e4af..d913fca1 100644
--- a/build/ace/background_tokenizer.js
+++ b/build/ace/background_tokenizer.js
@@ -1,5 +1,5 @@
-define(function(f) {
- var i = f("./lib/oop"), j = f("./event_emitter");
+define(function(f, i) {
+ var j = f("pilot/oop"), k = f("pilot/event_emitter").EventEmitter;
f = function(a, c) {
this.running = false;
this.textLines = [];
@@ -9,13 +9,13 @@ define(function(f) {
var b = this;
this.$worker = function() {
if(b.running) {
- for(var e = new Date, g = b.currentLine, d = b.textLines, h = 0, k = c.getLastVisibleRow();b.currentLine < d.length;) {
+ for(var e = new Date, g = b.currentLine, d = b.textLines, h = 0, l = c.getLastVisibleRow();b.currentLine < d.length;) {
b.lines[b.currentLine] = b.$tokenizeRows(b.currentLine, b.currentLine)[0];
b.currentLine++;
h += 1;
if(h % 5 == 0 && new Date - e > 20) {
b.fireUpdateEvent(g, b.currentLine - 1);
- b.running = setTimeout(b.$worker, b.currentLine < k ? 20 : 100);
+ b.running = setTimeout(b.$worker, b.currentLine < l ? 20 : 100);
return
}
}b.running = false;
@@ -24,7 +24,7 @@ define(function(f) {
}
};
(function() {
- i.implement(this, j);
+ j.implement(this, k);
this.setTokenizer = function(a) {
this.tokenizer = a;
this.lines = [];
@@ -36,7 +36,7 @@ define(function(f) {
this.stop()
};
this.fireUpdateEvent = function(a, c) {
- this.$dispatchEvent("update", {data:{first:a, last:c}})
+ this._dispatchEvent("update", {data:{first:a, last:c}})
};
this.start = function(a) {
this.currentLine = Math.min(a || 0, this.currentLine, this.textLines.length);
@@ -75,5 +75,5 @@ define(function(f) {
}return b
}
}).call(f.prototype);
- return f
+ i.BackgroundTokenizer = f
});
\ No newline at end of file
diff --git a/build/ace/commands/default_commands.js b/build/ace/commands/default_commands.js
index 23655967..2341aa26 100644
--- a/build/ace/commands/default_commands.js
+++ b/build/ace/commands/default_commands.js
@@ -1,152 +1,152 @@
define(function(b) {
- b = b("../plugin_manager");
- b.registerCommand("selectall", function(a, c) {
- c.selectAll()
- });
- b.registerCommand("removeline", function(a) {
- a.removeLines()
- });
- b.registerCommand("gotoline", function(a) {
+ b = b("pilot/canon");
+ b.addCommand({name:"selectall", exec:function(a) {
+ a.editor.getSelection().selectAll()
+ }});
+ b.addCommand({name:"removeline", exec:function(a) {
+ a.editor.removeLines()
+ }});
+ b.addCommand({name:"gotoline", exec:function(a) {
var c = parseInt(prompt("Enter line number:"));
- isNaN(c) || a.gotoLine(c)
- });
- b.registerCommand("togglecomment", function(a) {
- a.toggleCommentLines()
- });
- b.registerCommand("findnext", function(a) {
- a.findNext()
- });
- b.registerCommand("findprevious", function(a) {
- a.findPrevious()
- });
- b.registerCommand("find", function(a) {
+ isNaN(c) || a.editor.gotoLine(c)
+ }});
+ b.addCommand({name:"togglecomment", exec:function(a) {
+ a.editor.toggleCommentLines()
+ }});
+ b.addCommand({name:"findnext", exec:function(a) {
+ a.editor.findNext()
+ }});
+ b.addCommand({name:"findprevious", exec:function(a) {
+ a.editor.findPrevious()
+ }});
+ b.addCommand({name:"find", exec:function(a) {
var c = prompt("Find:");
- a.find(c)
- });
- b.registerCommand("undo", function(a) {
- a.undo()
- });
- b.registerCommand("redo", function(a) {
- a.redo()
- });
- b.registerCommand("redo", function(a) {
- a.redo()
- });
- b.registerCommand("overwrite", function(a) {
- a.toggleOverwrite()
- });
- b.registerCommand("copylinesup", function(a) {
- a.copyLinesUp()
- });
- b.registerCommand("movelinesup", function(a) {
- a.moveLinesUp()
- });
- b.registerCommand("selecttostart", function(a, c) {
- c.selectFileStart()
- });
- b.registerCommand("gotostart", function(a) {
- a.navigateFileStart()
- });
- b.registerCommand("selectup", function(a, c) {
- c.selectUp()
- });
- b.registerCommand("golineup", function(a) {
- a.navigateUp()
- });
- b.registerCommand("copylinesdown", function(a) {
- a.copyLinesDown()
- });
- b.registerCommand("movelinesdown", function(a) {
- a.moveLinesDown()
- });
- b.registerCommand("selecttoend", function(a, c) {
- c.selectFileEnd()
- });
- b.registerCommand("gotoend", function(a) {
- a.navigateFileEnd()
- });
- b.registerCommand("selectdown", function(a, c) {
- c.selectDown()
- });
- b.registerCommand("godown", function(a) {
- a.navigateDown()
- });
- b.registerCommand("selectwordleft", function(a, c) {
- c.selectWordLeft()
- });
- b.registerCommand("gotowordleft", function(a) {
- a.navigateWordLeft()
- });
- b.registerCommand("selecttolinestart", function(a, c) {
- c.selectLineStart()
- });
- b.registerCommand("gotolinestart", function(a) {
- a.navigateLineStart()
- });
- b.registerCommand("selectleft", function(a, c) {
- c.selectLeft()
- });
- b.registerCommand("gotoleft", function(a) {
- a.navigateLeft()
- });
- b.registerCommand("selectwordright", function(a, c) {
- c.selectWordRight()
- });
- b.registerCommand("gotowordright", function(a) {
- a.navigateWordRight()
- });
- b.registerCommand("selecttolineend", function(a, c) {
- c.selectLineEnd()
- });
- b.registerCommand("gotolineend", function(a) {
- a.navigateLineEnd()
- });
- b.registerCommand("selectright", function(a, c) {
- c.selectRight()
- });
- b.registerCommand("gotoright", function(a) {
- a.navigateRight()
- });
- b.registerCommand("selectpagedown", function(a) {
- a.selectPageDown()
- });
- b.registerCommand("pagedown", function(a) {
- a.scrollPageDown()
- });
- b.registerCommand("gotopagedown", function(a) {
- a.gotoPageDown()
- });
- b.registerCommand("selectpageup", function(a) {
- a.selectPageUp()
- });
- b.registerCommand("pageup", function(a) {
- a.scrollPageUp()
- });
- b.registerCommand("gotopageup", function(a) {
- a.gotoPageUp()
- });
- b.registerCommand("selectlinestart", function(a, c) {
- c.selectLineStart()
- });
- b.registerCommand("gotolinestart", function(a) {
- a.navigateLineStart()
- });
- b.registerCommand("selectlineend", function(a, c) {
- c.selectLineEnd()
- });
- b.registerCommand("gotolineend", function(a) {
- a.navigateLineEnd()
- });
- b.registerCommand("del", function(a) {
- a.removeRight()
- });
- b.registerCommand("backspace", function(a) {
- a.removeLeft()
- });
- b.registerCommand("outdent", function(a) {
- a.blockOutdent()
- });
- b.registerCommand("indent", function(a) {
- a.indent()
- })
+ a.editor.find(c)
+ }});
+ b.addCommand({name:"undo", exec:function(a) {
+ a.editor.undo()
+ }});
+ b.addCommand({name:"redo", exec:function(a) {
+ a.editor.redo()
+ }});
+ b.addCommand({name:"redo", exec:function(a) {
+ a.editor.redo()
+ }});
+ b.addCommand({name:"overwrite", exec:function(a) {
+ a.editor.toggleOverwrite()
+ }});
+ b.addCommand({name:"copylinesup", exec:function(a) {
+ a.editor.copyLinesUp()
+ }});
+ b.addCommand({name:"movelinesup", exec:function(a) {
+ a.editor.moveLinesUp()
+ }});
+ b.addCommand({name:"selecttostart", exec:function(a) {
+ a.editor.getSelection().selectFileStart()
+ }});
+ b.addCommand({name:"gotostart", exec:function(a) {
+ a.editor.navigateFileStart()
+ }});
+ b.addCommand({name:"selectup", exec:function(a) {
+ a.editor.getSelection().selectUp()
+ }});
+ b.addCommand({name:"golineup", exec:function(a) {
+ a.editor.navigateUp()
+ }});
+ b.addCommand({name:"copylinesdown", exec:function(a) {
+ a.editor.copyLinesDown()
+ }});
+ b.addCommand({name:"movelinesdown", exec:function(a) {
+ a.editor.moveLinesDown()
+ }});
+ b.addCommand({name:"selecttoend", exec:function(a) {
+ a.editor.getSelection().selectFileEnd()
+ }});
+ b.addCommand({name:"gotoend", exec:function(a) {
+ a.editor.navigateFileEnd()
+ }});
+ b.addCommand({name:"selectdown", exec:function(a) {
+ a.editor.getSelection().selectDown()
+ }});
+ b.addCommand({name:"godown", exec:function(a) {
+ a.editor.navigateDown()
+ }});
+ b.addCommand({name:"selectwordleft", exec:function(a) {
+ a.editor.getSelection().selectWordLeft()
+ }});
+ b.addCommand({name:"gotowordleft", exec:function(a) {
+ a.editor.navigateWordLeft()
+ }});
+ b.addCommand({name:"selecttolinestart", exec:function(a) {
+ a.editor.getSelection().selectLineStart()
+ }});
+ b.addCommand({name:"gotolinestart", exec:function(a) {
+ a.editor.navigateLineStart()
+ }});
+ b.addCommand({name:"selectleft", exec:function(a) {
+ a.editor.getSelection().selectLeft()
+ }});
+ b.addCommand({name:"gotoleft", exec:function(a) {
+ a.editor.navigateLeft()
+ }});
+ b.addCommand({name:"selectwordright", exec:function(a) {
+ a.editor.getSelection().selectWordRight()
+ }});
+ b.addCommand({name:"gotowordright", exec:function(a) {
+ a.editor.navigateWordRight()
+ }});
+ b.addCommand({name:"selecttolineend", exec:function(a) {
+ a.editor.getSelection().selectLineEnd()
+ }});
+ b.addCommand({name:"gotolineend", exec:function(a) {
+ a.editor.navigateLineEnd()
+ }});
+ b.addCommand({name:"selectright", exec:function(a) {
+ a.editor.getSelection().selectRight()
+ }});
+ b.addCommand({name:"gotoright", exec:function(a) {
+ a.editor.navigateRight()
+ }});
+ b.addCommand({name:"selectpagedown", exec:function(a) {
+ a.editor.selectPageDown()
+ }});
+ b.addCommand({name:"pagedown", exec:function(a) {
+ a.editor.scrollPageDown()
+ }});
+ b.addCommand({name:"gotopagedown", exec:function(a) {
+ a.editor.gotoPageDown()
+ }});
+ b.addCommand({name:"selectpageup", exec:function(a) {
+ a.editor.selectPageUp()
+ }});
+ b.addCommand({name:"pageup", exec:function(a) {
+ a.editor.scrollPageUp()
+ }});
+ b.addCommand({name:"gotopageup", exec:function(a) {
+ a.editor.gotoPageUp()
+ }});
+ b.addCommand({name:"selectlinestart", exec:function(a) {
+ a.editor.getSelection().selectLineStart()
+ }});
+ b.addCommand({name:"gotolinestart", exec:function(a) {
+ a.editor.navigateLineStart()
+ }});
+ b.addCommand({name:"selectlineend", exec:function(a) {
+ a.editor.getSelection().selectLineEnd()
+ }});
+ b.addCommand({name:"gotolineend", exec:function(a) {
+ a.editor.navigateLineEnd()
+ }});
+ b.addCommand({name:"del", exec:function(a) {
+ a.editor.removeRight()
+ }});
+ b.addCommand({name:"backspace", exec:function(a) {
+ a.editor.removeLeft()
+ }});
+ b.addCommand({name:"outdent", exec:function(a) {
+ a.editor.blockOutdent()
+ }});
+ b.addCommand({name:"indent", exec:function(a) {
+ a.editor.indent()
+ }})
});
\ No newline at end of file
diff --git a/build/ace/conf/keybindings/default_mac.js b/build/ace/conf/keybindings/default_mac.js
index 1c61910a..057e7405 100644
--- a/build/ace/conf/keybindings/default_mac.js
+++ b/build/ace/conf/keybindings/default_mac.js
@@ -1,5 +1,5 @@
-define(function() {
- return{selectall:"Command-A", removeline:"Command-D", gotoline:"Command-L", togglecomment:"Command-7", findnext:"Command-K", findprevious:"Command-Shift-K", find:"Command-F", replace:"Command-R", undo:"Command-Z", redo:"Command-Shift-Z|Command-Y", overwrite:"Insert", copylinesup:"Command-Option-Up", movelinesup:"Option-Up", selecttostart:"Command-Shift-Up", gotostart:"Command-Home|Command-Up", selectup:"Shift-Up", golineup:"Up", copylinesdown:"Command-Option-Down", movelinesdown:"Option-Down",
+define(function(b, a) {
+ a.bindings = {selectall:"Command-A", removeline:"Command-D", gotoline:"Command-L", togglecomment:"Command-7", findnext:"Command-K", findprevious:"Command-Shift-K", find:"Command-F", replace:"Command-R", undo:"Command-Z", redo:"Command-Shift-Z|Command-Y", overwrite:"Insert", copylinesup:"Command-Option-Up", movelinesup:"Option-Up", selecttostart:"Command-Shift-Up", gotostart:"Command-Home|Command-Up", selectup:"Shift-Up", golineup:"Up", copylinesdown:"Command-Option-Down", movelinesdown:"Option-Down",
selecttoend:"Command-Shift-Down", gotoend:"Command-End|Command-Down", selectdown:"Shift-Down", godown:"Down", selectwordleft:"Option-Shift-Left", gotowordleft:"Option-Left", selecttolinestart:"Command-Shift-Left", gotolinestart:"Command-Left|Home", selectleft:"Shift-Left", gotoleft:"Left", selectwordright:"Option-Shift-Right", gotowordright:"Option-Right", selecttolineend:"Command-Shift-Right", gotolineend:"Command-Right|End", selectright:"Shift-Right", gotoright:"Right", selectpagedown:"Shift-PageDown",
pagedown:"PageDown", selectpageup:"Shift-PageUp", pageup:"PageUp", selectlinestart:"Shift-Home", selectlineend:"Shift-End", del:"Delete", backspace:"Ctrl-Backspace|Command-Backspace|Option-Backspace|Backspace", outdent:"Shift-Tab", indent:"Tab"}
});
\ No newline at end of file
diff --git a/build/ace/conf/keybindings/default_win.js b/build/ace/conf/keybindings/default_win.js
index 428c47b0..60ff898f 100644
--- a/build/ace/conf/keybindings/default_win.js
+++ b/build/ace/conf/keybindings/default_win.js
@@ -1,5 +1,5 @@
-define(function() {
- return{selectall:"Ctrl-A", removeline:"Ctrl-D", gotoline:"Ctrl-L", togglecomment:"Ctrl-7", findnext:"Ctrl-K", findprevious:"Ctrl-Shift-K", find:"Ctrl-F", replace:"Ctrl-R", undo:"Ctrl-Z", redo:"Ctrl-Shift-Z|Ctrl-Y", overwrite:"Insert", copylinesup:"Ctrl-Alt-Up", movelinesup:"Alt-Up", selecttostart:"Alt-Shift-Up", gotostart:"Ctrl-Home|Ctrl-Up", selectup:"Shift-Up", golineup:"Up", copylinesdown:"Ctrl-Alt-Down", movelinesdown:"Alt-Down", selecttoend:"Alt-Shift-Down", gotoend:"Ctrl-End|Ctrl-Down", selectdown:"Shift-Down",
- godown:"Down", selectwordleft:"Ctrl-Shift-Left", gotowordleft:"Ctrl-Left", selecttolinestart:"Alt-Shift-Left", gotolinestart:"Alt-Left|Home", selectleft:"Shift-Left", gotoleft:"Left", selectwordright:"Ctrl-Shift-Right", gotowordright:"Ctrl-Right", selecttolineend:"Alt-Shift-Right", gotolineend:"Alt-Right|End", selectright:"Shift-Right", gotoright:"Right", selectpagedown:"Shift-PageDown", pagedown:"PageDown", selectpageup:"Shift-PageUp", pageup:"PageUp", selectlinestart:"Shift-Home", selectlineend:"Shift-End",
- del:"Delete", backspace:"Backspace", outdent:"Shift-Tab", indent:"Tab"}
+define(function(b, a) {
+ a.bindings = {selectall:"Ctrl-A", removeline:"Ctrl-D", gotoline:"Ctrl-L", togglecomment:"Ctrl-7", findnext:"Ctrl-K", findprevious:"Ctrl-Shift-K", find:"Ctrl-F", replace:"Ctrl-R", undo:"Ctrl-Z", redo:"Ctrl-Shift-Z|Ctrl-Y", overwrite:"Insert", copylinesup:"Ctrl-Alt-Up", movelinesup:"Alt-Up", selecttostart:"Alt-Shift-Up", gotostart:"Ctrl-Home|Ctrl-Up", selectup:"Shift-Up", golineup:"Up", copylinesdown:"Ctrl-Alt-Down", movelinesdown:"Alt-Down", selecttoend:"Alt-Shift-Down", gotoend:"Ctrl-End|Ctrl-Down",
+ selectdown:"Shift-Down", godown:"Down", selectwordleft:"Ctrl-Shift-Left", gotowordleft:"Ctrl-Left", selecttolinestart:"Alt-Shift-Left", gotolinestart:"Alt-Left|Home", selectleft:"Shift-Left", gotoleft:"Left", selectwordright:"Ctrl-Shift-Right", gotowordright:"Ctrl-Right", selecttolineend:"Alt-Shift-Right", gotolineend:"Alt-Right|End", selectright:"Shift-Right", gotoright:"Right", selectpagedown:"Shift-PageDown", pagedown:"PageDown", selectpageup:"Shift-PageUp", pageup:"PageUp", selectlinestart:"Shift-Home",
+ selectlineend:"Shift-End", del:"Delete", backspace:"Backspace", outdent:"Shift-Tab", indent:"Tab"}
});
\ No newline at end of file
diff --git a/build/ace/document.js b/build/ace/document.js
index 681bad90..64257f27 100644
--- a/build/ace/document.js
+++ b/build/ace/document.js
@@ -1,16 +1,16 @@
-define(function(g) {
- var l = g("./lib/oop"), j = g("./lib/lang"), m = g("./event_emitter"), n = g("./selection"), o = g("./mode/text"), h = g("./range");
- g = function(a, b) {
+define(function(i, l) {
+ var m = i("pilot/oop"), k = i("pilot/lang"), n = i("pilot/event_emitter").EventEmitter, o = i("ace/selection").Selection, p = i("ace/mode/text").Mode, j = i("ace/range").Range;
+ i = function(a, b) {
this.modified = true;
this.lines = [];
- this.selection = new n(this);
+ this.selection = new o(this);
this.$breakpoints = [];
this.listeners = [];
b && this.setMode(b);
- j.isArray(a) ? this.$insertLines(0, a) : this.$insert({row:0, column:0}, a)
+ Array.isArray(a) ? this.$insertLines(0, a) : this.$insert({row:0, column:0}, a)
};
(function() {
- l.implement(this, m);
+ m.implement(this, n);
this.$undoManager = null;
this.$split = function(a) {
return a.split(/\r\n|\r|\n/)
@@ -29,7 +29,7 @@ define(function(g) {
return this.selection
};
this.fireChangeEvent = function(a, b) {
- this.$dispatchEvent("change", {data:{firstRow:a, lastRow:b}})
+ this._dispatchEvent("change", {data:{firstRow:a, lastRow:b}})
};
this.setUndoManager = function(a) {
this.$undoManager = a;
@@ -37,7 +37,7 @@ define(function(g) {
this.$informUndoManager && this.$informUndoManager.cancel();
if(a) {
var b = this;
- this.$informUndoManager = j.deferredCall(function() {
+ this.$informUndoManager = k.deferredCall(function() {
b.$deltas.length > 0 && a.execute({action:"aceupdate", args:[b.$deltas, b]});
b.$deltas = []
})
@@ -50,7 +50,7 @@ define(function(g) {
return this.$undoManager || this.$defaultUndoManager
};
this.getTabString = function() {
- return this.getUseSoftTabs() ? j.stringRepeat(" ", this.getTabSize()) : "\t"
+ return this.getUseSoftTabs() ? k.stringRepeat(" ", this.getTabSize()) : "\t"
};
this.$useSoftTabs = true;
this.setUseSoftTabs = function(a) {
@@ -66,12 +66,15 @@ define(function(g) {
if(!(isNaN(a) || this.$tabSize === a)) {
this.modified = true;
this.$tabSize = a;
- this.$dispatchEvent("changeTabSize")
+ this._dispatchEvent("changeTabSize")
}
};
this.getTabSize = function() {
return this.$tabSize
};
+ this.isTabStop = function(a) {
+ return this.$useSoftTabs && a.column % this.$tabSize == 0
+ };
this.getBreakpoints = function() {
return this.$breakpoints
};
@@ -79,19 +82,19 @@ define(function(g) {
this.$breakpoints = [];
for(var b = 0;b < a.length;b++) {
this.$breakpoints[a[b]] = true
- }this.$dispatchEvent("changeBreakpoint", {})
+ }this._dispatchEvent("changeBreakpoint", {})
};
this.clearBreakpoints = function() {
this.$breakpoints = [];
- this.$dispatchEvent("changeBreakpoint", {})
+ this._dispatchEvent("changeBreakpoint", {})
};
this.setBreakpoint = function(a) {
this.$breakpoints[a] = true;
- this.$dispatchEvent("changeBreakpoint", {})
+ this._dispatchEvent("changeBreakpoint", {})
};
this.clearBreakpoint = function(a) {
delete this.$breakpoints[a];
- this.$dispatchEvent("changeBreakpoint", {})
+ this._dispatchEvent("changeBreakpoint", {})
};
this.$detectNewLine = function(a) {
this.$autoNewLine = (a = a.match(/^.*?(\r?\n)/m)) ? a[1] : "\n"
@@ -112,7 +115,7 @@ define(function(g) {
e++
}for(b = b;b < c.length && c.charAt(b).match(d);) {
b++
- }return new h(a, e, a, b)
+ }return new j(a, e, a, b)
};
this.$getNewLineCharacter = function() {
switch(this.$newLineMode) {
@@ -138,19 +141,19 @@ define(function(g) {
this.setMode = function(a) {
if(this.$mode !== a) {
this.$mode = a;
- this.$dispatchEvent("changeMode")
+ this._dispatchEvent("changeMode")
}
};
this.getMode = function() {
if(!this.$mode) {
- this.$mode = new o
+ this.$mode = new p
}return this.$mode
};
this.$scrollTop = 0;
this.setScrollTopRow = function(a) {
if(this.$scrollTop !== a) {
this.$scrollTop = a;
- this.$dispatchEvent("changeScrollTop")
+ this._dispatchEvent("changeScrollTop")
}
};
this.getScrollTopRow = function() {
@@ -162,7 +165,7 @@ define(function(g) {
};
this.getScreenWidth = function() {
this.$computeWidth();
- return this.screenWith
+ return this.screenWidth
};
this.$computeWidth = function() {
if(this.modified) {
@@ -170,13 +173,13 @@ define(function(g) {
for(var a = this.lines, b = 0, c = 0, d = this.getTabSize(), e = 0;e < a.length;e++) {
var f = a[e].length;
b = Math.max(b, f);
- a[e].replace("\t", function(i) {
+ a[e].replace("\t", function(g) {
f += d - 1;
- return i
+ return g
});
c = Math.max(c, f)
}this.width = b;
- this.screenWith = c
+ this.screenWidth = c
}
};
this.getLine = function(a) {
@@ -220,14 +223,14 @@ define(function(g) {
b = b.row;
for(var e = 1, f = this.getLine(b);;) {
for(;d >= 0;) {
- var i = f.charAt(d);
- if(i == c) {
+ var g = f.charAt(d);
+ if(g == c) {
e -= 1;
if(e == 0) {
return{row:b, column:d}
}
}else {
- if(i == a) {
+ if(g == a) {
e += 1
}
}d -= 1
@@ -241,21 +244,21 @@ define(function(g) {
this.$findClosingBracket = function(a, b) {
var c = this.$brackets[a], d = b.column;
b = b.row;
- for(var e = 1, f = this.getLine(b), i = this.getLength();;) {
+ for(var e = 1, f = this.getLine(b), g = this.getLength();;) {
for(;d < f.length;) {
- var k = f.charAt(d);
- if(k == c) {
+ var h = f.charAt(d);
+ if(h == c) {
e -= 1;
if(e == 0) {
return{row:b, column:d}
}
}else {
- if(k == a) {
+ if(h == a) {
e += 1
}
}d += 1
}b += 1;
- if(b >= i) {
+ if(b >= g) {
break
}f = this.getLine(b);
d = 0
@@ -266,6 +269,26 @@ define(function(g) {
this.fireChangeEvent(a.row, a.row == b.row ? a.row : undefined);
return b
};
+ this.multiRowInsert = function(a, b, c) {
+ for(var d = this.lines, e = a.length - 1;e >= 0;e--) {
+ var f = a[e];
+ if(!(f >= d.length)) {
+ var g = b - d[f].length;
+ if(g > 0) {
+ var h = k.stringRepeat(" ", g) + c;
+ g = -g
+ }else {
+ h = c;
+ g = 0
+ }h = this.$insert({row:f, column:b + g}, h, false)
+ }
+ }if(h) {
+ this.fireChangeEvent(a[0], a[a.length - 1] + h.row - a[0]);
+ return{rows:h.row - a[0], columns:h.column - b}
+ }else {
+ return{rows:0, columns:0}
+ }
+ };
this.$insertLines = function(a, b, c) {
if(b.length != 0) {
var d = [a, 0];
@@ -273,7 +296,7 @@ define(function(g) {
this.lines.splice.apply(this.lines, d);
if(!c && this.$undoManager) {
c = this.$getNewLineCharacter();
- this.$deltas.push({action:"insertText", range:new h(a, 0, a + b.length, 0), text:b.join(c) + c});
+ this.$deltas.push({action:"insertText", range:new j(a, 0, a + b.length, 0), text:b.join(c) + c});
this.$informUndoManager.schedule()
}
}
@@ -304,7 +327,7 @@ define(function(g) {
d = {row:a.row + d.length - 1, column:d[d.length - 1].length}
}
}if(!c && this.$undoManager) {
- this.$deltas.push({action:"insertText", range:h.fromPoints(a, d), text:b});
+ this.$deltas.push({action:"insertText", range:j.fromPoints(a, d), text:b});
this.$informUndoManager.schedule()
}return d
};
@@ -318,6 +341,18 @@ define(function(g) {
this.fireChangeEvent(a.start.row, a.isMultiLine() ? undefined : a.start.row);
return a.start
};
+ this.multiRowRemove = function(a, b) {
+ if(b.start.row !== a[0]) {
+ throw new TypeError("range must start in the first row!");
+ }for(var c = b.end.row - a[0], d = a.length - 1;d >= 0;d--) {
+ var e = a[d];
+ if(!(e >= this.lines.length)) {
+ var f = this.$remove(new j(e, b.start.column, e + c, b.end.column), false)
+ }
+ }if(f) {
+ c < 0 ? this.fireChangeEvent(a[0] + c, undefined) : this.fireChangeEvent(a[0], c == 0 ? a[a.length - 1] : undefined)
+ }
+ };
this.$remove = function(a, b) {
if(!a.isEmpty()) {
if(!b && this.$undoManager) {
@@ -364,33 +399,33 @@ define(function(g) {
this.fireChangeEvent(a.start.row, c == b.row ? c : undefined);
return b
};
- this.indentRows = function(a, b) {
- b.replace("\t", this.getTabString());
- for(var c = a.start.row;c <= a.end.row;c++) {
- this.$insert({row:c, column:0}, b)
- }this.fireChangeEvent(a.start.row, a.end.row);
- return b.length
+ this.indentRows = function(a, b, c) {
+ c = c.replace("\t", this.getTabString());
+ for(var d = a;d <= b;d++) {
+ this.$insert({row:d, column:0}, c)
+ }this.fireChangeEvent(a, b);
+ return c.length
};
this.outdentRows = function(a) {
- for(var b = new h(0, 0, 0, 0), c = this.getTabSize(), d = a.start.row;d <= a.end.row;++d) {
- var e = this.getLine(d);
- b.start.row = d;
- b.end.row = d;
- for(var f = 0;f < c;++f) {
- if(e.charAt(f) != " ") {
+ for(var b = a.collapseRows(), c = new j(0, 0, 0, 0), d = this.getTabSize(), e = b.start.row;e <= b.end.row;++e) {
+ var f = this.getLine(e);
+ c.start.row = e;
+ c.end.row = e;
+ for(var g = 0;g < d;++g) {
+ if(f.charAt(g) != " ") {
break
}
- }if(f < c && e.charAt(f) == "\t") {
- b.start.column = f;
- b.end.column = f + 1
+ }if(g < d && f.charAt(g) == "\t") {
+ c.start.column = g;
+ c.end.column = g + 1
}else {
- b.start.column = 0;
- b.end.column = f
- }if(d == a.start.row) {
- a.start.column -= b.end.column - b.start.column
- }if(d == a.end.row) {
- a.end.column -= b.end.column - b.start.column
- }this.$remove(b)
+ c.start.column = 0;
+ c.end.column = g
+ }if(e == a.start.row) {
+ a.start.column -= c.end.column - c.start.column
+ }if(e == a.end.row) {
+ a.end.column -= c.end.column - c.start.column
+ }this.$remove(c)
}this.fireChangeEvent(a.start.row, a.end.row);
return a
};
@@ -398,7 +433,7 @@ define(function(g) {
if(a <= 0) {
return 0
}var c = this.lines.slice(a, b + 1);
- this.$remove(new h(a, 0, b + 1, 0));
+ this.$remove(new j(a - 1, this.lines[a - 1].length, b, this.lines[b].length));
this.$insertLines(a - 1, c);
this.fireChangeEvent(a - 1, b);
return-1
@@ -407,7 +442,7 @@ define(function(g) {
if(b >= this.lines.length - 1) {
return 0
}var c = this.lines.slice(a, b + 1);
- this.$remove(new h(a, 0, b + 1, 0));
+ this.$remove(new j(a, 0, b + 1, 0));
this.$insertLines(a + 1, c);
this.fireChangeEvent(a, b + 1);
return 1
@@ -454,6 +489,6 @@ define(function(g) {
}
}return d
}
- }).call(g.prototype);
- return g
+ }).call(i.prototype);
+ l.Document = i
});
\ No newline at end of file
diff --git a/build/ace/editor.js b/build/ace/editor.js
index 731b5f77..164ae2ef 100644
--- a/build/ace/editor.js
+++ b/build/ace/editor.js
@@ -1,704 +1,947 @@
-/*
- RequireJS text Copyright (c) 2010, The Dojo Foundation All Rights Reserved.
- Available via the MIT or new BSD license.
- see: http://github.com/jrburke/requirejs for details
-*/
-(function() {
- var h = ["Msxml2.XMLHTTP", "Microsoft.XMLHTTP", "Msxml2.XMLHTTP.4.0"], g = /^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im, e = /
]*>\s*([\s\S]+)\s*<\/body>/im;
- if(!require.textStrip) {
- require.textStrip = function(c) {
- if(c) {
- c = c.replace(g, "");
- var i = c.match(e);
- if(i) {
- c = i[1]
- }
- }else {
- c = ""
- }return c
- }
- }if(!require.getXhr) {
- require.getXhr = function() {
- var c, i, b;
- if(typeof XMLHttpRequest !== "undefined") {
- return new XMLHttpRequest
- }else {
- for(i = 0;i < 3;i++) {
- b = h[i];
- try {
- c = new ActiveXObject(b)
- }catch(j) {
- }if(c) {
- h = [b];
- break
- }
- }
- }if(!c) {
- throw new Error("require.getXhr(): XMLHttpRequest not available");
- }return c
- }
- }if(!require.fetchText) {
- require.fetchText = function(c, i) {
- var b = require.getXhr();
- b.open("GET", c, true);
- b.onreadystatechange = function() {
- b.readyState === 4 && i(b.responseText)
- };
- b.send(null)
- }
- }require.plugin({prefix:"text", require:function() {
- }, newContext:function(c) {
- require.mixin(c, {text:{}, textWaiting:[]})
- }, load:function(c, i) {
- var b = false, j = null, a, f = c.indexOf("."), l = c.substring(0, f), n = c.substring(f + 1, c.length), d = require.s.contexts[i], k = d.textWaiting;
- f = n.indexOf("!");
- if(f !== -1) {
- b = n.substring(f + 1, n.length);
- n = n.substring(0, f);
- f = b.indexOf("!");
- if(f !== -1 && b.substring(0, f) === "strip") {
- j = b.substring(f + 1, b.length);
- b = "strip"
- }else {
- if(b !== "strip") {
- j = b;
- b = null
- }
- }
- }a = l + "!" + n;
- f = b ? a + "!" + b : a;
- if(j !== null && !d.text[a]) {
- d.defined[c] = d.text[a] = j
- }else {
- if(!d.text[a] && !d.textWaiting[a] && !d.textWaiting[f]) {
- k[f] || (k[f] = k[k.push({name:c, key:a, fullKey:f, strip:!!b}) - 1]);
- i = require.nameToUrl(l, "." + n, i);
- d.loaded[c] = false;
- require.fetchText(i, function(p) {
- d.text[a] = p;
- d.loaded[c] = true
- })
- }
- }
- }, checkDeps:function() {
- }, isWaiting:function(c) {
- return!!c.textWaiting.length
- }, orderDeps:function(c) {
- var i, b, j, a = c.textWaiting;
- c.textWaiting = [];
- for(i = 0;b = a[i];i++) {
- j = c.text[b.key];
- c.defined[b.name] = b.strip ? require.textStrip(j) : j
- }
- }})
-})();
-define("ace/lib/oop", ["require", "exports", "module"], function() {
- var h = {};
- h.inherits = function(g, e) {
- var c = function() {
+define("pilot/oop", ["require", "exports", "module"], function(j, g) {
+ g.inherits = function(l, e) {
+ var i = function() {
};
- c.prototype = e.prototype;
- g.super_ = e.prototype;
- g.prototype = new c;
- g.prototype.constructor = g
+ i.prototype = e.prototype;
+ l.super_ = e.prototype;
+ l.prototype = new i;
+ l.prototype.constructor = l
};
- h.mixin = function(g, e) {
- for(var c in e) {
- g[c] = e[c]
+ g.mixin = function(l, e) {
+ for(var i in e) {
+ l[i] = e[i]
}
};
- h.implement = function(g, e) {
- h.mixin(g, e)
- };
- return h
+ g.implement = function(l, e) {
+ g.mixin(l, e)
+ }
});
-define("ace/lib/core", ["require", "exports", "module"], function() {
- var h = {}, g = (navigator.platform.match(/mac|win|linux/i) || ["other"])[0].toLowerCase();
- h.isWin = g == "win";
- h.isMac = g == "mac";
- h.isLinux = g == "linux";
- h.isIE = !+"\u000b1";
- h.isGecko = window.controllers && window.navigator.product === "Gecko";
- h.provide = function(e) {
- e = e.split(".");
- for(var c = window, i = 0;i < e.length;i++) {
- var b = e[i];
- c[b] || (c[b] = {});
- c = c[b]
- }
- };
- return h
+define("pilot/useragent", ["require", "exports", "module"], function(j, g) {
+ j = (navigator.platform.match(/mac|win|linux/i) || ["other"])[0].toLowerCase();
+ var l = navigator.userAgent;
+ g.isWin = j == "win";
+ g.isMac = j == "mac";
+ g.isLinux = j == "linux";
+ g.isIE = !+"\u000b1";
+ g.isGecko = g.isMozilla = window.controllers && window.navigator.product === "Gecko";
+ g.isOpera = window.opera && Object.prototype.toString.call(window.opera) == "[object Opera]";
+ g.isWebKit = parseFloat(l.split("WebKit/")[1]) || undefined;
+ g.isAIR = l.indexOf("AdobeAIR") >= 0;
+ g.OS = {LINUX:"LINUX", MAC:"MAC", WINDOWS:"WINDOWS"};
+ g.getOS = function() {
+ return g.isMac ? g.OS.MAC : g.isLinux ? g.OS.LINUX : g.OS.WINDOWS
+ }
});
-define("ace/lib/event", ["require", "exports", "module", "./core"], function(h) {
- var g = h("./core"), e = {};
- e.addListener = function(c, i, b) {
- if(c.addEventListener) {
- return c.addEventListener(i, b, false)
- }if(c.attachEvent) {
- var j = function() {
- b(window.event)
+define("pilot/event", ["require", "exports", "module", "pilot/useragent"], function(j, g) {
+ var l = j("pilot/useragent");
+ g.addListener = function(e, i, o) {
+ if(e.addEventListener) {
+ return e.addEventListener(i, o, false)
+ }if(e.attachEvent) {
+ var d = function() {
+ o(window.event)
};
- b.$$wrapper = j;
- c.attachEvent("on" + i, j)
+ o._wrapper = d;
+ e.attachEvent("on" + i, d)
}
};
- e.removeListener = function(c, i, b) {
- if(c.removeEventListener) {
- return c.removeEventListener(i, b, false)
- }if(c.detachEvent) {
- c.detachEvent("on" + i, b.$$wrapper || b)
+ g.removeListener = function(e, i, o) {
+ if(e.removeEventListener) {
+ return e.removeEventListener(i, o, false)
+ }if(e.detachEvent) {
+ e.detachEvent("on" + i, o._wrapper || o)
}
};
- e.stopEvent = function(c) {
- e.stopPropagation(c);
- e.preventDefault(c);
+ g.stopEvent = function(e) {
+ g.stopPropagation(e);
+ g.preventDefault(e);
return false
};
- e.stopPropagation = function(c) {
- if(c.stopPropagation) {
- c.stopPropagation()
+ g.stopPropagation = function(e) {
+ if(e.stopPropagation) {
+ e.stopPropagation()
}else {
- c.cancelBubble = true
+ e.cancelBubble = true
}
};
- e.preventDefault = function(c) {
- if(c.preventDefault) {
- c.preventDefault()
+ g.preventDefault = function(e) {
+ if(e.preventDefault) {
+ e.preventDefault()
}else {
- c.returnValue = false
+ e.returnValue = false
}
};
- e.getDocumentX = function(c) {
- return c.clientX ? c.clientX + (document.documentElement.scrollLeft || document.body.scrollLeft) : c.pageX
+ g.getDocumentX = function(e) {
+ return e.clientX ? e.clientX + (document.documentElement.scrollLeft || document.body.scrollLeft) : e.pageX
};
- e.getDocumentY = function(c) {
- return c.clientY ? c.clientY + (document.documentElement.scrollTop || document.body.scrollTop) : c.pageX
+ g.getDocumentY = function(e) {
+ return e.clientY ? e.clientY + (document.documentElement.scrollTop || document.body.scrollTop) : e.pageX
};
- e.getButton = function(c) {
- return c.preventDefault ? c.button : Math.max(c.button - 1, 2)
+ g.getButton = function(e) {
+ return e.preventDefault ? e.button : Math.max(e.button - 1, 2)
};
- e.capture = document.documentElement.setCapture ? function(c, i, b) {
- function j(a) {
+ g.capture = document.documentElement.setCapture ? function(e, i, o) {
+ function d(k) {
+ i && i(k);
+ o && o();
+ g.removeListener(e, "mousemove", i);
+ g.removeListener(e, "mouseup", d);
+ g.removeListener(e, "losecapture", d);
+ e.releaseCapture()
+ }
+ g.addListener(e, "mousemove", i);
+ g.addListener(e, "mouseup", d);
+ g.addListener(e, "losecapture", d);
+ e.setCapture()
+ } : function(e, i, o) {
+ function d(a) {
+ i(a);
+ a.stopPropagation()
+ }
+ function k(a) {
i && i(a);
- b && b();
- e.removeListener(c, "mousemove", i);
- e.removeListener(c, "mouseup", j);
- e.removeListener(c, "losecapture", j);
- c.releaseCapture()
+ o && o();
+ document.removeEventListener("mousemove", d, true);
+ document.removeEventListener("mouseup", k, true);
+ a.stopPropagation()
}
- e.addListener(c, "mousemove", i);
- e.addListener(c, "mouseup", j);
- e.addListener(c, "losecapture", j);
- c.setCapture()
- } : function(c, i, b) {
- function j(f) {
- i(f);
- f.stopPropagation()
- }
- function a(f) {
- i && i(f);
- b && b();
- document.removeEventListener("mousemove", j, true);
- document.removeEventListener("mouseup", a, true);
- f.stopPropagation()
- }
- document.addEventListener("mousemove", j, true);
- document.addEventListener("mouseup", a, true)
+ document.addEventListener("mousemove", d, true);
+ document.addEventListener("mouseup", k, true)
};
- e.addMouseWheelListener = function(c, i) {
- var b = function(j) {
- if(j.wheelDelta !== undefined) {
- if(j.wheelDeltaX !== undefined) {
- j.wheelX = -j.wheelDeltaX / 8;
- j.wheelY = -j.wheelDeltaY / 8
+ g.addMouseWheelListener = function(e, i) {
+ var o = function(d) {
+ if(d.wheelDelta !== undefined) {
+ if(d.wheelDeltaX !== undefined) {
+ d.wheelX = -d.wheelDeltaX / 8;
+ d.wheelY = -d.wheelDeltaY / 8
}else {
- j.wheelX = 0;
- j.wheelY = -j.wheelDelta / 8
+ d.wheelX = 0;
+ d.wheelY = -d.wheelDelta / 8
}
}else {
- if(j.axis && j.axis == j.HORIZONTAL_AXIS) {
- j.wheelX = (j.detail || 0) * 5;
- j.wheelY = 0
+ if(d.axis && d.axis == d.HORIZONTAL_AXIS) {
+ d.wheelX = (d.detail || 0) * 5;
+ d.wheelY = 0
}else {
- j.wheelX = 0;
- j.wheelY = (j.detail || 0) * 5
+ d.wheelX = 0;
+ d.wheelY = (d.detail || 0) * 5
}
- }i(j)
+ }i(d)
};
- e.addListener(c, "DOMMouseScroll", b);
- e.addListener(c, "mousewheel", b)
+ g.addListener(e, "DOMMouseScroll", o);
+ g.addListener(e, "mousewheel", o)
};
- e.addMultiMouseDownListener = function(c, i, b, j, a) {
- var f = 0, l, n, d = function(k) {
- f += 1;
- if(f == 1) {
- l = k.clientX;
- n = k.clientY;
+ g.addMultiMouseDownListener = function(e, i, o, d, k) {
+ var a = 0, f, h, m = function(b) {
+ a += 1;
+ if(a == 1) {
+ f = b.clientX;
+ h = b.clientY;
setTimeout(function() {
- f = 0
- }, j || 600)
- }if(e.getButton(k) != i || Math.abs(k.clientX - l) > 5 || Math.abs(k.clientY - n) > 5) {
- f = 0
- }if(f == b) {
- f = 0;
- a(k)
- }return e.preventDefault(k)
+ a = 0
+ }, d || 600)
+ }if(g.getButton(b) != i || Math.abs(b.clientX - f) > 5 || Math.abs(b.clientY - h) > 5) {
+ a = 0
+ }if(a == o) {
+ a = 0;
+ k(b)
+ }return g.preventDefault(b)
};
- e.addListener(c, "mousedown", d);
- g.isIE && e.addListener(c, "dblclick", d)
+ g.addListener(e, "mousedown", m);
+ l.isIE && g.addListener(e, "dblclick", m)
};
- e.addKeyListener = function(c, i) {
- var b = null;
- e.addListener(c, "keydown", function(j) {
- b = j.keyIdentifier || j.keyCode;
- return i(j)
+ g.addKeyListener = function(e, i) {
+ var o = null;
+ g.addListener(e, "keydown", function(d) {
+ o = d.keyIdentifier || d.keyCode;
+ return i(d)
});
- g.isMac && g.isGecko && e.addListener(c, "keypress", function(j) {
- if(b !== (j.keyIdentifier || j.keyCode)) {
- return i(j)
- }else {
- b = null
- }
- })
- };
- return e
+ if(l.isMac && (l.isGecko || l.isOpera)) {
+ g.addListener(e, "keypress", function(d) {
+ if(o !== (d.keyIdentifier || d.keyCode)) {
+ return i(d)
+ }else {
+ o = null
+ }
+ })
+ }
+ }
});
-define("ace/lib/lang", ["require", "exports", "module"], function() {
- var h = {};
- h.stringReverse = function(g) {
- return g.split("").reverse().join("")
+define("pilot/lang", ["require", "exports", "module"], function(j, g) {
+ g.stringReverse = function(l) {
+ return l.split("").reverse().join("")
};
- h.stringRepeat = function(g, e) {
- return(new Array(e + 1)).join(g)
+ g.stringRepeat = function(l, e) {
+ return(new Array(e + 1)).join(l)
};
- h.arrayIndexOf = Array.prototype.indexOf ? function(g, e) {
- return g.indexOf(e)
- } : function(g, e) {
- for(var c = 0;c < g.length;c++) {
- if(g[c] == e) {
- return c
- }
- }return-1
- };
- h.isArray = function(g) {
- return Object.prototype.toString.call(g) == "[object Array]"
- };
- h.copyObject = function(g) {
+ g.copyObject = function(l) {
var e = {};
- for(var c in g) {
- e[c] = g[c]
+ for(var i in l) {
+ e[i] = l[i]
}return e
};
- h.arrayToMap = function(g) {
- for(var e = {}, c = 0;c < g.length;c++) {
- e[g[c]] = 1
+ g.arrayToMap = function(l) {
+ for(var e = {}, i = 0;i < l.length;i++) {
+ e[l[i]] = 1
}return e
};
- h.escapeRegExp = function(g) {
- return g.replace(/([.*+?^${}()|[\]\/\\])/g, "\\$1")
- };
- h.bind = function(g, e) {
- return function() {
- return g.apply(e, arguments)
+ g.arrayRemove = function(l, e) {
+ for(var i = 0;i <= l.length;i++) {
+ e === l[i] && l.splice(i, 1)
}
};
- h.deferredCall = function(g) {
- var e = null, c = function() {
+ g.escapeRegExp = function(l) {
+ return l.replace(/([.*+?^${}()|[\]\/\\])/g, "\\$1")
+ };
+ g.deferredCall = function(l) {
+ var e = null, i = function() {
e = null;
- g()
+ l()
};
return{schedule:function() {
- e || (e = setTimeout(c, 0))
+ e || (e = setTimeout(i, 0))
}, call:function() {
- h.cancel();
- g()
+ this.cancel();
+ l()
}, cancel:function() {
clearTimeout(e);
e = null
}}
- };
- return h
+ }
});
-define("ace/textinput", ["require", "exports", "module", "./lib/event"], function(h) {
- var g = h("./lib/event");
- return function(e, c) {
- function i() {
- if(!l) {
- var k = b.value;
- if(k) {
- if(k.charCodeAt(k.length - 1) == a.charCodeAt(0)) {
- (k = k.slice(0, -1)) && c.onTextInput(k)
+define("ace/textinput", ["require", "exports", "module", "pilot/event"], function(j, g) {
+ var l = j("pilot/event");
+ g.TextInput = function(e, i) {
+ function o() {
+ if(!h) {
+ var c = d.value;
+ if(c) {
+ if(c.charCodeAt(c.length - 1) == a.charCodeAt(0)) {
+ (c = c.slice(0, -1)) && i.onTextInput(c)
}else {
- c.onTextInput(k)
+ i.onTextInput(c)
}
}
- }l = false;
- b.value = a;
- b.select()
+ }h = false;
+ d.value = a;
+ d.select()
}
- var b = document.createElement("textarea"), j = b.style;
- j.position = "absolute";
- j.left = "-10000px";
- j.top = "-10000px";
- e.appendChild(b);
+ var d = document.createElement("textarea"), k = d.style;
+ k.position = "absolute";
+ k.left = "-10000px";
+ k.top = "-10000px";
+ e.appendChild(d);
var a = String.fromCharCode(0);
- i();
- var f = false, l = false, n = function() {
+ o();
+ var f = false, h = false, m = function() {
setTimeout(function() {
- f || i()
+ f || o()
}, 0)
- }, d = function() {
- c.onCompositionUpdate(b.value)
+ }, b = function() {
+ i.onCompositionUpdate(d.value)
};
- g.addListener(b, "keypress", n);
- g.addListener(b, "textInput", n);
- g.addListener(b, "paste", n);
- g.addListener(b, "propertychange", n);
- g.addListener(b, "copy", function() {
- l = true;
- b.value = c.getCopyText();
- b.select();
- l = true;
- setTimeout(i, 0)
+ l.addListener(d, "keypress", m);
+ l.addListener(d, "textInput", m);
+ l.addListener(d, "paste", m);
+ l.addListener(d, "propertychange", m);
+ l.addListener(d, "copy", function() {
+ h = true;
+ d.value = i.getCopyText();
+ d.select();
+ h = true;
+ setTimeout(o, 0)
});
- g.addListener(b, "cut", function() {
- l = true;
- b.value = c.getCopyText();
- c.onCut();
- b.select();
- setTimeout(i, 0)
+ l.addListener(d, "cut", function() {
+ h = true;
+ d.value = i.getCopyText();
+ i.onCut();
+ d.select();
+ setTimeout(o, 0)
});
- g.addListener(b, "compositionstart", function() {
+ l.addListener(d, "compositionstart", function() {
f = true;
- i();
- b.value = "";
- c.onCompositionStart();
- setTimeout(d, 0)
+ o();
+ d.value = "";
+ i.onCompositionStart();
+ setTimeout(b, 0)
});
- g.addListener(b, "compositionupdate", d);
- g.addListener(b, "compositionend", function() {
+ l.addListener(d, "compositionupdate", b);
+ l.addListener(d, "compositionend", function() {
f = false;
- c.onCompositionEnd();
- n()
+ i.onCompositionEnd();
+ m()
});
- g.addListener(b, "blur", function() {
- c.onBlur()
+ l.addListener(d, "blur", function() {
+ i.onBlur()
});
- g.addListener(b, "focus", function() {
- c.onFocus();
- b.select()
+ l.addListener(d, "focus", function() {
+ i.onFocus();
+ d.select()
});
this.focus = function() {
- c.onFocus();
- b.select();
- b.focus()
+ i.onFocus();
+ d.select();
+ d.focus()
};
this.blur = function() {
- b.blur()
+ d.blur()
}
}
});
-define("ace/conf/keybindings/default_mac", ["require", "exports", "module"], function() {
- return{selectall:"Command-A", removeline:"Command-D", gotoline:"Command-L", togglecomment:"Command-7", findnext:"Command-K", findprevious:"Command-Shift-K", find:"Command-F", replace:"Command-R", undo:"Command-Z", redo:"Command-Shift-Z|Command-Y", overwrite:"Insert", copylinesup:"Command-Option-Up", movelinesup:"Option-Up", selecttostart:"Command-Shift-Up", gotostart:"Command-Home|Command-Up", selectup:"Shift-Up", golineup:"Up", copylinesdown:"Command-Option-Down", movelinesdown:"Option-Down",
+define("ace/conf/keybindings/default_mac", ["require", "exports", "module"], function(j, g) {
+ g.bindings = {selectall:"Command-A", removeline:"Command-D", gotoline:"Command-L", togglecomment:"Command-7", findnext:"Command-K", findprevious:"Command-Shift-K", find:"Command-F", replace:"Command-R", undo:"Command-Z", redo:"Command-Shift-Z|Command-Y", overwrite:"Insert", copylinesup:"Command-Option-Up", movelinesup:"Option-Up", selecttostart:"Command-Shift-Up", gotostart:"Command-Home|Command-Up", selectup:"Shift-Up", golineup:"Up", copylinesdown:"Command-Option-Down", movelinesdown:"Option-Down",
selecttoend:"Command-Shift-Down", gotoend:"Command-End|Command-Down", selectdown:"Shift-Down", godown:"Down", selectwordleft:"Option-Shift-Left", gotowordleft:"Option-Left", selecttolinestart:"Command-Shift-Left", gotolinestart:"Command-Left|Home", selectleft:"Shift-Left", gotoleft:"Left", selectwordright:"Option-Shift-Right", gotowordright:"Option-Right", selecttolineend:"Command-Shift-Right", gotolineend:"Command-Right|End", selectright:"Shift-Right", gotoright:"Right", selectpagedown:"Shift-PageDown",
pagedown:"PageDown", selectpageup:"Shift-PageUp", pageup:"PageUp", selectlinestart:"Shift-Home", selectlineend:"Shift-End", del:"Delete", backspace:"Ctrl-Backspace|Command-Backspace|Option-Backspace|Backspace", outdent:"Shift-Tab", indent:"Tab"}
});
-define("ace/conf/keybindings/default_win", ["require", "exports", "module"], function() {
- return{selectall:"Ctrl-A", removeline:"Ctrl-D", gotoline:"Ctrl-L", togglecomment:"Ctrl-7", findnext:"Ctrl-K", findprevious:"Ctrl-Shift-K", find:"Ctrl-F", replace:"Ctrl-R", undo:"Ctrl-Z", redo:"Ctrl-Shift-Z|Ctrl-Y", overwrite:"Insert", copylinesup:"Ctrl-Alt-Up", movelinesup:"Alt-Up", selecttostart:"Alt-Shift-Up", gotostart:"Ctrl-Home|Ctrl-Up", selectup:"Shift-Up", golineup:"Up", copylinesdown:"Ctrl-Alt-Down", movelinesdown:"Alt-Down", selecttoend:"Alt-Shift-Down", gotoend:"Ctrl-End|Ctrl-Down", selectdown:"Shift-Down",
- godown:"Down", selectwordleft:"Ctrl-Shift-Left", gotowordleft:"Ctrl-Left", selecttolinestart:"Alt-Shift-Left", gotolinestart:"Alt-Left|Home", selectleft:"Shift-Left", gotoleft:"Left", selectwordright:"Ctrl-Shift-Right", gotowordright:"Ctrl-Right", selecttolineend:"Alt-Shift-Right", gotolineend:"Alt-Right|End", selectright:"Shift-Right", gotoright:"Right", selectpagedown:"Shift-PageDown", pagedown:"PageDown", selectpageup:"Shift-PageUp", pageup:"PageUp", selectlinestart:"Shift-Home", selectlineend:"Shift-End",
- del:"Delete", backspace:"Backspace", outdent:"Shift-Tab", indent:"Tab"}
+define("ace/conf/keybindings/default_win", ["require", "exports", "module"], function(j, g) {
+ g.bindings = {selectall:"Ctrl-A", removeline:"Ctrl-D", gotoline:"Ctrl-L", togglecomment:"Ctrl-7", findnext:"Ctrl-K", findprevious:"Ctrl-Shift-K", find:"Ctrl-F", replace:"Ctrl-R", undo:"Ctrl-Z", redo:"Ctrl-Shift-Z|Ctrl-Y", overwrite:"Insert", copylinesup:"Ctrl-Alt-Up", movelinesup:"Alt-Up", selecttostart:"Alt-Shift-Up", gotostart:"Ctrl-Home|Ctrl-Up", selectup:"Shift-Up", golineup:"Up", copylinesdown:"Ctrl-Alt-Down", movelinesdown:"Alt-Down", selecttoend:"Alt-Shift-Down", gotoend:"Ctrl-End|Ctrl-Down",
+ selectdown:"Shift-Down", godown:"Down", selectwordleft:"Ctrl-Shift-Left", gotowordleft:"Ctrl-Left", selecttolinestart:"Alt-Shift-Left", gotolinestart:"Alt-Left|Home", selectleft:"Shift-Left", gotoleft:"Left", selectwordright:"Ctrl-Shift-Right", gotowordright:"Ctrl-Right", selecttolineend:"Alt-Shift-Right", gotolineend:"Alt-Right|End", selectright:"Shift-Right", gotoright:"Right", selectpagedown:"Shift-PageDown", pagedown:"PageDown", selectpageup:"Shift-PageUp", pageup:"PageUp", selectlinestart:"Shift-Home",
+ selectlineend:"Shift-End", del:"Delete", backspace:"Backspace", outdent:"Shift-Tab", indent:"Tab"}
});
-define("ace/plugin_manager", ["require", "exports", "module"], function() {
- return{commands:{}, registerCommand:function(h, g) {
- this.commands[h] = g
- }}
-});
-define("ace/commands/default_commands", ["require", "exports", "module", "../plugin_manager"], function(h) {
- h = h("../plugin_manager");
- h.registerCommand("selectall", function(g, e) {
- e.selectAll()
- });
- h.registerCommand("removeline", function(g) {
- g.removeLines()
- });
- h.registerCommand("gotoline", function(g) {
- var e = parseInt(prompt("Enter line number:"));
- isNaN(e) || g.gotoLine(e)
- });
- h.registerCommand("togglecomment", function(g) {
- g.toggleCommentLines()
- });
- h.registerCommand("findnext", function(g) {
- g.findNext()
- });
- h.registerCommand("findprevious", function(g) {
- g.findPrevious()
- });
- h.registerCommand("find", function(g) {
- var e = prompt("Find:");
- g.find(e)
- });
- h.registerCommand("undo", function(g) {
- g.undo()
- });
- h.registerCommand("redo", function(g) {
- g.redo()
- });
- h.registerCommand("redo", function(g) {
- g.redo()
- });
- h.registerCommand("overwrite", function(g) {
- g.toggleOverwrite()
- });
- h.registerCommand("copylinesup", function(g) {
- g.copyLinesUp()
- });
- h.registerCommand("movelinesup", function(g) {
- g.moveLinesUp()
- });
- h.registerCommand("selecttostart", function(g, e) {
- e.selectFileStart()
- });
- h.registerCommand("gotostart", function(g) {
- g.navigateFileStart()
- });
- h.registerCommand("selectup", function(g, e) {
- e.selectUp()
- });
- h.registerCommand("golineup", function(g) {
- g.navigateUp()
- });
- h.registerCommand("copylinesdown", function(g) {
- g.copyLinesDown()
- });
- h.registerCommand("movelinesdown", function(g) {
- g.moveLinesDown()
- });
- h.registerCommand("selecttoend", function(g, e) {
- e.selectFileEnd()
- });
- h.registerCommand("gotoend", function(g) {
- g.navigateFileEnd()
- });
- h.registerCommand("selectdown", function(g, e) {
- e.selectDown()
- });
- h.registerCommand("godown", function(g) {
- g.navigateDown()
- });
- h.registerCommand("selectwordleft", function(g, e) {
- e.selectWordLeft()
- });
- h.registerCommand("gotowordleft", function(g) {
- g.navigateWordLeft()
- });
- h.registerCommand("selecttolinestart", function(g, e) {
- e.selectLineStart()
- });
- h.registerCommand("gotolinestart", function(g) {
- g.navigateLineStart()
- });
- h.registerCommand("selectleft", function(g, e) {
- e.selectLeft()
- });
- h.registerCommand("gotoleft", function(g) {
- g.navigateLeft()
- });
- h.registerCommand("selectwordright", function(g, e) {
- e.selectWordRight()
- });
- h.registerCommand("gotowordright", function(g) {
- g.navigateWordRight()
- });
- h.registerCommand("selecttolineend", function(g, e) {
- e.selectLineEnd()
- });
- h.registerCommand("gotolineend", function(g) {
- g.navigateLineEnd()
- });
- h.registerCommand("selectright", function(g, e) {
- e.selectRight()
- });
- h.registerCommand("gotoright", function(g) {
- g.navigateRight()
- });
- h.registerCommand("selectpagedown", function(g) {
- g.selectPageDown()
- });
- h.registerCommand("pagedown", function(g) {
- g.scrollPageDown()
- });
- h.registerCommand("gotopagedown", function(g) {
- g.gotoPageDown()
- });
- h.registerCommand("selectpageup", function(g) {
- g.selectPageUp()
- });
- h.registerCommand("pageup", function(g) {
- g.scrollPageUp()
- });
- h.registerCommand("gotopageup", function(g) {
- g.gotoPageUp()
- });
- h.registerCommand("selectlinestart", function(g, e) {
- e.selectLineStart()
- });
- h.registerCommand("gotolinestart", function(g) {
- g.navigateLineStart()
- });
- h.registerCommand("selectlineend", function(g, e) {
- e.selectLineEnd()
- });
- h.registerCommand("gotolineend", function(g) {
- g.navigateLineEnd()
- });
- h.registerCommand("del", function(g) {
- g.removeRight()
- });
- h.registerCommand("backspace", function(g) {
- g.removeLeft()
- });
- h.registerCommand("outdent", function(g) {
- g.blockOutdent()
- });
- h.registerCommand("indent", function(g) {
- g.indent()
+define("pilot/console", ["require", "exports", "module"], function(j, g) {
+ var l = function() {
+ };
+ j = ["assert", "count", "debug", "dir", "dirxml", "error", "group", "groupEnd", "info", "log", "profile", "profileEnd", "time", "timeEnd", "trace", "warn"];
+ typeof window === "undefined" ? j.forEach(function(e) {
+ g[e] = function() {
+ var i = Array.prototype.slice.call(arguments);
+ postMessage(JSON.stringify({op:"log", method:e, args:i}))
+ }
+ }) : j.forEach(function(e) {
+ g[e] = window.console && window.console[e] ? Function.prototype.bind.call(window.console[e], window.console) : l
})
});
-define("ace/keybinding", ["require", "exports", "module", "./lib/core", "./lib/event", "./conf/keybindings/default_mac", "./conf/keybindings/default_win", "./plugin_manager", "./commands/default_commands"], function(h) {
- var g = h("./lib/core"), e = h("./lib/event"), c = h("./conf/keybindings/default_mac"), i = h("./conf/keybindings/default_win"), b = h("./plugin_manager");
- h("./commands/default_commands");
- h = function(j, a, f) {
+define("pilot/stacktrace", ["require", "exports", "module", "pilot/useragent", "pilot/console"], function(j, g) {
+ function l(h) {
+ for(var m = 0;m < h.length;++m) {
+ var b = h[m];
+ if(typeof b == "object") {
+ h[m] = "#object"
+ }else {
+ if(typeof b == "function") {
+ h[m] = "#function"
+ }else {
+ if(typeof b == "string") {
+ h[m] = '"' + b + '"'
+ }
+ }
+ }
+ }return h.join(",")
+ }
+ function e() {
+ }
+ var i = j("pilot/useragent"), o = j("pilot/console"), d = function() {
+ return i.isGecko ? "firefox" : i.isOpera ? "opera" : "other"
+ }(), k = {chrome:function(h) {
+ var m = h.stack;
+ if(!m) {
+ o.log(h);
+ return[]
+ }return m.replace(/^.*?\n/, "").replace(/^.*?\n/, "").replace(/^.*?\n/, "").replace(/^[^\(]+?[\n$]/gm, "").replace(/^\s+at\s+/gm, "").replace(/^Object.\s*\(/gm, "{anonymous}()@").split("\n")
+ }, firefox:function(h) {
+ var m = h.stack;
+ if(!m) {
+ o.log(h);
+ return[]
+ }m = m.replace(/(?:\n@:0)?\s+$/m, "");
+ m = m.replace(/^\(/gm, "{anonymous}(");
+ return m.split("\n")
+ }, opera:function(h) {
+ h = h.message.split("\n");
+ var m = /Line\s+(\d+).*?script\s+(http\S+)(?:.*?in\s+function\s+(\S+))?/i, b, c, n;
+ b = 4;
+ c = 0;
+ for(n = h.length;b < n;b += 2) {
+ if(m.test(h[b])) {
+ h[c++] = (RegExp.$3 ? RegExp.$3 + "()@" + RegExp.$2 + RegExp.$1 : "{anonymous}()@" + RegExp.$2 + ":" + RegExp.$1) + " -- " + h[b + 1].replace(/^\s+/, "")
+ }
+ }h.splice(c, h.length - c);
+ return h
+ }, other:function(h) {
+ for(var m = /function\s*([\w\-$]+)?\s*\(/i, b = [], c = 0, n, p;h && b.length < 10;) {
+ n = m.test(h.toString()) ? RegExp.$1 || "{anonymous}" : "{anonymous}";
+ p = Array.prototype.slice.call(h.arguments);
+ b[c++] = n + "(" + l(p) + ")";
+ if(h === h.caller && window.opera) {
+ break
+ }h = h.caller
+ }return b
+ }};
+ e.prototype = {sourceCache:{}, ajax:function(h) {
+ var m = this.createXMLHTTPObject();
+ if(m) {
+ m.open("GET", h, false);
+ m.setRequestHeader("User-Agent", "XMLHTTP/1.0");
+ m.send("");
+ return m.responseText
+ }
+ }, createXMLHTTPObject:function() {
+ for(var h, m = [function() {
+ return new XMLHttpRequest
+ }, function() {
+ return new ActiveXObject("Msxml2.XMLHTTP")
+ }, function() {
+ return new ActiveXObject("Msxml3.XMLHTTP")
+ }, function() {
+ return new ActiveXObject("Microsoft.XMLHTTP")
+ }], b = 0;b < m.length;b++) {
+ try {
+ h = m[b]();
+ this.createXMLHTTPObject = m[b];
+ return h
+ }catch(c) {
+ }
+ }
+ }, getSource:function(h) {
+ h in this.sourceCache || (this.sourceCache[h] = this.ajax(h).split("\n"));
+ return this.sourceCache[h]
+ }, guessFunctions:function(h) {
+ for(var m = 0;m < h.length;++m) {
+ var b = h[m], c = /{anonymous}\(.*\)@(\w+:\/\/([-\w\.]+)+(:\d+)?[^:]+):(\d+):?(\d+)?/.exec(b);
+ if(c) {
+ var n = c[1];
+ c = c[4];
+ if(n && c) {
+ n = this.guessFunctionName(n, c);
+ h[m] = b.replace("{anonymous}", n)
+ }
+ }
+ }return h
+ }, guessFunctionName:function(h, m) {
+ try {
+ return this.guessFunctionNameFromLines(m, this.getSource(h))
+ }catch(b) {
+ return"getSource failed with url: " + h + ", exception: " + b.toString()
+ }
+ }, guessFunctionNameFromLines:function(h, m) {
+ for(var b = /function ([^(]*)\(([^)]*)\)/, c = /['"]?([0-9A-Za-z_]+)['"]?\s*[:=]\s*(function|eval|new Function)/, n = "", p = 0;p < 10;++p) {
+ n = m[h - p] + n;
+ if(n !== undefined) {
+ var r = c.exec(n);
+ if(r) {
+ return r[1]
+ }else {
+ r = b.exec(n)
+ }if(r && r[1]) {
+ return r[1]
+ }
+ }
+ }return"(?)"
+ }};
+ var a = new e, f = [/http:\/\/localhost:4020\/sproutcore.js:/];
+ g.ignoreFramesMatching = function(h) {
+ f.push(h)
+ };
+ g.Trace = function(h, m) {
+ this._ex = h;
+ this._stack = k[d](h);
+ if(m) {
+ this._stack = a.guessFunctions(this._stack)
+ }
+ };
+ g.Trace.prototype.log = function(h) {
+ if(h <= 0) {
+ h = 999999999
+ }for(var m = 0, b = 0;b < this._stack.length && m < h;b++) {
+ var c = this._stack[b], n = true;
+ f.forEach(function(p) {
+ if(p.test(c)) {
+ n = false
+ }
+ });
+ if(n) {
+ o.debug(c);
+ m++
+ }
+ }
+ }
+});
+define("pilot/event_emitter", ["require", "exports", "module"], function(j, g) {
+ j = {};
+ j._dispatchEvent = function(l, e) {
+ this._eventRegistry = this._eventRegistry || {};
+ var i = this._eventRegistry[l];
+ if(i && i.length) {
+ e = e || {};
+ e.type = l;
+ for(l = 0;l < i.length;l++) {
+ i[l](e)
+ }
+ }
+ };
+ j.on = j.addEventListener = function(l, e) {
+ this._eventRegistry = this._eventRegistry || {};
+ var i = this._eventRegistry[l];
+ i || (i = this._eventRegistry[l] = []);
+ i.indexOf(e) == -1 && i.push(e)
+ };
+ j.removeEventListener = function(l, e) {
+ this._eventRegistry = this._eventRegistry || {};
+ if(l = this._eventRegistry[l]) {
+ e = l.indexOf(e);
+ e !== -1 && l.splice(e, 1)
+ }
+ };
+ g.EventEmitter = j
+});
+define("pilot/catalog", ["require", "exports", "module"], function(j, g) {
+ var l = {};
+ g.addExtensionSpec = function(e) {
+ l[e.name] = e
+ };
+ g.removeExtensionSpec = function(e) {
+ if(typeof e === "string") {
+ delete l[e]
+ }else {
+ delete l[e.name]
+ }
+ };
+ g.getExtensionSpec = function(e) {
+ return l[e]
+ };
+ g.getExtensionSpecs = function() {
+ return Object.keys(l)
+ }
+});
+define("pilot/types", ["require", "exports", "module"], function(j, g) {
+ function l(k, a, f, h) {
+ this.value = k;
+ this.status = a || o.VALID;
+ this.message = f;
+ this.predictions = h || []
+ }
+ function e() {
+ }
+ function i(k, a) {
+ k = d[k];
+ if(typeof k === "function") {
+ k = new k(a)
+ }return k
+ }
+ var o = {VALID:{toString:function() {
+ return"VALID"
+ }, valueOf:function() {
+ return 0
+ }}, INCOMPLETE:{toString:function() {
+ return"INCOMPLETE"
+ }, valueOf:function() {
+ return 1
+ }}, INVALID:{toString:function() {
+ return"INVALID"
+ }, valueOf:function() {
+ return 2
+ }}, combine:function() {
+ for(var k = o.VALID, a = 0;a < arguments;a++) {
+ if(arguments[a] > k) {
+ k = arguments[a]
+ }
+ }return k
+ }};
+ g.Status = o;
+ g.Conversion = l;
+ e.prototype = {stringify:function() {
+ throw new Error("not implemented");
+ }, parse:function() {
+ throw new Error("not implemented");
+ }, name:undefined, increment:function() {
+ }, decrement:function() {
+ }};
+ g.Type = e;
+ var d = {};
+ g.registerType = function(k) {
+ if(typeof k === "object") {
+ if(k instanceof e) {
+ if(!k.name) {
+ throw new Error("All registered types must have a name");
+ }d[k.name] = k
+ }else {
+ throw new Error("Can't registerType using: " + k);
+ }
+ }else {
+ if(typeof k === "function") {
+ if(!k.prototype.name) {
+ throw new Error("All registered types must have a name");
+ }d[k.prototype.name] = k
+ }else {
+ throw new Error("Unknown type: " + k);
+ }
+ }
+ };
+ g.deregisterType = function(k) {
+ delete d[k.name]
+ };
+ g.getType = function(k) {
+ if(typeof k === "string") {
+ return i(k, k)
+ }if(typeof k == "object") {
+ if(!k.name) {
+ throw new Error("Missing 'name' member to typeSpec");
+ }return i(k.name, k)
+ }throw new Error("Can't extract type from " + k);
+ }
+});
+define("pilot/canon", ["require", "exports", "module", "pilot/console", "pilot/stacktrace", "pilot/oop", "pilot/event_emitter", "pilot/catalog", "pilot/types", "pilot/types", "pilot/lang"], function(j, g) {
+ function l(q) {
+ if(!q.name) {
+ throw new Error("All registered commands must have a name");
+ }if(q.params == null) {
+ q.params = []
+ }if(!Array.isArray(q.params)) {
+ throw new Error("command.params must be an array in " + q.name);
+ }q.params.forEach(function(s) {
+ if(!s.name) {
+ throw new Error("In " + q.name + ": all params must have a name");
+ }e(q.name, s)
+ }, this);
+ p[q.name] = q;
+ r.push(q.name);
+ r.sort()
+ }
+ function e(q, s) {
+ var u = s.type;
+ s.type = b.getType(u);
+ if(s.type == null) {
+ throw new Error("In " + q + "/" + s.name + ": can't find type for: " + JSON.stringify(u));
+ }
+ }
+ function i(q) {
+ q = typeof q === "string" ? q : q.name;
+ delete p[q];
+ c.arrayRemove(r, q)
+ }
+ function o(q) {
+ return p[q]
+ }
+ function d() {
+ return r
+ }
+ function k(q, s, u, x) {
+ if(typeof q === "string") {
+ q = p[q]
+ }if(!q) {
+ return false
+ }x = new a({command:q, args:u, typed:x});
+ q.exec(s, u || {}, x);
+ return true
+ }
+ function a(q) {
+ q = q || {};
+ this.command = q.command;
+ this.args = q.args;
+ this.typed = q.typed;
+ this._begunOutput = false;
+ this.start = new Date;
+ this.end = null;
+ this.error = this.completed = false
+ }
+ j("pilot/console");
+ j("pilot/stacktrace");
+ var f = j("pilot/oop"), h = j("pilot/event_emitter").EventEmitter, m = j("pilot/catalog");
+ j("pilot/types");
+ var b = j("pilot/types"), c = j("pilot/lang"), n = {name:"command", description:"A command is a bit of functionality with optional typed arguments which can do something small like moving the cursor around the screen, or large like cloning a project from VCS.", indexOn:"name"};
+ g.startup = function() {
+ m.addExtensionSpec(n)
+ };
+ g.shutdown = function() {
+ m.removeExtensionSpec(n)
+ };
+ var p = {}, r = [];
+ g.removeCommand = i;
+ g.addCommand = l;
+ g.getCommand = o;
+ g.getCommandNames = d;
+ g.exec = k;
+ g.upgradeType = e;
+ f.implement(g, h);
+ var t = [];
+ f.implement(a.prototype, h);
+ a.prototype._beginOutput = function() {
+ this._begunOutput = true;
+ this.outputs = [];
+ for(t.push(this);t.length > 100;) {
+ t.shiftObject()
+ }g._dispatchEvent("output", {requests:t, request:this})
+ };
+ a.prototype.doneWithError = function(q) {
+ this.error = true;
+ this.done(q)
+ };
+ a.prototype.async = function() {
+ this._begunOutput || this._beginOutput()
+ };
+ a.prototype.output = function(q) {
+ this._begunOutput || this._beginOutput();
+ if(typeof q !== "string" && !(q instanceof Node)) {
+ q = q.toString()
+ }this.outputs.push(q);
+ this._dispatchEvent("output", {});
+ return this
+ };
+ a.prototype.done = function(q) {
+ this.completed = true;
+ this.end = new Date;
+ this.duration = this.end.getTime() - this.start.getTime();
+ q && this.output(q);
+ this._dispatchEvent("output", {})
+ };
+ g.Request = a
+});
+define("ace/commands/default_commands", ["require", "exports", "module", "pilot/canon"], function(j) {
+ j = j("pilot/canon");
+ j.addCommand({name:"selectall", exec:function(g) {
+ g.editor.getSelection().selectAll()
+ }});
+ j.addCommand({name:"removeline", exec:function(g) {
+ g.editor.removeLines()
+ }});
+ j.addCommand({name:"gotoline", exec:function(g) {
+ var l = parseInt(prompt("Enter line number:"));
+ isNaN(l) || g.editor.gotoLine(l)
+ }});
+ j.addCommand({name:"togglecomment", exec:function(g) {
+ g.editor.toggleCommentLines()
+ }});
+ j.addCommand({name:"findnext", exec:function(g) {
+ g.editor.findNext()
+ }});
+ j.addCommand({name:"findprevious", exec:function(g) {
+ g.editor.findPrevious()
+ }});
+ j.addCommand({name:"find", exec:function(g) {
+ var l = prompt("Find:");
+ g.editor.find(l)
+ }});
+ j.addCommand({name:"undo", exec:function(g) {
+ g.editor.undo()
+ }});
+ j.addCommand({name:"redo", exec:function(g) {
+ g.editor.redo()
+ }});
+ j.addCommand({name:"redo", exec:function(g) {
+ g.editor.redo()
+ }});
+ j.addCommand({name:"overwrite", exec:function(g) {
+ g.editor.toggleOverwrite()
+ }});
+ j.addCommand({name:"copylinesup", exec:function(g) {
+ g.editor.copyLinesUp()
+ }});
+ j.addCommand({name:"movelinesup", exec:function(g) {
+ g.editor.moveLinesUp()
+ }});
+ j.addCommand({name:"selecttostart", exec:function(g) {
+ g.editor.getSelection().selectFileStart()
+ }});
+ j.addCommand({name:"gotostart", exec:function(g) {
+ g.editor.navigateFileStart()
+ }});
+ j.addCommand({name:"selectup", exec:function(g) {
+ g.editor.getSelection().selectUp()
+ }});
+ j.addCommand({name:"golineup", exec:function(g) {
+ g.editor.navigateUp()
+ }});
+ j.addCommand({name:"copylinesdown", exec:function(g) {
+ g.editor.copyLinesDown()
+ }});
+ j.addCommand({name:"movelinesdown", exec:function(g) {
+ g.editor.moveLinesDown()
+ }});
+ j.addCommand({name:"selecttoend", exec:function(g) {
+ g.editor.getSelection().selectFileEnd()
+ }});
+ j.addCommand({name:"gotoend", exec:function(g) {
+ g.editor.navigateFileEnd()
+ }});
+ j.addCommand({name:"selectdown", exec:function(g) {
+ g.editor.getSelection().selectDown()
+ }});
+ j.addCommand({name:"godown", exec:function(g) {
+ g.editor.navigateDown()
+ }});
+ j.addCommand({name:"selectwordleft", exec:function(g) {
+ g.editor.getSelection().selectWordLeft()
+ }});
+ j.addCommand({name:"gotowordleft", exec:function(g) {
+ g.editor.navigateWordLeft()
+ }});
+ j.addCommand({name:"selecttolinestart", exec:function(g) {
+ g.editor.getSelection().selectLineStart()
+ }});
+ j.addCommand({name:"gotolinestart", exec:function(g) {
+ g.editor.navigateLineStart()
+ }});
+ j.addCommand({name:"selectleft", exec:function(g) {
+ g.editor.getSelection().selectLeft()
+ }});
+ j.addCommand({name:"gotoleft", exec:function(g) {
+ g.editor.navigateLeft()
+ }});
+ j.addCommand({name:"selectwordright", exec:function(g) {
+ g.editor.getSelection().selectWordRight()
+ }});
+ j.addCommand({name:"gotowordright", exec:function(g) {
+ g.editor.navigateWordRight()
+ }});
+ j.addCommand({name:"selecttolineend", exec:function(g) {
+ g.editor.getSelection().selectLineEnd()
+ }});
+ j.addCommand({name:"gotolineend", exec:function(g) {
+ g.editor.navigateLineEnd()
+ }});
+ j.addCommand({name:"selectright", exec:function(g) {
+ g.editor.getSelection().selectRight()
+ }});
+ j.addCommand({name:"gotoright", exec:function(g) {
+ g.editor.navigateRight()
+ }});
+ j.addCommand({name:"selectpagedown", exec:function(g) {
+ g.editor.selectPageDown()
+ }});
+ j.addCommand({name:"pagedown", exec:function(g) {
+ g.editor.scrollPageDown()
+ }});
+ j.addCommand({name:"gotopagedown", exec:function(g) {
+ g.editor.gotoPageDown()
+ }});
+ j.addCommand({name:"selectpageup", exec:function(g) {
+ g.editor.selectPageUp()
+ }});
+ j.addCommand({name:"pageup", exec:function(g) {
+ g.editor.scrollPageUp()
+ }});
+ j.addCommand({name:"gotopageup", exec:function(g) {
+ g.editor.gotoPageUp()
+ }});
+ j.addCommand({name:"selectlinestart", exec:function(g) {
+ g.editor.getSelection().selectLineStart()
+ }});
+ j.addCommand({name:"gotolinestart", exec:function(g) {
+ g.editor.navigateLineStart()
+ }});
+ j.addCommand({name:"selectlineend", exec:function(g) {
+ g.editor.getSelection().selectLineEnd()
+ }});
+ j.addCommand({name:"gotolineend", exec:function(g) {
+ g.editor.navigateLineEnd()
+ }});
+ j.addCommand({name:"del", exec:function(g) {
+ g.editor.removeRight()
+ }});
+ j.addCommand({name:"backspace", exec:function(g) {
+ g.editor.removeLeft()
+ }});
+ j.addCommand({name:"outdent", exec:function(g) {
+ g.editor.blockOutdent()
+ }});
+ j.addCommand({name:"indent", exec:function(g) {
+ g.editor.indent()
+ }})
+});
+define("ace/keybinding", ["require", "exports", "module", "pilot/useragent", "pilot/event", "ace/conf/keybindings/default_mac", "ace/conf/keybindings/default_win", "pilot/canon", "ace/commands/default_commands"], function(j, g) {
+ var l = j("pilot/useragent"), e = j("pilot/event"), i = j("ace/conf/keybindings/default_mac").bindings, o = j("ace/conf/keybindings/default_win").bindings, d = j("pilot/canon");
+ j("ace/commands/default_commands");
+ j = function(k, a, f) {
this.setConfig(f);
- var l = this;
- e.addKeyListener(j, function(n) {
- var d = (l.config.reverse[0 | (n.ctrlKey ? 1 : 0) | (n.altKey ? 2 : 0) | (n.shiftKey ? 4 : 0) | (n.metaKey ? 8 : 0)] || {})[(l.keyNames[n.keyCode] || String.fromCharCode(n.keyCode)).toLowerCase()];
- if(d = b.commands[d]) {
- d(a, a.getSelection());
- return e.stopEvent(n)
+ var h = this;
+ e.addKeyListener(k, function(m) {
+ var b = (h.config.reverse[l.isOpera && l.isMac ? 0 | (m.metaKey ? 1 : 0) | (m.altKey ? 2 : 0) | (m.shiftKey ? 4 : 0) | (m.ctrlKey ? 8 : 0) : 0 | (m.ctrlKey ? 1 : 0) | (m.altKey ? 2 : 0) | (m.shiftKey ? 4 : 0) | (m.metaKey ? 8 : 0)] || {})[(h.keyNames[m.keyCode] || String.fromCharCode(m.keyCode)).toLowerCase()];
+ if(d.exec(b, {editor:a})) {
+ return e.stopEvent(m)
}
})
};
(function() {
- function j(l, n, d, k) {
- return(k && l.toLowerCase() || l).replace(/(?:^\s+|\n|\s+$)/g, "").split(new RegExp("[\\s ]*" + n + "[\\s ]*", "g"), d || 999)
+ function k(h, m, b, c) {
+ return(c && h.toLowerCase() || h).replace(/(?:^\s+|\n|\s+$)/g, "").split(new RegExp("[\\s ]*" + m + "[\\s ]*", "g"), b || 999)
}
- function a(l, n, d) {
- var k, p = 0;
- l = j(l, "\\-", null, true);
- for(var o = 0, m = l.length;o < m;++o) {
- if(this.keyMods[l[o]]) {
- p |= this.keyMods[l[o]]
+ function a(h, m, b) {
+ var c, n = 0;
+ h = k(h, "\\-", null, true);
+ for(var p = 0, r = h.length;p < r;++p) {
+ if(this.keyMods[h[p]]) {
+ n |= this.keyMods[h[p]]
}else {
- k = l[o] || "-"
+ c = h[p] || "-"
}
- }(d[p] || (d[p] = {}))[k] = n;
- return d
+ }(b[n] || (b[n] = {}))[c] = m;
+ return b
}
- function f(l, n) {
- var d, k, p, o, m = {};
- for(d in l) {
- o = l[d];
- if(n && typeof o == "string") {
- o = o.split(n);
- k = 0;
- for(p = o.length;k < p;++k) {
- a.call(this, o[k], d, m)
+ function f(h, m) {
+ var b, c, n, p, r = {};
+ for(b in h) {
+ p = h[b];
+ if(m && typeof p == "string") {
+ p = p.split(m);
+ c = 0;
+ for(n = p.length;c < n;++c) {
+ a.call(this, p[c], b, r)
}
}else {
- a.call(this, o, d, m)
+ a.call(this, p, b, r)
}
- }return m
+ }return r
}
this.keyMods = {ctrl:1, alt:2, option:2, shift:4, meta:8, command:8};
this.keyNames = {"8":"Backspace", "9":"Tab", "13":"Enter", "27":"Esc", "32":"Space", "33":"PageUp", "34":"PageDown", "35":"End", "36":"Home", "37":"Left", "38":"Up", "39":"Right", "40":"Down", "45":"Insert", "46":"Delete", "107":"+", "112":"F1", "113":"F2", "114":"F3", "115":"F4", "116":"F5", "117":"F6", "118":"F7", "119":"F8", "120":"F9", "121":"F10", "122":"F11", "123":"F12"};
- this.setConfig = function(l) {
- this.config = l || (g.isMac ? c : i);
+ this.setConfig = function(h) {
+ this.config = h || (l.isMac ? i : o);
if(typeof this.config.reverse == "undefined") {
this.config.reverse = f.call(this, this.config, "|")
}
}
- }).call(h.prototype);
- return h
+ }).call(j.prototype);
+ g.KeyBinding = j
});
-define("ace/event_emitter", ["require", "exports", "module", "./lib/lang"], function(h) {
- var g = h("./lib/lang");
- h = {};
- h.$dispatchEvent = function(e, c) {
- this.$eventRegistry = this.$eventRegistry || {};
- var i = this.$eventRegistry[e];
- if(i && i.length) {
- c = c || {};
- c.type = e;
- for(e = 0;e < i.length;e++) {
- i[e](c)
- }
- }
- };
- h.on = h.addEventListener = function(e, c) {
- this.$eventRegistry = this.$eventRegistry || {};
- var i = this.$eventRegistry[e];
- i || (i = this.$eventRegistry[e] = []);
- g.arrayIndexOf(i, c) == -1 && i.push(c)
- };
- h.removeEventListener = function(e, c) {
- this.$eventRegistry = this.$eventRegistry || {};
- if(e = this.$eventRegistry[e]) {
- c = g.arrayIndexOf(e, c);
- c !== -1 && e.splice(c, 1)
- }
- };
- return h
-});
-define("ace/range", ["require", "exports", "module"], function() {
- var h = function(g, e, c, i) {
- this.start = {row:g, column:e};
- this.end = {row:c, column:i}
+define("ace/range", ["require", "exports", "module"], function(j, g) {
+ var l = function(e, i, o, d) {
+ this.start = {row:e, column:i};
+ this.end = {row:o, column:d}
};
(function() {
this.toString = function() {
return"Range: [" + this.start.row + "/" + this.start.column + "] -> [" + this.end.row + "/" + this.end.column + "]"
};
- this.contains = function(g, e) {
- return this.compare(g, e) == 0
+ this.contains = function(e, i) {
+ return this.compare(e, i) == 0
};
- this.compare = function(g, e) {
+ this.compare = function(e, i) {
if(!this.isMultiLine()) {
- if(g === this.start.row) {
- return e < this.start.column ? -1 : e > this.end.column ? 1 : 0
+ if(e === this.start.row) {
+ return i < this.start.column ? -1 : i > this.end.column ? 1 : 0
}
- }if(g < this.start.row) {
+ }if(e < this.start.row) {
return-1
- }if(g > this.end.row) {
+ }if(e > this.end.row) {
return 1
- }if(this.start.row === g) {
- return e >= this.start.column ? 0 : -1
- }if(this.end.row === g) {
- return e <= this.end.column ? 0 : 1
+ }if(this.start.row === e) {
+ return i >= this.start.column ? 0 : -1
+ }if(this.end.row === e) {
+ return i <= this.end.column ? 0 : 1
}return 0
};
- this.clipRows = function(g, e) {
- if(this.end.row > e) {
- var c = {row:e + 1, column:0}
- }if(this.start.row > e) {
- var i = {row:e + 1, column:0}
- }if(this.start.row < g) {
- i = {row:g, column:0}
- }if(this.end.row < g) {
- c = {row:g, column:0}
- }return h.fromPoints(i || this.start, c || this.end)
+ this.clipRows = function(e, i) {
+ if(this.end.row > i) {
+ var o = {row:i + 1, column:0}
+ }if(this.start.row > i) {
+ var d = {row:i + 1, column:0}
+ }if(this.start.row < e) {
+ d = {row:e, column:0}
+ }if(this.end.row < e) {
+ o = {row:e, column:0}
+ }return l.fromPoints(d || this.start, o || this.end)
};
- this.extend = function(g, e) {
- var c = this.compare(g, e);
- if(c == 0) {
+ this.extend = function(e, i) {
+ var o = this.compare(e, i);
+ if(o == 0) {
return this
}else {
- if(c == -1) {
- var i = {row:g, column:e}
+ if(o == -1) {
+ var d = {row:e, column:i}
}else {
- var b = {row:g, column:e}
+ var k = {row:e, column:i}
}
- }return h.fromPoints(i || this.start, b || this.end)
+ }return l.fromPoints(d || this.start, k || this.end)
};
this.isEmpty = function() {
return this.start.row == this.end.row && this.start.column == this.end.column
@@ -707,26 +950,29 @@ define("ace/range", ["require", "exports", "module"], function() {
return this.start.row !== this.end.row
};
this.clone = function() {
- return h.fromPoints(this.start, this.end)
+ return l.fromPoints(this.start, this.end)
};
- this.toScreenRange = function(g) {
- return new h(this.start.row, g.documentToScreenColumn(this.start.row, this.start.column), this.end.row, g.documentToScreenColumn(this.end.row, this.end.column))
+ this.collapseRows = function() {
+ return this.end.column == 0 ? new l(this.start.row, 0, Math.max(this.start.row, this.end.row - 1), 0) : new l(this.start.row, 0, this.end.row, 0)
+ };
+ this.toScreenRange = function(e) {
+ return new l(this.start.row, e.documentToScreenColumn(this.start.row, this.start.column), this.end.row, e.documentToScreenColumn(this.end.row, this.end.column))
}
- }).call(h.prototype);
- h.fromPoints = function(g, e) {
- return new h(g.row, g.column, e.row, e.column)
+ }).call(l.prototype);
+ l.fromPoints = function(e, i) {
+ return new l(e.row, e.column, i.row, i.column)
};
- return h
+ g.Range = l
});
-define("ace/selection", ["require", "exports", "module", "./lib/oop", "./lib/lang", "./event_emitter", "./range"], function(h) {
- var g = h("./lib/oop"), e = h("./lib/lang"), c = h("./event_emitter"), i = h("./range");
- h = function(b) {
- this.doc = b;
+define("ace/selection", ["require", "exports", "module", "pilot/oop", "pilot/lang", "pilot/event_emitter", "ace/range"], function(j, g) {
+ var l = j("pilot/oop"), e = j("pilot/lang"), i = j("pilot/event_emitter").EventEmitter, o = j("ace/range").Range;
+ j = function(d) {
+ this.doc = d;
this.clearSelection();
this.selectionLead = {row:0, column:0}
};
(function() {
- g.implement(this, c);
+ l.implement(this, i);
this.isEmpty = function() {
return!this.selectionAnchor || this.selectionAnchor.row == this.selectionLead.row && this.selectionAnchor.column == this.selectionLead.column
};
@@ -738,16 +984,16 @@ define("ace/selection", ["require", "exports", "module", "./lib/oop", "./lib/lan
this.getCursor = function() {
return this.selectionLead
};
- this.setSelectionAnchor = function(b, j) {
- b = this.$clipPositionToDocument(b, j);
+ this.setSelectionAnchor = function(d, k) {
+ d = this.$clipPositionToDocument(d, k);
if(this.selectionAnchor) {
- if(this.selectionAnchor.row !== b.row || this.selectionAnchor.column !== b.column) {
- this.selectionAnchor = b;
- this.$dispatchEvent("changeSelection", {})
+ if(this.selectionAnchor.row !== d.row || this.selectionAnchor.column !== d.column) {
+ this.selectionAnchor = d;
+ this._dispatchEvent("changeSelection", {})
}
}else {
- this.selectionAnchor = b;
- this.$dispatchEvent("changeSelection", {})
+ this.selectionAnchor = d;
+ this._dispatchEvent("changeSelection", {})
}
};
this.getSelectionAnchor = function() {
@@ -756,69 +1002,73 @@ define("ace/selection", ["require", "exports", "module", "./lib/oop", "./lib/lan
this.getSelectionLead = function() {
return this.$clone(this.selectionLead)
};
- this.shiftSelection = function(b) {
+ this.shiftSelection = function(d) {
if(this.isEmpty()) {
- this.moveCursorTo(this.selectionLead.row, this.selectionLead.column + b)
+ this.moveCursorTo(this.selectionLead.row, this.selectionLead.column + d)
}else {
- var j = this.getSelectionAnchor(), a = this.getSelectionLead(), f = this.isBackwards();
- if(!f || j.column !== 0) {
- this.setSelectionAnchor(j.row, j.column + b)
+ var k = this.getSelectionAnchor(), a = this.getSelectionLead(), f = this.isBackwards();
+ if(!f || k.column !== 0) {
+ this.setSelectionAnchor(k.row, k.column + d)
}if(f || a.column !== 0) {
this.$moveSelection(function() {
- this.moveCursorTo(a.row, a.column + b)
+ this.moveCursorTo(a.row, a.column + d)
})
}
}
};
this.isBackwards = function() {
- var b = this.selectionAnchor || this.selectionLead, j = this.selectionLead;
- return b.row > j.row || b.row == j.row && b.column > j.column
+ var d = this.selectionAnchor || this.selectionLead, k = this.selectionLead;
+ return d.row > k.row || d.row == k.row && d.column > k.column
};
this.getRange = function() {
- var b = this.selectionAnchor || this.selectionLead, j = this.selectionLead;
- return this.isBackwards() ? i.fromPoints(j, b) : i.fromPoints(b, j)
+ var d = this.selectionAnchor || this.selectionLead, k = this.selectionLead;
+ return this.isBackwards() ? o.fromPoints(k, d) : o.fromPoints(d, k)
};
this.clearSelection = function() {
if(this.selectionAnchor) {
this.selectionAnchor = null;
- this.$dispatchEvent("changeSelection", {})
+ this._dispatchEvent("changeSelection", {})
}
};
this.selectAll = function() {
- var b = this.doc.getLength() - 1;
- this.setSelectionAnchor(b, this.doc.getLine(b).length);
- this.$moveSelection(function() {
- this.moveCursorTo(0, 0)
- })
- };
- this.setSelectionRange = function(b, j) {
- if(j) {
- this.setSelectionAnchor(b.end.row, b.end.column);
- this.selectTo(b.start.row, b.start.column)
- }else {
- this.setSelectionAnchor(b.start.row, b.start.column);
- this.selectTo(b.end.row, b.end.column)
+ var d = this.doc.getLength() - 1;
+ this.setSelectionAnchor(d, this.doc.getLine(d).length);
+ if(!this.selectionAnchor) {
+ this.selectionAnchor = this.$clone(this.selectionLead)
+ }d = {row:0, column:0};
+ if(d.row !== this.selectionLead.row || d.column !== this.selectionLead.column) {
+ this.selectionLead = d;
+ this._dispatchEvent("changeSelection", {blockScrolling:true})
}
};
- this.$moveSelection = function(b) {
- var j = false;
+ this.setSelectionRange = function(d, k) {
+ if(k) {
+ this.setSelectionAnchor(d.end.row, d.end.column);
+ this.selectTo(d.start.row, d.start.column)
+ }else {
+ this.setSelectionAnchor(d.start.row, d.start.column);
+ this.selectTo(d.end.row, d.end.column)
+ }
+ };
+ this.$moveSelection = function(d) {
+ var k = false;
if(!this.selectionAnchor) {
- j = true;
+ k = true;
this.selectionAnchor = this.$clone(this.selectionLead)
}var a = this.$clone(this.selectionLead);
- b.call(this);
+ d.call(this);
if(a.row !== this.selectionLead.row || a.column !== this.selectionLead.column) {
- j = true
- }j && this.$dispatchEvent("changeSelection", {})
+ k = true
+ }k && this._dispatchEvent("changeSelection", {})
};
- this.selectTo = function(b, j) {
+ this.selectTo = function(d, k) {
this.$moveSelection(function() {
- this.moveCursorTo(b, j)
+ this.moveCursorTo(d, k)
})
};
- this.selectToPosition = function(b) {
+ this.selectToPosition = function(d) {
this.$moveSelection(function() {
- this.moveCursorToPosition(b)
+ this.moveCursorToPosition(d)
})
};
this.selectUp = function() {
@@ -852,8 +1102,8 @@ define("ace/selection", ["require", "exports", "module", "./lib/oop", "./lib/lan
this.$moveSelection(this.moveCursorWordLeft)
};
this.selectWord = function() {
- var b = this.selectionLead;
- this.setSelectionRange(this.doc.getWordRange(b.row, b.column))
+ var d = this.selectionLead;
+ this.setSelectionRange(this.doc.getWordRange(d.row, d.column))
};
this.selectLine = function() {
this.setSelectionAnchor(this.selectionLead.row, 0);
@@ -871,177 +1121,177 @@ define("ace/selection", ["require", "exports", "module", "./lib/oop", "./lib/lan
if(this.selectionLead.column == 0) {
this.selectionLead.row > 0 && this.moveCursorTo(this.selectionLead.row - 1, this.doc.getLine(this.selectionLead.row - 1).length)
}else {
- this.moveCursorBy(0, -1)
+ var d = this.doc, k = d.getTabSize(), a = this.selectionLead;
+ d.isTabStop(a) && d.getLine(a.row).slice(a.column - k, a.column).split(" ").length - 1 == k ? this.moveCursorBy(0, -k) : this.moveCursorBy(0, -1)
}
};
this.moveCursorRight = function() {
if(this.selectionLead.column == this.doc.getLine(this.selectionLead.row).length) {
this.selectionLead.row < this.doc.getLength() - 1 && this.moveCursorTo(this.selectionLead.row + 1, 0)
}else {
- this.moveCursorBy(0, 1)
+ var d = this.doc, k = d.getTabSize(), a = this.selectionLead;
+ d.isTabStop(a) && d.getLine(a.row).slice(a.column, a.column + k).split(" ").length - 1 == k ? this.moveCursorBy(0, k) : this.moveCursorBy(0, 1)
}
};
this.moveCursorLineStart = function() {
- var b = this.selectionLead.row, j = this.selectionLead.column, a = this.doc.getLine(b).slice(0, j).match(/^\s*/);
+ var d = this.selectionLead.row, k = this.selectionLead.column, a = this.doc.getLine(d).slice(0, k).match(/^\s*/);
if(a[0].length == 0) {
- this.moveCursorTo(b, this.doc.getLine(b).match(/^\s*/)[0].length)
+ this.moveCursorTo(d, this.doc.getLine(d).match(/^\s*/)[0].length)
}else {
- a[0].length >= j ? this.moveCursorTo(b, 0) : this.moveCursorTo(b, a[0].length)
+ a[0].length >= k ? this.moveCursorTo(d, 0) : this.moveCursorTo(d, a[0].length)
}
};
this.moveCursorLineEnd = function() {
this.moveCursorTo(this.selectionLead.row, this.doc.getLine(this.selectionLead.row).length)
};
this.moveCursorFileEnd = function() {
- var b = this.doc.getLength() - 1, j = this.doc.getLine(b).length;
- this.moveCursorTo(b, j)
+ var d = this.doc.getLength() - 1, k = this.doc.getLine(d).length;
+ this.moveCursorTo(d, k)
};
this.moveCursorFileStart = function() {
this.moveCursorTo(0, 0)
};
this.moveCursorWordRight = function() {
- var b = this.selectionLead.row, j = this.selectionLead.column, a = this.doc.getLine(b), f = a.substring(j);
+ var d = this.selectionLead.row, k = this.selectionLead.column, a = this.doc.getLine(d), f = a.substring(k);
this.doc.nonTokenRe.lastIndex = 0;
this.doc.tokenRe.lastIndex = 0;
- if(j == a.length) {
+ if(k == a.length) {
this.moveCursorRight()
}else {
if(this.doc.nonTokenRe.exec(f)) {
- j += this.doc.nonTokenRe.lastIndex;
+ k += this.doc.nonTokenRe.lastIndex;
this.doc.nonTokenRe.lastIndex = 0
}else {
if(this.doc.tokenRe.exec(f)) {
- j += this.doc.tokenRe.lastIndex;
+ k += this.doc.tokenRe.lastIndex;
this.doc.tokenRe.lastIndex = 0
}
- }this.moveCursorTo(b, j)
+ }this.moveCursorTo(d, k)
}
};
this.moveCursorWordLeft = function() {
- var b = this.selectionLead.row, j = this.selectionLead.column, a = this.doc.getLine(b);
- a = e.stringReverse(a.substring(0, j));
+ var d = this.selectionLead.row, k = this.selectionLead.column, a = this.doc.getLine(d);
+ a = e.stringReverse(a.substring(0, k));
this.doc.nonTokenRe.lastIndex = 0;
this.doc.tokenRe.lastIndex = 0;
- if(j == 0) {
+ if(k == 0) {
this.moveCursorLeft()
}else {
if(this.doc.nonTokenRe.exec(a)) {
- j -= this.doc.nonTokenRe.lastIndex;
+ k -= this.doc.nonTokenRe.lastIndex;
this.doc.nonTokenRe.lastIndex = 0
}else {
if(this.doc.tokenRe.exec(a)) {
- j -= this.doc.tokenRe.lastIndex;
+ k -= this.doc.tokenRe.lastIndex;
this.doc.tokenRe.lastIndex = 0
}
- }this.moveCursorTo(b, j)
+ }this.moveCursorTo(d, k)
}
};
- this.moveCursorBy = function(b, j) {
- this.moveCursorTo(this.selectionLead.row + b, this.selectionLead.column + j)
+ this.moveCursorBy = function(d, k) {
+ this.moveCursorTo(this.selectionLead.row + d, this.selectionLead.column + k)
};
- this.moveCursorToPosition = function(b) {
- this.moveCursorTo(b.row, b.column)
+ this.moveCursorToPosition = function(d) {
+ this.moveCursorTo(d.row, d.column)
};
- this.moveCursorTo = function(b, j) {
- b = this.$clipPositionToDocument(b, j);
- if(b.row !== this.selectionLead.row || b.column !== this.selectionLead.column) {
- this.selectionLead = b;
- this.$dispatchEvent("changeCursor", {data:this.getCursor()})
+ this.moveCursorTo = function(d, k) {
+ d = this.$clipPositionToDocument(d, k);
+ if(d.row !== this.selectionLead.row || d.column !== this.selectionLead.column) {
+ this.selectionLead = d;
+ this._dispatchEvent("changeCursor", {data:this.getCursor()})
}
};
this.moveCursorUp = function() {
this.moveCursorBy(-1, 0)
};
- this.$clipPositionToDocument = function(b, j) {
+ this.$clipPositionToDocument = function(d, k) {
var a = {};
- if(b >= this.doc.getLength()) {
+ if(d >= this.doc.getLength()) {
a.row = Math.max(0, this.doc.getLength() - 1);
a.column = this.doc.getLine(a.row).length
}else {
- if(b < 0) {
+ if(d < 0) {
a.row = 0;
a.column = 0
}else {
- a.row = b;
- a.column = Math.min(this.doc.getLine(a.row).length, Math.max(0, j))
+ a.row = d;
+ a.column = Math.min(this.doc.getLine(a.row).length, Math.max(0, k))
}
}return a
};
- this.$clone = function(b) {
- return{row:b.row, column:b.column}
+ this.$clone = function(d) {
+ return{row:d.row, column:d.column}
}
- }).call(h.prototype);
- return h
+ }).call(j.prototype);
+ g.Selection = j
});
-define("ace/tokenizer", ["require", "exports", "module"], function() {
- var h = function(g) {
- this.rules = g;
+define("ace/tokenizer", ["require", "exports", "module"], function(j, g) {
+ j = function(l) {
+ this.rules = l;
this.regExps = {};
for(var e in this.rules) {
- g = this.rules[e];
- for(var c = [], i = 0;i < g.length;i++) {
- c.push(g[i].regex)
- }this.regExps[e] = new RegExp("(?:(" + c.join(")|(") + ")|(.))", "g")
+ l = this.rules[e];
+ for(var i = [], o = 0;o < l.length;o++) {
+ i.push(l[o].regex)
+ }this.regExps[e] = new RegExp("(?:(" + i.join(")|(") + ")|(.))", "g")
}
};
(function() {
- this.getLineTokens = function(g, e) {
+ this.getLineTokens = function(l, e) {
e = e;
- var c = this.rules[e], i = this.regExps[e];
- i.lastIndex = 0;
- for(var b, j = [], a = 0, f = {type:null, value:""};b = i.exec(g);) {
- var l = "text", n = b[0];
- if(i.lastIndex == a) {
+ var i = this.rules[e], o = this.regExps[e];
+ o.lastIndex = 0;
+ for(var d, k = [], a = 0, f = {type:null, value:""};d = o.exec(l);) {
+ var h = "text", m = d[0];
+ if(o.lastIndex == a) {
throw new Error("tokenizer error");
- }a = i.lastIndex;
- window.LOG && console.log(e, b);
- for(var d = 0;d < c.length;d++) {
- if(b[d + 1]) {
- l = typeof c[d].token == "function" ? c[d].token(b[0]) : c[d].token;
- if(c[d].next && c[d].next !== e) {
- e = c[d].next;
- c = this.rules[e];
- a = i.lastIndex;
- i = this.regExps[e];
- i.lastIndex = a
+ }a = o.lastIndex;
+ for(var b = 0;b < i.length;b++) {
+ if(d[b + 1]) {
+ h = typeof i[b].token == "function" ? i[b].token(d[0]) : i[b].token;
+ if(i[b].next && i[b].next !== e) {
+ e = i[b].next;
+ i = this.rules[e];
+ a = o.lastIndex;
+ o = this.regExps[e];
+ o.lastIndex = a
}break
}
- }if(f.type !== l) {
- f.type && j.push(f);
- f = {type:l, value:n}
+ }if(f.type !== h) {
+ f.type && k.push(f);
+ f = {type:h, value:m}
}else {
- f.value += n
+ f.value += m
}
- }f.type && j.push(f);
- window.LOG && console.log(j, e);
- return{tokens:j, state:e}
+ }f.type && k.push(f);
+ return{tokens:k, state:e}
}
- }).call(h.prototype);
- return h
+ }).call(j.prototype);
+ g.Tokenizer = j
});
-define("ace/mode/text_highlight_rules", ["require", "exports", "module"], function() {
- var h = function() {
+define("ace/mode/text_highlight_rules", ["require", "exports", "module"], function(j, g) {
+ j = function() {
this.$rules = {start:[{token:"text", regex:".+"}]}
};
(function() {
- this.addRules = function(g, e) {
- for(var c in g) {
- for(var i = g[c], b = 0;b < i.length;b++) {
- var j = i[b];
- j.next = j.next ? e + j.next : e + c
- }this.$rules[e + c] = i
+ this.addRules = function(l, e) {
+ for(var i in l) {
+ for(var o = l[i], d = 0;d < o.length;d++) {
+ var k = o[d];
+ k.next = k.next ? e + k.next : e + i
+ }this.$rules[e + i] = o
}
};
this.getRules = function() {
return this.$rules
}
- }).call(h.prototype);
- return h
+ }).call(j.prototype);
+ g.TextHighlightRules = j
});
-define("ace/mode/text", ["require", "exports", "module", "../tokenizer", "./text_highlight_rules"], function(h) {
- var g = h("../tokenizer"), e = h("./text_highlight_rules");
- h = function() {
- this.$tokenizer = new g((new e).getRules())
+define("ace/mode/text", ["require", "exports", "module", "ace/tokenizer", "ace/mode/text_highlight_rules"], function(j, g) {
+ var l = j("ace/tokenizer").Tokenizer, e = j("ace/mode/text_highlight_rules").TextHighlightRules;
+ j = function() {
+ this.$tokenizer = new l((new e).getRules())
};
(function() {
this.getTokenizer = function() {
@@ -1058,27 +1308,27 @@ define("ace/mode/text", ["require", "exports", "module", "../tokenizer", "./text
};
this.autoOutdent = function() {
};
- this.$getIndent = function(c) {
- if(c = c.match(/^(\s+)/)) {
- return c[1]
+ this.$getIndent = function(i) {
+ if(i = i.match(/^(\s+)/)) {
+ return i[1]
}return""
}
- }).call(h.prototype);
- return h
+ }).call(j.prototype);
+ g.Mode = j
});
-define("ace/document", ["require", "exports", "module", "./lib/oop", "./lib/lang", "./event_emitter", "./selection", "./mode/text", "./range"], function(h) {
- var g = h("./lib/oop"), e = h("./lib/lang"), c = h("./event_emitter"), i = h("./selection"), b = h("./mode/text"), j = h("./range");
- h = function(a, f) {
+define("ace/document", ["require", "exports", "module", "pilot/oop", "pilot/lang", "pilot/event_emitter", "ace/selection", "ace/mode/text", "ace/range"], function(j, g) {
+ var l = j("pilot/oop"), e = j("pilot/lang"), i = j("pilot/event_emitter").EventEmitter, o = j("ace/selection").Selection, d = j("ace/mode/text").Mode, k = j("ace/range").Range;
+ j = function(a, f) {
this.modified = true;
this.lines = [];
- this.selection = new i(this);
+ this.selection = new o(this);
this.$breakpoints = [];
this.listeners = [];
f && this.setMode(f);
- e.isArray(a) ? this.$insertLines(0, a) : this.$insert({row:0, column:0}, a)
+ Array.isArray(a) ? this.$insertLines(0, a) : this.$insert({row:0, column:0}, a)
};
(function() {
- g.implement(this, c);
+ l.implement(this, i);
this.$undoManager = null;
this.$split = function(a) {
return a.split(/\r\n|\r|\n/)
@@ -1097,7 +1347,7 @@ define("ace/document", ["require", "exports", "module", "./lib/oop", "./lib/lang
return this.selection
};
this.fireChangeEvent = function(a, f) {
- this.$dispatchEvent("change", {data:{firstRow:a, lastRow:f}})
+ this._dispatchEvent("change", {data:{firstRow:a, lastRow:f}})
};
this.setUndoManager = function(a) {
this.$undoManager = a;
@@ -1134,12 +1384,15 @@ define("ace/document", ["require", "exports", "module", "./lib/oop", "./lib/lang
if(!(isNaN(a) || this.$tabSize === a)) {
this.modified = true;
this.$tabSize = a;
- this.$dispatchEvent("changeTabSize")
+ this._dispatchEvent("changeTabSize")
}
};
this.getTabSize = function() {
return this.$tabSize
};
+ this.isTabStop = function(a) {
+ return this.$useSoftTabs && a.column % this.$tabSize == 0
+ };
this.getBreakpoints = function() {
return this.$breakpoints
};
@@ -1147,19 +1400,19 @@ define("ace/document", ["require", "exports", "module", "./lib/oop", "./lib/lang
this.$breakpoints = [];
for(var f = 0;f < a.length;f++) {
this.$breakpoints[a[f]] = true
- }this.$dispatchEvent("changeBreakpoint", {})
+ }this._dispatchEvent("changeBreakpoint", {})
};
this.clearBreakpoints = function() {
this.$breakpoints = [];
- this.$dispatchEvent("changeBreakpoint", {})
+ this._dispatchEvent("changeBreakpoint", {})
};
this.setBreakpoint = function(a) {
this.$breakpoints[a] = true;
- this.$dispatchEvent("changeBreakpoint", {})
+ this._dispatchEvent("changeBreakpoint", {})
};
this.clearBreakpoint = function(a) {
delete this.$breakpoints[a];
- this.$dispatchEvent("changeBreakpoint", {})
+ this._dispatchEvent("changeBreakpoint", {})
};
this.$detectNewLine = function(a) {
this.$autoNewLine = (a = a.match(/^.*?(\r?\n)/m)) ? a[1] : "\n"
@@ -1167,20 +1420,20 @@ define("ace/document", ["require", "exports", "module", "./lib/oop", "./lib/lang
this.tokenRe = /^[\w\d]+/g;
this.nonTokenRe = /^[^\w\d]+/g;
this.getWordRange = function(a, f) {
- var l = this.getLine(a), n = false;
+ var h = this.getLine(a), m = false;
if(f > 0) {
- n = !!l.charAt(f - 1).match(this.tokenRe)
- }n || (n = !!l.charAt(f).match(this.tokenRe));
- n = n ? this.tokenRe : this.nonTokenRe;
- var d = f;
- if(d > 0) {
+ m = !!h.charAt(f - 1).match(this.tokenRe)
+ }m || (m = !!h.charAt(f).match(this.tokenRe));
+ m = m ? this.tokenRe : this.nonTokenRe;
+ var b = f;
+ if(b > 0) {
do {
- d--
- }while(d >= 0 && l.charAt(d).match(n));
- d++
- }for(f = f;f < l.length && l.charAt(f).match(n);) {
+ b--
+ }while(b >= 0 && h.charAt(b).match(m));
+ b++
+ }for(f = f;f < h.length && h.charAt(f).match(m);) {
f++
- }return new j(a, d, a, f)
+ }return new k(a, b, a, f)
};
this.$getNewLineCharacter = function() {
switch(this.$newLineMode) {
@@ -1206,19 +1459,19 @@ define("ace/document", ["require", "exports", "module", "./lib/oop", "./lib/lang
this.setMode = function(a) {
if(this.$mode !== a) {
this.$mode = a;
- this.$dispatchEvent("changeMode")
+ this._dispatchEvent("changeMode")
}
};
this.getMode = function() {
if(!this.$mode) {
- this.$mode = new b
+ this.$mode = new d
}return this.$mode
};
this.$scrollTop = 0;
this.setScrollTopRow = function(a) {
if(this.$scrollTop !== a) {
this.$scrollTop = a;
- this.$dispatchEvent("changeScrollTop")
+ this._dispatchEvent("changeScrollTop")
}
};
this.getScrollTopRow = function() {
@@ -1230,21 +1483,21 @@ define("ace/document", ["require", "exports", "module", "./lib/oop", "./lib/lang
};
this.getScreenWidth = function() {
this.$computeWidth();
- return this.screenWith
+ return this.screenWidth
};
this.$computeWidth = function() {
if(this.modified) {
this.modified = false;
- for(var a = this.lines, f = 0, l = 0, n = this.getTabSize(), d = 0;d < a.length;d++) {
- var k = a[d].length;
- f = Math.max(f, k);
- a[d].replace("\t", function(p) {
- k += n - 1;
- return p
+ for(var a = this.lines, f = 0, h = 0, m = this.getTabSize(), b = 0;b < a.length;b++) {
+ var c = a[b].length;
+ f = Math.max(f, c);
+ a[b].replace("\t", function(n) {
+ c += m - 1;
+ return n
});
- l = Math.max(l, k)
+ h = Math.max(h, c)
}this.width = f;
- this.screenWith = l
+ this.screenWidth = h
}
};
this.getLine = function(a) {
@@ -1284,97 +1537,117 @@ define("ace/document", ["require", "exports", "module", "./lib/oop", "./lib/lang
};
this.$brackets = {")":"(", "(":")", "]":"[", "[":"]", "{":"}", "}":"{"};
this.$findOpeningBracket = function(a, f) {
- var l = this.$brackets[a], n = f.column - 2;
+ var h = this.$brackets[a], m = f.column - 2;
f = f.row;
- for(var d = 1, k = this.getLine(f);;) {
- for(;n >= 0;) {
- var p = k.charAt(n);
- if(p == l) {
- d -= 1;
- if(d == 0) {
- return{row:f, column:n}
+ for(var b = 1, c = this.getLine(f);;) {
+ for(;m >= 0;) {
+ var n = c.charAt(m);
+ if(n == h) {
+ b -= 1;
+ if(b == 0) {
+ return{row:f, column:m}
}
}else {
- if(p == a) {
- d += 1
+ if(n == a) {
+ b += 1
}
- }n -= 1
+ }m -= 1
}f -= 1;
if(f < 0) {
break
- }k = this.getLine(f);
- n = k.length - 1
+ }c = this.getLine(f);
+ m = c.length - 1
}return null
};
this.$findClosingBracket = function(a, f) {
- var l = this.$brackets[a], n = f.column;
+ var h = this.$brackets[a], m = f.column;
f = f.row;
- for(var d = 1, k = this.getLine(f), p = this.getLength();;) {
- for(;n < k.length;) {
- var o = k.charAt(n);
- if(o == l) {
- d -= 1;
- if(d == 0) {
- return{row:f, column:n}
+ for(var b = 1, c = this.getLine(f), n = this.getLength();;) {
+ for(;m < c.length;) {
+ var p = c.charAt(m);
+ if(p == h) {
+ b -= 1;
+ if(b == 0) {
+ return{row:f, column:m}
}
}else {
- if(o == a) {
- d += 1
+ if(p == a) {
+ b += 1
}
- }n += 1
+ }m += 1
}f += 1;
- if(f >= p) {
+ if(f >= n) {
break
- }k = this.getLine(f);
- n = 0
+ }c = this.getLine(f);
+ m = 0
}return null
};
- this.insert = function(a, f, l) {
- f = this.$insert(a, f, l);
+ this.insert = function(a, f, h) {
+ f = this.$insert(a, f, h);
this.fireChangeEvent(a.row, a.row == f.row ? a.row : undefined);
return f
};
- this.$insertLines = function(a, f, l) {
+ this.multiRowInsert = function(a, f, h) {
+ for(var m = this.lines, b = a.length - 1;b >= 0;b--) {
+ var c = a[b];
+ if(!(c >= m.length)) {
+ var n = f - m[c].length;
+ if(n > 0) {
+ var p = e.stringRepeat(" ", n) + h;
+ n = -n
+ }else {
+ p = h;
+ n = 0
+ }p = this.$insert({row:c, column:f + n}, p, false)
+ }
+ }if(p) {
+ this.fireChangeEvent(a[0], a[a.length - 1] + p.row - a[0]);
+ return{rows:p.row - a[0], columns:p.column - f}
+ }else {
+ return{rows:0, columns:0}
+ }
+ };
+ this.$insertLines = function(a, f, h) {
if(f.length != 0) {
- var n = [a, 0];
- n.push.apply(n, f);
- this.lines.splice.apply(this.lines, n);
- if(!l && this.$undoManager) {
- l = this.$getNewLineCharacter();
- this.$deltas.push({action:"insertText", range:new j(a, 0, a + f.length, 0), text:f.join(l) + l});
+ var m = [a, 0];
+ m.push.apply(m, f);
+ this.lines.splice.apply(this.lines, m);
+ if(!h && this.$undoManager) {
+ h = this.$getNewLineCharacter();
+ this.$deltas.push({action:"insertText", range:new k(a, 0, a + f.length, 0), text:f.join(h) + h});
this.$informUndoManager.schedule()
}
}
};
- this.$insert = function(a, f, l) {
+ this.$insert = function(a, f, h) {
if(f.length == 0) {
return a
}this.modified = true;
this.lines.length <= 1 && this.$detectNewLine(f);
- var n = this.$split(f);
+ var m = this.$split(f);
if(this.$isNewLine(f)) {
- var d = this.lines[a.row] || "";
- this.lines[a.row] = d.substring(0, a.column);
- this.lines.splice(a.row + 1, 0, d.substring(a.column));
- n = {row:a.row + 1, column:0}
+ var b = this.lines[a.row] || "";
+ this.lines[a.row] = b.substring(0, a.column);
+ this.lines.splice(a.row + 1, 0, b.substring(a.column));
+ m = {row:a.row + 1, column:0}
}else {
- if(n.length == 1) {
- d = this.lines[a.row] || "";
- this.lines[a.row] = d.substring(0, a.column) + f + d.substring(a.column);
- n = {row:a.row, column:a.column + f.length}
+ if(m.length == 1) {
+ b = this.lines[a.row] || "";
+ this.lines[a.row] = b.substring(0, a.column) + f + b.substring(a.column);
+ m = {row:a.row, column:a.column + f.length}
}else {
- d = this.lines[a.row] || "";
- var k = d.substring(0, a.column) + n[0];
- d = n[n.length - 1] + d.substring(a.column);
- this.lines[a.row] = k;
- this.$insertLines(a.row + 1, [d], true);
- n.length > 2 && this.$insertLines(a.row + 1, n.slice(1, -1), true);
- n = {row:a.row + n.length - 1, column:n[n.length - 1].length}
+ b = this.lines[a.row] || "";
+ var c = b.substring(0, a.column) + m[0];
+ b = m[m.length - 1] + b.substring(a.column);
+ this.lines[a.row] = c;
+ this.$insertLines(a.row + 1, [b], true);
+ m.length > 2 && this.$insertLines(a.row + 1, m.slice(1, -1), true);
+ m = {row:a.row + m.length - 1, column:m[m.length - 1].length}
}
- }if(!l && this.$undoManager) {
- this.$deltas.push({action:"insertText", range:j.fromPoints(a, n), text:f});
+ }if(!h && this.$undoManager) {
+ this.$deltas.push({action:"insertText", range:k.fromPoints(a, m), text:f});
this.$informUndoManager.schedule()
- }return n
+ }return m
};
this.$isNewLine = function(a) {
return a == "\r\n" || a == "\r" || a == "\n"
@@ -1386,6 +1659,18 @@ define("ace/document", ["require", "exports", "module", "./lib/oop", "./lib/lang
this.fireChangeEvent(a.start.row, a.isMultiLine() ? undefined : a.start.row);
return a.start
};
+ this.multiRowRemove = function(a, f) {
+ if(f.start.row !== a[0]) {
+ throw new TypeError("range must start in the first row!");
+ }for(var h = f.end.row - a[0], m = a.length - 1;m >= 0;m--) {
+ var b = a[m];
+ if(!(b >= this.lines.length)) {
+ var c = this.$remove(new k(b, f.start.column, b + h, f.end.column), false)
+ }
+ }if(c) {
+ h < 0 ? this.fireChangeEvent(a[0] + h, undefined) : this.fireChangeEvent(a[0], h == 0 ? a[a.length - 1] : undefined)
+ }
+ };
this.$remove = function(a, f) {
if(!a.isEmpty()) {
if(!f && this.$undoManager) {
@@ -1394,20 +1679,20 @@ define("ace/document", ["require", "exports", "module", "./lib/oop", "./lib/lang
this.$informUndoManager.schedule()
}this.modified = true;
f = a.start.row;
- var l = a.end.row, n = this.getLine(f).substring(0, a.start.column) + this.getLine(l).substring(a.end.column);
- n != "" ? this.lines.splice(f, l - f + 1, n) : this.lines.splice(f, l - f + 1, "");
+ var h = a.end.row, m = this.getLine(f).substring(0, a.start.column) + this.getLine(h).substring(a.end.column);
+ m != "" ? this.lines.splice(f, h - f + 1, m) : this.lines.splice(f, h - f + 1, "");
return a.start
}
};
this.undoChanges = function(a) {
this.selection.clearSelection();
for(var f = a.length - 1;f >= 0;f--) {
- var l = a[f];
- if(l.action == "insertText") {
- this.remove(l.range, true);
- this.selection.moveCursorToPosition(l.range.start)
+ var h = a[f];
+ if(h.action == "insertText") {
+ this.remove(h.range, true);
+ this.selection.moveCursorToPosition(h.range.start)
}else {
- this.insert(l.range.start, l.text, true);
+ this.insert(h.range.start, h.text, true);
this.selection.clearSelection()
}
}
@@ -1415,76 +1700,76 @@ define("ace/document", ["require", "exports", "module", "./lib/oop", "./lib/lang
this.redoChanges = function(a) {
this.selection.clearSelection();
for(var f = 0;f < a.length;f++) {
- var l = a[f];
- if(l.action == "insertText") {
- this.insert(l.range.start, l.text, true);
- this.selection.setSelectionRange(l.range)
+ var h = a[f];
+ if(h.action == "insertText") {
+ this.insert(h.range.start, h.text, true);
+ this.selection.setSelectionRange(h.range)
}else {
- this.remove(l.range, true);
- this.selection.moveCursorToPosition(l.range.start)
+ this.remove(h.range, true);
+ this.selection.moveCursorToPosition(h.range.start)
}
}
};
this.replace = function(a, f) {
this.$remove(a);
f = f ? this.$insert(a.start, f) : a.start;
- var l = a.end.column == 0 ? a.end.column - 1 : a.end.column;
- this.fireChangeEvent(a.start.row, l == f.row ? l : undefined);
+ var h = a.end.column == 0 ? a.end.column - 1 : a.end.column;
+ this.fireChangeEvent(a.start.row, h == f.row ? h : undefined);
return f
};
- this.indentRows = function(a, f) {
- f.replace("\t", this.getTabString());
- for(var l = a.start.row;l <= a.end.row;l++) {
- this.$insert({row:l, column:0}, f)
- }this.fireChangeEvent(a.start.row, a.end.row);
- return f.length
+ this.indentRows = function(a, f, h) {
+ h = h.replace("\t", this.getTabString());
+ for(var m = a;m <= f;m++) {
+ this.$insert({row:m, column:0}, h)
+ }this.fireChangeEvent(a, f);
+ return h.length
};
this.outdentRows = function(a) {
- for(var f = new j(0, 0, 0, 0), l = this.getTabSize(), n = a.start.row;n <= a.end.row;++n) {
- var d = this.getLine(n);
- f.start.row = n;
- f.end.row = n;
- for(var k = 0;k < l;++k) {
- if(d.charAt(k) != " ") {
+ for(var f = a.collapseRows(), h = new k(0, 0, 0, 0), m = this.getTabSize(), b = f.start.row;b <= f.end.row;++b) {
+ var c = this.getLine(b);
+ h.start.row = b;
+ h.end.row = b;
+ for(var n = 0;n < m;++n) {
+ if(c.charAt(n) != " ") {
break
}
- }if(k < l && d.charAt(k) == "\t") {
- f.start.column = k;
- f.end.column = k + 1
+ }if(n < m && c.charAt(n) == "\t") {
+ h.start.column = n;
+ h.end.column = n + 1
}else {
- f.start.column = 0;
- f.end.column = k
- }if(n == a.start.row) {
- a.start.column -= f.end.column - f.start.column
- }if(n == a.end.row) {
- a.end.column -= f.end.column - f.start.column
- }this.$remove(f)
+ h.start.column = 0;
+ h.end.column = n
+ }if(b == a.start.row) {
+ a.start.column -= h.end.column - h.start.column
+ }if(b == a.end.row) {
+ a.end.column -= h.end.column - h.start.column
+ }this.$remove(h)
}this.fireChangeEvent(a.start.row, a.end.row);
return a
};
this.moveLinesUp = function(a, f) {
if(a <= 0) {
return 0
- }var l = this.lines.slice(a, f + 1);
- this.$remove(new j(a, 0, f + 1, 0));
- this.$insertLines(a - 1, l);
+ }var h = this.lines.slice(a, f + 1);
+ this.$remove(new k(a - 1, this.lines[a - 1].length, f, this.lines[f].length));
+ this.$insertLines(a - 1, h);
this.fireChangeEvent(a - 1, f);
return-1
};
this.moveLinesDown = function(a, f) {
if(f >= this.lines.length - 1) {
return 0
- }var l = this.lines.slice(a, f + 1);
- this.$remove(new j(a, 0, f + 1, 0));
- this.$insertLines(a + 1, l);
+ }var h = this.lines.slice(a, f + 1);
+ this.$remove(new k(a, 0, f + 1, 0));
+ this.$insertLines(a + 1, h);
this.fireChangeEvent(a, f + 1);
return 1
};
this.duplicateLines = function(a, f) {
a = this.$clipRowToDocument(a);
f = this.$clipRowToDocument(f);
- var l = this.getLines(a, f);
- this.$insertLines(a, l);
+ var h = this.getLines(a, f);
+ this.$insertLines(a, h);
f = f - a + 1;
this.fireChangeEvent(a);
return f
@@ -1493,229 +1778,229 @@ define("ace/document", ["require", "exports", "module", "./lib/oop", "./lib/lang
return Math.max(0, Math.min(a, this.lines.length - 1))
};
this.documentToScreenColumn = function(a, f) {
- var l = this.getTabSize(), n = 0;
+ var h = this.getTabSize(), m = 0;
f = f;
a = this.getLine(a).split("\t");
- for(var d = 0;d < a.length;d++) {
- var k = a[d].length;
- if(f > k) {
- f -= k + 1;
- n += k + l
+ for(var b = 0;b < a.length;b++) {
+ var c = a[b].length;
+ if(f > c) {
+ f -= c + 1;
+ m += c + h
}else {
- n += f;
+ m += f;
break
}
- }return n
+ }return m
};
this.screenToDocumentColumn = function(a, f) {
- var l = this.getTabSize(), n = 0;
+ var h = this.getTabSize(), m = 0;
f = f;
a = this.getLine(a).split("\t");
- for(var d = 0;d < a.length;d++) {
- var k = a[d].length;
- if(f >= k + l) {
- f -= k + l;
- n += k + 1
+ for(var b = 0;b < a.length;b++) {
+ var c = a[b].length;
+ if(f >= c + h) {
+ f -= c + h;
+ m += c + 1
}else {
- n += f > k ? k : f;
+ m += f > c ? c : f;
break
}
- }return n
+ }return m
}
- }).call(h.prototype);
- return h
+ }).call(j.prototype);
+ g.Document = j
});
-define("ace/search", ["require", "exports", "module", "./lib/lang", "./lib/oop", "./range"], function(h) {
- var g = h("./lib/lang"), e = h("./lib/oop"), c = h("./range"), i = function() {
- this.$options = {needle:"", backwards:false, wrap:false, caseSensitive:false, wholeWord:false, scope:i.ALL, regExp:false}
+define("ace/search", ["require", "exports", "module", "pilot/lang", "pilot/oop", "ace/range"], function(j, g) {
+ var l = j("pilot/lang"), e = j("pilot/oop"), i = j("ace/range").Range, o = function() {
+ this.$options = {needle:"", backwards:false, wrap:false, caseSensitive:false, wholeWord:false, scope:o.ALL, regExp:false}
};
- i.ALL = 1;
- i.SELECTION = 2;
+ o.ALL = 1;
+ o.SELECTION = 2;
(function() {
- this.set = function(b) {
- e.mixin(this.$options, b);
+ this.set = function(d) {
+ e.mixin(this.$options, d);
return this
};
this.getOptions = function() {
- return g.copyObject(this.$options)
+ return l.copyObject(this.$options)
};
- this.find = function(b) {
+ this.find = function(d) {
if(!this.$options.needle) {
return null
- }var j = null;
- (this.$options.backwards ? this.$backwardMatchIterator(b) : this.$forwardMatchIterator(b)).forEach(function(a) {
- j = a;
+ }var k = null;
+ (this.$options.backwards ? this.$backwardMatchIterator(d) : this.$forwardMatchIterator(d)).forEach(function(a) {
+ k = a;
return true
});
- return j
+ return k
};
- this.findAll = function(b) {
+ this.findAll = function(d) {
if(!this.$options.needle) {
return[]
- }var j = [];
- (this.$options.backwards ? this.$backwardMatchIterator(b) : this.$forwardMatchIterator(b)).forEach(function(a) {
- j.push(a)
+ }var k = [];
+ (this.$options.backwards ? this.$backwardMatchIterator(d) : this.$forwardMatchIterator(d)).forEach(function(a) {
+ k.push(a)
});
- return j
+ return k
};
- this.replace = function(b, j) {
- var a = this.$assembleRegExp(), f = a.exec(b);
- return f && f[0].length == b.length ? this.$options.regExp ? b.replace(a, j) : j : null
+ this.replace = function(d, k) {
+ var a = this.$assembleRegExp(), f = a.exec(d);
+ return f && f[0].length == d.length ? this.$options.regExp ? d.replace(a, k) : k : null
};
- this.$forwardMatchIterator = function(b) {
- var j = this.$assembleRegExp(), a = this;
+ this.$forwardMatchIterator = function(d) {
+ var k = this.$assembleRegExp(), a = this;
return{forEach:function(f) {
- a.$forwardLineIterator(b).forEach(function(l, n, d) {
- if(n) {
- l = l.substring(n)
- }var k = [];
- l.replace(j, function(o) {
- k.push({str:o, offset:n + arguments[arguments.length - 2]});
- return o
+ a.$forwardLineIterator(d).forEach(function(h, m, b) {
+ if(m) {
+ h = h.substring(m)
+ }var c = [];
+ h.replace(k, function(p) {
+ c.push({str:p, offset:m + arguments[arguments.length - 2]});
+ return p
});
- for(l = 0;l < k.length;l++) {
- var p = k[l];
- p = a.$rangeFromMatch(d, p.offset, p.str.length);
- if(f(p)) {
+ for(h = 0;h < c.length;h++) {
+ var n = c[h];
+ n = a.$rangeFromMatch(b, n.offset, n.str.length);
+ if(f(n)) {
return true
}
}
})
}}
};
- this.$backwardMatchIterator = function(b) {
- var j = this.$assembleRegExp(), a = this;
+ this.$backwardMatchIterator = function(d) {
+ var k = this.$assembleRegExp(), a = this;
return{forEach:function(f) {
- a.$backwardLineIterator(b).forEach(function(l, n, d) {
- if(n) {
- l = l.substring(n)
- }var k = [];
- l.replace(j, function(o, m) {
- k.push({str:o, offset:n + m});
- return o
+ a.$backwardLineIterator(d).forEach(function(h, m, b) {
+ if(m) {
+ h = h.substring(m)
+ }var c = [];
+ h.replace(k, function(p, r) {
+ c.push({str:p, offset:m + r});
+ return p
});
- for(l = k.length - 1;l >= 0;l--) {
- var p = k[l];
- p = a.$rangeFromMatch(d, p.offset, p.str.length);
- if(f(p)) {
+ for(h = c.length - 1;h >= 0;h--) {
+ var n = c[h];
+ n = a.$rangeFromMatch(b, n.offset, n.str.length);
+ if(f(n)) {
return true
}
}
})
}}
};
- this.$rangeFromMatch = function(b, j, a) {
- return new c(b, j, b, j + a)
+ this.$rangeFromMatch = function(d, k, a) {
+ return new i(d, k, d, k + a)
};
this.$assembleRegExp = function() {
- var b = this.$options.regExp ? this.$options.needle : g.escapeRegExp(this.$options.needle);
+ var d = this.$options.regExp ? this.$options.needle : l.escapeRegExp(this.$options.needle);
if(this.$options.wholeWord) {
- b = "\\b" + b + "\\b"
- }var j = "g";
- this.$options.caseSensitive || (j += "i");
- return new RegExp(b, j)
+ d = "\\b" + d + "\\b"
+ }var k = "g";
+ this.$options.caseSensitive || (k += "i");
+ return new RegExp(d, k)
};
- this.$forwardLineIterator = function(b) {
- function j(o) {
- var m = b.getLine(o);
- if(a && o == f.end.row) {
- m = m.substring(0, f.end.column)
- }return m
+ this.$forwardLineIterator = function(d) {
+ function k(p) {
+ var r = d.getLine(p);
+ if(a && p == f.end.row) {
+ r = r.substring(0, f.end.column)
+ }return r
}
- var a = this.$options.scope == i.SELECTION, f = b.getSelection().getRange(), l = b.getSelection().getCursor(), n = a ? f.start.row : 0, d = a ? f.start.column : 0, k = a ? f.end.row : b.getLength() - 1, p = this.$options.wrap;
- return{forEach:function(o) {
- for(var m = l.row, r = j(m), q = l.column, s = false;!o(r, q, m);) {
+ var a = this.$options.scope == o.SELECTION, f = d.getSelection().getRange(), h = d.getSelection().getCursor(), m = a ? f.start.row : 0, b = a ? f.start.column : 0, c = a ? f.end.row : d.getLength() - 1, n = this.$options.wrap;
+ return{forEach:function(p) {
+ for(var r = h.row, t = k(r), q = h.column, s = false;!p(t, q, r);) {
if(s) {
return
- }m++;
+ }r++;
q = 0;
- if(m > k) {
- if(p) {
- m = n;
- q = d
+ if(r > c) {
+ if(n) {
+ r = m;
+ q = b
}else {
return
}
- }if(m == l.row) {
+ }if(r == h.row) {
s = true
- }r = j(m)
+ }t = k(r)
}
}}
};
- this.$backwardLineIterator = function(b) {
- var j = this.$options.scope == i.SELECTION, a = b.getSelection().getRange(), f = j ? a.end : a.start, l = j ? a.start.row : 0, n = j ? a.start.column : 0, d = j ? a.end.row : b.getLength() - 1, k = this.$options.wrap;
- return{forEach:function(p) {
- for(var o = f.row, m = b.getLine(o).substring(0, f.column), r = 0, q = false;!p(m, r, o);) {
+ this.$backwardLineIterator = function(d) {
+ var k = this.$options.scope == o.SELECTION, a = d.getSelection().getRange(), f = k ? a.end : a.start, h = k ? a.start.row : 0, m = k ? a.start.column : 0, b = k ? a.end.row : d.getLength() - 1, c = this.$options.wrap;
+ return{forEach:function(n) {
+ for(var p = f.row, r = d.getLine(p).substring(0, f.column), t = 0, q = false;!n(r, t, p);) {
if(q) {
return
- }o--;
- r = 0;
- if(o < l) {
- if(k) {
- o = d
+ }p--;
+ t = 0;
+ if(p < h) {
+ if(c) {
+ p = b
}else {
return
}
- }if(o == f.row) {
+ }if(p == f.row) {
q = true
- }m = b.getLine(o);
- if(j) {
- if(o == l) {
- r = n
+ }r = d.getLine(p);
+ if(k) {
+ if(p == h) {
+ t = m
}else {
- if(o == d) {
- m = m.substring(0, a.end.column)
+ if(p == b) {
+ r = r.substring(0, a.end.column)
}
}
}
}
}}
}
- }).call(i.prototype);
- return i
+ }).call(o.prototype);
+ g.Search = o
});
-define("ace/background_tokenizer", ["require", "exports", "module", "./lib/oop", "./event_emitter"], function(h) {
- var g = h("./lib/oop"), e = h("./event_emitter");
- h = function(c, i) {
+define("ace/background_tokenizer", ["require", "exports", "module", "pilot/oop", "pilot/event_emitter"], function(j, g) {
+ var l = j("pilot/oop"), e = j("pilot/event_emitter").EventEmitter;
+ j = function(i, o) {
this.running = false;
this.textLines = [];
this.lines = [];
this.currentLine = 0;
- this.tokenizer = c;
- var b = this;
+ this.tokenizer = i;
+ var d = this;
this.$worker = function() {
- if(b.running) {
- for(var j = new Date, a = b.currentLine, f = b.textLines, l = 0, n = i.getLastVisibleRow();b.currentLine < f.length;) {
- b.lines[b.currentLine] = b.$tokenizeRows(b.currentLine, b.currentLine)[0];
- b.currentLine++;
- l += 1;
- if(l % 5 == 0 && new Date - j > 20) {
- b.fireUpdateEvent(a, b.currentLine - 1);
- b.running = setTimeout(b.$worker, b.currentLine < n ? 20 : 100);
+ if(d.running) {
+ for(var k = new Date, a = d.currentLine, f = d.textLines, h = 0, m = o.getLastVisibleRow();d.currentLine < f.length;) {
+ d.lines[d.currentLine] = d.$tokenizeRows(d.currentLine, d.currentLine)[0];
+ d.currentLine++;
+ h += 1;
+ if(h % 5 == 0 && new Date - k > 20) {
+ d.fireUpdateEvent(a, d.currentLine - 1);
+ d.running = setTimeout(d.$worker, d.currentLine < m ? 20 : 100);
return
}
- }b.running = false;
- b.fireUpdateEvent(a, f.length - 1)
+ }d.running = false;
+ d.fireUpdateEvent(a, f.length - 1)
}
}
};
(function() {
- g.implement(this, e);
- this.setTokenizer = function(c) {
- this.tokenizer = c;
+ l.implement(this, e);
+ this.setTokenizer = function(i) {
+ this.tokenizer = i;
this.lines = [];
this.start(0)
};
- this.setLines = function(c) {
- this.textLines = c;
+ this.setLines = function(i) {
+ this.textLines = i;
this.lines = [];
this.stop()
};
- this.fireUpdateEvent = function(c, i) {
- this.$dispatchEvent("update", {data:{first:c, last:i}})
+ this.fireUpdateEvent = function(i, o) {
+ this._dispatchEvent("update", {data:{first:i, last:o}})
};
- this.start = function(c) {
- this.currentLine = Math.min(c || 0, this.currentLine, this.textLines.length);
+ this.start = function(i) {
+ this.currentLine = Math.min(i || 0, this.currentLine, this.textLines.length);
this.lines.splice(this.currentLine, this.lines.length);
this.stop();
this.running = setTimeout(this.$worker, 700)
@@ -1724,101 +2009,101 @@ define("ace/background_tokenizer", ["require", "exports", "module", "./lib/oop",
this.running && clearTimeout(this.running);
this.running = false
};
- this.getTokens = function(c, i, b) {
- b(this.$tokenizeRows(c, i))
+ this.getTokens = function(i, o, d) {
+ d(this.$tokenizeRows(i, o))
};
- this.getState = function(c, i) {
- i(this.$tokenizeRows(c, c)[0].state)
+ this.getState = function(i, o) {
+ o(this.$tokenizeRows(i, i)[0].state)
};
- this.$tokenizeRows = function(c, i) {
- var b = [], j = "start", a = false;
- if(c > 0 && this.lines[c - 1]) {
- j = this.lines[c - 1].state;
+ this.$tokenizeRows = function(i, o) {
+ var d = [], k = "start", a = false;
+ if(i > 0 && this.lines[i - 1]) {
+ k = this.lines[i - 1].state;
a = true
- }for(c = c;c <= i;c++) {
- if(this.lines[c]) {
- f = this.lines[c];
- j = f.state;
- b.push(f)
+ }for(i = i;i <= o;i++) {
+ if(this.lines[i]) {
+ f = this.lines[i];
+ k = f.state;
+ d.push(f)
}else {
- var f = this.tokenizer.getLineTokens(this.textLines[c] || "", j);
- j = f.state;
- b.push(f);
+ var f = this.tokenizer.getLineTokens(this.textLines[i] || "", k);
+ k = f.state;
+ d.push(f);
if(a) {
- this.lines[c] = f
+ this.lines[i] = f
}
}
- }return b
+ }return d
}
- }).call(h.prototype);
- return h
+ }).call(j.prototype);
+ g.BackgroundTokenizer = j
});
-define("ace/editor", ["require", "exports", "module", "./lib/oop", "./lib/event", "./lib/lang", "./textinput", "./keybinding", "./document", "./search", "./background_tokenizer", "./range", "./event_emitter"], function(h) {
- var g = h("./lib/oop"), e = h("./lib/event"), c = h("./lib/lang"), i = h("./textinput"), b = h("./keybinding"), j = h("./document"), a = h("./search"), f = h("./background_tokenizer"), l = h("./range"), n = h("./event_emitter");
- h = function(d, k) {
- var p = d.getContainerElement();
- this.container = p;
- this.renderer = d;
- this.textInput = new i(p, this);
- this.keyBinding = new b(p, this);
- var o = this;
- e.addListener(p, "mousedown", function(m) {
+define("ace/editor", ["require", "exports", "module", "pilot/oop", "pilot/event", "pilot/lang", "ace/textinput", "ace/keybinding", "ace/document", "ace/search", "ace/background_tokenizer", "ace/range", "pilot/event_emitter"], function(j, g) {
+ var l = j("pilot/oop"), e = j("pilot/event"), i = j("pilot/lang"), o = j("ace/textinput").TextInput, d = j("ace/keybinding").KeyBinding, k = j("ace/document").Document, a = j("ace/search").Search, f = j("ace/background_tokenizer").BackgroundTokenizer, h = j("ace/range").Range, m = j("pilot/event_emitter").EventEmitter;
+ j = function(b, c) {
+ var n = b.getContainerElement();
+ this.container = n;
+ this.renderer = b;
+ this.textInput = new o(n, this);
+ this.keyBinding = new d(n, this);
+ var p = this;
+ e.addListener(n, "mousedown", function(r) {
setTimeout(function() {
- o.focus()
+ p.focus()
});
- return e.preventDefault(m)
+ return e.preventDefault(r)
});
- e.addListener(p, "selectstart", function(m) {
- return e.preventDefault(m)
+ e.addListener(n, "selectstart", function(r) {
+ return e.preventDefault(r)
});
- d = d.getMouseEventTarget();
- e.addListener(d, "mousedown", c.bind(this.onMouseDown, this));
- e.addMultiMouseDownListener(d, 0, 2, 500, c.bind(this.onMouseDoubleClick, this));
- e.addMultiMouseDownListener(d, 0, 3, 600, c.bind(this.onMouseTripleClick, this));
- e.addMouseWheelListener(d, c.bind(this.onMouseWheel, this));
+ b = b.getMouseEventTarget();
+ e.addListener(b, "mousedown", this.onMouseDown.bind(this));
+ e.addMultiMouseDownListener(b, 0, 2, 500, this.onMouseDoubleClick.bind(this));
+ e.addMultiMouseDownListener(b, 0, 3, 600, this.onMouseTripleClick.bind(this));
+ e.addMouseWheelListener(b, this.onMouseWheel.bind(this));
this.$highlightLineMarker = this.$selectionMarker = null;
this.$blockScrolling = false;
this.$search = (new a).set({wrap:true});
- this.setDocument(k || new j(""));
+ this.setDocument(c || new k(""));
this.focus()
};
(function() {
- g.implement(this, n);
+ l.implement(this, m);
this.$forwardEvents = {gutterclick:1, gutterdblclick:1};
this.$originalAddEventListener = this.addEventListener;
this.$originalRemoveEventListener = this.removeEventListener;
- this.addEventListener = function(d, k) {
- return this.$forwardEvents[d] ? this.renderer.addEventListener(d, k) : this.$originalAddEventListener(d, k)
+ this.addEventListener = function(b, c) {
+ return this.$forwardEvents[b] ? this.renderer.addEventListener(b, c) : this.$originalAddEventListener(b, c)
};
- this.removeEventListener = function(d, k) {
- return this.$forwardEvents[d] ? this.renderer.removeEventListener(d, k) : this.$originalRemoveEventListener(d, k)
+ this.removeEventListener = function(b, c) {
+ return this.$forwardEvents[b] ? this.renderer.removeEventListener(b, c) : this.$originalRemoveEventListener(b, c)
};
- this.setDocument = function(d) {
- if(this.doc != d) {
+ this.setDocument = function(b) {
+ if(this.doc != b) {
if(this.doc) {
this.doc.removeEventListener("change", this.$onDocumentChange);
this.doc.removeEventListener("changeMode", this.$onDocumentModeChange);
this.doc.removeEventListener("changeTabSize", this.$onDocumentChangeTabSize);
this.doc.removeEventListener("changeBreakpoint", this.$onDocumentChangeBreakpoint);
- var k = this.doc.getSelection();
- k.removeEventListener("changeCursor", this.$onCursorChange);
- k.removeEventListener("changeSelection", this.$onSelectionChange);
+ var c = this.doc.getSelection();
+ c.removeEventListener("changeCursor", this.$onCursorChange);
+ c.removeEventListener("changeSelection", this.$onSelectionChange);
this.doc.setScrollTopRow(this.renderer.getScrollTopRow())
- }this.doc = d;
- this.$onDocumentChange = c.bind(this.onDocumentChange, this);
- d.addEventListener("change", this.$onDocumentChange);
- this.renderer.setDocument(d);
- this.$onDocumentModeChange = c.bind(this.onDocumentModeChange, this);
- d.addEventListener("changeMode", this.$onDocumentModeChange);
- this.$onDocumentChangeTabSize = c.bind(this.renderer.updateText, this.renderer);
- d.addEventListener("changeTabSize", this.$onDocumentChangeTabSize);
- this.$onDocumentChangeBreakpoint = c.bind(this.onDocumentChangeBreakpoint, this);
+ }this.doc = b;
+ this.$onDocumentChange = this.onDocumentChange.bind(this);
+ b.addEventListener("change", this.$onDocumentChange);
+ this.renderer.setDocument(b);
+ this.$onDocumentModeChange = this.onDocumentModeChange.bind(this);
+ b.addEventListener("changeMode", this.$onDocumentModeChange);
+ this.$onDocumentChangeTabSize = this.renderer.updateText.bind(this.renderer);
+ b.addEventListener("changeTabSize", this.$onDocumentChangeTabSize);
+ this.$onDocumentChangeBreakpoint = this.onDocumentChangeBreakpoint.bind(this);
this.doc.addEventListener("changeBreakpoint", this.$onDocumentChangeBreakpoint);
- this.selection = d.getSelection();
+ this.selection = b.getSelection();
this.$desiredColumn = 0;
- this.$onCursorChange = c.bind(this.onCursorChange, this);
+ this.$onCursorChange = this.onCursorChange.bind(this);
this.selection.addEventListener("changeCursor", this.$onCursorChange);
- this.$onSelectionChange = c.bind(this.onSelectionChange, this);
+ this.$onSelectionChange = this.onSelectionChange.bind(this);
this.selection.addEventListener("changeSelection", this.$onSelectionChange);
this.onDocumentModeChange();
this.bgTokenizer.setLines(this.doc.lines);
@@ -1826,7 +2111,7 @@ define("ace/editor", ["require", "exports", "module", "./lib/oop", "./lib/event"
this.onCursorChange();
this.onSelectionChange();
this.onDocumentChangeBreakpoint();
- this.renderer.scrollToRow(d.getScrollTopRow());
+ this.renderer.scrollToRow(b.getScrollTopRow());
this.renderer.updateFull()
}
};
@@ -1839,22 +2124,22 @@ define("ace/editor", ["require", "exports", "module", "./lib/oop", "./lib/event"
this.resize = function() {
this.renderer.onResize()
};
- this.setTheme = function(d) {
- this.renderer.setTheme(d)
+ this.setTheme = function(b) {
+ this.renderer.setTheme(b)
};
this.$highlightBrackets = function() {
if(this.$bracketHighlight) {
this.renderer.removeMarker(this.$bracketHighlight);
this.$bracketHighlight = null
}if(!this.$highlightPending) {
- var d = this;
+ var b = this;
this.$highlightPending = true;
setTimeout(function() {
- d.$highlightPending = false;
- var k = d.doc.findMatchingBracket(d.getCursorPosition());
- if(k) {
- k = new l(k.row, k.column, k.row, k.column + 1);
- d.$bracketHighlight = d.renderer.addMarker(k, "ace_bracket")
+ b.$highlightPending = false;
+ var c = b.doc.findMatchingBracket(b.getCursorPosition());
+ if(c) {
+ c = new h(c.row, c.column, c.row, c.column + 1);
+ b.$bracketHighlight = b.renderer.addMarker(c, "ace_bracket")
}
}, 10)
}
@@ -1873,94 +2158,95 @@ define("ace/editor", ["require", "exports", "module", "./lib/oop", "./lib/event"
this.renderer.hideCursor();
this.renderer.visualizeBlur()
};
- this.onDocumentChange = function(d) {
- d = d.data;
- this.bgTokenizer.start(d.firstRow);
- this.renderer.updateLines(d.firstRow, d.lastRow);
+ this.onDocumentChange = function(b) {
+ b = b.data;
+ this.bgTokenizer.start(b.firstRow);
+ this.renderer.updateLines(b.firstRow, b.lastRow);
this.renderer.updateCursor(this.getCursorPosition(), this.$overwrite)
};
- this.onTokenizerUpdate = function(d) {
- d = d.data;
- this.renderer.updateLines(d.first, d.last)
+ this.onTokenizerUpdate = function(b) {
+ b = b.data;
+ this.renderer.updateLines(b.first, b.last)
};
- this.onCursorChange = function() {
+ this.onCursorChange = function(b) {
this.$highlightBrackets();
this.renderer.updateCursor(this.getCursorPosition(), this.$overwrite);
- this.$blockScrolling || this.renderer.scrollCursorIntoView();
- this.$updateHighlightActiveLine()
+ if(!this.$blockScrolling && (!b || !b.blockScrolling)) {
+ this.renderer.scrollCursorIntoView()
+ }this.$updateHighlightActiveLine()
};
this.$updateHighlightActiveLine = function() {
this.$highlightLineMarker && this.renderer.removeMarker(this.$highlightLineMarker);
this.$highlightLineMarker = null;
if(this.getHighlightActiveLine() && (this.getSelectionStyle() != "line" || !this.selection.isMultiLine())) {
- var d = this.getCursorPosition();
- this.$highlightLineMarker = this.renderer.addMarker(new l(d.row, 0, d.row + 1, 0), "ace_active_line", "line")
+ var b = this.getCursorPosition();
+ this.$highlightLineMarker = this.renderer.addMarker(new h(b.row, 0, b.row + 1, 0), "ace_active_line", "line")
}
};
- this.onSelectionChange = function() {
+ this.onSelectionChange = function(b) {
this.$selectionMarker && this.renderer.removeMarker(this.$selectionMarker);
this.$selectionMarker = null;
if(!this.selection.isEmpty()) {
- var d = this.selection.getRange(), k = this.getSelectionStyle();
- this.$selectionMarker = this.renderer.addMarker(d, "ace_selection", k)
- }this.onCursorChange()
+ var c = this.selection.getRange(), n = this.getSelectionStyle();
+ this.$selectionMarker = this.renderer.addMarker(c, "ace_selection", n)
+ }this.onCursorChange(b)
};
this.onDocumentChangeBreakpoint = function() {
this.renderer.setBreakpoints(this.doc.getBreakpoints())
};
this.onDocumentModeChange = function() {
- var d = this.doc.getMode();
- if(this.mode != d) {
- this.mode = d;
- d = d.getTokenizer();
+ var b = this.doc.getMode();
+ if(this.mode != b) {
+ this.mode = b;
+ b = b.getTokenizer();
if(this.bgTokenizer) {
- this.bgTokenizer.setTokenizer(d)
+ this.bgTokenizer.setTokenizer(b)
}else {
- var k = c.bind(this.onTokenizerUpdate, this);
- this.bgTokenizer = new f(d, this);
- this.bgTokenizer.addEventListener("update", k)
+ var c = this.onTokenizerUpdate.bind(this);
+ this.bgTokenizer = new f(b, this);
+ this.bgTokenizer.addEventListener("update", c)
}this.renderer.setTokenizer(this.bgTokenizer)
}
};
- this.onMouseDown = function(d) {
- var k = e.getDocumentX(d), p = e.getDocumentY(d);
- k = this.renderer.screenToTextCoordinates(k, p);
- k.row = Math.max(0, Math.min(k.row, this.doc.getLength() - 1));
- if(e.getButton(d) != 0) {
- this.selection.isEmpty() && this.moveCursorToPosition(k)
+ this.onMouseDown = function(b) {
+ var c = e.getDocumentX(b), n = e.getDocumentY(b);
+ c = this.renderer.screenToTextCoordinates(c, n);
+ c.row = Math.max(0, Math.min(c.row, this.doc.getLength() - 1));
+ if(e.getButton(b) != 0) {
+ this.selection.isEmpty() && this.moveCursorToPosition(c)
}else {
- if(d.shiftKey) {
- this.selection.selectToPosition(k)
+ if(b.shiftKey) {
+ this.selection.selectToPosition(c)
}else {
- this.moveCursorToPosition(k);
- this.$clickSelection || this.selection.clearSelection(k.row, k.column)
+ this.moveCursorToPosition(c);
+ this.$clickSelection || this.selection.clearSelection(c.row, c.column)
}this.renderer.scrollCursorIntoView();
- var o = this, m, r;
+ var p = this, r, t;
e.capture(this.container, function(s) {
- m = e.getDocumentX(s);
- r = e.getDocumentY(s)
+ r = e.getDocumentX(s);
+ t = e.getDocumentY(s)
}, function() {
clearInterval(q);
- o.$clickSelection = null
+ p.$clickSelection = null
});
var q = setInterval(function() {
- if(!(m === undefined || r === undefined)) {
- var s = o.renderer.screenToTextCoordinates(m, r);
- s.row = Math.max(0, Math.min(s.row, o.doc.getLength() - 1));
- if(o.$clickSelection) {
- if(o.$clickSelection.contains(s.row, s.column)) {
- o.selection.setSelectionRange(o.$clickSelection)
+ if(!(r === undefined || t === undefined)) {
+ var s = p.renderer.screenToTextCoordinates(r, t);
+ s.row = Math.max(0, Math.min(s.row, p.doc.getLength() - 1));
+ if(p.$clickSelection) {
+ if(p.$clickSelection.contains(s.row, s.column)) {
+ p.selection.setSelectionRange(p.$clickSelection)
}else {
- var t = o.$clickSelection.compare(s.row, s.column) == -1 ? o.$clickSelection.end : o.$clickSelection.start;
- o.selection.setSelectionAnchor(t.row, t.column);
- o.selection.selectToPosition(s)
+ var u = p.$clickSelection.compare(s.row, s.column) == -1 ? p.$clickSelection.end : p.$clickSelection.start;
+ p.selection.setSelectionAnchor(u.row, u.column);
+ p.selection.selectToPosition(s)
}
}else {
- o.selection.selectToPosition(s)
- }o.renderer.scrollCursorIntoView()
+ p.selection.selectToPosition(s)
+ }p.renderer.scrollCursorIntoView()
}
}, 20);
- return e.preventDefault(d)
+ return e.preventDefault(b)
}
};
this.onMouseDoubleClick = function() {
@@ -1973,10 +2259,10 @@ define("ace/editor", ["require", "exports", "module", "./lib/oop", "./lib/event"
this.$clickSelection = this.getSelectionRange();
this.$updateDesiredColumn()
};
- this.onMouseWheel = function(d) {
- var k = this.$scrollSpeed * 2;
- this.renderer.scrollBy(d.wheelX * k, d.wheelY * k);
- return e.preventDefault(d)
+ this.onMouseWheel = function(b) {
+ var c = this.$scrollSpeed * 2;
+ this.renderer.scrollBy(b.wheelX * c, b.wheelY * c);
+ return e.preventDefault(b)
};
this.getCopyText = function() {
return this.selection.isEmpty() ? "" : this.doc.getTextRange(this.getSelectionRange())
@@ -1989,73 +2275,73 @@ define("ace/editor", ["require", "exports", "module", "./lib/oop", "./lib/event"
}
}
};
- this.onTextInput = function(d) {
+ this.onTextInput = function(b) {
if(!this.$readOnly) {
- var k = this.getCursorPosition();
- d = d.replace("\t", this.doc.getTabString());
+ var c = this.getCursorPosition();
+ b = b.replace("\t", this.doc.getTabString());
if(this.selection.isEmpty()) {
if(this.$overwrite) {
- var p = new l.fromPoints(k, k);
- p.end.column += d.length;
- this.doc.remove(p)
+ var n = new h.fromPoints(c, c);
+ n.end.column += b.length;
+ this.doc.remove(n)
}
}else {
- k = this.doc.remove(this.getSelectionRange());
+ c = this.doc.remove(this.getSelectionRange());
this.clearSelection()
}this.clearSelection();
- var o = this;
- this.bgTokenizer.getState(k.row, function(m) {
- var r = o.mode.checkOutdent(m, o.doc.getLine(k.row), d), q = o.doc.getLine(k.row), s = o.mode.getNextLineIndent(m, q, o.doc.getTabString()), t = o.doc.insert(k, d);
- o.bgTokenizer.getState(k.row, function(u) {
- if(k.row !== t.row) {
- u = o.doc.getTabSize();
- for(var y = Number.MAX_VALUE, w = k.row + 1;w <= t.row;++w) {
- var x = 0;
- q = o.doc.getLine(w);
+ var p = this;
+ this.bgTokenizer.getState(c.row, function(r) {
+ var t = p.mode.checkOutdent(r, p.doc.getLine(c.row), b), q = p.doc.getLine(c.row), s = p.mode.getNextLineIndent(r, q.slice(0, c.column), p.doc.getTabString()), u = p.doc.insert(c, b);
+ p.bgTokenizer.getState(c.row, function(x) {
+ if(c.row !== u.row) {
+ x = p.doc.getTabSize();
+ for(var z = Number.MAX_VALUE, w = c.row + 1;w <= u.row;++w) {
+ var y = 0;
+ q = p.doc.getLine(w);
for(var v = 0;v < q.length;++v) {
if(q.charAt(v) == "\t") {
- x += u
+ y += x
}else {
if(q.charAt(v) == " ") {
- x += 1
+ y += 1
}else {
break
}
}
}if(/[^\s]/.test(q)) {
- y = Math.min(x, y)
+ z = Math.min(y, z)
}
- }for(w = k.row + 1;w <= t.row;++w) {
- x = y;
- q = o.doc.getLine(w);
- for(v = 0;v < q.length && x > 0;++v) {
+ }for(w = c.row + 1;w <= u.row;++w) {
+ y = z;
+ q = p.doc.getLine(w);
+ for(v = 0;v < q.length && y > 0;++v) {
if(q.charAt(v) == "\t") {
- x -= u
+ y -= x
}else {
if(q.charAt(v) == " ") {
- x -= 1
+ y -= 1
}
}
- }o.doc.replace(new l(w, 0, w, q.length), q.substr(v))
- }t.column += o.doc.indentRows(new l(k.row + 1, 0, t.row, t.column), s)
+ }p.doc.replace(new h(w, 0, w, q.length), q.substr(v))
+ }u.column += p.doc.indentRows(c.row + 1, u.row, s)
}else {
- if(r) {
- t.column += o.mode.autoOutdent(u, o.doc, k.row)
+ if(t) {
+ u.column += p.mode.autoOutdent(x, p.doc, c.row)
}
- }o.moveCursorToPosition(t);
- o.renderer.scrollCursorIntoView()
+ }p.moveCursorToPosition(u);
+ p.renderer.scrollCursorIntoView()
})
})
}
};
this.$overwrite = false;
- this.setOverwrite = function(d) {
- if(this.$overwrite != d) {
- this.$overwrite = d;
+ this.setOverwrite = function(b) {
+ if(this.$overwrite != b) {
+ this.$overwrite = b;
this.$blockScrolling = true;
this.onCursorChange();
this.$blockScrolling = false;
- this.$dispatchEvent("changeOverwrite", {data:d})
+ this._dispatchEvent("changeOverwrite", {data:b})
}
};
this.getOverwrite = function() {
@@ -2065,54 +2351,54 @@ define("ace/editor", ["require", "exports", "module", "./lib/oop", "./lib/event"
this.setOverwrite(!this.$overwrite)
};
this.$scrollSpeed = 1;
- this.setScrollSpeed = function(d) {
- this.$scrollSpeed = d
+ this.setScrollSpeed = function(b) {
+ this.$scrollSpeed = b
};
this.getScrollSpeed = function() {
return this.$scrollSpeed
};
this.$selectionStyle = "line";
- this.setSelectionStyle = function(d) {
- if(this.$selectionStyle != d) {
- this.$selectionStyle = d;
+ this.setSelectionStyle = function(b) {
+ if(this.$selectionStyle != b) {
+ this.$selectionStyle = b;
this.onSelectionChange();
- this.$dispatchEvent("changeSelectionStyle", {data:d})
+ this._dispatchEvent("changeSelectionStyle", {data:b})
}
};
this.getSelectionStyle = function() {
return this.$selectionStyle
};
this.$highlightActiveLine = true;
- this.setHighlightActiveLine = function(d) {
- if(this.$highlightActiveLine != d) {
- this.$highlightActiveLine = d;
+ this.setHighlightActiveLine = function(b) {
+ if(this.$highlightActiveLine != b) {
+ this.$highlightActiveLine = b;
this.$updateHighlightActiveLine()
}
};
this.getHighlightActiveLine = function() {
return this.$highlightActiveLine
};
- this.setShowInvisibles = function(d) {
- this.getShowInvisibles() != d && this.renderer.setShowInvisibles(d)
+ this.setShowInvisibles = function(b) {
+ this.getShowInvisibles() != b && this.renderer.setShowInvisibles(b)
};
this.getShowInvisibles = function() {
return this.renderer.getShowInvisibles()
};
- this.setShowPrintMargin = function(d) {
- this.renderer.setShowPrintMargin(d)
+ this.setShowPrintMargin = function(b) {
+ this.renderer.setShowPrintMargin(b)
};
this.getShowPrintMargin = function() {
return this.renderer.getShowPrintMargin()
};
- this.setPrintMarginColumn = function(d) {
- this.renderer.setPrintMarginColumn(d)
+ this.setPrintMarginColumn = function(b) {
+ this.renderer.setPrintMarginColumn(b)
};
this.getPrintMarginColumn = function() {
return this.renderer.getPrintMarginColumn()
};
this.$readOnly = false;
- this.setReadOnly = function(d) {
- this.$readOnly = d
+ this.setReadOnly = function(b) {
+ this.$readOnly = b
};
this.getReadOnly = function() {
return this.$readOnly
@@ -2133,87 +2419,87 @@ define("ace/editor", ["require", "exports", "module", "./lib/oop", "./lib/event"
};
this.indent = function() {
if(!this.$readOnly) {
- var d = this.doc, k = this.getSelectionRange();
- if(k.start.row < k.end.row || k.start.column < k.end.column) {
- d = d.indentRows(this.getSelectionRange(), "\t");
- this.selection.shiftSelection(d)
+ var b = this.doc, c = this.getSelectionRange();
+ if(c.start.row < c.end.row || c.start.column < c.end.column) {
+ c = this.$getSelectedRows();
+ b = b.indentRows(c.first, c.last, "\t");
+ this.selection.shiftSelection(b)
}else {
if(this.doc.getUseSoftTabs()) {
- k = d.getTabSize();
- var p = this.getCursorPosition();
- d = d.documentToScreenColumn(p.row, p.column);
- d = k - d % k;
- d = c.stringRepeat(" ", d)
+ c = b.getTabSize();
+ var n = this.getCursorPosition();
+ b = b.documentToScreenColumn(n.row, n.column);
+ b = c - b % c;
+ b = i.stringRepeat(" ", b)
}else {
- d = "\t"
- }return this.onTextInput(d)
+ b = "\t"
+ }return this.onTextInput(b)
}
}
};
this.blockOutdent = function() {
if(!this.$readOnly) {
- var d = this.doc.getSelection(), k = this.doc.outdentRows(d.getRange());
- d.setSelectionRange(k, d.isBackwards());
+ var b = this.doc.getSelection(), c = this.doc.outdentRows(b.getRange());
+ b.setSelectionRange(c, b.isBackwards());
this.$updateDesiredColumn()
}
};
this.toggleCommentLines = function() {
if(!this.$readOnly) {
- var d = this.$getSelectedRows(), k = new l(d.first, 0, d.last, 0), p = this;
- this.bgTokenizer.getState(this.getCursorPosition().row, function(o) {
- o = p.mode.toggleCommentLines(o, p.doc, k);
- p.selection.shiftSelection(o)
+ var b = this;
+ this.bgTokenizer.getState(this.getCursorPosition().row, function(c) {
+ var n = b.$getSelectedRows();
+ c = b.mode.toggleCommentLines(c, b.doc, n.first, n.last);
+ b.selection.shiftSelection(c)
})
}
};
this.removeLines = function() {
if(!this.$readOnly) {
- var d = this.$getSelectedRows();
- this.selection.setSelectionAnchor(d.last + 1, 0);
- this.selection.selectTo(d.first, 0);
+ var b = this.$getSelectedRows();
+ this.selection.setSelectionAnchor(b.last + 1, 0);
+ this.selection.selectTo(b.first, 0);
this.doc.remove(this.getSelectionRange());
this.clearSelection()
}
};
this.moveLinesDown = function() {
- this.$readOnly || this.$moveLines(function(d, k) {
- return this.doc.moveLinesDown(d, k)
+ this.$readOnly || this.$moveLines(function(b, c) {
+ return this.doc.moveLinesDown(b, c)
})
};
this.moveLinesUp = function() {
- this.$readOnly || this.$moveLines(function(d, k) {
- return this.doc.moveLinesUp(d, k)
+ this.$readOnly || this.$moveLines(function(b, c) {
+ return this.doc.moveLinesUp(b, c)
})
};
this.copyLinesUp = function() {
- this.$readOnly || this.$moveLines(function(d, k) {
- this.doc.duplicateLines(d, k);
+ this.$readOnly || this.$moveLines(function(b, c) {
+ this.doc.duplicateLines(b, c);
return 0
})
};
this.copyLinesDown = function() {
- this.$readOnly || this.$moveLines(function(d, k) {
- return this.doc.duplicateLines(d, k)
+ this.$readOnly || this.$moveLines(function(b, c) {
+ return this.doc.duplicateLines(b, c)
})
};
- this.$moveLines = function(d) {
- var k = this.$getSelectedRows(), p = d.call(this, k.first, k.last), o = this.selection;
- o.setSelectionAnchor(k.last + p + 1, 0);
- o.$moveSelection(function() {
- o.moveCursorTo(k.first + p, 0)
+ this.$moveLines = function(b) {
+ var c = this.$getSelectedRows(), n = b.call(this, c.first, c.last), p = this.selection;
+ p.setSelectionAnchor(c.last + n + 1, 0);
+ p.$moveSelection(function() {
+ p.moveCursorTo(c.first + n, 0)
})
};
this.$getSelectedRows = function() {
- var d = this.getSelectionRange(), k = d.start.row, p = d.end.row;
- if(d.end.column == 0 && d.start.row !== d.end.row) {
- p -= 1
- }return{first:k, last:p}
+ var b = this.getSelectionRange().collapseRows();
+ return{first:b.start.row, last:b.end.row}
};
this.onCompositionStart = function() {
this.renderer.showComposition(this.getCursorPosition())
};
- this.onCompositionUpdate = function(d) {
- this.renderer.setCompositionText(d)
+ this.onCompositionUpdate = function(b) {
+ this.renderer.setCompositionText(b)
};
this.onCompositionEnd = function() {
this.renderer.hideComposition()
@@ -2224,8 +2510,8 @@ define("ace/editor", ["require", "exports", "module", "./lib/oop", "./lib/event"
this.getLastVisibleRow = function() {
return this.renderer.getLastVisibleRow()
};
- this.isRowVisible = function(d) {
- return d >= this.getFirstVisibleRow() && d <= this.getLastVisibleRow()
+ this.isRowVisible = function(b) {
+ return b >= this.getFirstVisibleRow() && b <= this.getLastVisibleRow()
};
this.getVisibleRowCount = function() {
return this.getLastVisibleRow() - this.getFirstVisibleRow() + 1
@@ -2234,34 +2520,34 @@ define("ace/editor", ["require", "exports", "module", "./lib/oop", "./lib/event"
return this.renderer.getLastVisibleRow() - 1
};
this.getPageUpRow = function() {
- var d = this.renderer.getFirstVisibleRow(), k = this.renderer.getLastVisibleRow();
- return d - (k - d) + 1
+ var b = this.renderer.getFirstVisibleRow(), c = this.renderer.getLastVisibleRow();
+ return b - (c - b) + 1
};
this.selectPageDown = function() {
- var d = this.getPageDownRow() + Math.floor(this.getVisibleRowCount() / 2);
+ var b = this.getPageDownRow() + Math.floor(this.getVisibleRowCount() / 2);
this.scrollPageDown();
- var k = this.getSelection();
- k.$moveSelection(function() {
- k.moveCursorTo(d, k.getSelectionLead().column)
+ var c = this.getSelection();
+ c.$moveSelection(function() {
+ c.moveCursorTo(b, c.getSelectionLead().column)
})
};
this.selectPageUp = function() {
- var d = this.getLastVisibleRow() - this.getFirstVisibleRow(), k = this.getPageUpRow() + Math.round(d / 2);
+ var b = this.getLastVisibleRow() - this.getFirstVisibleRow(), c = this.getPageUpRow() + Math.round(b / 2);
this.scrollPageUp();
- var p = this.getSelection();
- p.$moveSelection(function() {
- p.moveCursorTo(k, p.getSelectionLead().column)
+ var n = this.getSelection();
+ n.$moveSelection(function() {
+ n.moveCursorTo(c, n.getSelectionLead().column)
})
};
this.gotoPageDown = function() {
- var d = this.getPageDownRow(), k = Math.min(this.getCursorPosition().column, this.doc.getLine(d).length);
- this.scrollToRow(d);
- this.getSelection().moveCursorTo(d, k)
+ var b = this.getPageDownRow(), c = Math.min(this.getCursorPosition().column, this.doc.getLine(b).length);
+ this.scrollToRow(b);
+ this.getSelection().moveCursorTo(b, c)
};
this.gotoPageUp = function() {
- var d = this.getPageUpRow(), k = Math.min(this.getCursorPosition().column, this.doc.getLine(d).length);
- this.scrollToRow(d);
- this.getSelection().moveCursorTo(d, k)
+ var b = this.getPageUpRow(), c = Math.min(this.getCursorPosition().column, this.doc.getLine(b).length);
+ this.scrollToRow(b);
+ this.getSelection().moveCursorTo(b, c)
};
this.scrollPageDown = function() {
this.scrollToRow(this.getPageDownRow())
@@ -2269,8 +2555,8 @@ define("ace/editor", ["require", "exports", "module", "./lib/oop", "./lib/event"
this.scrollPageUp = function() {
this.renderer.scrollToRow(this.getPageUpRow())
};
- this.scrollToRow = function(d) {
- this.renderer.scrollToRow(d)
+ this.scrollToRow = function(b) {
+ this.renderer.scrollToRow(b)
};
this.getCursorPosition = function() {
return this.selection.getCursor()
@@ -2282,45 +2568,45 @@ define("ace/editor", ["require", "exports", "module", "./lib/oop", "./lib/event"
this.selection.clearSelection();
this.$updateDesiredColumn()
};
- this.moveCursorTo = function(d, k) {
- this.selection.moveCursorTo(d, k);
+ this.moveCursorTo = function(b, c) {
+ this.selection.moveCursorTo(b, c);
this.$updateDesiredColumn()
};
- this.moveCursorToPosition = function(d) {
- this.selection.moveCursorToPosition(d);
+ this.moveCursorToPosition = function(b) {
+ this.selection.moveCursorToPosition(b);
this.$updateDesiredColumn()
};
- this.gotoLine = function(d, k) {
+ this.gotoLine = function(b, c) {
this.selection.clearSelection();
this.$blockScrolling = true;
- this.moveCursorTo(d - 1, k || 0);
+ this.moveCursorTo(b - 1, c || 0);
this.$blockScrolling = false;
- this.isRowVisible(this.getCursorPosition().row) || this.scrollToRow(d - 1 - Math.floor(this.getVisibleRowCount() / 2))
+ this.isRowVisible(this.getCursorPosition().row) || this.scrollToRow(b - 1 - Math.floor(this.getVisibleRowCount() / 2))
};
- this.navigateTo = function(d, k) {
+ this.navigateTo = function(b, c) {
this.clearSelection();
- this.moveCursorTo(d, k);
- this.$updateDesiredColumn(k)
+ this.moveCursorTo(b, c);
+ this.$updateDesiredColumn(c)
};
this.navigateUp = function() {
this.selection.clearSelection();
this.selection.moveCursorBy(-1, 0);
if(this.$desiredColumn) {
- var d = this.getCursorPosition(), k = this.doc.screenToDocumentColumn(d.row, this.$desiredColumn);
- this.selection.moveCursorTo(d.row, k)
+ var b = this.getCursorPosition(), c = this.doc.screenToDocumentColumn(b.row, this.$desiredColumn);
+ this.selection.moveCursorTo(b.row, c)
}
};
this.navigateDown = function() {
this.selection.clearSelection();
this.selection.moveCursorBy(1, 0);
if(this.$desiredColumn) {
- var d = this.getCursorPosition(), k = this.doc.screenToDocumentColumn(d.row, this.$desiredColumn);
- this.selection.moveCursorTo(d.row, k)
+ var b = this.getCursorPosition(), c = this.doc.screenToDocumentColumn(b.row, this.$desiredColumn);
+ this.selection.moveCursorTo(b.row, c)
}
};
this.$updateDesiredColumn = function() {
- var d = this.getCursorPosition();
- this.$desiredColumn = this.doc.documentToScreenColumn(d.row, d.column)
+ var b = this.getCursorPosition();
+ this.$desiredColumn = this.doc.documentToScreenColumn(b.row, b.column)
};
this.navigateLeft = function() {
this.selection.isEmpty() ? this.selection.moveCursorLeft() : this.moveCursorToPosition(this.getSelectionRange().start);
@@ -2354,30 +2640,30 @@ define("ace/editor", ["require", "exports", "module", "./lib/oop", "./lib/event"
this.selection.moveCursorWordLeft();
this.clearSelection()
};
- this.replace = function(d, k) {
- k && this.$search.set(k);
- k = this.$search.find(this.doc);
- this.$tryReplace(k, d);
- k !== null && this.selection.setSelectionRange(k);
+ this.replace = function(b, c) {
+ c && this.$search.set(c);
+ c = this.$search.find(this.doc);
+ this.$tryReplace(c, b);
+ c !== null && this.selection.setSelectionRange(c);
this.$updateDesiredColumn()
};
- this.replaceAll = function(d, k) {
- k && this.$search.set(k);
- k = this.$search.findAll(this.doc);
- if(k.length) {
+ this.replaceAll = function(b, c) {
+ c && this.$search.set(c);
+ c = this.$search.findAll(this.doc);
+ if(c.length) {
this.clearSelection();
this.selection.moveCursorTo(0, 0);
- for(var p = k.length - 1;p >= 0;--p) {
- this.$tryReplace(k[p], d)
- }k[0] !== null && this.selection.setSelectionRange(k[0]);
+ for(var n = c.length - 1;n >= 0;--n) {
+ this.$tryReplace(c[n], b)
+ }c[0] !== null && this.selection.setSelectionRange(c[0]);
this.$updateDesiredColumn()
}
};
- this.$tryReplace = function(d, k) {
- k = this.$search.replace(this.doc.getTextRange(d), k);
- if(k !== null) {
- d.end = this.doc.replace(d, k);
- return d
+ this.$tryReplace = function(b, c) {
+ c = this.$search.replace(this.doc.getTextRange(b), c);
+ if(c !== null) {
+ b.end = this.doc.replace(b, c);
+ return b
}else {
return null
}
@@ -2385,34 +2671,34 @@ define("ace/editor", ["require", "exports", "module", "./lib/oop", "./lib/event"
this.getLastSearchOptions = function() {
return this.$search.getOptions()
};
- this.find = function(d, k) {
+ this.find = function(b, c) {
this.clearSelection();
- k = k || {};
- k.needle = d;
- this.$search.set(k);
+ c = c || {};
+ c.needle = b;
+ this.$search.set(c);
this.$find()
};
- this.findNext = function(d) {
- d = d || {};
- if(typeof d.backwards == "undefined") {
- d.backwards = false
- }this.$search.set(d);
+ this.findNext = function(b) {
+ b = b || {};
+ if(typeof b.backwards == "undefined") {
+ b.backwards = false
+ }this.$search.set(b);
this.$find()
};
- this.findPrevious = function(d) {
- d = d || {};
- if(typeof d.backwards == "undefined") {
- d.backwards = true
- }this.$search.set(d);
+ this.findPrevious = function(b) {
+ b = b || {};
+ if(typeof b.backwards == "undefined") {
+ b.backwards = true
+ }this.$search.set(b);
this.$find()
};
- this.$find = function(d) {
+ this.$find = function(b) {
this.selection.isEmpty() || this.$search.set({needle:this.doc.getTextRange(this.getSelectionRange())});
- typeof d != "undefined" && this.$search.set({backwards:d});
- if(d = this.$search.find(this.doc)) {
- this.gotoLine(d.end.row + 1, d.end.column);
+ typeof b != "undefined" && this.$search.set({backwards:b});
+ if(b = this.$search.find(this.doc)) {
+ this.gotoLine(b.end.row + 1, b.end.column);
this.$updateDesiredColumn();
- this.selection.setSelectionRange(d)
+ this.selection.setSelectionRange(b)
}
};
this.undo = function() {
@@ -2421,221 +2707,233 @@ define("ace/editor", ["require", "exports", "module", "./lib/oop", "./lib/event"
this.redo = function() {
this.doc.getUndoManager().redo()
}
- }).call(h.prototype);
- return h
+ }).call(j.prototype);
+ g.Editor = j
});
-define("ace/undomanager", ["require", "exports", "module"], function() {
- var h = function() {
+define("ace/undomanager", ["require", "exports", "module"], function(j, g) {
+ j = function() {
this.$undoStack = [];
this.$redoStack = []
};
(function() {
- this.execute = function(g) {
- var e = g.args[0];
- this.$doc = g.args[1];
+ this.execute = function(l) {
+ var e = l.args[0];
+ this.$doc = l.args[1];
this.$undoStack.push(e)
};
this.undo = function() {
- var g = this.$undoStack.pop();
- if(g) {
- this.$doc.undoChanges(g);
- this.$redoStack.push(g)
+ var l = this.$undoStack.pop();
+ if(l) {
+ this.$doc.undoChanges(l);
+ this.$redoStack.push(l)
}
};
this.redo = function() {
- var g = this.$redoStack.pop();
- if(g) {
- this.$doc.redoChanges(g);
- this.$undoStack.push(g)
+ var l = this.$redoStack.pop();
+ if(l) {
+ this.$doc.redoChanges(l);
+ this.$undoStack.push(l)
}
}
- }).call(h.prototype);
- return h
+ }).call(j.prototype);
+ g.UndoManager = j
});
-define("ace/layer/gutter", ["require", "exports", "module"], function() {
- var h = function(g) {
+define("pilot/dom", ["require", "exports", "module"], function(j, g) {
+ g.setText = function(l, e) {
+ if(l.innerText !== undefined) {
+ l.innerText = e
+ }if(l.textContent !== undefined) {
+ l.textContent = e
+ }
+ };
+ g.hasCssClass = function(l, e) {
+ return l.className.split(/\s+/g).indexOf(e) !== -1
+ };
+ g.addCssClass = function(l, e) {
+ g.hasCssClass(l, e) || (l.className += " " + e)
+ };
+ g.setCssClass = function(l, e, i) {
+ i ? g.addCssClass(l, e) : g.removeCssClass(l, e)
+ };
+ g.removeCssClass = function(l, e) {
+ for(var i = l.className.split(/\s+/g);;) {
+ var o = i.indexOf(e);
+ if(o == -1) {
+ break
+ }i.splice(o, 1)
+ }l.className = i.join(" ")
+ };
+ g.importCssString = function(l, e) {
+ e = e || document;
+ if(e.createStyleSheet) {
+ e.createStyleSheet().cssText = l
+ }else {
+ var i = e.createElement("style");
+ i.appendChild(e.createTextNode(l));
+ e.getElementsByTagName("head")[0].appendChild(i)
+ }
+ };
+ g.getInnerWidth = function(l) {
+ return parseInt(g.computedStyle(l, "paddingLeft")) + parseInt(g.computedStyle(l, "paddingRight")) + l.clientWidth
+ };
+ g.getInnerHeight = function(l) {
+ return parseInt(g.computedStyle(l, "paddingTop")) + parseInt(g.computedStyle(l, "paddingBottom")) + l.clientHeight
+ };
+ g.computedStyle = function(l, e) {
+ return window.getComputedStyle ? (window.getComputedStyle(l, "") || {})[e] || "" : l.currentStyle[e]
+ };
+ g.scrollbarWidth = function() {
+ var l = document.createElement("p");
+ l.style.width = "100%";
+ l.style.height = "200px";
+ var e = document.createElement("div"), i = e.style;
+ i.position = "absolute";
+ i.left = "-10000px";
+ i.overflow = "hidden";
+ i.width = "200px";
+ i.height = "150px";
+ e.appendChild(l);
+ document.body.appendChild(e);
+ var o = l.offsetWidth;
+ i.overflow = "scroll";
+ l = l.offsetWidth;
+ if(o == l) {
+ l = e.clientWidth
+ }document.body.removeChild(e);
+ return o - l
+ };
+ g.setInnerHtml = function(l, e) {
+ var i = l.cloneNode(false);
+ i.innerHTML = e;
+ l.parentNode.replaceChild(i, l);
+ return i
+ };
+ g.getParentWindow = function(l) {
+ return l.defaultView || l.parentWindow
+ }
+});
+define("ace/layer/gutter", ["require", "exports", "module", "pilot/dom"], function(j, g) {
+ var l = j("pilot/dom");
+ j = function(e) {
this.element = document.createElement("div");
this.element.className = "ace_layer ace_gutter-layer";
- g.appendChild(this.element);
+ e.appendChild(this.element);
this.$breakpoints = [];
this.$decorations = []
};
(function() {
- this.addGutterDecoration = function(g, e) {
- this.$decorations[g] || (this.$decorations[g] = "");
- this.$decorations[g] += " ace_" + e
+ this.addGutterDecoration = function(e, i) {
+ this.$decorations[e] || (this.$decorations[e] = "");
+ this.$decorations[e] += " ace_" + i
};
- this.removeGutterDecoration = function(g, e) {
- this.$decorations[g] = this.$decorations[g].replace(" ace_" + e, "")
+ this.removeGutterDecoration = function(e, i) {
+ this.$decorations[e] = this.$decorations[e].replace(" ace_" + i, "")
};
- this.setBreakpoints = function(g) {
- this.$breakpoints = g.concat()
+ this.setBreakpoints = function(e) {
+ this.$breakpoints = e.concat()
};
- this.update = function(g) {
- this.$config = g;
- for(var e = [], c = g.firstRow;c <= g.lastRow;c++) {
- e.push("", c + 1, "
");
- e.push("")
- }this.element.innerHTML = e.join("");
- this.element.style.height = g.minHeight + "px"
+ this.update = function(e) {
+ this.$config = e;
+ for(var i = [], o = e.firstRow;o <= e.lastRow;o++) {
+ i.push("", o + 1, "
");
+ i.push("")
+ }this.element = l.setInnerHtml(this.element, i.join(""));
+ this.element.style.height = e.minHeight + "px"
}
- }).call(h.prototype);
- return h
+ }).call(j.prototype);
+ g.Gutter = j
});
-define("ace/layer/marker", ["require", "exports", "module", "../range"], function(h) {
- var g = h("../range");
- h = function(e) {
+define("ace/layer/marker", ["require", "exports", "module", "ace/range", "pilot/dom"], function(j, g) {
+ var l = j("ace/range").Range, e = j("pilot/dom");
+ j = function(i) {
this.element = document.createElement("div");
this.element.className = "ace_layer ace_marker-layer";
- e.appendChild(this.element);
+ i.appendChild(this.element);
this.markers = {};
this.$markerId = 1
};
(function() {
- this.setDocument = function(e) {
- this.doc = e
+ this.setDocument = function(i) {
+ this.doc = i
};
- this.addMarker = function(e, c, i) {
- var b = this.$markerId++;
- this.markers[b] = {range:e, type:i || "line", clazz:c};
- return b
+ this.addMarker = function(i, o, d) {
+ var k = this.$markerId++;
+ this.markers[k] = {range:i, type:d || "line", clazz:o};
+ return k
};
- this.removeMarker = function(e) {
- this.markers[e] && delete this.markers[e]
+ this.removeMarker = function(i) {
+ this.markers[i] && delete this.markers[i]
};
- this.update = function(e) {
- if(e = e || this.config) {
- this.config = e;
- var c = [];
- for(var i in this.markers) {
- var b = this.markers[i], j = b.range.clipRows(e.firstRow, e.lastRow);
- if(!j.isEmpty()) {
- if(j.isMultiLine()) {
- b.type == "text" ? this.drawTextMarker(c, j, b.clazz, e) : this.drawMultiLineMarker(c, j, b.clazz, e)
+ this.update = function(i) {
+ if(i = i || this.config) {
+ this.config = i;
+ var o = [];
+ for(var d in this.markers) {
+ var k = this.markers[d], a = k.range.clipRows(i.firstRow, i.lastRow);
+ if(!a.isEmpty()) {
+ if(a.isMultiLine()) {
+ k.type == "text" ? this.drawTextMarker(o, a, k.clazz, i) : this.drawMultiLineMarker(o, a, k.clazz, i)
}else {
- this.drawSingleLineMarker(c, j, b.clazz, e)
+ this.drawSingleLineMarker(o, a, k.clazz, i)
}
}
- }this.element.innerHTML = c.join("")
+ }this.element = e.setInnerHtml(this.element, o.join(""))
}
};
- this.drawTextMarker = function(e, c, i, b) {
- var j = c.start.row, a = new g(j, c.start.column, j, this.doc.getLine(j).length);
- this.drawSingleLineMarker(e, a, i, b);
- j = c.end.row;
- a = new g(j, 0, j, c.end.column);
- this.drawSingleLineMarker(e, a, i, b);
- for(j = c.start.row + 1;j < c.end.row;j++) {
- a.start.row = j;
- a.end.row = j;
- a.end.column = this.doc.getLine(j).length;
- this.drawSingleLineMarker(e, a, i, b)
+ this.drawTextMarker = function(i, o, d, k) {
+ var a = o.start.row, f = new l(a, o.start.column, a, this.doc.getLine(a).length);
+ this.drawSingleLineMarker(i, f, d, k, 1);
+ a = o.end.row;
+ f = new l(a, 0, a, o.end.column);
+ this.drawSingleLineMarker(i, f, d, k);
+ for(a = o.start.row + 1;a < o.end.row;a++) {
+ f.start.row = a;
+ f.end.row = a;
+ f.end.column = this.doc.getLine(a).length;
+ this.drawSingleLineMarker(i, f, d, k, 1)
}
};
- this.drawMultiLineMarker = function(e, c, i, b) {
- c = c.toScreenRange(this.doc);
- var j = b.lineHeight, a = Math.round(b.width - c.start.column * b.characterWidth), f = (c.start.row - b.firstRow) * b.lineHeight, l = Math.round(c.start.column * b.characterWidth);
- e.push("");
- f = (c.end.row - b.firstRow) * b.lineHeight;
- a = Math.round(c.end.column * b.characterWidth);
- e.push("");
- j = (c.end.row - c.start.row - 1) * b.lineHeight;
- if(!(j < 0)) {
- f = (c.start.row + 1 - b.firstRow) * b.lineHeight;
- e.push("")
+ this.drawMultiLineMarker = function(i, o, d, k) {
+ o = o.toScreenRange(this.doc);
+ var a = k.lineHeight, f = Math.round(k.width - o.start.column * k.characterWidth), h = (o.start.row - k.firstRow) * k.lineHeight, m = Math.round(o.start.column * k.characterWidth);
+ i.push("");
+ h = (o.end.row - k.firstRow) * k.lineHeight;
+ f = Math.round(o.end.column * k.characterWidth);
+ i.push("");
+ a = (o.end.row - o.start.row - 1) * k.lineHeight;
+ if(!(a < 0)) {
+ h = (o.start.row + 1 - k.firstRow) * k.lineHeight;
+ i.push("")
}
};
- this.drawSingleLineMarker = function(e, c, i, b) {
- c = c.toScreenRange(this.doc);
- var j = b.lineHeight, a = Math.round((c.end.column - c.start.column) * b.characterWidth), f = (c.start.row - b.firstRow) * b.lineHeight;
- c = Math.round(c.start.column * b.characterWidth);
- e.push("")
+ this.drawSingleLineMarker = function(i, o, d, k, a) {
+ o = o.toScreenRange(this.doc);
+ var f = k.lineHeight;
+ a = Math.round((o.end.column + (a || 0) - o.start.column) * k.characterWidth);
+ var h = (o.start.row - k.firstRow) * k.lineHeight;
+ o = Math.round(o.start.column * k.characterWidth);
+ i.push("")
}
- }).call(h.prototype);
- return h
+ }).call(j.prototype);
+ g.Marker = j
});
-define("ace/lib/dom", ["require", "exports", "module", "./lang"], function(h) {
- var g = h("./lang"), e = {};
- e.setText = function(c, i) {
- if(c.innerText !== undefined) {
- c.innerText = i
- }if(c.textContent !== undefined) {
- c.textContent = i
- }
- };
- e.hasCssClass = function(c, i) {
- c = c.className.split(/\s+/g);
- return g.arrayIndexOf(c, i) !== -1
- };
- e.addCssClass = function(c, i) {
- e.hasCssClass(c, i) || (c.className += " " + i)
- };
- e.removeCssClass = function(c, i) {
- for(var b = c.className.split(/\s+/g);;) {
- var j = g.arrayIndexOf(b, i);
- if(j == -1) {
- break
- }b.splice(j, 1)
- }c.className = b.join(" ")
- };
- e.importCssString = function(c, i) {
- i = i || document;
- if(i.createStyleSheet) {
- i.createStyleSheet().cssText = c
- }else {
- var b = i.createElement("style");
- b.appendChild(i.createTextNode(c));
- i.getElementsByTagName("head")[0].appendChild(b)
- }
- };
- e.getInnerWidth = function(c) {
- return parseInt(e.computedStyle(c, "paddingLeft")) + parseInt(e.computedStyle(c, "paddingRight")) + c.clientWidth
- };
- e.getInnerHeight = function(c) {
- return parseInt(e.computedStyle(c, "paddingTop")) + parseInt(e.computedStyle(c, "paddingBottom")) + c.clientHeight
- };
- e.computedStyle = function(c, i) {
- return window.getComputedStyle ? (window.getComputedStyle(c, "") || {})[i] || "" : c.currentStyle[i]
- };
- e.scrollbarWidth = function() {
- var c = document.createElement("p");
- c.style.width = "100%";
- c.style.height = "200px";
- var i = document.createElement("div"), b = i.style;
- b.position = "absolute";
- b.left = "-10000px";
- b.overflow = "hidden";
- b.width = "200px";
- b.height = "150px";
- i.appendChild(c);
- document.body.appendChild(i);
- var j = c.offsetWidth;
- b.overflow = "scroll";
- c = c.offsetWidth;
- if(j == c) {
- c = i.clientWidth
- }document.body.removeChild(i);
- return j - c
- };
- return e
-});
-define("ace/layer/text", ["require", "exports", "module", "../lib/oop", "../lib/dom", "../event_emitter"], function(h) {
- var g = h("../lib/oop"), e = h("../lib/dom"), c = h("../event_emitter");
- h = function(i) {
+define("ace/layer/text", ["require", "exports", "module", "pilot/oop", "pilot/dom", "pilot/lang", "pilot/event_emitter"], function(j, g) {
+ var l = j("pilot/oop"), e = j("pilot/dom"), i = j("pilot/lang"), o = j("pilot/event_emitter").EventEmitter;
+ j = function(d) {
this.element = document.createElement("div");
this.element.className = "ace_layer ace_text-layer";
- i.appendChild(this.element);
+ d.appendChild(this.element);
this.$characterSize = this.$measureSizes();
this.$pollSizeChanges()
};
(function() {
- g.implement(this, c);
+ l.implement(this, o);
this.EOF_CHAR = "¶";
this.EOL_CHAR = "¬";
this.TAB_CHAR = "→";
this.SPACE_CHAR = "·";
- this.setTokenizer = function(i) {
- this.tokenizer = i
+ this.setTokenizer = function(d) {
+ this.tokenizer = d
};
this.getLineHeight = function() {
return this.$characterSize.height || 1
@@ -2644,142 +2942,146 @@ define("ace/layer/text", ["require", "exports", "module", "../lib/oop", "../lib/
return this.$characterSize.width || 1
};
this.$pollSizeChanges = function() {
- var i = this;
+ var d = this;
setInterval(function() {
- var b = i.$measureSizes();
- if(i.$characterSize.width !== b.width || i.$characterSize.height !== b.height) {
- i.$characterSize = b;
- i.$dispatchEvent("changeCharaterSize", {data:b})
+ var k = d.$measureSizes();
+ if(d.$characterSize.width !== k.width || d.$characterSize.height !== k.height) {
+ d.$characterSize = k;
+ d._dispatchEvent("changeCharaterSize", {data:k})
}
}, 500)
};
this.$fontStyles = {fontFamily:1, fontSize:1, fontWeight:1, fontStyle:1, lineHeight:1};
this.$measureSizes = function() {
- var i = document.createElement("div"), b = i.style;
- b.width = b.height = "auto";
- b.left = b.top = "-1000px";
- b.visibility = "hidden";
- b.position = "absolute";
- b.overflow = "visible";
- for(var j in this.$fontStyles) {
- var a = e.computedStyle(this.element, j);
- b[j] = a
- }i.innerHTML = (new Array(1E3)).join("Xy");
- document.body.insertBefore(i, document.body.firstChild);
- b = {height:i.offsetHeight, width:i.offsetWidth / 2E3};
- document.body.removeChild(i);
- return b
+ if(!this.$measureNode) {
+ var d = this.$measureNode = document.createElement("div"), k = d.style;
+ k.width = k.height = "auto";
+ k.left = k.top = "-1000px";
+ k.visibility = "hidden";
+ k.position = "absolute";
+ k.overflow = "visible";
+ k.whiteSpace = "nowrap";
+ d.innerHTML = i.stringRepeat("Xy", 1E3);
+ document.body.insertBefore(d, document.body.firstChild)
+ }k = this.$measureNode.style;
+ for(var a in this.$fontStyles) {
+ d = e.computedStyle(this.element, a);
+ k[a] = d
+ }return{height:this.$measureNode.offsetHeight, width:this.$measureNode.offsetWidth / 2E3}
};
- this.setDocument = function(i) {
- this.doc = i
+ this.setDocument = function(d) {
+ this.doc = d
};
- this.$showInvisibles = false;
- this.setShowInvisibles = function(i) {
- this.$showInvisibles = i
+ this.showInvisibles = false;
+ this.setShowInvisibles = function(d) {
+ if(this.showInvisibles == d) {
+ return false
+ }this.showInvisibles = d;
+ return true
};
this.$computeTabString = function() {
- var i = this.doc.getTabSize();
- if(this.$showInvisibles) {
- i = i / 2;
- this.$tabString = "" + (new Array(Math.floor(i))).join(" ") + this.TAB_CHAR + (new Array(Math.ceil(i) + 1)).join(" ") + ""
+ var d = this.doc.getTabSize();
+ if(this.showInvisibles) {
+ d = d / 2;
+ this.$tabString = "" + (new Array(Math.floor(d))).join(" ") + this.TAB_CHAR + (new Array(Math.ceil(d) + 1)).join(" ") + ""
}else {
- this.$tabString = (new Array(i + 1)).join(" ")
+ this.$tabString = (new Array(d + 1)).join(" ")
}
};
- this.updateLines = function(i, b, j) {
+ this.updateLines = function(d, k, a) {
this.$computeTabString();
- this.config = i;
- var a = Math.max(b, i.firstRow), f = Math.min(j, i.lastRow), l = this.element.childNodes, n = this;
- this.tokenizer.getTokens(a, f, function(d) {
- for(var k = a;k <= f;k++) {
- var p = l[k - i.firstRow];
+ this.config = d;
+ var f = Math.max(k, d.firstRow), h = Math.min(a, d.lastRow), m = this.element.childNodes, b = this;
+ this.tokenizer.getTokens(f, h, function(c) {
+ for(var n = f;n <= h;n++) {
+ var p = m[n - d.firstRow];
if(p) {
- var o = [];
- n.$renderLine(o, k, d[k - a].tokens);
- p.innerHTML = o.join("")
+ var r = [];
+ b.$renderLine(r, n, c[n - f].tokens);
+ e.setInnerHtml(p, r.join)
}
}
})
};
- this.scrollLines = function(i) {
- function b(d) {
- i.firstRow < f.firstRow ? a.$renderLinesFragment(i, i.firstRow, f.firstRow - 1, function(k) {
- l.firstChild ? l.insertBefore(k, l.firstChild) : l.appendChild(k);
- d()
- }) : d()
+ this.scrollLines = function(d) {
+ function k(c) {
+ d.firstRow < h.firstRow ? f.$renderLinesFragment(d, d.firstRow, h.firstRow - 1, function(n) {
+ m.firstChild ? m.insertBefore(n, m.firstChild) : m.appendChild(n);
+ c()
+ }) : c()
}
- function j() {
- i.lastRow > f.lastRow && a.$renderLinesFragment(i, f.lastRow + 1, i.lastRow, function(d) {
- l.appendChild(d)
+ function a() {
+ d.lastRow > h.lastRow && f.$renderLinesFragment(d, h.lastRow + 1, d.lastRow, function(c) {
+ m.appendChild(c)
})
}
- var a = this;
+ var f = this;
this.$computeTabString();
- var f = this.config;
- this.config = i;
- if(!f || f.lastRow < i.firstRow) {
- return this.update(i)
- }if(i.lastRow < f.firstRow) {
- return this.update(i)
- }var l = this.element;
- if(f.firstRow < i.firstRow) {
- for(var n = f.firstRow;n < i.firstRow;n++) {
- l.removeChild(l.firstChild)
+ var h = this.config;
+ this.config = d;
+ if(!h || h.lastRow < d.firstRow) {
+ return this.update(d)
+ }if(d.lastRow < h.firstRow) {
+ return this.update(d)
+ }var m = this.element;
+ if(h.firstRow < d.firstRow) {
+ for(var b = h.firstRow;b < d.firstRow;b++) {
+ m.removeChild(m.firstChild)
}
- }if(f.lastRow > i.lastRow) {
- for(n = i.lastRow + 1;n <= f.lastRow;n++) {
- l.removeChild(l.lastChild)
+ }if(h.lastRow > d.lastRow) {
+ for(b = d.lastRow + 1;b <= h.lastRow;b++) {
+ m.removeChild(m.lastChild)
}
- }b(j)
+ }k(a)
};
- this.$renderLinesFragment = function(i, b, j, a) {
- var f = document.createDocumentFragment(), l = this;
- this.tokenizer.getTokens(b, j, function(n) {
- for(var d = b;d <= j;d++) {
- var k = document.createElement("div");
- k.className = "ace_line";
- var p = k.style;
- p.height = l.$characterSize.height + "px";
- p.width = i.width + "px";
+ this.$renderLinesFragment = function(d, k, a, f) {
+ var h = document.createDocumentFragment(), m = this;
+ this.tokenizer.getTokens(k, a, function(b) {
+ for(var c = k;c <= a;c++) {
+ var n = document.createElement("div");
+ n.className = "ace_line";
+ var p = n.style;
+ p.height = m.$characterSize.height + "px";
+ p.width = d.width + "px";
p = [];
- l.$renderLine(p, d, n[d - b].tokens);
- k.innerHTML = p.join("");
- f.appendChild(k)
- }a(f)
+ m.$renderLine(p, c, b[c - k].tokens);
+ n.innerHTML = p.join("");
+ h.appendChild(n)
+ }f(h)
})
};
- this.update = function(i) {
+ this.update = function(d) {
this.$computeTabString();
- this.config = i;
- var b = [], j = this;
- this.tokenizer.getTokens(i.firstRow, i.lastRow, function(a) {
- for(var f = i.firstRow;f <= i.lastRow;f++) {
- b.push("");
- j.$renderLine(b, f, a[f - i.firstRow].tokens);
- b.push("
")
- }j.element.innerHTML = b.join("")
+ this.config = d;
+ var k = [], a = this;
+ this.tokenizer.getTokens(d.firstRow, d.lastRow, function(f) {
+ for(var h = d.firstRow;h <= d.lastRow;h++) {
+ k.push("");
+ a.$renderLine(k, h, f[h - d.firstRow].tokens);
+ k.push("
")
+ }a.element = e.setInnerHtml(a.element, k.join(""))
})
};
this.$textToken = {text:true, rparen:true, lparen:true};
- this.$renderLine = function(i, b, j) {
- for(var a = /[\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000]/g, f = 0;f < j.length;f++) {
- var l = j[f], n = l.value.replace(/&/g, "&").replace(/", n, "")
+ m = "ace_" + m.type.replace(/\./g, " ace_");
+ d.push("", b, "")
}
- }if(this.$showInvisibles) {
- b !== this.doc.getLength() - 1 ? i.push("" + this.EOL_CHAR + "") : i.push("" + this.EOF_CHAR + "")
+ }if(this.showInvisibles) {
+ k !== this.doc.getLength() - 1 ? d.push("" + this.EOL_CHAR + "") : d.push("" + this.EOF_CHAR + "")
}
}
- }).call(h.prototype);
- return h
+ }).call(j.prototype);
+ g.Text = j
});
-define("ace/layer/cursor", ["require", "exports", "module", "../lib/dom"], function(h) {
- var g = h("../lib/dom");
- h = function(e) {
+define("ace/layer/cursor", ["require", "exports", "module", "pilot/dom"], function(j, g) {
+ var l = j("pilot/dom");
+ j = function(e) {
this.element = document.createElement("div");
this.element.className = "ace_layer ace_cursor-layer";
e.appendChild(this.element);
@@ -2791,9 +3093,9 @@ define("ace/layer/cursor", ["require", "exports", "module", "../lib/dom"], funct
this.setDocument = function(e) {
this.doc = e
};
- this.setCursor = function(e, c) {
+ this.setCursor = function(e, i) {
this.position = {row:e.row, column:this.doc.documentToScreenColumn(e.row, e.column)};
- c ? g.addCssClass(this.cursor, "ace_overwrite") : g.removeCssClass(this.cursor, "ace_overwrite")
+ i ? l.addCssClass(this.cursor, "ace_overwrite") : l.removeCssClass(this.cursor, "ace_overwrite")
};
this.hideCursor = function() {
this.isVisible = false;
@@ -2827,69 +3129,74 @@ define("ace/layer/cursor", ["require", "exports", "module", "../lib/dom"], funct
this.update = function(e) {
if(this.position) {
this.config = e;
- var c = Math.round(this.position.column * e.characterWidth), i = this.position.row * e.lineHeight;
- this.pixelPos = {left:c, top:i};
- this.cursor.style.left = c + "px";
- this.cursor.style.top = i - e.firstRow * e.lineHeight + "px";
+ var i = Math.round(this.position.column * e.characterWidth), o = this.position.row * e.lineHeight;
+ this.pixelPos = {left:i, top:o};
+ this.cursor.style.left = i + "px";
+ this.cursor.style.top = o - e.firstRow * e.lineHeight + "px";
this.cursor.style.width = e.characterWidth + "px";
this.cursor.style.height = e.lineHeight + "px";
this.isVisible && this.element.appendChild(this.cursor);
this.restartTimer()
}
}
- }).call(h.prototype);
- return h
+ }).call(j.prototype);
+ g.Cursor = j
});
-define("ace/scrollbar", ["require", "exports", "module", "./lib/oop", "./lib/lang", "./lib/dom", "./lib/event", "./event_emitter"], function(h) {
- var g = h("./lib/oop"), e = h("./lib/lang"), c = h("./lib/dom"), i = h("./lib/event"), b = h("./event_emitter");
- h = function(j) {
+define("ace/scrollbar", ["require", "exports", "module", "pilot/oop", "pilot/dom", "pilot/event", "pilot/event_emitter"], function(j, g) {
+ var l = j("pilot/oop"), e = j("pilot/dom"), i = j("pilot/event"), o = j("pilot/event_emitter").EventEmitter;
+ j = function(d) {
this.element = document.createElement("div");
this.element.className = "ace_sb";
this.inner = document.createElement("div");
this.element.appendChild(this.inner);
- j.appendChild(this.element);
- this.width = c.scrollbarWidth();
+ d.appendChild(this.element);
+ this.width = e.scrollbarWidth();
this.element.style.width = this.width;
- i.addListener(this.element, "scroll", e.bind(this.onScroll, this))
+ i.addListener(this.element, "scroll", this.onScroll.bind(this))
};
(function() {
- g.implement(this, b);
+ l.implement(this, o);
this.onScroll = function() {
- this.$dispatchEvent("scroll", {data:this.element.scrollTop})
+ this._dispatchEvent("scroll", {data:this.element.scrollTop})
};
this.getWidth = function() {
return this.width
};
- this.setHeight = function(j) {
- this.element.style.height = Math.max(0, j - this.width) + "px"
+ this.setHeight = function(d) {
+ this.element.style.height = Math.max(0, d - this.width) + "px"
};
- this.setInnerHeight = function(j) {
- this.inner.style.height = j + "px"
+ this.setInnerHeight = function(d) {
+ this.inner.style.height = d + "px"
};
- this.setScrollTop = function(j) {
- this.element.scrollTop = j
+ this.setScrollTop = function(d) {
+ this.element.scrollTop = d
}
- }).call(h.prototype);
- return h
+ }).call(j.prototype);
+ g.ScrollBar = j
});
-define("ace/renderloop", ["require", "exports", "module", "./lib/event"], function(h) {
- var g = h("./lib/event");
- h = function(e) {
+define("ace/renderloop", ["require", "exports", "module", "pilot/event"], function(j, g) {
+ var l = j("pilot/event");
+ j = function(e) {
this.onRender = e;
this.pending = false;
this.changes = 0
};
(function() {
this.schedule = function(e) {
+ e = 128;
this.changes |= e;
if(!this.pending) {
this.pending = true;
- var c = this;
+ var i = this;
this.setTimeoutZero(function() {
- c.pending = false;
- var i = c.changes;
- c.changes = 0;
- c.onRender(i)
+ i.pending = false;
+ var o = i.changes;
+ i.changes = 0;
+ var d = new Date;
+ i.onRender(o);
+ i.setTimeoutZero(function() {
+ console.log(new Date - d)
+ })
})
}
};
@@ -2897,11 +3204,11 @@ define("ace/renderloop", ["require", "exports", "module", "./lib/event"], functi
this.messageName = "zero-timeout-message";
this.setTimeoutZero = function(e) {
if(!this.attached) {
- var c = this;
- g.addListener(window, "message", function(i) {
- if(i.source == window && c.callback && i.data == c.messageName) {
- g.stopPropagation(i);
- c.callback()
+ var i = this;
+ l.addListener(window, "message", function(o) {
+ if(o.source == window && i.callback && o.data == i.messageName) {
+ l.stopPropagation(o);
+ i.callback()
}
});
this.attached = true
@@ -2913,17 +3220,17 @@ define("ace/renderloop", ["require", "exports", "module", "./lib/event"], functi
setTimeout(e, 0)
}
}
- }).call(h.prototype);
- return h
+ }).call(j.prototype);
+ g.RenderLoop = j
});
-define("ace/virtual_renderer", ["require", "exports", "module", 'text!ace/css/editor.css!.ace_editor {\n position: absolute;\n overflow: hidden;\n\n font-family: "Menlo", "Monaco", "Courier New", monospace;\n font-size: 12px; \n}\n\n.ace_scroller {\n position: absolute;\n overflow-x: scroll;\n overflow-y: hidden; \n}\n\n.ace_gutter {\n position: absolute;\n overflow-x: hidden;\n overflow-y: hidden;\n height: 100%;\n}\n\n.ace_editor .ace_sb {\n position: absolute;\n overflow-x: hidden;\n overflow-y: scroll;\n right: 0;\n}\n\n.ace_editor .ace_sb div {\n position: absolute;\n width: 1px;\n left: 0px;\n}\n\n.ace_editor .ace_printMargin {\n position: absolute;\n height: 100%;\n}\n\n.ace_layer {\n z-index: 0;\n position: absolute;\n overflow: hidden; \n white-space: nowrap;\n height: 100%;\n}\n\n.ace_text-layer {\n font-family: Monaco, "Courier New", monospace;\n color: black;\n}\n\n.ace_cursor-layer {\n cursor: text;\n}\n\n.ace_cursor {\n z-index: 3;\n position: absolute;\n}\n\n.ace_line {\n white-space: nowrap;\n}\n\n.ace_marker-layer {\n}\n\n.ace_marker-layer .ace_step {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 4;\n}\n\n.ace_marker-layer .ace_active_line {\n position: absolute;\n z-index: 1;\n}',
-"./lib/oop", "./lib/oop", "./lib/event", "./layer/gutter", "./layer/marker", "./layer/text", "./layer/cursor", "./scrollbar", "./renderloop", "./event_emitter"], function(h, g, e, c) {
- var i = h("./lib/oop"), b = h("./lib/lang"), j = h("./lib/dom"), a = h("./lib/event"), f = h("./layer/gutter"), l = h("./layer/marker"), n = h("./layer/text"), d = h("./layer/cursor"), k = h("./scrollbar"), p = h("./renderloop"), o = h("./event_emitter");
- j.importCssString(c);
- g = function(m, r) {
- this.container = m;
- j.addCssClass(this.container, "ace_editor");
- this.setTheme(r);
+define("ace/virtual_renderer", ["require", "exports", "module", "pilot/oop", "pilot/dom", "pilot/event", "ace/layer/gutter", "ace/layer/marker", "ace/layer/text", "ace/layer/cursor", "ace/scrollbar", "ace/renderloop", "pilot/event_emitter", 'text!ace/css/editor.css!.ace_editor {\n position: absolute;\n overflow: hidden;\n\n font-family: "Menlo", "Monaco", "Courier New", monospace;\n font-size: 12px; \n}\n\n.ace_scroller {\n position: absolute;\n overflow-x: scroll;\n overflow-y: hidden; \n}\n\n.ace_gutter {\n position: absolute;\n overflow-x: hidden;\n overflow-y: hidden;\n height: 100%;\n}\n\n.ace_editor .ace_sb {\n position: absolute;\n overflow-x: hidden;\n overflow-y: scroll;\n right: 0;\n}\n\n.ace_editor .ace_sb div {\n position: absolute;\n width: 1px;\n left: 0px;\n}\n\n.ace_editor .ace_printMargin {\n position: absolute;\n height: 100%;\n}\n\n.ace_layer {\n z-index: 0;\n position: absolute;\n overflow: hidden; \n white-space: nowrap;\n height: 100%;\n}\n\n.ace_text-layer {\n font-family: Monaco, "Courier New", monospace;\n color: black;\n}\n\n.ace_cursor-layer {\n cursor: text;\n}\n\n.ace_cursor {\n z-index: 3;\n position: absolute;\n}\n\n.ace_line {\n white-space: nowrap;\n}\n\n.ace_marker-layer {\n}\n\n.ace_marker-layer .ace_step {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 4;\n}\n\n.ace_marker-layer .ace_active_line {\n position: absolute;\n z-index: 1;\n}'],
+function(j, g) {
+ var l = j("pilot/oop"), e = j("pilot/dom"), i = j("pilot/event"), o = j("ace/layer/gutter").Gutter, d = j("ace/layer/marker").Marker, k = j("ace/layer/text").Text, a = j("ace/layer/cursor").Cursor, f = j("ace/scrollbar").ScrollBar, h = j("ace/renderloop").RenderLoop, m = j("pilot/event_emitter").EventEmitter, b = j('text!ace/css/editor.css!.ace_editor {\n position: absolute;\n overflow: hidden;\n\n font-family: "Menlo", "Monaco", "Courier New", monospace;\n font-size: 12px; \n}\n\n.ace_scroller {\n position: absolute;\n overflow-x: scroll;\n overflow-y: hidden; \n}\n\n.ace_gutter {\n position: absolute;\n overflow-x: hidden;\n overflow-y: hidden;\n height: 100%;\n}\n\n.ace_editor .ace_sb {\n position: absolute;\n overflow-x: hidden;\n overflow-y: scroll;\n right: 0;\n}\n\n.ace_editor .ace_sb div {\n position: absolute;\n width: 1px;\n left: 0px;\n}\n\n.ace_editor .ace_printMargin {\n position: absolute;\n height: 100%;\n}\n\n.ace_layer {\n z-index: 0;\n position: absolute;\n overflow: hidden; \n white-space: nowrap;\n height: 100%;\n}\n\n.ace_text-layer {\n font-family: Monaco, "Courier New", monospace;\n color: black;\n}\n\n.ace_cursor-layer {\n cursor: text;\n}\n\n.ace_cursor {\n z-index: 3;\n position: absolute;\n}\n\n.ace_line {\n white-space: nowrap;\n}\n\n.ace_marker-layer {\n}\n\n.ace_marker-layer .ace_step {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 4;\n}\n\n.ace_marker-layer .ace_active_line {\n position: absolute;\n z-index: 1;\n}');
+ e.importCssString(b);
+ b = function(c, n) {
+ this.container = c;
+ e.addCssClass(this.container, "ace_editor");
+ this.setTheme(n);
this.$gutter = document.createElement("div");
this.$gutter.className = "ace_gutter";
this.container.appendChild(this.$gutter);
@@ -2933,28 +3240,28 @@ define("ace/virtual_renderer", ["require", "exports", "module", 'text!ace/css/ed
this.content = document.createElement("div");
this.content.style.position = "absolute";
this.scroller.appendChild(this.content);
- this.$gutterLayer = new f(this.$gutter);
- this.$markerLayer = new l(this.content);
- var q = this.$textLayer = new n(this.content);
- this.canvas = q.element;
- this.characterWidth = q.getCharacterWidth();
- this.lineHeight = q.getLineHeight();
- this.$cursorLayer = new d(this.content);
- this.layers = [this.$markerLayer, q, this.$cursorLayer];
- this.scrollBar = new k(m);
- this.scrollBar.addEventListener("scroll", b.bind(this.onScroll, this));
+ this.$gutterLayer = new o(this.$gutter);
+ this.$markerLayer = new d(this.content);
+ var p = this.$textLayer = new k(this.content);
+ this.canvas = p.element;
+ this.characterWidth = p.getCharacterWidth();
+ this.lineHeight = p.getLineHeight();
+ this.$cursorLayer = new a(this.content);
+ this.layers = [this.$markerLayer, p, this.$cursorLayer];
+ this.scrollBar = new f(c);
+ this.scrollBar.addEventListener("scroll", this.onScroll.bind(this));
this.scrollTop = 0;
this.cursorPos = {row:0, column:0};
- var s = this;
+ var r = this;
this.$textLayer.addEventListener("changeCharaterSize", function() {
- s.characterWidth = q.getCharacterWidth();
- s.lineHeight = q.getLineHeight();
- s.$loop.schedule(s.CHANGE_FULL)
+ r.characterWidth = p.getCharacterWidth();
+ r.lineHeight = p.getLineHeight();
+ r.$loop.schedule(r.CHANGE_FULL)
});
- a.addListener(this.$gutter, "click", b.bind(this.$onGutterClick, this));
- a.addListener(this.$gutter, "dblclick", b.bind(this.$onGutterClick, this));
+ i.addListener(this.$gutter, "click", this.$onGutterClick.bind(this));
+ i.addListener(this.$gutter, "dblclick", this.$onGutterClick.bind(this));
this.$size = {width:0, height:0, scrollerHeight:0, scrollerWidth:0};
- this.$loop = new p(b.bind(this.$renderChanges, this));
+ this.$loop = new h(this.$renderChanges.bind(this));
this.$loop.schedule(this.CHANGE_FULL);
this.$updatePrintMargin();
this.setPadding(4)
@@ -2969,26 +3276,26 @@ define("ace/virtual_renderer", ["require", "exports", "module", 'text!ace/css/ed
this.CHANGE_TEXT = 32;
this.CHANGE_SIZE = 64;
this.CHANGE_FULL = 128;
- i.implement(this, o);
- this.setDocument = function(m) {
- this.lines = m.lines;
- this.doc = m;
- this.$cursorLayer.setDocument(m);
- this.$markerLayer.setDocument(m);
- this.$textLayer.setDocument(m);
+ l.implement(this, m);
+ this.setDocument = function(c) {
+ this.lines = c.lines;
+ this.doc = c;
+ this.$cursorLayer.setDocument(c);
+ this.$markerLayer.setDocument(c);
+ this.$textLayer.setDocument(c);
this.$loop.schedule(this.CHANGE_FULL)
};
- this.updateLines = function(m, r) {
- if(r === undefined) {
- r = Infinity
+ this.updateLines = function(c, n) {
+ if(n === undefined) {
+ n = Infinity
}if(this.$changedLines) {
- if(this.$changedLines.firstRow > m) {
- this.$changedLines.firstRow = m
- }if(this.$changedLines.lastRow < r) {
- this.$changedLines.lastRow = r
+ if(this.$changedLines.firstRow > c) {
+ this.$changedLines.firstRow = c
+ }if(this.$changedLines.lastRow < n) {
+ this.$changedLines.lastRow = n
}
}else {
- this.$changedLines = {firstRow:m, lastRow:r}
+ this.$changedLines = {firstRow:c, lastRow:n}
}this.$loop.schedule(this.CHANGE_LINES)
};
this.updateText = function() {
@@ -2998,62 +3305,59 @@ define("ace/virtual_renderer", ["require", "exports", "module", 'text!ace/css/ed
this.$loop.schedule(this.CHANGE_FULL)
};
this.onResize = function() {
- this.$loop.schedule(this.CHANGE_SIZE);
- var m = j.getInnerHeight(this.container);
- if(this.$size.height != m) {
- this.$size.height = m;
- this.scroller.style.height = m + "px";
- this.scrollBar.setHeight(m);
+ var c = this.CHANGE_SIZE, n = e.getInnerHeight(this.container);
+ if(this.$size.height != n) {
+ this.$size.height = n;
+ this.scroller.style.height = n + "px";
+ this.scrollBar.setHeight(n);
if(this.doc) {
this.scrollToY(this.getScrollTop());
- this.$loop.schedule(this.CHANGE_FULL)
+ c |= this.CHANGE_FULL
}
- }m = j.getInnerWidth(this.container);
- if(this.$size.width != m) {
- this.$size.width = m;
- var r = this.showGutter ? this.$gutter.offsetWidth : 0;
- this.scroller.style.left = r + "px";
- this.scroller.style.width = Math.max(0, m - r - this.scrollBar.getWidth()) + "px"
+ }n = e.getInnerWidth(this.container);
+ if(this.$size.width != n) {
+ this.$size.width = n;
+ var p = this.showGutter ? this.$gutter.offsetWidth : 0;
+ this.scroller.style.left = p + "px";
+ this.scroller.style.width = Math.max(0, n - p - this.scrollBar.getWidth()) + "px"
}this.$size.scrollerWidth = this.scroller.clientWidth;
- this.$size.scrollerHeight = this.scroller.clientHeight
+ this.$size.scrollerHeight = this.scroller.clientHeight;
+ this.$loop.schedule(c)
};
- this.setTokenizer = function(m) {
- this.$tokenizer = m;
- this.$textLayer.setTokenizer(m);
+ this.setTokenizer = function(c) {
+ this.$tokenizer = c;
+ this.$textLayer.setTokenizer(c);
this.$loop.schedule(this.CHANGE_TEXT)
};
- this.$onGutterClick = function(m) {
- var r = a.getDocumentX(m), q = a.getDocumentY(m);
- this.$dispatchEvent("gutter" + m.type, {row:this.screenToTextCoordinates(r, q).row, htmlEvent:m})
+ this.$onGutterClick = function(c) {
+ var n = i.getDocumentX(c), p = i.getDocumentY(c);
+ this._dispatchEvent("gutter" + c.type, {row:this.screenToTextCoordinates(n, p).row, htmlEvent:c})
};
- this.$showInvisibles = true;
- this.setShowInvisibles = function(m) {
- this.$showInvisibles = m;
- this.$textLayer.setShowInvisibles(m);
- this.$loop.schedule(this.CHANGE_TEXT)
+ this.setShowInvisibles = function(c) {
+ this.$textLayer.setShowInvisibles(c) && this.$loop.schedule(this.CHANGE_TEXT)
};
this.getShowInvisibles = function() {
- return this.$showInvisibles
+ return this.$textLayer.showInvisibles
};
this.$showPrintMargin = true;
- this.setShowPrintMargin = function(m) {
- this.$showPrintMargin = m;
+ this.setShowPrintMargin = function(c) {
+ this.$showPrintMargin = c;
this.$updatePrintMargin()
};
this.getShowPrintMargin = function() {
return this.$showPrintMargin
};
this.$printMarginColumn = 80;
- this.setPrintMarginColumn = function(m) {
- this.$printMarginColumn = m;
+ this.setPrintMarginColumn = function(c) {
+ this.$printMarginColumn = c;
this.$updatePrintMargin()
};
this.getPrintMarginColumn = function() {
return this.$printMarginColumn
};
- this.setShowGutter = function(m) {
- this.$gutter.style.display = m ? "block" : "none";
- this.showGutter = m;
+ this.setShowGutter = function(c) {
+ this.$gutter.style.display = c ? "block" : "none";
+ this.showGutter = c;
this.onResize()
};
this.$updatePrintMargin = function() {
@@ -3062,9 +3366,9 @@ define("ace/virtual_renderer", ["require", "exports", "module", 'text!ace/css/ed
this.$printMarginEl = document.createElement("div");
this.$printMarginEl.className = "ace_printMargin";
this.content.insertBefore(this.$printMarginEl, this.$textLayer.element)
- }var m = this.$printMarginEl.style;
- m.left = this.characterWidth * this.$printMarginColumn + "px";
- m.visibility = this.$showPrintMargin ? "visible" : "hidden"
+ }var c = this.$printMarginEl.style;
+ c.left = this.characterWidth * this.$printMarginColumn + "px";
+ c.visibility = this.$showPrintMargin ? "visible" : "hidden"
}
};
this.getContainerElement = function() {
@@ -3090,112 +3394,114 @@ define("ace/virtual_renderer", ["require", "exports", "module", 'text!ace/css/ed
return(this.layerConfig || {}).lastRow || 0
};
this.$padding = null;
- this.setPadding = function(m) {
- this.$padding = m;
- this.content.style.padding = "0 " + m + "px";
+ this.setPadding = function(c) {
+ this.$padding = c;
+ this.content.style.padding = "0 " + c + "px";
this.$loop.schedule(this.CHANGE_FULL)
};
- this.onScroll = function(m) {
- this.scrollToY(m.data)
+ this.onScroll = function(c) {
+ this.scrollToY(c.data)
};
this.$updateScrollBar = function() {
this.scrollBar.setInnerHeight(this.doc.getLength() * this.lineHeight);
this.scrollBar.setScrollTop(this.scrollTop)
};
- this.$renderChanges = function(m) {
- if(!(!m || !this.doc || !this.$tokenizer)) {
- if(!this.layerConfig || m & this.CHANGE_FULL || m & this.CHANGE_SIZE || m & this.CHANGE_TEXT || m & this.CHANGE_LINES || m & this.CHANGE_SCROLL) {
+ this.$renderChanges = function(c) {
+ if(!(!c || !this.doc || !this.$tokenizer)) {
+ if(!this.layerConfig || c & this.CHANGE_FULL || c & this.CHANGE_SIZE || c & this.CHANGE_TEXT || c & this.CHANGE_LINES || c & this.CHANGE_SCROLL) {
this.$computeLayerConfig()
- }if(m & this.CHANGE_FULL) {
+ }if(c & this.CHANGE_FULL) {
this.$textLayer.update(this.layerConfig);
this.showGutter && this.$gutterLayer.update(this.layerConfig);
this.$markerLayer.update(this.layerConfig);
this.$cursorLayer.update(this.layerConfig);
this.$updateScrollBar()
}else {
- if(m & this.CHANGE_SCROLL) {
- m & this.CHANGE_TEXT || m & this.CHANGE_LINES ? this.$textLayer.update(this.layerConfig) : this.$textLayer.scrollLines(this.layerConfig);
+ if(c & this.CHANGE_SCROLL) {
+ c & this.CHANGE_TEXT || c & this.CHANGE_LINES ? this.$textLayer.update(this.layerConfig) : this.$textLayer.scrollLines(this.layerConfig);
this.showGutter && this.$gutterLayer.update(this.layerConfig);
this.$markerLayer.update(this.layerConfig);
this.$cursorLayer.update(this.layerConfig);
this.$updateScrollBar()
}else {
- if(m & this.CHANGE_TEXT) {
+ if(c & this.CHANGE_TEXT) {
this.$textLayer.update(this.layerConfig);
this.showGutter && this.$gutterLayer.update(this.layerConfig)
}else {
- if(m & this.CHANGE_LINES) {
+ if(c & this.CHANGE_LINES) {
this.$updateLines();
- this.$updateScrollBar()
+ this.$updateScrollBar();
+ this.showGutter && this.$gutterLayer.update(this.layerConfig)
+ }else {
+ c & this.CHANGE_GUTTER && this.showGutter && this.$gutterLayer.update(this.layerConfig)
}
- }m & this.CHANGE_GUTTER && this.showGutter && this.$gutterLayer.update(this.layerConfig);
- m & this.CHANGE_CURSOR && this.$cursorLayer.update(this.layerConfig);
- m & this.CHANGE_MARKER && this.$markerLayer.update(this.layerConfig);
- m & this.CHANGE_SIZE && this.$updateScrollBar()
+ }c & this.CHANGE_CURSOR && this.$cursorLayer.update(this.layerConfig);
+ c & this.CHANGE_MARKER && this.$markerLayer.update(this.layerConfig);
+ c & this.CHANGE_SIZE && this.$updateScrollBar()
}
}
}
};
this.$computeLayerConfig = function() {
- var m = this.scrollTop % this.lineHeight, r = this.$size.scrollerHeight + this.lineHeight, q = this.$getLongestLine(), s = !this.layerConfig ? true : this.layerConfig.width != q, t = Math.ceil(r / this.lineHeight), u = Math.max(0, Math.round((this.scrollTop - m) / this.lineHeight));
- t = Math.min(this.lines.length, u + t) - 1;
- this.layerConfig = {width:q, padding:this.$padding, firstRow:u, lastRow:t, lineHeight:this.lineHeight, characterWidth:this.characterWidth, minHeight:r, offset:m, height:this.$size.scrollerHeight};
- for(u = 0;u < this.layers.length;u++) {
- t = this.layers[u];
- if(s) {
- t.element.style.width = q + "px"
+ var c = this.scrollTop % this.lineHeight, n = this.$size.scrollerHeight + this.lineHeight, p = this.$getLongestLine(), r = !this.layerConfig ? true : this.layerConfig.width != p, t = Math.ceil(n / this.lineHeight), q = Math.max(0, Math.round((this.scrollTop - c) / this.lineHeight));
+ t = Math.max(0, Math.min(this.lines.length, q + t) - 1);
+ this.layerConfig = {width:p, padding:this.$padding, firstRow:q, lastRow:t, lineHeight:this.lineHeight, characterWidth:this.characterWidth, minHeight:n, offset:c, height:this.$size.scrollerHeight};
+ for(q = 0;q < this.layers.length;q++) {
+ t = this.layers[q];
+ if(r) {
+ t.element.style.width = p + "px"
}
- }this.$gutterLayer.element.style.marginTop = -m + "px";
- this.content.style.marginTop = -m + "px";
- this.content.style.width = q + "px";
- this.content.style.height = r + "px"
+ }this.$gutterLayer.element.style.marginTop = -c + "px";
+ this.content.style.marginTop = -c + "px";
+ this.content.style.width = p + "px";
+ this.content.style.height = n + "px"
};
this.$updateLines = function() {
- var m = this.$changedLines.firstRow, r = this.$changedLines.lastRow;
+ var c = this.$changedLines.firstRow, n = this.$changedLines.lastRow;
this.$changedLines = null;
- var q = this.layerConfig;
- if(q.width != this.$getLongestLine()) {
- return this.$textLayer.update(q)
- }if(!(m > q.lastRow + 1)) {
- if(!(r < q.firstRow)) {
- if(r === Infinity) {
- this.showGutter && this.$gutterLayer.update(q);
- this.$textLayer.update(q)
+ var p = this.layerConfig;
+ if(p.width != this.$getLongestLine()) {
+ return this.$textLayer.update(p)
+ }if(!(c > p.lastRow + 1)) {
+ if(!(n < p.firstRow)) {
+ if(n === Infinity) {
+ this.showGutter && this.$gutterLayer.update(p);
+ this.$textLayer.update(p)
}else {
- this.$textLayer.updateLines(q, m, r)
+ this.$textLayer.updateLines(p, c, n)
}
}
}
};
this.$getLongestLine = function() {
- var m = this.doc.getScreenWidth();
- if(this.$showInvisibles) {
- m += 1
- }return Math.max(this.$size.scrollerWidth - this.$padding * 2, Math.round(m * this.characterWidth))
+ var c = this.doc.getScreenWidth();
+ if(this.$textLayer.showInvisibles) {
+ c += 1
+ }return Math.max(this.$size.scrollerWidth - this.$padding * 2, Math.round(c * this.characterWidth))
};
- this.addMarker = function(m, r, q) {
- m = this.$markerLayer.addMarker(m, r, q);
+ this.addMarker = function(c, n, p) {
+ c = this.$markerLayer.addMarker(c, n, p);
this.$loop.schedule(this.CHANGE_MARKER);
- return m
+ return c
};
- this.removeMarker = function(m) {
- this.$markerLayer.removeMarker(m);
+ this.removeMarker = function(c) {
+ this.$markerLayer.removeMarker(c);
this.$loop.schedule(this.CHANGE_MARKER)
};
- this.addGutterDecoration = function(m, r) {
- this.$gutterLayer.addGutterDecoration(m, r);
+ this.addGutterDecoration = function(c, n) {
+ this.$gutterLayer.addGutterDecoration(c, n);
this.$loop.schedule(this.CHANGE_GUTTER)
};
- this.removeGutterDecoration = function(m, r) {
- this.$gutterLayer.removeGutterDecoration(m, r);
+ this.removeGutterDecoration = function(c, n) {
+ this.$gutterLayer.removeGutterDecoration(c, n);
this.$loop.schedule(this.CHANGE_GUTTER)
};
- this.setBreakpoints = function(m) {
- this.$gutterLayer.setBreakpoints(m);
+ this.setBreakpoints = function(c) {
+ this.$gutterLayer.setBreakpoints(c);
this.$loop.schedule(this.CHANGE_GUTTER)
};
- this.updateCursor = function(m, r) {
- this.$cursorLayer.setCursor(m, r);
+ this.updateCursor = function(c, n) {
+ this.$cursorLayer.setCursor(c, n);
this.$loop.schedule(this.CHANGE_CURSOR)
};
this.hideCursor = function() {
@@ -3205,12 +3511,12 @@ define("ace/virtual_renderer", ["require", "exports", "module", 'text!ace/css/ed
this.$cursorLayer.showCursor()
};
this.scrollCursorIntoView = function() {
- var m = this.$cursorLayer.getPixelPosition(), r = m.left + this.$padding;
- m = m.top;
- this.getScrollTop() > m && this.scrollToY(m);
- this.getScrollTop() + this.$size.scrollerHeight < m + this.lineHeight && this.scrollToY(m + this.lineHeight - this.$size.scrollerHeight);
- this.scroller.scrollLeft > r && this.scrollToX(r);
- this.scroller.scrollLeft + this.$size.scrollerWidth < r + this.characterWidth && this.scrollToX(Math.round(r + this.characterWidth - this.$size.scrollerWidth))
+ var c = this.$cursorLayer.getPixelPosition(), n = c.left + this.$padding;
+ c = c.top;
+ this.getScrollTop() > c && this.scrollToY(c);
+ this.getScrollTop() + this.$size.scrollerHeight < c + this.lineHeight && this.scrollToY(c + this.lineHeight - this.$size.scrollerHeight);
+ this.scroller.scrollLeft > n && this.scrollToX(n);
+ this.scroller.scrollLeft + this.$size.scrollerWidth < n + this.characterWidth && this.scrollToX(Math.round(n + this.characterWidth - this.$size.scrollerWidth))
};
this.getScrollTop = function() {
return this.scrollTop
@@ -3221,42 +3527,42 @@ define("ace/virtual_renderer", ["require", "exports", "module", 'text!ace/css/ed
this.getScrollTopRow = function() {
return this.scrollTop / this.lineHeight
};
- this.scrollToRow = function(m) {
- this.scrollToY(m * this.lineHeight)
+ this.scrollToRow = function(c) {
+ this.scrollToY(c * this.lineHeight)
};
- this.scrollToY = function(m) {
- m = Math.max(0, Math.min(this.lines.length * this.lineHeight - this.$size.scrollerHeight, m));
- if(this.scrollTop !== m) {
- this.scrollTop = m;
+ this.scrollToY = function(c) {
+ c = Math.max(0, Math.min(this.lines.length * this.lineHeight - this.$size.scrollerHeight, c));
+ if(this.scrollTop !== c) {
+ this.scrollTop = c;
this.$loop.schedule(this.CHANGE_SCROLL)
}
};
- this.scrollToX = function(m) {
- if(m <= this.$padding) {
- m = 0
- }this.scroller.scrollLeft = m
+ this.scrollToX = function(c) {
+ if(c <= this.$padding) {
+ c = 0
+ }this.scroller.scrollLeft = c
};
- this.scrollBy = function(m, r) {
- r && this.scrollToY(this.scrollTop + r);
- m && this.scrollToX(this.scroller.scrollLeft + m)
+ this.scrollBy = function(c, n) {
+ n && this.scrollToY(this.scrollTop + n);
+ c && this.scrollToX(this.scroller.scrollLeft + c)
};
- this.screenToTextCoordinates = function(m, r) {
- var q = this.scroller.getBoundingClientRect();
- m = Math.round((m + this.scroller.scrollLeft - q.left - this.$padding) / this.characterWidth);
- r = Math.floor((r + this.scrollTop - q.top) / this.lineHeight);
- return{row:r, column:this.doc.screenToDocumentColumn(Math.max(0, Math.min(r, this.doc.getLength() - 1)), m)}
+ this.screenToTextCoordinates = function(c, n) {
+ var p = this.scroller.getBoundingClientRect();
+ c = Math.round((c + this.scroller.scrollLeft - p.left - this.$padding) / this.characterWidth);
+ n = Math.floor((n + this.scrollTop - p.top) / this.lineHeight);
+ return{row:n, column:this.doc.screenToDocumentColumn(Math.max(0, Math.min(n, this.doc.getLength() - 1)), c)}
};
- this.textToScreenCoordinates = function(m, r) {
- var q = this.scroller.getBoundingClientRect();
- r = this.padding + Math.round(this.doc.documentToScreenColumn(m, r) * this.characterWidth);
- m = m * this.lineHeight;
- return{pageX:q.left + r - this.getScrollLeft(), pageY:q.top + m - this.getScrollTop()}
+ this.textToScreenCoordinates = function(c, n) {
+ var p = this.scroller.getBoundingClientRect();
+ n = this.$padding + Math.round(this.doc.documentToScreenColumn(c, n) * this.characterWidth);
+ c = c * this.lineHeight;
+ return{pageX:p.left + n - this.getScrollLeft(), pageY:p.top + c - this.getScrollTop()}
};
this.visualizeFocus = function() {
- j.addCssClass(this.container, "ace_focus")
+ e.addCssClass(this.container, "ace_focus")
};
this.visualizeBlur = function() {
- j.removeCssClass(this.container, "ace_focus")
+ e.removeCssClass(this.container, "ace_focus")
};
this.showComposition = function() {
};
@@ -3264,152 +3570,152 @@ define("ace/virtual_renderer", ["require", "exports", "module", 'text!ace/css/ed
};
this.hideComposition = function() {
};
- this.setTheme = function(m) {
- function r(s) {
- q.$theme && j.removeCssClass(q.container, q.$theme);
- q.$theme = s ? s.cssClass : null;
- q.$theme && j.addCssClass(q.container, q.$theme);
- if(q.$size) {
- q.$size.width = 0;
- q.onResize()
+ this.setTheme = function(c) {
+ function n(r) {
+ p.$theme && e.removeCssClass(p.container, p.$theme);
+ p.$theme = r ? r.cssClass : null;
+ p.$theme && e.addCssClass(p.container, p.$theme);
+ if(p.$size) {
+ p.$size.width = 0;
+ p.onResize()
}
}
- var q = this;
- if(!m || typeof m == "string") {
- m = m || "ace/theme/textmate";
- h([m], function(s) {
- r(s)
+ var p = this;
+ if(!c || typeof c == "string") {
+ c = c || "ace/theme/textmate";
+ j([c], function(r) {
+ n(r)
})
}else {
- r(m)
- }q = this
+ n(c)
+ }p = this
}
- }).call(g.prototype);
- return g
+ }).call(b.prototype);
+ g.VirtualRenderer = b
});
-define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "../lib/oop", "./text_highlight_rules"], function(h) {
- var g = h("../lib/oop");
- h = h("./text_highlight_rules");
+define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "pilot/oop", "ace/mode/text_highlight_rules"], function(j, g) {
+ var l = j("pilot/oop");
+ j = j("ace/mode/text_highlight_rules").TextHighlightRules;
var e = function() {
- this.$rules = {start:[{token:"comment.doc", regex:"\\*\\/", next:"start"}, {token:"comment.doc.tag", regex:"@[\\w\\d_]+"}, {token:"comment.doc", regex:"s+"}, {token:"comment.doc", regex:"[^@\\*]+"}, {token:"comment.doc", regex:"."}]}
+ this.$rules = {start:[{token:"comment.doc", regex:"\\*\\/", next:"start"}, {token:"comment.doc.tag", regex:"@[\\w\\d_]+"}, {token:"comment.doc", regex:"s+"}, {token:"comment.doc", regex:"TODO"}, {token:"comment.doc", regex:"[^@\\*]+"}, {token:"comment.doc", regex:"."}]}
};
- g.inherits(e, h);
+ l.inherits(e, j);
(function() {
- this.getStartRule = function(c) {
- return{token:"comment.doc", regex:"\\/\\*(?=\\*)", next:c}
+ this.getStartRule = function(i) {
+ return{token:"comment.doc", regex:"\\/\\*(?=\\*)", next:i}
}
}).call(e.prototype);
- return e
+ g.DocCommentHighlightRules = e
});
-define("ace/mode/javascript_highlight_rules", ["require", "exports", "module", "../lib/oop", "../lib/lang", "./doc_comment_highlight_rules", "./text_highlight_rules"], function(h) {
- var g = h("../lib/oop"), e = h("../lib/lang"), c = h("./doc_comment_highlight_rules");
- h = h("./text_highlight_rules");
+define("ace/mode/javascript_highlight_rules", ["require", "exports", "module", "pilot/oop", "pilot/lang", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function(j, g) {
+ var l = j("pilot/oop"), e = j("pilot/lang"), i = j("ace/mode/doc_comment_highlight_rules").DocCommentHighlightRules;
+ j = j("ace/mode/text_highlight_rules").TextHighlightRules;
JavaScriptHighlightRules = function() {
- var i = new c, b = e.arrayToMap("break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|var|while|with".split("|")), j = e.arrayToMap("true|false|null|undefined|Infinity|NaN|undefined".split("|")), a = e.arrayToMap("class|enum|extends|super|const|export|import|implements|let|private|public|yield|interface|package|protected|static".split("|"));
- this.$rules = {start:[{token:"comment", regex:"\\/\\/.*$"}, i.getStartRule("doc-start"), {token:"comment", regex:"\\/\\*", next:"comment"}, {token:"string.regexp", regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/][gimy]*\\s*(?=[).,;]|$)"}, {token:"string", regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'}, {token:"string", regex:'["].*\\\\$', next:"qqstring"}, {token:"string", regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"}, {token:"string", regex:"['].*\\\\$", next:"qstring"}, {token:"constant.numeric",
- regex:"0[xX][0-9a-fA-F]+\\b"}, {token:"constant.numeric", regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"}, {token:function(f) {
- return f == "this" ? "variable.language" : b[f] ? "keyword" : j[f] ? "constant.language" : a[f] ? "invalid.illegal" : f == "debugger" ? "invalid.deprecated" : "identifier"
- }, regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}, {token:"keyword.operator", regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(in|instanceof|new|delete|typeof|void)"}, {token:"lparen", regex:"[\\[\\(\\{]"}, {token:"rparen", regex:"[\\]\\)\\}]"}, {token:"text", regex:"\\s+"}], comment:[{token:"comment", regex:".*?\\*\\/", next:"start"}, {token:"comment", regex:".+"}], qqstring:[{token:"string", regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
+ var o = new i, d = e.arrayToMap("break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|var|while|with".split("|")), k = e.arrayToMap("null|Infinity|NaN|undefined".split("|")), a = e.arrayToMap("class|enum|extends|super|const|export|import|implements|let|private|public|yield|interface|package|protected|static".split("|"));
+ this.$rules = {start:[{token:"comment", regex:"\\/\\/.*$"}, o.getStartRule("doc-start"), {token:"comment", regex:"\\/\\*", next:"comment"}, {token:"string.regexp", regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/][gimy]*\\s*(?=[).,;]|$)"}, {token:"string", regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'}, {token:"string", regex:'["].*\\\\$', next:"qqstring"}, {token:"string", regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"}, {token:"string", regex:"['].*\\\\$", next:"qstring"}, {token:"constant.numeric",
+ regex:"0[xX][0-9a-fA-F]+\\b"}, {token:"constant.numeric", regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"}, {token:"constant.language.boolean", regex:"(?:true|false)\\b"}, {token:function(f) {
+ return f == "this" ? "variable.language" : d[f] ? "keyword" : k[f] ? "constant.language" : a[f] ? "invalid.illegal" : f == "debugger" ? "invalid.deprecated" : "identifier"
+ }, regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}, {token:"keyword.operator", regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"}, {token:"lparen", regex:"[[({]"}, {token:"rparen", regex:"[\\])}]"}, {token:"text", regex:"\\s+"}], comment:[{token:"comment", regex:".*?\\*\\/", next:"start"}, {token:"comment", regex:".+"}], qqstring:[{token:"string", regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
next:"start"}, {token:"string", regex:".+"}], qstring:[{token:"string", regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'", next:"start"}, {token:"string", regex:".+"}]};
- this.addRules(i.getRules(), "doc-");
+ this.addRules(o.getRules(), "doc-");
this.$rules["doc-start"][0].next = "start"
};
- g.inherits(JavaScriptHighlightRules, h);
- return JavaScriptHighlightRules
+ l.inherits(JavaScriptHighlightRules, j);
+ g.JavaScriptHighlightRules = JavaScriptHighlightRules
});
-define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "../range"], function(h) {
- var g = h("../range");
- h = function() {
+define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function(j, g) {
+ var l = j("ace/range").Range;
+ j = function() {
};
(function() {
- this.checkOutdent = function(e, c) {
+ this.checkOutdent = function(e, i) {
if(!/^\s+$/.test(e)) {
return false
- }return/^\s*\}/.test(c)
+ }return/^\s*\}/.test(i)
};
- this.autoOutdent = function(e, c) {
- var i = e.getLine(c).match(/^(\s*\})/);
- if(!i) {
+ this.autoOutdent = function(e, i) {
+ var o = e.getLine(i).match(/^(\s*\})/);
+ if(!o) {
return 0
- }i = i[1].length;
- var b = e.findMatchingBracket({row:c, column:i});
- if(!b || b.row == c) {
+ }o = o[1].length;
+ var d = e.findMatchingBracket({row:i, column:o});
+ if(!d || d.row == i) {
return 0
- }b = this.$getIndent(e.getLine(b.row));
- e.replace(new g(c, 0, c, i - 1), b);
- return b.length - (i - 1)
+ }d = this.$getIndent(e.getLine(d.row));
+ e.replace(new l(i, 0, i, o - 1), d);
+ return d.length - (o - 1)
};
this.$getIndent = function(e) {
if(e = e.match(/^(\s+)/)) {
return e[1]
}return""
}
- }).call(h.prototype);
- return h
+ }).call(j.prototype);
+ g.MatchingBraceOutdent = j
});
-define("ace/mode/javascript", ["require", "exports", "module", "../lib/oop", "./text", "../tokenizer", "./javascript_highlight_rules", "./matching_brace_outdent", "../range"], function(h) {
- var g = h("../lib/oop"), e = h("./text"), c = h("../tokenizer"), i = h("./javascript_highlight_rules"), b = h("./matching_brace_outdent"), j = h("../range");
- h = function() {
- this.$tokenizer = new c((new i).getRules());
- this.$outdent = new b
+define("ace/mode/javascript", ["require", "exports", "module", "pilot/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/javascript_highlight_rules", "ace/mode/matching_brace_outdent", "ace/range"], function(j, g) {
+ var l = j("pilot/oop"), e = j("ace/mode/text").Mode, i = j("ace/tokenizer").Tokenizer, o = j("ace/mode/javascript_highlight_rules").JavaScriptHighlightRules, d = j("ace/mode/matching_brace_outdent").MatchingBraceOutdent, k = j("ace/range").Range;
+ j = function() {
+ this.$tokenizer = new i((new o).getRules());
+ this.$outdent = new d
};
- g.inherits(h, e);
+ l.inherits(j, e);
(function() {
- this.toggleCommentLines = function(a, f, l) {
- var n = true;
+ this.toggleCommentLines = function(a, f, h, m) {
+ var b = true;
a = /^(\s*)\/\//;
- for(var d = l.start.row;d <= l.end.row;d++) {
- if(!a.test(f.getLine(d))) {
- n = false;
+ for(var c = h;c <= m;c++) {
+ if(!a.test(f.getLine(c))) {
+ b = false;
break
}
- }if(n) {
- n = new j(0, 0, 0, 0);
- for(d = l.start.row;d <= l.end.row;d++) {
- var k = f.getLine(d).replace(a, "$1");
- n.start.row = d;
- n.end.row = d;
- n.end.column = k.length + 2;
- f.replace(n, k)
+ }if(b) {
+ b = new k(0, 0, 0, 0);
+ for(c = h;c <= m;c++) {
+ h = f.getLine(c).replace(a, "$1");
+ b.start.row = c;
+ b.end.row = c;
+ b.end.column = h.length + 2;
+ f.replace(b, h)
}return-2
}else {
- return f.indentRows(l, "//")
+ return f.indentRows(h, m, "//")
}
};
- this.getNextLineIndent = function(a, f, l) {
- var n = this.$getIndent(f), d = this.$tokenizer.getLineTokens(f, a), k = d.tokens;
- d = d.state;
- if(k.length && k[k.length - 1].type == "comment") {
- return n
+ this.getNextLineIndent = function(a, f, h) {
+ var m = this.$getIndent(f), b = this.$tokenizer.getLineTokens(f, a), c = b.tokens;
+ b = b.state;
+ if(c.length && c[c.length - 1].type == "comment") {
+ return m
}if(a == "start") {
if(a = f.match(/^.*[\{\(\[]\s*$/)) {
- n += l
+ m += h
}
}else {
if(a == "doc-start") {
- if(d == "start") {
+ if(b == "start") {
return""
}if(a = f.match(/^\s*(\/?)\*/)) {
if(a[1]) {
- n += " "
- }n += "* "
- }if(a[1]) {
- n += " "
- }n += "* "
+ m += " "
+ }m += "* "
+ }
}
- }return n
+ }return m
};
- this.checkOutdent = function(a, f, l) {
- return this.$outdent.checkOutdent(f, l)
+ this.checkOutdent = function(a, f, h) {
+ return this.$outdent.checkOutdent(f, h)
};
- this.autoOutdent = function(a, f, l) {
- return this.$outdent.autoOutdent(f, l)
+ this.autoOutdent = function(a, f, h) {
+ return this.$outdent.autoOutdent(f, h)
}
- }).call(h.prototype);
- return h
+ }).call(j.prototype);
+ g.Mode = j
});
-define("ace/theme/textmate", ["require", "exports", "module", "text!ace/theme/tm.css!.ace-tm .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-tm .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-tm .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-tm .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-tm .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-tm .ace_editor .ace_printMargin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-tm .ace_text-layer {\n cursor: text;\n}\n\n.ace-tm .ace_cursor {\n border-left: 2px solid black;\n}\n\n.ace-tm .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid black;\n}\n \n.ace-tm .ace_line .ace_invisible {\n color: rgb(191, 191, 191);\n}\n\n.ace-tm .ace_line .ace_keyword {\n color: blue;\n}\n\n.ace-tm .ace_line .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-tm .ace_line .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_line .ace_invalid {\n background-color: rgb(153, 0, 0);\n color: white;\n}\n\n.ace-tm .ace_line .ace_support.ace_function {\n color: rgb(60, 76, 114);\n}\n\n.ace-tm .ace_line .ace_keyword.ace_operator {\n color: rgb(104, 118, 135);\n}\n\n.ace-tm .ace_line .ace_string {\n color: rgb(3, 106, 7);\n}\n\n.ace-tm .ace_line .ace_comment {\n color: rgb(76, 136, 107);\n}\n\n.ace-tm .ace_line .ace_comment.ace_doc {\n color: rgb(0, 102, 255);\n}\n\n.ace-tm .ace_line .ace_comment.ace_doc.ace_tag {\n color: rgb(128, 159, 191);\n}\n\n.ace-tm .ace_line .ace_constant.ace_numeric {\n color: rgb(0, 0, 205);\n}\n\n.ace-tm .ace_line .ace_variable {\n color: rgb(49, 132, 149);\n}\n\n.ace-tm .ace_line .ace_xml_pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-tm .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n\n.ace-tm .ace_marker-layer .ace_step {\n background: rgb(252, 255, 0);\n}\n\n.ace-tm .ace_marker-layer .ace_stack {\n background: rgb(164, 229, 101);\n}\n\n.ace-tm .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-tm .ace_marker-layer .ace_active_line {\n background: rgb(232, 242, 254);\n}\n\n.ace-tm .ace_string.ace_regex {\n color: rgb(255, 0, 0) \n}",
-"../lib/dom"], function(h, g, e, c) {
- h("../lib/dom").importCssString(c);
- return{cssClass:"ace-tm"}
+define("ace/theme/textmate", ["require", "exports", "module", "pilot/dom", "text!ace/theme/tm.css!.ace-tm .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-tm .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-tm .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-tm .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-tm .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-tm .ace_editor .ace_printMargin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-tm .ace_text-layer {\n cursor: text;\n}\n\n.ace-tm .ace_cursor {\n border-left: 2px solid black;\n}\n\n.ace-tm .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid black;\n}\n \n.ace-tm .ace_line .ace_invisible {\n color: rgb(191, 191, 191);\n}\n\n.ace-tm .ace_line .ace_keyword {\n color: blue;\n}\n\n.ace-tm .ace_line .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-tm .ace_line .ace_constant.ace_language {\n color: rgb(88, 92, 246);\n}\n\n.ace-tm .ace_line .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_line .ace_invalid {\n background-color: rgb(153, 0, 0);\n color: white;\n}\n\n.ace-tm .ace_line .ace_support.ace_function {\n color: rgb(60, 76, 114);\n}\n\n.ace-tm .ace_line .ace_support.ace_constant {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_line .ace_support.ace_type,\n.ace-tm .ace_line .ace_support.ace_class {\n color: rgb(109, 121, 222);\n}\n\n.ace-tm .ace_line .ace_keyword.ace_operator {\n color: rgb(104, 118, 135);\n}\n\n.ace-tm .ace_line .ace_string {\n color: rgb(3, 106, 7);\n}\n\n.ace-tm .ace_line .ace_comment {\n color: rgb(76, 136, 107);\n}\n\n.ace-tm .ace_line .ace_comment.ace_doc {\n color: rgb(0, 102, 255);\n}\n\n.ace-tm .ace_line .ace_comment.ace_doc.ace_tag {\n color: rgb(128, 159, 191);\n}\n\n.ace-tm .ace_line .ace_constant.ace_numeric {\n color: rgb(0, 0, 205);\n}\n\n.ace-tm .ace_line .ace_variable {\n color: rgb(49, 132, 149);\n}\n\n.ace-tm .ace_line .ace_xml_pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-tm .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n\n.ace-tm .ace_marker-layer .ace_step {\n background: rgb(252, 255, 0);\n}\n\n.ace-tm .ace_marker-layer .ace_stack {\n background: rgb(164, 229, 101);\n}\n\n.ace-tm .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-tm .ace_marker-layer .ace_active_line {\n background: rgb(232, 242, 254);\n}\n\n.ace-tm .ace_string.ace_regex {\n color: rgb(255, 0, 0) \n}"],
+function(j, g) {
+ var l = j("pilot/dom");
+ j = j("text!ace/theme/tm.css!.ace-tm .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-tm .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-tm .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-tm .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-tm .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-tm .ace_editor .ace_printMargin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-tm .ace_text-layer {\n cursor: text;\n}\n\n.ace-tm .ace_cursor {\n border-left: 2px solid black;\n}\n\n.ace-tm .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid black;\n}\n \n.ace-tm .ace_line .ace_invisible {\n color: rgb(191, 191, 191);\n}\n\n.ace-tm .ace_line .ace_keyword {\n color: blue;\n}\n\n.ace-tm .ace_line .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-tm .ace_line .ace_constant.ace_language {\n color: rgb(88, 92, 246);\n}\n\n.ace-tm .ace_line .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_line .ace_invalid {\n background-color: rgb(153, 0, 0);\n color: white;\n}\n\n.ace-tm .ace_line .ace_support.ace_function {\n color: rgb(60, 76, 114);\n}\n\n.ace-tm .ace_line .ace_support.ace_constant {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_line .ace_support.ace_type,\n.ace-tm .ace_line .ace_support.ace_class {\n color: rgb(109, 121, 222);\n}\n\n.ace-tm .ace_line .ace_keyword.ace_operator {\n color: rgb(104, 118, 135);\n}\n\n.ace-tm .ace_line .ace_string {\n color: rgb(3, 106, 7);\n}\n\n.ace-tm .ace_line .ace_comment {\n color: rgb(76, 136, 107);\n}\n\n.ace-tm .ace_line .ace_comment.ace_doc {\n color: rgb(0, 102, 255);\n}\n\n.ace-tm .ace_line .ace_comment.ace_doc.ace_tag {\n color: rgb(128, 159, 191);\n}\n\n.ace-tm .ace_line .ace_constant.ace_numeric {\n color: rgb(0, 0, 205);\n}\n\n.ace-tm .ace_line .ace_variable {\n color: rgb(49, 132, 149);\n}\n\n.ace-tm .ace_line .ace_xml_pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-tm .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n\n.ace-tm .ace_marker-layer .ace_step {\n background: rgb(252, 255, 0);\n}\n\n.ace-tm .ace_marker-layer .ace_stack {\n background: rgb(164, 229, 101);\n}\n\n.ace-tm .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-tm .ace_marker-layer .ace_active_line {\n background: rgb(232, 242, 254);\n}\n\n.ace-tm .ace_string.ace_regex {\n color: rgb(255, 0, 0) \n}");
+ l.importCssString(j);
+ g.cssClass = "ace-tm"
});
\ No newline at end of file
diff --git a/build/ace/event_emitter.js b/build/ace/event_emitter.js
deleted file mode 100644
index 3579934c..00000000
--- a/build/ace/event_emitter.js
+++ /dev/null
@@ -1,29 +0,0 @@
-define(function(d) {
- var e = d("./lib/lang");
- d = {};
- d.$dispatchEvent = function(a, b) {
- this.$eventRegistry = this.$eventRegistry || {};
- var c = this.$eventRegistry[a];
- if(c && c.length) {
- b = b || {};
- b.type = a;
- for(a = 0;a < c.length;a++) {
- c[a](b)
- }
- }
- };
- d.on = d.addEventListener = function(a, b) {
- this.$eventRegistry = this.$eventRegistry || {};
- var c = this.$eventRegistry[a];
- c || (c = this.$eventRegistry[a] = []);
- e.arrayIndexOf(c, b) == -1 && c.push(b)
- };
- d.removeEventListener = function(a, b) {
- this.$eventRegistry = this.$eventRegistry || {};
- if(a = this.$eventRegistry[a]) {
- b = e.arrayIndexOf(a, b);
- b !== -1 && a.splice(b, 1)
- }
- };
- return d
-});
\ No newline at end of file
diff --git a/build/ace/keybinding.js b/build/ace/keybinding.js
index 2751eb22..6da92ea6 100644
--- a/build/ace/keybinding.js
+++ b/build/ace/keybinding.js
@@ -1,56 +1,55 @@
-define(function(e) {
- var m = e("./lib/core"), l = e("./lib/event"), n = e("./conf/keybindings/default_mac"), o = e("./conf/keybindings/default_win"), p = e("./plugin_manager");
- e("./commands/default_commands");
- e = function(j, h, k) {
- this.setConfig(k);
- var a = this;
- l.addKeyListener(j, function(b) {
- var c = (a.config.reverse[0 | (b.ctrlKey ? 1 : 0) | (b.altKey ? 2 : 0) | (b.shiftKey ? 4 : 0) | (b.metaKey ? 8 : 0)] || {})[(a.keyNames[b.keyCode] || String.fromCharCode(b.keyCode)).toLowerCase()];
- if(c = p.commands[c]) {
- c(h, h.getSelection());
- return l.stopEvent(b)
+define(function(e, n) {
+ var j = e("pilot/useragent"), m = e("pilot/event"), o = e("ace/conf/keybindings/default_mac").bindings, p = e("ace/conf/keybindings/default_win").bindings, q = e("pilot/canon");
+ e("ace/commands/default_commands");
+ e = function(k, i, l) {
+ this.setConfig(l);
+ var b = this;
+ m.addKeyListener(k, function(a) {
+ var d = (b.config.reverse[j.isOpera && j.isMac ? 0 | (a.metaKey ? 1 : 0) | (a.altKey ? 2 : 0) | (a.shiftKey ? 4 : 0) | (a.ctrlKey ? 8 : 0) : 0 | (a.ctrlKey ? 1 : 0) | (a.altKey ? 2 : 0) | (a.shiftKey ? 4 : 0) | (a.metaKey ? 8 : 0)] || {})[(b.keyNames[a.keyCode] || String.fromCharCode(a.keyCode)).toLowerCase()];
+ if(q.exec(d, {editor:i})) {
+ return m.stopEvent(a)
}
})
};
(function() {
- function j(a, b, c, f) {
- return(f && a.toLowerCase() || a).replace(/(?:^\s+|\n|\s+$)/g, "").split(new RegExp("[\\s ]*" + b + "[\\s ]*", "g"), c || 999)
+ function k(b, a, d, f) {
+ return(f && b.toLowerCase() || b).replace(/(?:^\s+|\n|\s+$)/g, "").split(new RegExp("[\\s ]*" + a + "[\\s ]*", "g"), d || 999)
}
- function h(a, b, c) {
+ function i(b, a, d) {
var f, g = 0;
- a = j(a, "\\-", null, true);
- for(var d = 0, i = a.length;d < i;++d) {
- if(this.keyMods[a[d]]) {
- g |= this.keyMods[a[d]]
+ b = k(b, "\\-", null, true);
+ for(var c = 0, h = b.length;c < h;++c) {
+ if(this.keyMods[b[c]]) {
+ g |= this.keyMods[b[c]]
}else {
- f = a[d] || "-"
+ f = b[c] || "-"
}
- }(c[g] || (c[g] = {}))[f] = b;
- return c
+ }(d[g] || (d[g] = {}))[f] = a;
+ return d
}
- function k(a, b) {
- var c, f, g, d, i = {};
- for(c in a) {
- d = a[c];
- if(b && typeof d == "string") {
- d = d.split(b);
+ function l(b, a) {
+ var d, f, g, c, h = {};
+ for(d in b) {
+ c = b[d];
+ if(a && typeof c == "string") {
+ c = c.split(a);
f = 0;
- for(g = d.length;f < g;++f) {
- h.call(this, d[f], c, i)
+ for(g = c.length;f < g;++f) {
+ i.call(this, c[f], d, h)
}
}else {
- h.call(this, d, c, i)
+ i.call(this, c, d, h)
}
- }return i
+ }return h
}
this.keyMods = {ctrl:1, alt:2, option:2, shift:4, meta:8, command:8};
this.keyNames = {"8":"Backspace", "9":"Tab", "13":"Enter", "27":"Esc", "32":"Space", "33":"PageUp", "34":"PageDown", "35":"End", "36":"Home", "37":"Left", "38":"Up", "39":"Right", "40":"Down", "45":"Insert", "46":"Delete", "107":"+", "112":"F1", "113":"F2", "114":"F3", "115":"F4", "116":"F5", "117":"F6", "118":"F7", "119":"F8", "120":"F9", "121":"F10", "122":"F11", "123":"F12"};
- this.setConfig = function(a) {
- this.config = a || (m.isMac ? n : o);
+ this.setConfig = function(b) {
+ this.config = b || (j.isMac ? o : p);
if(typeof this.config.reverse == "undefined") {
- this.config.reverse = k.call(this, this.config, "|")
+ this.config.reverse = l.call(this, this.config, "|")
}
}
}).call(e.prototype);
- return e
+ n.KeyBinding = e
});
\ No newline at end of file
diff --git a/build/ace/layer/cursor.js b/build/ace/layer/cursor.js
index c8450fa9..df23345c 100644
--- a/build/ace/layer/cursor.js
+++ b/build/ace/layer/cursor.js
@@ -1,5 +1,5 @@
-define(function(b) {
- var d = b("../lib/dom");
+define(function(b, f) {
+ var d = b("pilot/dom");
b = function(a) {
this.element = document.createElement("div");
this.element.className = "ace_layer ace_cursor-layer";
@@ -59,5 +59,5 @@ define(function(b) {
}
}
}).call(b.prototype);
- return b
+ f.Cursor = b
});
\ No newline at end of file
diff --git a/build/ace/layer/gutter.js b/build/ace/layer/gutter.js
index 5934bb53..24021d6c 100644
--- a/build/ace/layer/gutter.js
+++ b/build/ace/layer/gutter.js
@@ -1,5 +1,6 @@
-define(function() {
- var d = function(a) {
+define(function(d, e) {
+ var f = d("pilot/dom");
+ d = function(a) {
this.element = document.createElement("div");
this.element.className = "ace_layer ace_gutter-layer";
a.appendChild(this.element);
@@ -22,9 +23,9 @@ define(function() {
for(var b = [], c = a.firstRow;c <= a.lastRow;c++) {
b.push("", c + 1, "
");
b.push("")
- }this.element.innerHTML = b.join("");
+ }this.element = f.setInnerHtml(this.element, b.join(""));
this.element.style.height = a.minHeight + "px"
}
}).call(d.prototype);
- return d
+ e.Gutter = d
});
\ No newline at end of file
diff --git a/build/ace/layer/marker.js b/build/ace/layer/marker.js
index ab3dc1d7..b2960ea9 100644
--- a/build/ace/layer/marker.js
+++ b/build/ace/layer/marker.js
@@ -1,72 +1,74 @@
-define(function(h) {
- var i = h("../range");
- h = function(c) {
+define(function(h, j) {
+ var i = h("ace/range").Range, k = h("pilot/dom");
+ h = function(d) {
this.element = document.createElement("div");
this.element.className = "ace_layer ace_marker-layer";
- c.appendChild(this.element);
+ d.appendChild(this.element);
this.markers = {};
this.$markerId = 1
};
(function() {
- this.setDocument = function(c) {
- this.doc = c
+ this.setDocument = function(d) {
+ this.doc = d
};
- this.addMarker = function(c, a, e) {
+ this.addMarker = function(d, a, e) {
var b = this.$markerId++;
- this.markers[b] = {range:c, type:e || "line", clazz:a};
+ this.markers[b] = {range:d, type:e || "line", clazz:a};
return b
};
- this.removeMarker = function(c) {
- this.markers[c] && delete this.markers[c]
+ this.removeMarker = function(d) {
+ this.markers[d] && delete this.markers[d]
};
- this.update = function(c) {
- if(c = c || this.config) {
- this.config = c;
+ this.update = function(d) {
+ if(d = d || this.config) {
+ this.config = d;
var a = [];
for(var e in this.markers) {
- var b = this.markers[e], d = b.range.clipRows(c.firstRow, c.lastRow);
- if(!d.isEmpty()) {
- if(d.isMultiLine()) {
- b.type == "text" ? this.drawTextMarker(a, d, b.clazz, c) : this.drawMultiLineMarker(a, d, b.clazz, c)
+ var b = this.markers[e], c = b.range.clipRows(d.firstRow, d.lastRow);
+ if(!c.isEmpty()) {
+ if(c.isMultiLine()) {
+ b.type == "text" ? this.drawTextMarker(a, c, b.clazz, d) : this.drawMultiLineMarker(a, c, b.clazz, d)
}else {
- this.drawSingleLineMarker(a, d, b.clazz, c)
+ this.drawSingleLineMarker(a, c, b.clazz, d)
}
}
- }this.element.innerHTML = a.join("")
+ }this.element = k.setInnerHtml(this.element, a.join(""))
}
};
- this.drawTextMarker = function(c, a, e, b) {
- var d = a.start.row, f = new i(d, a.start.column, d, this.doc.getLine(d).length);
- this.drawSingleLineMarker(c, f, e, b);
- d = a.end.row;
- f = new i(d, 0, d, a.end.column);
- this.drawSingleLineMarker(c, f, e, b);
- for(d = a.start.row + 1;d < a.end.row;d++) {
- f.start.row = d;
- f.end.row = d;
- f.end.column = this.doc.getLine(d).length;
- this.drawSingleLineMarker(c, f, e, b)
+ this.drawTextMarker = function(d, a, e, b) {
+ var c = a.start.row, f = new i(c, a.start.column, c, this.doc.getLine(c).length);
+ this.drawSingleLineMarker(d, f, e, b, 1);
+ c = a.end.row;
+ f = new i(c, 0, c, a.end.column);
+ this.drawSingleLineMarker(d, f, e, b);
+ for(c = a.start.row + 1;c < a.end.row;c++) {
+ f.start.row = c;
+ f.end.row = c;
+ f.end.column = this.doc.getLine(c).length;
+ this.drawSingleLineMarker(d, f, e, b, 1)
}
};
- this.drawMultiLineMarker = function(c, a, e, b) {
+ this.drawMultiLineMarker = function(d, a, e, b) {
a = a.toScreenRange(this.doc);
- var d = b.lineHeight, f = Math.round(b.width - a.start.column * b.characterWidth), g = (a.start.row - b.firstRow) * b.lineHeight, j = Math.round(a.start.column * b.characterWidth);
- c.push("");
+ var c = b.lineHeight, f = Math.round(b.width - a.start.column * b.characterWidth), g = (a.start.row - b.firstRow) * b.lineHeight, l = Math.round(a.start.column * b.characterWidth);
+ d.push("");
g = (a.end.row - b.firstRow) * b.lineHeight;
f = Math.round(a.end.column * b.characterWidth);
- c.push("");
- d = (a.end.row - a.start.row - 1) * b.lineHeight;
- if(!(d < 0)) {
+ d.push("");
+ c = (a.end.row - a.start.row - 1) * b.lineHeight;
+ if(!(c < 0)) {
g = (a.start.row + 1 - b.firstRow) * b.lineHeight;
- c.push("")
+ d.push("")
}
};
- this.drawSingleLineMarker = function(c, a, e, b) {
+ this.drawSingleLineMarker = function(d, a, e, b, c) {
a = a.toScreenRange(this.doc);
- var d = b.lineHeight, f = Math.round((a.end.column - a.start.column) * b.characterWidth), g = (a.start.row - b.firstRow) * b.lineHeight;
+ var f = b.lineHeight;
+ c = Math.round((a.end.column + (c || 0) - a.start.column) * b.characterWidth);
+ var g = (a.start.row - b.firstRow) * b.lineHeight;
a = Math.round(a.start.column * b.characterWidth);
- c.push("")
+ d.push("")
}
}).call(h.prototype);
- return h
+ j.Marker = h
});
\ No newline at end of file
diff --git a/build/ace/layer/text.js b/build/ace/layer/text.js
index 7e37774c..ae9bd66e 100644
--- a/build/ace/layer/text.js
+++ b/build/ace/layer/text.js
@@ -1,5 +1,5 @@
-define(function(k) {
- var m = k("../lib/oop"), n = k("../lib/dom"), o = k("../event_emitter");
+define(function(k, n) {
+ var o = k("pilot/oop"), l = k("pilot/dom"), p = k("pilot/lang"), q = k("pilot/event_emitter").EventEmitter;
k = function(a) {
this.element = document.createElement("div");
this.element.className = "ace_layer ace_text-layer";
@@ -8,7 +8,7 @@ define(function(k) {
this.$pollSizeChanges()
};
(function() {
- m.implement(this, o);
+ o.implement(this, q);
this.EOF_CHAR = "¶";
this.EOL_CHAR = "¬";
this.TAB_CHAR = "→";
@@ -28,37 +28,41 @@ define(function(k) {
var b = a.$measureSizes();
if(a.$characterSize.width !== b.width || a.$characterSize.height !== b.height) {
a.$characterSize = b;
- a.$dispatchEvent("changeCharaterSize", {data:b})
+ a._dispatchEvent("changeCharaterSize", {data:b})
}
}, 500)
};
this.$fontStyles = {fontFamily:1, fontSize:1, fontWeight:1, fontStyle:1, lineHeight:1};
this.$measureSizes = function() {
- var a = document.createElement("div"), b = a.style;
- b.width = b.height = "auto";
- b.left = b.top = "-1000px";
- b.visibility = "hidden";
- b.position = "absolute";
- b.overflow = "visible";
+ if(!this.$measureNode) {
+ var a = this.$measureNode = document.createElement("div"), b = a.style;
+ b.width = b.height = "auto";
+ b.left = b.top = "-1000px";
+ b.visibility = "hidden";
+ b.position = "absolute";
+ b.overflow = "visible";
+ b.whiteSpace = "nowrap";
+ a.innerHTML = p.stringRepeat("Xy", 1E3);
+ document.body.insertBefore(a, document.body.firstChild)
+ }b = this.$measureNode.style;
for(var e in this.$fontStyles) {
- var f = n.computedStyle(this.element, e);
- b[e] = f
- }a.innerHTML = (new Array(1E3)).join("Xy");
- document.body.insertBefore(a, document.body.firstChild);
- b = {height:a.offsetHeight, width:a.offsetWidth / 2E3};
- document.body.removeChild(a);
- return b
+ a = l.computedStyle(this.element, e);
+ b[e] = a
+ }return{height:this.$measureNode.offsetHeight, width:this.$measureNode.offsetWidth / 2E3}
};
this.setDocument = function(a) {
this.doc = a
};
- this.$showInvisibles = false;
+ this.showInvisibles = false;
this.setShowInvisibles = function(a) {
- this.$showInvisibles = a
+ if(this.showInvisibles == a) {
+ return false
+ }this.showInvisibles = a;
+ return true
};
this.$computeTabString = function() {
var a = this.doc.getTabSize();
- if(this.$showInvisibles) {
+ if(this.showInvisibles) {
a = a / 2;
this.$tabString = "" + (new Array(Math.floor(a))).join(" ") + this.TAB_CHAR + (new Array(Math.ceil(a) + 1)).join(" ") + ""
}else {
@@ -68,31 +72,31 @@ define(function(k) {
this.updateLines = function(a, b, e) {
this.$computeTabString();
this.config = a;
- var f = Math.max(b, a.firstRow), c = Math.min(e, a.lastRow), d = this.element.childNodes, h = this;
- this.tokenizer.getTokens(f, c, function(i) {
- for(var g = f;g <= c;g++) {
- var j = d[g - a.firstRow];
+ var g = Math.max(b, a.firstRow), c = Math.min(e, a.lastRow), d = this.element.childNodes, h = this;
+ this.tokenizer.getTokens(g, c, function(i) {
+ for(var f = g;f <= c;f++) {
+ var j = d[f - a.firstRow];
if(j) {
- var l = [];
- h.$renderLine(l, g, i[g - f].tokens);
- j.innerHTML = l.join("")
+ var m = [];
+ h.$renderLine(m, f, i[f - g].tokens);
+ l.setInnerHtml(j, m.join)
}
}
})
};
this.scrollLines = function(a) {
function b(i) {
- a.firstRow < c.firstRow ? f.$renderLinesFragment(a, a.firstRow, c.firstRow - 1, function(g) {
- d.firstChild ? d.insertBefore(g, d.firstChild) : d.appendChild(g);
+ a.firstRow < c.firstRow ? g.$renderLinesFragment(a, a.firstRow, c.firstRow - 1, function(f) {
+ d.firstChild ? d.insertBefore(f, d.firstChild) : d.appendChild(f);
i()
}) : i()
}
function e() {
- a.lastRow > c.lastRow && f.$renderLinesFragment(a, c.lastRow + 1, a.lastRow, function(i) {
+ a.lastRow > c.lastRow && g.$renderLinesFragment(a, c.lastRow + 1, a.lastRow, function(i) {
d.appendChild(i)
})
}
- var f = this;
+ var g = this;
this.$computeTabString();
var c = this.config;
this.config = a;
@@ -111,48 +115,48 @@ define(function(k) {
}
}b(e)
};
- this.$renderLinesFragment = function(a, b, e, f) {
+ this.$renderLinesFragment = function(a, b, e, g) {
var c = document.createDocumentFragment(), d = this;
this.tokenizer.getTokens(b, e, function(h) {
for(var i = b;i <= e;i++) {
- var g = document.createElement("div");
- g.className = "ace_line";
- var j = g.style;
+ var f = document.createElement("div");
+ f.className = "ace_line";
+ var j = f.style;
j.height = d.$characterSize.height + "px";
j.width = a.width + "px";
j = [];
d.$renderLine(j, i, h[i - b].tokens);
- g.innerHTML = j.join("");
- c.appendChild(g)
- }f(c)
+ f.innerHTML = j.join("");
+ c.appendChild(f)
+ }g(c)
})
};
this.update = function(a) {
this.$computeTabString();
this.config = a;
var b = [], e = this;
- this.tokenizer.getTokens(a.firstRow, a.lastRow, function(f) {
+ this.tokenizer.getTokens(a.firstRow, a.lastRow, function(g) {
for(var c = a.firstRow;c <= a.lastRow;c++) {
b.push("");
- e.$renderLine(b, c, f[c - a.firstRow].tokens);
+ e.$renderLine(b, c, g[c - a.firstRow].tokens);
b.push("
")
- }e.element.innerHTML = b.join("")
+ }e.element = l.setInnerHtml(e.element, b.join(""))
})
};
this.$textToken = {text:true, rparen:true, lparen:true};
this.$renderLine = function(a, b, e) {
- for(var f = /[\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000]/g, c = 0;c < e.length;c++) {
- var d = e[c], h = d.value.replace(/&/g, "&").replace(/", h, "")
}
- }if(this.$showInvisibles) {
+ }if(this.showInvisibles) {
b !== this.doc.getLength() - 1 ? a.push("" + this.EOL_CHAR + "") : a.push("" + this.EOF_CHAR + "")
}
}
}).call(k.prototype);
- return k
+ n.Text = k
});
\ No newline at end of file
diff --git a/build/ace/lib/core.js b/build/ace/lib/core.js
deleted file mode 100644
index ee9f8a15..00000000
--- a/build/ace/lib/core.js
+++ /dev/null
@@ -1,17 +0,0 @@
-define(function() {
- var a = {}, d = (navigator.platform.match(/mac|win|linux/i) || ["other"])[0].toLowerCase();
- a.isWin = d == "win";
- a.isMac = d == "mac";
- a.isLinux = d == "linux";
- a.isIE = !+"\u000b1";
- a.isGecko = window.controllers && window.navigator.product === "Gecko";
- a.provide = function(b) {
- b = b.split(".");
- for(var c = window, e = 0;e < b.length;e++) {
- var f = b[e];
- c[f] || (c[f] = {});
- c = c[f]
- }
- };
- return a
-});
\ No newline at end of file
diff --git a/build/ace/lib/oop.js b/build/ace/lib/oop.js
deleted file mode 100644
index 53011e61..00000000
--- a/build/ace/lib/oop.js
+++ /dev/null
@@ -1,20 +0,0 @@
-define(function() {
- var c = {};
- c.inherits = function(a, b) {
- var d = function() {
- };
- d.prototype = b.prototype;
- a.super_ = b.prototype;
- a.prototype = new d;
- a.prototype.constructor = a
- };
- c.mixin = function(a, b) {
- for(var d in b) {
- a[d] = b[d]
- }
- };
- c.implement = function(a, b) {
- c.mixin(a, b)
- };
- return c
-});
\ No newline at end of file
diff --git a/build/ace/mode/css.js b/build/ace/mode/css.js
index a41740fb..aa9499fe 100644
--- a/build/ace/mode/css.js
+++ b/build/ace/mode/css.js
@@ -1,13 +1,13 @@
-define("ace/mode/css_highlight_rules", ["require", "exports", "module", "../lib/oop", "../lib/lang", "./text_highlight_rules"], function(b) {
- var j = b("../lib/oop"), c = b("../lib/lang");
- b = b("./text_highlight_rules");
+define("ace/mode/css_highlight_rules", ["require", "exports", "module", "pilot/oop", "pilot/lang", "ace/mode/text_highlight_rules"], function(b, j) {
+ var k = b("pilot/oop"), c = b("pilot/lang");
+ b = b("ace/mode/text_highlight_rules").TextHighlightRules;
var e = function() {
function a(d) {
- var l = [];
+ var m = [];
d = d.split("");
- for(var k = 0;k < d.length;k++) {
- l.push("[", d[k].toLowerCase(), d[k].toUpperCase(), "]")
- }return l.join("")
+ for(var l = 0;l < d.length;l++) {
+ m.push("[", d[l].toLowerCase(), d[l].toUpperCase(), "]")
+ }return m.join("")
}
var f = c.arrayToMap("azimuth|background-attachment|background-color|background-image|background-position|background-repeat|background|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border|bottom|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|-moz-border-radius|opacity|orphans|outline-color|outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|position|quotes|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|stress|table-layout|text-align|text-decoration|text-indent|text-shadow|text-transform|top|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index".split("|")),
g = c.arrayToMap("rgb|rgba|url|attr|counter|counters".split("|")), h = c.arrayToMap("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|block|bold|bolder|both|bottom|break-all|break-word|capitalize|center|char|circle|cjk-ideographic|col-resize|collapse|crosshair|dashed|decimal-leading-zero|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|keep-all|left|lighter|line-edge|line-through|line|list-item|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|super|sw-resize|table-footer-group|table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|zero".split("|")),
@@ -19,11 +19,11 @@ define("ace/mode/css_highlight_rules", ["require", "exports", "module", "../lib/
return f[d.toLowerCase()] ? "support.type" : g[d.toLowerCase()] ? "support.function" : h[d.toLowerCase()] ? "support.constant" : i[d.toLowerCase()] ? "support.constant.color" : "text"
}, regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}], comment:[{token:"comment", regex:".*?\\*\\/", next:"start"}, {token:"comment", regex:".+"}]}
};
- j.inherits(e, b);
- return e
+ k.inherits(e, b);
+ j.CssHighlightRules = e
});
-define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "../range"], function(b) {
- var j = b("../range");
+define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function(b, j) {
+ var k = b("ace/range").Range;
b = function() {
};
(function() {
@@ -41,7 +41,7 @@ define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "../r
if(!f || f.row == e) {
return 0
}f = this.$getIndent(c.getLine(f.row));
- c.replace(new j(e, 0, e, a - 1), f);
+ c.replace(new k(e, 0, e, a - 1), f);
return f.length - (a - 1)
};
this.$getIndent = function(c) {
@@ -50,15 +50,15 @@ define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "../r
}return""
}
}).call(b.prototype);
- return b
+ j.MatchingBraceOutdent = b
});
-define("ace/mode/css", ["require", "exports", "module", "../lib/oop", "./text", "../tokenizer", "./css_highlight_rules", "./matching_brace_outdent"], function(b) {
- var j = b("../lib/oop"), c = b("./text"), e = b("../tokenizer"), a = b("./css_highlight_rules"), f = b("./matching_brace_outdent");
+define("ace/mode/css", ["require", "exports", "module", "pilot/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/css_highlight_rules", "ace/mode/matching_brace_outdent"], function(b, j) {
+ var k = b("pilot/oop"), c = b("ace/mode/text").Mode, e = b("ace/tokenizer").Tokenizer, a = b("ace/mode/css_highlight_rules").CssHighlightRules, f = b("ace/mode/matching_brace_outdent").MatchingBraceOutdent;
b = function() {
this.$tokenizer = new e((new a).getRules());
this.$outdent = new f
};
- j.inherits(b, c);
+ k.inherits(b, c);
(function() {
this.getNextLineIndent = function(g, h, i) {
var d = this.$getIndent(h);
@@ -76,5 +76,5 @@ define("ace/mode/css", ["require", "exports", "module", "../lib/oop", "./text",
return this.$outdent.autoOutdent(h, i)
}
}).call(b.prototype);
- return b
+ j.Mode = b
});
\ No newline at end of file
diff --git a/build/ace/mode/css_highlight_rules.js b/build/ace/mode/css_highlight_rules.js
index a68b8b16..28b409ac 100644
--- a/build/ace/mode/css_highlight_rules.js
+++ b/build/ace/mode/css_highlight_rules.js
@@ -1,6 +1,6 @@
-define(function(c) {
- var h = c("../lib/oop"), d = c("../lib/lang");
- c = c("./text_highlight_rules");
+define(function(c, h) {
+ var i = c("pilot/oop"), d = c("pilot/lang");
+ c = c("ace/mode/text_highlight_rules").TextHighlightRules;
var g = function() {
function a(b) {
var f = [];
@@ -9,16 +9,16 @@ define(function(c) {
f.push("[", b[e].toLowerCase(), b[e].toUpperCase(), "]")
}return f.join("")
}
- var i = d.arrayToMap("azimuth|background-attachment|background-color|background-image|background-position|background-repeat|background|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border|bottom|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|-moz-border-radius|opacity|orphans|outline-color|outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|position|quotes|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|stress|table-layout|text-align|text-decoration|text-indent|text-shadow|text-transform|top|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index".split("|")),
- j = d.arrayToMap("rgb|rgba|url|attr|counter|counters".split("|")), k = d.arrayToMap("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|block|bold|bolder|both|bottom|break-all|break-word|capitalize|center|char|circle|cjk-ideographic|col-resize|collapse|crosshair|dashed|decimal-leading-zero|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|keep-all|left|lighter|line-edge|line-through|line|list-item|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|super|sw-resize|table-footer-group|table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|zero".split("|")),
- l = d.arrayToMap("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow".split("|"));
+ var j = d.arrayToMap("azimuth|background-attachment|background-color|background-image|background-position|background-repeat|background|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border|bottom|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|-moz-border-radius|opacity|orphans|outline-color|outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|position|quotes|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|stress|table-layout|text-align|text-decoration|text-indent|text-shadow|text-transform|top|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index".split("|")),
+ k = d.arrayToMap("rgb|rgba|url|attr|counter|counters".split("|")), l = d.arrayToMap("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|block|bold|bolder|both|bottom|break-all|break-word|capitalize|center|char|circle|cjk-ideographic|col-resize|collapse|crosshair|dashed|decimal-leading-zero|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|keep-all|left|lighter|line-edge|line-through|line|list-item|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|super|sw-resize|table-footer-group|table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|zero".split("|")),
+ m = d.arrayToMap("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow".split("|"));
this.$rules = {start:[{token:"comment", regex:"\\/\\*", next:"comment"}, {token:"string", regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'}, {token:"string", regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"}, {token:"constant.numeric", regex:"\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))" + a("em")}, {token:"constant.numeric", regex:"\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))" + a("ex")}, {token:"constant.numeric", regex:"\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))" + a("px")}, {token:"constant.numeric", regex:"\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))" +
a("cm")}, {token:"constant.numeric", regex:"\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))" + a("mm")}, {token:"constant.numeric", regex:"\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))" + a("in")}, {token:"constant.numeric", regex:"\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))" + a("pt")}, {token:"constant.numeric", regex:"\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))" + a("pc")}, {token:"constant.numeric", regex:"\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))" + a("deg")}, {token:"constant.numeric", regex:"\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))" +
a("rad")}, {token:"constant.numeric", regex:"\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))" + a("grad")}, {token:"constant.numeric", regex:"\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))" + a("ms")}, {token:"constant.numeric", regex:"\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))" + a("s")}, {token:"constant.numeric", regex:"\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))" + a("hz")}, {token:"constant.numeric", regex:"\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))" + a("khz")}, {token:"constant.numeric", regex:"\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))%"},
{token:"constant.numeric", regex:"\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"}, {token:"constant.numeric", regex:"#[a-fA-F0-9]{6}"}, {token:"constant.numeric", regex:"#[a-fA-F0-9]{3}"}, {token:"lparen", regex:"{"}, {token:"rparen", regex:"}"}, {token:function(b) {
- return i[b.toLowerCase()] ? "support.type" : j[b.toLowerCase()] ? "support.function" : k[b.toLowerCase()] ? "support.constant" : l[b.toLowerCase()] ? "support.constant.color" : "text"
+ return j[b.toLowerCase()] ? "support.type" : k[b.toLowerCase()] ? "support.function" : l[b.toLowerCase()] ? "support.constant" : m[b.toLowerCase()] ? "support.constant.color" : "text"
}, regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}], comment:[{token:"comment", regex:".*?\\*\\/", next:"start"}, {token:"comment", regex:".+"}]}
};
- h.inherits(g, c);
- return g
+ i.inherits(g, c);
+ h.CssHighlightRules = g
});
\ No newline at end of file
diff --git a/build/ace/mode/doc_comment_highlight_rules.js b/build/ace/mode/doc_comment_highlight_rules.js
index 9a924e0c..8a899a91 100644
--- a/build/ace/mode/doc_comment_highlight_rules.js
+++ b/build/ace/mode/doc_comment_highlight_rules.js
@@ -1,14 +1,14 @@
-define(function(a) {
- var c = a("../lib/oop");
- a = a("./text_highlight_rules");
+define(function(a, c) {
+ var d = a("pilot/oop");
+ a = a("ace/mode/text_highlight_rules").TextHighlightRules;
var b = function() {
- this.$rules = {start:[{token:"comment.doc", regex:"\\*\\/", next:"start"}, {token:"comment.doc.tag", regex:"@[\\w\\d_]+"}, {token:"comment.doc", regex:"s+"}, {token:"comment.doc", regex:"[^@\\*]+"}, {token:"comment.doc", regex:"."}]}
+ this.$rules = {start:[{token:"comment.doc", regex:"\\*\\/", next:"start"}, {token:"comment.doc.tag", regex:"@[\\w\\d_]+"}, {token:"comment.doc", regex:"s+"}, {token:"comment.doc", regex:"TODO"}, {token:"comment.doc", regex:"[^@\\*]+"}, {token:"comment.doc", regex:"."}]}
};
- c.inherits(b, a);
+ d.inherits(b, a);
(function() {
- this.getStartRule = function(d) {
- return{token:"comment.doc", regex:"\\/\\*(?=\\*)", next:d}
+ this.getStartRule = function(e) {
+ return{token:"comment.doc", regex:"\\/\\*(?=\\*)", next:e}
}
}).call(b.prototype);
- return b
+ c.DocCommentHighlightRules = b
});
\ No newline at end of file
diff --git a/build/ace/mode/html.js b/build/ace/mode/html.js
index e4522585..35cb5f7d 100644
--- a/build/ace/mode/html.js
+++ b/build/ace/mode/html.js
@@ -1,33 +1,33 @@
-define("ace/mode/html_highlight_rules", ["require", "exports", "module", "../lib/oop", "./css_highlight_rules", "./javascript_highlight_rules", "./text_highlight_rules"], function(a) {
- var f = a("../lib/oop"), g = a("./css_highlight_rules"), h = a("./javascript_highlight_rules");
- a = a("./text_highlight_rules");
+define("ace/mode/html_highlight_rules", ["require", "exports", "module", "pilot/oop", "ace/mode/css_highlight_rules", "ace/mode/javascript_highlight_rules", "ace/mode/text_highlight_rules"], function(a, f) {
+ var g = a("pilot/oop"), h = a("ace/mode/css_highlight_rules").CssHighlightRules, i = a("ace/mode/javascript_highlight_rules").JavaScriptHighlightRules;
+ a = a("ace/mode/text_highlight_rules").TextHighlightRules;
var d = function() {
this.$rules = {start:[{token:"text", regex:"<\\!\\[CDATA\\[", next:"cdata"}, {token:"xml_pe", regex:"<\\?.*?\\?>"}, {token:"comment", regex:"<\\!--", next:"comment"}, {token:"text", regex:"<(?=s*script)", next:"script"}, {token:"text", regex:"<(?=s*style)", next:"css"}, {token:"text", regex:"<\\/?", next:"tag"}, {token:"text", regex:"\\s+"}, {token:"text", regex:"[^<]+"}], script:[{token:"text", regex:">", next:"js-start"}, {token:"keyword", regex:"[-_a-zA-Z0-9:]+"}, {token:"text", regex:"\\s+"},
{token:"string", regex:'".*?"'}, {token:"string", regex:"'.*?'"}], css:[{token:"text", regex:">", next:"css-start"}, {token:"keyword", regex:"[-_a-zA-Z0-9:]+"}, {token:"text", regex:"\\s+"}, {token:"string", regex:'".*?"'}, {token:"string", regex:"'.*?'"}], tag:[{token:"text", regex:">", next:"start"}, {token:"keyword", regex:"[-_a-zA-Z0-9:]+"}, {token:"text", regex:"\\s+"}, {token:"string", regex:'".*?"'}, {token:"string", regex:"'.*?'"}], cdata:[{token:"text", regex:"\\]\\]>", next:"start"},
{token:"text", regex:"\\s+"}, {token:"text", regex:".+"}], comment:[{token:"comment", regex:".*?--\>", next:"start"}, {token:"comment", regex:".+"}]};
- this.addRules((new h).getRules(), "js-");
+ this.addRules((new i).getRules(), "js-");
this.$rules["js-start"].unshift({token:"comment", regex:"\\/\\/.*(?=<\\/script>)", next:"tag"}, {token:"text", regex:"<\\/(?=script)", next:"tag"});
- this.addRules((new g).getRules(), "css-");
+ this.addRules((new h).getRules(), "css-");
this.$rules["css-start"].unshift({token:"text", regex:"<\\/(?=style)", next:"tag"})
};
- f.inherits(d, a);
- return d
+ g.inherits(d, a);
+ f.HtmlHighlightRules = d
});
-define("ace/mode/html", ["require", "exports", "module", "../lib/oop", "./text", "./javascript", "./css", "../tokenizer", "./html_highlight_rules"], function(a) {
- var f = a("../lib/oop"), g = a("./text"), h = a("./javascript"), d = a("./css"), k = a("../tokenizer"), l = a("./html_highlight_rules");
+define("ace/mode/html", ["require", "exports", "module", "pilot/oop", "ace/mode/text", "ace/mode/javascript", "ace/mode/css", "ace/tokenizer", "ace/mode/html_highlight_rules"], function(a, f) {
+ var g = a("pilot/oop"), h = a("ace/mode/text").Mode, i = a("ace/mode/javascript").Mode, d = a("ace/mode/css").Mode, l = a("ace/tokenizer").Tokenizer, m = a("ace/mode/html_highlight_rules").HtmlHighlightRules;
a = function() {
- this.$tokenizer = new k((new l).getRules());
- this.$js = new h;
+ this.$tokenizer = new l((new m).getRules());
+ this.$js = new i;
this.$css = new d
};
- f.inherits(a, g);
+ g.inherits(a, h);
(function() {
this.toggleCommentLines = function() {
return this.$delegate("toggleCommentLines", arguments, function() {
return 0
})
};
- this.getNextLineIndent = function(i, b) {
+ this.getNextLineIndent = function(j, b) {
var e = this;
return this.$delegate("getNextLineIndent", arguments, function() {
return e.$getIndent(b)
@@ -41,17 +41,17 @@ define("ace/mode/html", ["require", "exports", "module", "../lib/oop", "./text",
this.autoOutdent = function() {
return this.$delegate("autoOutdent", arguments)
};
- this.$delegate = function(i, b, e) {
- var j = b[0], c = j.split("js-");
+ this.$delegate = function(j, b, e) {
+ var k = b[0], c = k.split("js-");
if(!c[0] && c[1]) {
b[0] = c[1];
- return this.$js[i].apply(this.$js, b)
- }c = j.split("css-");
+ return this.$js[j].apply(this.$js, b)
+ }c = k.split("css-");
if(!c[0] && c[1]) {
b[0] = c[1];
- return this.$css[i].apply(this.$css, b)
+ return this.$css[j].apply(this.$css, b)
}return e ? e() : undefined
}
}).call(a.prototype);
- return a
+ f.Mode = a
});
\ No newline at end of file
diff --git a/build/ace/mode/html_highlight_rules.js b/build/ace/mode/html_highlight_rules.js
index f0025ca9..b6dd54b0 100644
--- a/build/ace/mode/html_highlight_rules.js
+++ b/build/ace/mode/html_highlight_rules.js
@@ -1,15 +1,15 @@
-define(function(a) {
- var c = a("../lib/oop"), d = a("./css_highlight_rules"), e = a("./javascript_highlight_rules");
- a = a("./text_highlight_rules");
+define(function(a, c) {
+ var d = a("pilot/oop"), e = a("ace/mode/css_highlight_rules").CssHighlightRules, f = a("ace/mode/javascript_highlight_rules").JavaScriptHighlightRules;
+ a = a("ace/mode/text_highlight_rules").TextHighlightRules;
var b = function() {
this.$rules = {start:[{token:"text", regex:"<\\!\\[CDATA\\[", next:"cdata"}, {token:"xml_pe", regex:"<\\?.*?\\?>"}, {token:"comment", regex:"<\\!--", next:"comment"}, {token:"text", regex:"<(?=s*script)", next:"script"}, {token:"text", regex:"<(?=s*style)", next:"css"}, {token:"text", regex:"<\\/?", next:"tag"}, {token:"text", regex:"\\s+"}, {token:"text", regex:"[^<]+"}], script:[{token:"text", regex:">", next:"js-start"}, {token:"keyword", regex:"[-_a-zA-Z0-9:]+"}, {token:"text", regex:"\\s+"},
{token:"string", regex:'".*?"'}, {token:"string", regex:"'.*?'"}], css:[{token:"text", regex:">", next:"css-start"}, {token:"keyword", regex:"[-_a-zA-Z0-9:]+"}, {token:"text", regex:"\\s+"}, {token:"string", regex:'".*?"'}, {token:"string", regex:"'.*?'"}], tag:[{token:"text", regex:">", next:"start"}, {token:"keyword", regex:"[-_a-zA-Z0-9:]+"}, {token:"text", regex:"\\s+"}, {token:"string", regex:'".*?"'}, {token:"string", regex:"'.*?'"}], cdata:[{token:"text", regex:"\\]\\]>", next:"start"},
{token:"text", regex:"\\s+"}, {token:"text", regex:".+"}], comment:[{token:"comment", regex:".*?--\>", next:"start"}, {token:"comment", regex:".+"}]};
- this.addRules((new e).getRules(), "js-");
+ this.addRules((new f).getRules(), "js-");
this.$rules["js-start"].unshift({token:"comment", regex:"\\/\\/.*(?=<\\/script>)", next:"tag"}, {token:"text", regex:"<\\/(?=script)", next:"tag"});
- this.addRules((new d).getRules(), "css-");
+ this.addRules((new e).getRules(), "css-");
this.$rules["css-start"].unshift({token:"text", regex:"<\\/(?=style)", next:"tag"})
};
- c.inherits(b, a);
- return b
+ d.inherits(b, a);
+ c.HtmlHighlightRules = b
});
\ No newline at end of file
diff --git a/build/ace/mode/javascript.js b/build/ace/mode/javascript.js
index 0217d3fc..1ef160ff 100644
--- a/build/ace/mode/javascript.js
+++ b/build/ace/mode/javascript.js
@@ -1,61 +1,59 @@
-define(function(f) {
- var h = f("../lib/oop"), i = f("./text"), j = f("../tokenizer"), k = f("./javascript_highlight_rules"), l = f("./matching_brace_outdent"), m = f("../range");
+define(function(f, h) {
+ var i = f("pilot/oop"), j = f("ace/mode/text").Mode, k = f("ace/tokenizer").Tokenizer, l = f("ace/mode/javascript_highlight_rules").JavaScriptHighlightRules, m = f("ace/mode/matching_brace_outdent").MatchingBraceOutdent, n = f("ace/range").Range;
f = function() {
- this.$tokenizer = new j((new k).getRules());
- this.$outdent = new l
+ this.$tokenizer = new k((new l).getRules());
+ this.$outdent = new m
};
- h.inherits(f, i);
+ i.inherits(f, j);
(function() {
- this.toggleCommentLines = function(c, d, e) {
- var a = true;
+ this.toggleCommentLines = function(c, a, d, g) {
+ var e = true;
c = /^(\s*)\/\//;
- for(var b = e.start.row;b <= e.end.row;b++) {
- if(!c.test(d.getLine(b))) {
- a = false;
+ for(var b = d;b <= g;b++) {
+ if(!c.test(a.getLine(b))) {
+ e = false;
break
}
- }if(a) {
- a = new m(0, 0, 0, 0);
- for(b = e.start.row;b <= e.end.row;b++) {
- var g = d.getLine(b).replace(c, "$1");
- a.start.row = b;
- a.end.row = b;
- a.end.column = g.length + 2;
- d.replace(a, g)
+ }if(e) {
+ e = new n(0, 0, 0, 0);
+ for(b = d;b <= g;b++) {
+ d = a.getLine(b).replace(c, "$1");
+ e.start.row = b;
+ e.end.row = b;
+ e.end.column = d.length + 2;
+ a.replace(e, d)
}return-2
}else {
- return d.indentRows(e, "//")
+ return a.indentRows(d, g, "//")
}
};
- this.getNextLineIndent = function(c, d, e) {
- var a = this.$getIndent(d), b = this.$tokenizer.getLineTokens(d, c), g = b.tokens;
- b = b.state;
- if(g.length && g[g.length - 1].type == "comment") {
- return a
+ this.getNextLineIndent = function(c, a, d) {
+ var g = this.$getIndent(a), e = this.$tokenizer.getLineTokens(a, c), b = e.tokens;
+ e = e.state;
+ if(b.length && b[b.length - 1].type == "comment") {
+ return g
}if(c == "start") {
- if(c = d.match(/^.*[\{\(\[]\s*$/)) {
- a += e
+ if(c = a.match(/^.*[\{\(\[]\s*$/)) {
+ g += d
}
}else {
if(c == "doc-start") {
- if(b == "start") {
+ if(e == "start") {
return""
- }if(c = d.match(/^\s*(\/?)\*/)) {
+ }if(c = a.match(/^\s*(\/?)\*/)) {
if(c[1]) {
- a += " "
- }a += "* "
- }if(c[1]) {
- a += " "
- }a += "* "
+ g += " "
+ }g += "* "
+ }
}
- }return a
+ }return g
};
- this.checkOutdent = function(c, d, e) {
- return this.$outdent.checkOutdent(d, e)
+ this.checkOutdent = function(c, a, d) {
+ return this.$outdent.checkOutdent(a, d)
};
- this.autoOutdent = function(c, d, e) {
- return this.$outdent.autoOutdent(d, e)
+ this.autoOutdent = function(c, a, d) {
+ return this.$outdent.autoOutdent(a, d)
}
}).call(f.prototype);
- return f
+ h.Mode = f
});
\ No newline at end of file
diff --git a/build/ace/mode/javascript_highlight_rules.js b/build/ace/mode/javascript_highlight_rules.js
index dbc502e7..b44c427c 100644
--- a/build/ace/mode/javascript_highlight_rules.js
+++ b/build/ace/mode/javascript_highlight_rules.js
@@ -1,16 +1,16 @@
-define(function(a) {
- var e = a("../lib/oop"), c = a("../lib/lang"), f = a("./doc_comment_highlight_rules");
- a = a("./text_highlight_rules");
+define(function(a, e) {
+ var f = a("pilot/oop"), c = a("pilot/lang"), g = a("ace/mode/doc_comment_highlight_rules").DocCommentHighlightRules;
+ a = a("ace/mode/text_highlight_rules").TextHighlightRules;
JavaScriptHighlightRules = function() {
- var d = new f, g = c.arrayToMap("break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|var|while|with".split("|")), h = c.arrayToMap("true|false|null|undefined|Infinity|NaN|undefined".split("|")), i = c.arrayToMap("class|enum|extends|super|const|export|import|implements|let|private|public|yield|interface|package|protected|static".split("|"));
+ var d = new g, h = c.arrayToMap("break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|var|while|with".split("|")), i = c.arrayToMap("null|Infinity|NaN|undefined".split("|")), j = c.arrayToMap("class|enum|extends|super|const|export|import|implements|let|private|public|yield|interface|package|protected|static".split("|"));
this.$rules = {start:[{token:"comment", regex:"\\/\\/.*$"}, d.getStartRule("doc-start"), {token:"comment", regex:"\\/\\*", next:"comment"}, {token:"string.regexp", regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/][gimy]*\\s*(?=[).,;]|$)"}, {token:"string", regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'}, {token:"string", regex:'["].*\\\\$', next:"qqstring"}, {token:"string", regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"}, {token:"string", regex:"['].*\\\\$", next:"qstring"}, {token:"constant.numeric",
- regex:"0[xX][0-9a-fA-F]+\\b"}, {token:"constant.numeric", regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"}, {token:function(b) {
- return b == "this" ? "variable.language" : g[b] ? "keyword" : h[b] ? "constant.language" : i[b] ? "invalid.illegal" : b == "debugger" ? "invalid.deprecated" : "identifier"
- }, regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}, {token:"keyword.operator", regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(in|instanceof|new|delete|typeof|void)"}, {token:"lparen", regex:"[\\[\\(\\{]"}, {token:"rparen", regex:"[\\]\\)\\}]"}, {token:"text", regex:"\\s+"}], comment:[{token:"comment", regex:".*?\\*\\/", next:"start"}, {token:"comment", regex:".+"}], qqstring:[{token:"string", regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
+ regex:"0[xX][0-9a-fA-F]+\\b"}, {token:"constant.numeric", regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"}, {token:"constant.language.boolean", regex:"(?:true|false)\\b"}, {token:function(b) {
+ return b == "this" ? "variable.language" : h[b] ? "keyword" : i[b] ? "constant.language" : j[b] ? "invalid.illegal" : b == "debugger" ? "invalid.deprecated" : "identifier"
+ }, regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}, {token:"keyword.operator", regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"}, {token:"lparen", regex:"[[({]"}, {token:"rparen", regex:"[\\])}]"}, {token:"text", regex:"\\s+"}], comment:[{token:"comment", regex:".*?\\*\\/", next:"start"}, {token:"comment", regex:".+"}], qqstring:[{token:"string", regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
next:"start"}, {token:"string", regex:".+"}], qstring:[{token:"string", regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'", next:"start"}, {token:"string", regex:".+"}]};
this.addRules(d.getRules(), "doc-");
this.$rules["doc-start"][0].next = "start"
};
- e.inherits(JavaScriptHighlightRules, a);
- return JavaScriptHighlightRules
+ f.inherits(JavaScriptHighlightRules, a);
+ e.JavaScriptHighlightRules = JavaScriptHighlightRules
});
\ No newline at end of file
diff --git a/build/ace/mode/matching_brace_outdent.js b/build/ace/mode/matching_brace_outdent.js
index d6a9d5b4..e66aecb7 100644
--- a/build/ace/mode/matching_brace_outdent.js
+++ b/build/ace/mode/matching_brace_outdent.js
@@ -1,5 +1,5 @@
-define(function(e) {
- var f = e("../range");
+define(function(e, f) {
+ var g = e("ace/range").Range;
e = function() {
};
(function() {
@@ -17,7 +17,7 @@ define(function(e) {
if(!d || d.row == b) {
return 0
}d = this.$getIndent(a.getLine(d.row));
- a.replace(new f(b, 0, b, c - 1), d);
+ a.replace(new g(b, 0, b, c - 1), d);
return d.length - (c - 1)
};
this.$getIndent = function(a) {
@@ -26,5 +26,5 @@ define(function(e) {
}return""
}
}).call(e.prototype);
- return e
+ f.MatchingBraceOutdent = e
});
\ No newline at end of file
diff --git a/build/ace/mode/php.js b/build/ace/mode/php.js
new file mode 100644
index 00000000..a4ce06e6
--- /dev/null
+++ b/build/ace/mode/php.js
@@ -0,0 +1,48 @@
+define(function(d, h) {
+ var i = d("pilot/oop"), j = d("./text").Mode, k = d("../tokenizer").Tokenizer, l = d("./php_highlight_rules").PhpHighlightRules, m = d("./matching_brace_outdent").MatchingBraceOutdent, n = d("../range").Range;
+ d = function() {
+ this.$tokenizer = new k((new l).getRules());
+ this.$outdent = new m
+ };
+ i.inherits(d, j);
+ (function() {
+ this.toggleCommentLines = function(f, a, b, g) {
+ var c = true;
+ f = /^(\s*)#/;
+ for(var e = b;e <= g;e++) {
+ if(!f.test(a.getLine(e))) {
+ c = false;
+ break
+ }
+ }if(c) {
+ c = new n(0, 0, 0, 0);
+ for(e = b;e <= g;e++) {
+ b = a.getLine(e).replace(f, "$1");
+ c.start.row = e;
+ c.end.row = e;
+ c.end.column = b.length + 2;
+ a.replace(c, b)
+ }return-2
+ }else {
+ return a.indentRows(b, g, "#")
+ }
+ };
+ this.getNextLineIndent = function(f, a, b) {
+ var g = this.$getIndent(a), c = this.$tokenizer.getLineTokens(a, f).tokens;
+ if(c.length && c[c.length - 1].type == "comment") {
+ return g
+ }if(f == "start") {
+ if(a.match(/^.*[\{\(\[\:]\s*$/)) {
+ g += b
+ }
+ }return g
+ };
+ this.checkOutdent = function(f, a, b) {
+ return this.$outdent.checkOutdent(a, b)
+ };
+ this.autoOutdent = function(f, a, b) {
+ return this.$outdent.autoOutdent(a, b)
+ }
+ }).call(d.prototype);
+ h.Mode = d
+});
\ No newline at end of file
diff --git a/build/ace/mode/php_highlight_rules.js b/build/ace/mode/php_highlight_rules.js
new file mode 100644
index 00000000..b5cdf02a
--- /dev/null
+++ b/build/ace/mode/php_highlight_rules.js
@@ -0,0 +1,46 @@
+define(function(b, e) {
+ var f = b("pilot/oop"), c = b("pilot/lang"), g = b("ace/mode/doc_comment_highlight_rules").DocCommentHighlightRules;
+ b = b("ace/mode/text_highlight_rules").TextHighlightRules;
+ PhpHighlightRules = function() {
+ var d = new g, h = c.arrayToMap("abs|acos|acosh|addcslashes|addslashes|aggregate|aggregate_info|aggregate_methods|aggregate_methods_by_list|aggregate_methods_by_regexp|aggregate_properties|aggregate_properties_by_list|aggregate_properties_by_regexp|aggregation_info|apache_child_terminate|apache_get_modules|apache_get_version|apache_getenv|apache_lookup_uri|apache_note|apache_request_headers|apache_response_headers|apache_setenv|array|array_change_key_case|array_chunk|array_combine|array_count_values|array_diff|array_diff_assoc|array_diff_uassoc|array_fill|array_filter|array_flip|array_intersect|array_intersect_assoc|array_key_exists|array_keys|array_map|array_merge|array_merge_recursive|array_multisort|array_pad|array_pop|array_push|array_rand|array_reduce|array_reverse|array_search|array_shift|array_slice|array_splice|array_sum|array_udiff|array_udiff_assoc|array_udiff_uassoc|array_unique|array_unshift|array_values|array_walk|arsort|ascii2ebcdic|asin|asinh|asort|aspell_check|aspell_check_raw|aspell_new|aspell_suggest|assert|assert_options|atan|atan2|atanh|base64_decode|base64_encode|base_convert|basename|bcadd|bccomp|bcdiv|bcmod|bcmul|bcpow|bcpowmod|bcscale|bcsqrt|bcsub|bin2hex|bind_textdomain_codeset|bindec|bindtextdomain|bzclose|bzcompress|bzdecompress|bzerrno|bzerror|bzerrstr|bzflush|bzopen|bzread|bzwrite|cal_days_in_month|cal_from_jd|cal_info|cal_to_jd|call_user_func|call_user_func_array|call_user_method|call_user_method_array|ccvs_add|ccvs_auth|ccvs_command|ccvs_count|ccvs_delete|ccvs_done|ccvs_init|ccvs_lookup|ccvs_new|ccvs_report|ccvs_return|ccvs_reverse|ccvs_sale|ccvs_status|ccvs_textvalue|ccvs_void|ceil|chdir|checkdate|checkdnsrr|chgrp|chmod|chop|chown|chr|chroot|chunk_split|class_exists|clearstatcache|closedir|closelog|com|com_addref|com_get|com_invoke|com_isenum|com_load|com_load_typelib|com_propget|com_propput|com_propset|com_release|com_set|compact|connection_aborted|connection_status|connection_timeout|constant|convert_cyr_string|copy|cos|cosh|count|count_chars|cpdf_add_annotation|cpdf_add_outline|cpdf_arc|cpdf_begin_text|cpdf_circle|cpdf_clip|cpdf_close|cpdf_closepath|cpdf_closepath_fill_stroke|cpdf_closepath_stroke|cpdf_continue_text|cpdf_curveto|cpdf_end_text|cpdf_fill|cpdf_fill_stroke|cpdf_finalize|cpdf_finalize_page|cpdf_global_set_document_limits|cpdf_import_jpeg|cpdf_lineto|cpdf_moveto|cpdf_newpath|cpdf_open|cpdf_output_buffer|cpdf_page_init|cpdf_place_inline_image|cpdf_rect|cpdf_restore|cpdf_rlineto|cpdf_rmoveto|cpdf_rotate|cpdf_rotate_text|cpdf_save|cpdf_save_to_file|cpdf_scale|cpdf_set_action_url|cpdf_set_char_spacing|cpdf_set_creator|cpdf_set_current_page|cpdf_set_font|cpdf_set_font_directories|cpdf_set_font_map_file|cpdf_set_horiz_scaling|cpdf_set_keywords|cpdf_set_leading|cpdf_set_page_animation|cpdf_set_subject|cpdf_set_text_matrix|cpdf_set_text_pos|cpdf_set_text_rendering|cpdf_set_text_rise|cpdf_set_title|cpdf_set_viewer_preferences|cpdf_set_word_spacing|cpdf_setdash|cpdf_setflat|cpdf_setgray|cpdf_setgray_fill|cpdf_setgray_stroke|cpdf_setlinecap|cpdf_setlinejoin|cpdf_setlinewidth|cpdf_setmiterlimit|cpdf_setrgbcolor|cpdf_setrgbcolor_fill|cpdf_setrgbcolor_stroke|cpdf_show|cpdf_show_xy|cpdf_stringwidth|cpdf_stroke|cpdf_text|cpdf_translate|crack_check|crack_closedict|crack_getlastmessage|crack_opendict|crc32|create_function|crypt|ctype_alnum|ctype_alpha|ctype_cntrl|ctype_digit|ctype_graph|ctype_lower|ctype_print|ctype_punct|ctype_space|ctype_upper|ctype_xdigit|curl_close|curl_errno|curl_error|curl_exec|curl_getinfo|curl_init|curl_multi_add_handle|curl_multi_close|curl_multi_exec|curl_multi_getcontent|curl_multi_info_read|curl_multi_init|curl_multi_remove_handle|curl_multi_select|curl_setopt|curl_version|current|cybercash_base64_decode|cybercash_base64_encode|cybercash_decr|cybercash_encr|cyrus_authenticate|cyrus_bind|cyrus_close|cyrus_connect|cyrus_query|cyrus_unbind|date|dba_close|dba_delete|dba_exists|dba_fetch|dba_firstkey|dba_handlers|dba_insert|dba_key_split|dba_list|dba_nextkey|dba_open|dba_optimize|dba_popen|dba_replace|dba_sync|dbase_add_record|dbase_close|dbase_create|dbase_delete_record|dbase_get_header_info|dbase_get_record|dbase_get_record_with_names|dbase_numfields|dbase_numrecords|dbase_open|dbase_pack|dbase_replace_record|dblist|dbmclose|dbmdelete|dbmexists|dbmfetch|dbmfirstkey|dbminsert|dbmnextkey|dbmopen|dbmreplace|dbplus_add|dbplus_aql|dbplus_chdir|dbplus_close|dbplus_curr|dbplus_errcode|dbplus_errno|dbplus_find|dbplus_first|dbplus_flush|dbplus_freealllocks|dbplus_freelock|dbplus_freerlocks|dbplus_getlock|dbplus_getunique|dbplus_info|dbplus_last|dbplus_lockrel|dbplus_next|dbplus_open|dbplus_prev|dbplus_rchperm|dbplus_rcreate|dbplus_rcrtexact|dbplus_rcrtlike|dbplus_resolve|dbplus_restorepos|dbplus_rkeys|dbplus_ropen|dbplus_rquery|dbplus_rrename|dbplus_rsecindex|dbplus_runlink|dbplus_rzap|dbplus_savepos|dbplus_setindex|dbplus_setindexbynumber|dbplus_sql|dbplus_tcl|dbplus_tremove|dbplus_undo|dbplus_undoprepare|dbplus_unlockrel|dbplus_unselect|dbplus_update|dbplus_xlockrel|dbplus_xunlockrel|dbx_close|dbx_compare|dbx_connect|dbx_error|dbx_escape_string|dbx_fetch_row|dbx_query|dbx_sort|dcgettext|dcngettext|deaggregate|debug_backtrace|debug_print_backtrace|debugger_off|debugger_on|decbin|dechex|decoct|define|define_syslog_variables|defined|deg2rad|delete|dgettext|die|dio_close|dio_fcntl|dio_open|dio_read|dio_seek|dio_stat|dio_tcsetattr|dio_truncate|dio_write|dir|dirname|disk_free_space|disk_total_space|diskfreespace|dl|dngettext|dns_check_record|dns_get_mx|dns_get_record|domxml_new_doc|domxml_open_file|domxml_open_mem|domxml_version|domxml_xmltree|domxml_xslt_stylesheet|domxml_xslt_stylesheet_doc|domxml_xslt_stylesheet_file|dotnet_load|doubleval|each|easter_date|easter_days|ebcdic2ascii|echo|empty|end|ereg|ereg_replace|eregi|eregi_replace|error_log|error_reporting|escapeshellarg|escapeshellcmd|eval|exec|exif_imagetype|exif_read_data|exif_thumbnail|exit|exp|explode|expm1|extension_loaded|extract|ezmlm_hash|fam_cancel_monitor|fam_close|fam_monitor_collection|fam_monitor_directory|fam_monitor_file|fam_next_event|fam_open|fam_pending|fam_resume_monitor|fam_suspend_monitor|fbsql_affected_rows|fbsql_autocommit|fbsql_blob_size|fbsql_change_user|fbsql_clob_size|fbsql_close|fbsql_commit|fbsql_connect|fbsql_create_blob|fbsql_create_clob|fbsql_create_db|fbsql_data_seek|fbsql_database|fbsql_database_password|fbsql_db_query|fbsql_db_status|fbsql_drop_db|fbsql_errno|fbsql_error|fbsql_fetch_array|fbsql_fetch_assoc|fbsql_fetch_field|fbsql_fetch_lengths|fbsql_fetch_object|fbsql_fetch_row|fbsql_field_flags|fbsql_field_len|fbsql_field_name|fbsql_field_seek|fbsql_field_table|fbsql_field_type|fbsql_free_result|fbsql_get_autostart_info|fbsql_hostname|fbsql_insert_id|fbsql_list_dbs|fbsql_list_fields|fbsql_list_tables|fbsql_next_result|fbsql_num_fields|fbsql_num_rows|fbsql_password|fbsql_pconnect|fbsql_query|fbsql_read_blob|fbsql_read_clob|fbsql_result|fbsql_rollback|fbsql_select_db|fbsql_set_lob_mode|fbsql_set_password|fbsql_set_transaction|fbsql_start_db|fbsql_stop_db|fbsql_tablename|fbsql_username|fbsql_warnings|fclose|fdf_add_doc_javascript|fdf_add_template|fdf_close|fdf_create|fdf_enum_values|fdf_errno|fdf_error|fdf_get_ap|fdf_get_attachment|fdf_get_encoding|fdf_get_file|fdf_get_flags|fdf_get_opt|fdf_get_status|fdf_get_value|fdf_get_version|fdf_header|fdf_next_field_name|fdf_open|fdf_open_string|fdf_remove_item|fdf_save|fdf_save_string|fdf_set_ap|fdf_set_encoding|fdf_set_file|fdf_set_flags|fdf_set_javascript_action|fdf_set_opt|fdf_set_status|fdf_set_submit_form_action|fdf_set_target_frame|fdf_set_value|fdf_set_version|feof|fflush|fgetc|fgetcsv|fgets|fgetss|file|file_exists|file_get_contents|file_put_contents|fileatime|filectime|filegroup|fileinode|filemtime|fileowner|fileperms|filepro|filepro_fieldcount|filepro_fieldname|filepro_fieldtype|filepro_fieldwidth|filepro_retrieve|filepro_rowcount|filesize|filetype|floatval|flock|floor|flush|fmod|fnmatch|fopen|fpassthru|fprintf|fputs|fread|frenchtojd|fribidi_log2vis|fscanf|fseek|fsockopen|fstat|ftell|ftok|ftp_alloc|ftp_cdup|ftp_chdir|ftp_chmod|ftp_close|ftp_connect|ftp_delete|ftp_exec|ftp_fget|ftp_fput|ftp_get|ftp_get_option|ftp_login|ftp_mdtm|ftp_mkdir|ftp_nb_continue|ftp_nb_fget|ftp_nb_fput|ftp_nb_get|ftp_nb_put|ftp_nlist|ftp_pasv|ftp_put|ftp_pwd|ftp_quit|ftp_raw|ftp_rawlist|ftp_rename|ftp_rmdir|ftp_set_option|ftp_site|ftp_size|ftp_ssl_connect|ftp_systype|ftruncate|func_get_arg|func_get_args|func_num_args|function_exists|fwrite|gd_info|get_browser|get_cfg_var|get_class|get_class_methods|get_class_vars|get_current_user|get_declared_classes|get_declared_interfaces|get_defined_constants|get_defined_functions|get_defined_vars|get_extension_funcs|get_headers|get_html_translation_table|get_include_path|get_included_files|get_loaded_extensions|get_magic_quotes_gpc|get_magic_quotes_runtime|get_meta_tags|get_object_vars|get_parent_class|get_required_files|get_resource_type|getallheaders|getcwd|getdate|getenv|gethostbyaddr|gethostbyname|gethostbynamel|getimagesize|getlastmod|getmxrr|getmygid|getmyinode|getmypid|getmyuid|getopt|getprotobyname|getprotobynumber|getrandmax|getrusage|getservbyname|getservbyport|gettext|gettimeofday|gettype|glob|gmdate|gmmktime|gmp_abs|gmp_add|gmp_and|gmp_clrbit|gmp_cmp|gmp_com|gmp_div|gmp_div_q|gmp_div_qr|gmp_div_r|gmp_divexact|gmp_fact|gmp_gcd|gmp_gcdext|gmp_hamdist|gmp_init|gmp_intval|gmp_invert|gmp_jacobi|gmp_legendre|gmp_mod|gmp_mul|gmp_neg|gmp_or|gmp_perfect_square|gmp_popcount|gmp_pow|gmp_powm|gmp_prob_prime|gmp_random|gmp_scan0|gmp_scan1|gmp_setbit|gmp_sign|gmp_sqrt|gmp_sqrtrem|gmp_strval|gmp_sub|gmp_xor|gmstrftime|gregoriantojd|gzclose|gzcompress|gzdeflate|gzencode|gzeof|gzfile|gzgetc|gzgets|gzgetss|gzinflate|gzopen|gzpassthru|gzputs|gzread|gzrewind|gzseek|gztell|gzuncompress|gzwrite|header|headers_list|headers_sent|hebrev|hebrevc|hexdec|highlight_file|highlight_string|html_entity_decode|htmlentities|htmlspecialchars|http_build_query|hw_api_attribute|hw_api_content|hw_api_object|hw_array2objrec|hw_changeobject|hw_children|hw_childrenobj|hw_close|hw_connect|hw_connection_info|hw_cp|hw_deleteobject|hw_docbyanchor|hw_docbyanchorobj|hw_document_attributes|hw_document_bodytag|hw_document_content|hw_document_setcontent|hw_document_size|hw_dummy|hw_edittext|hw_error|hw_errormsg|hw_free_document|hw_getanchors|hw_getanchorsobj|hw_getandlock|hw_getchildcoll|hw_getchildcollobj|hw_getchilddoccoll|hw_getchilddoccollobj|hw_getobject|hw_getobjectbyquery|hw_getobjectbyquerycoll|hw_getobjectbyquerycollobj|hw_getobjectbyqueryobj|hw_getparents|hw_getparentsobj|hw_getrellink|hw_getremote|hw_getremotechildren|hw_getsrcbydestobj|hw_gettext|hw_getusername|hw_identify|hw_incollections|hw_info|hw_inscoll|hw_insdoc|hw_insertanchors|hw_insertdocument|hw_insertobject|hw_mapid|hw_modifyobject|hw_mv|hw_new_document|hw_objrec2array|hw_output_document|hw_pconnect|hw_pipedocument|hw_root|hw_setlinkroot|hw_stat|hw_unlock|hw_who|hwapi_hgcsp|hypot|ibase_add_user|ibase_affected_rows|ibase_backup|ibase_blob_add|ibase_blob_cancel|ibase_blob_close|ibase_blob_create|ibase_blob_echo|ibase_blob_get|ibase_blob_import|ibase_blob_info|ibase_blob_open|ibase_close|ibase_commit|ibase_commit_ret|ibase_connect|ibase_db_info|ibase_delete_user|ibase_drop_db|ibase_errcode|ibase_errmsg|ibase_execute|ibase_fetch_assoc|ibase_fetch_object|ibase_fetch_row|ibase_field_info|ibase_free_event_handler|ibase_free_query|ibase_free_result|ibase_gen_id|ibase_maintain_db|ibase_modify_user|ibase_name_result|ibase_num_fields|ibase_num_params|ibase_param_info|ibase_pconnect|ibase_prepare|ibase_query|ibase_restore|ibase_rollback|ibase_rollback_ret|ibase_server_info|ibase_service_attach|ibase_service_detach|ibase_set_event_handler|ibase_timefmt|ibase_trans|ibase_wait_event|iconv|iconv_get_encoding|iconv_mime_decode|iconv_mime_decode_headers|iconv_mime_encode|iconv_set_encoding|iconv_strlen|iconv_strpos|iconv_strrpos|iconv_substr|idate|ifx_affected_rows|ifx_blobinfile_mode|ifx_byteasvarchar|ifx_close|ifx_connect|ifx_copy_blob|ifx_create_blob|ifx_create_char|ifx_do|ifx_error|ifx_errormsg|ifx_fetch_row|ifx_fieldproperties|ifx_fieldtypes|ifx_free_blob|ifx_free_char|ifx_free_result|ifx_get_blob|ifx_get_char|ifx_getsqlca|ifx_htmltbl_result|ifx_nullformat|ifx_num_fields|ifx_num_rows|ifx_pconnect|ifx_prepare|ifx_query|ifx_textasvarchar|ifx_update_blob|ifx_update_char|ifxus_close_slob|ifxus_create_slob|ifxus_free_slob|ifxus_open_slob|ifxus_read_slob|ifxus_seek_slob|ifxus_tell_slob|ifxus_write_slob|ignore_user_abort|image2wbmp|image_type_to_mime_type|imagealphablending|imageantialias|imagearc|imagechar|imagecharup|imagecolorallocate|imagecolorallocatealpha|imagecolorat|imagecolorclosest|imagecolorclosestalpha|imagecolorclosesthwb|imagecolordeallocate|imagecolorexact|imagecolorexactalpha|imagecolormatch|imagecolorresolve|imagecolorresolvealpha|imagecolorset|imagecolorsforindex|imagecolorstotal|imagecolortransparent|imagecopy|imagecopymerge|imagecopymergegray|imagecopyresampled|imagecopyresized|imagecreate|imagecreatefromgd|imagecreatefromgd2|imagecreatefromgd2part|imagecreatefromgif|imagecreatefromjpeg|imagecreatefrompng|imagecreatefromstring|imagecreatefromwbmp|imagecreatefromxbm|imagecreatefromxpm|imagecreatetruecolor|imagedashedline|imagedestroy|imageellipse|imagefill|imagefilledarc|imagefilledellipse|imagefilledpolygon|imagefilledrectangle|imagefilltoborder|imagefilter|imagefontheight|imagefontwidth|imageftbbox|imagefttext|imagegammacorrect|imagegd|imagegd2|imagegif|imageinterlace|imageistruecolor|imagejpeg|imagelayereffect|imageline|imageloadfont|imagepalettecopy|imagepng|imagepolygon|imagepsbbox|imagepscopyfont|imagepsencodefont|imagepsextendfont|imagepsfreefont|imagepsloadfont|imagepsslantfont|imagepstext|imagerectangle|imagerotate|imagesavealpha|imagesetbrush|imagesetpixel|imagesetstyle|imagesetthickness|imagesettile|imagestring|imagestringup|imagesx|imagesy|imagetruecolortopalette|imagettfbbox|imagettftext|imagetypes|imagewbmp|imagexbm|imap_8bit|imap_alerts|imap_append|imap_base64|imap_binary|imap_body|imap_bodystruct|imap_check|imap_clearflag_full|imap_close|imap_createmailbox|imap_delete|imap_deletemailbox|imap_errors|imap_expunge|imap_fetch_overview|imap_fetchbody|imap_fetchheader|imap_fetchstructure|imap_get_quota|imap_get_quotaroot|imap_getacl|imap_getmailboxes|imap_getsubscribed|imap_header|imap_headerinfo|imap_headers|imap_last_error|imap_list|imap_listmailbox|imap_listscan|imap_listsubscribed|imap_lsub|imap_mail|imap_mail_compose|imap_mail_copy|imap_mail_move|imap_mailboxmsginfo|imap_mime_header_decode|imap_msgno|imap_num_msg|imap_num_recent|imap_open|imap_ping|imap_qprint|imap_renamemailbox|imap_reopen|imap_rfc822_parse_adrlist|imap_rfc822_parse_headers|imap_rfc822_write_address|imap_scanmailbox|imap_search|imap_set_quota|imap_setacl|imap_setflag_full|imap_sort|imap_status|imap_subscribe|imap_thread|imap_timeout|imap_uid|imap_undelete|imap_unsubscribe|imap_utf7_decode|imap_utf7_encode|imap_utf8|implode|import_request_variables|in_array|ingres_autocommit|ingres_close|ingres_commit|ingres_connect|ingres_fetch_array|ingres_fetch_object|ingres_fetch_row|ingres_field_length|ingres_field_name|ingres_field_nullable|ingres_field_precision|ingres_field_scale|ingres_field_type|ingres_num_fields|ingres_num_rows|ingres_pconnect|ingres_query|ingres_rollback|ini_alter|ini_get|ini_get_all|ini_restore|ini_set|intval|ip2long|iptcembed|iptcparse|ircg_channel_mode|ircg_disconnect|ircg_fetch_error_msg|ircg_get_username|ircg_html_encode|ircg_ignore_add|ircg_ignore_del|ircg_invite|ircg_is_conn_alive|ircg_join|ircg_kick|ircg_list|ircg_lookup_format_messages|ircg_lusers|ircg_msg|ircg_nick|ircg_nickname_escape|ircg_nickname_unescape|ircg_notice|ircg_oper|ircg_part|ircg_pconnect|ircg_register_format_messages|ircg_set_current|ircg_set_file|ircg_set_on_die|ircg_topic|ircg_who|ircg_whois|is_a|is_array|is_bool|is_callable|is_dir|is_double|is_executable|is_file|is_finite|is_float|is_infinite|is_int|is_integer|is_link|is_long|is_nan|is_null|is_numeric|is_object|is_readable|is_real|is_resource|is_scalar|is_soap_fault|is_string|is_subclass_of|is_uploaded_file|is_writable|is_writeable|isset|java_last_exception_clear|java_last_exception_get|jddayofweek|jdmonthname|jdtofrench|jdtogregorian|jdtojewish|jdtojulian|jdtounix|jewishtojd|join|jpeg2wbmp|juliantojd|key|krsort|ksort|lcg_value|ldap_8859_to_t61|ldap_add|ldap_bind|ldap_close|ldap_compare|ldap_connect|ldap_count_entries|ldap_delete|ldap_dn2ufn|ldap_err2str|ldap_errno|ldap_error|ldap_explode_dn|ldap_first_attribute|ldap_first_entry|ldap_first_reference|ldap_free_result|ldap_get_attributes|ldap_get_dn|ldap_get_entries|ldap_get_option|ldap_get_values|ldap_get_values_len|ldap_list|ldap_mod_add|ldap_mod_del|ldap_mod_replace|ldap_modify|ldap_next_attribute|ldap_next_entry|ldap_next_reference|ldap_parse_reference|ldap_parse_result|ldap_read|ldap_rename|ldap_search|ldap_set_option|ldap_set_rebind_proc|ldap_sort|ldap_start_tls|ldap_t61_to_8859|ldap_unbind|levenshtein|link|linkinfo|list|localeconv|localtime|log|log10|log1p|long2ip|lstat|ltrim|lzf_compress|lzf_decompress|lzf_optimized_for|mail|mailparse_determine_best_xfer_encoding|mailparse_msg_create|mailparse_msg_extract_part|mailparse_msg_extract_part_file|mailparse_msg_free|mailparse_msg_get_part|mailparse_msg_get_part_data|mailparse_msg_get_structure|mailparse_msg_parse|mailparse_msg_parse_file|mailparse_rfc822_parse_addresses|mailparse_stream_encode|mailparse_uudecode_all|main|max|mb_convert_case|mb_convert_encoding|mb_convert_kana|mb_convert_variables|mb_decode_mimeheader|mb_decode_numericentity|mb_detect_encoding|mb_detect_order|mb_encode_mimeheader|mb_encode_numericentity|mb_ereg|mb_ereg_match|mb_ereg_replace|mb_ereg_search|mb_ereg_search_getpos|mb_ereg_search_getregs|mb_ereg_search_init|mb_ereg_search_pos|mb_ereg_search_regs|mb_ereg_search_setpos|mb_eregi|mb_eregi_replace|mb_get_info|mb_http_input|mb_http_output|mb_internal_encoding|mb_language|mb_output_handler|mb_parse_str|mb_preferred_mime_name|mb_regex_encoding|mb_regex_set_options|mb_send_mail|mb_split|mb_strcut|mb_strimwidth|mb_strlen|mb_strpos|mb_strrpos|mb_strtolower|mb_strtoupper|mb_strwidth|mb_substitute_character|mb_substr|mb_substr_count|mcal_append_event|mcal_close|mcal_create_calendar|mcal_date_compare|mcal_date_valid|mcal_day_of_week|mcal_day_of_year|mcal_days_in_month|mcal_delete_calendar|mcal_delete_event|mcal_event_add_attribute|mcal_event_init|mcal_event_set_alarm|mcal_event_set_category|mcal_event_set_class|mcal_event_set_description|mcal_event_set_end|mcal_event_set_recur_daily|mcal_event_set_recur_monthly_mday|mcal_event_set_recur_monthly_wday|mcal_event_set_recur_none|mcal_event_set_recur_weekly|mcal_event_set_recur_yearly|mcal_event_set_start|mcal_event_set_title|mcal_expunge|mcal_fetch_current_stream_event|mcal_fetch_event|mcal_is_leap_year|mcal_list_alarms|mcal_list_events|mcal_next_recurrence|mcal_open|mcal_popen|mcal_rename_calendar|mcal_reopen|mcal_snooze|mcal_store_event|mcal_time_valid|mcal_week_of_year|mcrypt_cbc|mcrypt_cfb|mcrypt_create_iv|mcrypt_decrypt|mcrypt_ecb|mcrypt_enc_get_algorithms_name|mcrypt_enc_get_block_size|mcrypt_enc_get_iv_size|mcrypt_enc_get_key_size|mcrypt_enc_get_modes_name|mcrypt_enc_get_supported_key_sizes|mcrypt_enc_is_block_algorithm|mcrypt_enc_is_block_algorithm_mode|mcrypt_enc_is_block_mode|mcrypt_enc_self_test|mcrypt_encrypt|mcrypt_generic|mcrypt_generic_deinit|mcrypt_generic_end|mcrypt_generic_init|mcrypt_get_block_size|mcrypt_get_cipher_name|mcrypt_get_iv_size|mcrypt_get_key_size|mcrypt_list_algorithms|mcrypt_list_modes|mcrypt_module_close|mcrypt_module_get_algo_block_size|mcrypt_module_get_algo_key_size|mcrypt_module_get_supported_key_sizes|mcrypt_module_is_block_algorithm|mcrypt_module_is_block_algorithm_mode|mcrypt_module_is_block_mode|mcrypt_module_open|mcrypt_module_self_test|mcrypt_ofb|mcve_adduser|mcve_adduserarg|mcve_bt|mcve_checkstatus|mcve_chkpwd|mcve_chngpwd|mcve_completeauthorizations|mcve_connect|mcve_connectionerror|mcve_deleteresponse|mcve_deletetrans|mcve_deleteusersetup|mcve_deluser|mcve_destroyconn|mcve_destroyengine|mcve_disableuser|mcve_edituser|mcve_enableuser|mcve_force|mcve_getcell|mcve_getcellbynum|mcve_getcommadelimited|mcve_getheader|mcve_getuserarg|mcve_getuserparam|mcve_gft|mcve_gl|mcve_gut|mcve_initconn|mcve_initengine|mcve_initusersetup|mcve_iscommadelimited|mcve_liststats|mcve_listusers|mcve_maxconntimeout|mcve_monitor|mcve_numcolumns|mcve_numrows|mcve_override|mcve_parsecommadelimited|mcve_ping|mcve_preauth|mcve_preauthcompletion|mcve_qc|mcve_responseparam|mcve_return|mcve_returncode|mcve_returnstatus|mcve_sale|mcve_setblocking|mcve_setdropfile|mcve_setip|mcve_setssl|mcve_setssl_files|mcve_settimeout|mcve_settle|mcve_text_avs|mcve_text_code|mcve_text_cv|mcve_transactionauth|mcve_transactionavs|mcve_transactionbatch|mcve_transactioncv|mcve_transactionid|mcve_transactionitem|mcve_transactionssent|mcve_transactiontext|mcve_transinqueue|mcve_transnew|mcve_transparam|mcve_transsend|mcve_ub|mcve_uwait|mcve_verifyconnection|mcve_verifysslcert|mcve_void|md5|md5_file|mdecrypt_generic|memory_get_usage|metaphone|method_exists|mhash|mhash_count|mhash_get_block_size|mhash_get_hash_name|mhash_keygen_s2k|microtime|mime_content_type|min|ming_setcubicthreshold|ming_setscale|ming_useswfversion|mkdir|mktime|money_format|move_uploaded_file|msession_connect|msession_count|msession_create|msession_destroy|msession_disconnect|msession_find|msession_get|msession_get_array|msession_getdata|msession_inc|msession_list|msession_listvar|msession_lock|msession_plugin|msession_randstr|msession_set|msession_set_array|msession_setdata|msession_timeout|msession_uniq|msession_unlock|msg_get_queue|msg_receive|msg_remove_queue|msg_send|msg_set_queue|msg_stat_queue|msql|msql|msql_affected_rows|msql_close|msql_connect|msql_create_db|msql_createdb|msql_data_seek|msql_dbname|msql_drop_db|msql_error|msql_fetch_array|msql_fetch_field|msql_fetch_object|msql_fetch_row|msql_field_flags|msql_field_len|msql_field_name|msql_field_seek|msql_field_table|msql_field_type|msql_fieldflags|msql_fieldlen|msql_fieldname|msql_fieldtable|msql_fieldtype|msql_free_result|msql_list_dbs|msql_list_fields|msql_list_tables|msql_num_fields|msql_num_rows|msql_numfields|msql_numrows|msql_pconnect|msql_query|msql_regcase|msql_result|msql_select_db|msql_tablename|mssql_bind|mssql_close|mssql_connect|mssql_data_seek|mssql_execute|mssql_fetch_array|mssql_fetch_assoc|mssql_fetch_batch|mssql_fetch_field|mssql_fetch_object|mssql_fetch_row|mssql_field_length|mssql_field_name|mssql_field_seek|mssql_field_type|mssql_free_result|mssql_free_statement|mssql_get_last_message|mssql_guid_string|mssql_init|mssql_min_error_severity|mssql_min_message_severity|mssql_next_result|mssql_num_fields|mssql_num_rows|mssql_pconnect|mssql_query|mssql_result|mssql_rows_affected|mssql_select_db|mt_getrandmax|mt_rand|mt_srand|muscat_close|muscat_get|muscat_give|muscat_setup|muscat_setup_net|mysql_affected_rows|mysql_change_user|mysql_client_encoding|mysql_close|mysql_connect|mysql_create_db|mysql_data_seek|mysql_db_name|mysql_db_query|mysql_drop_db|mysql_errno|mysql_error|mysql_escape_string|mysql_fetch_array|mysql_fetch_assoc|mysql_fetch_field|mysql_fetch_lengths|mysql_fetch_object|mysql_fetch_row|mysql_field_flags|mysql_field_len|mysql_field_name|mysql_field_seek|mysql_field_table|mysql_field_type|mysql_free_result|mysql_get_client_info|mysql_get_host_info|mysql_get_proto_info|mysql_get_server_info|mysql_info|mysql_insert_id|mysql_list_dbs|mysql_list_fields|mysql_list_processes|mysql_list_tables|mysql_num_fields|mysql_num_rows|mysql_pconnect|mysql_ping|mysql_query|mysql_real_escape_string|mysql_result|mysql_select_db|mysql_stat|mysql_tablename|mysql_thread_id|mysql_unbuffered_query|mysqli_affected_rows|mysqli_autocommit|mysqli_bind_param|mysqli_bind_result|mysqli_change_user|mysqli_character_set_name|mysqli_client_encoding|mysqli_close|mysqli_commit|mysqli_connect|mysqli_connect_errno|mysqli_connect_error|mysqli_data_seek|mysqli_debug|mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_dump_debug_info|mysqli_embedded_connect|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_errno|mysqli_error|mysqli_escape_string|mysqli_execute|mysqli_fetch|mysqli_fetch_array|mysqli_fetch_assoc|mysqli_fetch_field|mysqli_fetch_field_direct|mysqli_fetch_fields|mysqli_fetch_lengths|mysqli_fetch_object|mysqli_fetch_row|mysqli_field_count|mysqli_field_seek|mysqli_field_tell|mysqli_free_result|mysqli_get_client_info|mysqli_get_client_version|mysqli_get_host_info|mysqli_get_metadata|mysqli_get_proto_info|mysqli_get_server_info|mysqli_get_server_version|mysqli_info|mysqli_init|mysqli_insert_id|mysqli_kill|mysqli_master_query|mysqli_more_results|mysqli_multi_query|mysqli_next_result|mysqli_num_fields|mysqli_num_rows|mysqli_options|mysqli_param_count|mysqli_ping|mysqli_prepare|mysqli_query|mysqli_real_connect|mysqli_real_escape_string|mysqli_real_query|mysqli_report|mysqli_rollback|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|mysqli_select_db|mysqli_send_long_data|mysqli_send_query|mysqli_server_end|mysqli_server_init|mysqli_set_opt|mysqli_sqlstate|mysqli_ssl_set|mysqli_stat|mysqli_stmt_init|mysqli_stmt_affected_rows|mysqli_stmt_bind_param|mysqli_stmt_bind_result|mysqli_stmt_close|mysqli_stmt_data_seek|mysqli_stmt_errno|mysqli_stmt_error|mysqli_stmt_execute|mysqli_stmt_fetch|mysqli_stmt_free_result|mysqli_stmt_num_rows|mysqli_stmt_param_count|mysqli_stmt_prepare|mysqli_stmt_result_metadata|mysqli_stmt_send_long_data|mysqli_stmt_sqlstate|mysqli_stmt_store_result|mysqli_store_result|mysqli_thread_id|mysqli_thread_safe|mysqli_use_result|mysqli_warning_count|natcasesort|natsort|ncurses_addch|ncurses_addchnstr|ncurses_addchstr|ncurses_addnstr|ncurses_addstr|ncurses_assume_default_colors|ncurses_attroff|ncurses_attron|ncurses_attrset|ncurses_baudrate|ncurses_beep|ncurses_bkgd|ncurses_bkgdset|ncurses_border|ncurses_bottom_panel|ncurses_can_change_color|ncurses_cbreak|ncurses_clear|ncurses_clrtobot|ncurses_clrtoeol|ncurses_color_content|ncurses_color_set|ncurses_curs_set|ncurses_def_prog_mode|ncurses_def_shell_mode|ncurses_define_key|ncurses_del_panel|ncurses_delay_output|ncurses_delch|ncurses_deleteln|ncurses_delwin|ncurses_doupdate|ncurses_echo|ncurses_echochar|ncurses_end|ncurses_erase|ncurses_erasechar|ncurses_filter|ncurses_flash|ncurses_flushinp|ncurses_getch|ncurses_getmaxyx|ncurses_getmouse|ncurses_getyx|ncurses_halfdelay|ncurses_has_colors|ncurses_has_ic|ncurses_has_il|ncurses_has_key|ncurses_hide_panel|ncurses_hline|ncurses_inch|ncurses_init|ncurses_init_color|ncurses_init_pair|ncurses_insch|ncurses_insdelln|ncurses_insertln|ncurses_insstr|ncurses_instr|ncurses_isendwin|ncurses_keyok|ncurses_keypad|ncurses_killchar|ncurses_longname|ncurses_meta|ncurses_mouse_trafo|ncurses_mouseinterval|ncurses_mousemask|ncurses_move|ncurses_move_panel|ncurses_mvaddch|ncurses_mvaddchnstr|ncurses_mvaddchstr|ncurses_mvaddnstr|ncurses_mvaddstr|ncurses_mvcur|ncurses_mvdelch|ncurses_mvgetch|ncurses_mvhline|ncurses_mvinch|ncurses_mvvline|ncurses_mvwaddstr|ncurses_napms|ncurses_new_panel|ncurses_newpad|ncurses_newwin|ncurses_nl|ncurses_nocbreak|ncurses_noecho|ncurses_nonl|ncurses_noqiflush|ncurses_noraw|ncurses_pair_content|ncurses_panel_above|ncurses_panel_below|ncurses_panel_window|ncurses_pnoutrefresh|ncurses_prefresh|ncurses_putp|ncurses_qiflush|ncurses_raw|ncurses_refresh|ncurses_replace_panel|ncurses_reset_prog_mode|ncurses_reset_shell_mode|ncurses_resetty|ncurses_savetty|ncurses_scr_dump|ncurses_scr_init|ncurses_scr_restore|ncurses_scr_set|ncurses_scrl|ncurses_show_panel|ncurses_slk_attr|ncurses_slk_attroff|ncurses_slk_attron|ncurses_slk_attrset|ncurses_slk_clear|ncurses_slk_color|ncurses_slk_init|ncurses_slk_noutrefresh|ncurses_slk_refresh|ncurses_slk_restore|ncurses_slk_set|ncurses_slk_touch|ncurses_standend|ncurses_standout|ncurses_start_color|ncurses_termattrs|ncurses_termname|ncurses_timeout|ncurses_top_panel|ncurses_typeahead|ncurses_ungetch|ncurses_ungetmouse|ncurses_update_panels|ncurses_use_default_colors|ncurses_use_env|ncurses_use_extended_names|ncurses_vidattr|ncurses_vline|ncurses_waddch|ncurses_waddstr|ncurses_wattroff|ncurses_wattron|ncurses_wattrset|ncurses_wborder|ncurses_wclear|ncurses_wcolor_set|ncurses_werase|ncurses_wgetch|ncurses_whline|ncurses_wmouse_trafo|ncurses_wmove|ncurses_wnoutrefresh|ncurses_wrefresh|ncurses_wstandend|ncurses_wstandout|ncurses_wvline|next|ngettext|nl2br|nl_langinfo|notes_body|notes_copy_db|notes_create_db|notes_create_note|notes_drop_db|notes_find_note|notes_header_info|notes_list_msgs|notes_mark_read|notes_mark_unread|notes_nav_create|notes_search|notes_unread|notes_version|nsapi_request_headers|nsapi_response_headers|nsapi_virtual|number_format|ob_clean|ob_end_clean|ob_end_flush|ob_flush|ob_get_clean|ob_get_contents|ob_get_flush|ob_get_length|ob_get_level|ob_get_status|ob_gzhandler|ob_iconv_handler|ob_implicit_flush|ob_list_handlers|ob_start|ob_tidyhandler|oci_bind_by_name|oci_cancel|oci_close|oci_commit|oci_connect|oci_define_by_name|oci_error|oci_execute|oci_fetch|oci_fetch_all|oci_fetch_array|oci_fetch_assoc|oci_fetch_object|oci_fetch_row|oci_field_is_null|oci_field_name|oci_field_precision|oci_field_scale|oci_field_size|oci_field_type|oci_field_type_raw|oci_free_statement|oci_internal_debug|oci_lob_copy|oci_lob_is_equal|oci_new_collection|oci_new_connect|oci_new_cursor|oci_new_descriptor|oci_num_fields|oci_num_rows|oci_parse|oci_password_change|oci_pconnect|oci_result|oci_rollback|oci_server_version|oci_set_prefetch|oci_statement_type|ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|ociloadlob|ocilogoff|ocilogon|ocinewcollection|ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|ocirollback|ocirowcount|ocisavelob|ocisavelobfile|ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|octdec|odbc_autocommit|odbc_binmode|odbc_close|odbc_close_all|odbc_columnprivileges|odbc_columns|odbc_commit|odbc_connect|odbc_cursor|odbc_data_source|odbc_do|odbc_error|odbc_errormsg|odbc_exec|odbc_execute|odbc_fetch_array|odbc_fetch_into|odbc_fetch_object|odbc_fetch_row|odbc_field_len|odbc_field_name|odbc_field_num|odbc_field_precision|odbc_field_scale|odbc_field_type|odbc_foreignkeys|odbc_free_result|odbc_gettypeinfo|odbc_longreadlen|odbc_next_result|odbc_num_fields|odbc_num_rows|odbc_pconnect|odbc_prepare|odbc_primarykeys|odbc_procedurecolumns|odbc_procedures|odbc_result|odbc_result_all|odbc_rollback|odbc_setoption|odbc_specialcolumns|odbc_statistics|odbc_tableprivileges|odbc_tables|opendir|openlog|openssl_csr_export|openssl_csr_export_to_file|openssl_csr_new|openssl_csr_sign|openssl_error_string|openssl_free_key|openssl_get_privatekey|openssl_get_publickey|openssl_open|openssl_pkcs7_decrypt|openssl_pkcs7_encrypt|openssl_pkcs7_sign|openssl_pkcs7_verify|openssl_pkey_export|openssl_pkey_export_to_file|openssl_pkey_get_private|openssl_pkey_get_public|openssl_pkey_new|openssl_private_decrypt|openssl_private_encrypt|openssl_public_decrypt|openssl_public_encrypt|openssl_seal|openssl_sign|openssl_verify|openssl_x509_check_private_key|openssl_x509_checkpurpose|openssl_x509_export|openssl_x509_export_to_file|openssl_x509_free|openssl_x509_parse|openssl_x509_read|ora_bind|ora_close|ora_columnname|ora_columnsize|ora_columntype|ora_commit|ora_commitoff|ora_commiton|ora_do|ora_error|ora_errorcode|ora_exec|ora_fetch|ora_fetch_into|ora_getcolumn|ora_logoff|ora_logon|ora_numcols|ora_numrows|ora_open|ora_parse|ora_plogon|ora_rollback|ord|output_add_rewrite_var|output_reset_rewrite_vars|overload|ovrimos_close|ovrimos_commit|ovrimos_connect|ovrimos_cursor|ovrimos_exec|ovrimos_execute|ovrimos_fetch_into|ovrimos_fetch_row|ovrimos_field_len|ovrimos_field_name|ovrimos_field_num|ovrimos_field_type|ovrimos_free_result|ovrimos_longreadlen|ovrimos_num_fields|ovrimos_num_rows|ovrimos_prepare|ovrimos_result|ovrimos_result_all|ovrimos_rollback|pack|parse_ini_file|parse_str|parse_url|passthru|pathinfo|pclose|pcntl_alarm|pcntl_exec|pcntl_fork|pcntl_getpriority|pcntl_setpriority|pcntl_signal|pcntl_wait|pcntl_waitpid|pcntl_wexitstatus|pcntl_wifexited|pcntl_wifsignaled|pcntl_wifstopped|pcntl_wstopsig|pcntl_wtermsig|pdf_add_annotation|pdf_add_bookmark|pdf_add_launchlink|pdf_add_locallink|pdf_add_note|pdf_add_outline|pdf_add_pdflink|pdf_add_thumbnail|pdf_add_weblink|pdf_arc|pdf_arcn|pdf_attach_file|pdf_begin_page|pdf_begin_pattern|pdf_begin_template|pdf_circle|pdf_clip|pdf_close|pdf_close_image|pdf_close_pdi|pdf_close_pdi_page|pdf_closepath|pdf_closepath_fill_stroke|pdf_closepath_stroke|pdf_concat|pdf_continue_text|pdf_curveto|pdf_delete|pdf_end_page|pdf_end_pattern|pdf_end_template|pdf_endpath|pdf_fill|pdf_fill_stroke|pdf_findfont|pdf_get_buffer|pdf_get_font|pdf_get_fontname|pdf_get_fontsize|pdf_get_image_height|pdf_get_image_width|pdf_get_majorversion|pdf_get_minorversion|pdf_get_parameter|pdf_get_pdi_parameter|pdf_get_pdi_value|pdf_get_value|pdf_initgraphics|pdf_lineto|pdf_makespotcolor|pdf_moveto|pdf_new|pdf_open|pdf_open_ccitt|pdf_open_file|pdf_open_gif|pdf_open_image|pdf_open_image_file|pdf_open_jpeg|pdf_open_memory_image|pdf_open_pdi|pdf_open_pdi_page|pdf_open_png|pdf_open_tiff|pdf_place_image|pdf_place_pdi_page|pdf_rect|pdf_restore|pdf_rotate|pdf_save|pdf_scale|pdf_set_border_color|pdf_set_border_dash|pdf_set_border_style|pdf_set_char_spacing|pdf_set_duration|pdf_set_font|pdf_set_horiz_scaling|pdf_set_info|pdf_set_info_author|pdf_set_info_creator|pdf_set_info_keywords|pdf_set_info_subject|pdf_set_info_title|pdf_set_leading|pdf_set_parameter|pdf_set_text_matrix|pdf_set_text_pos|pdf_set_text_rendering|pdf_set_text_rise|pdf_set_value|pdf_set_word_spacing|pdf_setcolor|pdf_setdash|pdf_setflat|pdf_setfont|pdf_setgray|pdf_setgray_fill|pdf_setgray_stroke|pdf_setlinecap|pdf_setlinejoin|pdf_setlinewidth|pdf_setmatrix|pdf_setmiterlimit|pdf_setpolydash|pdf_setrgbcolor|pdf_setrgbcolor_fill|pdf_setrgbcolor_stroke|pdf_show|pdf_show_boxed|pdf_show_xy|pdf_skew|pdf_stringwidth|pdf_stroke|pdf_translate|pfpro_cleanup|pfpro_init|pfpro_process|pfpro_process_raw|pfpro_version|pfsockopen|pg_affected_rows|pg_cancel_query|pg_client_encoding|pg_close|pg_connect|pg_connection_busy|pg_connection_reset|pg_connection_status|pg_convert|pg_copy_from|pg_copy_to|pg_dbname|pg_delete|pg_end_copy|pg_escape_bytea|pg_escape_string|pg_fetch_all|pg_fetch_array|pg_fetch_assoc|pg_fetch_object|pg_fetch_result|pg_fetch_row|pg_field_is_null|pg_field_name|pg_field_num|pg_field_prtlen|pg_field_size|pg_field_type|pg_free_result|pg_get_notify|pg_get_pid|pg_get_result|pg_host|pg_insert|pg_last_error|pg_last_notice|pg_last_oid|pg_lo_close|pg_lo_create|pg_lo_export|pg_lo_import|pg_lo_open|pg_lo_read|pg_lo_read_all|pg_lo_seek|pg_lo_tell|pg_lo_unlink|pg_lo_write|pg_meta_data|pg_num_fields|pg_num_rows|pg_options|pg_pconnect|pg_ping|pg_port|pg_put_line|pg_query|pg_result_error|pg_result_seek|pg_result_status|pg_select|pg_send_query|pg_set_client_encoding|pg_trace|pg_tty|pg_unescape_bytea|pg_untrace|pg_update|php_ini_scanned_files|php_logo_guid|php_sapi_name|php_uname|phpcredits|phpinfo|phpversion|pi|png2wbmp|popen|pos|posix_ctermid|posix_get_last_error|posix_getcwd|posix_getegid|posix_geteuid|posix_getgid|posix_getgrgid|posix_getgrnam|posix_getgroups|posix_getlogin|posix_getpgid|posix_getpgrp|posix_getpid|posix_getppid|posix_getpwnam|posix_getpwuid|posix_getrlimit|posix_getsid|posix_getuid|posix_isatty|posix_kill|posix_mkfifo|posix_setegid|posix_seteuid|posix_setgid|posix_setpgid|posix_setsid|posix_setuid|posix_strerror|posix_times|posix_ttyname|posix_uname|pow|preg_grep|preg_match|preg_match_all|preg_quote|preg_replace|preg_replace_callback|preg_split|prev|print|print_r|printer_abort|printer_close|printer_create_brush|printer_create_dc|printer_create_font|printer_create_pen|printer_delete_brush|printer_delete_dc|printer_delete_font|printer_delete_pen|printer_draw_bmp|printer_draw_chord|printer_draw_elipse|printer_draw_line|printer_draw_pie|printer_draw_rectangle|printer_draw_roundrect|printer_draw_text|printer_end_doc|printer_end_page|printer_get_option|printer_list|printer_logical_fontheight|printer_open|printer_select_brush|printer_select_font|printer_select_pen|printer_set_option|printer_start_doc|printer_start_page|printer_write|printf|proc_close|proc_get_status|proc_nice|proc_open|proc_terminate|pspell_add_to_personal|pspell_add_to_session|pspell_check|pspell_clear_session|pspell_config_create|pspell_config_ignore|pspell_config_mode|pspell_config_personal|pspell_config_repl|pspell_config_runtogether|pspell_config_save_repl|pspell_new|pspell_new_config|pspell_new_personal|pspell_save_wordlist|pspell_store_replacement|pspell_suggest|putenv|qdom_error|qdom_tree|quoted_printable_decode|quotemeta|rad2deg|rand|range|rawurldecode|rawurlencode|read_exif_data|readdir|readfile|readgzfile|readline|readline_add_history|readline_clear_history|readline_completion_function|readline_info|readline_list_history|readline_read_history|readline_write_history|readlink|realpath|recode|recode_file|recode_string|register_shutdown_function|register_tick_function|rename|reset|restore_error_handler|restore_include_path|rewind|rewinddir|rmdir|round|rsort|rtrim|scandir|sem_acquire|sem_get|sem_release|sem_remove|serialize|sesam_affected_rows|sesam_commit|sesam_connect|sesam_diagnostic|sesam_disconnect|sesam_errormsg|sesam_execimm|sesam_fetch_array|sesam_fetch_result|sesam_fetch_row|sesam_field_array|sesam_field_name|sesam_free_result|sesam_num_fields|sesam_query|sesam_rollback|sesam_seek_row|sesam_settransaction|session_cache_expire|session_cache_limiter|session_commit|session_decode|session_destroy|session_encode|session_get_cookie_params|session_id|session_is_registered|session_module_name|session_name|session_regenerate_id|session_register|session_save_path|session_set_cookie_params|session_set_save_handler|session_start|session_unregister|session_unset|session_write_close|set_error_handler|set_file_buffer|set_include_path|set_magic_quotes_runtime|set_time_limit|setcookie|setlocale|setrawcookie|settype|sha1|sha1_file|shell_exec|shm_attach|shm_detach|shm_get_var|shm_put_var|shm_remove|shm_remove_var|shmop_close|shmop_delete|shmop_open|shmop_read|shmop_size|shmop_write|show_source|shuffle|similar_text|simplexml_import_dom|simplexml_load_file|simplexml_load_string|sin|sinh|sizeof|sleep|snmp_get_quick_print|snmp_set_quick_print|snmpget|snmprealwalk|snmpset|snmpwalk|snmpwalkoid|socket_accept|socket_bind|socket_clear_error|socket_close|socket_connect|socket_create|socket_create_listen|socket_create_pair|socket_get_option|socket_get_status|socket_getpeername|socket_getsockname|socket_iovec_add|socket_iovec_alloc|socket_iovec_delete|socket_iovec_fetch|socket_iovec_free|socket_iovec_set|socket_last_error|socket_listen|socket_read|socket_readv|socket_recv|socket_recvfrom|socket_recvmsg|socket_select|socket_send|socket_sendmsg|socket_sendto|socket_set_block|socket_set_blocking|socket_set_nonblock|socket_set_option|socket_set_timeout|socket_shutdown|socket_strerror|socket_write|socket_writev|sort|soundex|split|spliti|sprintf|sql_regcase|sqlite_array_query|sqlite_busy_timeout|sqlite_changes|sqlite_close|sqlite_column|sqlite_create_aggregate|sqlite_create_function|sqlite_current|sqlite_error_string|sqlite_escape_string|sqlite_fetch_array|sqlite_fetch_single|sqlite_fetch_string|sqlite_field_name|sqlite_has_more|sqlite_last_error|sqlite_last_insert_rowid|sqlite_libencoding|sqlite_libversion|sqlite_next|sqlite_num_fields|sqlite_num_rows|sqlite_open|sqlite_popen|sqlite_query|sqlite_rewind|sqlite_seek|sqlite_udf_decode_binary|sqlite_udf_encode_binary|sqlite_unbuffered_query|sqrt|srand|sscanf|stat|str_ireplace|str_pad|str_repeat|str_replace|str_rot13|str_shuffle|str_split|str_word_count|strcasecmp|strchr|strcmp|strcoll|strcspn|stream_context_create|stream_context_get_options|stream_context_set_option|stream_context_set_params|stream_copy_to_stream|stream_filter_append|stream_filter_prepend|stream_filter_register|stream_get_contents|stream_get_filters|stream_get_line|stream_get_meta_data|stream_get_transports|stream_get_wrappers|stream_register_wrapper|stream_select|stream_set_blocking|stream_set_timeout|stream_set_write_buffer|stream_socket_accept|stream_socket_client|stream_socket_get_name|stream_socket_recvfrom|stream_socket_sendto|stream_socket_server|stream_wrapper_register|strftime|strip_tags|stripcslashes|stripos|stripslashes|stristr|strlen|strnatcasecmp|strnatcmp|strncasecmp|strncmp|strpos|strrchr|strrev|strripos|strrpos|strspn|strstr|strtok|strtolower|strtotime|strtoupper|strtr|strval|substr|substr_compare|substr_count|substr_replace|swf_actiongeturl|swf_actiongotoframe|swf_actiongotolabel|swf_actionnextframe|swf_actionplay|swf_actionprevframe|swf_actionsettarget|swf_actionstop|swf_actiontogglequality|swf_actionwaitforframe|swf_addbuttonrecord|swf_addcolor|swf_closefile|swf_definebitmap|swf_definefont|swf_defineline|swf_definepoly|swf_definerect|swf_definetext|swf_endbutton|swf_enddoaction|swf_endshape|swf_endsymbol|swf_fontsize|swf_fontslant|swf_fonttracking|swf_getbitmapinfo|swf_getfontinfo|swf_getframe|swf_labelframe|swf_lookat|swf_modifyobject|swf_mulcolor|swf_nextid|swf_oncondition|swf_openfile|swf_ortho|swf_ortho2|swf_perspective|swf_placeobject|swf_polarview|swf_popmatrix|swf_posround|swf_pushmatrix|swf_removeobject|swf_rotate|swf_scale|swf_setfont|swf_setframe|swf_shapearc|swf_shapecurveto|swf_shapecurveto3|swf_shapefillbitmapclip|swf_shapefillbitmaptile|swf_shapefilloff|swf_shapefillsolid|swf_shapelinesolid|swf_shapelineto|swf_shapemoveto|swf_showframe|swf_startbutton|swf_startdoaction|swf_startshape|swf_startsymbol|swf_textwidth|swf_translate|swf_viewport|swfaction|swfbitmap|swfbutton|swfbutton_keypress|swfdisplayitem|swffill|swffont|swfgradient|swfmorph|swfmovie|swfshape|swfsprite|swftext|swftextfield|sybase_affected_rows|sybase_close|sybase_connect|sybase_data_seek|sybase_deadlock_retry_count|sybase_fetch_array|sybase_fetch_assoc|sybase_fetch_field|sybase_fetch_object|sybase_fetch_row|sybase_field_seek|sybase_free_result|sybase_get_last_message|sybase_min_client_severity|sybase_min_error_severity|sybase_min_message_severity|sybase_min_server_severity|sybase_num_fields|sybase_num_rows|sybase_pconnect|sybase_query|sybase_result|sybase_select_db|sybase_set_message_handler|sybase_unbuffered_query|symlink|syslog|system|tan|tanh|tcpwrap_check|tempnam|textdomain|tidy_access_count|tidy_clean_repair|tidy_config_count|tidy_diagnose|tidy_error_count|tidy_get_body|tidy_get_config|tidy_get_error_buffer|tidy_get_head|tidy_get_html|tidy_get_html_ver|tidy_get_output|tidy_get_release|tidy_get_root|tidy_get_status|tidy_getopt|tidy_is_xhtml|tidy_is_xml|tidy_load_config|tidy_parse_file|tidy_parse_string|tidy_repair_file|tidy_repair_string|tidy_reset_config|tidy_save_config|tidy_set_encoding|tidy_setopt|tidy_warning_count|time|tmpfile|token_get_all|token_name|touch|trigger_error|trim|uasort|ucfirst|ucwords|udm_add_search_limit|udm_alloc_agent|udm_alloc_agent_array|udm_api_version|udm_cat_list|udm_cat_path|udm_check_charset|udm_check_stored|udm_clear_search_limits|udm_close_stored|udm_crc32|udm_errno|udm_error|udm_find|udm_free_agent|udm_free_ispell_data|udm_free_res|udm_get_doc_count|udm_get_res_field|udm_get_res_param|udm_hash32|udm_load_ispell_data|udm_open_stored|udm_set_agent_param|uksort|umask|uniqid|unixtojd|unlink|unpack|unregister_tick_function|unserialize|unset|urldecode|urlencode|user_error|usleep|usort|utf8_decode|utf8_encode|var_dump|var_export|variant|version_compare|virtual|vpopmail_add_alias_domain|vpopmail_add_alias_domain_ex|vpopmail_add_domain|vpopmail_add_domain_ex|vpopmail_add_user|vpopmail_alias_add|vpopmail_alias_del|vpopmail_alias_del_domain|vpopmail_alias_get|vpopmail_alias_get_all|vpopmail_auth_user|vpopmail_del_domain|vpopmail_del_domain_ex|vpopmail_del_user|vpopmail_error|vpopmail_passwd|vpopmail_set_user_quota|vprintf|vsprintf|w32api_deftype|w32api_init_dtype|w32api_invoke_function|w32api_register_function|w32api_set_call_method|wddx_add_vars|wddx_deserialize|wddx_packet_end|wddx_packet_start|wddx_serialize_value|wddx_serialize_vars|wordwrap|xdiff_file_diff|xdiff_file_diff_binary|xdiff_file_merge3|xdiff_file_patch|xdiff_file_patch_binary|xdiff_string_diff|xdiff_string_diff_binary|xdiff_string_merge3|xdiff_string_patch|xdiff_string_patch_binary|xml_error_string|xml_get_current_byte_index|xml_get_current_column_number|xml_get_current_line_number|xml_get_error_code|xml_parse|xml_parse_into_struct|xml_parser_create|xml_parser_create_ns|xml_parser_free|xml_parser_get_option|xml_parser_set_option|xml_set_character_data_handler|xml_set_default_handler|xml_set_element_handler|xml_set_end_namespace_decl_handler|xml_set_external_entity_ref_handler|xml_set_notation_decl_handler|xml_set_object|xml_set_processing_instruction_handler|xml_set_start_namespace_decl_handler|xml_set_unparsed_entity_decl_handler|xmlrpc_decode|xmlrpc_decode_request|xmlrpc_encode|xmlrpc_encode_request|xmlrpc_get_type|xmlrpc_parse_method_descriptions|xmlrpc_server_add_introspection_data|xmlrpc_server_call_method|xmlrpc_server_create|xmlrpc_server_destroy|xmlrpc_server_register_introspection_callback|xmlrpc_server_register_method|xmlrpc_set_type|xpath_eval|xpath_eval_expression|xpath_new_context|xptr_eval|xptr_new_context|xsl_xsltprocessor_get_parameter|xsl_xsltprocessor_has_exslt_support|xsl_xsltprocessor_import_stylesheet|xsl_xsltprocessor_register_php_functions|xsl_xsltprocessor_remove_parameter|xsl_xsltprocessor_set_parameter|xsl_xsltprocessor_transform_to_doc|xsl_xsltprocessor_transform_to_uri|xsl_xsltprocessor_transform_to_xml|xslt_create|xslt_errno|xslt_error|xslt_free|xslt_process|xslt_set_base|xslt_set_encoding|xslt_set_error_handler|xslt_set_log|xslt_set_sax_handler|xslt_set_sax_handlers|xslt_set_scheme_handler|xslt_set_scheme_handlers|yaz_addinfo|yaz_ccl_conf|yaz_ccl_parse|yaz_close|yaz_connect|yaz_database|yaz_element|yaz_errno|yaz_error|yaz_es_result|yaz_get_option|yaz_hits|yaz_itemorder|yaz_present|yaz_range|yaz_record|yaz_scan|yaz_scan_result|yaz_schema|yaz_search|yaz_set_option|yaz_sort|yaz_syntax|yaz_wait|yp_all|yp_cat|yp_err_string|yp_errno|yp_first|yp_get_default_domain|yp_master|yp_match|yp_next|yp_order|zend_logo_guid|zend_version|zip_close|zip_entry_close|zip_entry_compressedsize|zip_entry_compressionmethod|zip_entry_filesize|zip_entry_name|zip_entry_open|zip_entry_read|zip_open|zip_read|zlib_get_coding_type".split("|")),
+ i = c.arrayToMap("abstract|and|array|as|break|case|catch|cfunction|class|clone|const|continue|declare|default|die|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|final|for|foreach|function|include|include_once|global|goto|if|implements|interface|instanceof|namespace|new|old_function|or|private|protected|public|return|require|require_once|static|switch|throw|try|use|var|while|xor".split("|")), j = c.arrayToMap("true|false|null|__FILE__|__LINE__|__METHOD__|__FUNCTION__|__CLASS__".split("|")),
+ k = c.arrayToMap("$_GLOBALS|$_SERVER|$_GET|$_POST|$_FILES|$_REQUEST|$_SESSION|$_ENV|$_COOKIE|$php_errormsg|$HTTP_RAW_POST_DATA|$http_response_header|$argc|$argv".split("|")), l = c.arrayToMap([]);
+ this.$rules = {start:[{token:"support", regex:"<\\?(?:php|\\=)"}, {token:"support", regex:"\\?>"}, {token:"comment", regex:"\\/\\/.*$"}, d.getStartRule("doc-start"), {token:"comment", regex:"\\/\\*", next:"comment"}, {token:"string.regexp", regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/][gimy]*\\s*(?=[).,;]|$)"}, {token:"string", regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'}, {token:"string", regex:'["].*\\\\$', next:"qqstring"}, {token:"string", regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
+ {token:"string", regex:"['].*\\\\$", next:"qstring"}, {token:"constant.numeric", regex:"0[xX][0-9a-fA-F]+\\b"}, {token:"constant.numeric", regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"}, {token:"constant.language", regex:"\\b(?:DEFAULT_INCLUDE_PATH|E_(?:ALL|CO(?:MPILE_(?:ERROR|WARNING)|RE_(?:ERROR|WARNING))|ERROR|NOTICE|PARSE|STRICT|USER_(?:ERROR|NOTICE|WARNING)|WARNING)|P(?:EAR_(?:EXTENSION_DIR|INSTALL_DIR)|HP_(?:BINDIR|CONFIG_FILE_(?:PATH|SCAN_DIR)|DATADIR|E(?:OL|XTENSION_DIR)|INT_(?:MAX|SIZE)|L(?:IBDIR|OCALSTATEDIR)|O(?:S|UTPUT_HANDLER_(?:CONT|END|START))|PREFIX|S(?:API|HLIB_SUFFIX|YSCONFDIR)|VERSION))|__COMPILER_HALT_OFFSET__)\\b"},
+ {token:"constant.language", regex:"\\b(?:A(?:B(?:DAY_(?:1|2|3|4|5|6|7)|MON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9))|LT_DIGITS|M_STR|SSERT_(?:ACTIVE|BAIL|CALLBACK|QUIET_EVAL|WARNING))|C(?:ASE_(?:LOWER|UPPER)|HAR_MAX|O(?:DESET|NNECTION_(?:ABORTED|NORMAL|TIMEOUT)|UNT_(?:NORMAL|RECURSIVE))|R(?:EDITS_(?:ALL|DOCS|FULLPAGE|G(?:ENERAL|ROUP)|MODULES|QA|SAPI)|NCYSTR|YPT_(?:BLOWFISH|EXT_DES|MD5|S(?:ALT_LENGTH|TD_DES)))|URRENCY_SYMBOL)|D(?:AY_(?:1|2|3|4|5|6|7)|ECIMAL_POINT|IRECTORY_SEPARATOR|_(?:FMT|T_FMT))|E(?:NT_(?:COMPAT|NOQUOTES|QUOTES)|RA(?:_(?:D_(?:FMT|T_FMT)|T_FMT|YEAR)|)|XTR_(?:IF_EXISTS|OVERWRITE|PREFIX_(?:ALL|I(?:F_EXISTS|NVALID)|SAME)|SKIP))|FRAC_DIGITS|GROUPING|HTML_(?:ENTITIES|SPECIALCHARS)|IN(?:FO_(?:ALL|C(?:ONFIGURATION|REDITS)|ENVIRONMENT|GENERAL|LICENSE|MODULES|VARIABLES)|I_(?:ALL|PERDIR|SYSTEM|USER)|T_(?:CURR_SYMBOL|FRAC_DIGITS))|L(?:C_(?:ALL|C(?:OLLATE|TYPE)|M(?:ESSAGES|ONETARY)|NUMERIC|TIME)|O(?:CK_(?:EX|NB|SH|UN)|G_(?:A(?:LERT|UTH(?:PRIV|))|C(?:ONS|R(?:IT|ON))|D(?:AEMON|EBUG)|E(?:MERG|RR)|INFO|KERN|L(?:OCAL(?:0|1|2|3|4|5|6|7)|PR)|MAIL|N(?:DELAY|EWS|O(?:TICE|WAIT))|ODELAY|P(?:ERROR|ID)|SYSLOG|U(?:SER|UCP)|WARNING)))|M(?:ON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)|_(?:1_PI|2_(?:PI|SQRTPI)|E|L(?:N(?:10|2)|OG(?:10E|2E))|PI(?:_(?:2|4)|)|SQRT(?:1_2|2)))|N(?:EGATIVE_SIGN|O(?:EXPR|STR)|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|P(?:ATH(?:INFO_(?:BASENAME|DIRNAME|EXTENSION)|_SEPARATOR)|M_STR|OSITIVE_SIGN|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|RADIXCHAR|S(?:EEK_(?:CUR|END|SET)|ORT_(?:ASC|DESC|NUMERIC|REGULAR|STRING)|TR_PAD_(?:BOTH|LEFT|RIGHT))|T(?:HOUS(?:ANDS_SEP|EP)|_FMT(?:_AMPM|))|YES(?:EXPR|STR)|STD(?:IN|OUT|ERR))\\b"},
+ {token:function(a) {
+ if(i[a]) {
+ return"keyword"
+ }else {
+ if(j[a]) {
+ return"constant.language"
+ }else {
+ if(k[a]) {
+ return"variable.language"
+ }else {
+ if(l[a]) {
+ return"invalid.illegal"
+ }else {
+ if(h[a]) {
+ return"support.function"
+ }else {
+ if(a == "debugger") {
+ return"invalid.deprecated"
+ }else {
+ if(a.match(/^(\$[a-zA-Z][a-zA-Z0-9_]*|self|parent)$/)) {
+ return"variable"
+ }
+ }
+ }
+ }
+ }
+ }
+ }return"identifier"
+ }, regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}, {token:"keyword.operator", regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"}, {token:"lparen", regex:"[[({]"}, {token:"rparen", regex:"[\\])}]"}, {token:"text", regex:"\\s+"}], comment:[{token:"comment", regex:".*?\\*\\/", next:"start"}, {token:"comment", regex:".+"}], qqstring:[{token:"string", regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
+ next:"start"}, {token:"string", regex:".+"}], qstring:[{token:"string", regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'", next:"start"}, {token:"string", regex:".+"}]};
+ this.addRules(d.getRules(), "doc-");
+ this.$rules["doc-start"][0].next = "start"
+ };
+ f.inherits(PhpHighlightRules, b);
+ e.PhpHighlightRules = PhpHighlightRules
+});
\ No newline at end of file
diff --git a/build/ace/mode/python.js b/build/ace/mode/python.js
index 1df73e4d..91df47e5 100644
--- a/build/ace/mode/python.js
+++ b/build/ace/mode/python.js
@@ -1,20 +1,20 @@
-define("ace/mode/python_highlight_rules", ["require", "exports", "module", "../lib/oop", "../lib/lang", "./text_highlight_rules"], function(a) {
- var k = a("../lib/oop"), b = a("../lib/lang");
- a = a("./text_highlight_rules");
+define("ace/mode/python_highlight_rules", ["require", "exports", "module", "pilot/oop", "pilot/lang", "./text_highlight_rules"], function(a, l) {
+ var m = a("pilot/oop"), b = a("pilot/lang");
+ a = a("./text_highlight_rules").TextHighlightRules;
PythonHighlightRules = function() {
- var f = b.arrayToMap("and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield".split("|")), i = b.arrayToMap("True|False|None|NotImplemented|Ellipsis|__debug__".split("|")), j = b.arrayToMap("abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|set|apply|delattr|help|next|setattr|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern".split("|")),
- l = b.arrayToMap("".split("|"));
+ var f = b.arrayToMap("and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield".split("|")), h = b.arrayToMap("True|False|None|NotImplemented|Ellipsis|__debug__".split("|")), i = b.arrayToMap("abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|set|apply|delattr|help|next|setattr|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern".split("|")),
+ n = b.arrayToMap("".split("|"));
this.$rules = {start:[{token:"comment", regex:"#.*$"}, {token:"string", regex:'(?:(?:[rubRUB])|(?:[ubUB][rR]))?"{3}(?:(?:.)|(?:^"{3}))*?"{3}'}, {token:"string", regex:'(?:(?:[rubRUB])|(?:[ubUB][rR]))?"{3}.*$', next:"qqstring"}, {token:"string", regex:'(?:(?:[rubRUB])|(?:[ubUB][rR]))?"(?:(?:\\\\.)|(?:[^"\\\\]))*?"'}, {token:"string", regex:"(?:(?:[rubRUB])|(?:[ubUB][rR]))?'{3}(?:(?:.)|(?:^'{3}))*?'{3}"}, {token:"string", regex:"(?:(?:[rubRUB])|(?:[ubUB][rR]))?'{3}.*$", next:"qstring"}, {token:"string",
regex:"(?:(?:[rubRUB])|(?:[ubUB][rR]))?'(?:(?:\\\\.)|(?:[^'\\\\]))*?'"}, {token:"constant.numeric", regex:"(?:(?:(?:(?:(?:(?:(?:\\d+)?(?:\\.\\d+))|(?:(?:\\d+)\\.))|(?:\\d+))(?:[eE][+-]?\\d+))|(?:(?:(?:\\d+)?(?:\\.\\d+))|(?:(?:\\d+)\\.)))|\\d+)[jJ]\\b"}, {token:"constant.numeric", regex:"(?:(?:(?:(?:(?:(?:\\d+)?(?:\\.\\d+))|(?:(?:\\d+)\\.))|(?:\\d+))(?:[eE][+-]?\\d+))|(?:(?:(?:\\d+)?(?:\\.\\d+))|(?:(?:\\d+)\\.)))"}, {token:"constant.numeric", regex:"(?:(?:(?:[1-9]\\d*)|(?:0))|(?:0[oO]?[0-7]+)|(?:0[xX][\\dA-Fa-f]+)|(?:0[bB][01]+))[lL]\\b"},
{token:"constant.numeric", regex:"(?:(?:(?:[1-9]\\d*)|(?:0))|(?:0[oO]?[0-7]+)|(?:0[xX][\\dA-Fa-f]+)|(?:0[bB][01]+))\\b"}, {token:function(c) {
- return f[c] ? "keyword" : i[c] ? "constant.language" : l[c] ? "invalid.illegal" : j[c] ? "support.function" : c == "debugger" ? "invalid.deprecated" : "identifier"
+ return f[c] ? "keyword" : h[c] ? "constant.language" : n[c] ? "invalid.illegal" : i[c] ? "support.function" : c == "debugger" ? "invalid.deprecated" : "identifier"
}, regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}, {token:"keyword.operator", regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="}, {token:"lparen", regex:"[\\[\\(\\{]"}, {token:"rparen", regex:"[\\]\\)\\}]"}, {token:"text", regex:"\\s+"}], qqstring:[{token:"string", regex:'(?:^"{3})*?"{3}', next:"start"}, {token:"string", regex:".+"}], qstring:[{token:"string", regex:"(?:^'{3})*?'{3}", next:"start"}, {token:"string", regex:".+"}]}
};
- k.inherits(PythonHighlightRules, a);
- return PythonHighlightRules
+ m.inherits(PythonHighlightRules, a);
+ l.PythonHighlightRules = PythonHighlightRules
});
-define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "../range"], function(a) {
- var k = a("../range");
+define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function(a, l) {
+ var m = a("ace/range").Range;
a = function() {
};
(function() {
@@ -24,16 +24,16 @@ define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "../r
}return/^\s*\}/.test(f)
};
this.autoOutdent = function(b, f) {
- var i = b.getLine(f).match(/^(\s*\})/);
- if(!i) {
+ var h = b.getLine(f).match(/^(\s*\})/);
+ if(!h) {
return 0
- }i = i[1].length;
- var j = b.findMatchingBracket({row:f, column:i});
- if(!j || j.row == f) {
+ }h = h[1].length;
+ var i = b.findMatchingBracket({row:f, column:h});
+ if(!i || i.row == f) {
return 0
- }j = this.$getIndent(b.getLine(j.row));
- b.replace(new k(f, 0, f, i - 1), j);
- return j.length - (i - 1)
+ }i = this.$getIndent(b.getLine(i.row));
+ b.replace(new m(f, 0, f, h - 1), i);
+ return i.length - (h - 1)
};
this.$getIndent = function(b) {
if(b = b.match(/^(\s+)/)) {
@@ -41,53 +41,53 @@ define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "../r
}return""
}
}).call(a.prototype);
- return a
+ l.MatchingBraceOutdent = a
});
-define("ace/mode/python", ["require", "exports", "module", "../lib/oop", "./text", "../tokenizer", "./python_highlight_rules", "./matching_brace_outdent", "../range"], function(a) {
- var k = a("../lib/oop"), b = a("./text"), f = a("../tokenizer"), i = a("./python_highlight_rules"), j = a("./matching_brace_outdent"), l = a("../range");
+define("ace/mode/python", ["require", "exports", "module", "pilot/oop", "./text", "../tokenizer", "./python_highlight_rules", "./matching_brace_outdent", "../range"], function(a, l) {
+ var m = a("pilot/oop"), b = a("./text").Mode, f = a("../tokenizer").Tokenizer, h = a("./python_highlight_rules").PythonHighlightRules, i = a("./matching_brace_outdent").MatchingBraceOutdent, n = a("../range").Range;
a = function() {
- this.$tokenizer = new f((new i).getRules());
- this.$outdent = new j
+ this.$tokenizer = new f((new h).getRules());
+ this.$outdent = new i
};
- k.inherits(a, b);
+ m.inherits(a, b);
(function() {
- this.toggleCommentLines = function(c, e, g) {
- var h = true;
+ this.toggleCommentLines = function(c, d, e, k) {
+ var g = true;
c = /^(\s*)#/;
- for(var d = g.start.row;d <= g.end.row;d++) {
- if(!c.test(e.getLine(d))) {
- h = false;
+ for(var j = e;j <= k;j++) {
+ if(!c.test(d.getLine(j))) {
+ g = false;
break
}
- }if(h) {
- h = new l(0, 0, 0, 0);
- for(d = g.start.row;d <= g.end.row;d++) {
- var m = e.getLine(d).replace(c, "$1");
- h.start.row = d;
- h.end.row = d;
- h.end.column = m.length + 2;
- e.replace(h, m)
+ }if(g) {
+ g = new n(0, 0, 0, 0);
+ for(j = e;j <= k;j++) {
+ e = d.getLine(j).replace(c, "$1");
+ g.start.row = j;
+ g.end.row = j;
+ g.end.column = e.length + 2;
+ d.replace(g, e)
}return-2
}else {
- return e.indentRows(g, "#")
+ return d.indentRows(e, k, "#")
}
};
- this.getNextLineIndent = function(c, e, g) {
- var h = this.$getIndent(e), d = this.$tokenizer.getLineTokens(e, c).tokens;
- if(d.length && d[d.length - 1].type == "comment") {
- return h
+ this.getNextLineIndent = function(c, d, e) {
+ var k = this.$getIndent(d), g = this.$tokenizer.getLineTokens(d, c).tokens;
+ if(g.length && g[g.length - 1].type == "comment") {
+ return k
}if(c == "start") {
- if(e.match(/^.*[\{\(\[\:]\s*$/)) {
- h += g
+ if(d.match(/^.*[\{\(\[\:]\s*$/)) {
+ k += e
}
- }return h
+ }return k
};
- this.checkOutdent = function(c, e, g) {
- return this.$outdent.checkOutdent(e, g)
+ this.checkOutdent = function(c, d, e) {
+ return this.$outdent.checkOutdent(d, e)
};
- this.autoOutdent = function(c, e, g) {
- return this.$outdent.autoOutdent(e, g)
+ this.autoOutdent = function(c, d, e) {
+ return this.$outdent.autoOutdent(d, e)
}
}).call(a.prototype);
- return a
+ l.Mode = a
});
\ No newline at end of file
diff --git a/build/ace/mode/python_highlight_rules.js b/build/ace/mode/python_highlight_rules.js
index cade2c71..57468c5c 100644
--- a/build/ace/mode/python_highlight_rules.js
+++ b/build/ace/mode/python_highlight_rules.js
@@ -1,15 +1,15 @@
-define(function(a) {
- var d = a("../lib/oop"), c = a("../lib/lang");
- a = a("./text_highlight_rules");
+define(function(a, d) {
+ var e = a("pilot/oop"), c = a("pilot/lang");
+ a = a("./text_highlight_rules").TextHighlightRules;
PythonHighlightRules = function() {
- var e = c.arrayToMap("and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield".split("|")), f = c.arrayToMap("True|False|None|NotImplemented|Ellipsis|__debug__".split("|")), g = c.arrayToMap("abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|set|apply|delattr|help|next|setattr|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern".split("|")),
- h = c.arrayToMap("".split("|"));
+ var f = c.arrayToMap("and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield".split("|")), g = c.arrayToMap("True|False|None|NotImplemented|Ellipsis|__debug__".split("|")), h = c.arrayToMap("abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|set|apply|delattr|help|next|setattr|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern".split("|")),
+ i = c.arrayToMap("".split("|"));
this.$rules = {start:[{token:"comment", regex:"#.*$"}, {token:"string", regex:'(?:(?:[rubRUB])|(?:[ubUB][rR]))?"{3}(?:(?:.)|(?:^"{3}))*?"{3}'}, {token:"string", regex:'(?:(?:[rubRUB])|(?:[ubUB][rR]))?"{3}.*$', next:"qqstring"}, {token:"string", regex:'(?:(?:[rubRUB])|(?:[ubUB][rR]))?"(?:(?:\\\\.)|(?:[^"\\\\]))*?"'}, {token:"string", regex:"(?:(?:[rubRUB])|(?:[ubUB][rR]))?'{3}(?:(?:.)|(?:^'{3}))*?'{3}"}, {token:"string", regex:"(?:(?:[rubRUB])|(?:[ubUB][rR]))?'{3}.*$", next:"qstring"}, {token:"string",
regex:"(?:(?:[rubRUB])|(?:[ubUB][rR]))?'(?:(?:\\\\.)|(?:[^'\\\\]))*?'"}, {token:"constant.numeric", regex:"(?:(?:(?:(?:(?:(?:(?:\\d+)?(?:\\.\\d+))|(?:(?:\\d+)\\.))|(?:\\d+))(?:[eE][+-]?\\d+))|(?:(?:(?:\\d+)?(?:\\.\\d+))|(?:(?:\\d+)\\.)))|\\d+)[jJ]\\b"}, {token:"constant.numeric", regex:"(?:(?:(?:(?:(?:(?:\\d+)?(?:\\.\\d+))|(?:(?:\\d+)\\.))|(?:\\d+))(?:[eE][+-]?\\d+))|(?:(?:(?:\\d+)?(?:\\.\\d+))|(?:(?:\\d+)\\.)))"}, {token:"constant.numeric", regex:"(?:(?:(?:[1-9]\\d*)|(?:0))|(?:0[oO]?[0-7]+)|(?:0[xX][\\dA-Fa-f]+)|(?:0[bB][01]+))[lL]\\b"},
{token:"constant.numeric", regex:"(?:(?:(?:[1-9]\\d*)|(?:0))|(?:0[oO]?[0-7]+)|(?:0[xX][\\dA-Fa-f]+)|(?:0[bB][01]+))\\b"}, {token:function(b) {
- return e[b] ? "keyword" : f[b] ? "constant.language" : h[b] ? "invalid.illegal" : g[b] ? "support.function" : b == "debugger" ? "invalid.deprecated" : "identifier"
+ return f[b] ? "keyword" : g[b] ? "constant.language" : i[b] ? "invalid.illegal" : h[b] ? "support.function" : b == "debugger" ? "invalid.deprecated" : "identifier"
}, regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}, {token:"keyword.operator", regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="}, {token:"lparen", regex:"[\\[\\(\\{]"}, {token:"rparen", regex:"[\\]\\)\\}]"}, {token:"text", regex:"\\s+"}], qqstring:[{token:"string", regex:'(?:^"{3})*?"{3}', next:"start"}, {token:"string", regex:".+"}], qstring:[{token:"string", regex:"(?:^'{3})*?'{3}", next:"start"}, {token:"string", regex:".+"}]}
};
- d.inherits(PythonHighlightRules, a);
- return PythonHighlightRules
+ e.inherits(PythonHighlightRules, a);
+ d.PythonHighlightRules = PythonHighlightRules
});
\ No newline at end of file
diff --git a/build/ace/mode/text.js b/build/ace/mode/text.js
index a6f218e6..63ae67bd 100644
--- a/build/ace/mode/text.js
+++ b/build/ace/mode/text.js
@@ -1,7 +1,7 @@
-define(function(a) {
- var c = a("../tokenizer"), d = a("./text_highlight_rules");
+define(function(a, c) {
+ var d = a("ace/tokenizer").Tokenizer, e = a("ace/mode/text_highlight_rules").TextHighlightRules;
a = function() {
- this.$tokenizer = new c((new d).getRules())
+ this.$tokenizer = new d((new e).getRules())
};
(function() {
this.getTokenizer = function() {
@@ -24,5 +24,5 @@ define(function(a) {
}return""
}
}).call(a.prototype);
- return a
+ c.Mode = a
});
\ No newline at end of file
diff --git a/build/ace/mode/text_highlight_rules.js b/build/ace/mode/text_highlight_rules.js
index 848b6076..2415acca 100644
--- a/build/ace/mode/text_highlight_rules.js
+++ b/build/ace/mode/text_highlight_rules.js
@@ -1,19 +1,19 @@
-define(function() {
- var f = function() {
+define(function(a, h) {
+ a = function() {
this.$rules = {start:[{token:"text", regex:".+"}]}
};
(function() {
- this.addRules = function(g, a) {
- for(var b in g) {
- for(var c = g[b], d = 0;d < c.length;d++) {
- var e = c[d];
- e.next = e.next ? a + e.next : a + b
- }this.$rules[a + b] = c
+ this.addRules = function(g, b) {
+ for(var c in g) {
+ for(var d = g[c], e = 0;e < d.length;e++) {
+ var f = d[e];
+ f.next = f.next ? b + f.next : b + c
+ }this.$rules[b + c] = d
}
};
this.getRules = function() {
return this.$rules
}
- }).call(f.prototype);
- return f
+ }).call(a.prototype);
+ h.TextHighlightRules = a
});
\ No newline at end of file
diff --git a/build/ace/mode/xml.js b/build/ace/mode/xml.js
index c99c913d..2c0ba5e1 100644
--- a/build/ace/mode/xml.js
+++ b/build/ace/mode/xml.js
@@ -1,23 +1,23 @@
-define("ace/mode/xml_highlight_rules", ["require", "exports", "module", "../lib/oop", "./text_highlight_rules"], function(a) {
- var c = a("../lib/oop");
- a = a("./text_highlight_rules");
+define("ace/mode/xml_highlight_rules", ["require", "exports", "module", "pilot/oop", "ace/mode/text_highlight_rules"], function(a, c) {
+ var d = a("pilot/oop");
+ a = a("ace/mode/text_highlight_rules").TextHighlightRules;
var b = function() {
this.$rules = {start:[{token:"text", regex:"<\\!\\[CDATA\\[", next:"cdata"}, {token:"xml_pe", regex:"<\\?.*?\\?>"}, {token:"comment", regex:"<\\!--", next:"comment"}, {token:"text", regex:"<\\/?", next:"tag"}, {token:"text", regex:"\\s+"}, {token:"text", regex:"[^<]+"}], tag:[{token:"text", regex:">", next:"start"}, {token:"keyword", regex:"[-_a-zA-Z0-9:]+"}, {token:"text", regex:"\\s+"}, {token:"string", regex:'".*?"'}, {token:"string", regex:"'.*?'"}], cdata:[{token:"text", regex:"\\]\\]>",
next:"start"}, {token:"text", regex:"\\s+"}, {token:"text", regex:"(?:[^\\]]|\\](?!\\]>))+"}], comment:[{token:"comment", regex:".*?--\>", next:"start"}, {token:"comment", regex:".+"}]}
};
- c.inherits(b, a);
- return b
+ d.inherits(b, a);
+ c.XmlHighlightRules = b
});
-define("ace/mode/xml", ["require", "exports", "module", "../lib/oop", "./text", "../tokenizer", "./xml_highlight_rules"], function(a) {
- var c = a("../lib/oop"), b = a("./text"), d = a("../tokenizer"), e = a("./xml_highlight_rules");
+define("ace/mode/xml", ["require", "exports", "module", "pilot/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/xml_highlight_rules"], function(a, c) {
+ var d = a("pilot/oop"), b = a("ace/mode/text").Mode, e = a("ace/tokenizer").Tokenizer, f = a("ace/mode/xml_highlight_rules").XmlHighlightRules;
a = function() {
- this.$tokenizer = new d((new e).getRules())
+ this.$tokenizer = new e((new f).getRules())
};
- c.inherits(a, b);
+ d.inherits(a, b);
(function() {
- this.getNextLineIndent = function(g, f) {
- return this.$getIndent(f)
+ this.getNextLineIndent = function(h, g) {
+ return this.$getIndent(g)
}
}).call(a.prototype);
- return a
+ c.Mode = a
});
\ No newline at end of file
diff --git a/build/ace/mode/xml_highlight_rules.js b/build/ace/mode/xml_highlight_rules.js
index 89886e5e..ed500328 100644
--- a/build/ace/mode/xml_highlight_rules.js
+++ b/build/ace/mode/xml_highlight_rules.js
@@ -1,10 +1,10 @@
-define(function(a) {
- var c = a("../lib/oop");
- a = a("./text_highlight_rules");
+define(function(a, c) {
+ var d = a("pilot/oop");
+ a = a("ace/mode/text_highlight_rules").TextHighlightRules;
var b = function() {
this.$rules = {start:[{token:"text", regex:"<\\!\\[CDATA\\[", next:"cdata"}, {token:"xml_pe", regex:"<\\?.*?\\?>"}, {token:"comment", regex:"<\\!--", next:"comment"}, {token:"text", regex:"<\\/?", next:"tag"}, {token:"text", regex:"\\s+"}, {token:"text", regex:"[^<]+"}], tag:[{token:"text", regex:">", next:"start"}, {token:"keyword", regex:"[-_a-zA-Z0-9:]+"}, {token:"text", regex:"\\s+"}, {token:"string", regex:'".*?"'}, {token:"string", regex:"'.*?'"}], cdata:[{token:"text", regex:"\\]\\]>",
next:"start"}, {token:"text", regex:"\\s+"}, {token:"text", regex:"(?:[^\\]]|\\](?!\\]>))+"}], comment:[{token:"comment", regex:".*?--\>", next:"start"}, {token:"comment", regex:".+"}]}
};
- c.inherits(b, a);
- return b
+ d.inherits(b, a);
+ c.XmlHighlightRules = b
});
\ No newline at end of file
diff --git a/build/ace/plugin_manager.js b/build/ace/plugin_manager.js
deleted file mode 100644
index 0d8b92f2..00000000
--- a/build/ace/plugin_manager.js
+++ /dev/null
@@ -1,5 +0,0 @@
-define(function() {
- return{commands:{}, registerCommand:function(a, b) {
- this.commands[a] = b
- }}
-});
\ No newline at end of file
diff --git a/build/ace/range.js b/build/ace/range.js
index 504e370b..57677a7e 100644
--- a/build/ace/range.js
+++ b/build/ace/range.js
@@ -1,4 +1,4 @@
-define(function() {
+define(function(h, f) {
var c = function(a, b, d, e) {
this.start = {row:a, column:b};
this.end = {row:d, column:e}
@@ -44,9 +44,9 @@ define(function() {
if(d == -1) {
var e = {row:a, column:b}
}else {
- var f = {row:a, column:b}
+ var g = {row:a, column:b}
}
- }return c.fromPoints(e || this.start, f || this.end)
+ }return c.fromPoints(e || this.start, g || this.end)
};
this.isEmpty = function() {
return this.start.row == this.end.row && this.start.column == this.end.column
@@ -57,6 +57,9 @@ define(function() {
this.clone = function() {
return c.fromPoints(this.start, this.end)
};
+ this.collapseRows = function() {
+ return this.end.column == 0 ? new c(this.start.row, 0, Math.max(this.start.row, this.end.row - 1), 0) : new c(this.start.row, 0, this.end.row, 0)
+ };
this.toScreenRange = function(a) {
return new c(this.start.row, a.documentToScreenColumn(this.start.row, this.start.column), this.end.row, a.documentToScreenColumn(this.end.row, this.end.column))
}
@@ -64,5 +67,5 @@ define(function() {
c.fromPoints = function(a, b) {
return new c(a.row, a.column, b.row, b.column)
};
- return c
+ f.Range = c
});
\ No newline at end of file
diff --git a/build/ace/renderloop.js b/build/ace/renderloop.js
index fbd33510..01c916b0 100644
--- a/build/ace/renderloop.js
+++ b/build/ace/renderloop.js
@@ -1,5 +1,5 @@
-define(function(d) {
- var e = d("./lib/event");
+define(function(d, f) {
+ var e = d("pilot/event");
d = function(b) {
this.onRender = b;
this.pending = false;
@@ -7,6 +7,7 @@ define(function(d) {
};
(function() {
this.schedule = function(b) {
+ b = 128;
this.changes |= b;
if(!this.pending) {
this.pending = true;
@@ -15,7 +16,11 @@ define(function(d) {
a.pending = false;
var c = a.changes;
a.changes = 0;
- a.onRender(c)
+ var g = new Date;
+ a.onRender(c);
+ a.setTimeoutZero(function() {
+ console.log(new Date - g)
+ })
})
}
};
@@ -40,5 +45,5 @@ define(function(d) {
}
}
}).call(d.prototype);
- return d
+ f.RenderLoop = d
});
\ No newline at end of file
diff --git a/build/ace/scrollbar.js b/build/ace/scrollbar.js
index 7bcbfcb8..424d6de0 100644
--- a/build/ace/scrollbar.js
+++ b/build/ace/scrollbar.js
@@ -1,5 +1,5 @@
-define(function(a) {
- var c = a("./lib/oop"), d = a("./lib/lang"), e = a("./lib/dom"), f = a("./lib/event"), g = a("./event_emitter");
+define(function(a, c) {
+ var d = a("pilot/oop"), e = a("pilot/dom"), f = a("pilot/event"), g = a("pilot/event_emitter").EventEmitter;
a = function(b) {
this.element = document.createElement("div");
this.element.className = "ace_sb";
@@ -8,12 +8,12 @@ define(function(a) {
b.appendChild(this.element);
this.width = e.scrollbarWidth();
this.element.style.width = this.width;
- f.addListener(this.element, "scroll", d.bind(this.onScroll, this))
+ f.addListener(this.element, "scroll", this.onScroll.bind(this))
};
(function() {
- c.implement(this, g);
+ d.implement(this, g);
this.onScroll = function() {
- this.$dispatchEvent("scroll", {data:this.element.scrollTop})
+ this._dispatchEvent("scroll", {data:this.element.scrollTop})
};
this.getWidth = function() {
return this.width
@@ -28,5 +28,5 @@ define(function(a) {
this.element.scrollTop = b
}
}).call(a.prototype);
- return a
+ c.ScrollBar = a
});
\ No newline at end of file
diff --git a/build/ace/search.js b/build/ace/search.js
index 507feec3..aace07de 100644
--- a/build/ace/search.js
+++ b/build/ace/search.js
@@ -1,12 +1,12 @@
-define(function(o) {
- var p = o("./lib/lang"), r = o("./lib/oop"), s = o("./range"), l = function() {
+define(function(o, r) {
+ var p = o("pilot/lang"), s = o("pilot/oop"), t = o("ace/range").Range, l = function() {
this.$options = {needle:"", backwards:false, wrap:false, caseSensitive:false, wholeWord:false, scope:l.ALL, regExp:false}
};
l.ALL = 1;
l.SELECTION = 2;
(function() {
this.set = function(a) {
- r.mixin(this.$options, a);
+ s.mixin(this.$options, a);
return this
};
this.getOptions = function() {
@@ -78,7 +78,7 @@ define(function(o) {
}}
};
this.$rangeFromMatch = function(a, b, c) {
- return new s(a, b, a, b + c)
+ return new t(a, b, a, b + c)
};
this.$assembleRegExp = function() {
var a = this.$options.regExp ? this.$options.needle : p.escapeRegExp(this.$options.needle);
@@ -145,5 +145,5 @@ define(function(o) {
}}
}
}).call(l.prototype);
- return l
+ r.Search = l
});
\ No newline at end of file
diff --git a/build/ace/selection.js b/build/ace/selection.js
index dbbb4ebc..ac335096 100644
--- a/build/ace/selection.js
+++ b/build/ace/selection.js
@@ -1,12 +1,12 @@
-define(function(d) {
- var g = d("./lib/oop"), h = d("./lib/lang"), i = d("./event_emitter"), f = d("./range");
+define(function(d, g) {
+ var h = d("pilot/oop"), i = d("pilot/lang"), j = d("pilot/event_emitter").EventEmitter, f = d("ace/range").Range;
d = function(a) {
this.doc = a;
this.clearSelection();
this.selectionLead = {row:0, column:0}
};
(function() {
- g.implement(this, i);
+ h.implement(this, j);
this.isEmpty = function() {
return!this.selectionAnchor || this.selectionAnchor.row == this.selectionLead.row && this.selectionAnchor.column == this.selectionLead.column
};
@@ -23,11 +23,11 @@ define(function(d) {
if(this.selectionAnchor) {
if(this.selectionAnchor.row !== a.row || this.selectionAnchor.column !== a.column) {
this.selectionAnchor = a;
- this.$dispatchEvent("changeSelection", {})
+ this._dispatchEvent("changeSelection", {})
}
}else {
this.selectionAnchor = a;
- this.$dispatchEvent("changeSelection", {})
+ this._dispatchEvent("changeSelection", {})
}
};
this.getSelectionAnchor = function() {
@@ -61,15 +61,19 @@ define(function(d) {
this.clearSelection = function() {
if(this.selectionAnchor) {
this.selectionAnchor = null;
- this.$dispatchEvent("changeSelection", {})
+ this._dispatchEvent("changeSelection", {})
}
};
this.selectAll = function() {
var a = this.doc.getLength() - 1;
this.setSelectionAnchor(a, this.doc.getLine(a).length);
- this.$moveSelection(function() {
- this.moveCursorTo(0, 0)
- })
+ if(!this.selectionAnchor) {
+ this.selectionAnchor = this.$clone(this.selectionLead)
+ }a = {row:0, column:0};
+ if(a.row !== this.selectionLead.row || a.column !== this.selectionLead.column) {
+ this.selectionLead = a;
+ this._dispatchEvent("changeSelection", {blockScrolling:true})
+ }
};
this.setSelectionRange = function(a, b) {
if(b) {
@@ -89,7 +93,7 @@ define(function(d) {
a.call(this);
if(c.row !== this.selectionLead.row || c.column !== this.selectionLead.column) {
b = true
- }b && this.$dispatchEvent("changeSelection", {})
+ }b && this._dispatchEvent("changeSelection", {})
};
this.selectTo = function(a, b) {
this.$moveSelection(function() {
@@ -151,14 +155,16 @@ define(function(d) {
if(this.selectionLead.column == 0) {
this.selectionLead.row > 0 && this.moveCursorTo(this.selectionLead.row - 1, this.doc.getLine(this.selectionLead.row - 1).length)
}else {
- this.moveCursorBy(0, -1)
+ var a = this.doc, b = a.getTabSize(), c = this.selectionLead;
+ a.isTabStop(c) && a.getLine(c.row).slice(c.column - b, c.column).split(" ").length - 1 == b ? this.moveCursorBy(0, -b) : this.moveCursorBy(0, -1)
}
};
this.moveCursorRight = function() {
if(this.selectionLead.column == this.doc.getLine(this.selectionLead.row).length) {
this.selectionLead.row < this.doc.getLength() - 1 && this.moveCursorTo(this.selectionLead.row + 1, 0)
}else {
- this.moveCursorBy(0, 1)
+ var a = this.doc, b = a.getTabSize(), c = this.selectionLead;
+ a.isTabStop(c) && a.getLine(c.row).slice(c.column, c.column + b).split(" ").length - 1 == b ? this.moveCursorBy(0, b) : this.moveCursorBy(0, 1)
}
};
this.moveCursorLineStart = function() {
@@ -199,7 +205,7 @@ define(function(d) {
};
this.moveCursorWordLeft = function() {
var a = this.selectionLead.row, b = this.selectionLead.column, c = this.doc.getLine(a);
- c = h.stringReverse(c.substring(0, b));
+ c = i.stringReverse(c.substring(0, b));
this.doc.nonTokenRe.lastIndex = 0;
this.doc.tokenRe.lastIndex = 0;
if(b == 0) {
@@ -226,7 +232,7 @@ define(function(d) {
a = this.$clipPositionToDocument(a, b);
if(a.row !== this.selectionLead.row || a.column !== this.selectionLead.column) {
this.selectionLead = a;
- this.$dispatchEvent("changeCursor", {data:this.getCursor()})
+ this._dispatchEvent("changeCursor", {data:this.getCursor()})
}
};
this.moveCursorUp = function() {
@@ -251,5 +257,5 @@ define(function(d) {
return{row:a.row, column:a.column}
}
}).call(d.prototype);
- return d
+ g.Selection = d
});
\ No newline at end of file
diff --git a/build/ace/test/all.js b/build/ace/test/all.js
index ece34003..3053c7c9 100644
--- a/build/ace/test/all.js
+++ b/build/ace/test/all.js
@@ -1,4 +1,4 @@
-require({paths:{ace:"../src/ace"}}, ["ace/test/assertions", "ace/test/ChangeDocumentTest"], function(a) {
- console.log(a);
- alert("a " + a)
-});
\ No newline at end of file
+require("../../../support/paths");
+var async = require("async");
+async.concat(require("./change_document_test"), require("./document_test"), require("./event_emitter_test"), require("./navigation_test"), require("./range_test"), require("./search_test"), require("./selection_test"), require("./text_edit_test"), require("./mode/css_test"), require("./mode/css_tokenizer_test"), require("./mode/html_test"), require("./mode/html_tokenizer_test"), require("./mode/javascript_test"), require("./mode/javascript_tokenizer_test"), require("./mode/text_test"), require("./mode/xml_test"),
+require("./mode/xml_tokenizer_test")).exec();
\ No newline at end of file
diff --git a/build/ace/test/assertions.js b/build/ace/test/assertions.js
index e69de29b..c1e0c891 100644
--- a/build/ace/test/assertions.js
+++ b/build/ace/test/assertions.js
@@ -0,0 +1,18 @@
+define(function(e, f, g) {
+ var a = e("assert");
+ a.position = function(b, c, d) {
+ a.equal(b.row, c);
+ a.equal(b.column, d)
+ };
+ a.range = function(b, c, d, h, i) {
+ a.position(b.start, c, d);
+ a.position(b.end, h, i)
+ };
+ a.notOk = function(b) {
+ a.equal(b, false)
+ };
+ f.jsonEquals = function(b, c) {
+ a.equal(JSON.stringify(b), JSON.stringify(c))
+ };
+ g.exports = a
+});
\ No newline at end of file
diff --git a/build/ace/test/change_document_test.js b/build/ace/test/change_document_test.js
index e69de29b..c10c8a58 100644
--- a/build/ace/test/change_document_test.js
+++ b/build/ace/test/change_document_test.js
@@ -0,0 +1,83 @@
+define(function(c, d, f) {
+ c("./mockdom");
+ var e = c("../document").Document, g = c("../editor").Editor, h = c("../mode/text").Mode, i = c("../mode/javascript").Mode, j = c("./mockrenderer"), a = c("./assertions");
+ d = {setUp:function() {
+ this.doc1 = new e("abc\ndef");
+ this.doc2 = new e("ghi\njkl");
+ this.editor = new g(new j)
+ }, "test: change document":function() {
+ this.editor.setDocument(this.doc1);
+ a.equal(this.editor.getDocument(), this.doc1);
+ this.editor.setDocument(this.doc2);
+ a.equal(this.editor.getDocument(), this.doc2)
+ }, "test: only changes to the new document should have effect":function() {
+ var b = false;
+ this.editor.onDocumentChange = function() {
+ b = true
+ };
+ this.editor.setDocument(this.doc1);
+ this.editor.setDocument(this.doc2);
+ this.doc1.duplicateLines(0, 0);
+ a.notOk(b);
+ this.doc2.duplicateLines(0, 0);
+ a.notOk(b)
+ }, "test: should use cursor of new document":function() {
+ this.doc1.getSelection().moveCursorTo(0, 1);
+ this.doc2.getSelection().moveCursorTo(1, 0);
+ this.editor.setDocument(this.doc1);
+ a.position(this.editor.getCursorPosition(), 0, 1);
+ this.editor.setDocument(this.doc2);
+ a.position(this.editor.getCursorPosition(), 1, 0)
+ }, "test: only changing the cursor of the new doc should not have an effect":function() {
+ this.editor.onCursorChange = function() {
+ b = true
+ };
+ this.editor.setDocument(this.doc1);
+ this.editor.setDocument(this.doc2);
+ a.position(this.editor.getCursorPosition(), 0, 0);
+ var b = false;
+ this.doc1.getSelection().moveCursorTo(0, 1);
+ a.position(this.editor.getCursorPosition(), 0, 0);
+ a.notOk(b);
+ this.doc2.getSelection().moveCursorTo(1, 1);
+ a.position(this.editor.getCursorPosition(), 1, 1);
+ a.ok(b)
+ }, "test: should use selection of new document":function() {
+ this.doc1.getSelection().selectTo(0, 1);
+ this.doc2.getSelection().selectTo(1, 0);
+ this.editor.setDocument(this.doc1);
+ a.position(this.editor.getSelection().getSelectionLead(), 0, 1);
+ this.editor.setDocument(this.doc2);
+ a.position(this.editor.getSelection().getSelectionLead(), 1, 0)
+ }, "test: only changing the selection of the new doc should not have an effect":function() {
+ this.editor.onSelectionChange = function() {
+ b = true
+ };
+ this.editor.setDocument(this.doc1);
+ this.editor.setDocument(this.doc2);
+ a.position(this.editor.getSelection().getSelectionLead(), 0, 0);
+ var b = false;
+ this.doc1.getSelection().selectTo(0, 1);
+ a.position(this.editor.getSelection().getSelectionLead(), 0, 0);
+ a.notOk(b);
+ this.doc2.getSelection().selectTo(1, 1);
+ a.position(this.editor.getSelection().getSelectionLead(), 1, 1);
+ a.ok(b)
+ }, "test: should use mode of new document":function() {
+ this.editor.onDocumentModeChange = function() {
+ b = true
+ };
+ this.editor.setDocument(this.doc1);
+ this.editor.setDocument(this.doc2);
+ var b = false;
+ this.doc1.setMode(new h);
+ a.notOk(b);
+ this.doc2.setMode(new i);
+ a.ok(b)
+ }};
+ f.exports = c("async/test").testcase(d)
+});
+if(module === require.main) {
+ require("../../../support/paths");
+ exports.exec()
+};
\ No newline at end of file
diff --git a/build/ace/test/document_test.js b/build/ace/test/document_test.js
index 2e8f4bdd..d0d6e798 100644
--- a/build/ace/test/document_test.js
+++ b/build/ace/test/document_test.js
@@ -1,153 +1,163 @@
-/*
- LGPLv3
-*/
-require("../../../support/paths");
-var Document = require("../document"), UndoManager = require("../undomanager"), MockRenderer = require("./mockrenderer"), Range = require("../range"), assert = require("./assertions"), async = require("async"), Test = {"test: find matching opening bracket":function() {
- var a = new Document(["(()(", "())))"]);
- assert.position(a.findMatchingBracket({row:0, column:3}), 0, 1);
- assert.position(a.findMatchingBracket({row:1, column:2}), 1, 0);
- assert.position(a.findMatchingBracket({row:1, column:3}), 0, 3);
- assert.position(a.findMatchingBracket({row:1, column:4}), 0, 0);
- assert.equal(a.findMatchingBracket({row:1, column:5}), null)
-}, "test: find matching closing bracket":function() {
- var a = new Document(["(()(", "())))"]);
- assert.position(a.findMatchingBracket({row:1, column:1}), 1, 1);
- assert.position(a.findMatchingBracket({row:1, column:1}), 1, 1);
- assert.position(a.findMatchingBracket({row:0, column:4}), 1, 2);
- assert.position(a.findMatchingBracket({row:0, column:2}), 0, 2);
- assert.position(a.findMatchingBracket({row:0, column:1}), 1, 3);
- assert.equal(a.findMatchingBracket({row:0, column:0}), null)
-}, "test: match different bracket types":function() {
- var a = new Document(["({[", ")]}"]);
- assert.position(a.findMatchingBracket({row:0, column:1}), 1, 0);
- assert.position(a.findMatchingBracket({row:0, column:2}), 1, 2);
- assert.position(a.findMatchingBracket({row:0, column:3}), 1, 1);
- assert.position(a.findMatchingBracket({row:1, column:1}), 0, 0);
- assert.position(a.findMatchingBracket({row:1, column:2}), 0, 2);
- assert.position(a.findMatchingBracket({row:1, column:3}), 0, 1)
-}, "test: move lines down":function() {
- var a = new Document(["1", "2", "3", "4"]);
- console.log(a.toString().replace(/\n/g, "\\n"));
- a.moveLinesDown(0, 1);
- console.log(a.toString().replace(/\n/g, "\\n"));
- assert.equal(a.toString(), "3\n1\n2\n4");
- a.moveLinesDown(1, 2);
- assert.equal(a.toString(), "3\n4\n1\n2");
- a.moveLinesDown(2, 3);
- assert.equal(a.toString(), "3\n4\n1\n2");
- a.moveLinesDown(2, 2);
- assert.equal(a.toString(), "3\n4\n2\n1")
-}, "__test: move lines up":function() {
- var a = new Document(["1", "2", "3", "4"]);
- console.log(a.toString().replace(/\n/g, "\\n"));
- a.moveLinesUp(2, 3);
- console.log(a.toString().replace(/\n/g, "\\n"));
- assert.equal(a.toString(), "1\n3\n4\n2");
- a.moveLinesUp(1, 2);
- assert.equal(a.toString(), "3\n4\n1\n2");
- a.moveLinesUp(0, 1);
- assert.equal(a.toString(), "3\n4\n1\n2");
- a.moveLinesUp(2, 2);
- assert.equal(a.toString(), "3\n1\n4\n2")
-}, "test: duplicate lines":function() {
- var a = new Document(["1", "2", "3", "4"]);
- a.duplicateLines(1, 2);
- assert.equal(a.toString(), "1\n2\n3\n2\n3\n4")
-}, "test: duplicate last line":function() {
- var a = new Document(["1", "2", "3"]);
- a.duplicateLines(2, 2);
- assert.equal(a.toString(), "1\n2\n3\n3")
-}, "test: duplicate first line":function() {
- var a = new Document(["1", "2", "3"]);
- a.duplicateLines(0, 0);
- assert.equal(a.toString(), "1\n1\n2\n3")
-}, "test: should handle unix style new lines":function() {
- var a = new Document(["1", "2", "3"]);
- assert.equal(a.toString(), "1\n2\n3")
-}, "test: should handle windows style new lines":function() {
- var a = new Document("1\r\n2\r\n3");
- a.setNewLineMode("unix");
- assert.equal(a.toString(), "1\n2\n3")
-}, "test: set new line mode to 'windows' should use '\r\n' as new lines":function() {
- var a = new Document("1\n2\n3");
- a.setNewLineMode("windows");
- assert.equal(a.toString(), "1\r\n2\r\n3")
-}, "test: set new line mode to 'unix' should use '\n' as new lines":function() {
- var a = new Document("1\r\n2\r\n3");
- a.setNewLineMode("unix");
- assert.equal(a.toString(), "1\n2\n3")
-}, "test: set new line mode to 'auto' should detect the incoming nl type":function() {
- var a = new Document("1\n2\n3");
- a.setNewLineMode("auto");
- assert.equal(a.toString(), "1\n2\n3");
- a = new Document("1\r\n2\r\n3");
- a.setNewLineMode("auto");
- assert.equal(a.toString(), "1\r\n2\r\n3");
- a.replace(new Range(0, 0, 2, 1), "4\n5\n6");
- assert.equal("4\n5\n6", a.toString())
-}, "__test: undo/redo for delete line":function() {
- var a = new Document(["111", "222", "333"]), b = new UndoManager;
- a.setUndoManager(b);
- var d = a.toString(), c = new Editor(new MockRenderer, a);
- c.removeLines();
- var e = a.toString();
- assert.equal(e, "222\n333");
- a.$informUndoManager.call();
- c.removeLines();
- var f = a.toString();
- assert.equal(f, "333");
- a.$informUndoManager.call();
- c.removeLines();
- c = a.toString();
- assert.equal(c, "");
- a.$informUndoManager.call();
- b.undo();
- a.$informUndoManager.call();
- assert.equal(a.toString(), f);
- b.undo();
- a.$informUndoManager.call();
- assert.equal(a.toString(), e);
- b.undo();
- a.$informUndoManager.call();
- assert.equal(a.toString(), d);
- b.undo();
- a.$informUndoManager.call();
- assert.equal(a.toString(), d)
-}, "test: convert document to screen coordinates":function() {
- var a = new Document("01234\t567890\t1234");
- a.setTabSize(4);
- assert.equal(a.documentToScreenColumn(0, 0), 0);
- assert.equal(a.documentToScreenColumn(0, 4), 4);
- assert.equal(a.documentToScreenColumn(0, 5), 5);
- assert.equal(a.documentToScreenColumn(0, 6), 9);
- assert.equal(a.documentToScreenColumn(0, 12), 15);
- assert.equal(a.documentToScreenColumn(0, 13), 19);
- a.setTabSize(2);
- assert.equal(a.documentToScreenColumn(0, 0), 0);
- assert.equal(a.documentToScreenColumn(0, 4), 4);
- assert.equal(a.documentToScreenColumn(0, 5), 5);
- assert.equal(a.documentToScreenColumn(0, 6), 7);
- assert.equal(a.documentToScreenColumn(0, 12), 13);
- assert.equal(a.documentToScreenColumn(0, 13), 15)
-}, "test: convert document to scrren coordinates with leading tabs":function() {
- var a = new Document("\t\t123");
- a.setTabSize(4);
- assert.equal(a.documentToScreenColumn(0, 0), 0);
- assert.equal(a.documentToScreenColumn(0, 1), 4);
- assert.equal(a.documentToScreenColumn(0, 2), 8);
- assert.equal(a.documentToScreenColumn(0, 3), 9)
-}, "test: convert screen to document coordinates":function() {
- var a = new Document("01234\t567890\t1234");
- a.setTabSize(4);
- assert.equal(a.screenToDocumentColumn(0, 0), 0);
- assert.equal(a.screenToDocumentColumn(0, 4), 4);
- assert.equal(a.screenToDocumentColumn(0, 5), 5);
- assert.equal(a.screenToDocumentColumn(0, 6), 5);
- assert.equal(a.screenToDocumentColumn(0, 7), 5);
- assert.equal(a.screenToDocumentColumn(0, 8), 5);
- assert.equal(a.screenToDocumentColumn(0, 9), 6);
- assert.equal(a.screenToDocumentColumn(0, 15), 12);
- assert.equal(a.screenToDocumentColumn(0, 19), 13)
-}};
-module.exports = require("async/test").testcase(Test);
-module === require.main && module.exports.exec();
\ No newline at end of file
+define(function(e, g, i) {
+ var c = e("../document").Document, h = e("../undomanager").UndoManager;
+ e("./mockrenderer");
+ var f = e("../range").Range, b = e("./assertions");
+ e("async");
+ g = {"test: find matching opening bracket":function() {
+ var a = new c(["(()(", "())))"]);
+ b.position(a.findMatchingBracket({row:0, column:3}), 0, 1);
+ b.position(a.findMatchingBracket({row:1, column:2}), 1, 0);
+ b.position(a.findMatchingBracket({row:1, column:3}), 0, 3);
+ b.position(a.findMatchingBracket({row:1, column:4}), 0, 0);
+ b.equal(a.findMatchingBracket({row:1, column:5}), null)
+ }, "test: find matching closing bracket":function() {
+ var a = new c(["(()(", "())))"]);
+ b.position(a.findMatchingBracket({row:1, column:1}), 1, 1);
+ b.position(a.findMatchingBracket({row:1, column:1}), 1, 1);
+ b.position(a.findMatchingBracket({row:0, column:4}), 1, 2);
+ b.position(a.findMatchingBracket({row:0, column:2}), 0, 2);
+ b.position(a.findMatchingBracket({row:0, column:1}), 1, 3);
+ b.equal(a.findMatchingBracket({row:0, column:0}), null)
+ }, "test: match different bracket types":function() {
+ var a = new c(["({[", ")]}"]);
+ b.position(a.findMatchingBracket({row:0, column:1}), 1, 0);
+ b.position(a.findMatchingBracket({row:0, column:2}), 1, 2);
+ b.position(a.findMatchingBracket({row:0, column:3}), 1, 1);
+ b.position(a.findMatchingBracket({row:1, column:1}), 0, 0);
+ b.position(a.findMatchingBracket({row:1, column:2}), 0, 2);
+ b.position(a.findMatchingBracket({row:1, column:3}), 0, 1)
+ }, "test: move lines down":function() {
+ var a = new c(["a1", "a2", "a3", "a4"]);
+ a.moveLinesDown(0, 1);
+ b.equal(a.toString(), "a3\na1\na2\na4");
+ a.moveLinesDown(1, 2);
+ b.equal(a.toString(), "a3\na4\na1\na2");
+ a.moveLinesDown(2, 3);
+ b.equal(a.toString(), "a3\na4\na1\na2");
+ a.moveLinesDown(2, 2);
+ b.equal(a.toString(), "a3\na4\na2\na1")
+ }, "test: move lines up":function() {
+ var a = new c(["a1", "a2", "a3", "a4"]);
+ a.moveLinesUp(2, 3);
+ b.equal(a.toString(), "a1\na3\na4\na2");
+ a.moveLinesUp(1, 2);
+ b.equal(a.toString(), "a3\na4\na1\na2");
+ a.moveLinesUp(0, 1);
+ b.equal(a.toString(), "a3\na4\na1\na2");
+ a.moveLinesUp(2, 2);
+ b.equal(a.toString(), "a3\na1\na4\na2")
+ }, "test: duplicate lines":function() {
+ var a = new c(["1", "2", "3", "4"]);
+ a.duplicateLines(1, 2);
+ b.equal(a.toString(), "1\n2\n3\n2\n3\n4")
+ }, "test: duplicate last line":function() {
+ var a = new c(["1", "2", "3"]);
+ a.duplicateLines(2, 2);
+ b.equal(a.toString(), "1\n2\n3\n3")
+ }, "test: duplicate first line":function() {
+ var a = new c(["1", "2", "3"]);
+ a.duplicateLines(0, 0);
+ b.equal(a.toString(), "1\n1\n2\n3")
+ }, "test: should handle unix style new lines":function() {
+ var a = new c(["1", "2", "3"]);
+ b.equal(a.toString(), "1\n2\n3")
+ }, "test: should handle windows style new lines":function() {
+ var a = new c("1\r\n2\r\n3");
+ a.setNewLineMode("unix");
+ b.equal(a.toString(), "1\n2\n3")
+ }, "test: set new line mode to 'windows' should use '\r\n' as new lines":function() {
+ var a = new c("1\n2\n3");
+ a.setNewLineMode("windows");
+ b.equal(a.toString(), "1\r\n2\r\n3")
+ }, "test: set new line mode to 'unix' should use '\n' as new lines":function() {
+ var a = new c("1\r\n2\r\n3");
+ a.setNewLineMode("unix");
+ b.equal(a.toString(), "1\n2\n3")
+ }, "test: set new line mode to 'auto' should detect the incoming nl type":function() {
+ var a = new c("1\n2\n3");
+ a.setNewLineMode("auto");
+ b.equal(a.toString(), "1\n2\n3");
+ a = new c("1\r\n2\r\n3");
+ a.setNewLineMode("auto");
+ b.equal(a.toString(), "1\r\n2\r\n3");
+ a.replace(new f(0, 0, 2, 1), "4\n5\n6");
+ b.equal("4\n5\n6", a.toString())
+ }, "test: convert document to screen coordinates":function() {
+ var a = new c("01234\t567890\t1234");
+ a.setTabSize(4);
+ b.equal(a.documentToScreenColumn(0, 0), 0);
+ b.equal(a.documentToScreenColumn(0, 4), 4);
+ b.equal(a.documentToScreenColumn(0, 5), 5);
+ b.equal(a.documentToScreenColumn(0, 6), 9);
+ b.equal(a.documentToScreenColumn(0, 12), 15);
+ b.equal(a.documentToScreenColumn(0, 13), 19);
+ a.setTabSize(2);
+ b.equal(a.documentToScreenColumn(0, 0), 0);
+ b.equal(a.documentToScreenColumn(0, 4), 4);
+ b.equal(a.documentToScreenColumn(0, 5), 5);
+ b.equal(a.documentToScreenColumn(0, 6), 7);
+ b.equal(a.documentToScreenColumn(0, 12), 13);
+ b.equal(a.documentToScreenColumn(0, 13), 15)
+ }, "test: convert document to scrren coordinates with leading tabs":function() {
+ var a = new c("\t\t123");
+ a.setTabSize(4);
+ b.equal(a.documentToScreenColumn(0, 0), 0);
+ b.equal(a.documentToScreenColumn(0, 1), 4);
+ b.equal(a.documentToScreenColumn(0, 2), 8);
+ b.equal(a.documentToScreenColumn(0, 3), 9)
+ }, "test: convert screen to document coordinates":function() {
+ var a = new c("01234\t567890\t1234");
+ a.setTabSize(4);
+ b.equal(a.screenToDocumentColumn(0, 0), 0);
+ b.equal(a.screenToDocumentColumn(0, 4), 4);
+ b.equal(a.screenToDocumentColumn(0, 5), 5);
+ b.equal(a.screenToDocumentColumn(0, 6), 5);
+ b.equal(a.screenToDocumentColumn(0, 7), 5);
+ b.equal(a.screenToDocumentColumn(0, 8), 5);
+ b.equal(a.screenToDocumentColumn(0, 9), 6);
+ b.equal(a.screenToDocumentColumn(0, 15), 12);
+ b.equal(a.screenToDocumentColumn(0, 19), 13)
+ }, "test: insert text in multiple rows":function() {
+ var a = new c(["12", "", "abcd"]), d = a.multiRowInsert([0, 1, 2], 2, "juhu 1");
+ b.equal(d.rows, 0);
+ b.equal(d.columns, 6);
+ b.equal(a.toString(), "12juhu 1\n juhu 1\nabjuhu 1cd")
+ }, "test: undo insert text in multiple rows":function() {
+ var a = new c(["12", "", "abcd"]), d = new h;
+ a.setUndoManager(d);
+ a.multiRowInsert([0, 1, 2], 2, "juhu 1");
+ a.$informUndoManager.call();
+ b.equal(a.toString(), "12juhu 1\n juhu 1\nabjuhu 1cd");
+ d.undo();
+ b.equal(a.toString(), "12\n\nabcd");
+ d.redo();
+ b.equal(a.toString(), "12juhu 1\n juhu 1\nabjuhu 1cd")
+ }, "test: insert new line in multiple rows":function() {
+ var a = new c(["12", "", "abcd"]), d = a.multiRowInsert([0, 1, 2], 2, "\n");
+ b.equal(d.rows, 1);
+ b.equal(a.toString(), "12\n\n \n\nab\ncd")
+ }, "test: insert multi line text in multiple rows":function() {
+ var a = new c(["12", "", "abcd"]), d = a.multiRowInsert([0, 1, 2], 2, "juhu\n12");
+ b.equal(d.rows, 1);
+ b.equal(a.toString(), "12juhu\n12\n juhu\n12\nabjuhu\n12cd")
+ }, "test: remove right in multiple rows":function() {
+ var a = new c(["12", "", "abcd"]);
+ a.multiRowRemove([0, 1, 2], new f(0, 2, 0, 3));
+ b.equal(a.toString(), "12\n\nabd")
+ }, "test: undo remove right in multiple rows":function() {
+ var a = new c(["12", "", "abcd"]), d = new h;
+ a.setUndoManager(d);
+ a.multiRowRemove([0, 1, 2], new f(0, 1, 0, 3));
+ a.$informUndoManager.call();
+ b.equal(a.toString(), "1\n\nad");
+ d.undo();
+ b.equal(a.toString(), "12\n\nabcd");
+ d.redo();
+ b.equal(a.toString(), "1\n\nad")
+ }};
+ i.exports = e("async/test").testcase(g)
+});
+if(module === require.main) {
+ require("../../../support/paths");
+ exports.exec()
+};
\ No newline at end of file
diff --git a/build/ace/test/event_emitter_test.js b/build/ace/test/event_emitter_test.js
index e69de29b..86797fb4 100644
--- a/build/ace/test/event_emitter_test.js
+++ b/build/ace/test/event_emitter_test.js
@@ -0,0 +1,18 @@
+require("../../../support/paths");
+var oop = require("pilot/oop");
+EventEmitter = require("pilot/event_emitter").EventEmitter;
+assert = require("./assertions");
+var Emitter = function() {
+};
+oop.implement(Emitter.prototype, EventEmitter);
+var Test = {"test: dispatch event with no data":function() {
+ var a = new Emitter, b = false;
+ a.addEventListener("juhu", function(c) {
+ b = true;
+ assert.equal(c.type, "juhu")
+ });
+ a._dispatchEvent("juhu");
+ assert.ok(b)
+}};
+module.exports = require("async/test").testcase(Test);
+module === require.main && module.exports.exec();
\ No newline at end of file
diff --git a/build/ace/test/mockdom.js b/build/ace/test/mockdom.js
new file mode 100644
index 00000000..89879485
--- /dev/null
+++ b/build/ace/test/mockdom.js
@@ -0,0 +1,6 @@
+var dom = require("jsdom/level2/html").dom.level2.html, browser = require("jsdom/browser/index").windowAugmentation(dom);
+global.document = browser.document;
+global.window = browser.window;
+global.self = browser.self;
+global.navigator = browser.navigator;
+global.location = browser.location;
\ No newline at end of file
diff --git a/build/ace/test/mockrenderer.js b/build/ace/test/mockrenderer.js
index 54fe2288..3540aec7 100644
--- a/build/ace/test/mockrenderer.js
+++ b/build/ace/test/mockrenderer.js
@@ -1,6 +1,3 @@
-/*
- LGPLv3
-*/
define(function() {
MockRenderer = function(a) {
this.container = document.createElement("div");
@@ -54,6 +51,8 @@ define(function() {
};
MockRenderer.prototype.updateFull = function() {
};
+ MockRenderer.prototype.updateText = function() {
+ };
MockRenderer.prototype.showCursor = function() {
};
MockRenderer.prototype.visualizeFocus = function() {
diff --git a/build/ace/test/mode/css_test.js b/build/ace/test/mode/css_test.js
index d2a1eef8..360fbf11 100644
--- a/build/ace/test/mode/css_test.js
+++ b/build/ace/test/mode/css_test.js
@@ -1,21 +1,24 @@
-/*
- LGPLv3
-*/
-require.def(["ace/Document", "ace/Range", "ace/mode/Css"], function(b, c, d) {
- new TestCase("mode.CssTest", {setUp:function() {
- this.mode = new d
+define(function(b, c, e) {
+ var f = b("ace/document").Document, g = b("ace/mode/css").Mode, a = b("../assertions");
+ c = {setUp:function() {
+ this.mode = new g
}, "test: toggle comment lines should not do anything":function() {
- var a = new b(" abc\ncde\nfg"), e = new c(0, 3, 1, 1);
- this.mode.toggleCommentLines("start", a, e);
- assertEquals(" abc\ncde\nfg", a.toString())
+ var d = new f(" abc\ncde\nfg");
+ this.mode.toggleCommentLines("start", d, 0, 1);
+ a.equal(" abc\ncde\nfg", d.toString())
}, "test: lines should keep indentation":function() {
- assertEquals(" ", this.mode.getNextLineIndent("start", " abc", " "));
- assertEquals("\t", this.mode.getNextLineIndent("start", "\tabc", " "))
+ a.equal(" ", this.mode.getNextLineIndent("start", " abc", " "));
+ a.equal("\t", this.mode.getNextLineIndent("start", "\tabc", " "))
}, "test: new line after { should increase indent":function() {
- assertEquals(" ", this.mode.getNextLineIndent("start", " abc{", " "));
- assertEquals("\t ", this.mode.getNextLineIndent("start", "\tabc { ", " "))
+ a.equal(" ", this.mode.getNextLineIndent("start", " abc{", " "));
+ a.equal("\t ", this.mode.getNextLineIndent("start", "\tabc { ", " "))
}, "test: no indent increase after { in a comment":function() {
- assertEquals(" ", this.mode.getNextLineIndent("start", " /*{", " "));
- assertEquals(" ", this.mode.getNextLineIndent("start", " /*{ ", " "))
- }})
-});
\ No newline at end of file
+ a.equal(" ", this.mode.getNextLineIndent("start", " /*{", " "));
+ a.equal(" ", this.mode.getNextLineIndent("start", " /*{ ", " "))
+ }};
+ e.exports = b("async/test").testcase(c)
+});
+if(module === require.main) {
+ require("../../../support/paths");
+ exports.exec()
+};
\ No newline at end of file
diff --git a/build/ace/test/mode/css_tokenizer_test.js b/build/ace/test/mode/css_tokenizer_test.js
index 759dfb95..e3ef4566 100644
--- a/build/ace/test/mode/css_tokenizer_test.js
+++ b/build/ace/test/mode/css_tokenizer_test.js
@@ -1,26 +1,33 @@
-/*
- LGPLv3
-*/
-require.def(["ace/mode/Css"], function(b) {
- new TestCase("mode.CssTest", {setUp:function() {
- this.tokenizer = (new b).getTokenizer()
+define(function(c, d, e) {
+ var f = c("ace/mode/css").Mode, b = c("../assertions");
+ d = {setUp:function() {
+ this.tokenizer = (new f).getTokenizer()
}, "test: tokenize pixel number":function() {
var a = this.tokenizer.getLineTokens("-12px", "start").tokens;
- assertEquals(1, a.length);
- assertEquals("number", a[0].type)
+ b.equal(1, a.length);
+ b.equal("constant.numeric", a[0].type)
}, "test: tokenize hex3 color":function() {
var a = this.tokenizer.getLineTokens("#abc", "start").tokens;
- assertEquals(1, a.length);
- assertEquals("number", a[0].type)
+ b.equal(1, a.length);
+ b.equal("constant.numeric", a[0].type)
}, "test: tokenize hex6 color":function() {
var a = this.tokenizer.getLineTokens("#abc012", "start").tokens;
- assertEquals(1, a.length);
- assertEquals("number", a[0].type)
+ b.equal(1, a.length);
+ b.equal("constant.numeric", a[0].type)
}, "test: tokenize parens":function() {
var a = this.tokenizer.getLineTokens("{()}", "start").tokens;
- assertEquals(3, a.length);
- assertEquals("lparen", a[0].type);
- assertEquals("text", a[1].type);
- assertEquals("rparen", a[2].type)
- }})
-});
\ No newline at end of file
+ b.equal(3, a.length);
+ b.equal("lparen", a[0].type);
+ b.equal("text", a[1].type);
+ b.equal("rparen", a[2].type)
+ }, "test for last rule in ruleset to catch capturing group bugs":function() {
+ var a = this.tokenizer.getLineTokens("top", "start").tokens;
+ b.equal(1, a.length);
+ b.equal("support.type", a[0].type)
+ }};
+ e.exports = c("async/test").testcase(d, "css tokenizer")
+});
+if(module === require.main) {
+ require("../../../support/paths");
+ exports.exec()
+};
\ No newline at end of file
diff --git a/build/ace/test/mode/html_test.js b/build/ace/test/mode/html_test.js
index 2af56ba6..7c52107c 100644
--- a/build/ace/test/mode/html_test.js
+++ b/build/ace/test/mode/html_test.js
@@ -1,16 +1,20 @@
-/*
- LGPLv3
-*/
-require.def(["ace/Document", "ace/Range", "ace/mode/Html"], function(b, c, d) {
- new TestCase("mode.HtmlTest", {setUp:function() {
- this.mode = new d
+define(function(a, c, e) {
+ var f = a("ace/document").Document, g = a("ace/range").Range, h = a("ace/mode/html").Mode, b = a("../assertions");
+ c = {setUp:function() {
+ this.mode = new h
}, "test: toggle comment lines should not do anything":function() {
- var a = new b([" abc", "cde", "fg"]), e = new c(0, 3, 1, 1);
- this.mode.toggleCommentLines("start", a, e);
- assertEquals(" abc\ncde\nfg", a.toString())
+ var d = new f([" abc", "cde", "fg"]);
+ new g(0, 3, 1, 1);
+ this.mode.toggleCommentLines("start", d, 0, 1);
+ b.equal(" abc\ncde\nfg", d.toString())
}, "test: next line indent should be the same as the current line indent":function() {
- assertEquals(" ", this.mode.getNextLineIndent("start", " abc"));
- assertEquals("", this.mode.getNextLineIndent("start", "abc"));
- assertEquals("\t", this.mode.getNextLineIndent("start", "\tabc"))
- }})
-});
\ No newline at end of file
+ b.equal(" ", this.mode.getNextLineIndent("start", " abc"));
+ b.equal("", this.mode.getNextLineIndent("start", "abc"));
+ b.equal("\t", this.mode.getNextLineIndent("start", "\tabc"))
+ }};
+ e.exports = a("async/test").testcase(c)
+});
+if(module === require.main) {
+ require("../../../support/paths");
+ exports.exec()
+};
\ No newline at end of file
diff --git a/build/ace/test/mode/html_tokenizer_test.js b/build/ace/test/mode/html_tokenizer_test.js
index 3ed6b4b2..12b5ed6a 100644
--- a/build/ace/test/mode/html_tokenizer_test.js
+++ b/build/ace/test/mode/html_tokenizer_test.js
@@ -1,21 +1,24 @@
-/*
- LGPLv3
-*/
-require.def(["ace/mode/Html"], function(b) {
- new TestCase("mode.HtmlTest", {setUp:function() {
- this.tokenizer = (new b).getTokenizer()
+define(function(c, d, e) {
+ var f = c("ace/mode/html").Mode, a = c("../assertions");
+ d = {setUp:function() {
+ this.tokenizer = (new f).getTokenizer()
}, "test: tokenize embedded script":function() {
- var a = this.tokenizer.getLineTokens("