ace.define("ace/mode/batchfile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(r,f,p){"use strict";var u=r("../lib/oop"),h=r("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"keyword.command.dosbatch",regex:"\\b(?:append|assoc|at|attrib|break|cacls|cd|chcp|chdir|chkdsk|chkntfs|cls|cmd|color|comp|compact|convert|copy|date|del|dir|diskcomp|diskcopy|doskey|echo|endlocal|erase|fc|find|findstr|format|ftype|graftabl|help|keyb|label|md|mkdir|mode|more|move|path|pause|popd|print|prompt|pushd|rd|recover|ren|rename|replace|restore|rmdir|set|setlocal|shift|sort|start|subst|time|title|tree|type|ver|verify|vol|xcopy)\\b",caseInsensitive:!0},{token:"keyword.control.statement.dosbatch",regex:"\\b(?:goto|call|exit)\\b",caseInsensitive:!0},{token:"keyword.control.conditional.if.dosbatch",regex:"\\bif\\s+not\\s+(?:exist|defined|errorlevel|cmdextversion)\\b",caseInsensitive:!0},{token:"keyword.control.conditional.dosbatch",regex:"\\b(?:if|else)\\b",caseInsensitive:!0},{token:"keyword.control.repeat.dosbatch",regex:"\\bfor\\b",caseInsensitive:!0},{token:"keyword.operator.dosbatch",regex:"\\b(?:EQU|NEQ|LSS|LEQ|GTR|GEQ)\\b"},{token:["doc.comment","comment"],regex:"(?:^|\\b)(rem)($|\\s.*$)",caseInsensitive:!0},{token:"comment.line.colons.dosbatch",regex:"::.*$"},{include:"variable"},{token:"punctuation.definition.string.begin.shell",regex:'"',push:[{token:"punctuation.definition.string.end.shell",regex:'"',next:"pop"},{include:"variable"},{defaultToken:"string.quoted.double.dosbatch"}]},{token:"keyword.operator.pipe.dosbatch",regex:"[|]"},{token:"keyword.operator.redirect.shell",regex:"&>|\\d*>&\\d*|\\d*(?:>>|>|<)|\\d*<&|\\d*<>"}],variable:[{token:"constant.numeric",regex:"%%\\w+|%[*\\d]|%\\w+%"},{token:"constant.numeric",regex:"%~\\d+"},{token:["markup.list","constant.other","markup.list"],regex:"(%)(\\w+)(%?)"}]},this.normalizeRules()};s.metaData={name:"Batch File",scopeName:"source.dosbatch",fileTypes:["bat"]},u.inherits(s,h),f.BatchFileHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(r,f,p){"use strict";var u=r("../../lib/oop"),h=r("../../range").Range,s=r("./fold_mode").FoldMode,m=f.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};u.inherits(m,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,i){var n=e.getLine(i);if(this.singleLineBlockCommentRe.test(n)&&!this.startRegionRe.test(n)&&!this.tripleStarBlockCommentRe.test(n))return"";var a=this._getFoldWidgetBase(e,t,i);return!a&&this.startRegionRe.test(n)?"start":a},this.getFoldWidgetRange=function(e,t,i,n){var o,a=e.getLine(i);if(this.startRegionRe.test(a))return this.getCommentRegionBlock(e,a,i);if(o=a.match(this.foldingStartMarker)){var c=o.index;if(o[1])return this.openingBracketBlock(e,o[1],i,c);var l=e.getCommentFoldRange(i,c+o[0].length,1);return l&&!l.isMultiLine()&&(n?l=this.getSectionRange(e,i):"all"!=t&&(l=null)),l}return"markbegin"!==t&&(o=a.match(this.foldingStopMarker))?(c=o.index+o[0].length,o[1]?this.closingBracketBlock(e,o[1],i,c):e.getCommentFoldRange(i,c,-1)):void 0},this.getSectionRange=function(e,t){for(var i=e.getLine(t),n=i.search(/\S/),a=t,c=i.length,l=t+=1,o=e.getLength();++t<o;){var g=(i=e.getLine(t)).search(/\S/);if(-1!==g){if(n>g)break;var d=this.getFoldWidgetRange(e,"all",t);if(d){if(d.start.row<=a)break;if(d.isMultiLine())t=d.end.row;else if(n==g)break}l=t}}return new h(a,c,l,e.getLine(l).length)},this.getCommentRegionBlock=function(e,t,i){for(var n=t.search(/\s*$/),a=e.getLength(),c=i,l=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,o=1;++i<a;){t=e.getLine(i);var g=l.exec(t);if(g&&(g[1]?o--:o++,!o))break}if(i>c)return new h(c,n,i,t.length)}}.call(m.prototype)}),ace.define("ace/mode/batchfile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/batchfile_highlight_rules","ace/mode/folding/cstyle"],function(r,f,p){"use strict";var u=r("../lib/oop"),h=r("./text").Mode,s=r("./batchfile_highlight_rules").BatchFileHighlightRules,m=r("./folding/cstyle").FoldMode,e=function(){this.HighlightRules=s,this.foldingRules=new m,this.$behaviour=this.$defaultBehaviour};u.inherits(e,h),function(){this.lineCommentStart="::",this.blockComment="",this.$id="ace/mode/batchfile"}.call(e.prototype),f.Mode=e}),ace.require(["ace/mode/batchfile"],function(r){"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=r)});