couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gar...@apache.org
Subject [49/53] [abbrv] [partial] fauxton commit: updated refs/heads/master to 8699e98
Date Wed, 23 Mar 2016 12:24:51 GMT
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/f5b0260e/assets/js/libs/ace/ext-beautify.js
----------------------------------------------------------------------
diff --git a/assets/js/libs/ace/ext-beautify.js b/assets/js/libs/ace/ext-beautify.js
deleted file mode 100644
index 8e0b25d..0000000
--- a/assets/js/libs/ace/ext-beautify.js
+++ /dev/null
@@ -1,334 +0,0 @@
-define("ace/ext/beautify/php_rules",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
-"use strict";
-var TokenIterator = require("ace/token_iterator").TokenIterator;
-exports.newLines = [{
-    type: 'support.php_tag',
-    value: '<?php'
-}, {
-    type: 'support.php_tag',
-    value: '<?'
-}, {
-    type: 'support.php_tag',
-    value: '?>'
-}, {
-    type: 'paren.lparen',
-    value: '{',
-    indent: true
-}, {
-    type: 'paren.rparen',
-    breakBefore: true,
-    value: '}',
-    indent: false
-}, {
-    type: 'paren.rparen',
-    breakBefore: true,
-    value: '})',
-    indent: false,
-    dontBreak: true
-}, {
-    type: 'comment'
-}, {
-    type: 'text',
-    value: ';'
-}, {
-    type: 'text',
-    value: ':',
-    context: 'php'
-}, {
-    type: 'keyword',
-    value: 'case',
-    indent: true,
-    dontBreak: true
-}, {
-    type: 'keyword',
-    value: 'default',
-    indent: true,
-    dontBreak: true
-}, {
-    type: 'keyword',
-    value: 'break',
-    indent: false,
-    dontBreak: true
-}, {
-    type: 'punctuation.doctype.end',
-    value: '>'
-}, {
-    type: 'meta.tag.punctuation.end',
-    value: '>'
-}, {
-    type: 'meta.tag.punctuation.begin',
-    value: '<',
-    blockTag: true,
-    indent: true,
-    dontBreak: true
-}, {
-    type: 'meta.tag.punctuation.begin',
-    value: '</',
-    indent: false,
-    breakBefore: true,
-    dontBreak: true
-}, {
-    type: 'punctuation.operator',
-    value: ';'
-}];
-
-exports.spaces = [{
-    type: 'xml-pe',
-    prepend: true
-},{
-    type: 'entity.other.attribute-name',
-    prepend: true
-}, {
-    type: 'storage.type',
-    value: 'var',
-    append: true
-}, {
-    type: 'storage.type',
-    value: 'function',
-    append: true
-}, {
-    type: 'keyword.operator',
-    value: '='
-}, {
-    type: 'keyword',
-    value: 'as',
-    prepend: true,
-    append: true
-}, {
-    type: 'keyword',
-    value: 'function',
-    append: true
-}, {
-    type: 'support.function',
-    next: /[^\(]/,
-    append: true
-}, {
-    type: 'keyword',
-    value: 'or',
-    append: true,
-    prepend: true
-}, {
-    type: 'keyword',
-    value: 'and',
-    append: true,
-    prepend: true
-}, {
-    type: 'keyword',
-    value: 'case',
-    append: true
-}, {
-    type: 'keyword.operator',
-    value: '||',
-    append: true,
-    prepend: true
-}, {
-    type: 'keyword.operator',
-    value: '&&',
-    append: true,
-    prepend: true
-}];
-exports.singleTags = ['!doctype','area','base','br','hr','input','img','link','meta'];
-
-exports.transform = function(iterator, maxPos, context) {
-    var token = iterator.getCurrentToken();
-    
-    var newLines = exports.newLines;
-    var spaces = exports.spaces;
-    var singleTags = exports.singleTags;
-
-    var code = '';
-    
-    var indentation = 0;
-    var dontBreak = false;
-    var tag;
-    var lastTag;
-    var lastToken = {};
-    var nextTag;
-    var nextToken = {};
-    var breakAdded = false;
-    var value = '';
-
-    while (token!==null) {
-        console.log(token);
-
-        if( !token ){
-            token = iterator.stepForward();
-            continue;
-        }
-        if( token.type == 'support.php_tag' && token.value != '?>' ){
-            context = 'php';
-        }
-        else if( token.type == 'support.php_tag' && token.value == '?>' ){
-            context = 'html';
-        }
-        else if( token.type == 'meta.tag.name.style' && context != 'css' ){
-            context = 'css';
-        }
-        else if( token.type == 'meta.tag.name.style' && context == 'css' ){
-            context = 'html';
-        }
-        else if( token.type == 'meta.tag.name.script' && context != 'js' ){
-            context = 'js';
-        }
-        else if( token.type == 'meta.tag.name.script' && context == 'js' ){
-            context = 'html';
-        }
-
-        nextToken = iterator.stepForward();
-        if (nextToken && nextToken.type.indexOf('meta.tag.name') == 0) {
-            nextTag = nextToken.value;
-        }
-        if ( lastToken.type == 'support.php_tag' && lastToken.value == '<?=') {
-            dontBreak = true;
-        }
-        if (token.type == 'meta.tag.name') {
-            token.value = token.value.toLowerCase();
-        }
-        if (token.type == 'text') {
-            token.value = token.value.trim();
-        }
-        if (!token.value) {
-            token = nextToken;
-            continue;
-        }
-        value = token.value;
-        for (var i in spaces) {
-            if (
-                token.type == spaces[i].type &&
-                (!spaces[i].value || token.value == spaces[i].value) &&
-                (
-                    nextToken &&
-                    (!spaces[i].next || spaces[i].next.test(nextToken.value))
-                )
-            ) {
-                if (spaces[i].prepend) {
-                    value = ' ' + token.value;
-                }
-
-                if (spaces[i].append) {
-                    value += ' ';
-                }
-            }
-        }
-        if (token.type.indexOf('meta.tag.name') == 0) {
-            tag = token.value;
-        }
-        breakAdded = false;
-        for (i in newLines) {
-            if (
-                token.type == newLines[i].type &&
-                (
-                    !newLines[i].value ||
-                    token.value == newLines[i].value
-                ) &&
-                (
-                    !newLines[i].blockTag ||
-                    singleTags.indexOf(nextTag) === -1
-                ) &&
-                (
-                    !newLines[i].context ||
-                    newLines[i].context === context
-                )
-            ) {
-                if (newLines[i].indent === false) {
-                    indentation--;
-                }
-
-                if (
-                    newLines[i].breakBefore &&
-                    ( !newLines[i].prev || newLines[i].prev.test(lastToken.value) )
-                ) {
-                    code += "\n";
-                    breakAdded = true;
-                    for (i = 0; i < indentation; i++) {
-                        code += "\t";
-                    }
-                }
-
-                break;
-            }
-        }
-
-        if (dontBreak===false) {
-            for (i in newLines) {
-                if (
-                    lastToken.type == newLines[i].type &&
-                    (
-                        !newLines[i].value || lastToken.value == newLines[i].value
-                    ) &&
-                    (
-                        !newLines[i].blockTag ||
-                        singleTags.indexOf(tag) === -1
-                    ) &&
-                    (
-                        !newLines[i].context ||
-                        newLines[i].context === context
-                    )
-                ) {
-                    if (newLines[i].indent === true) {
-                        indentation++;
-                    }
-
-                    if (!newLines[i].dontBreak  && !breakAdded) {
-                        code += "\n";
-                        for (i = 0; i < indentation; i++) {
-                            code += "\t";
-                        }
-                    }
-
-                    break;
-                }
-            }
-        }
-
-        code += value;
-        if ( lastToken.type == 'support.php_tag' && lastToken.value == '?>' ) {
-            dontBreak = false;
-        }
-        lastTag = tag;
-
-        lastToken = token;
-
-        token = nextToken;
-
-        if (token===null) {
-            break;
-        }
-    }
-    
-    return code;
-};
-
-
-
-});
-
-define("ace/ext/beautify",["require","exports","module","ace/token_iterator","ace/ext/beautify/php_rules"], function(require, exports, module) {
-"use strict";
-var TokenIterator = require("ace/token_iterator").TokenIterator;
-
-var phpTransform = require("./beautify/php_rules").transform;
-
-exports.beautify = function(session) {
-    var iterator = new TokenIterator(session, 0, 0);
-    var token = iterator.getCurrentToken();
-
-    var context = session.$modeId.split("/").pop();
-
-    var code = phpTransform(iterator, context);
-    session.doc.setValue(code);
-};
-
-exports.commands = [{
-    name: "beautify",
-    exec: function(editor) {
-        exports.beautify(editor.session);
-    },
-    bindKey: "Ctrl-Shift-B"
-}]
-
-});
-                (function() {
-                    window.require(["ace/ext/beautify"], function() {});
-                })();
-            
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/f5b0260e/assets/js/libs/ace/ext-chromevox.js
----------------------------------------------------------------------
diff --git a/assets/js/libs/ace/ext-chromevox.js b/assets/js/libs/ace/ext-chromevox.js
deleted file mode 100644
index 74e0494..0000000
--- a/assets/js/libs/ace/ext-chromevox.js
+++ /dev/null
@@ -1,541 +0,0 @@
-define("ace/ext/chromevox",["require","exports","module","ace/editor","ace/config"], function(require, exports, module) {
-var cvoxAce = {};
-cvoxAce.SpeechProperty;
-cvoxAce.Cursor;
-cvoxAce.Token;
-cvoxAce.Annotation;
-var CONSTANT_PROP = {
-  'rate': 0.8,
-  'pitch': 0.4,
-  'volume': 0.9
-};
-var DEFAULT_PROP = {
-  'rate': 1,
-  'pitch': 0.5,
-  'volume': 0.9
-};
-var ENTITY_PROP = {
-  'rate': 0.8,
-  'pitch': 0.8,
-  'volume': 0.9
-};
-var KEYWORD_PROP = {
-  'rate': 0.8,
-  'pitch': 0.3,
-  'volume': 0.9
-};
-var STORAGE_PROP = {
-  'rate': 0.8,
-  'pitch': 0.7,
-  'volume': 0.9
-};
-var VARIABLE_PROP = {
-  'rate': 0.8,
-  'pitch': 0.8,
-  'volume': 0.9
-};
-var DELETED_PROP = {
-  'punctuationEcho': 'none',
-  'relativePitch': -0.6
-};
-var ERROR_EARCON = 'ALERT_NONMODAL';
-var MODE_SWITCH_EARCON = 'ALERT_MODAL';
-var NO_MATCH_EARCON = 'INVALID_KEYPRESS';
-var INSERT_MODE_STATE = 'insertMode';
-var COMMAND_MODE_STATE = 'start';
-
-var REPLACE_LIST = [
-  {
-    substr: ';',
-    newSubstr: ' semicolon '
-  },
-  {
-    substr: ':',
-    newSubstr: ' colon '
-  }
-];
-var Command = {
-  SPEAK_ANNOT: 'annots',
-  SPEAK_ALL_ANNOTS: 'all_annots',
-  TOGGLE_LOCATION: 'toggle_location',
-  SPEAK_MODE: 'mode',
-  SPEAK_ROW_COL: 'row_col',
-  TOGGLE_DISPLACEMENT: 'toggle_displacement',
-  FOCUS_TEXT: 'focus_text'
-};
-var KEY_PREFIX = 'CONTROL + SHIFT ';
-cvoxAce.editor = null;
-var lastCursor = null;
-var annotTable = {};
-var shouldSpeakRowLocation = false;
-var shouldSpeakDisplacement = false;
-var changed = false;
-var vimState = null;
-var keyCodeToShortcutMap = {};
-var cmdToShortcutMap = {};
-var getKeyShortcutString = function(keyCode) {
-  return KEY_PREFIX + String.fromCharCode(keyCode);
-};
-var isVimMode = function() {
-  var keyboardHandler = cvoxAce.editor.keyBinding.getKeyboardHandler();
-  return keyboardHandler.$id === 'ace/keyboard/vim';
-};
-var getCurrentToken = function(cursor) {
-  return cvoxAce.editor.getSession().getTokenAt(cursor.row, cursor.column + 1);
-};
-var getCurrentLine = function(cursor) {
-  return cvoxAce.editor.getSession().getLine(cursor.row);
-};
-var onRowChange = function(currCursor) {
-  if (annotTable[currCursor.row]) {
-    cvox.Api.playEarcon(ERROR_EARCON);
-  }
-  if (shouldSpeakRowLocation) {
-    cvox.Api.stop();
-    speakChar(currCursor);
-    speakTokenQueue(getCurrentToken(currCursor));
-    speakLine(currCursor.row, 1);
-  } else {
-    speakLine(currCursor.row, 0);
-  }
-};
-var isWord = function(cursor) {
-  var line = getCurrentLine(cursor);
-  var lineSuffix = line.substr(cursor.column - 1);
-  if (cursor.column === 0) {
-    lineSuffix = ' ' + line;
-  }
-  var firstWordRegExp = /^\W(\w+)/;
-  var words = firstWordRegExp.exec(lineSuffix);
-  return words !== null;
-};
-var rules = {
-  'constant': {
-    prop: CONSTANT_PROP
-  },
-  'entity': {
-    prop: ENTITY_PROP
-  },
-  'keyword': {
-    prop: KEYWORD_PROP
-  },
-  'storage': {
-    prop: STORAGE_PROP
-  },
-  'variable': {
-    prop: VARIABLE_PROP
-  },
-  'meta': {
-    prop: DEFAULT_PROP,
-    replace: [
-      {
-        substr: '</',
-        newSubstr: ' closing tag '
-      },
-      {
-        substr: '/>',
-        newSubstr: ' close tag '
-      },
-      {
-        substr: '<',
-        newSubstr: ' tag start '
-      },
-      {
-        substr: '>',
-        newSubstr: ' tag end '
-      }
-    ]
-  }
-};
-var DEFAULT_RULE = {
-  prop: DEFAULT_RULE
-};
-var expand = function(value, replaceRules) {
-  var newValue = value;
-  for (var i = 0; i < replaceRules.length; i++) {
-    var replaceRule = replaceRules[i];
-    var regexp = new RegExp(replaceRule.substr, 'g');
-    newValue = newValue.replace(regexp, replaceRule.newSubstr);
-  }
-  return newValue;
-};
-var mergeTokens = function(tokens, start, end) {
-  var newToken = {};
-  newToken.value = '';
-  newToken.type = tokens[start].type;
-  for (var j = start; j < end; j++) {
-    newToken.value += tokens[j].value;
-  }
-  return newToken;
-};
-var mergeLikeTokens = function(tokens) {
-  if (tokens.length <= 1) {
-    return tokens;
-  }
-  var newTokens = [];
-  var lastLikeIndex = 0;
-  for (var i = 1; i < tokens.length; i++) {
-    var lastLikeToken = tokens[lastLikeIndex];
-    var currToken = tokens[i];
-    if (getTokenRule(lastLikeToken) !== getTokenRule(currToken)) {
-      newTokens.push(mergeTokens(tokens, lastLikeIndex, i));
-      lastLikeIndex = i;
-    }
-  }
-  newTokens.push(mergeTokens(tokens, lastLikeIndex, tokens.length));
-  return newTokens;
-};
-var isRowWhiteSpace = function(row) {
-  var line = cvoxAce.editor.getSession().getLine(row);
-  var whiteSpaceRegexp = /^\s*$/;
-  return whiteSpaceRegexp.exec(line) !== null;
-};
-var speakLine = function(row, queue) {
-  var tokens = cvoxAce.editor.getSession().getTokens(row);
-  if (tokens.length === 0 || isRowWhiteSpace(row)) {
-    cvox.Api.playEarcon('EDITABLE_TEXT');
-    return;
-  }
-  tokens = mergeLikeTokens(tokens);
-  var firstToken = tokens[0];
-  tokens = tokens.filter(function(token) {
-    return token !== firstToken;
-  });
-  speakToken_(firstToken, queue);
-  tokens.forEach(speakTokenQueue);
-};
-var speakTokenFlush = function(token) {
-  speakToken_(token, 0);
-};
-var speakTokenQueue = function(token) {
-  speakToken_(token, 1);
-};
-var getTokenRule = function(token) {
-  if (!token || !token.type) {
-    return;
-  }
-  var split = token.type.split('.');
-  if (split.length === 0) {
-    return;
-  }
-  var type = split[0];
-  var rule = rules[type];
-  if (!rule) {
-    return DEFAULT_RULE;
-  }
-  return rule;
-};
-var speakToken_ = function(token, queue) {
-  var rule = getTokenRule(token);
-  var value = expand(token.value, REPLACE_LIST);
-  if (rule.replace) {
-    value = expand(value, rule.replace);
-  }
-  cvox.Api.speak(value, queue, rule.prop);
-};
-var speakChar = function(cursor) {
-  var line = getCurrentLine(cursor);
-  cvox.Api.speak(line[cursor.column], 1);
-};
-var speakDisplacement = function(lastCursor, currCursor) {
-  var line = getCurrentLine(currCursor);
-  var displace = line.substring(lastCursor.column, currCursor.column);
-  displace = displace.replace(/ /g, ' space ');
-  cvox.Api.speak(displace);
-};
-var speakCharOrWordOrLine = function(lastCursor, currCursor) {
-  if (Math.abs(lastCursor.column - currCursor.column) !== 1) {
-    var currLineLength = getCurrentLine(currCursor).length;
-    if (currCursor.column === 0 || currCursor.column === currLineLength) {
-      speakLine(currCursor.row, 0);
-      return;
-    }
-    if (isWord(currCursor)) {
-      cvox.Api.stop();
-      speakTokenQueue(getCurrentToken(currCursor));
-      return;
-    }
-  }
-  speakChar(currCursor);
-};
-var onColumnChange = function(lastCursor, currCursor) {
-  if (!cvoxAce.editor.selection.isEmpty()) {
-    speakDisplacement(lastCursor, currCursor);
-    cvox.Api.speak('selected', 1);
-  }
-  else if (shouldSpeakDisplacement) {
-    speakDisplacement(lastCursor, currCursor);
-  } else {
-    speakCharOrWordOrLine(lastCursor, currCursor);
-  }
-};
-var onCursorChange = function(evt) {
-  if (changed) {
-    changed = false;
-    return;
-  }
-  var currCursor = cvoxAce.editor.selection.getCursor();
-  if (currCursor.row !== lastCursor.row) {
-    onRowChange(currCursor);
-  } else {
-    onColumnChange(lastCursor, currCursor);
-  }
-  lastCursor = currCursor;
-};
-var onSelectionChange = function(evt) {
-  if (cvoxAce.editor.selection.isEmpty()) {
-    cvox.Api.speak('unselected');
-  }
-};
-var onChange = function(evt) {
-  var data = evt.data;
-  switch (data.action) {
-  case 'removeText':
-    cvox.Api.speak(data.text, 0, DELETED_PROP);
-    changed = true;
-    break;
-  case 'insertText':
-    cvox.Api.speak(data.text, 0);
-    changed = true;
-    break;
-  }
-};
-var isNewAnnotation = function(annot) {
-  var row = annot.row;
-  var col = annot.column;
-  return !annotTable[row] || !annotTable[row][col];
-};
-var populateAnnotations = function(annotations) {
-  annotTable = {};
-  for (var i = 0; i < annotations.length; i++) {
-    var annotation = annotations[i];
-    var row = annotation.row;
-    var col = annotation.column;
-    if (!annotTable[row]) {
-      annotTable[row] = {};
-    }
-    annotTable[row][col] = annotation;
-  }
-};
-var onAnnotationChange = function(evt) {
-  var annotations = cvoxAce.editor.getSession().getAnnotations();
-  var newAnnotations = annotations.filter(isNewAnnotation);
-  if (newAnnotations.length > 0) {
-    cvox.Api.playEarcon(ERROR_EARCON);
-  }
-  populateAnnotations(annotations);
-};
-var speakAnnot = function(annot) {
-  var annotText = annot.type + ' ' + annot.text + ' on ' +
-      rowColToString(annot.row, annot.column);
-  annotText = annotText.replace(';', 'semicolon');
-  cvox.Api.speak(annotText, 1);
-};
-var speakAnnotsByRow = function(row) {
-  var annots = annotTable[row];
-  for (var col in annots) {
-    speakAnnot(annots[col]);
-  }
-};
-var rowColToString = function(row, col) {
-  return 'row ' + (row + 1) + ' column ' + (col + 1);
-};
-var speakCurrRowAndCol = function() {
-  cvox.Api.speak(rowColToString(lastCursor.row, lastCursor.column));
-};
-var speakAllAnnots = function() {
-  for (var row in annotTable) {
-    speakAnnotsByRow(row);
-  }
-};
-var speakMode = function() {
-  if (!isVimMode()) {
-    return;
-  }
-  switch (cvoxAce.editor.keyBinding.$data.state) {
-  case INSERT_MODE_STATE:
-    cvox.Api.speak('Insert mode');
-    break;
-  case COMMAND_MODE_STATE:
-    cvox.Api.speak('Command mode');
-    break;
-  }
-};
-var toggleSpeakRowLocation = function() {
-  shouldSpeakRowLocation = !shouldSpeakRowLocation;
-  if (shouldSpeakRowLocation) {
-    cvox.Api.speak('Speak location on row change enabled.');
-  } else {
-    cvox.Api.speak('Speak location on row change disabled.');
-  }
-};
-var toggleSpeakDisplacement = function() {
-  shouldSpeakDisplacement = !shouldSpeakDisplacement;
-  if (shouldSpeakDisplacement) {
-    cvox.Api.speak('Speak displacement on column changes.');
-  } else {
-    cvox.Api.speak('Speak current character or word on column changes.');
-  }
-};
-var onKeyDown = function(evt) {
-  if (evt.ctrlKey && evt.shiftKey) {
-    var shortcut = keyCodeToShortcutMap[evt.keyCode];
-    if (shortcut) {
-      shortcut.func();
-    }
-  }
-};
-var onChangeStatus = function(evt, editor) {
-  if (!isVimMode()) {
-    return;
-  }
-  var state = editor.keyBinding.$data.state;
-  if (state === vimState) {
-    return;
-  }
-  switch (state) {
-  case INSERT_MODE_STATE:
-    cvox.Api.playEarcon(MODE_SWITCH_EARCON);
-    cvox.Api.setKeyEcho(true);
-    break;
-  case COMMAND_MODE_STATE:
-    cvox.Api.playEarcon(MODE_SWITCH_EARCON);
-    cvox.Api.setKeyEcho(false);
-    break;
-  }
-  vimState = state;
-};
-var contextMenuHandler = function(evt) {
-  var cmd = evt.detail['customCommand'];
-  var shortcut = cmdToShortcutMap[cmd];
-  if (shortcut) {
-    shortcut.func();
-    cvoxAce.editor.focus();
-  }
-};
-var initContextMenu = function() {
-  var ACTIONS = SHORTCUTS.map(function(shortcut) {
-    return {
-      desc: shortcut.desc + getKeyShortcutString(shortcut.keyCode),
-      cmd: shortcut.cmd
-    };
-  });
-  var body = document.querySelector('body');
-  body.setAttribute('contextMenuActions', JSON.stringify(ACTIONS));
-  body.addEventListener('ATCustomEvent', contextMenuHandler, true);
-};
-var onFindSearchbox = function(evt) {
-  if (evt.match) {
-    speakLine(lastCursor.row, 0);
-  } else {
-    cvox.Api.playEarcon(NO_MATCH_EARCON);
-  }
-};
-var focus = function() {
-  cvoxAce.editor.focus();
-};
-var SHORTCUTS = [
-  {
-    keyCode: 49,
-    func: function() {
-      speakAnnotsByRow(lastCursor.row);
-    },
-    cmd: Command.SPEAK_ANNOT,
-    desc: 'Speak annotations on line'
-  },
-  {
-    keyCode: 50,
-    func: speakAllAnnots,
-    cmd: Command.SPEAK_ALL_ANNOTS,
-    desc: 'Speak all annotations'
-  },
-  {
-    keyCode: 51,
-    func: speakMode,
-    cmd: Command.SPEAK_MODE,
-    desc: 'Speak Vim mode'
-  },
-  {
-    keyCode: 52,
-    func: toggleSpeakRowLocation,
-    cmd: Command.TOGGLE_LOCATION,
-    desc: 'Toggle speak row location'
-  },
-  {
-    keyCode: 53,
-    func: speakCurrRowAndCol,
-    cmd: Command.SPEAK_ROW_COL,
-    desc: 'Speak row and column'
-  },
-  {
-    keyCode: 54,
-    func: toggleSpeakDisplacement,
-    cmd: Command.TOGGLE_DISPLACEMENT,
-    desc: 'Toggle speak displacement'
-  },
-  {
-    keyCode: 55,
-    func: focus,
-    cmd: Command.FOCUS_TEXT,
-    desc: 'Focus text'
-  }
-];
-var onFocus = function() {
-  cvoxAce.editor = editor;
-  editor.getSession().selection.on('changeCursor', onCursorChange);
-  editor.getSession().selection.on('changeSelection', onSelectionChange);
-  editor.getSession().on('change', onChange);
-  editor.getSession().on('changeAnnotation', onAnnotationChange);
-  editor.on('changeStatus', onChangeStatus);
-  editor.on('findSearchBox', onFindSearchbox);
-  editor.container.addEventListener('keydown', onKeyDown);
-
-  lastCursor = editor.selection.getCursor();
-};
-var init = function(editor) {
-  onFocus();
-  SHORTCUTS.forEach(function(shortcut) {
-    keyCodeToShortcutMap[shortcut.keyCode] = shortcut;
-    cmdToShortcutMap[shortcut.cmd] = shortcut;
-  });
-
-  editor.on('focus', onFocus);
-  if (isVimMode()) {
-    cvox.Api.setKeyEcho(false);
-  }
-  initContextMenu();
-};
-function cvoxApiExists() {
-  return (typeof(cvox) !== 'undefined') && cvox && cvox.Api;
-}
-var tries = 0;
-var MAX_TRIES = 15;
-function watchForCvoxLoad(editor) {
-  if (cvoxApiExists()) {
-    init(editor);
-  } else {
-    tries++;
-    if (tries >= MAX_TRIES) {
-      return;
-    }
-    window.setTimeout(watchForCvoxLoad, 500, editor);
-  }
-}
-
-var Editor = require('../editor').Editor;
-require('../config').defineOptions(Editor.prototype, 'editor', {
-  enableChromevoxEnhancements: {
-    set: function(val) {
-      if (val) {
-        watchForCvoxLoad(this);
-      }
-    },
-    value: true // turn it on by default or check for window.cvox
-  }
-});
-
-});
-                (function() {
-                    window.require(["ace/ext/chromevox"], function() {});
-                })();
-            
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/f5b0260e/assets/js/libs/ace/ext-elastic_tabstops_lite.js
----------------------------------------------------------------------
diff --git a/assets/js/libs/ace/ext-elastic_tabstops_lite.js b/assets/js/libs/ace/ext-elastic_tabstops_lite.js
deleted file mode 100644
index a4faeac..0000000
--- a/assets/js/libs/ace/ext-elastic_tabstops_lite.js
+++ /dev/null
@@ -1,275 +0,0 @@
-define("ace/ext/elastic_tabstops_lite",["require","exports","module","ace/editor","ace/config"], function(require, exports, module) {
-"use strict";
-
-var ElasticTabstopsLite = function(editor) {
-    this.$editor = editor;
-    var self = this;
-    var changedRows = [];
-    var recordChanges = false;
-    this.onAfterExec = function() {
-        recordChanges = false;
-        self.processRows(changedRows);
-        changedRows = [];
-    };
-    this.onExec = function() {
-        recordChanges = true;
-    };
-    this.onChange = function(e) {
-        var range = e.data.range
-        if (recordChanges) {
-            if (changedRows.indexOf(range.start.row) == -1)
-                changedRows.push(range.start.row);
-            if (range.end.row != range.start.row)
-                changedRows.push(range.end.row);
-        }
-    };
-};
-
-(function() {
-    this.processRows = function(rows) {
-        this.$inChange = true;
-        var checkedRows = [];
-
-        for (var r = 0, rowCount = rows.length; r < rowCount; r++) {
-            var row = rows[r];
-
-            if (checkedRows.indexOf(row) > -1)
-                continue;
-
-            var cellWidthObj = this.$findCellWidthsForBlock(row);
-            var cellWidths = this.$setBlockCellWidthsToMax(cellWidthObj.cellWidths);
-            var rowIndex = cellWidthObj.firstRow;
-
-            for (var w = 0, l = cellWidths.length; w < l; w++) {
-                var widths = cellWidths[w];
-                checkedRows.push(rowIndex);
-                this.$adjustRow(rowIndex, widths);
-                rowIndex++;
-            }
-        }
-        this.$inChange = false;
-    };
-
-    this.$findCellWidthsForBlock = function(row) {
-        var cellWidths = [], widths;
-        var rowIter = row;
-        while (rowIter >= 0) {
-            widths = this.$cellWidthsForRow(rowIter);
-            if (widths.length == 0)
-                break;
-
-            cellWidths.unshift(widths);
-            rowIter--;
-        }
-        var firstRow = rowIter + 1;
-        rowIter = row;
-        var numRows = this.$editor.session.getLength();
-
-        while (rowIter < numRows - 1) {
-            rowIter++;
-
-            widths = this.$cellWidthsForRow(rowIter);
-            if (widths.length == 0)
-                break;
-
-            cellWidths.push(widths);
-        }
-
-        return { cellWidths: cellWidths, firstRow: firstRow };
-    };
-
-    this.$cellWidthsForRow = function(row) {
-        var selectionColumns = this.$selectionColumnsForRow(row);
-
-        var tabs = [-1].concat(this.$tabsForRow(row));
-        var widths = tabs.map(function(el) { return 0; } ).slice(1);
-        var line = this.$editor.session.getLine(row);
-
-        for (var i = 0, len = tabs.length - 1; i < len; i++) {
-            var leftEdge = tabs[i]+1;
-            var rightEdge = tabs[i+1];
-
-            var rightmostSelection = this.$rightmostSelectionInCell(selectionColumns, rightEdge);
-            var cell = line.substring(leftEdge, rightEdge);
-            widths[i] = Math.max(cell.replace(/\s+$/g,'').length, rightmostSelection - leftEdge);
-        }
-
-        return widths;
-    };
-
-    this.$selectionColumnsForRow = function(row) {
-        var selections = [], cursor = this.$editor.getCursorPosition();
-        if (this.$editor.session.getSelection().isEmpty()) {
-            if (row == cursor.row)
-                selections.push(cursor.column);
-        }
-
-        return selections;
-    };
-
-    this.$setBlockCellWidthsToMax = function(cellWidths) {
-        var startingNewBlock = true, blockStartRow, blockEndRow, maxWidth;
-        var columnInfo = this.$izip_longest(cellWidths);
-
-        for (var c = 0, l = columnInfo.length; c < l; c++) {
-            var column = columnInfo[c];
-            if (!column.push) {
-                console.error(column);
-                continue;
-            }
-            column.push(NaN);
-
-            for (var r = 0, s = column.length; r < s; r++) {
-                var width = column[r];
-                if (startingNewBlock) {
-                    blockStartRow = r;
-                    maxWidth = 0;
-                    startingNewBlock = false;
-                }
-                if (isNaN(width)) {
-                    blockEndRow = r;
-
-                    for (var j = blockStartRow; j < blockEndRow; j++) {
-                        cellWidths[j][c] = maxWidth;
-                    }
-                    startingNewBlock = true;
-                }
-
-                maxWidth = Math.max(maxWidth, width);
-            }
-        }
-
-        return cellWidths;
-    };
-
-    this.$rightmostSelectionInCell = function(selectionColumns, cellRightEdge) {
-        var rightmost = 0;
-
-        if (selectionColumns.length) {
-            var lengths = [];
-            for (var s = 0, length = selectionColumns.length; s < length; s++) {
-                if (selectionColumns[s] <= cellRightEdge)
-                    lengths.push(s);
-                else
-                    lengths.push(0);
-            }
-            rightmost = Math.max.apply(Math, lengths);
-        }
-
-        return rightmost;
-    };
-
-    this.$tabsForRow = function(row) {
-        var rowTabs = [], line = this.$editor.session.getLine(row),
-            re = /\t/g, match;
-
-        while ((match = re.exec(line)) != null) {
-            rowTabs.push(match.index);
-        }
-
-        return rowTabs;
-    };
-
-    this.$adjustRow = function(row, widths) {
-        var rowTabs = this.$tabsForRow(row);
-
-        if (rowTabs.length == 0)
-            return;
-
-        var bias = 0, location = -1;
-        var expandedSet = this.$izip(widths, rowTabs);
-
-        for (var i = 0, l = expandedSet.length; i < l; i++) {
-            var w = expandedSet[i][0], it = expandedSet[i][1];
-            location += 1 + w;
-            it += bias;
-            var difference = location - it;
-
-            if (difference == 0)
-                continue;
-
-            var partialLine = this.$editor.session.getLine(row).substr(0, it );
-            var strippedPartialLine = partialLine.replace(/\s*$/g, "");
-            var ispaces = partialLine.length - strippedPartialLine.length;
-
-            if (difference > 0) {
-                this.$editor.session.getDocument().insertInLine({row: row, column: it + 1}, Array(difference + 1).join(" ") + "\t");
-                this.$editor.session.getDocument().removeInLine(row, it, it + 1);
-
-                bias += difference;
-            }
-
-            if (difference < 0 && ispaces >= -difference) {
-                this.$editor.session.getDocument().removeInLine(row, it + difference, it);
-                bias += difference;
-            }
-        }
-    };
-    this.$izip_longest = function(iterables) {
-        if (!iterables[0])
-            return [];
-        var longest = iterables[0].length;
-        var iterablesLength = iterables.length;
-
-        for (var i = 1; i < iterablesLength; i++) {
-            var iLength = iterables[i].length;
-            if (iLength > longest)
-                longest = iLength;
-        }
-
-        var expandedSet = [];
-
-        for (var l = 0; l < longest; l++) {
-            var set = [];
-            for (var i = 0; i < iterablesLength; i++) {
-                if (iterables[i][l] === "")
-                    set.push(NaN);
-                else
-                    set.push(iterables[i][l]);
-            }
-
-            expandedSet.push(set);
-        }
-
-
-        return expandedSet;
-    };
-    this.$izip = function(widths, tabs) {
-        var size = widths.length >= tabs.length ? tabs.length : widths.length;
-
-        var expandedSet = [];
-        for (var i = 0; i < size; i++) {
-            var set = [ widths[i], tabs[i] ];
-            expandedSet.push(set);
-        }
-        return expandedSet;
-    };
-
-}).call(ElasticTabstopsLite.prototype);
-
-exports.ElasticTabstopsLite = ElasticTabstopsLite;
-
-var Editor = require("../editor").Editor;
-require("../config").defineOptions(Editor.prototype, "editor", {
-    useElasticTabstops: {
-        set: function(val) {
-            if (val) {
-                if (!this.elasticTabstops)
-                    this.elasticTabstops = new ElasticTabstopsLite(this);
-                this.commands.on("afterExec", this.elasticTabstops.onAfterExec);
-                this.commands.on("exec", this.elasticTabstops.onExec);
-                this.on("change", this.elasticTabstops.onChange);
-            } else if (this.elasticTabstops) {
-                this.commands.removeListener("afterExec", this.elasticTabstops.onAfterExec);
-                this.commands.removeListener("exec", this.elasticTabstops.onExec);
-                this.removeListener("change", this.elasticTabstops.onChange);
-            }
-        }
-    }
-});
-
-});
-                (function() {
-                    window.require(["ace/ext/elastic_tabstops_lite"], function() {});
-                })();
-            
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/f5b0260e/assets/js/libs/ace/ext-emmet.js
----------------------------------------------------------------------
diff --git a/assets/js/libs/ace/ext-emmet.js b/assets/js/libs/ace/ext-emmet.js
deleted file mode 100644
index 390c266..0000000
--- a/assets/js/libs/ace/ext-emmet.js
+++ /dev/null
@@ -1,1190 +0,0 @@
-define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"], function(require, exports, module) {
-"use strict";
-var oop = require("./lib/oop");
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-var lang = require("./lib/lang");
-var Range = require("./range").Range;
-var Anchor = require("./anchor").Anchor;
-var HashHandler = require("./keyboard/hash_handler").HashHandler;
-var Tokenizer = require("./tokenizer").Tokenizer;
-var comparePoints = Range.comparePoints;
-
-var SnippetManager = function() {
-    this.snippetMap = {};
-    this.snippetNameMap = {};
-};
-
-(function() {
-    oop.implement(this, EventEmitter);
-    
-    this.getTokenizer = function() {
-        function TabstopToken(str, _, stack) {
-            str = str.substr(1);
-            if (/^\d+$/.test(str) && !stack.inFormatString)
-                return [{tabstopId: parseInt(str, 10)}];
-            return [{text: str}];
-        }
-        function escape(ch) {
-            return "(?:[^\\\\" + ch + "]|\\\\.)";
-        }
-        SnippetManager.$tokenizer = new Tokenizer({
-            start: [
-                {regex: /:/, onMatch: function(val, state, stack) {
-                    if (stack.length && stack[0].expectIf) {
-                        stack[0].expectIf = false;
-                        stack[0].elseBranch = stack[0];
-                        return [stack[0]];
-                    }
-                    return ":";
-                }},
-                {regex: /\\./, onMatch: function(val, state, stack) {
-                    var ch = val[1];
-                    if (ch == "}" && stack.length) {
-                        val = ch;
-                    }else if ("`$\\".indexOf(ch) != -1) {
-                        val = ch;
-                    } else if (stack.inFormatString) {
-                        if (ch == "n")
-                            val = "\n";
-                        else if (ch == "t")
-                            val = "\n";
-                        else if ("ulULE".indexOf(ch) != -1) {
-                            val = {changeCase: ch, local: ch > "a"};
-                        }
-                    }
-
-                    return [val];
-                }},
-                {regex: /}/, onMatch: function(val, state, stack) {
-                    return [stack.length ? stack.shift() : val];
-                }},
-                {regex: /\$(?:\d+|\w+)/, onMatch: TabstopToken},
-                {regex: /\$\{[\dA-Z_a-z]+/, onMatch: function(str, state, stack) {
-                    var t = TabstopToken(str.substr(1), state, stack);
-                    stack.unshift(t[0]);
-                    return t;
-                }, next: "snippetVar"},
-                {regex: /\n/, token: "newline", merge: false}
-            ],
-            snippetVar: [
-                {regex: "\\|" + escape("\\|") + "*\\|", onMatch: function(val, state, stack) {
-                    stack[0].choices = val.slice(1, -1).split(",");
-                }, next: "start"},
-                {regex: "/(" + escape("/") + "+)/(?:(" + escape("/") + "*)/)(\\w*):?",
-                 onMatch: function(val, state, stack) {
-                    var ts = stack[0];
-                    ts.fmtString = val;
-
-                    val = this.splitRegex.exec(val);
-                    ts.guard = val[1];
-                    ts.fmt = val[2];
-                    ts.flag = val[3];
-                    return "";
-                }, next: "start"},
-                {regex: "`" + escape("`") + "*`", onMatch: function(val, state, stack) {
-                    stack[0].code = val.splice(1, -1);
-                    return "";
-                }, next: "start"},
-                {regex: "\\?", onMatch: function(val, state, stack) {
-                    if (stack[0])
-                        stack[0].expectIf = true;
-                }, next: "start"},
-                {regex: "([^:}\\\\]|\\\\.)*:?", token: "", next: "start"}
-            ],
-            formatString: [
-                {regex: "/(" + escape("/") + "+)/", token: "regex"},
-                {regex: "", onMatch: function(val, state, stack) {
-                    stack.inFormatString = true;
-                }, next: "start"}
-            ]
-        });
-        SnippetManager.prototype.getTokenizer = function() {
-            return SnippetManager.$tokenizer;
-        };
-        return SnippetManager.$tokenizer;
-    };
-
-    this.tokenizeTmSnippet = function(str, startState) {
-        return this.getTokenizer().getLineTokens(str, startState).tokens.map(function(x) {
-            return x.value || x;
-        });
-    };
-
-    this.$getDefaultValue = function(editor, name) {
-        if (/^[A-Z]\d+$/.test(name)) {
-            var i = name.substr(1);
-            return (this.variables[name[0] + "__"] || {})[i];
-        }
-        if (/^\d+$/.test(name)) {
-            return (this.variables.__ || {})[name];
-        }
-        name = name.replace(/^TM_/, "");
-
-        if (!editor)
-            return;
-        var s = editor.session;
-        switch(name) {
-            case "CURRENT_WORD":
-                var r = s.getWordRange();
-            case "SELECTION":
-            case "SELECTED_TEXT":
-                return s.getTextRange(r);
-            case "CURRENT_LINE":
-                return s.getLine(editor.getCursorPosition().row);
-            case "PREV_LINE": // not possible in textmate
-                return s.getLine(editor.getCursorPosition().row - 1);
-            case "LINE_INDEX":
-                return editor.getCursorPosition().column;
-            case "LINE_NUMBER":
-                return editor.getCursorPosition().row + 1;
-            case "SOFT_TABS":
-                return s.getUseSoftTabs() ? "YES" : "NO";
-            case "TAB_SIZE":
-                return s.getTabSize();
-            case "FILENAME":
-            case "FILEPATH":
-                return "";
-            case "FULLNAME":
-                return "Ace";
-        }
-    };
-    this.variables = {};
-    this.getVariableValue = function(editor, varName) {
-        if (this.variables.hasOwnProperty(varName))
-            return this.variables[varName](editor, varName) || "";
-        return this.$getDefaultValue(editor, varName) || "";
-    };
-    this.tmStrFormat = function(str, ch, editor) {
-        var flag = ch.flag || "";
-        var re = ch.guard;
-        re = new RegExp(re, flag.replace(/[^gi]/, ""));
-        var fmtTokens = this.tokenizeTmSnippet(ch.fmt, "formatString");
-        var _self = this;
-        var formatted = str.replace(re, function() {
-            _self.variables.__ = arguments;
-            var fmtParts = _self.resolveVariables(fmtTokens, editor);
-            var gChangeCase = "E";
-            for (var i  = 0; i < fmtParts.length; i++) {
-                var ch = fmtParts[i];
-                if (typeof ch == "object") {
-                    fmtParts[i] = "";
-                    if (ch.changeCase && ch.local) {
-                        var next = fmtParts[i + 1];
-                        if (next && typeof next == "string") {
-                            if (ch.changeCase == "u")
-                                fmtParts[i] = next[0].toUpperCase();
-                            else
-                                fmtParts[i] = next[0].toLowerCase();
-                            fmtParts[i + 1] = next.substr(1);
-                        }
-                    } else if (ch.changeCase) {
-                        gChangeCase = ch.changeCase;
-                    }
-                } else if (gChangeCase == "U") {
-                    fmtParts[i] = ch.toUpperCase();
-                } else if (gChangeCase == "L") {
-                    fmtParts[i] = ch.toLowerCase();
-                }
-            }
-            return fmtParts.join("");
-        });
-        this.variables.__ = null;
-        return formatted;
-    };
-
-    this.resolveVariables = function(snippet, editor) {
-        var result = [];
-        for (var i = 0; i < snippet.length; i++) {
-            var ch = snippet[i];
-            if (typeof ch == "string") {
-                result.push(ch);
-            } else if (typeof ch != "object") {
-                continue;
-            } else if (ch.skip) {
-                gotoNext(ch);
-            } else if (ch.processed < i) {
-                continue;
-            } else if (ch.text) {
-                var value = this.getVariableValue(editor, ch.text);
-                if (value && ch.fmtString)
-                    value = this.tmStrFormat(value, ch);
-                ch.processed = i;
-                if (ch.expectIf == null) {
-                    if (value) {
-                        result.push(value);
-                        gotoNext(ch);
-                    }
-                } else {
-                    if (value) {
-                        ch.skip = ch.elseBranch;
-                    } else
-                        gotoNext(ch);
-                }
-            } else if (ch.tabstopId != null) {
-                result.push(ch);
-            } else if (ch.changeCase != null) {
-                result.push(ch);
-            }
-        }
-        function gotoNext(ch) {
-            var i1 = snippet.indexOf(ch, i + 1);
-            if (i1 != -1)
-                i = i1;
-        }
-        return result;
-    };
-
-    this.insertSnippetForSelection = function(editor, snippetText) {
-        var cursor = editor.getCursorPosition();
-        var line = editor.session.getLine(cursor.row);
-        var tabString = editor.session.getTabString();
-        var indentString = line.match(/^\s*/)[0];
-        
-        if (cursor.column < indentString.length)
-            indentString = indentString.slice(0, cursor.column);
-
-        var tokens = this.tokenizeTmSnippet(snippetText);
-        tokens = this.resolveVariables(tokens, editor);
-        tokens = tokens.map(function(x) {
-            if (x == "\n")
-                return x + indentString;
-            if (typeof x == "string")
-                return x.replace(/\t/g, tabString);
-            return x;
-        });
-        var tabstops = [];
-        tokens.forEach(function(p, i) {
-            if (typeof p != "object")
-                return;
-            var id = p.tabstopId;
-            var ts = tabstops[id];
-            if (!ts) {
-                ts = tabstops[id] = [];
-                ts.index = id;
-                ts.value = "";
-            }
-            if (ts.indexOf(p) !== -1)
-                return;
-            ts.push(p);
-            var i1 = tokens.indexOf(p, i + 1);
-            if (i1 === -1)
-                return;
-
-            var value = tokens.slice(i + 1, i1);
-            var isNested = value.some(function(t) {return typeof t === "object"});          
-            if (isNested && !ts.value) {
-                ts.value = value;
-            } else if (value.length && (!ts.value || typeof ts.value !== "string")) {
-                ts.value = value.join("");
-            }
-        });
-        tabstops.forEach(function(ts) {ts.length = 0});
-        var expanding = {};
-        function copyValue(val) {
-            var copy = [];
-            for (var i = 0; i < val.length; i++) {
-                var p = val[i];
-                if (typeof p == "object") {
-                    if (expanding[p.tabstopId])
-                        continue;
-                    var j = val.lastIndexOf(p, i - 1);
-                    p = copy[j] || {tabstopId: p.tabstopId};
-                }
-                copy[i] = p;
-            }
-            return copy;
-        }
-        for (var i = 0; i < tokens.length; i++) {
-            var p = tokens[i];
-            if (typeof p != "object")
-                continue;
-            var id = p.tabstopId;
-            var i1 = tokens.indexOf(p, i + 1);
-            if (expanding[id]) {
-                if (expanding[id] === p)
-                    expanding[id] = null;
-                continue;
-            }
-            
-            var ts = tabstops[id];
-            var arg = typeof ts.value == "string" ? [ts.value] : copyValue(ts.value);
-            arg.unshift(i + 1, Math.max(0, i1 - i));
-            arg.push(p);
-            expanding[id] = p;
-            tokens.splice.apply(tokens, arg);
-
-            if (ts.indexOf(p) === -1)
-                ts.push(p);
-        }
-        var row = 0, column = 0;
-        var text = "";
-        tokens.forEach(function(t) {
-            if (typeof t === "string") {
-                if (t[0] === "\n"){
-                    column = t.length - 1;
-                    row ++;
-                } else
-                    column += t.length;
-                text += t;
-            } else {
-                if (!t.start)
-                    t.start = {row: row, column: column};
-                else
-                    t.end = {row: row, column: column};
-            }
-        });
-        var range = editor.getSelectionRange();
-        var end = editor.session.replace(range, text);
-
-        var tabstopManager = new TabstopManager(editor);
-        var selectionId = editor.inVirtualSelectionMode && editor.selection.index;
-        tabstopManager.addTabstops(tabstops, range.start, end, selectionId);
-    };
-    
-    this.insertSnippet = function(editor, snippetText) {
-        var self = this;
-        if (editor.inVirtualSelectionMode)
-            return self.insertSnippetForSelection(editor, snippetText);
-        
-        editor.forEachSelection(function() {
-            self.insertSnippetForSelection(editor, snippetText);
-        }, null, {keepOrder: true});
-        
-        if (editor.tabstopManager)
-            editor.tabstopManager.tabNext();
-    };
-
-    this.$getScope = function(editor) {
-        var scope = editor.session.$mode.$id || "";
-        scope = scope.split("/").pop();
-        if (scope === "html" || scope === "php") {
-            if (scope === "php" && !editor.session.$mode.inlinePhp) 
-                scope = "html";
-            var c = editor.getCursorPosition();
-            var state = editor.session.getState(c.row);
-            if (typeof state === "object") {
-                state = state[0];
-            }
-            if (state.substring) {
-                if (state.substring(0, 3) == "js-")
-                    scope = "javascript";
-                else if (state.substring(0, 4) == "css-")
-                    scope = "css";
-                else if (state.substring(0, 4) == "php-")
-                    scope = "php";
-            }
-        }
-        
-        return scope;
-    };
-
-    this.getActiveScopes = function(editor) {
-        var scope = this.$getScope(editor);
-        var scopes = [scope];
-        var snippetMap = this.snippetMap;
-        if (snippetMap[scope] && snippetMap[scope].includeScopes) {
-            scopes.push.apply(scopes, snippetMap[scope].includeScopes);
-        }
-        scopes.push("_");
-        return scopes;
-    };
-
-    this.expandWithTab = function(editor, options) {
-        var self = this;
-        var result = editor.forEachSelection(function() {
-            return self.expandSnippetForSelection(editor, options);
-        }, null, {keepOrder: true});
-        if (result && editor.tabstopManager)
-            editor.tabstopManager.tabNext();
-        return result;
-    };
-    
-    this.expandSnippetForSelection = function(editor, options) {
-        var cursor = editor.getCursorPosition();
-        var line = editor.session.getLine(cursor.row);
-        var before = line.substring(0, cursor.column);
-        var after = line.substr(cursor.column);
-
-        var snippetMap = this.snippetMap;
-        var snippet;
-        this.getActiveScopes(editor).some(function(scope) {
-            var snippets = snippetMap[scope];
-            if (snippets)
-                snippet = this.findMatchingSnippet(snippets, before, after);
-            return !!snippet;
-        }, this);
-        if (!snippet)
-            return false;
-        if (options && options.dryRun)
-            return true;
-        editor.session.doc.removeInLine(cursor.row,
-            cursor.column - snippet.replaceBefore.length,
-            cursor.column + snippet.replaceAfter.length
-        );
-
-        this.variables.M__ = snippet.matchBefore;
-        this.variables.T__ = snippet.matchAfter;
-        this.insertSnippetForSelection(editor, snippet.content);
-
-        this.variables.M__ = this.variables.T__ = null;
-        return true;
-    };
-
-    this.findMatchingSnippet = function(snippetList, before, after) {
-        for (var i = snippetList.length; i--;) {
-            var s = snippetList[i];
-            if (s.startRe && !s.startRe.test(before))
-                continue;
-            if (s.endRe && !s.endRe.test(after))
-                continue;
-            if (!s.startRe && !s.endRe)
-                continue;
-
-            s.matchBefore = s.startRe ? s.startRe.exec(before) : [""];
-            s.matchAfter = s.endRe ? s.endRe.exec(after) : [""];
-            s.replaceBefore = s.triggerRe ? s.triggerRe.exec(before)[0] : "";
-            s.replaceAfter = s.endTriggerRe ? s.endTriggerRe.exec(after)[0] : "";
-            return s;
-        }
-    };
-
-    this.snippetMap = {};
-    this.snippetNameMap = {};
-    this.register = function(snippets, scope) {
-        var snippetMap = this.snippetMap;
-        var snippetNameMap = this.snippetNameMap;
-        var self = this;
-        
-        if (!snippets) 
-            snippets = [];
-        
-        function wrapRegexp(src) {
-            if (src && !/^\^?\(.*\)\$?$|^\\b$/.test(src))
-                src = "(?:" + src + ")";
-
-            return src || "";
-        }
-        function guardedRegexp(re, guard, opening) {
-            re = wrapRegexp(re);
-            guard = wrapRegexp(guard);
-            if (opening) {
-                re = guard + re;
-                if (re && re[re.length - 1] != "$")
-                    re = re + "$";
-            } else {
-                re = re + guard;
-                if (re && re[0] != "^")
-                    re = "^" + re;
-            }
-            return new RegExp(re);
-        }
-
-        function addSnippet(s) {
-            if (!s.scope)
-                s.scope = scope || "_";
-            scope = s.scope;
-            if (!snippetMap[scope]) {
-                snippetMap[scope] = [];
-                snippetNameMap[scope] = {};
-            }
-
-            var map = snippetNameMap[scope];
-            if (s.name) {
-                var old = map[s.name];
-                if (old)
-                    self.unregister(old);
-                map[s.name] = s;
-            }
-            snippetMap[scope].push(s);
-
-            if (s.tabTrigger && !s.trigger) {
-                if (!s.guard && /^\w/.test(s.tabTrigger))
-                    s.guard = "\\b";
-                s.trigger = lang.escapeRegExp(s.tabTrigger);
-            }
-
-            s.startRe = guardedRegexp(s.trigger, s.guard, true);
-            s.triggerRe = new RegExp(s.trigger, "", true);
-
-            s.endRe = guardedRegexp(s.endTrigger, s.endGuard, true);
-            s.endTriggerRe = new RegExp(s.endTrigger, "", true);
-        }
-
-        if (snippets && snippets.content)
-            addSnippet(snippets);
-        else if (Array.isArray(snippets))
-            snippets.forEach(addSnippet);
-        
-        this._signal("registerSnippets", {scope: scope});
-    };
-    this.unregister = function(snippets, scope) {
-        var snippetMap = this.snippetMap;
-        var snippetNameMap = this.snippetNameMap;
-
-        function removeSnippet(s) {
-            var nameMap = snippetNameMap[s.scope||scope];
-            if (nameMap && nameMap[s.name]) {
-                delete nameMap[s.name];
-                var map = snippetMap[s.scope||scope];
-                var i = map && map.indexOf(s);
-                if (i >= 0)
-                    map.splice(i, 1);
-            }
-        }
-        if (snippets.content)
-            removeSnippet(snippets);
-        else if (Array.isArray(snippets))
-            snippets.forEach(removeSnippet);
-    };
-    this.parseSnippetFile = function(str) {
-        str = str.replace(/\r/g, "");
-        var list = [], snippet = {};
-        var re = /^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;
-        var m;
-        while (m = re.exec(str)) {
-            if (m[1]) {
-                try {
-                    snippet = JSON.parse(m[1]);
-                    list.push(snippet);
-                } catch (e) {}
-            } if (m[4]) {
-                snippet.content = m[4].replace(/^\t/gm, "");
-                list.push(snippet);
-                snippet = {};
-            } else {
-                var key = m[2], val = m[3];
-                if (key == "regex") {
-                    var guardRe = /\/((?:[^\/\\]|\\.)*)|$/g;
-                    snippet.guard = guardRe.exec(val)[1];
-                    snippet.trigger = guardRe.exec(val)[1];
-                    snippet.endTrigger = guardRe.exec(val)[1];
-                    snippet.endGuard = guardRe.exec(val)[1];
-                } else if (key == "snippet") {
-                    snippet.tabTrigger = val.match(/^\S*/)[0];
-                    if (!snippet.name)
-                        snippet.name = val;
-                } else {
-                    snippet[key] = val;
-                }
-            }
-        }
-        return list;
-    };
-    this.getSnippetByName = function(name, editor) {
-        var snippetMap = this.snippetNameMap;
-        var snippet;
-        this.getActiveScopes(editor).some(function(scope) {
-            var snippets = snippetMap[scope];
-            if (snippets)
-                snippet = snippets[name];
-            return !!snippet;
-        }, this);
-        return snippet;
-    };
-
-}).call(SnippetManager.prototype);
-
-
-var TabstopManager = function(editor) {
-    if (editor.tabstopManager)
-        return editor.tabstopManager;
-    editor.tabstopManager = this;
-    this.$onChange = this.onChange.bind(this);
-    this.$onChangeSelection = lang.delayedCall(this.onChangeSelection.bind(this)).schedule;
-    this.$onChangeSession = this.onChangeSession.bind(this);
-    this.$onAfterExec = this.onAfterExec.bind(this);
-    this.attach(editor);
-};
-(function() {
-    this.attach = function(editor) {
-        this.index = 0;
-        this.ranges = [];
-        this.tabstops = [];
-        this.$openTabstops = null;
-        this.selectedTabstop = null;
-
-        this.editor = editor;
-        this.editor.on("change", this.$onChange);
-        this.editor.on("changeSelection", this.$onChangeSelection);
-        this.editor.on("changeSession", this.$onChangeSession);
-        this.editor.commands.on("afterExec", this.$onAfterExec);
-        this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler);
-    };
-    this.detach = function() {
-        this.tabstops.forEach(this.removeTabstopMarkers, this);
-        this.ranges = null;
-        this.tabstops = null;
-        this.selectedTabstop = null;
-        this.editor.removeListener("change", this.$onChange);
-        this.editor.removeListener("changeSelection", this.$onChangeSelection);
-        this.editor.removeListener("changeSession", this.$onChangeSession);
-        this.editor.commands.removeListener("afterExec", this.$onAfterExec);
-        this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler);
-        this.editor.tabstopManager = null;
-        this.editor = null;
-    };
-
-    this.onChange = function(e) {
-        var changeRange = e.data.range;
-        var isRemove = e.data.action[0] == "r";
-        var start = changeRange.start;
-        var end = changeRange.end;
-        var startRow = start.row;
-        var endRow = end.row;
-        var lineDif = endRow - startRow;
-        var colDiff = end.column - start.column;
-
-        if (isRemove) {
-            lineDif = -lineDif;
-            colDiff = -colDiff;
-        }
-        if (!this.$inChange && isRemove) {
-            var ts = this.selectedTabstop;
-            var changedOutside = ts && !ts.some(function(r) {
-                return comparePoints(r.start, start) <= 0 && comparePoints(r.end, end) >= 0;
-            });
-            if (changedOutside)
-                return this.detach();
-        }
-        var ranges = this.ranges;
-        for (var i = 0; i < ranges.length; i++) {
-            var r = ranges[i];
-            if (r.end.row < start.row)
-                continue;
-
-            if (isRemove && comparePoints(start, r.start) < 0 && comparePoints(end, r.end) > 0) {
-                this.removeRange(r);
-                i--;
-                continue;
-            }
-
-            if (r.start.row == startRow && r.start.column > start.column)
-                r.start.column += colDiff;
-            if (r.end.row == startRow && r.end.column >= start.column)
-                r.end.column += colDiff;
-            if (r.start.row >= startRow)
-                r.start.row += lineDif;
-            if (r.end.row >= startRow)
-                r.end.row += lineDif;
-
-            if (comparePoints(r.start, r.end) > 0)
-                this.removeRange(r);
-        }
-        if (!ranges.length)
-            this.detach();
-    };
-    this.updateLinkedFields = function() {
-        var ts = this.selectedTabstop;
-        if (!ts || !ts.hasLinkedRanges)
-            return;
-        this.$inChange = true;
-        var session = this.editor.session;
-        var text = session.getTextRange(ts.firstNonLinked);
-        for (var i = ts.length; i--;) {
-            var range = ts[i];
-            if (!range.linked)
-                continue;
-            var fmt = exports.snippetManager.tmStrFormat(text, range.original);
-            session.replace(range, fmt);
-        }
-        this.$inChange = false;
-    };
-    this.onAfterExec = function(e) {
-        if (e.command && !e.command.readOnly)
-            this.updateLinkedFields();
-    };
-    this.onChangeSelection = function() {
-        if (!this.editor)
-            return;
-        var lead = this.editor.selection.lead;
-        var anchor = this.editor.selection.anchor;
-        var isEmpty = this.editor.selection.isEmpty();
-        for (var i = this.ranges.length; i--;) {
-            if (this.ranges[i].linked)
-                continue;
-            var containsLead = this.ranges[i].contains(lead.row, lead.column);
-            var containsAnchor = isEmpty || this.ranges[i].contains(anchor.row, anchor.column);
-            if (containsLead && containsAnchor)
-                return;
-        }
-        this.detach();
-    };
-    this.onChangeSession = function() {
-        this.detach();
-    };
-    this.tabNext = function(dir) {
-        var max = this.tabstops.length;
-        var index = this.index + (dir || 1);
-        index = Math.min(Math.max(index, 1), max);
-        if (index == max)
-            index = 0;
-        this.selectTabstop(index);
-        if (index === 0)
-            this.detach();
-    };
-    this.selectTabstop = function(index) {
-        this.$openTabstops = null;
-        var ts = this.tabstops[this.index];
-        if (ts)
-            this.addTabstopMarkers(ts);
-        this.index = index;
-        ts = this.tabstops[this.index];
-        if (!ts || !ts.length)
-            return;
-        
-        this.selectedTabstop = ts;
-        if (!this.editor.inVirtualSelectionMode) {        
-            var sel = this.editor.multiSelect;
-            sel.toSingleRange(ts.firstNonLinked.clone());
-            for (var i = ts.length; i--;) {
-                if (ts.hasLinkedRanges && ts[i].linked)
-                    continue;
-                sel.addRange(ts[i].clone(), true);
-            }
-            if (sel.ranges[0])
-                sel.addRange(sel.ranges[0].clone());
-        } else {
-            this.editor.selection.setRange(ts.firstNonLinked);
-        }
-        
-        this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler);
-    };
-    this.addTabstops = function(tabstops, start, end) {
-        if (!this.$openTabstops)
-            this.$openTabstops = [];
-        if (!tabstops[0]) {
-            var p = Range.fromPoints(end, end);
-            moveRelative(p.start, start);
-            moveRelative(p.end, start);
-            tabstops[0] = [p];
-            tabstops[0].index = 0;
-        }
-
-        var i = this.index;
-        var arg = [i + 1, 0];
-        var ranges = this.ranges;
-        tabstops.forEach(function(ts, index) {
-            var dest = this.$openTabstops[index] || ts;
-                
-            for (var i = ts.length; i--;) {
-                var p = ts[i];
-                var range = Range.fromPoints(p.start, p.end || p.start);
-                movePoint(range.start, start);
-                movePoint(range.end, start);
-                range.original = p;
-                range.tabstop = dest;
-                ranges.push(range);
-                if (dest != ts)
-                    dest.unshift(range);
-                else
-                    dest[i] = range;
-                if (p.fmtString) {
-                    range.linked = true;
-                    dest.hasLinkedRanges = true;
-                } else if (!dest.firstNonLinked)
-                    dest.firstNonLinked = range;
-            }
-            if (!dest.firstNonLinked)
-                dest.hasLinkedRanges = false;
-            if (dest === ts) {
-                arg.push(dest);
-                this.$openTabstops[index] = dest;
-            }
-            this.addTabstopMarkers(dest);
-        }, this);
-        
-        if (arg.length > 2) {
-            if (this.tabstops.length)
-                arg.push(arg.splice(2, 1)[0]);
-            this.tabstops.splice.apply(this.tabstops, arg);
-        }
-    };
-
-    this.addTabstopMarkers = function(ts) {
-        var session = this.editor.session;
-        ts.forEach(function(range) {
-            if  (!range.markerId)
-                range.markerId = session.addMarker(range, "ace_snippet-marker", "text");
-        });
-    };
-    this.removeTabstopMarkers = function(ts) {
-        var session = this.editor.session;
-        ts.forEach(function(range) {
-            session.removeMarker(range.markerId);
-            range.markerId = null;
-        });
-    };
-    this.removeRange = function(range) {
-        var i = range.tabstop.indexOf(range);
-        range.tabstop.splice(i, 1);
-        i = this.ranges.indexOf(range);
-        this.ranges.splice(i, 1);
-        this.editor.session.removeMarker(range.markerId);
-        if (!range.tabstop.length) {
-            i = this.tabstops.indexOf(range.tabstop);
-            if (i != -1)
-                this.tabstops.splice(i, 1);
-            if (!this.tabstops.length)
-                this.detach();
-        }
-    };
-
-    this.keyboardHandler = new HashHandler();
-    this.keyboardHandler.bindKeys({
-        "Tab": function(ed) {
-            if (exports.snippetManager && exports.snippetManager.expandWithTab(ed)) {
-                return;
-            }
-
-            ed.tabstopManager.tabNext(1);
-        },
-        "Shift-Tab": function(ed) {
-            ed.tabstopManager.tabNext(-1);
-        },
-        "Esc": function(ed) {
-            ed.tabstopManager.detach();
-        },
-        "Return": function(ed) {
-            return false;
-        }
-    });
-}).call(TabstopManager.prototype);
-
-
-
-var changeTracker = {};
-changeTracker.onChange = Anchor.prototype.onChange;
-changeTracker.setPosition = function(row, column) {
-    this.pos.row = row;
-    this.pos.column = column;
-};
-changeTracker.update = function(pos, delta, $insertRight) {
-    this.$insertRight = $insertRight;
-    this.pos = pos; 
-    this.onChange(delta);
-};
-
-var movePoint = function(point, diff) {
-    if (point.row == 0)
-        point.column += diff.column;
-    point.row += diff.row;
-};
-
-var moveRelative = function(point, start) {
-    if (point.row == start.row)
-        point.column -= start.column;
-    point.row -= start.row;
-};
-
-
-require("./lib/dom").importCssString("\
-.ace_snippet-marker {\
-    -moz-box-sizing: border-box;\
-    box-sizing: border-box;\
-    background: rgba(194, 193, 208, 0.09);\
-    border: 1px dotted rgba(211, 208, 235, 0.62);\
-    position: absolute;\
-}");
-
-exports.snippetManager = new SnippetManager();
-
-
-var Editor = require("./editor").Editor;
-(function() {
-    this.insertSnippet = function(content, options) {
-        return exports.snippetManager.insertSnippet(this, content, options);
-    };
-    this.expandSnippet = function(options) {
-        return exports.snippetManager.expandWithTab(this, options);
-    };
-}).call(Editor.prototype);
-
-});
-
-define("ace/ext/emmet",["require","exports","module","ace/keyboard/hash_handler","ace/editor","ace/snippets","ace/range","resources","resources","range","tabStops","resources","utils","actions","ace/config","ace/config"], function(require, exports, module) {
-"use strict";
-var HashHandler = require("ace/keyboard/hash_handler").HashHandler;
-var Editor = require("ace/editor").Editor;
-var snippetManager = require("ace/snippets").snippetManager;
-var Range = require("ace/range").Range;
-var emmet, emmetPath;
-function AceEmmetEditor() {}
-
-AceEmmetEditor.prototype = {
-    setupContext: function(editor) {
-        this.ace = editor;
-        this.indentation = editor.session.getTabString();
-        if (!emmet)
-            emmet = window.emmet;
-        emmet.require("resources").setVariable("indentation", this.indentation);
-        this.$syntax = null;
-        this.$syntax = this.getSyntax();
-    },
-    getSelectionRange: function() {
-        var range = this.ace.getSelectionRange();
-        var doc = this.ace.session.doc;
-        return {
-            start: doc.positionToIndex(range.start),
-            end: doc.positionToIndex(range.end)
-        };
-    },
-    createSelection: function(start, end) {
-        var doc = this.ace.session.doc;
-        this.ace.selection.setRange({
-            start: doc.indexToPosition(start),
-            end: doc.indexToPosition(end)
-        });
-    },
-    getCurrentLineRange: function() {
-        var ace = this.ace;
-        var row = ace.getCursorPosition().row;
-        var lineLength = ace.session.getLine(row).length;
-        var index = ace.session.doc.positionToIndex({row: row, column: 0});
-        return {
-            start: index,
-            end: index + lineLength
-        };
-    },
-    getCaretPos: function(){
-        var pos = this.ace.getCursorPosition();
-        return this.ace.session.doc.positionToIndex(pos);
-    },
-    setCaretPos: function(index){
-        var pos = this.ace.session.doc.indexToPosition(index);
-        this.ace.selection.moveToPosition(pos);
-    },
-    getCurrentLine: function() {
-        var row = this.ace.getCursorPosition().row;
-        return this.ace.session.getLine(row);
-    },
-    replaceContent: function(value, start, end, noIndent) {
-        if (end == null)
-            end = start == null ? this.getContent().length : start;
-        if (start == null)
-            start = 0;        
-        
-        var editor = this.ace;
-        var doc = editor.session.doc;
-        var range = Range.fromPoints(doc.indexToPosition(start), doc.indexToPosition(end));
-        editor.session.remove(range);
-        
-        range.end = range.start;
-        
-        value = this.$updateTabstops(value);
-        snippetManager.insertSnippet(editor, value);
-    },
-    getContent: function(){
-        return this.ace.getValue();
-    },
-    getSyntax: function() {
-        if (this.$syntax)
-            return this.$syntax;
-        var syntax = this.ace.session.$modeId.split("/").pop();
-        if (syntax == "html" || syntax == "php") {
-            var cursor = this.ace.getCursorPosition();
-            var state = this.ace.session.getState(cursor.row);
-            if (typeof state != "string")
-                state = state[0];
-            if (state) {
-                state = state.split("-");
-                if (state.length > 1)
-                    syntax = state[0];
-                else if (syntax == "php")
-                    syntax = "html";
-            }
-        }
-        return syntax;
-    },
-    getProfileName: function() {
-        switch(this.getSyntax()) {
-          case "css": return "css";
-          case "xml":
-          case "xsl":
-            return "xml";
-          case "html":
-            var profile = emmet.require("resources").getVariable("profile");
-            if (!profile)
-                profile = this.ace.session.getLines(0,2).join("").search(/<!DOCTYPE[^>]+XHTML/i) != -1 ? "xhtml": "html";
-            return profile;
-        }
-        return "xhtml";
-    },
-    prompt: function(title) {
-        return prompt(title);
-    },
-    getSelection: function() {
-        return this.ace.session.getTextRange();
-    },
-    getFilePath: function() {
-        return "";
-    },
-    $updateTabstops: function(value) {
-        var base = 1000;
-        var zeroBase = 0;
-        var lastZero = null;
-        var range = emmet.require('range');
-        var ts = emmet.require('tabStops');
-        var settings = emmet.require('resources').getVocabulary("user");
-        var tabstopOptions = {
-            tabstop: function(data) {
-                var group = parseInt(data.group, 10);
-                var isZero = group === 0;
-                if (isZero)
-                    group = ++zeroBase;
-                else
-                    group += base;
-
-                var placeholder = data.placeholder;
-                if (placeholder) {
-                    placeholder = ts.processText(placeholder, tabstopOptions);
-                }
-
-                var result = '${' + group + (placeholder ? ':' + placeholder : '') + '}';
-
-                if (isZero) {
-                    lastZero = range.create(data.start, result);
-                }
-
-                return result;
-            },
-            escape: function(ch) {
-                if (ch == '$') return '\\$';
-                if (ch == '\\') return '\\\\';
-                return ch;
-            }
-        };
-
-        value = ts.processText(value, tabstopOptions);
-
-        if (settings.variables['insert_final_tabstop'] && !/\$\{0\}$/.test(value)) {
-            value += '${0}';
-        } else if (lastZero) {
-            value = emmet.require('utils').replaceSubstring(value, '${0}', lastZero);
-        }
-        
-        return value;
-    }
-};
-
-
-var keymap = {
-    expand_abbreviation: {"mac": "ctrl+alt+e", "win": "alt+e"},
-    match_pair_outward: {"mac": "ctrl+d", "win": "ctrl+,"},
-    match_pair_inward: {"mac": "ctrl+j", "win": "ctrl+shift+0"},
-    matching_pair: {"mac": "ctrl+alt+j", "win": "alt+j"},
-    next_edit_point: "alt+right",
-    prev_edit_point: "alt+left",
-    toggle_comment: {"mac": "command+/", "win": "ctrl+/"},
-    split_join_tag: {"mac": "shift+command+'", "win": "shift+ctrl+`"},
-    remove_tag: {"mac": "command+'", "win": "shift+ctrl+;"},
-    evaluate_math_expression: {"mac": "shift+command+y", "win": "shift+ctrl+y"},
-    increment_number_by_1: "ctrl+up",
-    decrement_number_by_1: "ctrl+down",
-    increment_number_by_01: "alt+up",
-    decrement_number_by_01: "alt+down",
-    increment_number_by_10: {"mac": "alt+command+up", "win": "shift+alt+up"},
-    decrement_number_by_10: {"mac": "alt+command+down", "win": "shift+alt+down"},
-    select_next_item: {"mac": "shift+command+.", "win": "shift+ctrl+."},
-    select_previous_item: {"mac": "shift+command+,", "win": "shift+ctrl+,"},
-    reflect_css_value: {"mac": "shift+command+r", "win": "shift+ctrl+r"},
-
-    encode_decode_data_url: {"mac": "shift+ctrl+d", "win": "ctrl+'"},
-    expand_abbreviation_with_tab: "Tab",
-    wrap_with_abbreviation: {"mac": "shift+ctrl+a", "win": "shift+ctrl+a"}
-};
-
-var editorProxy = new AceEmmetEditor();
-exports.commands = new HashHandler();
-exports.runEmmetCommand = function(editor) {
-    try {
-        editorProxy.setupContext(editor);
-        if (editorProxy.getSyntax() == "php")
-            return false;
-        var actions = emmet.require("actions");
-    
-        if (this.action == "expand_abbreviation_with_tab") {
-            if (!editor.selection.isEmpty())
-                return false;
-        }
-        
-        if (this.action == "wrap_with_abbreviation") {
-            return setTimeout(function() {
-                actions.run("wrap_with_abbreviation", editorProxy);
-            }, 0);
-        }
-        
-        var pos = editor.selection.lead;
-        var token = editor.session.getTokenAt(pos.row, pos.column);
-        if (token && /\btag\b/.test(token.type))
-            return false;
-        
-        var result = actions.run(this.action, editorProxy);
-    } catch(e) {
-        editor._signal("changeStatus", typeof e == "string" ? e : e.message);
-        console.log(e);
-        result = false;
-    }
-    return result;
-};
-
-for (var command in keymap) {
-    exports.commands.addCommand({
-        name: "emmet:" + command,
-        action: command,
-        bindKey: keymap[command],
-        exec: exports.runEmmetCommand,
-        multiSelectAction: "forEach"
-    });
-}
-
-exports.updateCommands = function(editor, enabled) {
-    if (enabled) {
-        editor.keyBinding.addKeyboardHandler(exports.commands);
-    } else {
-        editor.keyBinding.removeKeyboardHandler(exports.commands);
-    }
-};
-
-exports.isSupportedMode = function(modeId) {
-    return modeId && /css|less|scss|sass|stylus|html|php|twig|ejs/.test(modeId);
-};
-
-var onChangeMode = function(e, target) {
-    var editor = target;
-    if (!editor)
-        return;
-    var enabled = exports.isSupportedMode(editor.session.$modeId);
-    if (e.enableEmmet === false)
-        enabled = false;
-    if (enabled) {
-        if (typeof emmetPath == "string") {
-            require("ace/config").loadModule(emmetPath, function() {
-                emmetPath = null;
-            });
-        }
-    }
-    exports.updateCommands(editor, enabled);
-};
-
-exports.AceEmmetEditor = AceEmmetEditor;
-require("ace/config").defineOptions(Editor.prototype, "editor", {
-    enableEmmet: {
-        set: function(val) {
-            this[val ? "on" : "removeListener"]("changeMode", onChangeMode);
-            onChangeMode({enableEmmet: !!val}, this);
-        },
-        value: true
-    }
-});
-
-exports.setCore = function(e) {
-    if (typeof e == "string")
-       emmetPath = e;
-    else
-       emmet = e;
-};
-});
-                (function() {
-                    window.require(["ace/ext/emmet"], function() {});
-                })();
-            
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/f5b0260e/assets/js/libs/ace/ext-error_marker.js
----------------------------------------------------------------------
diff --git a/assets/js/libs/ace/ext-error_marker.js b/assets/js/libs/ace/ext-error_marker.js
deleted file mode 100644
index 31ac11d..0000000
--- a/assets/js/libs/ace/ext-error_marker.js
+++ /dev/null
@@ -1,6 +0,0 @@
-
-;
-                (function() {
-                    window.require(["ace/ext/error_marker"], function() {});
-                })();
-            
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/f5b0260e/assets/js/libs/ace/ext-keybinding_menu.js
----------------------------------------------------------------------
diff --git a/assets/js/libs/ace/ext-keybinding_menu.js b/assets/js/libs/ace/ext-keybinding_menu.js
deleted file mode 100644
index 895e9be..0000000
--- a/assets/js/libs/ace/ext-keybinding_menu.js
+++ /dev/null
@@ -1,170 +0,0 @@
-define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
-'use strict';
-var dom = require("../../lib/dom");
-var cssText = "#ace_settingsmenu, #kbshortcutmenu {\
-background-color: #F7F7F7;\
-color: black;\
-box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);\
-padding: 1em 0.5em 2em 1em;\
-overflow: auto;\
-position: absolute;\
-margin: 0;\
-bottom: 0;\
-right: 0;\
-top: 0;\
-z-index: 9991;\
-cursor: default;\
-}\
-.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {\
-box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);\
-background-color: rgba(255, 255, 255, 0.6);\
-color: black;\
-}\
-.ace_optionsMenuEntry:hover {\
-background-color: rgba(100, 100, 100, 0.1);\
--webkit-transition: all 0.5s;\
-transition: all 0.3s\
-}\
-.ace_closeButton {\
-background: rgba(245, 146, 146, 0.5);\
-border: 1px solid #F48A8A;\
-border-radius: 50%;\
-padding: 7px;\
-position: absolute;\
-right: -8px;\
-top: -8px;\
-z-index: 1000;\
-}\
-.ace_closeButton{\
-background: rgba(245, 146, 146, 0.9);\
-}\
-.ace_optionsMenuKey {\
-color: darkslateblue;\
-font-weight: bold;\
-}\
-.ace_optionsMenuCommand {\
-color: darkcyan;\
-font-weight: normal;\
-}";
-dom.importCssString(cssText);
-module.exports.overlayPage = function overlayPage(editor, contentElement, top, right, bottom, left) {
-    top = top ? 'top: ' + top + ';' : '';
-    bottom = bottom ? 'bottom: ' + bottom + ';' : '';
-    right = right ? 'right: ' + right + ';' : '';
-    left = left ? 'left: ' + left + ';' : '';
-
-    var closer = document.createElement('div');
-    var contentContainer = document.createElement('div');
-
-    function documentEscListener(e) {
-        if (e.keyCode === 27) {
-            closer.click();
-        }
-    }
-
-    closer.style.cssText = 'margin: 0; padding: 0; ' +
-        'position: fixed; top:0; bottom:0; left:0; right:0;' +
-        'z-index: 9990; ' +
-        'background-color: rgba(0, 0, 0, 0.3);';
-    closer.addEventListener('click', function() {
-        document.removeEventListener('keydown', documentEscListener);
-        closer.parentNode.removeChild(closer);
-        editor.focus();
-        closer = null;
-    });
-    document.addEventListener('keydown', documentEscListener);
-
-    contentContainer.style.cssText = top + right + bottom + left;
-    contentContainer.addEventListener('click', function(e) {
-        e.stopPropagation();
-    });
-
-    var wrapper = dom.createElement("div");
-    wrapper.style.position = "relative";
-    
-    var closeButton = dom.createElement("div");
-    closeButton.className = "ace_closeButton";
-    closeButton.addEventListener('click', function() {
-        closer.click();
-    });
-    
-    wrapper.appendChild(closeButton);
-    contentContainer.appendChild(wrapper);
-    
-    contentContainer.appendChild(contentElement);
-    closer.appendChild(contentContainer);
-    document.body.appendChild(closer);
-    editor.blur();
-};
-
-});
-
-define("ace/ext/menu_tools/get_editor_keyboard_shortcuts",["require","exports","module","ace/lib/keys"], function(require, exports, module) {
-"use strict";
-var keys = require("../../lib/keys");
-module.exports.getEditorKeybordShortcuts = function(editor) {
-    var KEY_MODS = keys.KEY_MODS;
-    var keybindings = [];
-    var commandMap = {};
-    editor.keyBinding.$handlers.forEach(function(handler) {
-        var ckb = handler.commandKeyBinding;
-        for (var i in ckb) {
-            var key = i.replace(/(^|-)\w/g, function(x) { return x.toUpperCase(); });
-            var commands = ckb[i];
-            if (!Array.isArray(commands))
-                commands = [commands];
-            commands.forEach(function(command) {
-                if (typeof command != "string")
-                    command  = command.name
-                if (commandMap[command]) {
-                    commandMap[command].key += "|" + key;
-                } else {
-                    commandMap[command] = {key: key, command: command};
-                    keybindings.push(commandMap[command]);
-                }         
-            });
-        }
-    });
-    return keybindings;
-};
-
-});
-
-define("ace/ext/keybinding_menu",["require","exports","module","ace/editor","ace/ext/menu_tools/overlay_page","ace/ext/menu_tools/get_editor_keyboard_shortcuts"], function(require, exports, module) {
-    "use strict";
-    var Editor = require("ace/editor").Editor;
-    function showKeyboardShortcuts (editor) {
-        if(!document.getElementById('kbshortcutmenu')) {
-            var overlayPage = require('./menu_tools/overlay_page').overlayPage;
-            var getEditorKeybordShortcuts = require('./menu_tools/get_editor_keyboard_shortcuts').getEditorKeybordShortcuts;
-            var kb = getEditorKeybordShortcuts(editor);
-            var el = document.createElement('div');
-            var commands = kb.reduce(function(previous, current) {
-                return previous + '<div class="ace_optionsMenuEntry"><span class="ace_optionsMenuCommand">' 
-                    + current.command + '</span> : '
-                    + '<span class="ace_optionsMenuKey">' + current.key + '</span></div>';
-            }, '');
-
-            el.id = 'kbshortcutmenu';
-            el.innerHTML = '<h1>Keyboard Shortcuts</h1>' + commands + '</div>';
-            overlayPage(editor, el, '0', '0', '0', null);
-        }
-    };
-    module.exports.init = function(editor) {
-        Editor.prototype.showKeyboardShortcuts = function() {
-            showKeyboardShortcuts(this);
-        };
-        editor.commands.addCommands([{
-            name: "showKeyboardShortcuts",
-            bindKey: {win: "Ctrl-Alt-h", mac: "Command-Alt-h"},
-            exec: function(editor, line) {
-                editor.showKeyboardShortcuts();
-            }
-        }]);
-    };
-
-});
-                (function() {
-                    window.require(["ace/ext/keybinding_menu"], function() {});
-                })();
-            
\ No newline at end of file


Mime
View raw message