!function(){function g(a){var e=function(a,b){return d("",a,b)},f=b;a&&(b[a]||(b[a]={}),f=b[a]),f.define&&f.define.packaged||(c.original=f.define,f.define=c,f.define.packaged=!0),f.require&&f.require.packaged||(d.original=f.require,f.require=e,f.require.packaged=!0)}var a="",b=function(){return this}();if(a||"undefined"==typeof requirejs){var c=function(a,b,d){return"string"!=typeof a?(c.original?c.original.apply(window,arguments):(console.error("dropping module because define wasn't a string."),console.trace()),void 0):(2==arguments.length&&(d=b),c.modules||(c.modules={},c.payloads={}),c.payloads[a]=d,c.modules[a]=null,void 0)},d=function(a,b,c){if("[object Array]"===Object.prototype.toString.call(b)){for(var e=[],g=0,h=b.length;h>g;++g){var i=f(a,b[g]);if(!i&&d.original)return d.original.apply(window,arguments);e.push(i)}c&&c.apply(null,e)}else{if("string"==typeof b){var j=f(a,b);return!j&&d.original?d.original.apply(window,arguments):(c&&c(),j)}if(d.original)return d.original.apply(window,arguments)}},e=function(a,b){if(-1!==b.indexOf("!")){var c=b.split("!");return e(a,c[0])+"!"+e(a,c[1])}if("."==b.charAt(0)){var d=a.split("/").slice(0,-1).join("/");for(b=d+"/"+b;-1!==b.indexOf(".")&&f!=b;){var f=b;b=b.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return b},f=function(a,b){b=e(a,b);var f=c.modules[b];if(!f){if(f=c.payloads[b],"function"==typeof f){var g={},h={id:b,uri:"",exports:g,packaged:!0},i=function(a,c){return d(b,a,c)},j=f(i,g,h);g=j||h.exports,c.modules[b]=g,delete c.payloads[b]}f=c.modules[b]=g||f}return f};g(a)}}(),define("ace/lib/regexp",["require","exports","module"],function(){"use strict";function g(a){return(a.global?"g":"")+(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.extended?"x":"")+(a.sticky?"y":"")}function h(a,b,c){if(Array.prototype.indexOf)return a.indexOf(b,c);for(var d=c||0;d1&&h(b,"")>-1&&(i=RegExp(this.source,d.replace.call(g(this),"g","")),d.replace.call(a.slice(b.index),i,function(){for(var a=1;ab.index&&this.lastIndex--}return b},f||(RegExp.prototype.test=function(a){var b=d.exec.call(this,a);return b&&this.global&&!b[0].length&&this.lastIndex>b.index&&this.lastIndex--,!!b}))}),define("ace/lib/es5-shim",["require","exports","module"],function(){function d(){}function u(a){try{return Object.defineProperty(a,"sentinel",{}),"sentinel"in a}catch(b){}}function J(a){return a=+a,a!==a?a=0:0!==a&&a!==1/0&&a!==-(1/0)&&(a=(a>0||-1)*Math.floor(Math.abs(a))),a}Function.prototype.bind||(Function.prototype.bind=function(a){var b=this;if("function"!=typeof b)throw new TypeError("Function.prototype.bind called on incompatible "+b);var c=h.call(arguments,1),e=function(){if(this instanceof e){var d=b.apply(this,c.concat(h.call(arguments)));return Object(d)===d?d:this}return b.apply(a,c.concat(h.call(arguments)))};return b.prototype&&(d.prototype=b.prototype,e.prototype=new d,d.prototype=null),e});var k,l,m,n,o,e=Function.prototype.call,f=Array.prototype,g=Object.prototype,h=f.slice,i=e.bind(g.toString),j=e.bind(g.hasOwnProperty);if((o=j(g,"__defineGetter__"))&&(k=e.bind(g.__defineGetter__),l=e.bind(g.__defineSetter__),m=e.bind(g.__lookupGetter__),n=e.bind(g.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function a(a){var b=new Array(a+2);return b[0]=b[1]=0,b}var c,b=[];return b.splice.apply(b,a(20)),b.splice.apply(b,a(26)),c=b.length,b.splice(5,0,"XXX"),c+1==b.length,c+1==b.length?!0:void 0}()){var p=Array.prototype.splice;Array.prototype.splice=function(a,b){return arguments.length?p.apply(this,[void 0===a?0:a,void 0===b?this.length-a:b].concat(h.call(arguments,2))):[]}}else Array.prototype.splice=function(a,b){var c=this.length;a>0?a>c&&(a=c):void 0==a?a=0:0>a&&(a=Math.max(c+a,0)),c>a+b||(b=c-a);var d=this.slice(a,a+b),e=h.call(arguments,2),f=e.length;if(a===c)f&&this.push.apply(this,e);else{var g=Math.min(b,c-a),i=a+g,j=i+f-g,k=c-i,l=c-g;if(i>j)for(var m=0;k>m;++m)this[j+m]=this[i+m];else if(j>i)for(m=k;m--;)this[j+m]=this[i+m];if(f&&a===l)this.length=l,this.push.apply(this,e);else for(this.length=l+f,m=0;f>m;++m)this[a+m]=e[m]}return d};Array.isArray||(Array.isArray=function(a){return"[object Array]"==i(a)});var q=Object("a"),r="a"!=q[0]||!(0 in q);if(Array.prototype.forEach||(Array.prototype.forEach=function(a){var b=M(this),c=r&&"[object String]"==i(this)?this.split(""):b,d=arguments[1],e=-1,f=c.length>>>0;if("[object Function]"!=i(a))throw new TypeError;for(;++e>>0,e=Array(d),f=arguments[1];if("[object Function]"!=i(a))throw new TypeError(a+" is not a function");for(var g=0;d>g;g++)g in c&&(e[g]=a.call(f,c[g],g,b));return e}),Array.prototype.filter||(Array.prototype.filter=function(a){var f,b=M(this),c=r&&"[object String]"==i(this)?this.split(""):b,d=c.length>>>0,e=[],g=arguments[1];if("[object Function]"!=i(a))throw new TypeError(a+" is not a function");for(var h=0;d>h;h++)h in c&&(f=c[h],a.call(g,f,h,b)&&e.push(f));return e}),Array.prototype.every||(Array.prototype.every=function(a){var b=M(this),c=r&&"[object String]"==i(this)?this.split(""):b,d=c.length>>>0,e=arguments[1];if("[object Function]"!=i(a))throw new TypeError(a+" is not a function");for(var f=0;d>f;f++)if(f in c&&!a.call(e,c[f],f,b))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(a){var b=M(this),c=r&&"[object String]"==i(this)?this.split(""):b,d=c.length>>>0,e=arguments[1];if("[object Function]"!=i(a))throw new TypeError(a+" is not a function");for(var f=0;d>f;f++)if(f in c&&a.call(e,c[f],f,b))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(a){var b=M(this),c=r&&"[object String]"==i(this)?this.split(""):b,d=c.length>>>0;if("[object Function]"!=i(a))throw new TypeError(a+" is not a function");if(!d&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var f,e=0;if(arguments.length>=2)f=arguments[1];else for(;;){if(e in c){f=c[e++];break}if(++e>=d)throw new TypeError("reduce of empty array with no initial value")}for(;d>e;e++)e in c&&(f=a.call(void 0,f,c[e],e,b));return f}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(a){var b=M(this),c=r&&"[object String]"==i(this)?this.split(""):b,d=c.length>>>0;if("[object Function]"!=i(a))throw new TypeError(a+" is not a function");if(!d&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var e,f=d-1;if(arguments.length>=2)e=arguments[1];else for(;;){if(f in c){e=c[f--];break}if(--f<0)throw new TypeError("reduceRight of empty array with no initial value")}do f in this&&(e=a.call(void 0,e,c[f],f,b));while(f--);return e}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(a){var b=r&&"[object String]"==i(this)?this.split(""):M(this),c=b.length>>>0;if(!c)return-1;var d=0;for(arguments.length>1&&(d=J(arguments[1])),d=d>=0?d:Math.max(0,c+d);c>d;d++)if(d in b&&b[d]===a)return d;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(a){var b=r&&"[object String]"==i(this)?this.split(""):M(this),c=b.length>>>0;if(!c)return-1;var d=c-1;for(arguments.length>1&&(d=Math.min(d,J(arguments[1]))),d=d>=0?d:c-Math.abs(d);d>=0;d--)if(d in b&&a===b[d])return d;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(a){return a.__proto__||(a.constructor?a.constructor.prototype:g)}),!Object.getOwnPropertyDescriptor){var s="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(a,b){if("object"!=typeof a&&"function"!=typeof a||null===a)throw new TypeError(s+a);if(j(a,b)){var c,d,e;if(c={enumerable:!0,configurable:!0},o){var f=a.__proto__;a.__proto__=g;var d=m(a,b),e=n(a,b);if(a.__proto__=f,d||e)return d&&(c.get=d),e&&(c.set=e),c}return c.value=a[b],c}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(a){return Object.keys(a)}),!Object.create){var t;t=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var a={};for(var b in a)a[b]=null;return a.constructor=a.hasOwnProperty=a.propertyIsEnumerable=a.isPrototypeOf=a.toLocaleString=a.toString=a.valueOf=a.__proto__=null,a},Object.create=function(a,b){var c;if(null===a)c=t();else{if("object"!=typeof a)throw new TypeError("typeof prototype["+typeof a+"] != 'object'");var d=function(){};d.prototype=a,c=new d,c.__proto__=a}return void 0!==b&&Object.defineProperties(c,b),c}}if(Object.defineProperty){var v=u({}),w="undefined"==typeof document||u(document.createElement("div"));if(!v||!w)var x=Object.defineProperty}if(!Object.defineProperty||x){var y="Property description must be an object: ",z="Object.defineProperty called on non-object: ",A="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(a,b,c){if("object"!=typeof a&&"function"!=typeof a||null===a)throw new TypeError(z+a);if("object"!=typeof c&&"function"!=typeof c||null===c)throw new TypeError(y+c);if(x)try{return x.call(Object,a,b,c)}catch(d){}if(j(c,"value"))if(o&&(m(a,b)||n(a,b))){var e=a.__proto__;a.__proto__=g,delete a[b],a[b]=c.value,a.__proto__=e}else a[b]=c.value;else{if(!o)throw new TypeError(A);j(c,"get")&&k(a,b,c.get),j(c,"set")&&l(a,b,c.set)}return a}}Object.defineProperties||(Object.defineProperties=function(a,b){for(var c in b)j(b,c)&&Object.defineProperty(a,c,b[c]);return a}),Object.seal||(Object.seal=function(a){return a}),Object.freeze||(Object.freeze=function(a){return a});try{Object.freeze(function(){})}catch(B){Object.freeze=function(a){return function(b){return"function"==typeof b?b:a(b)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(a){return a}),Object.isSealed||(Object.isSealed=function(){return!1}),Object.isFrozen||(Object.isFrozen=function(){return!1}),Object.isExtensible||(Object.isExtensible=function(a){if(Object(a)===a)throw new TypeError;for(var b="";j(a,b);)b+="?";a[b]=!0;var c=j(a,b);return delete a[b],c}),!Object.keys){var C=!0,D=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],E=D.length;for(var F in{toString:null})C=!1;Object.keys=function jb(a){if("object"!=typeof a&&"function"!=typeof a||null===a)throw new TypeError("Object.keys called on a non-object");var jb=[];for(var b in a)j(a,b)&&jb.push(b);if(C)for(var c=0,d=E;d>c;c++){var e=D[c];j(a,e)&&jb.push(e)}return jb}}Date.now||(Date.now=function(){return(new Date).getTime()});var G=" \n \f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff";if(!String.prototype.trim||G.trim()){G="["+G+"]";var H=new RegExp("^"+G+G+"*"),I=new RegExp(G+G+"*$");String.prototype.trim=function(){return String(this).replace(H,"").replace(I,"")}}var M=function(a){if(null==a)throw new TypeError("can't convert "+a+" to object");return Object(a)}}),define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(a){"use strict";a("./regexp"),a("./es5-shim")}),define("ace/lib/dom",["require","exports","module"],function(a,b){"use strict";if("undefined"!=typeof document){var d="http://www.w3.org/1999/xhtml";b.getDocumentHead=function(a){return a||(a=document),a.head||a.getElementsByTagName("head")[0]||a.documentElement},b.createElement=function(a,b){return document.createElementNS?document.createElementNS(b||d,a):document.createElement(a)},b.hasCssClass=function(a,b){var c=(a.className||"").split(/\s+/g);return-1!==c.indexOf(b)},b.addCssClass=function(a,c){b.hasCssClass(a,c)||(a.className+=" "+c)},b.removeCssClass=function(a,b){for(var c=a.className.split(/\s+/g);;){var d=c.indexOf(b);if(-1==d)break;c.splice(d,1)}a.className=c.join(" ")},b.toggleCssClass=function(a,b){for(var c=a.className.split(/\s+/g),d=!0;;){var e=c.indexOf(b);if(-1==e)break;d=!1,c.splice(e,1)}return d&&c.push(b),a.className=c.join(" "),d},b.setCssClass=function(a,c,d){d?b.addCssClass(a,c):b.removeCssClass(a,c)},b.hasCssString=function(a,b){var d,c=0;if(b=b||document,b.createStyleSheet&&(d=b.styleSheets)){for(;c=0?parseFloat((e.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((e.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),b.isOldIE=b.isIE&&b.isIE<9,b.isGecko=b.isMozilla=(window.Controllers||window.controllers)&&"Gecko"===window.navigator.product,b.isOldGecko=b.isGecko&&parseInt((e.match(/rv\:(\d+)/)||[])[1],10)<4,b.isOpera=window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),b.isWebKit=parseFloat(e.split("WebKit/")[1])||void 0,b.isChrome=parseFloat(e.split(" Chrome/")[1])||void 0,b.isAIR=e.indexOf("AdobeAIR")>=0,b.isIPad=e.indexOf("iPad")>=0,b.isTouchPad=e.indexOf("TouchPad")>=0,b.isChromeOS=e.indexOf(" CrOS ")>=0}}),define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(a,b){"use strict";function g(a,b,c){var g=f(b);if(!e.isMac&&h){if((h[91]||h[92])&&(g|=8),h.altGr){if(3==(3&g))return;h.altGr=0}if(18===c||17===c){var j=b.location||b.keyLocation;if(17===c&&1===j)i=b.timeStamp;else if(18===c&&3===g&&2===j){var k=-i;i=b.timeStamp,k+=i,3>k&&(h.altGr=!0)}}}if(c in d.MODIFIER_KEYS){switch(d.MODIFIER_KEYS[c]){case"Alt":g=2;break;case"Shift":g=4;break;case"Ctrl":g=1;break;default:g=8}c=-1}if(8&g&&(91===c||93===c)&&(c=-1),g||13!==c||!b.location&&3!==b.keyLocation||(a(b,g,-c),!b.defaultPrevented)){if(e.isChromeOS&&8&g){if(a(b,g,c),b.defaultPrevented)return;g&=-9}return g||c in d.FUNCTION_KEYS||c in d.PRINTABLE_KEYS?a(b,g,c):!1}}var d=a("./keys"),e=a("./useragent");b.addListener=function(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1);if(a.attachEvent){var d=function(){c.call(a,window.event)};c._wrapper=d,a.attachEvent("on"+b,d)}},b.removeListener=function(a,b,c){return a.removeEventListener?a.removeEventListener(b,c,!1):(a.detachEvent&&a.detachEvent("on"+b,c._wrapper||c),void 0)},b.stopEvent=function(a){return b.stopPropagation(a),b.preventDefault(a),!1},b.stopPropagation=function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},b.preventDefault=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},b.getButton=function(a){return"dblclick"==a.type?0:"contextmenu"==a.type||e.isMac&&a.ctrlKey&&!a.altKey&&!a.shiftKey?2:a.preventDefault?a.button:{1:0,2:2,4:1}[a.button]},b.capture=function(a,c,d){function e(a){c&&c(a),d&&d(a),b.removeListener(document,"mousemove",c,!0),b.removeListener(document,"mouseup",e,!0),b.removeListener(document,"dragstart",e,!0)}return b.addListener(document,"mousemove",c,!0),b.addListener(document,"mouseup",e,!0),b.addListener(document,"dragstart",e,!0),e},b.addMouseWheelListener=function(a,c){"onmousewheel"in a?b.addListener(a,"mousewheel",function(a){var b=8;void 0!==a.wheelDeltaX?(a.wheelX=-a.wheelDeltaX/b,a.wheelY=-a.wheelDeltaY/b):(a.wheelX=0,a.wheelY=-a.wheelDelta/b),c(a)}):"onwheel"in a?b.addListener(a,"wheel",function(a){var b=.35;switch(a.deltaMode){case a.DOM_DELTA_PIXEL:a.wheelX=a.deltaX*b||0,a.wheelY=a.deltaY*b||0;break;case a.DOM_DELTA_LINE:case a.DOM_DELTA_PAGE:a.wheelX=5*(a.deltaX||0),a.wheelY=5*(a.deltaY||0)}c(a)}):b.addListener(a,"DOMMouseScroll",function(a){a.axis&&a.axis==a.HORIZONTAL_AXIS?(a.wheelX=5*(a.detail||0),a.wheelY=0):(a.wheelX=0,a.wheelY=5*(a.detail||0)),c(a)})},b.addMultiMouseDownListener=function(a,c,d,f){var h,i,j,g=0,k={2:"dblclick",3:"tripleclick",4:"quadclick"};b.addListener(a,"mousedown",function(a){if(0!==b.getButton(a)?g=0:a.detail>1?(g++,g>4&&(g=1)):g=1,e.isIE){var l=Math.abs(a.clientX-h)>5||Math.abs(a.clientY-i)>5;(!j||l)&&(g=1),j&&clearTimeout(j),j=setTimeout(function(){j=null},c[g-1]||600),1==g&&(h=a.clientX,i=a.clientY)}if(a._clicks=g,d[f]("mousedown",a),g>4)g=0;else if(g>1)return d[f](k[g],a)}),e.isOldIE&&b.addListener(a,"dblclick",function(a){g=2,j&&clearTimeout(j),j=setTimeout(function(){j=null},c[g-1]||600),d[f]("mousedown",a),d[f](k[g],a)})};var f=!e.isMac||!e.isOpera||"KeyboardEvent"in window?function(a){return 0|(a.ctrlKey?1:0)|(a.altKey?2:0)|(a.shiftKey?4:0)|(a.metaKey?8:0)}:function(a){return 0|(a.metaKey?1:0)|(a.altKey?2:0)|(a.shiftKey?4:0)|(a.ctrlKey?8:0)};b.getModifierString=function(a){return d.KEY_MODS[f(a)]};var h=null,i=0;if(b.addCommandKeyListener=function(a,c){var d=b.addListener;if(e.isOldGecko||e.isOpera&&!("KeyboardEvent"in window)){var f=null;d(a,"keydown",function(a){f=a.keyCode}),d(a,"keypress",function(a){return g(c,a,f)})}else{var i=null;d(a,"keydown",function(a){h[a.keyCode]=!0;var b=g(c,a,a.keyCode);return i=a.defaultPrevented,b}),d(a,"keypress",function(a){i&&(a.ctrlKey||a.altKey||a.shiftKey||a.metaKey)&&(b.stopEvent(a),i=null)}),d(a,"keyup",function(a){h[a.keyCode]=null}),h||(h=Object.create(null),d(window,"focus",function(){h=Object.create(null)}))}},window.postMessage&&!e.isOldIE){var j=1;b.nextTick=function(a,c){c=c||window;var d="zero-timeout-message-"+j;b.addListener(c,"message",function e(f){f.data==d&&(b.stopPropagation(f),b.removeListener(c,"message",e),a())}),c.postMessage(d,"*")}}b.nextFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame,b.nextFrame=b.nextFrame?b.nextFrame.bind(window):function(a){setTimeout(a,17)}}),define("ace/lib/lang",["require","exports","module"],function(a,b){"use strict";b.last=function(a){return a[a.length-1]},b.stringReverse=function(a){return a.split("").reverse().join("")},b.stringRepeat=function(a,b){for(var c="";b>0;)1&b&&(c+=a),(b>>=1)&&(a+=a);return c};var d=/^\s\s*/,e=/\s\s*$/;b.stringTrimLeft=function(a){return a.replace(d,"")},b.stringTrimRight=function(a){return a.replace(e,"")},b.copyObject=function(a){var b={};for(var c in a)b[c]=a[c];return b},b.copyArray=function(a){for(var b=[],c=0,d=a.length;d>c;c++)b[c]=a[c]&&"object"==typeof a[c]?this.copyObject(a[c]):a[c];return b},b.deepCopy=function(a){if("object"!=typeof a||!a)return a;var c=a.constructor;if(c===RegExp)return a;var d=c();for(var e in a)d[e]="object"==typeof a[e]?b.deepCopy(a[e]):a[e];return d},b.arrayToMap=function(a){for(var b={},c=0;cc?{cursor:a.start,anchor:a.end}:{cursor:a.end,anchor:a.start}}a("../lib/dom"),a("../lib/event"),a("../lib/useragent");var g=0;!function(){this.onMouseDown=function(a){var b=a.inSelection(),c=a.getDocumentPosition();this.mousedownEvent=a; var d=this.editor,e=a.getButton();if(0!==e){var f=d.getSelectionRange(),g=f.isEmpty();return g&&d.selection.moveToPosition(c),d.textInput.onContextMenu(a.domEvent),void 0}return this.mousedownEvent.time=Date.now(),!b||d.isFocused()||(d.focus(),!this.$focusTimout||this.$clickSelection||d.inMultiSelectMode)?(this.captureMouse(a),this.startSelect(c,a.domEvent._clicks>1),a.preventDefault()):(this.setState("focusWait"),this.captureMouse(a),void 0)},this.startSelect=function(a,b){a=a||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var c=this.editor;this.mousedownEvent.getShiftKey()?c.selection.selectToPosition(a):b||c.selection.moveToPosition(a),b||this.select(),c.renderer.scroller.setCapture&&c.renderer.scroller.setCapture(),c.setStyle("ace_selecting"),this.setState("select")},this.select=function(){var a,b=this.editor,c=b.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var d=this.$clickSelection.comparePoint(c);if(-1==d)a=this.$clickSelection.end;else if(1==d)a=this.$clickSelection.start;else{var e=j(this.$clickSelection,c);c=e.cursor,a=e.anchor}b.selection.setSelectionAnchor(a.row,a.column)}b.selection.selectToPosition(c),b.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(a){var b,c=this.editor,d=c.renderer.screenToTextCoordinates(this.x,this.y),e=c.selection[a](d.row,d.column);if(this.$clickSelection){var f=this.$clickSelection.comparePoint(e.start),g=this.$clickSelection.comparePoint(e.end);if(-1==f&&0>=g)b=this.$clickSelection.end,(e.end.row!=d.row||e.end.column!=d.column)&&(d=e.start);else if(1==g&&f>=0)b=this.$clickSelection.start,(e.start.row!=d.row||e.start.column!=d.column)&&(d=e.end);else if(-1==f&&1==g)d=e.end,b=e.start;else{var h=j(this.$clickSelection,d);d=h.cursor,b=h.anchor}c.selection.setSelectionAnchor(b.row,b.column)}c.selection.selectToPosition(d),c.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var a=i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),b=Date.now();(a>g||b-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(a){var b=a.getDocumentPosition(),c=this.editor,d=c.session,e=d.getBracketRange(b);e?(e.isEmpty()&&(e.start.column--,e.end.column++),this.setState("select")):(e=c.selection.getWordRange(b.row,b.column),this.setState("selectByWords")),this.$clickSelection=e,this.select()},this.onTripleClick=function(a){var b=a.getDocumentPosition(),c=this.editor;this.setState("selectByLines");var d=c.getSelectionRange();d.isMultiLine()&&d.contains(b.row,b.column)?(this.$clickSelection=c.selection.getLineRange(d.start.row),this.$clickSelection.end=c.selection.getLineRange(d.end.row).end):this.$clickSelection=c.selection.getLineRange(b.row),this.select()},this.onQuadClick=function(){var b=this.editor;b.selectAll(),this.$clickSelection=b.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(a){if(!a.getAccelKey()){a.getShiftKey()&&a.wheelY&&!a.wheelX&&(a.wheelX=a.wheelY,a.wheelY=0);var b=a.domEvent.timeStamp,c=b-(this.$lastScrollTime||0),d=this.editor,e=d.renderer.isScrollableBy(a.wheelX*a.speed,a.wheelY*a.speed);return e||200>c?(this.$lastScrollTime=b,d.renderer.scrollBy(a.wheelX*a.speed,a.wheelY*a.speed),a.stop()):void 0}}}.call(h.prototype),b.DefaultHandlers=h}),define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(a,b){"use strict";function f(a){this.isOpen=!1,this.$element=null,this.$parentNode=a}a("./lib/oop");var e=a("./lib/dom");!function(){this.$init=function(){return this.$element=e.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(a){e.setInnerText(this.getElement(),a)},this.setHtml=function(a){this.getElement().innerHTML=a},this.setPosition=function(a,b){this.getElement().style.left=a+"px",this.getElement().style.top=b+"px"},this.setClassName=function(a){e.addCssClass(this.getElement(),a)},this.show=function(a,b,c){null!=a&&this.setText(a),null!=b&&null!=c&&this.setPosition(b,c),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth}}.call(f.prototype),b.Tooltip=f}),define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(a,b){"use strict";function h(a){function k(){var d=h.getDocumentPosition().row,f=c.$annotations[d];if(!f)return l();var g=b.session.getLength();if(d==g){var i=b.renderer.pixelToScreenCoordinates(0,h.y).row,k=h.$pos;if(i>b.session.documentToScreenRow(k.row,k.column))return l()}if(j!=f)if(j=f.text.join("
"),e.setHtml(j),e.show(),b.on("mousewheel",l),a.$tooltipFollowsMouse)m(h);else{var n=c.$cells[b.session.documentToScreenRow(d,0)].element,o=n.getBoundingClientRect(),p=e.getElement().style;p.left=o.right+"px",p.top=o.bottom+"px"}}function l(){g&&(g=clearTimeout(g)),j&&(e.hide(),j=null,b.removeEventListener("mousewheel",l))}function m(a){e.setPosition(a.x,a.y)}var b=a.editor,c=b.renderer.$gutterLayer,e=new i(b.container);a.editor.setDefaultHandler("guttermousedown",function(d){if(b.isFocused()&&0==d.getButton()){var e=c.getRegion(d);if("foldWidgets"!=e){var f=d.getDocumentPosition().row,g=b.session.selection;if(d.getShiftKey())g.selectTo(f,0);else{if(2==d.domEvent.detail)return b.selectAll(),d.preventDefault();a.$clickSelection=b.selection.getLineRange(f)}return a.setState("selectByLines"),a.captureMouse(d),d.preventDefault()}}});var g,h,j;a.editor.setDefaultHandler("guttermousemove",function(b){var c=b.domEvent.target||b.domEvent.srcElement;return d.hasCssClass(c,"ace_fold-widget")?l():(j&&a.$tooltipFollowsMouse&&m(b),h=b,g||(g=setTimeout(function(){g=null,h&&!a.isMousePressed?k():l()},50)),void 0)}),f.addListener(b.renderer.$gutter,"mouseout",function(){h=null,j&&!g&&(g=setTimeout(function(){g=null,l()},50))}),b.on("changeSession",l)}function i(a){g.call(this,a)}var d=a("../lib/dom"),e=a("../lib/oop"),f=a("../lib/event"),g=a("../tooltip").Tooltip;e.inherits(i,g),function(){this.setPosition=function(a,b){var c=window.innerWidth||document.documentElement.clientWidth,d=window.innerHeight||document.documentElement.clientHeight,e=this.getWidth(),f=this.getHeight();a+=15,b+=15,a+e>c&&(a-=a+e-c),b+f>d&&(b-=20+f),g.prototype.setPosition.call(this,a,b)}}.call(i.prototype),b.GutterHandler=h}),define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(a,b){"use strict";var d=a("../lib/event"),e=a("../lib/useragent"),f=b.MouseEvent=function(a,b){this.domEvent=a,this.editor=b,this.x=this.clientX=a.clientX,this.y=this.clientY=a.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};!function(){this.stopPropagation=function(){d.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){d.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var a=this.editor,b=a.getSelectionRange();if(b.isEmpty())this.$inSelection=!1;else{var c=this.getDocumentPosition();this.$inSelection=b.contains(c.row,c.column)}return this.$inSelection},this.getButton=function(){return d.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=e.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}.call(f.prototype)}),define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(a,b){"use strict";function j(a){function y(a,c){var d=Date.now(),e=!c||a.row!=c.row,f=!c||a.column!=c.column;if(!w||e||f)b.$blockScrolling+=1,b.moveCursorToPosition(a),b.$blockScrolling-=1,w=d,x={x:n,y:o};else{var g=k(x.x,x.y,n,o);g>i?w=null:d-w>=h&&(b.renderer.scrollCursorIntoView(),w=null)}}function z(a,c){var d=Date.now(),e=b.renderer.layerConfig.lineHeight,f=b.renderer.layerConfig.characterWidth,h=b.renderer.scroller.getBoundingClientRect(),i={x:{left:n-h.left,right:h.right-n},y:{top:o-h.top,bottom:h.bottom-o}},j=Math.min(i.x.left,i.x.right),k=Math.min(i.y.top,i.y.bottom),l={row:a.row,column:a.column};2>=j/f&&(l.column+=i.x.left=k/e&&(l.row+=i.y.top=g&&b.renderer.scrollCursorIntoView(l):v=d:v=null}function A(){var a=r;r=b.renderer.screenToTextCoordinates(n,o),y(r,a),z(r,a)}function B(){q=b.selection.toOrientedRange(),m=b.session.addMarker(q,"ace_selection",b.getSelectionStyle()),b.clearSelection(),b.isFocused()&&b.renderer.$cursorLayer.setBlinking(!1),clearInterval(p),p=setInterval(A,20),s=0,e.addListener(document,"mousemove",E)}function C(){clearInterval(p),b.session.removeMarker(m),m=null,b.$blockScrolling+=1,b.selection.fromOrientedRange(q),b.$blockScrolling-=1,b.isFocused()&&!u&&b.renderer.$cursorLayer.setBlinking(!b.getReadOnly()),q=null,s=0,v=null,w=null,e.removeListener(document,"mousemove",E)}function E(){null==D&&(D=setTimeout(function(){null!=D&&m&&C()},20))}function F(a){var b=a.types;return!b||Array.prototype.some.call(b,function(a){return"text/plain"==a||"Text"==a})}function G(a){var b=["copy","copymove","all","uninitialized"],c=["move","copymove","linkmove","all","uninitialized"],d=f.isMac?a.altKey:a.ctrlKey,e="uninitialized";try{e=a.dataTransfer.effectAllowed.toLowerCase()}catch(a){}var g="none";return d&&b.indexOf(e)>=0?g="copy":c.indexOf(e)>=0?g="move":b.indexOf(e)>=0&&(g="copy"),g}var b=a.editor,c=d.createElement("img");c.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",f.isOpera&&(c.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");var j=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];j.forEach(function(b){a[b]=this[b]},this),b.addEventListener("mousedown",this.onMouseDown.bind(a));var m,n,o,p,q,r,t,u,v,w,x,l=b.container,s=0;this.onDragStart=function(a){if(this.cancelDrag||!l.draggable){var d=this;return setTimeout(function(){d.startSelect(),d.captureMouse(a)},0),a.preventDefault()}q=b.getSelectionRange();var e=a.dataTransfer;e.effectAllowed=b.getReadOnly()?"copy":"copyMove",f.isOpera&&(b.container.appendChild(c),c._top=c.offsetTop),e.setDragImage&&e.setDragImage(c,0,0),f.isOpera&&b.container.removeChild(c),e.clearData(),e.setData("Text",b.session.getTextRange()),u=!0,this.setState("drag")},this.onDragEnd=function(a){if(l.draggable=!1,u=!1,this.setState(null),!b.getReadOnly()){var c=a.dataTransfer.dropEffect;t||"move"!=c||b.session.remove(b.getSelectionRange()),b.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging")},this.onDragEnter=function(a){return!b.getReadOnly()&&F(a.dataTransfer)?(m||B(),s++,a.dataTransfer.dropEffect=t=G(a),e.preventDefault(a)):void 0},this.onDragOver=function(a){return!b.getReadOnly()&&F(a.dataTransfer)?(m||(B(),s++),null!==D&&(D=null),n=a.clientX,o=a.clientY,a.dataTransfer.dropEffect=t=G(a),e.preventDefault(a)):void 0},this.onDragLeave=function(a){return s--,0>=s&&m?(C(),t=null,e.preventDefault(a)):void 0},this.onDrop=function(a){if(m){var c=a.dataTransfer;if(u)switch(t){case"move":q=q.contains(r.row,r.column)?{start:r,end:r}:b.moveText(q,r);break;case"copy":q=b.moveText(q,r,!0)}else{var d=c.getData("Text");q={start:r,end:b.session.insert(r,d)},b.focus(),t=null}return C(),e.preventDefault(a)}},e.addListener(l,"dragstart",this.onDragStart.bind(a)),e.addListener(l,"dragend",this.onDragEnd.bind(a)),e.addListener(l,"dragenter",this.onDragEnter.bind(a)),e.addListener(l,"dragover",this.onDragOver.bind(a)),e.addListener(l,"dragleave",this.onDragLeave.bind(a)),e.addListener(l,"drop",this.onDrop.bind(a));var D=null}function k(a,b,c,d){return Math.sqrt(Math.pow(c-a,2)+Math.pow(d-b,2))}var d=a("../lib/dom"),e=a("../lib/event"),f=a("../lib/useragent"),g=200,h=200,i=5;!function(){this.dragWait=function(){var a=Date.now()-this.mousedownEvent.time;a>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var a=this.editor.container;a.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var a=this.editor.container;a.draggable=!0,this.editor.renderer.$cursorLayer.setBlinking(!1),this.editor.setStyle("ace_dragging"),this.setState("dragReady")},this.onMouseDrag=function(){var b=this.editor.container;if(f.isIE&&"dragReady"==this.state){var c=k(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);c>3&&b.dragDrop()}if("dragWait"===this.state){var c=k(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);c>0&&(b.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(a){if(this.$dragEnabled){this.mousedownEvent=a;var b=this.editor,c=a.inSelection(),d=a.getButton(),e=a.domEvent.detail||1;if(1===e&&0===d&&c){if(a.editor.inMultiSelectMode&&(a.getAccelKey()||a.getShiftKey()))return;this.mousedownEvent.time=Date.now();var g=a.domEvent.target||a.domEvent.srcElement;if("unselectable"in g&&(g.unselectable="on"),b.getDragDelay()){if(f.isWebKit){this.cancelDrag=!0;var h=b.container;h.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(a,this.onMouseDrag.bind(this)),a.defaultPrevented=!0}}}}.call(j.prototype),b.DragdropHandler=j}),define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(a,b){"use strict";var d=a("./dom");b.get=function(a,b){var c=new XMLHttpRequest;c.open("GET",a,!0),c.onreadystatechange=function(){4===c.readyState&&b(c.responseText)},c.send(null)},b.loadScript=function(a,b){var c=d.getDocumentHead(),e=document.createElement("script");e.src=a,c.appendChild(e),e.onload=e.onreadystatechange=function(a,c){(c||!e.readyState||"loaded"==e.readyState||"complete"==e.readyState)&&(e=e.onload=e.onreadystatechange=null,c||b())}},b.qualifyURL=function(a){var b=document.createElement("a");return b.href=a,b.href}}),define("ace/lib/event_emitter",["require","exports","module"],function(a,b){"use strict";var d={},e=function(){this.propagationStopped=!0},f=function(){this.defaultPrevented=!0};d._emit=d._dispatchEvent=function(a,b){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var c=this._eventRegistry[a]||[],d=this._defaultHandlers[a];if(c.length||d){"object"==typeof b&&b||(b={}),b.type||(b.type=a),b.stopPropagation||(b.stopPropagation=e),b.preventDefault||(b.preventDefault=f),c=c.slice();for(var g=0;gq;q++){var s=p[q];0===s.name.indexOf("data-ace-")&&(e[k(s.name.replace(/^data-ace-/,""))]=s.value)}var t=o.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);t&&(f=t[1])}}f&&(e.base=e.base||f,e.packaged=!0),e.basePath=e.base,e.workerPath=e.workerPath||e.base,e.modePath=e.modePath||e.base,e.themePath=e.themePath||e.base,delete e.base;for(var u in e)"undefined"!=typeof e[u]&&b.set(u,e[u])}function k(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}var d=a("./lib/lang"),e=a("./lib/oop"),f=a("./lib/net"),g=a("./lib/event_emitter").EventEmitter,h=function(){return this}(),i={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{}};b.get=function(a){if(!i.hasOwnProperty(a))throw new Error("Unknown config key: "+a);return i[a]},b.set=function(a,b){if(!i.hasOwnProperty(a))throw new Error("Unknown config key: "+a);i[a]=b},b.all=function(){return d.copyObject(i)},e.implement(b,g),b.moduleUrl=function(a,b){if(i.$moduleUrls[a])return i.$moduleUrls[a];var c=a.split("/");b=b||c[c.length-2]||"";var d="snippets"==b?"/":"-",e=c[c.length-1];if("worker"==b&&"-"==d){var f=new RegExp("^"+b+"[\\-_]|[\\-_]"+b+"$","g");e=e.replace(f,"")}(!e||e==b)&&c.length>1&&(e=c[c.length-2]);var g=i[b+"Path"];return null==g?g=i.basePath:"/"==d&&(b=d=""),g&&"/"!=g.slice(-1)&&(g+="/"),g+b+d+e+this.get("suffix")},b.setModuleUrl=function(a,b){return i.$moduleUrls[a]=b},b.$loading={},b.loadModule=function(c,d){var e,g;Array.isArray(c)&&(g=c[0],c=c[1]);try{e=a(c)}catch(h){}if(e&&!b.$loading[c])return d&&d(e);if(b.$loading[c]||(b.$loading[c]=[]),b.$loading[c].push(d),!(b.$loading[c].length>1)){var i=function(){a([c],function(a){b._emit("load.module",{name:c,module:a});var d=b.$loading[c];b.$loading[c]=null,d.forEach(function(b){b&&b(a)})})};return b.get("packaged")?(f.loadScript(b.moduleUrl(c,g),i),void 0):i()}},j(!0),b.init=j;var l={setOptions:function(a){Object.keys(a).forEach(function(b){this.setOption(b,a[b])},this)},getOptions:function(a){var b={};return a?Array.isArray(a)||(b=a,a=Object.keys(b)):a=Object.keys(this.$options),a.forEach(function(a){b[a]=this.getOption(a)},this),b},setOption:function(a,b){if(this["$"+a]!==b){var c=this.$options[a];if(!c)return"undefined"!=typeof console&&console.warn&&console.warn('misspelled option "'+a+'"'),void 0;if(c.forwardTo)return this[c.forwardTo]&&this[c.forwardTo].setOption(a,b);c.handlesSet||(this["$"+a]=b),c&&c.set&&c.set.call(this,b)}},getOption:function(a){var b=this.$options[a];return b?b.forwardTo?this[b.forwardTo]&&this[b.forwardTo].getOption(a):b&&b.get?b.get.call(this):this["$"+a]:("undefined"!=typeof console&&console.warn&&console.warn('misspelled option "'+a+'"'),void 0)}},m={};b.defineOptions=function(a,b,c){return a.$options||(m[b]=a.$options={}),Object.keys(c).forEach(function(b){var d=c[b];"string"==typeof d&&(d={forwardTo:d}),d.name||(d.name=b),a.$options[d.name]=d,"initialValue"in d&&(a["$"+d.name]=d.initialValue)}),e.implement(a,l),this},b.resetOptions=function(a){Object.keys(a.$options).forEach(function(b){var c=a.$options[b];"value"in c&&a.setOption(b,c.value)})},b.setDefaultValue=function(a,c,d){var e=m[a]||(m[a]={});e[c]&&(e.forwardTo?b.setDefaultValue(e.forwardTo,c,d):e[c].value=d)},b.setDefaultValues=function(a,c){Object.keys(c).forEach(function(d){b.setDefaultValue(a,d,c[d])})}}),define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/config"],function(a,b){"use strict";var d=a("../lib/event"),e=a("../lib/useragent"),f=a("./default_handlers").DefaultHandlers,g=a("./default_gutter_handler").GutterHandler,h=a("./mouse_event").MouseEvent,i=a("./dragdrop_handler").DragdropHandler,j=a("../config"),k=function(a){var b=this;this.editor=a,new f(this),new g(this),new i(this);var c=function(b){!a.isFocused()&&a.textInput&&a.textInput.moveToMouse(b),a.focus()},h=a.renderer.getMouseEventTarget();d.addListener(h,"click",this.onMouseEvent.bind(this,"click")),d.addListener(h,"mousemove",this.onMouseMove.bind(this,"mousemove")),d.addMultiMouseDownListener(h,[400,300,250],this,"onMouseEvent"),a.renderer.scrollBarV&&(d.addMultiMouseDownListener(a.renderer.scrollBarV.inner,[400,300,250],this,"onMouseEvent"),d.addMultiMouseDownListener(a.renderer.scrollBarH.inner,[400,300,250],this,"onMouseEvent"),e.isIE&&(d.addListener(a.renderer.scrollBarV.element,"mousedown",c),d.addListener(a.renderer.scrollBarH.element,"mousemove",c))),d.addMouseWheelListener(a.container,this.onMouseWheel.bind(this,"mousewheel"));var j=a.renderer.$gutter;d.addListener(j,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),d.addListener(j,"click",this.onMouseEvent.bind(this,"gutterclick")),d.addListener(j,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),d.addListener(j,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),d.addListener(h,"mousedown",c),d.addListener(j,"mousedown",function(b){return a.focus(),d.preventDefault(b)}),a.on("mousemove",function(c){if(!b.state&&!b.$dragDelay&&b.$dragEnabled){var d=a.renderer.screenToTextCoordinates(c.x,c.y),e=a.session.selection.getRange(),f=a.renderer;!e.isEmpty()&&e.insideStart(d.row,d.column)?f.setCursorStyle("default"):f.setCursorStyle("")}})};!function(){this.onMouseEvent=function(a,b){this.editor._emit(a,new h(b,this.editor))},this.onMouseMove=function(a,b){var c=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;c&&c.length&&this.editor._emit(a,new h(b,this.editor))},this.onMouseWheel=function(a,b){var c=new h(b,this.editor);c.speed=2*this.$scrollSpeed,c.wheelX=b.wheelX,c.wheelY=b.wheelY,this.editor._emit(a,c)},this.setState=function(a){this.state=a},this.captureMouse=function(a,b){this.x=a.x,this.y=a.y,this.isMousePressed=!0;var c=this.editor.renderer;c.$keepTextAreaAtCursor&&(c.$keepTextAreaAtCursor=null);var f=this,g=function(a){if(a){if(e.isWebKit&&!a.which&&f.releaseMouse)return f.releaseMouse();f.x=a.clientX,f.y=a.clientY,b&&b(a),f.mouseEvent=new h(a,f.editor),f.$mouseMoved=!0}},i=function(a){clearInterval(k),j(),f[f.state+"End"]&&f[f.state+"End"](a),f.state="",null==c.$keepTextAreaAtCursor&&(c.$keepTextAreaAtCursor=!0,c.$moveTextAreaToCursor()),f.isMousePressed=!1,f.$onCaptureMouseMove=f.releaseMouse=null,a&&f.onMouseEvent("mouseup",a)},j=function(){f[f.state]&&f[f.state](),f.$mouseMoved=!1};if(e.isOldIE&&"dblclick"==a.domEvent.type)return setTimeout(function(){i(a)});f.$onCaptureMouseMove=g,f.releaseMouse=d.capture(this.editor.container,g,i);var k=setInterval(j,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var a=function(b){b&&b.domEvent&&"contextmenu"!=b.domEvent.type||(this.editor.off("nativecontextmenu",a),b&&b.domEvent&&d.stopEvent(b.domEvent))}.bind(this);setTimeout(a,10),this.editor.on("nativecontextmenu",a)}}.call(k.prototype),j.defineOptions(k.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:e.isMac?150:0},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),b.MouseHandler=k}),define("ace/mouse/fold_handler",["require","exports","module"],function(a,b){"use strict";function d(a){a.on("click",function(b){var c=b.getDocumentPosition(),d=a.session,e=d.getFoldAt(c.row,c.column,1);e&&(b.getAccelKey()?d.removeFold(e):d.expandFold(e),b.stop())}),a.on("gutterclick",function(b){var c=a.renderer.$gutterLayer.getRegion(b);if("foldWidgets"==c){var d=b.getDocumentPosition().row,e=a.session;e.foldWidgets&&e.foldWidgets[d]&&a.session.onFoldWidgetClick(d,b),a.isFocused()||a.focus(),b.stop()}}),a.on("gutterdblclick",function(b){var c=a.renderer.$gutterLayer.getRegion(b);if("foldWidgets"==c){var d=b.getDocumentPosition().row,e=a.session,f=e.getParentFoldRangeData(d,!0),g=f.range||f.firstRange;if(g){d=g.start.row;var h=e.getFoldAt(d,e.getLine(d).length,1);h?e.removeFold(h):(e.addFold("...",g),a.renderer.scrollCursorIntoView({row:g.start.row,column:0}))}b.stop()}})}b.FoldHandler=d}),define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(a,b){"use strict";var d=a("../lib/keys"),e=a("../lib/event"),f=function(a){this.$editor=a,this.$data={editor:a},this.$handlers=[],this.setDefaultHandler(a.commands)};!function(){this.setDefaultHandler=function(a){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=a,this.addKeyboardHandler(a,0)},this.setKeyboardHandler=function(a){var b=this.$handlers;if(b[b.length-1]!=a){for(;b[b.length-1]&&b[b.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(b[b.length-1]);this.addKeyboardHandler(a,1)}},this.addKeyboardHandler=function(a,b){if(a){"function"!=typeof a||a.handleKeyboard||(a.handleKeyboard=a);var c=this.$handlers.indexOf(a);-1!=c&&this.$handlers.splice(c,1),void 0==b?this.$handlers.push(a):this.$handlers.splice(b,0,a),-1==c&&a.attach&&a.attach(this.$editor)}},this.removeKeyboardHandler=function(a){var b=this.$handlers.indexOf(a);return-1==b?!1:(this.$handlers.splice(b,1),a.detach&&a.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.$callKeyboardHandlers=function(a,b,c,d){for(var f,g=!1,h=this.$editor.commands,i=this.$handlers.length;i--&&(f=this.$handlers[i].handleKeyboard(this.$data,a,b,c,d),!(f&&f.command&&(g="null"==f.command?!0:h.exec(f.command,this.$editor,f.args,d),g&&d&&-1!=a&&1!=f.passEvent&&1!=f.command.passEvent&&e.stopEvent(d),g))););return g},this.onCommandKey=function(a,b,c){var e=d.keyCodeToString(c);this.$callKeyboardHandlers(b,e,c,a)},this.onTextInput=function(a){var b=this.$callKeyboardHandlers(-1,a);b||this.$editor.commands.exec("insertstring",this.$editor,a)}}.call(f.prototype),b.KeyBinding=f}),define("ace/range",["require","exports","module"],function(a,b){"use strict";var d=function(a,b){return a.row-b.row||a.column-b.column},e=function(a,b,c,d){this.start={row:a,column:b},this.end={row:c,column:d}};!function(){this.isEqual=function(a){return this.start.row===a.start.row&&this.end.row===a.end.row&&this.start.column===a.start.column&&this.end.column===a.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(a,b){return 0==this.compare(a,b)},this.compareRange=function(a){var b,c=a.end,d=a.start;return b=this.compare(c.row,c.column),1==b?(b=this.compare(d.row,d.column),1==b?2:0==b?1:0):-1==b?-2:(b=this.compare(d.row,d.column),-1==b?-1:1==b?42:0)},this.comparePoint=function(a){return this.compare(a.row,a.column)},this.containsRange=function(a){return 0==this.comparePoint(a.start)&&0==this.comparePoint(a.end)},this.intersects=function(a){var b=this.compareRange(a);return-1==b||0==b||1==b},this.isEnd=function(a,b){return this.end.row==a&&this.end.column==b},this.isStart=function(a,b){return this.start.row==a&&this.start.column==b},this.setStart=function(a,b){"object"==typeof a?(this.start.column=a.column,this.start.row=a.row):(this.start.row=a,this.start.column=b)},this.setEnd=function(a,b){"object"==typeof a?(this.end.column=a.column,this.end.row=a.row):(this.end.row=a,this.end.column=b)},this.inside=function(a,b){return 0==this.compare(a,b)?this.isEnd(a,b)||this.isStart(a,b)?!1:!0:!1},this.insideStart=function(a,b){return 0==this.compare(a,b)?this.isEnd(a,b)?!1:!0:!1},this.insideEnd=function(a,b){return 0==this.compare(a,b)?this.isStart(a,b)?!1:!0:!1},this.compare=function(a,b){return this.isMultiLine()||a!==this.start.row?athis.end.row?1:this.start.row===a?b>=this.start.column?0:-1:this.end.row===a?b<=this.end.column?0:1:0:bthis.end.column?1:0},this.compareStart=function(a,b){return this.start.row==a&&this.start.column==b?-1:this.compare(a,b)},this.compareEnd=function(a,b){return this.end.row==a&&this.end.column==b?1:this.compare(a,b)},this.compareInside=function(a,b){return this.end.row==a&&this.end.column==b?1:this.start.row==a&&this.start.column==b?-1:this.compare(a,b)},this.clipRows=function(a,b){if(this.end.row>b)var c={row:b+1,column:0};else if(this.end.rowb)var d={row:b+1,column:0};else if(this.start.rowb.row||a.row==b.row&&a.column>b.column},this.getRange=function(){var a=this.anchor,b=this.lead;return this.isEmpty()?g.fromPoints(b,b):this.isBackwards()?g.fromPoints(b,a):g.fromPoints(a,b)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var a=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(a,this.doc.getLine(a).length)},this.setRange=this.setSelectionRange=function(a,b){b?(this.setSelectionAnchor(a.end.row,a.end.column),this.selectTo(a.start.row,a.start.column)):(this.setSelectionAnchor(a.start.row,a.start.column),this.selectTo(a.end.row,a.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(a){var b=this.lead;this.$isEmpty&&this.setSelectionAnchor(b.row,b.column),a.call(this)},this.selectTo=function(a,b){this.$moveSelection(function(){this.moveCursorTo(a,b)})},this.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})},this.moveTo=function(a,b){this.clearSelection(),this.moveCursorTo(a,b)},this.moveToPosition=function(a){this.clearSelection(),this.moveCursorToPosition(a)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(a,b){if("undefined"==typeof b){var c=a||this.lead;a=c.row,b=c.column}return this.session.getWordRange(a,b)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var a=this.getCursor(),b=this.session.getAWordRange(a.row,a.column);this.setSelectionRange(b)},this.getLineRange=function(a,b){var d,c="number"==typeof a?a:this.lead.row,e=this.session.getFoldLine(c);return e?(c=e.start.row,d=e.end.row):d=c,b===!0?new g(c,0,d,this.session.getLine(d).length):new g(c,0,d+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.moveCursorLeft=function(){var b,a=this.lead.getPosition();if(b=this.session.getFoldAt(a.row,a.column,-1))this.moveCursorTo(b.start.row,b.start.column);else if(0===a.column)a.row>0&&this.moveCursorTo(a.row-1,this.doc.getLine(a.row-1).length);else{var c=this.session.getTabSize();this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(a.column-c,a.column).split(" ").length-1==c?this.moveCursorBy(0,-c):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var b,a=this.lead.getPosition();if(b=this.session.getFoldAt(a.row,a.column,1))this.moveCursorTo(b.end.row,b.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(b.column=d)}}this.moveCursorTo(b.row,b.column)},this.moveCursorFileEnd=function(){var a=this.doc.getLength()-1,b=this.doc.getLine(a).length;this.moveCursorTo(a,b)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e,a=this.lead.row,b=this.lead.column,c=this.doc.getLine(a),d=c.substring(b);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var f=this.session.getFoldAt(a,b,1);return f?(this.moveCursorTo(f.end.row,f.end.column),void 0):((e=this.session.nonTokenRe.exec(d))&&(b+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,d=c.substring(b)),b>=c.length?(this.moveCursorTo(a,c.length),this.moveCursorRight(),a=b?(this.moveCursorTo(a,0),this.moveCursorLeft(),a>0&&this.moveCursorWordLeft(),void 0):((g=this.session.tokenRe.exec(f))&&(b-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,b),void 0)},this.$shortWordEndIndex=function(a){var b,d,c=0,e=/\s/,f=this.session.tokenRe;if(f.lastIndex=0,b=this.session.tokenRe.exec(a))c=this.session.tokenRe.lastIndex;else{for(;(d=a[c])&&e.test(d);)c++;if(1>c)for(f.lastIndex=0;(d=a[c])&&!f.test(d);)if(f.lastIndex=0,c++,e.test(d)){if(c>2){c--;break}for(;(d=a[c])&&e.test(d);)c++;if(c>2)break}}return f.lastIndex=0,c},this.moveCursorShortWordRight=function(){var a=this.lead.row,b=this.lead.column,c=this.doc.getLine(a),d=c.substring(b),e=this.session.getFoldAt(a,b,1);if(e)return this.moveCursorTo(e.end.row,e.end.column);if(b==c.length){var f=this.doc.getLength();do a++,d=this.doc.getLine(a);while(f>a&&/^\s*$/.test(d));/^\s+/.test(d)||(d=""),b=0}var g=this.$shortWordEndIndex(d);this.moveCursorTo(a,b+g)},this.moveCursorShortWordLeft=function(){var c,a=this.lead.row,b=this.lead.column;if(c=this.session.getFoldAt(a,b,-1))return this.moveCursorTo(c.start.row,c.start.column);var d=this.session.getLine(a).substring(0,b);if(0===b){do a--,d=this.doc.getLine(a);while(a>0&&/^\s*$/.test(d));b=d.length,/\s+$/.test(d)||(d="")}var f=e.stringReverse(d),g=this.$shortWordEndIndex(f);return this.moveCursorTo(a,b-g)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(a,b){var c=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===b&&(this.$desiredColumn?c.column=this.$desiredColumn:this.$desiredColumn=c.column);var d=this.session.screenToDocumentPosition(c.row+a,c.column);0!==a&&0===b&&d.row===this.lead.row&&d.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[d.row]&&d.row++,this.moveCursorTo(d.row,d.column+b,0===b)},this.moveCursorToPosition=function(a){this.moveCursorTo(a.row,a.column)},this.moveCursorTo=function(a,b,c){var d=this.session.getFoldAt(a,b,1);d&&(a=d.start.row,b=d.start.column),this.$keepDesiredColumnOnChange=!0,this.lead.setPosition(a,b),this.$keepDesiredColumnOnChange=!1,c||(this.$desiredColumn=null)},this.moveCursorToScreen=function(a,b,c){var d=this.session.screenToDocumentPosition(a,b);this.moveCursorTo(d.row,d.column,c)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(a){this.setSelectionRange(a,a.cursor==a.start),this.$desiredColumn=a.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(a){var b=this.getRange();return a?(a.start.column=b.start.column,a.start.row=b.start.row,a.end.column=b.end.column,a.end.row=b.end.row):a=b,a.cursor=this.isBackwards()?a.start:a.end,a.desiredColumn=this.$desiredColumn,a},this.getRangeOfMovements=function(a){var b=this.getCursor();try{a.call(null,this);var c=this.getCursor();return g.fromPoints(b,c)}catch(d){return g.fromPoints(b,b)}finally{this.moveCursorToPosition(b)}},this.toJSON=function(){if(this.rangeCount)var a=this.ranges.map(function(a){var b=a.clone();return b.isBackwards=a.cursor==a.start,b});else{var a=this.getRange();a.isBackwards=this.isBackwards()}return a},this.fromJSON=function(a){if(void 0==a.start){if(this.rangeList){this.toSingleRange(a[0]);for(var b=a.length;b--;){var c=g.fromPoints(a[b].start,a[b].end);a.isBackwards&&(c.cursor=c.start),this.addRange(c,!0)}return}a=a[0]}this.rangeList&&this.toSingleRange(a),this.setSelectionRange(a,a.isBackwards)},this.isEqual=function(a){if((a.length||this.rangeCount)&&a.length!=this.rangeCount)return!1;if(!a.length||!this.ranges)return this.getRange().isEqual(a);for(var b=this.ranges.length;b--;)if(!this.ranges[b].isEqual(a[b]))return!1;return!0}}.call(h.prototype),b.Selection=h}),define("ace/tokenizer",["require","exports","module"],function(a,b){"use strict";var d=1e3,e=function(a){this.states=a,this.regExps={},this.matchMappings={};for(var b in this.states){for(var c=this.states[b],d=[],e=0,f=this.matchMappings[b]={defaultToken:"text"},g="g",h=[],i=0;i1?this.$applyToken:j.token);l>1&&(/\\\d/.test(j.regex)?k=j.regex.replace(/\\([0-9]+)/g,function(a,b){return"\\"+(parseInt(b,10)+e+1)}):(l=1,k=this.removeCapturingGroups(j.regex)),j.splitRegex||"string"==typeof j.token||h.push(j)),f[e]=i,e+=l,d.push(k),j.onMatch||(j.onMatch=null)}}d.length||(f[0]=0,d.push("$")),h.forEach(function(a){a.splitRegex=this.createSplitterRegexp(a.regex,g)},this),this.regExps[b]=new RegExp("("+d.join(")|(")+")|($)",g)}};!function(){this.$setMaxTokenCount=function(a){d=0|a},this.$applyToken=function(a){var b=this.splitRegex.exec(a).slice(1),c=this.token.apply(this,b);if("string"==typeof c)return[{type:c,value:a}];for(var d=[],e=0,f=c.length;f>e;e++)b[e]&&(d[d.length]={type:c[e],value:b[e]});return d},this.$arrayTokens=function(a){if(!a)return[];var b=this.splitRegex.exec(a);if(!b)return"text";for(var c=[],d=this.tokenArray,e=0,f=d.length;f>e;e++)b[e+1]&&(c[c.length]={type:d[e],value:b[e+1]});return c},this.removeCapturingGroups=function(a){var b=a.replace(/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,function(a,b){return b?"(?:":a});return b},this.createSplitterRegexp=function(a,b){if(-1!=a.indexOf("(?=")){var c=0,d=!1,e={};a.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(a,b,f,g,h,i){return d?d="]"!=h:h?d=!0:g?(c==e.stack&&(e.end=i+1,e.stack=-1),c--):f&&(c++,1!=f.length&&(e.stack=c,e.start=i)),a}),null!=e.end&&/^\)*$/.test(a.substr(e.end))&&(a=a.substring(0,e.start)+a.substr(e.end))}return new RegExp(a,(b||"").replace("g",""))},this.getLineTokens=function(a,b){if(b&&"string"!=typeof b){var c=b.slice(0);b=c[0]}else var c=[];var e=b||"start",f=this.states[e];f||(e="start",f=this.states[e]);var g=this.matchMappings[e],h=this.regExps[e];h.lastIndex=0;for(var i,j=[],k=0,l={type:null,value:""};i=h.exec(a);){var m=g.defaultToken,n=null,o=i[0],p=h.lastIndex;if(p-o.length>k){var q=a.substring(k,p-o.length);l.type==m?l.value+=q:(l.type&&j.push(l),l={type:m,value:q})}for(var r=0;rd){for(;k1&&c[0]!==e&&c.unshift(e),{tokens:j,state:c.length?c:e}}}.call(e.prototype),b.Tokenizer=e}),define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(a,b){"use strict";var d=a("../lib/lang"),e=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};!function(){this.addRules=function(a,b){if(b)for(var c in a){for(var d=a[c],e=0;e=this.$rowTokens.length;){if(this.$row+=1,a||(a=this.$session.getLength()),this.$row>=a)return this.$row=a-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var a=this.$rowTokens,b=this.$tokenIndex,c=a[b].start;if(void 0!==c)return c;for(c=0;b>0;)b-=1,c+=a[b].value.length;return c}}.call(d.prototype),b.TokenIterator=d}),define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(a,b){"use strict";var d=a("../tokenizer").Tokenizer,e=a("./text_highlight_rules").TextHighlightRules,f=a("./behaviour").Behaviour,g=a("../unicode"),h=a("../lib/lang"),i=a("../token_iterator").TokenIterator,j=a("../range").Range,k=function(){this.HighlightRules=e,this.$behaviour=new f};!function(){this.tokenRe=new RegExp("^["+g.packages.L+g.packages.Mn+g.packages.Mc+g.packages.Nd+g.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+g.packages.L+g.packages.Mn+g.packages.Mc+g.packages.Nd+g.packages.Pc+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules,this.$tokenizer=new d(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(a,b,c,d){function u(a){for(var b=c;d>=b;b++)a(e.getLine(b),b)}var e=b.doc,f=!0,g=!0,i=1/0,j=b.getTabSize(),k=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var n=this.lineCommentStart.map(h.escapeRegExp).join("|"),l=this.lineCommentStart[0];else var n=h.escapeRegExp(this.lineCommentStart),l=this.lineCommentStart;n=new RegExp("^(\\s*)(?:"+n+") ?"),k=b.getUseSoftTabs();var q=function(a,b){var c=a.match(n);if(c){var d=c[1].length,f=c[0].length;t(a,d,f)||" "!=c[0][f-1]||f--,e.removeInLine(b,d,f)}},s=l+" ",p=function(a,b){(!f||/\S/.test(a))&&(t(a,i,i)?e.insertInLine({row:b,column:i},s):e.insertInLine({row:b,column:i},l))},r=function(a){return n.test(a)},t=function(a,b,c){for(var d=0;b--&&" "==a.charAt(b);)d++;if(0!=d%j)return!1;for(var d=0;" "==a.charAt(c++);)d++;return j>2?d%j!=j-1:0==d%j}}else{if(!this.blockComment)return!1;var l=this.blockComment.start,m=this.blockComment.end,n=new RegExp("^(\\s*)(?:"+h.escapeRegExp(l)+")"),o=new RegExp("(?:"+h.escapeRegExp(m)+")\\s*$"),p=function(a,b){r(a,b)||(!f||/\S/.test(a))&&(e.insertInLine({row:b,column:a.length},m),e.insertInLine({row:b,column:i},l))},q=function(a,b){var c;(c=a.match(o))&&e.removeInLine(b,a.length-c[0].length,a.length),(c=a.match(n))&&e.removeInLine(b,c[1].length,c[0].length)},r=function(a,c){if(n.test(a))return!0;for(var d=b.getTokens(c),e=0;ec&&(i=c),g&&!r(a,b)&&(g=!1)):v>a.length&&(v=a.length)}),1/0==i&&(i=v,f=!1,g=!1),k&&0!=i%j&&(i=Math.floor(i/j)*j),u(g?q:p)},this.toggleBlockComment=function(a,b,c,d){var e=this.blockComment;if(e){!e.start&&e[0]&&(e=e[0]);var f=new i(b,d.row,d.column),g=f.getCurrentToken();b.selection;var l,m,k=b.selection.toOrientedRange();if(g&&/comment/.test(g.type)){for(var n,o;g&&/comment/.test(g.type);){var p=g.value.indexOf(e.start);if(-1!=p){var q=f.getCurrentTokenRow(),r=f.getCurrentTokenColumn()+p;n=new j(q,r,q,r+e.start.length);break}g=f.stepBackward()}for(var f=new i(b,d.row,d.column),g=f.getCurrentToken();g&&/comment/.test(g.type);){var p=g.value.indexOf(e.end);if(-1!=p){var q=f.getCurrentTokenRow(),r=f.getCurrentTokenColumn()+p;o=new j(q,r,q,r+e.end.length);break}g=f.stepForward()}o&&b.remove(o),n&&(b.remove(n),l=n.start.row,m=-e.start.length)}else m=e.start.length,l=c.start.row,b.insert(c.end,e.end),b.insert(c.start,e.start);k.start.row==l&&(k.start.column+=m),k.end.row==l&&(k.end.column+=m),b.selection.fromOrientedRange(k)}},this.getNextLineIndent=function(a,b){return this.$getIndent(b)},this.checkOutdent=function(){return!1},this.autoOutdent=function(){},this.$getIndent=function(a){return a.match(/^\s*/)[0]},this.createWorker=function(){return null},this.createModeDelegates=function(a){this.$embeds=[],this.$modes={};for(var b in a)a[b]&&(this.$embeds.push(b),this.$modes[b]=new a[b]);for(var c=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],b=0;bf;f++)if("string"==typeof e[f].token)/keyword|support|storage/.test(e[f].token)&&c.push(e[f].regex);else if("object"==typeof e[f].token)for(var h=0,i=e[f].token.length;i>h;h++)if(/keyword|support|storage/.test(e[f].token[h])){var d=e[f].regex.match(/\(.+?\)/g)[h];c.push(d.substr(1,d.length-2))}this.completionKeywords=c}return a?c.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(){var e=this.$keywordList||this.$createKeywordList();return e.map(function(a){return{name:a,value:a,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}.call(k.prototype),b.Mode=k}),define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b){"use strict";var d=a("./lib/oop"),e=a("./lib/event_emitter").EventEmitter,f=b.Anchor=function(a,b,c){this.$onChange=this.onChange.bind(this),this.attach(a),"undefined"==typeof c?this.setPosition(b.row,b.column):this.setPosition(b,c)};!function(){d.implement(this,e),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(a){var b=a.data,c=b.range;if(!(c.start.row==c.end.row&&c.start.row!=this.row||c.start.row>this.row||c.start.row==this.row&&c.start.column>this.column)){var d=this.row,e=this.column,f=c.start,g=c.end;"insertText"===b.action?f.row===d&&f.column<=e?f.column===e&&this.$insertRight||(f.row===g.row?e+=g.column-f.column:(e-=f.column,d+=g.row-f.row)):f.row!==g.row&&f.row=e?f.column:Math.max(0,e-(g.column-f.column)):f.row!==g.row&&f.row=this.document.getLength()?(c.row=Math.max(0,this.document.getLength()-1),c.column=this.document.getLine(c.row).length):0>a?(c.row=0,c.column=0):(c.row=a,c.column=Math.min(this.document.getLine(c.row).length,Math.max(0,b))),0>b&&(c.column=0),c}}.call(f.prototype)}),define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(a,b){"use strict";var d=a("./lib/oop"),e=a("./lib/event_emitter").EventEmitter,f=a("./range").Range,g=a("./anchor").Anchor,h=function(a){this.$lines=[],0===a.length?this.$lines=[""]:Array.isArray(a)?this._insertLines(0,a):this.insert({row:0,column:0},a)};!function(){d.implement(this,e),this.setValue=function(a){var b=this.getLength();this.remove(new f(0,0,b,this.getLine(b-1).length)),this.insert({row:0,column:0},a)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(a,b){return new g(this,a,b)},this.$split=0==="aaa".split(/a/).length?function(a){return a.replace(/\r\n|\r/g,"\n").split("\n")}:function(a){return a.split(/\r\n|\r|\n/)},this.$detectNewLine=function(a){var b=a.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=b?b[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(a){this.$newLineMode!==a&&(this.$newLineMode=a,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(a){return"\r\n"==a||"\r"==a||"\n"==a},this.getLine=function(a){return this.$lines[a]||""},this.getLines=function(a,b){return this.$lines.slice(a,b+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(a){if(a.start.row==a.end.row)return this.getLine(a.start.row).substring(a.start.column,a.end.column);var b=this.getLines(a.start.row,a.end.row);b[0]=(b[0]||"").substring(a.start.column);var c=b.length-1;return a.end.row-a.start.row==c&&(b[c]=b[c].substring(0,a.end.column)),b.join(this.getNewLineCharacter())},this.$clipPosition=function(a){var b=this.getLength();return a.row>=b?(a.row=Math.max(0,b-1),a.column=this.getLine(b-1).length):a.row<0&&(a.row=0),a},this.insert=function(a,b){if(!b||0===b.length)return a;a=this.$clipPosition(a),this.getLength()<=1&&this.$detectNewLine(b);var c=this.$split(b),d=c.splice(0,1)[0],e=0==c.length?null:c.splice(c.length-1,1)[0];return a=this.insertInLine(a,d),null!==e&&(a=this.insertNewLine(a),a=this._insertLines(a.row,c),a=this.insertInLine(a,e||"")),a},this.insertLines=function(a,b){return a>=this.getLength()?this.insert({row:a,column:0},"\n"+b.join("\n")):this._insertLines(Math.max(a,0),b)},this._insertLines=function(a,b){if(0==b.length)return{row:a,column:0};for(;b.length>61440;){var c=this._insertLines(a,b.slice(0,61440));b=b.slice(61440),a=c.row}var d=[a,0];d.push.apply(d,b),this.$lines.splice.apply(this.$lines,d);var e=new f(a,0,a+b.length,0),g={action:"insertLines",range:e,lines:b};return this._signal("change",{data:g}),e.end},this.insertNewLine=function(a){a=this.$clipPosition(a);var b=this.$lines[a.row]||"";this.$lines[a.row]=b.substring(0,a.column),this.$lines.splice(a.row+1,0,b.substring(a.column,b.length));var c={row:a.row+1,column:0},d={action:"insertText",range:f.fromPoints(a,c),text:this.getNewLineCharacter()};return this._signal("change",{data:d}),c},this.insertInLine=function(a,b){if(0==b.length)return a;var c=this.$lines[a.row]||"";this.$lines[a.row]=c.substring(0,a.column)+b+c.substring(a.column);var d={row:a.row,column:a.column+b.length},e={action:"insertText",range:f.fromPoints(a,d),text:b};return this._signal("change",{data:e}),d},this.remove=function(a){if(a instanceof f||(a=f.fromPoints(a.start,a.end)),a.start=this.$clipPosition(a.start),a.end=this.$clipPosition(a.end),a.isEmpty())return a.start;var b=a.start.row,c=a.end.row;if(a.isMultiLine()){var d=0==a.start.column?b:b+1,e=c-1;a.end.column>0&&this.removeInLine(c,0,a.end.column),e>=d&&this._removeLines(d,e),d!=b&&(this.removeInLine(b,a.start.column,this.getLine(b).length),this.removeNewLine(a.start.row))}else this.removeInLine(b,a.start.column,a.end.column);return a.start},this.removeInLine=function(a,b,c){if(b!=c){var d=new f(a,b,a,c),e=this.getLine(a),g=e.substring(b,c),h=e.substring(0,b)+e.substring(c,e.length);this.$lines.splice(a,1,h);var i={action:"removeText",range:d,text:g};return this._signal("change",{data:i}),d.start}},this.removeLines=function(a,b){return 0>a||b>=this.getLength()?this.remove(new f(a,0,b+1,0)):this._removeLines(a,b)},this._removeLines=function(a,b){var c=new f(a,0,b+1,0),d=this.$lines.splice(a,b-a+1),e={action:"removeLines",range:c,nl:this.getNewLineCharacter(),lines:d};return this._signal("change",{data:e}),d},this.removeNewLine=function(a){var b=this.getLine(a),c=this.getLine(a+1),d=new f(a,b.length,a+1,0),e=b+c;this.$lines.splice(a,2,e);var g={action:"removeText",range:d,text:this.getNewLineCharacter()};this._signal("change",{data:g})},this.replace=function(a,b){if(a instanceof f||(a=f.fromPoints(a.start,a.end)),0==b.length&&a.isEmpty())return a.start;if(b==this.getTextRange(a))return a.end;if(this.remove(a),b)var c=this.insert(a.start,b);else c=a.start;return c},this.applyDeltas=function(a){for(var b=0;b=0;b--){var c=a[b],d=f.fromPoints(c.range.start,c.range.end);"insertLines"==c.action?this._removeLines(d.start.row,d.end.row-1):"insertText"==c.action?this.remove(d):"removeLines"==c.action?this._insertLines(d.start.row,c.lines):"removeText"==c.action&&this.insert(d.start,c.text)}},this.indexToPosition=function(a,b){for(var c=this.$lines||this.getAllLines(),d=this.getNewLineCharacter().length,e=b||0,f=c.length;f>e;e++)if(a-=c[e].length+d,0>a)return{row:e,column:a+c[e].length+d};return{row:f-1,column:c[f-1].length}},this.positionToIndex=function(a,b){for(var c=this.$lines||this.getAllLines(),d=this.getNewLineCharacter().length,e=0,f=Math.min(a.row,c.length),g=b||0;f>g;++g)e+=c[g].length+d;return e+a.column}}.call(h.prototype),b.Document=h}),define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b){"use strict";var d=a("./lib/oop"),e=a("./lib/event_emitter").EventEmitter,f=function(a){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=a;var c=this;this.$worker=function(){if(c.running){for(var a=new Date,b=c.currentLine,d=-1,e=c.doc;c.lines[b];)b++;var f=b,g=e.getLength(),h=0;for(c.running=!1;g>b;){c.$tokenizeRow(b),d=b;do b++;while(c.lines[b]);if(h++,0===h%5&&new Date-a>20){c.running=setTimeout(c.$worker,20);break}}c.currentLine=b,d>=f&&c.fireUpdateEvent(f,d)}}};!function(){d.implement(this,e),this.setTokenizer=function(a){this.tokenizer=a,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(a){this.doc=a,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(a,b){var c={first:a,last:b};this._signal("update",{data:c})},this.start=function(a){this.currentLine=Math.min(a||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(a){var b=a.range,c=b.start.row,d=b.end.row-c;if(0===d)this.lines[c]=null;else if("removeText"==a.action||"removeLines"==a.action)this.lines.splice(c,d+1,null),this.states.splice(c,d+1,null);else{var e=Array(d+1);e.unshift(c,1),this.lines.splice.apply(this.lines,e),this.states.splice.apply(this.states,e)}this.currentLine=Math.min(c,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(a){return this.lines[a]||this.$tokenizeRow(a)},this.getState=function(a){return this.currentLine==a&&this.$tokenizeRow(a),this.states[a]||"start"},this.$tokenizeRow=function(a){var b=this.doc.getLine(a),c=this.states[a-1],d=this.tokenizer.getLineTokens(b,c,a);return this.states[a]+""!=d.state+""?(this.states[a]=d.state,this.lines[a+1]=null,this.currentLine>a+1&&(this.currentLine=a+1)):this.currentLine==a&&(this.currentLine=a+1),this.lines[a]=d.tokens}}.call(f.prototype),b.BackgroundTokenizer=f}),define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(a,b){"use strict";var d=a("./lib/lang");a("./lib/oop");var f=a("./range").Range,g=function(a,b,c){this.setRegexp(a),this.clazz=b,this.type=c||"text"};!function(){this.MAX_RANGES=500,this.setRegexp=function(a){this.regExp+""!=a+""&&(this.regExp=a,this.cache=[])},this.update=function(a,b,c,e){if(this.regExp)for(var g=e.firstRow,h=e.lastRow,i=g;h>=i;i++){var j=this.cache[i];null==j&&(j=d.getMatchOffsets(c.getLine(i),this.regExp),j.length>this.MAX_RANGES&&(j=j.slice(0,this.MAX_RANGES)),j=j.map(function(a){return new f(i,a.offset,i,a.offset+a.length)}),this.cache[i]=j.length?j:"");for(var k=j.length;k--;)b.drawSingleLineMarker(a,j[k].toScreenRange(c),this.clazz,e)}}}.call(g.prototype),b.SearchHighlight=g}),define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(a,b){"use strict";function e(a,b){this.foldData=a,Array.isArray(b)?this.folds=b:b=this.folds=[b];var c=b[b.length-1];this.range=new d(b[0].start.row,b[0].start.column,c.end.row,c.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(a){a.setFoldLine(this)},this)}var d=a("../range").Range;!function(){this.shiftRow=function(a){this.start.row+=a,this.end.row+=a,this.folds.forEach(function(b){b.start.row+=a,b.end.row+=a})},this.addFold=function(a){if(a.sameRow){if(a.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(a),this.folds.sort(function(a,b){return-a.range.compareEnd(b.start.row,b.start.column)}),this.range.compareEnd(a.start.row,a.start.column)>0?(this.end.row=a.end.row,this.end.column=a.end.column):this.range.compareStart(a.end.row,a.end.column)<0&&(this.start.row=a.start.row,this.start.column=a.start.column)}else if(a.start.row==this.end.row)this.folds.push(a),this.end.row=a.end.row,this.end.column=a.end.column;else{if(a.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(a),this.start.row=a.start.row,this.start.column=a.start.column}a.foldLine=this},this.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},this.walk=function(a,b,c){var f,g,h,d=0,e=this.folds,i=!0;null==b&&(b=this.end.row,c=this.end.column);for(var j=0;ja)return{row:d.start.row,column:d.start.column+a};if(a-=d.placeholder.length,0>a)return d.start;b=d.end.column}return{row:this.end.row,column:this.end.column+a}}}.call(e.prototype),b.FoldLine=e}),define("ace/range_list",["require","exports","module","ace/range"],function(a,b){"use strict";var d=a("./range").Range,e=d.comparePoints,f=function(){this.ranges=[]};!function(){this.comparePoints=e,this.pointIndex=function(a,b,c){for(var d=this.ranges,f=c||0;f0)){var i=e(a,g.start);return 0===h?b&&0!==i?-f-2:f:i>0||0===i&&!b?f:-f-1}}return-f-1},this.add=function(a){var b=!a.isEmpty(),c=this.pointIndex(a.start,b);0>c&&(c=-c-1);var d=this.pointIndex(a.end,b,c);return 0>d?d=-d-1:d++,this.ranges.splice(c,d-c,a)},this.addList=function(a){for(var b=[],c=a.length;c--;)b.push.call(b,this.add(a[c]));return b},this.substractPoint=function(a){var b=this.pointIndex(a);return b>=0?this.ranges.splice(b,1):void 0},this.merge=function(){var a=[],b=this.ranges;b=b.sort(function(a,b){return e(a.start,b.start)});for(var d,c=b[0],f=1;fg||(0!=g||d.isEmpty()||c.isEmpty())&&(e(d.end,c.end)<0&&(d.end.row=c.end.row,d.end.column=c.end.column),b.splice(f,1),a.push(c),c=d,f--)}return this.ranges=b,a},this.contains=function(a,b){return this.pointIndex({row:a,column:b})>=0},this.containsPoint=function(a){return this.pointIndex(a)>=0},this.rangeAtPoint=function(a){var b=this.pointIndex(a);return b>=0?this.ranges[b]:void 0},this.clipRows=function(a,b){var c=this.ranges;if(c[0].start.row>b||c[c.length-1].start.rowd&&(d=-d-1);var e=this.pointIndex({row:b,column:0},d);0>e&&(e=-e-1);for(var f=[],g=d;e>g;g++)f.push(c[g]);return f},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(a){this.session&&this.detach(),this.session=a,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},this.$onChange=function(a){var b=a.data.range;if("i"==a.data.action[0])var c=b.start,d=b.end;else var d=b.start,c=b.end;for(var e=c.row,f=d.row,g=f-e,h=-c.column+d.column,i=this.ranges,j=0,k=i.length;k>j;j++){var l=i[j];if(!(l.end.rowe)break;if(l.start.row==e&&l.start.column>=c.column&&(l.start.column==c.column&&this.$insertRight||(l.start.column+=h,l.start.row+=g)),l.end.row==e&&l.end.column>=c.column){if(l.end.column==c.column&&this.$insertRight)continue;l.end.column==c.column&&h>0&&k-1>j&&l.end.column>l.start.column&&l.end.column==i[j+1].start.column&&(l.end.column-=h),l.end.column+=h,l.end.row+=g}}}if(0!=g&&k>j)for(;k>j;j++){var l=i[j];l.start.row+=g,l.end.row+=g}}}.call(f.prototype),b.RangeList=f}),define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"],function(a,b){"use strict";function h(a,b){a.row-=b.row,0==a.row&&(a.column-=b.column)}function i(a,b){h(a.start,b),h(a.end,b)}function j(a,b){0==a.row&&(a.column+=b.column),a.row+=b.row}function k(a,b){j(a.start,b),j(a.end,b)}a("../range").Range;var e=a("../range_list").RangeList,f=a("../lib/oop"),g=b.Fold=function(a,b){this.foldLine=null,this.placeholder=b,this.range=a,this.start=a.start,this.end=a.end,this.sameRow=a.start.row==a.end.row,this.subFolds=this.ranges=[]};f.inherits(g,e),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(a){this.foldLine=a,this.subFolds.forEach(function(b){b.setFoldLine(a)})},this.clone=function(){var a=this.range.clone(),b=new g(a,this.placeholder);return this.subFolds.forEach(function(a){b.subFolds.push(a.clone())}),b.collapseChildren=this.collapseChildren,b},this.addSubFold=function(a){if(!this.range.isEqual(a)){if(!this.range.containsRange(a))throw new Error("A fold can't intersect already existing fold"+a.range+this.range);i(a,this.start);for(var b=a.start.row,c=a.start.column,d=0,e=-1;d=a)return e;if(e.end.row>a)return null}return null},this.getNextFoldLine=function(a,b){var c=this.$foldData,d=0;for(b&&(d=c.indexOf(b)),-1==d&&(d=0),d;d=a)return e}return null},this.getFoldedRowCount=function(a,b){for(var c=this.$foldData,d=b-a+1,e=0;e=b){b>h&&(h>=a?d-=b-h:d=0);break}g>=a&&(d-=h>=a?g-h:g-a+1)}return d},this.$addFoldLine=function(a){return this.$foldData.push(a),this.$foldData.sort(function(a,b){return a.start.row-b.start.row}),a},this.addFold=function(a,b){var g,c=this.$foldData,d=!1;a instanceof f?g=a:(g=new f(b,a),g.collapseChildren=b.collapseChildren),this.$clipRangeToDocument(g.range);var h=g.start.row,i=g.start.column,j=g.end.row,k=g.end.column;if(!(j>h||h==j&&k-2>=i))throw new Error("The range has to be at least 2 characters width");var l=this.getFoldAt(h,i,1),m=this.getFoldAt(j,k,-1);if(l&&m==l)return l.addSubFold(g);if(l&&!l.range.isStart(h,i)||m&&!m.range.isEnd(j,k))throw new Error("A fold can't intersect already existing fold"+g.range+l.range);var n=this.getFoldsInRange(g.range);n.length>0&&(this.removeFolds(n),n.forEach(function(a){g.addSubFold(a)}));for(var o=0;o0&&this.foldAll(a.start.row+1,a.end.row,a.collapseChildren-1),a.subFolds=[]},this.expandFolds=function(a){a.forEach(function(a){this.expandFold(a)},this)},this.unfold=function(a,b){var c,e;if(null==a?(c=new d(0,0,this.getLength(),0),b=!0):c="number"==typeof a?new d(a,0,a,this.getLine(a).length):"row"in a?d.fromPoints(a,a):a,e=this.getFoldsInRangeList(c),b)this.removeFolds(e);else for(var f=e;f.length;)this.expandFolds(f),f=this.getFoldsInRangeList(c);return e.length?e:void 0},this.isRowFolded=function(a,b){return!!this.getFoldLine(a,b)},this.getRowFoldEnd=function(a,b){var c=this.getFoldLine(a,b);return c?c.end.row:a},this.getRowFoldStart=function(a,b){var c=this.getFoldLine(a,b);return c?c.start.row:a},this.getFoldDisplayLine=function(a,b,c,d,e){null==d&&(d=a.start.row),null==e&&(e=0),null==b&&(b=a.end.row),null==c&&(c=this.getLine(b).length);var f=this.doc,g="";return a.walk(function(a,b,c,h){if(!(d>b)){if(b==d){if(e>c)return;h=Math.max(e,h)}g+=null!=a?a:f.getLine(b).substring(h,c)}},b,c),g},this.getDisplayLine=function(a,b,c,d){var e=this.getFoldLine(a);if(e)return this.getFoldDisplayLine(e,a,b,c,d);var f;return f=this.doc.getLine(a),f.substring(d||0,b||f.length)},this.$cloneFoldData=function(){var a=[];return a=this.$foldData.map(function(b){var c=b.folds.map(function(a){return a.clone()});return new e(a,c)})},this.toggleFold=function(a){var d,e,b=this.selection,c=b.getRange();if(c.isEmpty()){var f=c.start;if(d=this.getFoldAt(f.row,f.column))return this.expandFold(d),void 0;(e=this.findMatchingBracket(f))?1==c.comparePoint(e)?c.end=e:(c.start=e,c.start.column++,c.end.column--):(e=this.findMatchingBracket({row:f.row,column:f.column+1}))?(1==c.comparePoint(e)?c.end=e:c.start=e,c.start.column++):c=this.getCommentFoldRange(f.row,f.column)||c}else{var g=this.getFoldsInRange(c);if(a&&g.length)return this.expandFolds(g),void 0;1==g.length&&(d=g[0])}if(d||(d=this.getFoldAt(c.start.row,c.start.column)),d&&d.range.toString()==c.toString())return this.expandFold(d),void 0; var h="...";if(!c.isMultiLine()){if(h=this.getTextRange(c),h.length<4)return;h=h.trim().substring(0,2)+".."}this.addFold(h,c)},this.getCommentFoldRange=function(a,b,c){var e=new g(this,a,b),f=e.getCurrentToken();if(f&&/^comment|string/.test(f.type)){var h=new d,i=new RegExp(f.type.replace(/\..*/,"\\."));if(1!=c){do f=e.stepBackward();while(f&&i.test(f.type));e.stepForward()}if(h.start.row=e.getCurrentTokenRow(),h.start.column=e.getCurrentTokenColumn()+2,e=new g(this,a,b),-1!=c){do f=e.stepForward();while(f&&i.test(f.type));f=e.stepBackward()}else f=e.getCurrentToken();return h.end.row=e.getCurrentTokenRow(),h.end.column=e.getCurrentTokenColumn()+f.value.length-2,h}},this.foldAll=function(a,b,c){void 0==c&&(c=1e5);var d=this.foldWidgets;if(d){b=b||this.getLength(),a=a||0;for(var e=a;b>e;e++)if(null==d[e]&&(d[e]=this.getFoldWidget(e)),"start"==d[e]){var f=this.getFoldWidgetRange(e);if(f&&f.isMultiLine()&&f.end.row<=b&&f.start.row>=a){e=f.end.row;try{var g=this.addFold("...",f);g&&(g.collapseChildren=c)}catch(h){}}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(a){if(!this.$foldStyles[a])throw new Error("invalid fold style: "+a+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=a){this.$foldStyle=a,"manual"==a&&this.unfold();var b=this.$foldMode;this.$setFolding(null),this.$setFolding(b)}},this.$setFolding=function(a){if(this.$foldMode!=a){if(this.$foldMode=a,this.removeListener("change",this.$updateFoldWidgets),this._emit("changeAnnotation"),!a||"manual"==this.$foldStyle)return this.foldWidgets=null,void 0;this.foldWidgets=[],this.getFoldWidget=a.getFoldWidget.bind(a,this,this.$foldStyle),this.getFoldWidgetRange=a.getFoldWidgetRange.bind(a,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets)}},this.getParentFoldRangeData=function(a,b){var c=this.foldWidgets;if(!c||b&&c[a])return{};for(var e,d=a-1;d>=0;){var f=c[d];if(null==f&&(f=c[d]=this.getFoldWidget(d)),"start"==f){var g=this.getFoldWidgetRange(d);if(e||(e=g),g&&g.end.row>=a)break}d--}return{range:-1!==d&&g,firstRange:e}},this.onFoldWidgetClick=function(a,b){b=b.domEvent;var c={children:b.shiftKey,all:b.ctrlKey||b.metaKey,siblings:b.altKey},d=this.$toggleFoldWidget(a,c);if(!d){var e=b.target||b.srcElement;e&&/ace_fold-widget/.test(e.className)&&(e.className+=" ace_invalid")}},this.$toggleFoldWidget=function(a,b){if(this.getFoldWidget){var c=this.getFoldWidget(a),d=this.getLine(a),e="end"===c?-1:1,f=this.getFoldAt(a,-1===e?0:d.length,e);if(f)return b.children||b.all?this.removeFold(f):this.expandFold(f),void 0;var g=this.getFoldWidgetRange(a,!0);if(g&&!g.isMultiLine()&&(f=this.getFoldAt(g.start.row,g.start.column,1),f&&g.isEqual(f.range)))return this.removeFold(f),void 0;if(b.siblings){var h=this.getParentFoldRangeData(a);if(h.range)var i=h.range.start.row+1,j=h.range.end.row;this.foldAll(i,j,b.all?1e4:0)}else b.children?(j=g?g.end.row:this.getLength(),this.foldAll(a+1,g.end.row,b.all?1e4:0)):g&&(b.all&&(g.collapseChildren=1e4),this.addFold("...",g));return g}},this.toggleFoldWidget=function(){var b=this.selection.getCursor().row;b=this.getRowFoldStart(b);var c=this.$toggleFoldWidget(b,{});if(!c){var d=this.getParentFoldRangeData(b,!0);if(c=d.range||d.firstRange){b=c.start.row;var e=this.getFoldAt(b,this.getLine(b).length,1);e?this.removeFold(e):this.addFold("...",c)}}},this.updateFoldWidgets=function(a){var b=a.data,c=b.range,d=c.start.row,e=c.end.row-d;if(0===e)this.foldWidgets[d]=null;else if("removeText"==b.action||"removeLines"==b.action)this.foldWidgets.splice(d,e+1,null);else{var f=Array(e+1);f.unshift(d,1),this.foldWidgets.splice.apply(this.foldWidgets,f)}}}var d=a("../range").Range,e=a("./fold_line").FoldLine,f=a("./fold").Fold,g=a("../token_iterator").TokenIterator;b.Folding=h}),define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(a,b){"use strict";function f(){this.findMatchingBracket=function(a,b){if(0==a.column)return null;var c=b||this.getLine(a.row).charAt(a.column-1);if(""==c)return null;var d=c.match(/([\(\[\{])|([\)\]\}])/);return d?d[1]?this.$findClosingBracket(d[1],a):this.$findOpeningBracket(d[2],a):null},this.getBracketRange=function(a){var d,b=this.getLine(a.row),c=!0,f=b.charAt(a.column-1),g=f&&f.match(/([\(\[\{])|([\)\]\}])/);if(g||(f=b.charAt(a.column),a={row:a.row,column:a.column+1},g=f&&f.match(/([\(\[\{])|([\)\]\}])/),c=!1),!g)return null;if(g[1]){var h=this.$findClosingBracket(g[1],a);if(!h)return null;d=e.fromPoints(a,h),c||(d.end.column++,d.start.column--),d.cursor=d.end}else{var h=this.$findOpeningBracket(g[2],a);if(!h)return null;d=e.fromPoints(h,a),c||(d.start.column++,d.end.column--),d.cursor=d.start}return d},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(a,b,c){var e=this.$brackets[a],f=1,g=new d(this,b.row,b.column),h=g.getCurrentToken();if(h||(h=g.stepForward()),h){c||(c=new RegExp("(\\.?"+h.type.replace(".","\\.").replace("rparen",".paren")+")+"));for(var i=b.column-g.getCurrentTokenColumn()-2,j=h.value;;){for(;i>=0;){var k=j.charAt(i);if(k==e){if(f-=1,0==f)return{row:g.getCurrentTokenRow(),column:i+g.getCurrentTokenColumn()}}else k==a&&(f+=1);i-=1}do h=g.stepBackward();while(h&&!c.test(h.type));if(null==h)break;j=h.value,i=j.length-1}return null}},this.$findClosingBracket=function(a,b,c){var e=this.$brackets[a],f=1,g=new d(this,b.row,b.column),h=g.getCurrentToken();if(h||(h=g.stepForward()),h){c||(c=new RegExp("(\\.?"+h.type.replace(".","\\.").replace("lparen",".paren")+")+"));for(var i=b.column-g.getCurrentTokenColumn();;){for(var j=h.value,k=j.length;k>i;){var l=j.charAt(i);if(l==e){if(f-=1,0==f)return{row:g.getCurrentTokenRow(),column:i+g.getCurrentTokenColumn()}}else l==a&&(f+=1);i+=1}do h=g.stepForward();while(h&&!c.test(h.type));if(null==h)break;i=0}return null}}}var d=a("../token_iterator").TokenIterator,e=a("../range").Range;b.BracketMatch=f}),define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(a,b){"use strict";var d=a("./lib/oop"),e=a("./lib/lang"),f=a("./config"),g=a("./lib/event_emitter").EventEmitter,h=a("./selection").Selection,i=a("./mode/text").Mode,j=a("./range").Range,k=a("./document").Document,l=a("./background_tokenizer").BackgroundTokenizer,m=a("./search_highlight").SearchHighlight,n=function(a,b){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.$foldData.toString=function(){return this.join("\n")},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof a&&a.getLine||(a=new k(a)),this.setDocument(a),this.selection=new h(this),f.resetOptions(this),this.setMode(b),f._signal("session",this)};!function(){function q(a){return 4352>a?!1:a>=4352&&4447>=a||a>=4515&&4519>=a||a>=4602&&4607>=a||a>=9001&&9002>=a||a>=11904&&11929>=a||a>=11931&&12019>=a||a>=12032&&12245>=a||a>=12272&&12283>=a||a>=12288&&12350>=a||a>=12353&&12438>=a||a>=12441&&12543>=a||a>=12549&&12589>=a||a>=12593&&12686>=a||a>=12688&&12730>=a||a>=12736&&12771>=a||a>=12784&&12830>=a||a>=12832&&12871>=a||a>=12880&&13054>=a||a>=13056&&19903>=a||a>=19968&&42124>=a||a>=42128&&42182>=a||a>=43360&&43388>=a||a>=44032&&55203>=a||a>=55216&&55238>=a||a>=55243&&55291>=a||a>=63744&&64255>=a||a>=65040&&65049>=a||a>=65072&&65106>=a||a>=65108&&65126>=a||a>=65128&&65131>=a||a>=65281&&65376>=a||a>=65504&&65510>=a}d.implement(this,g),this.setDocument=function(a){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=a,a.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(a){if(!a)return this.$docRowCache=[],this.$screenRowCache=[],void 0;var b=this.$docRowCache.length,c=this.$getRowCacheIndex(this.$docRowCache,a)+1;b>c&&(this.$docRowCache.splice(c,b),this.$screenRowCache.splice(c,b))},this.$getRowCacheIndex=function(a,b){for(var c=0,d=a.length-1;d>=c;){var e=c+d>>1,f=a[e];if(b>f)c=e+1;else{if(!(f>b))return e;d=e-1}}return c-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(a){var b=a.data;this.$resetRowCache(b.start.row)},this.onChange=function(a){var b=a.data;this.$modified=!0,this.$resetRowCache(b.range.start.row);var c=this.$updateInternalDataOnChange(a);this.$fromUndo||!this.$undoManager||b.ignore||(this.$deltasDoc.push(b),c&&0!=c.length&&this.$deltasFold.push({action:"removeFolds",folds:c}),this.$informUndoManager.schedule()),this.bgTokenizer&&this.bgTokenizer.$updateOnChange(b),this._signal("change",a)},this.setValue=function(a){this.doc.setValue(a),this.selection.moveTo(0,0),this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(a){return this.bgTokenizer.getState(a)},this.getTokens=function(a){return this.bgTokenizer.getTokens(a)},this.getTokenAt=function(a,b){var d,c=this.bgTokenizer.getTokens(a),e=0;if(null==b)f=c.length-1,e=this.getLine(a).length;else for(var f=0;f=b));f++);return(d=c[f])?(d.index=f,d.start=e-d.value.length,d):null},this.setUndoManager=function(a){if(this.$undoManager=a,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel(),a){var b=this;this.$syncInformUndoManager=function(){b.$informUndoManager.cancel(),b.$deltasFold.length&&(b.$deltas.push({group:"fold",deltas:b.$deltasFold}),b.$deltasFold=[]),b.$deltasDoc.length&&(b.$deltas.push({group:"doc",deltas:b.$deltasDoc}),b.$deltasDoc=[]),b.$deltas.length>0&&a.execute({action:"aceupdate",args:[b.$deltas,b],merge:b.mergeUndoDeltas}),b.mergeUndoDeltas=!1,b.$deltas=[]},this.$informUndoManager=e.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?e.stringRepeat(" ",this.getTabSize()):" "},this.setUseSoftTabs=function(a){this.setOption("useSoftTabs",a)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(a){this.setOption("tabSize",a)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(a){return this.$useSoftTabs&&0===a.column%this.$tabSize},this.$overwrite=!1,this.setOverwrite=function(a){this.setOption("overwrite",a)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(a,b){this.$decorations[a]||(this.$decorations[a]=""),this.$decorations[a]+=" "+b,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(a,b){this.$decorations[a]=(this.$decorations[a]||"").replace(" "+b,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(a){this.$breakpoints=[];for(var b=0;b0&&(d=!!c.charAt(b-1).match(this.tokenRe)),d||(d=!!c.charAt(b).match(this.tokenRe)),d)var e=this.tokenRe;else if(/^\s+$/.test(c.slice(b-1,b+1)))var e=/\s/;else var e=this.nonTokenRe;var f=b;if(f>0){do f--;while(f>=0&&c.charAt(f).match(e));f++}for(var g=b;ga&&(a=b.screenWidth)}),this.lineWidgetWidth=a},this.$computeWidth=function(a){if(this.$modified||a){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var b=this.doc.getAllLines(),c=this.$rowLengthCache,d=0,e=0,f=this.$foldData[e],g=f?f.start.row:1/0,h=b.length,i=0;h>i;i++){if(i>g){if(i=f.end.row+1,i>=h)break;f=this.$foldData[e++],g=f?f.start.row:1/0}null==c[i]&&(c[i]=this.$getStringScreenWidth(b[i])[0]),c[i]>d&&(d=c[i])}this.screenWidth=d}},this.getLine=function(a){return this.doc.getLine(a)},this.getLines=function(a,b){return this.doc.getLines(a,b)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(a){return this.doc.getTextRange(a||this.selection.getRange())},this.insert=function(a,b){return this.doc.insert(a,b)},this.remove=function(a){return this.doc.remove(a)},this.undoChanges=function(a,b){if(a.length){this.$fromUndo=!0;for(var c=null,d=a.length-1;-1!=d;d--){var e=a[d];"doc"==e.group?(this.doc.revertDeltas(e.deltas),c=this.$getUndoSelection(e.deltas,!0,c)):e.deltas.forEach(function(a){this.addFolds(a.folds)},this)}return this.$fromUndo=!1,c&&this.$undoSelect&&!b&&this.selection.setSelectionRange(c),c}},this.redoChanges=function(a,b){if(a.length){this.$fromUndo=!0;for(var c=null,d=0;da.end.column&&(f.start.column+=h),f.end.row==a.end.row&&f.end.column>a.end.column&&(f.end.column+=h)),g&&f.start.row>=a.end.row&&(f.start.row+=g,f.end.row+=g)}if(f.end=this.insert(f.start,d),e.length){var i=a.start,k=f.start,g=k.row-i.row,h=k.column-i.column;this.addFolds(e.map(function(a){return a=a.clone(),a.start.row==i.row&&(a.start.column+=h),a.end.row==i.row&&(a.end.column+=h),a.start.row+=g,a.end.row+=g,a}))}return f},this.indentRows=function(a,b,c){c=c.replace(/\t/g,this.getTabString());for(var d=a;b>=d;d++)this.insert({row:d,column:0},c)},this.outdentRows=function(a){for(var b=a.collapseRows(),c=new j(0,0,0,0),d=this.getTabSize(),e=b.start.row;e<=b.end.row;++e){var f=this.getLine(e);c.start.row=e,c.end.row=e;for(var g=0;d>g&&" "==f.charAt(g);++g);d>g&&" "==f.charAt(g)?(c.start.column=g,c.end.column=g+1):(c.start.column=0,c.end.column=g),this.remove(c)}},this.$moveLines=function(a,b,c){if(a=this.getRowFoldStart(a),b=this.getRowFoldEnd(b),0>c){var d=this.getRowFoldStart(a+c);if(0>d)return 0;var e=d-a}else if(c>0){var d=this.getRowFoldEnd(b+c);if(d>this.doc.getLength()-1)return 0;var e=d-b}else{a=this.$clipRowToDocument(a),b=this.$clipRowToDocument(b);var e=b-a+1}var f=new j(a,0,b,Number.MAX_VALUE),g=this.getFoldsInRange(f).map(function(a){return a=a.clone(),a.start.row+=e,a.end.row+=e,a}),h=0==c?this.doc.getLines(a,b):this.doc.removeLines(a,b);return this.doc.insertLines(a+e,h),g.length&&this.addFolds(g),e},this.moveLinesUp=function(a,b){return this.$moveLines(a,b,-1)},this.moveLinesDown=function(a,b){return this.$moveLines(a,b,1)},this.duplicateLines=function(a,b){return this.$moveLines(a,b,0)},this.$clipRowToDocument=function(a){return Math.max(0,Math.min(a,this.doc.getLength()-1))},this.$clipColumnToRow=function(a,b){return 0>b?0:Math.min(this.doc.getLine(a).length,b)},this.$clipPositionToDocument=function(a,b){if(b=Math.max(0,b),0>a)a=0,b=0;else{var c=this.doc.getLength();a>=c?(a=c-1,b=this.doc.getLine(c-1).length):b=Math.min(this.doc.getLine(a).length,b)}return{row:a,column:b}},this.$clipRangeToDocument=function(a){a.start.row<0?(a.start.row=0,a.start.column=0):a.start.column=this.$clipColumnToRow(a.start.row,a.start.column);var b=this.doc.getLength()-1;return a.end.row>b?(a.end.row=b,a.end.column=this.doc.getLine(b).length):a.end.column=this.$clipColumnToRow(a.end.row,a.end.column),a},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(a){if(a!=this.$useWrapMode){if(this.$useWrapMode=a,this.$modified=!0,this.$resetRowCache(0),a){var b=this.getLength();this.$wrapData=Array(b),this.$updateWrapData(0,b-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(a,b){(this.$wrapLimitRange.min!==a||this.$wrapLimitRange.max!==b)&&(this.$wrapLimitRange={min:a,max:b},this.$modified=!0,this._signal("changeWrapMode"))},this.adjustWrapLimit=function(a,b){var c=this.$wrapLimitRange;c.max<0&&(c={min:b,max:b});var d=this.$constrainWrapLimit(a,c.min,c.max);return d!=this.$wrapLimit&&d>1?(this.$wrapLimit=d,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},this.$constrainWrapLimit=function(a,b,c){return b&&(a=Math.max(b,a)),c&&(a=Math.min(c,a)),a},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(a){this.setWrapLimitRange(a,a)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(a){var c,b=this.$useWrapMode,d=a.data.action,e=a.data.range.start.row,f=a.data.range.end.row,g=a.data.range.start,h=a.data.range.end,i=null;if(-1!=d.indexOf("Lines")?(f="insertLines"==d?e+a.data.lines.length:e,c=a.data.lines?a.data.lines.length:f-e):c=f-e,this.$updating=!0,0!=c)if(-1!=d.indexOf("remove")){this[b?"$wrapData":"$rowLengthCache"].splice(e,c);var j=this.$foldData;i=this.getFoldsInRange(a.data.range),this.removeFolds(i);var k=this.getFoldLine(h.row),l=0;if(k){k.addRemoveChars(h.row,h.column,g.column-h.column),k.shiftRow(-c);var m=this.getFoldLine(e);m&&m!==k&&(m.merge(k),k=m),l=j.indexOf(k)+1}for(l;l=h.row&&k.shiftRow(-c)}f=e}else{var n=Array(c);n.unshift(e,0);var o=b?this.$wrapData:this.$rowLengthCache;o.splice.apply(o,n);var j=this.$foldData,k=this.getFoldLine(e),l=0;if(k){var p=k.range.compareInside(g.row,g.column);0==p?(k=k.split(g.row,g.column),k&&(k.shiftRow(c),k.addRemoveChars(f,0,h.column-g.column))):-1==p&&(k.addRemoveChars(e,0,h.column-g.column),k.shiftRow(c)),l=j.indexOf(k)+1}for(l;l=e&&k.shiftRow(c)}}else{c=Math.abs(a.data.range.start.column-a.data.range.end.column),-1!=d.indexOf("remove")&&(i=this.getFoldsInRange(a.data.range),this.removeFolds(i),c=-c);var k=this.getFoldLine(e);k&&k.addRemoveChars(e,g.column,c)}return b&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,b?this.$updateWrapData(e,f):this.$updateRowLengthCache(e,f),i},this.$updateRowLengthCache=function(a,b){this.$rowLengthCache[a]=null,this.$rowLengthCache[b]=null},this.$updateWrapData=function(a,b){var i,j,d=this.doc.getAllLines(),e=this.getTabSize(),f=this.$wrapData,g=this.$wrapLimit,k=a;for(b=Math.min(b,d.length-1);b>=k;)j=this.getFoldLine(k,j),j?(i=[],j.walk(function(a,b,e,f){var g;if(null!=a){g=this.$getDisplayTokens(a,i.length),g[0]=c;for(var j=1;jb;){var l=f+b;if(a[l-1]>=n&&a[l]>=n)j(l);else if(a[l]!=c&&a[l]!=h){for(var m=Math.max(l-(i?10:b-(b>>2)),f-1);l>m&&a[l]m&&a[l]m&&a[l]==k;)l--}else for(;l>m&&a[l]m?j(++l):(l=f+b,j(l))}else{for(l;l!=f-1&&a[l]!=c;l--);if(l>f){j(l);continue}for(l=f+b;li;i++)e.push(p)}else 32==h?e.push(n):h>39&&48>h||h>57&&64>h?e.push(k):h>=4352&&q(h)?e.push(a,b):e.push(a)}return e},this.$getStringScreenWidth=function(a,b,c){if(0==b)return[0,0];null==b&&(b=1/0),c=c||0;var d,e;for(e=0;e=4352&&q(d)?2:1,!(c>b));e++);return[c,e]},this.lineWidgets=null,this.getRowLength=function(a){if(this.lineWidgets)var b=this.lineWidgets[a]&&this.lineWidgets[a].rowCount||0;else b=0;return this.$useWrapMode&&this.$wrapData[a]?this.$wrapData[a].length+1+b:1+b},this.getRowLineCount=function(a){return this.$useWrapMode&&this.$wrapData[a]?this.$wrapData[a].length+1:1},this.getScreenLastRowColumn=function(a){var b=this.screenToDocumentPosition(a,Number.MAX_VALUE);return this.documentToScreenColumn(b.row,b.column)},this.getDocumentLastRowColumn=function(a,b){var c=this.documentToScreenRow(a,b);return this.getScreenLastRowColumn(c)},this.getDocumentLastRowColumnPosition=function(a,b){var c=this.documentToScreenRow(a,b);return this.screenToDocumentPosition(c,Number.MAX_VALUE/10)},this.getRowSplitData=function(a){return this.$useWrapMode?this.$wrapData[a]:void 0},this.getScreenTabSize=function(a){return this.$tabSize-a%this.$tabSize},this.screenToDocumentRow=function(a,b){return this.screenToDocumentPosition(a,b).row},this.screenToDocumentColumn=function(a,b){return this.screenToDocumentPosition(a,b).column},this.screenToDocumentPosition=function(a,b){if(0>a)return{row:0,column:0};var c,f,d=0,e=0,g=0,h=0,i=this.$screenRowCache,j=this.$getRowCacheIndex(i,a),k=i.length;if(k&&j>=0)var g=i[j],d=this.$docRowCache[j],l=a>i[k-1];else var l=!k;for(var m=this.getLength()-1,n=this.getNextFoldLine(d),o=n?n.start.row:1/0;a>=g&&(h=this.getRowLength(d),!(g+h>a||d>=m));)g+=h,d++,d>o&&(d=n.end.row+1,n=this.getNextFoldLine(d,n),o=n?n.start.row:1/0),l&&(this.$docRowCache.push(d),this.$screenRowCache.push(g));if(n&&n.start.row<=d)c=this.getFoldDisplayLine(n),d=n.start.row;else{if(a>=g+h||d>m)return{row:m,column:this.getLine(m).length};c=this.getLine(d),n=null}if(this.$useWrapMode){var p=this.$wrapData[d];if(p){var q=Math.floor(a-g);f=p[q],q>0&&p.length&&(e=p[q-1]||p[p.length-1],c=c.substring(e))}}return e+=this.$getStringScreenWidth(c,b)[1],this.$useWrapMode&&e>=f&&(e=f-1),n?n.idxToPosition(e):{row:d,column:e}},this.documentToScreenPosition=function(a,b){if("undefined"==typeof b)var c=this.$clipPositionToDocument(a.row,a.column);else c=this.$clipPositionToDocument(a,b);a=c.row,b=c.column;var d=0,e=null,f=null;f=this.getFoldAt(a,b,1),f&&(a=f.start.row,b=f.start.column);var g,h=0,i=this.$docRowCache,j=this.$getRowCacheIndex(i,a),k=i.length;if(k&&j>=0)var h=i[j],d=this.$screenRowCache[j],l=a>i[k-1];else var l=!k;for(var m=this.getNextFoldLine(h),n=m?m.start.row:1/0;a>h;){if(h>=n){if(g=m.end.row+1,g>a)break;m=this.getNextFoldLine(g,m),n=m?m.start.row:1/0}else g=h+1;d+=this.getRowLength(h),h=g,l&&(this.$docRowCache.push(h),this.$screenRowCache.push(d))}var o="";if(m&&h>=n?(o=this.getFoldDisplayLine(m,a,b),e=m.start.row):(o=this.getLine(a).substring(0,b),e=a),this.$useWrapMode){var p=this.$wrapData[e];if(p){for(var q=0;o.length>=p[q];)d++,q++;o=o.substring(p[q-1]||0,o.length)}}return{row:d,column:this.$getStringScreenWidth(o)[0]}},this.documentToScreenColumn=function(a,b){return this.documentToScreenPosition(a,b).column},this.documentToScreenRow=function(a,b){return this.documentToScreenPosition(a,b).row},this.getScreenLength=function(){var a=0,b=null;if(this.$useWrapMode)for(var e=this.$wrapData.length,f=0,d=0,b=this.$foldData[d++],g=b?b.start.row:1/0;e>f;){var h=this.$wrapData[f];a+=h?h.length+1:1,f++,f>g&&(f=b.end.row+1,b=this.$foldData[d++],g=b?b.start.row:1/0)}else{a=this.getLength();for(var c=this.$foldData,d=0;d=l;l++){for(var m=0;i>m;m++)if(-1==e[l+m].search(h[m]))continue a;var n=e[l],o=e[l+i-1],p=n.length-n.match(h[0])[0].length,q=o.match(h[i-1])[0].length;k&&k.end.row===l&&k.end.column>p||(g.push(k=new f(l,p,l+i-1,q)),i>2&&(l=l+i-2))}}else for(var r=0;rr&&g[r].start.columnr&&g[m].end.column>v&&g[m].end.row==c.end.row;)m--;for(g=g.slice(r,m+1),r=0,m=g.length;m>r;r++)g[r].start.row+=c.start.row,g[r].end.row+=c.start.row}return g},this.replace=function(a,b){var c=this.$options,d=this.$assembleRegExp(c);if(c.$isMultiLine)return b;if(d){var e=d.exec(a);if(!e||e[0].length!=a.length)return null;if(b=a.replace(d,b),c.preserveCase){b=b.split("");for(var f=Math.min(a.length,a.length);f--;){var g=a[f];b[f]=g&&g.toLowerCase()!=g?b[f].toUpperCase():b[f].toLowerCase()}b=b.join("")}return b}},this.$matchIterator=function(a,b){var c=this.$assembleRegExp(b);if(!c)return!1;var g,e=this,h=b.backwards;if(b.$isMultiLine)var i=c.length,j=function(b,d,e){var h=b.search(c[0]);if(-1!=h){for(var j=1;i>j;j++)if(b=a.getLine(d+j),-1==b.search(c[j]))return;var k=b.match(c[i-1])[0].length,l=new f(d,h,d+i-1,k);return 1==c.offset?(l.start.row--,l.start.column=Number.MAX_VALUE):e&&(l.start.column+=e),g(l)?!0:void 0}};else if(h)var j=function(a,b,e){for(var f=d.getMatchOffsets(a,c),h=f.length-1;h>=0;h--)if(g(f[h],b,e))return!0};else var j=function(a,b,e){for(var f=d.getMatchOffsets(a,c),h=0;h=g;d--)if(c(a.getLine(d),d))return;if(0!=b.wrap)for(d=h,g=f.row;d>=g;d--)if(c(a.getLine(d),d))return}}:function(c){var d=f.row,e=a.getLine(d).substr(f.column);if(!c(e,d,f.column)){for(d+=1;h>=d;d++)if(c(a.getLine(d),d))return;if(0!=b.wrap)for(d=g,h=f.row;h>=d;d++)if(c(a.getLine(d),d))return}};return{forEach:i}}}.call(g.prototype),b.Search=g}),define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(a,b){"use strict";function f(a,b){if(this.platform=b||(e.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.__defineGetter__&&this.__defineSetter__&&"undefined"!=typeof console&&console.error){var c=!1,d=function(){c||(c=!0,console.error("commmandKeyBinding has too many m's. use commandKeyBinding"))};this.__defineGetter__("commmandKeyBinding",function(){return d(),this.commandKeyBinding}),this.__defineSetter__("commmandKeyBinding",function(a){return d(),this.commandKeyBinding=a})}else this.commmandKeyBinding=this.commandKeyBinding;this.addCommands(a)}var d=a("../lib/keys"),e=a("../lib/useragent");!function(){this.addCommand=function(a){this.commands[a.name]&&this.removeCommand(a),this.commands[a.name]=a,a.bindKey&&this._buildKeyHash(a)},this.removeCommand=function(a){var b="string"==typeof a?a:a.name;a=this.commands[b],delete this.commands[b];var c=this.commandKeyBinding;for(var d in c)for(var e in c[d])c[d][e]==a&&delete c[d][e]},this.bindKey=function(a,b){if(a){if("function"==typeof b)return this.addCommand({exec:b,bindKey:a,name:b.name||a}),void 0;var c=this.commandKeyBinding;a.split("|").forEach(function(a){var d=this.parseKeys(a,b),e=d.hashId;(c[e]||(c[e]={}))[d.key]=b},this)}},this.addCommands=function(a){a&&Object.keys(a).forEach(function(b){var c=a[b];if(c){if("string"==typeof c)return this.bindKey(c,b);"function"==typeof c&&(c={exec:c}),"object"==typeof c&&(c.name||(c.name=b),this.addCommand(c))}},this)},this.removeCommands=function(a){Object.keys(a).forEach(function(b){this.removeCommand(a[b])},this)},this.bindKeys=function(a){Object.keys(a).forEach(function(b){this.bindKey(b,a[b])},this)},this._buildKeyHash=function(a){var b=a.bindKey;if(b){var c="string"==typeof b?b:b[this.platform];this.bindKey(c,a)}},this.parseKeys=function(a){-1!=a.indexOf(" ")&&(a=a.split(/\s+/).pop());var b=a.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(a){return a}),c=b.pop(),e=d[c];if(d.FUNCTION_KEYS[e])c=d.FUNCTION_KEYS[e].toLowerCase();else{if(!b.length)return{key:c,hashId:-1};if(1==b.length&&"shift"==b[0])return{key:c.toUpperCase(),hashId:-1}}for(var f=0,g=b.length;g--;){var h=d.KEY_MODS[b[g]];if(null==h)return"undefined"!=typeof console&&console.error("invalid modifier "+b[g]+" in "+a),!1;f|=h}return{key:c,hashId:f}},this.findKeyCommand=function(a,b){var c=this.commandKeyBinding;return c[a]&&c[a][b]},this.handleKeyboard=function(a,b,c){return{command:this.findKeyCommand(b,c)}}}.call(f.prototype),b.HashHandler=f}),define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(a,b){"use strict";var d=a("../lib/oop"),e=a("../keyboard/hash_handler").HashHandler,f=a("../lib/event_emitter").EventEmitter,g=function(a,b){e.call(this,b,a),this.byName=this.commands,this.setDefaultHandler("exec",function(a){return a.command.exec(a.editor,a.args||{})})};d.inherits(g,e),function(){d.implement(this,f),this.exec=function(a,b,c){if("string"==typeof a&&(a=this.commands[a]),!a)return!1;if(b&&b.$readOnly&&!a.readOnly)return!1;var d={editor:b,command:a,args:c},e=this._emit("exec",d);return this._signal("afterExec",d),e===!1?!1:!0},this.toggleRecording=function(a){return this.$inReplay?void 0:(a&&a._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(a){this.macro.push([a.command,a.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0))},this.replay=function(a){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(a);try{this.$inReplay=!0,this.macro.forEach(function(b){"string"==typeof b?this.exec(b,a):this.exec(b[0],a,b[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(a){return a.map(function(a){return"string"!=typeof a[0]&&(a[0]=a[0].name),a[1]||(a=a[0]),a})}}.call(g.prototype),b.CommandManager=g}),define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(a,b){"use strict";function g(a,b){return{win:a,mac:b}}var d=a("../lib/lang"),e=a("../config"),f=a("../range").Range;b.commands=[{name:"showSettingsMenu",bindKey:g("Ctrl-,","Command-,"),exec:function(a){e.loadModule("ace/ext/settings_menu",function(b){b.init(a),a.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:g("Alt-E","Ctrl-E"),exec:function(a){e.loadModule("ace/ext/error_marker",function(b){b.showErrorMarker(a,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:g("Alt-Shift-E","Ctrl-Shift-E"),exec:function(a){e.loadModule("ace/ext/error_marker",function(b){b.showErrorMarker(a,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",bindKey:g("Ctrl-A","Command-A"),exec:function(a){a.selectAll()},readOnly:!0},{name:"centerselection",bindKey:g(null,"Ctrl-L"),exec:function(a){a.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:g("Ctrl-L","Command-L"),exec:function(a){var b=parseInt(prompt("Enter line number:"),10);isNaN(b)||a.gotoLine(b)},readOnly:!0},{name:"fold",bindKey:g("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(a){a.session.toggleFold(!1)},scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:g("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(a){a.session.toggleFold(!0)},scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:g("F2","F2"),exec:function(a){a.session.toggleFoldWidget()},scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:g("Alt-F2","Alt-F2"),exec:function(a){a.session.toggleFoldWidget(!0)},scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:g("Ctrl-Alt-0","Ctrl-Command-Option-0"),exec:function(a){a.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:g("Alt-0","Command-Option-0"),exec:function(a){a.session.foldAll(),a.session.unfold(a.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:g("Alt-Shift-0","Command-Option-Shift-0"),exec:function(a){a.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:g("Ctrl-K","Command-G"),exec:function(a){a.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",bindKey:g("Ctrl-Shift-K","Command-Shift-G"),exec:function(a){a.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",bindKey:g("Alt-K","Ctrl-G"),exec:function(a){a.selection.isEmpty()?a.selection.selectWord():a.findNext()},readOnly:!0},{name:"selectOrFindPrevious",bindKey:g("Alt-Shift-K","Ctrl-Shift-G"),exec:function(a){a.selection.isEmpty()?a.selection.selectWord():a.findPrevious()},readOnly:!0},{name:"find",bindKey:g("Ctrl-F","Command-F"),exec:function(a){e.loadModule("ace/ext/searchbox",function(b){b.Search(a)})},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(a){a.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:g("Ctrl-Shift-Home","Command-Shift-Up"),exec:function(a){a.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",bindKey:g("Ctrl-Home","Command-Home|Command-Up"),exec:function(a){a.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",bindKey:g("Shift-Up","Shift-Up"),exec:function(a){a.getSelection().selectUp()},multiSelectAction:"forEach",readOnly:!0},{name:"golineup",bindKey:g("Up","Up|Ctrl-P"),exec:function(a,b){a.navigateUp(b.times)},multiSelectAction:"forEach",readOnly:!0},{name:"selecttoend",bindKey:g("Ctrl-Shift-End","Command-Shift-Down"),exec:function(a){a.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",bindKey:g("Ctrl-End","Command-End|Command-Down"),exec:function(a){a.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",bindKey:g("Shift-Down","Shift-Down"),exec:function(a){a.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",bindKey:g("Down","Down|Ctrl-N"),exec:function(a,b){a.navigateDown(b.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",bindKey:g("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(a){a.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",bindKey:g("Ctrl-Left","Option-Left"),exec:function(a){a.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",bindKey:g("Alt-Shift-Left","Command-Shift-Left"),exec:function(a){a.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",bindKey:g("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(a){a.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",bindKey:g("Shift-Left","Shift-Left"),exec:function(a){a.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",bindKey:g("Left","Left|Ctrl-B"),exec:function(a,b){a.navigateLeft(b.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",bindKey:g("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(a){a.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",bindKey:g("Ctrl-Right","Option-Right"),exec:function(a){a.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",bindKey:g("Alt-Shift-Right","Command-Shift-Right"),exec:function(a){a.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",bindKey:g("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(a){a.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",bindKey:g("Shift-Right","Shift-Right"),exec:function(a){a.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",bindKey:g("Right","Right|Ctrl-F"),exec:function(a,b){a.navigateRight(b.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(a){a.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:g(null,"Option-PageDown"),exec:function(a){a.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:g("PageDown","PageDown|Ctrl-V"),exec:function(a){a.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(a){a.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:g(null,"Option-PageUp"),exec:function(a){a.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(a){a.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:g("Ctrl-Up",null),exec:function(a){a.renderer.scrollBy(0,-2*a.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:g("Ctrl-Down",null),exec:function(a){a.renderer.scrollBy(0,2*a.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(a){a.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(a){a.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",bindKey:g("Ctrl-Alt-E","Command-Option-E"),exec:function(a){a.commands.toggleRecording(a)},readOnly:!0},{name:"replaymacro",bindKey:g("Ctrl-Shift-E","Command-Shift-E"),exec:function(a){a.commands.replay(a)},readOnly:!0},{name:"jumptomatching",bindKey:g("Ctrl-P","Ctrl-P"),exec:function(a){a.jumpToMatching()},multiSelectAction:"forEach",readOnly:!0},{name:"selecttomatching",bindKey:g("Ctrl-Shift-P","Ctrl-Shift-P"),exec:function(a){a.jumpToMatching(!0)},multiSelectAction:"forEach",readOnly:!0},{name:"passKeysToBrowser",bindKey:g("null","null"),exec:function(){},passEvent:!0,readOnly:!0},{name:"cut",exec:function(a){var b=a.getSelectionRange();a._emit("cut",b),a.selection.isEmpty()||(a.session.remove(b),a.clearSelection())},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"removeline",bindKey:g("Ctrl-D","Command-D"),exec:function(a){a.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:g("Ctrl-Shift-D","Command-Shift-D"),exec:function(a){a.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",bindKey:g("Ctrl-Alt-S","Command-Alt-S"),exec:function(a){a.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:g("Ctrl-/","Command-/"),exec:function(a){a.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",bindKey:g("Ctrl-Shift-/","Command-Shift-/"),exec:function(a){a.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",bindKey:g("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(a){a.modifyNumber(1)},multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:g("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(a){a.modifyNumber(-1)},multiSelectAction:"forEach"},{name:"replace",bindKey:g("Ctrl-H","Command-Option-F"),exec:function(a){e.loadModule("ace/ext/searchbox",function(b){b.Search(a,!0)})}},{name:"undo",bindKey:g("Ctrl-Z","Command-Z"),exec:function(a){a.undo()}},{name:"redo",bindKey:g("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(a){a.redo()}},{name:"copylinesup",bindKey:g("Alt-Shift-Up","Command-Option-Up"),exec:function(a){a.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",bindKey:g("Alt-Up","Option-Up"),exec:function(a){a.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",bindKey:g("Alt-Shift-Down","Command-Option-Down"),exec:function(a){a.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",bindKey:g("Alt-Down","Option-Down"),exec:function(a){a.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",bindKey:g("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(a){a.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",bindKey:g("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(a){a.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",bindKey:g("Shift-Delete",null),exec:function(a){return a.selection.isEmpty()?(a.remove("left"),void 0):!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",bindKey:g("Alt-Backspace","Command-Backspace"),exec:function(a){a.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",bindKey:g("Alt-Delete","Ctrl-K"),exec:function(a){a.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",bindKey:g("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(a){a.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",bindKey:g("Ctrl-Delete","Alt-Delete"),exec:function(a){a.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",bindKey:g("Shift-Tab","Shift-Tab"),exec:function(a){a.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:g("Tab","Tab"),exec:function(a){a.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",bindKey:g("Ctrl-[","Ctrl-["),exec:function(a){a.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:g("Ctrl-]","Ctrl-]"),exec:function(a){a.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",exec:function(a,b){a.insert(b)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",exec:function(a,b){a.insert(d.stringRepeat(b.text||"",b.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",bindKey:g(null,"Ctrl-O"),exec:function(a){a.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",bindKey:g("Ctrl-T","Ctrl-T"),exec:function(a){a.transposeLetters()},multiSelectAction:function(a){a.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",bindKey:g("Ctrl-U","Ctrl-U"),exec:function(a){a.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",bindKey:g("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(a){a.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",bindKey:g("Ctrl-Shift-L","Command-Shift-L"),exec:function(a){var b=a.selection.getRange();b.start.column=b.end.column=0,b.end.row++,a.selection.setRange(b,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",bindKey:g(null,null),exec:function(a){for(var b=a.selection.isBackwards(),c=b?a.selection.getSelectionLead():a.selection.getSelectionAnchor(),e=b?a.selection.getSelectionAnchor():a.selection.getSelectionLead(),g=a.session.doc.getLine(c.row).length,h=a.session.doc.getTextRange(a.selection.getRange()),i=h.replace(/\n\s*/," ").length,j=a.session.doc.getLine(c.row),k=c.row+1;k<=e.row+1;k++){var l=d.stringTrimLeft(d.stringTrimRight(a.session.doc.getLine(k)));0!==l.length&&(l=" "+l),j+=l}e.row+10?(a.selection.moveCursorTo(c.row,c.column),a.selection.selectTo(c.row,c.column+i)):(g=a.session.doc.getLine(c.row).length>g?g+1:g,a.selection.moveCursorTo(c.row,g))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:g(null,null),exec:function(a){var b=a.session.doc.getLength()-1,c=a.session.doc.getLine(b).length,d=a.selection.rangeList.ranges,e=[];d.length<1&&(d=[a.selection.getRange()]);for(var g=0;g=c.lastRow||b.end.row<=c.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==a.scrollIntoView&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(a){if(this.$mergeUndoDeltas){var b=this.prevOp,c=this.$mergeableCommands,d=b.command&&a.command.name==b.command.name;if("insertstring"==a.command.name){var e=a.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),d=d&&this.mergeNextCommand&&(!/\s/.test(e)||/\s/.test(b.args)),this.mergeNextCommand=!0}else d=d&&-1!==c.indexOf(a.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(d=!1),d?this.session.mergeUndoDeltas=!0:-1!==c.indexOf(a.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(a){if(a)if("string"==typeof a){this.$keybindingId=a;var b=this;r.loadModule(["keybinding",a],function(c){b.$keybindingId==a&&b.keyBinding.setKeyboardHandler(c&&c.handler)})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(a);else this.keyBinding.setKeyboardHandler(null)},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(a){if(this.session!=a){var b=this.session;if(b){this.session.removeEventListener("change",this.$onDocumentChange),this.session.removeEventListener("changeMode",this.$onChangeMode),this.session.removeEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.session.removeEventListener("changeTabSize",this.$onChangeTabSize),this.session.removeEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.session.removeEventListener("changeWrapMode",this.$onChangeWrapMode),this.session.removeEventListener("onChangeFold",this.$onChangeFold),this.session.removeEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.session.removeEventListener("changeBackMarker",this.$onChangeBackMarker),this.session.removeEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.session.removeEventListener("changeAnnotation",this.$onChangeAnnotation),this.session.removeEventListener("changeOverwrite",this.$onCursorChange),this.session.removeEventListener("changeScrollTop",this.$onScrollTopChange),this.session.removeEventListener("changeScrollLeft",this.$onScrollLeftChange);var c=this.session.getSelection();c.removeEventListener("changeCursor",this.$onCursorChange),c.removeEventListener("changeSelection",this.$onSelectionChange)}this.session=a,a?(this.$onDocumentChange=this.onDocumentChange.bind(this),a.addEventListener("change",this.$onDocumentChange),this.renderer.setSession(a),this.$onChangeMode=this.onChangeMode.bind(this),a.addEventListener("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),a.addEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),a.addEventListener("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),a.addEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),a.addEventListener("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),a.addEventListener("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.addEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.addEventListener("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.addEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.addEventListener("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.addEventListener("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.addEventListener("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.addEventListener("changeScrollLeft",this.$onScrollLeftChange),this.selection=a.getSelection(),this.selection.addEventListener("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.addEventListener("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(a)),this._signal("changeSession",{session:a,oldSession:b}),b&&b._signal("changeEditor",{oldEditor:this}),a&&a._signal("changeEditor",{editor:this})}},this.getSession=function(){return this.session},this.setValue=function(a,b){return this.session.doc.setValue(a),b?1==b?this.navigateFileEnd():-1==b&&this.navigateFileStart():this.selectAll(),a},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(a){this.renderer.onResize(a)},this.setTheme=function(a,b){this.renderer.setTheme(a,b)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(a){this.renderer.setStyle(a)},this.unsetStyle=function(a){this.renderer.unsetStyle(a)},this.getFontSize=function(){return this.getOption("fontSize")||e.computedStyle(this.container,"fontSize")},this.setFontSize=function(a){this.setOption("fontSize",a)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var a=this;this.$highlightPending=!0,setTimeout(function(){a.$highlightPending=!1;var b=a.session;if(b&&b.bgTokenizer){var c=b.findMatchingBracket(a.getCursorPosition());if(c)var d=new n(c.row,c.column,c.row,c.column+1);else if(b.$mode.getMatching)var d=b.$mode.getMatching(a.session);d&&(b.$bracketHighlight=b.addMarker(d,"ace_bracket","text")) }},50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var a=this;this.$highlightTagPending=!0,setTimeout(function(){a.$highlightTagPending=!1;var b=a.session;if(b&&b.bgTokenizer){var c=a.getCursorPosition(),d=new s(a.session,c.row,c.column),e=d.getCurrentToken();if(!e||-1===e.type.indexOf("tag-name"))return b.removeMarker(b.$tagHighlight),b.$tagHighlight=null,void 0;var f=e.value,g=0,h=d.stepBackward();if("<"==h.value){do h=e,e=d.stepForward(),e&&e.value===f&&-1!==e.type.indexOf("tag-name")&&("<"===h.value?g++:"=0)}else{do e=h,h=d.stepBackward(),e&&e.value===f&&-1!==e.type.indexOf("tag-name")&&("<"===h.value?g++:"=g);d.stepForward()}if(!e)return b.removeMarker(b.$tagHighlight),b.$tagHighlight=null,void 0;var i=d.getCurrentTokenRow(),j=d.getCurrentTokenColumn(),k=new n(i,j,i,j+e.value.length);b.$tagHighlight&&0!==k.compareRange(b.$backMarkers[b.$tagHighlight].range)&&(b.removeMarker(b.$tagHighlight),b.$tagHighlight=null),k&&!b.$tagHighlight&&(b.$tagHighlight=b.addMarker(k,"ace_bracket","text"))}},50)}},this.focus=function(){var a=this;setTimeout(function(){a.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus"))},this.onBlur=function(){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur"))},this.$cursorChange=function(){this.renderer.updateCursor()},this.onDocumentChange=function(a){var d,b=a.data,c=b.range;d=c.start.row==c.end.row&&"insertLines"!=b.action&&"removeLines"!=b.action?c.end.row:1/0,this.renderer.updateLines(c.start.row,d,this.session.$useWrapMode),this._signal("change",a),this.$cursorChange(),this.$updateHighlightActiveLine()},this.onTokenizerUpdate=function(a){var b=a.data;this.renderer.updateLines(b.first,b.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this.$blockScrolling||this.renderer.scrollCursorIntoView(),this.$highlightBrackets(),this.$highlightTags(),this.$updateHighlightActiveLine(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var b,a=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(b=this.getCursorPosition()),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(b=!1)),a.$highlightLineMarker&&!b)a.removeMarker(a.$highlightLineMarker.id),a.$highlightLineMarker=null;else if(!a.$highlightLineMarker&&b){var c=new n(b.row,b.column,b.row,1/0);c.id=a.addMarker(c,"ace_active-line","screenLine"),a.$highlightLineMarker=c}else b&&(a.$highlightLineMarker.start.row=b.row,a.$highlightLineMarker.end.row=b.row,a.$highlightLineMarker.start.column=b.column,a._signal("changeBackMarker"))},this.onSelectionChange=function(){var b=this.session;if(b.$selectionMarker&&b.removeMarker(b.$selectionMarker),b.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var c=this.selection.getRange(),d=this.getSelectionStyle();b.$selectionMarker=b.addMarker(c,"ace_selection",d)}var e=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(e),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var a=this.session,b=this.getSelectionRange();if(!b.isEmpty()&&!b.isMultiLine()){var c=b.start.column-1,d=b.end.column+1,e=a.getLine(b.start.row),f=e.length,g=e.substring(Math.max(c,0),Math.min(d,f));if(!(c>=0&&/^[\w\d]/.test(g)||f>=d&&/[\w\d]$/.test(g))&&(g=e.substring(b.start.column,b.end.column),/^[\w\d]+$/.test(g))){var h=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:g});return h}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(a){this.renderer.updateText(),this._emit("changeMode",a)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var a=this.getSelectedText();return this._signal("copy",a),a},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(a){if(!this.$readOnly){var b={text:a};this._signal("paste",b),this.insert(b.text,!0)}},this.execCommand=function(a,b){this.commands.exec(a,this,b)},this.insert=function(a,b){var c=this.session,d=c.getMode(),e=this.getCursorPosition();if(this.getBehavioursEnabled()&&!b){var f=d.transformAction(c.getState(e.row),"insertion",this,c,a);f&&(a!==f.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),a=f.text)}if(" "==a&&(a=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()){var g=new n.fromPoints(e,e);g.end.column+=a.length,this.session.remove(g)}}else{var g=this.getSelectionRange();e=this.session.remove(g),this.clearSelection()}if("\n"==a||"\r\n"==a){var h=c.getLine(e.row);if(e.column>h.search(/\S|$/)){var i=h.substr(e.column).search(/\S|$/);c.doc.removeInLine(e.row,e.column,e.column+i)}}this.clearSelection();var j=e.column,k=c.getState(e.row),h=c.getLine(e.row),l=d.checkOutdent(k,h,a);if(c.insert(e,a),f&&f.selection&&(2==f.selection.length?this.selection.setSelectionRange(new n(e.row,j+f.selection[0],e.row,j+f.selection[1])):this.selection.setSelectionRange(new n(e.row+f.selection[0],f.selection[1],e.row+f.selection[2],f.selection[3]))),c.getDocument().isNewLine(a)){var o=d.getNextLineIndent(k,h.slice(0,e.column),c.getTabString());c.insert({row:e.row+1,column:0},o)}l&&d.autoOutdent(k,c,e.row)},this.onTextInput=function(a){this.keyBinding.onTextInput(a)},this.onCommandKey=function(a,b,c){this.keyBinding.onCommandKey(a,b,c)},this.setOverwrite=function(a){this.session.setOverwrite(a)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(a){this.setOption("scrollSpeed",a)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(a){this.setOption("dragDelay",a)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(a){this.setOption("selectionStyle",a)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(a){this.setOption("highlightActiveLine",a)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(a){this.setOption("highlightGutterLine",a)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(a){this.setOption("highlightSelectedWord",a)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(a){this.renderer.setAnimatedScroll(a)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(a){this.renderer.setShowInvisibles(a)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(a){this.renderer.setDisplayIndentGuides(a)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(a){this.renderer.setShowPrintMargin(a)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(a){this.renderer.setPrintMarginColumn(a)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(a){this.setOption("readOnly",a)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(a){this.setOption("behavioursEnabled",a)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(a){this.setOption("wrapBehavioursEnabled",a)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(a){this.setOption("showFoldWidgets",a)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(a){this.setOption("fadeFoldWidgets",a)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(a){this.selection.isEmpty()&&("left"==a?this.selection.selectLeft():this.selection.selectRight());var b=this.getSelectionRange();if(this.getBehavioursEnabled()){var c=this.session,d=c.getState(b.start.row),e=c.getMode().transformAction(d,"deletion",this,c,b);if(0===b.end.column){var f=c.getTextRange(b);if("\n"==f[f.length-1]){var g=c.getLine(b.end.row);/^\s+$/.test(g)&&(b.end.column=g.length)}}e&&(b=e)}this.session.remove(b),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var a=this.getSelectionRange();a.start.column==a.end.column&&a.start.row==a.end.row&&(a.end.column=0,a.end.row++),this.session.remove(a),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var a=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(a)},this.transposeLetters=function(){if(this.selection.isEmpty()){var a=this.getCursorPosition(),b=a.column;if(0!==b){var d,e,c=this.session.getLine(a.row);bb.toLowerCase()?1:0});for(var d=new n(0,0,0,0),e=a.first;e<=a.last;e++){var f=b.getLine(e);d.start.row=e,d.end.row=e,d.end.column=f.length,b.replace(d,c[e-a.first])}},this.toggleCommentLines=function(){var a=this.session.getState(this.getCursorPosition().row),b=this.$getSelectedRows();this.session.getMode().toggleCommentLines(a,this.session,b.first,b.last)},this.toggleBlockComment=function(){var a=this.getCursorPosition(),b=this.session.getState(a.row),c=this.getSelectionRange();this.session.getMode().toggleBlockComment(b,this.session,c,a)},this.getNumberAt=function(a,b){var c=/[\-]?[0-9]+(?:\.[0-9]+)?/g;c.lastIndex=0;for(var d=this.session.getLine(a);c.lastIndex=b){var f={value:e[0],start:e.index,end:e.index+e[0].length};return f}}return null},this.modifyNumber=function(a){var b=this.selection.getCursor().row,c=this.selection.getCursor().column,d=new n(b,c-1,b,c),e=this.session.getTextRange(d);if(!isNaN(parseFloat(e))&&isFinite(e)){var f=this.getNumberAt(b,c);if(f){var g=f.value.indexOf(".")>=0?f.start+f.value.indexOf(".")+1:f.end,h=f.start+f.value.length-g,i=parseFloat(f.value);i*=Math.pow(10,h),a*=g!==f.end&&g>c?Math.pow(10,f.end-c-1):Math.pow(10,f.end-c),i+=a,i/=Math.pow(10,h);var j=i.toFixed(h),k=new n(b,f.start,b,f.end);this.session.replace(k,j),this.moveCursorTo(b,Math.max(f.start+1,c+j.length-f.value.length))}}},this.removeLines=function(){var b,a=this.$getSelectedRows();b=0===a.first||a.last+1=g;)f[h].moveBy(e,0),h--}b.fromOrientedRange(b.ranges[0]),b.rangeList.attach(this.session)}},this.$getSelectedRows=function(){var a=this.getSelectionRange().collapseRows();return{first:this.session.getRowFoldStart(a.start.row),last:this.session.getRowFoldEnd(a.end.row)}},this.onCompositionStart=function(){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(a){this.renderer.setCompositionText(a)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(a){return a>=this.getFirstVisibleRow()&&a<=this.getLastVisibleRow()},this.isRowFullyVisible=function(a){return a>=this.renderer.getFirstFullyVisibleRow()&&a<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(a,b){var c=this.renderer,d=this.renderer.layerConfig,e=a*Math.floor(d.height/d.lineHeight);this.$blockScrolling++,b===!0?this.selection.$moveSelection(function(){this.moveCursorBy(e,0)}):b===!1&&(this.selection.moveCursorBy(e,0),this.selection.clearSelection()),this.$blockScrolling--;var f=c.scrollTop;c.scrollBy(0,e*d.lineHeight),null!=b&&c.scrollCursorIntoView(null,.5),c.animateScrolling(f)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(a){this.renderer.scrollToRow(a)},this.scrollToLine=function(a,b,c,d){this.renderer.scrollToLine(a,b,c,d)},this.centerSelection=function(){var a=this.getSelectionRange(),b={row:Math.floor(a.start.row+(a.end.row-a.start.row)/2),column:Math.floor(a.start.column+(a.end.column-a.start.column)/2)};this.renderer.alignCursor(b,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(a,b){this.selection.moveCursorTo(a,b)},this.moveCursorToPosition=function(a){this.selection.moveCursorToPosition(a)},this.jumpToMatching=function(a,b){var c=this.getCursorPosition(),d=new s(this.session,c.row,c.column),e=d.getCurrentToken(),f=e||d.stepForward();if(f){var g,k,h=!1,i={},j=c.column-f.start,l={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(f.value.match(/[{}()\[\]]/g)){for(;j=0;--f)this.$tryReplace(c[f],a)&&d++;return this.selection.setSelectionRange(e),this.$blockScrolling-=1,d},this.$tryReplace=function(a,b){var c=this.session.getTextRange(a);return b=this.$search.replace(c,b),null!==b?(a.end=this.session.replace(a,b),a):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(a,b,c){b||(b={}),"string"==typeof a||a instanceof RegExp?b.needle=a:"object"==typeof a&&d.mixin(b,a);var e=this.selection.getRange();null==b.needle&&(a=this.session.getTextRange(e)||this.$search.$options.needle,a||(e=this.session.getWordRange(e.start.row,e.start.column),a=this.session.getTextRange(e)),this.$search.set({needle:a})),this.$search.set(b),b.start||this.$search.set({start:e});var f=this.$search.find(this.session);return b.preventScroll?f:f?(this.revealRange(f,c),f):(b.backwards?e.start=e.end:e.end=e.start,this.selection.setRange(e),void 0)},this.findNext=function(a,b){this.find({skipCurrent:!0,backwards:!1},a,b)},this.findPrevious=function(a,b){this.find(a,{skipCurrent:!0,backwards:!0},b)},this.revealRange=function(a,b){this.$blockScrolling+=1,this.session.unfold(a),this.selection.setSelectionRange(a),this.$blockScrolling-=1;var c=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(a.start,a.end,.5),b!==!1&&this.renderer.animateScrolling(c)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy()},this.setAutoScrollEditorIntoView=function(a){if(a){var b,c=this,d=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var e=this.$scrollAnchor;e.style.cssText="position:absolute",this.container.insertBefore(e,this.container.firstChild);var f=this.on("changeSelection",function(){d=!0}),g=this.renderer.on("beforeRender",function(){d&&(b=c.renderer.container.getBoundingClientRect())}),h=this.renderer.on("afterRender",function(){if(d&&b&&c.isFocused()){var a=c.renderer,f=a.$cursorLayer.$pixelPos,g=a.layerConfig,h=f.top-g.offset;d=f.top>=0&&h+b.top<0?!0:f.topwindow.innerHeight?!1:null,null!=d&&(e.style.top=h+"px",e.style.left=f.left+"px",e.style.height=g.lineHeight+"px",e.scrollIntoView(d)),d=b=null}});this.setAutoScrollEditorIntoView=function(a){a||(delete this.setAutoScrollEditorIntoView,this.removeEventListener("changeSelection",f),this.renderer.removeEventListener("afterRender",h),this.renderer.removeEventListener("beforeRender",g))}}},this.$resetCursorStyle=function(){var a=this.$cursorStyle||"ace",b=this.renderer.$cursorLayer;b&&(b.setSmoothBlinking(/smooth/.test(a)),b.isBlinking=!this.$readOnly&&"wide"!=a,e.setCssClass(b.element,"ace_slim-cursors",/slim/.test(a)))}}.call(t.prototype),r.defineOptions(t.prototype,"editor",{selectionStyle:{set:function(a){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:a})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(){this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},autoScrollEditorIntoView:{set:function(a){this.setAutoScrollEditorIntoView(a)}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showLineNumbers:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",foldStyle:"session",mode:"session"}),b.Editor=t}),define("ace/undomanager",["require","exports","module"],function(a,b){"use strict";var d=function(){this.reset()};!function(){this.execute=function(a){var b=a.args[0];this.$doc=a.args[1],a.merge&&this.hasUndo()&&(this.dirtyCounter--,b=this.$undoStack.pop().concat(b)),this.$undoStack.push(b),this.$redoStack=[],this.dirtyCounter<0&&(this.dirtyCounter=0/0),this.dirtyCounter++},this.undo=function(a){var b=this.$undoStack.pop(),c=null;return b&&(c=this.$doc.undoChanges(b,a),this.$redoStack.push(b),this.dirtyCounter--),c},this.redo=function(a){var b=this.$redoStack.pop(),c=null;return b&&(c=this.$doc.redoChanges(b,a),this.$undoStack.push(b),this.dirtyCounter++),c},this.reset=function(){this.$undoStack=[],this.$redoStack=[],this.dirtyCounter=0},this.hasUndo=function(){return this.$undoStack.length>0},this.hasRedo=function(){return this.$redoStack.length>0},this.markClean=function(){this.dirtyCounter=0},this.isClean=function(){return 0===this.dirtyCounter}}.call(d.prototype),b.UndoManager=d}),define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],function(a,b){"use strict";var d=a("../lib/dom"),e=a("../lib/oop"),f=a("../lib/lang"),g=a("../lib/event_emitter").EventEmitter,h=function(a){this.element=d.createElement("div"),this.element.className="ace_layer ace_gutter-layer",a.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$cells=[]};!function(){e.implement(this,g),this.setSession=function(a){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=a,a&&a.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(a,b){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(a,b)},this.removeGutterDecoration=function(a,b){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(a,b)},this.setAnnotations=function(a){this.$annotations=[];for(var b=0;bg&&(p=f.end.row+1,f=b.getNextFoldLine(p,f),g=f?f.start.row:1/0),p>e){for(;this.$cells.length>o+1;)n=this.$cells.pop(),this.element.removeChild(n.element);break}n=this.$cells[++o],n||(n={element:null,textNode:null,foldWidget:null},n.element=d.createElement("div"),n.textNode=document.createTextNode(""),n.element.appendChild(n.textNode),this.element.appendChild(n.element),this.$cells[o]=n);var q="ace_gutter-cell ";i[p]&&(q+=i[p]),j[p]&&(q+=j[p]),this.$annotations[p]&&(q+=this.$annotations[p].className),n.element.className!=q&&(n.element.className=q);var r=b.getRowLength(p)*a.lineHeight+"px";if(r!=n.element.style.height&&(n.element.style.height=r),h){var s=h[p];null==s&&(s=h[p]=b.getFoldWidget(p))}if(s){n.foldWidget||(n.foldWidget=d.createElement("span"),n.element.appendChild(n.foldWidget));var q="ace_fold-widget ace_"+s;q+="start"==s&&p==g&&pc.right-b.right?"foldWidgets":void 0 }}.call(h.prototype),b.Gutter=h}),define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(a,b){"use strict";var d=a("../range").Range,e=a("../lib/dom"),f=function(a){this.element=e.createElement("div"),this.element.className="ace_layer ace_marker-layer",a.appendChild(this.element)};!function(){this.$padding=0,this.setPadding=function(a){this.$padding=a},this.setSession=function(a){this.session=a},this.setMarkers=function(a){this.markers=a},this.update=function(a){var a=a||this.config;if(a){this.config=a;var b=[];for(var c in this.markers){var d=this.markers[c];if(d.range){var e=d.range.clipRows(a.firstRow,a.lastRow);if(!e.isEmpty())if(e=e.toScreenRange(this.session),d.renderer){var f=this.$getTop(e.start.row,a),g=this.$padding+e.start.column*a.characterWidth;d.renderer(b,e,g,f,a)}else"fullLine"==d.type?this.drawFullLineMarker(b,e,d.clazz,a):"screenLine"==d.type?this.drawScreenLineMarker(b,e,d.clazz,a):e.isMultiLine()?"text"==d.type?this.drawTextMarker(b,e,d.clazz,a):this.drawMultiLineMarker(b,e,d.clazz,a):this.drawSingleLineMarker(b,e,d.clazz+" ace_start",a)}else d.update(b,this,this.session,a)}this.element.innerHTML=b.join("")}},this.$getTop=function(a,b){return(a-b.firstRowScreen)*b.lineHeight},this.drawTextMarker=function(a,b,c,e,f){var g=b.start.row,h=new d(g,b.start.column,g,this.session.getScreenLastRowColumn(g));for(this.drawSingleLineMarker(a,h,c+" ace_start",e,1,f),g=b.end.row,h=new d(g,0,g,b.end.column),this.drawSingleLineMarker(a,h,c,e,0,f),g=b.start.row+1;g"),h=this.$getTop(b.end.row,d);var j=b.end.column*d.characterWidth;a.push("
"),g=(b.end.row-b.start.row-1)*d.lineHeight,0>g||(h=this.$getTop(b.start.row+1,d),a.push("
"))},this.drawSingleLineMarker=function(a,b,c,d,e,f){var g=d.lineHeight,h=(b.end.column+(e||0)-b.start.column)*d.characterWidth,i=this.$getTop(b.start.row,d),j=this.$padding+b.start.column*d.characterWidth;a.push("
")},this.drawFullLineMarker=function(a,b,c,d,e){var f=this.$getTop(b.start.row,d),g=d.lineHeight;b.start.row!=b.end.row&&(g+=this.$getTop(b.end.row,d)-f),a.push("
")},this.drawScreenLineMarker=function(a,b,c,d,e){var f=this.$getTop(b.start.row,d),g=d.lineHeight;a.push("
")}}.call(f.prototype),b.Marker=f}),define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(a,b){"use strict";var d=a("../lib/oop"),e=a("../lib/dom"),f=a("../lib/lang");a("../lib/useragent");var h=a("../lib/event_emitter").EventEmitter,i=function(a){this.element=e.createElement("div"),this.element.className="ace_layer ace_text-layer",a.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this)};!function(){d.implement(this,h),this.EOF_CHAR="\xb6",this.EOL_CHAR_LF="\xac",this.EOL_CHAR_CRLF="\xa4",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="\u2192",this.SPACE_CHAR="\xb7",this.$padding=0,this.$updateEolChar=function(){var a="\n"==this.session.doc.getNewLineCharacter()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;return this.EOL_CHAR!=a?(this.EOL_CHAR=a,!0):void 0},this.setPadding=function(a){this.$padding=a,this.element.style.padding="0 "+a+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(a){this.$fontMetrics=a,this.$fontMetrics.on("changeCharacterSize",function(a){this._signal("changeCharacterSize",a)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(a){this.session=a,a&&this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(a){return this.showInvisibles==a?!1:(this.showInvisibles=a,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(a){return this.displayIndentGuides==a?!1:(this.displayIndentGuides=a,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var a=this.session.getTabSize();this.tabSize=a;for(var b=this.$tabStrings=[0],c=1;a+1>c;c++)this.showInvisibles?b.push(""+this.TAB_CHAR+f.stringRepeat("\xa0",c-1)+""):b.push(f.stringRepeat("\xa0",c));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var d="ace_indent-guide",e="",g="";if(this.showInvisibles){d+=" ace_invisible",e=" ace_invisible_space",g=" ace_invisible_tab";var h=f.stringRepeat(this.SPACE_CHAR,this.tabSize),i=this.TAB_CHAR+f.stringRepeat("\xa0",this.tabSize-1)}else var h=f.stringRepeat("\xa0",this.tabSize),i=h;this.$tabStrings[" "]=""+h+"",this.$tabStrings[" "]=""+i+""}},this.updateLines=function(a,b,c){(this.config.lastRow!=a.lastRow||this.config.firstRow!=a.firstRow)&&this.scrollLines(a),this.config=a;for(var d=Math.max(b,a.firstRow),e=Math.min(c,a.lastRow),f=this.element.childNodes,g=0,h=a.firstRow;d>h;h++){var i=this.session.getFoldLine(h);if(i){if(i.containsRow(d)){d=i.start.row;break}h=i.end.row}g++}for(var h=d,i=this.session.getNextFoldLine(h),j=i?i.start.row:1/0;;){if(h>j&&(h=i.end.row+1,i=this.session.getNextFoldLine(h,i),j=i?i.start.row:1/0),h>e)break;var k=f[g++];if(k){var l=[];this.$renderLine(l,h,!this.$useLineGroups(),h==j?i:!1),k.style.height=a.lineHeight*this.session.getRowLength(h)+"px",k.innerHTML=l.join("")}h++}},this.scrollLines=function(a){var b=this.config;if(this.config=a,!b||b.lastRow0;d--)c.removeChild(c.firstChild);if(b.lastRow>a.lastRow)for(var d=this.session.getFoldedRowCount(a.lastRow+1,b.lastRow);d>0;d--)c.removeChild(c.lastChild);if(a.firstRowb.lastRow){var e=this.$renderLinesFragment(a,b.lastRow+1,a.lastRow);c.appendChild(e)}},this.$renderLinesFragment=function(a,b,c){for(var d=this.element.ownerDocument.createDocumentFragment(),f=b,g=this.session.getNextFoldLine(f),h=g?g.start.row:1/0;;){if(f>h&&(f=g.end.row+1,g=this.session.getNextFoldLine(f,g),h=g?g.start.row:1/0),f>c)break;var i=e.createElement("div"),j=[];if(this.$renderLine(j,f,!1,f==h?g:!1),i.innerHTML=j.join(""),this.$useLineGroups())i.className="ace_line_group",d.appendChild(i),i.style.height=a.lineHeight*this.session.getRowLength(f)+"px";else for(;i.firstChild;)d.appendChild(i.firstChild);f++}return d},this.update=function(a){this.config=a;for(var b=[],c=a.firstRow,d=a.lastRow,e=c,f=this.session.getNextFoldLine(e),g=f?f.start.row:1/0;;){if(e>g&&(e=f.end.row+1,f=this.session.getNextFoldLine(e,f),g=f?f.start.row:1/0),e>d)break;this.$useLineGroups()&&b.push("
"),this.$renderLine(b,e,!1,e==g?f:!1),this.$useLineGroups()&&b.push("
"),e++}this.element.innerHTML=b.join("")},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(a,b,c,d){var e=this,g=/\t|&|<|( +)|([\x00-\x1f\x80-\xa0\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g,h=function(a,c,d,g){if(c)return e.showInvisibles?""+f.stringRepeat(e.SPACE_CHAR,a.length)+"":f.stringRepeat("\xa0",a.length);if("&"==a)return"&";if("<"==a)return"<";if(" "==a){var i=e.session.getScreenTabSize(b+g);return b+=i-1,e.$tabStrings[i]}if("\u3000"==a){var j=e.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",k=e.showInvisibles?e.SPACE_CHAR:"";return b+=1,""+k+""}return d?""+e.SPACE_CHAR+"":(b+=1,""+a+"")},i=d.replace(g,h);if(this.$textToken[c.type])a.push(i);else{var j="ace_"+c.type.replace(/\./g," ace_"),k="";"fold"==c.type&&(k=" style='width:"+c.value.length*this.config.characterWidth+"px;' "),a.push("",i,"")}return b+d.length},this.renderIndentGuide=function(a,b,c){var d=b.search(this.$indentGuideRe);return 0>=d||d>=c?b:" "==b[0]?(d-=d%this.tabSize,a.push(f.stringRepeat(this.$tabStrings[" "],d/this.tabSize)),b.substr(d)):" "==b[0]?(a.push(f.stringRepeat(this.$tabStrings[" "],d)),b.substr(d)):b},this.$renderWrappedLine=function(a,b,c,d){for(var e=0,f=0,g=c[0],h=0,i=0;i=g;)h=this.$renderToken(a,h,j,k.substring(0,g-e)),k=k.substring(g-e),e=g,d||a.push("","
"),f++,h=0,g=c[f]||Number.MAX_VALUE;0!=k.length&&(e+=k.length,h=this.$renderToken(a,h,j,k))}}},this.$renderSimpleLine=function(a,b){var c=0,d=b[0],e=d.value;this.displayIndentGuides&&(e=this.renderIndentGuide(a,e)),e&&(c=this.$renderToken(a,c,d,e));for(var f=1;f"),e.length){var f=this.session.getRowSplitData(b);f&&f.length?this.$renderWrappedLine(a,e,f,c):this.$renderSimpleLine(a,e)}this.showInvisibles&&(d&&(b=d.end.row),a.push("",b==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"")),c||a.push("
")},this.$getFoldLineTokens=function(a,b){function e(a,b,c){for(var e=0,f=0;f+a[e].value.lengthc-b&&(g=g.substring(0,c-b)),d.push({type:a[e].type,value:g}),f=b+g.length,e+=1}for(;c>f&&ec?d.push({type:a[e].type,value:g.substring(0,c-f)}):d.push(a[e]),f+=g.length,e+=1}}var c=this.session,d=[],f=c.getTokens(a);return b.walk(function(a,b,g,h,i){null!=a?d.push({type:"fold",value:a}):(i&&(f=c.getTokens(b)),f.length&&e(f,h,g))},b.end.row,this.session.getLine(b.end.row).length),d},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}.call(i.prototype),b.Text=i}),define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(a,b){"use strict";var e,d=a("../lib/dom"),f=function(a){this.element=d.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),void 0===e&&(e="opacity"in this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),d.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateVisibility.bind(this)};!function(){this.$updateVisibility=function(a){for(var b=this.cursors,c=b.length;c--;)b[c].style.visibility=a?"":"hidden"},this.$updateOpacity=function(a){for(var b=this.cursors,c=b.length;c--;)b[c].style.opacity=a?"":"0"},this.$padding=0,this.setPadding=function(a){this.$padding=a},this.setSession=function(a){this.session=a},this.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},this.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},this.setSmoothBlinking=function(a){a==this.smoothBlinking||e||(this.smoothBlinking=a,d.setCssClass(this.element,"ace_smooth-blinking",a),this.$updateCursors(!0),this.$updateCursors=(a?this.$updateOpacity:this.$updateVisibility).bind(this),this.restartTimer())},this.addCursor=function(){var a=d.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},this.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},this.hideCursor=function(){this.isVisible=!1,d.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,d.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var a=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&d.removeCssClass(this.element,"ace_smooth-blinking"),a(!0),this.isBlinking&&this.blinkInterval&&this.isVisible){this.smoothBlinking&&setTimeout(function(){d.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var b=function(){this.timeoutId=setTimeout(function(){a(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){a(!0),b()},this.blinkInterval),b()}},this.getPixelPosition=function(a,b){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var c=this.session.documentToScreenPosition(a),d=this.$padding+c.column*this.config.characterWidth,e=(c.row-(b?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:d,top:e}},this.update=function(a){this.config=a;var b=this.session.$selectionMarkers,c=0,d=0;(void 0===b||0===b.length)&&(b=[{cursor:null}]);for(var c=0,e=b.length;e>c;c++){var f=this.getPixelPosition(b[c].cursor,!0);if(!((f.top>a.height+a.offset||f.top<0)&&c>1)){var g=(this.cursors[d++]||this.addCursor()).style;g.left=f.left+"px",g.top=f.top+"px",g.width=a.characterWidth+"px",g.height=a.lineHeight+"px"}}for(;this.cursors.length>d;)this.removeCursor();var h=this.session.getOverwrite();this.$setOverwrite(h),this.$pixelPos=f,this.restartTimer()},this.$setOverwrite=function(a){a!=this.overwrite&&(this.overwrite=a,a?d.addCssClass(this.element,"ace_overwrite-cursors"):d.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}.call(f.prototype),b.Cursor=f}),define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(a,b){"use strict";var d=a("./lib/oop"),e=a("./lib/dom"),f=a("./lib/event"),g=a("./lib/event_emitter").EventEmitter,h=function(a){this.element=e.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=e.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),a.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,f.addListener(this.element,"scroll",this.onScroll.bind(this)),f.addListener(this.element,"mousedown",f.preventDefault)};!function(){d.implement(this,g),this.setVisible=function(a){this.element.style.display=a?"":"none",this.isVisible=a}}.call(h.prototype);var i=function(a,b){h.call(this,a),this.scrollTop=0,b.$scrollbarWidth=this.width=e.scrollbarWidth(a.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px"};d.inherits(i,h),function(){this.classSuffix="-v",this.onScroll=function(){this.skipEvent||(this.scrollTop=this.element.scrollTop,this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},this.getWidth=function(){return this.isVisible?this.width:0},this.setHeight=function(a){this.element.style.height=a+"px"},this.setInnerHeight=function(a){this.inner.style.height=a+"px"},this.setScrollHeight=function(a){this.inner.style.height=a+"px"},this.setScrollTop=function(a){this.scrollTop!=a&&(this.skipEvent=!0,this.scrollTop=this.element.scrollTop=a)}}.call(i.prototype);var j=function(a,b){h.call(this,a),this.scrollLeft=0,this.height=b.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};d.inherits(j,h),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(a){this.element.style.width=a+"px"},this.setInnerWidth=function(a){this.inner.style.width=a+"px"},this.setScrollWidth=function(a){this.inner.style.width=a+"px"},this.setScrollLeft=function(a){this.scrollLeft!=a&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=a)}}.call(j.prototype),b.ScrollBar=i,b.ScrollBarV=i,b.ScrollBarH=j,b.VScrollBar=i,b.HScrollBar=j}),define("ace/renderloop",["require","exports","module","ace/lib/event"],function(a,b){"use strict";var d=a("./lib/event"),e=function(a,b){this.onRender=a,this.pending=!1,this.changes=0,this.window=b||window};!function(){this.schedule=function(a){if(this.changes=this.changes|a,!this.pending&&this.changes){this.pending=!0;var b=this;d.nextFrame(function(){b.pending=!1;for(var a;a=b.changes;)b.changes=0,b.onRender(a)},this.window)}}}.call(e.prototype),b.RenderLoop=e}),define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(a,b){var d=a("../lib/oop"),e=a("../lib/dom"),f=a("../lib/lang"),g=a("../lib/useragent"),h=a("../lib/event_emitter").EventEmitter,i=0,j=b.FontMetrics=function(a){this.el=e.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=e.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=e.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),a.appendChild(this.el),i||this.$testFractionalRect(),this.$measureNode.innerHTML=f.stringRepeat("X",i),this.$characterSize={width:0,height:0},this.checkForSizeChanges()};!function(){d.implement(this,h),this.$characterSize={width:0,height:0},this.$testFractionalRect=function(){var a=e.createElement("div");this.$setMeasureNodeStyles(a.style),a.style.width="0.2px",document.documentElement.appendChild(a);var b=a.getBoundingClientRect().width;i=b>0&&1>b?1:100,a.parentNode.removeChild(a)},this.$setMeasureNodeStyles=function(a,b){a.width=a.height="auto",a.left=a.top="-100px",a.visibility="hidden",a.position="fixed",a.whiteSpace="pre",g.isIE<8?a["font-family"]="inherit":a.font="inherit",a.overflow=b?"hidden":"visible"},this.checkForSizeChanges=function(){var a=this.$measureSizes();if(a&&(this.$characterSize.width!==a.width||this.$characterSize.height!==a.height)){this.$measureNode.style.fontWeight="bold";var b=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=a,this.charSizes=Object.create(null),this.allowBoldFonts=b&&b.width===a.width&&b.height===a.height,this._emit("changeCharacterSize",{data:a})}},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer?this.$pollSizeChangesTimer:void 0},this.setPolling=function(a){a?this.$pollSizeChanges():this.$pollSizeChangesTimer&&this.$pollSizeChangesTimer},this.$measureSizes=function(){if(1===i){var a=null;try{a=this.$measureNode.getBoundingClientRect()}catch(b){a={width:0,height:0}}var c={height:a.height,width:a.width}}else var c={height:this.$measureNode.clientHeight,width:this.$measureNode.clientWidth/i};return 0===c.width||0===c.height?null:c},this.$measureCharWidth=function(a){this.$main.innerHTML=f.stringRepeat(a,i);var b=this.$main.getBoundingClientRect();return b.width/i},this.getCharacterWidth=function(a){var b=this.charSizes[a];return void 0===b&&(this.charSizes[a]=this.$measureCharWidth(a)/this.$characterSize.width),b},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)}}.call(j.prototype)}),define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"],function(a,b){"use strict";var d=a("./lib/oop"),e=a("./lib/dom"),f=a("./config"),g=a("./lib/useragent"),h=a("./layer/gutter").Gutter,i=a("./layer/marker").Marker,j=a("./layer/text").Text,k=a("./layer/cursor").Cursor,l=a("./scrollbar").HScrollBar,m=a("./scrollbar").VScrollBar,n=a("./renderloop").RenderLoop,o=a("./layer/font_metrics").FontMetrics,p=a("./lib/event_emitter").EventEmitter,q='.ace_editor {position: relative;overflow: hidden;font-family: \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;font-size: 12px;line-height: normal;direction: ltr;}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;}.ace_content {position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: text;min-width: 100%;}.ace_dragging, .ace_dragging * {cursor: move !important;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;text-indent: -1em;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;}.ace_text-input.ace_composition {background: inherit;color: inherit;z-index: 1000;opacity: 1;text-indent: 0;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;white-space: pre;height: 100%;width: 100%;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;}.ace_text-layer {font: inherit !important;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;border-left: 2px solid}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0px;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_smooth-blinking .ace_cursor {-moz-transition: opacity 0.18s;-webkit-transition: opacity 0.18s;-o-transition: opacity 0.18s;-ms-transition: opacity 0.18s;transition: opacity 0.18s;}.ace_editor.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_line .ace_fold {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;-moz-border-radius: 2px;-webkit-border-radius: 2px;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;display: block;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {-moz-transition: opacity 0.4s ease 0.05s;-webkit-transition: opacity 0.4s ease 0.05s;-o-transition: opacity 0.4s ease 0.05s;-ms-transition: opacity 0.4s ease 0.05s;transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {-moz-transition: opacity 0.05s ease 0.05s;-webkit-transition: opacity 0.05s ease 0.05s;-o-transition: opacity 0.05s ease 0.05s;-ms-transition: opacity 0.05s ease 0.05s;transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}'; e.importCssString(q,"ace_editor");var r=function(a,b){var c=this;this.container=a||e.createElement("div"),this.$keepTextAreaAtCursor=!g.isOldIE,e.addCssClass(this.container,"ace_editor"),this.setTheme(b),this.$gutter=e.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.scroller=e.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=e.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new h(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new i(this.content);var d=this.$textLayer=new j(this.content);this.canvas=d.element,this.$markerFront=new i(this.content),this.$cursorLayer=new k(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new m(this.container,this),this.scrollBarH=new l(this.container,this),this.scrollBarV.addEventListener("scroll",function(a){c.$scrollAnimation||c.session.setScrollTop(a.data-c.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(a){c.$scrollAnimation||c.session.setScrollLeft(a.data-c.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new o(this.container,500),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("changeCharacterSize",function(a){c.updateCharacterSize(),c.onResize(!0,c.gutterWidth,c.$size.width,c.$size.height),c._signal("changeCharacterSize",a)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$loop=new n(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),f.resetOptions(this),f._emit("renderer",this)};!function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,d.implement(this,p),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(a){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=a,a&&this.scrollMargin.top&&a.getScrollTop()<=0&&a.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(a),this.$markerBack.setSession(a),this.$markerFront.setSession(a),this.$gutterLayer.setSession(a),this.$textLayer.setSession(a),a&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(a,b,c){if(void 0===b&&(b=1/0),this.$changedLines?(this.$changedLines.firstRow>a&&(this.$changedLines.firstRow=a),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar()},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(a){a?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(a,b,c,d){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=a?1:0;var e=this.container;d||(d=e.clientHeight||e.scrollHeight),c||(c=e.clientWidth||e.scrollWidth);var f=this.$updateCachedSize(a,b,c,d);if(!this.$size.scrollerHeight||!c&&!d)return this.resizing=0;a&&(this.$gutterLayer.$padding=null),a?this.$renderChanges(f|this.$changes,!0):this.$loop.schedule(f|this.$changes),this.resizing&&(this.resizing=0)}},this.$updateCachedSize=function(a,b,c,d){d-=this.$extraHeight||0;var e=0,f=this.$size,g={width:f.width,height:f.height,scrollerHeight:f.scrollerHeight,scrollerWidth:f.scrollerWidth};return d&&(a||f.height!=d)&&(f.height=d,e|=this.CHANGE_SIZE,f.scrollerHeight=f.height,this.$horizScroll&&(f.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",e|=this.CHANGE_SCROLL),c&&(a||f.width!=c)&&(e|=this.CHANGE_SIZE,f.width=c,null==b&&(b=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=b,this.scrollBarH.element.style.left=this.scroller.style.left=b+"px",f.scrollerWidth=Math.max(0,c-b-this.scrollBarV.getWidth()),this.scrollBarH.element.style.right=this.scroller.style.right=this.scrollBarV.getWidth()+"px",this.scroller.style.bottom=this.scrollBarH.getHeight()+"px",(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||a)&&(e|=this.CHANGE_FULL)),f.$dirty=!c||!d,e&&this._signal("resize",g),e},this.onGutterResize=function(){var a=this.$showGutter?this.$gutter.offsetWidth:0;a!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,a,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))},this.adjustWrapLimit=function(){var a=this.$size.scrollerWidth-2*this.$padding,b=Math.floor(a/this.characterWidth);return this.session.adjustWrapLimit(b,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(a){this.setOption("animatedScroll",a)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(a){this.setOption("showInvisibles",a)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(a){this.setOption("displayIndentGuides",a)},this.setShowPrintMargin=function(a){this.setOption("showPrintMargin",a)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(a){this.setOption("printMarginColumn",a)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(a){return this.setOption("showGutter",a)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(a){this.setOption("fadeFoldWidgets",a)},this.setHighlightGutterLine=function(a){this.setOption("highlightGutterLine",a)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updateGutterLineHighlight=function(){var a=this.$cursorLayer.$pixelPos,b=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var c=this.session.selection.getCursor();c.column=0,a=this.$cursorLayer.getPixelPosition(c,!0),b*=this.session.getRowLength(c.row)}this.$gutterLineHighlight.style.top=a.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=b+"px"},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var a=e.createElement("div");a.className="ace_layer ace_print-margin-layer",this.$printMarginEl=e.createElement("div"),this.$printMarginEl.className="ace_print-margin",a.appendChild(this.$printMarginEl),this.content.insertBefore(a,this.content.firstChild)}var b=this.$printMarginEl.style;b.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",b.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.content},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(this.$keepTextAreaAtCursor){var a=this.layerConfig,b=this.$cursorLayer.$pixelPos.top,c=this.$cursorLayer.$pixelPos.left;b-=a.offset;var d=this.lineHeight;if(!(0>b||b>a.height-d)){var e=this.characterWidth;if(this.$composition){var f=this.textarea.value.replace(/^\x01+/,"");e*=this.session.$getStringScreenWidth(f)[0]+2,d+=2}c-=this.scrollLeft,c>this.$size.scrollerWidth-e&&(c=this.$size.scrollerWidth-e),c+=this.gutterWidth,this.textarea.style.height=d+"px",this.textarea.style.width=e+"px",this.textarea.style.left=Math.min(c,this.$size.scrollerWidth-e)+"px",this.textarea.style.top=Math.min(b,this.$size.height-d)+"px"}}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var a=Math.floor((this.layerConfig.height+this.layerConfig.offset)/this.layerConfig.lineHeight);return this.layerConfig.firstRow-1+a},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(a){this.$padding=a,this.$textLayer.setPadding(a),this.$cursorLayer.setPadding(a),this.$markerFront.setPadding(a),this.$markerBack.setPadding(a),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(a,b,c,d){var e=this.scrollMargin;e.top=0|a,e.bottom=0|b,e.right=0|d,e.left=0|c,e.v=e.top+e.bottom,e.h=e.left+e.right,e.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-e.top),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(a){this.setOption("hScrollBarAlwaysVisible",a)},this.getVScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(a){this.setOption("vScrollBarAlwaysVisible",a)},this.$updateScrollBarV=function(){var a=this.layerConfig.maxHeight,b=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(a-=(b-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>a-b&&(a=this.scrollTop+b,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(a+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(a,b){if(this.$changes&&(a|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!a&&!b)return this.$changes|=a,void 0;if(this.$size.$dirty)return this.$changes|=a,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender");var c=this.layerConfig;return(a&this.CHANGE_FULL||a&this.CHANGE_SIZE||a&this.CHANGE_TEXT||a&this.CHANGE_LINES||a&this.CHANGE_SCROLL||a&this.CHANGE_H_SCROLL)&&(a|=this.$computeLayerConfig(),c=this.layerConfig,this.$updateScrollBarV(),a&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),this.$gutterLayer.element.style.marginTop=-c.offset+"px",this.content.style.marginTop=-c.offset+"px",this.content.style.width=c.width+2*this.$padding+"px",this.content.style.height=c.minHeight+"px"),a&this.CHANGE_H_SCROLL&&(this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),a&this.CHANGE_FULL?(this.$textLayer.update(c),this.$showGutter&&this.$gutterLayer.update(c),this.$markerBack.update(c),this.$markerFront.update(c),this.$cursorLayer.update(c),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this._signal("afterRender"),void 0):a&this.CHANGE_SCROLL?(a&this.CHANGE_TEXT||a&this.CHANGE_LINES?this.$textLayer.update(c):this.$textLayer.scrollLines(c),this.$showGutter&&this.$gutterLayer.update(c),this.$markerBack.update(c),this.$markerFront.update(c),this.$cursorLayer.update(c),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),this._signal("afterRender"),void 0):(a&this.CHANGE_TEXT?(this.$textLayer.update(c),this.$showGutter&&this.$gutterLayer.update(c)):a&this.CHANGE_LINES?(this.$updateLines()||a&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(c):(a&this.CHANGE_TEXT||a&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(c),a&this.CHANGE_CURSOR&&(this.$cursorLayer.update(c),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),a&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(c),a&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(c),this._signal("afterRender"),void 0)},this.$autosize=function(){var a=this.session.getScreenLength()*this.lineHeight,b=this.$maxLines*this.lineHeight,c=Math.max((this.$minLines||1)*this.lineHeight,Math.min(b,a))+this.scrollMargin.v+(this.$extraHeight||0),d=a>b;if(c!=this.desiredHeight||this.$size.height!=this.desiredHeight||d!=this.$vScroll){d!=this.$vScroll&&(this.$vScroll=d,this.scrollBarV.setVisible(d));var e=this.container.clientWidth;this.container.style.height=c+"px",this.$updateCachedSize(!0,this.$gutterWidth,e,c),this.desiredHeight=c,this._signal("autosize")}},this.$computeLayerConfig=function(){this.$maxLines&&this.lineHeight>1&&this.$autosize();var a=this.session,b=this.$size,c=b.height<=2*this.lineHeight,d=this.session.getScreenLength(),e=d*this.lineHeight,f=this.scrollTop%this.lineHeight,g=b.scrollerHeight+this.lineHeight,h=this.$getLongestLine(),i=!c&&(this.$hScrollBarAlwaysVisible||b.scrollerWidth-h-2*this.$padding<0),j=this.$horizScroll!==i;j&&(this.$horizScroll=i,this.scrollBarH.setVisible(i)),!this.$maxLines&&this.$scrollPastEnd&&(e+=(b.scrollerHeight-this.lineHeight)*this.$scrollPastEnd);var k=!c&&(this.$vScrollBarAlwaysVisible||b.scrollerHeight-e<0),l=this.$vScroll!==k;l&&(this.$vScroll=k,this.scrollBarV.setVisible(k)),this.session.setScrollTop(Math.max(-this.scrollMargin.top,Math.min(this.scrollTop,e-b.scrollerHeight+this.scrollMargin.bottom))),this.session.setScrollLeft(Math.max(-this.scrollMargin.left,Math.min(this.scrollLeft,h+2*this.$padding-b.scrollerWidth+this.scrollMargin.right)));var p,q,m=Math.ceil(g/this.lineHeight)-1,n=Math.max(0,Math.round((this.scrollTop-f)/this.lineHeight)),o=n+m,r=this.lineHeight;n=a.screenToDocumentRow(n,0);var s=a.getFoldLine(n);s&&(n=s.start.row),p=a.documentToScreenRow(n,0),q=a.getRowLength(n)*r,o=Math.min(a.screenToDocumentRow(o,0),a.getLength()-1),g=b.scrollerHeight+a.getRowLength(o)*r+q,f=this.scrollTop-p*r;var t=0;return this.layerConfig.width!=h&&(t=this.CHANGE_H_SCROLL),(j||l)&&(t=this.$updateCachedSize(!0,this.gutterWidth,b.width,b.height),this._signal("scrollbarVisibilityChanged"),l&&(h=this.$getLongestLine())),this.layerConfig={width:h,padding:this.$padding,firstRow:n,firstRowScreen:p,lastRow:o,lineHeight:r,characterWidth:this.characterWidth,minHeight:g,maxHeight:e,offset:f,gutterOffset:Math.max(0,Math.ceil((f+b.height-b.scrollerHeight)/r)),height:this.$size.scrollerHeight},t},this.$updateLines=function(){var a=this.$changedLines.firstRow,b=this.$changedLines.lastRow;this.$changedLines=null;var c=this.layerConfig;return a>c.lastRow+1||bf?(b&&(f-=b*this.$size.scrollerHeight),0===f&&(f=-this.scrollMargin.top),this.session.setScrollTop(f)):i+this.$size.scrollerHeight-he?(ec;++c)e.push(f(c/this.STEPS,a,b-a));return e},this.scrollToLine=function(a,b,c,d){var e=this.$cursorLayer.getPixelPosition({row:a,column:0}),f=e.top;b&&(f-=this.$size.scrollerHeight/2);var g=this.scrollTop;this.session.setScrollTop(f),c!==!1&&this.animateScrolling(g,d)},this.animateScrolling=function(a,b){var c=this.scrollTop;if(this.$animatedScroll){var d=this;if(a!=c){if(this.$scrollAnimation){var e=this.$scrollAnimation.steps;if(e.length&&(a=e[0],a==c))return}var f=d.$calcSteps(a,c);this.$scrollAnimation={from:a,to:c,steps:f},clearInterval(this.$timer),d.session.setScrollTop(f.shift()),d.session.$scrollTop=c,this.$timer=setInterval(function(){f.length?(d.session.setScrollTop(f.shift()),d.session.$scrollTop=c):null!=c?(d.session.$scrollTop=-1,d.session.setScrollTop(c),c=null):(d.$timer=clearInterval(d.$timer),d.$scrollAnimation=null,b&&b())},10)}}},this.scrollToY=function(a){this.scrollTop!==a&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=a)},this.scrollToX=function(a){this.scrollLeft!==a&&(this.scrollLeft=a),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(a,b){this.session.setScrollTop(b),this.session.setScrollLeft(b)},this.scrollBy=function(a,b){b&&this.session.setScrollTop(this.session.getScrollTop()+b),a&&this.session.setScrollLeft(this.session.getScrollLeft()+a)},this.isScrollableBy=function(a,b){return 0>b&&this.session.getScrollTop()>=1-this.scrollMargin.top?!0:b>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom?!0:0>a&&this.session.getScrollLeft()>=1-this.scrollMargin.left?!0:a>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right?!0:void 0},this.pixelToScreenCoordinates=function(a,b){var c=this.scroller.getBoundingClientRect(),d=(a+this.scrollLeft-c.left-this.$padding)/this.characterWidth,e=Math.floor((b+this.scrollTop-c.top)/this.lineHeight),f=Math.round(d);return{row:e,column:f,side:d-f>0?1:-1}},this.screenToTextCoordinates=function(a,b){var c=this.scroller.getBoundingClientRect(),d=Math.round((a+this.scrollLeft-c.left-this.$padding)/this.characterWidth),e=(b+this.scrollTop-c.top)/this.lineHeight;return this.session.screenToDocumentPosition(e,Math.max(d,0))},this.textToScreenCoordinates=function(a,b){var c=this.scroller.getBoundingClientRect(),d=this.session.documentToScreenPosition(a,b),e=this.$padding+Math.round(d.column*this.characterWidth),f=d.row*this.lineHeight;return{pageX:c.left+e-this.scrollLeft,pageY:c.top+f-this.scrollTop}},this.visualizeFocus=function(){e.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){e.removeCssClass(this.container,"ace_focus")},this.showComposition=function(){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,e.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(){this.$moveTextAreaToCursor()},this.hideComposition=function(){this.$composition&&(e.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null)},this.setTheme=function(a,b){function g(d){if(c.$themeId!=a)return b&&b();if(d.cssClass){e.importCssString(d.cssText,d.cssClass,c.container.ownerDocument),c.theme&&e.removeCssClass(c.container,c.theme.cssClass);var f="padding"in d?d.padding:"padding"in(c.theme||{})?4:c.$padding;c.$padding&&f!=c.$padding&&c.setPadding(f),c.$theme=d.cssClass,c.theme=d,e.addCssClass(c.container,d.cssClass),e.setCssClass(c.container,"ace_dark",d.isDark),c.$size&&(c.$size.width=0,c.$updateSizeAsync()),c._dispatchEvent("themeLoaded",{theme:d}),b&&b()}}var c=this;if(this.$themeId=a,c._dispatchEvent("themeChange",{theme:a}),a&&"string"!=typeof a)g(a);else{var d=a||this.$options.theme.initialValue;f.loadModule(["theme",d],g)}},this.getTheme=function(){return this.$themeId},this.setStyle=function(a,b){e.setCssClass(this.container,a,b!==!1)},this.unsetStyle=function(a){e.removeCssClass(this.container,a)},this.setCursorStyle=function(a){this.content.style.cursor!=a&&(this.content.style.cursor=a)},this.setMouseCursor=function(a){this.content.style.cursor=a},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}.call(r.prototype),f.defineOptions(r.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(a){this.$textLayer.setShowInvisibles(a)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(a){"number"==typeof a&&(this.$printMarginColumn=a),this.$showPrintMargin=!!a,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(a){this.$gutter.style.display=a?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(a){e.setCssClass(this.$gutter,"ace_fade-fold-widgets",a)},initialValue:!1},showFoldWidgets:{set:function(a){this.$gutterLayer.setShowFoldWidgets(a)},initialValue:!0},showLineNumbers:{set:function(a){this.$gutterLayer.setShowLineNumbers(a),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(a){this.$textLayer.setDisplayIndentGuides(a)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(a){return this.$gutterLineHighlight?(this.$gutterLineHighlight.style.display=a?"":"none",this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight(),void 0):(this.$gutterLineHighlight=e.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",this.$gutter.appendChild(this.$gutterLineHighlight),void 0)},initialValue:!1,value:!0},hScrollBarAlwaysVisible:{set:function(){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(a){"number"==typeof a&&(a+="px"),this.container.style.fontSize=a,this.updateFontSize()},initialValue:12},fontFamily:{set:function(a){this.container.style.fontFamily=a,this.updateFontSize()}},maxLines:{set:function(){this.updateFull()}},minLines:{set:function(){this.updateFull()}},scrollPastEnd:{set:function(a){a=+a||0,this.$scrollPastEnd!=a&&(this.$scrollPastEnd=a,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(a){this.$gutterLayer.$fixedWidth=!!a,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(a){this.setTheme(a)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0}}),b.VirtualRenderer=r}),define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(a,b){"use strict";var d=a("../lib/oop"),e=a("../lib/net"),f=a("../lib/event_emitter").EventEmitter,g=a("../config"),h=function(b,c,d,e){if(this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),a.nameToUrl&&!a.toUrl&&(a.toUrl=a.nameToUrl),g.get("packaged")||!a.toUrl)e=e||g.moduleUrl(c,"worker");else{var f=this.$normalizePath;e=e||f(a.toUrl("ace/worker/worker.js",null,"_"));var h={};b.forEach(function(b){h[b]=f(a.toUrl(b,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}try{this.$worker=new Worker(e)}catch(i){if(!(i instanceof window.DOMException))throw i;var j=this.$workerBlob(e),k=window.URL||window.webkitURL,l=k.createObjectURL(j);this.$worker=new Worker(l),k.revokeObjectURL(l)}this.$worker.postMessage({init:!0,tlns:h,module:c,classname:d}),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};!function(){d.implement(this,f),this.onMessage=function(a){var b=a.data;switch(b.type){case"log":window.console&&console.log&&console.log.apply(console,b.data);break;case"event":this._signal(b.name,{data:b.data});break;case"call":var c=this.callbacks[b.id];c&&(c(b.data),delete this.callbacks[b.id])}},this.$normalizePath=function(a){return e.qualifyURL(a)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc.removeEventListener("change",this.changeListener),this.$doc=null},this.send=function(a,b){this.$worker.postMessage({command:a,args:b})},this.call=function(a,b,c){if(c){var d=this.callbackId++;this.callbacks[d]=c,b.push(d)}this.send(a,b)},this.emit=function(a,b){try{this.$worker.postMessage({event:a,data:{data:b.data}})}catch(c){console.error(c.stack)}},this.attachToDocument=function(a){this.$doc&&this.terminate(),this.$doc=a,this.call("setValue",[a.getValue()]),a.on("change",this.changeListener)},this.changeListener=function(a){this.deltaQueue?this.deltaQueue.push(a.data):(this.deltaQueue=[a.data],setTimeout(this.$sendDeltaQueue,0))},this.$sendDeltaQueue=function(){var a=this.deltaQueue;a&&(this.deltaQueue=null,a.length>20&&a.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:a}))},this.$workerBlob=function(a){var b="importScripts('"+e.qualifyURL(a)+"');";try{return new Blob([b],{type:"application/javascript"})}catch(c){var d=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,f=new d;return f.append(b),f.getBlob("application/javascript")}}}.call(h.prototype);var i=function(a,b,c){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var d=null,e=!1,h=Object.create(f),i=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(a){i.messageBuffer.push(a),d&&(e?setTimeout(j):j())},this.setEmitSync=function(a){e=a};var j=function(){var a=i.messageBuffer.shift();a.command?d[a.command].apply(d,a.args):a.event&&h._signal(a.event,a.data)};h.postMessage=function(a){i.onMessage({data:a})},h.callback=function(a,b){this.postMessage({type:"call",id:b,data:a})},h.emit=function(a,b){this.postMessage({type:"event",name:a,data:b})},g.loadModule(["worker",b],function(a){for(d=new a[c](h);i.messageBuffer.length;)j()})};i.prototype=h.prototype,b.UIWorkerClient=i,b.WorkerClient=h}),define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(a,b){"use strict";var d=a("./range").Range,e=a("./lib/event_emitter").EventEmitter,f=a("./lib/oop"),g=function(a,b,c,d,e,f){var g=this;this.length=b,this.session=a,this.doc=a.getDocument(),this.mainClass=e,this.othersClass=f,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=d,this.$onCursorChange=function(){setTimeout(function(){g.onCursorChange()})},this.$pos=c;var h=a.getUndoManager().$undoStack||a.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=h.length,this.setup(),a.selection.on("changeCursor",this.$onCursorChange)};!function(){f.implement(this,e),this.setup=function(){var a=this,b=this.doc,c=this.session,e=this.$pos;this.selectionBefore=c.selection.toJSON(),c.selection.inMultiSelectMode&&c.selection.toSingleRange(),this.pos=b.createAnchor(e.row,e.column),this.markerId=c.addMarker(new d(e.row,e.column,e.row,e.column+this.length),this.mainClass,null,!1),this.pos.on("change",function(b){c.removeMarker(a.markerId),a.markerId=c.addMarker(new d(b.value.row,b.value.column,b.value.row,b.value.column+a.length),a.mainClass,null,!1)}),this.others=[],this.$others.forEach(function(c){var d=b.createAnchor(c.row,c.column);a.others.push(d)}),c.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var a=this.session,b=this;this.othersActive=!0,this.others.forEach(function(c){c.markerId=a.addMarker(new d(c.row,c.column,c.row,c.column+b.length),b.othersClass,null,!1),c.on("change",function(e){a.removeMarker(c.markerId),c.markerId=a.addMarker(new d(e.value.row,e.value.column,e.value.row,e.value.column+b.length),b.othersClass,null,!1)})})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var a=0;a=this.pos.column&&c.start.column<=this.pos.column+this.length+1){var f=c.start.column-this.pos.column;if(this.length+=e,!this.session.$fromUndo){if("insertText"===b.action)for(var g=this.others.length-1;g>=0;g--){var h=this.others[g],i={row:h.row,column:h.column+f}; h.row===c.start.row&&c.start.column=0;g--){var h=this.others[g],i={row:h.row,column:h.column+f};h.row===c.start.row&&c.start.column=this.pos.column&&b.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",a)):(this.hideOtherMarkers(),this._emit("cursorLeave",a))}},this.detach=function(){this.session.removeMarker(this.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.pos.detach();for(var a=0;ac;c++)a.undo(!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}}.call(g.prototype),b.PlaceHolder=g}),define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(a,b){function f(a,b){return a.row==b.row&&a.column==b.column}function g(a){var b=a.domEvent,c=b.altKey,g=b.shiftKey,h=b.ctrlKey,i=a.getAccelKey(),j=a.getButton();if(h&&e.isMac&&(j=b.button),a.editor.inMultiSelectMode&&2==j)return a.editor.textInput.onContextMenu(a.domEvent),void 0;if(!h&&!c&&!i)return 0===j&&a.editor.inMultiSelectMode&&a.editor.exitMultiSelectMode(),void 0;if(0===j){var w,k=a.editor,l=k.selection,m=k.inMultiSelectMode,n=a.getDocumentPosition(),o=l.getCursor(),p=a.inSelection()||l.isEmpty()&&f(n,o),q=a.x,r=a.y,s=function(a){q=a.clientX,r=a.clientY},t=k.session,u=k.renderer.pixelToScreenCoordinates(q,r),v=u;if(k.$mouseHandler.$enableJumpToDef)h&&c||i&&c?w="add":c&&(w="block");else if(i&&!c){if(w="add",!m&&g)return}else c&&(w="block");if(w&&e.isMac&&b.ctrlKey&&k.$mouseHandler.cancelContextMenu(),"add"==w){if(!m&&p)return;if(!m){var x=l.toOrientedRange();k.addSelectionMarker(x)}var y=l.rangeList.rangeAtPoint(n);k.$blockScrolling++,k.inVirtualSelectionMode=!0,g&&(y=null,x=l.ranges[0],k.removeSelectionMarker(x)),k.once("mouseup",function(){var a=l.toOrientedRange();y&&a.isEmpty()&&f(y.cursor,a.cursor)?l.substractPoint(a.cursor):(g?l.substractPoint(x.cursor):x&&(k.removeSelectionMarker(x),l.addRange(x)),l.addRange(a)),k.$blockScrolling--,k.inVirtualSelectionMode=!1})}else if("block"==w){a.stop(),k.inVirtualSelectionMode=!0;var z,A=[],B=function(){var a=k.renderer.pixelToScreenCoordinates(q,r),b=t.screenToDocumentPosition(a.row,a.column);f(v,a)&&f(b,l.lead)||(v=a,k.selection.moveToPosition(b),k.renderer.scrollCursorIntoView(),k.removeSelectionMarkers(A),A=l.rectangularRangeBlock(v,u),k.$mouseHandler.$clickSelection&&1==A.length&&A[0].isEmpty()&&(A[0]=k.$mouseHandler.$clickSelection.clone()),A.forEach(k.addSelectionMarker,k),k.updateSelectionMarkers())};m&&!i?l.toSingleRange():!m&&i&&(z=l.toOrientedRange(),k.addSelectionMarker(z)),g?u=t.documentToScreenPosition(l.lead):l.moveToPosition(n),v={row:-1,column:-1};var C=function(){clearInterval(E),k.removeSelectionMarkers(A),A.length||(A=[l.toOrientedRange()]),k.$blockScrolling++,z&&(k.removeSelectionMarker(z),l.toSingleRange(z));for(var b=0;b1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),b||this.fromOrientedRange(a)}},this.toSingleRange=function(a){a=a||this.ranges[0];var b=this.rangeList.removeAll();b.length&&this.$onRemoveRange(b),a&&this.fromOrientedRange(a)},this.substractPoint=function(a){var b=this.rangeList.substractPoint(a);return b?(this.$onRemoveRange(b),b[0]):void 0},this.mergeOverlappingRanges=function(){var a=this.rangeList.merge();a.length?this.$onRemoveRange(a):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(a){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(a),this._signal("addRange",{range:a})},this.$onRemoveRange=function(a){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var b=this.rangeList.ranges.pop();a.push(b),this.rangeCount=0}for(var c=a.length;c--;){var d=this.ranges.indexOf(a[c]);this.ranges.splice(d,1)}this._signal("removeRange",{ranges:a}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),b=b||this.ranges[0],b&&!b.isEqual(this.getRange())&&this.fromOrientedRange(b)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new d,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var a=this.rangeList.ranges,b=a[a.length-1],c=e.fromPoints(a[0].start,b.end);this.toSingleRange(),this.setSelectionRange(c,b.cursor==b.start)}else{var c=this.getRange(),d=this.isBackwards(),f=c.start.row,g=c.end.row;if(f==g){if(d)var h=c.end,i=c.start;else var h=c.start,i=c.end;return this.addRange(e.fromPoints(i,i)),this.addRange(e.fromPoints(h,h)),void 0}var j=[],k=this.getLineRange(f,!0);k.start.column=c.start.column,j.push(k);for(var l=f+1;g>l;l++)j.push(this.getLineRange(l,!0));k=this.getLineRange(g,!0),k.end.column=c.end.column,j.push(k),j.forEach(this.addRange,this)}},this.toggleBlockSelection=function(){if(this.rangeCount>1){var a=this.rangeList.ranges,b=a[a.length-1],c=e.fromPoints(a[0].start,b.end);this.toSingleRange(),this.setSelectionRange(c,b.cursor==b.start)}else{var d=this.session.documentToScreenPosition(this.selectionLead),f=this.session.documentToScreenPosition(this.selectionAnchor),g=this.rectangularRangeBlock(d,f);g.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(a,b,c){var d=[],f=a.columng&&(g=0),0>j&&(j=0),j==k&&(c=!0);for(var l=j;k>=l;l++){var m=e.fromPoints(this.session.screenToDocumentPosition(l,g),this.session.screenToDocumentPosition(l,h));if(m.isEmpty()){if(n&&p(m.end,n))break;var n=m.end}m.cursor=f?m.start:m.end,d.push(m)}if(i&&d.reverse(),!c){for(var o=d.length-1;d[o].isEmpty()&&o>0;)o--;if(o>0)for(var q=0;d[q].isEmpty();)q++;for(var r=o;r>=q;r--)d[r].isEmpty()&&d.splice(r,1)}return d}}.call(f.prototype);var o=a("./editor").Editor;!function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(a){a.cursor||(a.cursor=a.end);var b=this.getSelectionStyle();return a.marker=this.session.addMarker(a,"ace_selection",b),this.session.$selectionMarkers.push(a),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,a},this.removeSelectionMarker=function(a){if(a.marker){this.session.removeMarker(a.marker);var b=this.session.$selectionMarkers.indexOf(a);-1!=b&&this.session.$selectionMarkers.splice(b,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(a){for(var b=this.session.$selectionMarkers,c=a.length;c--;){var d=a[c];if(d.marker){this.session.removeMarker(d.marker);var e=b.indexOf(d);-1!=e&&b.splice(e,1)}}this.session.selectionMarkerCount=b.length},this.$onAddRange=function(a){this.addSelectionMarker(a.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(a){this.removeSelectionMarkers(a.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(j.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(j.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(a){var b=a.command,c=a.editor;if(c.multiSelect){if(b.multiSelectAction)"forEach"==b.multiSelectAction?d=c.forEachSelection(b,a.args):"forEachLine"==b.multiSelectAction?d=c.forEachSelection(b,a.args,!0):"single"==b.multiSelectAction?(c.exitMultiSelectMode(),d=b.exec(c,a.args||{})):d=b.multiSelectAction(c,a.args||{});else{var d=b.exec(c,a.args||{});c.multiSelect.addRange(c.multiSelect.toOrientedRange()),c.multiSelect.mergeOverlappingRanges()}return d}},this.forEachSelection=function(a,b,c){if(!this.inVirtualSelectionMode){var k,d=c&&c.keepOrder,e=1==c||c&&c.$byLines,g=this.session,h=this.selection,i=h.rangeList,j=(d?h:i).ranges;if(!j.length)return a.exec?a.exec(this,b||{}):a(this,b||{});var l=h._eventRegistry;h._eventRegistry={};var m=new f(g);this.inVirtualSelectionMode=!0;for(var n=j.length;n--;){if(e)for(;n>0&&j[n].start.row==j[n-1].end.row;)n--;m.fromOrientedRange(j[n]),m.index=n,this.selection=g.selection=m;var o=a.exec?a.exec(this,b||{}):a(this,b||{});k||void 0===o||(k=o),m.toOrientedRange(j[n])}m.detach(),this.selection=g.selection=h,this.inVirtualSelectionMode=!1,h._eventRegistry=l,h.mergeOverlappingRanges();var p=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),p&&p.from==p.to&&this.renderer.animateScrolling(p.from),k}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var a="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var b=this.multiSelect.rangeList.ranges,c=[],d=0;dd.length||c.length<2||!c[1])return this.commands.exec("insertstring",this,a);for(var e=d.length;e--;){var f=d[e];f.isEmpty()||this.session.remove(f),this.session.insert(f.start,c[e])}}},this.findAll=function(a,b,c){if(b=b||{},b.needle=a||b.needle,void 0==b.needle){var d=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();b.needle=this.session.getTextRange(d)}this.$search.set(b);var e=this.$search.findAll(this.session);if(!e.length)return 0;this.$blockScrolling+=1;var f=this.multiSelect;c||f.toSingleRange(e[0]);for(var g=e.length;g--;)f.addRange(e[g],!0);return d&&f.rangeList.rangeAtPoint(d.start)&&f.addRange(d,!0),this.$blockScrolling-=1,e.length},this.selectMoreLines=function(a,b){var c=this.selection.toOrientedRange(),d=c.cursor==c.end,f=this.session.documentToScreenPosition(c.cursor);this.selection.$desiredColumn&&(f.column=this.selection.$desiredColumn);var g=this.session.screenToDocumentPosition(f.row+a,f.column);if(c.isEmpty())var i=g;else var h=this.session.documentToScreenPosition(d?c.end:c.start),i=this.session.screenToDocumentPosition(h.row+a,h.column);if(d){var j=e.fromPoints(g,i);j.cursor=j.start}else{var j=e.fromPoints(i,g);j.cursor=j.end}if(j.desiredColumn=f.column,this.selection.inMultiSelectMode){if(b)var k=c.cursor}else this.selection.addRange(c);this.selection.addRange(j),k&&this.selection.substractPoint(k)},this.transposeSelections=function(a){for(var b=this.session,c=b.multiSelect,d=c.ranges,e=d.length;e--;){var f=d[e];if(f.isEmpty()){var g=b.getWordRange(f.start.row,f.start.column);f.start.row=g.start.row,f.start.column=g.start.column,f.end.row=g.end.row,f.end.column=g.end.column}}c.mergeOverlappingRanges();for(var h=[],e=d.length;e--;){var f=d[e];h.unshift(b.getTextRange(f))}0>a?h.unshift(h.pop()):h.push(h.shift());for(var e=d.length;e--;){var f=d[e],g=f.clone();b.replace(f,h[e]),f.start.row=g.start.row,f.start.column=g.start.column}},this.selectMore=function(a,b,c){var d=this.session,e=d.multiSelect,f=e.toOrientedRange();if(!f.isEmpty()||(f=d.getWordRange(f.start.row,f.start.column),f.cursor=-1==a?f.start:f.end,this.multiSelect.addRange(f),!c)){var g=d.getTextRange(f),h=m(d,g,a);h&&(h.cursor=-1==a?h.start:h.end,this.$blockScrolling+=1,this.session.unfold(h),this.multiSelect.addRange(h),this.$blockScrolling-=1,this.renderer.scrollCursorIntoView(null,.5)),b&&this.multiSelect.substractPoint(f.cursor)}},this.alignCursors=function(){var a=this.session,b=a.multiSelect,c=b.ranges,d=-1,f=c.filter(function(a){return a.cursor.row==d?!0:(d=a.cursor.row,void 0)});if(c.length&&f.length!=c.length-1){f.forEach(function(a){b.substractPoint(a.cursor)});var o=0,p=1/0,q=c.map(function(b){var c=b.cursor,d=a.getLine(c.row),e=d.substr(c.column).search(/\S/g);return-1==e&&(e=0),c.column>o&&(o=c.column),p>e&&(p=e),e});c.forEach(function(b,c){var d=b.cursor,f=o-d.column,g=q[c]-p;f>g?a.insert(d,i.stringRepeat(" ",f-g)):a.remove(new e(d.row,d.column,d.row,d.column-f+g)),b.start.column=b.end.column=o,b.start.row=b.end.row=d.row,b.cursor=b.end}),b.fromOrientedRange(c[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var g=this.selection.getRange(),h=g.start.row,j=g.end.row,k=h==j;if(k){var m,l=this.session.getLength();do m=this.session.getLine(j);while(/[=:]/.test(m)&&++j0);0>h&&(h=0),j>=l&&(j=l-1)}var n=this.session.doc.removeLines(h,j);n=this.$reAlignText(n,k),this.session.doc.insert({row:h,column:0},n.join("\n")+"\n"),k||(g.start.column=0,g.end.column=n[n.length-1].length),this.selection.setRange(g)}},this.$reAlignText=function(a,b){function h(a){return i.stringRepeat(" ",a)}function j(a){return a[2]?h(e)+a[2]+h(f-a[2].length+g)+a[4].replace(/^([=:])\s+/,"$1 "):a[0]}function k(a){return a[2]?h(e+f-a[2].length)+a[2]+h(g," ")+a[4].replace(/^([=:])\s+/,"$1 "):a[0]}function l(a){return a[2]?h(e)+a[2]+h(g)+a[4].replace(/^([=:])\s+/,"$1 "):a[0]}var e,f,g,c=!0,d=!0;return a.map(function(a){var b=a.match(/(\s*)(.*?)(\s*)([=:].*)/);return b?null==e?(e=b[1].length,f=b[2].length,g=b[3].length,b):(e+f+g!=b[1].length+b[2].length+b[3].length&&(d=!1),e!=b[1].length&&(c=!1),e>b[1].length&&(e=b[1].length),fb[3].length&&(g=b[3].length),b):[a]}).map(b?j:c?d?k:j:l)}}.call(o.prototype),b.onSessionChange=function(a){var b=a.session;b&&!b.multiSelect&&(b.$selectionMarkers=[],b.selection.$initRangeList(),b.multiSelect=b.selection),this.multiSelect=b&&b.multiSelect;var c=a.oldSession;c&&(c.multiSelect.off("addRange",this.$onAddRange),c.multiSelect.off("removeRange",this.$onRemoveRange),c.multiSelect.off("multiSelect",this.$onMultiSelect),c.multiSelect.off("singleSelect",this.$onSingleSelect),c.multiSelect.lead.off("change",this.$checkMultiselectChange),c.multiSelect.anchor.off("change",this.$checkMultiselectChange)),b&&(b.multiSelect.on("addRange",this.$onAddRange),b.multiSelect.on("removeRange",this.$onRemoveRange),b.multiSelect.on("multiSelect",this.$onMultiSelect),b.multiSelect.on("singleSelect",this.$onSingleSelect),b.multiSelect.lead.on("change",this.$checkMultiselectChange),b.multiSelect.anchor.on("change",this.$checkMultiselectChange)),b&&this.inMultiSelectMode!=b.selection.inMultiSelectMode&&(b.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},b.MultiSelect=q,a("./config").defineOptions(o.prototype,"editor",{enableMultiselect:{set:function(a){q(this),a?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",g)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",g))},value:!0}})}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};!function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":"markbeginend"==b&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(){return null},this.indentationBlock=function(a,b,c){var e=/\S/,f=a.getLine(b),g=f.search(e);if(-1!=g){for(var h=c||f.length,i=a.getLength(),j=b,k=b;++b=l)break;k=b}}if(k>j){var m=a.getLine(k).length;return new d(j,h,k,m)}}},this.openingBracketBlock=function(a,b,c,e,f){var g={row:c,column:e+1},h=a.$findClosingBracket(b,g,f);if(h){var i=a.foldWidgets[h.row];return null==i&&(i=a.getFoldWidget(h.row)),"start"==i&&h.row>g.row&&(h.row--,h.column=a.getLine(h.row).length),d.fromPoints(g,h)}},this.closingBracketBlock=function(a,b,c,e){var g={row:c,column:e},h=a.$findOpeningBracket(b,g);return h?(h.column++,g.column--,d.fromPoints(h,g)):void 0}}.call(e.prototype)}),define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(a,b){"use strict";b.isDark=!1,b.cssClass="ace-tm",b.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;border-radius: 2px;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],function(a,b){"use strict";function g(a){this.session=a,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.detach=this.detach.bind(this),this.session.on("change",this.updateOnChange)}a("./lib/oop");var e=a("./lib/dom");a("./range").Range,function(){this.getRowLength=function(a){var b;return b=this.lineWidgets?this.lineWidgets[a]&&this.lineWidgets[a].rowCount||0:0,this.$useWrapMode&&this.$wrapData[a]?this.$wrapData[a].length+1+b:1+b},this.$getWidgetScreenLength=function(){var a=0;return this.lineWidgets.forEach(function(b){b&&b.rowCount&&(a+=b.rowCount)}),a},this.attach=function(a){a.widgetManager&&a.widgetManager!=this&&a.widgetManager.detach(),this.editor!=a&&(this.detach(),this.editor=a,this.editor.on("changeSession",this.detach),a.widgetManager=this,a.renderer.on("beforeRender",this.measureWidgets),a.renderer.on("afterRender",this.renderWidgets))},this.detach=function(a){if(!a||a.session!=this.session){var b=this.editor;if(b){b.off("changeSession",this.detach),this.editor=null,b.widgetManager=null,b.renderer.off("beforeRender",this.measureWidgets),b.renderer.off("afterRender",this.renderWidgets);var c=this.session.lineWidgets;c&&c.forEach(function(a){a&&a.el&&a.el.parentNode&&(a._inDocument=!1,a.el.parentNode.removeChild(a.el))})}}},this.updateOnChange=function(a){var b=this.session.lineWidgets;if(b){var c=a.data,d=c.range,e=d.start.row,f=d.end.row-e;if(0===f);else if("removeText"==c.action||"removeLines"==c.action){var g=b.splice(e+1,f);g.forEach(function(a){a&&this.removeLineWidget(a)},this),this.$updateRows()}else{var h=new Array(f);h.unshift(e,0),b.splice.apply(b,h),this.$updateRows()}}},this.$updateRows=function(){var a=this.session.lineWidgets;if(a){var b=!0;a.forEach(function(a,c){a&&(b=!1,a.row=c)}),b&&(this.session.lineWidgets=null)}},this.addLineWidget=function(a){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength())),this.session.lineWidgets[a.row]=a;var b=this.editor.renderer;return a.html&&!a.el&&(a.el=e.createElement("div"),a.el.innerHTML=a.html),a.el&&(e.addCssClass(a.el,"ace_lineWidgetContainer"),a.el.style.position="absolute",a.el.style.zIndex=5,b.container.appendChild(a.el),a._inDocument=!0),a.coverGutter||(a.el.style.zIndex=3),a.pixelHeight||(a.pixelHeight=a.el.offsetHeight),null==a.rowCount&&(a.rowCount=a.pixelHeight/b.layerConfig.lineHeight),this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows(),this.renderWidgets(null,b),a},this.removeLineWidget=function(a){if(a._inDocument=!1,a.el&&a.el.parentNode&&a.el.parentNode.removeChild(a.el),a.editor&&a.editor.destroy)try{a.editor.destroy()}catch(b){}this.session.lineWidgets&&(this.session.lineWidgets[a.row]=void 0),this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows()},this.onWidgetChanged=function(a){this.session._changedWidgets.push(a),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(a,b){var c=this.session._changedWidgets,d=b.layerConfig;if(c&&c.length){for(var e=1/0,f=0;fh&&(h=0)),g.rowCount!=h&&(g.rowCount=h,g.row0&&!d[e];)e--;this.firstRow=c.firstRow,this.lastRow=c.lastRow,b.$cursorLayer.config=c;for(var g=e;f>=g;g++){var h=d[g];if(h&&h.el){h._inDocument||(h._inDocument=!0,b.container.appendChild(h.el));var i=b.$cursorLayer.getPixelPosition({row:g,column:0},!0).top;h.coverLine||(i+=c.lineHeight*this.session.getRowLineCount(h.row)),h.el.style.top=i-c.offset+"px";var j=h.coverGutter?0:b.gutterWidth;h.fixedWidth||(j-=b.scrollLeft),h.el.style.left=j+"px",h.el.style.right=h.fixedWidth?b.scrollBar.getWidth()+"px":""}}}}}.call(g.prototype),b.LineWidgets=g}),define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(a,b){"use strict";function g(a,b,c){for(var d=0,e=a.length-1;e>=d;){var f=d+e>>1,g=c(b,a[f]);if(g>0)d=f+1;else{if(!(0>g))return f;e=f-1}}return-(d+1)}function h(a,b,c){var d=a.getAnnotations().sort(f.comparePoints);if(d.length){var e=g(d,{row:b,column:-1},f.comparePoints);0>e&&(e=-e-1),e>=d.length-1?e=c>0?0:d.length-1:0===e&&0>c&&(e=d.length-1);var h=d[e];if(h&&c){if(h.row===b){do h=d[e+=c];while(h&&h.row===b);if(!h)return d.slice()}var i=[];b=h.row;do i[0>c?"unshift":"push"](h),h=d[e+=c];while(h&&h.row==b);return i.length&&i}}}var d=a("ace/line_widgets").LineWidgets,e=a("ace/lib/dom"),f=a("ace/range").Range;b.showErrorMarker=function(a,b){var c=a.session;c.widgetManager||(c.widgetManager=new d(c),c.widgetManager.attach(a));var f=a.getCursorPosition(),g=f.row,i=c.lineWidgets&&c.lineWidgets[g];i?i.destroy():g-=b;var k,j=h(c,g,b);if(j){var l=j[0];f.column=(l.pos&&"number"!=typeof l.column?l.pos.sc:l.column)||0,f.row=l.row,k=a.renderer.$gutterLayer.$annotations[f.row]}else{if(i)return;k={text:["Looks good!"],className:"ace_ok"}}a.session.unfold(f.row),a.selection.moveToPosition(f);var m={row:f.row,fixedWidth:!0,coverGutter:!0,el:e.createElement("div")},n=m.el.appendChild(e.createElement("div")),o=m.el.appendChild(e.createElement("div"));o.className="error_widget_arrow "+k.className;var p=a.renderer.$cursorLayer.getPixelPosition(f).left;o.style.left=p+a.renderer.gutterWidth-5+"px",m.el.className="error_widget_wrapper",n.className="error_widget "+k.className,n.innerHTML=k.text.join("
"),n.appendChild(e.createElement("div"));var q=function(a,b,c){return 0!==b||"esc"!==c&&"return"!==c?void 0:(m.destroy(),{command:"null"})};m.destroy=function(){a.$mouseHandler.isMousePressed||(a.keyBinding.removeKeyboardHandler(q),c.widgetManager.removeLineWidget(m),a.off("changeSelection",m.destroy),a.off("changeSession",m.destroy),a.off("mouseup",m.destroy),a.off("change",m.destroy))},a.keyBinding.addKeyboardHandler(q),a.on("changeSelection",m.destroy),a.on("changeSession",m.destroy),a.on("mouseup",m.destroy),a.on("change",m.destroy),a.session.widgetManager.addLineWidget(m),m.el.onmousedown=a.focus.bind(a),a.renderer.scrollCursorIntoView(null,.5,{bottom:m.el.offsetHeight}) },e.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")}),define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(a,b){"use strict";a("./lib/fixoldbrowsers");var d=a("./lib/dom"),e=a("./lib/event"),f=a("./editor").Editor,g=a("./edit_session").EditSession,h=a("./undomanager").UndoManager,i=a("./virtual_renderer").VirtualRenderer;a("./worker/worker_client"),a("./keyboard/hash_handler"),a("./placeholder"),a("./multi_select"),a("./mode/folding/fold_mode"),a("./theme/textmate"),a("./ext/error_marker"),b.config=a("./config"),b.require=a,b.edit=function(a){if("string"==typeof a){var c=a;if(a=document.getElementById(c),!a)throw new Error("ace.edit can't find div #"+c)}if(a&&a.env&&a.env.editor instanceof f)return a.env.editor;var g="";if(a&&/input|textarea/i.test(a.tagName)){var h=a;g=h.value,a=d.createElement("pre"),h.parentNode.replaceChild(a,h)}else g=d.getInnerText(a),a.innerHTML="";var j=b.createEditSession(g),k=new f(new i(a));k.setSession(j);var l={document:j,editor:k,onResize:k.resize.bind(k,null)};return h&&(l.textarea=h),e.addListener(window,"resize",l.onResize),k.on("destroy",function(){e.removeListener(window,"resize",l.onResize),l.editor.container.env=null}),k.container.env=k.env=l,k},b.createEditSession=function(a,b){var c=new g(a,b);return c.setUndoManager(new h),c},b.EditSession=g,b.UndoManager=h}),function(){window.require(["ace/ace"],function(a){a&&a.config.init(!0),window.ace||(window.ace=a);for(var b in a)a.hasOwnProperty(b)&&(window.ace[b]=a[b])})}();