diff --git a/README.md b/README.md deleted file mode 100644 index 07b9e85..0000000 --- a/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# arcanejs-server -. -Installing: - -Clone this project -git clone --recursive https://github.com/flunk/arcanejs-server.git -Use recursive to also clone the subrepositories - -#Install node modules by running -npm install - -run index.js - - -Windows users need to install -Either Cygwin or MSYS2 (I've had more luck wuth MSYS2) -And the corresponding win-pty from https://github.com/rprichard/winpty/releases - diff --git a/inc/cache.js b/inc/cache.js deleted file mode 100644 index 70ebce7..0000000 --- a/inc/cache.js +++ /dev/null @@ -1,98 +0,0 @@ -class Cache { - constructor(express, app, io, rootDir){ - let md5 = require('md5'); - this.fs = require('fs'); - this.resolve = require("path").resolve; - this.express = express; - this.app = app; - this.io = io; - - let fs = require('fs'); - let path = require('path'); - this.rootDir = this.resolve(path.dirname(fs.realpathSync(__filename)) + "/../"); - - console.log("Initialising cache..."); - this.items = {}; - - app.post('/api/cache/getpackhash', (req, res)=>{ - let files = req.body.manifest; - let hash = md5(files.toString()); - - if(this.items[hash] === undefined){ - let pack = this.readFiles(files); - let item = { - js : pack.js, - css: pack.css, - timeStamp : new Date().getTime() - } - - this.items[hash] = item; - res.send({hash:hash, timeStamp: item.timeStamp}); - } else { - res.send({hash:hash, timeStamp: this.items[hash].timeStamp}); - } - }); - - app.get('/api/cache/pack/:hash', (req, res) => { - let splitParams = req.params.hash.split("."); - let hash = splitParams[0]; - let type = splitParams[1]; - if(this.items[hash] !== undefined){ - if(type === "css"){ - res.contentType("blaat.css"); - res.send(this.items[hash][type]); - } else if(type === "js"){ - res.contentType("blaat.js"); - res.send(this.items[hash][type]); - } - else { - res.statusCode = 404; - res.send("Not found"); - } - } else { - res.statusCode = 404; - res.send("Not found"); - } - }); - } - - readFiles(files){ - let result = {js:"", css:""}; - let i = 0; - while( i < files.length ){ - let file = files[i]; - i++; - - let subDir = "/public/"; - - if(file.startsWith("/apps/")){ - subDir = "/plugins/"; - - let pluginName = file.split("/")[2]; - - file = file.replace("/apps/"+pluginName, pluginName+"/public"); - } - - let fullPath = this.rootDir + subDir + file; - let absolutePath = this.resolve(fullPath); - - //Check for directory traversal - if(absolutePath.startsWith(this.rootDir + subDir)){ - if(file.endsWith(".js")){ - result.js += this.fs.readFileSync(fullPath); - - } else if(file.endsWith(".css")){ - - let css = this.fs.readFileSync(fullPath); - this.fs.readFileSync(fullPath); - result.css += css; - } - } - } - return result; - } -} - -module.exports = function ( express, app, io, rootDir) { - return new Cache(express, app, io, rootDir); -} diff --git a/index.js b/index.js deleted file mode 100644 index d9a7861..0000000 --- a/index.js +++ /dev/null @@ -1,427 +0,0 @@ -'use strict'; -var storage = require('node-persist'); -var bcrypt = require('bcryptjs'); -var cookieParser = require('cookie-parser'); -var uuid = require('node-uuid'); -var readlineSync = require('readline-sync'); -var fs = require('fs'); -var express = require('express'); -var qrcode = require('qrcode-terminal'); -var speakeasy = require('speakeasy'); -var resolve = require('path').resolve; -var app = express(); -var bodyParser = require('body-parser'); -var plugins = []; - -app.use(express.static('public')); - -app.use(bodyParser.urlencoded({extended: true})); -app.use(bodyParser.json({limit: '50mb'})); -app.use(cookieParser()); - -storage.initSync(); - -//User stuff -var users = storage.getItem('users'); -app.sessions = storage.getItem('sessions'); -var port = storage.getItem('port'); -var rootDir = storage.getItem('rootDir'); -var options = storage.getItem('options'); - - - -if (!port || !rootDir) { - firstRun(); -} -if (app.sessions == undefined) { - app.sessions = {}; -} - -// Authorization stuff -let authModuleConfig = storage.getItem('auth'); -const AuthModule = require('./modules/auth')(authModuleConfig); -app.authModule = new AuthModule(options.twoFactorEnabled); - -loadPlugins(); - -function loadPlugins() { - var files = fs.readdirSync(__dirname + '/plugins'); - for (var i in files) { - var name = __dirname + '/plugins/' + files[i]; - - if (fs.statSync(name).isDirectory()) { - var plugin = require('./plugins/' + files[i] + '/index.js')(express, app, io); - console.log(plugin.name); - plugins.push(plugin); - } - } -} - -function firstRun() { - console.log('ArcaneJS-Server is run for the first time. Some variables need to be set before ArcaneJS can start.'); - askAuthenticationMethod(); - addUserDialog(); - options = {}; - - port = readlineSync.question('HTTP Port to use : '); - storage.setItem('port', port); - rootDir = readlineSync.question('Root directory : '); - storage.setItem('rootDir', rootDir); - - options.twoFactorEnabled = askQuestion('Enable 2 Factor authentication? : '); - options.host = readlineSync.question('Hostname to listen on: '); - - storage.setItem('options', options); -} - -function askAuthenticationMethod() { - console.log('Which authentication method do you want to use?'); - let backends = ['file', 'ldap']; - let index = readlineSync.keyInSelect(backends, 'Which authentication backend do you want to use?'); - let authModuleName = backends[index]; - storage.setItem('auth', {'authModule': authModuleName}); -} - -function addUserDialog() { - console.log('Adding a new user.'); - var user = readlineSync.question('Username : '); - var pass1 = 'a'; - var pass2 = 'b'; - var i = 0; - while (pass1 != pass2) { - if (i > 0) { - console.log('Passwords did not match :('); - } - - pass1 = readlineSync.question('Password : ', { - hideEchoBack: true // The typed text on screen is hidden by `*` (default). - }); - pass2 = readlineSync.question('Confirm password : ', { - hideEchoBack: true // The typed text on screen is hidden by `*` (default). - }); - i++; - } - - var secret = speakeasy.generateSecret(); - console.log('2FA QR :'); - qrcode.generate(secret.otpauth_url); - addUser(user, pass1, secret.base32); -} - -function askQuestion(question) { - let done = false; - let result = true; - let answer = null; - - while (!done) { - answer = readlineSync.question(question); - if (['y', 'yes'].includes(answer.toLowerCase())) { - done = true; - } else if (['n', 'no'].includes(answer.toLowerCase())) { - result = false; - done = true; - } - } - - return result; -} - - - -function addUser(name, pass, secret) { - var user = {}; - user.name = name; - user.hash = bcrypt.hashSync(pass, bcrypt.genSaltSync(10)); - user.secret = secret; - if (users == undefined) { - users = []; - } - users.push(user); - storage.setItem('users', users); - console.log('User ' + name + ' added.'); - return user; -} - - -//Session stuff -function newSession(username, roles) { - var session = {}; - session.uuid = uuid.v4(); - session.csrfToken = uuid.v4(); - session.username = username; - session.roles = roles; - session.loggedIn = true; - app.sessions[session.uuid] = session; - console.log(session); - storage.setItem('sessions', app.sessions); - return session; -} - -var checkSession = function (req, res, checkCsrf, callback) { - if (app.sessions[req.cookies.sessionId] != null) { - if (app.sessions[req.cookies.sessionId].loggedIn) { - if (checkCsrf) { - if (req.get('X-Csrf-Token') == app.sessions[req.cookies.sessionId].csrfToken) { - let session = app.sessions[req.cookies.sessionId]; - req.session = session; - res.session = session; - callback(session); - } else { - res.statusCode = 401; - res.send('Incorrect CSRF Token'); - } - } else { - callback(app.sessions[req.cookies.sessionId]); - } - - } else { - res.statusCode = 401; - res.send('Session logged out'); - } - } else { - res.statusCode = 401; - res.send('Session unknown'); - } -}; - -app.checkSession = checkSession; - -//API routes -app.get('/api/apps', function (req, res) { - checkSession(req, res, true, function (session) { - var names = []; - var i = 0; - while (i < plugins.length) { - names.push(plugins[i].name); - i++; - } - res.send(names); //TODO: Cache this - }); -}); - -app.get('/api/dir', function (req, res) { - checkSession(req, res, true, function (session) { - let fullPath = resolve(rootDir + req.query.cd); - - if (fullPath.startsWith(rootDir)) { - console.log('Getdir ' + fullPath); - res.sendFile(fullPath); - } else { - res.statusCode = 403; - res.send('Forbidden'); - } - res.send(getFiles(rootDir + req.query.cd)); - }); -}); - -app.get('/api/file/:name', function (req, res) { - checkSession(req, res, true, function (session) { - let fullPath = resolve(rootDir + req.query.cd + req.params.name); - - if (fullPath.startsWith(rootDir)) { - console.log('Getfile ' + fullPath); - res.sendFile(fullPath); - } else { - res.statusCode = 403; - res.send('Forbidden'); - } - }); -}); - -app.post('/api/save/:name', function (req, res) { - checkSession(req, res, true, function (session) { - let fullPath = resolve(rootDir + req.query.cd + req.params.name); - - if (fullPath.startsWith(rootDir)) { - console.log('Saving ' + fullPath); - fs.writeFile(fullPath, req.body.data, function (err, data) { - if (err) { - res.statusCode = 500; - res.send('Error saving'); - } else { - io.sockets.emit('refresh', 'now'); - res.send(true); - } - }); - } else { - res.statusCode = 403; - res.send('Forbidden'); - } - }); -}); - -app.post('/api/newFile/:name', function (req, res) { - checkSession(req, res, true, function (session) { - let fullPath = resolve(rootDir + req.query.cd + req.params.name); - if (fullPath.startsWith(rootDir)) { - console.log('Creating New File ' + fullPath); - fs.lstat(rootDir + req.query.cd + req.params.name, function (err, stats) { - if (err) { - fs.writeFile(fullPath, req.body.data, function (err, data) { - if (err) { - res.statusCode = 418; - res.send('Error creating file'); - } else { - res.send(true); - } - }); - } else { - res.statusCode = 409; - res.send('File exists!'); - } - }); - } else { - res.statusCode = 403; - res.send('Forbidden'); - } - }); -}); - -app.post('/api/newDir', function (req, res) { - checkSession(req, res, true, function (session) { - let fullPath = resolve(rootDir + req.query.cd); - if (fullPath.startsWith(rootDir)) { - console.log('Creating New Directory ' + fullPath); - fs.lstat(rootDir + req.query.cd, function (err, stats) { - if (err) { - fs.mkdirSync(fullPath); - res.send(true); - } else { - res.statusCode = 409; - res.send('Directory exists!'); - } - }); - } else { - res.statusCode = 403; - res.send('Forbidden'); - } - }); -}); - -app.post('/api/delete', function (req, res) { - checkSession(req, res, true, function (session) { - let fullPath = resolve(rootDir + req.query.cd); - - if (fullPath.startsWith(rootDir)) { - console.log('Deleting ' + fullPath); - fs.lstat(fullPath, function (err, stats) { - if (!err) { - if (stats.isDirectory()) { - deleteFolderRecursive(fullPath); - res.send(true); - } else { - fs.unlinkSync(fullPath); - res.send(true); - } - } else { - res.statusCode = 404; - res.send('File doesn\'t exist!'); - } - }); - } else { - res.statusCode = 403; - res.send('Forbidden'); - } - }); -}); - -app.post('/api/reauth', function (req, res) { - checkSession(req, res, false, function (session) { - res.send({csrfToken: session.csrfToken}); - }); -}); - -app.post('/api/login', async (req, res) => { - let username = req.body.data.user; - let password = req.body.data.pass; - let token = req.body.data.token; - try { - username = await app.authModule.login(username, password, token); - let roles = app.authModule.getRoles(username); - console.log(username); - let session = newSession(username, roles); - res.cookie('sessionId', session.uuid, {httpOnly: true}); - res.send({csrfToken: session.csrfToken}); - } catch (err) { - res.statusCode = 401; - res.send(err.message); - } -}); - -var getFiles = function (dir, files_) { - files_ = []; - dir = resolve(dir); - - if (dir.startsWith(rootDir)) { - var files = fs.readdirSync(dir); - for (var i in files) { - var file = {name: files[i]}; - var name = dir + '/' + files[i]; - - file.isDir = fs.statSync(name).isDirectory(); - - files_.push(file); - } - } - - return files_; -}; - -var deleteFolderRecursive = function (path) { - path = resolve(path); - - if (path.startsWith(rootDir)) { - if (fs.existsSync(path)) { - fs.readdirSync(path).forEach(function (file, index) { - var curPath = path + '/' + file; - if (fs.lstatSync(curPath).isDirectory()) { // recurse - deleteFolderRecursive(curPath); - } else { // delete file - fs.unlinkSync(curPath); - } - }); - fs.rmdirSync(path); - } - } -}; - -//var server = app.listen(port); -var server = require('http').createServer(app); -var io = require('socket.io')(server); - -// Websocket stuffs -io.use(function (socket, next) { - //Check if the user is authenticated - var sessionId = socket.request.headers.cookie.split('sessionId=')[1].split(';')[0]; - var csrfToken = socket.handshake.query.csrftoken; - var session = app.sessions[sessionId]; - - if (session != null) { - if (session.csrfToken == csrfToken) { - socket.session = session; - return next(); - } - } - - next(new Error('Authentication error')); -}); - -io.on('connection', function (socket) { - console.log(socket.session.username + ' connected'); - - var i = 0; - while (i < plugins.length) { - if (plugins[i].handleNewSocket) { - plugins[i].handleNewSocket(socket); - } - i++; - } - - socket.on('disconnect', function () { - console.log(socket.session.username + 'disconnect'); - }); -}); - -require('./inc/cache.js')(express, app, io, rootDir); -server.listen(port, options.host); -console.log('Started on port ' + port); diff --git a/modules/auth/file.js b/modules/auth/file.js deleted file mode 100644 index b4c8cb6..0000000 --- a/modules/auth/file.js +++ /dev/null @@ -1,53 +0,0 @@ -const storage = require('node-persist'); -const bcrypt = require('bcryptjs'); -const speakeasy = require('speakeasy'); - -const AUTH_ERR_MSG = 'Authentication failed.'; -const TWO_FACTOR_ERR_MSG = 'Invalid 2FA Token'; - -class FileAuth { - constructor(twoFactorEnabled) { - this.users = storage.getItem('users'); - this.twoFactorEnabled = twoFactorEnabled; - } - - - login(username, password, token) { - let user = this.getUser(username); - this.checkPassword(user, password); - this.check2fa(user, token); - return user.name; - } - - getUser(username) { - for (let user of this.users) { - if (user.name === username) { - return user; - } - } - throw new Error(AUTH_ERR_MSG); - } - - getRoles(username) { - console.log('fileAuth backend does not support roles.'); - return []; - } - - checkPassword(user, password) { - if (!bcrypt.compareSync(password, user.hash)) { - throw new Error(AUTH_ERR_MSG); - } - } - - check2fa(user, token) { - if (this.twoFactorEnabled) { - if (!speakeasy.totp.verify({secret: user.secret, encoding: 'base32', token: token})) { - throw new Error(TWO_FACTOR_ERR_MSG); - } - } - } - -} - - -module.exports = FileAuth; diff --git a/modules/auth/index.js b/modules/auth/index.js deleted file mode 100644 index cea034a..0000000 --- a/modules/auth/index.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -/** - * Loads the authentication module. - * config.authmodule must be a string that resembles the filename of an installed authentication module in this file's directory - */ -module.exports = (config) => { - if (!config.authModule) { - throw new Error('Authentication module not provided.'); - } - - let authmodule; - try { - authmodule = require(`./${config.authModule}`); - } catch (err) { - console.log(err); - throw new Error('Error loading authentication module.. Does it exist?'); - } - return authmodule; -}; diff --git a/modules/auth/ldap.js b/modules/auth/ldap.js deleted file mode 100644 index 42bcb7a..0000000 --- a/modules/auth/ldap.js +++ /dev/null @@ -1,127 +0,0 @@ -const storage = require('node-persist'); -const ldap = require('ldapjs'); -const ldapEscape = require('ldap-escape'); -const debug = require('debug')('auth:ldap'); - - -class LdapAuth { - - constructor(twoFactorEnabled) { - this.config = storage.getItem('auth'); - this.twoFactorEnabled = twoFactorEnabled; - let clientOptions = { - url: this.config.ldapAuth.url, - tlsOptions: { - rejectUnauthorized: false - } - }; - this.ldapClient = ldap.createClient(clientOptions); - this.userCache = {}; - } - - - /** - * Authenticates and loads roles of user from ldap. - */ - login(username, password, token) { - return new Promise((resolve, reject) => { - let bindDN = this.getBaseDN(username); - this.ldapClient.bind(bindDN, password, (err) => { - if (err) { - debug(err); - debug(username); - return reject(new Error(err)); - } - return this.loadRoles(bindDN).then((roles) => { - this.userCache[username] = { - roles: roles - }; - // finally return the username - return resolve(username); - }); - }); - }); - } - - getBaseDN(username) { - return ldapEscape.dn`uid=${username},` + this.config.ldapAuth.bindDN; - } - - - /** - * Loads roles of user from ldap - * Needs an active bind connection to ldap - */ - loadRoles(baseDN){ - let rolesAttribute = 'memberOf'; - return this.getAttributesFromLdap(baseDN, [rolesAttribute]).then(entries => { - let roles = []; - debug('entries:'); - debug(entries); - for(let entry of entries) { - debug('entry:'); - if(entry.hasOwnProperty(rolesAttribute)) { - debug(entry[rolesAttribute]); - roles = roles.concat(entry[rolesAttribute]); - } - } - return roles; - }); - } - - - /** - * Get information about a user from ldap - * @property baseDN {string} The base to search from - * @property attributes {Array} A list of attributes to fetch from ldap - */ - getAttributesFromLdap(baseDN, attributes) { - debug(baseDN); - debug(attributes); - return new Promise((resolve, reject) => { - let options = { - 'attributes': attributes - }; - this.ldapClient.search(baseDN, options, (err, res) => { - if(err) { - debug(err); - reject(err); - } - let entries = []; - res.on('searchEntry', function(entry) { - debug('entry: ' + JSON.stringify(entry.object)); - // entry contains attributes from ldap. - entries.push(entry.object); - }); - res.on('searchReference', function(referral) { - debug('referral: ' + referral.uris.join()); - }); - res.on('error', function(err) { - debug('error: ' + err.message); - }); - res.on('end', function(result) { - debug('ldap status: ' + result.status); - resolve(entries); - }); - }); - }); - } - - /** - * return a list of roles of an user if present. - */ - getRoles(username) { - debug(this.userCache); - debug(username); - let roles = this.userCache[username].roles; - if(roles) { - debug(`Roles for ${username}: ${roles}`); - return roles; - } - debug(`no roles found for user ${username}`); - return []; - } - -} - -module.exports = LdapAuth; diff --git a/package.json b/package.json deleted file mode 100644 index bfadbe2..0000000 --- a/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "FlunkED", - "version": "0.0.1", - "description": "The one and only Flunk approved editor. Because DTAP is for pussies, real men develop on production systems.", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "https://github.com/flunk/FlunkED.git" - }, - "keywords": [ - "codemirror", - "ide" - ], - "author": "Allard Ankone", - "license": "ISC", - "bugs": { - "url": "https://github.com/flunk/FlunkED/issues" - }, - "homepage": "https://github.com/flunk/FlunkED", - "dependencies": { - "arcane-request": "^1.0.1", - "bcryptjs": "^2.3.0", - "body-parser": "^1.18.3", - "cookie-parser": "^1.4.1", - "eslint": "^5.3.0", - "express": "^4.16.3", - "ldap-escape": "^2.0.0", - "ldapjs": "^1.0.2", - "md5": "^2.2.1", - "node-persist": "0.0.11", - "node-pty": "^0.7.6", - "node-uuid": "^1.4.7", - "path": "^0.12.7", - "qrcode-terminal": "^0.10.0", - "readline-sync": "^1.4.2", - "socket.io": "^2.1.1", - "speakeasy": "^2.0.0", - "tls": "0.0.1", - "xterm": "^2.6.0" - }, - "devDependencies": { - "grunt": "^1.0.3" - } -} diff --git a/plugins/edit/.DS_Store b/plugins/edit/.DS_Store deleted file mode 100644 index a34fce6..0000000 Binary files a/plugins/edit/.DS_Store and /dev/null differ diff --git a/plugins/edit/index.js b/plugins/edit/index.js deleted file mode 100644 index 4bbdd09..0000000 --- a/plugins/edit/index.js +++ /dev/null @@ -1,82 +0,0 @@ -module.exports = function ( express, app, io ) { - edit = {}; - edit.express = express; - edit.app = app; - edit.io = io; - edit.name = "edit"; - edit.terminals = []; - - let os = require('os'); - let pty = require('node-pty'); - - - app.use('/apps/edit', express.static(__dirname + '/public')); - - edit.handleNewSocket = ( socket ) => { - socket.on('terminal attach', (id) => { - let term = edit.terminals[id]; - if(term !== undefined){ - if(socket.session.username == term.username){ - term.on('data', (data) => { - socket.emit("terminal data",{id:term.id, data:data}); - }); - } - } - }); - - socket.on('terminal key', (data) => { - let term = edit.terminals[data.id]; - term.write(data.key); - }); - - socket.on('terminal resize', (data) => { - let term = edit.terminals[data.id]; - if(term !== undefined){ - term.resize(data.cols, data.rows); - } - - }); - - socket.on('terminal close', (data) => { - console.log("Killing pty with id " + data.id); - - let term = edit.terminals[data.id]; - edit.terminals[data.id] = {id:-1}; - term.kill(); - }); - } - - app.get('/api/edit/newterminal', (req, res) => { - app.checkSession(req, res, true, (session) => { - let term = pty.spawn('bash', [], { - name: 'xterm-color', - cols: 80, - rows: 30, - cwd: process.env.HOME, - env: process.env - }); - - term.id = edit.terminals.length; - term.username = session.username; - edit.terminals.push(term); - - console.log("Forking new pty with id " + term.id + " for " + term.username ) - res.send({id:term.id}); - }); - }); - - app.get('/api/edit/openterminals', (req, res) => { - app.checkSession(req, res, true, (session) => { - let found = []; - edit.terminals.forEach((terminal) => { - if(terminal.username == session.username){ - found.push(terminal.id); - } - }); - - res.send({found:found}); - }); - }); - - return edit; -} \ No newline at end of file diff --git a/plugins/edit/public/.DS_Store b/plugins/edit/public/.DS_Store deleted file mode 100644 index 88caab4..0000000 Binary files a/plugins/edit/public/.DS_Store and /dev/null differ diff --git a/plugins/edit/public/alarmitem.js b/plugins/edit/public/alarmitem.js deleted file mode 100644 index 031d75d..0000000 --- a/plugins/edit/public/alarmitem.js +++ /dev/null @@ -1,34 +0,0 @@ -class AlarmItem extends Div{ - constructor(data, alarmApp){ - super("alarmItem"); - this.alarmApp = alarmApp; - this.data = data; - - //New - this.label = new Span("label").setText(this.data.severity); - if(this.data.severity >= 8){ - this.label.addCssClass("label-info"); - } else if(this.data.severity >= 5){ - this.label.addCssClass("label-danger"); - } else if(this.data.severity >= 1){ - this.label.addCssClass("label-warning"); - } else { - this.label.addCssClass("label-primary"); - } - - this.addEventListener("click", () => { - this.addCssClass("alarmItemActive"); - this.alarmApp.setActiveItem(this); - }); - - this.addChild(this.label); - this.addChild(new Div("alarmItemText").setText(this.data.name)); - //this.setText("jemoeder"); - return this; - } - - - deactivate(){ - this.removeCssClass("alarmItemActive"); - } -} \ No newline at end of file diff --git a/plugins/edit/public/alarms.css b/plugins/edit/public/alarms.css deleted file mode 100644 index 9f39177..0000000 --- a/plugins/edit/public/alarms.css +++ /dev/null @@ -1,18 +0,0 @@ -.fileItem{ - color: #AAA; - border-bottom-style: solid; - border-bottom-color: #333; - border-bottom-width: 1px; - padding: 3px; - padding-left: 11px; -} - -.fileItem:hover{ - color:#AAA; - background-color:#2c2c2c; -} - -.terminalBackground{ - background-color:black; - -} diff --git a/plugins/edit/public/app.js b/plugins/edit/public/app.js deleted file mode 100644 index 491addb..0000000 --- a/plugins/edit/public/app.js +++ /dev/null @@ -1,154 +0,0 @@ -class Editor extends BaseApp{ - constructor(){ - super("edit", "Editor"); - - this.openFiles = []; - this.focussedEditor = undefined; - - include([ - "/lib/xterm.js/dist/xterm.css", - "/apps/edit/alarms.css", - "/apps/edit/window.js", - "/apps/edit/editorwindow.js", - "/apps/edit/filebrowser.js", - "/apps/edit/fileitem.js", - "/apps/edit/filedropdown.js", - "/apps/edit/newfilemodal.js", - "/apps/edit/newdirmodal.js", - "/apps/edit/deletemodal.js", - "/apps/edit/reconnectmodal.js", - "/lib/xterm.js/dist/xterm.js", - "/apps/edit/terminal.js" - ], null, true); - } - - init(){ - super.init(); - this.activeItem = null; - - //this.alarmWindow = new EditorWindow("editor"); - - this.inspector = new FileBrowser(this); - - let frameSet = new FrameSet( false, this.view, this.view); - - let bottomFrame = new Frame( frameSet, 0.1 ); - bottomFrame.setContent ( new TabGroup( this.view, this.inspector.tab ) ); - frameSet.addFrame( bottomFrame, 0.3 ); - - let mainFrame = new Frame( frameSet ); - //this.mainFrame = mainFrame; - mainFrame.setContent ( new TabGroup( this.view, null ) ); - frameSet.addFrame( mainFrame, 0.8 ); - - this.terminals = []; - this.openTerminals(); - - document.addEventListener("keydown", (e) => { - if (e.keyCode == 83 && (navigator.platform.match("Mac") ? e.metaKey : e.ctrlKey)) { - e.preventDefault(); - this.save(); - } - - if (e.keyCode == 192 && (navigator.platform.match("Mac") ? e.metaKey : e.ctrlKey)) { - e.preventDefault(); - e.stopPropagation(); - this.openTerminal(); - } - - return false; - }); - - ace.config.set("basePath", "/lib/ace"); - ace.require("ace/edit_session").EditSession.prototype.$startWorker = function(){} - - app.socketManager.socket.on("reconnect", ()=>{ - this.attachTerminals(); - }) - } - - attachTerminals(){ - console.log("Reattaching to disconnected terminals") - this.terminals.forEach((terminal) => { - terminal.attach(); - }); - } - - openTerminals(){ - app.reqManager.get("/api/edit/openterminals", (res) => { - if(res.status === 200){ - console.log(res); - this.ids = JSON.parse(res.response).found; - if(this.ids.length > 0){ - new ReconnectModal(this, this.ids); - } - } - }); - } - - close(editor){ - let i = 0; - while (i < this.openFiles.length){ - if(editor == this.openFiles[i]){ - this.openFiles.splice(i,1); - this.focussedEditor = null; - i = this.openFiles.length; - } - i++; - } - } - - open(file){ - let editorWindow = new EditorWindow(file, this); - this.openFiles.push(editorWindow); - this.view.frames[this.view.frames.length - 1].content.addTab(editorWindow.tab); - this.setFocus(editorWindow); - } - - openTerminal(id){ - let terminalWindow = new TerminalWindow(this, id); - this.terminals.push(terminalWindow); - this.view.frames[this.view.frames.length - 1].content.addTab(terminalWindow.tab); - this.setFocus(terminalWindow); - } - - getOpen(file){ - let editorWindow = null; - let i = 0; - while (i < this.openFiles.length ){ - if(this.openFiles[i].file.name == file.name && this.openFiles[i].file.dir == file.dir){ - editorWindow = this.openFiles[i]; - i = this.openFiles.length; - } - i++; - } - return editorWindow; - } - - save(){ - if(this.focussedEditor !== null && this.isActive){ - let data = this.focussedEditor.getValue(); - let file = this.focussedEditor.file; - let saving = this.focussedEditor; - app.reqManager.post("api/save/"+file.name+"?cd="+file.dir, data, (res) => { - if(res.status === 200){ - saving.markClean(); - } - }); - } - } - - setFocus(editor){ - if(editor != this.focussedEditor){ - if(this.focussedEditor !== undefined && this.focussedEditor !== null){ - if(this.focussedEditor.unFocus !== undefined){ - this.focussedEditor.unFocus(); - } - } - - this.focussedEditor = editor; - } - } -} - -new Editor(); \ No newline at end of file diff --git a/plugins/edit/public/deletemodal.js b/plugins/edit/public/deletemodal.js deleted file mode 100644 index f07d9ed..0000000 --- a/plugins/edit/public/deletemodal.js +++ /dev/null @@ -1,24 +0,0 @@ -class DeleteModal extends Modal{ - constructor(fileBrowser, file){ - super("New dir", true); - this.file = file; - this.fileBrowser = fileBrowser; - console.log(file); - this.body.setText("You are about to delete "+ this.fileBrowser.pwd() + file.name +" THERE IS NO UNDO, are you sure?"); - - this.ok = new Button("Submit"); - this.ok.onClick = () => {this.submit()}; - this.footer.addChild(this.ok); - } - - submit(){ - app.reqManager.post("/api/delete?cd=" + this.fileBrowser.pwd() + this.file.name ,"", (res) => { - if(res.status == 200){ - this.hide(); - this.fileBrowser.updateFiles(); - } else { - console.log(res); - } - }); - } -} diff --git a/plugins/edit/public/editorwindow.js b/plugins/edit/public/editorwindow.js deleted file mode 100644 index d72e964..0000000 --- a/plugins/edit/public/editorwindow.js +++ /dev/null @@ -1,77 +0,0 @@ -class EditorWindow extends Window{ - constructor(file, editApp){ - super(file.name); - - const modes = { - js:"javascript", - html:"html", - css:"css", - xml:"xml", - json:"json", - php:"php", - py:"python", - c:"c_cpp", - cpp:"c_cpp", - md:"markdown" - }; - - - this.file = file; - this.isClean = true; - this.editApp = editApp; - this.editor = ace.edit(this.panel.element); - - this.editor.setTheme("ace/theme/merbivore_soft"); - - const splitName = file.name.split("."); - const extention = splitName[splitName.length -1].toLowerCase(); - - if(modes[extention]){ - this.editor.getSession().setMode("ace/mode/" + modes[extention]); - } - - if(file.data !== null){ - this.editor.setValue(file.data, -1); - } - - this.panel.handleActivate = () => {this.editor.focus()}; - this.editor.on("focus", () => {this.focus()}); - this.editor.on("input", () => {this.change()}); - - this.tab.onClose = () => {this.close()}; - this.tab.onResize = () => {this.resize()}; - } - - focus(){ - this.editApp.setFocus(this); - this.tab.focus(); - } - - unFocus(){ - this.tab.unFocus(); - } - - close(){ - this.editApp.close(this); - } - - resize(){ - this.editor.resize(); - } - - change(){ - if(this.isClean && this.editor.session.getUndoManager().$undoStack.length > 1){ - this.isClean = false; - this.tab.setTitle("* " + this.file.name); - } - } - - markClean(){ - this.isClean = true; - this.tab.setTitle(this.file.name); - } - - getValue(){ - return this.editor.getValue(); - } -} \ No newline at end of file diff --git a/plugins/edit/public/filebrowser.js b/plugins/edit/public/filebrowser.js deleted file mode 100644 index 8758c03..0000000 --- a/plugins/edit/public/filebrowser.js +++ /dev/null @@ -1,90 +0,0 @@ -class FileBrowser extends Window{ - constructor(editApp){ - super("Files"); - - this.editApp = editApp; - this.currentDir = []; - this.updateFiles(); - - this.panel.addCssClass("scroll-y") - - this.panel.element.oncontextmenu = (event) => { - if (event.which == 3) { - event.stopPropagation(); - const fileDropdown = new FileDropdown(event, null, this); - return false; - } - } - - return this; - } - - updateFiles(){ - this.panel.clear(); - app.reqManager.get("/api/dir/?cd="+this.pwd(), (req) => { - if(req.status == 200){ - this.parseFiles(JSON.parse(req.responseText)); - } else { - console.log(req.responsetext); - } - }); - } - - parseFiles(files){ - if(this.currentDir.length > 0){ - this.panel.addChild(new FileItem(null, this)); - } - - files.forEach((file, index) => { - if(file.isDir){ - this.panel.addChild(new FileItem(file, this)); - } - }); - - files.forEach((file, index) => { - if(!file.isDir){ - this.panel.addChild(new FileItem(file, this)); - } - }); - } - - cd(dir){ - if(dir == ".."){ - this.currentDir.pop(); - } else { - this.currentDir.push(dir); - } - this.updateFiles(); - } - - pwd(){ - let result = "/"; - let i = 0; - while ( i < this.currentDir.length){ - result += this.currentDir[i] + "/"; - i++; - } - return result; - } - - open(name){ - let file = {} - file.dir = this.pwd(); - file.name = name; - - const openEditor = this.editApp.getOpen(file); - - if(openEditor){ - openEditor.tab.activate(); - } else { - app.reqManager.get("api/file/"+file.name+"?cd="+file.dir, (request) => { - if(request.status == 200){ - file.data = request.responseText; - this.editApp.open(file); - } else { - //handleError(request); - } - }); - } - } -} \ No newline at end of file diff --git a/plugins/edit/public/filedropdown.js b/plugins/edit/public/filedropdown.js deleted file mode 100644 index e44db27..0000000 --- a/plugins/edit/public/filedropdown.js +++ /dev/null @@ -1,13 +0,0 @@ -class FileDropdown extends Dropdown{ - constructor(event, file, fileBrowser){ - super(event.clientX,event.clientY); - console.log(fileBrowser); - this.fileBrowser = fileBrowser; - this.addItem("New directory", () => {new NewDirModal(fileBrowser)}); - this.addItem("New file", () => {new NewFileModal(fileBrowser)}); - if(file){ - this.addItem("Delete", () => {new DeleteModal(fileBrowser, file)}); - } - this.show(); - } -} \ No newline at end of file diff --git a/plugins/edit/public/fileitem.js b/plugins/edit/public/fileitem.js deleted file mode 100644 index 067d403..0000000 --- a/plugins/edit/public/fileitem.js +++ /dev/null @@ -1,34 +0,0 @@ -class FileItem extends Div{ - constructor(file, fileBrowser){ - super("fileItem unselectable"); - this.fileBrowser = fileBrowser; - - if(file !== null){ - this.file = file; - if(file.isDir){ - this.setText("/" + file.name); - this.onClick= () => { - this.fileBrowser.cd(file.name); - } - } else { - this.setText(file.name); - this.onClick= () => { - this.fileBrowser.open(file.name); - } - } - } else { - this.setText("/.."); - this.onClick= () => { - this.fileBrowser.cd(".."); - } - } - - this.element.oncontextmenu = (event) => { - if (event.which == 3) { - event.stopPropagation(); - const fileDropdown = new FileDropdown(event, this.file, this.fileBrowser); - return false; - } - } - } -} \ No newline at end of file diff --git a/plugins/edit/public/newdirmodal.js b/plugins/edit/public/newdirmodal.js deleted file mode 100644 index 0887804..0000000 --- a/plugins/edit/public/newdirmodal.js +++ /dev/null @@ -1,34 +0,0 @@ -class NewDirModal extends Modal{ - constructor(fileBrowser){ - super("New dir", true); - this.fileBrowser = fileBrowser; - - this.input = new Input(); - this.input.addEventListener("keyup", (event) => { - event.preventDefault(); - if (event.keyCode == 13) { - this.submit(); - } - }); - - this.body.addChild(this.input); - this.onShow = () => { - this.input.element.focus(); - } - - this.ok = new Button("Submit"); - this.ok.onClick = () => {this.submit()}; - this.footer.addChild(this.ok); - } - - submit(){ - app.reqManager.post("/api/newDir?cd=" + this.fileBrowser.pwd()+this.input.value,"", (res) => { - if(res.status == 200){ - this.hide(); - this.fileBrowser.updateFiles(); - } else { - console.log(res); - } - }); - } -} diff --git a/plugins/edit/public/newfilemodal.js b/plugins/edit/public/newfilemodal.js deleted file mode 100644 index f6fdc89..0000000 --- a/plugins/edit/public/newfilemodal.js +++ /dev/null @@ -1,34 +0,0 @@ -class NewFileModal extends Modal{ - constructor(fileBrowser){ - super("New file", true); - this.fileBrowser = fileBrowser; - - this.input = new Input(); - this.input.addEventListener("keyup", (event) => { - event.preventDefault(); - if (event.keyCode == 13) { - this.submit(); - } - }); - - this.body.addChild(this.input); - this.onShow = () => { - this.input.element.focus(); - } - - this.ok = new Button("Submit"); - this.ok.onClick = () => {this.submit()}; - this.footer.addChild(this.ok); - } - - submit(){ - app.reqManager.post("/api/newfile/"+this.input.value + "?cd=" + this.fileBrowser.pwd(),"", (res) => { - if(res.status == 200){ - this.hide(); - this.fileBrowser.updateFiles(); - } else { - console.log(res); - } - }); - } -} diff --git a/plugins/edit/public/reconnectmodal.js b/plugins/edit/public/reconnectmodal.js deleted file mode 100644 index d28fe03..0000000 --- a/plugins/edit/public/reconnectmodal.js +++ /dev/null @@ -1,18 +0,0 @@ -class ReconnectModal extends Modal{ - constructor(editApp, ids){ - super("Reconnect terminals", true); - this.body.setText("You currently have terminals open on the server. Do you want to reconnect?"); - this.edit = editApp; - this.ids = ids; - this.ok = new Button("Yes please!"); - this.ok.onClick = () => {this.submit()}; - this.footer.addChild(this.ok); - } - - submit(){ - this.ids.forEach((id) => { - this.edit.openTerminal(id); - this.hide(); - }); - } -} diff --git a/plugins/edit/public/terminal.js b/plugins/edit/public/terminal.js deleted file mode 100644 index 54a46b2..0000000 --- a/plugins/edit/public/terminal.js +++ /dev/null @@ -1,126 +0,0 @@ -class TerminalWindow extends Window{ - constructor(editApp, id){ - super("Terminal"); - this.panel.addCssClass("terminalBackground"); - - - - this.editApp = editApp; - this.term = new Terminal(); - this.term.open(this.panel.element, true); - this.term.resize(80, 30); - this.term.focus(); - - this.dirty = false; - - if(id !== undefined){ - this.id = id; - this.attach(); - } else { - this.id = null; - app.reqManager.get("/api/edit/newterminal", (res) => { - if(res.status === 200){ - this.id = JSON.parse(res.response).id; - this.attach(); - } - }); - } - - this.term.setOption("disableStdin", true); - - this.term.on('key', (e) =>{ - app.socketManager.emit("terminal key",{id:this.id, key:e}); - }); - - app.socketManager.socket.on("terminal data", (data) => { - if(data.id == this.id){ - this.term.write(data.data); - } - }); - - this.tab.resize = () => { - this.resize(); - } - - this.tab.onClose = () => { - this.close(); - } - - this.term.on('focus', () =>{ - this.focus(); - }); - - this.term.on('blur', () =>{ - this.unFocus(); - }); - - document.addEventListener('paste', (event) => { - var clipText = event.clipboardData.getData('Text'); - if(event.path[0] == this.term.textarea){ - app.socketManager.emit("terminal key",{id:this.id, key:clipText}); - } - }, true); - - console.log(this.term); - /* this.term.element.addEventListener("mouseup", (e) =>{ - console.log(e); - if(e.button == 0 && this.dirty){ - try { - var successful = document.execCommand('copy'); - this.dirty = false; - console.log("jemoeder") - } catch(err) { - console.log(err); - } - } else if(e.button == 2){ - e.preventDefault(); - console.log(window.clipboardData.getData('Text')); - return false; - } - }); -*/ - - /* - - document.addEventListener("selectionchange", (e) =>{ - let selection = window.getSelection(); - if(selection.focusNode.parentNode.parentNode.parentNode == this.term.element){ - this.dirty = true; - } - }); - */ - this.tab.panel.handleActivate = () => { - this.focus(); - } - } - - attach(){ - app.socketManager.emit("terminal attach", this.id); - this.resize(); - this.term.focus(); - } - - resize(){ - let rows = Math.floor(this.panel.height / 20); - let cols = Math.floor(this.panel.width / 8); - - this.term.resize(cols,rows); - app.socketManager.emit("terminal resize",{id:this.id, rows:rows, cols:cols}); - } - - focus(){ - this.editApp.setFocus(this); - this.tab.focus(); - this.term.focus(); - this.resize(); - } - - unFocus(){ - this.tab.unFocus(); - } - - close(){ - app.socketManager.emit("terminal close",{id:this.id}); - this.editApp.close(this); - } -} \ No newline at end of file diff --git a/plugins/edit/public/window.js b/plugins/edit/public/window.js deleted file mode 100644 index 676d96f..0000000 --- a/plugins/edit/public/window.js +++ /dev/null @@ -1,9 +0,0 @@ -class Window extends Div{ - constructor(title){ - super(); - this.panel = new Panel(); - - this.tab = new PanelTab(title, this.panel); - return this; - } -} \ No newline at end of file diff --git a/public/.DS_Store b/public/.DS_Store deleted file mode 100644 index 45d0685..0000000 Binary files a/public/.DS_Store and /dev/null differ diff --git a/public/app.js b/public/app.js deleted file mode 100644 index 7e46425..0000000 --- a/public/app.js +++ /dev/null @@ -1,26 +0,0 @@ -class App { - constructor(){ - this.navBarApp = null; - this.reqManager = new ReqManager( this ); - this.socketManager = new SocketManager( this ); - this.sessionManager = new SessionManager( this ); - this.loader = new Loader( this ); - this.sessionManager.reauth(); - } - - init(){ - if (this.navBarApp == null){ - this.navBarApp = new NavBarApp( "ArcaneJS" ); - this.socketManager.connect(); - - this.reqManager.get("api/apps", (req) => { - let apps = JSON.parse(req.responseText); - let i = 0; - while(i < apps.length){ - this.loader.loadJs("apps/"+ apps[i] + "/app.js"); - i++; - } - }); - } - } -}; \ No newline at end of file diff --git a/public/index.html b/public/index.html deleted file mode 100644 index 3c34746..0000000 --- a/public/index.html +++ /dev/null @@ -1,23 +0,0 @@ - - -
- - - - - -E){y(++w);continue}w=a+r,e[w]==t&&w--,y(w-b)}return s},this.$getDisplayTokens=function(n,r){var i=[],s;r=r||0;for(var o=0;o 0&&s&&V(s);s=i.pop())n.line--,n.ch=0;s?(n.line--,n.ch=Pt(e,n.line)):n.ch=0}}function Kt(e,t,n){t.ch=0,n.ch=0,n.line++}function Qt(e){if(!e)return 0;var t=e.search(/\S/);return t==-1?e.length:t}function Gt(e,t,n,r,i){var s=Vt(e),o=e.getLine(s.line),u=s.ch,a=i?D[0]:P[0];while(!a(o.charAt(u))){u++;if(u>=o.length)return null}r?a=P[0]:(a=D[0],a(o.charAt(u))||(a=D[1]));var f=u,l=u;while(a(o.charAt(f))&&fi?(i0&&!r[i])i--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var o=i;o<=s;o++){var u=r[o];if(!u||!u.el)continue;if(u.hidden){u.el.style.top=-100-(u.pixelHeight||0)+"px";continue}u._inDocument||(u._inDocument=!0,t.container.appendChild(u.el));var a=t.$cursorLayer.getPixelPosition({row:o,column:0},!0).top;u.coverLine||(a+=n.lineHeight*this.session.getRowLineCount(u.row)),u.el.style.top=a-n.offset+"px";var f=u.coverGutter?0:t.gutterWidth;u.fixedWidth||(f-=t.scrollLeft),u.el.style.left=f+"px",u.fullWidth&&u.screenWidth&&(u.el.style.minWidth=n.width+2*n.padding+"px"),u.fixedWidth?u.el.style.right=t.scrollBar.getWidth()+"px":u.el.style.right=""}}}).call(o.prototype),t.LineWidgets=o}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(e,t,n){"use strict";function o(e,t,n){var r=0,i=e.length-1;while(r<=i){var s=r+i>>1,o=n(t,e[s]);if(o>0)r=s+1;else{if(!(o<0))return s;i=s-1}}return-(r+1)}function u(e,t,n){var r=e.getAnnotations().sort(s.comparePoints);if(!r.length)return;var i=o(r,{row:t,column:-1},s.comparePoints);i<0&&(i=-i-1),i>=r.length?i=n>0?0:r.length-1:i===0&&n<0&&(i=r.length-1);var u=r[i];if(!u||!n)return;if(u.row===t){do u=r[i+=n];while(u&&u.row===t);if(!u)return r.slice()}var a=[];t=u.row;do a[n<0?"unshift":"push"](u),u=r[i+=n];while(u&&u.row==t);return a.length&&a}var r=e("../line_widgets").LineWidgets,i=e("../lib/dom"),s=e("../range").Range;t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new r(n),n.widgetManager.attach(e));var s=e.getCursorPosition(),o=s.row,a=n.widgetManager.getWidgetsAtRow(o).filter(function(e){return e.type=="errorMarker"})[0];a?a.destroy():o-=t;var f=u(n,o,t),l;if(f){var c=f[0];s.column=(c.pos&&typeof c.column!="number"?c.pos.sc:c.column)||0,s.row=c.row,l=e.renderer.$gutterLayer.$annotations[s.row]}else{if(a)return;l={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(s.row),e.selection.moveToPosition(s);var h={row:s.row,fixedWidth:!0,coverGutter:!0,el:i.createElement("div"),type:"errorMarker"},p=h.el.appendChild(i.createElement("div")),d=h.el.appendChild(i.createElement("div"));d.className="error_widget_arrow "+l.className;var v=e.renderer.$cursorLayer.getPixelPosition(s).left;d.style.left=v+e.renderer.gutterWidth-5+"px",h.el.className="error_widget_wrapper",p.className="error_widget "+l.className,p.innerHTML=l.text.join("
"),p.appendChild(i.createElement("div"));var m=function(e,t,n){if(t===0&&(n==="esc"||n==="return"))return h.destroy(),{command:"null"}};h.destroy=function(){if(e.$mouseHandler.isMousePressed)return;e.keyBinding.removeKeyboardHandler(m),n.widgetManager.removeLineWidget(h),e.off("changeSelection",h.destroy),e.off("changeSession",h.destroy),e.off("mouseup",h.destroy),e.off("change",h.destroy)},e.keyBinding.addKeyboardHandler(m),e.on("changeSelection",h.destroy),e.on("changeSession",h.destroy),e.on("mouseup",h.destroy),e.on("change",h.destroy),e.session.widgetManager.addLineWidget(h),h.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:h.el.offsetHeight})},i.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")}),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(e,t,n){"use strict";e("./lib/fixoldbrowsers");var r=e("./lib/dom"),i=e("./lib/event"),s=e("./editor").Editor,o=e("./edit_session").EditSession,u=e("./undomanager").UndoManager,a=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.require=e,typeof define=="function"&&(t.define=define),t.edit=function(e){if(typeof e=="string"){var n=e;e=document.getElementById(n);if(!e)throw new Error("ace.edit can't find div #"+n)}if(e&&e.env&&e.env.editor instanceof s)return e.env.editor;var o="";if(e&&/input|textarea/i.test(e.tagName)){var u=e;o=u.value,e=r.createElement("pre"),u.parentNode.replaceChild(e,u)}else e&&(o=r.getInnerText(e),e.innerHTML="");var f=t.createEditSession(o),l=new s(new a(e));l.setSession(f);var c={document:f,editor:l,onResize:l.resize.bind(l,null)};return u&&(c.textarea=u),i.addListener(window,"resize",c.onResize),l.on("destroy",function(){i.removeListener(window,"resize",c.onResize),c.editor.container.env=null}),l.container.env=l.env=c,l},t.createEditSession=function(e,t){var n=new o(e,t);return n.setUndoManager(new u),n},t.EditSession=o,t.UndoManager=u,t.version="1.2.8"});
- (function() {
- ace.require(["ace/ace"], function(a) {
- if (a) {
- a.config.init(true);
- a.define = ace.define;
- }
- if (!window.ace)
- window.ace = a;
- for (var key in a) if (a.hasOwnProperty(key))
- window.ace[key] = a[key];
- });
- })();
-
\ No newline at end of file
diff --git a/public/lib/ace/ext-beautify.js b/public/lib/ace/ext-beautify.js
deleted file mode 100644
index 659262c..0000000
--- a/public/lib/ace/ext-beautify.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/ext/beautify/php_rules",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";var r=e("ace/token_iterator").TokenIterator;t.newLines=[{type:"support.php_tag",value:""},{type:"paren.lparen",value:"{",indent:!0},{type:"paren.rparen",breakBefore:!0,value:"}",indent:!1},{type:"paren.rparen",breakBefore:!0,value:"})",indent:!1,dontBreak:!0},{type:"comment"},{type:"text",value:";"},{type:"text",value:":",context:"php"},{type:"keyword",value:"case",indent:!0,dontBreak:!0},{type:"keyword",value:"default",indent:!0,dontBreak:!0},{type:"keyword",value:"break",indent:!1,dontBreak:!0},{type:"punctuation.doctype.end",value:">"},{type:"meta.tag.punctuation.end",value:">"},{type:"meta.tag.punctuation.begin",value:"<",blockTag:!0,indent:!0,dontBreak:!0},{type:"meta.tag.punctuation.begin",value:"",indent:!1,breakBefore:!0,dontBreak:!0},{type:"punctuation.operator",value:";"}],t.spaces=[{type:"xml-pe",prepend:!0},{type:"entity.other.attribute-name",prepend:!0},{type:"storage.type",value:"var",append:!0},{type:"storage.type",value:"function",append:!0},{type:"keyword.operator",value:"="},{type:"keyword",value:"as",prepend:!0,append:!0},{type:"keyword",value:"function",append:!0},{type:"support.function",next:/[^\(]/,append:!0},{type:"keyword",value:"or",append:!0,prepend:!0},{type:"keyword",value:"and",append:!0,prepend:!0},{type:"keyword",value:"case",append:!0},{type:"keyword.operator",value:"||",append:!0,prepend:!0},{type:"keyword.operator",value:"&&",append:!0,prepend:!0}],t.singleTags=["!doctype","area","base","br","hr","input","img","link","meta"],t.transform=function(e,n,r){var i=e.getCurrentToken(),s=t.newLines,o=t.spaces,u=t.singleTags,a="",f=0,l=!1,c,h,p={},d,v={},m=!1,g="";while(i!==null){console.log(i);if(!i){i=e.stepForward();continue}i.type=="support.php_tag"&&i.value!="?>"?r="php":i.type=="support.php_tag"&&i.value=="?>"?r="html":i.type=="meta.tag.name.style"&&r!="css"?r="css":i.type=="meta.tag.name.style"&&r=="css"?r="html":i.type=="meta.tag.name.script"&&r!="js"?r="js":i.type=="meta.tag.name.script"&&r=="js"&&(r="html"),v=e.stepForward(),v&&v.type.indexOf("meta.tag.name")==0&&(d=v.value),p.type=="support.php_tag"&&p.value=="="&&(l=!0),i.type=="meta.tag.name"&&(i.value=i.value.toLowerCase()),i.type=="text"&&(i.value=i.value.trim());if(!i.value){i=v;continue}g=i.value;for(var y in o)i.type==o[y].type&&(!o[y].value||i.value==o[y].value)&&v&&(!o[y].next||o[y].next.test(v.value))&&(o[y].prepend&&(g=" "+i.value),o[y].append&&(g+=" "));i.type.indexOf("meta.tag.name")==0&&(c=i.value),m=!1;for(y in s)if(i.type==s[y].type&&(!s[y].value||i.value==s[y].value)&&(!s[y].blockTag||u.indexOf(d)===-1)&&(!s[y].context||s[y].context===r)){s[y].indent===!1&&f--;if(s[y].breakBefore&&(!s[y].prev||s[y].prev.test(p.value))){a+="\n",m=!0;for(y=0;yKeyboard Shortcuts
"+o+"",n(t,s,"0","0","0",null)}}var r=e("ace/editor").Editor;n.exports.init=function(e){r.prototype.showKeyboardShortcuts=function(){i(this)},e.commands.addCommands([{name:"showKeyboardShortcuts",bindKey:{win:"Ctrl-Alt-h",mac:"Command-Alt-h"},exec:function(e,t){e.showKeyboardShortcuts()}}])}});
- (function() {
- ace.require(["ace/ext/keybinding_menu"], function() {});
- })();
-
\ No newline at end of file
diff --git a/public/lib/ace/ext-language_tools.js b/public/lib/ace/ext-language_tools.js
deleted file mode 100644
index 3af07b2..0000000
--- a/public/lib/ace/ext-language_tools.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=e("./lib/lang"),o=e("./range").Range,u=e("./anchor").Anchor,a=e("./keyboard/hash_handler").HashHandler,f=e("./tokenizer").Tokenizer,l=o.comparePoints,c=function(){this.snippetMap={},this.snippetNameMap={}};(function(){r.implement(this,i),this.getTokenizer=function(){function e(e,t,n){return e=e.substr(1),/^\d+$/.test(e)&&!n.inFormatString?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function t(e){return"(?:[^\\\\"+e+"]|\\\\.)"}return c.$tokenizer=new f({start:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectIf?(n[0].expectIf=!1,n[0].elseBranch=n[0],[n[0]]):":"}},{regex:/\\./,onMatch:function(e,t,n){var r=e[1];return r=="}"&&n.length?e=r:"`$\\".indexOf(r)!=-1?e=r:n.inFormatString&&(r=="n"?e="\n":r=="t"?e="\n":"ulULE".indexOf(r)!=-1&&(e={changeCase:r,local:r>"a"})),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,n,r){var i=e(t.substr(1),n,r);return r.unshift(i[0]),i},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(e,t,n){n[0].choices=e.slice(1,-1).split(",")},next:"start"},{regex:"/("+t("/")+"+)/(?:("+t("/")+"*)/)(\\w*):?",onMatch:function(e,t,n){var r=n[0];return r.fmtString=e,e=this.splitRegex.exec(e),r.guard=e[1],r.fmt=e[2],r.flag=e[3],""},next:"start"},{regex:"`"+t("`")+"*`",onMatch:function(e,t,n){return n[0].code=e.splice(1,-1),""},next:"start"},{regex:"\\?",onMatch:function(e,t,n){n[0]&&(n[0].expectIf=!0)},next:"start"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:"/("+t("/")+"+)/",token:"regex"},{regex:"",onMatch:function(e,t,n){n.inFormatString=!0},next:"start"}]}),c.prototype.getTokenizer=function(){return c.$tokenizer},c.$tokenizer},this.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},this.$getDefaultValue=function(e,t){if(/^[A-Z]\d+$/.test(t)){var n=t.substr(1);return(this.variables[t[0]+"__"]||{})[n]}if(/^\d+$/.test(t))return(this.variables.__||{})[t];t=t.replace(/^TM_/,"");if(!e)return;var r=e.session;switch(t){case"CURRENT_WORD":var i=r.getWordRange();case"SELECTION":case"SELECTED_TEXT":return r.getTextRange(i);case"CURRENT_LINE":return r.getLine(e.getCursorPosition().row);case"PREV_LINE":return r.getLine(e.getCursorPosition().row-1);case"LINE_INDEX":return e.getCursorPosition().column;case"LINE_NUMBER":return e.getCursorPosition().row+1;case"SOFT_TABS":return r.getUseSoftTabs()?"YES":"NO";case"TAB_SIZE":return r.getTabSize();case"FILENAME":case"FILEPATH":return"";case"FULLNAME":return"Ace"}},this.variables={},this.getVariableValue=function(e,t){return this.variables.hasOwnProperty(t)?this.variables[t](e,t)||"":this.$getDefaultValue(e,t)||""},this.tmStrFormat=function(e,t,n){var r=t.flag||"",i=t.guard;i=new RegExp(i,r.replace(/[^gi]/,""));var s=this.tokenizeTmSnippet(t.fmt,"formatString"),o=this,u=e.replace(i,function(){o.variables.__=arguments;var e=o.resolveVariables(s,n),t="E";for(var r=0;r
",o.escapeHTML(e.snippet)].join(""))}},c=[l,a,f];t.setCompleters=function(e){c.length=0,e&&c.push.apply(c,e)},t.addCompleter=function(e){c.push(e)},t.textCompleter=a,t.keyWordCompleter=f,t.snippetCompleter=l;var h={name:"expandSnippet",exec:function(e){return r.expandWithTab(e)},bindKey:"Tab"},p=function(e,t){d(t.session.$mode)},d=function(e){var t=e.$id;r.files||(r.files={}),v(t),e.modes&&e.modes.forEach(d)},v=function(e){if(!e||r.files[e])return;var t=e.replace("mode","snippets");r.files[e]={},s.loadModule(t,function(t){t&&(r.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=r.parseSnippetFile(t.snippetText)),r.register(t.snippets||[],t.scope),t.includeScopes&&(r.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach(function(e){v("ace/mode/"+e)})))})},m=function(e){var t=e.editor,n=t.completer&&t.completer.activated;if(e.command.name==="backspace")n&&!u.getCompletionPrefix(t)&&t.completer.detach();else if(e.command.name==="insertstring"){var r=u.getCompletionPrefix(t);r&&!n&&(t.completer||(t.completer=new i),t.completer.autoInsert=!1,t.completer.showPopup(t))}},g=e("../editor").Editor;e("../config").defineOptions(g.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:c),this.commands.addCommand(i.startCommand)):this.commands.removeCommand(i.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:c),this.commands.on("afterExec",m)):this.commands.removeListener("afterExec",m)},value:!1},enableSnippets:{set:function(e){e?(this.commands.addCommand(h),this.on("changeMode",p),p(null,this)):(this.commands.removeCommand(h),this.off("changeMode",p))},value:!1}})});
- (function() {
- ace.require(["ace/ext/language_tools"], function() {});
- })();
-
\ No newline at end of file
diff --git a/public/lib/ace/ext-linking.js b/public/lib/ace/ext-linking.js
deleted file mode 100644
index ad55776..0000000
--- a/public/lib/ace/ext-linking.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/ext/linking",["require","exports","module","ace/editor","ace/config"],function(e,t,n){function i(e){var n=e.editor,r=e.getAccelKey();if(r){var n=e.editor,i=e.getDocumentPosition(),s=n.session,o=s.getTokenAt(i.row,i.column);t.previousLinkingHover&&t.previousLinkingHover!=o&&n._emit("linkHoverOut"),n._emit("linkHover",{position:i,token:o}),t.previousLinkingHover=o}else t.previousLinkingHover&&(n._emit("linkHoverOut"),t.previousLinkingHover=!1)}function s(e){var t=e.getAccelKey(),n=e.getButton();if(n==0&&t){var r=e.editor,i=e.getDocumentPosition(),s=r.session,o=s.getTokenAt(i.row,i.column);r._emit("linkClick",{position:i,token:o})}}var r=e("ace/editor").Editor;e("../config").defineOptions(r.prototype,"editor",{enableLinking:{set:function(e){e?(this.on("click",s),this.on("mousemove",i)):(this.off("click",s),this.off("mousemove",i))},value:!1}}),t.previousLinkingHover=!1});
- (function() {
- ace.require(["ace/ext/linking"], function() {});
- })();
-
\ No newline at end of file
diff --git a/public/lib/ace/ext-modelist.js b/public/lib/ace/ext-modelist.js
deleted file mode 100644
index 3ce15f9..0000000
--- a/public/lib/ace/ext-modelist.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/ext/modelist",["require","exports","module"],function(e,t,n){"use strict";function i(e){var t=a.text,n=e.split(/[\/\\]/).pop();for(var i=0;i
"),e.innerHTML=a.join("");var c=function(e){var t=e.currentTarget;i.setOption(t.title,t.value)},h=function(e){var t=e.currentTarget;i.setOption(t.title,t.checked)},p=e.getElementsByTagName("select");for(var d=0;d ");for(var l in t.defaultOptions)a.push("Setting Value ");a.push("",o[l]," "),a.push(""),f(a,l,u[l],i.getOption(l)),a.push("
";if(!n)for(var s in r){var o=r[s].toString();o.length&&(i+='"'+s+" "+o+"
")}else{var s;n=n.join("");for(var u=0;uo)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/abc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/abc_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./abc_highlight_rules").ABCHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.$id="ace/mode/abc"}.call(u.prototype),t.Mode=u})
\ No newline at end of file
diff --git a/public/lib/ace/mode-actionscript.js b/public/lib/ace/mode-actionscript.js
deleted file mode 100644
index 98bc1a2..0000000
--- a/public/lib/ace/mode-actionscript.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/actionscript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"support.class.actionscript.2",regex:"\\b(?:R(?:ecordset|DBMSResolver|adioButton(?:Group)?)|X(?:ML(?:Socket|Node|Connector)?|UpdateResolverDataHolder)|M(?:M(?:Save|Execute)|icrophoneMicrophone|o(?:use|vieClip(?:Loader)?)|e(?:nu(?:Bar)?|dia(?:Controller|Display|Playback))|ath)|B(?:yName|inding|utton)|S(?:haredObject|ystem|crollPane|t(?:yleSheet|age|ream)|ound|e(?:ndEvent|rviceObject)|OAPCall|lide)|N(?:umericStepper|et(?:stream|S(?:tream|ervices)|Connection|Debug(?:Config)?))|C(?:heckBox|o(?:ntextMenu(?:Item)?|okie|lor|m(?:ponentMixins|boBox))|ustomActions|lient|amera)|T(?:ypedValue|ext(?:Snapshot|Input|F(?:ield|ormat)|Area)|ree|AB)|Object|D(?:ownload|elta(?:Item|Packet)?|at(?:e(?:Chooser|Field)?|a(?:G(?:lue|rid)|Set|Type)))|U(?:RL|TC|IScrollBar)|P(?:opUpManager|endingCall|r(?:intJob|o(?:duct|gressBar)))|E(?:ndPoint|rror)|Video|Key|F(?:RadioButton|GridColumn|MessageBox|BarChart|S(?:croll(?:Bar|Pane)|tyleFormat|plitView)|orm|C(?:heckbox|omboBox|alendar)|unction|T(?:icker|ooltip(?:Lite)?|ree(?:Node)?)|IconButton|D(?:ataGrid|raggablePane)|P(?:ieChart|ushButton|ro(?:gressBar|mptBox))|L(?:i(?:stBox|neChart)|oadingBox)|AdvancedMessageBox)|W(?:indow|SDLURL|ebService(?:Connector)?)|L(?:ist|o(?:calConnection|ad(?:er|Vars)|g)|a(?:unch|bel))|A(?:sBroadcaster|cc(?:ordion|essibility)|S(?:Set(?:Native|PropFlags)|N(?:ew|ative)|C(?:onstructor|lamp(?:2)?)|InstanceOf)|pplication|lert|rray))\\b"},{token:"support.function.actionscript.2",regex:"\\b(?:s(?:h(?:ift|ow(?:GridLines|Menu|Border|Settings|Headers|ColumnHeaders|Today|Preferences)?|ad(?:ow|ePane))|c(?:hema|ale(?:X|Mode|Y|Content)|r(?:oll(?:Track|Drag)?|een(?:Resolution|Color|DPI)))|t(?:yleSheet|op(?:Drag|A(?:nimation|llSounds|gent))?|epSize|a(?:tus|rt(?:Drag|A(?:nimation|gent))?))|i(?:n|ze|lence(?:TimeOut|Level))|o(?:ngname|urce|rt(?:Items(?:By)?|On(?:HeaderRelease)?|able(?:Columns)?)?)|u(?:ppressInvalidCalls|bstr(?:ing)?)|p(?:li(?:ce|t)|aceCol(?:umnsEqually|lumnsEqually))|e(?:nd(?:DefaultPushButtonEvent|AndLoad)?|curity|t(?:R(?:GB|o(?:otNode|w(?:Height|Count))|esizable(?:Columns)?|a(?:nge|te))|G(?:ain|roupName)|X(?:AxisTitle)?|M(?:i(?:n(?:imum|utes)|lliseconds)|o(?:nth(?:Names)?|tionLevel|de)|ultilineMode|e(?:ssage|nu(?:ItemEnabled(?:At)?|EnabledAt)|dia)|a(?:sk|ximum))|B(?:u(?:tton(?:s|Width)|fferTime)|a(?:seTabIndex|ndwidthLimit|ckground))|S(?:howAsDisabled|croll(?:ing|Speed|Content|Target|P(?:osition|roperties)|barState|Location)|t(?:yle(?:Property)?|opOnFocus|at(?:us|e))|i(?:ze|lenceLevel)|ort(?:able(?:Columns)?|Function)|p(?:litterBarPosition|acing)|e(?:conds|lect(?:Multiple|ion(?:Required|Type)?|Style|Color|ed(?:Node(?:s)?|Cell|I(?:nd(?:ices|ex)|tem(?:s)?))?|able))|kin|m(?:oothness|allScroll))|H(?:ighlight(?:s|Color)|Scroll|o(?:urs|rizontal)|eader(?:Symbol|Height|Text|Property|Format|Width|Location)?|as(?:Shader|CloseBox))|Y(?:ear|AxisTitle)?|N(?:ode(?:Properties|ExpansionHandler)|ewTextFormat)|C(?:h(?:ildNodes|a(?:ngeHandler|rt(?:Title|EventHandler)))|o(?:ntent(?:Size)?|okie|lumns)|ell(?:Symbol|Data)|l(?:i(?:ckHandler|pboard)|oseHandler)|redentials)|T(?:ype(?:dVaule)?|i(?:tle(?:barHeight)?|p(?:Target|Offset)?|me(?:out(?:Handler)?)?)|oggle|extFormat|ransform)|I(?:s(?:Branch|Open)|n(?:terval|putProperty)|con(?:SymbolName)?|te(?:rator|m(?:ByKey|Symbol)))|Orientation|D(?:i(?:splay(?:Range|Graphics|Mode|Clip|Text|edMonth)|rection)|uration|e(?:pth(?:Below|To|Above)|fault(?:GatewayURL|Mappings|NodeIconSymbolName)|l(?:iveryMode|ay)|bug(?:ID)?)|a(?:yOfWeekNames|t(?:e(?:Filter)?|a(?:Mapping(?:s)?|Item(?:Text|Property|Format)|Provider|All(?:Height|Property|Format|Width))?))|ra(?:wConnectors|gContent))|U(?:se(?:Shadow|HandCursor|EchoSuppression|rInput|Fade)|TC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear))|P(?:osition|ercentComplete|an(?:e(?:M(?:inimumSize|aximumSize)|Size|Title))?|ro(?:pert(?:y(?:Data)?|iesAt)|gress))|E(?:nabled|dit(?:Handler|able)|xpand(?:NodeTrigger|erSymbolName))|V(?:Scroll|olume|alue(?:Source)?)|KeyFrameInterval|Quality|F(?:i(?:eld|rst(?:DayOfWeek|VisibleNode))|ocus|ullYear|ps|ade(?:InLength|OutLength)|rame(?:Color|Width))|Width|L(?:ine(?:Color|Weight)|o(?:opback|adTarget)|a(?:rgeScroll|bel(?:Source|Placement)?))|A(?:s(?:Boolean|String|Number)|n(?:yTypedValue|imation)|ctiv(?:e(?:State(?:Handler)?|Handler)|ateHandler)|utoH(?:ideScrollBar|eight)))?|paratorBefore|ek|lect(?:ion(?:Disabled|Unfocused)?|ed(?:Node(?:s)?|Child|I(?:nd(?:ices|ex)|tem(?:s)?)|Dat(?:e|a))?|able(?:Ranges)?)|rver(?:String)?)|kip|qrt|wapDepths|lice|aveToSharedObj|moothing)|h(?:scroll(?:Policy)?|tml(?:Text)?|i(?:t(?:Test(?:TextNearPos)?|Area)|de(?:BuiltInItems|Child)?|ghlight(?:2D|3D)?)|orizontal|e(?:ight|ader(?:Re(?:nderer|lease)|Height|Text))|P(?:osition|ageScrollSize)|a(?:s(?:childNodes|MP3|S(?:creen(?:Broadcast|Playback)|treaming(?:Video|Audio)|ort)|Next|OwnProperty|Pr(?:inting|evious)|EmbeddedVideo|VideoEncoder|A(?:ccesibility|udio(?:Encoder)?))|ndlerName)|LineScrollSize)|ye(?:sLabel|ar)|n(?:o(?:t|de(?:Name|Close|Type|Open|Value)|Label)|u(?:llValue|mChild(?:S(?:creens|lides)|ren|Forms))|e(?:w(?:Item|line|Value|LocationDialog)|xt(?:S(?:cene|ibling|lide)|TabIndex|Value|Frame)?)?|ame(?:s)?)|c(?:h(?:ildNodes|eck|a(?:nge(?:sPending)?|r(?:CodeAt|At))|r)|o(?:s|n(?:st(?:ant|ructor)|nect|c(?:urrency|at)|t(?:ent(?:Type|Path)?|ains|rol(?:Placement|lerPolicy))|denseWhite|version)|py|l(?:or|umn(?:Stretch|Name(?:s)?|Count))|m(?:p(?:onent|lete)|ment))|u(?:stomItems|ePoint(?:s)?|r(?:veTo|Value|rent(?:Slide|ChildSlide|Item|F(?:ocused(?:S(?:creen|lide)|Form)|ps))))|e(?:il|ll(?:Renderer|Press|Edit|Focus(?:In|Out)))|l(?:i(?:ck|ents)|o(?:se(?:Button|Pane)?|ne(?:Node)?)|ear(?:S(?:haredObjects|treams)|Timeout|Interval)?)|a(?:ncelLabel|tch|p(?:tion|abilities)|l(?:cFields|l(?:e(?:e|r))?))|reate(?:GatewayConnection|Menu|Se(?:rver|gment)|C(?:hild(?:AtDepth)?|l(?:ient|ass(?:ChildAtDepth|Object(?:AtDepth)?))|all)|Text(?:Node|Field)|Item|Object(?:AtDepth)?|PopUp|E(?:lement|mptyMovieClip)))|t(?:h(?:is|row)|ype(?:of|Name)?|i(?:tle(?:StyleDeclaration)?|me(?:out)?)|o(?:talTime|String|olTipText|p|UpperCase|ggle(?:HighQuality)?|Lo(?:caleString|werCase))|e(?:st|llTarget|xt(?:RightMargin|Bold|S(?:ize|elected)|Height|Color|I(?:ndent|talic)|Disabled|Underline|F(?:ield|ont)|Width|LeftMargin|Align)?)|a(?:n|rget(?:Path)?|b(?:Stops|Children|Index|Enabled|leName))|r(?:y|igger|ac(?:e|k(?:AsMenu)?)))|i(?:s(?:Running|Branch|NaN|Con(?:soleOpen|nected)|Toggled|Installed|Open|D(?:own|ebugger)|P(?:urchased|ro(?:totypeOf|pertyEnumerable))|Empty|F(?:inite|ullyPopulated)|Local|Active)|n(?:s(?:tall|ertBefore)|cludeDeltaPacketInfo|t|it(?:ialize|Component|Pod|A(?:pplication|gent))?|de(?:nt|terminate|x(?:InParent(?:Slide|Form)?|Of)?)|put|validate|finity|LocalInternetCache)?|con(?:F(?:ield|unction))?|t(?:e(?:ratorScrolled|m(?:s|RollO(?:ut|ver)|ClassName))|alic)|d3|p|fFrameLoaded|gnore(?:Case|White))|o(?:s|n(?:R(?:ollO(?:ut|ver)|e(?:s(?:ize|ult)|l(?:ease(?:Outside)?|aseOutside)))|XML|Mouse(?:Move|Down|Up|Wheel)|S(?:ync|croller|tatus|oundComplete|e(?:tFocus|lect(?:edItem)?))|N(?:oticeEvent|etworkChange)|C(?:hanged|onnect|l(?:ipEvent|ose))|ID3|D(?:isconnect|eactivate|ata|ragO(?:ut|ver))|Un(?:install|load)|P(?:aymentResult|ress)|EnterFrame|K(?:illFocus|ey(?:Down|Up))|Fault|Lo(?:ad|g)|A(?:ctiv(?:ity|ate)|ppSt(?:op|art)))?|pe(?:n|ration)|verLayChildren|kLabel|ldValue|r(?:d)?)|d(?:i(?:s(?:connect|play(?:Normal|ed(?:Month|Year)|Full)|able(?:Shader|d(?:Ranges|Days)|CloseBox|Events))|rection)|o(?:cTypeDecl|tall|Decoding|main|LazyDecoding)|u(?:plicateMovieClip|ration)|e(?:stroy(?:ChildAt|Object)|code|fault(?:PushButton(?:Enabled)?|KeydownHandler)?|l(?:ta(?:Packet(?:Changed)?)?|ete(?:PopUp|All)?)|blocking)|a(?:shBoardSave|yNames|ta(?:Provider)?|rkshadow)|r(?:opdown(?:Width)?|a(?:w|gO(?:ut|ver))))|u(?:se(?:Sort|HandCursor|Codepage|EchoSuppression)|n(?:shift|install|derline|escape|format|watch|lo(?:ck|ad(?:Movie(?:Num)?)?))|pdate(?:Results|Mode|I(?:nputProperties|tem(?:ByIndex)?)|P(?:acket|roperties)|View|AfterEvent)|rl)|join|p(?:ixelAspectRatio|o(?:sition|p|w)|u(?:sh|rge|blish)|ercen(?:tComplete|Loaded)|lay(?:head(?:Change|Time)|ing|Hidden|erType)?|a(?:ssword|use|r(?:se(?:XML|CSS|Int|Float)|ent(?:Node|Is(?:S(?:creen|lide)|Form))|ams))|r(?:int(?:Num|AsBitmap(?:Num)?)?|o(?:to(?:type)?|pert(?:y|ies)|gress)|e(?:ss|v(?:ious(?:S(?:ibling|lide)|Value)?|Scene|Frame)|ferred(?:Height|Width))))|e(?:scape|n(?:code(?:r)?|ter(?:Frame)?|dFill|able(?:Shader|d|CloseBox|Events))|dit(?:able|Field|LocationDialog)|v(?:ent|al(?:uate)?)|q|x(?:tended|p|ec(?:ute)?|actSettings)|m(?:phasized(?:StyleDeclaration)?|bedFonts))|v(?:i(?:sible|ewPod)|ScrollPolicy|o(?:id|lume)|ersion|P(?:osition|ageScrollSize)|a(?:l(?:idat(?:ionError|e(?:Property|ActivationKey)?)|ue(?:Of)?)|riable)|LineScrollSize)|k(?:ind|ey(?:Down|Up|Press|FrameInterval))|q(?:sort|uality)|f(?:scommand|i(?:n(?:d(?:Text|First|Last)?|ally)|eldInfo|lter(?:ed|Func)?|rst(?:Slide|Child|DayOfWeek|VisibleNode)?)|o(?:nt|cus(?:In|edCell|Out|Enabled)|r(?:egroundDisabled|mat(?:ter)?))|unctionName|ps|l(?:oor|ush)|ace|romCharCode)|w(?:i(?:th|dth)|ordWrap|atch|riteAccess)|l(?:t|i(?:st(?:Owner)?|ne(?:Style|To))|o(?:c(?:k|a(?:t(?:ion|eByld)|l(?:ToGlobal|FileReadDisable)))|opback|ad(?:Movie(?:Num)?|S(?:crollContent|ound)|ed|Variables(?:Num)?|Application)?|g(?:Changes)?)|e(?:ngth|ft(?:Margin)?|ading)?|a(?:st(?:Slide|Child|Index(?:Of)?)?|nguage|b(?:el(?:Placement|F(?:ield|unction))?|leField)))|a(?:s(?:scociate(?:Controller|Display)|in|pectRatio|function)|nd|c(?:ceptConnection|tiv(?:ityLevel|ePlayControl)|os)|t(?:t(?:ach(?:Movie|Sound|Video|Audio)|ributes)|an(?:2)?)|dd(?:header|RequestHeader|Menu(?:Item(?:At)?|At)?|Sort|Header|No(?:tice|de(?:At)?)|C(?:olumn(?:At)?|uePoint)|T(?:oLocalInternetCache|reeNode(?:At)?)|I(?:con|tem(?:s(?:At)?|At)?)|DeltaItem|P(?:od|age|roperty)|EventListener|View|FieldInfo|Listener|Animation)?|uto(?:Size|Play|KeyNav|Load)|pp(?:endChild|ly(?:Changes|Updates)?)|vHardwareDisable|fterLoaded|l(?:ternateRowColors|ign|l(?:ow(?:InsecureDomain|Domain)|Transitions(?:InDone|OutDone))|bum)|r(?:tist|row|g(?:uments|List))|gent|bs)|r(?:ight(?:Margin)?|o(?:ot(?:S(?:creen|lide)|Form)|und|w(?:Height|Count)|llO(?:ut|ver))|e(?:s(?:yncDepth|t(?:orePane|artAnimation|rict)|iz(?:e|able(?:Columns)?)|olveDelta|ult(?:s)?|ponse)|c(?:o(?:ncile(?:Results|Updates)|rd)|eive(?:Video|Audio))|draw|jectConnection|place(?:Sel|ItemAt|AllItems)?|ve(?:al(?:Child)?|rse)|quest(?:SizeChange|Payment)?|f(?:errer|resh(?:ScrollContent|Destinations|Pane|FromSources)?)|lease(?:Outside)?|ad(?:Only|Access)|gister(?:SkinElement|C(?:olor(?:Style|Name)|lass)|InheritingStyle|Proxy)|move(?:Range|M(?:ovieClip|enu(?:Item(?:At)?|At))|Background|Sort|No(?:tice|de(?:sAt|At)?)|C(?:olum(?:nAt|At)|uePoints)|T(?:extField|reeNode(?:At)?)|Item(?:At)?|Pod|EventListener|FromLocalInternetCache|Listener|All(?:C(?:olumns|uePoints)|Items)?))|a(?:ndom|te|dioDot))|g(?:t|oto(?:Slide|NextSlide|PreviousSlide|FirstSlide|LastSlide|And(?:Stop|Play))|e(?:nre|t(?:R(?:GB|o(?:otNode|wCount)|e(?:sizable|mote))|X(?:AxisTitle)?|M(?:i(?:n(?:imum(?:Size)?|utes)|lliseconds)|onth(?:Names)?|ultilineMode|e(?:ssage|nu(?:ItemAt|EnabledAt|At))|aximum(?:Size)?)|B(?:ytes(?:Total|Loaded)|ounds|utton(?:s|Width)|eginIndex|a(?:ndwidthLimit|ckground))|S(?:howAsDisabled|croll(?:ing|Speed|Content|Position|barState|Location)|t(?:yle(?:Names)?|opOnFocus|ate)|ize|o(?:urce|rtState)|p(?:litterBarPosition|acing)|e(?:conds|lect(?:Multiple|ion(?:Required|Type)|Style|ed(?:Node(?:s)?|Cell|Text|I(?:nd(?:ices|ex)|tem(?:s)?))?)|rvice)|moothness|WFVersion)|H(?:ighlight(?:s|Color)|ours|e(?:ight|ader(?:Height|Text|Property|Format|Width|Location)?)|as(?:Shader|CloseBox))|Y(?:ear|AxisTitle)?|N(?:o(?:tices|de(?:DisplayedAt|At))|um(?:Children|berAvailable)|e(?:wTextFormat|xtHighestDepth))|C(?:h(?:ild(?:S(?:creen|lide)|Nodes|Form|At)|artTitle)|o(?:n(?:tent|figInfo)|okie|de|unt|lumn(?:Names|Count|Index|At))|uePoint|ellIndex|loseHandler|a(?:ll|retIndex))|T(?:ypedValue|i(?:tle(?:barHeight)?|p(?:Target|Offset)?|me(?:stamp|zoneOffset|out(?:State|Handler)|r)?)|oggle|ext(?:Extent|Format)?|r(?:ee(?:NodeAt|Length)|ans(?:form|actionId)))|I(?:s(?:Branch|Open)|n(?:stanceAtDepth|d(?:icesByKey|exByKey))|con(?:SymbolName)?|te(?:rator|m(?:sByKey|By(?:Name|Key)|id|ID|At))|d)|O(?:utput(?:Parameter(?:s|ByName)?|Value(?:s)?)|peration|ri(?:entation|ginalCellData))|D(?:i(?:s(?:play(?:Range|Mode|Clip|Index|edMonth)|kUsage)|rection)|uration|e(?:pth|faultNodeIconSymbolName|l(?:taPacket|ay)|bug(?:Config|ID)?)|a(?:y(?:OfWeekNames)?|t(?:e|a(?:Mapping(?:s)?|Item(?:Text|Property|Format)|Label|All(?:Height|Property|Format|Width))?))|rawConnectors)|U(?:se(?:Shadow|HandCursor|rInput|Fade)|RL|TC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear))|P(?:o(?:sition|ds)|ercentComplete|a(?:n(?:e(?:M(?:inimums|aximums)|Height|Title|Width))?|rentNode)|r(?:operty(?:Name|Data)?|efer(?:ences|red(?:Height|Width))))|E(?:n(?:dIndex|abled)|ditingData|x(?:panderSymbolName|andNodeTrigger))|V(?:iewed(?:Pods|Applications)|olume|ersion|alue(?:Source)?)|F(?:i(?:eld|rst(?:DayOfWeek|VisibleNode))|o(?:ntList|cus)|ullYear|ade(?:InLength|OutLength)|rame(?:Color|Width))|Width|L(?:ine(?:Color|Weight)|o(?:cal|adTarget)|ength|a(?:stTabIndex|bel(?:Source)?))|A(?:s(?:cii|Boolean|String|Number)|n(?:yTypedValue|imation)|ctiv(?:eState(?:Handler)?|ateHandler)|utoH(?:ideScrollBar|eight)|llItems|gent))?)?|lobal(?:StyleFormat|ToLocal)?|ain|roupName)|x(?:updatePackety|mlDecl)?|m(?:y(?:MethodName|Call)|in(?:imum)?|o(?:nthNames|tion(?:TimeOut|Level)|de(?:lChanged)?|use(?:Move|O(?:ut|ver)|Down(?:Somewhere|Outside)?|Up(?:Somewhere)?|WheelEnabled)|ve(?:To)?)|u(?:ted|lti(?:pleS(?:imultaneousAllowed|elections)|line))|e(?:ssage|nu(?:Show|Hide)?|th(?:od)?|diaType)|a(?:nufacturer|tch|x(?:scroll|hscroll|imum|HPosition|Chars|VPosition)?)|b(?:substring|chr|ord|length))|b(?:ytes(?:Total|Loaded)|indFormat(?:Strings|Function)|o(?:ttom(?:Scroll)?|ld|rder(?:Color)?)|u(?:tton(?:Height|Width)|iltInItems|ffer(?:Time|Length)|llet)|e(?:foreApplyUpdates|gin(?:GradientFill|Fill))|lockIndent|a(?:ndwidth|ckground(?:Style|Color|Disabled)?)|roadcastMessage)|onHTTPStatus)\\b"},{token:"support.constant.actionscript.2",regex:"\\b(?:__proto__|__resolve|_accProps|_alpha|_changed|_currentframe|_droptarget|_flash|_focusrect|_framesloaded|_global|_height|_highquality|_level|_listeners|_lockroot|_name|_parent|_quality|_root|_rotation|_soundbuftime|_target|_totalframes|_url|_visible|_width|_x|_xmouse|_xscale|_y|_ymouse|_yscale)\\b"},{token:"keyword.control.actionscript.2",regex:"\\b(?:dynamic|extends|import|implements|interface|public|private|new|static|super|var|for|in|break|continue|while|do|return|if|else|case|switch)\\b"},{token:"storage.type.actionscript.2",regex:"\\b(?:Boolean|Number|String|Void)\\b"},{token:"constant.language.actionscript.2",regex:"\\b(?:null|undefined|true|false)\\b"},{token:"constant.numeric.actionscript.2",regex:"\\b(?:0(?:x|X)[0-9a-fA-F]*|(?:[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:L|l|UL|ul|u|U|F|f)?\\b"},{token:"punctuation.definition.string.begin.actionscript.2",regex:'"',push:[{token:"punctuation.definition.string.end.actionscript.2",regex:'"',next:"pop"},{token:"constant.character.escape.actionscript.2",regex:"\\\\."},{defaultToken:"string.quoted.double.actionscript.2"}]},{token:"punctuation.definition.string.begin.actionscript.2",regex:"'",push:[{token:"punctuation.definition.string.end.actionscript.2",regex:"'",next:"pop"},{token:"constant.character.escape.actionscript.2",regex:"\\\\."},{defaultToken:"string.quoted.single.actionscript.2"}]},{token:"support.constant.actionscript.2",regex:"\\b(?:BACKSPACE|CAPSLOCK|CONTROL|DELETEKEY|DOWN|END|ENTER|HOME|INSERT|LEFT|LN10|LN2|LOG10E|LOG2E|MAX_VALUE|MIN_VALUE|NEGATIVE_INFINITY|NaN|PGDN|PGUP|PI|POSITIVE_INFINITY|RIGHT|SPACE|SQRT1_2|SQRT2|UP)\\b"},{token:"punctuation.definition.comment.actionscript.2",regex:"/\\*",push:[{token:"punctuation.definition.comment.actionscript.2",regex:"\\*/",next:"pop"},{defaultToken:"comment.block.actionscript.2"}]},{token:"punctuation.definition.comment.actionscript.2",regex:"//.*$",push_:[{token:"comment.line.double-slash.actionscript.2",regex:"$",next:"pop"},{defaultToken:"comment.line.double-slash.actionscript.2"}]},{token:"keyword.operator.actionscript.2",regex:"\\binstanceof\\b"},{token:"keyword.operator.symbolic.actionscript.2",regex:"[-!%&*+=/?:]"},{token:["meta.preprocessor.actionscript.2","punctuation.definition.preprocessor.actionscript.2","meta.preprocessor.actionscript.2"],regex:"^([ \\t]*)(#)([a-zA-Z]+)"},{token:["storage.type.function.actionscript.2","meta.function.actionscript.2","entity.name.function.actionscript.2","meta.function.actionscript.2","punctuation.definition.parameters.begin.actionscript.2"],regex:"\\b(function)(\\s+)([a-zA-Z_]\\w*)(\\s*)(\\()",push:[{token:"punctuation.definition.parameters.end.actionscript.2",regex:"\\)",next:"pop"},{token:"variable.parameter.function.actionscript.2",regex:"[^,)$]+"},{defaultToken:"meta.function.actionscript.2"}]},{token:["storage.type.class.actionscript.2","meta.class.actionscript.2","entity.name.type.class.actionscript.2","meta.class.actionscript.2","storage.modifier.extends.actionscript.2","meta.class.actionscript.2","entity.other.inherited-class.actionscript.2"],regex:"\\b(class)(\\s+)([a-zA-Z_](?:\\w|\\.)*)(?:(\\s+)(extends)(\\s+)([a-zA-Z_](?:\\w|\\.)*))?"}]},this.normalizeRules()};s.metaData={fileTypes:["as"],keyEquivalent:"^~A",name:"ActionScript",scopeName:"source.actionscript.2"},r.inherits(s,i),t.ActionScriptHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/actionscript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/actionscript_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./actionscript_highlight_rules").ActionScriptHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/actionscript"}.call(u.prototype),t.Mode=u})
\ No newline at end of file
diff --git a/public/lib/ace/mode-ada.js b/public/lib/ace/mode-ada.js
deleted file mode 100644
index 803fe45..0000000
--- a/public/lib/ace/mode-ada.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/ada_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="abort|else|new|return|abs|elsif|not|reverse|abstract|end|null|accept|entry|select|access|exception|of|separate|aliased|exit|or|some|all|others|subtype|and|for|out|synchronized|array|function|overriding|at|tagged|generic|package|task|begin|goto|pragma|terminate|body|private|then|if|procedure|type|case|in|protected|constant|interface|until||is|raise|use|declare|range|delay|limited|record|when|delta|loop|rem|while|digits|renames|with|do|mod|requeue|xor",t="true|false|null",n="count|min|max|avg|sum|rank|now|coalesce|main",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]}};r.inherits(s,i),t.AdaHighlightRules=s}),ace.define("ace/mode/ada",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ada_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ada_highlight_rules").AdaHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="--",this.$id="ace/mode/ada"}.call(o.prototype),t.Mode=o})
\ No newline at end of file
diff --git a/public/lib/ace/mode-apache_conf.js b/public/lib/ace/mode-apache_conf.js
deleted file mode 100644
index 0ee59aa..0000000
--- a/public/lib/ace/mode-apache_conf.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/apache_conf_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["punctuation.definition.comment.apacheconf","comment.line.hash.ini","comment.line.hash.ini"],regex:"^((?:\\s)*)(#)(.*$)"},{token:["punctuation.definition.tag.apacheconf","entity.tag.apacheconf","text","string.value.apacheconf","punctuation.definition.tag.apacheconf"],regex:"(<)(Proxy|ProxyMatch|IfVersion|Directory|DirectoryMatch|Files|FilesMatch|IfDefine|IfModule|Limit|LimitExcept|Location|LocationMatch|VirtualHost)(?:(\\s)(.+?))?(>)"},{token:["punctuation.definition.tag.apacheconf","entity.tag.apacheconf","punctuation.definition.tag.apacheconf"],regex:"()(Proxy|ProxyMatch|IfVersion|Directory|DirectoryMatch|Files|FilesMatch|IfDefine|IfModule|Limit|LimitExcept|Location|LocationMatch|VirtualHost)(>)"},{token:["keyword.alias.apacheconf","text","string.regexp.apacheconf","text","string.replacement.apacheconf","text"],regex:"(Rewrite(?:Rule|Cond))(\\s+)(.+?)(\\s+)(.+?)($|\\s)"},{token:["keyword.alias.apacheconf","text","entity.status.apacheconf","text","string.regexp.apacheconf","text","string.path.apacheconf","text"],regex:"(RedirectMatch)(?:(\\s+)(\\d\\d\\d|permanent|temp|seeother|gone))?(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?"},{token:["keyword.alias.apacheconf","text","entity.status.apacheconf","text","string.path.apacheconf","text","string.path.apacheconf","text"],regex:"(Redirect)(?:(\\s+)(\\d\\d\\d|permanent|temp|seeother|gone))?(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?"},{token:["keyword.alias.apacheconf","text","string.regexp.apacheconf","text","string.path.apacheconf","text"],regex:"(ScriptAliasMatch|AliasMatch)(\\s+)(.+?)(\\s+)(?:(.+?)(\\s))?"},{token:["keyword.alias.apacheconf","text","string.path.apacheconf","text","string.path.apacheconf","text"],regex:"(RedirectPermanent|RedirectTemp|ScriptAlias|Alias)(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?"},{token:"keyword.core.apacheconf",regex:"\\b(?:AcceptPathInfo|AccessFileName|AddDefaultCharset|AddOutputFilterByType|AllowEncodedSlashes|AllowOverride|AuthName|AuthType|CGIMapExtension|ContentDigest|DefaultType|DocumentRoot|EnableMMAP|EnableSendfile|ErrorDocument|ErrorLog|FileETag|ForceType|HostnameLookups|IdentityCheck|Include|KeepAlive|KeepAliveTimeout|LimitInternalRecursion|LimitRequestBody|LimitRequestFields|LimitRequestFieldSize|LimitRequestLine|LimitXMLRequestBody|LogLevel|MaxKeepAliveRequests|NameVirtualHost|Options|Require|RLimitCPU|RLimitMEM|RLimitNPROC|Satisfy|ScriptInterpreterSource|ServerAdmin|ServerAlias|ServerName|ServerPath|ServerRoot|ServerSignature|ServerTokens|SetHandler|SetInputFilter|SetOutputFilter|TimeOut|TraceEnable|UseCanonicalName)\\b"},{token:"keyword.mpm.apacheconf",regex:"\\b(?:AcceptMutex|AssignUserID|BS2000Account|ChildPerUserID|CoreDumpDirectory|EnableExceptionHook|Group|Listen|ListenBacklog|LockFile|MaxClients|MaxMemFree|MaxRequestsPerChild|MaxRequestsPerThread|MaxSpareServers|MaxSpareThreads|MaxThreads|MaxThreadsPerChild|MinSpareServers|MinSpareThreads|NumServers|PidFile|ReceiveBufferSize|ScoreBoardFile|SendBufferSize|ServerLimit|StartServers|StartThreads|ThreadLimit|ThreadsPerChild|ThreadStackSize|User|Win32DisableAcceptEx)\\b"},{token:"keyword.access.apacheconf",regex:"\\b(?:Allow|Deny|Order)\\b"},{token:"keyword.actions.apacheconf",regex:"\\b(?:Action|Script)\\b"},{token:"keyword.alias.apacheconf",regex:"\\b(?:Alias|AliasMatch|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ScriptAlias|ScriptAliasMatch)\\b"},{token:"keyword.auth.apacheconf",regex:"\\b(?:AuthAuthoritative|AuthGroupFile|AuthUserFile)\\b"},{token:"keyword.auth_anon.apacheconf",regex:"\\b(?:Anonymous|Anonymous_Authoritative|Anonymous_LogEmail|Anonymous_MustGiveEmail|Anonymous_NoUserID|Anonymous_VerifyEmail)\\b"},{token:"keyword.auth_dbm.apacheconf",regex:"\\b(?:AuthDBMAuthoritative|AuthDBMGroupFile|AuthDBMType|AuthDBMUserFile)\\b"},{token:"keyword.auth_digest.apacheconf",regex:"\\b(?:AuthDigestAlgorithm|AuthDigestDomain|AuthDigestFile|AuthDigestGroupFile|AuthDigestNcCheck|AuthDigestNonceFormat|AuthDigestNonceLifetime|AuthDigestQop|AuthDigestShmemSize)\\b"},{token:"keyword.auth_ldap.apacheconf",regex:"\\b(?:AuthLDAPAuthoritative|AuthLDAPBindDN|AuthLDAPBindPassword|AuthLDAPCharsetConfig|AuthLDAPCompareDNOnServer|AuthLDAPDereferenceAliases|AuthLDAPEnabled|AuthLDAPFrontPageHack|AuthLDAPGroupAttribute|AuthLDAPGroupAttributeIsDN|AuthLDAPRemoteUserIsDN|AuthLDAPUrl)\\b"},{token:"keyword.autoindex.apacheconf",regex:"\\b(?:AddAlt|AddAltByEncoding|AddAltByType|AddDescription|AddIcon|AddIconByEncoding|AddIconByType|DefaultIcon|HeaderName|IndexIgnore|IndexOptions|IndexOrderDefault|ReadmeName)\\b"},{token:"keyword.cache.apacheconf",regex:"\\b(?:CacheDefaultExpire|CacheDisable|CacheEnable|CacheForceCompletion|CacheIgnoreCacheControl|CacheIgnoreHeaders|CacheIgnoreNoLastMod|CacheLastModifiedFactor|CacheMaxExpire)\\b"},{token:"keyword.cern_meta.apacheconf",regex:"\\b(?:MetaDir|MetaFiles|MetaSuffix)\\b"},{token:"keyword.cgi.apacheconf",regex:"\\b(?:ScriptLog|ScriptLogBuffer|ScriptLogLength)\\b"},{token:"keyword.cgid.apacheconf",regex:"\\b(?:ScriptLog|ScriptLogBuffer|ScriptLogLength|ScriptSock)\\b"},{token:"keyword.charset_lite.apacheconf",regex:"\\b(?:CharsetDefault|CharsetOptions|CharsetSourceEnc)\\b"},{token:"keyword.dav.apacheconf",regex:"\\b(?:Dav|DavDepthInfinity|DavMinTimeout|DavLockDB)\\b"},{token:"keyword.deflate.apacheconf",regex:"\\b(?:DeflateBufferSize|DeflateCompressionLevel|DeflateFilterNote|DeflateMemLevel|DeflateWindowSize)\\b"},{token:"keyword.dir.apacheconf",regex:"\\b(?:DirectoryIndex|DirectorySlash)\\b"},{token:"keyword.disk_cache.apacheconf",regex:"\\b(?:CacheDirLength|CacheDirLevels|CacheExpiryCheck|CacheGcClean|CacheGcDaily|CacheGcInterval|CacheGcMemUsage|CacheGcUnused|CacheMaxFileSize|CacheMinFileSize|CacheRoot|CacheSize|CacheTimeMargin)\\b"},{token:"keyword.dumpio.apacheconf",regex:"\\b(?:DumpIOInput|DumpIOOutput)\\b"},{token:"keyword.env.apacheconf",regex:"\\b(?:PassEnv|SetEnv|UnsetEnv)\\b"},{token:"keyword.expires.apacheconf",regex:"\\b(?:ExpiresActive|ExpiresByType|ExpiresDefault)\\b"},{token:"keyword.ext_filter.apacheconf",regex:"\\b(?:ExtFilterDefine|ExtFilterOptions)\\b"},{token:"keyword.file_cache.apacheconf",regex:"\\b(?:CacheFile|MMapFile)\\b"},{token:"keyword.headers.apacheconf",regex:"\\b(?:Header|RequestHeader)\\b"},{token:"keyword.imap.apacheconf",regex:"\\b(?:ImapBase|ImapDefault|ImapMenu)\\b"},{token:"keyword.include.apacheconf",regex:"\\b(?:SSIEndTag|SSIErrorMsg|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|XBitHack)\\b"},{token:"keyword.isapi.apacheconf",regex:"\\b(?:ISAPIAppendLogToErrors|ISAPIAppendLogToQuery|ISAPICacheFile|ISAPIFakeAsync|ISAPILogNotSupported|ISAPIReadAheadBuffer)\\b"},{token:"keyword.ldap.apacheconf",regex:"\\b(?:LDAPCacheEntries|LDAPCacheTTL|LDAPConnectionTimeout|LDAPOpCacheEntries|LDAPOpCacheTTL|LDAPSharedCacheFile|LDAPSharedCacheSize|LDAPTrustedCA|LDAPTrustedCAType)\\b"},{token:"keyword.log.apacheconf",regex:"\\b(?:BufferedLogs|CookieLog|CustomLog|LogFormat|TransferLog|ForensicLog)\\b"},{token:"keyword.mem_cache.apacheconf",regex:"\\b(?:MCacheMaxObjectCount|MCacheMaxObjectSize|MCacheMaxStreamingBuffer|MCacheMinObjectSize|MCacheRemovalAlgorithm|MCacheSize)\\b"},{token:"keyword.mime.apacheconf",regex:"\\b(?:AddCharset|AddEncoding|AddHandler|AddInputFilter|AddLanguage|AddOutputFilter|AddType|DefaultLanguage|ModMimeUsePathInfo|MultiviewsMatch|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|TypesConfig)\\b"},{token:"keyword.misc.apacheconf",regex:"\\b(?:ProtocolEcho|Example|AddModuleInfo|MimeMagicFile|CheckSpelling|ExtendedStatus|SuexecUserGroup|UserDir)\\b"},{token:"keyword.negotiation.apacheconf",regex:"\\b(?:CacheNegotiatedDocs|ForceLanguagePriority|LanguagePriority)\\b"},{token:"keyword.nw_ssl.apacheconf",regex:"\\b(?:NWSSLTrustedCerts|NWSSLUpgradeable|SecureListen)\\b"},{token:"keyword.proxy.apacheconf",regex:"\\b(?:AllowCONNECT|NoProxy|ProxyBadHeader|ProxyBlock|ProxyDomain|ProxyErrorOverride|ProxyFtpDirCharset|ProxyIOBufferSize|ProxyMaxForwards|ProxyPass|ProxyPassReverse|ProxyPreserveHost|ProxyReceiveBufferSize|ProxyRemote|ProxyRemoteMatch|ProxyRequests|ProxyTimeout|ProxyVia)\\b"},{token:"keyword.rewrite.apacheconf",regex:"\\b(?:RewriteBase|RewriteCond|RewriteEngine|RewriteLock|RewriteLog|RewriteLogLevel|RewriteMap|RewriteOptions|RewriteRule)\\b"},{token:"keyword.setenvif.apacheconf",regex:"\\b(?:BrowserMatch|BrowserMatchNoCase|SetEnvIf|SetEnvIfNoCase)\\b"},{token:"keyword.so.apacheconf",regex:"\\b(?:LoadFile|LoadModule)\\b"},{token:"keyword.ssl.apacheconf",regex:"\\b(?:SSLCACertificateFile|SSLCACertificatePath|SSLCARevocationFile|SSLCARevocationPath|SSLCertificateChainFile|SSLCertificateFile|SSLCertificateKeyFile|SSLCipherSuite|SSLEngine|SSLMutex|SSLOptions|SSLPassPhraseDialog|SSLProtocol|SSLProxyCACertificateFile|SSLProxyCACertificatePath|SSLProxyCARevocationFile|SSLProxyCARevocationPath|SSLProxyCipherSuite|SSLProxyEngine|SSLProxyMachineCertificateFile|SSLProxyMachineCertificatePath|SSLProxyProtocol|SSLProxyVerify|SSLProxyVerifyDepth|SSLRandomSeed|SSLRequire|SSLRequireSSL|SSLSessionCache|SSLSessionCacheTimeout|SSLUserName|SSLVerifyClient|SSLVerifyDepth)\\b"},{token:"keyword.usertrack.apacheconf",regex:"\\b(?:CookieDomain|CookieExpires|CookieName|CookieStyle|CookieTracking)\\b"},{token:"keyword.vhost_alias.apacheconf",regex:"\\b(?:VirtualDocumentRoot|VirtualDocumentRootIP|VirtualScriptAlias|VirtualScriptAliasIP)\\b"},{token:["keyword.php.apacheconf","text","entity.property.apacheconf","text","string.value.apacheconf","text"],regex:"\\b(php_value|php_flag)\\b(?:(\\s+)(.+?)(?:(\\s+)(.+?))?)?(\\s)"},{token:["punctuation.variable.apacheconf","variable.env.apacheconf","variable.misc.apacheconf","punctuation.variable.apacheconf"],regex:"(%\\{)(?:(HTTP_USER_AGENT|HTTP_REFERER|HTTP_COOKIE|HTTP_FORWARDED|HTTP_HOST|HTTP_PROXY_CONNECTION|HTTP_ACCEPT|REMOTE_ADDR|REMOTE_HOST|REMOTE_PORT|REMOTE_USER|REMOTE_IDENT|REQUEST_METHOD|SCRIPT_FILENAME|PATH_INFO|QUERY_STRING|AUTH_TYPE|DOCUMENT_ROOT|SERVER_ADMIN|SERVER_NAME|SERVER_ADDR|SERVER_PORT|SERVER_PROTOCOL|SERVER_SOFTWARE|TIME_YEAR|TIME_MON|TIME_DAY|TIME_HOUR|TIME_MIN|TIME_SEC|TIME_WDAY|TIME|API_VERSION|THE_REQUEST|REQUEST_URI|REQUEST_FILENAME|IS_SUBREQ|HTTPS)|(.*?))(\\})"},{token:["entity.mime-type.apacheconf","text"],regex:"\\b((?:text|image|application|video|audio)/.+?)(\\s)"},{token:"entity.helper.apacheconf",regex:"\\b(?:from|unset|set|on|off)\\b",caseInsensitive:!0},{token:"constant.integer.apacheconf",regex:"\\b\\d+\\b"},{token:["text","punctuation.definition.flag.apacheconf","string.flag.apacheconf","punctuation.definition.flag.apacheconf","text"],regex:"(\\s)(\\[)(.*?)(\\])(\\s)"}]},this.normalizeRules()};s.metaData={fileTypes:["conf","CONF","htaccess","HTACCESS","htgroups","HTGROUPS","htpasswd","HTPASSWD",".htaccess",".HTACCESS",".htgroups",".HTGROUPS",".htpasswd",".HTPASSWD"],name:"Apache Conf",scopeName:"source.apacheconf"},r.inherits(s,i),t.ApacheConfHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/apache_conf",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/apache_conf_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./apache_conf_highlight_rules").ApacheConfHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="#",this.$id="ace/mode/apache_conf"}.call(u.prototype),t.Mode=u})
\ No newline at end of file
diff --git a/public/lib/ace/mode-applescript.js b/public/lib/ace/mode-applescript.js
deleted file mode 100644
index 36d86eb..0000000
--- a/public/lib/ace/mode-applescript.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/applescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="about|above|after|against|and|around|as|at|back|before|beginning|behind|below|beneath|beside|between|but|by|considering|contain|contains|continue|copy|div|does|eighth|else|end|equal|equals|error|every|exit|fifth|first|for|fourth|from|front|get|given|global|if|ignoring|in|into|is|it|its|last|local|me|middle|mod|my|ninth|not|of|on|onto|or|over|prop|property|put|ref|reference|repeat|returning|script|second|set|seventh|since|sixth|some|tell|tenth|that|the|then|third|through|thru|timeout|times|to|transaction|try|until|where|while|whose|with|without",t="AppleScript|false|linefeed|return|pi|quote|result|space|tab|true",n="activate|beep|count|delay|launch|log|offset|read|round|run|say|summarize|write",r="alias|application|boolean|class|constant|date|file|integer|list|number|real|record|string|text|character|characters|contents|day|frontmost|id|item|length|month|name|paragraph|paragraphs|rest|reverse|running|time|version|weekday|word|words|year",i=this.createKeywordMapper({"support.function":n,"constant.language":t,"support.type":r,keyword:e},"identifier");this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"comment",regex:"\\(\\*",next:"comment"},{token:"string",regex:'".*?"'},{token:"support.type",regex:"\\b(POSIX file|POSIX path|(date|time) string|quoted form)\\b"},{token:"support.function",regex:"\\b(clipboard info|the clipboard|info for|list (disks|folder)|mount volume|path to|(close|open for) access|(get|set) eof|current date|do shell script|get volume settings|random number|set volume|system attribute|system info|time to GMT|(load|run|store) script|scripting components|ASCII (character|number)|localized string|choose (application|color|file|file name|folder|from list|remote application|URL)|display (alert|dialog))\\b|^\\s*return\\b"},{token:"constant.language",regex:"\\b(text item delimiters|current application|missing value)\\b"},{token:"keyword",regex:"\\b(apart from|aside from|instead of|out of|greater than|isn't|(doesn't|does not) (equal|come before|come after|contain)|(greater|less) than( or equal)?|(starts?|ends|begins?) with|contained by|comes (before|after)|a (ref|reference))\\b"},{token:i,regex:"[a-zA-Z][a-zA-Z0-9_]*\\b"}],comment:[{token:"comment",regex:"\\*\\)",next:"start"},{defaultToken:"comment"}]},this.normalizeRules()};r.inherits(s,i),t.AppleScriptHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/applescript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/applescript_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./applescript_highlight_rules").AppleScriptHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="--",this.blockComment={start:"(*",end:"*)"},this.$id="ace/mode/applescript"}.call(u.prototype),t.Mode=u})
\ No newline at end of file
diff --git a/public/lib/ace/mode-asciidoc.js b/public/lib/ace/mode-asciidoc.js
deleted file mode 100644
index 82ef4bf..0000000
--- a/public/lib/ace/mode-asciidoc.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/asciidoc_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){function t(e){var t=/\w/.test(e)?"\\b":"(?:\\B|^)";return t+e+"[^"+e+"].*?"+e+"(?![\\w*])"}var e="[a-zA-Z\u00a1-\uffff]+\\b";this.$rules={start:[{token:"empty",regex:/$/},{token:"literal",regex:/^\.{4,}\s*$/,next:"listingBlock"},{token:"literal",regex:/^-{4,}\s*$/,next:"literalBlock"},{token:"string",regex:/^\+{4,}\s*$/,next:"passthroughBlock"},{token:"keyword",regex:/^={4,}\s*$/},{token:"text",regex:/^\s*$/},{token:"empty",regex:"",next:"dissallowDelimitedBlock"}],dissallowDelimitedBlock:[{include:"paragraphEnd"},{token:"comment",regex:"^//.+$"},{token:"keyword",regex:"^(?:NOTE|TIP|IMPORTANT|WARNING|CAUTION):"},{include:"listStart"},{token:"literal",regex:/^\s+.+$/,next:"indentedBlock"},{token:"empty",regex:"",next:"text"}],paragraphEnd:[{token:"doc.comment",regex:/^\/{4,}\s*$/,next:"commentBlock"},{token:"tableBlock",regex:/^\s*[|!]=+\s*$/,next:"tableBlock"},{token:"keyword",regex:/^(?:--|''')\s*$/,next:"start"},{token:"option",regex:/^\[.*\]\s*$/,next:"start"},{token:"pageBreak",regex:/^>{3,}$/,next:"start"},{token:"literal",regex:/^\.{4,}\s*$/,next:"listingBlock"},{token:"titleUnderline",regex:/^(?:={2,}|-{2,}|~{2,}|\^{2,}|\+{2,})\s*$/,next:"start"},{token:"singleLineTitle",regex:/^={1,5}\s+\S.*$/,next:"start"},{token:"otherBlock",regex:/^(?:\*{2,}|_{2,})\s*$/,next:"start"},{token:"optionalTitle",regex:/^\.[^.\s].+$/,next:"start"}],listStart:[{token:"keyword",regex:/^\s*(?:\d+\.|[a-zA-Z]\.|[ixvmIXVM]+\)|\*{1,5}|-|\.{1,5})\s/,next:"listText"},{token:"meta.tag",regex:/^.+(?::{2,4}|;;)(?: |$)/,next:"listText"},{token:"support.function.list.callout",regex:/^(?:<\d+>|\d+>|>) /,next:"text"},{token:"keyword",regex:/^\+\s*$/,next:"start"}],text:[{token:["link","variable.language"],regex:/((?:https?:\/\/|ftp:\/\/|file:\/\/|mailto:|callto:)[^\s\[]+)(\[.*?\])/},{token:"link",regex:/(?:https?:\/\/|ftp:\/\/|file:\/\/|mailto:|callto:)[^\s\[]+/},{token:"link",regex:/\b[\w\.\/\-]+@[\w\.\/\-]+\b/},{include:"macros"},{include:"paragraphEnd"},{token:"literal",regex:/\+{3,}/,next:"smallPassthrough"},{token:"escape",regex:/\((?:C|TM|R)\)|\.{3}|->|<-|=>|<=|(?:\d+|x[a-fA-F\d]+);|(?: |^)--(?=\s+\S)/},{token:"escape",regex:/\\[_*'`+#]|\\{2}[_*'`+#]{2}/},{token:"keyword",regex:/\s\+$/},{token:"text",regex:e},{token:["keyword","string","keyword"],regex:/(<<[\w\d\-$]+,)(.*?)(>>|$)/},{token:"keyword",regex:/<<[\w\d\-$]+,?|>>/},{token:"constant.character",regex:/\({2,3}.*?\){2,3}/},{token:"keyword",regex:/\[\[.+?\]\]/},{token:"support",regex:/^\[{3}[\w\d =\-]+\]{3}/},{include:"quotes"},{token:"empty",regex:/^\s*$/,next:"start"}],listText:[{include:"listStart"},{include:"text"}],indentedBlock:[{token:"literal",regex:/^[\s\w].+$/,next:"indentedBlock"},{token:"literal",regex:"",next:"start"}],listingBlock:[{token:"literal",regex:/^\.{4,}\s*$/,next:"dissallowDelimitedBlock"},{token:"constant.numeric",regex:"<\\d+>"},{token:"literal",regex:"[^<]+"},{token:"literal",regex:"<"}],literalBlock:[{token:"literal",regex:/^-{4,}\s*$/,next:"dissallowDelimitedBlock"},{token:"constant.numeric",regex:"<\\d+>"},{token:"literal",regex:"[^<]+"},{token:"literal",regex:"<"}],passthroughBlock:[{token:"literal",regex:/^\+{4,}\s*$/,next:"dissallowDelimitedBlock"},{token:"literal",regex:e+"|\\d+"},{include:"macros"},{token:"literal",regex:"."}],smallPassthrough:[{token:"literal",regex:/[+]{3,}/,next:"dissallowDelimitedBlock"},{token:"literal",regex:/^\s*$/,next:"dissallowDelimitedBlock"},{token:"literal",regex:e+"|\\d+"},{include:"macros"}],commentBlock:[{token:"doc.comment",regex:/^\/{4,}\s*$/,next:"dissallowDelimitedBlock"},{token:"doc.comment",regex:"^.*$"}],tableBlock:[{token:"tableBlock",regex:/^\s*\|={3,}\s*$/,next:"dissallowDelimitedBlock"},{token:"tableBlock",regex:/^\s*!={3,}\s*$/,next:"innerTableBlock"},{token:"tableBlock",regex:/\|/},{include:"text",noEscape:!0}],innerTableBlock:[{token:"tableBlock",regex:/^\s*!={3,}\s*$/,next:"tableBlock"},{token:"tableBlock",regex:/^\s*|={3,}\s*$/,next:"dissallowDelimitedBlock"},{token:"tableBlock",regex:/!/}],macros:[{token:"macro",regex:/{[\w\-$]+}/},{token:["text","string","text","constant.character","text"],regex:/({)([\w\-$]+)(:)?(.+)?(})/},{token:["text","markup.list.macro","keyword","string"],regex:/(\w+)(footnote(?:ref)?::?)([^\s\[]+)?(\[.*?\])?/},{token:["markup.list.macro","keyword","string"],regex:/([a-zA-Z\-][\w\.\/\-]*::?)([^\s\[]+)(\[.*?\])?/},{token:["markup.list.macro","keyword"],regex:/([a-zA-Z\-][\w\.\/\-]+::?)(\[.*?\])/},{token:"keyword",regex:/^:.+?:(?= |$)/}],quotes:[{token:"string.italic",regex:/__[^_\s].*?__/},{token:"string.italic",regex:t("_")},{token:"keyword.bold",regex:/\*\*[^*\s].*?\*\*/},{token:"keyword.bold",regex:t("\\*")},{token:"literal",regex:t("\\+")},{token:"literal",regex:/\+\+[^+\s].*?\+\+/},{token:"literal",regex:/\$\$.+?\$\$/},{token:"literal",regex:t("`")},{token:"keyword",regex:t("^")},{token:"keyword",regex:t("~")},{token:"keyword",regex:/##?/},{token:"keyword",regex:/(?:\B|^)``|\b''/}]};var n={macro:"constant.character",tableBlock:"doc.comment",titleUnderline:"markup.heading",singleLineTitle:"markup.heading",pageBreak:"string",option:"string.regexp",otherBlock:"markup.list",literal:"support.function",optionalTitle:"constant.numeric",escape:"constant.language.escape",link:"markup.underline.list"};for(var r in this.$rules){var i=this.$rules[r];for(var s=i.length;s--;){var o=i[s];if(o.include||typeof o=="string"){var u=[s,1].concat(this.$rules[o.include||o]);o.noEscape&&(u=u.filter(function(e){return!e.next})),i.splice.apply(i,u)}else o.token in n&&(o.token=n[o.token])}}};r.inherits(s,i),t.AsciidocHighlightRules=s}),ace.define("ace/mode/folding/asciidoc",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.foldingStartMarker=/^(?:\|={10,}|[\.\/=\-~^+]{4,}\s*$|={1,5} )/,this.singleLineHeadingRe=/^={1,5}(?=\s+\S)/,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?r[0]=="="?this.singleLineHeadingRe.test(r)?"start":e.getLine(n-1).length!=e.getLine(n).length?"":"start":e.bgTokenizer.getState(n)=="dissallowDelimitedBlock"?"end":"start":""},this.getFoldWidgetRange=function(e,t,n){function l(t){return f=e.getTokens(t)[0],f&&f.type}function d(){var t=f.value.match(p);if(t)return t[0].length;var r=c.indexOf(f.value[0])+1;return r==1&&e.getLine(n-1).length!=e.getLine(n).length?Infinity:r}var r=e.getLine(n),i=r.length,o=e.getLength(),u=n,a=n;if(!r.match(this.foldingStartMarker))return;var f,c=["=","-","~","^","+"],h="markup.heading",p=this.singleLineHeadingRe;if(l(n)==h){var v=d();while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/autohotkey",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/autohotkey_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./autohotkey_highlight_rules").AutoHotKeyHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart=";",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/autohotkey"}.call(u.prototype),t.Mode=u})
\ No newline at end of file
diff --git a/public/lib/ace/mode-batchfile.js b/public/lib/ace/mode-batchfile.js
deleted file mode 100644
index c73678b..0000000
--- a/public/lib/ace/mode-batchfile.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/batchfile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"keyword.command.dosbatch",regex:"\\b(?:append|assoc|at|attrib|break|cacls|cd|chcp|chdir|chkdsk|chkntfs|cls|cmd|color|comp|compact|convert|copy|date|del|dir|diskcomp|diskcopy|doskey|echo|endlocal|erase|fc|find|findstr|format|ftype|graftabl|help|keyb|label|md|mkdir|mode|more|move|path|pause|popd|print|prompt|pushd|rd|recover|ren|rename|replace|restore|rmdir|set|setlocal|shift|sort|start|subst|time|title|tree|type|ver|verify|vol|xcopy)\\b",caseInsensitive:!0},{token:"keyword.control.statement.dosbatch",regex:"\\b(?:goto|call|exit)\\b",caseInsensitive:!0},{token:"keyword.control.conditional.if.dosbatch",regex:"\\bif\\s+not\\s+(?:exist|defined|errorlevel|cmdextversion)\\b",caseInsensitive:!0},{token:"keyword.control.conditional.dosbatch",regex:"\\b(?:if|else)\\b",caseInsensitive:!0},{token:"keyword.control.repeat.dosbatch",regex:"\\bfor\\b",caseInsensitive:!0},{token:"keyword.operator.dosbatch",regex:"\\b(?:EQU|NEQ|LSS|LEQ|GTR|GEQ)\\b"},{token:["doc.comment","comment"],regex:"(?:^|\\b)(rem)($|\\s.*$)",caseInsensitive:!0},{token:"comment.line.colons.dosbatch",regex:"::.*$"},{include:"variable"},{token:"punctuation.definition.string.begin.shell",regex:'"',push:[{token:"punctuation.definition.string.end.shell",regex:'"',next:"pop"},{include:"variable"},{defaultToken:"string.quoted.double.dosbatch"}]},{token:"keyword.operator.pipe.dosbatch",regex:"[|]"},{token:"keyword.operator.redirect.shell",regex:"&>|\\d*>&\\d*|\\d*(?:>>|>|<)|\\d*<&|\\d*<>"}],variable:[{token:"constant.numeric",regex:"%%\\w+|%[*\\d]|%\\w+%"},{token:"constant.numeric",regex:"%~\\d+"},{token:["markup.list","constant.other","markup.list"],regex:"(%)(\\w+)(%?)"}]},this.normalizeRules()};s.metaData={name:"Batch File",scopeName:"source.dosbatch",fileTypes:["bat"]},r.inherits(s,i),t.BatchFileHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/batchfile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/batchfile_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./batchfile_highlight_rules").BatchFileHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="::",this.blockComment="",this.$id="ace/mode/batchfile"}.call(u.prototype),t.Mode=u})
\ No newline at end of file
diff --git a/public/lib/ace/mode-bro.js b/public/lib/ace/mode-bro.js
deleted file mode 100644
index c5a37e6..0000000
--- a/public/lib/ace/mode-bro.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/bro_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"punctuation.definition.comment.bro",regex:/#/,push:[{token:"comment.line.number-sign.bro",regex:/$/,next:"pop"},{defaultToken:"comment.line.number-sign.bro"}]},{token:"keyword.control.bro",regex:/\b(?:break|case|continue|else|for|if|return|switch|next|when|timeout|schedule)\b/},{token:["meta.function.bro","meta.function.bro","storage.type.bro","meta.function.bro","entity.name.function.bro","meta.function.bro"],regex:/^(\s*)(?:function|hook|event)(\s*)(.*)(\s*\()(.*)(\).*$)/},{token:"storage.type.bro",regex:/\b(?:bool|enum|double|int|count|port|addr|subnet|any|file|interval|time|string|table|vector|set|record|pattern|hook)\b/},{token:"storage.modifier.bro",regex:/\b(?:global|const|redef|local|&(?:optional|rotate_interval|rotate_size|add_func|del_func|expire_func|expire_create|expire_read|expire_write|persistent|synchronized|encrypt|mergeable|priority|group|type_column|log|error_handler))\b/},{token:"keyword.operator.bro",regex:/\s*(?:\||&&|(?:>|<|!)=?|==)\s*|\b!?in\b/},{token:"constant.language.bro",regex:/\b(?:T|F)\b/},{token:"constant.numeric.bro",regex:/\b(?:0(?:x|X)[0-9a-fA-F]*|(?:[0-9]+\.?[0-9]*|\.[0-9]+)(?:(?:e|E)(?:\+|-)?[0-9]+)?)(?:\/(?:tcp|udp|icmp)|\s*(?:u?sec|min|hr|day)s?)?\b/},{token:"punctuation.definition.string.begin.bro",regex:/"/,push:[{token:"punctuation.definition.string.end.bro",regex:/"/,next:"pop"},{include:"#string_escaped_char"},{include:"#string_placeholder"},{defaultToken:"string.quoted.double.bro"}]},{token:"punctuation.definition.string.begin.bro",regex:/\//,push:[{token:"punctuation.definition.string.end.bro",regex:/\//,next:"pop"},{include:"#string_escaped_char"},{include:"#string_placeholder"},{defaultToken:"string.quoted.regex.bro"}]},{token:["meta.preprocessor.bro.load","keyword.other.special-method.bro"],regex:/^(\s*)(\@load(?:-sigs)?)\b/,push:[{token:[],regex:/(?=\#)|$/,next:"pop"},{defaultToken:"meta.preprocessor.bro.load"}]},{token:["meta.preprocessor.bro.if","keyword.other.special-method.bro","meta.preprocessor.bro.if"],regex:/^(\s*)(\@endif|\@if(?:n?def)?)(.*$)/,push:[{token:[],regex:/$/,next:"pop"},{defaultToken:"meta.preprocessor.bro.if"}]}],"#disabled":[{token:"text",regex:/^\s*\@if(?:n?def)?\b.*$/,push:[{token:"text",regex:/^\s*\@endif\b.*$/,next:"pop"},{include:"#disabled"},{include:"#pragma-mark"}],comment:"eat nested preprocessor ifdefs"}],"#preprocessor-rule-other":[{token:["text","meta.preprocessor.bro","meta.preprocessor.bro","text"],regex:/^(\s*)(@if)((?:n?def)?)\b(.*?)(?:(?=)|$)/,push:[{token:["text","meta.preprocessor.bro","text"],regex:/^(\s*)(@endif)\b(.*$)/,next:"pop"},{include:"$base"}]}],"#string_escaped_char":[{token:"constant.character.escape.bro",regex:/\\(?:\\|[abefnprtv'"?]|[0-3]\d{,2}|[4-7]\d?|x[a-fA-F0-9]{,2})/},{token:"invalid.illegal.unknown-escape.bro",regex:/\\./}],"#string_placeholder":[{token:"constant.other.placeholder.bro",regex:/%(?:\d+\$)?[#0\- +']*[,;:_]?(?:-?\d+|\*(?:-?\d+\$)?)?(?:\.(?:-?\d+|\*(?:-?\d+\$)?)?)?(?:hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?[diouxXDOUeEfFgGaACcSspn%]/},{token:"invalid.illegal.placeholder.bro",regex:/%/}]},this.normalizeRules()};s.metaData={fileTypes:["bro"],foldingStartMarker:"^(\\@if(n?def)?)",foldingStopMarker:"^\\@endif",keyEquivalent:"@B",name:"Bro",scopeName:"source.bro"},r.inherits(s,i),t.BroHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++t