vendor: 38,819 bytes, lines 1-768
1ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict"; 2var oop = require("../lib/oop"); 3var lang = require("../lib/lang"); 4var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; 5var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; 6var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; 7var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; 8var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; 9var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; 10var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; 11var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; 12var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; 13var CssHighlightRules = function () { 14 var keywordMapper = this.createKeywordMapper({ 15 "support.function": supportFunction, 16 "support.constant": supportConstant, 17 "support.type": supportType, 18 "support.constant.color": supportConstantColor, 19 "support.constant.fonts": supportConstantFonts 20 }, "text", true); 21 this.$rules = { 22 "start": [{ 23 include: ["strings", "url", "comments"] 24 }, { 25 token: "paren.lparen", 26 regex: "\\{", 27 next: "ruleset" 28 }, { 29 token: "paren.rparen", 30 regex: "\\}" 31 }, { 32 token: "string", 33 regex: "@(?!viewport)", 34 next: "media" 35 }, { 36 token: "keyword", 37 regex: "#[a-z0-9-_]+" 38 }, { 39 token: "keyword", 40 regex: "%" 41 }, { 42 token: "variable", 43 regex: "\\.[a-z0-9-_]+" 44 }, { 45 token: "string", 46 regex: ":[a-z0-9-_]+" 47 }, { 48 token: "constant.numeric", 49 regex: numRe 50 }, { 51 token: "constant", 52 regex: "[a-z0-9-_]+" 53 }, { 54 caseInsensitive: true 55 }], 56 "media": [{ 57 include: ["strings", "url", "comments"] 58 }, { 59 token: "paren.lparen", 60 regex: "\\{", 61 next: "start" 62 }, { 63 token: "paren.rparen", 64 regex: "\\}", 65 next: "start" 66 }, { 67 token: "string", 68 regex: ";", 69 next: "start" 70 }, { 71 token: "keyword", 72 regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" 73 + "|page|font|keyframes|viewport|counter-style|font-feature-values" 74 + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" 75 }], 76 "comments": [{ 77 token: "comment", // multi line comment 78 regex: "\\/\\*", 79 push: [{ 80 token: "comment", 81 regex: "\\*\\/", 82 next: "pop" 83 }, { 84 defaultToken: "comment" 85 }] 86 }], 87 "ruleset": [{ 88 regex: "-(webkit|ms|moz|o)-", 89 token: "text" 90 }, { 91 token: "punctuation.operator", 92 regex: "[:;]" 93 }, { 94 token: "paren.rparen", 95 regex: "\\}", 96 next: "start" 97 }, { 98 include: ["strings", "url", "comments"] 99 }, { 100 token: ["constant.numeric", "keyword"], 101 regex: "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" 102 }, { 103 token: "constant.numeric", 104 regex: numRe 105 }, { 106 token: "constant.numeric", // hex6 color 107 regex: "#[a-f0-9]{6}" 108 }, { 109 token: "constant.numeric", // hex3 color 110 regex: "#[a-f0-9]{3}" 111 }, { 112 token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], 113 regex: pseudoElements 114 }, { 115 token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], 116 regex: pseudoClasses 117 }, { 118 include: "url" 119 }, { 120 token: keywordMapper, 121 regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" 122 }, { 123 token: "paren.lparen", 124 regex: "\\{" 125 }, { 126 caseInsensitive: true 127 }], 128 url: [{ 129 token: "support.function", 130 regex: "(?:url(:?-prefix)?|domain|regexp)\\(", 131 push: [{ 132 token: "support.function", 133 regex: "\\)", 134 next: "pop" 135 }, { 136 defaultToken: "string" 137 }] 138 }], 139 strings: [{ 140 token: "string.start", 141 regex: "'", 142 push: [{ 143 token: "string.end", 144 regex: "'|$", 145 next: "pop" 146 }, { 147 include: "escapes" 148 }, { 149 token: "constant.language.escape", 150 regex: /\\$/, 151 consumeLineEnd: true 152 }, { 153 defaultToken: "string" 154 }] 155 }, { 156 token: "string.start", 157 regex: '"', 158 push: [{ 159 token: "string.end", 160 regex: '"|$', 161 next: "pop" 162 }, { 163 include: "escapes" 164 }, { 165 token: "constant.language.escape", 166 regex: /\\$/, 167 consumeLineEnd: true 168 }, { 169 defaultToken: "string" 170 }] 171 }], 172 escapes: [{ 173 token: "constant.language.escape", 174 regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ 175 }] 176 }; 177 this.normalizeRules(); 178}; 179oop.inherits(CssHighlightRules, TextHighlightRules); 180exports.CssHighlightRules = CssHighlightRules; 181 182}); 183 184ace.define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module){"use strict"; 185var oop = require("../lib/oop"); 186var lang = require("../lib/lang"); 187var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; 188var CssHighlightRules = require("./css_highlight_rules"); 189var ScssHighlightRules = function () { 190 var properties = lang.arrayToMap(CssHighlightRules.supportType.split("|")); 191 var functions = lang.arrayToMap(("hsl|hsla|rgb|rgba|url|attr|counter|counters|abs|adjust_color|adjust_hue|" + 192 "alpha|join|blue|ceil|change_color|comparable|complement|darken|desaturate|" + 193 "floor|grayscale|green|hue|if|invert|join|length|lighten|lightness|mix|" + 194 "nth|opacify|opacity|percentage|quote|red|round|saturate|saturation|" + 195 "scale_color|transparentize|type_of|unit|unitless|unquote").split("|")); 196 var constants = lang.arrayToMap(CssHighlightRules.supportConstant.split("|")); 197 var colors = lang.arrayToMap(CssHighlightRules.supportConstantColor.split("|")); 198 var keywords = lang.arrayToMap(("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare").split("|")); 199 var tags = lang.arrayToMap(("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|" + 200 "big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|" + 201 "command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|" + 202 "figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|" + 203 "header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|" + 204 "link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|" + 205 "option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|" + 206 "small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|" + 207 "textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp").split("|")); 208 var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; 209 this.$rules = { 210 "start": [ 211 { 212 token: "comment", 213 regex: "\\/\\/.*$" 214 }, 215 { 216 token: "comment", // multi line comment 217 regex: "\\/\\*", 218 next: "comment" 219 }, { 220 token: "string", // single line 221 regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' 222 }, { 223 token: "string", // multi line string start 224 regex: '["].*\\\\$', 225 next: "qqstring" 226 }, { 227 token: "string", // single line 228 regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" 229 }, { 230 token: "string", // multi line string start 231 regex: "['].*\\\\$", 232 next: "qstring" 233 }, { 234 token: "constant.numeric", 235 regex: numRe + "(?:ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" 236 }, { 237 token: "constant.numeric", // hex6 color 238 regex: "#[a-f0-9]{6}" 239 }, { 240 token: "constant.numeric", // hex3 color 241 regex: "#[a-f0-9]{3}" 242 }, { 243 token: "constant.numeric", 244 regex: numRe 245 }, { 246 token: ["support.function", "string", "support.function"], 247 regex: "(url\\()(.*)(\\))" 248 }, { 249 token: function (value) { 250 if (properties.hasOwnProperty(value.toLowerCase())) 251 return "support.type"; 252 if (keywords.hasOwnProperty(value)) 253 return "keyword"; 254 else if (constants.hasOwnProperty(value)) 255 return "constant.language"; 256 else if (functions.hasOwnProperty(value)) 257 return "support.function"; 258 else if (colors.hasOwnProperty(value.toLowerCase())) 259 return "support.constant.color"; 260 else if (tags.hasOwnProperty(value.toLowerCase())) 261 return "variable.language"; 262 else 263 return "text"; 264 }, 265 regex: "\\-?[@a-z_][@a-z0-9_\\-]*" 266 }, { 267 token: "variable", 268 regex: "[a-z_\\-$][a-z0-9_\\-$]*\\b" 269 }, { 270 token: "variable.language", 271 regex: "#[a-z0-9-_]+" 272 }, { 273 token: "variable.language", 274 regex: "\\.[a-z0-9-_]+" 275 }, { 276 token: "variable.language", 277 regex: ":[a-z0-9-_]+" 278 }, { 279 token: "constant", 280 regex: "[a-z0-9-_]+" 281 }, { 282 token: "keyword.operator", 283 regex: "<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*" 284 }, { 285 token: "paren.lparen", 286 regex: "[[({]" 287 }, { 288 token: "paren.rparen", 289 regex: "[\\])}]" 290 }, { 291 token: "text", 292 regex: "\\s+" 293 }, { 294 caseInsensitive: true 295 } 296 ], 297 "comment": [ 298 { 299 token: "comment", // closing comment 300 regex: "\\*\\/", 301 next: "start" 302 }, { 303 defaultToken: "comment" 304 } 305 ], 306 "qqstring": [ 307 { 308 token: "string", 309 regex: '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', 310 next: "start" 311 }, { 312 token: "string", 313 regex: '.+' 314 } 315 ], 316 "qstring": [ 317 { 318 token: "string", 319 regex: "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", 320 next: "start" 321 }, { 322 token: "string", 323 regex: '.+' 324 } 325 ] 326 }; 327}; 328oop.inherits(ScssHighlightRules, TextHighlightRules); 329exports.ScssHighlightRules = ScssHighlightRules; 330 331}); 332 333ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict"; 334var Range = require("../range").Range; 335var MatchingBraceOutdent = function () { }; 336(function () { 337 this.checkOutdent = function (line, input) { 338 if (!/^\s+$/.test(line)) 339 return false; 340 return /^\s*\}/.test(input); 341 }; 342 this.autoOutdent = function (doc, row) { 343 var line = doc.getLine(row); 344 var match = line.match(/^(\s*\})/); 345 if (!match) 346 return 0; 347 var column = match[1].length; 348 var openBracePos = doc.findMatchingBracket({ row: row, column: column }); 349 if (!openBracePos || openBracePos.row == row) 350 return 0; 351 var indent = this.$getIndent(doc.getLine(openBracePos.row)); 352 doc.replace(new Range(row, 0, row, column - 1), indent); 353 }; 354 this.$getIndent = function (line) { 355 return line.match(/^\s*/)[0]; 356 }; 357}).call(MatchingBraceOutdent.prototype); 358exports.MatchingBraceOutdent = MatchingBraceOutdent; 359 360}); 361 362ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict"; 363var oop = require("../../lib/oop"); 364var Behaviour = require("../behaviour").Behaviour; 365var CstyleBehaviour = require("./cstyle").CstyleBehaviour; 366var TokenIterator = require("../../token_iterator").TokenIterator; 367var CssBehaviour = function () { 368 this.inherit(CstyleBehaviour); 369 this.add("colon", "insertion", function (state, action, editor, session, text) { 370 if (text === ':' && editor.selection.isEmpty()) { 371 var cursor = editor.getCursorPosition(); 372 var iterator = new TokenIterator(session, cursor.row, cursor.column); 373 var token = iterator.getCurrentToken(); 374 if (token && token.value.match(/\s+/)) { 375 token = iterator.stepBackward(); 376 } 377 if (token && token.type === 'support.type') { 378 var line = session.doc.getLine(cursor.row); 379 var rightChar = line.substring(cursor.column, cursor.column + 1); 380 if (rightChar === ':') { 381 return { 382 text: '', 383 selection: [1, 1] 384 }; 385 } 386 if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { 387 return { 388 text: ':;', 389 selection: [1, 1] 390 }; 391 } 392 } 393 } 394 }); 395 this.add("colon", "deletion", function (state, action, editor, session, range) { 396 var selected = session.doc.getTextRange(range); 397 if (!range.isMultiLine() && selected === ':') { 398 var cursor = editor.getCursorPosition(); 399 var iterator = new TokenIterator(session, cursor.row, cursor.column); 400 var token = iterator.getCurrentToken(); 401 if (token && token.value.match(/\s+/)) { 402 token = iterator.stepBackward(); 403 } 404 if (token && token.type === 'support.type') { 405 var line = session.doc.getLine(range.start.row); 406 var rightChar = line.substring(range.end.column, range.end.column + 1); 407 if (rightChar === ';') { 408 range.end.column++; 409 return range; 410 } 411 } 412 } 413 }); 414 this.add("semicolon", "insertion", function (state, action, editor, session, text) { 415 if (text === ';' && editor.selection.isEmpty()) { 416 var cursor = editor.getCursorPosition(); 417 var line = session.doc.getLine(cursor.row); 418 var rightChar = line.substring(cursor.column, cursor.column + 1); 419 if (rightChar === ';') { 420 return { 421 text: '', 422 selection: [1, 1] 423 }; 424 } 425 } 426 }); 427 this.add("!important", "insertion", function (state, action, editor, session, text) { 428 if (text === '!' && editor.selection.isEmpty()) { 429 var cursor = editor.getCursorPosition(); 430 var line = session.doc.getLine(cursor.row); 431 if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { 432 return { 433 text: '!important', 434 selection: [10, 10] 435 }; 436 } 437 } 438 }); 439}; 440oop.inherits(CssBehaviour, CstyleBehaviour); 441exports.CssBehaviour = CssBehaviour; 442 443}); 444 445ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict"; 446var oop = require("../../lib/oop"); 447var Range = require("../../range").Range; 448var BaseFoldMode = require("./fold_mode").FoldMode; 449var FoldMode = exports.FoldMode = function (commentRegex) { 450 if (commentRegex) { 451 this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)); 452 this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)); 453 } 454}; 455oop.inherits(FoldMode, BaseFoldMode); 456(function () { 457 this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; 458 this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; 459 this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/; 460 this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; 461 this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; 462 this._getFoldWidgetBase = this.getFoldWidget; 463 this.getFoldWidget = function (session, foldStyle, row) { 464 var line = session.getLine(row); 465 if (this.singleLineBlockCommentRe.test(line)) { 466 if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) 467 return ""; 468 } 469 var fw = this._getFoldWidgetBase(session, foldStyle, row); 470 if (!fw && this.startRegionRe.test(line)) 471 return "start"; // lineCommentRegionStart 472 return fw; 473 }; 474 this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) { 475 var line = session.getLine(row); 476 if (this.startRegionRe.test(line)) 477 return this.getCommentRegionBlock(session, line, row); 478 var match = line.match(this.foldingStartMarker); 479 if (match) { 480 var i = match.index; 481 if (match[1]) 482 return this.openingBracketBlock(session, match[1], row, i); 483 var range = session.getCommentFoldRange(row, i + match[0].length, 1); 484 if (range && !range.isMultiLine()) { 485 if (forceMultiline) { 486 range = this.getSectionRange(session, row); 487 } 488 else if (foldStyle != "all") 489 range = null; 490 } 491 return range; 492 } 493 if (foldStyle === "markbegin") 494 return; 495 var match = line.match(this.foldingStopMarker); 496 if (match) { 497 var i = match.index + match[0].length; 498 if (match[1]) 499 return this.closingBracketBlock(session, match[1], row, i); 500 return session.getCommentFoldRange(row, i, -1); 501 } 502 }; 503 this.getSectionRange = function (session, row) { 504 var line = session.getLine(row); 505 var startIndent = line.search(/\S/); 506 var startRow = row; 507 var startColumn = line.length; 508 row = row + 1; 509 var endRow = row; 510 var maxRow = session.getLength(); 511 while (++row < maxRow) { 512 line = session.getLine(row); 513 var indent = line.search(/\S/); 514 if (indent === -1) 515 continue; 516 if (startIndent > indent) 517 break; 518 var subRange = this.getFoldWidgetRange(session, "all", row); 519 if (subRange) { 520 if (subRange.start.row <= startRow) { 521 break; 522 } 523 else if (subRange.isMultiLine()) { 524 row = subRange.end.row; 525 } 526 else if (startIndent == indent) { 527 break; 528 } 529 } 530 endRow = row; 531 } 532 return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); 533 }; 534 this.getCommentRegionBlock = function (session, line, row) { 535 var startColumn = line.search(/\s*$/); 536 var maxRow = session.getLength(); 537 var startRow = row; 538 var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; 539 var depth = 1; 540 while (++row < maxRow) { 541 line = session.getLine(row); 542 var m = re.exec(line); 543 if (!m) 544 continue; 545 if (m[1]) 546 depth--; 547 else 548 depth++; 549 if (!depth) 550 break; 551 } 552 var endRow = row; 553 if (endRow > startRow) { 554 return new Range(startRow, startColumn, endRow, line.length); 555 } 556 }; 557}).call(FoldMode.prototype); 558 559}); 560 561ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict"; 562var propertyMap = { 563 "background": { "#$0": 1 }, 564 "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 }, 565 "background-image": { "url('/$0')": 1 }, 566 "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 }, 567 "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 }, 568 "background-attachment": { "scroll": 1, "fixed": 1 }, 569 "background-size": { "cover": 1, "contain": 1 }, 570 "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 }, 571 "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 }, 572 "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 }, 573 "border-color": { "#$0": 1 }, 574 "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 }, 575 "border-collapse": { "collapse": 1, "separate": 1 }, 576 "bottom": { "px": 1, "em": 1, "%": 1 }, 577 "clear": { "left": 1, "right": 1, "both": 1, "none": 1 }, 578 "color": { "#$0": 1, "rgb(#$00,0,0)": 1 }, 579 "cursor": { "default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1 }, 580 "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 }, 581 "empty-cells": { "show": 1, "hide": 1 }, 582 "float": { "left": 1, "right": 1, "none": 1 }, 583 "font-family": { "Arial": 2, "Comic Sans MS": 2, "Consolas": 2, "Courier New": 2, "Courier": 2, "Georgia": 2, "Monospace": 2, "Sans-Serif": 2, "Segoe UI": 2, "Tahoma": 2, "Times New Roman": 2, "Trebuchet MS": 2, "Verdana": 1 }, 584 "font-size": { "px": 1, "em": 1, "%": 1 }, 585 "font-weight": { "bold": 1, "normal": 1 }, 586 "font-style": { "italic": 1, "normal": 1 }, 587 "font-variant": { "normal": 1, "small-caps": 1 }, 588 "height": { "px": 1, "em": 1, "%": 1 }, 589 "left": { "px": 1, "em": 1, "%": 1 }, 590 "letter-spacing": { "normal": 1 }, 591 "line-height": { "normal": 1 }, 592 "list-style-type": { "none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1 }, 593 "margin": { "px": 1, "em": 1, "%": 1 }, 594 "margin-right": { "px": 1, "em": 1, "%": 1 }, 595 "margin-left": { "px": 1, "em": 1, "%": 1 }, 596 "margin-top": { "px": 1, "em": 1, "%": 1 }, 597 "margin-bottom": { "px": 1, "em": 1, "%": 1 }, 598 "max-height": { "px": 1, "em": 1, "%": 1 }, 599 "max-width": { "px": 1, "em": 1, "%": 1 }, 600 "min-height": { "px": 1, "em": 1, "%": 1 }, 601 "min-width": { "px": 1, "em": 1, "%": 1 }, 602 "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, 603 "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, 604 "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 }, 605 "padding": { "px": 1, "em": 1, "%": 1 }, 606 "padding-top": { "px": 1, "em": 1, "%": 1 }, 607 "padding-right": { "px": 1, "em": 1, "%": 1 }, 608 "padding-bottom": { "px": 1, "em": 1, "%": 1 }, 609 "padding-left": { "px": 1, "em": 1, "%": 1 }, 610 "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, 611 "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 }, 612 "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 }, 613 "right": { "px": 1, "em": 1, "%": 1 }, 614 "table-layout": { "fixed": 1, "auto": 1 }, 615 "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 }, 616 "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 }, 617 "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 }, 618 "top": { "px": 1, "em": 1, "%": 1 }, 619 "vertical-align": { "top": 1, "bottom": 1 }, 620 "visibility": { "hidden": 1, "visible": 1 }, 621 "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 }, 622 "width": { "px": 1, "em": 1, "%": 1 }, 623 "word-spacing": { "normal": 1 }, 624 "filter": { "alpha(opacity=$0100)": 1 }, 625 "text-shadow": { "$02px 2px 2px #777": 1 }, 626 "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 }, 627 "-moz-border-radius": 1, 628 "-moz-border-radius-topright": 1, 629 "-moz-border-radius-bottomright": 1, 630 "-moz-border-radius-topleft": 1, 631 "-moz-border-radius-bottomleft": 1, 632 "-webkit-border-radius": 1, 633 "-webkit-border-top-right-radius": 1, 634 "-webkit-border-top-left-radius": 1, 635 "-webkit-border-bottom-right-radius": 1, 636 "-webkit-border-bottom-left-radius": 1, 637 "-moz-box-shadow": 1, 638 "-webkit-box-shadow": 1, 639 "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, 640 "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }, 641 "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 } 642}; 643var CssCompletions = function () { 644}; 645(function () { 646 this.completionsDefined = false; 647 this.defineCompletions = function () { 648 if (document) { 649 var style = document.createElement('c').style; 650 for (var i in style) { 651 if (typeof style[i] !== 'string') 652 continue; 653 var name = i.replace(/[A-Z]/g, function (x) { 654 return '-' + x.toLowerCase(); 655 }); 656 if (!propertyMap.hasOwnProperty(name)) 657 propertyMap[name] = 1; 658 } 659 } 660 this.completionsDefined = true; 661 }; 662 this.getCompletions = function (state, session, pos, prefix) { 663 if (!this.completionsDefined) { 664 this.defineCompletions(); 665 } 666 if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") { 667 var line = session.getLine(pos.row).substr(0, pos.column); 668 var inParens = /\([^)]*$/.test(line); 669 if (inParens) { 670 line = line.substr(line.lastIndexOf('(') + 1); 671 } 672 if (/:[^;]+$/.test(line)) { 673 /([\w\-]+):[^:]*$/.test(line); 674 return this.getPropertyValueCompletions(state, session, pos, prefix); 675 } 676 else { 677 return this.getPropertyCompletions(state, session, pos, prefix, inParens); 678 } 679 } 680 return []; 681 }; 682 this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) { 683 skipSemicolon = skipSemicolon || false; 684 var properties = Object.keys(propertyMap); 685 return properties.map(function (property) { 686 return { 687 caption: property, 688 snippet: property + ': $0' + (skipSemicolon ? '' : ';'), 689 meta: "property", 690 score: 1000000 691 }; 692 }); 693 }; 694 this.getPropertyValueCompletions = function (state, session, pos, prefix) { 695 var line = session.getLine(pos.row).substr(0, pos.column); 696 var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; 697 if (!property) 698 return []; 699 var values = []; 700 if (property in propertyMap && typeof propertyMap[property] === "object") { 701 values = Object.keys(propertyMap[property]); 702 } 703 return values.map(function (value) { 704 return { 705 caption: value, 706 snippet: value, 707 meta: "property value", 708 score: 1000000 709 }; 710 }); 711 }; 712}).call(CssCompletions.prototype); 713exports.CssCompletions = CssCompletions; 714 715}); 716 717ace.define("ace/mode/scss",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scss_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/folding/cstyle","ace/mode/css_completions"], function(require, exports, module){"use strict"; 718var oop = require("../lib/oop"); 719var TextMode = require("./text").Mode; 720var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules; 721var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; 722var CssBehaviour = require("./behaviour/css").CssBehaviour; 723var CStyleFoldMode = require("./folding/cstyle").FoldMode; 724var CssCompletions = require("./css_completions").CssCompletions; 725var Mode = function () { 726 this.HighlightRules = ScssHighlightRules; 727 this.$outdent = new MatchingBraceOutdent(); 728 this.$behaviour = new CssBehaviour(); 729 this.$completer = new CssCompletions(); 730 this.foldingRules = new CStyleFoldMode(); 731}; 732oop.inherits(Mode, TextMode); 733(function () { 734 this.lineCommentStart = "//"; 735 this.blockComment = { start: "/*", end: "*/" }; 736 this.getNextLineIndent = function (state, line, tab) { 737 var indent = this.$getIndent(line); 738 var tokens = this.getTokenizer().getLineTokens(line, state).tokens; 739 if (tokens.length && tokens[tokens.length - 1].type == "comment") { 740 return indent; 741 } 742 var match = line.match(/^.*\{\s*$/); 743 if (match) { 744 indent += tab; 745 } 746 return indent; 747 }; 748 this.checkOutdent = function (state, line, input) { 749 return this.$outdent.checkOutdent(line, input); 750 }; 751 this.autoOutdent = function (state, doc, row) { 752 this.$outdent.autoOutdent(doc, row); 753 }; 754 this.getCompletions = function (state, session, pos, prefix) { 755 return this.$completer.getCompletions(state, session, pos, prefix); 756 }; 757 this.$id = "ace/mode/scss"; 758}).call(Mode.prototype); 759exports.Mode = Mode; 760 761}); (function() { 762 ace.require(["ace/mode/scss"], function(m) { 763 if (typeof module == "object" && typeof exports == "object" && module) { 764 module.exports = m; 765 } 766 }); 767 })(); 768
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.