/*! For license information please see index.js.LICENSE.txt */ (()=>{var __webpack_modules__={1973(e,t,a){e=a.nmd(e),function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function(e,a,s){"string"==typeof e?(2==arguments.length&&(s=a),t.modules[e]||(t.payloads[e]=s,t.modules[e]=null)):t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var a,s,o=function(e,t,a){if("string"==typeof t){var s=l(e,t);if(null!=s)return a&&a(),s}else if("[object Array]"===Object.prototype.toString.call(t)){for(var o=[],i=0,r=t.length;ia.length)&&(t=a.length),t-=e.length;var s=a.indexOf(e,t);return-1!==s&&s===t})),String.prototype.repeat||s(String.prototype,"repeat",(function(e){for(var t="",a=this;e>0;)1&e&&(t+=a),(e>>=1)&&(a+=a);return t})),String.prototype.includes||s(String.prototype,"includes",(function(e,t){return-1!=this.indexOf(e,t)})),Object.assign||(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),a=1;a>>0,s=0|arguments[1],o=s<0?Math.max(a+s,0):Math.min(s,a),n=arguments[2],i=void 0===n?a:0|n,l=i<0?Math.max(a+i,0):Math.min(i,a);o0;)1&t&&(a+=e),(t>>=1)&&(e+=e);return a};var s=/^\s\s*/,o=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(s,"")},t.stringTrimRight=function(e){return e.replace(o,"")},t.copyObject=function(e){var t={};for(var a in e)t[a]=e[a];return t},t.copyArray=function(e){for(var t=[],a=0,s=e.length;a65535?2:1}})),ace.define("ace/lib/useragent",["require","exports","module"],(function(e,t,a){"use strict";t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var s="object"==typeof navigator?navigator:{},o=(/mac|win|linux/i.exec(s.platform)||["other"])[0].toLowerCase(),n=s.userAgent||"",i=s.appName||"";t.isWin="win"==o,t.isMac="mac"==o,t.isLinux="linux"==o,t.isIE="Microsoft Internet Explorer"==i||i.indexOf("MSAppHost")>=0?parseFloat((n.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((n.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=n.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(n.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(n.split(" Chrome/")[1])||void 0,t.isSafari=parseFloat(n.split(" Safari/")[1])&&!t.isChrome||void 0,t.isEdge=parseFloat(n.split(" Edge/")[1])||void 0,t.isAIR=n.indexOf("AdobeAIR")>=0,t.isAndroid=n.indexOf("Android")>=0,t.isChromeOS=n.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(n)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid})),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],(function(e,t,a){"use strict";var s,o=e("./useragent");t.buildDom=function e(t,a,s){if("string"==typeof t&&t){var o=document.createTextNode(t);return a&&a.appendChild(o),o}if(!Array.isArray(t))return t&&t.appendChild&&a&&a.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var n=[],i=0;i=1.5,o.isChromeOS&&(t.HI_DPI=!1),"undefined"!=typeof document){var r=document.createElement("div");t.HI_DPI&&void 0!==r.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),o.isEdge||void 0===r.style.animationName||(t.HAS_CSS_ANIMATION=!0),r=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,a){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(a)+"px)"}:t.translate=function(e,t,a){e.style.top=Math.round(a)+"px",e.style.left=Math.round(t)+"px"}})),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],(function(e,t,a){"use strict";var s=e("./dom");t.get=function(e,t){var a=new XMLHttpRequest;a.open("GET",e,!0),a.onreadystatechange=function(){4===a.readyState&&t(a.responseText)},a.send(null)},t.loadScript=function(e,t){var a=s.getDocumentHead(),o=document.createElement("script");o.src=e,a.appendChild(o),o.onload=o.onreadystatechange=function(e,a){!a&&o.readyState&&"loaded"!=o.readyState&&"complete"!=o.readyState||(o=o.onload=o.onreadystatechange=null,a||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}})),ace.define("ace/lib/oop",["require","exports","module"],(function(e,t,a){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var a in t)e[a]=t[a];return e},t.implement=function(e,a){t.mixin(e,a)}})),ace.define("ace/lib/event_emitter",["require","exports","module"],(function(e,t,a){"use strict";var s={},o=function(){this.propagationStopped=!0},n=function(){this.defaultPrevented=!0};s._emit=s._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var a=this._eventRegistry[e]||[],s=this._defaultHandlers[e];if(a.length||s){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=o),t.preventDefault||(t.preventDefault=n),a=a.slice();for(var i=0;i1&&(o=a[a.length-2]);var i=r[t+"Path"];return null==i?i=r.basePath:"/"==s&&(t=s=""),i&&"/"!=i.slice(-1)&&(i+="/"),i+t+s+o+this.get("suffix")},t.setModuleUrl=function(e,t){return r.$moduleUrls[e]=t},t.setLoader=function(e){l=e},t.dynamicModules=Object.create(null),t.$loading={},t.$loaded={},t.loadModule=function(a,s){var n;if(Array.isArray(a))var i=a[0],r=a[1];else"string"==typeof a&&(r=a);var d=function(a){if(a&&!t.$loading[r])return s&&s(a);if(t.$loading[r]||(t.$loading[r]=[]),t.$loading[r].push(s),!(t.$loading[r].length>1)){var n=function(){!function(t,a){"ace/theme/textmate"===t||"./theme/textmate"===t?a(0,e("./theme/textmate")):l?l(t,a):console.error("loader is not configured")}(r,(function(e,a){a&&(t.$loaded[r]=a),t._emit("load.module",{name:r,module:a});var s=t.$loading[r];t.$loading[r]=null,s.forEach((function(e){e&&e(a)}))}))};if(!t.get("packaged"))return n();o.loadScript(t.moduleUrl(r,i),n),c()}};if(t.dynamicModules[r])t.dynamicModules[r]().then((function(e){e.default?d(e.default):d(e)}));else{try{n=this.$require(r)}catch(e){}d(n||t.$loaded[r])}},t.$require=function(e){if("function"==typeof a.require)return a.require(e)},t.setModuleLoader=function(e,a){t.dynamicModules[e]=a};var c=function(){r.basePath||r.workerPath||r.modePath||r.themePath||Object.keys(r.$moduleUrls).length||(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),c=function(){})};t.version="1.39.1"})),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],(function(e,t,s){"use strict";e("./lib/fixoldbrowsers");var o=e("./config");o.setLoader((function(t,a){e([t],(function(e){a(null,e)}))}));var n=function(){return this||"undefined"!=typeof window&&window}();function i(t){if(n&&n.document){o.set("packaged",t||e.packaged||s.packaged||n.define&&a.amdD.packaged);var i={},l="",r=document.currentScript||document._currentScript,c=r&&r.ownerDocument||document;r&&r.src&&(l=r.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var d,h=c.getElementsByTagName("script"),p=0;p ["+this.end.row+"/"+this.end.column+"]"},e.prototype.contains=function(e,t){return 0==this.compare(e,t)},e.prototype.compareRange=function(e){var t,a=e.end,s=e.start;return 1==(t=this.compare(a.row,a.column))?1==(t=this.compare(s.row,s.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(s.row,s.column))?-1:1==t?42:0},e.prototype.comparePoint=function(e){return this.compare(e.row,e.column)},e.prototype.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},e.prototype.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},e.prototype.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},e.prototype.isStart=function(e,t){return this.start.row==e&&this.start.column==t},e.prototype.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},e.prototype.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},e.prototype.inside=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)&&!this.isStart(e,t)},e.prototype.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},e.prototype.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},e.prototype.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:tthis.end.column?1:0},e.prototype.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},e.prototype.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.clipRows=function(t,a){if(this.end.row>a)var s={row:a+1,column:0};else this.end.rowa)var o={row:a+1,column:0};else this.start.row1?++h>4&&(h=1):h=1,n.isIE){var i=Math.abs(e.clientX-l)>5||Math.abs(e.clientY-r)>5;c&&!i||(h=1),c&&clearTimeout(c),c=setTimeout((function(){c=null}),a[h-1]||600),1==h&&(l=e.clientX,r=e.clientY)}if(e._clicks=h,s[o]("mousedown",e),h>4)h=0;else if(h>1)return s[o](p[h],e)}Array.isArray(e)||(e=[e]),e.forEach((function(e){d(e,"mousedown",g,i)}))},t.getModifierString=function(e){return o.KEY_MODS[p(e)]},t.addCommandKeyListener=function(e,a,s){var r=null;d(e,"keydown",(function(e){i[e.keyCode]=(i[e.keyCode]||0)+1;var t=function(e,t,a){var s=p(t);if(!a&&t.code&&(a=o.$codeToKeyCode[t.code]||a),!n.isMac&&i){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(s|=8),i.altGr){if(!(3&~s))return;i.altGr=0}if(18===a||17===a){var r=t.location;17===a&&1===r?1==i[a]&&(l=t.timeStamp):18===a&&3===s&&2===r&&t.timeStamp-l<50&&(i.altGr=!0)}}if(a in o.MODIFIER_KEYS&&(a=-1),s||13!==a||3!==t.location||(e(t,s,-a),!t.defaultPrevented)){if(n.isChromeOS&&8&s){if(e(t,s,a),t.defaultPrevented)return;s&=-9}return!!(s||a in o.FUNCTION_KEYS||a in o.PRINTABLE_KEYS)&&e(t,s,a)}}(a,e,e.keyCode);return r=e.defaultPrevented,t}),s),d(e,"keypress",(function(e){r&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),r=null)}),s),d(e,"keyup",(function(e){i[e.keyCode]=null}),s),i||(g(),d(window,"focus",g))},"object"==typeof window&&window.postMessage&&!n.isOldIE){var u=1;t.nextTick=function(e,a){a=a||window;var s="zero-timeout-message-"+u++,o=function(n){n.data==s&&(t.stopPropagation(n),h(a,"message",o),e())};d(a,"message",o),a.postMessage(s,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,a){return setTimeout((function a(){t.$idleBlocked?setTimeout(a,100):e()}),a)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout((function(){t.$idleBlocked=!1}),e||100)},t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}})),ace.define("ace/clipboard",["require","exports","module"],(function(e,t,a){"use strict";var s;a.exports={lineMode:!1,pasteCancelled:function(){return!!(s&&s>Date.now()-50)||(s=!1)},cancel:function(){s=Date.now()}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],(function(e,t,a){"use strict";var s,o=e("../lib/event"),n=e("../config").nls,i=e("../lib/useragent"),l=e("../lib/dom"),r=e("../lib/lang"),c=e("../clipboard"),d=i.isChrome<18,h=i.isIE,p=i.isChrome>63,g=400,u=e("../lib/keys"),m=u.KEY_MODS,v=i.isIOS,b=v?/\s/:/\n/,f=i.isMobile;s=function(e,t){var a=l.createElement("textarea");a.className="ace_text-input",a.setAttribute("wrap","off"),a.setAttribute("autocorrect","off"),a.setAttribute("autocapitalize","off"),a.setAttribute("spellcheck","false"),a.style.opacity="0",e.insertBefore(a,e.firstChild);var s=!1,w=!1,x=!1,y=!1,k="";f||(a.style.fontSize="1px");var C=!1,_=!1,M="",z=0,j=0,L=0,S=Number.MAX_SAFE_INTEGER,$=Number.MIN_SAFE_INTEGER,H=0;try{var T=document.activeElement===a}catch(e){}this.setNumberOfExtraLines=function(e){S=Number.MAX_SAFE_INTEGER,$=Number.MIN_SAFE_INTEGER,H=e<0?0:e},this.setAriaLabel=function(){var e="";if(t.$textInputAriaLabel&&(e+="".concat(t.$textInputAriaLabel,", ")),t.session){var s=t.session.selection.cursor.row;e+=n("text-input.aria-label","Cursor at row $0",[s+1])}a.setAttribute("aria-label",e)},this.setAriaOptions=function(e){e.activeDescendant?(a.setAttribute("aria-haspopup","true"),a.setAttribute("aria-autocomplete",e.inline?"both":"list"),a.setAttribute("aria-activedescendant",e.activeDescendant)):(a.setAttribute("aria-haspopup","false"),a.setAttribute("aria-autocomplete","both"),a.removeAttribute("aria-activedescendant")),e.role&&a.setAttribute("role",e.role),e.setLabel&&(a.setAttribute("aria-roledescription",n("text-input.aria-roledescription","editor")),this.setAriaLabel())},this.setAriaOptions({role:"textbox"}),o.addListener(a,"blur",(function(e){_||(t.onBlur(e),T=!1)}),t),o.addListener(a,"focus",(function(e){if(!_){if(T=!0,i.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),i.isEdge?setTimeout(A):A()}}),t),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:t.renderer.enableKeyboardAccessibility}),k||p||"browser"==this.$focusScroll)return a.focus({preventScroll:!0});var e=a.style.top;a.style.position="fixed",a.style.top="0px";try{var s=0!=a.getBoundingClientRect().top}catch(e){return}var o=[];if(s)for(var n=a.parentElement;n&&1==n.nodeType;)o.push(n),n.setAttribute("ace_nocontext","true"),n=!n.parentElement&&n.getRootNode?n.getRootNode().host:n.parentElement;a.focus({preventScroll:!0}),s&&o.forEach((function(e){e.removeAttribute("ace_nocontext")})),setTimeout((function(){a.style.position="","0px"==a.style.top&&(a.style.top=e)}),0)},this.blur=function(){a.blur()},this.isFocused=function(){return T},t.on("beforeEndOperation",(function(){var e=t.curOp,s=e&&e.command&&e.command.name;if("insertstring"!=s){var o=s&&(e.docChanged||e.selectionChanged);x&&o&&(M=a.value="",W()),A()}})),t.on("changeSelection",this.setAriaLabel);var B=function(e,a){for(var s=a,o=1;o<=e-S&&o<2*H+1;o++)s+=t.session.getLine(e-o).length+1;return s},A=v?function(e){if(T&&(!s||e)&&!y){e||(e="");var o="\n ab"+e+"cde fg\n";o!=a.value&&(a.value=M=o);var n=4+(e.length||(t.selection.isEmpty()?0:1));4==z&&j==n||a.setSelectionRange(4,n),z=4,j=n}}:function(){if(!x&&!y&&(T||N)){x=!0;var e=0,s=0,o="";if(t.session){var n=t.selection,i=n.getRange(),l=n.cursor.row;l===$+1?$=(S=$+1)+2*H:l===S-1?S=($=S-1)-2*H:(l$+1)&&(S=l>H?l-H:0,$=l>H?l+H:2*H);for(var r=[],c=S;c<=$;c++)r.push(t.session.getLine(c));if(o=r.join("\n"),e=B(i.start.row,i.start.column),s=B(i.end.row,i.end.column),i.start.row$){var h=t.session.getLine($+1);s=i.end.row>$+1?h.length:i.end.column,s+=o.length+1,o=o+"\n"+h}else f&&l>0&&(o="\n"+o,s+=1,e+=1);o.length>g&&(e0&&M[p]==e[p];)p++,l--;for(c=c.slice(p),p=1;r>0&&M.length-p>z-1&&M[M.length-p]==e[e.length-p];)p++,r--;d-=p-1,h-=p-1;var g=c.length-p+1;if(g<0&&(l=-g,g=0),c=c.slice(0,g),!(s||c||d||l||r||h))return"";y=!0;var u=!1;return i.isAndroid&&". "==c&&(c=" ",u=!0),c&&!l&&!r&&!d&&!h||C?t.onTextInput(c):t.onTextInput(c,{extendLeft:l,extendRight:r,restoreStart:d,restoreEnd:h}),y=!1,M=e,z=o,j=n,L=h,u?"\n":c},E=function(e){if(x)return q();if(e&&e.inputType){if("historyUndo"==e.inputType)return t.execCommand("undo");if("historyRedo"==e.inputType)return t.execCommand("redo")}var s=a.value,o=P(s,!0);(s.length>500||b.test(o)||f&&z<1&&z==j)&&A()},I=function(e,t,a){var s=e.clipboardData||window.clipboardData;if(s&&!d){var o=h||a?"Text":"text/plain";try{return t?!1!==s.setData(o,t):s.getData(o)}catch(e){if(!a)return I(e,t,!0)}}},O=function(e,n){var i=t.getCopyText();if(!i)return o.preventDefault(e);I(e,i)?(v&&(A(i),s=i,setTimeout((function(){s=!1}),10)),n?t.onCut():t.onCopy(),o.preventDefault(e)):(s=!0,a.value=i,a.select(),setTimeout((function(){s=!1,A(),n?t.onCut():t.onCopy()})))},R=function(e){O(e,!0)},D=function(e){O(e,!1)},F=function(e){var s=I(e);c.pasteCancelled()||("string"==typeof s?(s&&t.onPaste(s,e),i.isIE&&setTimeout(A),o.preventDefault(e)):(a.value="",w=!0))};o.addCommandKeyListener(a,(function(e,a,s){if(!x)return t.onCommandKey(e,a,s)}),t),o.addListener(a,"select",(function(e){x||(s?s=!1:function(e){return 0===e.selectionStart&&e.selectionEnd>=M.length&&e.value===M&&M&&e.selectionEnd!==j}(a)?(t.selectAll(),A()):f&&a.selectionStart!=z&&A())}),t),o.addListener(a,"input",E,t),o.addListener(a,"cut",R,t),o.addListener(a,"copy",D,t),o.addListener(a,"paste",F,t),"oncut"in a&&"oncopy"in a&&"onpaste"in a||o.addListener(e,"keydown",(function(e){if((!i.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:D(e);break;case 86:F(e);break;case 88:R(e)}}),t);var q=function(){if(x&&t.onCompositionUpdate&&!t.$readOnly){if(C)return U();if(x.useTextareaForIME)t.onCompositionUpdate(a.value);else{var e=a.value;P(e),x.markerRange&&(x.context&&(x.markerRange.start.column=x.selectionStart=x.context.compositionStartOffset),x.markerRange.end.column=x.markerRange.start.column+j-x.selectionStart+L)}}},W=function(e){t.onCompositionEnd&&!t.$readOnly&&(x=!1,t.onCompositionEnd(),t.off("mousedown",U),e&&E())};function U(){_=!0,a.blur(),a.focus(),_=!1}var G,Y=r.delayedCall(q,50).schedule.bind(null,null);function Z(){clearTimeout(G),G=setTimeout((function(){k&&(a.style.cssText=k,k=""),t.renderer.$isMousePressed=!1,t.renderer.$keepTextAreaAtCursor&&t.renderer.$moveTextAreaToCursor()}),0)}o.addListener(a,"compositionstart",(function(e){if(!x&&t.onCompositionStart&&!t.$readOnly&&(x={},!C)){e.data&&(x.useTextareaForIME=!1),setTimeout(q,0),t._signal("compositionStart"),t.on("mousedown",U);var s=t.getSelectionRange();s.end.row=s.start.row,s.end.column=s.start.column,x.markerRange=s,x.selectionStart=z,t.onCompositionStart(x),x.useTextareaForIME?(M=a.value="",z=0,j=0):(a.msGetInputContext&&(x.context=a.msGetInputContext()),a.getInputContext&&(x.context=a.getInputContext()))}}),t),o.addListener(a,"compositionupdate",q,t),o.addListener(a,"keyup",(function(e){27==e.keyCode&&a.value.lengthj&&"\n"==M[i]?l=u.end:oj&&M.slice(0,i).split("\n").length>2?l=u.down:i>j&&" "==M[i-1]?(l=u.right,r=m.option):(i>j||i==j&&j!=z&&o==i)&&(l=u.right),o!==i&&(r|=m.shift),l){if(!t.onCommandKey({},r,l)&&t.commands){l=u.keyCodeToString(l);var c=t.commands.findKeyCommand(r,l);c&&t.execCommand(c)}z=o,j=i,A("")}}};document.addEventListener("selectionchange",i),t.on("destroy",(function(){document.removeEventListener("selectionchange",i)}))}(0,t,a),this.destroy=function(){a.parentElement&&a.parentElement.removeChild(a)}},t.TextInput=s,t.$setUserAgentForTests=function(e,t){f=e,v=t}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(e,t,a){"use strict";var s=e("../lib/useragent"),o=function(){function e(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e)),["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach((function(t){e[t]=this[t]}),this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}return e.prototype.onMouseDown=function(e){var t=e.inSelection(),a=e.getDocumentPosition();this.mousedownEvent=e;var o=this.editor,n=e.getButton();return 0!==n?((o.getSelectionRange().isEmpty()||1==n)&&o.selection.moveToPosition(a),void(2==n&&(o.textInput.onContextMenu(e.domEvent),s.isMozilla||e.preventDefault()))):(this.mousedownEvent.time=Date.now(),!t||o.isFocused()||(o.focus(),!this.$focusTimeout||this.$clickSelection||o.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(a,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e)))},e.prototype.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var a=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?a.selection.selectToPosition(e):t||a.selection.moveToPosition(e),t||this.select(),a.setStyle("ace_selecting"),this.setState("select"))},e.prototype.select=function(){var e,t=this.editor,a=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var s=this.$clickSelection.comparePoint(a);if(-1==s)e=this.$clickSelection.end;else if(1==s)e=this.$clickSelection.start;else{var o=n(this.$clickSelection,a);a=o.cursor,e=o.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(a),t.renderer.scrollCursorIntoView()},e.prototype.extendSelectionBy=function(e){var t,a=this.editor,s=a.renderer.screenToTextCoordinates(this.x,this.y),o=a.selection[e](s.row,s.column);if(this.$clickSelection){var i=this.$clickSelection.comparePoint(o.start),l=this.$clickSelection.comparePoint(o.end);if(-1==i&&l<=0)t=this.$clickSelection.end,o.end.row==s.row&&o.end.column==s.column||(s=o.start);else if(1==l&&i>=0)t=this.$clickSelection.start,o.start.row==s.row&&o.start.column==s.column||(s=o.end);else if(-1==i&&1==l)s=o.end,t=o.start;else{var r=n(this.$clickSelection,s);s=r.cursor,t=r.anchor}a.selection.setSelectionAnchor(t.row,t.column)}a.selection.selectToPosition(s),a.renderer.scrollCursorIntoView()},e.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},e.prototype.focusWait=function(){var e,t,a,s,o=(e=this.mousedownEvent.x,t=this.mousedownEvent.y,a=this.x,s=this.y,Math.sqrt(Math.pow(a-e,2)+Math.pow(s-t,2))),n=Date.now();(o>0||n-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},e.prototype.onDoubleClick=function(e){var t=e.getDocumentPosition(),a=this.editor,s=a.session.getBracketRange(t);s?(s.isEmpty()&&(s.start.column--,s.end.column++),this.setState("select")):(s=a.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=s,this.select()},e.prototype.onTripleClick=function(e){var t=e.getDocumentPosition(),a=this.editor;this.setState("selectByLines");var s=a.getSelectionRange();s.isMultiLine()&&s.contains(t.row,t.column)?(this.$clickSelection=a.selection.getLineRange(s.start.row),this.$clickSelection.end=a.selection.getLineRange(s.end.row).end):this.$clickSelection=a.selection.getLineRange(t.row),this.select()},e.prototype.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},e.prototype.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var a=this.$lastScroll,s=e.domEvent.timeStamp,o=s-a.t,n=o?e.wheelX/o:a.vx,i=o?e.wheelY/o:a.vy;o<550&&(n=(n+a.vx)/2,i=(i+a.vy)/2);var l=Math.abs(n/i),r=!1;return l>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(r=!0),l<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(r=!0),r?a.allowed=s:s-a.allowed<550&&(Math.abs(n)<=1.5*Math.abs(a.vx)&&Math.abs(i)<=1.5*Math.abs(a.vy)?(r=!0,a.allowed=s):a.allowed=0),a.t=s,a.vx=n,a.vy=i,r?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}},e}();function n(e,t){if(e.start.row==e.end.row)var a=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)a=2*t.row-e.start.row-e.end.row;else a=t.column-4;return a<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}o.prototype.selectEnd=o.prototype.selectByLinesEnd,o.prototype.selectAllEnd=o.prototype.selectByLinesEnd,o.prototype.selectByWordsEnd=o.prototype.selectByLinesEnd,t.DefaultHandlers=o})),ace.define("ace/lib/scroll",["require","exports","module"],(function(e,t,a){t.preventParentScroll=function(e){e.stopPropagation();var t=e.currentTarget;t.scrollHeight>t.clientHeight||e.preventDefault()}})),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],(function(e,t,a){"use strict";var s,o=this&&this.__extends||(s=function(e,t){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])},s(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,a=t&&e[t],s=0;if(a)return a.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&s>=e.length&&(e=void 0),{value:e&&e[s++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=e("./lib/dom"),l=(e("./lib/event"),e("./range").Range),r=e("./lib/scroll").preventParentScroll,c="ace_tooltip",d=function(){function e(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}return e.prototype.$init=function(){return this.$element=i.createElement("div"),this.$element.className=c,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},e.prototype.getElement=function(){return this.$element||this.$init()},e.prototype.setText=function(e){this.getElement().textContent=e},e.prototype.setHtml=function(e){this.getElement().innerHTML=e},e.prototype.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},e.prototype.setClassName=function(e){i.addCssClass(this.getElement(),e)},e.prototype.setTheme=function(e){this.$element.className=c+" "+(e.isDark?"ace_dark ":"")+(e.cssClass||"")},e.prototype.show=function(e,t,a){null!=e&&this.setText(e),null!=t&&null!=a&&this.setPosition(t,a),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},e.prototype.hide=function(e){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=c,this.isOpen=!1)},e.prototype.getHeight=function(){return this.getElement().offsetHeight},e.prototype.getWidth=function(){return this.getElement().offsetWidth},e.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},e}(),h=new(function(){function e(){this.popups=[]}return e.prototype.addPopup=function(e){this.popups.push(e),this.updatePopups()},e.prototype.removePopup=function(e){var t=this.popups.indexOf(e);-1!==t&&(this.popups.splice(t,1),this.updatePopups())},e.prototype.updatePopups=function(){var e,t,a,s;this.popups.sort((function(e,t){return t.priority-e.priority}));var o=[];try{for(var i=n(this.popups),l=i.next();!l.done;l=i.next()){var r=l.value,c=!0;try{for(var d=(a=void 0,n(o)),h=d.next();!h.done;h=d.next()){var p=h.value;if(this.doPopupsOverlap(p,r)){c=!1;break}}}catch(e){a={error:e}}finally{try{h&&!h.done&&(s=d.return)&&s.call(d)}finally{if(a)throw a.error}}c?o.push(r):r.hide()}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}},e.prototype.doPopupsOverlap=function(e,t){var a=e.getElement().getBoundingClientRect(),s=t.getElement().getBoundingClientRect();return a.lefts.left&&a.tops.top},e}());t.popupManager=h,t.Tooltip=d;var p=function(e){function t(t){void 0===t&&(t=document.body);var a=e.call(this,t)||this;a.timeout=void 0,a.lastT=0,a.idleTime=350,a.lastEvent=void 0,a.onMouseOut=a.onMouseOut.bind(a),a.onMouseMove=a.onMouseMove.bind(a),a.waitForHover=a.waitForHover.bind(a),a.hide=a.hide.bind(a);var s=a.getElement();return s.style.whiteSpace="pre-wrap",s.style.pointerEvents="auto",s.addEventListener("mouseout",a.onMouseOut),s.tabIndex=-1,s.addEventListener("blur",function(){s.contains(document.activeElement)||this.hide()}.bind(a)),s.addEventListener("wheel",r),a}return o(t,e),t.prototype.addToEditor=function(e){e.on("mousemove",this.onMouseMove),e.on("mousedown",this.hide),e.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},t.prototype.removeFromEditor=function(e){e.off("mousemove",this.onMouseMove),e.off("mousedown",this.hide),e.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},t.prototype.onMouseMove=function(e,t){this.lastEvent=e,this.lastT=Date.now();var a=t.$mouseHandler.isMousePressed;if(this.isOpen){var s=this.lastEvent&&this.lastEvent.getDocumentPosition();this.range&&this.range.contains(s.row,s.column)&&!a&&!this.isOutsideOfText(this.lastEvent)||this.hide()}this.timeout||a||(this.lastEvent=e,this.timeout=setTimeout(this.waitForHover,this.idleTime))},t.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var e=Date.now()-this.lastT;this.idleTime-e>10?this.timeout=setTimeout(this.waitForHover,this.idleTime-e):(this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor))},t.prototype.isOutsideOfText=function(e){var t=e.editor,a=e.getDocumentPosition(),s=t.session.getLine(a.row);if(a.column==s.length){var o=t.renderer.pixelToScreenCoordinates(e.clientX,e.clientY),n=t.session.documentToScreenPosition(a.row,a.column);if(n.column!=o.column||n.row!=o.row)return!0}return!1},t.prototype.setDataProvider=function(e){this.$gatherData=e},t.prototype.showForRange=function(e,t,a,s){if(!(s&&s!=this.lastEvent||this.isOpen&&document.activeElement==this.getElement())){var o=e.renderer;this.isOpen||(h.addPopup(this),this.$registerCloseEvents(),this.setTheme(o.theme)),this.isOpen=!0,this.addMarker(t,e.session),this.range=l.fromPoints(t.start,t.end);var n=o.textToScreenCoordinates(t.start.row,t.start.column),i=o.scroller.getBoundingClientRect();n.pageX=e.length&&(e=void 0),{value:e&&e[s++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=e("../lib/dom"),l=e("../lib/event"),r=e("../tooltip").Tooltip,c=e("../config").nls;t.GUTTER_TOOLTIP_LEFT_OFFSET=5,t.GUTTER_TOOLTIP_TOP_OFFSET=3,t.GutterHandler=function(e){var t,a,s=e.editor,o=s.renderer.$gutterLayer,n=new d(s,!0);function r(e){e&&"keydown"===e.type&&(e.ctrlKey||e.metaKey)||(!e||"mouseout"!==e.type||e.relatedTarget&&!n.getElement().contains(e.relatedTarget))&&(t&&(t=clearTimeout(t)),n.isOpen&&(n.hideTooltip(),s.off("mousewheel",r),s.off("changeSession",r),window.removeEventListener("keydown",r,!0)))}function c(e){n.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",(function(t){if(s.isFocused()&&0==t.getButton()&&"foldWidgets"!=o.getRegion(t)){var a=t.getDocumentPosition().row,n=s.session.selection;if(t.getShiftKey())n.selectTo(a,0);else{if(2==t.domEvent.detail)return s.selectAll(),t.preventDefault();e.$clickSelection=s.selection.getLineRange(a)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}})),e.editor.setDefaultHandler("guttermousemove",(function(l){var d=l.domEvent.target||l.domEvent.srcElement;if(i.hasCssClass(d,"ace_fold-widget"))return r();n.isOpen&&e.$tooltipFollowsMouse&&c(l),a=l,t||(t=setTimeout((function(){t=null,a&&!e.isMousePressed&&function(){var t=a.getDocumentPosition().row;if(t==s.session.getLength()){var i=s.renderer.pixelToScreenCoordinates(0,a.y).row,l=a.$pos;if(i>s.session.documentToScreenRow(l.row,l.column))return r()}if(n.showTooltip(t),n.isOpen)if(s.on("mousewheel",r),s.on("changeSession",r),window.addEventListener("keydown",r,!0),e.$tooltipFollowsMouse)c(a);else{var d=a.getGutterRow(),h=o.$lines.get(d);if(h){var p=h.element.querySelector(".ace_gutter_annotation").getBoundingClientRect(),g=n.getElement().style;g.left=p.right-5+"px",g.top=p.bottom-3+"px"}else c(a)}}()}),50))})),l.addListener(s.renderer.$gutter,"mouseout",(function(e){a=null,n.isOpen&&(t=setTimeout((function(){t=null,r(e)}),50))}),s)};var d=function(e){function t(t,a){void 0===a&&(a=!1);var s=e.call(this,t.container)||this;s.editor=t,s.visibleTooltipRow;var o=s.getElement();return o.setAttribute("role","tooltip"),o.style.pointerEvents="auto",a&&(s.onMouseOut=s.onMouseOut.bind(s),o.addEventListener("mouseout",s.onMouseOut)),s}return o(t,e),t.prototype.onMouseOut=function(e){this.isOpen&&e.relatedTarget&&!this.getElement().contains(e.relatedTarget)&&(e&&e.currentTarget.contains(e.relatedTarget)||this.hideTooltip())},t.prototype.setPosition=function(e,t){var a=window.innerWidth||document.documentElement.clientWidth,s=window.innerHeight||document.documentElement.clientHeight,o=this.getWidth(),n=this.getHeight();(e+=15)+o>a&&(e-=e+o-a),(t+=15)+n>s&&(t-=20+n),r.prototype.setPosition.call(this,e,t)},Object.defineProperty(t,"annotationLabels",{get:function(){return{error:{singular:c("gutter-tooltip.aria-label.error.singular","error"),plural:c("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:c("gutter-tooltip.aria-label.security.singular","security finding"),plural:c("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:c("gutter-tooltip.aria-label.warning.singular","warning"),plural:c("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:c("gutter-tooltip.aria-label.info.singular","information message"),plural:c("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:c("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:c("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),t.prototype.showTooltip=function(e){var a,s,o=this.editor.renderer.$gutterLayer,n=o.$annotations[e];s=n?{displayText:Array.from(n.displayText),type:Array.from(n.type)}:{displayText:[],type:[]};var l=o.session.getFoldLine(e);if(l&&o.$showFoldedAnnotations){for(var r,c={error:[],security:[],warning:[],info:[],hint:[]},d={error:1,security:2,warning:3,info:4,hint:5},h=e+1;h<=l.end.row;h++)if(o.$annotations[h])for(var p=0;p5?v=null:s-v>=200&&(t.renderer.scrollCursorIntoView(),v=null)})(p=t.renderer.screenToTextCoordinates(r,c),e),function(e,a){var s=Date.now(),o=t.renderer.layerConfig.lineHeight,n=t.renderer.layerConfig.characterWidth,i=t.renderer.scroller.getBoundingClientRect(),l={x:{left:r-i.left,right:i.right-r},y:{top:c-i.top,bottom:i.bottom-c}},d=Math.min(l.x.left,l.x.right),h=Math.min(l.y.top,l.y.bottom),p={row:e.row,column:e.column};d/n<=2&&(p.column+=l.x.left=200&&t.renderer.scrollCursorIntoView(p):m=s:m=null}(p,e)}function y(){h=t.selection.toOrientedRange(),i=t.session.addMarker(h,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(d),x(),d=setInterval(x,20),w=0,o.addListener(document,"mousemove",_)}function k(){clearInterval(d),t.session.removeMarker(i),i=null,t.selection.fromOrientedRange(h),t.isFocused()&&!u&&t.$resetCursorStyle(),h=null,p=null,w=0,m=null,v=null,o.removeListener(document,"mousemove",_)}this.onDragStart=function(e){if(this.cancelDrag||!f.draggable){var s=this;return setTimeout((function(){s.startSelect(),s.captureMouse(e)}),0),e.preventDefault()}h=t.getSelectionRange();var o=e.dataTransfer;o.effectAllowed=t.getReadOnly()?"copy":"copyMove",t.container.appendChild(a),o.setDragImage&&o.setDragImage(a,0,0),setTimeout((function(){t.container.removeChild(a)})),o.clearData(),o.setData("Text",t.session.getTextRange()),u=!0,this.setState("drag")},this.onDragEnd=function(e){if(f.draggable=!1,u=!1,this.setState(null),!t.getReadOnly()){var a=e.dataTransfer.dropEffect;g||"move"!=a||t.session.remove(t.getSelectionRange()),t.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&M(e.dataTransfer))return r=e.clientX,c=e.clientY,i||y(),w++,e.dataTransfer.dropEffect=g=z(e),o.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&M(e.dataTransfer))return r=e.clientX,c=e.clientY,i||(y(),w++),null!==C&&(C=null),e.dataTransfer.dropEffect=g=z(e),o.preventDefault(e)},this.onDragLeave=function(e){if(--w<=0&&i)return k(),g=null,o.preventDefault(e)},this.onDrop=function(e){if(p){var a=e.dataTransfer;if(u)switch(g){case"move":h=h.contains(p.row,p.column)?{start:p,end:p}:t.moveText(h,p);break;case"copy":h=t.moveText(h,p,!0)}else{var s=a.getData("Text");h={start:p,end:t.session.insert(p,s)},t.focus(),g=null}return k(),o.preventDefault(e)}},o.addListener(f,"dragstart",this.onDragStart.bind(e),t),o.addListener(f,"dragend",this.onDragEnd.bind(e),t),o.addListener(f,"dragenter",this.onDragEnter.bind(e),t),o.addListener(f,"dragover",this.onDragOver.bind(e),t),o.addListener(f,"dragleave",this.onDragLeave.bind(e),t),o.addListener(f,"drop",this.onDrop.bind(e),t);var C=null;function _(){null==C&&(C=setTimeout((function(){null!=C&&i&&k()}),20))}function M(e){var t=e.types;return!t||Array.prototype.some.call(t,(function(e){return"text/plain"==e||"Text"==e}))}function z(e){var t=["copy","copymove","all","uninitialized"],a=n.isMac?e.altKey:e.ctrlKey,s="uninitialized";try{s=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var o="none";return a&&t.indexOf(s)>=0?o="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(s)>=0?o="move":t.indexOf(s)>=0&&(o="copy"),o}}function l(e,t,a,s){return Math.sqrt(Math.pow(a-e,2)+Math.pow(s-t,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=n.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;n.isIE&&"dragReady"==this.state&&l(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop(),"dragWait"===this.state&&l(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,a=e.inSelection(),s=e.getButton();if(1===(e.domEvent.detail||1)&&0===s&&a){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var o=e.domEvent.target||e.domEvent.srcElement;"unselectable"in o&&(o.unselectable="on"),t.getDragDelay()?(n.isWebKit&&(this.cancelDrag=!0,t.container.draggable=!0),this.setState("dragWait")):this.startDrag(),this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(i.prototype),t.DragdropHandler=i})),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],(function(e,t,a){"use strict";var s=e("./mouse_event").MouseEvent,o=e("../lib/event"),n=e("../lib/dom");t.addTouchListeners=function(e,t){var a,i,l,r,c,d,h,p,g,u="scroll",m=0,v=0,b=0,f=0;function w(){if(t.getOption("enableMobileMenu")){g||(l=window.navigator&&window.navigator.clipboard,r=!1,c=function(e){return t.commands.canExecute(e,t)},d=function(e){var a,s,o=e.target.getAttribute("action");if("more"==o||!r)return r=!r,a=t.getCopyText(),s=t.session.getUndoManager().hasUndo(),void g.replaceChild(n.buildDom(r?["span",!a&&c("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],a&&c("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],a&&c("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],l&&c("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],s&&c("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],c("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],c("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),g.firstChild);"paste"==o?l.readText().then((function(e){t.execCommand(o,e)})):o&&("cut"!=o&&"copy"!=o||(l?l.writeText(t.getCopyText()):document.execCommand("copy")),t.execCommand(o)),g.firstChild.style.display="none",r=!1,"openCommandPalette"!=o&&t.focus()},g=n.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(e){u="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),d(e)},onclick:d},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],t.container));var e=t.selection.cursor,a=t.renderer.textToScreenCoordinates(e.row,e.column),s=t.renderer.textToScreenCoordinates(0,0).pageX,o=t.renderer.scrollLeft,i=t.container.getBoundingClientRect();g.style.top=a.pageY-i.top-3+"px",a.pageX-i.left1)return clearTimeout(c),c=null,l=-1,void(u="zoom");p=t.$mouseHandler.isMousePressed=!0;var n=t.renderer.layerConfig.lineHeight,d=t.renderer.layerConfig.lineHeight,g=e.timeStamp;r=g;var w=o[0],x=w.clientX,k=w.clientY;Math.abs(a-x)+Math.abs(i-k)>n&&(l=-1),a=e.clientX=x,i=e.clientY=k,b=f=0;var C=new s(e,t);if(h=C.getDocumentPosition(),g-l<500&&1==o.length&&!m)v++,e.preventDefault(),e.button=0,function(){c=null,clearTimeout(c),t.selection.moveToPosition(h);var e=v>=2?t.selection.getLineRange(h.row):t.session.getBracketRange(h);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),u="wait"}();else{v=0;var _=t.selection.cursor,M=t.selection.isEmpty()?_:t.selection.anchor,z=t.renderer.$cursorLayer.getPixelPosition(_,!0),j=t.renderer.$cursorLayer.getPixelPosition(M,!0),L=t.renderer.scroller.getBoundingClientRect(),S=t.renderer.layerConfig.offset,$=t.renderer.scrollLeft,H=function(e,t){return(e/=d)*e+(t=t/n-.75)*t};if(e.clientXB?"cursor":"anchor"),u=B<3.5?"anchor":T<3.5?"cursor":"scroll",c=setTimeout(y,450)}l=g}),t),o.addListener(e,"touchend",(function(e){p=t.$mouseHandler.isMousePressed=!1,d&&clearInterval(d),"zoom"==u?(u="",m=0):c?(t.selection.moveToPosition(h),m=0,w()):"scroll"==u?(m+=60,d=setInterval((function(){m--<=0&&(clearInterval(d),d=null),Math.abs(b)<.01&&(b=0),Math.abs(f)<.01&&(f=0),m<20&&(b*=.9),m<20&&(f*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*b,10*f),e==t.session.getScrollTop()&&(m=0)}),10),x()):w(),clearTimeout(c),c=null}),t),o.addListener(e,"touchmove",(function(e){c&&(clearTimeout(c),c=null);var o=e.touches;if(!(o.length>1||"zoom"==u)){var n=o[0],l=a-n.clientX,d=i-n.clientY;if("wait"==u){if(!(l*l+d*d>4))return e.preventDefault();u="cursor"}a=n.clientX,i=n.clientY,e.clientX=n.clientX,e.clientY=n.clientY;var h=e.timeStamp,p=h-r;if(r=h,"scroll"==u){var g=new s(e,t);g.speed=1,g.wheelX=l,g.wheelY=d,10*Math.abs(l)=e){for(n=h+1;n=e;)n++;for(l=h,r=n-1;l=t.length||2!=(r=a[o-1])&&3!=r||2!=(c=t[o+1])&&3!=c?4:(n&&(c=3),c==r?c:4);case 10:return 2==(r=o>0?a[o-1]:5)&&o+10&&2==a[o-1])return 2;if(n)return 4;for(g=o+1,p=t.length;g=1425&&m<=2303||64286==m;if(r=t[g],v&&(1==r||7==r))return 1}return o<1||5==(r=t[o-1])?4:a[o-1];case 5:return n=!1,i=!0,s;case 6:return l=!0,4;case 13:case 14:case 16:case 17:case 15:n=!1;case h:return 4}}function v(e){var t=e.charCodeAt(0),a=t>>8;return 0==a?t>191?0:p[t]:5==a?/[\u0591-\u05f4]/.test(e)?1:0:6==a?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?12:/[\u0660-\u0669\u066b-\u066c]/.test(e)?3:1642==t?d:/[\u06f0-\u06f9]/.test(e)?2:7:32==a&&t<=8287?g[255&t]:254==a&&t>=65136?7:4}t.L=0,t.R=1,t.EN=2,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="·",t.doBidiReorder=function(e,a,d){if(e.length<2)return{};var p=e.split(""),g=new Array(p.length),b=new Array(p.length),f=[];s=d?1:0,function(e,t,a,d){var h=s?c:r,p=null,g=null,u=null,b=0,f=null,w=-1,x=null,y=null,k=[];if(!d)for(x=0,d=[];x0)if(16==f){for(x=w;x-1){for(x=w;x=0&&8==d[C];C--)t[C]=s}}(p,f,p.length,a);for(var w=0;w7&&a[w]<13||4===a[w]||a[w]===h)?f[w]=t.ON_R:w>0&&"ل"===p[w-1]&&/\u0622|\u0623|\u0625|\u0627/.test(p[w])&&(f[w-1]=f[w]=t.R_H,w++);for(p[p.length-1]===t.DOT&&(f[p.length-1]=t.B),"‫"===p[0]&&(f[0]=t.RLE),w=0;w=0&&(e=this.session.$docRowCache[a])}return e},e.prototype.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var a,s=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(a=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===s;)s=a,e++;else e=this.currentRow;return e},e.prototype.updateRowLine=function(e,t){void 0===e&&(e=this.getDocumentRow());var a=e===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var n=this.session.$wrapData[e];n&&(void 0===t&&(t=this.getSplitIndex()),t>0&&n.length?(this.wrapIndent=n.indent,this.wrapOffset=this.wrapIndent*this.charWidths[s.L],this.line=tt?this.session.getOverwrite()?e:e-1:t,o=s.getVisualFromLogicalIdx(a,this.bidiMap),n=this.bidiMap.bidiLevels,i=0;!this.session.getOverwrite()&&e<=t&&n[o]%2!=0&&o++;for(var l=0;lt&&n[o]%2==0&&(i+=this.charWidths[n[o]]),this.wrapIndent&&(i+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(i+=this.rtlLineOffset),i},e.prototype.getSelections=function(e,t){var a,s=this.bidiMap,o=s.bidiLevels,n=[],i=0,l=Math.min(e,t)-this.wrapIndent,r=Math.max(e,t)-this.wrapIndent,c=!1,d=!1,h=0;this.wrapIndent&&(i+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var p,g=0;g=l&&pa+n/2;){if(a+=n,s===o.length-1){n=0;break}n=this.charWidths[o[++s]]}return s>0&&o[s-1]%2!=0&&o[s]%2==0?(e0&&o[s-1]%2==0&&o[s]%2!=0?t=1+(e>a?this.bidiMap.logicalFromVisual[s]:this.bidiMap.logicalFromVisual[s-1]):this.isRtlDir&&s===o.length-1&&0===n&&o[s-1]%2==0||!this.isRtlDir&&0===s&&o[s]%2!=0?t=1+this.bidiMap.logicalFromVisual[s]:(s>0&&o[s-1]%2!=0&&0!==n&&s--,t=this.bidiMap.logicalFromVisual[s]),0===t&&this.isRtlDir&&t++,t+this.wrapIndent},e}();t.BidiHandler=i})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(e,t,a){"use strict";var s=e("./lib/oop"),o=e("./lib/lang"),n=e("./lib/event_emitter").EventEmitter,i=e("./range").Range,l=function(){function e(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",(function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),t.$isEmpty||t.$silent||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)})),this.anchor.on("change",(function(){t.$anchorChanged=!0,t.$isEmpty||t.$silent||t._emit("changeSelection")}))}return e.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},e.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},e.prototype.getCursor=function(){return this.lead.getPosition()},e.prototype.setAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},e.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},e.prototype.getSelectionLead=function(){return this.lead.getPosition()},e.prototype.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},e.prototype.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?i.fromPoints(t,t):this.isBackwards()?i.fromPoints(t,e):i.fromPoints(e,t)},e.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},e.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},e.prototype.setRange=function(e,t){var a=t?e.end:e.start,s=t?e.start:e.end;this.$setSelection(a.row,a.column,s.row,s.column)},e.prototype.$setSelection=function(e,t,a,s){if(!this.$silent){var o=this.$isEmpty,n=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(a,s),this.$isEmpty=!i.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||o!=this.$isEmpty||n)&&this._emit("changeSelection")}},e.prototype.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},e.prototype.selectTo=function(e,t){this.$moveSelection((function(){this.moveCursorTo(e,t)}))},e.prototype.selectToPosition=function(e){this.$moveSelection((function(){this.moveCursorToPosition(e)}))},e.prototype.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},e.prototype.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},e.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},e.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},e.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},e.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},e.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},e.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},e.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},e.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},e.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},e.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},e.prototype.getWordRange=function(e,t){if(void 0===t){var a=e||this.lead;e=a.row,t=a.column}return this.session.getWordRange(e,t)},e.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},e.prototype.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},e.prototype.getLineRange=function(e,t){var a,s="number"==typeof e?e:this.lead.row,o=this.session.getFoldLine(s);return o?(s=o.start.row,a=o.end.row):a=s,!0===t?new i(s,0,a,this.session.getLine(a).length):new i(s,0,a+1,0)},e.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},e.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},e.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},e.prototype.wouldMoveIntoSoftTab=function(e,t,a){var s=e.column,o=e.column+t;return a<0&&(s=e.column-t,o=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(s,o).split(" ").length-1==t},e.prototype.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var a=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,a,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-a):this.moveCursorBy(0,-1)}},e.prototype.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(t.column=s)}}this.moveCursorTo(t.row,t.column)},e.prototype.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},e.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},e.prototype.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,a=this.doc.getLine(e),s=a.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var o=this.session.getFoldAt(e,t,1);if(o)this.moveCursorTo(o.end.row,o.end.column);else{if(this.session.nonTokenRe.exec(s)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,s=a.substring(t)),t>=a.length)return this.moveCursorTo(e,a.length),this.moveCursorRight(),void(e0&&this.moveCursorWordLeft());this.session.tokenRe.exec(n)&&(a-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,a)}},e.prototype.$shortWordEndIndex=function(e){var t,a=0,s=/\s/,o=this.session.tokenRe;if(o.lastIndex=0,this.session.tokenRe.exec(e))a=this.session.tokenRe.lastIndex;else{for(;(t=e[a])&&s.test(t);)a++;if(a<1)for(o.lastIndex=0;(t=e[a])&&!o.test(t);)if(o.lastIndex=0,a++,s.test(t)){if(a>2){a--;break}for(;(t=e[a])&&s.test(t);)a++;if(a>2)break}}return o.lastIndex=0,a},e.prototype.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,a=this.doc.getLine(e),s=a.substring(t),o=this.session.getFoldAt(e,t,1);if(o)return this.moveCursorTo(o.end.row,o.end.column);if(t==a.length){var n=this.doc.getLength();do{e++,s=this.doc.getLine(e)}while(e0&&/^\s*$/.test(s));a=s.length,/\s+$/.test(s)||(s="")}var n=o.stringReverse(s),i=this.$shortWordEndIndex(n);return this.moveCursorTo(t,a-i)},e.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},e.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},e.prototype.moveCursorBy=function(e,t){var a,s=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(s.row,this.lead.row)?(a=this.session.$bidiHandler.getPosLeft(s.column),s.column=Math.round(a/this.session.$bidiHandler.charWidths[0])):a=s.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?s.column=this.$desiredColumn:this.$desiredColumn=s.column),0!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var o=this.session.lineWidgets[this.lead.row];e<0?e-=o.rowsAbove||0:e>0&&(e+=o.rowCount-(o.rowsAbove||0))}var n=this.session.screenToDocumentPosition(s.row+e,s.column,a);0!==e&&0===t&&n.row===this.lead.row&&(n.column,this.lead.column),this.moveCursorTo(n.row,n.column+t,0===t)},e.prototype.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},e.prototype.moveCursorTo=function(e,t,a){var s=this.session.getFoldAt(e,t,1);s&&(e=s.start.row,t=s.start.column),this.$keepDesiredColumnOnChange=!0;var o=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(o.charAt(t))&&o.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,a||(this.$desiredColumn=null)},e.prototype.moveCursorToScreen=function(e,t,a){var s=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(s.row,s.column,a)},e.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},e.prototype.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},e.prototype.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},e.prototype.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var a=this.getCursor();return i.fromPoints(t,a)}catch(e){return i.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},e.prototype.toJSON=function(){if(this.rangeCount)var e=this.ranges.map((function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t}));else(e=this.getRange()).isBackwards=this.isBackwards();return e},e.prototype.fromJSON=function(e){if(null==e.start){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var a=i.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(a.cursor=a.start),this.addRange(a,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},e.prototype.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0},e}();l.prototype.setSelectionAnchor=l.prototype.setAnchor,l.prototype.getSelectionAnchor=l.prototype.getAnchor,l.prototype.setSelectionRange=l.prototype.setRange,s.implement(l.prototype,n),t.Selection=l})),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],(function(e,t,a){"use strict";var s=e("./lib/report_error").reportError,o=2e3,n=function(){function e(e){for(var t in this.splitRegex,this.states=e,this.regExps={},this.matchMappings={},this.states){for(var a=this.states[t],s=[],o=0,n=this.matchMappings[t]={defaultToken:"text"},i="g",l=[],r=0;r1?this.$applyToken:c.token),h>1&&(/\\\d/.test(c.regex)?d=c.regex.replace(/\\([0-9]+)/g,(function(e,t){return"\\"+(parseInt(t,10)+o+1)})):(h=1,d=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||l.push(c)),n[o]=r,o+=h,s.push(d),c.onMatch||(c.onMatch=null)}}s.length||(n[0]=0,s.push("$")),l.forEach((function(e){e.splitRegex=this.createSplitterRegexp(e.regex,i)}),this),this.regExps[t]=new RegExp("("+s.join(")|(")+")|($)",i)}}return e.prototype.$setMaxTokenCount=function(e){o=0|e},e.prototype.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),a=this.token.apply(this,t);if("string"==typeof a)return[{type:a,value:e}];for(var s=[],o=0,n=a.length;od){var b=e.substring(d,v-m.length);p.type==g?p.value+=b:(p.type&&c.push(p),p={type:g,value:b})}for(var f=0;fo){for(h>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});d1&&a[0]!==s&&a.unshift("#tmp",s),{tokens:c,state:a.length?a:s}},e}();n.prototype.reportError=s,t.Tokenizer=n})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],(function(e,t,a){"use strict";var s,o=e("../lib/deep_copy").deepCopy;(function(){this.addRules=function(e,t){if(t)for(var a in e){for(var s=e[a],o=0;o=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},e.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},e.prototype.getCurrentTokenRow=function(){return this.$row},e.prototype.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,a=e[t].start;if(void 0!==a)return a;for(a=0;t>0;)a+=e[t-=1].value.length;return a},e.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},e.prototype.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new s(this.$row,t,this.$row,t+e.value.length)},e}();t.TokenIterator=o})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(e,t,a){"use strict";var s,o,n=e("../../lib/oop"),i=e("../behaviour").Behaviour,l=e("../../token_iterator").TokenIterator,r=e("../../lib/lang"),c=["text","paren.rparen","rparen","paren","punctuation.operator"],d=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],h={},p={'"':'"',"'":"'"},g=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,h.rangeCount!=e.multiSelect.rangeCount&&(h={rangeCount:e.multiSelect.rangeCount})),h[t])return s=h[t];s=h[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},u=function(e,t,a,s){var o=e.end.row-e.start.row;return{text:a+t+s,selection:[0,e.start.column+1,o,e.end.column+(o?0:1)]}};(o=function(e){e=e||{},this.add("braces","insertion",(function(t,a,n,i,l){var c=n.getCursorPosition(),d=i.doc.getLine(c.row);if("{"==l){g(n);var h=n.getSelectionRange(),p=i.doc.getTextRange(h),m=i.getTokenAt(c.row,c.column);if(""!==p&&"{"!==p&&n.getWrapBehavioursEnabled())return u(h,p,"{","}");if(m&&/(?:string)\.quasi|\.xml/.test(m.type)){if([/tag\-(?:open|name)/,/attribute\-name/].some((function(e){return e.test(m.type)}))||/(string)\.quasi/.test(m.type)&&"$"!==m.value[c.column-m.start-1])return;return o.recordAutoInsert(n,i,"}"),{text:"{}",selection:[1,1]}}if(o.isSaneInsertion(n,i))return/[\]\}\)]/.test(d[c.column])||n.inMultiSelectMode||e.braces?(o.recordAutoInsert(n,i,"}"),{text:"{}",selection:[1,1]}):(o.recordMaybeInsert(n,i,"{"),{text:"{",selection:[1,1]})}else if("}"==l){if(g(n),"}"==d.substring(c.column,c.column+1)&&null!==i.$findOpeningBracket("}",{column:c.column+1,row:c.row})&&o.isAutoInsertedClosing(c,d,l))return o.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==l||"\r\n"==l){g(n);var v="";if(o.isMaybeInsertedClosing(c,d)&&(v=r.stringRepeat("}",s.maybeInsertedBrackets),o.clearMaybeInsertedClosing()),"}"===d.substring(c.column,c.column+1)){var b=i.findMatchingBracket({row:c.row,column:c.column+1},"}");if(!b)return null;var f=this.$getIndent(i.getLine(b.row))}else{if(!v)return void o.clearMaybeInsertedClosing();f=this.$getIndent(d)}var w=f+i.getTabString();return{text:"\n"+w+"\n"+f+v,selection:[1,w.length,1,w.length]}}o.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(e,t,a,o,n){var i=o.doc.getTextRange(n);if(!n.isMultiLine()&&"{"==i){if(g(a),"}"==o.doc.getLine(n.start.row).substring(n.end.column,n.end.column+1))return n.end.column++,n;s.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(e,t,a,s,n){if("("==n){g(a);var i=a.getSelectionRange(),l=s.doc.getTextRange(i);if(""!==l&&a.getWrapBehavioursEnabled())return u(i,l,"(",")");if(o.isSaneInsertion(a,s))return o.recordAutoInsert(a,s,")"),{text:"()",selection:[1,1]}}else if(")"==n){g(a);var r=a.getCursorPosition(),c=s.doc.getLine(r.row);if(")"==c.substring(r.column,r.column+1)&&null!==s.$findOpeningBracket(")",{column:r.column+1,row:r.row})&&o.isAutoInsertedClosing(r,c,n))return o.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("parens","deletion",(function(e,t,a,s,o){var n=s.doc.getTextRange(o);if(!o.isMultiLine()&&"("==n&&(g(a),")"==s.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)))return o.end.column++,o})),this.add("brackets","insertion",(function(e,t,a,s,n){if("["==n){g(a);var i=a.getSelectionRange(),l=s.doc.getTextRange(i);if(""!==l&&a.getWrapBehavioursEnabled())return u(i,l,"[","]");if(o.isSaneInsertion(a,s))return o.recordAutoInsert(a,s,"]"),{text:"[]",selection:[1,1]}}else if("]"==n){g(a);var r=a.getCursorPosition(),c=s.doc.getLine(r.row);if("]"==c.substring(r.column,r.column+1)&&null!==s.$findOpeningBracket("]",{column:r.column+1,row:r.row})&&o.isAutoInsertedClosing(r,c,n))return o.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("brackets","deletion",(function(e,t,a,s,o){var n=s.doc.getTextRange(o);if(!o.isMultiLine()&&"["==n&&(g(a),"]"==s.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)))return o.end.column++,o})),this.add("string_dquotes","insertion",(function(e,t,a,s,o){var n=s.$mode.$quotes||p;if(1==o.length&&n[o]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(o))return;g(a);var i=o,l=a.getSelectionRange(),r=s.doc.getTextRange(l);if(!(""===r||1==r.length&&n[r])&&a.getWrapBehavioursEnabled())return u(l,r,i,i);if(!r){var c=a.getCursorPosition(),d=s.doc.getLine(c.row),h=d.substring(c.column-1,c.column),m=d.substring(c.column,c.column+1),v=s.getTokenAt(c.row,c.column),b=s.getTokenAt(c.row,c.column+1);if("\\"==h&&v&&/escape/.test(v.type))return null;var f,w=v&&/string|escape/.test(v.type),x=!b||/string|escape/.test(b.type);if(m==i)(f=w!==x)&&/string\.end/.test(b.type)&&(f=!1);else{if(w&&!x)return null;if(w&&x)return null;var y=s.$mode.tokenRe;y.lastIndex=0;var k=y.test(h);y.lastIndex=0;var C=y.test(m),_=s.$mode.$pairQuotesAfter;if(!(_&&_[i]&&_[i].test(h))&&k||C)return null;if(m&&!/[\s;,.})\]\\]/.test(m))return null;var M=d[c.column-2];if(h==i&&(M==i||y.test(M)))return null;f=!0}return{text:f?i+i:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(e,t,a,s,o){var n=s.$mode.$quotes||p,i=s.doc.getTextRange(o);if(!o.isMultiLine()&&n.hasOwnProperty(i)&&(g(a),s.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)==i))return o.end.column++,o})),!1!==e.closeDocComment&&this.add("doc comment end","insertion",(function(e,t,a,s,o){if("doc-start"===e&&("\n"===o||"\r\n"===o)&&a.selection.isEmpty()){var n=a.getCursorPosition();if(0===n.column)return;for(var i=s.doc.getLine(n.row),l=s.doc.getLine(n.row+1),r=s.getTokens(n.row),c=0,d=0;d=n.column){if(c===n.column){if(!/\.doc/.test(h.type))return;if(/\*\//.test(h.value)){var p=r[d+1];if(!p||!/\.doc/.test(p.type))return}}var g=n.column-(c-h.value.length),u=h.value.indexOf("*/"),m=h.value.indexOf("/**",u>-1?u+2:0);if(-1!==m&&g>m&&g=u&&g<=m||!/\.doc/.test(h.type))return;break}}var v=this.$getIndent(i);if(/\s*\*/.test(l))return/^\s*\*/.test(i)?{text:o+v+"* ",selection:[1,2+v.length,1,2+v.length]}:{text:o+v+" * ",selection:[1,3+v.length,1,3+v.length]};if(/\/\*\*/.test(i.substring(0,n.column)))return{text:o+v+" * "+o+" "+v+"*/",selection:[1,4+v.length,1,4+v.length]}}}))}).isSaneInsertion=function(e,t){var a=e.getCursorPosition(),s=new l(t,a.row,a.column);if(!this.$matchTokenType(s.getCurrentToken()||"text",c)){if(/[)}\]]/.test(e.session.getLine(a.row)[a.column]))return!0;var o=new l(t,a.row,a.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",c))return!1}return s.stepForward(),s.getCurrentTokenRow()!==a.row||this.$matchTokenType(s.getCurrentToken()||"text",d)},o.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},o.recordAutoInsert=function(e,t,a){var o=e.getCursorPosition(),n=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,n,s.autoInsertedLineEnd[0])||(s.autoInsertedBrackets=0),s.autoInsertedRow=o.row,s.autoInsertedLineEnd=a+n.substr(o.column),s.autoInsertedBrackets++},o.recordMaybeInsert=function(e,t,a){var o=e.getCursorPosition(),n=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,n)||(s.maybeInsertedBrackets=0),s.maybeInsertedRow=o.row,s.maybeInsertedLineStart=n.substr(0,o.column)+a,s.maybeInsertedLineEnd=n.substr(o.column),s.maybeInsertedBrackets++},o.isAutoInsertedClosing=function(e,t,a){return s.autoInsertedBrackets>0&&e.row===s.autoInsertedRow&&a===s.autoInsertedLineEnd[0]&&t.substr(e.column)===s.autoInsertedLineEnd},o.isMaybeInsertedClosing=function(e,t){return s.maybeInsertedBrackets>0&&e.row===s.maybeInsertedRow&&t.substr(e.column)===s.maybeInsertedLineEnd&&t.substr(0,e.column)==s.maybeInsertedLineStart},o.popAutoInsertedClosing=function(){s.autoInsertedLineEnd=s.autoInsertedLineEnd.substr(1),s.autoInsertedBrackets--},o.clearMaybeInsertedClosing=function(){s&&(s.maybeInsertedBrackets=0,s.maybeInsertedRow=-1)},n.inherits(o,i),t.CstyleBehaviour=o})),ace.define("ace/unicode",["require","exports","module"],(function(e,t,a){"use strict";for(var s=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],o=0,n=[],i=0;i2?s%r!=r-1:s%r==0})}else{if(!this.blockComment)return!1;var g=this.blockComment.start,u=this.blockComment.end,m=new RegExp("^(\\s*)(?:"+c.escapeRegExp(g)+")"),v=new RegExp("(?:"+c.escapeRegExp(u)+")\\s*$"),b=function(e,t){w(e,t)||n&&!/\S/.test(e)||(o.insertInLine({row:t,column:e.length},u),o.insertInLine({row:t,column:l},g))},f=function(e,t){var a;(a=e.match(v))&&o.removeInLine(t,e.length-a[0].length,e.length),(a=e.match(m))&&o.removeInLine(t,a[1].length,a[0].length)},w=function(e,a){if(m.test(e))return!0;for(var s=t.getTokens(a),o=0;oe.length&&(y=e.length)})),l==1/0&&(l=y,n=!1,i=!1),d&&l%r!=0&&(l=Math.floor(l/r)*r),x(i?f:b)},this.toggleBlockComment=function(e,t,a,s){var o=this.blockComment;if(o){!o.start&&o[0]&&(o=o[0]);var n,i,l=(m=new d(t,s.row,s.column)).getCurrentToken(),r=(t.selection,t.selection.toOrientedRange());if(l&&/comment/.test(l.type)){for(var c,p;l&&/comment/.test(l.type);){if(-1!=(v=l.value.indexOf(o.start))){var g=m.getCurrentTokenRow(),u=m.getCurrentTokenColumn()+v;c=new h(g,u,g,u+o.start.length);break}l=m.stepBackward()}var m;for(l=(m=new d(t,s.row,s.column)).getCurrentToken();l&&/comment/.test(l.type);){var v;if(-1!=(v=l.value.indexOf(o.end))){g=m.getCurrentTokenRow(),u=m.getCurrentTokenColumn()+v,p=new h(g,u,g,u+o.end.length);break}l=m.stepForward()}p&&t.remove(p),c&&(t.remove(c),n=c.start.row,i=-o.start.length)}else i=o.start.length,n=a.start.row,t.insert(a.end,o.end),t.insert(a.start,o.start);r.start.row==n&&(r.start.column+=i),r.end.row==n&&(r.end.column+=i),t.selection.fromOrientedRange(r)}},this.getNextLineIndent=function(e,t,a){return this.$getIndent(t)},this.checkOutdent=function(e,t,a){return!1},this.autoOutdent=function(e,t,a){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)if(e[t]){var a=e[t],s=a.prototype.$id,n=o.$modes[s];n||(o.$modes[s]=n=new a),o.$modes[t]||(o.$modes[t]=n),this.$embeds.push(t),this.$modes[t]=n}var i=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],l=function(e){var t,a,s;s=(t=r)[a=i[e]],t[i[e]]=function(){return this.$delegator(a,arguments,s)}},r=this;for(t=0;tt[a].column&&a++,n.unshift(a,0),t.splice.apply(t,n),this.$updateRows()}}},e.prototype.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach((function(e,a){if(e)for(t=!1,e.row=a;e.$oldWidget;)e.$oldWidget.row=a,e=e.$oldWidget})),t&&(this.session.lineWidgets=null)}},e.prototype.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e},e.prototype.addLineWidget=function(e){if(this.$registerLineWidget(e),e.session=this.session,!this.editor)return e;var t=this.editor.renderer;e.html&&!e.el&&(e.el=s.createElement("div"),e.el.innerHTML=e.html),e.text&&!e.el&&(e.el=s.createElement("div"),e.el.textContent=e.text),e.el&&(s.addCssClass(e.el,"ace_lineWidgetContainer"),e.className&&s.addCssClass(e.el,e.className),e.el.style.position="absolute",e.el.style.zIndex="5",t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex="3"),null==e.pixelHeight&&(e.pixelHeight=e.el.offsetHeight)),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight);var a=this.session.getFoldAt(e.row,0);if(e.$fold=a,a){var o=this.session.lineWidgets;e.row!=a.end.row||o[a.start.row]?e.hidden=!0:o[a.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e),e},e.prototype.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(e){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},e.prototype.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,a=t&&t[e],s=[];a;)s.push(a),a=a.$oldWidget;return s},e.prototype.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},e.prototype.measureWidgets=function(e,t){var a=this.session._changedWidgets,s=t.layerConfig;if(a&&a.length){for(var o=1/0,n=0;n0&&!s[o];)o--;this.firstRow=a.firstRow,this.lastRow=a.lastRow,t.$cursorLayer.config=a;for(var i=o;i<=n;i++){var l=s[i];if(l&&l.el)if(l.hidden)l.el.style.top=-100-(l.pixelHeight||0)+"px";else{l._inDocument||(l._inDocument=!0,t.container.appendChild(l.el));var r=t.$cursorLayer.getPixelPosition({row:i,column:0},!0).top;l.coverLine||(r+=a.lineHeight*this.session.getRowLineCount(l.row)),l.el.style.top=r-a.offset+"px";var c=l.coverGutter?0:t.gutterWidth;l.fixedWidth||(c-=t.scrollLeft),l.el.style.left=c+"px",l.fullWidth&&l.screenWidth&&(l.el.style.minWidth=a.width+2*a.padding+"px"),l.fixedWidth?l.el.style.right=t.scrollBar.getWidth()+"px":l.el.style.right=""}}}},e}();t.LineWidgets=o})),ace.define("ace/apply_delta",["require","exports","module"],(function(e,t,a){"use strict";t.applyDelta=function(e,t,a){var s=t.start.row,o=t.start.column,n=e[s]||"";switch(t.action){case"insert":if(1===t.lines.length)e[s]=n.substring(0,o)+t.lines[0]+n.substring(o);else{var i=[s,1].concat(t.lines);e.splice.apply(e,i),e[s]=n.substring(0,o)+e[s],e[s+t.lines.length-1]+=n.substring(o)}break;case"remove":var l=t.end.column,r=t.end.row;s===r?e[s]=n.substring(0,o)+n.substring(l):e.splice(s,r-s+1,n.substring(0,o)+e[r].substring(l))}}})),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,a){"use strict";var s=e("./lib/oop"),o=e("./lib/event_emitter").EventEmitter,n=function(){function e(e,t,a){this.$onChange=this.onChange.bind(this),this.attach(e),"number"!=typeof t?this.setPosition(t.row,t.column):this.setPosition(t,a)}return e.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},e.prototype.getDocument=function(){return this.document},e.prototype.onChange=function(e){if(!(e.start.row==e.end.row&&e.start.row!=this.row||e.start.row>this.row)){var t=function(e,t,a){var s="insert"==e.action,o=(s?1:-1)*(e.end.row-e.start.row),n=(s?1:-1)*(e.end.column-e.start.column),l=e.start,r=s?l:e.end;return i(t,l,a)?{row:t.row,column:t.column}:i(r,t,!a)?{row:t.row+o,column:t.column+(t.row==r.row?n:0)}:{row:l.row,column:l.column}}(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(t.row,t.column,!0)}},e.prototype.setPosition=function(e,t,a){var s;if(s=a?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=s.row||this.column!=s.column){var o={row:this.row,column:this.column};this.row=s.row,this.column=s.column,this._signal("change",{old:o,value:s})}},e.prototype.detach=function(){this.document.off("change",this.$onChange)},e.prototype.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},e.prototype.$clipPositionToDocument=function(e,t){var a={};return e>=this.document.getLength()?(a.row=Math.max(0,this.document.getLength()-1),a.column=this.document.getLine(a.row).length):e<0?(a.row=0,a.column=0):(a.row=e,a.column=Math.min(this.document.getLine(a.row).length,Math.max(0,t))),t<0&&(a.column=0),a},e}();function i(e,t,a){var s=a?e.column<=t.column:e.column=a&&(e=a-1,t=void 0);var s=this.getLine(e);return null==t&&(t=s.length),{row:e,column:t=Math.min(Math.max(t,0),s.length)}},e.prototype.clonePos=function(e){return{row:e.row,column:e.column}},e.prototype.pos=function(e,t){return{row:e,column:t}},e.prototype.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},e.prototype.insertFullLines=function(e,t){var a=0;(e=Math.min(Math.max(e,0),this.getLength()))0,s=t=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},e.prototype.replace=function(e,t){return e instanceof i||(e=i.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},e.prototype.applyDeltas=function(e){for(var t=0;t=0;t--)this.revertDelta(e[t])},e.prototype.applyDelta=function(e,t){var a="insert"==e.action;(a?e.lines.length<=1&&!e.lines[0]:!i.comparePoints(e.start,e.end))||(a&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(o(this.$lines,e,t),this._signal("change",e)))},e.prototype.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row20){a.running=setTimeout(a.$worker,20);break}}a.currentLine=t,-1==s&&(s=t),n<=s&&a.fireUpdateEvent(n,s)}}}return e.prototype.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},e.prototype.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},e.prototype.fireUpdateEvent=function(e,t){var a={first:e,last:t};this._signal("update",{data:a})},e.prototype.start=function(e){this.currentLine=Math.min(e||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)},e.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},e.prototype.$updateOnChange=function(e){var t=e.start.row,a=e.end.row-t;if(0===a)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,a+1,null),this.states.splice(t,a+1,null);else{var s=Array(a+1);s.unshift(t,1),this.lines.splice.apply(this.lines,s),this.states.splice.apply(this.states,s)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},e.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},e.prototype.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},e.prototype.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},e.prototype.$tokenizeRow=function(e){var t=this.doc.getLine(e),a=this.states[e-1],s=this.tokenizer.getLineTokens(t,a,e);return this.states[e]+""!=s.state+""?(this.states[e]=s.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=s.tokens},e.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},e}();s.implement(n.prototype,o),t.BackgroundTokenizer=n})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],(function(e,t,a){"use strict";var s=e("./lib/lang"),o=e("./range").Range,n=function(){function e(e,t,a){void 0===a&&(a="text"),this.setRegexp(e),this.clazz=t,this.type=a,this.docLen=0}return e.prototype.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},e.prototype.update=function(e,t,a,n){if(this.regExp){for(var i=n.firstRow,l=n.lastRow,r={},c=a.$editor.$search,d=c.$isMultilineSearch(a.$editor.getLastSearchOptions()),h=i;h<=l;h++){var p=this.cache[h];if(null==p||a.getValue().length!=this.docLen){if(d){p=[];var g=c.$multiLineForward(a,this.regExp,h,l);if(g){var u=g.endRow<=l?g.endRow-1:l;u>h&&(h=u),p.push(new o(g.startRow,g.startCol,g.endRow,g.endCol))}p.length>this.MAX_RANGES&&(p=p.slice(0,this.MAX_RANGES))}else(p=s.getMatchOffsets(a.getLine(h),this.regExp)).length>this.MAX_RANGES&&(p=p.slice(0,this.MAX_RANGES)),p=p.map((function(e){return new o(h,e.offset,h,e.offset+e.length)}));this.cache[h]=p.length?p:""}if(0!==p.length)for(var m=p.length;m--;){var v=p[m].toScreenRange(a),b=v.toString();r[b]||(r[b]=!0,t.drawSingleLineMarker(e,v,this.clazz,n))}}this.docLen=a.getValue().length}},e}();n.prototype.MAX_RANGES=500,t.SearchHighlight=n})),ace.define("ace/undomanager",["require","exports","module","ace/range"],(function(e,t,a){"use strict";var s=function(){function e(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return e.prototype.addSession=function(e){this.$session=e},e.prototype.add=function(e,t,a){if(!this.$fromUndo&&e!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),!1===t||!this.lastDeltas){this.lastDeltas=[];var s=this.$undoStack.length;s>this.$undoDepth-1&&this.$undoStack.splice(0,s-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev}"remove"!=e.action&&"insert"!=e.action||(this.$lastDelta=e),this.lastDeltas.push(e)}},e.prototype.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},e.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},e.prototype.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var a=this.$undoStack,s=a.length;s--;){var o=a[s][0];if(o.id<=e)break;o.id0},e.prototype.canRedo=function(){return this.$redoStack.length>0},e.prototype.bookmark=function(e){null==e&&(e=this.$rev),this.mark=e},e.prototype.isAtBookmark=function(){return this.$rev===this.mark},e.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},e.prototype.fromJSON=function(e){this.reset(),this.$undoStack=e.$undoStack,this.$redoStack=e.$redoStack},e.prototype.$prettyPrint=function(e){return e?l(e):l(this.$undoStack)+"\n---\n"+l(this.$redoStack)},e}();s.prototype.hasUndo=s.prototype.canUndo,s.prototype.hasRedo=s.prototype.canRedo,s.prototype.isClean=s.prototype.isAtBookmark,s.prototype.markClean=s.prototype.bookmark;var o=e("./range").Range,n=o.comparePoints;function i(e){return{row:e.row,column:e.column}}function l(e){if(e=e||this,Array.isArray(e))return e.map(l).join("\n");var t="";return e.action?(t="insert"==e.action?"+":"-",t+="["+e.lines+"]"):e.value&&(t=Array.isArray(e.value)?e.value.map(r).join("\n"):r(e.value)),e.start&&(t+=r(e)),(e.id||e.rev)&&(t+="\t("+(e.id||e.rev)+")"),t}function r(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function c(e,t){var a="insert"==e.action,s="insert"==t.action;if(a&&s)if(n(t.start,e.end)>=0)p(t,e,-1);else{if(!(n(t.start,e.start)<=0))return null;p(e,t,1)}else if(a&&!s)if(n(t.start,e.end)>=0)p(t,e,-1);else{if(!(n(t.end,e.start)<=0))return null;p(e,t,-1)}else if(!a&&s)if(n(t.start,e.start)>=0)p(t,e,1);else{if(!(n(t.start,e.start)<=0))return null;p(e,t,1)}else if(!a&&!s)if(n(t.start,e.start)>=0)p(t,e,1);else{if(!(n(t.end,e.start)<=0))return null;p(e,t,-1)}return[t,e]}function d(e,t){for(var a=e.length;a--;)for(var s=0;s=0?p(e,t,-1):(n(e.start,t.start)<=0||p(e,o.fromPoints(t.start,e.start),-1),p(t,e,1));else if(!a&&s)n(t.start,e.end)>=0?p(t,e,-1):(n(t.start,e.start)<=0||p(t,o.fromPoints(e.start,t.start),-1),p(e,t,1));else if(!a&&!s)if(n(t.start,e.end)>=0)p(t,e,-1);else{var i,l;if(!(n(t.end,e.start)<=0))return n(e.start,t.start)<0&&(i=e,e=u(e,t.start)),n(e.end,t.end)>0&&(l=u(e,t.end)),g(t.end,e.start,e.end,-1),l&&!i&&(e.lines=l.lines,e.start=l.start,e.end=l.end,l=e),[t,i,l].filter(Boolean);p(e,t,-1)}return[t,e]}function p(e,t,a){g(e.start,t.start,t.end,a),g(e.end,t.start,t.end,a)}function g(e,t,a,s){e.row==(1==s?t:a).row&&(e.column+=s*(a.column-t.column)),e.row+=s*(a.row-t.row)}function u(e,t){var a=e.lines,s=e.end;e.end=i(t);var o=e.end.row-e.start.row,n=a.splice(o,a.length),l=o?t.column:t.column-e.start.column;return a.push(n[0].substring(0,l)),n[0]=n[0].substr(l),{start:i(t),end:s,lines:n,action:e.action}}function m(e,t){t=function(e){return{start:i(e.start),end:i(e.end),action:e.action,lines:e.lines.slice()}}(t);for(var a=e.length;a--;){for(var s=e[a],o=0;othis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort((function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)})),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},e.prototype.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},e.prototype.walk=function(e,t,a){var s,o,n=0,i=this.folds,l=!0;null==t&&(t=this.end.row,a=this.end.column);for(var r=0;r0)){var r=s(e,i.start);return 0===l?t&&0!==r?-n-2:n:r>0||0===r&&!t?n:-n-1}}return-n-1},e.prototype.add=function(e){var t=!e.isEmpty(),a=this.pointIndex(e.start,t);a<0&&(a=-a-1);var s=this.pointIndex(e.end,t,a);return s<0?s=-s-1:s++,this.ranges.splice(a,s-a,e)},e.prototype.addList=function(e){for(var t=[],a=e.length;a--;)t.push.apply(t,this.add(e[a]));return t},e.prototype.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},e.prototype.merge=function(){for(var e,t=[],a=this.ranges,o=(a=a.sort((function(e,t){return s(e.start,t.start)})))[0],n=1;n=0},e.prototype.containsPoint=function(e){return this.pointIndex(e)>=0},e.prototype.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},e.prototype.clipRows=function(e,t){var a=this.ranges;if(a[0].start.row>t||a[a.length-1].start.row=s);i++);if("insert"==e.action){for(var r=o-s,c=-t.column+a.column;is);i++)if(d.start.row==s&&d.start.column>=t.column&&(d.start.column==t.column&&this.$bias<=0||(d.start.column+=c,d.start.row+=r)),d.end.row==s&&d.end.column>=t.column){if(d.end.column==t.column&&this.$bias<0)continue;d.end.column==t.column&&c>0&&id.start.column&&d.end.column==n[i+1].start.column&&(d.end.column-=c),d.end.column+=c,d.end.row+=r}}else for(r=s-o,c=t.column-a.column;io);i++)d.end.rowt.column)&&(d.end.column=t.column,d.end.row=t.row):(d.end.column+=c,d.end.row+=r):d.end.row>o&&(d.end.row+=r),d.start.rowt.column)&&(d.start.column=t.column,d.start.row=t.row):(d.start.column+=c,d.start.row+=r):d.start.row>o&&(d.start.row+=r);if(0!=r&&i=e)return o;if(o.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var a=this.$foldData,s=0;for(t&&(s=a.indexOf(t)),-1==s&&(s=0);s=e)return o}return null},this.getFoldedRowCount=function(e,t){for(var a=this.$foldData,s=t-e+1,o=0;o=t){l=e?s-=t-l:s=0);break}i>=e&&(s-=l>=e?i-l:i-e+1)}return s},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort((function(e,t){return e.start.row-t.start.row})),e},this.addFold=function(e,t){var a,s=this.$foldData,i=!1;e instanceof n?a=e:(a=new n(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(a.range);var l=a.start.row,r=a.start.column,c=a.end.row,d=a.end.column,h=this.getFoldAt(l,r,1),p=this.getFoldAt(c,d,-1);if(h&&p==h)return h.addSubFold(a);h&&!h.range.isStart(l,r)&&this.removeFold(h),p&&!p.range.isEnd(c,d)&&this.removeFold(p);var g=this.getFoldsInRange(a.range);g.length>0&&(this.removeFolds(g),a.collapseChildren||g.forEach((function(e){a.addSubFold(e)})));for(var u=0;u0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach((function(e){this.expandFold(e)}),this)},this.unfold=function(e,t){var a,o;if(null==e)a=new s(0,0,this.getLength(),0),null==t&&(t=!0);else if("number"==typeof e)a=new s(e,0,e,this.getLine(e).length);else if("row"in e)a=s.fromPoints(e,e);else{if(Array.isArray(e))return o=[],e.forEach((function(e){o=o.concat(this.unfold(e))}),this),o;a=e}for(var n=o=this.getFoldsInRangeList(a);1==o.length&&s.comparePoints(o[0].start,a.start)<0&&s.comparePoints(o[0].end,a.end)>0;)this.expandFolds(o),o=this.getFoldsInRangeList(a);if(0!=t?this.removeFolds(o):this.expandFolds(o),n.length)return n},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var a=this.getFoldLine(e,t);return a?a.end.row:e},this.getRowFoldStart=function(e,t){var a=this.getFoldLine(e,t);return a?a.start.row:e},this.getFoldDisplayLine=function(e,t,a,s,o){null==s&&(s=e.start.row),null==o&&(o=0),null==t&&(t=e.end.row),null==a&&(a=this.getLine(t).length);var n=this.doc,i="";return e.walk((function(e,t,a,l){if(!(th)break}while(n&&r.test(n.type));n=o.stepBackward()}else n=o.getCurrentToken();return c.end.row=o.getCurrentTokenRow(),c.end.column=o.getCurrentTokenColumn(),c}},this.foldAll=function(e,t,a,s){null==a&&(a=1e5);var o=this.foldWidgets;if(o){t=t||this.getLength();for(var n=e=e||0;n=e&&(n=i.end.row,i.collapseChildren=a,this.addFold("...",i))}}},this.foldToLevel=function(e){for(this.foldAll();e-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,(function(t){for(var a=e.getTokens(t),s=0;s=0;){var n=a[o];if(null==n&&(n=a[o]=this.getFoldWidget(o)),"start"==n){var i=this.getFoldWidgetRange(o);if(s||(s=i),i&&i.end.row>=e)break}o--}return{range:-1!==o&&i,firstRange:s}},this.onFoldWidgetClick=function(e,t){t instanceof l&&(t=t.domEvent);var a={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,a)){var s=t.target||t.srcElement;s&&/ace_fold-widget/.test(s.className)&&(s.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var a=this.getFoldWidget(e),s=this.getLine(e),o="end"===a?-1:1,n=this.getFoldAt(e,-1===o?0:s.length,o);if(n)return t.children||t.all?this.removeFold(n):this.expandFold(n),n;var i=this.getFoldWidgetRange(e,!0);if(i&&!i.isMultiLine()&&(n=this.getFoldAt(i.start.row,i.start.column,1))&&i.isEqual(n.range))return this.removeFold(n),n;if(t.siblings){var l=this.getParentFoldRangeData(e);if(l.range)var r=l.range.start.row+1,c=l.range.end.row;this.foldAll(r,c,t.all?1e4:0)}else t.children?(c=i?i.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):i&&(t.all&&(i.collapseChildren=1e4),this.addFold("...",i));return i}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var a=this.$toggleFoldWidget(t,{});if(!a){var s=this.getParentFoldRangeData(t,!0);if(a=s.range||s.firstRange){t=a.start.row;var o=this.getFoldAt(t,this.getLine(t).length,1);o?this.removeFold(o):this.addFold("...",a)}}},this.updateFoldWidgets=function(e){var t=e.start.row,a=e.end.row-t;if(0===a)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,a+1,null);else{var s=Array(a+1);s.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,s)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(e,t,a){"use strict";var s=e("../token_iterator").TokenIterator,o=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var a=t||this.getLine(e.row).charAt(e.column-1);if(""==a)return null;var s=a.match(/([\(\[\{])|([\)\]\}])/);return s?s[1]?this.$findClosingBracket(s[1],e):this.$findOpeningBracket(s[2],e):null},this.getBracketRange=function(e){var t,a=this.getLine(e.row),s=!0,n=a.charAt(e.column-1),i=n&&n.match(/([\(\[\{])|([\)\]\}])/);if(i||(n=a.charAt(e.column),e={row:e.row,column:e.column+1},i=n&&n.match(/([\(\[\{])|([\)\]\}])/),s=!1),!i)return null;if(i[1]){if(!(l=this.$findClosingBracket(i[1],e)))return null;t=o.fromPoints(e,l),s||(t.end.column++,t.start.column--),t.cursor=t.end}else{var l;if(!(l=this.$findOpeningBracket(i[2],e)))return null;t=o.fromPoints(l,e),s||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e,t){var a=this.getLine(e.row),s=/([\(\[\{])|([\)\]\}])/,n=!t&&a.charAt(e.column-1),i=n&&n.match(s);if(i||(n=(void 0===t||t)&&a.charAt(e.column),e={row:e.row,column:e.column+1},i=n&&n.match(s)),!i)return null;var l=new o(e.row,e.column-1,e.row,e.column),r=i[1]?this.$findClosingBracket(i[1],e):this.$findOpeningBracket(i[2],e);return r?[l,new o(r.row,r.column,r.row,r.column+1)]:[l]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,a){var o=this.$brackets[e],n=1,i=new s(this,t.row,t.column),l=i.getCurrentToken();if(l||(l=i.stepForward()),l){a||(a=new RegExp("(\\.?"+l.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var r=t.column-i.getCurrentTokenColumn()-2,c=l.value;;){for(;r>=0;){var d=c.charAt(r);if(d==o){if(0==(n-=1))return{row:i.getCurrentTokenRow(),column:r+i.getCurrentTokenColumn()}}else d==e&&(n+=1);r-=1}do{l=i.stepBackward()}while(l&&!a.test(l.type));if(null==l)break;r=(c=l.value).length-1}return null}},this.$findClosingBracket=function(e,t,a){var o=this.$brackets[e],n=1,i=new s(this,t.row,t.column),l=i.getCurrentToken();if(l||(l=i.stepForward()),l){a||(a=new RegExp("(\\.?"+l.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var r=t.column-i.getCurrentTokenColumn();;){for(var c=l.value,d=c.length;r"===t.value?s=!0:-1!==t.type.indexOf("tag-name")&&(a=!0))}while(t&&!a);return t},this.$findClosingTag=function(e,t){var a,s=t.value,n=t.value,i=0,l=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);t=e.stepForward();var r=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length),c=!1;do{if(-1!==(a=t).type.indexOf("tag-close")&&!c){var d=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);c=!0}if(t=e.stepForward())if(">"!==t.value||c||(d=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1),c=!0),-1!==t.type.indexOf("tag-name")){if(n===(s=t.value))if("<"===a.value)i++;else if(""!==t.value)return;var g=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else n===s&&"/>"===t.value&&--i<0&&(g=p=h=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2),d=new o(r.end.row,r.end.column,r.end.row,r.end.column+1))}while(t&&i>=0);if(l&&d&&h&&g&&r&&p)return{openTag:new o(l.start.row,l.start.column,d.end.row,d.end.column),closeTag:new o(h.start.row,h.start.column,g.end.row,g.end.column),openTagName:r,closeTagName:p}},this.$findOpeningTag=function(e,t){var a=e.getCurrentToken(),s=t.value,n=0,i=e.getCurrentTokenRow(),l=e.getCurrentTokenColumn(),r=l+2,c=new o(i,l,i,r);e.stepForward();var d=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if(-1===t.type.indexOf("tag-close")&&(t=e.stepForward()),t&&">"===t.value){var h=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);e.stepBackward(),e.stepBackward();do{if(t=a,i=e.getCurrentTokenRow(),r=(l=e.getCurrentTokenColumn())+t.value.length,a=e.stepBackward(),t)if(-1!==t.type.indexOf("tag-name")){if(s===t.value)if("<"===a.value){if(++n>0){var p=new o(i,l,i,r),g=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);do{t=e.stepForward()}while(t&&">"!==t.value);var u=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else""===t.value){for(var m=0,v=a;v;){if(-1!==v.type.indexOf("tag-name")&&v.value===s){n--;break}if("<"===v.value)break;v=e.stepBackward(),m++}for(var b=0;ba&&(this.$docRowCache.splice(a,t),this.$screenRowCache.splice(a,t))},e.prototype.$getRowCacheIndex=function(e,t){for(var a=0,s=e.length-1;a<=s;){var o=a+s>>1,n=e[o];if(t>n)a=o+1;else{if(!(t=t);n++);return(a=s[n])?(a.index=n,a.start=o-a.value.length,a):null},e.prototype.setUndoManager=function(e){if(this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;e.addSession(this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=o.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},e.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},e.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},e.prototype.getTabString=function(){return this.getUseSoftTabs()?o.stringRepeat(" ",this.getTabSize()):"\t"},e.prototype.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},e.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},e.prototype.setTabSize=function(e){this.setOption("tabSize",e)},e.prototype.getTabSize=function(){return this.$tabSize},e.prototype.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize==0},e.prototype.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},e.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},e.prototype.setOverwrite=function(e){this.setOption("overwrite",e)},e.prototype.getOverwrite=function(){return this.$overwrite},e.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},e.prototype.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},e.prototype.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},e.prototype.getBreakpoints=function(){return this.$breakpoints},e.prototype.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t0&&(s=!!a.charAt(t-1).match(this.tokenRe)),s||(s=!!a.charAt(t).match(this.tokenRe)),s)var o=this.tokenRe;else o=/^\s+$/.test(a.slice(t-1,t+1))?/\s/:this.nonTokenRe;var n=t;if(n>0){do{n--}while(n>=0&&a.charAt(n).match(o));n++}for(var i=t;ie&&(e=t.screenWidth)})),this.lineWidgetWidth=e},e.prototype.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),a=this.$rowLengthCache,s=0,o=0,n=this.$foldData[o],i=n?n.start.row:1/0,l=t.length,r=0;ri){if((r=n.end.row+1)>=l)break;i=(n=this.$foldData[o++])?n.start.row:1/0}null==a[r]&&(a[r]=this.$getStringScreenWidth(t[r])[0]),a[r]>s&&(s=a[r])}this.screenWidth=s}},e.prototype.getLine=function(e){return this.doc.getLine(e)},e.prototype.getLines=function(e,t){return this.doc.getLines(e,t)},e.prototype.getLength=function(){return this.doc.getLength()},e.prototype.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},e.prototype.insert=function(e,t){return this.doc.insert(e,t)},e.prototype.remove=function(e){return this.doc.remove(e)},e.prototype.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},e.prototype.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var a=e.length-1;-1!=a;a--){var s=e[a];"insert"==s.action||"remove"==s.action?this.doc.revertDelta(s):s.folds&&this.addFolds(s.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},e.prototype.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var a=0;ae.end.column&&(n.start.column+=c),n.end.row==e.end.row&&n.end.column>e.end.column&&(n.end.column+=c)),i&&n.start.row>=e.end.row&&(n.start.row+=i,n.end.row+=i)}if(n.end=this.insert(n.start,s),o.length){var l=e.start,r=n.start,c=(i=r.row-l.row,r.column-l.column);this.addFolds(o.map((function(e){return(e=e.clone()).start.row==l.row&&(e.start.column+=c),e.end.row==l.row&&(e.end.column+=c),e.start.row+=i,e.end.row+=i,e})))}return n},e.prototype.indentRows=function(e,t,a){a=a.replace(/\t/g,this.getTabString());for(var s=e;s<=t;s++)this.doc.insertInLine({row:s,column:0},a)},e.prototype.outdentRows=function(e){for(var t=e.collapseRows(),a=new d(0,0,0,0),s=this.getTabSize(),o=t.start.row;o<=t.end.row;++o){var n=this.getLine(o);a.start.row=o,a.end.row=o;for(var i=0;i0){var o;if((o=this.getRowFoldEnd(t+a))>this.doc.getLength()-1)return 0;s=o-t}else e=this.$clipRowToDocument(e),s=(t=this.$clipRowToDocument(t))-e+1;var n=new d(e,0,t,Number.MAX_VALUE),i=this.getFoldsInRange(n).map((function(e){return(e=e.clone()).start.row+=s,e.end.row+=s,e})),l=0==a?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+s,l),i.length&&this.addFolds(i),s},e.prototype.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},e.prototype.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},e.prototype.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},e.prototype.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},e.prototype.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},e.prototype.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var a=this.doc.getLength();e>=a?(e=a-1,t=this.doc.getLine(a-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},e.prototype.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},e.prototype.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},e.prototype.getUseWrapMode=function(){return this.$useWrapMode},e.prototype.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},e.prototype.adjustWrapLimit=function(e,t){var a=this.$wrapLimitRange;a.max<0&&(a={min:t,max:t});var s=this.$constrainWrapLimit(e,a.min,a.max);return s!=this.$wrapLimit&&s>1&&(this.$wrapLimit=s,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},e.prototype.$constrainWrapLimit=function(e,t,a){return t&&(e=Math.max(t,e)),a&&(e=Math.min(a,e)),e},e.prototype.getWrapLimit=function(){return this.$wrapLimit},e.prototype.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},e.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},e.prototype.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,a=e.action,s=e.start,o=e.end,n=s.row,i=o.row,l=i-n,r=null;if(this.$updating=!0,0!=l)if("remove"===a){this[t?"$wrapData":"$rowLengthCache"].splice(n,l);var c=this.$foldData;r=this.getFoldsInRange(e),this.removeFolds(r);var d=0;if(m=this.getFoldLine(o.row)){m.addRemoveChars(o.row,o.column,s.column-o.column),m.shiftRow(-l);var h=this.getFoldLine(n);h&&h!==m&&(h.merge(m),m=h),d=c.indexOf(m)+1}for(;d=o.row&&m.shiftRow(-l);i=n}else{var p=Array(l);p.unshift(n,0);var g=t?this.$wrapData:this.$rowLengthCache;if(g.splice.apply(g,p),c=this.$foldData,d=0,m=this.getFoldLine(n)){var u=m.range.compareInside(s.row,s.column);0==u?(m=m.split(s.row,s.column))&&(m.shiftRow(l),m.addRemoveChars(i,0,o.column-s.column)):-1==u&&(m.addRemoveChars(n,0,o.column-s.column),m.shiftRow(l)),d=c.indexOf(m)+1}for(;d=n&&m.shiftRow(l)}}else l=Math.abs(e.start.column-e.end.column),"remove"===a&&(r=this.getFoldsInRange(e),this.removeFolds(r),l=-l),(m=this.getFoldLine(n))&&m.addRemoveChars(n,s.column,l);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(n,i):this.$updateRowLengthCache(n,i),r},e.prototype.$updateRowLengthCache=function(e,t){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},e.prototype.$updateWrapData=function(e,t){var a,s,o=this.doc.getAllLines(),n=this.getTabSize(),i=this.$wrapData,l=this.$wrapLimit,r=e;for(t=Math.min(t,o.length-1);r<=t;)(s=this.getFoldLine(r,s))?(a=[],s.walk(function(e,t,s,n){var i;if(null!=e){(i=this.$getDisplayTokens(e,a.length))[0]=w;for(var l=1;lt-h;){var p=n+t-h;if(e[p-1]>=k&&e[p]>=k)d(p);else if(e[p]!=w&&e[p]!=x){for(var g=Math.max(p-(t-(t>>2)),n-1);p>g&&e[p]g&&e[p]g&&e[p]==y;)p--}else for(;p>g&&e[p]g?d(++p):(e[p=n+t]==f&&p--,d(p-h))}else{for(;p!=n-1&&e[p]!=w;p--);if(p>n){d(p);continue}for(p=n+t;p39&&n<48||n>57&&n<64?s.push(y):n>=4352&&M(n)?s.push(b,f):s.push(b)}return s},e.prototype.$getStringScreenWidth=function(e,t,a){if(0==t)return[0,0];var s,o;for(null==t&&(t=1/0),a=a||0,o=0;o=4352&&M(s)?a+=2:a+=1,!(a>t));o++);return[a,o]},e.prototype.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+t:t},e.prototype.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},e.prototype.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),a=this.$wrapData[t.row];return a.length&&a[0]=0){l=c[d],n=this.$docRowCache[d];var p=e>c[h-1]}else p=!h;for(var g=this.getLength()-1,u=this.getNextFoldLine(n),m=u?u.start.row:1/0;l<=e&&!(l+(r=this.getRowLength(n))>e||n>=g);)l+=r,++n>m&&(n=u.end.row+1,m=(u=this.getNextFoldLine(n,u))?u.start.row:1/0),p&&(this.$docRowCache.push(n),this.$screenRowCache.push(l));if(u&&u.start.row<=n)s=this.getFoldDisplayLine(u),n=u.start.row;else{if(l+r<=e||n>g)return{row:g,column:this.getLine(g).length};s=this.getLine(n),u=null}var v=0,b=Math.floor(e-l);if(this.$useWrapMode){var f=this.$wrapData[n];f&&(o=f[b],b>0&&f.length&&(v=f.indent,i=f[b-1]||f[f.length-1],s=s.substring(i)))}return void 0!==a&&this.$bidiHandler.isBidiRow(l+b,n,b)&&(t=this.$bidiHandler.offsetToCol(a)),i+=this.$getStringScreenWidth(s,t-v)[1],this.$useWrapMode&&i>=o&&(i=o-1),u?u.idxToPosition(i):{row:n,column:i}},e.prototype.documentToScreenPosition=function(e,t){if(void 0===t)var a=this.$clipPositionToDocument(e.row,e.column);else a=this.$clipPositionToDocument(e,t);e=a.row,t=a.column;var s,o=0,n=null;(s=this.getFoldAt(e,t,1))&&(e=s.start.row,t=s.start.column);var i,l=0,r=this.$docRowCache,c=this.$getRowCacheIndex(r,e),d=r.length;if(d&&c>=0){l=r[c],o=this.$screenRowCache[c];var h=e>r[d-1]}else h=!d;for(var p=this.getNextFoldLine(l),g=p?p.start.row:1/0;l=g){if((i=p.end.row+1)>e)break;g=(p=this.getNextFoldLine(i,p))?p.start.row:1/0}else i=l+1;o+=this.getRowLength(l),l=i,h&&(this.$docRowCache.push(l),this.$screenRowCache.push(o))}var u="";p&&l>=g?(u=this.getFoldDisplayLine(p,e,t),n=p.start.row):(u=this.getLine(e).substring(0,t),n=e);var m=0;if(this.$useWrapMode){var v=this.$wrapData[n];if(v){for(var b=0;u.length>=v[b];)o++,b++;u=u.substring(v[b-1]||0,u.length),m=b>0?v.indent:0}}return this.lineWidgets&&this.lineWidgets[l]&&this.lineWidgets[l].rowsAbove&&(o+=this.lineWidgets[l].rowsAbove),{row:o,column:m+this.$getStringScreenWidth(u)[0]}},e.prototype.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},e.prototype.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},e.prototype.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var a=this.$wrapData.length,s=0,o=(l=0,(t=this.$foldData[l++])?t.start.row:1/0);so&&(s=t.end.row+1,o=(t=this.$foldData[l++])?t.start.row:1/0)}else{e=this.getLength();for(var i=this.$foldData,l=0;la);n++);return[s,n]})},e.prototype.getPrecedingCharacter=function(){var e=this.selection.getCursor();return 0===e.column?0===e.row?"":this.doc.getNewLineCharacter():this.getLine(e.row)[e.column-1]},e.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},e}();v.$uid=0,v.prototype.$modes=i.$modes,v.prototype.getValue=v.prototype.toString,v.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},v.prototype.$overwrite=!1,v.prototype.$mode=null,v.prototype.$modeId=null,v.prototype.$scrollTop=0,v.prototype.$scrollLeft=0,v.prototype.$wrapLimit=80,v.prototype.$useWrapMode=!1,v.prototype.$wrapLimitRange={min:null,max:null},v.prototype.lineWidgets=null,v.prototype.isFullWidth=M,s.implement(v.prototype,l);var b=1,f=2,w=3,x=4,y=9,k=10,C=11,_=12;function M(e){return!(e<4352)&&(e>=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}e("./edit_session/folding").Folding.call(v.prototype),e("./edit_session/bracket_match").BracketMatch.call(v.prototype),i.defineOptions(v.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){(e=parseInt(e))>0&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=v})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,a){"use strict";var s=e("./lib/lang"),o=e("./lib/oop"),n=e("./range").Range,i=function(){function e(){this.$options={}}return e.prototype.set=function(e){return o.mixin(this.$options,e),this},e.prototype.getOptions=function(){return s.copyObject(this.$options)},e.prototype.setOptions=function(e){this.$options=e},e.prototype.find=function(e){var t=this.$options,a=this.$matchIterator(e,t);if(!a)return!1;var s=null;return a.forEach((function(e,a,o,i){return s=new n(e,a,o,i),!(a==i&&t.start&&t.start.start&&0!=t.skipCurrent&&s.isEqual(t.start)&&(s=null,1))})),s},e.prototype.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var a=t.range,o=a?e.getLines(a.start.row,a.end.row):e.doc.getAllLines(),i=[],l=t.re;if(t.$isMultiLine){var r,c=l.length,d=o.length-c;e:for(var h=l.offset||0;h<=d;h++){for(var p=0;pm||(i.push(r=new n(h,m,h+c-1,v)),c>2&&(h=h+c-2))}}else for(var b,f=0;ff&&(f=x),i.push(new n(b.startRow,b.startCol,b.endRow,b.endCol))}}else for(b=s.getMatchOffsets(o[f],l),p=0;pC&&i[p].end.row==_;)p--;for(i=i.slice(f,p+1),f=0,p=i.length;f=s){t+="$";break}var n=e.charCodeAt(a);if(36===n){t+="$$";continue}if(48===n||38===n){t+="$&";continue}if(49<=n&&n<=57){t+="$"+e[a];continue}}t+=e[a]}else{if(++a>=s){t+="\\";break}switch(e.charCodeAt(a)){case 92:t+="\\";break;case 110:t+="\n";break;case 116:t+="\t"}}}return t||e},e.prototype.replace=function(e,t){var a=this.$options,s=this.$assembleRegExp(a);if(a.$isMultiLine)return t;if(s){var o=this.$isMultilineSearch(a);o&&(e=e.replace(/\r\n|\r|\n/g,"\n"));var n=s.exec(e);if(!n||!o&&n[0].length!=e.length)return null;if(t=a.regExp?this.parseReplaceString(t):t.replace(/\$/g,"$$$$"),t=e.replace(s,t),a.preserveCase){t=t.split("");for(var i=Math.min(e.length,e.length);i--;){var l=e[i];l&&l.toLowerCase()!=l?t[i]=t[i].toUpperCase():t[i]=t[i].toLowerCase()}t=t.join("")}return t}},e.prototype.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var a=e.needle;if(!e.needle)return e.re=!1;e.regExp||(a=s.escapeRegExp(a));var o=e.caseSensitive?"gm":"gmi";try{new RegExp(a,"u"),e.$supportsUnicodeFlag=!0,o+="u"}catch(t){e.$supportsUnicodeFlag=!1}if(e.wholeWord&&(a=function(e,t){var a=s.supportsLookbehind();function o(e,s){return void 0===s&&(s=!0),(a&&t.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w")).test(e)||t.regExp?a&&t.$supportsUnicodeFlag?s?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var n=Array.from(e),i=n[0],l=n[n.length-1];return o(i)+e+o(l,!1)}(a,e)),e.$isMultiLine=!t&&/[\n\r]/.test(a),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(a,o);try{var n=new RegExp(a,o)}catch(e){n=!1}return e.re=n},e.prototype.$assembleMultilineRegExp=function(e,t){for(var a=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),s=[],o=0;os);l++){var c=e.getLine(i++);o=null==o?c:o+"\n"+c}var d=t.exec(o);if(t.lastIndex=0,d){var h=o.slice(0,d.index).split("\n"),p=d[0].split("\n"),g=a+h.length-1,u=h[h.length-1].length;return{startRow:g,startCol:u,endRow:g+p.length-1,endCol:1==p.length?u+p[0].length:p[p.length-1].length}}}return null},e.prototype.$multiLineBackward=function(e,t,a,s,o){for(var n,i=r(e,s),c=e.getLine(s).length-a,d=s;d>=o;){for(var h=0;h=o;h++){var p=e.getLine(d--);n=null==n?p:p+"\n"+n}var g=l(n,t,c);if(g){var u=n.slice(0,g.index).split("\n"),m=g[0].split("\n"),v=d+u.length,b=u[u.length-1].length;return{startRow:v,startCol:b,endRow:v+m.length-1,endCol:1==m.length?b+m[0].length:m[m.length-1].length}}}return null},e.prototype.$matchIterator=function(e,t){var a=this.$assembleRegExp(t);if(!a)return!1;var o=this.$isMultilineSearch(t),n=this.$multiLineForward,i=this.$multiLineBackward,l=1==t.backwards,r=0!=t.skipCurrent,c=a.unicode,d=t.range,h=t.start;h||(h=d?d[l?"end":"start"]:e.selection.getRange()),h.start&&(h=h[r!=l?"end":"start"]);var p=d?d.start.row:0,g=d?d.end.row:e.getLength()-1;if(l)var u=function(e){var a=h.row;if(!v(a,h.column,e)){for(a--;a>=p;a--)if(v(a,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(a=g,p=h.row;a>=p;a--)if(v(a,Number.MAX_VALUE,e))return}};else u=function(e){var a=h.row;if(!v(a,h.column,e)){for(a+=1;a<=g;a++)if(v(a,0,e))return;if(0!=t.wrap)for(a=p,g=h.row;a<=g;a++)if(v(a,0,e))return}};if(t.$isMultiLine)var m=a.length,v=function(t,s,o){var n=l?t-m+1:t;if(!(n<0||n+m>e.getLength())){var i=e.getLine(n),r=i.search(a[0]);if(!(!l&&rs))return!!o(n,r,n+m-1,d)||void 0}}};else v=l?function(t,n,l){if(o){var r=i(e,a,n,t,p);if(!r)return!1;if(l(r.startRow,r.startCol,r.endRow,r.endCol))return!0}else{var d,h=e.getLine(t),g=[],u=0;for(a.lastIndex=0;d=a.exec(h);){var m=d[0].length;if(u=d.index,!m){if(u>=h.length)break;a.lastIndex=u+=s.skipEmptyMatch(h,u,c)}if(d.index+m>n)break;g.push(d.index,m)}for(var v=g.length-1;v>=0;v-=2){var b=g[v-1];if(l(t,b,t,b+(m=g[v])))return!0}}}:function(t,i,l){if(a.lastIndex=i,o){var r=n(e,a,t,g);if(r){var d=r.endRow<=g?r.endRow-1:g;d>t&&(t=d)}if(!r)return!1;if(l(r.startRow,r.startCol,r.endRow,r.endCol))return!0}else for(var h,p,u=e.getLine(t);p=a.exec(u);){var m=p[0].length;if(l(t,h=p.index,t,h+m))return!0;if(!m&&(a.lastIndex=h+=s.skipEmptyMatch(u,h,c),h>=u.length))return!1}};return{forEach:u}},e}();function l(e,t,a){for(var s=null,o=0;o<=e.length;){t.lastIndex=o;var n=t.exec(e);if(!n)break;var i=n.index+n[0].length;if(i>e.length-a)break;(!s||i>s.index+s[0].length)&&(s=n),o=n.index+1}return s}function r(e,t){var a={row:t,column:0},s=e.doc.positionToIndex(a)+5e3;return e.doc.indexToPosition(s).row+1}t.Search=i})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,a){"use strict";var s,o=this&&this.__extends||(s=function(e,t){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])},s(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),n=e("../lib/keys"),i=e("../lib/useragent"),l=n.KEY_MODS,r=function(){function e(e,t){this.$init(e,t,!1)}return e.prototype.$init=function(e,t,a){this.platform=t||(i.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=a},e.prototype.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},e.prototype.removeCommand=function(e,t){var a=e&&("string"==typeof e?e:e.name);e=this.commands[a],t||delete this.commands[a];var s=this.commandKeyBinding;for(var o in s){var n=s[o];if(n==e)delete s[o];else if(Array.isArray(n)){var i=n.indexOf(e);-1!=i&&(n.splice(i,1),1==n.length&&(s[o]=n[0]))}}},e.prototype.bindKey=function(e,t,a){if("object"==typeof e&&e&&(null==a&&(a=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach((function(e){var s="";if(-1!=e.indexOf(" ")){var o=e.split(/\s+/);e=o.pop(),o.forEach((function(e){var t=this.parseKeys(e),a=l[t.hashId]+t.key;s+=(s?" ":"")+a,this._addCommandToBinding(s,"chainKeys")}),this),s+=" "}var n=this.parseKeys(e),i=l[n.hashId]+n.key;this._addCommandToBinding(s+i,t,a)}),this)},e.prototype._addCommandToBinding=function(e,t,a){var s,o=this.commandKeyBinding;if(t)if(!o[e]||this.$singleCommand)o[e]=t;else{Array.isArray(o[e])?-1!=(s=o[e].indexOf(t))&&o[e].splice(s,1):o[e]=[o[e]],"number"!=typeof a&&(a=c(t));var n=o[e];for(s=0;sa);s++);n.splice(s,0,t)}else delete o[e]},e.prototype.addCommands=function(e){e&&Object.keys(e).forEach((function(t){var a=e[t];if(a){if("string"==typeof a)return this.bindKey(a,t);"function"==typeof a&&(a={exec:a}),"object"==typeof a&&(a.name||(a.name=t),this.addCommand(a))}}),this)},e.prototype.removeCommands=function(e){Object.keys(e).forEach((function(t){this.removeCommand(e[t])}),this)},e.prototype.bindKeys=function(e){Object.keys(e).forEach((function(t){this.bindKey(t,e[t])}),this)},e.prototype._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},e.prototype.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(e){return e})),a=t.pop(),s=n[a];if(n.FUNCTION_KEYS[s])a=n.FUNCTION_KEYS[s].toLowerCase();else{if(!t.length)return{key:a,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:a.toUpperCase(),hashId:-1}}for(var o=0,i=t.length;i--;){var l=n.KEY_MODS[t[i]];if(null==l)return"undefined"!=typeof console&&console.error("invalid modifier "+t[i]+" in "+e),!1;o|=l}return{key:a,hashId:o}},e.prototype.findKeyCommand=function(e,t){var a=l[e]+t;return this.commandKeyBinding[a]},e.prototype.handleKeyboard=function(e,t,a,s){if(!(s<0)){var o=l[t]+a,n=this.commandKeyBinding[o];return e.$keyChain&&(e.$keyChain+=" "+o,n=this.commandKeyBinding[e.$keyChain]||n),!n||"chainKeys"!=n&&"chainKeys"!=n[n.length-1]?(e.$keyChain&&(t&&4!=t||1!=a.length?(-1==t||s>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-o.length-1)),{command:n}):(e.$keyChain=e.$keyChain||o,{command:"null"})}},e.prototype.getStatusText=function(e,t){return t.$keyChain||""},e}();function c(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}var d=function(e){function t(t,a){var s=e.call(this,t,a)||this;return s.$singleCommand=!0,s}return o(t,e),t}(r);d.call=function(e,t,a){r.prototype.$init.call(e,t,a,!0)},r.call=function(e,t,a){r.prototype.$init.call(e,t,a,!1)},t.HashHandler=d,t.MultiHashHandler=r})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(e,t,a){"use strict";var s,o=this&&this.__extends||(s=function(e,t){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])},s(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),n=e("../lib/oop"),i=e("../keyboard/hash_handler").MultiHashHandler,l=e("../lib/event_emitter").EventEmitter,r=function(e){function t(t,a){var s=e.call(this,a,t)||this;return s.byName=s.commands,s.setDefaultHandler("exec",(function(e){return e.args?e.command.exec(e.editor,e.args,e.event,!1):e.command.exec(e.editor,{},e.event,!0)})),s}return o(t,e),t.prototype.exec=function(e,t,a){if(Array.isArray(e)){for(var s=e.length;s--;)if(this.exec(e[s],t,a))return!0;return!1}"string"==typeof e&&(e=this.commands[e]);var o={editor:t,command:e,args:a};return this.canExecute(e,t)?(o.returnValue=this._emit("exec",o),this._signal("afterExec",o),!1!==o.returnValue):(this._signal("commandUnavailable",o),!1)},t.prototype.canExecute=function(e,t){return"string"==typeof e&&(e=this.commands[e]),!(!e||t&&t.$readOnly&&!e.readOnly||0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t))},t.prototype.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},t.prototype.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach((function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])}),this)}finally{this.$inReplay=!1}}},t.prototype.trimMacro=function(e){return e.map((function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e}))},t}(i);n.implement(r.prototype,l),t.CommandManager=r})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(e,t,a){"use strict";var s=e("../lib/lang"),o=e("../config"),n=e("../range").Range;function i(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:i("Ctrl-,","Command-,"),exec:function(e){o.loadModule("ace/ext/settings_menu",(function(t){t.init(e),e.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:i("Alt-E","F4"),exec:function(e){o.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:i("Alt-Shift-E","Shift-F4"),exec:function(e){o.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:i("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:i(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:i("Ctrl-L","Command-L"),exec:function(e,t){"number"!=typeof t||isNaN(t)||e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:i("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:i("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:i("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:i("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:i(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:i(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:i("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:i("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:i("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:i("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:i("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:i("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:i("Ctrl-F","Command-F"),exec:function(e){o.loadModule("ace/ext/searchbox",(function(t){t.Search(e)}))},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:i("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:i("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:i("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:i("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:i("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:i("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:i("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:i("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:i("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:i("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:i("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:i("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:i("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:i("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:i("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:i("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:i("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:i("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:i("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:i("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:i(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:i("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:i(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:i("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:i("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:i("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:i("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:i("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:i("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:i("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:i(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty()?e.selection.getLineRange():e.selection.getRange();e._emit("cut",t),t.isEmpty()||e.session.remove(t),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:i("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:i("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:i("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:i("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:i("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:i("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:i("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:i("Ctrl-H","Command-Option-F"),exec:function(e){o.loadModule("ace/ext/searchbox",(function(t){t.Search(e,!0)}))}},{name:"undo",description:"Undo",bindKey:i("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:i("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:i("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:i("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:i("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:i("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:i("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:i("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:i("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:i("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:i("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:i("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:i("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:i("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:i("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:i("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:i("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:i("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:i("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(s.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:i(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:i("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:i("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:i("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:i(null,null),exec:function(e){e.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:i("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:i("Ctrl+F3","F3"),exec:function(e){e.openLink()}},{name:"joinlines",description:"Join lines",bindKey:i(null,null),exec:function(e){for(var t=e.selection.isBackwards(),a=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),o=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),i=e.session.doc.getLine(a.row).length,l=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,r=e.session.doc.getLine(a.row),c=a.row+1;c<=o.row+1;c++){var d=s.stringTrimLeft(s.stringTrimRight(e.session.doc.getLine(c)));0!==d.length&&(d=" "+d),r+=d}o.row+10?(e.selection.moveCursorTo(a.row,a.column),e.selection.selectTo(a.row,a.column+l)):(i=e.session.doc.getLine(a.row).length>i?i+1:i,e.selection.moveCursorTo(a.row,i))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:i(null,null),exec:function(e){var t=e.session.doc.getLength()-1,a=e.session.doc.getLine(t).length,s=e.selection.rangeList.ranges,o=[];s.length<1&&(s=[e.selection.getRange()]);for(var i=0;i0||e+t=0&&this.$isFoldWidgetVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(e+t))return e+t}return null},e.prototype.$findNearestAnnotation=function(e){if(this.$isAnnotationVisible(e))return e;for(var t=0;e-t>0||e+t=0&&this.$isAnnotationVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isAnnotationVisible(e+t))return e+t}return null},e.prototype.$focusFoldWidget=function(e){if(null!=e){var t=this.$getFoldWidget(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()}},e.prototype.$focusAnnotation=function(e){if(null!=e){var t=this.$getAnnotation(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()}},e.prototype.$blurFoldWidget=function(e){var t=this.$getFoldWidget(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},e.prototype.$blurAnnotation=function(e){var t=this.$getAnnotation(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},e.prototype.$moveFoldWidgetUp=function(){for(var e=this.activeRowIndex;e>0;)if(e--,this.$isFoldWidgetVisible(e))return this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=e,void this.$focusFoldWidget(this.activeRowIndex)},e.prototype.$moveFoldWidgetDown=function(){for(var e=this.activeRowIndex;e0;)if(e--,this.$isAnnotationVisible(e))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=e,void this.$focusAnnotation(this.activeRowIndex)},e.prototype.$moveAnnotationDown=function(){for(var e=this.activeRowIndex;e=e.length&&(e=void 0),{value:e&&e[s++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=e("./lib/oop"),n=e("./lib/dom"),i=e("./lib/lang"),l=e("./lib/useragent"),r=e("./keyboard/textinput").TextInput,c=e("./mouse/mouse_handler").MouseHandler,d=e("./mouse/fold_handler").FoldHandler,h=e("./keyboard/keybinding").KeyBinding,p=e("./edit_session").EditSession,g=e("./search").Search,u=e("./range").Range,m=e("./lib/event_emitter").EventEmitter,v=e("./commands/command_manager").CommandManager,b=e("./commands/default_commands").commands,f=e("./config"),w=e("./token_iterator").TokenIterator,x=e("./keyboard/gutter_handler").GutterKeyboardHandler,y=e("./config").nls,k=e("./clipboard"),C=e("./lib/keys"),_=e("./lib/event"),M=e("./tooltip").HoverTooltip,z=function(){function e(t,a,s){this.session,this.$toDestroy=[];var o=t.getContainerElement();this.container=o,this.renderer=t,this.id="editor"+ ++e.$uid,this.commands=new v(l.isMac?"mac":"win",b),"object"==typeof document&&(this.textInput=new r(t.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new c(this),new d(this)),this.keyBinding=new h(this),this.$search=(new g).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=i.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",(function(e,t){t._$emitInputEvent.schedule(31)})),this.setSession(a||s&&s.session||new p("")),f.resetOptions(this),s&&this.setOptions(s),f._signal("editor",this)}return e.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},e.prototype.startOperation=function(e){this.session.startOperation(e)},e.prototype.endOperation=function(e){this.session.endOperation(e)},e.prototype.onStartOperation=function(e){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,e||(this.previousCommand=null)},e.prototype.onEndOperation=function(e){if(this.curOp&&this.session){if(e&&!1===e.returnValue)return void(this.curOp=null);if(this._signal("beforeEndOperation"),!this.curOp)return;var t=this.curOp.command,a=t&&t.scrollIntoView;if(a){switch(a){case"center-animate":a="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var s=this.selection.getRange(),o=this.renderer.layerConfig;(s.start.row>=o.lastRow||s.end.row<=o.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==a&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},e.prototype.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,a=this.$mergeableCommands,s=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var o=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),s=s&&this.mergeNextCommand&&(!/\s/.test(o)||/\s/.test(t.args)),this.mergeNextCommand=!0}else s=s&&-1!==a.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(s=!1),s?this.session.mergeUndoDeltas=!0:-1!==a.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},e.prototype.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e&&"ace"!=e){this.$keybindingId=e;var a=this;f.loadModule(["keybinding",e],(function(s){a.$keybindingId==e&&a.keyBinding.setKeyboardHandler(s&&s.handler),t&&t()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},e.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},e.prototype.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var a=this.session.getSelection();a.off("changeCursor",this.$onCursorChange),a.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),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(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),t&&(t.$editor=null),e&&e._signal("changeEditor",{editor:this}),e&&(e.$editor=this),e&&!e.destroyed&&e.bgTokenizer.scheduleStart()}},e.prototype.getSession=function(){return this.session},e.prototype.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},e.prototype.getValue=function(){return this.session.getValue()},e.prototype.getSelection=function(){return this.selection},e.prototype.resize=function(e){this.renderer.onResize(e)},e.prototype.setTheme=function(e,t){this.renderer.setTheme(e,t)},e.prototype.getTheme=function(){return this.renderer.getTheme()},e.prototype.setStyle=function(e){this.renderer.setStyle(e)},e.prototype.unsetStyle=function(e){this.renderer.unsetStyle(e)},e.prototype.getFontSize=function(){return this.getOption("fontSize")||n.computedStyle(this.container).fontSize},e.prototype.setFontSize=function(e){this.setOption("fontSize",e)},e.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout((function(){e.$highlightPending=!1;var t=e.session;if(t&&!t.destroyed){t.$bracketHighlight&&(t.$bracketHighlight.markerIds.forEach((function(e){t.removeMarker(e)})),t.$bracketHighlight=null);var a=e.getCursorPosition(),s=e.getKeyboardHandler(),o=s&&s.$getDirectionForHighlight&&s.$getDirectionForHighlight(e),n=t.getMatchingBracketRanges(a,o);if(!n){var i=new w(t,a.row,a.column).getCurrentToken();if(i&&/\b(?:tag-open|tag-name)/.test(i.type)){var l=t.getMatchingTags(a);l&&(n=[l.openTagName.isEmpty()?l.openTag:l.openTagName,l.closeTagName.isEmpty()?l.closeTag:l.closeTagName])}}if(!n&&t.$mode.getMatching&&(n=t.$mode.getMatching(e.session)),n){var r="ace_bracket";Array.isArray(n)?1==n.length&&(r="ace_error_bracket"):n=[n],2==n.length&&(0==u.comparePoints(n[0].end,n[1].start)?n=[u.fromPoints(n[0].start,n[1].end)]:0==u.comparePoints(n[0].start,n[1].end)&&(n=[u.fromPoints(n[1].start,n[0].end)])),t.$bracketHighlight={ranges:n,markerIds:n.map((function(e){return t.addMarker(e,r,"text")}))},e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}else e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}}),50)}},e.prototype.focus=function(){this.textInput.focus()},e.prototype.isFocused=function(){return this.textInput.isFocused()},e.prototype.blur=function(){this.textInput.blur()},e.prototype.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},e.prototype.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},e.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},e.prototype.onDocumentChange=function(e){var t=this.session.$useWrapMode,a=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,a,t),this._signal("change",e),this.$cursorChange()},e.prototype.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},e.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},e.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},e.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},e.prototype.$updateHighlightActiveLine=function(){var e,t=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(e=!1),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var a=new u(e.row,e.column,e.row,1/0);a.id=t.addMarker(a,"ace_active-line","screenLine"),t.$highlightLineMarker=a}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},e.prototype.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var a=this.selection.getRange(),s=this.getSelectionStyle();t.$selectionMarker=t.addMarker(a,"ace_selection",s)}var o=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(o),this._signal("changeSelection")},e.prototype.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var a=t.start.column,s=t.end.column,o=e.getLine(t.start.row),n=o.substring(a,s);if(!(n.length>5e3)&&/[\w\d]/.test(n)){var i=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:n}),l=o.substring(a-1,s+1);if(i.test(l))return i}}},e.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},e.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},e.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},e.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},e.prototype.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},e.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},e.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},e.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},e.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},e.prototype.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),a=!1;if(!e&&this.$copyWithEmptySelection){a=!0;for(var s=this.selection.getAllRanges(),o=0;ol.search(/\S|$/)){var r=l.substr(o.column).search(/\S|$/);a.doc.removeInLine(o.row,o.column,o.column+r)}}this.clearSelection();var c=o.column,d=a.getState(o.row),h=(l=a.getLine(o.row),s.checkOutdent(d,l,e));if(a.insert(o,e),n&&n.selection&&(2==n.selection.length?this.selection.setSelectionRange(new u(o.row,c+n.selection[0],o.row,c+n.selection[1])):this.selection.setSelectionRange(new u(o.row+n.selection[0],n.selection[1],o.row+n.selection[2],n.selection[3]))),this.$enableAutoIndent){if(a.getDocument().isNewLine(e)){var p=s.getNextLineIndent(d,l.slice(0,o.column),a.getTabString());a.insert({row:o.row+1,column:0},p)}h&&s.autoOutdent(d,a,o.row)}},e.prototype.autoIndent=function(){for(var e=this.session,t=e.getMode(),a=this.selection.isEmpty()?[new u(0,0,e.doc.getLength()-1,0)]:this.selection.getAllRanges(),s="",o="",n="",i=e.getTabString(),l=0;l0&&(s=e.getState(d-1),o=e.getLine(d-1),n=t.getNextLineIndent(s,o,i));var h=e.getLine(d),p=t.$getIndent(h);if(n!==p){if(p.length>0){var g=new u(d,0,d,p.length);e.remove(g)}n.length>0&&e.insert({row:d,column:0},n)}t.autoOutdent(s,e,d)}},e.prototype.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});var a=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(a):a(),this.endOperation()},e.prototype.applyComposition=function(e,t){var a;(t.extendLeft||t.extendRight)&&((a=this.selection.getRange()).start.column-=t.extendLeft,a.end.column+=t.extendRight,a.start.column<0&&(a.start.row--,a.start.column+=this.session.getLine(a.start.row).length+1),this.selection.setRange(a),e||a.isEmpty()||this.remove()),!e&&this.selection.isEmpty()||this.insert(e,!0),(t.restoreStart||t.restoreEnd)&&((a=this.selection.getRange()).start.column-=t.restoreStart,a.end.column-=t.restoreEnd,this.selection.setRange(a))},e.prototype.onCommandKey=function(e,t,a){return this.keyBinding.onCommandKey(e,t,a)},e.prototype.setOverwrite=function(e){this.session.setOverwrite(e)},e.prototype.getOverwrite=function(){return this.session.getOverwrite()},e.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},e.prototype.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},e.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},e.prototype.setDragDelay=function(e){this.setOption("dragDelay",e)},e.prototype.getDragDelay=function(){return this.getOption("dragDelay")},e.prototype.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},e.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},e.prototype.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},e.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},e.prototype.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},e.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},e.prototype.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},e.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},e.prototype.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},e.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},e.prototype.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},e.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},e.prototype.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},e.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},e.prototype.setHighlightIndentGuides=function(e){this.renderer.setHighlightIndentGuides(e)},e.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},e.prototype.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},e.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},e.prototype.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},e.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},e.prototype.setReadOnly=function(e){this.setOption("readOnly",e)},e.prototype.getReadOnly=function(){return this.getOption("readOnly")},e.prototype.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},e.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},e.prototype.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},e.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},e.prototype.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},e.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},e.prototype.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},e.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},e.prototype.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var a=this.session,s=a.getState(t.start.row),o=a.getMode().transformAction(s,"deletion",this,a,t);if(0===t.end.column){var n=a.getTextRange(t);if("\n"==n[n.length-1]){var i=a.getLine(t.end.row);/^\s+$/.test(i)&&(t.end.column=i.length)}}o&&(t=o)}this.session.remove(t),this.clearSelection()},e.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},e.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},e.prototype.setGhostText=function(e,t){this.renderer.setGhostText(e,t)},e.prototype.removeGhostText=function(){this.renderer.removeGhostText()},e.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var a,s,o=this.session.getLine(e.row);tt.toLowerCase()?1:0}));var o=new u(0,0,0,0);for(s=e.first;s<=e.last;s++){var n=t.getLine(s);o.start.row=s,o.end.row=s,o.end.column=n.length,t.replace(o,a[s-e.first])}},e.prototype.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},e.prototype.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),a=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,a,e)},e.prototype.getNumberAt=function(e,t){var a=/[\-]?[0-9]+(?:\.[0-9]+)?/g;a.lastIndex=0;for(var s=this.session.getLine(e);a.lastIndex=t)return{value:o[0],start:o.index,end:o.index+o[0].length}}return null},e.prototype.modifyNumber=function(e){var t=this.selection.getCursor().row,a=this.selection.getCursor().column,s=new u(t,a-1,t,a),o=this.session.getTextRange(s);if(!isNaN(parseFloat(o))&&isFinite(o)){var n=this.getNumberAt(t,a);if(n){var i=n.value.indexOf(".")>=0?n.start+n.value.indexOf(".")+1:n.end,l=n.start+n.value.length-i,r=parseFloat(n.value);r*=Math.pow(10,l),i!==n.end&&a=l&&n<=r&&(a=t,c.selection.clearSelection(),c.moveCursorTo(e,l+s),c.selection.selectTo(e,r+s)),l=r}));for(var d,h=this.$toggleWordPairs,p=0;p=r&&i<=c&&p.match(/((?:https?|ftp):\/\/[\S]+)/)){l=p.replace(/[\s:.,'";}\]]+$/,"");break}r=c}}catch(e){a={error:e}}finally{try{h&&!h.done&&(o=d.return)&&o.call(d)}finally{if(a)throw a.error}}return l},e.prototype.openLink=function(){var e=this.selection.getCursor(),t=this.findLinkAt(e.row,e.column);return t&&window.open(t,"_blank"),null!=t},e.prototype.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},e.prototype.duplicateSelection=function(){var e=this.selection,t=this.session,a=e.getRange(),s=e.isBackwards();if(a.isEmpty()){var o=a.start.row;t.duplicateLines(o,o)}else{var n=s?a.start:a.end,i=t.insert(n,t.getTextRange(a));a.start=n,a.end=i,e.setSelectionRange(a,s)}},e.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},e.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},e.prototype.moveText=function(e,t,a){return this.session.moveText(e,t,a)},e.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},e.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},e.prototype.$moveLines=function(e,t){var a,s,o=this.selection;if(!o.inMultiSelectMode||this.inVirtualSelectionMode){var n=o.toOrientedRange();a=this.$getSelectedRows(n),s=this.session.$moveLines(a.first,a.last,t?0:e),t&&-1==e&&(s=0),n.moveBy(s,0),o.fromOrientedRange(n)}else{var i=o.rangeList.ranges;o.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var l=0,r=0,c=i.length,d=0;dg+1)break;g=u.last}for(d--,l=this.session.$moveLines(p,g,t?0:e),t&&-1==e&&(h=d+1);h<=d;)i[h].moveBy(l,0),h++;t||(l=0),r+=l}o.fromOrientedRange(o.ranges[0]),o.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},e.prototype.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},e.prototype.onCompositionStart=function(e){this.renderer.showComposition(e)},e.prototype.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},e.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},e.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},e.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},e.prototype.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},e.prototype.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},e.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},e.prototype.$moveByPage=function(e,t){var a=this.renderer,s=this.renderer.layerConfig,o=e*Math.floor(s.height/s.lineHeight);!0===t?this.selection.$moveSelection((function(){this.moveCursorBy(o,0)})):!1===t&&(this.selection.moveCursorBy(o,0),this.selection.clearSelection());var n=a.scrollTop;a.scrollBy(0,o*s.lineHeight),null!=t&&a.scrollCursorIntoView(null,.5),a.animateScrolling(n)},e.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},e.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},e.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},e.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},e.prototype.scrollPageDown=function(){this.$moveByPage(1)},e.prototype.scrollPageUp=function(){this.$moveByPage(-1)},e.prototype.scrollToRow=function(e){this.renderer.scrollToRow(e)},e.prototype.scrollToLine=function(e,t,a,s){this.renderer.scrollToLine(e,t,a,s)},e.prototype.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},e.prototype.getCursorPosition=function(){return this.selection.getCursor()},e.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},e.prototype.getSelectionRange=function(){return this.selection.getRange()},e.prototype.selectAll=function(){this.selection.selectAll()},e.prototype.clearSelection=function(){this.selection.clearSelection()},e.prototype.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},e.prototype.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},e.prototype.jumpToMatching=function(e,t){var a=this.getCursorPosition(),s=new w(this.session,a.row,a.column),o=s.getCurrentToken(),n=0;o&&-1!==o.type.indexOf("tag-name")&&(o=s.stepBackward());var i=o||s.stepForward();if(i){var l,r,c=!1,d={},h=a.column-i.start,p={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(i.value.match(/[{}()\[\]]/g)){for(;h1?d[i.value]++:"=0;--n)this.$tryReplace(a[n],e)&&s++;return this.selection.setSelectionRange(o),s},e.prototype.$tryReplace=function(e,t){var a=this.session.getTextRange(e);return null!==(t=this.$search.replace(a,t))?(e.end=this.session.replace(e,t),e):null},e.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},e.prototype.find=function(e,t,a){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&o.mixin(t,e);var s=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(s)||this.$search.$options.needle)||(s=this.session.getWordRange(s.start.row,s.start.column),e=this.session.getTextRange(s)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:s});var n=this.$search.find(this.session);return t.preventScroll?n:n?(this.revealRange(n,a),n):(t.backwards?s.start=s.end:s.end=s.start,void this.selection.setRange(s))},e.prototype.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},e.prototype.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},e.prototype.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var a=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(a)},e.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach((function(e){e.destroy()})),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},e.prototype.setAutoScrollEditorIntoView=function(e){if(e){var t,a=this,s=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var o=this.$scrollAnchor;o.style.cssText="position:absolute",this.container.insertBefore(o,this.container.firstChild);var n=this.on("changeSelection",(function(){s=!0})),i=this.renderer.on("beforeRender",(function(){s&&(t=a.renderer.container.getBoundingClientRect())})),l=this.renderer.on("afterRender",(function(){if(s&&t&&(a.isFocused()||a.searchBox&&a.searchBox.isFocused())){var e=a.renderer,n=e.$cursorLayer.$pixelPos,i=e.layerConfig,l=n.top-i.offset;null!=(s=n.top>=0&&l+t.top<0||!(n.topwindow.innerHeight)&&null)&&(o.style.top=l+"px",o.style.left=n.left+"px",o.style.height=i.lineHeight+"px",o.scrollIntoView(s)),s=t=null}}));this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",n),this.renderer.off("afterRender",l),this.renderer.off("beforeRender",i))}}},e.prototype.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,n.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},e.prototype.prompt=function(e,t,a){var s=this;f.loadModule("ace/ext/prompt",(function(o){o.prompt(s,e,t,a)}))},e}();z.$uid=0,z.prototype.curOp=null,z.prototype.prevOp={},z.prototype.$mergeableCommands=["backspace","del","insertstring"],z.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],o.implement(z.prototype,m),f.defineOptions(z.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){var t=this;this.textInput.setReadOnly(e),this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(e){var a=!1;if(e&&"keydown"==e.type){if(!(a=e&&e.key&&1==e.key.length&&!e.ctrlKey&&!e.metaKey))return}else e&&"exec"!==e.type&&(a=!0);if(a){t.hoverTooltip||(t.hoverTooltip=new M);var s=n.createElement("div");s.textContent=y("editor.tooltip.disable-editing","Editing is disabled"),t.hoverTooltip.isOpen||t.hoverTooltip.showForRange(t,t.getSelectionRange(),s)}else t.hoverTooltip&&t.hoverTooltip.isOpen&&t.hoverTooltip.hide()});var a=this.textInput.getElement();e?(_.addListener(a,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(_.removeListener(a,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback),this.hoverTooltip&&(this.hoverTooltip.destroy(),this.hoverTooltip=null))},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?j.attach(this):j.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?j.attach(this):j.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(e&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),n.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(e||this.renderer.placeholderNode)!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),n.addCssClass(this.container,"ace_hasPlaceholder");var t=n.createElement("div");t.className="ace_placeholder",t.textContent=this.$placeholder||"",this.renderer.placeholderNode=t,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(e){var t,a={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(e){e.blur(),e.renderer.scroller.focus()},readOnly:!0},s=function(e){if(e.target==this.renderer.scroller&&e.keyCode===C.enter){e.preventDefault();var t=this.getCursorPosition().row;this.isRowVisible(t)||this.scrollToLine(t,!0,!0),this.focus()}};e?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(l.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",y("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",y("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",s.bind(this)),this.commands.addCommand(a),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",y("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",y("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),t||(t=new x(this)),t.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",s.bind(this)),this.commands.removeCommand(a),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),t&&t.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(e){this.$textInputAriaLabel=e},initialValue:""},enableMobileMenu:{set:function(e){this.$enableMobileMenu=e},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var j={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"·":""))+""},getWidth:function(e,t,a){return Math.max(t.toString().length,(a.lastRow+1).toString().length,2)*a.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}};t.Editor=z})),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],(function(e,t,a){"use strict";var s=e("../lib/dom"),o=function(){function e(e,t){this.element=e,this.canvasHeight=t||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return e.prototype.moveContainer=function(e){s.translate(this.element,0,-e.firstRowScreen*e.lineHeight%this.canvasHeight-e.offset*this.$offsetCoefficient)},e.prototype.pageChanged=function(e,t){return Math.floor(e.firstRowScreen*e.lineHeight/this.canvasHeight)!==Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)},e.prototype.computeLineTop=function(e,t,a){var s=t.firstRowScreen*t.lineHeight,o=Math.floor(s/this.canvasHeight);return a.documentToScreenRow(e,0)*t.lineHeight-o*this.canvasHeight},e.prototype.computeLineHeight=function(e,t,a){return t.lineHeight*a.getRowLineCount(e)},e.prototype.getLength=function(){return this.cells.length},e.prototype.get=function(e){return this.cells[e]},e.prototype.shift=function(){this.$cacheCell(this.cells.shift())},e.prototype.pop=function(){this.$cacheCell(this.cells.pop())},e.prototype.push=function(e){if(Array.isArray(e)){this.cells.push.apply(this.cells,e);for(var t=s.createFragment(this.element),a=0;an&&(r=o.end.row+1,n=(o=t.getNextFoldLine(r,o))?o.start.row:1/0),r>s){for(;this.$lines.getLength()>l+1;)this.$lines.pop();break}(i=this.$lines.get(++l))?i.row=r:(i=this.$lines.createCell(r,e,this.session,d),this.$lines.push(i)),this.$renderCell(i,e,o,r),r++}this._signal("afterRender"),this.$updateGutterWidth(e)},e.prototype.$updateGutterWidth=function(e){var t=this.session,a=t.gutterRenderer||this.$renderer,s=t.$firstLineNumber,o=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(o=t.getLength()+s-1);var n=a?a.getWidth(t,o,e):o.toString().length*e.characterWidth,i=this.$padding||this.$computePadding();(n+=i.left+i.right)===this.gutterWidth||isNaN(n)||(this.gutterWidth=n,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",n))},e.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},e.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var a=0;a=this.$cursorRow){if(s.row>this.$cursorRow){var o=this.session.getFoldLine(this.$cursorRow);if(!(a>0&&o&&o.start.row==t[a-1].row))break;s=t[a-1]}s.element.className="ace_gutter-active-line "+s.element.className,this.$cursorCell=s;break}}}}},e.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var a=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),s=this.oldLastRow;if(this.oldLastRow=a,!t||s0;o--)this.$lines.shift();if(s>a)for(o=this.session.getFoldedRowCount(a+1,s);o>0;o--)this.$lines.pop();e.firstRows&&this.$lines.push(this.$renderLines(e,s+1,a)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},e.prototype.$renderLines=function(e,t,a){for(var s=[],o=t,n=this.session.getNextFoldLine(o),i=n?n.start.row:1/0;o>i&&(o=n.end.row+1,i=(n=this.session.getNextFoldLine(o,n))?n.start.row:1/0),!(o>a);){var l=this.$lines.createCell(o,e,this.session,d);this.$renderCell(l,e,n,o),s.push(l),o++}return s},e.prototype.$renderCell=function(e,t,a,o){var n=e.element,i=this.session,l=n.childNodes[0],c=n.childNodes[1],d=n.childNodes[2],h=d.firstChild,p=i.$firstLineNumber,g=i.$breakpoints,u=i.$decorations,m=i.gutterRenderer||this.$renderer,v=this.$showFoldWidgets&&i.foldWidgets,b=a?a.start.row:Number.MAX_VALUE,f=t.lineHeight+"px",w=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",x=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",y=(m?m.getText(i,o):o+p).toString();if(this.$highlightGutterLine&&(o==this.$cursorRow||a&&o=b&&this.$cursorRow<=a.end.row)&&(w+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),g[o]&&(w+=g[o]),u[o]&&(w+=u[o]),this.$annotations[o]&&o!==b&&(w+=this.$annotations[o].className),v){var k=v[o];null==k&&(k=v[o]=i.getFoldWidget(o))}if(k){var C="ace_fold-widget ace_"+k,_="start"==k&&o==b&&oa.right-t.right?"foldWidgets":void 0},e}();function d(e){var t=document.createTextNode("");e.appendChild(t);var a=s.createElement("span");e.appendChild(a);var o=s.createElement("span");e.appendChild(o);var n=s.createElement("span");return o.appendChild(n),e}c.prototype.$fixedWidth=!1,c.prototype.$highlightGutterLine=!0,c.prototype.$renderer="",c.prototype.$showLineNumbers=!0,c.prototype.$showFoldWidgets=!0,o.implement(c.prototype,i),t.Gutter=c})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(e,t,a){"use strict";var s=e("../range").Range,o=e("../lib/dom"),n=function(){function e(e){this.element=o.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)}return e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setMarkers=function(e){this.markers=e},e.prototype.elt=function(e,t){var a=-1!=this.i&&this.element.childNodes[this.i];a?this.i++:(a=document.createElement("div"),this.element.appendChild(a),this.i=-1),a.style.cssText=t,a.className=e},e.prototype.update=function(e){if(e){var t;for(var a in this.config=e,this.i=0,this.markers){var s=this.markers[a];if(s.range){var o=s.range.clipRows(e.firstRow,e.lastRow);if(!o.isEmpty())if(o=o.toScreenRange(this.session),s.renderer){var n=this.$getTop(o.start.row,e),i=this.$padding+o.start.column*e.characterWidth;s.renderer(t,o,i,n,e)}else"fullLine"==s.type?this.drawFullLineMarker(t,o,s.clazz,e):"screenLine"==s.type?this.drawScreenLineMarker(t,o,s.clazz,e):o.isMultiLine()?"text"==s.type?this.drawTextMarker(t,o,s.clazz,e):this.drawMultiLineMarker(t,o,s.clazz,e):this.drawSingleLineMarker(t,o,s.clazz+" ace_start ace_br15",e)}else s.update(t,this,this.session,e)}if(-1!=this.i)for(;this.ip?4:0)|(c==r?8:0)),o,c==r?0:1,n)},e.prototype.drawMultiLineMarker=function(e,t,a,s,o){var n=this.$padding,i=s.lineHeight,l=this.$getTop(t.start.row,s),r=n+t.start.column*s.characterWidth;if(o=o||"",this.session.$bidiHandler.isBidiRow(t.start.row)?((c=t.clone()).end.row=c.start.row,c.end.column=this.session.getLine(c.start.row).length,this.drawBidiSingleLineMarker(e,c,a+" ace_br1 ace_start",s,null,o)):this.elt(a+" ace_br1 ace_start","height:"+i+"px;right:"+n+"px;top:"+l+"px;left:"+r+"px;"+(o||"")),this.session.$bidiHandler.isBidiRow(t.end.row)){var c;(c=t.clone()).start.row=c.end.row,c.start.column=0,this.drawBidiSingleLineMarker(e,c,a+" ace_br12",s,null,o)}else{l=this.$getTop(t.end.row,s);var d=t.end.column*s.characterWidth;this.elt(a+" ace_br12","height:"+i+"px;width:"+d+"px;top:"+l+"px;left:"+n+"px;"+(o||""))}if(!((i=(t.end.row-t.start.row-1)*s.lineHeight)<=0)){l=this.$getTop(t.start.row+1,s);var h=(t.start.column?1:0)|(t.end.column?0:8);this.elt(a+(h?" ace_br"+h:""),"height:"+i+"px;right:"+n+"px;top:"+l+"px;left:"+n+"px;"+(o||""))}},e.prototype.drawSingleLineMarker=function(e,t,a,s,o,n){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,a,s,o,n);var i=s.lineHeight,l=(t.end.column+(o||0)-t.start.column)*s.characterWidth,r=this.$getTop(t.start.row,s),c=this.$padding+t.start.column*s.characterWidth;this.elt(a,"height:"+i+"px;width:"+l+"px;top:"+r+"px;left:"+c+"px;"+(n||""))},e.prototype.drawBidiSingleLineMarker=function(e,t,a,s,o,n){var i=s.lineHeight,l=this.$getTop(t.start.row,s),r=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach((function(e){this.elt(a,"height:"+i+"px;width:"+(e.width+(o||0))+"px;top:"+l+"px;left:"+(r+e.left)+"px;"+(n||""))}),this)},e.prototype.drawFullLineMarker=function(e,t,a,s,o){var n=this.$getTop(t.start.row,s),i=s.lineHeight;t.start.row!=t.end.row&&(i+=this.$getTop(t.end.row,s)-n),this.elt(a,"height:"+i+"px;top:"+n+"px;left:0;right:0;"+(o||""))},e.prototype.drawScreenLineMarker=function(e,t,a,s,o){var n=this.$getTop(t.start.row,s),i=s.lineHeight;this.elt(a,"height:"+i+"px;top:"+n+"px;left:0;right:0;"+(o||""))},e}();n.prototype.$padding=0,t.Marker=n})),ace.define("ace/layer/text_util",["require","exports","module"],(function(e,t,a){var s=new Set(["text","rparen","lparen"]);t.isTextToken=function(e){return s.has(e)}})),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],(function(e,t,a){"use strict";var s=e("../lib/oop"),o=e("../lib/dom"),n=e("../lib/lang"),i=e("./lines").Lines,l=e("../lib/event_emitter").EventEmitter,r=e("../config").nls,c=e("./text_util").isTextToken,d=function(){function e(e){this.dom=o,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new i(this.element)}return e.prototype.$updateEolChar=function(){var e=this.session.doc,t="\n"==e.getNewLineCharacter()&&"windows"!=e.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=t)return this.EOL_CHAR=t,!0},e.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},e.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},e.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},e.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},e.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},e.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},e.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString()},e.prototype.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,"string"==typeof e?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},e.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},e.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides!==e&&(this.$highlightIndentGuides=e,e)},e.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],a=1;ad&&(l=r.end.row+1,d=(r=this.session.getNextFoldLine(l,r))?r.start.row:1/0),!(l>o);){var h=n[i++];if(h){this.dom.removeChildren(h),this.$renderLine(h,l,l==d&&r),c&&(h.style.top=this.$lines.computeLineTop(l,e,this.session)+"px");var p=e.lineHeight*this.session.getRowLength(l)+"px";h.style.height!=p&&(c=!0,h.style.height=p)}l++}if(c)for(;i0;o--)this.$lines.shift();if(t.lastRow>e.lastRow)for(o=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);o>0;o--)this.$lines.pop();e.firstRowt.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},e.prototype.$renderLinesFragment=function(e,t,a){for(var s=[],n=t,i=this.session.getNextFoldLine(n),l=i?i.start.row:1/0;n>l&&(n=i.end.row+1,l=(i=this.session.getNextFoldLine(n,i))?i.start.row:1/0),!(n>a);){var r=this.$lines.createCell(n,e,this.session),c=r.element;this.dom.removeChildren(c),o.setStyle(c.style,"height",this.$lines.computeLineHeight(n,e,this.session)+"px"),o.setStyle(c.style,"top",this.$lines.computeLineTop(n,e,this.session)+"px"),this.$renderLine(c,n,n==l&&i),this.$useLineGroups()?c.className="ace_line_group":c.className="ace_line",s.push(r),n++}return s},e.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,a=e.lastRow,s=this.$lines;s.getLength();)s.pop();s.push(this.$renderLinesFragment(e,t,a))},e.prototype.$renderToken=function(e,t,a,s){for(var o,i=this,l=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\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]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,d=this.dom.createFragment(this.element),h=0;o=l.exec(s);){var p=o[1],g=o[2],u=o[3],m=o[4],v=o[5];if(i.showSpaces||!g){var b=h!=o.index?s.slice(h,o.index):"";if(h=o.index+o[0].length,b&&d.appendChild(this.dom.createTextNode(b,this.element)),p){var f=i.session.getScreenTabSize(t+o.index);d.appendChild(i.$tabStrings[f].cloneNode(!0)),t+=f-1}else g?i.showSpaces?((x=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",x.textContent=n.stringRepeat(i.SPACE_CHAR,g.length),d.appendChild(x)):d.appendChild(this.dom.createTextNode(g,this.element)):u?((x=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",x.textContent=n.stringRepeat(i.SPACE_CHAR,u.length),d.appendChild(x)):m?(t+=1,(x=this.dom.createElement("span")).style.width=2*i.config.characterWidth+"px",x.className=i.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",x.textContent=i.showSpaces?i.SPACE_CHAR:m,d.appendChild(x)):v&&(t+=1,(x=this.dom.createElement("span")).style.width=2*i.config.characterWidth+"px",x.className="ace_cjk",x.textContent=v,d.appendChild(x))}}if(d.appendChild(this.dom.createTextNode(h?s.slice(h):s,this.element)),c(a.type))e.appendChild(d);else{var w="ace_"+a.type.replace(/\./g," ace_"),x=this.dom.createElement("span");"fold"==a.type&&(x.style.width=a.value.length*this.config.characterWidth+"px",x.setAttribute("title",r("inline-fold.closed.title","Unfold code"))),x.className=w,x.appendChild(d),e.appendChild(x)}return t+s.length},e.prototype.renderIndentGuide=function(e,t,a){var s=t.search(this.$indentGuideRe);if(s<=0||s>=a)return t;if(" "==t[0]){for(var o=(s-=s%this.tabSize)/this.tabSize,n=0;no[n].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}if(!this.$highlightIndentGuideMarker.end&&""!==e[t.row]&&t.column===e[t.row].length)for(this.$highlightIndentGuideMarker.dir=1,n=t.row+1;n0))return;a=e.element.childNodes[0]}var s=a.childNodes;if(s){var o=s[t-1];o&&o.classList&&o.classList.contains("ace_indent-guide")&&o.classList.add("ace_indent-guide-active")}}},e.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var t=this.$highlightIndentGuideMarker.indentLevel;if(0!==t)if(1===this.$highlightIndentGuideMarker.dir)for(var a=0;a=this.$highlightIndentGuideMarker.start+1){if(s.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(s,t)}}else for(a=e.length-1;a>=0;a--)if(s=e[a],this.$highlightIndentGuideMarker.end&&s.row=i;)l=this.$renderToken(r,l,d,h.substring(0,i-s)),h=h.substring(i-s),s=i,r=this.$createLineElement(),e.appendChild(r),r.appendChild(this.dom.createTextNode(n.stringRepeat(" ",a.indent),this.element)),l=0,i=a[++o]||Number.MAX_VALUE;0!=h.length&&(s+=h.length,l=this.$renderToken(r,l,d,h))}}a[a.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(r,l,null,"",!0)},e.prototype.$renderSimpleLine=function(e,t){for(var a=0,s=0;sthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,a,o,n);a=this.$renderToken(e,a,o,n)}}},e.prototype.$renderOverflowMessage=function(e,t,a,s,o){a&&this.$renderToken(e,t,a,s.slice(0,this.MAX_LINE_LENGTH-t));var n=this.dom.createElement("span");n.className="ace_inline_button ace_keyword ace_toggle_wrap",n.textContent=o?"":"",e.appendChild(n)},e.prototype.$renderLine=function(e,t,a){if(a||0==a||(a=this.session.getFoldLine(t)),a)var s=this.$getFoldLineTokens(t,a);else s=this.session.getTokens(t);var o=e;if(s.length){var n=this.session.getRowSplitData(t);n&&n.length?(this.$renderWrappedLine(e,s,n),o=e.lastChild):(o=e,this.$useLineGroups()&&(o=this.$createLineElement(),e.appendChild(o)),this.$renderSimpleLine(o,s))}else this.$useLineGroups()&&(o=this.$createLineElement(),e.appendChild(o));if(this.showEOL&&o){a&&(t=a.end.row);var i=this.dom.createElement("span");i.className="ace_invisible ace_invisible_eol",i.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,o.appendChild(i)}},e.prototype.$getFoldLineTokens=function(e,t){var a=this.session,s=[],o=a.getTokens(e);return t.walk((function(e,t,n,i,l){null!=e?s.push({type:"fold",value:e}):(l&&(o=a.getTokens(t)),o.length&&function(e,t,a){for(var o=0,n=0;n+e[o].value.lengtha-t&&(i=i.substring(0,a-t)),s.push({type:e[o].type,value:i}),n=t+i.length,o+=1);na?s.push({type:e[o].type,value:i.substring(0,a-n)}):s.push(e[o]),n+=i.length,o+=1}}(o,i,n))}),t.end.row,this.session.getLine(t.end.row).length),s},e.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},e}();d.prototype.EOF_CHAR="¶",d.prototype.EOL_CHAR_LF="¬",d.prototype.EOL_CHAR_CRLF="¤",d.prototype.EOL_CHAR=d.prototype.EOL_CHAR_LF,d.prototype.TAB_CHAR="—",d.prototype.SPACE_CHAR="·",d.prototype.$padding=0,d.prototype.MAX_LINE_LENGTH=1e4,d.prototype.showInvisibles=!1,d.prototype.showSpaces=!1,d.prototype.showTabs=!1,d.prototype.showEOL=!1,d.prototype.displayIndentGuides=!0,d.prototype.$highlightIndentGuides=!0,d.prototype.$tabStrings=[],d.prototype.destroy={},d.prototype.onChangeTabSize=d.prototype.$computeTabString,s.implement(d.prototype,l),t.Text=d})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(e,t,a){"use strict";var s=e("../lib/dom"),o=function(){function e(e){this.element=s.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),s.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return e.prototype.$updateOpacity=function(e){for(var t=this.cursors,a=t.length;a--;)s.setStyle(t[a].style,"opacity",e?"":"0")},e.prototype.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&s.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},e.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,s.removeCssClass(this.element,"ace_animate-blinking")},e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},e.prototype.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},e.prototype.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,s.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},e.prototype.addCursor=function(){var e=s.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},e.prototype.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},e.prototype.hideCursor=function(){this.isVisible=!1,s.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},e.prototype.showCursor=function(){this.isVisible=!0,s.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},e.prototype.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,s.removeCssClass(this.element,"ace_smooth-blinking")),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&s.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),s.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var t=function(){this.timeoutId=setTimeout((function(){e(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){e(!0),t()}),this.blinkInterval),t()}else this.$stopCssAnimation()},e.prototype.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var a=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(a.row,e.row)?this.session.$bidiHandler.getPosLeft(a.column):a.column*this.config.characterWidth),top:(a.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},e.prototype.isCursorInView=function(e,t){return e.top>=0&&e.tope.height+e.offset||i.top<0)&&a>1)){var l=this.cursors[o++]||this.addCursor(),r=l.style;this.drawCursor?this.drawCursor(l,i,e,t[a],this.session):this.isCursorInView(i,e)?(s.setStyle(r,"display","block"),s.translate(l,i.left,i.top),s.setStyle(r,"width",Math.round(e.characterWidth)+"px"),s.setStyle(r,"height",e.lineHeight+"px")):s.setStyle(r,"display","none")}}for(;this.cursors.length>o;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=i,this.restartTimer()},e.prototype.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?s.addCssClass(this.element,"ace_overwrite-cursors"):s.removeCssClass(this.element,"ace_overwrite-cursors"))},e.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},e}();o.prototype.$padding=0,o.prototype.drawCursor=null,t.Cursor=o})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,a){"use strict";var s,o=this&&this.__extends||(s=function(e,t){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])},s(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),n=e("./lib/oop"),i=e("./lib/dom"),l=e("./lib/event"),r=e("./lib/event_emitter").EventEmitter,c=32768,d=function(){function e(e,t){this.element=i.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+t,this.inner=i.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,l.addListener(this.element,"scroll",this.onScroll.bind(this)),l.addListener(this.element,"mousedown",l.preventDefault)}return e.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},e}();n.implement(d.prototype,r);var h=function(e){function t(t,a){var s=e.call(this,t,"-v")||this;return s.scrollTop=0,s.scrollHeight=0,a.$scrollbarWidth=s.width=i.scrollbarWidth(t.ownerDocument),s.inner.style.width=s.element.style.width=(s.width||15)+5+"px",s.$minWidth=0,s}return o(t,e),t.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(e){this.element.style.height=e+"px"},t.prototype.setScrollHeight=function(e){this.scrollHeight=e,e>c?(this.coeff=c/e,e=c):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},t.prototype.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)},t}(d);h.prototype.setInnerHeight=h.prototype.setScrollHeight;var p=function(e){function t(t,a){var s=e.call(this,t,"-h")||this;return s.scrollLeft=0,s.height=a.$scrollbarWidth,s.inner.style.height=s.element.style.height=(s.height||15)+5+"px",s}return o(t,e),t.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.setWidth=function(e){this.element.style.width=e+"px"},t.prototype.setInnerWidth=function(e){this.inner.style.width=e+"px"},t.prototype.setScrollWidth=function(e){this.inner.style.width=e+"px"},t.prototype.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)},t}(d);t.ScrollBar=h,t.ScrollBarV=h,t.ScrollBarH=p,t.VScrollBar=h,t.HScrollBar=p})),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,a){"use strict";var s,o=this&&this.__extends||(s=function(e,t){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])},s(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),n=e("./lib/oop"),i=e("./lib/dom"),l=e("./lib/event"),r=e("./lib/event_emitter").EventEmitter;i.importCssString(".ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{\n position: absolute;\n background: rgba(128, 128, 128, 0.6);\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid #bbb;\n border-radius: 2px;\n z-index: 8;\n}\n.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {\n position: absolute;\n z-index: 6;\n background: none;\n overflow: hidden!important;\n}\n.ace_editor>.ace_sb-v {\n z-index: 6;\n right: 0;\n top: 0;\n width: 12px;\n}\n.ace_editor>.ace_sb-v div {\n z-index: 8;\n right: 0;\n width: 100%;\n}\n.ace_editor>.ace_sb-h {\n bottom: 0;\n left: 0;\n height: 12px;\n}\n.ace_editor>.ace_sb-h div {\n bottom: 0;\n height: 100%;\n}\n.ace_editor>.ace_sb_grabbed {\n z-index: 8;\n background: #000;\n}","ace_scrollbar.css",!1);var c=function(){function e(e,t){this.element=i.createElement("div"),this.element.className="ace_sb"+t,this.inner=i.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,l.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return e.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},e}();n.implement(c.prototype,r);var d=function(e){function t(t,a){var s=e.call(this,t,"-v")||this;return s.scrollTop=0,s.scrollHeight=0,s.parent=t,s.width=s.VScrollWidth,s.renderer=a,s.inner.style.width=s.element.style.width=(s.width||15)+"px",s.$minWidth=0,s}return o(t,e),t.prototype.onMouseDown=function(e,t){if("mousedown"===e&&0===l.getButton(t)&&2!==t.detail){if(t.target===this.inner){var a=this,s=t.clientY,o=t.clientY,n=this.thumbTop;l.capture(this.inner,(function(e){s=e.clientY}),(function(){clearInterval(i)}));var i=setInterval((function(){if(void 0!==s){var e=a.scrollTopFromThumbTop(n+s-o);e!==a.scrollTop&&a._emit("scroll",{data:e})}}),20);return l.preventDefault(t)}var r=t.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(r)}),l.preventDefault(t)}},t.prototype.getHeight=function(){return this.height},t.prototype.scrollTopFromThumbTop=function(e){var t=e*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return(t|=0)<0?t=0:t>this.pageHeight-this.viewHeight&&(t=this.pageHeight-this.viewHeight),t},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(e){this.height=Math.max(0,e),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},t.prototype.setScrollHeight=function(e,t){(this.pageHeight!==e||t)&&(this.pageHeight=e,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},t.prototype.setScrollTop=function(e){this.scrollTop=e,e<0&&(e=0),this.thumbTop=e*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},t}(c);d.prototype.setInnerHeight=d.prototype.setScrollHeight;var h=function(e){function t(t,a){var s=e.call(this,t,"-h")||this;return s.scrollLeft=0,s.scrollWidth=0,s.height=s.HScrollHeight,s.inner.style.height=s.element.style.height=(s.height||12)+"px",s.renderer=a,s}return o(t,e),t.prototype.onMouseDown=function(e,t){if("mousedown"===e&&0===l.getButton(t)&&2!==t.detail){if(t.target===this.inner){var a=this,s=t.clientX,o=t.clientX,n=this.thumbLeft;l.capture(this.inner,(function(e){s=e.clientX}),(function(){clearInterval(i)}));var i=setInterval((function(){if(void 0!==s){var e=a.scrollLeftFromThumbLeft(n+s-o);e!==a.scrollLeft&&a._emit("scroll",{data:e})}}),20);return l.preventDefault(t)}var r=t.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(r)}),l.preventDefault(t)}},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.scrollLeftFromThumbLeft=function(e){var t=e*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return(t|=0)<0?t=0:t>this.pageWidth-this.viewWidth&&(t=this.pageWidth-this.viewWidth),t},t.prototype.setWidth=function(e){this.width=Math.max(0,e),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},t.prototype.setScrollWidth=function(e,t){(this.pageWidth!==e||t)&&(this.pageWidth=e,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},t.prototype.setScrollLeft=function(e){this.scrollLeft=e,e<0&&(e=0),this.thumbLeft=e*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},t}(c);h.prototype.setInnerWidth=h.prototype.setScrollWidth,t.ScrollBar=d,t.ScrollBarV=d,t.ScrollBarH=h,t.VScrollBar=d,t.HScrollBar=h})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(e,t,a){"use strict";var s=e("./lib/event"),o=function(){function e(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var a=this;this._flush=function(e){a.pending=!1;var t=a.changes;if(t&&(s.blockIdle(100),a.changes=0,a.onRender(t)),a.changes){if(a.$recursionLimit--<0)return;a.schedule()}else a.$recursionLimit=2}}return e.prototype.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(s.nextFrame(this._flush),this.pending=!0)},e.prototype.clear=function(e){var t=this.changes;return this.changes=0,t},e}();t.RenderLoop=o})),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],(function(e,t,a){var s=e("../lib/oop"),o=e("../lib/dom"),n=e("../lib/lang"),i=e("../lib/event"),l=e("../lib/useragent"),r=e("../lib/event_emitter").EventEmitter,c=512,d="function"==typeof ResizeObserver,h=200,p=function(){function e(e){this.el=o.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=o.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=o.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=n.stringRepeat("X",c),this.$characterSize={width:0,height:0},d?this.$addObserver():this.checkForSizeChanges()}return e.prototype.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",l.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},e.prototype.checkForSizeChanges=function(e){if(void 0===e&&(e=this.$measureSizes()),e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},e.prototype.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver((function(t){e.checkForSizeChanges()})),this.$observer.observe(this.$measureNode)},e.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=i.onIdle((function t(){e.checkForSizeChanges(),i.onIdle(t,500)}),500)},e.prototype.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},e.prototype.$measureSizes=function(e){var t={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/c};return 0===t.width||0===t.height?null:t},e.prototype.$measureCharWidth=function(e){return this.$main.textContent=n.stringRepeat(e,c),this.$main.getBoundingClientRect().width/c},e.prototype.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},e.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},e.prototype.$getZoom=function(e){return e&&e.parentElement?(Number(window.getComputedStyle(e).zoom)||1)*this.$getZoom(e.parentElement):1},e.prototype.$initTransformMeasureNodes=function(){var e=function(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]};this.els=o.buildDom([e(0,0),e(h,0),e(0,h),e(h,h)],this.el)},e.prototype.transformCoordinates=function(e,t){function a(e,t,a){var s=e[1]*t[0]-e[0]*t[1];return[(-t[1]*a[0]+t[0]*a[1])/s,(+e[1]*a[0]-e[0]*a[1])/s]}function s(e,t){return[e[0]-t[0],e[1]-t[1]]}function o(e,t){return[e[0]+t[0],e[1]+t[1]]}function n(e,t){return[e*t[0],e*t[1]]}function i(e){var t=e.getBoundingClientRect();return[t.left,t.top]}e&&(e=n(1/this.$getZoom(this.el),e)),this.els||this.$initTransformMeasureNodes();var l=i(this.els[0]),r=i(this.els[1]),c=i(this.els[2]),d=i(this.els[3]),p=a(s(d,r),s(d,c),s(o(r,c),o(d,l))),g=n(1+p[0],s(r,l)),u=n(1+p[1],s(c,l));if(t){var m=t,v=p[0]*m[0]/h+p[1]*m[1]/h+1,b=o(n(m[0],g),n(m[1],u));return o(n(1/v/h,b),l)}var f=s(e,l),w=a(s(g,n(p[0],f)),s(u,n(p[1],f)),f);return n(h,w)},e}();p.prototype.$characterSize={width:0,height:0},s.implement(p.prototype,r),t.FontMetrics=p})),ace.define("ace/css/editor-css",["require","exports","module"],(function(e,t,a){a.exports='\n.ace_br1 {border-top-left-radius : 3px;}\n.ace_br2 {border-top-right-radius : 3px;}\n.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\n.ace_br4 {border-bottom-right-radius: 3px;}\n.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\n.ace_br8 {border-bottom-left-radius : 3px;}\n.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n\n\n.ace_editor {\n position: relative;\n overflow: hidden;\n padding: 0;\n font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'Source Code Pro\', \'source-code-pro\', monospace;\n direction: ltr;\n text-align: left;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n forced-color-adjust: none;\n}\n\n.ace_scroller {\n position: absolute;\n overflow: hidden;\n top: 0;\n bottom: 0;\n background-color: inherit;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n cursor: text;\n}\n\n.ace_content {\n position: absolute;\n box-sizing: border-box;\n min-width: 100%;\n contain: style size layout;\n font-variant-ligatures: no-common-ligatures;\n}\n.ace_invisible {\n font-variant-ligatures: none;\n}\n\n.ace_keyboard-focus:focus {\n box-shadow: inset 0 0 0 2px #5E9ED6;\n outline: none;\n}\n\n.ace_dragging .ace_scroller:before{\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n content: \'\';\n background: rgba(250, 250, 250, 0.01);\n z-index: 1000;\n}\n.ace_dragging.ace_dark .ace_scroller:before{\n background: rgba(0, 0, 0, 0.01);\n}\n\n.ace_gutter {\n position: absolute;\n overflow : hidden;\n width: auto;\n top: 0;\n bottom: 0;\n left: 0;\n cursor: default;\n z-index: 4;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n contain: style size layout;\n}\n\n.ace_gutter-active-line {\n position: absolute;\n left: 0;\n right: 0;\n}\n\n.ace_scroller.ace_scroll-left:after {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\n pointer-events: none;\n}\n\n.ace_gutter-cell, .ace_gutter-cell_svg-icons {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-left: 19px;\n padding-right: 6px;\n background-repeat: no-repeat;\n}\n\n.ace_gutter-cell_svg-icons .ace_gutter_annotation {\n margin-left: -14px;\n float: left;\n}\n\n.ace_gutter-cell .ace_gutter_annotation {\n margin-left: -19px;\n float: left;\n}\n\n.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {\n 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==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {\n 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==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");\n}\n\n.ace_icon_svg.ace_error {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_security {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: darkorange;\n}\n.ace_icon_svg.ace_info {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: royalblue;\n}\n.ace_icon_svg.ace_hint {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");\n background-color: silver;\n}\n\n.ace_icon_svg.ace_error_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_security_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");\n background-color: darkorange;\n}\n\n.ace_scrollbar {\n contain: strict;\n position: absolute;\n right: 0;\n bottom: 0;\n z-index: 6;\n}\n\n.ace_scrollbar-inner {\n position: absolute;\n cursor: text;\n left: 0;\n top: 0;\n}\n\n.ace_scrollbar-v{\n overflow-x: hidden;\n overflow-y: scroll;\n top: 0;\n}\n\n.ace_scrollbar-h {\n overflow-x: scroll;\n overflow-y: hidden;\n left: 0;\n}\n\n.ace_print-margin {\n position: absolute;\n height: 100%;\n}\n\n.ace_text-input {\n position: absolute;\n z-index: 0;\n width: 0.5em;\n height: 1em;\n opacity: 0;\n background: transparent;\n -moz-appearance: none;\n appearance: none;\n border: none;\n resize: none;\n outline: none;\n overflow: hidden;\n font: inherit;\n padding: 0 1px;\n margin: 0 -1px;\n contain: strict;\n -ms-user-select: text;\n -moz-user-select: text;\n -webkit-user-select: text;\n user-select: text;\n /*with `pre-line` chrome inserts   instead of space*/\n white-space: pre!important;\n}\n.ace_text-input.ace_composition {\n background: transparent;\n color: inherit;\n z-index: 1000;\n opacity: 1;\n}\n.ace_composition_placeholder { color: transparent }\n.ace_composition_marker { \n border-bottom: 1px solid;\n position: absolute;\n border-radius: 0;\n margin-top: 1px;\n}\n\n[ace_nocontext=true] {\n transform: none!important;\n filter: none!important;\n clip-path: none!important;\n mask : none!important;\n contain: none!important;\n perspective: none!important;\n mix-blend-mode: initial!important;\n z-index: auto;\n}\n\n.ace_layer {\n z-index: 1;\n position: absolute;\n overflow: hidden;\n /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/\n word-wrap: normal;\n white-space: pre;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n /* setting pointer-events: auto; on node under the mouse, which changes\n during scroll, will break mouse wheel scrolling in Safari */\n pointer-events: none;\n}\n\n.ace_gutter-layer {\n position: relative;\n width: auto;\n text-align: right;\n pointer-events: auto;\n height: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer {\n font: inherit !important;\n position: absolute;\n height: 1000000px;\n width: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {\n contain: style size layout;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n.ace_hidpi .ace_text-layer,\n.ace_hidpi .ace_gutter-layer,\n.ace_hidpi .ace_content,\n.ace_hidpi .ace_gutter {\n contain: strict;\n}\n.ace_hidpi .ace_text-layer > .ace_line, \n.ace_hidpi .ace_text-layer > .ace_line_group {\n contain: strict;\n}\n\n.ace_cjk {\n display: inline-block;\n text-align: center;\n}\n\n.ace_cursor-layer {\n z-index: 4;\n}\n\n.ace_cursor {\n z-index: 4;\n position: absolute;\n box-sizing: border-box;\n border-left: 2px solid;\n /* workaround for smooth cursor repaintng whole screen in chrome */\n transform: translatez(0);\n}\n\n.ace_multiselect .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_slim-cursors .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_overwrite-cursors .ace_cursor {\n border-left-width: 0;\n border-bottom: 1px solid;\n}\n\n.ace_hidden-cursors .ace_cursor {\n opacity: 0.2;\n}\n\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\n opacity: 0;\n}\n\n.ace_smooth-blinking .ace_cursor {\n transition: opacity 0.18s;\n}\n\n.ace_animate-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: step-end;\n animation-name: blink-ace-animate;\n animation-iteration-count: infinite;\n}\n\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: ease-in-out;\n animation-name: blink-ace-animate-smooth;\n}\n \n@keyframes blink-ace-animate {\n from, to { opacity: 1; }\n 60% { opacity: 0; }\n}\n\n@keyframes blink-ace-animate-smooth {\n from, to { opacity: 1; }\n 45% { opacity: 1; }\n 60% { opacity: 0; }\n 85% { opacity: 0; }\n}\n\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 5;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 6;\n}\n\n.ace_marker-layer .ace_error_bracket {\n position: absolute;\n border-bottom: 1px solid #DE5555;\n border-radius: 0;\n}\n\n.ace_marker-layer .ace_active-line {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selected-word {\n position: absolute;\n z-index: 4;\n box-sizing: border-box;\n}\n\n.ace_line .ace_fold {\n box-sizing: border-box;\n\n display: inline-block;\n height: 11px;\n margin-top: -2px;\n vertical-align: middle;\n\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");\n background-repeat: no-repeat, repeat-x;\n background-position: center center, top left;\n color: transparent;\n\n border: 1px solid black;\n border-radius: 2px;\n\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_dark .ace_fold {\n}\n\n.ace_fold:hover{\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");\n}\n\n.ace_tooltip {\n background-color: #f5f5f5;\n border: 1px solid gray;\n border-radius: 1px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n color: black;\n padding: 3px 4px;\n position: fixed;\n z-index: 999999;\n box-sizing: border-box;\n cursor: default;\n white-space: pre-wrap;\n word-wrap: break-word;\n line-height: normal;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n pointer-events: none;\n overflow: auto;\n max-width: min(33em, 66vw);\n overscroll-behavior: contain;\n}\n.ace_tooltip pre {\n white-space: pre-wrap;\n}\n\n.ace_tooltip.ace_dark {\n background-color: #636363;\n color: #fff;\n}\n\n.ace_tooltip:focus {\n outline: 1px solid #5E9ED6;\n}\n\n.ace_icon {\n display: inline-block;\n width: 18px;\n vertical-align: top;\n}\n\n.ace_icon_svg {\n display: inline-block;\n width: 12px;\n vertical-align: top;\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-size: 12px;\n -webkit-mask-position: center;\n}\n\n.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {\n padding-right: 13px;\n}\n\n.ace_fold-widget {\n box-sizing: border-box;\n\n margin: 0 -12px 0 1px;\n display: none;\n width: 11px;\n vertical-align: top;\n\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: center;\n\n border-radius: 3px;\n \n border: 1px solid transparent;\n cursor: pointer;\n}\n\n.ace_folding-enabled .ace_fold-widget {\n display: inline-block; \n}\n\n.ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");\n}\n\n.ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");\n}\n\n.ace_fold-widget:hover {\n border: 1px solid rgba(0, 0, 0, 0.3);\n background-color: rgba(255, 255, 255, 0.2);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n}\n\n.ace_fold-widget:active {\n border: 1px solid rgba(0, 0, 0, 0.4);\n background-color: rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n/**\n * Dark version for fold widgets\n */\n.ace_dark .ace_fold-widget {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");\n}\n.ace_dark .ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget:hover {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.1);\n}\n.ace_dark .ace_fold-widget:active {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n}\n\n.ace_inline_button {\n border: 1px solid lightgray;\n display: inline-block;\n margin: -1px 8px;\n padding: 0 5px;\n pointer-events: auto;\n cursor: pointer;\n}\n.ace_inline_button:hover {\n border-color: gray;\n background: rgba(200,200,200,0.2);\n display: inline-block;\n pointer-events: auto;\n}\n\n.ace_fold-widget.ace_invalid {\n background-color: #FFB4B4;\n border-color: #DE5555;\n}\n\n.ace_fade-fold-widgets .ace_fold-widget {\n transition: opacity 0.4s ease 0.05s;\n opacity: 0;\n}\n\n.ace_fade-fold-widgets:hover .ace_fold-widget {\n transition: opacity 0.05s ease 0.05s;\n opacity:1;\n}\n\n.ace_underline {\n text-decoration: underline;\n}\n\n.ace_bold {\n font-weight: bold;\n}\n\n.ace_nobold .ace_bold {\n font-weight: normal;\n}\n\n.ace_italic {\n font-style: italic;\n}\n\n\n.ace_error-marker {\n background-color: rgba(255, 0, 0,0.2);\n position: absolute;\n z-index: 9;\n}\n\n.ace_highlight-marker {\n background-color: rgba(255, 255, 0,0.2);\n position: absolute;\n z-index: 8;\n}\n\n.ace_mobile-menu {\n position: absolute;\n line-height: 1.5;\n border-radius: 4px;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n background: white;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #dcdcdc;\n color: black;\n}\n.ace_dark > .ace_mobile-menu {\n background: #333;\n color: #ccc;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #444;\n\n}\n.ace_mobile-button {\n padding: 2px;\n cursor: pointer;\n overflow: hidden;\n}\n.ace_mobile-button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_mobile-button:active {\n background-color: #ddd;\n}\n\n.ace_placeholder {\n position: relative;\n font-family: arial;\n transform: scale(0.9);\n transform-origin: left;\n white-space: pre;\n opacity: 0.7;\n margin: 0 10px;\n z-index: 1;\n}\n\n.ace_ghost_text {\n opacity: 0.5;\n font-style: italic;\n}\n\n.ace_ghost_text_container > div {\n white-space: pre;\n}\n\n.ghost_text_line_wrapped::after {\n content: "↩";\n position: absolute;\n}\n\n.ace_lineWidgetContainer.ace_ghost_text {\n margin: 0px 4px\n}\n\n.ace_screenreader-only {\n position:absolute;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}\n\n.ace_hidden_token {\n display: none;\n}'})),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,a){"use strict";var s=e("../lib/dom"),o=e("../lib/oop"),n=e("../lib/event_emitter").EventEmitter,i=function(){function e(e,t){this.canvas=s.createElement("canvas"),this.renderer=t,this.pixelRatio=1,this.maxHeight=t.layerConfig.maxHeight,this.lineHeight=t.layerConfig.lineHeight,this.canvasHeight=e.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=e.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},e.element.appendChild(this.canvas)}return e.prototype.$updateDecorators=function(e){var t=!0===this.renderer.theme.isDark?this.colors.dark:this.colors.light;e&&(this.maxHeight=e.maxHeight,this.lineHeight=e.lineHeight,this.canvasHeight=e.height,(e.lastRow+1)*this.lineHeightt.priority?1:0}));for(var n=this.renderer.session.$foldData,i=0;ithis.canvasHeight&&(p=this.canvasHeight-this.halfMinDecorationHeight),d=Math.round(p-this.halfMinDecorationHeight),h=Math.round(p+this.halfMinDecorationHeight)}a.fillStyle=t[s[i].type]||null,a.fillRect(0,c,this.canvasWidth,h-d)}}var g=this.renderer.session.selection.getCursor();g&&(r=this.compensateFoldRows(g.row,n),c=Math.round((g.row-r)*this.lineHeight*this.heightRatio),a.fillStyle="rgba(0, 0, 0, 0.5)",a.fillRect(0,c,this.canvasWidth,2))},e.prototype.compensateFoldRows=function(e,t){var a=0;if(t&&t.length>0)for(var s=0;st[s].start.row&&e=t[s].end.row&&(a+=t[s].end.row-t[s].start.row);return a},e}();o.implement(i.prototype,n),t.Decorator=i})),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],(function(e,t,a){"use strict";var s=e("./lib/oop"),o=e("./lib/dom"),n=e("./lib/lang"),i=e("./config"),l=e("./layer/gutter").Gutter,r=e("./layer/marker").Marker,c=e("./layer/text").Text,d=e("./layer/cursor").Cursor,h=e("./scrollbar").HScrollBar,p=e("./scrollbar").VScrollBar,g=e("./scrollbar_custom").HScrollBar,u=e("./scrollbar_custom").VScrollBar,m=e("./renderloop").RenderLoop,v=e("./layer/font_metrics").FontMetrics,b=e("./lib/event_emitter").EventEmitter,f=e("./css/editor-css"),w=e("./layer/decorators").Decorator,x=e("./lib/useragent"),y=e("./layer/text_util").isTextToken;o.importCssString(f,"ace_editor.css",!1);var k=function(){function e(e,t){var a=this;this.container=e||o.createElement("div"),o.addCssClass(this.container,"ace_editor"),o.HI_DPI&&o.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),null==i.get("useStrictCSP")&&i.set("useStrictCSP",!1),this.$gutter=o.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=o.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=o.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new l(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new r(this.content);var s=this.$textLayer=new c(this.content);this.canvas=s.element,this.$markerFront=new r(this.content),this.$cursorLayer=new d(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new p(this.container,this),this.scrollBarH=new h(this.container,this),this.scrollBarV.on("scroll",(function(e){a.$scrollAnimation||a.session.setScrollTop(e.data-a.scrollMargin.top)})),this.scrollBarH.on("scroll",(function(e){a.$scrollAnimation||a.session.setScrollLeft(e.data-a.scrollMargin.left)})),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new v(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",(function(e){a.updateCharacterSize(),a.onResize(!0,a.gutterWidth,a.$size.width,a.$size.height),a._signal("changeCharacterSize",e)})),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.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!x.isIOS,this.$loop=new m(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),i.resetOptions(this),i._signal("renderer",this)}return e.prototype.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(),o.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},e.prototype.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},e.prototype.updateLines=function(e,t,a){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},e.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},e.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},e.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},e.prototype.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},e.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},e.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},e.prototype.onResize=function(e,t,a,s){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var o=this.container;s||(s=o.clientHeight||o.scrollHeight),!s&&this.$maxLines&&this.lineHeight>1&&(o.style.height&&"0px"!=o.style.height||(o.style.height="1px",s=o.clientHeight||o.scrollHeight)),a||(a=o.clientWidth||o.scrollWidth);var n=this.$updateCachedSize(e,t,a,s);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!a&&!s)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(n|this.$changes,!0):this.$loop.schedule(n|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},e.prototype.$updateCachedSize=function(e,t,a,s){s-=this.$extraHeight||0;var n=0,i=this.$size,l={width:i.width,height:i.height,scrollerHeight:i.scrollerHeight,scrollerWidth:i.scrollerWidth};if(s&&(e||i.height!=s)&&(i.height=s,n|=this.CHANGE_SIZE,i.scrollerHeight=i.height,this.$horizScroll&&(i.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(i.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",n|=this.CHANGE_SCROLL),a&&(e||i.width!=a)){n|=this.CHANGE_SIZE,i.width=a,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,o.setStyle(this.scrollBarH.element.style,"left",t+"px"),o.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),i.scrollerWidth=Math.max(0,a-t-this.scrollBarV.getWidth()-this.margin.h),o.setStyle(this.$gutter.style,"left",this.margin.left+"px");var r=this.scrollBarV.getWidth()+"px";o.setStyle(this.scrollBarH.element.style,"right",r),o.setStyle(this.scroller.style,"right",r),o.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(i.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(n|=this.CHANGE_FULL)}return i.$dirty=!a||!s,n&&this._signal("resize",l),n},e.prototype.onGutterResize=function(e){var t=this.$showGutter?e:0;t!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,t,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},e.prototype.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},e.prototype.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},e.prototype.getAnimatedScroll=function(){return this.$animatedScroll},e.prototype.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},e.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},e.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},e.prototype.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},e.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},e.prototype.setHighlightIndentGuides=function(e){this.setOption("highlightIndentGuides",e)},e.prototype.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},e.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},e.prototype.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},e.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},e.prototype.getShowGutter=function(){return this.getOption("showGutter")},e.prototype.setShowGutter=function(e){return this.setOption("showGutter",e)},e.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},e.prototype.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},e.prototype.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},e.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},e.prototype.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=o.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=o.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},e.prototype.getContainerElement=function(){return this.container},e.prototype.getMouseEventTarget=function(){return this.scroller},e.prototype.getTextAreaContainer=function(){return this.container},e.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var e=this.textarea.style,t=this.$composition;if(this.$keepTextAreaAtCursor||t){var a=this.$cursorLayer.$pixelPos;if(a){t&&t.markerRange&&(a=this.$cursorLayer.getPixelPosition(t.markerRange.start,!0));var s=this.layerConfig,n=a.top,i=a.left;n-=s.offset;var l=t&&t.useTextareaForIME||x.isMobile?this.lineHeight:1;if(n<0||n>s.height-l)o.translate(this.textarea,0,0);else{var r=1,c=this.$size.height-l;if(t)if(t.useTextareaForIME){var d=this.textarea.value;r=this.characterWidth*this.session.$getStringScreenWidth(d)[0]}else n+=this.lineHeight+2;else n+=this.lineHeight;(i-=this.scrollLeft)>this.$size.scrollerWidth-r&&(i=this.$size.scrollerWidth-r),i+=this.gutterWidth+this.margin.left,o.setStyle(e,"height",l+"px"),o.setStyle(e,"width",r+"px"),o.translate(this.textarea,Math.min(i,this.$size.scrollerWidth-r),Math.min(n,c))}}}else o.translate(this.textarea,-100,0)}},e.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},e.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},e.prototype.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},e.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},e.prototype.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},e.prototype.setScrollMargin=function(e,t,a,s){var o=this.scrollMargin;o.top=0|e,o.bottom=0|t,o.right=0|s,o.left=0|a,o.v=o.top+o.bottom,o.h=o.left+o.right,o.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-o.top),this.updateFull()},e.prototype.setMargin=function(e,t,a,s){var o=this.margin;o.top=0|e,o.bottom=0|t,o.right=0|s,o.left=0|a,o.v=o.top+o.bottom,o.h=o.left+o.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},e.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},e.prototype.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},e.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},e.prototype.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},e.prototype.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},e.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},e.prototype.freeze=function(){this.$frozen=!0},e.prototype.unfreeze=function(){this.$frozen=!1},e.prototype.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var a=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig()|this.$loop.clear(),a.firstRow!=this.layerConfig.firstRow&&a.firstRowScreen==this.layerConfig.firstRowScreen){var s=this.scrollTop+(a.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;s>0&&(this.scrollTop=s,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}a=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),o.translate(this.content,-this.scrollLeft,-a.offset);var n=a.width+2*this.$padding+"px",i=a.minHeight+"px";o.setStyle(this.content.style,"width",n),o.setStyle(this.content.style,"height",i)}if(e&this.CHANGE_H_SCROLL&&(o.translate(this.content,-this.scrollLeft,-a.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),e&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(a),this.$showGutter&&this.$gutterLayer.update(a),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(a),this.$markerBack.update(a),this.$markerFront.update(a),this.$cursorLayer.update(a),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);if(e&this.CHANGE_SCROLL)return this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(a):this.$textLayer.scrollLines(a),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(a):this.$gutterLayer.scrollLines(a)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(a),this.$markerBack.update(a),this.$markerFront.update(a),this.$cursorLayer.update(a),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(a),this.$showGutter&&this.$gutterLayer.update(a),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(a)):e&this.CHANGE_LINES?((this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(a),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(a)):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(a),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(a)):e&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(a),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(a)),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(a),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(a),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(a),this._signal("afterRender",e)}else this.$changes|=e},e.prototype.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,a=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(a+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&a>this.$maxPixelHeight&&(a=this.$maxPixelHeight);var s=!(a<=2*this.lineHeight)&&e>t;if(a!=this.desiredHeight||this.$size.height!=this.desiredHeight||s!=this.$vScroll){s!=this.$vScroll&&(this.$vScroll=s,this.scrollBarV.setVisible(s));var o=this.container.clientWidth;this.container.style.height=a+"px",this.$updateCachedSize(!0,this.$gutterWidth,o,a),this.desiredHeight=a,this._signal("autosize")}},e.prototype.$computeLayerConfig=function(){var e=this.session,t=this.$size,a=t.height<=2*this.lineHeight,s=this.session.getScreenLength()*this.lineHeight,o=this.$getLongestLine(),n=!a&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-o-2*this.$padding<0),i=this.$horizScroll!==n;i&&(this.$horizScroll=n,this.scrollBarH.setVisible(n));var l=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),a=t.height<=2*this.lineHeight);var r=t.scrollerHeight+this.lineHeight,c=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;s+=c;var d=this.scrollMargin;this.session.setScrollTop(Math.max(-d.top,Math.min(this.scrollTop,s-t.scrollerHeight+d.bottom))),this.session.setScrollLeft(Math.max(-d.left,Math.min(this.scrollLeft,o+2*this.$padding-t.scrollerWidth+d.right)));var h=!a&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-s+c<0||this.scrollTop>d.top),p=l!==h;p&&(this.$vScroll=h,this.scrollBarV.setVisible(h));var g,u,m=this.scrollTop%this.lineHeight,v=Math.ceil(r/this.lineHeight)-1,b=Math.max(0,Math.round((this.scrollTop-m)/this.lineHeight)),f=b+v,w=this.lineHeight;b=e.screenToDocumentRow(b,0);var x=e.getFoldLine(b);x&&(b=x.start.row),g=e.documentToScreenRow(b,0),u=e.getRowLength(b)*w,f=Math.min(e.screenToDocumentRow(f,0),e.getLength()-1),r=t.scrollerHeight+e.getRowLength(f)*w+u,m=this.scrollTop-g*w;var y=0;return(this.layerConfig.width!=o||i)&&(y=this.CHANGE_H_SCROLL),(i||p)&&(y|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),p&&(o=this.$getLongestLine())),this.layerConfig={width:o,padding:this.$padding,firstRow:b,firstRowScreen:g,lastRow:f,lineHeight:w,characterWidth:this.characterWidth,minHeight:r,maxHeight:s,offset:m,gutterOffset:w?Math.max(0,Math.ceil((m+t.height-t.scrollerHeight)/w)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(o-this.$padding),y},e.prototype.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var a=this.layerConfig;if(!(e>a.lastRow+1||tthis.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},e.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},e.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},e.prototype.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},e.prototype.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},e.prototype.updateBreakpoints=function(e){this._rows=e,this.$loop.schedule(this.CHANGE_GUTTER)},e.prototype.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},e.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},e.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},e.prototype.showCursor=function(){this.$cursorLayer.showCursor()},e.prototype.scrollSelectionIntoView=function(e,t,a){this.scrollCursorIntoView(e,a),this.scrollCursorIntoView(t,a)},e.prototype.scrollCursorIntoView=function(e,t,a){if(0!==this.$size.scrollerHeight){var s=this.$cursorLayer.getPixelPosition(e),o=s.left,n=s.top,i=a&&a.top||0,l=a&&a.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var r=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;r+i>n?(t&&r+i>n+this.lineHeight&&(n-=t*this.$size.scrollerHeight),0===n&&(n=-this.scrollMargin.top),this.session.setScrollTop(n)):r+this.$size.scrollerHeight-l=1-this.scrollMargin.top||t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0},e.prototype.pixelToScreenCoordinates=function(e,t){var a;if(this.$hasCssTransforms){a={top:0,left:0};var s=this.$fontMetrics.transformCoordinates([e,t]);e=s[1]-this.gutterWidth-this.margin.left,t=s[0]}else a=this.scroller.getBoundingClientRect();var o=e+this.scrollLeft-a.left-this.$padding,n=o/this.characterWidth,i=Math.floor((t+this.scrollTop-a.top)/this.lineHeight),l=this.$blockCursor?Math.floor(n):Math.round(n);return{row:i,column:l,side:n-l>0?1:-1,offsetX:o}},e.prototype.screenToTextCoordinates=function(e,t){var a;if(this.$hasCssTransforms){a={top:0,left:0};var s=this.$fontMetrics.transformCoordinates([e,t]);e=s[1]-this.gutterWidth-this.margin.left,t=s[0]}else a=this.scroller.getBoundingClientRect();var o=e+this.scrollLeft-a.left-this.$padding,n=o/this.characterWidth,i=this.$blockCursor?Math.floor(n):Math.round(n),l=Math.floor((t+this.scrollTop-a.top)/this.lineHeight);return this.session.screenToDocumentPosition(l,Math.max(i,0),o)},e.prototype.textToScreenCoordinates=function(e,t){var a=this.scroller.getBoundingClientRect(),s=this.session.documentToScreenPosition(e,t),o=this.$padding+(this.session.$bidiHandler.isBidiRow(s.row,e)?this.session.$bidiHandler.getPosLeft(s.column):Math.round(s.column*this.characterWidth)),n=s.row*this.lineHeight;return{pageX:a.left+o-this.scrollLeft,pageY:a.top+n-this.scrollTop}},e.prototype.visualizeFocus=function(){o.addCssClass(this.container,"ace_focus")},e.prototype.visualizeBlur=function(){o.removeCssClass(this.container,"ace_focus")},e.prototype.showComposition=function(e){this.$composition=e,e.cssText||(e.cssText=this.textarea.style.cssText),null==e.useTextareaForIME&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(o.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):e.markerId=this.session.addMarker(e.markerRange,"ace_composition_marker","text")},e.prototype.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},e.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),o.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var e=this.session.selection.cursor;this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},e.prototype.setGhostText=function(e,t){var a=this.session.selection.cursor,s=t||{row:a.row,column:a.column};this.removeGhostText();var n=this.$calculateWrappedTextChunks(e,s);this.addToken(n[0].text,"ghost_text",s.row,s.column),this.$ghostText={text:e,position:{row:s.row,column:s.column}};var i=o.createElement("div");if(n.length>1){var l,r=this.hideTokensAfterPosition(s.row,s.column);n.slice(1).forEach((function(e){var t=o.createElement("div"),a=o.createElement("span");a.className="ace_ghost_text",e.wrapped&&(t.className="ghost_text_line_wrapped"),0===e.text.length&&(e.text=" "),a.appendChild(o.createTextNode(e.text)),t.appendChild(a),i.appendChild(t),l=t})),r.forEach((function(e){var t=o.createElement("span");y(e.type)||(t.className="ace_"+e.type.replace(/\./g," ace_")),t.appendChild(o.createTextNode(e.value)),l.appendChild(t)})),this.$ghostTextWidget={el:i,row:s.row,column:s.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var c=this.$cursorLayer.getPixelPosition(s,!0),d=this.container.getBoundingClientRect().height,h=n.length*this.lineHeight;if(h0){var c=0;r.push(o[i].length);for(var d=0;d1||Math.abs(e.$size.height-s)>1?e.$resizeTimer.delay():e.$resizeTimer.cancel()})),this.$resizeObserver.observe(this.container)}},e}();k.prototype.CHANGE_CURSOR=1,k.prototype.CHANGE_MARKER=2,k.prototype.CHANGE_GUTTER=4,k.prototype.CHANGE_SCROLL=8,k.prototype.CHANGE_LINES=16,k.prototype.CHANGE_TEXT=32,k.prototype.CHANGE_SIZE=64,k.prototype.CHANGE_MARKER_BACK=128,k.prototype.CHANGE_MARKER_FRONT=256,k.prototype.CHANGE_FULL=512,k.prototype.CHANGE_H_SCROLL=1024,k.prototype.$changes=0,k.prototype.$padding=null,k.prototype.$frozen=!1,k.prototype.STEPS=8,s.implement(k.prototype,b),i.defineOptions(k.prototype,"renderer",{useResizeObserver:{set:function(e){!e&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):e&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&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(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(e){this.$gutterLayer.$useSvgGutterIcons=e},initialValue:!1},showFoldedAnnotations:{set:function(e){this.$gutterLayer.$showFoldedAnnotations=e},initialValue:!1},fadeFoldWidgets:{set:function(e){o.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(e){1==this.$textLayer.setHighlightIndentGuides(e)?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(e){this.$gutterLayer.setHighlightGutterLine(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(e){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(e){this.$updateCustomScrollbar(e)},initialValue:!1},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!x.isMobile&&!x.isIE}}),t.VirtualRenderer=k})),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],(function(e,t,a){"use strict";var s=e("../lib/oop"),o=e("../lib/net"),n=e("../lib/event_emitter").EventEmitter,i=e("../config");function l(e){if("undefined"==typeof Worker)return{postMessage:function(){},terminate:function(){}};if(i.get("loadWorkerFromBlob")){var t=function(e){var t="importScripts('"+o.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(e){var a=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return a.append(t),a.getBlob("application/javascript")}}(e),a=(window.URL||window.webkitURL).createObjectURL(t);return new Worker(a)}return new Worker(e)}var r=function(e){e.postMessage||(e=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=e,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){s.implement(this,n),this.$createWorkerFromOldConfig=function(t,a,s,o,n){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),i.get("packaged")||!e.toUrl)o=o||i.moduleUrl(a,"worker");else{var r=this.$normalizePath;o=o||r(e.toUrl("ace/worker/worker.js",null,"_"));var c={};t.forEach((function(t){c[t]=r(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))}))}return this.$worker=l(o),n&&this.send("importScripts",n),this.$worker.postMessage({init:!0,tlns:c,module:a,classname:s}),this.$worker},this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var a=this.callbacks[t.id];a&&(a(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return o.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(e){e.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,a){if(a){var s=this.callbackId++;this.callbacks[s]=a,t.push(s)}this.send(e,t)},this.emit=function(e,t){try{t.data&&t.data.err&&(t.data.err={message:t.data.err.message,stack:t.data.err.stack,code:t.data.err.code}),this.$worker&&this.$worker.postMessage({event:e,data:{data:t.data}})}catch(e){console.error(e.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener,!0)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(r.prototype),t.UIWorkerClient=function(e,t,a){var s=null,o=!1,l=Object.create(n),c=[],d=new r({messageBuffer:c,terminate:function(){},postMessage:function(e){c.push(e),s&&(o?setTimeout(h):h())}});d.setEmitSync=function(e){o=e};var h=function(){var e=c.shift();e.command?s[e.command].apply(s,e.args):e.event&&l._signal(e.event,e.data)};return l.postMessage=function(e){d.onMessage({data:e})},l.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},l.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},i.loadModule(["worker",t],(function(e){for(s=new e[a](l);c.length;)h()})),d},t.WorkerClient=r,t.createWorker=l})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(e,t,a){"use strict";var s=e("./range").Range,o=e("./lib/event_emitter").EventEmitter,n=e("./lib/oop"),i=function(){function e(e,t,a,s,o,n){var i=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=o,this.othersClass=n,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=s,this.$onCursorChange=function(){setTimeout((function(){i.onCursorChange()}))},this.$pos=a;var l=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=l.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)}return e.prototype.setup=function(){var e=this,t=this.doc,a=this.session;this.selectionBefore=a.selection.toJSON(),a.selection.inMultiSelectMode&&a.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var o=this.pos;o.$insertRight=!0,o.detach(),o.markerId=a.addMarker(new s(o.row,o.column,o.row,o.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(a){var s=t.createAnchor(a.row,a.column);s.$insertRight=!0,s.detach(),e.others.push(s)})),a.setUndoSelect(!1)},e.prototype.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach((function(a){a.markerId=e.addMarker(new s(a.row,a.column,a.row,a.column+t.length),t.othersClass,null,!1)}))}},e.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&t.start.column<=this.pos.column+this.length+1,n=t.start.column-this.pos.column;if(this.updateAnchors(e),o&&(this.length+=a),o&&!this.session.$fromUndo)if("insert"===e.action)for(var i=this.others.length-1;i>=0;i--){var l={row:(r=this.others[i]).row,column:r.column+n};this.doc.insertMergedLines(l,e.lines)}else if("remove"===e.action)for(i=this.others.length-1;i>=0;i--){var r;l={row:(r=this.others[i]).row,column:r.column+n},this.doc.remove(new s(l.row,l.column,l.row,l.column-a))}this.$updating=!1,this.updateMarkers()}},e.prototype.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},e.prototype.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,a=function(a,o){t.removeMarker(a.markerId),a.markerId=t.addMarker(new s(a.row,a.column,a.row,a.column+e.length),o,null,!1)};a(this.pos,this.mainClass);for(var o=this.others.length;o--;)a(this.others[o],this.othersClass)}},e.prototype.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},e.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},e.prototype.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,a=0;a1?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var s=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new s(t.multiSelectCommands)})),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],(function(e,t,a){var s=e("./range_list").RangeList,o=e("./range").Range,n=e("./selection").Selection,i=e("./mouse/multi_select_handler").onMouseDown,l=e("./lib/event"),r=e("./lib/lang"),c=e("./commands/multi_select_commands");t.commands=c.defaultCommands.concat(c.multiSelectCommands);var d=new(0,e("./search").Search),h=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(h.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var a=this.toOrientedRange();if(this.rangeList.add(a),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(a),this.$onAddRange(a)}e.cursor||(e.cursor=e.end);var s=this.rangeList.add(e);return this.$onAddRange(e),s.length&&this.$onRemoveRange(s),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var a=e.length;a--;){var s=this.ranges.indexOf(e[a]);this.ranges.splice(s,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new s,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var e=this.ranges.length?this.ranges:[this.getRange()],t=[],a=0;a1){var e=this.rangeList.ranges,t=e[e.length-1],a=o.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(a,t.cursor==t.start)}else{var s=this.session.documentToScreenPosition(this.cursor),n=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(s,n).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,a){var s=[],n=e.column0;)f--;if(f>0)for(var w=0;s[w].isEmpty();)w++;for(var x=f;x>=w;x--)s[x].isEmpty()&&s.splice(x,1)}return s}}.call(n.prototype);var p=e("./editor").Editor;function g(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",i),e.commands.addCommands(c.defaultCommands),function(e){if(e.textInput){var t=e.textInput.getElement(),a=!1;l.addListener(t,"keydown",(function(t){var o=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&o?a||(e.renderer.setMouseCursor("crosshair"),a=!0):a&&s()}),e),l.addListener(t,"keyup",s,e),l.addListener(t,"blur",s,e)}function s(t){a&&(e.renderer.setMouseCursor(""),a=!1)}}(e))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,a=e.length;a--;){var s=e[a];if(s.marker){this.session.removeMarker(s.marker);var o=t.indexOf(s);-1!=o&&t.splice(o,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(c.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(c.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,a=e.editor;if(a.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?s=a.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?s=a.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(a.exitMultiSelectMode(),s=t.exec(a,e.args||{})):s=t.multiSelectAction(a,e.args||{});else{var s=t.exec(a,e.args||{});a.multiSelect.addRange(a.multiSelect.toOrientedRange()),a.multiSelect.mergeOverlappingRanges()}return s}},this.forEachSelection=function(e,t,a){if(!this.inVirtualSelectionMode){var s,o=a&&a.keepOrder,i=1==a||a&&a.$byLines,l=this.session,r=this.selection,c=r.rangeList,d=(o?r:c).ranges;if(!d.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var h=r._eventRegistry;r._eventRegistry={};var p=new n(l);this.inVirtualSelectionMode=!0;for(var g=d.length;g--;){if(i)for(;g>0&&d[g].start.row==d[g-1].end.row;)g--;p.fromOrientedRange(d[g]),p.index=g,this.selection=l.selection=p;var u=e.exec?e.exec(this,t||{}):e(this,t||{});s||void 0===u||(s=u),p.toOrientedRange(d[g])}p.detach(),this.selection=l.selection=r,this.inVirtualSelectionMode=!1,r._eventRegistry=h,r.mergeOverlappingRanges(),r.ranges[0]&&r.fromOrientedRange(r.ranges[0]);var m=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),m&&m.from==m.to&&this.renderer.animateScrolling(m.from),s}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,a=[],s=0;si&&(i=a.column),sd?e.insert(s,r.stringRepeat(" ",n-d)):e.remove(new o(s.row,s.column,s.row,s.column-n+d)),t.start.column=t.end.column=i,t.start.row=t.end.row=s.row,t.cursor=t.end})),t.fromOrientedRange(a[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var d=this.selection.getRange(),h=d.start.row,p=d.end.row,g=h==p;if(g){var u,m=this.session.getLength();do{u=this.session.getLine(p)}while(/[=:]/.test(u)&&++p0);h<0&&(h=0),p>=m&&(p=m-1)}var v=this.session.removeFullLines(h,p);v=this.$reAlignText(v,g),this.session.insert({row:h,column:0},v.join("\n")+"\n"),g||(d.start.column=0,d.end.column=v[v.length-1].length),this.selection.setRange(d)}},this.$reAlignText=function(e,t){var a,s,o,n=!0,i=!0;return e.map((function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==a?(a=t[1].length,s=t[2].length,o=t[3].length,t):(a+s+o!=t[1].length+t[2].length+t[3].length&&(i=!1),a!=t[1].length&&(n=!1),a>t[1].length&&(a=t[1].length),st[3].length&&(o=t[3].length),t):[e]})).map(t?c:n?i?function(e){return e[2]?l(a+s-e[2].length)+e[2]+l(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:c:function(e){return e[2]?l(a)+e[2]+l(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function l(e){return r.stringRepeat(" ",e)}function c(e){return e[2]?l(a)+e[2]+l(s-e[2].length+o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(p.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var a=e.oldSession;a&&(a.multiSelect.off("addRange",this.$onAddRange),a.multiSelect.off("removeRange",this.$onRemoveRange),a.multiSelect.off("multiSelect",this.$onMultiSelect),a.multiSelect.off("singleSelect",this.$onSingleSelect),a.multiSelect.lead.off("change",this.$checkMultiselectChange),a.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=g,e("./config").defineOptions(p.prototype,"editor",{enableMultiselect:{set:function(e){g(this),e?this.on("mousedown",i):this.off("mousedown",i)},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(e,t,a){"use strict";var s=e("../../range").Range,o=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,a){var s=e.getLine(a);return this.foldingStartMarker.test(s)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(s)?"end":""},this.getFoldWidgetRange=function(e,t,a){return null},this.indentationBlock=function(e,t,a){var o=/\S/,n=e.getLine(t),i=n.search(o);if(-1!=i){for(var l=a||n.length,r=e.getLength(),c=t,d=t;++tc){var g=e.getLine(d).length;return new s(c,l,d,g)}}},this.openingBracketBlock=function(e,t,a,o,n){var i={row:a,column:o+1},l=e.$findClosingBracket(t,i,n);if(l){var r=e.foldWidgets[l.row];return null==r&&(r=e.getFoldWidget(l.row)),"start"==r&&l.row>i.row&&(l.row--,l.column=e.getLine(l.row).length),s.fromPoints(i,l)}},this.closingBracketBlock=function(e,t,a,o,n){var i={row:a,column:o},l=e.$findOpeningBracket(t,i);if(l)return l.column++,i.column--,s.fromPoints(l,i)}}).call(o.prototype)})),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],(function(e,t,a){"use strict";var s=e("../lib/dom"),o=e("../range").Range,n=e("../config").nls;t.showErrorMarker=function(e,t){var a=e.session,i=e.getCursorPosition(),l=i.row,r=a.widgetManager.getWidgetsAtRow(l).filter((function(e){return"errorMarker"==e.type}))[0];r?r.destroy():l-=t;var c,d=function(e,t,a){var s=e.getAnnotations().sort(o.comparePoints);if(s.length){var n=function(e,t,a){for(var s=0,o=e.length-1;s<=o;){var n=s+o>>1,i=a(t,e[n]);if(i>0)s=n+1;else{if(!(i<0))return n;o=n-1}}return-(s+1)}(s,{row:t,column:-1},o.comparePoints);n<0&&(n=-n-1),n>=s.length?n=a>0?0:s.length-1:0===n&&a<0&&(n=s.length-1);var i=s[n];if(i&&a){if(i.row===t){do{i=s[n+=a]}while(i&&i.row===t);if(!i)return s.slice()}var l=[];t=i.row;do{l[a<0?"unshift":"push"](i),i=s[n+=a]}while(i&&i.row==t);return l.length&&l}}}(a,l,t);if(d){var h=d[0];i.column=(h.pos&&"number"!=typeof h.column?h.pos.sc:h.column)||0,i.row=h.row,c=e.renderer.$gutterLayer.$annotations[i.row]}else{if(r)return;c={displayText:[n("error-marker.good-state","Looks good!")],className:"ace_ok"}}e.session.unfold(i.row),e.selection.moveToPosition(i);var p={row:i.row,fixedWidth:!0,coverGutter:!0,el:s.createElement("div"),type:"errorMarker"},g=p.el.appendChild(s.createElement("div")),u=p.el.appendChild(s.createElement("div"));u.className="error_widget_arrow "+c.className;var m=e.renderer.$cursorLayer.getPixelPosition(i).left;u.style.left=m+e.renderer.gutterWidth-5+"px",p.el.className="error_widget_wrapper",g.className="error_widget "+c.className,c.displayText.forEach((function(e,t){g.appendChild(s.createTextNode(e)),t"a"}),[e]}},{regex:"/\\w*}",onMatch:function(e,t,a){var s=a.shift();return s&&(s.flag=e.slice(1,-1)),this.next=s&&s.tabstopId?"start":"",[s||e]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(e,t,a){return[{text:e.slice(1)}]}},{regex:/\${\w+/,onMatch:function(e,t,a){var s={text:e.slice(2)};return a.unshift(s),[s]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(e,t,a){var s=a.shift();return this.next=s&&s.tabstopId?"start":"",[s||e]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(e,t,a){return a[0].formatFunction=e.slice(2,-1),[a.shift()]},next:"formatString"},s,{regex:/:[\?\-+]?/,onMatch:function(e,t,a){"+"==e[1]&&(a[0].ifEnd=a[0]),"?"==e[1]&&(a[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),e.$tokenizer},e.prototype.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map((function(e){return e.value||e}))},e.prototype.getVariableValue=function(e,t,a){if(/^\d+$/.test(t))return(this.variables.__||{})[t]||"";if(/^[A-Z]\d+$/.test(t))return(this.variables[t[0]+"__"]||{})[t.substr(1)]||"";if(t=t.replace(/^TM_/,""),!this.variables.hasOwnProperty(t))return"";var s=this.variables[t];return"function"==typeof s&&(s=this.variables[t](e,t,a)),s??""},e.prototype.tmStrFormat=function(e,t,a){if(!t.fmt)return e;var s=t.flag||"",o=t.guard;o=new RegExp(o,s.replace(/[^gim]/g,""));var n="string"==typeof t.fmt?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,i=this,l=e.replace(o,(function(){var e=i.variables.__;i.variables.__=[].slice.call(arguments);for(var t=i.resolveVariables(n,a),s="E",o=0;o=0&&n.splice(i,1)}}e.content?o(e):Array.isArray(e)&&e.forEach(o)},e.prototype.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t,a=[],s={},o=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;t=o.exec(e);){if(t[1])try{s=JSON.parse(t[1]),a.push(s)}catch(e){}if(t[4])s.content=t[4].replace(/^\t/gm,""),a.push(s),s={};else{var n=t[2],i=t[3];if("regex"==n){var l=/\/((?:[^\/\\]|\\.)*)|$/g;s.guard=l.exec(i)[1],s.trigger=l.exec(i)[1],s.endTrigger=l.exec(i)[1],s.endGuard=l.exec(i)[1]}else"snippet"==n?(s.tabTrigger=i.match(/^\S*/)[0],s.name||(s.name=i)):n&&(s[n]=i)}}return a},e.prototype.getSnippetByName=function(e,t){var a,s=this.snippetNameMap;return this.getActiveScopes(t).some((function(t){var o=s[t];return o&&(a=o[e]),!!a}),this),a},e}();o.implement(u.prototype,n);var m=function(e,t,a){void 0===a&&(a={});var s=e.getCursorPosition(),o=e.session.getLine(s.row),n=e.session.getTabString(),i=o.match(/^\s*/)[0];s.column1?(f=t[t.length-1].length,b+=t.length-1):f+=e.length,w+=e}else e&&(e.start?e.end={row:b,column:f}:e.start={row:b,column:f})})),{text:w,tabstops:r,tokens:l}},v=function(){function e(e){if(this.index=0,this.ranges=[],this.tabstops=[],e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=i.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)}return e.prototype.attach=function(e){this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.session=e.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},e.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},e.prototype.onChange=function(e){for(var t="r"==e.action[0],a=this.selectedTabstop||{},s=a.parents||{},o=this.tabstops.slice(),n=0;n2&&(this.tabstops.length&&n.push(n.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,n))},e.prototype.addTabstopMarkers=function(e){var t=this.session;e.forEach((function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))}))},e.prototype.removeTabstopMarkers=function(e){var t=this.session;e.forEach((function(e){t.removeMarker(e.markerId),e.markerId=null}))},e.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var e=this.selectedTabstop.snippetId;0===this.selectedTabstop.index&&e--,this.tabstops.forEach((function(t){t.snippetId===e?this.addTabstopMarkers(t):this.removeTabstopMarkers(t)}),this)}},e.prototype.removeRange=function(e){var t=e.tabstop.indexOf(e);-1!=t&&e.tabstop.splice(t,1),-1!=(t=this.ranges.indexOf(e))&&this.ranges.splice(t,1),-1!=(t=e.tabstop.rangeList.ranges.indexOf(e))&&e.tabstop.splice(t,1),this.session.removeMarker(e.markerId),e.tabstop.length||(-1!=(t=this.tabstops.indexOf(e.tabstop))&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},e}();v.prototype.keyboardHandler=new c,v.prototype.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||(e.tabstopManager.tabNext(1),e.renderer.scrollCursorIntoView())},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1),e.renderer.scrollCursorIntoView()},Esc:function(e){e.tabstopManager.detach()}});var b=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},f=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};s.importCssString("\n.ace_snippet-marker {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n background: rgba(194, 193, 208, 0.09);\n border: 1px dotted rgba(211, 208, 235, 0.62);\n position: absolute;\n}","snippets.css",!1),t.snippetManager=new u;var w=e("./editor").Editor;(function(){this.insertSnippet=function(e,a){return t.snippetManager.insertSnippet(this,e,a)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(w.prototype)})),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],(function(e,t,a){"use strict";var s=e("../virtual_renderer").VirtualRenderer,o=e("../editor").Editor,n=e("../range").Range,i=e("../lib/event"),l=e("../lib/lang"),r=e("../lib/dom"),c=e("../config").nls,d=e("./../lib/useragent"),h=function(e){return"suggest-aria-id:".concat(e)},p=d.isSafari?"menu":"listbox",g=d.isSafari?"menuitem":"option",u=d.isSafari?"aria-current":"aria-selected",m=function(e){var t=new s(e);t.$maxLines=4;var a=new o(t);return a.setHighlightActiveLine(!1),a.setShowPrintMargin(!1),a.renderer.setShowGutter(!1),a.renderer.setHighlightGutterLine(!1),a.$mouseHandler.$focusTimeout=0,a.$highlightTagPending=!0,a};r.importCssString('\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #CAD6FA;\n z-index: 1;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #3a674e;\n}\n.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid #abbffe;\n margin-top: -1px;\n background: rgba(233,233,253,0.4);\n position: absolute;\n z-index: 2;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid rgba(109, 150, 13, 0.8);\n background: rgba(58, 103, 78, 0.62);\n}\n.ace_completion-meta {\n opacity: 0.5;\n margin-left: 0.9em;\n}\n.ace_completion-message {\n margin-left: 0.9em;\n color: blue;\n}\n.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #2d69c7;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #93ca12;\n}\n.ace_editor.ace_autocomplete {\n width: 300px;\n z-index: 200000;\n border: 1px lightgray solid;\n position: fixed;\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n line-height: 1.4;\n background: #fefefe;\n color: #111;\n}\n.ace_dark.ace_editor.ace_autocomplete {\n border: 1px #484747 solid;\n box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\n line-height: 1.4;\n background: #25282c;\n color: #c1c1c1;\n}\n.ace_autocomplete .ace_text-layer {\n width: calc(100% - 8px);\n}\n.ace_autocomplete .ace_line {\n display: flex;\n align-items: center;\n}\n.ace_autocomplete .ace_line > * {\n min-width: 0;\n flex: 0 0 auto;\n}\n.ace_autocomplete .ace_line .ace_ {\n flex: 0 1 auto;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ace_autocomplete .ace_completion-spacer {\n flex: 1;\n}\n.ace_autocomplete.ace_loading:after {\n content: "";\n position: absolute;\n top: 0px;\n height: 2px;\n width: 8%;\n background: blue;\n z-index: 100;\n animation: ace_progress 3s infinite linear;\n animation-delay: 300ms;\n transform: translateX(-100%) scaleX(1);\n}\n@keyframes ace_progress {\n 0% { transform: translateX(-100%) scaleX(1) }\n 50% { transform: translateX(625%) scaleX(2) } \n 100% { transform: translateX(1500%) scaleX(3) } \n}\n@media (prefers-reduced-motion) {\n .ace_autocomplete.ace_loading:after {\n transform: translateX(625%) scaleX(2);\n animation: none;\n }\n}\n',"autocompletion.css",!1),t.AcePopup=function(e){var t=r.createElement("div"),a=m(t);e&&e.appendChild(t),t.style.display="none",a.renderer.content.style.cursor="default",a.renderer.setStyle("ace_autocomplete"),a.renderer.$textLayer.element.setAttribute("role",p),a.renderer.$textLayer.element.setAttribute("aria-roledescription",c("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),a.renderer.$textLayer.element.setAttribute("aria-label",c("autocomplete.popup.aria-label","Autocomplete suggestions")),a.renderer.textarea.setAttribute("aria-hidden","true"),a.setOption("displayIndentGuides",!1),a.setOption("dragDelay",150);var s,o=function(){};a.focus=o,a.$isFocused=!0,a.renderer.$cursorLayer.restartTimer=o,a.renderer.$cursorLayer.element.style.opacity="0",a.renderer.$maxLines=8,a.renderer.$keepTextAreaAtCursor=!1,a.setHighlightActiveLine(!1),a.session.highlight(""),a.session.$searchHighlight.clazz="ace_highlight-marker",a.on("mousedown",(function(e){var t=e.getDocumentPosition();a.selection.moveToPosition(t),v.start.row=v.end.row=t.row,e.stop()}));var d=new n(-1,0,-1,1/0),v=new n(-1,0,-1,1/0);v.id=a.session.addMarker(v,"ace_active-line","fullLine"),a.setSelectOnHover=function(e){e?d.id&&(a.session.removeMarker(d.id),d.id=null):d.id=a.session.addMarker(d,"ace_line-hover","fullLine")},a.setSelectOnHover(!1),a.on("mousemove",(function(e){if(s){if(s.x!=e.x||s.y!=e.y){(s=e).scrollTop=a.renderer.scrollTop,a.isMouseOver=!0;var t=s.getDocumentPosition().row;d.start.row!=t&&(d.id||a.setRow(t),f(t))}}else s=e})),a.renderer.on("beforeRender",(function(){if(s&&-1!=d.start.row){s.$pos=null;var e=s.getDocumentPosition().row;d.id||a.setRow(e),f(e,!0)}})),a.renderer.on("afterRender",(function(){for(var e=a.renderer.$textLayer,t=e.config.firstRow,s=e.config.lastRow;t<=s;t++){var o=e.element.childNodes[t-e.config.firstRow];o.setAttribute("role",g),o.setAttribute("aria-roledescription",c("autocomplete.popup.item.aria-roledescription","item")),o.setAttribute("aria-setsize",a.data.length),o.setAttribute("aria-describedby","doc-tooltip"),o.setAttribute("aria-posinset",t+1);var n=a.getData(t);if(n){var i="".concat(n.caption||n.value).concat(n.meta?", ".concat(n.meta):"");o.setAttribute("aria-label",i)}o.querySelectorAll(".ace_completion-highlight").forEach((function(e){e.setAttribute("role","mark")}))}})),a.renderer.on("afterRender",(function(){var e=a.getRow(),t=a.renderer.$textLayer,s=t.element.childNodes[e-t.config.firstRow],o=document.activeElement;if(s!==a.selectedNode&&a.selectedNode&&(r.removeCssClass(a.selectedNode,"ace_selected"),a.selectedNode.removeAttribute(u),a.selectedNode.removeAttribute("id")),o.removeAttribute("aria-activedescendant"),a.selectedNode=s,s){var n=h(e);r.addCssClass(s,"ace_selected"),s.id=n,t.element.setAttribute("aria-activedescendant",n),o.setAttribute("aria-activedescendant",n),s.setAttribute(u,"true")}}));var b=function(){f(-1)},f=function(e,t){e!==d.start.row&&(d.start.row=d.end.row=e,t||a.session._emit("changeBackMarker"),a._emit("changeHoverMarker"))};a.getHoveredRow=function(){return d.start.row},i.addListener(a.container,"mouseout",(function(){a.isMouseOver=!1,b()})),a.on("hide",b),a.on("changeSelection",b),a.session.doc.getLength=function(){return a.data.length},a.session.doc.getLine=function(e){var t=a.data[e];return"string"==typeof t?t:t&&t.value||""};var w=a.session.bgTokenizer;return w.$tokenizeRow=function(e){var t=a.data[e],s=[];if(!t)return s;"string"==typeof t&&(t={value:t});var o=t.caption||t.value||t.name;function n(e,a){e&&s.push({type:(t.className||"")+(a||""),value:e})}for(var i=o.toLowerCase(),l=(a.filterText||"").toLowerCase(),r=0,c=0,d=0;d<=l.length;d++)if(d!=c&&(t.matchMask&1<=h?"bottom":"top"),"top"===o?(p.bottom=e.top-this.$borderSize,p.top=p.bottom-h):"bottom"===o&&(p.top=e.top+t+this.$borderSize,p.bottom=p.top+h);var m=p.top>=0&&p.bottom<=r;if(!n&&!m)return!1;d.$maxPixelHeight=m?null:"top"===o?u:g,"top"===o?(i.style.top="",i.style.bottom=r+l-p.bottom+"px",a.isTopdown=!1):(i.style.top=p.top+"px",i.style.bottom="",a.isTopdown=!0),i.style.display="";var v=e.left;return v+i.offsetWidth>c&&(v=c-i.offsetWidth),i.style.left=v+"px",i.style.right="",a.isOpen||(a.isOpen=!0,this._signal("show"),s=null),a.anchorPos=e,a.anchor=o,!0},a.show=function(e,t,a){this.tryShow(e,t,a?"bottom":void 0,!0)},a.goTo=function(e){var t=this.getRow(),a=this.session.getLength()-1;switch(e){case"up":t=t<=0?a:t-1;break;case"down":t=t>=a?-1:t+1;break;case"start":t=0;break;case"end":t=a}this.setRow(t)},a.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},a.$imageSize=0,a.$borderSize=1,a},t.$singleLineEditor=m,t.getAriaId=h})),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],(function(e,t,a){"use strict";var s=function(){function e(e){this.editor=e,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return e.prototype.setScreenReaderContent=function(e){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",function(){var e=this.popup.getRow(),t=this.popup.renderer.$textLayer,a=t.element.childNodes[e-t.config.firstRow];if(a){for(var s="doc-tooltip ",o=0;o=0&&a.test(e[n]);n--)o.push(e[n]);return o.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,a){a=a||s;for(var o=[],n=t;n0)for(var t=this.popup.getFirstVisibleRow();t<=this.popup.getLastVisibleRow();t++){var a=this.popup.getData(t);!a||e&&!a.hideInlinePreview||this.$seen(a)}},e.prototype.$onPopupShow=function(e){this.$onPopupChange(e),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},e.prototype.observeLayoutChanges=function(){if(!this.$elements&&this.editor){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var e=this.editor.container.parentNode,t=[];e;)t.push(e),e.addEventListener("scroll",this.onLayoutChange,{passive:!0}),e=e.parentNode;this.$elements=t}},e.prototype.unObserveLayoutChanges=function(){var e=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach((function(t){t.removeEventListener("scroll",e.onLayoutChange,{passive:!0})})),this.$elements=null},e.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},e.prototype.$updatePopupPosition=function(){var e=this.editor,t=e.renderer,a=t.layerConfig.lineHeight,s=t.$cursorLayer.getPixelPosition(this.base,!0);s.left-=this.popup.getTextLeftOffset();var o=e.container.getBoundingClientRect();s.top+=o.top-t.layerConfig.offset,s.left+=o.left-e.renderer.scrollLeft,s.left+=t.gutterWidth;var n={top:s.top,left:s.left};t.$ghostText&&t.$ghostTextWidget&&this.base.row===t.$ghostText.position.row&&(n.top+=t.$ghostTextWidget.el.offsetHeight);var i=e.container.getBoundingClientRect().bottom-a,l=ithis.filterText&&0===e.lastIndexOf(this.filterText,0))var t=this.filtered;else t=this.all;this.filterText=e,t=(t=this.filterCompletions(t,this.filterText)).sort((function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)}));var a=null;t=t.filter((function(e){var t=e.snippet||e.caption||e.value;return t!==a&&(a=t,!0)})),this.filtered=t},e.prototype.filterCompletions=function(e,t){var a=[],s=t.toUpperCase(),o=t.toLowerCase();e:for(var n,i=0;n=e[i];i++)if(n.skipFilter)n.$score=n.score,a.push(n);else{var l=!this.ignoreCaption&&n.caption||n.value||n.snippet;if(l){var r,c,d=-1,h=0,p=0;if(this.exactMatch){if(t!==l.substr(0,t.length))continue e}else{var g=l.toLowerCase().indexOf(o);if(g>-1)p=g;else for(var u=0;u=0&&(v<0||m0&&(-1===d&&(p+=10),p+=c,h|=1<",i.escapeHTML(e.caption),"","
",i.escapeHTML((t=e.snippet,a={},t.replace(/\${(\d+)(:(.*?))?}/g,(function(e,t,s,o){return a[t]=o||""})).replace(/\$(\d+?)/g,(function(e,t){return a[t]}))))].join(""))},id:"snippetCompleter"},h=[d,r,c];t.setCompleters=function(e){h.length=0,e&&h.push.apply(h,e)},t.addCompleter=function(e){h.push(e)},t.textCompleter=r,t.keyWordCompleter=c,t.snippetCompleter=d;var p,g={name:"expandSnippet",exec:function(e){return s.expandWithTab(e)},bindKey:"Tab"},u=function(e,t){m(t.session.$mode)},m=function(e){"string"==typeof e&&(e=n.$modes[e]),e&&(s.files||(s.files={}),v(e.$id,e.snippetFileId),e.modes&&e.modes.forEach(m))},v=function(e,t){t&&e&&!s.files[e]&&(s.files[e]={},n.loadModule(t,(function(t){t&&(s.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=s.parseSnippetFile(t.snippetText)),s.register(t.snippets||[],t.scope),t.includeScopes&&(s.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach((function(e){m("ace/mode/"+e)}))))})))},b=function(e){var t=e.editor,a=t.completer&&t.completer.activated;if("backspace"===e.command.name)a&&!l.getCompletionPrefix(t)&&t.completer.detach();else if("insertstring"===e.command.name&&!a){p=e;var s=e.editor.$liveAutocompletionDelay;s?f.delay(s):w(e)}},f=i.delayedCall((function(){w(p)}),0),w=function(e){var t=e.editor,a=l.getCompletionPrefix(t),s=e.args,n=l.triggerAutocomplete(t,s);if(a&&a.length>=t.$liveAutocompletionThreshold||n){var i=o.for(t);i.autoShown=!0,i.showPopup(t)}},x=e("../editor").Editor;e("../config").defineOptions(x.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:h),this.commands.addCommand(o.startCommand)):this.commands.removeCommand(o.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:h),this.commands.on("afterExec",b)):this.commands.off("afterExec",b)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(e){e?(this.commands.addCommand(g),this.on("changeMode",u),u(0,this)):(this.commands.removeCommand(g),this.off("changeMode",u))},value:!1}})})),ace.require(["ace/ext/language_tools"],(function(t){e&&(e.exports=t)}))},5336(e,t,a){e=a.nmd(e),ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],(function(e,t,a){"use strict";var s,o=e("./lib/oop"),n=(e("./lib/lang"),e("./lib/event_emitter").EventEmitter),i=e("./editor").Editor,l=e("./virtual_renderer").VirtualRenderer,r=e("./edit_session").EditSession;(function(){o.implement(this,n),this.$createEditor=function(){var e=document.createElement("div");e.className=this.$editorCSS,e.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(e);var t=new i(new l(e,this.$theme));return t.on("focus",function(){this._emit("focus",t)}.bind(this)),this.$editors.push(t),t.setFontSize(this.$fontSize),t},this.setSplits=function(e){var t;if(e<1)throw"The number of splits have to be > 0!";if(e!=this.$splits){if(e>this.$splits){for(;this.$splitse;)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach((function(t){t.setTheme(e)}))},this.setKeyboardHandler=function(e){this.$editors.forEach((function(t){t.setKeyboardHandler(e)}))},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize="",this.setFontSize=function(e){this.$fontSize=e,this.forEach((function(t){t.setFontSize(e)}))},this.$cloneSession=function(e){var t=new r(e.getDocument(),e.getMode()),a=e.getUndoManager();return t.setUndoManager(a),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var a;a=null==t?this.$cEditor:this.$editors[t];var s=this.$editors.some((function(t){return t.session===e}));return s&&(e=this.$cloneSession(e)),a.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){this.$orientation!=e&&(this.$orientation=e,this.resize())},this.resize=function(){var e,t=this.$container.clientWidth,a=this.$container.clientHeight;if(this.$orientation==this.BESIDE)for(var s=t/this.$splits,o=0;oc)break;var d=this.getFoldWidgetRange(e,"all",t);if(d){if(d.start.row<=n)break;if(d.isMultiLine())t=d.end.row;else if(s==c)break}l=t}}return new o(n,i,l,e.getLine(l).length)},this.getCommentRegionBlock=function(e,t,a){for(var s=t.search(/\s*$/),n=e.getLength(),i=a,l=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,r=1;++ai)return new o(i,s,a,t.length)}}.call(i.prototype)})),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],(function(e,t,a){"use strict";var s=e("../lib/oop"),o=e("./text").Mode,n=e("./css_highlight_rules").CssHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,l=e("../worker/worker_client").WorkerClient,r=e("./css_completions").CssCompletions,c=e("./behaviour/css").CssBehaviour,d=e("./folding/cstyle").FoldMode,h=function(){this.HighlightRules=n,this.$outdent=new i,this.$behaviour=new c,this.$completer=new r,this.foldingRules=new d};s.inherits(h,o),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,a){var s=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e).tokens;return o.length&&"comment"==o[o.length-1].type||t.match(/^.*\{\s*$/)&&(s+=a),s},this.checkOutdent=function(e,t,a){return this.$outdent.checkOutdent(t,a)},this.autoOutdent=function(e,t,a){this.$outdent.autoOutdent(t,a)},this.getCompletions=function(e,t,a,s){return this.$completer.getCompletions(e,t,a,s)},this.createWorker=function(e){var t=new l(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",(function(t){e.setAnnotations(t.data)})),t.on("terminate",(function(){e.clearAnnotations()})),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(h.prototype),t.Mode=h})),ace.require(["ace/mode/css"],(function(t){e&&(e.exports=t)}))},3222(e,t,a){e=a.nmd(e),ace.define("ace/snippets/css.snippets",["require","exports","module"],(function(e,t,a){a.exports="snippet .\n\t${1} {\n\t\t${2}\n\t}\nsnippet !\n\t !important\nsnippet bdi:m+\n\t-moz-border-image: url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${7:stretch};\nsnippet bdi:m\n\t-moz-border-image: ${1};\nsnippet bdrz:m\n\t-moz-border-radius: ${1};\nsnippet bxsh:m+\n\t-moz-box-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\nsnippet bxsh:m\n\t-moz-box-shadow: ${1};\nsnippet bdi:w+\n\t-webkit-border-image: url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${7:stretch};\nsnippet bdi:w\n\t-webkit-border-image: ${1};\nsnippet bdrz:w\n\t-webkit-border-radius: ${1};\nsnippet bxsh:w+\n\t-webkit-box-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\nsnippet bxsh:w\n\t-webkit-box-shadow: ${1};\nsnippet @f\n\t@font-face {\n\t\tfont-family: ${1};\n\t\tsrc: url(${2});\n\t}\nsnippet @i\n\t@import url(${1});\nsnippet @m\n\t@media ${1:print} {\n\t\t${2}\n\t}\nsnippet bg+\n\tbackground: #${1:FFF} url(${2}) ${3:0} ${4:0} ${5:no-repeat};\nsnippet bga\n\tbackground-attachment: ${1};\nsnippet bga:f\n\tbackground-attachment: fixed;\nsnippet bga:s\n\tbackground-attachment: scroll;\nsnippet bgbk\n\tbackground-break: ${1};\nsnippet bgbk:bb\n\tbackground-break: bounding-box;\nsnippet bgbk:c\n\tbackground-break: continuous;\nsnippet bgbk:eb\n\tbackground-break: each-box;\nsnippet bgcp\n\tbackground-clip: ${1};\nsnippet bgcp:bb\n\tbackground-clip: border-box;\nsnippet bgcp:cb\n\tbackground-clip: content-box;\nsnippet bgcp:nc\n\tbackground-clip: no-clip;\nsnippet bgcp:pb\n\tbackground-clip: padding-box;\nsnippet bgc\n\tbackground-color: #${1:FFF};\nsnippet bgc:t\n\tbackground-color: transparent;\nsnippet bgi\n\tbackground-image: url(${1});\nsnippet bgi:n\n\tbackground-image: none;\nsnippet bgo\n\tbackground-origin: ${1};\nsnippet bgo:bb\n\tbackground-origin: border-box;\nsnippet bgo:cb\n\tbackground-origin: content-box;\nsnippet bgo:pb\n\tbackground-origin: padding-box;\nsnippet bgpx\n\tbackground-position-x: ${1};\nsnippet bgpy\n\tbackground-position-y: ${1};\nsnippet bgp\n\tbackground-position: ${1:0} ${2:0};\nsnippet bgr\n\tbackground-repeat: ${1};\nsnippet bgr:n\n\tbackground-repeat: no-repeat;\nsnippet bgr:x\n\tbackground-repeat: repeat-x;\nsnippet bgr:y\n\tbackground-repeat: repeat-y;\nsnippet bgr:r\n\tbackground-repeat: repeat;\nsnippet bgz\n\tbackground-size: ${1};\nsnippet bgz:a\n\tbackground-size: auto;\nsnippet bgz:ct\n\tbackground-size: contain;\nsnippet bgz:cv\n\tbackground-size: cover;\nsnippet bg\n\tbackground: ${1};\nsnippet bg:ie\n\tfilter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='${1}',sizingMethod='${2:crop}');\nsnippet bg:n\n\tbackground: none;\nsnippet bd+\n\tborder: ${1:1px} ${2:solid} #${3:000};\nsnippet bdb+\n\tborder-bottom: ${1:1px} ${2:solid} #${3:000};\nsnippet bdbc\n\tborder-bottom-color: #${1:000};\nsnippet bdbi\n\tborder-bottom-image: url(${1});\nsnippet bdbi:n\n\tborder-bottom-image: none;\nsnippet bdbli\n\tborder-bottom-left-image: url(${1});\nsnippet bdbli:c\n\tborder-bottom-left-image: continue;\nsnippet bdbli:n\n\tborder-bottom-left-image: none;\nsnippet bdblrz\n\tborder-bottom-left-radius: ${1};\nsnippet bdbri\n\tborder-bottom-right-image: url(${1});\nsnippet bdbri:c\n\tborder-bottom-right-image: continue;\nsnippet bdbri:n\n\tborder-bottom-right-image: none;\nsnippet bdbrrz\n\tborder-bottom-right-radius: ${1};\nsnippet bdbs\n\tborder-bottom-style: ${1};\nsnippet bdbs:n\n\tborder-bottom-style: none;\nsnippet bdbw\n\tborder-bottom-width: ${1};\nsnippet bdb\n\tborder-bottom: ${1};\nsnippet bdb:n\n\tborder-bottom: none;\nsnippet bdbk\n\tborder-break: ${1};\nsnippet bdbk:c\n\tborder-break: close;\nsnippet bdcl\n\tborder-collapse: ${1};\nsnippet bdcl:c\n\tborder-collapse: collapse;\nsnippet bdcl:s\n\tborder-collapse: separate;\nsnippet bdc\n\tborder-color: #${1:000};\nsnippet bdci\n\tborder-corner-image: url(${1});\nsnippet bdci:c\n\tborder-corner-image: continue;\nsnippet bdci:n\n\tborder-corner-image: none;\nsnippet bdf\n\tborder-fit: ${1};\nsnippet bdf:c\n\tborder-fit: clip;\nsnippet bdf:of\n\tborder-fit: overwrite;\nsnippet bdf:ow\n\tborder-fit: overwrite;\nsnippet bdf:r\n\tborder-fit: repeat;\nsnippet bdf:sc\n\tborder-fit: scale;\nsnippet bdf:sp\n\tborder-fit: space;\nsnippet bdf:st\n\tborder-fit: stretch;\nsnippet bdi\n\tborder-image: url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${7:stretch};\nsnippet bdi:n\n\tborder-image: none;\nsnippet bdl+\n\tborder-left: ${1:1px} ${2:solid} #${3:000};\nsnippet bdlc\n\tborder-left-color: #${1:000};\nsnippet bdli\n\tborder-left-image: url(${1});\nsnippet bdli:n\n\tborder-left-image: none;\nsnippet bdls\n\tborder-left-style: ${1};\nsnippet bdls:n\n\tborder-left-style: none;\nsnippet bdlw\n\tborder-left-width: ${1};\nsnippet bdl\n\tborder-left: ${1};\nsnippet bdl:n\n\tborder-left: none;\nsnippet bdlt\n\tborder-length: ${1};\nsnippet bdlt:a\n\tborder-length: auto;\nsnippet bdrz\n\tborder-radius: ${1};\nsnippet bdr+\n\tborder-right: ${1:1px} ${2:solid} #${3:000};\nsnippet bdrc\n\tborder-right-color: #${1:000};\nsnippet bdri\n\tborder-right-image: url(${1});\nsnippet bdri:n\n\tborder-right-image: none;\nsnippet bdrs\n\tborder-right-style: ${1};\nsnippet bdrs:n\n\tborder-right-style: none;\nsnippet bdrw\n\tborder-right-width: ${1};\nsnippet bdr\n\tborder-right: ${1};\nsnippet bdr:n\n\tborder-right: none;\nsnippet bdsp\n\tborder-spacing: ${1};\nsnippet bds\n\tborder-style: ${1};\nsnippet bds:ds\n\tborder-style: dashed;\nsnippet bds:dtds\n\tborder-style: dot-dash;\nsnippet bds:dtdtds\n\tborder-style: dot-dot-dash;\nsnippet bds:dt\n\tborder-style: dotted;\nsnippet bds:db\n\tborder-style: double;\nsnippet bds:g\n\tborder-style: groove;\nsnippet bds:h\n\tborder-style: hidden;\nsnippet bds:i\n\tborder-style: inset;\nsnippet bds:n\n\tborder-style: none;\nsnippet bds:o\n\tborder-style: outset;\nsnippet bds:r\n\tborder-style: ridge;\nsnippet bds:s\n\tborder-style: solid;\nsnippet bds:w\n\tborder-style: wave;\nsnippet bdt+\n\tborder-top: ${1:1px} ${2:solid} #${3:000};\nsnippet bdtc\n\tborder-top-color: #${1:000};\nsnippet bdti\n\tborder-top-image: url(${1});\nsnippet bdti:n\n\tborder-top-image: none;\nsnippet bdtli\n\tborder-top-left-image: url(${1});\nsnippet bdtli:c\n\tborder-corner-image: continue;\nsnippet bdtli:n\n\tborder-corner-image: none;\nsnippet bdtlrz\n\tborder-top-left-radius: ${1};\nsnippet bdtri\n\tborder-top-right-image: url(${1});\nsnippet bdtri:c\n\tborder-top-right-image: continue;\nsnippet bdtri:n\n\tborder-top-right-image: none;\nsnippet bdtrrz\n\tborder-top-right-radius: ${1};\nsnippet bdts\n\tborder-top-style: ${1};\nsnippet bdts:n\n\tborder-top-style: none;\nsnippet bdtw\n\tborder-top-width: ${1};\nsnippet bdt\n\tborder-top: ${1};\nsnippet bdt:n\n\tborder-top: none;\nsnippet bdw\n\tborder-width: ${1};\nsnippet bd\n\tborder: ${1};\nsnippet bd:n\n\tborder: none;\nsnippet b\n\tbottom: ${1};\nsnippet b:a\n\tbottom: auto;\nsnippet bxsh+\n\tbox-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\nsnippet bxsh\n\tbox-shadow: ${1};\nsnippet bxsh:n\n\tbox-shadow: none;\nsnippet bxz\n\tbox-sizing: ${1};\nsnippet bxz:bb\n\tbox-sizing: border-box;\nsnippet bxz:cb\n\tbox-sizing: content-box;\nsnippet cps\n\tcaption-side: ${1};\nsnippet cps:b\n\tcaption-side: bottom;\nsnippet cps:t\n\tcaption-side: top;\nsnippet cl\n\tclear: ${1};\nsnippet cl:b\n\tclear: both;\nsnippet cl:l\n\tclear: left;\nsnippet cl:n\n\tclear: none;\nsnippet cl:r\n\tclear: right;\nsnippet cp\n\tclip: ${1};\nsnippet cp:a\n\tclip: auto;\nsnippet cp:r\n\tclip: rect(${1:0} ${2:0} ${3:0} ${4:0});\nsnippet c\n\tcolor: #${1:000};\nsnippet ct\n\tcontent: ${1};\nsnippet ct:a\n\tcontent: attr(${1});\nsnippet ct:cq\n\tcontent: close-quote;\nsnippet ct:c\n\tcontent: counter(${1});\nsnippet ct:cs\n\tcontent: counters(${1});\nsnippet ct:ncq\n\tcontent: no-close-quote;\nsnippet ct:noq\n\tcontent: no-open-quote;\nsnippet ct:n\n\tcontent: normal;\nsnippet ct:oq\n\tcontent: open-quote;\nsnippet coi\n\tcounter-increment: ${1};\nsnippet cor\n\tcounter-reset: ${1};\nsnippet cur\n\tcursor: ${1};\nsnippet cur:a\n\tcursor: auto;\nsnippet cur:c\n\tcursor: crosshair;\nsnippet cur:d\n\tcursor: default;\nsnippet cur:ha\n\tcursor: hand;\nsnippet cur:he\n\tcursor: help;\nsnippet cur:m\n\tcursor: move;\nsnippet cur:p\n\tcursor: pointer;\nsnippet cur:t\n\tcursor: text;\nsnippet d\n\tdisplay: ${1};\nsnippet d:mib\n\tdisplay: -moz-inline-box;\nsnippet d:mis\n\tdisplay: -moz-inline-stack;\nsnippet d:b\n\tdisplay: block;\nsnippet d:cp\n\tdisplay: compact;\nsnippet d:ib\n\tdisplay: inline-block;\nsnippet d:itb\n\tdisplay: inline-table;\nsnippet d:i\n\tdisplay: inline;\nsnippet d:li\n\tdisplay: list-item;\nsnippet d:n\n\tdisplay: none;\nsnippet d:ri\n\tdisplay: run-in;\nsnippet d:tbcp\n\tdisplay: table-caption;\nsnippet d:tbc\n\tdisplay: table-cell;\nsnippet d:tbclg\n\tdisplay: table-column-group;\nsnippet d:tbcl\n\tdisplay: table-column;\nsnippet d:tbfg\n\tdisplay: table-footer-group;\nsnippet d:tbhg\n\tdisplay: table-header-group;\nsnippet d:tbrg\n\tdisplay: table-row-group;\nsnippet d:tbr\n\tdisplay: table-row;\nsnippet d:tb\n\tdisplay: table;\nsnippet ec\n\tempty-cells: ${1};\nsnippet ec:h\n\tempty-cells: hide;\nsnippet ec:s\n\tempty-cells: show;\nsnippet exp\n\texpression()\nsnippet fl\n\tfloat: ${1};\nsnippet fl:l\n\tfloat: left;\nsnippet fl:n\n\tfloat: none;\nsnippet fl:r\n\tfloat: right;\nsnippet f+\n\tfont: ${1:1em} ${2:Arial},${3:sans-serif};\nsnippet fef\n\tfont-effect: ${1};\nsnippet fef:eb\n\tfont-effect: emboss;\nsnippet fef:eg\n\tfont-effect: engrave;\nsnippet fef:n\n\tfont-effect: none;\nsnippet fef:o\n\tfont-effect: outline;\nsnippet femp\n\tfont-emphasize-position: ${1};\nsnippet femp:a\n\tfont-emphasize-position: after;\nsnippet femp:b\n\tfont-emphasize-position: before;\nsnippet fems\n\tfont-emphasize-style: ${1};\nsnippet fems:ac\n\tfont-emphasize-style: accent;\nsnippet fems:c\n\tfont-emphasize-style: circle;\nsnippet fems:ds\n\tfont-emphasize-style: disc;\nsnippet fems:dt\n\tfont-emphasize-style: dot;\nsnippet fems:n\n\tfont-emphasize-style: none;\nsnippet fem\n\tfont-emphasize: ${1};\nsnippet ff\n\tfont-family: ${1};\nsnippet ff:c\n\tfont-family: ${1:'Monotype Corsiva','Comic Sans MS'},cursive;\nsnippet ff:f\n\tfont-family: ${1:Capitals,Impact},fantasy;\nsnippet ff:m\n\tfont-family: ${1:Monaco,'Courier New'},monospace;\nsnippet ff:ss\n\tfont-family: ${1:Helvetica,Arial},sans-serif;\nsnippet ff:s\n\tfont-family: ${1:Georgia,'Times New Roman'},serif;\nsnippet fza\n\tfont-size-adjust: ${1};\nsnippet fza:n\n\tfont-size-adjust: none;\nsnippet fz\n\tfont-size: ${1};\nsnippet fsm\n\tfont-smooth: ${1};\nsnippet fsm:aw\n\tfont-smooth: always;\nsnippet fsm:a\n\tfont-smooth: auto;\nsnippet fsm:n\n\tfont-smooth: never;\nsnippet fst\n\tfont-stretch: ${1};\nsnippet fst:c\n\tfont-stretch: condensed;\nsnippet fst:e\n\tfont-stretch: expanded;\nsnippet fst:ec\n\tfont-stretch: extra-condensed;\nsnippet fst:ee\n\tfont-stretch: extra-expanded;\nsnippet fst:n\n\tfont-stretch: normal;\nsnippet fst:sc\n\tfont-stretch: semi-condensed;\nsnippet fst:se\n\tfont-stretch: semi-expanded;\nsnippet fst:uc\n\tfont-stretch: ultra-condensed;\nsnippet fst:ue\n\tfont-stretch: ultra-expanded;\nsnippet fs\n\tfont-style: ${1};\nsnippet fs:i\n\tfont-style: italic;\nsnippet fs:n\n\tfont-style: normal;\nsnippet fs:o\n\tfont-style: oblique;\nsnippet fv\n\tfont-variant: ${1};\nsnippet fv:n\n\tfont-variant: normal;\nsnippet fv:sc\n\tfont-variant: small-caps;\nsnippet fw\n\tfont-weight: ${1};\nsnippet fw:b\n\tfont-weight: bold;\nsnippet fw:br\n\tfont-weight: bolder;\nsnippet fw:lr\n\tfont-weight: lighter;\nsnippet fw:n\n\tfont-weight: normal;\nsnippet f\n\tfont: ${1};\nsnippet h\n\theight: ${1};\nsnippet h:a\n\theight: auto;\nsnippet l\n\tleft: ${1};\nsnippet l:a\n\tleft: auto;\nsnippet lts\n\tletter-spacing: ${1};\nsnippet lh\n\tline-height: ${1};\nsnippet lisi\n\tlist-style-image: url(${1});\nsnippet lisi:n\n\tlist-style-image: none;\nsnippet lisp\n\tlist-style-position: ${1};\nsnippet lisp:i\n\tlist-style-position: inside;\nsnippet lisp:o\n\tlist-style-position: outside;\nsnippet list\n\tlist-style-type: ${1};\nsnippet list:c\n\tlist-style-type: circle;\nsnippet list:dclz\n\tlist-style-type: decimal-leading-zero;\nsnippet list:dc\n\tlist-style-type: decimal;\nsnippet list:d\n\tlist-style-type: disc;\nsnippet list:lr\n\tlist-style-type: lower-roman;\nsnippet list:n\n\tlist-style-type: none;\nsnippet list:s\n\tlist-style-type: square;\nsnippet list:ur\n\tlist-style-type: upper-roman;\nsnippet lis\n\tlist-style: ${1};\nsnippet lis:n\n\tlist-style: none;\nsnippet mb\n\tmargin-bottom: ${1};\nsnippet mb:a\n\tmargin-bottom: auto;\nsnippet ml\n\tmargin-left: ${1};\nsnippet ml:a\n\tmargin-left: auto;\nsnippet mr\n\tmargin-right: ${1};\nsnippet mr:a\n\tmargin-right: auto;\nsnippet mt\n\tmargin-top: ${1};\nsnippet mt:a\n\tmargin-top: auto;\nsnippet m\n\tmargin: ${1};\nsnippet m:4\n\tmargin: ${1:0} ${2:0} ${3:0} ${4:0};\nsnippet m:3\n\tmargin: ${1:0} ${2:0} ${3:0};\nsnippet m:2\n\tmargin: ${1:0} ${2:0};\nsnippet m:0\n\tmargin: 0;\nsnippet m:a\n\tmargin: auto;\nsnippet mah\n\tmax-height: ${1};\nsnippet mah:n\n\tmax-height: none;\nsnippet maw\n\tmax-width: ${1};\nsnippet maw:n\n\tmax-width: none;\nsnippet mih\n\tmin-height: ${1};\nsnippet miw\n\tmin-width: ${1};\nsnippet op\n\topacity: ${1};\nsnippet op:ie\n\tfilter: progid:DXImageTransform.Microsoft.Alpha(Opacity=${1:100});\nsnippet op:ms\n\t-ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=${1:100})';\nsnippet orp\n\torphans: ${1};\nsnippet o+\n\toutline: ${1:1px} ${2:solid} #${3:000};\nsnippet oc\n\toutline-color: ${1:#000};\nsnippet oc:i\n\toutline-color: invert;\nsnippet oo\n\toutline-offset: ${1};\nsnippet os\n\toutline-style: ${1};\nsnippet ow\n\toutline-width: ${1};\nsnippet o\n\toutline: ${1};\nsnippet o:n\n\toutline: none;\nsnippet ovs\n\toverflow-style: ${1};\nsnippet ovs:a\n\toverflow-style: auto;\nsnippet ovs:mq\n\toverflow-style: marquee;\nsnippet ovs:mv\n\toverflow-style: move;\nsnippet ovs:p\n\toverflow-style: panner;\nsnippet ovs:s\n\toverflow-style: scrollbar;\nsnippet ovx\n\toverflow-x: ${1};\nsnippet ovx:a\n\toverflow-x: auto;\nsnippet ovx:h\n\toverflow-x: hidden;\nsnippet ovx:s\n\toverflow-x: scroll;\nsnippet ovx:v\n\toverflow-x: visible;\nsnippet ovy\n\toverflow-y: ${1};\nsnippet ovy:a\n\toverflow-y: auto;\nsnippet ovy:h\n\toverflow-y: hidden;\nsnippet ovy:s\n\toverflow-y: scroll;\nsnippet ovy:v\n\toverflow-y: visible;\nsnippet ov\n\toverflow: ${1};\nsnippet ov:a\n\toverflow: auto;\nsnippet ov:h\n\toverflow: hidden;\nsnippet ov:s\n\toverflow: scroll;\nsnippet ov:v\n\toverflow: visible;\nsnippet pb\n\tpadding-bottom: ${1};\nsnippet pl\n\tpadding-left: ${1};\nsnippet pr\n\tpadding-right: ${1};\nsnippet pt\n\tpadding-top: ${1};\nsnippet p\n\tpadding: ${1};\nsnippet p:4\n\tpadding: ${1:0} ${2:0} ${3:0} ${4:0};\nsnippet p:3\n\tpadding: ${1:0} ${2:0} ${3:0};\nsnippet p:2\n\tpadding: ${1:0} ${2:0};\nsnippet p:0\n\tpadding: 0;\nsnippet pgba\n\tpage-break-after: ${1};\nsnippet pgba:aw\n\tpage-break-after: always;\nsnippet pgba:a\n\tpage-break-after: auto;\nsnippet pgba:l\n\tpage-break-after: left;\nsnippet pgba:r\n\tpage-break-after: right;\nsnippet pgbb\n\tpage-break-before: ${1};\nsnippet pgbb:aw\n\tpage-break-before: always;\nsnippet pgbb:a\n\tpage-break-before: auto;\nsnippet pgbb:l\n\tpage-break-before: left;\nsnippet pgbb:r\n\tpage-break-before: right;\nsnippet pgbi\n\tpage-break-inside: ${1};\nsnippet pgbi:a\n\tpage-break-inside: auto;\nsnippet pgbi:av\n\tpage-break-inside: avoid;\nsnippet pos\n\tposition: ${1};\nsnippet pos:a\n\tposition: absolute;\nsnippet pos:f\n\tposition: fixed;\nsnippet pos:r\n\tposition: relative;\nsnippet pos:s\n\tposition: static;\nsnippet q\n\tquotes: ${1};\nsnippet q:en\n\tquotes: '\\201C' '\\201D' '\\2018' '\\2019';\nsnippet q:n\n\tquotes: none;\nsnippet q:ru\n\tquotes: '\\00AB' '\\00BB' '\\201E' '\\201C';\nsnippet rz\n\tresize: ${1};\nsnippet rz:b\n\tresize: both;\nsnippet rz:h\n\tresize: horizontal;\nsnippet rz:n\n\tresize: none;\nsnippet rz:v\n\tresize: vertical;\nsnippet r\n\tright: ${1};\nsnippet r:a\n\tright: auto;\nsnippet tbl\n\ttable-layout: ${1};\nsnippet tbl:a\n\ttable-layout: auto;\nsnippet tbl:f\n\ttable-layout: fixed;\nsnippet tal\n\ttext-align-last: ${1};\nsnippet tal:a\n\ttext-align-last: auto;\nsnippet tal:c\n\ttext-align-last: center;\nsnippet tal:l\n\ttext-align-last: left;\nsnippet tal:r\n\ttext-align-last: right;\nsnippet ta\n\ttext-align: ${1};\nsnippet ta:c\n\ttext-align: center;\nsnippet ta:l\n\ttext-align: left;\nsnippet ta:r\n\ttext-align: right;\nsnippet td\n\ttext-decoration: ${1};\nsnippet td:l\n\ttext-decoration: line-through;\nsnippet td:n\n\ttext-decoration: none;\nsnippet td:o\n\ttext-decoration: overline;\nsnippet td:u\n\ttext-decoration: underline;\nsnippet te\n\ttext-emphasis: ${1};\nsnippet te:ac\n\ttext-emphasis: accent;\nsnippet te:a\n\ttext-emphasis: after;\nsnippet te:b\n\ttext-emphasis: before;\nsnippet te:c\n\ttext-emphasis: circle;\nsnippet te:ds\n\ttext-emphasis: disc;\nsnippet te:dt\n\ttext-emphasis: dot;\nsnippet te:n\n\ttext-emphasis: none;\nsnippet th\n\ttext-height: ${1};\nsnippet th:a\n\ttext-height: auto;\nsnippet th:f\n\ttext-height: font-size;\nsnippet th:m\n\ttext-height: max-size;\nsnippet th:t\n\ttext-height: text-size;\nsnippet ti\n\ttext-indent: ${1};\nsnippet ti:-\n\ttext-indent: -9999px;\nsnippet tj\n\ttext-justify: ${1};\nsnippet tj:a\n\ttext-justify: auto;\nsnippet tj:d\n\ttext-justify: distribute;\nsnippet tj:ic\n\ttext-justify: inter-cluster;\nsnippet tj:ii\n\ttext-justify: inter-ideograph;\nsnippet tj:iw\n\ttext-justify: inter-word;\nsnippet tj:k\n\ttext-justify: kashida;\nsnippet tj:t\n\ttext-justify: tibetan;\nsnippet to+\n\ttext-outline: ${1:0} ${2:0} #${3:000};\nsnippet to\n\ttext-outline: ${1};\nsnippet to:n\n\ttext-outline: none;\nsnippet tr\n\ttext-replace: ${1};\nsnippet tr:n\n\ttext-replace: none;\nsnippet tsh+\n\ttext-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\nsnippet tsh\n\ttext-shadow: ${1};\nsnippet tsh:n\n\ttext-shadow: none;\nsnippet tt\n\ttext-transform: ${1};\nsnippet tt:c\n\ttext-transform: capitalize;\nsnippet tt:l\n\ttext-transform: lowercase;\nsnippet tt:n\n\ttext-transform: none;\nsnippet tt:u\n\ttext-transform: uppercase;\nsnippet tw\n\ttext-wrap: ${1};\nsnippet tw:no\n\ttext-wrap: none;\nsnippet tw:n\n\ttext-wrap: normal;\nsnippet tw:s\n\ttext-wrap: suppress;\nsnippet tw:u\n\ttext-wrap: unrestricted;\nsnippet t\n\ttop: ${1};\nsnippet t:a\n\ttop: auto;\nsnippet va\n\tvertical-align: ${1};\nsnippet va:bl\n\tvertical-align: baseline;\nsnippet va:b\n\tvertical-align: bottom;\nsnippet va:m\n\tvertical-align: middle;\nsnippet va:sub\n\tvertical-align: sub;\nsnippet va:sup\n\tvertical-align: super;\nsnippet va:tb\n\tvertical-align: text-bottom;\nsnippet va:tt\n\tvertical-align: text-top;\nsnippet va:t\n\tvertical-align: top;\nsnippet v\n\tvisibility: ${1};\nsnippet v:c\n\tvisibility: collapse;\nsnippet v:h\n\tvisibility: hidden;\nsnippet v:v\n\tvisibility: visible;\nsnippet whsc\n\twhite-space-collapse: ${1};\nsnippet whsc:ba\n\twhite-space-collapse: break-all;\nsnippet whsc:bs\n\twhite-space-collapse: break-strict;\nsnippet whsc:k\n\twhite-space-collapse: keep-all;\nsnippet whsc:l\n\twhite-space-collapse: loose;\nsnippet whsc:n\n\twhite-space-collapse: normal;\nsnippet whs\n\twhite-space: ${1};\nsnippet whs:n\n\twhite-space: normal;\nsnippet whs:nw\n\twhite-space: nowrap;\nsnippet whs:pl\n\twhite-space: pre-line;\nsnippet whs:pw\n\twhite-space: pre-wrap;\nsnippet whs:p\n\twhite-space: pre;\nsnippet wid\n\twidows: ${1};\nsnippet w\n\twidth: ${1};\nsnippet w:a\n\twidth: auto;\nsnippet wob\n\tword-break: ${1};\nsnippet wob:ba\n\tword-break: break-all;\nsnippet wob:bs\n\tword-break: break-strict;\nsnippet wob:k\n\tword-break: keep-all;\nsnippet wob:l\n\tword-break: loose;\nsnippet wob:n\n\tword-break: normal;\nsnippet wos\n\tword-spacing: ${1};\nsnippet wow\n\tword-wrap: ${1};\nsnippet wow:no\n\tword-wrap: none;\nsnippet wow:n\n\tword-wrap: normal;\nsnippet wow:s\n\tword-wrap: suppress;\nsnippet wow:u\n\tword-wrap: unrestricted;\nsnippet z\n\tz-index: ${1};\nsnippet z:a\n\tz-index: auto;\nsnippet zoo\n\tzoom: 1;\n"})),ace.define("ace/snippets/css",["require","exports","module","ace/snippets/css.snippets"],(function(e,t,a){"use strict";t.snippetText=e("./css.snippets"),t.scope="css"})),ace.require(["ace/snippets/css"],(function(t){e&&(e.exports=t)}))},6704(e,t,a){e=a.nmd(e),ace.define("ace/snippets/html.snippets",["require","exports","module"],(function(e,t,a){a.exports='# Some useful Unicode entities\n# Non-Breaking Space\nsnippet nbs\n\t \n# ←\nsnippet left\n\t←\n# →\nsnippet right\n\t→\n# ↑\nsnippet up\n\t↑\n# ↓\nsnippet down\n\t↓\n# ↩\nsnippet return\n\t↩\n# ⇤\nsnippet backtab\n\t⇤\n# ⇥\nsnippet tab\n\t⇥\n# ⇧\nsnippet shift\n\t⇧\n# ⌃\nsnippet ctrl\n\t⌃\n# ⌅\nsnippet enter\n\t⌅\n# ⌘\nsnippet cmd\n\t⌘\n# ⌥\nsnippet option\n\t⌥\n# ⌦\nsnippet delete\n\t⌦\n# ⌫\nsnippet backspace\n\t⌫\n# ⎋\nsnippet esc\n\t⎋\n# Generic Doctype\nsnippet doctype HTML 4.01 Strict\n\t\nsnippet doctype HTML 4.01 Transitional\n\t\nsnippet doctype HTML 5\n\t\nsnippet doctype XHTML 1.0 Frameset\n\t\nsnippet doctype XHTML 1.0 Strict\n\t\nsnippet doctype XHTML 1.0 Transitional\n\t\nsnippet doctype XHTML 1.1\n\t\n# HTML Doctype 4.01 Strict\nsnippet docts\n\t\n# HTML Doctype 4.01 Transitional\nsnippet doct\n\t\n# HTML Doctype 5\nsnippet doct5\n\t\n# XHTML Doctype 1.0 Frameset\nsnippet docxf\n\t\n# XHTML Doctype 1.0 Strict\nsnippet docxs\n\t\n# XHTML Doctype 1.0 Transitional\nsnippet docxt\n\t\n# XHTML Doctype 1.1\nsnippet docx\n\t\n# html5shiv\nsnippet html5shiv\n\t\x3c!--[if lte IE 8]>\n\t\t