filesbox/web/dist/53239.141280f3.async.js
2024-07-26 14:10:54 +08:00

942 lines
401 KiB
JavaScript

(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[53239],{53239:function(fe,ve,pe){fe=pe.nmd(fe),function(){var E="ace",x=function(){return this}();if(!x&&typeof window!="undefined"&&(x=window),!E&&typeof requirejs!="undefined")return;var P=function(e,n,i){if(typeof e!="string"){P.original?P.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(i=n),P.modules[e]||(P.payloads[e]=i,P.modules[e]=null)};P.modules={},P.payloads={};var R=function(e,n,i){if(typeof n=="string"){var t=s(e,n);if(t!=null)return i&&i(),t}else if(Object.prototype.toString.call(n)==="[object Array]"){for(var r=[],o=0,c=n.length;o<c;++o){var d=s(e,n[o]);if(d==null&&k.original)return;r.push(d)}return i&&i.apply(null,r)||!0}},k=function(e,n){var i=R("",e,n);return i==null&&k.original?k.original.apply(this,arguments):i},C=function(e,n){if(n.indexOf("!")!==-1){var i=n.split("!");return C(e,i[0])+"!"+C(e,i[1])}if(n.charAt(0)=="."){var t=e.split("/").slice(0,-1).join("/");for(n=t+"/"+n;n.indexOf(".")!==-1&&r!=n;){var r=n;n=n.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return n},s=function(e,n){n=C(e,n);var i=P.modules[n];if(!i){if(i=P.payloads[n],typeof i=="function"){var t={},r={id:n,uri:"",exports:t,packaged:!0},o=function(d,$){return R(n,d,$)},c=i(o,t,r);t=c||r.exports,P.modules[n]=t,delete P.payloads[n]}i=P.modules[n]=t||i}return i};function l(e){var n=x;e&&(x[e]||(x[e]={}),n=x[e]),(!n.define||!n.define.packaged)&&(P.original=n.define,n.define=P,n.define.packaged=!0),(!n.require||!n.require.packaged)&&(k.original=n.require,n.require=k,n.require.packaged=!0)}l(E)}(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(E,x,P){function R(k,C,s){Object.defineProperty(k,C,{value:s,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||R(String.prototype,"startsWith",function(k,C){return C=C||0,this.lastIndexOf(k,C)===C}),String.prototype.endsWith||R(String.prototype,"endsWith",function(k,C){var s=this;(C===void 0||C>s.length)&&(C=s.length),C-=k.length;var l=s.indexOf(k,C);return l!==-1&&l===C}),String.prototype.repeat||R(String.prototype,"repeat",function(k){for(var C="",s=this;k>0;)k&1&&(C+=s),(k>>=1)&&(s+=s);return C}),String.prototype.includes||R(String.prototype,"includes",function(k,C){return this.indexOf(k,C)!=-1}),Object.assign||(Object.assign=function(k){if(k==null)throw new TypeError("Cannot convert undefined or null to object");for(var C=Object(k),s=1;s<arguments.length;s++){var l=arguments[s];l!=null&&Object.keys(l).forEach(function(e){C[e]=l[e]})}return C}),Object.values||(Object.values=function(k){return Object.keys(k).map(function(C){return k[C]})}),Array.prototype.find||R(Array.prototype,"find",function(k){for(var C=this.length,s=arguments[1],l=0;l<C;l++){var e=this[l];if(k.call(s,e,l,this))return e}}),Array.prototype.findIndex||R(Array.prototype,"findIndex",function(k){for(var C=this.length,s=arguments[1],l=0;l<C;l++){var e=this[l];if(k.call(s,e,l,this))return l}}),Array.prototype.includes||R(Array.prototype,"includes",function(k,C){return this.indexOf(k,C)!=-1}),Array.prototype.fill||R(Array.prototype,"fill",function(k){for(var C=this,s=C.length>>>0,l=arguments[1],e=l>>0,n=e<0?Math.max(s+e,0):Math.min(e,s),i=arguments[2],t=i===void 0?s:i>>0,r=t<0?Math.max(s+t,0):Math.min(t,s);n<r;)C[n]=k,n++;return C}),Array.of||R(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(E,x,P){"use strict";E("./es6-shim")}),ace.define("ace/lib/lang",["require","exports","module"],function(E,x,P){"use strict";x.last=function(C){return C[C.length-1]},x.stringReverse=function(C){return C.split("").reverse().join("")},x.stringRepeat=function(C,s){for(var l="";s>0;)s&1&&(l+=C),(s>>=1)&&(C+=C);return l};var R=/^\s\s*/,k=/\s\s*$/;x.stringTrimLeft=function(C){return C.replace(R,"")},x.stringTrimRight=function(C){return C.replace(k,"")},x.copyObject=function(C){var s={};for(var l in C)s[l]=C[l];return s},x.copyArray=function(C){for(var s=[],l=0,e=C.length;l<e;l++)C[l]&&typeof C[l]=="object"?s[l]=this.copyObject(C[l]):s[l]=C[l];return s},x.deepCopy=function C(s){if(typeof s!="object"||!s)return s;var l;if(Array.isArray(s)){l=[];for(var e=0;e<s.length;e++)l[e]=C(s[e]);return l}if(Object.prototype.toString.call(s)!=="[object Object]")return s;l={};for(var e in s)l[e]=C(s[e]);return l},x.arrayToMap=function(C){for(var s={},l=0;l<C.length;l++)s[C[l]]=1;return s},x.createMap=function(C){var s=Object.create(null);for(var l in C)s[l]=C[l];return s},x.arrayRemove=function(C,s){for(var l=0;l<=C.length;l++)s===C[l]&&C.splice(l,1)},x.escapeRegExp=function(C){return C.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},x.escapeHTML=function(C){return(""+C).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},x.getMatchOffsets=function(C,s){var l=[];return C.replace(s,function(e){l.push({offset:arguments[arguments.length-2],length:e.length})}),l},x.deferredCall=function(C){var s=null,l=function(){s=null,C()},e=function(n){return e.cancel(),s=setTimeout(l,n||0),e};return e.schedule=e,e.call=function(){return this.cancel(),C(),e},e.cancel=function(){return clearTimeout(s),s=null,e},e.isPending=function(){return s},e},x.delayedCall=function(C,s){var l=null,e=function(){l=null,C()},n=function(i){l==null&&(l=setTimeout(e,i||s))};return n.delay=function(i){l&&clearTimeout(l),l=setTimeout(e,i||s)},n.schedule=n,n.call=function(){this.cancel(),C()},n.cancel=function(){l&&clearTimeout(l),l=null},n.isPending=function(){return l},n}}),ace.define("ace/lib/useragent",["require","exports","module"],function(E,x,P){"use strict";x.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},x.getOS=function(){return x.isMac?x.OS.MAC:x.isLinux?x.OS.LINUX:x.OS.WINDOWS};var R=typeof navigator=="object"?navigator:{},k=(/mac|win|linux/i.exec(R.platform)||["other"])[0].toLowerCase(),C=R.userAgent||"",s=R.appName||"";x.isWin=k=="win",x.isMac=k=="mac",x.isLinux=k=="linux",x.isIE=s=="Microsoft Internet Explorer"||s.indexOf("MSAppHost")>=0?parseFloat((C.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((C.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),x.isOldIE=x.isIE&&x.isIE<9,x.isGecko=x.isMozilla=C.match(/ Gecko\/\d+/),x.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",x.isWebKit=parseFloat(C.split("WebKit/")[1])||void 0,x.isChrome=parseFloat(C.split(" Chrome/")[1])||void 0,x.isEdge=parseFloat(C.split(" Edge/")[1])||void 0,x.isAIR=C.indexOf("AdobeAIR")>=0,x.isAndroid=C.indexOf("Android")>=0,x.isChromeOS=C.indexOf(" CrOS ")>=0,x.isIOS=/iPad|iPhone|iPod/.test(C)&&!window.MSStream,x.isIOS&&(x.isMac=!0),x.isMobile=x.isIOS||x.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(E,x,P){"use strict";var R=E("./useragent"),k="http://www.w3.org/1999/xhtml";x.buildDom=function i(t,r,o){if(typeof t=="string"&&t){var c=document.createTextNode(t);return r&&r.appendChild(c),c}if(!Array.isArray(t))return t&&t.appendChild&&r&&r.appendChild(t),t;if(typeof t[0]!="string"||!t[0]){for(var d=[],$=0;$<t.length;$++){var S=i(t[$],r,o);S&&d.push(S)}return d}var y=document.createElement(t[0]),m=t[1],b=1;m&&typeof m=="object"&&!Array.isArray(m)&&(b=2);for(var $=b;$<t.length;$++)i(t[$],y,o);return b==2&&Object.keys(m).forEach(function(p){var w=m[p];p==="class"?y.className=Array.isArray(w)?w.join(" "):w:typeof w=="function"||p=="value"||p[0]=="$"?y[p]=w:p==="ref"?o&&(o[w]=y):p==="style"?typeof w=="string"&&(y.style.cssText=w):w!=null&&y.setAttribute(p,w)}),r&&r.appendChild(y),y},x.getDocumentHead=function(i){return i||(i=document),i.head||i.getElementsByTagName("head")[0]||i.documentElement},x.createElement=function(i,t){return document.createElementNS?document.createElementNS(t||k,i):document.createElement(i)},x.removeChildren=function(i){i.innerHTML=""},x.createTextNode=function(i,t){var r=t?t.ownerDocument:document;return r.createTextNode(i)},x.createFragment=function(i){var t=i?i.ownerDocument:document;return t.createDocumentFragment()},x.hasCssClass=function(i,t){var r=(i.className+"").split(/\s+/g);return r.indexOf(t)!==-1},x.addCssClass=function(i,t){x.hasCssClass(i,t)||(i.className+=" "+t)},x.removeCssClass=function(i,t){for(var r=i.className.split(/\s+/g);;){var o=r.indexOf(t);if(o==-1)break;r.splice(o,1)}i.className=r.join(" ")},x.toggleCssClass=function(i,t){for(var r=i.className.split(/\s+/g),o=!0;;){var c=r.indexOf(t);if(c==-1)break;o=!1,r.splice(c,1)}return o&&r.push(t),i.className=r.join(" "),o},x.setCssClass=function(i,t,r){r?x.addCssClass(i,t):x.removeCssClass(i,t)},x.hasCssString=function(i,t){var r=0,o;if(t=t||document,o=t.querySelectorAll("style")){for(;r<o.length;)if(o[r++].id===i)return!0}},x.removeElementById=function(i,t){t=t||document,t.getElementById(i)&&t.getElementById(i).remove()};var C,s=[];x.useStrictCSP=function(i){C=i,i==!1?l():s||(s=[])};function l(){var i=s;s=null,i&&i.forEach(function(t){e(t[0],t[1])})}function e(i,t,r){if(typeof document!="undefined"){if(s){if(r)l();else if(r===!1)return s.push([i,t])}if(!C){var o=r;!r||!r.getRootNode?o=document:(o=r.getRootNode(),(!o||o==r)&&(o=document));var c=o.ownerDocument||o;if(t&&x.hasCssString(t,o))return null;t&&(i+=`
/*# sourceURL=ace/css/`+t+" */");var d=x.createElement("style");d.appendChild(c.createTextNode(i)),t&&(d.id=t),o==c&&(o=x.getDocumentHead(c)),o.insertBefore(d,o.firstChild)}}}if(x.importCssString=e,x.importCssStylsheet=function(i,t){x.buildDom(["link",{rel:"stylesheet",href:i}],x.getDocumentHead(t))},x.scrollbarWidth=function(i){var t=x.createElement("ace_inner");t.style.width="100%",t.style.minWidth="0px",t.style.height="200px",t.style.display="block";var r=x.createElement("ace_outer"),o=r.style;o.position="absolute",o.left="-10000px",o.overflow="hidden",o.width="200px",o.minWidth="0px",o.height="150px",o.display="block",r.appendChild(t);var c=i&&i.documentElement||document&&document.documentElement;if(!c)return 0;c.appendChild(r);var d=t.offsetWidth;o.overflow="scroll";var $=t.offsetWidth;return d===$&&($=r.clientWidth),c.removeChild(r),d-$},x.computedStyle=function(i,t){return window.getComputedStyle(i,"")||{}},x.setStyle=function(i,t,r){i[t]!==r&&(i[t]=r)},x.HAS_CSS_ANIMATION=!1,x.HAS_CSS_TRANSFORMS=!1,x.HI_DPI=R.isWin?typeof window!="undefined"&&window.devicePixelRatio>=1.5:!0,R.isChromeOS&&(x.HI_DPI=!1),typeof document!="undefined"){var n=document.createElement("div");x.HI_DPI&&n.style.transform!==void 0&&(x.HAS_CSS_TRANSFORMS=!0),!R.isEdge&&typeof n.style.animationName!="undefined"&&(x.HAS_CSS_ANIMATION=!0),n=null}x.HAS_CSS_TRANSFORMS?x.translate=function(i,t,r){i.style.transform="translate("+Math.round(t)+"px, "+Math.round(r)+"px)"}:x.translate=function(i,t,r){i.style.top=Math.round(r)+"px",i.style.left=Math.round(t)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(E,x,P){/*
* based on code from:
*
* @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/requirejs for details
*/"use strict";var R=E("./dom");x.get=function(k,C){var s=new XMLHttpRequest;s.open("GET",k,!0),s.onreadystatechange=function(){s.readyState===4&&C(s.responseText)},s.send(null)},x.loadScript=function(k,C){var s=R.getDocumentHead(),l=document.createElement("script");l.src=k,s.appendChild(l),l.onload=l.onreadystatechange=function(e,n){(n||!l.readyState||l.readyState=="loaded"||l.readyState=="complete")&&(l=l.onload=l.onreadystatechange=null,n||C())}},x.qualifyURL=function(k){var C=document.createElement("a");return C.href=k,C.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(E,x,P){"use strict";x.inherits=function(R,k){R.super_=k,R.prototype=Object.create(k.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}})},x.mixin=function(R,k){for(var C in k)R[C]=k[C];return R},x.implement=function(R,k){x.mixin(R,k)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(E,x,P){"use strict";var R={},k=function(){this.propagationStopped=!0},C=function(){this.defaultPrevented=!0};R._emit=R._dispatchEvent=function(s,l){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var e=this._eventRegistry[s]||[],n=this._defaultHandlers[s];if(!(!e.length&&!n)){(typeof l!="object"||!l)&&(l={}),l.type||(l.type=s),l.stopPropagation||(l.stopPropagation=k),l.preventDefault||(l.preventDefault=C),e=e.slice();for(var i=0;i<e.length&&(e[i](l,this),!l.propagationStopped);i++);if(n&&!l.defaultPrevented)return n(l,this)}},R._signal=function(s,l){var e=(this._eventRegistry||{})[s];if(!!e){e=e.slice();for(var n=0;n<e.length;n++)e[n](l,this)}},R.once=function(s,l){var e=this;if(this.on(s,function n(){e.off(s,n),l.apply(null,arguments)}),!l)return new Promise(function(n){l=n})},R.setDefaultHandler=function(s,l){var e=this._defaultHandlers;if(e||(e=this._defaultHandlers={_disabled_:{}}),e[s]){var n=e[s],i=e._disabled_[s];i||(e._disabled_[s]=i=[]),i.push(n);var t=i.indexOf(l);t!=-1&&i.splice(t,1)}e[s]=l},R.removeDefaultHandler=function(s,l){var e=this._defaultHandlers;if(!!e){var n=e._disabled_[s];if(e[s]==l)n&&this.setDefaultHandler(s,n.pop());else if(n){var i=n.indexOf(l);i!=-1&&n.splice(i,1)}}},R.on=R.addEventListener=function(s,l,e){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[s];return n||(n=this._eventRegistry[s]=[]),n.indexOf(l)==-1&&n[e?"unshift":"push"](l),l},R.off=R.removeListener=R.removeEventListener=function(s,l){this._eventRegistry=this._eventRegistry||{};var e=this._eventRegistry[s];if(!!e){var n=e.indexOf(l);n!==-1&&e.splice(n,1)}},R.removeAllListeners=function(s){s||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[s]=void 0),this._defaultHandlers&&(this._defaultHandlers[s]=void 0)},x.EventEmitter=R}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(E,x,P){var R=E("./oop"),k=E("./event_emitter").EventEmitter,C={setOptions:function(n){Object.keys(n).forEach(function(i){this.setOption(i,n[i])},this)},getOptions:function(n){var i={};if(n)Array.isArray(n)||(i=n,n=Object.keys(i));else{var t=this.$options;n=Object.keys(t).filter(function(r){return!t[r].hidden})}return n.forEach(function(r){i[r]=this.getOption(r)},this),i},setOption:function(n,i){if(this["$"+n]!==i){var t=this.$options[n];if(!t)return s('misspelled option "'+n+'"');if(t.forwardTo)return this[t.forwardTo]&&this[t.forwardTo].setOption(n,i);t.handlesSet||(this["$"+n]=i),t&&t.set&&t.set.call(this,i)}},getOption:function(n){var i=this.$options[n];return i?i.forwardTo?this[i.forwardTo]&&this[i.forwardTo].getOption(n):i&&i.get?i.get.call(this):this["$"+n]:s('misspelled option "'+n+'"')}};function s(n){typeof console!="undefined"&&console.warn&&console.warn.apply(console,arguments)}function l(n,i){var t=new Error(n);t.data=i,typeof console=="object"&&console.error&&console.error(t),setTimeout(function(){throw t})}var e=function(){function n(){this.$defaultOptions={}}return n.prototype.defineOptions=function(i,t,r){return i.$options||(this.$defaultOptions[t]=i.$options={}),Object.keys(r).forEach(function(o){var c=r[o];typeof c=="string"&&(c={forwardTo:c}),c.name||(c.name=o),i.$options[c.name]=c,"initialValue"in c&&(i["$"+c.name]=c.initialValue)}),R.implement(i,C),this},n.prototype.resetOptions=function(i){Object.keys(i.$options).forEach(function(t){var r=i.$options[t];"value"in r&&i.setOption(t,r.value)})},n.prototype.setDefaultValue=function(i,t,r){if(!i){for(i in this.$defaultOptions)if(this.$defaultOptions[i][t])break;if(!this.$defaultOptions[i][t])return!1}var o=this.$defaultOptions[i]||(this.$defaultOptions[i]={});o[t]&&(o.forwardTo?this.setDefaultValue(o.forwardTo,t,r):o[t].value=r)},n.prototype.setDefaultValues=function(i,t){Object.keys(t).forEach(function(r){this.setDefaultValue(i,r,t[r])},this)},n}();e.prototype.warn=s,e.prototype.reportError=l,R.implement(e.prototype,k),x.AppConfig=e}),ace.define("ace/theme/textmate.css",["require","exports","module"],function(E,x,P){P.exports=`.ace-tm .ace_gutter {
background: #f0f0f0;
color: #333;
}
.ace-tm .ace_print-margin {
width: 1px;
background: #e8e8e8;
}
.ace-tm .ace_fold {
background-color: #6B72E6;
}
.ace-tm {
background-color: #FFFFFF;
color: black;
}
.ace-tm .ace_cursor {
color: black;
}
.ace-tm .ace_invisible {
color: rgb(191, 191, 191);
}
.ace-tm .ace_storage,
.ace-tm .ace_keyword {
color: blue;
}
.ace-tm .ace_constant {
color: rgb(197, 6, 11);
}
.ace-tm .ace_constant.ace_buildin {
color: rgb(88, 72, 246);
}
.ace-tm .ace_constant.ace_language {
color: rgb(88, 92, 246);
}
.ace-tm .ace_constant.ace_library {
color: rgb(6, 150, 14);
}
.ace-tm .ace_invalid {
background-color: rgba(255, 0, 0, 0.1);
color: red;
}
.ace-tm .ace_support.ace_function {
color: rgb(60, 76, 114);
}
.ace-tm .ace_support.ace_constant {
color: rgb(6, 150, 14);
}
.ace-tm .ace_support.ace_type,
.ace-tm .ace_support.ace_class {
color: rgb(109, 121, 222);
}
.ace-tm .ace_keyword.ace_operator {
color: rgb(104, 118, 135);
}
.ace-tm .ace_string {
color: rgb(3, 106, 7);
}
.ace-tm .ace_comment {
color: rgb(76, 136, 107);
}
.ace-tm .ace_comment.ace_doc {
color: rgb(0, 102, 255);
}
.ace-tm .ace_comment.ace_doc.ace_tag {
color: rgb(128, 159, 191);
}
.ace-tm .ace_constant.ace_numeric {
color: rgb(0, 0, 205);
}
.ace-tm .ace_variable {
color: rgb(49, 132, 149);
}
.ace-tm .ace_xml-pe {
color: rgb(104, 104, 91);
}
.ace-tm .ace_entity.ace_name.ace_function {
color: #0000A2;
}
.ace-tm .ace_heading {
color: rgb(12, 7, 255);
}
.ace-tm .ace_list {
color:rgb(185, 6, 144);
}
.ace-tm .ace_meta.ace_tag {
color:rgb(0, 22, 142);
}
.ace-tm .ace_string.ace_regex {
color: rgb(255, 0, 0)
}
.ace-tm .ace_marker-layer .ace_selection {
background: rgb(181, 213, 255);
}
.ace-tm.ace_multiselect .ace_selection.ace_start {
box-shadow: 0 0 3px 0px white;
}
.ace-tm .ace_marker-layer .ace_step {
background: rgb(252, 255, 0);
}
.ace-tm .ace_marker-layer .ace_stack {
background: rgb(164, 229, 101);
}
.ace-tm .ace_marker-layer .ace_bracket {
margin: -1px 0 0 -1px;
border: 1px solid rgb(192, 192, 192);
}
.ace-tm .ace_marker-layer .ace_active-line {
background: rgba(0, 0, 0, 0.07);
}
.ace-tm .ace_gutter-active-line {
background-color : #dcdcdc;
}
.ace-tm .ace_marker-layer .ace_selected-word {
background: rgb(250, 250, 255);
border: 1px solid rgb(200, 200, 250);
}
.ace-tm .ace_indent-guide {
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
}
.ace-tm .ace_indent-guide-active {
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
}
`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate.css","ace/lib/dom"],function(E,x,P){"use strict";x.isDark=!1,x.cssClass="ace-tm",x.cssText=E("./textmate.css"),x.$id="ace/theme/textmate";var R=E("../lib/dom");R.importCssString(x.cssText,x.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(E,x,P){var R=E("./lib/lang"),k=E("./lib/net"),C=E("./lib/dom"),s=E("./lib/app_config").AppConfig;P.exports=x=new s;var l={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};x.get=function(i){if(!l.hasOwnProperty(i))throw new Error("Unknown config key: "+i);return l[i]},x.set=function(i,t){if(l.hasOwnProperty(i))l[i]=t;else if(this.setDefaultValue("",i,t)==!1)throw new Error("Unknown config key: "+i);i=="useStrictCSP"&&C.useStrictCSP(t)},x.all=function(){return R.copyObject(l)},x.$modes={},x.moduleUrl=function(i,t){if(l.$moduleUrls[i])return l.$moduleUrls[i];var r=i.split("/");t=t||r[r.length-2]||"";var o=t=="snippets"?"/":"-",c=r[r.length-1];if(t=="worker"&&o=="-"){var d=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g");c=c.replace(d,"")}(!c||c==t)&&r.length>1&&(c=r[r.length-2]);var $=l[t+"Path"];return $==null?$=l.basePath:o=="/"&&(t=o=""),$&&$.slice(-1)!="/"&&($+="/"),$+t+o+c+this.get("suffix")},x.setModuleUrl=function(i,t){return l.$moduleUrls[i]=t};var e=function(i,t){return i==="ace/theme/textmate"||i==="./theme/textmate"?t(null,E("./theme/textmate")):console.error("loader is not configured")};x.setLoader=function(i){e=i},x.dynamicModules=Object.create(null),x.$loading={},x.loadModule=function(i,t){var r,o;Array.isArray(i)&&(o=i[0],i=i[1]);var c=function(d){if(d&&!x.$loading[i])return t&&t(d);if(x.$loading[i]||(x.$loading[i]=[]),x.$loading[i].push(t),!(x.$loading[i].length>1)){var $=function(){e(i,function(S,y){x._emit("load.module",{name:i,module:y});var m=x.$loading[i];x.$loading[i]=null,m.forEach(function(b){b&&b(y)})})};if(!x.get("packaged"))return $();k.loadScript(x.moduleUrl(i,o),$),n()}};if(x.dynamicModules[i])x.dynamicModules[i]().then(function(d){d.default?c(d.default):c(d)});else{try{r=E(i)}catch(d){}c(r)}},x.setModuleLoader=function(i,t){x.dynamicModules[i]=t};var n=function(){!l.basePath&&!l.workerPath&&!l.modePath&&!l.themePath&&!Object.keys(l.$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"),n=function(){})};x.version="1.17.0"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(E,x,P){"use strict";E("./lib/fixoldbrowsers");var R=E("./config");R.setLoader(function(l,e){E([l],function(n){e(null,n)})});var k=function(){return this||typeof window!="undefined"&&window}();P.exports=function(l){R.init=C,l.require=E,l.define=pe.amdD},C(!0);function C(l){if(!(!k||!k.document)){R.set("packaged",l||E.packaged||P.packaged||k.define&&pe.amdD.packaged);var e={},n="",i=document.currentScript||document._currentScript,t=i&&i.ownerDocument||document;i&&i.src&&(n=i.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var r=t.getElementsByTagName("script"),o=0;o<r.length;o++){var c=r[o],d=c.src||c.getAttribute("src");if(!!d){for(var $=c.attributes,S=0,y=$.length;S<y;S++){var m=$[S];m.name.indexOf("data-ace-")===0&&(e[s(m.name.replace(/^data-ace-/,""))]=m.value)}var b=d.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);b&&(n=b[1])}}n&&(e.base=e.base||n,e.packaged=!0),e.basePath=e.base,e.workerPath=e.workerPath||e.base,e.modePath=e.modePath||e.base,e.themePath=e.themePath||e.base,delete e.base;for(var p in e)typeof e[p]!="undefined"&&R.set(p,e[p])}}function s(l){return l.replace(/-(.)/g,function(e,n){return n.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(E,x,P){"use strict";var R=function(C,s){return C.row-s.row||C.column-s.column},k=function(){function C(s,l,e,n){this.start={row:s,column:l},this.end={row:e,column:n}}return C.prototype.isEqual=function(s){return this.start.row===s.start.row&&this.end.row===s.end.row&&this.start.column===s.start.column&&this.end.column===s.end.column},C.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},C.prototype.contains=function(s,l){return this.compare(s,l)==0},C.prototype.compareRange=function(s){var l,e=s.end,n=s.start;return l=this.compare(e.row,e.column),l==1?(l=this.compare(n.row,n.column),l==1?2:l==0?1:0):l==-1?-2:(l=this.compare(n.row,n.column),l==-1?-1:l==1?42:0)},C.prototype.comparePoint=function(s){return this.compare(s.row,s.column)},C.prototype.containsRange=function(s){return this.comparePoint(s.start)==0&&this.comparePoint(s.end)==0},C.prototype.intersects=function(s){var l=this.compareRange(s);return l==-1||l==0||l==1},C.prototype.isEnd=function(s,l){return this.end.row==s&&this.end.column==l},C.prototype.isStart=function(s,l){return this.start.row==s&&this.start.column==l},C.prototype.setStart=function(s,l){typeof s=="object"?(this.start.column=s.column,this.start.row=s.row):(this.start.row=s,this.start.column=l)},C.prototype.setEnd=function(s,l){typeof s=="object"?(this.end.column=s.column,this.end.row=s.row):(this.end.row=s,this.end.column=l)},C.prototype.inside=function(s,l){return this.compare(s,l)==0?!(this.isEnd(s,l)||this.isStart(s,l)):!1},C.prototype.insideStart=function(s,l){return this.compare(s,l)==0?!this.isEnd(s,l):!1},C.prototype.insideEnd=function(s,l){return this.compare(s,l)==0?!this.isStart(s,l):!1},C.prototype.compare=function(s,l){return!this.isMultiLine()&&s===this.start.row?l<this.start.column?-1:l>this.end.column?1:0:s<this.start.row?-1:s>this.end.row?1:this.start.row===s?l>=this.start.column?0:-1:this.end.row===s?l<=this.end.column?0:1:0},C.prototype.compareStart=function(s,l){return this.start.row==s&&this.start.column==l?-1:this.compare(s,l)},C.prototype.compareEnd=function(s,l){return this.end.row==s&&this.end.column==l?1:this.compare(s,l)},C.prototype.compareInside=function(s,l){return this.end.row==s&&this.end.column==l?1:this.start.row==s&&this.start.column==l?-1:this.compare(s,l)},C.prototype.clipRows=function(s,l){if(this.end.row>l)var e={row:l+1,column:0};else if(this.end.row<s)var e={row:s,column:0};if(this.start.row>l)var n={row:l+1,column:0};else if(this.start.row<s)var n={row:s,column:0};return C.fromPoints(n||this.start,e||this.end)},C.prototype.extend=function(s,l){var e=this.compare(s,l);if(e==0)return this;if(e==-1)var n={row:s,column:l};else var i={row:s,column:l};return C.fromPoints(n||this.start,i||this.end)},C.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},C.prototype.isMultiLine=function(){return this.start.row!==this.end.row},C.prototype.clone=function(){return C.fromPoints(this.start,this.end)},C.prototype.collapseRows=function(){return this.end.column==0?new C(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new C(this.start.row,0,this.end.row,0)},C.prototype.toScreenRange=function(s){var l=s.documentToScreenPosition(this.start),e=s.documentToScreenPosition(this.end);return new C(l.row,l.column,e.row,e.column)},C.prototype.moveBy=function(s,l){this.start.row+=s,this.start.column+=l,this.end.row+=s,this.end.column+=l},C}();k.fromPoints=function(C,s){return new k(C.row,C.column,s.row,s.column)},k.comparePoints=R,k.comparePoints=function(C,s){return C.row-s.row||C.column-s.column},x.Range=k}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(E,x,P){/*! @license
==========================================================================
SproutCore -- JavaScript Application Framework
copyright 2006-2009, Sprout Systems Inc., Apple Inc. and contributors.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
SproutCore and the SproutCore logo are trademarks of Sprout Systems, Inc.
For more information about SproutCore, visit http://www.sproutcore.com
==========================================================================
@license */"use strict";var R=E("./oop"),k=function(){var C={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};C.PRINTABLE_KEYS[173]="-";var s,l;for(l in C.FUNCTION_KEYS)s=C.FUNCTION_KEYS[l].toLowerCase(),C[s]=parseInt(l,10);for(l in C.PRINTABLE_KEYS)s=C.PRINTABLE_KEYS[l].toLowerCase(),C[s]=parseInt(l,10);return R.mixin(C,C.MODIFIER_KEYS),R.mixin(C,C.PRINTABLE_KEYS),R.mixin(C,C.FUNCTION_KEYS),C.enter=C.return,C.escape=C.esc,C.del=C.delete,function(){for(var e=["cmd","ctrl","alt","shift"],n=Math.pow(2,e.length);n--;)C.KEY_MODS[n]=e.filter(function(i){return n&C.KEY_MODS[i]}).join("-")+"-"}(),C.KEY_MODS[0]="",C.KEY_MODS[-1]="input-",C}();R.mixin(x,k),x.keyCodeToString=function(C){var s=k[C];return typeof s!="string"&&(s=String.fromCharCode(C)),s.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(E,x,P){"use strict";var R=E("./keys"),k=E("./useragent"),C=null,s=0,l;function e(){l=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){l={passive:!1}}})}catch(S){}}function n(){return l==null&&e(),l}function i(S,y,m){this.elem=S,this.type=y,this.callback=m}i.prototype.destroy=function(){r(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var t=x.addListener=function(S,y,m,b){S.addEventListener(y,m,n()),b&&b.$toDestroy.push(new i(S,y,m))},r=x.removeListener=function(S,y,m){S.removeEventListener(y,m,n())};x.stopEvent=function(S){return x.stopPropagation(S),x.preventDefault(S),!1},x.stopPropagation=function(S){S.stopPropagation&&S.stopPropagation()},x.preventDefault=function(S){S.preventDefault&&S.preventDefault()},x.getButton=function(S){return S.type=="dblclick"?0:S.type=="contextmenu"||k.isMac&&S.ctrlKey&&!S.altKey&&!S.shiftKey?2:S.button},x.capture=function(S,y,m){var b=S&&S.ownerDocument||document;function p(w){y&&y(w),m&&m(w),r(b,"mousemove",y),r(b,"mouseup",p),r(b,"dragstart",p)}return t(b,"mousemove",y),t(b,"mouseup",p),t(b,"dragstart",p),p},x.addMouseWheelListener=function(S,y,m){t(S,"wheel",function(b){var p=.15,w=b.deltaX||0,v=b.deltaY||0;switch(b.deltaMode){case b.DOM_DELTA_PIXEL:b.wheelX=w*p,b.wheelY=v*p;break;case b.DOM_DELTA_LINE:var f=15;b.wheelX=w*f,b.wheelY=v*f;break;case b.DOM_DELTA_PAGE:var a=150;b.wheelX=w*a,b.wheelY=v*a;break}y(b)},m)},x.addMultiMouseDownListener=function(S,y,m,b,p){var w=0,v,f,a,h={2:"dblclick",3:"tripleclick",4:"quadclick"};function u(g){if(x.getButton(g)!==0?w=0:g.detail>1?(w++,w>4&&(w=1)):w=1,k.isIE){var A=Math.abs(g.clientX-v)>5||Math.abs(g.clientY-f)>5;(!a||A)&&(w=1),a&&clearTimeout(a),a=setTimeout(function(){a=null},y[w-1]||600),w==1&&(v=g.clientX,f=g.clientY)}if(g._clicks=w,m[b]("mousedown",g),w>4)w=0;else if(w>1)return m[b](h[w],g)}Array.isArray(S)||(S=[S]),S.forEach(function(g){t(g,"mousedown",u,p)})};var o=function(S){return 0|(S.ctrlKey?1:0)|(S.altKey?2:0)|(S.shiftKey?4:0)|(S.metaKey?8:0)};x.getModifierString=function(S){return R.KEY_MODS[o(S)]};function c(S,y,m){var b=o(y);if(!k.isMac&&C){if(y.getModifierState&&(y.getModifierState("OS")||y.getModifierState("Win"))&&(b|=8),C.altGr)if((3&b)!=3)C.altGr=0;else return;if(m===18||m===17){var p="location"in y?y.location:y.keyLocation;if(m===17&&p===1)C[m]==1&&(s=y.timeStamp);else if(m===18&&b===3&&p===2){var w=y.timeStamp-s;w<50&&(C.altGr=!0)}}}if(m in R.MODIFIER_KEYS&&(m=-1),!b&&m===13){var p="location"in y?y.location:y.keyLocation;if(p===3&&(S(y,b,-m),y.defaultPrevented))return}if(k.isChromeOS&&b&8){if(S(y,b,m),y.defaultPrevented)return;b&=~8}return!b&&!(m in R.FUNCTION_KEYS)&&!(m in R.PRINTABLE_KEYS)?!1:S(y,b,m)}x.addCommandKeyListener=function(S,y,m){if(k.isOldGecko||k.isOpera&&!("KeyboardEvent"in window)){var b=null;t(S,"keydown",function(w){b=w.keyCode},m),t(S,"keypress",function(w){return c(y,w,b)},m)}else{var p=null;t(S,"keydown",function(w){C[w.keyCode]=(C[w.keyCode]||0)+1;var v=c(y,w,w.keyCode);return p=w.defaultPrevented,v},m),t(S,"keypress",function(w){p&&(w.ctrlKey||w.altKey||w.shiftKey||w.metaKey)&&(x.stopEvent(w),p=null)},m),t(S,"keyup",function(w){C[w.keyCode]=null},m),C||(d(),t(window,"focus",d))}};function d(){C=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!k.isOldIE){var $=1;x.nextTick=function(S,y){y=y||window;var m="zero-timeout-message-"+$++,b=function(p){p.data==m&&(x.stopPropagation(p),r(y,"message",b),S())};t(y,"message",b),y.postMessage(m,"*")}}x.$idleBlocked=!1,x.onIdle=function(S,y){return setTimeout(function m(){x.$idleBlocked?setTimeout(m,100):S()},y)},x.$idleBlockId=null,x.blockIdle=function(S){x.$idleBlockId&&clearTimeout(x.$idleBlockId),x.$idleBlocked=!0,x.$idleBlockId=setTimeout(function(){x.$idleBlocked=!1},S||100)},x.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),x.nextFrame?x.nextFrame=x.nextFrame.bind(window):x.nextFrame=function(S){setTimeout(S,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(E,x,P){"use strict";var R;P.exports={lineMode:!1,pasteCancelled:function(){return R&&R>Date.now()-50?!0:R=!1},cancel:function(){R=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(E,x,P){"use strict";var R=E("../lib/event"),k=E("../lib/useragent"),C=E("../lib/dom"),s=E("../lib/lang"),l=E("../clipboard"),e=k.isChrome<18,n=k.isIE,i=k.isChrome>63,t=400,r=E("../lib/keys"),o=r.KEY_MODS,c=k.isIOS,d=c?/\s/:/\n/,$=k.isMobile,S=function(y,m){var b=C.createElement("textarea");b.className="ace_text-input",b.setAttribute("wrap","off"),b.setAttribute("autocorrect","off"),b.setAttribute("autocapitalize","off"),b.setAttribute("spellcheck",!1),b.style.opacity="0",y.insertBefore(b,y.firstChild);var p=!1,w=!1,v=!1,f=!1,a="";$||(b.style.fontSize="1px");var h=!1,u=!1,g="",A=0,L=0,M=0;try{var T=document.activeElement===b}catch(D){}this.setAriaOptions=function(D){D.activeDescendant?(b.setAttribute("aria-haspopup","true"),b.setAttribute("aria-autocomplete",D.inline?"both":"list"),b.setAttribute("aria-activedescendant",D.activeDescendant)):(b.setAttribute("aria-haspopup","false"),b.setAttribute("aria-autocomplete","both"),b.removeAttribute("aria-activedescendant")),D.role&&b.setAttribute("role",D.role)},this.setAriaOptions({role:"textbox"}),R.addListener(b,"blur",function(D){u||(m.onBlur(D),T=!1,$&&!c&&document.removeEventListener("selectionchange",W))},m),R.addListener(b,"focus",function(D){if(!u){if(T=!0,k.isEdge)try{if(!document.hasFocus())return}catch(V){}m.onFocus(D),k.isEdge?setTimeout(I):I(),$&&!c&&document.addEventListener("selectionchange",W)}},m),this.$focusScroll=!1,this.focus=function(){if(a||i||this.$focusScroll=="browser")return b.focus({preventScroll:!0});var D=b.style.top;b.style.position="fixed",b.style.top="0px";try{var V=b.getBoundingClientRect().top!=0}catch(te){return}var K=[];if(V)for(var ee=b.parentElement;ee&&ee.nodeType==1;)K.push(ee),ee.setAttribute("ace_nocontext",!0),!ee.parentElement&&ee.getRootNode?ee=ee.getRootNode().host:ee=ee.parentElement;b.focus({preventScroll:!0}),V&&K.forEach(function(te){te.removeAttribute("ace_nocontext")}),setTimeout(function(){b.style.position="",b.style.top=="0px"&&(b.style.top=D)},0)},this.blur=function(){b.blur()},this.isFocused=function(){return T},m.on("beforeEndOperation",function(){var D=m.curOp,V=D&&D.command&&D.command.name;if(V!="insertstring"){var K=V&&(D.docChanged||D.selectionChanged);v&&K&&(g=b.value="",J()),I()}});var I=c?function(D){if(!(!T||p&&!D||f)){D||(D="");var V=`
ab`+D+`cde fg
`;V!=b.value&&(b.value=g=V);var K=4,ee=4+(D.length||(m.selection.isEmpty()?0:1));(A!=K||L!=ee)&&b.setSelectionRange(K,ee),A=K,L=ee}}:function(){if(!(v||f)&&!(!T&&!B)){v=!0;var D=0,V=0,K="";if(m.session){var ee=m.selection,te=ee.getRange(),oe=ee.cursor.row;if(D=te.start.column,V=te.end.column,K=m.session.getLine(oe),te.start.row!=oe){var le=m.session.getLine(oe-1);D=te.start.row<oe-1?0:D,V+=le.length+1,K=le+`
`+K}else if(te.end.row!=oe){var ae=m.session.getLine(oe+1);V=te.end.row>oe+1?ae.length:V,V+=K.length+1,K=K+`
`+ae}else $&&oe>0&&(K=`
`+K,V+=1,D+=1);K.length>t&&(D<t&&V<t?K=K.slice(0,t):(K=`
`,D==V?D=V=0:(D=0,V=1)))}var ne=K+`
`;if(ne!=g&&(b.value=g=ne,A=L=ne.length),B&&(A=b.selectionStart,L=b.selectionEnd),L!=V||A!=D||b.selectionEnd!=L)try{b.setSelectionRange(D,V),A=D,L=V}catch(ie){}v=!1}};this.resetSelection=I,T&&m.onFocus();var F=function(D){return D.selectionStart===0&&D.selectionEnd>=g.length&&D.value===g&&g&&D.selectionEnd!==L},_=function(D){v||(p?p=!1:F(b)?(m.selectAll(),I()):$&&b.selectionStart!=A&&I())};function W(D){if((!b||!b.parentNode)&&document.removeEventListener("selectionchange",W),!v&&b.selectionStart===b.selectionEnd){var V=b.selectionStart-A,K=L-A;V>0?V=Math.max(V-K,1):V===0&&K&&(V=-1);for(var ee=Math.abs(V),te=V>0?r.right:r.left,oe=0;oe<ee;oe++)m.onCommandKey({},0,te)}}var O=null;this.setInputHandler=function(D){O=D},this.getInputHandler=function(){return O};var B=!1,H=function(D,V){if(B&&(B=!1),w)return I(),D&&m.onPaste(D),w=!1,"";for(var K=b.selectionStart,ee=b.selectionEnd,te=A,oe=g.length-L,le=D,ae=D.length-K,ne=D.length-ee,ie=0;te>0&&g[ie]==D[ie];)ie++,te--;for(le=le.slice(ie),ie=1;oe>0&&g.length-ie>A-1&&g[g.length-ie]==D[D.length-ie];)ie++,oe--;ae-=ie-1,ne-=ie-1;var ue=le.length-ie+1;if(ue<0&&(te=-ue,ue=0),le=le.slice(0,ue),!V&&!le&&!ae&&!te&&!oe&&!ne)return"";f=!0;var ge=!1;return k.isAndroid&&le==". "&&(le=" ",ge=!0),le&&!te&&!oe&&!ae&&!ne||h?m.onTextInput(le):m.onTextInput(le,{extendLeft:te,extendRight:oe,restoreStart:ae,restoreEnd:ne}),f=!1,g=D,A=K,L=ee,M=ne,ge?`
`:le},z=function(D){if(v)return Q();if(D&&D.inputType){if(D.inputType=="historyUndo")return m.execCommand("undo");if(D.inputType=="historyRedo")return m.execCommand("redo")}var V=b.value,K=H(V,!0);(V.length>t+100||d.test(K)||$&&A<1&&A==L)&&I()},Y=function(D,V,K){var ee=D.clipboardData||window.clipboardData;if(!(!ee||e)){var te=n||K?"Text":"text/plain";try{return V?ee.setData(te,V)!==!1:ee.getData(te)}catch(oe){if(!K)return Y(oe,V,!0)}}},Z=function(D,V){var K=m.getCopyText();if(!K)return R.preventDefault(D);Y(D,K)?(c&&(I(K),p=K,setTimeout(function(){p=!1},10)),V?m.onCut():m.onCopy(),R.preventDefault(D)):(p=!0,b.value=K,b.select(),setTimeout(function(){p=!1,I(),V?m.onCut():m.onCopy()}))},N=function(D){Z(D,!0)},U=function(D){Z(D,!1)},X=function(D){var V=Y(D);l.pasteCancelled()||(typeof V=="string"?(V&&m.onPaste(V,D),k.isIE&&setTimeout(I),R.preventDefault(D)):(b.value="",w=!0))};R.addCommandKeyListener(b,m.onCommandKey.bind(m),m),R.addListener(b,"select",_,m),R.addListener(b,"input",z,m),R.addListener(b,"cut",N,m),R.addListener(b,"copy",U,m),R.addListener(b,"paste",X,m),(!("oncut"in b)||!("oncopy"in b)||!("onpaste"in b))&&R.addListener(y,"keydown",function(D){if(!(k.isMac&&!D.metaKey||!D.ctrlKey))switch(D.keyCode){case 67:U(D);break;case 86:X(D);break;case 88:N(D);break}},m);var G=function(D){if(!(v||!m.onCompositionStart||m.$readOnly)&&(v={},!h)){D.data&&(v.useTextareaForIME=!1),setTimeout(Q,0),m._signal("compositionStart"),m.on("mousedown",q);var V=m.getSelectionRange();V.end.row=V.start.row,V.end.column=V.start.column,v.markerRange=V,v.selectionStart=A,m.onCompositionStart(v),v.useTextareaForIME?(g=b.value="",A=0,L=0):(b.msGetInputContext&&(v.context=b.msGetInputContext()),b.getInputContext&&(v.context=b.getInputContext()))}},Q=function(){if(!(!v||!m.onCompositionUpdate||m.$readOnly)){if(h)return q();if(v.useTextareaForIME)m.onCompositionUpdate(b.value);else{var D=b.value;H(D),v.markerRange&&(v.context&&(v.markerRange.start.column=v.selectionStart=v.context.compositionStartOffset),v.markerRange.end.column=v.markerRange.start.column+L-v.selectionStart+M)}}},J=function(D){!m.onCompositionEnd||m.$readOnly||(v=!1,m.onCompositionEnd(),m.off("mousedown",q),D&&z())};function q(){u=!0,b.blur(),b.focus(),u=!1}var j=s.delayedCall(Q,50).schedule.bind(null,null);function re(D){D.keyCode==27&&b.value.length<b.selectionStart&&(v||(g=b.value),A=L=-1,I()),j()}R.addListener(b,"compositionstart",G,m),R.addListener(b,"compositionupdate",Q,m),R.addListener(b,"keyup",re,m),R.addListener(b,"keydown",j,m),R.addListener(b,"compositionend",J,m),this.getElement=function(){return b},this.setCommandMode=function(D){h=D,b.readOnly=!1},this.setReadOnly=function(D){h||(b.readOnly=D)},this.setCopyWithEmptySelection=function(D){},this.onContextMenu=function(D){B=!0,I(),m._emit("nativecontextmenu",{target:m,domEvent:D}),this.moveToMouse(D,!0)},this.moveToMouse=function(D,V){a||(a=b.style.cssText),b.style.cssText=(V?"z-index:100000;":"")+(k.isIE?"opacity:0.1;":"")+"text-indent: -"+(A+L)*m.renderer.characterWidth*.5+"px;";var K=m.container.getBoundingClientRect(),ee=C.computedStyle(m.container),te=K.top+(parseInt(ee.borderTopWidth)||0),oe=K.left+(parseInt(K.borderLeftWidth)||0),le=K.bottom-te-b.clientHeight-2,ae=function(ne){C.translate(b,ne.clientX-oe-2,Math.min(ne.clientY-te-2,le))};ae(D),D.type=="mousedown"&&(m.renderer.$isMousePressed=!0,clearTimeout(he),k.isWin&&R.capture(m.container,ae,de))},this.onContextMenuClose=de;var he;function de(){clearTimeout(he),he=setTimeout(function(){a&&(b.style.cssText=a,a=""),m.renderer.$isMousePressed=!1,m.renderer.$keepTextAreaAtCursor&&m.renderer.$moveTextAreaToCursor()},0)}var ce=function(D){m.textInput.onContextMenu(D),de()};R.addListener(b,"mouseup",ce,m),R.addListener(b,"mousedown",function(D){D.preventDefault(),de()},m),R.addListener(m.renderer.scroller,"contextmenu",ce,m),R.addListener(b,"contextmenu",ce,m),c&&se(y,m,b);function se(D,V,K){var ee=null,te=!1;K.addEventListener("keydown",function(le){ee&&clearTimeout(ee),te=!0},!0),K.addEventListener("keyup",function(le){ee=setTimeout(function(){te=!1},100)},!0);var oe=function(le){if(document.activeElement===K&&!(te||v||V.$mouseHandler.isMousePressed)&&!p){var ae=K.selectionStart,ne=K.selectionEnd,ie=null,ue=0;if(ae==0?ie=r.up:ae==1?ie=r.home:ne>L&&g[ne]==`
`?ie=r.end:ae<A&&g[ae-1]==" "?(ie=r.left,ue=o.option):ae<A||ae==A&&L!=A&&ae==ne?ie=r.left:ne>L&&g.slice(0,ne).split(`
`).length>2?ie=r.down:ne>L&&g[ne-1]==" "?(ie=r.right,ue=o.option):(ne>L||ne==L&&L!=A&&ae==ne)&&(ie=r.right),ae!==ne&&(ue|=o.shift),ie){var ge=V.onCommandKey({},ue,ie);if(!ge&&V.commands){ie=r.keyCodeToString(ie);var me=V.commands.findKeyCommand(ue,ie);me&&V.execCommand(me)}A=ae,L=ne,I("")}}};document.addEventListener("selectionchange",oe),V.on("destroy",function(){document.removeEventListener("selectionchange",oe)})}this.destroy=function(){b.parentElement&&b.parentElement.removeChild(b)}};x.TextInput=S,x.$setUserAgentForTests=function(y,m){$=y,c=m}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(E,x,P){"use strict";var R=E("../lib/useragent"),k=0,C=550,s=function(){function n(i){i.$clickSelection=null;var t=i.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(i)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(i)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(i)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(i)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(i));var r=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];r.forEach(function(o){i[o]=this[o]},this),i.selectByLines=this.extendSelectionBy.bind(i,"getLineRange"),i.selectByWords=this.extendSelectionBy.bind(i,"getWordRange")}return n.prototype.onMouseDown=function(i){var t=i.inSelection(),r=i.getDocumentPosition();this.mousedownEvent=i;var o=this.editor,c=i.getButton();if(c!==0){var d=o.getSelectionRange(),$=d.isEmpty();($||c==1)&&o.selection.moveToPosition(r),c==2&&(o.textInput.onContextMenu(i.domEvent),R.isMozilla||i.preventDefault());return}if(this.mousedownEvent.time=Date.now(),t&&!o.isFocused()&&(o.focus(),this.$focusTimeout&&!this.$clickSelection&&!o.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(i);return}return this.captureMouse(i),this.startSelect(r,i.domEvent._clicks>1),i.preventDefault()},n.prototype.startSelect=function(i,t){i=i||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var r=this.editor;!this.mousedownEvent||(this.mousedownEvent.getShiftKey()?r.selection.selectToPosition(i):t||r.selection.moveToPosition(i),t||this.select(),r.setStyle("ace_selecting"),this.setState("select"))},n.prototype.select=function(){var i,t=this.editor,r=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var o=this.$clickSelection.comparePoint(r);if(o==-1)i=this.$clickSelection.end;else if(o==1)i=this.$clickSelection.start;else{var c=e(this.$clickSelection,r);r=c.cursor,i=c.anchor}t.selection.setSelectionAnchor(i.row,i.column)}t.selection.selectToPosition(r),t.renderer.scrollCursorIntoView()},n.prototype.extendSelectionBy=function(i){var t,r=this.editor,o=r.renderer.screenToTextCoordinates(this.x,this.y),c=r.selection[i](o.row,o.column);if(this.$clickSelection){var d=this.$clickSelection.comparePoint(c.start),$=this.$clickSelection.comparePoint(c.end);if(d==-1&&$<=0)t=this.$clickSelection.end,(c.end.row!=o.row||c.end.column!=o.column)&&(o=c.start);else if($==1&&d>=0)t=this.$clickSelection.start,(c.start.row!=o.row||c.start.column!=o.column)&&(o=c.end);else if(d==-1&&$==1)o=c.end,t=c.start;else{var S=e(this.$clickSelection,o);o=S.cursor,t=S.anchor}r.selection.setSelectionAnchor(t.row,t.column)}r.selection.selectToPosition(o),r.renderer.scrollCursorIntoView()},n.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},n.prototype.focusWait=function(){var i=l(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(i>k||t-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},n.prototype.onDoubleClick=function(i){var t=i.getDocumentPosition(),r=this.editor,o=r.session,c=o.getBracketRange(t);c?(c.isEmpty()&&(c.start.column--,c.end.column++),this.setState("select")):(c=r.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=c,this.select()},n.prototype.onTripleClick=function(i){var t=i.getDocumentPosition(),r=this.editor;this.setState("selectByLines");var o=r.getSelectionRange();o.isMultiLine()&&o.contains(t.row,t.column)?(this.$clickSelection=r.selection.getLineRange(o.start.row),this.$clickSelection.end=r.selection.getLineRange(o.end.row).end):this.$clickSelection=r.selection.getLineRange(t.row),this.select()},n.prototype.onQuadClick=function(i){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},n.prototype.onMouseWheel=function(i){if(!i.getAccelKey()){i.getShiftKey()&&i.wheelY&&!i.wheelX&&(i.wheelX=i.wheelY,i.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var r=this.$lastScroll,o=i.domEvent.timeStamp,c=o-r.t,d=c?i.wheelX/c:r.vx,$=c?i.wheelY/c:r.vy;c<C&&(d=(d+r.vx)/2,$=($+r.vy)/2);var S=Math.abs(d/$),y=!1;if(S>=1&&t.renderer.isScrollableBy(i.wheelX*i.speed,0)&&(y=!0),S<=1&&t.renderer.isScrollableBy(0,i.wheelY*i.speed)&&(y=!0),y)r.allowed=o;else if(o-r.allowed<C){var m=Math.abs(d)<=1.5*Math.abs(r.vx)&&Math.abs($)<=1.5*Math.abs(r.vy);m?(y=!0,r.allowed=o):r.allowed=0}if(r.t=o,r.vx=d,r.vy=$,y)return t.renderer.scrollBy(i.wheelX*i.speed,i.wheelY*i.speed),i.stop()}},n}();s.prototype.selectEnd=s.prototype.selectByLinesEnd,s.prototype.selectAllEnd=s.prototype.selectByLinesEnd,s.prototype.selectByWordsEnd=s.prototype.selectByLinesEnd,x.DefaultHandlers=s;function l(n,i,t,r){return Math.sqrt(Math.pow(t-n,2)+Math.pow(r-i,2))}function e(n,i){if(n.start.row==n.end.row)var t=2*i.column-n.start.column-n.end.column;else if(n.start.row==n.end.row-1&&!n.start.column&&!n.end.column)var t=i.column-4;else var t=2*i.row-n.start.row-n.end.row;return t<0?{cursor:n.start,anchor:n.end}:{cursor:n.end,anchor:n.start}}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom"],function(E,x,P){"use strict";var R=E("./lib/dom"),k="ace_tooltip",C=function(){function s(l){this.isOpen=!1,this.$element=null,this.$parentNode=l}return s.prototype.$init=function(){return this.$element=R.createElement("div"),this.$element.className=k,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},s.prototype.getElement=function(){return this.$element||this.$init()},s.prototype.setText=function(l){this.getElement().textContent=l},s.prototype.setHtml=function(l){this.getElement().innerHTML=l},s.prototype.setPosition=function(l,e){this.getElement().style.left=l+"px",this.getElement().style.top=e+"px"},s.prototype.setClassName=function(l){R.addCssClass(this.getElement(),l)},s.prototype.show=function(l,e,n){l!=null&&this.setText(l),e!=null&&n!=null&&this.setPosition(e,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},s.prototype.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=k,this.isOpen=!1)},s.prototype.getHeight=function(){return this.getElement().offsetHeight},s.prototype.getWidth=function(){return this.getElement().offsetWidth},s.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},s}();x.Tooltip=C}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip"],function(E,x,P){"use strict";var R=this&&this.__extends||function(){var n=function(i,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&(r[c]=o[c])},n(i,t)};return function(i,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(i,t);function r(){this.constructor=i}i.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),k=E("../lib/dom"),C=E("../lib/event"),s=E("../tooltip").Tooltip;function l(n){var i=n.editor,t=i.renderer.$gutterLayer,r=new e(i.container);n.editor.setDefaultHandler("guttermousedown",function(m){if(!(!i.isFocused()||m.getButton()!=0)){var b=t.getRegion(m);if(b!="foldWidgets"){var p=m.getDocumentPosition().row,w=i.session.selection;if(m.getShiftKey())w.selectTo(p,0);else{if(m.domEvent.detail==2)return i.selectAll(),m.preventDefault();n.$clickSelection=i.selection.getLineRange(p)}return n.setState("selectByLines"),n.captureMouse(m),m.preventDefault()}}});var o,c,d;function $(){var m=c.getDocumentPosition().row,b=t.$annotations[m];if(!b)return S();var p=i.session.getLength();if(m==p){var w=i.renderer.pixelToScreenCoordinates(0,c.y).row,v=c.$pos;if(w>i.session.documentToScreenRow(v.row,v.column))return S()}for(var f={error:[],warning:[],info:[]},a={error:{singular:"error",plural:"errors"},warning:{singular:"warning",plural:"warnings"},info:{singular:"information message",plural:"information messages"}},h=t.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",u=0;u<b.text.length;u++){var g="<span class='ace_".concat(b.type[u]," ").concat(h,"' aria-label='").concat(a[b.type[u]].singular,"' role=img> </span> ").concat(b.text[u]);f[b.type[u]].push(g)}var A="<div class='ace_gutter-tooltip_body'>";A+=[].concat(f.error,f.warning,f.info).join("<br>"),A+="</div>";for(var L=!1,M="<div class='ace_gutter-tooltip_header'>",u=0;u<3;u++){var T=["error","warning","info"][u];if(f[T].length>0){var I=f[T].length===1?a[T].singular:a[T].plural;M+="".concat(L?", ":"").concat(f[T].length," ").concat(I),L=!0}}if(M+="</div>",d=M+A,r.setHtml(d),r.setClassName("ace_gutter-tooltip"),r.$element.setAttribute("aria-live","polite"),r.show(),i._signal("showGutterTooltip",r),i.on("mousewheel",S),n.$tooltipFollowsMouse)y(c);else{var F=c.domEvent.target,_=F.getBoundingClientRect(),W=r.getElement().style;W.left=_.right+"px",W.top=_.bottom+"px"}}function S(){o&&(o=clearTimeout(o)),d&&(r.hide(),d=null,i._signal("hideGutterTooltip",r),i.off("mousewheel",S))}function y(m){r.setPosition(m.x,m.y)}n.editor.setDefaultHandler("guttermousemove",function(m){var b=m.domEvent.target||m.domEvent.srcElement;if(k.hasCssClass(b,"ace_fold-widget"))return S();d&&n.$tooltipFollowsMouse&&y(m),c=m,!o&&(o=setTimeout(function(){o=null,c&&!n.isMousePressed?$():S()},50))}),C.addListener(i.renderer.$gutter,"mouseout",function(m){c=null,!(!d||o)&&(o=setTimeout(function(){o=null,S()},50))},i),i.on("changeSession",S)}var e=function(n){R(i,n);function i(){return n!==null&&n.apply(this,arguments)||this}return i.prototype.setPosition=function(t,r){var o=window.innerWidth||document.documentElement.clientWidth,c=window.innerHeight||document.documentElement.clientHeight,d=this.getWidth(),$=this.getHeight();t+=15,r+=15,t+d>o&&(t-=t+d-o),r+$>c&&(r-=20+$),s.prototype.setPosition.call(this,t,r)},i}(s);x.GutterHandler=l}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(E,x,P){"use strict";var R=E("../lib/event"),k=E("../lib/useragent"),C=function(){function s(l,e){this.domEvent=l,this.editor=e,this.x=this.clientX=l.clientX,this.y=this.clientY=l.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1,this.getAccelKey=k.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}return s.prototype.stopPropagation=function(){R.stopPropagation(this.domEvent),this.propagationStopped=!0},s.prototype.preventDefault=function(){R.preventDefault(this.domEvent),this.defaultPrevented=!0},s.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},s.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},s.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var l=this.editor,e=l.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var n=this.getDocumentPosition();this.$inSelection=e.contains(n.row,n.column)}return this.$inSelection},s.prototype.getButton=function(){return R.getButton(this.domEvent)},s.prototype.getShiftKey=function(){return this.domEvent.shiftKey},s}();x.MouseEvent=C}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(E,x,P){"use strict";var R=E("../lib/dom"),k=E("../lib/event"),C=E("../lib/useragent"),s=200,l=200,e=5;function n(t){var r=t.editor,o=R.createElement("div");o.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",o.textContent="\xA0";var c=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];c.forEach(function(O){t[O]=this[O]},this),r.on("mousedown",this.onMouseDown.bind(t));var d=r.container,$,S,y,m,b,p,w=0,v,f,a,h,u;this.onDragStart=function(O){if(this.cancelDrag||!d.draggable){var B=this;return setTimeout(function(){B.startSelect(),B.captureMouse(O)},0),O.preventDefault()}b=r.getSelectionRange();var H=O.dataTransfer;H.effectAllowed=r.getReadOnly()?"copy":"copyMove",r.container.appendChild(o),H.setDragImage&&H.setDragImage(o,0,0),setTimeout(function(){r.container.removeChild(o)}),H.clearData(),H.setData("Text",r.session.getTextRange()),f=!0,this.setState("drag")},this.onDragEnd=function(O){if(d.draggable=!1,f=!1,this.setState(null),!r.getReadOnly()){var B=O.dataTransfer.dropEffect;!v&&B=="move"&&r.session.remove(r.getSelectionRange()),r.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(O){if(!(r.getReadOnly()||!_(O.dataTransfer)))return S=O.clientX,y=O.clientY,$||M(),w++,O.dataTransfer.dropEffect=v=W(O),k.preventDefault(O)},this.onDragOver=function(O){if(!(r.getReadOnly()||!_(O.dataTransfer)))return S=O.clientX,y=O.clientY,$||(M(),w++),I!==null&&(I=null),O.dataTransfer.dropEffect=v=W(O),k.preventDefault(O)},this.onDragLeave=function(O){if(w--,w<=0&&$)return T(),v=null,k.preventDefault(O)},this.onDrop=function(O){if(!!p){var B=O.dataTransfer;if(f)switch(v){case"move":b.contains(p.row,p.column)?b={start:p,end:p}:b=r.moveText(b,p);break;case"copy":b=r.moveText(b,p,!0);break}else{var H=B.getData("Text");b={start:p,end:r.session.insert(p,H)},r.focus(),v=null}return T(),k.preventDefault(O)}},k.addListener(d,"dragstart",this.onDragStart.bind(t),r),k.addListener(d,"dragend",this.onDragEnd.bind(t),r),k.addListener(d,"dragenter",this.onDragEnter.bind(t),r),k.addListener(d,"dragover",this.onDragOver.bind(t),r),k.addListener(d,"dragleave",this.onDragLeave.bind(t),r),k.addListener(d,"drop",this.onDrop.bind(t),r);function g(O,B){var H=Date.now(),z=!B||O.row!=B.row,Y=!B||O.column!=B.column;if(!h||z||Y)r.moveCursorToPosition(O),h=H,u={x:S,y};else{var Z=i(u.x,u.y,S,y);Z>e?h=null:H-h>=l&&(r.renderer.scrollCursorIntoView(),h=null)}}function A(O,B){var H=Date.now(),z=r.renderer.layerConfig.lineHeight,Y=r.renderer.layerConfig.characterWidth,Z=r.renderer.scroller.getBoundingClientRect(),N={x:{left:S-Z.left,right:Z.right-S},y:{top:y-Z.top,bottom:Z.bottom-y}},U=Math.min(N.x.left,N.x.right),X=Math.min(N.y.top,N.y.bottom),G={row:O.row,column:O.column};U/Y<=2&&(G.column+=N.x.left<N.x.right?-3:2),X/z<=1&&(G.row+=N.y.top<N.y.bottom?-1:1);var Q=O.row!=G.row,J=O.column!=G.column,q=!B||O.row!=B.row;Q||J&&!q?a?H-a>=s&&r.renderer.scrollCursorIntoView(G):a=H:a=null}function L(){var O=p;p=r.renderer.screenToTextCoordinates(S,y),g(p,O),A(p,O)}function M(){b=r.selection.toOrientedRange(),$=r.session.addMarker(b,"ace_selection",r.getSelectionStyle()),r.clearSelection(),r.isFocused()&&r.renderer.$cursorLayer.setBlinking(!1),clearInterval(m),L(),m=setInterval(L,20),w=0,k.addListener(document,"mousemove",F)}function T(){clearInterval(m),r.session.removeMarker($),$=null,r.selection.fromOrientedRange(b),r.isFocused()&&!f&&r.$resetCursorStyle(),b=null,p=null,w=0,a=null,h=null,k.removeListener(document,"mousemove",F)}var I=null;function F(){I==null&&(I=setTimeout(function(){I!=null&&$&&T()},20))}function _(O){var B=O.types;return!B||Array.prototype.some.call(B,function(H){return H=="text/plain"||H=="Text"})}function W(O){var B=["copy","copymove","all","uninitialized"],H=["move","copymove","linkmove","all","uninitialized"],z=C.isMac?O.altKey:O.ctrlKey,Y="uninitialized";try{Y=O.dataTransfer.effectAllowed.toLowerCase()}catch(N){}var Z="none";return z&&B.indexOf(Y)>=0?Z="copy":H.indexOf(Y)>=0?Z="move":B.indexOf(Y)>=0&&(Z="copy"),Z}}(function(){this.dragWait=function(){var t=Date.now()-this.mousedownEvent.time;t>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var t=this.editor.container;t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(t){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var t=this.editor,r=t.container;r.draggable=!0,t.renderer.$cursorLayer.setBlinking(!1),t.setStyle("ace_dragging");var o=C.isWin?"default":"move";t.renderer.setCursorStyle(o),this.setState("dragReady")},this.onMouseDrag=function(t){var r=this.editor.container;if(C.isIE&&this.state=="dragReady"){var o=i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);o>3&&r.dragDrop()}if(this.state==="dragWait"){var o=i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);o>0&&(r.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(t){if(!!this.$dragEnabled){this.mousedownEvent=t;var r=this.editor,o=t.inSelection(),c=t.getButton(),d=t.domEvent.detail||1;if(d===1&&c===0&&o){if(t.editor.inMultiSelectMode&&(t.getAccelKey()||t.getShiftKey()))return;this.mousedownEvent.time=Date.now();var $=t.domEvent.target||t.domEvent.srcElement;if("unselectable"in $&&($.unselectable="on"),r.getDragDelay()){if(C.isWebKit){this.cancelDrag=!0;var S=r.container;S.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(t,this.onMouseDrag.bind(this)),t.defaultPrevented=!0}}}}).call(n.prototype);function i(t,r,o,c){return Math.sqrt(Math.pow(o-t,2)+Math.pow(c-r,2))}x.DragdropHandler=n}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(E,x,P){"use strict";var R=E("./mouse_event").MouseEvent,k=E("../lib/event"),C=E("../lib/dom");x.addTouchListeners=function(s,l){var e="scroll",n,i,t,r,o,c,d=0,$,S=0,y=0,m=0,b,p;function w(){var g=window.navigator&&window.navigator.clipboard,A=!1,L=function(){var T=l.getCopyText(),I=l.session.getUndoManager().hasUndo();p.replaceChild(C.buildDom(A?["span",!T&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],T&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],T&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],g&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],I&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Palette"]]:["span"]),p.firstChild)},M=function(T){var I=T.target.getAttribute("action");if(I=="more"||!A)return A=!A,L();I=="paste"?g.readText().then(function(F){l.execCommand(I,F)}):I&&((I=="cut"||I=="copy")&&(g?g.writeText(l.getCopyText()):document.execCommand("copy")),l.execCommand(I)),p.firstChild.style.display="none",A=!1,I!="openCommandPallete"&&l.focus()};p=C.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(T){e="menu",T.stopPropagation(),T.preventDefault(),l.textInput.focus()},ontouchend:function(T){T.stopPropagation(),T.preventDefault(),M(T)},onclick:M},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],l.container)}function v(){p||w();var g=l.selection.cursor,A=l.renderer.textToScreenCoordinates(g.row,g.column),L=l.renderer.textToScreenCoordinates(0,0).pageX,M=l.renderer.scrollLeft,T=l.container.getBoundingClientRect();p.style.top=A.pageY-T.top-3+"px",A.pageX-T.left<T.width-70?(p.style.left="",p.style.right="10px"):(p.style.right="",p.style.left=L+M-T.left+"px"),p.style.display="",p.firstChild.style.display="none",l.on("input",f)}function f(g){p&&(p.style.display="none"),l.off("input",f)}function a(){o=null,clearTimeout(o);var g=l.selection.getRange(),A=g.contains($.row,$.column);(g.isEmpty()||!A)&&(l.selection.moveToPosition($),l.selection.selectWord()),e="wait",v()}function h(){o=null,clearTimeout(o),l.selection.moveToPosition($);var g=S>=2?l.selection.getLineRange($.row):l.session.getBracketRange($);g&&!g.isEmpty()?l.selection.setRange(g):l.selection.selectWord(),e="wait"}k.addListener(s,"contextmenu",function(g){if(!!b){var A=l.textInput.getElement();A.focus()}},l),k.addListener(s,"touchstart",function(g){var A=g.touches;if(o||A.length>1){clearTimeout(o),o=null,t=-1,e="zoom";return}b=l.$mouseHandler.isMousePressed=!0;var L=l.renderer.layerConfig.lineHeight,M=l.renderer.layerConfig.lineHeight,T=g.timeStamp;r=T;var I=A[0],F=I.clientX,_=I.clientY;Math.abs(n-F)+Math.abs(i-_)>L&&(t=-1),n=g.clientX=F,i=g.clientY=_,y=m=0;var W=new R(g,l);if($=W.getDocumentPosition(),T-t<500&&A.length==1&&!d)S++,g.preventDefault(),g.button=0,h();else{S=0;var O=l.selection.cursor,B=l.selection.isEmpty()?O:l.selection.anchor,H=l.renderer.$cursorLayer.getPixelPosition(O,!0),z=l.renderer.$cursorLayer.getPixelPosition(B,!0),Y=l.renderer.scroller.getBoundingClientRect(),Z=l.renderer.layerConfig.offset,N=l.renderer.scrollLeft,U=function(Q,J){return Q=Q/M,J=J/L-.75,Q*Q+J*J};if(g.clientX<Y.left){e="zoom";return}var X=U(g.clientX-Y.left-H.left+N,g.clientY-Y.top-H.top+Z),G=U(g.clientX-Y.left-z.left+N,g.clientY-Y.top-z.top+Z);X<3.5&&G<3.5&&(e=X>G?"cursor":"anchor"),G<3.5?e="anchor":X<3.5?e="cursor":e="scroll",o=setTimeout(a,450)}t=T},l),k.addListener(s,"touchend",function(g){b=l.$mouseHandler.isMousePressed=!1,c&&clearInterval(c),e=="zoom"?(e="",d=0):o?(l.selection.moveToPosition($),d=0,v()):e=="scroll"?(u(),f()):v(),clearTimeout(o),o=null},l),k.addListener(s,"touchmove",function(g){o&&(clearTimeout(o),o=null);var A=g.touches;if(!(A.length>1||e=="zoom")){var L=A[0],M=n-L.clientX,T=i-L.clientY;if(e=="wait")if(M*M+T*T>4)e="cursor";else return g.preventDefault();n=L.clientX,i=L.clientY,g.clientX=L.clientX,g.clientY=L.clientY;var I=g.timeStamp,F=I-r;if(r=I,e=="scroll"){var _=new R(g,l);_.speed=1,_.wheelX=M,_.wheelY=T,10*Math.abs(M)<Math.abs(T)&&(M=0),10*Math.abs(T)<Math.abs(M)&&(T=0),F!=0&&(y=M/F,m=T/F),l._emit("mousewheel",_),_.propagationStopped||(y=m=0)}else{var W=new R(g,l),O=W.getDocumentPosition();e=="cursor"?l.selection.moveCursorToPosition(O):e=="anchor"&&l.selection.setSelectionAnchor(O.row,O.column),l.renderer.scrollCursorIntoView(O),g.preventDefault()}}},l);function u(){d+=60,c=setInterval(function(){d--<=0&&(clearInterval(c),c=null),Math.abs(y)<.01&&(y=0),Math.abs(m)<.01&&(m=0),d<20&&(y=.9*y),d<20&&(m=.9*m);var g=l.session.getScrollTop();l.renderer.scrollBy(10*y,10*m),g==l.session.getScrollTop()&&(d=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(E,x,P){"use strict";var R=E("../lib/event"),k=E("../lib/useragent"),C=E("./default_handlers").DefaultHandlers,s=E("./default_gutter_handler").GutterHandler,l=E("./mouse_event").MouseEvent,e=E("./dragdrop_handler").DragdropHandler,n=E("./touch_handler").addTouchListeners,i=E("../config"),t=function(){function r(o){var c=this;this.editor=o,new C(this),new s(this),new e(this);var d=function(y){var m=!document.hasFocus||!document.hasFocus()||!o.isFocused()&&document.activeElement==(o.textInput&&o.textInput.getElement());m&&window.focus(),o.focus(),setTimeout(function(){o.isFocused()||o.focus()})},$=o.renderer.getMouseEventTarget();R.addListener($,"click",this.onMouseEvent.bind(this,"click"),o),R.addListener($,"mousemove",this.onMouseMove.bind(this,"mousemove"),o),R.addMultiMouseDownListener([$,o.renderer.scrollBarV&&o.renderer.scrollBarV.inner,o.renderer.scrollBarH&&o.renderer.scrollBarH.inner,o.textInput&&o.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",o),R.addMouseWheelListener(o.container,this.onMouseWheel.bind(this,"mousewheel"),o),n(o.container,o);var S=o.renderer.$gutter;R.addListener(S,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),o),R.addListener(S,"click",this.onMouseEvent.bind(this,"gutterclick"),o),R.addListener(S,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),o),R.addListener(S,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),o),R.addListener($,"mousedown",d,o),R.addListener(S,"mousedown",d,o),k.isIE&&o.renderer.scrollBarV&&(R.addListener(o.renderer.scrollBarV.element,"mousedown",d,o),R.addListener(o.renderer.scrollBarH.element,"mousedown",d,o)),o.on("mousemove",function(y){if(!(c.state||c.$dragDelay||!c.$dragEnabled)){var m=o.renderer.screenToTextCoordinates(y.x,y.y),b=o.session.selection.getRange(),p=o.renderer;!b.isEmpty()&&b.insideStart(m.row,m.column)?p.setCursorStyle("default"):p.setCursorStyle("")}},o)}return r.prototype.onMouseEvent=function(o,c){!this.editor.session||this.editor._emit(o,new l(c,this.editor))},r.prototype.onMouseMove=function(o,c){var d=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!d||!d.length||this.editor._emit(o,new l(c,this.editor))},r.prototype.onMouseWheel=function(o,c){var d=new l(c,this.editor);d.speed=this.$scrollSpeed*2,d.wheelX=c.wheelX,d.wheelY=c.wheelY,this.editor._emit(o,d)},r.prototype.setState=function(o){this.state=o},r.prototype.captureMouse=function(o,c){this.x=o.x,this.y=o.y,this.isMousePressed=!0;var d=this.editor,$=this.editor.renderer;$.$isMousePressed=!0;var S=this,y=function(v){if(!!v){if(k.isWebKit&&!v.which&&S.releaseMouse)return S.releaseMouse();S.x=v.clientX,S.y=v.clientY,c&&c(v),S.mouseEvent=new l(v,S.editor),S.$mouseMoved=!0}},m=function(v){d.off("beforeEndOperation",p),clearInterval(w),d.session&&b(),S[S.state+"End"]&&S[S.state+"End"](v),S.state="",S.isMousePressed=$.$isMousePressed=!1,$.$keepTextAreaAtCursor&&$.$moveTextAreaToCursor(),S.$onCaptureMouseMove=S.releaseMouse=null,v&&S.onMouseEvent("mouseup",v),d.endOperation()},b=function(){S[S.state]&&S[S.state](),S.$mouseMoved=!1};if(k.isOldIE&&o.domEvent.type=="dblclick")return setTimeout(function(){m(o)});var p=function(v){!S.releaseMouse||d.curOp.command.name&&d.curOp.selectionChanged&&(S[S.state+"End"]&&S[S.state+"End"](),S.state="",S.releaseMouse())};d.on("beforeEndOperation",p),d.startOperation({command:{name:"mouse"}}),S.$onCaptureMouseMove=y,S.releaseMouse=R.capture(this.editor.container,y,m);var w=setInterval(b,20)},r.prototype.cancelContextMenu=function(){var o=function(c){c&&c.domEvent&&c.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",o),c&&c.domEvent&&R.stopEvent(c.domEvent))}.bind(this);setTimeout(o,10),this.editor.on("nativecontextmenu",o)},r.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},r}();t.prototype.releaseMouse=null,i.defineOptions(t.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:k.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),x.MouseHandler=t}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(E,x,P){"use strict";var R=E("../lib/dom"),k=function(){function C(s){s.on("click",function(l){var e=l.getDocumentPosition(),n=s.session,i=n.getFoldAt(e.row,e.column,1);i&&(l.getAccelKey()?n.removeFold(i):n.expandFold(i),l.stop());var t=l.domEvent&&l.domEvent.target;t&&R.hasCssClass(t,"ace_inline_button")&&R.hasCssClass(t,"ace_toggle_wrap")&&(n.setOption("wrap",!n.getUseWrapMode()),s.renderer.scrollCursorIntoView())}),s.on("gutterclick",function(l){var e=s.renderer.$gutterLayer.getRegion(l);if(e=="foldWidgets"){var n=l.getDocumentPosition().row,i=s.session;i.foldWidgets&&i.foldWidgets[n]&&s.session.onFoldWidgetClick(n,l),s.isFocused()||s.focus(),l.stop()}}),s.on("gutterdblclick",function(l){var e=s.renderer.$gutterLayer.getRegion(l);if(e=="foldWidgets"){var n=l.getDocumentPosition().row,i=s.session,t=i.getParentFoldRangeData(n,!0),r=t.range||t.firstRange;if(r){n=r.start.row;var o=i.getFoldAt(n,i.getLine(n).length,1);o?i.removeFold(o):(i.addFold("...",r),s.renderer.scrollCursorIntoView({row:r.start.row,column:0}))}l.stop()}})}return C}();x.FoldHandler=k}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(E,x,P){"use strict";var R=E("../lib/keys"),k=E("../lib/event"),C=function(){function s(l){this.$editor=l,this.$data={editor:l},this.$handlers=[],this.setDefaultHandler(l.commands)}return s.prototype.setDefaultHandler=function(l){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=l,this.addKeyboardHandler(l,0)},s.prototype.setKeyboardHandler=function(l){var e=this.$handlers;if(e[e.length-1]!=l){for(;e[e.length-1]&&e[e.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(e[e.length-1]);this.addKeyboardHandler(l,1)}},s.prototype.addKeyboardHandler=function(l,e){if(!!l){typeof l=="function"&&!l.handleKeyboard&&(l.handleKeyboard=l);var n=this.$handlers.indexOf(l);n!=-1&&this.$handlers.splice(n,1),e==null?this.$handlers.push(l):this.$handlers.splice(e,0,l),n==-1&&l.attach&&l.attach(this.$editor)}},s.prototype.removeKeyboardHandler=function(l){var e=this.$handlers.indexOf(l);return e==-1?!1:(this.$handlers.splice(e,1),l.detach&&l.detach(this.$editor),!0)},s.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},s.prototype.getStatusText=function(){var l=this.$data,e=l.editor;return this.$handlers.map(function(n){return n.getStatusText&&n.getStatusText(e,l)||""}).filter(Boolean).join(" ")},s.prototype.$callKeyboardHandlers=function(l,e,n,i){for(var t,r=!1,o=this.$editor.commands,c=this.$handlers.length;c--&&(t=this.$handlers[c].handleKeyboard(this.$data,l,e,n,i),!(!(!t||!t.command)&&(t.command=="null"?r=!0:r=o.exec(t.command,this.$editor,t.args,i),r&&i&&l!=-1&&t.passEvent!=!0&&t.command.passEvent!=!0&&k.stopEvent(i),r))););return!r&&l==-1&&(t={command:"insertstring"},r=o.exec("insertstring",this.$editor,e)),r&&this.$editor._signal&&this.$editor._signal("keyboardActivity",t),r},s.prototype.onCommandKey=function(l,e,n){var i=R.keyCodeToString(n);return this.$callKeyboardHandlers(e,i,n,l)},s.prototype.onTextInput=function(l){return this.$callKeyboardHandlers(-1,l)},s}();x.KeyBinding=C}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(E,x,P){"use strict";var R=["\u0621","\u0641"],k=["\u063A","\u064A"],C=0,s=0,l=!1,e=!1,n=!1,i=!1,t=!1,r=!1,o=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],c=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],d=0,$=1,S=0,y=1,m=2,b=3,p=4,w=5,v=6,f=7,a=8,h=9,u=10,g=11,A=12,L=13,M=14,T=15,I=16,F=17,_=18,W=[_,_,_,_,_,_,_,_,_,v,w,v,a,w,_,_,_,_,_,_,_,_,_,_,_,_,_,_,w,w,w,v,a,p,p,g,g,g,p,p,p,p,p,u,h,u,h,h,m,m,m,m,m,m,m,m,m,m,h,p,p,p,p,p,p,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,p,p,p,p,p,p,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,p,p,p,p,_,_,_,_,_,_,w,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,h,p,g,g,g,g,p,p,p,p,S,p,p,_,p,p,g,g,m,m,p,S,p,p,p,m,S,p,p,p,p,p],O=[a,a,a,a,a,a,a,a,a,a,a,_,_,_,S,y,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,a,w,L,M,T,I,F,h,g,g,g,g,g,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,h,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,a];function B(N,U,X,G){var Q=C?c:o,J=null,q=null,j=null,re=0,he=null,de=null,ce=-1,se=null,D=null,V=[];if(!G)for(se=0,G=[];se<X;se++)G[se]=Y(N[se]);for(s=C,l=!1,e=!1,n=!1,i=!1,D=0;D<X;D++){if(J=re,V[D]=q=z(N,G,V,D),re=Q[J][q],he=re&240,re&=15,U[D]=j=Q[re][5],he>0)if(he==16){for(se=ce;se<D;se++)U[se]=1;ce=-1}else ce=-1;if(de=Q[re][6],de)ce==-1&&(ce=D);else if(ce>-1){for(se=ce;se<D;se++)U[se]=j;ce=-1}G[D]==w&&(U[D]=0),s|=j}if(i){for(se=0;se<X;se++)if(G[se]==v){U[se]=C;for(var K=se-1;K>=0&&G[K]==a;K--)U[K]=C}}}function H(N,U,X){if(!(s<N)){if(N==1&&C==$&&!n){X.reverse();return}for(var G=X.length,Q=0,J,q,j,re;Q<G;){if(U[Q]>=N){for(J=Q+1;J<G&&U[J]>=N;)J++;for(q=Q,j=J-1;q<j;q++,j--)re=X[q],X[q]=X[j],X[j]=re;Q=J}Q++}}}function z(N,U,X,G){var Q=U[G],J,q,j,re;switch(Q){case S:case y:l=!1;case p:case b:return Q;case m:return l?b:m;case f:return l=!0,e=!0,y;case a:return p;case h:return G<1||G+1>=U.length||(J=X[G-1])!=m&&J!=b||(q=U[G+1])!=m&&q!=b?p:(l&&(q=b),q==J?q:p);case u:return J=G>0?X[G-1]:w,J==m&&G+1<U.length&&U[G+1]==m?m:p;case g:if(G>0&&X[G-1]==m)return m;if(l)return p;for(re=G+1,j=U.length;re<j&&U[re]==g;)re++;return re<j&&U[re]==m?m:p;case A:for(j=U.length,re=G+1;re<j&&U[re]==A;)re++;if(re<j){var he=N[G],de=he>=1425&&he<=2303||he==64286;if(J=U[re],de&&(J==y||J==f))return y}return G<1||(J=U[G-1])==w?p:X[G-1];case w:return l=!1,n=!0,C;case v:return i=!0,p;case L:case M:case I:case F:case T:l=!1;case _:return p}}function Y(N){var U=N.charCodeAt(0),X=U>>8;return X==0?U>191?S:W[U]:X==5?/[\u0591-\u05f4]/.test(N)?y:S:X==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(N)?A:/[\u0660-\u0669\u066b-\u066c]/.test(N)?b:U==1642?g:/[\u06f0-\u06f9]/.test(N)?m:f:X==32&&U<=8287?O[U&255]:X==254&&U>=65136?f:p}function Z(N){return N>="\u064B"&&N<="\u0655"}x.L=S,x.R=y,x.EN=m,x.ON_R=3,x.AN=4,x.R_H=5,x.B=6,x.RLE=7,x.DOT="\xB7",x.doBidiReorder=function(N,U,X){if(N.length<2)return{};var G=N.split(""),Q=new Array(G.length),J=new Array(G.length),q=[];C=X?$:d,B(G,q,G.length,U);for(var j=0;j<Q.length;Q[j]=j,j++);H(2,q,Q),H(1,q,Q);for(var j=0;j<Q.length-1;j++)U[j]===b?q[j]=x.AN:q[j]===y&&(U[j]>f&&U[j]<L||U[j]===p||U[j]===_)?q[j]=x.ON_R:j>0&&G[j-1]==="\u0644"&&/\u0622|\u0623|\u0625|\u0627/.test(G[j])&&(q[j-1]=q[j]=x.R_H,j++);G[G.length-1]===x.DOT&&(q[G.length-1]=x.B),G[0]==="\u202B"&&(q[0]=x.RLE);for(var j=0;j<Q.length;j++)J[j]=q[Q[j]];return{logicalFromVisual:Q,bidiLevels:J}},x.hasBidiCharacters=function(N,U){for(var X=!1,G=0;G<N.length;G++)U[G]=Y(N.charAt(G)),!X&&(U[G]==y||U[G]==f||U[G]==b)&&(X=!0);return X},x.getVisualFromLogicalIdx=function(N,U){for(var X=0;X<U.logicalFromVisual.length;X++)if(U.logicalFromVisual[X]==N)return X;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(E,x,P){"use strict";var R=E("./lib/bidiutil"),k=E("./lib/lang"),C=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,s=function(){function l(e){this.session=e,this.bidiMap={},this.currentRow=null,this.bidiUtil=R,this.charWidths=[],this.EOL="\xAC",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="\xB6",this.RLE="\u202B",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=C.test(e.getValue())}return l.prototype.isBidiRow=function(e,n,i){return this.seenBidi?(e!==this.currentRow&&(this.currentRow=e,this.updateRowLine(n,i),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},l.prototype.onChange=function(e){this.seenBidi?this.currentRow=null:e.action=="insert"&&C.test(e.lines.join(`
`))&&(this.seenBidi=!0,this.currentRow=null)},l.prototype.getDocumentRow=function(){var e=0,n=this.session.$screenRowCache;if(n.length){var i=this.session.$getRowCacheIndex(n,this.currentRow);i>=0&&(e=this.session.$docRowCache[i])}return e},l.prototype.getSplitIndex=function(){var e=0,n=this.session.$screenRowCache;if(n.length)for(var i,t=this.session.$getRowCacheIndex(n,this.currentRow);this.currentRow-e>0&&(i=this.session.$getRowCacheIndex(n,this.currentRow-e-1),i===t);)t=i,e++;else e=this.currentRow;return e},l.prototype.updateRowLine=function(e,n){e===void 0&&(e=this.getDocumentRow());var i=e===this.session.getLength()-1,t=i?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 r=this.session.$wrapData[e];r&&(n===void 0&&(n=this.getSplitIndex()),n>0&&r.length?(this.wrapIndent=r.indent,this.wrapOffset=this.wrapIndent*this.charWidths[R.L],this.line=n<r.length?this.line.substring(r[n-1],r[n]):this.line.substring(r[r.length-1])):this.line=this.line.substring(0,r[n]),n==r.length&&(this.line+=this.showInvisibles?t:R.DOT))}else this.line+=this.showInvisibles?t:R.DOT;var o=this.session,c=0,d;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function($,S){return $===" "||o.isFullWidth($.charCodeAt(0))?(d=$===" "?o.getScreenTabSize(S+c):2,c+=d-1,k.stringRepeat(R.DOT,d)):$}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==R.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},l.prototype.updateBidiMap=function(){var e=[];R.hasBidiCharacters(this.line,e)||this.isRtlDir?this.bidiMap=R.doBidiReorder(this.line,e,this.isRtlDir):this.bidiMap={}},l.prototype.markAsDirty=function(){this.currentRow=null},l.prototype.updateCharacterWidths=function(e){if(this.characterWidth!==e.$characterSize.width){this.fontMetrics=e;var n=this.characterWidth=e.$characterSize.width,i=e.$measureCharWidth("\u05D4");this.charWidths[R.L]=this.charWidths[R.EN]=this.charWidths[R.ON_R]=n,this.charWidths[R.R]=this.charWidths[R.AN]=i,this.charWidths[R.R_H]=i*.45,this.charWidths[R.B]=this.charWidths[R.RLE]=0,this.currentRow=null}},l.prototype.setShowInvisibles=function(e){this.showInvisibles=e,this.currentRow=null},l.prototype.setEolChar=function(e){this.EOL=e},l.prototype.setContentWidth=function(e){this.contentWidth=e},l.prototype.isRtlLine=function(e){return this.$isRtl?!0:e!=null?this.session.getLine(e).charAt(0)==this.RLE:this.isRtlDir},l.prototype.setRtlDirection=function(e,n){for(var i=e.getCursorPosition(),t=e.selection.getSelectionAnchor().row;t<=i.row;t++)!n&&e.session.getLine(t).charAt(0)===e.session.$bidiHandler.RLE?e.session.doc.removeInLine(t,0,1):n&&e.session.getLine(t).charAt(0)!==e.session.$bidiHandler.RLE&&e.session.doc.insert({column:0,row:t},e.session.$bidiHandler.RLE)},l.prototype.getPosLeft=function(e){e-=this.wrapIndent;var n=this.line.charAt(0)===this.RLE?1:0,i=e>n?this.session.getOverwrite()?e:e-1:n,t=R.getVisualFromLogicalIdx(i,this.bidiMap),r=this.bidiMap.bidiLevels,o=0;!this.session.getOverwrite()&&e<=n&&r[t]%2!=0&&t++;for(var c=0;c<t;c++)o+=this.charWidths[r[c]];return!this.session.getOverwrite()&&e>n&&r[t]%2==0&&(o+=this.charWidths[r[t]]),this.wrapIndent&&(o+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(o+=this.rtlLineOffset),o},l.prototype.getSelections=function(e,n){var i=this.bidiMap,t=i.bidiLevels,r,o=[],c=0,d=Math.min(e,n)-this.wrapIndent,$=Math.max(e,n)-this.wrapIndent,S=!1,y=!1,m=0;this.wrapIndent&&(c+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var b,p=0;p<t.length;p++)b=i.logicalFromVisual[p],r=t[p],S=b>=d&&b<$,S&&!y?m=c:!S&&y&&o.push({left:m,width:c-m}),c+=this.charWidths[r],y=S;if(S&&p===t.length&&o.push({left:m,width:c-m}),this.isRtlDir)for(var w=0;w<o.length;w++)o[w].left+=this.rtlLineOffset;return o},l.prototype.offsetToCol=function(e){this.isRtlDir&&(e-=this.rtlLineOffset);var n=0,e=Math.max(e,0),i=0,t=0,r=this.bidiMap.bidiLevels,o=this.charWidths[r[t]];for(this.wrapIndent&&(e-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);e>i+o/2;){if(i+=o,t===r.length-1){o=0;break}o=this.charWidths[r[++t]]}return t>0&&r[t-1]%2!=0&&r[t]%2==0?(e<i&&t--,n=this.bidiMap.logicalFromVisual[t]):t>0&&r[t-1]%2==0&&r[t]%2!=0?n=1+(e>i?this.bidiMap.logicalFromVisual[t]:this.bidiMap.logicalFromVisual[t-1]):this.isRtlDir&&t===r.length-1&&o===0&&r[t-1]%2==0||!this.isRtlDir&&t===0&&r[t]%2!=0?n=1+this.bidiMap.logicalFromVisual[t]:(t>0&&r[t-1]%2!=0&&o!==0&&t--,n=this.bidiMap.logicalFromVisual[t]),n===0&&this.isRtlDir&&n++,n+this.wrapIndent},l}();x.BidiHandler=s}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(E,x,P){"use strict";var R=E("./lib/oop"),k=E("./lib/lang"),C=E("./lib/event_emitter").EventEmitter,s=E("./range").Range,l=function(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 n=this;this.cursor.on("change",function(i){n.$cursorChanged=!0,n.$silent||n._emit("changeCursor"),!n.$isEmpty&&!n.$silent&&n._emit("changeSelection"),!n.$keepDesiredColumnOnChange&&i.old.column!=i.value.column&&(n.$desiredColumn=null)}),this.anchor.on("change",function(){n.$anchorChanged=!0,!n.$isEmpty&&!n.$silent&&n._emit("changeSelection")})};(function(){R.implement(this,C),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setAnchor=function(e,n){this.$isEmpty=!1,this.anchor.setPosition(e,n)},this.setSelectionAnchor=this.setAnchor,this.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionAnchor=this.getAnchor,this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var e=this.anchor,n=this.lead;return e.row>n.row||e.row==n.row&&e.column>n.column},this.getRange=function(){var e=this.anchor,n=this.lead;return this.$isEmpty?s.fromPoints(n,n):this.isBackwards()?s.fromPoints(n,e):s.fromPoints(e,n)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(e,n){var i=n?e.end:e.start,t=n?e.start:e.end;this.$setSelection(i.row,i.column,t.row,t.column)},this.$setSelection=function(e,n,i,t){if(!this.$silent){var r=this.$isEmpty,o=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,n),this.cursor.setPosition(i,t),this.$isEmpty=!s.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||r!=this.$isEmpty||o)&&this._emit("changeSelection")}},this.$moveSelection=function(e){var n=this.lead;this.$isEmpty&&this.setSelectionAnchor(n.row,n.column),e.call(this)},this.selectTo=function(e,n){this.$moveSelection(function(){this.moveCursorTo(e,n)})},this.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},this.moveTo=function(e,n){this.clearSelection(),this.moveCursorTo(e,n)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,n){if(typeof n=="undefined"){var i=e||this.lead;e=i.row,n=i.column}return this.session.getWordRange(e,n)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),n=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(n)},this.getLineRange=function(e,n){var i=typeof e=="number"?e:this.lead.row,t,r=this.session.getFoldLine(i);return r?(i=r.start.row,t=r.end.row):t=i,n===!0?new s(i,0,t,this.session.getLine(t).length):new s(i,0,t+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(e,n,i){var t=e.column,r=e.column+n;return i<0&&(t=e.column-n,r=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(t,r).split(" ").length-1==n},this.moveCursorLeft=function(){var e=this.lead.getPosition(),n;if(n=this.session.getFoldAt(e.row,e.column,-1))this.moveCursorTo(n.start.row,n.start.column);else if(e.column===0)e.row>0&&this.moveCursorTo(e.row-1,this.doc.getLine(e.row-1).length);else{var i=this.session.getTabSize();this.wouldMoveIntoSoftTab(e,i,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-i):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e=this.lead.getPosition(),n;if(n=this.session.getFoldAt(e.row,e.column,1))this.moveCursorTo(n.end.row,n.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var i=this.session.getTabSize(),e=this.lead;this.wouldMoveIntoSoftTab(e,i,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,i):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var e=this.lead.row,n=this.lead.column,i=this.session.documentToScreenRow(e,n),t=this.session.screenToDocumentPosition(i,0),r=this.session.getDisplayLine(e,null,t.row,t.column),o=r.match(/^\s*/);o[0].length!=n&&!this.session.$useEmacsStyleLineStart&&(t.column+=o[0].length),this.moveCursorToPosition(t)},this.moveCursorLineEnd=function(){var e=this.lead,n=this.session.getDocumentLastRowColumnPosition(e.row,e.column);if(this.lead.column==n.column){var i=this.session.getLine(n.row);if(n.column==i.length){var t=i.search(/\s+$/);t>0&&(n.column=t)}}this.moveCursorTo(n.row,n.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,n=this.doc.getLine(e).length;this.moveCursorTo(e,n)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,n=this.lead.column,i=this.doc.getLine(e),t=i.substring(n);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var r=this.session.getFoldAt(e,n,1);if(r){this.moveCursorTo(r.end.row,r.end.column);return}if(this.session.nonTokenRe.exec(t)&&(n+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,t=i.substring(n)),n>=i.length){this.moveCursorTo(e,i.length),this.moveCursorRight(),e<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(t)&&(n+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,n)},this.moveCursorLongWordLeft=function(){var e=this.lead.row,n=this.lead.column,i;if(i=this.session.getFoldAt(e,n,-1)){this.moveCursorTo(i.start.row,i.start.column);return}var t=this.session.getFoldStringAt(e,n,-1);t==null&&(t=this.doc.getLine(e).substring(0,n));var r=k.stringReverse(t);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(r)&&(n-=this.session.nonTokenRe.lastIndex,r=r.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),n<=0){this.moveCursorTo(e,0),this.moveCursorLeft(),e>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(r)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,n)},this.$shortWordEndIndex=function(e){var n=0,i,t=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(i=e[n])&&t.test(i);)n++;if(n<1){for(r.lastIndex=0;(i=e[n])&&!r.test(i);)if(r.lastIndex=0,n++,t.test(i))if(n>2){n--;break}else{for(;(i=e[n])&&t.test(i);)n++;if(n>2)break}}}return r.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,n=this.lead.column,i=this.doc.getLine(e),t=i.substring(n),r=this.session.getFoldAt(e,n,1);if(r)return this.moveCursorTo(r.end.row,r.end.column);if(n==i.length){var o=this.doc.getLength();do e++,t=this.doc.getLine(e);while(e<o&&/^\s*$/.test(t));/^\s+/.test(t)||(t=""),n=0}var c=this.$shortWordEndIndex(t);this.moveCursorTo(e,n+c)},this.moveCursorShortWordLeft=function(){var e=this.lead.row,n=this.lead.column,i;if(i=this.session.getFoldAt(e,n,-1))return this.moveCursorTo(i.start.row,i.start.column);var t=this.session.getLine(e).substring(0,n);if(n===0){do e--,t=this.doc.getLine(e);while(e>0&&/^\s*$/.test(t));n=t.length,/\s+$/.test(t)||(t="")}var r=k.stringReverse(t),o=this.$shortWordEndIndex(r);return this.moveCursorTo(e,n-o)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,n){var i=this.session.documentToScreenPosition(this.lead.row,this.lead.column),t;if(n===0&&(e!==0&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(t=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(t/this.session.$bidiHandler.charWidths[0])):t=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column),e!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var r=this.session.lineWidgets[this.lead.row];e<0?e-=r.rowsAbove||0:e>0&&(e+=r.rowCount-(r.rowsAbove||0))}var o=this.session.screenToDocumentPosition(i.row+e,i.column,t);e!==0&&n===0&&o.row===this.lead.row&&o.column===this.lead.column,this.moveCursorTo(o.row,o.column+n,n===0)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,n,i){var t=this.session.getFoldAt(e,n,1);t&&(e=t.start.row,n=t.start.column),this.$keepDesiredColumnOnChange=!0;var r=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(r.charAt(n))&&r.charAt(n-1)&&(this.lead.row==e&&this.lead.column==n+1?n=n-1:n=n+1),this.lead.setPosition(e,n),this.$keepDesiredColumnOnChange=!1,i||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,n,i){var t=this.session.screenToDocumentPosition(e,n);this.moveCursorTo(t.row,t.column,i)},this.detach=function(){this.lead.detach(),this.anchor.detach()},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var n=this.getRange();return e?(e.start.column=n.start.column,e.start.row=n.start.row,e.end.column=n.end.column,e.end.row=n.end.row):e=n,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var n=this.getCursor();try{e(this);var i=this.getCursor();return s.fromPoints(n,i)}catch(t){return s.fromPoints(n,n)}finally{this.moveCursorToPosition(n)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map(function(n){var i=n.clone();return i.isBackwards=n.cursor==n.start,i});else{var e=this.getRange();e.isBackwards=this.isBackwards()}return e},this.fromJSON=function(e){if(e.start==null)if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var n=e.length;n--;){var i=s.fromPoints(e[n].start,e[n].end);e[n].isBackwards&&(i.cursor=i.start),this.addRange(i,!0)}return}else e=e[0];this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.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 n=this.ranges.length;n--;)if(!this.ranges[n].isEqual(e[n]))return!1;return!0}}).call(l.prototype),x.Selection=l}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(E,x,P){"use strict";var R=E("./config"),k=2e3,C=function(){function s(l){this.states=l,this.regExps={},this.matchMappings={};for(var e in this.states){for(var n=this.states[e],i=[],t=0,r=this.matchMappings[e]={defaultToken:"text"},o="g",c=[],d=0;d<n.length;d++){var $=n[d];if($.defaultToken&&(r.defaultToken=$.defaultToken),$.caseInsensitive&&o.indexOf("i")===-1&&(o+="i"),$.unicode&&o.indexOf("u")===-1&&(o+="u"),$.regex!=null){$.regex instanceof RegExp&&($.regex=$.regex.toString().slice(1,-1));var S=$.regex,y=new RegExp("(?:("+S+")|(.))").exec("a").length-2;Array.isArray($.token)?$.token.length==1||y==1?$.token=$.token[0]:y-1!=$.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:$,groupCount:y-1}),$.token=$.token[0]):($.tokenArray=$.token,$.token=null,$.onMatch=this.$arrayTokens):typeof $.token=="function"&&!$.onMatch&&(y>1?$.onMatch=this.$applyToken:$.onMatch=$.token),y>1&&(/\\\d/.test($.regex)?S=$.regex.replace(/\\([0-9]+)/g,function(m,b){return"\\"+(parseInt(b,10)+t+1)}):(y=1,S=this.removeCapturingGroups($.regex)),!$.splitRegex&&typeof $.token!="string"&&c.push($)),r[t]=d,t+=y,i.push(S),$.onMatch||($.onMatch=null)}}i.length||(r[0]=0,i.push("$")),c.forEach(function(m){m.splitRegex=this.createSplitterRegexp(m.regex,o)},this),this.regExps[e]=new RegExp("("+i.join(")|(")+")|($)",o)}}return s.prototype.$setMaxTokenCount=function(l){k=l|0},s.prototype.$applyToken=function(l){var e=this.splitRegex.exec(l).slice(1),n=this.token.apply(this,e);if(typeof n=="string")return[{type:n,value:l}];for(var i=[],t=0,r=n.length;t<r;t++)e[t]&&(i[i.length]={type:n[t],value:e[t]});return i},s.prototype.$arrayTokens=function(l){if(!l)return[];var e=this.splitRegex.exec(l);if(!e)return"text";for(var n=[],i=this.tokenArray,t=0,r=i.length;t<r;t++)e[t+1]&&(n[n.length]={type:i[t],value:e[t+1]});return n},s.prototype.removeCapturingGroups=function(l){var e=l.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(n,i){return i?"(?:":n});return e},s.prototype.createSplitterRegexp=function(l,e){if(l.indexOf("(?=")!=-1){var n=0,i=!1,t={};l.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(r,o,c,d,$,S){return i?i=$!="]":$?i=!0:d?(n==t.stack&&(t.end=S+1,t.stack=-1),n--):c&&(n++,c.length!=1&&(t.stack=n,t.start=S)),r}),t.end!=null&&/^\)*$/.test(l.substr(t.end))&&(l=l.substring(0,t.start)+l.substr(t.end))}return l.charAt(0)!="^"&&(l="^"+l),l.charAt(l.length-1)!="$"&&(l+="$"),new RegExp(l,(e||"").replace("g",""))},s.prototype.getLineTokens=function(l,e){if(e&&typeof e!="string"){var n=e.slice(0);e=n[0],e==="#tmp"&&(n.shift(),e=n.shift())}else var n=[];var i=e||"start",t=this.states[i];t||(i="start",t=this.states[i]);var r=this.matchMappings[i],o=this.regExps[i];o.lastIndex=0;for(var c,d=[],$=0,S=0,y={type:null,value:""};c=o.exec(l);){var m=r.defaultToken,b=null,p=c[0],w=o.lastIndex;if(w-p.length>$){var v=l.substring($,w-p.length);y.type==m?y.value+=v:(y.type&&d.push(y),y={type:m,value:v})}for(var f=0;f<c.length-2;f++)if(c[f+1]!==void 0){b=t[r[f]],b.onMatch?m=b.onMatch(p,i,n,l):m=b.token,b.next&&(typeof b.next=="string"?i=b.next:i=b.next(i,n),t=this.states[i],t||(this.reportError("state doesn't exist",i),i="start",t=this.states[i]),r=this.matchMappings[i],$=w,o=this.regExps[i],o.lastIndex=w),b.consumeLineEnd&&($=w);break}if(p){if(typeof m=="string")(!b||b.merge!==!1)&&y.type===m?y.value+=p:(y.type&&d.push(y),y={type:m,value:p});else if(m){y.type&&d.push(y),y={type:null,value:""};for(var f=0;f<m.length;f++)d.push(m[f])}}if($==l.length)break;if($=w,S++>k){for(S>2*l.length&&this.reportError("infinite loop with in ace tokenizer",{startState:e,line:l});$<l.length;)y.type&&d.push(y),y={value:l.substring($,$+=500),type:"overflow"};i="start",n=[];break}}return y.type&&d.push(y),n.length>1&&n[0]!==i&&n.unshift("#tmp",i),{tokens:d,state:n.length?n:i}},s}();C.prototype.reportError=R.reportError,x.Tokenizer=C}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(E,x,P){"use strict";var R=E("../lib/lang"),k=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(l,e){if(!e){for(var n in l)this.$rules[n]=l[n];return}for(var n in l){for(var i=l[n],t=0;t<i.length;t++){var r=i[t];(r.next||r.onMatch)&&(typeof r.next=="string"&&r.next.indexOf(e)!==0&&(r.next=e+r.next),r.nextState&&r.nextState.indexOf(e)!==0&&(r.nextState=e+r.nextState))}this.$rules[e+n]=i}},this.getRules=function(){return this.$rules},this.embedRules=function(l,e,n,i,t){var r=typeof l=="function"?new l().getRules():l;if(i)for(var o=0;o<i.length;o++)i[o]=e+i[o];else{i=[];for(var c in r)i.push(e+c)}if(this.addRules(r,e),n)for(var d=Array.prototype[t?"push":"unshift"],o=0;o<i.length;o++)d.apply(this.$rules[i[o]],R.deepCopy(n));this.$embeds||(this.$embeds=[]),this.$embeds.push(e)},this.getEmbeds=function(){return this.$embeds};var C=function(l,e){return(l!="start"||e.length)&&e.unshift(this.nextState,l),this.nextState},s=function(l,e){return e.shift(),e.shift()||"start"};this.normalizeRules=function(){var l=0,e=this.$rules;function n(i){var t=e[i];t.processed=!0;for(var r=0;r<t.length;r++){var o=t[r],c=null;Array.isArray(o)&&(c=o,o={}),!o.regex&&o.start&&(o.regex=o.start,o.next||(o.next=[]),o.next.push({defaultToken:o.token},{token:o.token+".end",regex:o.end||o.start,next:"pop"}),o.token=o.token+".start",o.push=!0);var d=o.next||o.push;if(d&&Array.isArray(d)){var $=o.stateName;$||($=o.token,typeof $!="string"&&($=$[0]||""),e[$]&&($+=l++)),e[$]=d,o.next=$,n($)}else d=="pop"&&(o.next=s);if(o.push&&(o.nextState=o.next||o.push,o.next=C,delete o.push),o.rules)for(var S in o.rules)e[S]?e[S].push&&e[S].push.apply(e[S],o.rules[S]):e[S]=o.rules[S];var y=typeof o=="string"?o:o.include;if(y&&(y==="$self"&&(y="start"),Array.isArray(y)?c=y.map(function(b){return e[b]}):c=e[y]),c){var m=[r,1].concat(c);o.noEscape&&(m=m.filter(function(b){return!b.next})),t.splice.apply(t,m),r--}o.keywordMap&&(o.token=this.createKeywordMapper(o.keywordMap,o.defaultToken||"text",o.caseInsensitive),delete o.defaultToken)}}Object.keys(e).forEach(n,this)},this.createKeywordMapper=function(l,e,n,i){var t=Object.create(null);return this.$keywordList=[],Object.keys(l).forEach(function(r){for(var o=l[r],c=o.split(i||"|"),d=c.length;d--;){var $=c[d];this.$keywordList.push($),n&&($=$.toLowerCase()),t[$]=r}},this),l=null,n?function(r){return t[r.toLowerCase()]||e}:function(r){return t[r]||e}},this.getKeywords=function(){return this.$keywords}}).call(k.prototype),x.TextHighlightRules=k}),ace.define("ace/mode/behaviour",["require","exports","module"],function(E,x,P){"use strict";var R=function(){this.$behaviours={}};(function(){this.add=function(k,C,s){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[k]:this.$behaviours[k]={}}this.$behaviours[k][C]=s},this.addBehaviours=function(k){for(var C in k)for(var s in k[C])this.add(C,s,k[C][s])},this.remove=function(k){this.$behaviours&&this.$behaviours[k]&&delete this.$behaviours[k]},this.inherit=function(k,C){if(typeof k=="function")var s=new k().getBehaviours(C);else var s=k.getBehaviours(C);this.addBehaviours(s)},this.getBehaviours=function(k){if(k){for(var C={},s=0;s<k.length;s++)this.$behaviours[k[s]]&&(C[k[s]]=this.$behaviours[k[s]]);return C}else return this.$behaviours}}).call(R.prototype),x.Behaviour=R}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(E,x,P){"use strict";var R=E("./range").Range,k=function(){function C(s,l,e){this.$session=s,this.$row=l,this.$rowTokens=s.getTokens(l);var n=s.getTokenAt(l,e);this.$tokenIndex=n?n.index:-1}return C.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},C.prototype.stepForward=function(){this.$tokenIndex+=1;for(var s;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,s||(s=this.$session.getLength()),this.$row>=s)return this.$row=s-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},C.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},C.prototype.getCurrentTokenRow=function(){return this.$row},C.prototype.getCurrentTokenColumn=function(){var s=this.$rowTokens,l=this.$tokenIndex,e=s[l].start;if(e!==void 0)return e;for(e=0;l>0;)l-=1,e+=s[l].value.length;return e},C.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},C.prototype.getCurrentTokenRange=function(){var s=this.$rowTokens[this.$tokenIndex],l=this.getCurrentTokenColumn();return new R(this.$row,l,this.$row,l+s.value.length)},C}();x.TokenIterator=k}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(E,x,P){"use strict";var R=E("../../lib/oop"),k=E("../behaviour").Behaviour,C=E("../../token_iterator").TokenIterator,s=E("../../lib/lang"),l=["text","paren.rparen","rparen","paren","punctuation.operator"],e=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],n,i={},t={'"':'"',"'":"'"},r=function(d){var $=-1;if(d.multiSelect&&($=d.selection.index,i.rangeCount!=d.multiSelect.rangeCount&&(i={rangeCount:d.multiSelect.rangeCount})),i[$])return n=i[$];n=i[$]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},o=function(d,$,S,y){var m=d.end.row-d.start.row;return{text:S+$+y,selection:[0,d.start.column+1,m,d.end.column+(m?0:1)]}},c=function(d){this.add("braces","insertion",function($,S,y,m,b){var p=y.getCursorPosition(),w=m.doc.getLine(p.row);if(b=="{"){r(y);var v=y.getSelectionRange(),f=m.doc.getTextRange(v);if(f!==""&&f!=="{"&&y.getWrapBehavioursEnabled())return o(v,f,"{","}");if(c.isSaneInsertion(y,m))return/[\]\}\)]/.test(w[p.column])||y.inMultiSelectMode||d&&d.braces?(c.recordAutoInsert(y,m,"}"),{text:"{}",selection:[1,1]}):(c.recordMaybeInsert(y,m,"{"),{text:"{",selection:[1,1]})}else if(b=="}"){r(y);var a=w.substring(p.column,p.column+1);if(a=="}"){var h=m.$findOpeningBracket("}",{column:p.column+1,row:p.row});if(h!==null&&c.isAutoInsertedClosing(p,w,b))return c.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(b==`
`||b==`\r
`){r(y);var u="";c.isMaybeInsertedClosing(p,w)&&(u=s.stringRepeat("}",n.maybeInsertedBrackets),c.clearMaybeInsertedClosing());var a=w.substring(p.column,p.column+1);if(a==="}"){var g=m.findMatchingBracket({row:p.row,column:p.column+1},"}");if(!g)return null;var A=this.$getIndent(m.getLine(g.row))}else if(u)var A=this.$getIndent(w);else{c.clearMaybeInsertedClosing();return}var L=A+m.getTabString();return{text:`
`+L+`
`+A+u,selection:[1,L.length,1,L.length]}}else c.clearMaybeInsertedClosing()}),this.add("braces","deletion",function($,S,y,m,b){var p=m.doc.getTextRange(b);if(!b.isMultiLine()&&p=="{"){r(y);var w=m.doc.getLine(b.start.row),v=w.substring(b.end.column,b.end.column+1);if(v=="}")return b.end.column++,b;n.maybeInsertedBrackets--}}),this.add("parens","insertion",function($,S,y,m,b){if(b=="("){r(y);var p=y.getSelectionRange(),w=m.doc.getTextRange(p);if(w!==""&&y.getWrapBehavioursEnabled())return o(p,w,"(",")");if(c.isSaneInsertion(y,m))return c.recordAutoInsert(y,m,")"),{text:"()",selection:[1,1]}}else if(b==")"){r(y);var v=y.getCursorPosition(),f=m.doc.getLine(v.row),a=f.substring(v.column,v.column+1);if(a==")"){var h=m.$findOpeningBracket(")",{column:v.column+1,row:v.row});if(h!==null&&c.isAutoInsertedClosing(v,f,b))return c.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function($,S,y,m,b){var p=m.doc.getTextRange(b);if(!b.isMultiLine()&&p=="("){r(y);var w=m.doc.getLine(b.start.row),v=w.substring(b.start.column+1,b.start.column+2);if(v==")")return b.end.column++,b}}),this.add("brackets","insertion",function($,S,y,m,b){if(b=="["){r(y);var p=y.getSelectionRange(),w=m.doc.getTextRange(p);if(w!==""&&y.getWrapBehavioursEnabled())return o(p,w,"[","]");if(c.isSaneInsertion(y,m))return c.recordAutoInsert(y,m,"]"),{text:"[]",selection:[1,1]}}else if(b=="]"){r(y);var v=y.getCursorPosition(),f=m.doc.getLine(v.row),a=f.substring(v.column,v.column+1);if(a=="]"){var h=m.$findOpeningBracket("]",{column:v.column+1,row:v.row});if(h!==null&&c.isAutoInsertedClosing(v,f,b))return c.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function($,S,y,m,b){var p=m.doc.getTextRange(b);if(!b.isMultiLine()&&p=="["){r(y);var w=m.doc.getLine(b.start.row),v=w.substring(b.start.column+1,b.start.column+2);if(v=="]")return b.end.column++,b}}),this.add("string_dquotes","insertion",function($,S,y,m,b){var p=m.$mode.$quotes||t;if(b.length==1&&p[b]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(b)!=-1)return;r(y);var w=b,v=y.getSelectionRange(),f=m.doc.getTextRange(v);if(f!==""&&(f.length!=1||!p[f])&&y.getWrapBehavioursEnabled())return o(v,f,w,w);if(!f){var a=y.getCursorPosition(),h=m.doc.getLine(a.row),u=h.substring(a.column-1,a.column),g=h.substring(a.column,a.column+1),A=m.getTokenAt(a.row,a.column),L=m.getTokenAt(a.row,a.column+1);if(u=="\\"&&A&&/escape/.test(A.type))return null;var M=A&&/string|escape/.test(A.type),T=!L||/string|escape/.test(L.type),I;if(g==w)I=M!==T,I&&/string\.end/.test(L.type)&&(I=!1);else{if(M&&!T||M&&T)return null;var F=m.$mode.tokenRe;F.lastIndex=0;var _=F.test(u);F.lastIndex=0;var W=F.test(g),O=m.$mode.$pairQuotesAfter,B=O&&O[w]&&O[w].test(u);if(!B&&_||W||g&&!/[\s;,.})\]\\]/.test(g))return null;var H=h[a.column-2];if(u==w&&(H==w||F.test(H)))return null;I=!0}return{text:I?w+w:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function($,S,y,m,b){var p=m.$mode.$quotes||t,w=m.doc.getTextRange(b);if(!b.isMultiLine()&&p.hasOwnProperty(w)){r(y);var v=m.doc.getLine(b.start.row),f=v.substring(b.start.column+1,b.start.column+2);if(f==w)return b.end.column++,b}})};c.isSaneInsertion=function(d,$){var S=d.getCursorPosition(),y=new C($,S.row,S.column);if(!this.$matchTokenType(y.getCurrentToken()||"text",l)){if(/[)}\]]/.test(d.session.getLine(S.row)[S.column]))return!0;var m=new C($,S.row,S.column+1);if(!this.$matchTokenType(m.getCurrentToken()||"text",l))return!1}return y.stepForward(),y.getCurrentTokenRow()!==S.row||this.$matchTokenType(y.getCurrentToken()||"text",e)},c.$matchTokenType=function(d,$){return $.indexOf(d.type||d)>-1},c.recordAutoInsert=function(d,$,S){var y=d.getCursorPosition(),m=$.doc.getLine(y.row);this.isAutoInsertedClosing(y,m,n.autoInsertedLineEnd[0])||(n.autoInsertedBrackets=0),n.autoInsertedRow=y.row,n.autoInsertedLineEnd=S+m.substr(y.column),n.autoInsertedBrackets++},c.recordMaybeInsert=function(d,$,S){var y=d.getCursorPosition(),m=$.doc.getLine(y.row);this.isMaybeInsertedClosing(y,m)||(n.maybeInsertedBrackets=0),n.maybeInsertedRow=y.row,n.maybeInsertedLineStart=m.substr(0,y.column)+S,n.maybeInsertedLineEnd=m.substr(y.column),n.maybeInsertedBrackets++},c.isAutoInsertedClosing=function(d,$,S){return n.autoInsertedBrackets>0&&d.row===n.autoInsertedRow&&S===n.autoInsertedLineEnd[0]&&$.substr(d.column)===n.autoInsertedLineEnd},c.isMaybeInsertedClosing=function(d,$){return n.maybeInsertedBrackets>0&&d.row===n.maybeInsertedRow&&$.substr(d.column)===n.maybeInsertedLineEnd&&$.substr(0,d.column)==n.maybeInsertedLineStart},c.popAutoInsertedClosing=function(){n.autoInsertedLineEnd=n.autoInsertedLineEnd.substr(1),n.autoInsertedBrackets--},c.clearMaybeInsertedClosing=function(){n&&(n.maybeInsertedBrackets=0,n.maybeInsertedRow=-1)},R.inherits(c,k),x.CstyleBehaviour=c}),ace.define("ace/unicode",["require","exports","module"],function(E,x,P){"use strict";for(var R=[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],k=0,C=[],s=0;s<R.length;s+=2)C.push(k+=R[s]),R[s+1]&&C.push(45,k+=R[s+1]);x.wordChars=String.fromCharCode.apply(null,C)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(E,x,P){"use strict";var R=E("../config"),k=E("../tokenizer").Tokenizer,C=E("./text_highlight_rules").TextHighlightRules,s=E("./behaviour/cstyle").CstyleBehaviour,l=E("../unicode"),e=E("../lib/lang"),n=E("../token_iterator").TokenIterator,i=E("../range").Range,t=function(){this.HighlightRules=C};(function(){this.$defaultBehaviour=new s,this.tokenRe=new RegExp("^["+l.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+l.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new k(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(r,o,c,d){var $=o.doc,S=!0,y=!0,m=Infinity,b=o.getTabSize(),p=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var f=this.lineCommentStart.map(e.escapeRegExp).join("|"),w=this.lineCommentStart[0];else var f=e.escapeRegExp(this.lineCommentStart),w=this.lineCommentStart;f=new RegExp("^(\\s*)(?:"+f+") ?"),p=o.getUseSoftTabs();var u=function(W,O){var B=W.match(f);if(!!B){var H=B[1].length,z=B[0].length;!L(W,H,z)&&B[0][z-1]==" "&&z--,$.removeInLine(O,H,z)}},A=w+" ",h=function(W,O){(!S||/\S/.test(W))&&(L(W,m,m)?$.insertInLine({row:O,column:m},A):$.insertInLine({row:O,column:m},w))},g=function(W,O){return f.test(W)},L=function(W,O,B){for(var H=0;O--&&W.charAt(O)==" ";)H++;if(H%b!=0)return!1;for(var H=0;W.charAt(B++)==" ";)H++;return b>2?H%b!=b-1:H%b==0}}else{if(!this.blockComment)return!1;var w=this.blockComment.start,v=this.blockComment.end,f=new RegExp("^(\\s*)(?:"+e.escapeRegExp(w)+")"),a=new RegExp("(?:"+e.escapeRegExp(v)+")\\s*$"),h=function(I,F){g(I,F)||(!S||/\S/.test(I))&&($.insertInLine({row:F,column:I.length},v),$.insertInLine({row:F,column:m},w))},u=function(I,F){var _;(_=I.match(a))&&$.removeInLine(F,I.length-_[0].length,I.length),(_=I.match(f))&&$.removeInLine(F,_[1].length,_[0].length)},g=function(I,F){if(f.test(I))return!0;for(var _=o.getTokens(F),W=0;W<_.length;W++)if(_[W].type==="comment")return!0}}function M(I){for(var F=c;F<=d;F++)I($.getLine(F),F)}var T=Infinity;M(function(I,F){var _=I.search(/\S/);_!==-1?(_<m&&(m=_),y&&!g(I,F)&&(y=!1)):T>I.length&&(T=I.length)}),m==Infinity&&(m=T,S=!1,y=!1),p&&m%b!=0&&(m=Math.floor(m/b)*b),M(y?u:h)},this.toggleBlockComment=function(r,o,c,d){var $=this.blockComment;if(!!$){!$.start&&$[0]&&($=$[0]);var S=new n(o,d.row,d.column),y=S.getCurrentToken(),m=o.selection,b=o.selection.toOrientedRange(),p,w;if(y&&/comment/.test(y.type)){for(var v,f;y&&/comment/.test(y.type);){var a=y.value.indexOf($.start);if(a!=-1){var h=S.getCurrentTokenRow(),u=S.getCurrentTokenColumn()+a;v=new i(h,u,h,u+$.start.length);break}y=S.stepBackward()}for(var S=new n(o,d.row,d.column),y=S.getCurrentToken();y&&/comment/.test(y.type);){var a=y.value.indexOf($.end);if(a!=-1){var h=S.getCurrentTokenRow(),u=S.getCurrentTokenColumn()+a;f=new i(h,u,h,u+$.end.length);break}y=S.stepForward()}f&&o.remove(f),v&&(o.remove(v),p=v.start.row,w=-$.start.length)}else w=$.start.length,p=c.start.row,o.insert(c.end,$.end),o.insert(c.start,$.start);b.start.row==p&&(b.start.column+=w),b.end.row==p&&(b.end.column+=w),o.selection.fromOrientedRange(b)}},this.getNextLineIndent=function(r,o,c){return this.$getIndent(o)},this.checkOutdent=function(r,o,c){return!1},this.autoOutdent=function(r,o,c){},this.$getIndent=function(r){return r.match(/^\s*/)[0]},this.createWorker=function(r){return null},this.createModeDelegates=function(r){this.$embeds=[],this.$modes={};for(var o in r)if(r[o]){var c=r[o],d=c.prototype.$id,$=R.$modes[d];$||(R.$modes[d]=$=new c),R.$modes[o]||(R.$modes[o]=$),this.$embeds.push(o),this.$modes[o]=$}for(var S=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],o=0;o<S.length;o++)(function(m){var b=S[o],p=m[b];m[S[o]]=function(){return this.$delegator(b,arguments,p)}})(this)},this.$delegator=function(r,o,c){var d=o[0]||"start";if(typeof d!="string"){if(Array.isArray(d[2])){var $=d[2][d[2].length-1],S=this.$modes[$];if(S)return S[r].apply(S,[d[1]].concat([].slice.call(o,1)))}d=d[0]||"start"}for(var y=0;y<this.$embeds.length;y++)if(!!this.$modes[this.$embeds[y]]){var m=d.split(this.$embeds[y]);if(!m[0]&&m[1]){o[0]=m[1];var S=this.$modes[this.$embeds[y]];return S[r].apply(S,o)}}var b=c.apply(this,o);return c?b:void 0},this.transformAction=function(r,o,c,d,$){if(this.$behaviour){var S=this.$behaviour.getBehaviours();for(var y in S)if(S[y][o]){var m=S[y][o].apply(this,arguments);if(m)return m}}},this.getKeywords=function(r){if(!this.completionKeywords){var o=this.$tokenizer.rules,c=[];for(var d in o)for(var $=o[d],S=0,y=$.length;S<y;S++)if(typeof $[S].token=="string")/keyword|support|storage/.test($[S].token)&&c.push($[S].regex);else if(typeof $[S].token=="object"){for(var m=0,b=$[S].token.length;m<b;m++)if(/keyword|support|storage/.test($[S].token[m])){var d=$[S].regex.match(/\(.+?\)/g)[m];c.push(d.substr(1,d.length-2))}}this.completionKeywords=c}return r?c.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(r,o,c,d){var $=this.$keywordList||this.$createKeywordList();return $.map(function(S){return{name:S,value:S,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(t.prototype),x.Mode=t}),ace.define("ace/apply_delta",["require","exports","module"],function(E,x,P){"use strict";function R(s,l){throw console.log("Invalid Delta:",s),"Invalid Delta: "+l}function k(s,l){return l.row>=0&&l.row<s.length&&l.column>=0&&l.column<=s[l.row].length}function C(s,l){l.action!="insert"&&l.action!="remove"&&R(l,"delta.action must be 'insert' or 'remove'"),l.lines instanceof Array||R(l,"delta.lines must be an Array"),(!l.start||!l.end)&&R(l,"delta.start/end must be an present");var e=l.start;k(s,l.start)||R(l,"delta.start must be contained in document");var n=l.end;l.action=="remove"&&!k(s,n)&&R(l,"delta.end must contained in document for 'remove' actions");var i=n.row-e.row,t=n.column-(i==0?e.column:0);(i!=l.lines.length-1||l.lines[i].length!=t)&&R(l,"delta.range must match delta lines")}x.applyDelta=function(s,l,e){var n=l.start.row,i=l.start.column,t=s[n]||"";switch(l.action){case"insert":var r=l.lines;if(r.length===1)s[n]=t.substring(0,i)+l.lines[0]+t.substring(i);else{var o=[n,1].concat(l.lines);s.splice.apply(s,o),s[n]=t.substring(0,i)+s[n],s[n+l.lines.length-1]+=t.substring(i)}break;case"remove":var c=l.end.column,d=l.end.row;n===d?s[n]=t.substring(0,i)+t.substring(c):s.splice(n,d-n+1,t.substring(0,i)+s[d].substring(c));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(E,x,P){"use strict";var R=E("./lib/oop"),k=E("./lib/event_emitter").EventEmitter,C=function(){function e(n,i,t){this.$onChange=this.onChange.bind(this),this.attach(n),typeof t=="undefined"?this.setPosition(i.row,i.column):this.setPosition(i,t)}return e.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},e.prototype.getDocument=function(){return this.document},e.prototype.onChange=function(n){if(!(n.start.row==n.end.row&&n.start.row!=this.row)&&!(n.start.row>this.row)){var i=l(n,{row:this.row,column:this.column},this.$insertRight);this.setPosition(i.row,i.column,!0)}},e.prototype.setPosition=function(n,i,t){var r;if(t?r={row:n,column:i}:r=this.$clipPositionToDocument(n,i),!(this.row==r.row&&this.column==r.column)){var o={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:o,value:r})}},e.prototype.detach=function(){this.document.off("change",this.$onChange)},e.prototype.attach=function(n){this.document=n||this.document,this.document.on("change",this.$onChange)},e.prototype.$clipPositionToDocument=function(n,i){var t={};return n>=this.document.getLength()?(t.row=Math.max(0,this.document.getLength()-1),t.column=this.document.getLine(t.row).length):n<0?(t.row=0,t.column=0):(t.row=n,t.column=Math.min(this.document.getLine(t.row).length,Math.max(0,i))),i<0&&(t.column=0),t},e}();C.prototype.$insertRight=!1,R.implement(C.prototype,k);function s(e,n,i){var t=i?e.column<=n.column:e.column<n.column;return e.row<n.row||e.row==n.row&&t}function l(e,n,i){var t=e.action=="insert",r=(t?1:-1)*(e.end.row-e.start.row),o=(t?1:-1)*(e.end.column-e.start.column),c=e.start,d=t?c:e.end;return s(n,c,i)?{row:n.row,column:n.column}:s(d,n,!i)?{row:n.row+r,column:n.column+(n.row==d.row?o:0)}:{row:c.row,column:c.column}}x.Anchor=C}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(E,x,P){"use strict";var R=E("./lib/oop"),k=E("./apply_delta").applyDelta,C=E("./lib/event_emitter").EventEmitter,s=E("./range").Range,l=E("./anchor").Anchor,e=function(){function n(i){this.$lines=[""],i.length===0?this.$lines=[""]:Array.isArray(i)?this.insertMergedLines({row:0,column:0},i):this.insert({row:0,column:0},i)}return n.prototype.setValue=function(i){var t=this.getLength()-1;this.remove(new s(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},i||"")},n.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},n.prototype.createAnchor=function(i,t){return new l(this,i,t)},n.prototype.$detectNewLine=function(i){var t=i.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:`
`,this._signal("changeNewLineMode")},n.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
`;case"unix":return`
`;default:return this.$autoNewLine||`
`}},n.prototype.setNewLineMode=function(i){this.$newLineMode!==i&&(this.$newLineMode=i,this._signal("changeNewLineMode"))},n.prototype.getNewLineMode=function(){return this.$newLineMode},n.prototype.isNewLine=function(i){return i==`\r
`||i=="\r"||i==`
`},n.prototype.getLine=function(i){return this.$lines[i]||""},n.prototype.getLines=function(i,t){return this.$lines.slice(i,t+1)},n.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},n.prototype.getLength=function(){return this.$lines.length},n.prototype.getTextRange=function(i){return this.getLinesForRange(i).join(this.getNewLineCharacter())},n.prototype.getLinesForRange=function(i){var t;if(i.start.row===i.end.row)t=[this.getLine(i.start.row).substring(i.start.column,i.end.column)];else{t=this.getLines(i.start.row,i.end.row),t[0]=(t[0]||"").substring(i.start.column);var r=t.length-1;i.end.row-i.start.row==r&&(t[r]=t[r].substring(0,i.end.column))}return t},n.prototype.insertLines=function(i,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(i,t)},n.prototype.removeLines=function(i,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(i,t)},n.prototype.insertNewLine=function(i){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(i,["",""])},n.prototype.insert=function(i,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(i,this.$split(t))},n.prototype.insertInLine=function(i,t){var r=this.clippedPos(i.row,i.column),o=this.pos(i.row,i.column+t.length);return this.applyDelta({start:r,end:o,action:"insert",lines:[t]},!0),this.clonePos(o)},n.prototype.clippedPos=function(i,t){var r=this.getLength();i===void 0?i=r:i<0?i=0:i>=r&&(i=r-1,t=void 0);var o=this.getLine(i);return t==null&&(t=o.length),t=Math.min(Math.max(t,0),o.length),{row:i,column:t}},n.prototype.clonePos=function(i){return{row:i.row,column:i.column}},n.prototype.pos=function(i,t){return{row:i,column:t}},n.prototype.$clipPosition=function(i){var t=this.getLength();return i.row>=t?(i.row=Math.max(0,t-1),i.column=this.getLine(t-1).length):(i.row=Math.max(0,i.row),i.column=Math.min(Math.max(i.column,0),this.getLine(i.row).length)),i},n.prototype.insertFullLines=function(i,t){i=Math.min(Math.max(i,0),this.getLength());var r=0;i<this.getLength()?(t=t.concat([""]),r=0):(t=[""].concat(t),i--,r=this.$lines[i].length),this.insertMergedLines({row:i,column:r},t)},n.prototype.insertMergedLines=function(i,t){var r=this.clippedPos(i.row,i.column),o={row:r.row+t.length-1,column:(t.length==1?r.column:0)+t[t.length-1].length};return this.applyDelta({start:r,end:o,action:"insert",lines:t}),this.clonePos(o)},n.prototype.remove=function(i){var t=this.clippedPos(i.start.row,i.start.column),r=this.clippedPos(i.end.row,i.end.column);return this.applyDelta({start:t,end:r,action:"remove",lines:this.getLinesForRange({start:t,end:r})}),this.clonePos(t)},n.prototype.removeInLine=function(i,t,r){var o=this.clippedPos(i,t),c=this.clippedPos(i,r);return this.applyDelta({start:o,end:c,action:"remove",lines:this.getLinesForRange({start:o,end:c})},!0),this.clonePos(o)},n.prototype.removeFullLines=function(i,t){i=Math.min(Math.max(0,i),this.getLength()-1),t=Math.min(Math.max(0,t),this.getLength()-1);var r=t==this.getLength()-1&&i>0,o=t<this.getLength()-1,c=r?i-1:i,d=r?this.getLine(c).length:0,$=o?t+1:t,S=o?0:this.getLine($).length,y=new s(c,d,$,S),m=this.$lines.slice(i,t+1);return this.applyDelta({start:y.start,end:y.end,action:"remove",lines:this.getLinesForRange(y)}),m},n.prototype.removeNewLine=function(i){i<this.getLength()-1&&i>=0&&this.applyDelta({start:this.pos(i,this.getLine(i).length),end:this.pos(i+1,0),action:"remove",lines:["",""]})},n.prototype.replace=function(i,t){if(i instanceof s||(i=s.fromPoints(i.start,i.end)),t.length===0&&i.isEmpty())return i.start;if(t==this.getTextRange(i))return i.end;this.remove(i);var r;return t?r=this.insert(i.start,t):r=i.start,r},n.prototype.applyDeltas=function(i){for(var t=0;t<i.length;t++)this.applyDelta(i[t])},n.prototype.revertDeltas=function(i){for(var t=i.length-1;t>=0;t--)this.revertDelta(i[t])},n.prototype.applyDelta=function(i,t){var r=i.action=="insert";(r?i.lines.length<=1&&!i.lines[0]:!s.comparePoints(i.start,i.end))||(r&&i.lines.length>2e4?this.$splitAndapplyLargeDelta(i,2e4):(k(this.$lines,i,t),this._signal("change",i)))},n.prototype.$safeApplyDelta=function(i){var t=this.$lines.length;(i.action=="remove"&&i.start.row<t&&i.end.row<t||i.action=="insert"&&i.start.row<=t)&&this.applyDelta(i)},n.prototype.$splitAndapplyLargeDelta=function(i,t){for(var r=i.lines,o=r.length-t+1,c=i.start.row,d=i.start.column,$=0,S=0;$<o;$=S){S+=t-1;var y=r.slice($,S);y.push(""),this.applyDelta({start:this.pos(c+$,d),end:this.pos(c+S,d=0),action:i.action,lines:y},!0)}i.lines=r.slice($),i.start.row=c+$,i.start.column=d,this.applyDelta(i,!0)},n.prototype.revertDelta=function(i){this.$safeApplyDelta({start:this.clonePos(i.start),end:this.clonePos(i.end),action:i.action=="insert"?"remove":"insert",lines:i.lines.slice()})},n.prototype.indexToPosition=function(i,t){for(var r=this.$lines||this.getAllLines(),o=this.getNewLineCharacter().length,c=t||0,d=r.length;c<d;c++)if(i-=r[c].length+o,i<0)return{row:c,column:i+r[c].length+o};return{row:d-1,column:i+r[d-1].length+o}},n.prototype.positionToIndex=function(i,t){for(var r=this.$lines||this.getAllLines(),o=this.getNewLineCharacter().length,c=0,d=Math.min(i.row,r.length),$=t||0;$<d;++$)c+=r[$].length+o;return c+i.column},n}();e.prototype.$split="aaa".split(/a/).length===0?function(n){return n.replace(/\r\n|\r/g,`
`).split(`
`)}:function(n){return n.split(/\r\n|\r|\n/)},e.prototype.$autoNewLine="",e.prototype.$newLineMode="auto",R.implement(e.prototype,C),x.Document=e}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(E,x,P){"use strict";var R=E("./lib/oop"),k=E("./lib/event_emitter").EventEmitter,C=function(){function s(l,e){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=l;var n=this;this.$worker=function(){if(!!n.running){for(var i=new Date,t=n.currentLine,r=-1,o=n.doc,c=t;n.lines[t];)t++;var d=o.getLength(),$=0;for(n.running=!1;t<d;){n.$tokenizeRow(t),r=t;do t++;while(n.lines[t]);if($++,$%5==0&&new Date-i>20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,r==-1&&(r=t),c<=r&&n.fireUpdateEvent(c,r)}}}return s.prototype.setTokenizer=function(l){this.tokenizer=l,this.lines=[],this.states=[],this.start(0)},s.prototype.setDocument=function(l){this.doc=l,this.lines=[],this.states=[],this.stop()},s.prototype.fireUpdateEvent=function(l,e){var n={first:l,last:e};this._signal("update",{data:n})},s.prototype.start=function(l){this.currentLine=Math.min(l||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)},s.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},s.prototype.$updateOnChange=function(l){var e=l.start.row,n=l.end.row-e;if(n===0)this.lines[e]=null;else if(l.action=="remove")this.lines.splice(e,n+1,null),this.states.splice(e,n+1,null);else{var i=Array(n+1);i.unshift(e,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(e,this.currentLine,this.doc.getLength()),this.stop()},s.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},s.prototype.getTokens=function(l){return this.lines[l]||this.$tokenizeRow(l)},s.prototype.getState=function(l){return this.currentLine==l&&this.$tokenizeRow(l),this.states[l]||"start"},s.prototype.$tokenizeRow=function(l){var e=this.doc.getLine(l),n=this.states[l-1],i=this.tokenizer.getLineTokens(e,n,l);return this.states[l]+""!=i.state+""?(this.states[l]=i.state,this.lines[l+1]=null,this.currentLine>l+1&&(this.currentLine=l+1)):this.currentLine==l&&(this.currentLine=l+1),this.lines[l]=i.tokens},s.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},s}();R.implement(C.prototype,k),x.BackgroundTokenizer=C}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(E,x,P){"use strict";var R=E("./lib/lang"),k=E("./range").Range,C=function(){function s(l,e,n){n===void 0&&(n="text"),this.setRegexp(l),this.clazz=e,this.type=n}return s.prototype.setRegexp=function(l){this.regExp+""!=l+""&&(this.regExp=l,this.cache=[])},s.prototype.update=function(l,e,n,i){if(!!this.regExp)for(var t=i.firstRow,r=i.lastRow,o={},c=t;c<=r;c++){var d=this.cache[c];d==null&&(d=R.getMatchOffsets(n.getLine(c),this.regExp),d.length>this.MAX_RANGES&&(d=d.slice(0,this.MAX_RANGES)),d=d.map(function(m){return new k(c,m.offset,c,m.offset+m.length)}),this.cache[c]=d.length?d:"");for(var $=d.length;$--;){var S=d[$].toScreenRange(n),y=S.toString();o[y]||(o[y]=!0,e.drawSingleLineMarker(l,S,this.clazz,i))}}},s}();C.prototype.MAX_RANGES=500,x.SearchHighlight=C}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(E,x,P){"use strict";var R=E("../range").Range,k=function(){function C(s,l){this.foldData=s,Array.isArray(l)?this.folds=l:l=this.folds=[l];var e=l[l.length-1];this.range=new R(l[0].start.row,l[0].start.column,e.end.row,e.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(n){n.setFoldLine(this)},this)}return C.prototype.shiftRow=function(s){this.start.row+=s,this.end.row+=s,this.folds.forEach(function(l){l.start.row+=s,l.end.row+=s})},C.prototype.addFold=function(s){if(s.sameRow){if(s.start.row<this.startRow||s.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(s),this.folds.sort(function(l,e){return-l.range.compareEnd(e.start.row,e.start.column)}),this.range.compareEnd(s.start.row,s.start.column)>0?(this.end.row=s.end.row,this.end.column=s.end.column):this.range.compareStart(s.end.row,s.end.column)<0&&(this.start.row=s.start.row,this.start.column=s.start.column)}else if(s.start.row==this.end.row)this.folds.push(s),this.end.row=s.end.row,this.end.column=s.end.column;else if(s.end.row==this.start.row)this.folds.unshift(s),this.start.row=s.start.row,this.start.column=s.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");s.foldLine=this},C.prototype.containsRow=function(s){return s>=this.start.row&&s<=this.end.row},C.prototype.walk=function(s,l,e){var n=0,i=this.folds,t,r,o,c=!0;l==null&&(l=this.end.row,e=this.end.column);for(var d=0;d<i.length;d++){if(t=i[d],r=t.range.compareStart(l,e),r==-1){s(null,l,e,n,c);return}if(o=s(null,t.start.row,t.start.column,n,c),o=!o&&s(t.placeholder,t.start.row,t.start.column,n),o||r===0)return;c=!t.sameRow,n=t.end.column}s(null,l,e,n,c)},C.prototype.getNextFoldTo=function(s,l){for(var e,n,i=0;i<this.folds.length;i++){if(e=this.folds[i],n=e.range.compareEnd(s,l),n==-1)return{fold:e,kind:"after"};if(n===0)return{fold:e,kind:"inside"}}return null},C.prototype.addRemoveChars=function(s,l,e){var n=this.getNextFoldTo(s,l),i,t;if(n){if(i=n.fold,n.kind=="inside"&&i.start.column!=l&&i.start.row!=s)window.console&&window.console.log(s,l,i);else if(i.start.row==s){t=this.folds;var r=t.indexOf(i);for(r===0&&(this.start.column+=e),r;r<t.length;r++){if(i=t[r],i.start.column+=e,!i.sameRow)return;i.end.column+=e}this.end.column+=e}}},C.prototype.split=function(s,l){var e=this.getNextFoldTo(s,l);if(!e||e.kind=="inside")return null;var n=e.fold,i=this.folds,t=this.foldData,r=i.indexOf(n),o=i[r-1];this.end.row=o.end.row,this.end.column=o.end.column,i=i.splice(r,i.length-r);var c=new C(t,i);return t.splice(t.indexOf(this)+1,0,c),c},C.prototype.merge=function(s){for(var l=s.folds,e=0;e<l.length;e++)this.addFold(l[e]);var n=this.foldData;n.splice(n.indexOf(s),1)},C.prototype.toString=function(){var s=[this.range.toString()+": ["];return this.folds.forEach(function(l){s.push(" "+l.toString())}),s.push("]"),s.join(`
`)},C.prototype.idxToPosition=function(s){for(var l=0,e=0;e<this.folds.length;e++){var n=this.folds[e];if(s-=n.start.column-l,s<0)return{row:n.start.row,column:n.start.column+s};if(s-=n.placeholder.length,s<0)return n.start;l=n.end.column}return{row:this.end.row,column:this.end.column+s}},C}();x.FoldLine=k}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(E,x,P){"use strict";var R=E("./range").Range,k=R.comparePoints,C=function(){function s(){this.ranges=[],this.$bias=1}return s.prototype.pointIndex=function(l,e,n){for(var i=this.ranges,t=n||0;t<i.length;t++){var r=i[t],o=k(l,r.end);if(!(o>0)){var c=k(l,r.start);return o===0?e&&c!==0?-t-2:t:c>0||c===0&&!e?t:-t-1}}return-t-1},s.prototype.add=function(l){var e=!l.isEmpty(),n=this.pointIndex(l.start,e);n<0&&(n=-n-1);var i=this.pointIndex(l.end,e,n);return i<0?i=-i-1:i++,this.ranges.splice(n,i-n,l)},s.prototype.addList=function(l){for(var e=[],n=l.length;n--;)e.push.apply(e,this.add(l[n]));return e},s.prototype.substractPoint=function(l){var e=this.pointIndex(l);if(e>=0)return this.ranges.splice(e,1)},s.prototype.merge=function(){var l=[],e=this.ranges;e=e.sort(function(o,c){return k(o.start,c.start)});for(var n=e[0],i,t=1;t<e.length;t++){i=n,n=e[t];var r=k(i.end,n.start);r<0||r==0&&!i.isEmpty()&&!n.isEmpty()||(k(i.end,n.end)<0&&(i.end.row=n.end.row,i.end.column=n.end.column),e.splice(t,1),l.push(n),n=i,t--)}return this.ranges=e,l},s.prototype.contains=function(l,e){return this.pointIndex({row:l,column:e})>=0},s.prototype.containsPoint=function(l){return this.pointIndex(l)>=0},s.prototype.rangeAtPoint=function(l){var e=this.pointIndex(l);if(e>=0)return this.ranges[e]},s.prototype.clipRows=function(l,e){var n=this.ranges;if(n[0].start.row>e||n[n.length-1].start.row<l)return[];var i=this.pointIndex({row:l,column:0});i<0&&(i=-i-1);var t=this.pointIndex({row:e,column:0},i);t<0&&(t=-t-1);for(var r=[],o=i;o<t;o++)r.push(n[o]);return r},s.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},s.prototype.attach=function(l){this.session&&this.detach(),this.session=l,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},s.prototype.detach=function(){!this.session||(this.session.removeListener("change",this.onChange),this.session=null)},s.prototype.$onChange=function(l){for(var e=l.start,n=l.end,i=e.row,t=n.row,r=this.ranges,o=0,c=r.length;o<c;o++){var d=r[o];if(d.end.row>=i)break}if(l.action=="insert")for(var $=t-i,S=-e.column+n.column;o<c;o++){var d=r[o];if(d.start.row>i)break;if(d.start.row==i&&d.start.column>=e.column&&(d.start.column==e.column&&this.$bias<=0||(d.start.column+=S,d.start.row+=$)),d.end.row==i&&d.end.column>=e.column){if(d.end.column==e.column&&this.$bias<0)continue;d.end.column==e.column&&S>0&&o<c-1&&d.end.column>d.start.column&&d.end.column==r[o+1].start.column&&(d.end.column-=S),d.end.column+=S,d.end.row+=$}}else for(var $=i-t,S=e.column-n.column;o<c;o++){var d=r[o];if(d.start.row>t)break;d.end.row<t&&(i<d.end.row||i==d.end.row&&e.column<d.end.column)?(d.end.row=i,d.end.column=e.column):d.end.row==t?d.end.column<=n.column?($||d.end.column>e.column)&&(d.end.column=e.column,d.end.row=e.row):(d.end.column+=S,d.end.row+=$):d.end.row>t&&(d.end.row+=$),d.start.row<t&&(i<d.start.row||i==d.start.row&&e.column<d.start.column)?(d.start.row=i,d.start.column=e.column):d.start.row==t?d.start.column<=n.column?($||d.start.column>e.column)&&(d.start.column=e.column,d.start.row=e.row):(d.start.column+=S,d.start.row+=$):d.start.row>t&&(d.start.row+=$)}if($!=0&&o<c)for(;o<c;o++){var d=r[o];d.start.row+=$,d.end.row+=$}},s}();C.prototype.comparePoints=k,x.RangeList=C}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(E,x,P){"use strict";var R=this&&this.__extends||function(){var i=function(t,r){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,c){o.__proto__=c}||function(o,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(o[d]=c[d])},i(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");i(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),k=E("../range_list").RangeList,C=function(i){R(t,i);function t(r,o){var c=i.call(this)||this;return c.foldLine=null,c.placeholder=o,c.range=r,c.start=r.start,c.end=r.end,c.sameRow=r.start.row==r.end.row,c.subFolds=c.ranges=[],c}return t.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},t.prototype.setFoldLine=function(r){this.foldLine=r,this.subFolds.forEach(function(o){o.setFoldLine(r)})},t.prototype.clone=function(){var r=this.range.clone(),o=new t(r,this.placeholder);return this.subFolds.forEach(function(c){o.subFolds.push(c.clone())}),o.collapseChildren=this.collapseChildren,o},t.prototype.addSubFold=function(r){if(!this.range.isEqual(r)){l(r,this.start);for(var o=r.start.row,c=r.start.column,d=0,$=-1;d<this.subFolds.length&&($=this.subFolds[d].range.compare(o,c),$==1);d++);var S=this.subFolds[d],y=0;if($==0){if(S.range.containsRange(r))return S.addSubFold(r);y=1}for(var o=r.range.end.row,c=r.range.end.column,m=d,$=-1;m<this.subFolds.length&&($=this.subFolds[m].range.compare(o,c),$==1);m++);$==0&&m++;for(var b=this.subFolds.splice(d,m-d,r),p=$==0?b.length-1:b.length,w=y;w<p;w++)r.addSubFold(b[w]);return r.setFoldLine(this.foldLine),r}},t.prototype.restoreRange=function(r){return n(r,this.start)},t}(k);function s(i,t){i.row-=t.row,i.row==0&&(i.column-=t.column)}function l(i,t){s(i.start,t),s(i.end,t)}function e(i,t){i.row==0&&(i.column+=t.column),i.row+=t.row}function n(i,t){e(i.start,t),e(i.end,t)}x.Fold=C}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],function(E,x,P){"use strict";var R=E("../range").Range,k=E("./fold_line").FoldLine,C=E("./fold").Fold,s=E("../token_iterator").TokenIterator;function l(){this.getFoldAt=function(e,n,i){var t=this.getFoldLine(e);if(!t)return null;for(var r=t.folds,o=0;o<r.length;o++){var c=r[o].range;if(c.contains(e,n)){if(i==1&&c.isEnd(e,n)&&!c.isEmpty())continue;if(i==-1&&c.isStart(e,n)&&!c.isEmpty())continue;return r[o]}}},this.getFoldsInRange=function(e){var n=e.start,i=e.end,t=this.$foldData,r=[];n.column+=1,i.column-=1;for(var o=0;o<t.length;o++){var c=t[o].range.compareRange(e);if(c!=2){if(c==-2)break;for(var d=t[o].folds,$=0;$<d.length;$++){var S=d[$];if(c=S.range.compareRange(e),c==-2)break;if(c==2)continue;if(c==42)break;r.push(S)}}}return n.column-=1,i.column+=1,r},this.getFoldsInRangeList=function(e){if(Array.isArray(e)){var n=[];e.forEach(function(i){n=n.concat(this.getFoldsInRange(i))},this)}else var n=this.getFoldsInRange(e);return n},this.getAllFolds=function(){for(var e=[],n=this.$foldData,i=0;i<n.length;i++)for(var t=0;t<n[i].folds.length;t++)e.push(n[i].folds[t]);return e},this.getFoldStringAt=function(e,n,i,t){if(t=t||this.getFoldLine(e),!t)return null;for(var r={end:{column:0}},o,c,d=0;d<t.folds.length;d++){c=t.folds[d];var $=c.range.compareEnd(e,n);if($==-1){o=this.getLine(c.start.row).substring(r.end.column,c.start.column);break}else if($===0)return null;r=c}return o||(o=this.getLine(c.start.row).substring(r.end.column)),i==-1?o.substring(0,n-r.end.column):i==1?o.substring(n-r.end.column):o},this.getFoldLine=function(e,n){var i=this.$foldData,t=0;for(n&&(t=i.indexOf(n)),t==-1&&(t=0),t;t<i.length;t++){var r=i[t];if(r.start.row<=e&&r.end.row>=e)return r;if(r.end.row>e)return null}return null},this.getNextFoldLine=function(e,n){var i=this.$foldData,t=0;for(n&&(t=i.indexOf(n)),t==-1&&(t=0),t;t<i.length;t++){var r=i[t];if(r.end.row>=e)return r}return null},this.getFoldedRowCount=function(e,n){for(var i=this.$foldData,t=n-e+1,r=0;r<i.length;r++){var o=i[r],c=o.end.row,d=o.start.row;if(c>=n){d<n&&(d>=e?t-=n-d:t=0);break}else c>=e&&(d>=e?t-=c-d:t-=c-e+1)}return t},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort(function(n,i){return n.start.row-i.start.row}),e},this.addFold=function(e,n){var i=this.$foldData,t=!1,r;e instanceof C?r=e:(r=new C(n,e),r.collapseChildren=n.collapseChildren),this.$clipRangeToDocument(r.range);var o=r.start.row,c=r.start.column,d=r.end.row,$=r.end.column,S=this.getFoldAt(o,c,1),y=this.getFoldAt(d,$,-1);if(S&&y==S)return S.addSubFold(r);S&&!S.range.isStart(o,c)&&this.removeFold(S),y&&!y.range.isEnd(d,$)&&this.removeFold(y);var m=this.getFoldsInRange(r.range);m.length>0&&(this.removeFolds(m),r.collapseChildren||m.forEach(function(v){r.addSubFold(v)}));for(var b=0;b<i.length;b++){var p=i[b];if(d==p.start.row){p.addFold(r),t=!0;break}else if(o==p.end.row){if(p.addFold(r),t=!0,!r.sameRow){var w=i[b+1];if(w&&w.start.row==d){p.merge(w);break}}break}else if(d<=p.start.row)break}return t||(p=this.$addFoldLine(new k(this.$foldData,r))),this.$useWrapMode?this.$updateWrapData(p.start.row,p.start.row):this.$updateRowLengthCache(p.start.row,p.start.row),this.$modified=!0,this._signal("changeFold",{data:r,action:"add"}),r},this.addFolds=function(e){e.forEach(function(n){this.addFold(n)},this)},this.removeFold=function(e){var n=e.foldLine,i=n.start.row,t=n.end.row,r=this.$foldData,o=n.folds;if(o.length==1)r.splice(r.indexOf(n),1);else if(n.range.isEnd(e.end.row,e.end.column))o.pop(),n.end.row=o[o.length-1].end.row,n.end.column=o[o.length-1].end.column;else if(n.range.isStart(e.start.row,e.start.column))o.shift(),n.start.row=o[0].start.row,n.start.column=o[0].start.column;else if(e.sameRow)o.splice(o.indexOf(e),1);else{var c=n.split(e.start.row,e.start.column);o=c.folds,o.shift(),c.start.row=o[0].start.row,c.start.column=o[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(i,t):this.$updateRowLengthCache(i,t)),this.$modified=!0,this._signal("changeFold",{data:e,action:"remove"})},this.removeFolds=function(e){for(var n=[],i=0;i<e.length;i++)n.push(e[i]);n.forEach(function(t){this.removeFold(t)},this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach(function(n){e.restoreRange(n),this.addFold(n)},this),e.collapseChildren>0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach(function(n){this.expandFold(n)},this)},this.unfold=function(e,n){var i,t;if(e==null)i=new R(0,0,this.getLength(),0),n==null&&(n=!0);else if(typeof e=="number")i=new R(e,0,e,this.getLine(e).length);else if("row"in e)i=R.fromPoints(e,e);else{if(Array.isArray(e))return t=[],e.forEach(function(o){t=t.concat(this.unfold(o))},this),t;i=e}t=this.getFoldsInRangeList(i);for(var r=t;t.length==1&&R.comparePoints(t[0].start,i.start)<0&&R.comparePoints(t[0].end,i.end)>0;)this.expandFolds(t),t=this.getFoldsInRangeList(i);if(n!=!1?this.removeFolds(t):this.expandFolds(t),r.length)return r},this.isRowFolded=function(e,n){return!!this.getFoldLine(e,n)},this.getRowFoldEnd=function(e,n){var i=this.getFoldLine(e,n);return i?i.end.row:e},this.getRowFoldStart=function(e,n){var i=this.getFoldLine(e,n);return i?i.start.row:e},this.getFoldDisplayLine=function(e,n,i,t,r){t==null&&(t=e.start.row),r==null&&(r=0),n==null&&(n=e.end.row),i==null&&(i=this.getLine(n).length);var o=this.doc,c="";return e.walk(function(d,$,S,y){if(!($<t)){if($==t){if(S<r)return;y=Math.max(r,y)}d!=null?c+=d:c+=o.getLine($).substring(y,S)}},n,i),c},this.getDisplayLine=function(e,n,i,t){var r=this.getFoldLine(e);if(r)return this.getFoldDisplayLine(r,e,n,i,t);var o;return o=this.doc.getLine(e),o.substring(t||0,n||o.length)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map(function(n){var i=n.folds.map(function(t){return t.clone()});return new k(e,i)}),e},this.toggleFold=function(e){var n=this.selection,i=n.getRange(),t,r;if(i.isEmpty()){var o=i.start;if(t=this.getFoldAt(o.row,o.column),t){this.expandFold(t);return}else(r=this.findMatchingBracket(o))?i.comparePoint(r)==1?i.end=r:(i.start=r,i.start.column++,i.end.column--):(r=this.findMatchingBracket({row:o.row,column:o.column+1}))?(i.comparePoint(r)==1?i.end=r:i.start=r,i.start.column++):i=this.getCommentFoldRange(o.row,o.column)||i}else{var c=this.getFoldsInRange(i);if(e&&c.length){this.expandFolds(c);return}else c.length==1&&(t=c[0])}if(t||(t=this.getFoldAt(i.start.row,i.start.column)),t&&t.range.toString()==i.toString()){this.expandFold(t);return}var d="...";if(!i.isMultiLine()){if(d=this.getTextRange(i),d.length<4)return;d=d.trim().substring(0,2)+".."}this.addFold(d,i)},this.getCommentFoldRange=function(e,n,i){var t=new s(this,e,n),r=t.getCurrentToken(),o=r&&r.type;if(r&&/^comment|string/.test(o)){o=o.match(/comment|string/)[0],o=="comment"&&(o+="|doc-start");var c=new RegExp(o),d=new R;if(i!=1){do r=t.stepBackward();while(r&&c.test(r.type)&&!/^comment.end/.test(r.type));r=t.stepForward()}if(d.start.row=t.getCurrentTokenRow(),d.start.column=t.getCurrentTokenColumn()+(/^comment.start/.test(r.type)?r.value.length:2),t=new s(this,e,n),i!=-1){var $=-1;do if(r=t.stepForward(),$==-1){var S=this.getState(t.$row);c.test(S)||($=t.$row)}else if(t.$row>$)break;while(r&&c.test(r.type)&&!/^comment.start/.test(r.type));r=t.stepBackward()}else r=t.getCurrentToken();return d.end.row=t.getCurrentTokenRow(),d.end.column=t.getCurrentTokenColumn(),/^comment.end/.test(r.type)||(d.end.column+=r.value.length-2),d}},this.foldAll=function(e,n,i,t){i==null&&(i=1e5);var r=this.foldWidgets;if(!!r){n=n||this.getLength(),e=e||0;for(var o=e;o<n;o++)if(r[o]==null&&(r[o]=this.getFoldWidget(o)),r[o]=="start"&&!(t&&!t(o))){var c=this.getFoldWidgetRange(o);c&&c.isMultiLine()&&c.end.row<=n&&c.start.row>=e&&(o=c.end.row,c.collapseChildren=i,this.addFold("...",c))}}},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(n){for(var i=e.getTokens(n),t=0;t<i.length;t++){var r=i[t];if(!(r.type=="text"&&/^\s+$/.test(r.value)))return!!/comment/.test(r.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,e=="manual"&&this.unfold();var n=this.$foldMode;this.$setFolding(null),this.$setFolding(n)}},this.$setFolding=function(e){if(this.$foldMode!=e){if(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!e||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(e,n){var i=this.foldWidgets;if(!i||n&&i[e])return{};for(var t=e-1,r;t>=0;){var o=i[t];if(o==null&&(o=i[t]=this.getFoldWidget(t)),o=="start"){var c=this.getFoldWidgetRange(t);if(r||(r=c),c&&c.end.row>=e)break}t--}return{range:t!==-1&&c,firstRange:r}},this.onFoldWidgetClick=function(e,n){n=n.domEvent;var i={children:n.shiftKey,all:n.ctrlKey||n.metaKey,siblings:n.altKey},t=this.$toggleFoldWidget(e,i);if(!t){var r=n.target||n.srcElement;r&&/ace_fold-widget/.test(r.className)&&(r.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,n){if(!!this.getFoldWidget){var i=this.getFoldWidget(e),t=this.getLine(e),r=i==="end"?-1:1,o=this.getFoldAt(e,r===-1?0:t.length,r);if(o)return n.children||n.all?this.removeFold(o):this.expandFold(o),o;var c=this.getFoldWidgetRange(e,!0);if(c&&!c.isMultiLine()&&(o=this.getFoldAt(c.start.row,c.start.column,1),o&&c.isEqual(o.range)))return this.removeFold(o),o;if(n.siblings){var d=this.getParentFoldRangeData(e);if(d.range)var $=d.range.start.row+1,S=d.range.end.row;this.foldAll($,S,n.all?1e4:0)}else n.children?(S=c?c.end.row:this.getLength(),this.foldAll(e+1,S,n.all?1e4:0)):c&&(n.all&&(c.collapseChildren=1e4),this.addFold("...",c));return c}},this.toggleFoldWidget=function(e){var n=this.selection.getCursor().row;n=this.getRowFoldStart(n);var i=this.$toggleFoldWidget(n,{});if(!i){var t=this.getParentFoldRangeData(n,!0);if(i=t.range||t.firstRange,i){n=i.start.row;var r=this.getFoldAt(n,this.getLine(n).length,1);r?this.removeFold(r):this.addFold("...",i)}}},this.updateFoldWidgets=function(e){var n=e.start.row,i=e.end.row-n;if(i===0)this.foldWidgets[n]=null;else if(e.action=="remove")this.foldWidgets.splice(n,i+1,null);else{var t=Array(i+1);t.unshift(n,1),this.foldWidgets.splice.apply(this.foldWidgets,t)}},this.tokenizerUpdateFoldWidgets=function(e){var n=e.data;n.first!=n.last&&this.foldWidgets.length>n.first&&this.foldWidgets.splice(n.first,this.foldWidgets.length)}}x.Folding=l}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(E,x,P){"use strict";var R=E("../token_iterator").TokenIterator,k=E("../range").Range;function C(){this.findMatchingBracket=function(s,l){if(s.column==0)return null;var e=l||this.getLine(s.row).charAt(s.column-1);if(e=="")return null;var n=e.match(/([\(\[\{])|([\)\]\}])/);return n?n[1]?this.$findClosingBracket(n[1],s):this.$findOpeningBracket(n[2],s):null},this.getBracketRange=function(s){var l=this.getLine(s.row),e=!0,n,i=l.charAt(s.column-1),t=i&&i.match(/([\(\[\{])|([\)\]\}])/);if(t||(i=l.charAt(s.column),s={row:s.row,column:s.column+1},t=i&&i.match(/([\(\[\{])|([\)\]\}])/),e=!1),!t)return null;if(t[1]){var r=this.$findClosingBracket(t[1],s);if(!r)return null;n=k.fromPoints(s,r),e||(n.end.column++,n.start.column--),n.cursor=n.end}else{var r=this.$findOpeningBracket(t[2],s);if(!r)return null;n=k.fromPoints(r,s),e||(n.start.column++,n.end.column--),n.cursor=n.start}return n},this.getMatchingBracketRanges=function(s,l){var e=this.getLine(s.row),n=/([\(\[\{])|([\)\]\}])/,i=!l&&e.charAt(s.column-1),t=i&&i.match(n);if(t||(i=(l===void 0||l)&&e.charAt(s.column),s={row:s.row,column:s.column+1},t=i&&i.match(n)),!t)return null;var r=new k(s.row,s.column-1,s.row,s.column),o=t[1]?this.$findClosingBracket(t[1],s):this.$findOpeningBracket(t[2],s);if(!o)return[r];var c=new k(o.row,o.column,o.row,o.column+1);return[r,c]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(s,l,e){var n=this.$brackets[s],i=1,t=new R(this,l.row,l.column),r=t.getCurrentToken();if(r||(r=t.stepForward()),!!r){e||(e=new RegExp("(\\.?"+r.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var o=l.column-t.getCurrentTokenColumn()-2,c=r.value;;){for(;o>=0;){var d=c.charAt(o);if(d==n){if(i-=1,i==0)return{row:t.getCurrentTokenRow(),column:o+t.getCurrentTokenColumn()}}else d==s&&(i+=1);o-=1}do r=t.stepBackward();while(r&&!e.test(r.type));if(r==null)break;c=r.value,o=c.length-1}return null}},this.$findClosingBracket=function(s,l,e){var n=this.$brackets[s],i=1,t=new R(this,l.row,l.column),r=t.getCurrentToken();if(r||(r=t.stepForward()),!!r){e||(e=new RegExp("(\\.?"+r.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var o=l.column-t.getCurrentTokenColumn();;){for(var c=r.value,d=c.length;o<d;){var $=c.charAt(o);if($==n){if(i-=1,i==0)return{row:t.getCurrentTokenRow(),column:o+t.getCurrentTokenColumn()}}else $==s&&(i+=1);o+=1}do r=t.stepForward();while(r&&!e.test(r.type));if(r==null)break;o=0}return null}},this.getMatchingTags=function(s){var l=new R(this,s.row,s.column),e=this.$findTagName(l);if(!!e){var n=l.stepBackward();return n.value==="<"?this.$findClosingTag(l,e):this.$findOpeningTag(l,e)}},this.$findTagName=function(s){var l=s.getCurrentToken(),e=!1,n=!1;if(l&&l.type.indexOf("tag-name")===-1)do n?l=s.stepBackward():l=s.stepForward(),l&&(l.value==="/>"?n=!0:l.type.indexOf("tag-name")!==-1&&(e=!0));while(l&&!e);return l},this.$findClosingTag=function(s,l){var e,n=l.value,i=l.value,t=0,r=new k(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);l=s.stepForward();var o=new k(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+l.value.length),c=!1;do if(e=l,l=s.stepForward(),l){if(l.value===">"&&!c){var d=new k(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);c=!0}if(l.type.indexOf("tag-name")!==-1){if(n=l.value,i===n){if(e.value==="<")t++;else if(e.value==="</"&&(t--,t<0)){s.stepBackward();var $=new k(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+2);l=s.stepForward();var S=new k(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+l.value.length);if(l=s.stepForward(),l&&l.value===">")var y=new k(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);else return}}}else if(i===n&&l.value==="/>"&&(t--,t<0))var $=new k(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+2),S=$,y=S,d=new k(o.end.row,o.end.column,o.end.row,o.end.column+1)}while(l&&t>=0);if(r&&d&&$&&y&&o&&S)return{openTag:new k(r.start.row,r.start.column,d.end.row,d.end.column),closeTag:new k($.start.row,$.start.column,y.end.row,y.end.column),openTagName:o,closeTagName:S}},this.$findOpeningTag=function(s,l){var e=s.getCurrentToken(),n=l.value,i=0,t=s.getCurrentTokenRow(),r=s.getCurrentTokenColumn(),o=r+2,c=new k(t,r,t,o);s.stepForward();var d=new k(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+l.value.length);if(l=s.stepForward(),!(!l||l.value!==">")){var $=new k(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);s.stepBackward(),s.stepBackward();do if(l=e,t=s.getCurrentTokenRow(),r=s.getCurrentTokenColumn(),o=r+l.value.length,e=s.stepBackward(),l){if(l.type.indexOf("tag-name")!==-1){if(n===l.value)if(e.value==="<"){if(i++,i>0){var S=new k(t,r,t,o),y=new k(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);do l=s.stepForward();while(l&&l.value!==">");var m=new k(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1)}}else e.value==="</"&&i--}else if(l.value==="/>"){for(var b=0,p=e;p;){if(p.type.indexOf("tag-name")!==-1&&p.value===n){i--;break}else if(p.value==="<")break;p=s.stepBackward(),b++}for(var w=0;w<b;w++)s.stepForward()}}while(e&&i<=0);if(y&&m&&c&&$&&S&&d)return{openTag:new k(y.start.row,y.start.column,m.end.row,m.end.column),closeTag:new k(c.start.row,c.start.column,$.end.row,$.end.column),openTagName:S,closeTagName:d}}}}x.BracketMatch=C}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(E,x,P){"use strict";var R=E("./lib/oop"),k=E("./lib/lang"),C=E("./bidihandler").BidiHandler,s=E("./config"),l=E("./lib/event_emitter").EventEmitter,e=E("./selection").Selection,n=E("./mode/text").Mode,i=E("./range").Range,t=E("./document").Document,r=E("./background_tokenizer").BackgroundTokenizer,o=E("./search_highlight").SearchHighlight,c=function(){function f(a,h){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++f.$uid,this.$foldData.toString=function(){return this.join(`
`)},this.bgTokenizer=new r(new n().getTokenizer(),this);var u=this;this.bgTokenizer.on("update",function(g){u._signal("tokenizerUpdate",g)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof a!="object"||!a.getLine)&&(a=new t(a)),this.setDocument(a),this.selection=new e(this),this.$bidiHandler=new C(this),s.resetOptions(this),this.setMode(h),s._signal("session",this),this.destroyed=!1}return f.prototype.setDocument=function(a){this.doc&&this.doc.off("change",this.$onChange),this.doc=a,a.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},f.prototype.getDocument=function(){return this.doc},f.prototype.$resetRowCache=function(a){if(!a){this.$docRowCache=[],this.$screenRowCache=[];return}var h=this.$docRowCache.length,u=this.$getRowCacheIndex(this.$docRowCache,a)+1;h>u&&(this.$docRowCache.splice(u,h),this.$screenRowCache.splice(u,h))},f.prototype.$getRowCacheIndex=function(a,h){for(var u=0,g=a.length-1;u<=g;){var A=u+g>>1,L=a[A];if(h>L)u=A+1;else if(h<L)g=A-1;else return A}return u-1},f.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},f.prototype.onChangeFold=function(a){var h=a.data;this.$resetRowCache(h.start.row)},f.prototype.onChange=function(a){this.$modified=!0,this.$bidiHandler.onChange(a),this.$resetRowCache(a.start.row);var h=this.$updateInternalDataOnChange(a);!this.$fromUndo&&this.$undoManager&&(h&&h.length&&(this.$undoManager.add({action:"removeFolds",folds:h},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(a,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(a),this._signal("change",a)},f.prototype.setValue=function(a){this.doc.setValue(a),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},f.prototype.toString=function(){return this.doc.getValue()},f.prototype.getSelection=function(){return this.selection},f.prototype.getState=function(a){return this.bgTokenizer.getState(a)},f.prototype.getTokens=function(a){return this.bgTokenizer.getTokens(a)},f.prototype.getTokenAt=function(a,h){var u=this.bgTokenizer.getTokens(a),g,A=0;if(h==null){var L=u.length-1;A=this.getLine(a).length}else for(var L=0;L<u.length&&(A+=u[L].value.length,!(A>=h));L++);return g=u[L],g?(g.index=L,g.start=A-g.value.length,g):null},f.prototype.setUndoManager=function(a){if(this.$undoManager=a,this.$informUndoManager&&this.$informUndoManager.cancel(),a){var h=this;a.addSession(this),this.$syncInformUndoManager=function(){h.$informUndoManager.cancel(),h.mergeUndoDeltas=!1},this.$informUndoManager=k.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},f.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},f.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},f.prototype.getTabString=function(){return this.getUseSoftTabs()?k.stringRepeat(" ",this.getTabSize()):" "},f.prototype.setUseSoftTabs=function(a){this.setOption("useSoftTabs",a)},f.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},f.prototype.setTabSize=function(a){this.setOption("tabSize",a)},f.prototype.getTabSize=function(){return this.$tabSize},f.prototype.isTabStop=function(a){return this.$useSoftTabs&&a.column%this.$tabSize==0},f.prototype.setNavigateWithinSoftTabs=function(a){this.setOption("navigateWithinSoftTabs",a)},f.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},f.prototype.setOverwrite=function(a){this.setOption("overwrite",a)},f.prototype.getOverwrite=function(){return this.$overwrite},f.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},f.prototype.addGutterDecoration=function(a,h){this.$decorations[a]||(this.$decorations[a]=""),this.$decorations[a]+=" "+h,this._signal("changeBreakpoint",{})},f.prototype.removeGutterDecoration=function(a,h){this.$decorations[a]=(this.$decorations[a]||"").replace(" "+h,""),this._signal("changeBreakpoint",{})},f.prototype.getBreakpoints=function(){return this.$breakpoints},f.prototype.setBreakpoints=function(a){this.$breakpoints=[];for(var h=0;h<a.length;h++)this.$breakpoints[a[h]]="ace_breakpoint";this._signal("changeBreakpoint",{})},f.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},f.prototype.setBreakpoint=function(a,h){h===void 0&&(h="ace_breakpoint"),h?this.$breakpoints[a]=h:delete this.$breakpoints[a],this._signal("changeBreakpoint",{})},f.prototype.clearBreakpoint=function(a){delete this.$breakpoints[a],this._signal("changeBreakpoint",{})},f.prototype.addMarker=function(a,h,u,g){var A=this.$markerId++,L={range:a,type:u||"line",renderer:typeof u=="function"?u:null,clazz:h,inFront:!!g,id:A};return g?(this.$frontMarkers[A]=L,this._signal("changeFrontMarker")):(this.$backMarkers[A]=L,this._signal("changeBackMarker")),A},f.prototype.addDynamicMarker=function(a,h){if(!!a.update){var u=this.$markerId++;return a.id=u,a.inFront=!!h,h?(this.$frontMarkers[u]=a,this._signal("changeFrontMarker")):(this.$backMarkers[u]=a,this._signal("changeBackMarker")),a}},f.prototype.removeMarker=function(a){var h=this.$frontMarkers[a]||this.$backMarkers[a];if(!!h){var u=h.inFront?this.$frontMarkers:this.$backMarkers;delete u[a],this._signal(h.inFront?"changeFrontMarker":"changeBackMarker")}},f.prototype.getMarkers=function(a){return a?this.$frontMarkers:this.$backMarkers},f.prototype.highlight=function(a){if(!this.$searchHighlight){var h=new o(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(h)}this.$searchHighlight.setRegexp(a)},f.prototype.highlightLines=function(a,h,u,g){typeof h!="number"&&(u=h,h=a),u||(u="ace_step");var A=new i(a,0,h,Infinity);return A.id=this.addMarker(A,u,"fullLine",g),A},f.prototype.setAnnotations=function(a){this.$annotations=a,this._signal("changeAnnotation",{})},f.prototype.getAnnotations=function(){return this.$annotations||[]},f.prototype.clearAnnotations=function(){this.setAnnotations([])},f.prototype.$detectNewLine=function(a){var h=a.match(/^.*?(\r?\n)/m);h?this.$autoNewLine=h[1]:this.$autoNewLine=`
`},f.prototype.getWordRange=function(a,h){var u=this.getLine(a),g=!1;if(h>0&&(g=!!u.charAt(h-1).match(this.tokenRe)),g||(g=!!u.charAt(h).match(this.tokenRe)),g)var A=this.tokenRe;else if(/^\s+$/.test(u.slice(h-1,h+1)))var A=/\s/;else var A=this.nonTokenRe;var L=h;if(L>0){do L--;while(L>=0&&u.charAt(L).match(A));L++}for(var M=h;M<u.length&&u.charAt(M).match(A);)M++;return new i(a,L,a,M)},f.prototype.getAWordRange=function(a,h){for(var u=this.getWordRange(a,h),g=this.getLine(u.end.row);g.charAt(u.end.column).match(/[ \t]/);)u.end.column+=1;return u},f.prototype.setNewLineMode=function(a){this.doc.setNewLineMode(a)},f.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},f.prototype.setUseWorker=function(a){this.setOption("useWorker",a)},f.prototype.getUseWorker=function(){return this.$useWorker},f.prototype.onReloadTokenizer=function(a){var h=a.data;this.bgTokenizer.start(h.first),this._signal("tokenizerUpdate",a)},f.prototype.setMode=function(a,h){if(a&&typeof a=="object"){if(a.getTokenizer)return this.$onChangeMode(a);var u=a,g=u.path}else g=a||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new n),this.$modes[g]&&!u){this.$onChangeMode(this.$modes[g]),h&&h();return}this.$modeId=g,s.loadModule(["mode",g],function(A){if(this.$modeId!==g)return h&&h();this.$modes[g]&&!u?this.$onChangeMode(this.$modes[g]):A&&A.Mode&&(A=new A.Mode(u),u||(this.$modes[g]=A,A.$id=g),this.$onChangeMode(A)),h&&h()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},f.prototype.$onChangeMode=function(a,h){if(h||(this.$modeId=a.$id),this.$mode!==a){var u=this.$mode;this.$mode=a,this.$stopWorker(),this.$useWorker&&this.$startWorker();var g=a.getTokenizer();if(g.on!==void 0){var A=this.onReloadTokenizer.bind(this);g.on("update",A)}this.bgTokenizer.setTokenizer(g),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=a.tokenRe,this.nonTokenRe=a.nonTokenRe,h||(a.attachToSession&&a.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(a.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:u,mode:a}))}},f.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},f.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(a){s.warn("Could not load worker",a),this.$worker=null}},f.prototype.getMode=function(){return this.$mode},f.prototype.setScrollTop=function(a){this.$scrollTop===a||isNaN(a)||(this.$scrollTop=a,this._signal("changeScrollTop",a))},f.prototype.getScrollTop=function(){return this.$scrollTop},f.prototype.setScrollLeft=function(a){this.$scrollLeft===a||isNaN(a)||(this.$scrollLeft=a,this._signal("changeScrollLeft",a))},f.prototype.getScrollLeft=function(){return this.$scrollLeft},f.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},f.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var a=0;return this.lineWidgets.forEach(function(h){h&&h.screenWidth>a&&(a=h.screenWidth)}),this.lineWidgetWidth=a},f.prototype.$computeWidth=function(a){if(this.$modified||a){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var h=this.doc.getAllLines(),u=this.$rowLengthCache,g=0,A=0,L=this.$foldData[A],M=L?L.start.row:Infinity,T=h.length,I=0;I<T;I++){if(I>M){if(I=L.end.row+1,I>=T)break;L=this.$foldData[A++],M=L?L.start.row:Infinity}u[I]==null&&(u[I]=this.$getStringScreenWidth(h[I])[0]),u[I]>g&&(g=u[I])}this.screenWidth=g}},f.prototype.getLine=function(a){return this.doc.getLine(a)},f.prototype.getLines=function(a,h){return this.doc.getLines(a,h)},f.prototype.getLength=function(){return this.doc.getLength()},f.prototype.getTextRange=function(a){return this.doc.getTextRange(a||this.selection.getRange())},f.prototype.insert=function(a,h){return this.doc.insert(a,h)},f.prototype.remove=function(a){return this.doc.remove(a)},f.prototype.removeFullLines=function(a,h){return this.doc.removeFullLines(a,h)},f.prototype.undoChanges=function(a,h){if(!!a.length){this.$fromUndo=!0;for(var u=a.length-1;u!=-1;u--){var g=a[u];g.action=="insert"||g.action=="remove"?this.doc.revertDelta(g):g.folds&&this.addFolds(g.folds)}!h&&this.$undoSelect&&(a.selectionBefore?this.selection.fromJSON(a.selectionBefore):this.selection.setRange(this.$getUndoSelection(a,!0))),this.$fromUndo=!1}},f.prototype.redoChanges=function(a,h){if(!!a.length){this.$fromUndo=!0;for(var u=0;u<a.length;u++){var g=a[u];(g.action=="insert"||g.action=="remove")&&this.doc.$safeApplyDelta(g)}!h&&this.$undoSelect&&(a.selectionAfter?this.selection.fromJSON(a.selectionAfter):this.selection.setRange(this.$getUndoSelection(a,!1))),this.$fromUndo=!1}},f.prototype.setUndoSelect=function(a){this.$undoSelect=a},f.prototype.$getUndoSelection=function(a,h){function u(T){return h?T.action!=="insert":T.action==="insert"}for(var g,A,L=0;L<a.length;L++){var M=a[L];if(!!M.start){if(!g){u(M)?g=i.fromPoints(M.start,M.end):g=i.fromPoints(M.start,M.start);continue}u(M)?(A=M.start,g.compare(A.row,A.column)==-1&&g.setStart(A),A=M.end,g.compare(A.row,A.column)==1&&g.setEnd(A)):(A=M.start,g.compare(A.row,A.column)==-1&&(g=i.fromPoints(M.start,M.start)))}}return g},f.prototype.replace=function(a,h){return this.doc.replace(a,h)},f.prototype.moveText=function(a,h,u){var g=this.getTextRange(a),A=this.getFoldsInRange(a),L=i.fromPoints(h,h);if(!u){this.remove(a);var M=a.start.row-a.end.row,T=M?-a.end.column:a.start.column-a.end.column;T&&(L.start.row==a.end.row&&L.start.column>a.end.column&&(L.start.column+=T),L.end.row==a.end.row&&L.end.column>a.end.column&&(L.end.column+=T)),M&&L.start.row>=a.end.row&&(L.start.row+=M,L.end.row+=M)}if(L.end=this.insert(L.start,g),A.length){var I=a.start,F=L.start,M=F.row-I.row,T=F.column-I.column;this.addFolds(A.map(function(O){return O=O.clone(),O.start.row==I.row&&(O.start.column+=T),O.end.row==I.row&&(O.end.column+=T),O.start.row+=M,O.end.row+=M,O}))}return L},f.prototype.indentRows=function(a,h,u){u=u.replace(/\t/g,this.getTabString());for(var g=a;g<=h;g++)this.doc.insertInLine({row:g,column:0},u)},f.prototype.outdentRows=function(a){for(var h=a.collapseRows(),u=new i(0,0,0,0),g=this.getTabSize(),A=h.start.row;A<=h.end.row;++A){var L=this.getLine(A);u.start.row=A,u.end.row=A;for(var M=0;M<g&&L.charAt(M)==" ";++M);M<g&&L.charAt(M)==" "?(u.start.column=M,u.end.column=M+1):(u.start.column=0,u.end.column=M),this.remove(u)}},f.prototype.$moveLines=function(a,h,u){if(a=this.getRowFoldStart(a),h=this.getRowFoldEnd(h),u<0){var g=this.getRowFoldStart(a+u);if(g<0)return 0;var A=g-a}else if(u>0){var g=this.getRowFoldEnd(h+u);if(g>this.doc.getLength()-1)return 0;var A=g-h}else{a=this.$clipRowToDocument(a),h=this.$clipRowToDocument(h);var A=h-a+1}var L=new i(a,0,h,Number.MAX_VALUE),M=this.getFoldsInRange(L).map(function(I){return I=I.clone(),I.start.row+=A,I.end.row+=A,I}),T=u==0?this.doc.getLines(a,h):this.doc.removeFullLines(a,h);return this.doc.insertFullLines(a+A,T),M.length&&this.addFolds(M),A},f.prototype.moveLinesUp=function(a,h){return this.$moveLines(a,h,-1)},f.prototype.moveLinesDown=function(a,h){return this.$moveLines(a,h,1)},f.prototype.duplicateLines=function(a,h){return this.$moveLines(a,h,0)},f.prototype.$clipRowToDocument=function(a){return Math.max(0,Math.min(a,this.doc.getLength()-1))},f.prototype.$clipColumnToRow=function(a,h){return h<0?0:Math.min(this.doc.getLine(a).length,h)},f.prototype.$clipPositionToDocument=function(a,h){if(h=Math.max(0,h),a<0)a=0,h=0;else{var u=this.doc.getLength();a>=u?(a=u-1,h=this.doc.getLine(u-1).length):h=Math.min(this.doc.getLine(a).length,h)}return{row:a,column:h}},f.prototype.$clipRangeToDocument=function(a){a.start.row<0?(a.start.row=0,a.start.column=0):a.start.column=this.$clipColumnToRow(a.start.row,a.start.column);var h=this.doc.getLength()-1;return a.end.row>h?(a.end.row=h,a.end.column=this.doc.getLine(h).length):a.end.column=this.$clipColumnToRow(a.end.row,a.end.column),a},f.prototype.setUseWrapMode=function(a){if(a!=this.$useWrapMode){if(this.$useWrapMode=a,this.$modified=!0,this.$resetRowCache(0),a){var h=this.getLength();this.$wrapData=Array(h),this.$updateWrapData(0,h-1)}this._signal("changeWrapMode")}},f.prototype.getUseWrapMode=function(){return this.$useWrapMode},f.prototype.setWrapLimitRange=function(a,h){(this.$wrapLimitRange.min!==a||this.$wrapLimitRange.max!==h)&&(this.$wrapLimitRange={min:a,max:h},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},f.prototype.adjustWrapLimit=function(a,h){var u=this.$wrapLimitRange;u.max<0&&(u={min:h,max:h});var g=this.$constrainWrapLimit(a,u.min,u.max);return g!=this.$wrapLimit&&g>1?(this.$wrapLimit=g,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},f.prototype.$constrainWrapLimit=function(a,h,u){return h&&(a=Math.max(h,a)),u&&(a=Math.min(u,a)),a},f.prototype.getWrapLimit=function(){return this.$wrapLimit},f.prototype.setWrapLimit=function(a){this.setWrapLimitRange(a,a)},f.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},f.prototype.$updateInternalDataOnChange=function(a){var h=this.$useWrapMode,u=a.action,g=a.start,A=a.end,L=g.row,M=A.row,T=M-L,I=null;if(this.$updating=!0,T!=0)if(u==="remove"){this[h?"$wrapData":"$rowLengthCache"].splice(L,T);var F=this.$foldData;I=this.getFoldsInRange(a),this.removeFolds(I);var _=this.getFoldLine(A.row),W=0;if(_){_.addRemoveChars(A.row,A.column,g.column-A.column),_.shiftRow(-T);var O=this.getFoldLine(L);O&&O!==_&&(O.merge(_),_=O),W=F.indexOf(_)+1}for(W;W<F.length;W++){var _=F[W];_.start.row>=A.row&&_.shiftRow(-T)}M=L}else{var B=Array(T);B.unshift(L,0);var H=h?this.$wrapData:this.$rowLengthCache;H.splice.apply(H,B);var F=this.$foldData,_=this.getFoldLine(L),W=0;if(_){var z=_.range.compareInside(g.row,g.column);z==0?(_=_.split(g.row,g.column),_&&(_.shiftRow(T),_.addRemoveChars(M,0,A.column-g.column))):z==-1&&(_.addRemoveChars(L,0,A.column-g.column),_.shiftRow(T)),W=F.indexOf(_)+1}for(W;W<F.length;W++){var _=F[W];_.start.row>=L&&_.shiftRow(T)}}else{T=Math.abs(a.start.column-a.end.column),u==="remove"&&(I=this.getFoldsInRange(a),this.removeFolds(I),T=-T);var _=this.getFoldLine(L);_&&_.addRemoveChars(L,g.column,T)}return h&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,h?this.$updateWrapData(L,M):this.$updateRowLengthCache(L,M),I},f.prototype.$updateRowLengthCache=function(a,h,u){this.$rowLengthCache[a]=null,this.$rowLengthCache[h]=null},f.prototype.$updateWrapData=function(a,h){var u=this.doc.getAllLines(),g=this.getTabSize(),A=this.$wrapData,L=this.$wrapLimit,M,T,I=a;for(h=Math.min(h,u.length-1);I<=h;)T=this.getFoldLine(I,T),T?(M=[],T.walk(function(F,_,W,O){var B;if(F!=null){B=this.$getDisplayTokens(F,M.length),B[0]=S;for(var H=1;H<B.length;H++)B[H]=y}else B=this.$getDisplayTokens(u[_].substring(O,W),M.length);M=M.concat(B)}.bind(this),T.end.row,u[T.end.row].length+1),A[T.start.row]=this.$computeWrapSplits(M,L,g),I=T.end.row+1):(M=this.$getDisplayTokens(u[I]),A[I]=this.$computeWrapSplits(M,L,g),I++)},f.prototype.$computeWrapSplits=function(a,h,u){if(a.length==0)return[];var g=[],A=a.length,L=0,M=0,T=this.$wrapAsCode,I=this.$indentedSoftWrap,F=h<=Math.max(2*u,8)||I===!1?0:Math.floor(h/2);function _(){var z=0;if(F===0)return z;if(I)for(var Y=0;Y<a.length;Y++){var Z=a[Y];if(Z==b)z+=1;else if(Z==p)z+=u;else{if(Z==w)continue;break}}return T&&I!==!1&&(z+=u),Math.min(z,F)}function W(z){for(var Y=z-L,Z=L;Z<z;Z++){var N=a[Z];(N===12||N===2)&&(Y-=1)}g.length||(O=_(),g.indent=O),M+=Y,g.push(M),L=z}for(var O=0;A-L>h-O;){var B=L+h-O;if(a[B-1]>=b&&a[B]>=b){W(B);continue}if(a[B]==S||a[B]==y){for(B;B!=L-1&&a[B]!=S;B--);if(B>L){W(B);continue}for(B=L+h,B;B<a.length&&a[B]==y;B++);if(B==a.length)break;W(B);continue}for(var H=Math.max(B-(h-(h>>2)),L-1);B>H&&a[B]<S;)B--;if(T){for(;B>H&&a[B]<S;)B--;for(;B>H&&a[B]==m;)B--}else for(;B>H&&a[B]<b;)B--;if(B>H){W(++B);continue}B=L+h,a[B]==$&&B--,W(B-O)}return g},f.prototype.$getDisplayTokens=function(a,h){var u=[],g;h=h||0;for(var A=0;A<a.length;A++){var L=a.charCodeAt(A);if(L==9){g=this.getScreenTabSize(u.length+h),u.push(p);for(var M=1;M<g;M++)u.push(w)}else L==32?u.push(b):L>39&&L<48||L>57&&L<64?u.push(m):L>=4352&&v(L)?u.push(d,$):u.push(d)}return u},f.prototype.$getStringScreenWidth=function(a,h,u){if(h==0)return[0,0];h==null&&(h=Infinity),u=u||0;var g,A;for(A=0;A<a.length&&(g=a.charCodeAt(A),g==9?u+=this.getScreenTabSize(u):g>=4352&&v(g)?u+=2:u+=1,!(u>h));A++);return[u,A]},f.prototype.getRowLength=function(a){var h=1;return this.lineWidgets&&(h+=this.lineWidgets[a]&&this.lineWidgets[a].rowCount||0),!this.$useWrapMode||!this.$wrapData[a]?h:this.$wrapData[a].length+h},f.prototype.getRowLineCount=function(a){return!this.$useWrapMode||!this.$wrapData[a]?1:this.$wrapData[a].length+1},f.prototype.getRowWrapIndent=function(a){if(this.$useWrapMode){var h=this.screenToDocumentPosition(a,Number.MAX_VALUE),u=this.$wrapData[h.row];return u.length&&u[0]<h.column?u.indent:0}else return 0},f.prototype.getScreenLastRowColumn=function(a){var h=this.screenToDocumentPosition(a,Number.MAX_VALUE);return this.documentToScreenColumn(h.row,h.column)},f.prototype.getDocumentLastRowColumn=function(a,h){var u=this.documentToScreenRow(a,h);return this.getScreenLastRowColumn(u)},f.prototype.getDocumentLastRowColumnPosition=function(a,h){var u=this.documentToScreenRow(a,h);return this.screenToDocumentPosition(u,Number.MAX_VALUE/10)},f.prototype.getRowSplitData=function(a){if(this.$useWrapMode)return this.$wrapData[a]},f.prototype.getScreenTabSize=function(a){return this.$tabSize-(a%this.$tabSize|0)},f.prototype.screenToDocumentRow=function(a,h){return this.screenToDocumentPosition(a,h).row},f.prototype.screenToDocumentColumn=function(a,h){return this.screenToDocumentPosition(a,h).column},f.prototype.screenToDocumentPosition=function(a,h,u){if(a<0)return{row:0,column:0};var g,A=0,L=0,M,T=0,I=0,F=this.$screenRowCache,_=this.$getRowCacheIndex(F,a),W=F.length;if(W&&_>=0)var T=F[_],A=this.$docRowCache[_],O=a>F[W-1];else var O=!W;for(var B=this.getLength()-1,H=this.getNextFoldLine(A),z=H?H.start.row:Infinity;T<=a&&(I=this.getRowLength(A),!(T+I>a||A>=B));)T+=I,A++,A>z&&(A=H.end.row+1,H=this.getNextFoldLine(A,H),z=H?H.start.row:Infinity),O&&(this.$docRowCache.push(A),this.$screenRowCache.push(T));if(H&&H.start.row<=A)g=this.getFoldDisplayLine(H),A=H.start.row;else{if(T+I<=a||A>B)return{row:B,column:this.getLine(B).length};g=this.getLine(A),H=null}var Y=0,Z=Math.floor(a-T);if(this.$useWrapMode){var N=this.$wrapData[A];N&&(M=N[Z],Z>0&&N.length&&(Y=N.indent,L=N[Z-1]||N[N.length-1],g=g.substring(L)))}return u!==void 0&&this.$bidiHandler.isBidiRow(T+Z,A,Z)&&(h=this.$bidiHandler.offsetToCol(u)),L+=this.$getStringScreenWidth(g,h-Y)[1],this.$useWrapMode&&L>=M&&(L=M-1),H?H.idxToPosition(L):{row:A,column:L}},f.prototype.documentToScreenPosition=function(a,h){if(typeof h=="undefined")var u=this.$clipPositionToDocument(a.row,a.column);else u=this.$clipPositionToDocument(a,h);a=u.row,h=u.column;var g=0,A=null,L=null;L=this.getFoldAt(a,h,1),L&&(a=L.start.row,h=L.start.column);var M,T=0,I=this.$docRowCache,F=this.$getRowCacheIndex(I,a),_=I.length;if(_&&F>=0)var T=I[F],g=this.$screenRowCache[F],W=a>I[_-1];else var W=!_;for(var O=this.getNextFoldLine(T),B=O?O.start.row:Infinity;T<a;){if(T>=B){if(M=O.end.row+1,M>a)break;O=this.getNextFoldLine(M,O),B=O?O.start.row:Infinity}else M=T+1;g+=this.getRowLength(T),T=M,W&&(this.$docRowCache.push(T),this.$screenRowCache.push(g))}var H="";O&&T>=B?(H=this.getFoldDisplayLine(O,a,h),A=O.start.row):(H=this.getLine(a).substring(0,h),A=a);var z=0;if(this.$useWrapMode){var Y=this.$wrapData[A];if(Y){for(var Z=0;H.length>=Y[Z];)g++,Z++;H=H.substring(Y[Z-1]||0,H.length),z=Z>0?Y.indent:0}}return this.lineWidgets&&this.lineWidgets[T]&&this.lineWidgets[T].rowsAbove&&(g+=this.lineWidgets[T].rowsAbove),{row:g,column:z+this.$getStringScreenWidth(H)[0]}},f.prototype.documentToScreenColumn=function(a,h){return this.documentToScreenPosition(a,h).column},f.prototype.documentToScreenRow=function(a,h){return this.documentToScreenPosition(a,h).row},f.prototype.getScreenLength=function(){var a=0,h=null;if(this.$useWrapMode)for(var A=this.$wrapData.length,L=0,g=0,h=this.$foldData[g++],M=h?h.start.row:Infinity;L<A;){var T=this.$wrapData[L];a+=T?T.length+1:1,L++,L>M&&(L=h.end.row+1,h=this.$foldData[g++],M=h?h.start.row:Infinity)}else{a=this.getLength();for(var u=this.$foldData,g=0;g<u.length;g++)h=u[g],a-=h.end.row-h.start.row}return this.lineWidgets&&(a+=this.$getWidgetScreenLength()),a},f.prototype.$setFontMetrics=function(a){!this.$enableVarChar||(this.$getStringScreenWidth=function(h,u,g){if(u===0)return[0,0];u||(u=Infinity),g=g||0;var A,L;for(L=0;L<h.length&&(A=h.charAt(L),A===" "?g+=this.getScreenTabSize(g):g+=a.getCharacterWidth(A),!(g>u));L++);return[g,L]})},f.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},f}();c.$uid=0,c.prototype.$modes=s.$modes,c.prototype.getValue=c.prototype.toString,c.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},c.prototype.$overwrite=!1,c.prototype.$mode=null,c.prototype.$modeId=null,c.prototype.$scrollTop=0,c.prototype.$scrollLeft=0,c.prototype.$wrapLimit=80,c.prototype.$useWrapMode=!1,c.prototype.$wrapLimitRange={min:null,max:null},c.prototype.lineWidgets=null,c.prototype.isFullWidth=v,R.implement(c.prototype,l);var d=1,$=2,S=3,y=4,m=9,b=10,p=11,w=12;function v(f){return f<4352?!1:f>=4352&&f<=4447||f>=4515&&f<=4519||f>=4602&&f<=4607||f>=9001&&f<=9002||f>=11904&&f<=11929||f>=11931&&f<=12019||f>=12032&&f<=12245||f>=12272&&f<=12283||f>=12288&&f<=12350||f>=12353&&f<=12438||f>=12441&&f<=12543||f>=12549&&f<=12589||f>=12593&&f<=12686||f>=12688&&f<=12730||f>=12736&&f<=12771||f>=12784&&f<=12830||f>=12832&&f<=12871||f>=12880&&f<=13054||f>=13056&&f<=19903||f>=19968&&f<=42124||f>=42128&&f<=42182||f>=43360&&f<=43388||f>=44032&&f<=55203||f>=55216&&f<=55238||f>=55243&&f<=55291||f>=63744&&f<=64255||f>=65040&&f<=65049||f>=65072&&f<=65106||f>=65108&&f<=65126||f>=65128&&f<=65131||f>=65281&&f<=65376||f>=65504&&f<=65510}E("./edit_session/folding").Folding.call(c.prototype),E("./edit_session/bracket_match").BracketMatch.call(c.prototype),s.defineOptions(c.prototype,"session",{wrap:{set:function(f){if(!f||f=="off"?f=!1:f=="free"?f=!0:f=="printMargin"?f=-1:typeof f=="string"&&(f=parseInt(f,10)||!1),this.$wrap!=f)if(this.$wrap=f,!f)this.setUseWrapMode(!1);else{var a=typeof f=="number"?f:null;this.setWrapLimitRange(a,a),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(f){f=f=="auto"?this.$mode.type!="text":f!="text",f!=this.$wrapAsCode&&(this.$wrapAsCode=f,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(f){this.$useWorker=f,this.$stopWorker(),f&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(f){f=parseInt(f),f>0&&this.$tabSize!==f&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=f,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(f){this.setFoldStyle(f)},handlesSet:!0},overwrite:{set:function(f){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(f){this.doc.setNewLineMode(f)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(f){this.setMode(f)},get:function(){return this.$modeId},handlesSet:!0}}),x.EditSession=c}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(E,x,P){"use strict";var R=E("./lib/lang"),k=E("./lib/oop"),C=E("./range").Range,s=function(){function e(){this.$options={}}return e.prototype.set=function(n){return k.mixin(this.$options,n),this},e.prototype.getOptions=function(){return R.copyObject(this.$options)},e.prototype.setOptions=function(n){this.$options=n},e.prototype.find=function(n){var i=this.$options,t=this.$matchIterator(n,i);if(!t)return!1;var r=null;return t.forEach(function(o,c,d,$){return r=new C(o,c,d,$),c==$&&i.start&&i.start.start&&i.skipCurrent!=!1&&r.isEqual(i.start)?(r=null,!1):!0}),r},e.prototype.findAll=function(n){var i=this.$options;if(!i.needle)return[];this.$assembleRegExp(i);var t=i.range,r=t?n.getLines(t.start.row,t.end.row):n.doc.getAllLines(),o=[],c=i.re;if(i.$isMultiLine){var d=c.length,$=r.length-d,S;e:for(var y=c.offset||0;y<=$;y++){for(var m=0;m<d;m++)if(r[y+m].search(c[m])==-1)continue e;var b=r[y],p=r[y+d-1],w=b.length-b.match(c[0])[0].length,v=p.match(c[d-1])[0].length;S&&S.end.row===y&&S.end.column>w||(o.push(S=new C(y,w,y+d-1,v)),d>2&&(y=y+d-2))}}else for(var f=0;f<r.length;f++)for(var a=R.getMatchOffsets(r[f],c),m=0;m<a.length;m++){var h=a[m];o.push(new C(f,h.offset,f,h.offset+h.length))}if(t){for(var u=t.start.column,g=t.end.column,f=0,m=o.length-1;f<m&&o[f].start.column<u&&o[f].start.row==0;)f++;for(var A=t.end.row-t.start.row;f<m&&o[m].end.column>g&&o[m].end.row==A;)m--;for(o=o.slice(f,m+1),f=0,m=o.length;f<m;f++)o[f].start.row+=t.start.row,o[f].end.row+=t.start.row}return o},e.prototype.replace=function(n,i){var t=this.$options,r=this.$assembleRegExp(t);if(t.$isMultiLine)return i;if(!!r){var o=r.exec(n);if(!o||o[0].length!=n.length)return null;if(i=n.replace(r,i),t.preserveCase){i=i.split("");for(var c=Math.min(n.length,n.length);c--;){var d=n[c];d&&d.toLowerCase()!=d?i[c]=i[c].toUpperCase():i[c]=i[c].toLowerCase()}i=i.join("")}return i}},e.prototype.$assembleRegExp=function(n,i){if(n.needle instanceof RegExp)return n.re=n.needle;var t=n.needle;if(!n.needle)return n.re=!1;n.regExp||(t=R.escapeRegExp(t)),n.wholeWord&&(t=l(t,n));var r=n.caseSensitive?"gm":"gmi";if(n.$isMultiLine=!i&&/[\n\r]/.test(t),n.$isMultiLine)return n.re=this.$assembleMultilineRegExp(t,r);try{var o=new RegExp(t,r)}catch(c){o=!1}return n.re=o},e.prototype.$assembleMultilineRegExp=function(n,i){for(var t=n.replace(/\r\n|\r|\n/g,`$
^`).split(`
`),r=[],o=0;o<t.length;o++)try{r.push(new RegExp(t[o],i))}catch(c){return!1}return r},e.prototype.$matchIterator=function(n,i){var t=this.$assembleRegExp(i);if(!t)return!1;var r=i.backwards==!0,o=i.skipCurrent!=!1,c=i.range,d=i.start;d||(d=c?c[r?"end":"start"]:n.selection.getRange()),d.start&&(d=d[o!=r?"end":"start"]);var $=c?c.start.row:0,S=c?c.end.row:n.getLength()-1;if(r)var y=function(p){var w=d.row;if(!b(w,d.column,p)){for(w--;w>=$;w--)if(b(w,Number.MAX_VALUE,p))return;if(i.wrap!=!1){for(w=S,$=d.row;w>=$;w--)if(b(w,Number.MAX_VALUE,p))return}}};else var y=function(w){var v=d.row;if(!b(v,d.column,w)){for(v=v+1;v<=S;v++)if(b(v,0,w))return;if(i.wrap!=!1){for(v=$,S=d.row;v<=S;v++)if(b(v,0,w))return}}};if(i.$isMultiLine)var m=t.length,b=function(p,w,v){var f=r?p-m+1:p;if(!(f<0||f+m>n.getLength())){var a=n.getLine(f),h=a.search(t[0]);if(!(!r&&h<w||h===-1)){for(var u=1;u<m;u++)if(a=n.getLine(f+u),a.search(t[u])==-1)return;var g=a.match(t[m-1])[0].length;if(!(r&&g>w)&&v(f,h,f+m-1,g))return!0}}};else if(r)var b=function(w,v,f){var a=n.getLine(w),h=[],u,g=0;for(t.lastIndex=0;u=t.exec(a);){var A=u[0].length;if(g=u.index,!A){if(g>=a.length)break;t.lastIndex=g+=1}if(u.index+A>v)break;h.push(u.index,A)}for(var L=h.length-1;L>=0;L-=2){var M=h[L-1],A=h[L];if(f(w,M,w,M+A))return!0}};else var b=function(w,v,f){var a=n.getLine(w),h,u;for(t.lastIndex=v;u=t.exec(a);){var g=u[0].length;if(h=u.index,f(w,h,w,h+g))return!0;if(!g&&(t.lastIndex=h+=1,h>=a.length))return!1}};return{forEach:y}},e}();function l(e,n){function i(t){return/\w/.test(t)||n.regExp?"\\b":""}return i(e[0])+e+i(e[e.length-1])}x.Search=s}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(E,x,P){"use strict";var R=E("../lib/keys"),k=E("../lib/useragent"),C=R.KEY_MODS;function s(e,n){this.platform=n||(k.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function l(e,n){s.call(this,e,n),this.$singleCommand=!1}l.prototype=s.prototype,function(){this.addCommand=function(n){this.commands[n.name]&&this.removeCommand(n),this.commands[n.name]=n,n.bindKey&&this._buildKeyHash(n)},this.removeCommand=function(n,i){var t=n&&(typeof n=="string"?n:n.name);n=this.commands[t],i||delete this.commands[t];var r=this.commandKeyBinding;for(var o in r){var c=r[o];if(c==n)delete r[o];else if(Array.isArray(c)){var d=c.indexOf(n);d!=-1&&(c.splice(d,1),c.length==1&&(r[o]=c[0]))}}},this.bindKey=function(n,i,t){if(typeof n=="object"&&n&&(t==null&&(t=n.position),n=n[this.platform]),!!n){if(typeof i=="function")return this.addCommand({exec:i,bindKey:n,name:i.name||n});n.split("|").forEach(function(r){var o="";if(r.indexOf(" ")!=-1){var c=r.split(/\s+/);r=c.pop(),c.forEach(function(S){var y=this.parseKeys(S),m=C[y.hashId]+y.key;o+=(o?" ":"")+m,this._addCommandToBinding(o,"chainKeys")},this),o+=" "}var d=this.parseKeys(r),$=C[d.hashId]+d.key;this._addCommandToBinding(o+$,i,t)},this)}};function e(n){return typeof n=="object"&&n.bindKey&&n.bindKey.position||(n.isDefault?-100:0)}this._addCommandToBinding=function(n,i,t){var r=this.commandKeyBinding,o;if(!i)delete r[n];else if(!r[n]||this.$singleCommand)r[n]=i;else{Array.isArray(r[n])?(o=r[n].indexOf(i))!=-1&&r[n].splice(o,1):r[n]=[r[n]],typeof t!="number"&&(t=e(i));var c=r[n];for(o=0;o<c.length;o++){var d=c[o],$=e(d);if($>t)break}c.splice(o,0,i)}},this.addCommands=function(n){n&&Object.keys(n).forEach(function(i){var t=n[i];if(!!t){if(typeof t=="string")return this.bindKey(t,i);typeof t=="function"&&(t={exec:t}),typeof t=="object"&&(t.name||(t.name=i),this.addCommand(t))}},this)},this.removeCommands=function(n){Object.keys(n).forEach(function(i){this.removeCommand(n[i])},this)},this.bindKeys=function(n){Object.keys(n).forEach(function(i){this.bindKey(i,n[i])},this)},this._buildKeyHash=function(n){this.bindKey(n.bindKey,n)},this.parseKeys=function(n){var i=n.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function($){return $}),t=i.pop(),r=R[t];if(R.FUNCTION_KEYS[r])t=R.FUNCTION_KEYS[r].toLowerCase();else if(i.length){if(i.length==1&&i[0]=="shift")return{key:t.toUpperCase(),hashId:-1}}else return{key:t,hashId:-1};for(var o=0,c=i.length;c--;){var d=R.KEY_MODS[i[c]];if(d==null)return typeof console!="undefined"&&console.error("invalid modifier "+i[c]+" in "+n),!1;o|=d}return{key:t,hashId:o}},this.findKeyCommand=function(i,t){var r=C[i]+t;return this.commandKeyBinding[r]},this.handleKeyboard=function(n,i,t,r){if(!(r<0)){var o=C[i]+t,c=this.commandKeyBinding[o];return n.$keyChain&&(n.$keyChain+=" "+o,c=this.commandKeyBinding[n.$keyChain]||c),c&&(c=="chainKeys"||c[c.length-1]=="chainKeys")?(n.$keyChain=n.$keyChain||o,{command:"null"}):(n.$keyChain&&((!i||i==4)&&t.length==1?n.$keyChain=n.$keyChain.slice(0,-o.length-1):(i==-1||r>0)&&(n.$keyChain="")),{command:c})}},this.getStatusText=function(n,i){return i.$keyChain||""}}.call(s.prototype),x.HashHandler=s,x.MultiHashHandler=l}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(E,x,P){"use strict";var R=this&&this.__extends||function(){var e=function(n,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])},e(n,i)};return function(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");e(n,i);function t(){this.constructor=n}n.prototype=i===null?Object.create(i):(t.prototype=i.prototype,new t)}}(),k=E("../lib/oop"),C=E("../keyboard/hash_handler").MultiHashHandler,s=E("../lib/event_emitter").EventEmitter,l=function(e){R(n,e);function n(i,t){var r=e.call(this,t,i)||this;return r.byName=r.commands,r.setDefaultHandler("exec",function(o){return o.args?o.command.exec(o.editor,o.args,o.event,!1):o.command.exec(o.editor,{},o.event,!0)}),r}return n.prototype.exec=function(i,t,r){if(Array.isArray(i)){for(var o=i.length;o--;)if(this.exec(i[o],t,r))return!0;return!1}if(typeof i=="string"&&(i=this.commands[i]),!i||t&&t.$readOnly&&!i.readOnly||this.$checkCommandState!=!1&&i.isAvailable&&!i.isAvailable(t))return!1;var c={editor:t,command:i,args:r};return c.returnValue=this._emit("exec",c),this._signal("afterExec",c),c.returnValue!==!1},n.prototype.toggleRecording=function(i){if(!this.$inReplay)return i&&i._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(t){this.macro.push([t.command,t.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},n.prototype.replay=function(i){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(i);try{this.$inReplay=!0,this.macro.forEach(function(t){typeof t=="string"?this.exec(t,i):this.exec(t[0],i,t[1])},this)}finally{this.$inReplay=!1}}},n.prototype.trimMacro=function(i){return i.map(function(t){return typeof t[0]!="string"&&(t[0]=t[0].name),t[1]||(t=t[0]),t})},n}(C);k.implement(l.prototype,s),x.CommandManager=l}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(E,x,P){"use strict";var R=E("../lib/lang"),k=E("../config"),C=E("../range").Range;function s(e,n){return{win:e,mac:n}}x.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:s("Ctrl-,","Command-,"),exec:function(e){k.loadModule("ace/ext/settings_menu",function(n){n.init(e),e.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:s("Alt-E","F4"),exec:function(e){k.loadModule("ace/ext/error_marker",function(n){n.showErrorMarker(e,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:s("Alt-Shift-E","Shift-F4"),exec:function(e){k.loadModule("ace/ext/error_marker",function(n){n.showErrorMarker(e,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:s("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:s(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:s("Ctrl-L","Command-L"),exec:function(e,n){typeof n=="number"&&!isNaN(n)&&e.gotoLine(n),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:s("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:s("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:s("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:s("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:s("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:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:s("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:s("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:s("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:s("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:s("Ctrl-F","Command-F"),exec:function(e){k.loadModule("ace/ext/searchbox",function(n){n.Search(e)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:s("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:s("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:s("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:s("Up","Up|Ctrl-P"),exec:function(e,n){e.navigateUp(n.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:s("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:s("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:s("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:s("Down","Down|Ctrl-N"),exec:function(e,n){e.navigateDown(n.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:s("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:s("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:s("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:s("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:s("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:s("Left","Left|Ctrl-B"),exec:function(e,n){e.navigateLeft(n.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:s("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:s("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:s("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:s("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:s("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:s("Right","Right|Ctrl-F"),exec:function(e,n){e.navigateRight(n.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:s(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:s("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:s(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:s("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:s("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:s("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:s("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:s("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:s("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:s(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 n=e.$copyWithEmptySelection&&e.selection.isEmpty(),i=n?e.selection.getLineRange():e.selection.getRange();e._emit("cut",i),i.isEmpty()||e.session.remove(i),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,n){e.$handlePaste(n)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:s("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:s("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(e){k.loadModule("ace/ext/searchbox",function(n){n.Search(e,!0)})}},{name:"undo",description:"Undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:s("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:s("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:s("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:s("Shift-Delete",null),exec:function(e){if(e.selection.isEmpty())e.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:s("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:s("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:s("Ctrl-Shift-Backspace",null),exec:function(e){var n=e.selection.getRange();n.start.column=0,e.session.remove(n)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:s("Ctrl-Shift-Delete",null),exec:function(e){var n=e.selection.getRange();n.end.column=Number.MAX_VALUE,e.session.remove(n)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:s("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:s("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,n){e.insert(n)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,n){e.insert(R.stringRepeat(n.text||"",n.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:s(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:s("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:s(null,null),exec:function(e){e.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:s("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var n=e.selection.getRange();n.start.column=n.end.column=0,n.end.row++,e.selection.setRange(n,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:s("Ctrl+F3","F3"),exec:function(e){e.openLink()}},{name:"joinlines",description:"Join lines",bindKey:s(null,null),exec:function(e){for(var n=e.selection.isBackwards(),i=n?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),t=n?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),r=e.session.doc.getLine(i.row).length,o=e.session.doc.getTextRange(e.selection.getRange()),c=o.replace(/\n\s*/," ").length,d=e.session.doc.getLine(i.row),$=i.row+1;$<=t.row+1;$++){var S=R.stringTrimLeft(R.stringTrimRight(e.session.doc.getLine($)));S.length!==0&&(S=" "+S),d+=S}t.row+1<e.session.doc.getLength()-1&&(d+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new C(i.row,0,t.row+2,0),d),c>0?(e.selection.moveCursorTo(i.row,i.column),e.selection.selectTo(i.row,i.column+c)):(r=e.session.doc.getLine(i.row).length>r?r+1:r,e.selection.moveCursorTo(i.row,r))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:s(null,null),exec:function(e){var n=e.session.doc.getLength()-1,i=e.session.doc.getLine(n).length,t=e.selection.rangeList.ranges,r=[];t.length<1&&(t=[e.selection.getRange()]);for(var o=0;o<t.length;o++)o==t.length-1&&(t[o].end.row===n&&t[o].end.column===i||r.push(new C(t[o].end.row,t[o].end.column,n,i))),o===0?t[o].start.row===0&&t[o].start.column===0||r.push(new C(0,0,t[o].start.row,t[o].start.column)):r.push(new C(t[o-1].end.row,t[o-1].end.column,t[o].start.row,t[o].start.column));e.exitMultiSelectMode(),e.clearSelection();for(var o=0;o<r.length;o++)e.selection.addRange(r[o],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(e){e.selection.clearSelection(),e.navigateLineEnd(),e.insert(`
`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(e){e.selection.clearSelection();var n=e.getCursorPosition();e.selection.moveTo(n.row-1,Number.MAX_VALUE),e.insert(`
`),n.row===0&&e.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",description:"Open command palette",bindKey:s("F1","F1"),exec:function(e){e.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:s(null,null),exec:function(e){e.prompt({$type:"modes"})},readOnly:!0}];for(var l=1;l<9;l++)x.commands.push({name:"foldToLevel"+l,description:"Fold To Level "+l,level:l,exec:function(e){e.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(E,x,P){"use strict";var R=E("./lib/dom"),k=function(){function C(s){this.session=s,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return C.prototype.getRowLength=function(s){var l;return this.lineWidgets?l=this.lineWidgets[s]&&this.lineWidgets[s].rowCount||0:l=0,!this.$useWrapMode||!this.$wrapData[s]?1+l:this.$wrapData[s].length+1+l},C.prototype.$getWidgetScreenLength=function(){var s=0;return this.lineWidgets.forEach(function(l){l&&l.rowCount&&!l.hidden&&(s+=l.rowCount)}),s},C.prototype.$onChangeEditor=function(s){this.attach(s.editor)},C.prototype.attach=function(s){s&&s.widgetManager&&s.widgetManager!=this&&s.widgetManager.detach(),this.editor!=s&&(this.detach(),this.editor=s,s&&(s.widgetManager=this,s.renderer.on("beforeRender",this.measureWidgets),s.renderer.on("afterRender",this.renderWidgets)))},C.prototype.detach=function(s){var l=this.editor;if(!!l){this.editor=null,l.widgetManager=null,l.renderer.off("beforeRender",this.measureWidgets),l.renderer.off("afterRender",this.renderWidgets);var e=this.session.lineWidgets;e&&e.forEach(function(n){n&&n.el&&n.el.parentNode&&(n._inDocument=!1,n.el.parentNode.removeChild(n.el))})}},C.prototype.updateOnFold=function(s,l){var e=l.lineWidgets;if(!(!e||!s.action)){for(var n=s.data,i=n.start.row,t=n.end.row,r=s.action=="add",o=i+1;o<t;o++)e[o]&&(e[o].hidden=r);e[t]&&(r?e[i]?e[t].hidden=r:e[i]=e[t]:(e[i]==e[t]&&(e[i]=void 0),e[t].hidden=r))}},C.prototype.updateOnChange=function(s){var l=this.session.lineWidgets;if(!!l){var e=s.start.row,n=s.end.row-e;if(n!==0)if(s.action=="remove"){var i=l.splice(e+1,n);!l[e]&&i[i.length-1]&&(l[e]=i.pop()),i.forEach(function(r){r&&this.removeLineWidget(r)},this),this.$updateRows()}else{var t=new Array(n);l[e]&&l[e].column!=null&&s.start.column>l[e].column&&e++,t.unshift(e,0),l.splice.apply(l,t),this.$updateRows()}}},C.prototype.$updateRows=function(){var s=this.session.lineWidgets;if(!!s){var l=!0;s.forEach(function(e,n){if(e)for(l=!1,e.row=n;e.$oldWidget;)e.$oldWidget.row=n,e=e.$oldWidget}),l&&(this.session.lineWidgets=null)}},C.prototype.$registerLineWidget=function(s){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var l=this.session.lineWidgets[s.row];return l&&(s.$oldWidget=l,l.el&&l.el.parentNode&&(l.el.parentNode.removeChild(l.el),l._inDocument=!1)),this.session.lineWidgets[s.row]=s,s},C.prototype.addLineWidget=function(s){if(this.$registerLineWidget(s),s.session=this.session,!this.editor)return s;var l=this.editor.renderer;s.html&&!s.el&&(s.el=R.createElement("div"),s.el.innerHTML=s.html),s.text&&!s.el&&(s.el=R.createElement("div"),s.el.textContent=s.text),s.el&&(R.addCssClass(s.el,"ace_lineWidgetContainer"),s.className&&R.addCssClass(s.el,s.className),s.el.style.position="absolute",s.el.style.zIndex=5,l.container.appendChild(s.el),s._inDocument=!0,s.coverGutter||(s.el.style.zIndex=3),s.pixelHeight==null&&(s.pixelHeight=s.el.offsetHeight)),s.rowCount==null&&(s.rowCount=s.pixelHeight/l.layerConfig.lineHeight);var e=this.session.getFoldAt(s.row,0);if(s.$fold=e,e){var n=this.session.lineWidgets;s.row==e.end.row&&!n[e.start.row]?n[e.start.row]=s:s.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:s.row}}}),this.$updateRows(),this.renderWidgets(null,l),this.onWidgetChanged(s),s},C.prototype.removeLineWidget=function(s){if(s._inDocument=!1,s.session=null,s.el&&s.el.parentNode&&s.el.parentNode.removeChild(s.el),s.editor&&s.editor.destroy)try{s.editor.destroy()}catch(e){}if(this.session.lineWidgets){var l=this.session.lineWidgets[s.row];if(l==s)this.session.lineWidgets[s.row]=s.$oldWidget,s.$oldWidget&&this.onWidgetChanged(s.$oldWidget);else for(;l;){if(l.$oldWidget==s){l.$oldWidget=s.$oldWidget;break}l=l.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:s.row}}}),this.$updateRows()},C.prototype.getWidgetsAtRow=function(s){for(var l=this.session.lineWidgets,e=l&&l[s],n=[];e;)n.push(e),e=e.$oldWidget;return n},C.prototype.onWidgetChanged=function(s){this.session._changedWidgets.push(s),this.editor&&this.editor.renderer.updateFull()},C.prototype.measureWidgets=function(s,l){var e=this.session._changedWidgets,n=l.layerConfig;if(!(!e||!e.length)){for(var i=Infinity,t=0;t<e.length;t++){var r=e[t];if(!(!r||!r.el)&&r.session==this.session){if(!r._inDocument){if(this.session.lineWidgets[r.row]!=r)continue;r._inDocument=!0,l.container.appendChild(r.el)}r.h=r.el.offsetHeight,r.fixedWidth||(r.w=r.el.offsetWidth,r.screenWidth=Math.ceil(r.w/n.characterWidth));var o=r.h/n.lineHeight;r.coverLine&&(o-=this.session.getRowLineCount(r.row),o<0&&(o=0)),r.rowCount!=o&&(r.rowCount=o,r.row<i&&(i=r.row))}}i!=Infinity&&(this.session._emit("changeFold",{data:{start:{row:i}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},C.prototype.renderWidgets=function(s,l){var e=l.layerConfig,n=this.session.lineWidgets;if(!!n){for(var i=Math.min(this.firstRow,e.firstRow),t=Math.max(this.lastRow,e.lastRow,n.length);i>0&&!n[i];)i--;this.firstRow=e.firstRow,this.lastRow=e.lastRow,l.$cursorLayer.config=e;for(var r=i;r<=t;r++){var o=n[r];if(!(!o||!o.el)){if(o.hidden){o.el.style.top=-100-(o.pixelHeight||0)+"px";continue}o._inDocument||(o._inDocument=!0,l.container.appendChild(o.el));var c=l.$cursorLayer.getPixelPosition({row:r,column:0},!0).top;o.coverLine||(c+=e.lineHeight*this.session.getRowLineCount(o.row)),o.el.style.top=c-e.offset+"px";var d=o.coverGutter?0:l.gutterWidth;o.fixedWidth||(d-=l.scrollLeft),o.el.style.left=d+"px",o.fullWidth&&o.screenWidth&&(o.el.style.minWidth=e.width+2*e.padding+"px"),o.fixedWidth?o.el.style.right=l.scrollBar.getWidth()+"px":o.el.style.right=""}}}},C}();x.LineWidgets=k}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/line_widgets","ace/clipboard","ace/lib/keys"],function(E,x,P){"use strict";var R=this&&this.__values||function(a){var h=typeof Symbol=="function"&&Symbol.iterator,u=h&&a[h],g=0;if(u)return u.call(a);if(a&&typeof a.length=="number")return{next:function(){return a&&g>=a.length&&(a=void 0),{value:a&&a[g++],done:!a}}};throw new TypeError(h?"Object is not iterable.":"Symbol.iterator is not defined.")},k=E("./lib/oop"),C=E("./lib/dom"),s=E("./lib/lang"),l=E("./lib/useragent"),e=E("./keyboard/textinput").TextInput,n=E("./mouse/mouse_handler").MouseHandler,i=E("./mouse/fold_handler").FoldHandler,t=E("./keyboard/keybinding").KeyBinding,r=E("./edit_session").EditSession,o=E("./search").Search,c=E("./range").Range,d=E("./lib/event_emitter").EventEmitter,$=E("./commands/command_manager").CommandManager,S=E("./commands/default_commands").commands,y=E("./config"),m=E("./token_iterator").TokenIterator,b=E("./line_widgets").LineWidgets,p=E("./clipboard"),w=E("./lib/keys"),v=function(){function a(h,u,g){this.$toDestroy=[];var A=h.getContainerElement();this.container=A,this.renderer=h,this.id="editor"+ ++a.$uid,this.commands=new $(l.isMac?"mac":"win",S),typeof document=="object"&&(this.textInput=new e(h.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new n(this),new i(this)),this.keyBinding=new t(this),this.$search=new o().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(L,M){M._$emitInputEvent.schedule(31)}),this.setSession(u||g&&g.session||new r("")),y.resetOptions(this),g&&this.setOptions(g),y._signal("editor",this)}return a.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=s.delayedCall(this.endOperation.bind(this,!0)),this.on("change",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}.bind(this),!0)},a.prototype.startOperation=function(h){if(this.curOp){if(!h||this.curOp.command)return;this.prevOp=this.curOp}h||(this.previousCommand=null,h={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:h.command||{},args:h.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},a.prototype.endOperation=function(h){if(this.curOp&&this.session){if(h&&h.returnValue===!1||!this.session)return this.curOp=null;if(h==!0&&this.curOp.command&&this.curOp.command.name=="mouse"||(this._signal("beforeEndOperation"),!this.curOp))return;var u=this.curOp.command,g=u&&u.scrollIntoView;if(g){switch(g){case"center-animate":g="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var A=this.selection.getRange(),L=this.renderer.layerConfig;(A.start.row>=L.lastRow||A.end.row<=L.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break;default:break}g=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}var M=this.selection.toJSON();this.curOp.selectionAfter=M,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(M),this.prevOp=this.curOp,this.curOp=null}},a.prototype.$historyTracker=function(h){if(!!this.$mergeUndoDeltas){var u=this.prevOp,g=this.$mergeableCommands,A=u.command&&h.command.name==u.command.name;if(h.command.name=="insertstring"){var L=h.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),A=A&&this.mergeNextCommand&&(!/\s/.test(L)||/\s/.test(u.args)),this.mergeNextCommand=!0}else A=A&&g.indexOf(h.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(A=!1),A?this.session.mergeUndoDeltas=!0:g.indexOf(h.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},a.prototype.setKeyboardHandler=function(h,u){if(h&&typeof h=="string"&&h!="ace"){this.$keybindingId=h;var g=this;y.loadModule(["keybinding",h],function(A){g.$keybindingId==h&&g.keyBinding.setKeyboardHandler(A&&A.handler),u&&u()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(h),u&&u()},a.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},a.prototype.setSession=function(h){if(this.session!=h){this.curOp&&this.endOperation(),this.curOp={};var u=this.session;if(u){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);var g=this.session.getSelection();g.off("changeCursor",this.$onCursorChange),g.off("changeSelection",this.$onSelectionChange)}this.session=h,h?(this.$onDocumentChange=this.onDocumentChange.bind(this),h.on("change",this.$onDocumentChange),this.renderer.setSession(h),this.$onChangeMode=this.onChangeMode.bind(this),h.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),h.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),h.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),h.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),h.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),h.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=h.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),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(h)),this._signal("changeSession",{session:h,oldSession:u}),this.curOp=null,u&&u._signal("changeEditor",{oldEditor:this}),h&&h._signal("changeEditor",{editor:this}),h&&!h.destroyed&&h.bgTokenizer.scheduleStart()}},a.prototype.getSession=function(){return this.session},a.prototype.setValue=function(h,u){return this.session.doc.setValue(h),u?u==1?this.navigateFileEnd():u==-1&&this.navigateFileStart():this.selectAll(),h},a.prototype.getValue=function(){return this.session.getValue()},a.prototype.getSelection=function(){return this.selection},a.prototype.resize=function(h){this.renderer.onResize(h)},a.prototype.setTheme=function(h,u){this.renderer.setTheme(h,u)},a.prototype.getTheme=function(){return this.renderer.getTheme()},a.prototype.setStyle=function(h){this.renderer.setStyle(h)},a.prototype.unsetStyle=function(h){this.renderer.unsetStyle(h)},a.prototype.getFontSize=function(){return this.getOption("fontSize")||C.computedStyle(this.container).fontSize},a.prototype.setFontSize=function(h){this.setOption("fontSize",h)},a.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var h=this;this.$highlightPending=!0,setTimeout(function(){h.$highlightPending=!1;var u=h.session;if(!(!u||u.destroyed)){u.$bracketHighlight&&(u.$bracketHighlight.markerIds.forEach(function(W){u.removeMarker(W)}),u.$bracketHighlight=null);var g=h.getCursorPosition(),A=h.getKeyboardHandler(),L=A&&A.$getDirectionForHighlight&&A.$getDirectionForHighlight(h),M=u.getMatchingBracketRanges(g,L);if(!M){var T=new m(u,g.row,g.column),I=T.getCurrentToken();if(I&&/\b(?:tag-open|tag-name)/.test(I.type)){var F=u.getMatchingTags(g);F&&(M=[F.openTagName,F.closeTagName])}}if(!M&&u.$mode.getMatching&&(M=u.$mode.getMatching(h.session)),!M){h.getHighlightIndentGuides()&&h.renderer.$textLayer.$highlightIndentGuide();return}var _="ace_bracket";Array.isArray(M)?M.length==1&&(_="ace_error_bracket"):M=[M],M.length==2&&(c.comparePoints(M[0].end,M[1].start)==0?M=[c.fromPoints(M[0].start,M[1].end)]:c.comparePoints(M[0].start,M[1].end)==0&&(M=[c.fromPoints(M[1].start,M[0].end)])),u.$bracketHighlight={ranges:M,markerIds:M.map(function(W){return u.addMarker(W,_,"text")})},h.getHighlightIndentGuides()&&h.renderer.$textLayer.$highlightIndentGuide()}},50)}},a.prototype.focus=function(){this.textInput.focus()},a.prototype.isFocused=function(){return this.textInput.isFocused()},a.prototype.blur=function(){this.textInput.blur()},a.prototype.onFocus=function(h){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",h))},a.prototype.onBlur=function(h){!this.$isFocused||(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",h))},a.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},a.prototype.onDocumentChange=function(h){var u=this.session.$useWrapMode,g=h.start.row==h.end.row?h.end.row:Infinity;this.renderer.updateLines(h.start.row,g,u),this._signal("change",h),this.$cursorChange()},a.prototype.onTokenizerUpdate=function(h){var u=h.data;this.renderer.updateLines(u.first,u.last)},a.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},a.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},a.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},a.prototype.$updateHighlightActiveLine=function(){var h=this.getSession(),u;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(u=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(u=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(u=!1)),h.$highlightLineMarker&&!u)h.removeMarker(h.$highlightLineMarker.id),h.$highlightLineMarker=null;else if(!h.$highlightLineMarker&&u){var g=new c(u.row,u.column,u.row,Infinity);g.id=h.addMarker(g,"ace_active-line","screenLine"),h.$highlightLineMarker=g}else u&&(h.$highlightLineMarker.start.row=u.row,h.$highlightLineMarker.end.row=u.row,h.$highlightLineMarker.start.column=u.column,h._signal("changeBackMarker"))},a.prototype.onSelectionChange=function(h){var u=this.session;if(u.$selectionMarker&&u.removeMarker(u.$selectionMarker),u.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var g=this.selection.getRange(),A=this.getSelectionStyle();u.$selectionMarker=u.addMarker(g,"ace_selection",A)}var L=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(L),this._signal("changeSelection")},a.prototype.$getSelectionHighLightRegexp=function(){var h=this.session,u=this.getSelectionRange();if(!(u.isEmpty()||u.isMultiLine())){var g=u.start.column,A=u.end.column,L=h.getLine(u.start.row),M=L.substring(g,A);if(!(M.length>5e3||!/[\w\d]/.test(M))){var T=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:M}),I=L.substring(g-1,A+1);if(!!T.test(I))return T}}},a.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},a.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},a.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},a.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},a.prototype.onChangeMode=function(h){this.renderer.updateText(),this._emit("changeMode",h)},a.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},a.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},a.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},a.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},a.prototype.getCopyText=function(){var h=this.getSelectedText(),u=this.session.doc.getNewLineCharacter(),g=!1;if(!h&&this.$copyWithEmptySelection){g=!0;for(var A=this.selection.getAllRanges(),L=0;L<A.length;L++){var M=A[L];L&&A[L-1].start.row==M.start.row||(h+=this.session.getLine(M.start.row)+u)}}var T={text:h};return this._signal("copy",T),p.lineMode=g?T.text:!1,T.text},a.prototype.onCopy=function(){this.commands.exec("copy",this)},a.prototype.onCut=function(){this.commands.exec("cut",this)},a.prototype.onPaste=function(h,u){var g={text:h,event:u};this.commands.exec("paste",this,g)},a.prototype.$handlePaste=function(h){typeof h=="string"&&(h={text:h}),this._signal("paste",h);var u=h.text,g=u===p.lineMode,A=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)g?A.insert({row:this.selection.lead.row,column:0},u):this.insert(u);else if(g)this.selection.rangeList.ranges.forEach(function(_){A.insert({row:_.start.row,column:0},u)});else{var L=u.split(/\r\n|\r|\n/),M=this.selection.rangeList.ranges,T=L.length==2&&(!L[0]||!L[1]);if(L.length!=M.length||T)return this.commands.exec("insertstring",this,u);for(var I=M.length;I--;){var F=M[I];F.isEmpty()||A.remove(F),A.insert(F.start,L[I])}}},a.prototype.execCommand=function(h,u){return this.commands.exec(h,this,u)},a.prototype.insert=function(h,u){var g=this.session,A=g.getMode(),L=this.getCursorPosition();if(this.getBehavioursEnabled()&&!u){var M=A.transformAction(g.getState(L.row),"insertion",this,g,h);M&&(h!==M.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),h=M.text)}if(h==" "&&(h=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&h.indexOf(`
`)==-1){var T=new c.fromPoints(L,L);T.end.column+=h.length,this.session.remove(T)}}else{var T=this.getSelectionRange();L=this.session.remove(T),this.clearSelection()}if(h==`
`||h==`\r
`){var W=g.getLine(L.row);if(L.column>W.search(/\S|$/)){var I=W.substr(L.column).search(/\S|$/);g.doc.removeInLine(L.row,L.column,L.column+I)}}this.clearSelection();var F=L.column,_=g.getState(L.row),W=g.getLine(L.row),O=A.checkOutdent(_,W,h);if(g.insert(L,h),M&&M.selection&&(M.selection.length==2?this.selection.setSelectionRange(new c(L.row,F+M.selection[0],L.row,F+M.selection[1])):this.selection.setSelectionRange(new c(L.row+M.selection[0],M.selection[1],L.row+M.selection[2],M.selection[3]))),this.$enableAutoIndent){if(g.getDocument().isNewLine(h)){var B=A.getNextLineIndent(_,W.slice(0,L.column),g.getTabString());g.insert({row:L.row+1,column:0},B)}O&&A.autoOutdent(_,g,L.row)}},a.prototype.autoIndent=function(){var h=this.session,u=h.getMode(),g,A;if(this.selection.isEmpty())g=0,A=h.doc.getLength()-1;else{var L=this.getSelectionRange();g=L.start.row,A=L.end.row}for(var M="",T="",I="",F,_,W,O=h.getTabString(),B=g;B<=A;B++)B>0&&(M=h.getState(B-1),T=h.getLine(B-1),I=u.getNextLineIndent(M,T,O)),F=h.getLine(B),_=u.$getIndent(F),I!==_&&(_.length>0&&(W=new c(B,0,B,_.length),h.remove(W)),I.length>0&&h.insert({row:B,column:0},I)),u.autoOutdent(M,h,B)},a.prototype.onTextInput=function(h,u){if(!u)return this.keyBinding.onTextInput(h);this.startOperation({command:{name:"insertstring"}});var g=this.applyComposition.bind(this,h,u);this.selection.rangeCount?this.forEachSelection(g):g(),this.endOperation()},a.prototype.applyComposition=function(h,u){if(u.extendLeft||u.extendRight){var g=this.selection.getRange();g.start.column-=u.extendLeft,g.end.column+=u.extendRight,g.start.column<0&&(g.start.row--,g.start.column+=this.session.getLine(g.start.row).length+1),this.selection.setRange(g),!h&&!g.isEmpty()&&this.remove()}if((h||!this.selection.isEmpty())&&this.insert(h,!0),u.restoreStart||u.restoreEnd){var g=this.selection.getRange();g.start.column-=u.restoreStart,g.end.column-=u.restoreEnd,this.selection.setRange(g)}},a.prototype.onCommandKey=function(h,u,g){return this.keyBinding.onCommandKey(h,u,g)},a.prototype.setOverwrite=function(h){this.session.setOverwrite(h)},a.prototype.getOverwrite=function(){return this.session.getOverwrite()},a.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},a.prototype.setScrollSpeed=function(h){this.setOption("scrollSpeed",h)},a.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},a.prototype.setDragDelay=function(h){this.setOption("dragDelay",h)},a.prototype.getDragDelay=function(){return this.getOption("dragDelay")},a.prototype.setSelectionStyle=function(h){this.setOption("selectionStyle",h)},a.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},a.prototype.setHighlightActiveLine=function(h){this.setOption("highlightActiveLine",h)},a.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},a.prototype.setHighlightGutterLine=function(h){this.setOption("highlightGutterLine",h)},a.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},a.prototype.setHighlightSelectedWord=function(h){this.setOption("highlightSelectedWord",h)},a.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},a.prototype.setAnimatedScroll=function(h){this.renderer.setAnimatedScroll(h)},a.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},a.prototype.setShowInvisibles=function(h){this.renderer.setShowInvisibles(h)},a.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},a.prototype.setDisplayIndentGuides=function(h){this.renderer.setDisplayIndentGuides(h)},a.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},a.prototype.setHighlightIndentGuides=function(h){this.renderer.setHighlightIndentGuides(h)},a.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},a.prototype.setShowPrintMargin=function(h){this.renderer.setShowPrintMargin(h)},a.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},a.prototype.setPrintMarginColumn=function(h){this.renderer.setPrintMarginColumn(h)},a.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},a.prototype.setReadOnly=function(h){this.setOption("readOnly",h)},a.prototype.getReadOnly=function(){return this.getOption("readOnly")},a.prototype.setBehavioursEnabled=function(h){this.setOption("behavioursEnabled",h)},a.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},a.prototype.setWrapBehavioursEnabled=function(h){this.setOption("wrapBehavioursEnabled",h)},a.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},a.prototype.setShowFoldWidgets=function(h){this.setOption("showFoldWidgets",h)},a.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},a.prototype.setFadeFoldWidgets=function(h){this.setOption("fadeFoldWidgets",h)},a.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},a.prototype.remove=function(h){this.selection.isEmpty()&&(h=="left"?this.selection.selectLeft():this.selection.selectRight());var u=this.getSelectionRange();if(this.getBehavioursEnabled()){var g=this.session,A=g.getState(u.start.row),L=g.getMode().transformAction(A,"deletion",this,g,u);if(u.end.column===0){var M=g.getTextRange(u);if(M[M.length-1]==`
`){var T=g.getLine(u.end.row);/^\s+$/.test(T)&&(u.end.column=T.length)}}L&&(u=L)}this.session.remove(u),this.clearSelection()},a.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},a.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},a.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},a.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var h=this.getSelectionRange();h.start.column==h.end.column&&h.start.row==h.end.row&&(h.end.column=0,h.end.row++),this.session.remove(h),this.clearSelection()},a.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var h=this.getCursorPosition();this.insert(`
`),this.moveCursorToPosition(h)},a.prototype.setGhostText=function(h,u){this.session.widgetManager||(this.session.widgetManager=new b(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(h,u)},a.prototype.removeGhostText=function(){!this.session.widgetManager||this.renderer.removeGhostText()},a.prototype.transposeLetters=function(){if(!!this.selection.isEmpty()){var h=this.getCursorPosition(),u=h.column;if(u!==0){var g=this.session.getLine(h.row),A,L;u<g.length?(A=g.charAt(u)+g.charAt(u-1),L=new c(h.row,u-1,h.row,u+1)):(A=g.charAt(u-1)+g.charAt(u-2),L=new c(h.row,u-2,h.row,u)),this.session.replace(L,A),this.session.selection.moveToPosition(L.end)}}},a.prototype.toLowerCase=function(){var h=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var u=this.getSelectionRange(),g=this.session.getTextRange(u);this.session.replace(u,g.toLowerCase()),this.selection.setSelectionRange(h)},a.prototype.toUpperCase=function(){var h=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var u=this.getSelectionRange(),g=this.session.getTextRange(u);this.session.replace(u,g.toUpperCase()),this.selection.setSelectionRange(h)},a.prototype.indent=function(){var h=this.session,u=this.getSelectionRange();if(u.start.row<u.end.row){var g=this.$getSelectedRows();h.indentRows(g.first,g.last," ");return}else if(u.start.column<u.end.column){var A=h.getTextRange(u);if(!/^\s+$/.test(A)){var g=this.$getSelectedRows();h.indentRows(g.first,g.last," ");return}}var L=h.getLine(u.start.row),M=u.start,T=h.getTabSize(),I=h.documentToScreenColumn(M.row,M.column);if(this.session.getUseSoftTabs())var F=T-I%T,_=s.stringRepeat(" ",F);else{for(var F=I%T;L[u.start.column-1]==" "&&F;)u.start.column--,F--;this.selection.setSelectionRange(u),_=" "}return this.insert(_)},a.prototype.blockIndent=function(){var h=this.$getSelectedRows();this.session.indentRows(h.first,h.last," ")},a.prototype.blockOutdent=function(){var h=this.session.getSelection();this.session.outdentRows(h.getRange())},a.prototype.sortLines=function(){for(var h=this.$getSelectedRows(),u=this.session,g=[],A=h.first;A<=h.last;A++)g.push(u.getLine(A));g.sort(function(T,I){return T.toLowerCase()<I.toLowerCase()?-1:T.toLowerCase()>I.toLowerCase()?1:0});for(var L=new c(0,0,0,0),A=h.first;A<=h.last;A++){var M=u.getLine(A);L.start.row=A,L.end.row=A,L.end.column=M.length,u.replace(L,g[A-h.first])}},a.prototype.toggleCommentLines=function(){var h=this.session.getState(this.getCursorPosition().row),u=this.$getSelectedRows();this.session.getMode().toggleCommentLines(h,this.session,u.first,u.last)},a.prototype.toggleBlockComment=function(){var h=this.getCursorPosition(),u=this.session.getState(h.row),g=this.getSelectionRange();this.session.getMode().toggleBlockComment(u,this.session,g,h)},a.prototype.getNumberAt=function(h,u){var g=/[\-]?[0-9]+(?:\.[0-9]+)?/g;g.lastIndex=0;for(var A=this.session.getLine(h);g.lastIndex<u;){var L=g.exec(A);if(L.index<=u&&L.index+L[0].length>=u){var M={value:L[0],start:L.index,end:L.index+L[0].length};return M}}return null},a.prototype.modifyNumber=function(h){var u=this.selection.getCursor().row,g=this.selection.getCursor().column,A=new c(u,g-1,u,g),L=this.session.getTextRange(A);if(!isNaN(parseFloat(L))&&isFinite(L)){var M=this.getNumberAt(u,g);if(M){var T=M.value.indexOf(".")>=0?M.start+M.value.indexOf(".")+1:M.end,I=M.start+M.value.length-T,F=parseFloat(M.value);F*=Math.pow(10,I),T!==M.end&&g<T?h*=Math.pow(10,M.end-g-1):h*=Math.pow(10,M.end-g),F+=h,F/=Math.pow(10,I);var _=F.toFixed(I),W=new c(u,M.start,u,M.end);this.session.replace(W,_),this.moveCursorTo(u,Math.max(M.start+1,g+_.length-M.value.length))}}else this.toggleWord()},a.prototype.toggleWord=function(){var h=this.selection.getCursor().row,u=this.selection.getCursor().column;this.selection.selectWord();var g=this.getSelectedText(),A=this.selection.getWordRange().start.column,L=g.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),M=u-A-1;M<0&&(M=0);var T=0,I=0,F=this;g.match(/[A-Za-z0-9_]+/)&&L.forEach(function(N,U){I=T+N.length,M>=T&&M<=I&&(g=N,F.selection.clearSelection(),F.moveCursorTo(h,T+A),F.selection.selectTo(h,I+A)),T=I});for(var _=this.$toggleWordPairs,W,O=0;O<_.length;O++)for(var B=_[O],H=0;H<=1;H++){var z=+!H,Y=g.match(new RegExp("^\\s?_?("+s.escapeRegExp(B[H])+")\\s?$","i"));if(Y){var Z=g.match(new RegExp("([_]|^|\\s)("+s.escapeRegExp(Y[1])+")($|\\s)","g"));Z&&(W=g.replace(new RegExp(s.escapeRegExp(B[H]),"i"),function(N){var U=B[z];return N.toUpperCase()==N?U=U.toUpperCase():N.charAt(0).toUpperCase()==N.charAt(0)&&(U=U.substr(0,0)+B[z].charAt(0).toUpperCase()+U.substr(1)),U}),this.insert(W),W="")}}},a.prototype.findLinkAt=function(h,u){var g,A,L=this.session.getLine(h),M=L.split(/((?:https?|ftp):\/\/[\S]+)/),T=u;T<0&&(T=0);var I=0,F=0,_;try{for(var W=R(M),O=W.next();!O.done;O=W.next()){var B=O.value;if(F=I+B.length,T>=I&&T<=F&&B.match(/((?:https?|ftp):\/\/[\S]+)/)){_=B.replace(/[\s:.,'";}\]]+$/,"");break}I=F}}catch(H){g={error:H}}finally{try{O&&!O.done&&(A=W.return)&&A.call(W)}finally{if(g)throw g.error}}return _},a.prototype.openLink=function(){var h=this.selection.getCursor(),u=this.findLinkAt(h.row,h.column);return u&&window.open(u,"_blank"),u!=null},a.prototype.removeLines=function(){var h=this.$getSelectedRows();this.session.removeFullLines(h.first,h.last),this.clearSelection()},a.prototype.duplicateSelection=function(){var h=this.selection,u=this.session,g=h.getRange(),A=h.isBackwards();if(g.isEmpty()){var L=g.start.row;u.duplicateLines(L,L)}else{var M=A?g.start:g.end,T=u.insert(M,u.getTextRange(g),!1);g.start=M,g.end=T,h.setSelectionRange(g,A)}},a.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},a.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},a.prototype.moveText=function(h,u,g){return this.session.moveText(h,u,g)},a.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},a.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},a.prototype.$moveLines=function(h,u){var g,A,L=this.selection;if(!L.inMultiSelectMode||this.inVirtualSelectionMode){var M=L.toOrientedRange();g=this.$getSelectedRows(M),A=this.session.$moveLines(g.first,g.last,u?0:h),u&&h==-1&&(A=0),M.moveBy(A,0),L.fromOrientedRange(M)}else{var T=L.rangeList.ranges;L.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var I=0,F=0,_=T.length,W=0;W<_;W++){var O=W;T[W].moveBy(I,0),g=this.$getSelectedRows(T[W]);for(var B=g.first,H=g.last;++W<_;){F&&T[W].moveBy(F,0);var z=this.$getSelectedRows(T[W]);if(u&&z.first!=H)break;if(!u&&z.first>H+1)break;H=z.last}for(W--,I=this.session.$moveLines(B,H,u?0:h),u&&h==-1&&(O=W+1);O<=W;)T[O].moveBy(I,0),O++;u||(I=0),F+=I}L.fromOrientedRange(L.ranges[0]),L.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},a.prototype.$getSelectedRows=function(h){return h=(h||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(h.start.row),last:this.session.getRowFoldEnd(h.end.row)}},a.prototype.onCompositionStart=function(h){this.renderer.showComposition(h)},a.prototype.onCompositionUpdate=function(h){this.renderer.setCompositionText(h)},a.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},a.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},a.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},a.prototype.isRowVisible=function(h){return h>=this.getFirstVisibleRow()&&h<=this.getLastVisibleRow()},a.prototype.isRowFullyVisible=function(h){return h>=this.renderer.getFirstFullyVisibleRow()&&h<=this.renderer.getLastFullyVisibleRow()},a.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},a.prototype.$moveByPage=function(h,u){var g=this.renderer,A=this.renderer.layerConfig,L=h*Math.floor(A.height/A.lineHeight);u===!0?this.selection.$moveSelection(function(){this.moveCursorBy(L,0)}):u===!1&&(this.selection.moveCursorBy(L,0),this.selection.clearSelection());var M=g.scrollTop;g.scrollBy(0,L*A.lineHeight),u!=null&&g.scrollCursorIntoView(null,.5),g.animateScrolling(M)},a.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},a.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},a.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},a.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},a.prototype.scrollPageDown=function(){this.$moveByPage(1)},a.prototype.scrollPageUp=function(){this.$moveByPage(-1)},a.prototype.scrollToRow=function(h){this.renderer.scrollToRow(h)},a.prototype.scrollToLine=function(h,u,g,A){this.renderer.scrollToLine(h,u,g,A)},a.prototype.centerSelection=function(){var h=this.getSelectionRange(),u={row:Math.floor(h.start.row+(h.end.row-h.start.row)/2),column:Math.floor(h.start.column+(h.end.column-h.start.column)/2)};this.renderer.alignCursor(u,.5)},a.prototype.getCursorPosition=function(){return this.selection.getCursor()},a.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},a.prototype.getSelectionRange=function(){return this.selection.getRange()},a.prototype.selectAll=function(){this.selection.selectAll()},a.prototype.clearSelection=function(){this.selection.clearSelection()},a.prototype.moveCursorTo=function(h,u){this.selection.moveCursorTo(h,u)},a.prototype.moveCursorToPosition=function(h){this.selection.moveCursorToPosition(h)},a.prototype.jumpToMatching=function(h,u){var g=this.getCursorPosition(),A=new m(this.session,g.row,g.column),L=A.getCurrentToken(),M=0;L&&L.type.indexOf("tag-name")!==-1&&(L=A.stepBackward());var T=L||A.stepForward();if(!!T){var I,F=!1,_={},W=g.column-T.start,O,B={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(T.value.match(/[{}()\[\]]/g)){for(;W<T.value.length&&!F;W++)if(!!B[T.value[W]])switch(O=B[T.value[W]]+"."+T.type.replace("rparen","lparen"),isNaN(_[O])&&(_[O]=0),T.value[W]){case"(":case"[":case"{":_[O]++;break;case")":case"]":case"}":_[O]--,_[O]===-1&&(I="bracket",F=!0);break}}else T.type.indexOf("tag-name")!==-1&&(isNaN(_[T.value])&&(_[T.value]=0),L.value==="<"&&M>1?_[T.value]++:L.value==="</"&&_[T.value]--,_[T.value]===-1&&(I="tag",F=!0));F||(L=T,M++,T=A.stepForward(),W=0)}while(T&&!F);if(!!I){var H,z;if(I==="bracket")H=this.session.getBracketRange(g),H||(H=new c(A.getCurrentTokenRow(),A.getCurrentTokenColumn()+W-1,A.getCurrentTokenRow(),A.getCurrentTokenColumn()+W-1),z=H.start,(u||z.row===g.row&&Math.abs(z.column-g.column)<2)&&(H=this.session.getBracketRange(z)));else if(I==="tag"){if(!T||T.type.indexOf("tag-name")===-1)return;if(H=new c(A.getCurrentTokenRow(),A.getCurrentTokenColumn()-2,A.getCurrentTokenRow(),A.getCurrentTokenColumn()-2),H.compare(g.row,g.column)===0){var Y=this.session.getMatchingTags(g);Y&&(Y.openTag.contains(g.row,g.column)?(H=Y.closeTag,z=H.start):(H=Y.openTag,Y.closeTag.start.row===g.row&&Y.closeTag.start.column===g.column?z=H.end:z=H.start))}z=z||H.start}z=H&&H.cursor||z,z&&(h?H&&u?this.selection.setRange(H):H&&H.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(z.row,z.column):this.selection.moveTo(z.row,z.column))}}},a.prototype.gotoLine=function(h,u,g){this.selection.clearSelection(),this.session.unfold({row:h-1,column:u||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(h-1,u||0),this.isRowFullyVisible(h-1)||this.scrollToLine(h-1,!0,g)},a.prototype.navigateTo=function(h,u){this.selection.moveTo(h,u)},a.prototype.navigateUp=function(h){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var u=this.selection.anchor.getPosition();return this.moveCursorToPosition(u)}this.selection.clearSelection(),this.selection.moveCursorBy(-h||-1,0)},a.prototype.navigateDown=function(h){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var u=this.selection.anchor.getPosition();return this.moveCursorToPosition(u)}this.selection.clearSelection(),this.selection.moveCursorBy(h||1,0)},a.prototype.navigateLeft=function(h){if(this.selection.isEmpty())for(h=h||1;h--;)this.selection.moveCursorLeft();else{var u=this.getSelectionRange().start;this.moveCursorToPosition(u)}this.clearSelection()},a.prototype.navigateRight=function(h){if(this.selection.isEmpty())for(h=h||1;h--;)this.selection.moveCursorRight();else{var u=this.getSelectionRange().end;this.moveCursorToPosition(u)}this.clearSelection()},a.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},a.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},a.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},a.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},a.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},a.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},a.prototype.replace=function(h,u){u&&this.$search.set(u);var g=this.$search.find(this.session),A=0;return g&&(this.$tryReplace(g,h)&&(A=1),this.selection.setSelectionRange(g),this.renderer.scrollSelectionIntoView(g.start,g.end)),A},a.prototype.replaceAll=function(h,u){u&&this.$search.set(u);var g=this.$search.findAll(this.session),A=0;if(!g.length)return A;var L=this.getSelectionRange();this.selection.moveTo(0,0);for(var M=g.length-1;M>=0;--M)this.$tryReplace(g[M],h)&&A++;return this.selection.setSelectionRange(L),A},a.prototype.$tryReplace=function(h,u){var g=this.session.getTextRange(h);return u=this.$search.replace(g,u),u!==null?(h.end=this.session.replace(h,u),h):null},a.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},a.prototype.find=function(h,u,g){u||(u={}),typeof h=="string"||h instanceof RegExp?u.needle=h:typeof h=="object"&&k.mixin(u,h);var A=this.selection.getRange();u.needle==null&&(h=this.session.getTextRange(A)||this.$search.$options.needle,h||(A=this.session.getWordRange(A.start.row,A.start.column),h=this.session.getTextRange(A)),this.$search.set({needle:h})),this.$search.set(u),u.start||this.$search.set({start:A});var L=this.$search.find(this.session);if(u.preventScroll)return L;if(L)return this.revealRange(L,g),L;u.backwards?A.start=A.end:A.end=A.start,this.selection.setRange(A)},a.prototype.findNext=function(h,u){this.find({skipCurrent:!0,backwards:!1},h,u)},a.prototype.findPrevious=function(h,u){this.find(h,{skipCurrent:!0,backwards:!0},u)},a.prototype.revealRange=function(h,u){this.session.unfold(h),this.selection.setSelectionRange(h);var g=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(h.start,h.end,.5),u!==!1&&this.renderer.animateScrolling(g)},a.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},a.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},a.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(h){h.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()},a.prototype.setAutoScrollEditorIntoView=function(h){if(!!h){var u,g=this,A=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var L=this.$scrollAnchor;L.style.cssText="position:absolute",this.container.insertBefore(L,this.container.firstChild);var M=this.on("changeSelection",function(){A=!0}),T=this.renderer.on("beforeRender",function(){A&&(u=g.renderer.container.getBoundingClientRect())}),I=this.renderer.on("afterRender",function(){if(A&&u&&(g.isFocused()||g.searchBox&&g.searchBox.isFocused())){var F=g.renderer,_=F.$cursorLayer.$pixelPos,W=F.layerConfig,O=_.top-W.offset;_.top>=0&&O+u.top<0?A=!0:_.top<W.height&&_.top+u.top+W.lineHeight>window.innerHeight?A=!1:A=null,A!=null&&(L.style.top=O+"px",L.style.left=_.left+"px",L.style.height=W.lineHeight+"px",L.scrollIntoView(A)),A=u=null}});this.setAutoScrollEditorIntoView=function(F){F||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",M),this.renderer.off("afterRender",I),this.renderer.off("beforeRender",T))}}},a.prototype.$resetCursorStyle=function(){var h=this.$cursorStyle||"ace",u=this.renderer.$cursorLayer;!u||(u.setSmoothBlinking(/smooth/.test(h)),u.isBlinking=!this.$readOnly&&h!="wide",C.setCssClass(u.element,"ace_slim-cursors",/slim/.test(h)))},a.prototype.prompt=function(h,u,g){var A=this;y.loadModule("ace/ext/prompt",function(L){L.prompt(A,h,u,g)})},a}();v.$uid=0,v.prototype.curOp=null,v.prototype.prevOp={},v.prototype.$mergeableCommands=["backspace","del","insertstring"],v.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"],["&&","||"],["==","!="]],k.implement(v.prototype,d),y.defineOptions(v.prototype,"editor",{selectionStyle:{set:function(a){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:a})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(a){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(a){this.textInput.setReadOnly(a),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(a){this.textInput.setCopyWithEmptySelection(a)},initialValue:!1},cursorStyle:{set:function(a){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(a){this.setAutoScrollEditorIntoView(a)}},keyboardHandler:{set:function(a){this.setKeyboardHandler(a)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(a){this.session.setValue(a)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(a){this.setSession(a)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(a){this.renderer.$gutterLayer.setShowLineNumbers(a),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),a&&this.$relativeLineNumbers?f.attach(this):f.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(a){this.$showLineNumbers&&a?f.attach(this):f.detach(this)}},placeholder:{set:function(a){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var h=this.session&&(this.renderer.$composition||this.getValue());if(h&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),C.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!h&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),C.addCssClass(this.container,"ace_hasPlaceholder");var u=C.createElement("div");u.className="ace_placeholder",u.textContent=this.$placeholder||"",this.renderer.placeholderNode=u,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!h&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(a){var h={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(A){A.blur(),A.renderer.content.focus()},readOnly:!0},u=function(A){A.target==this.renderer.content&&A.keyCode===w.enter&&(A.stopPropagation(),A.preventDefault(),this.focus())},g="ace_keyboard-focus";a?(this.textInput.getElement().setAttribute("tabindex",-1),this.renderer.content.setAttribute("tabindex",0),this.renderer.content.classList.add(g),this.renderer.content.setAttribute("aria-label","Editor, press Enter key to start editing, press Escape key to exit"),this.renderer.content.addEventListener("keyup",u.bind(this)),this.commands.addCommand(h)):(this.textInput.getElement().setAttribute("tabindex",0),this.renderer.content.setAttribute("tabindex",-1),this.renderer.content.classList.remove(g),this.renderer.content.setAttribute("aria-label",""),this.renderer.content.removeEventListener("keyup",u.bind(this)),this.commands.removeCommand(h))},initialValue:!1},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",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 f={getText:function(a,h){return(Math.abs(a.selection.lead.row-h)||h+1+(h<9?"\xB7":""))+""},getWidth:function(a,h,u){return Math.max(h.toString().length,(u.lastRow+1).toString().length,2)*u.characterWidth},update:function(a,h){h.renderer.$loop.schedule(h.renderer.CHANGE_GUTTER)},attach:function(a){a.renderer.$gutterLayer.$renderer=this,a.on("changeSelection",this.update),this.update(null,a)},detach:function(a){a.renderer.$gutterLayer.$renderer==this&&(a.renderer.$gutterLayer.$renderer=null),a.off("changeSelection",this.update),this.update(null,a)}};x.Editor=v}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(E,x,P){"use strict";var R=function(){function p(){this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=Infinity,this.reset()}return p.prototype.addSession=function(w){this.$session=w},p.prototype.add=function(w,v,f){if(!this.$fromUndo&&w!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),v===!1||!this.lastDeltas){this.lastDeltas=[];var a=this.$undoStack.length;a>this.$undoDepth-1&&this.$undoStack.splice(0,a-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),w.id=this.$rev=++this.$maxRev}(w.action=="remove"||w.action=="insert")&&(this.$lastDelta=w),this.lastDeltas.push(w)}},p.prototype.addSelection=function(w,v){this.selections.push({value:w,rev:v||this.$rev})},p.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},p.prototype.markIgnored=function(w,v){v==null&&(v=this.$rev+1);for(var f=this.$undoStack,a=f.length;a--;){var h=f[a][0];if(h.id<=w)break;h.id<v&&(h.ignore=!0)}this.lastDeltas=null},p.prototype.getSelection=function(w,v){for(var f=this.selections,a=f.length;a--;){var h=f[a];if(h.rev<w)return v&&(h=f[a+1]),h}},p.prototype.getRevision=function(){return this.$rev},p.prototype.getDeltas=function(w,v){v==null&&(v=this.$rev+1);for(var f=this.$undoStack,a=null,h=0,u=f.length;u--;){var g=f[u][0];if(g.id<v&&!a&&(a=u+1),g.id<=w){h=u+1;break}}return f.slice(h,a)},p.prototype.getChangedRanges=function(w,v){v==null&&(v=this.$rev+1)},p.prototype.getChangedLines=function(w,v){v==null&&(v=this.$rev+1)},p.prototype.undo=function(w,v){this.lastDeltas=null;var f=this.$undoStack;if(!!k(f,f.length)){w||(w=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var a=f.pop(),h=null;return a&&(h=w.undoChanges(a,v),this.$redoStack.push(a),this.$syncRev()),this.$fromUndo=!1,h}},p.prototype.redo=function(w,v){if(this.lastDeltas=null,w||(w=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var f=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);b(this.$redoStack,f),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(u){u[0].id=++this.$maxRev},this)}var a=this.$redoStack.pop(),h=null;return a&&(h=w.redoChanges(a,v),this.$undoStack.push(a),this.$syncRev()),this.$fromUndo=!1,h},p.prototype.$syncRev=function(){var w=this.$undoStack,v=w[w.length-1],f=v&&v[0].id||0;this.$redoStackBaseRev=f,this.$rev=f},p.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},p.prototype.canUndo=function(){return this.$undoStack.length>0},p.prototype.canRedo=function(){return this.$redoStack.length>0},p.prototype.bookmark=function(w){w==null&&(w=this.$rev),this.mark=w},p.prototype.isAtBookmark=function(){return this.$rev===this.mark},p.prototype.toJSON=function(){},p.prototype.fromJSON=function(){},p.prototype.$prettyPrint=function(w){return w?t(w):t(this.$undoStack)+`
---
`+t(this.$redoStack)},p}();R.prototype.hasUndo=R.prototype.canUndo,R.prototype.hasRedo=R.prototype.canRedo,R.prototype.isClean=R.prototype.isAtBookmark,R.prototype.markClean=R.prototype.bookmark;function k(p,w){for(var v=w;v--;){var f=p[v];if(f&&!f[0].ignore){for(;v<w-1;){var a=c(p[v],p[v+1]);p[v]=a[0],p[v+1]=a[1],v++}return!0}}}var C=E("./range").Range,s=C.comparePoints,l=C.comparePoints;function e(p){var w=p.action=="insert",v=p.start,f=p.end,a=(f.row-v.row)*(w?1:-1),h=(f.column-v.column)*(w?1:-1);w&&(f=v);for(var u in this.marks){var g=this.marks[u],A=l(g,v);if(!(A<0)){if(A===0&&w)if(g.bias==1)A=1;else{g.bias==-1;continue}var L=w?A:l(g,f);if(L>0){g.row+=a,g.column+=g.row==f.row?h:0;continue}!w&&L<=0&&(g.row=v.row,g.column=v.column,L===0&&(g.bias=1))}}}function n(p){return{row:p.row,column:p.column}}function i(p){return{start:n(p.start),end:n(p.end),action:p.action,lines:p.lines.slice()}}function t(p){if(p=p||this,Array.isArray(p))return p.map(t).join(`
`);var w="";return p.action?(w=p.action=="insert"?"+":"-",w+="["+p.lines+"]"):p.value&&(Array.isArray(p.value)?w=p.value.map(r).join(`
`):w=r(p.value)),p.start&&(w+=r(p)),(p.id||p.rev)&&(w+=" ("+(p.id||p.rev)+")"),w}function r(p){return p.start.row+":"+p.start.column+"=>"+p.end.row+":"+p.end.column}function o(p,w){var v=p.action=="insert",f=w.action=="insert";if(v&&f)if(s(w.start,p.end)>=0)$(w,p,-1);else if(s(w.start,p.start)<=0)$(p,w,1);else return null;else if(v&&!f)if(s(w.start,p.end)>=0)$(w,p,-1);else if(s(w.end,p.start)<=0)$(p,w,-1);else return null;else if(!v&&f)if(s(w.start,p.start)>=0)$(w,p,1);else if(s(w.start,p.start)<=0)$(p,w,1);else return null;else if(!v&&!f)if(s(w.start,p.start)>=0)$(w,p,1);else if(s(w.end,p.start)<=0)$(p,w,-1);else return null;return[w,p]}function c(p,w){for(var v=p.length;v--;)for(var f=0;f<w.length;f++)if(!o(p[v],w[f])){for(;v<p.length;){for(;f--;)o(w[f],p[v]);f=w.length,v++}return[p,w]}return p.selectionBefore=w.selectionBefore=p.selectionAfter=w.selectionAfter=null,[w,p]}function d(p,w){var v=p.action=="insert",f=w.action=="insert";if(v&&f)s(p.start,w.start)<0?$(w,p,1):$(p,w,1);else if(v&&!f)s(p.start,w.end)>=0?$(p,w,-1):(s(p.start,w.start)<=0||$(p,C.fromPoints(w.start,p.start),-1),$(w,p,1));else if(!v&&f)s(w.start,p.end)>=0?$(w,p,-1):(s(w.start,p.start)<=0||$(w,C.fromPoints(p.start,w.start),-1),$(p,w,1));else if(!v&&!f)if(s(w.start,p.end)>=0)$(w,p,-1);else if(s(w.end,p.start)<=0)$(p,w,-1);else{var a,h;return s(p.start,w.start)<0&&(a=p,p=y(p,w.start)),s(p.end,w.end)>0&&(h=y(p,w.end)),S(w.end,p.start,p.end,-1),h&&!a&&(p.lines=h.lines,p.start=h.start,p.end=h.end,h=p),[w,a,h].filter(Boolean)}return[w,p]}function $(p,w,v){S(p.start,w.start,w.end,v),S(p.end,w.start,w.end,v)}function S(p,w,v,f){p.row==(f==1?w:v).row&&(p.column+=f*(v.column-w.column)),p.row+=f*(v.row-w.row)}function y(p,w){var v=p.lines,f=p.end;p.end=n(w);var a=p.end.row-p.start.row,h=v.splice(a,v.length),u=a?w.column:w.column-p.start.column;v.push(h[0].substring(0,u)),h[0]=h[0].substr(u);var g={start:n(w),end:f,lines:h,action:p.action};return g}function m(p,w){w=i(w);for(var v=p.length;v--;){for(var f=p[v],a=0;a<f.length;a++){var h=f[a],u=d(h,w);w=u[0],u.length!=2&&(u[2]?(f.splice(a+1,1,u[1],u[2]),a++):u[1]||(f.splice(a,1),a--))}f.length||p.splice(v,1)}return p}function b(p,w){for(var v=0;v<w.length;v++)for(var f=w[v],a=0;a<f.length;a++)m(p,f[a])}x.UndoManager=R}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(E,x,P){"use strict";var R=E("../lib/dom"),k=function(){function C(s,l){this.element=s,this.canvasHeight=l||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return C.prototype.moveContainer=function(s){R.translate(this.element,0,-(s.firstRowScreen*s.lineHeight%this.canvasHeight)-s.offset*this.$offsetCoefficient)},C.prototype.pageChanged=function(s,l){return Math.floor(s.firstRowScreen*s.lineHeight/this.canvasHeight)!==Math.floor(l.firstRowScreen*l.lineHeight/this.canvasHeight)},C.prototype.computeLineTop=function(s,l,e){var n=l.firstRowScreen*l.lineHeight,i=Math.floor(n/this.canvasHeight),t=e.documentToScreenRow(s,0)*l.lineHeight;return t-i*this.canvasHeight},C.prototype.computeLineHeight=function(s,l,e){return l.lineHeight*e.getRowLineCount(s)},C.prototype.getLength=function(){return this.cells.length},C.prototype.get=function(s){return this.cells[s]},C.prototype.shift=function(){this.$cacheCell(this.cells.shift())},C.prototype.pop=function(){this.$cacheCell(this.cells.pop())},C.prototype.push=function(s){if(Array.isArray(s)){this.cells.push.apply(this.cells,s);for(var l=R.createFragment(this.element),e=0;e<s.length;e++)l.appendChild(s[e].element);this.element.appendChild(l)}else this.cells.push(s),this.element.appendChild(s.element)},C.prototype.unshift=function(s){if(Array.isArray(s)){this.cells.unshift.apply(this.cells,s);for(var l=R.createFragment(this.element),e=0;e<s.length;e++)l.appendChild(s[e].element);this.element.firstChild?this.element.insertBefore(l,this.element.firstChild):this.element.appendChild(l)}else this.cells.unshift(s),this.element.insertAdjacentElement("afterbegin",s.element)},C.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},C.prototype.$cacheCell=function(s){!s||(s.element.remove(),this.cellCache.push(s))},C.prototype.createCell=function(s,l,e,n){var i=this.cellCache.pop();if(!i){var t=R.createElement("div");n&&n(t),this.element.appendChild(t),i={element:t,text:"",row:s}}return i.row=s,i},C}();x.Lines=k}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines"],function(E,x,P){"use strict";var R=E("../lib/dom"),k=E("../lib/oop"),C=E("../lib/lang"),s=E("../lib/event_emitter").EventEmitter,l=E("./lines").Lines,e=function(){function i(t){this.element=R.createElement("div"),this.element.className="ace_layer ace_gutter-layer",t.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new l(this.element),this.$lines.$offsetCoefficient=1}return i.prototype.setSession=function(t){this.session&&this.session.off("change",this.$updateAnnotations),this.session=t,t&&t.on("change",this.$updateAnnotations)},i.prototype.addGutterDecoration=function(t,r){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(t,r)},i.prototype.removeGutterDecoration=function(t,r){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(t,r)},i.prototype.setAnnotations=function(t){this.$annotations=[];for(var r=0;r<t.length;r++){var o=t[r],c=o.row,d=this.$annotations[c];d||(d=this.$annotations[c]={text:[],type:[]});var $=o.text,S=o.type;$=$?C.escapeHTML($):o.html||"",d.text.indexOf($)===-1&&(d.text.push($),d.type.push(S));var y=o.className;y?d.className=y:S=="error"?d.className=" ace_error":S=="warning"&&d.className!=" ace_error"?d.className=" ace_warning":S=="info"&&!d.className&&(d.className=" ace_info")}},i.prototype.$updateAnnotations=function(t){if(!!this.$annotations.length){var r=t.start.row,o=t.end.row-r;if(o!==0)if(t.action=="remove")this.$annotations.splice(r,o+1,null);else{var c=new Array(o+1);c.unshift(r,1),this.$annotations.splice.apply(this.$annotations,c)}}},i.prototype.update=function(t){this.config=t;var r=this.session,o=t.firstRow,c=Math.min(t.lastRow+t.gutterOffset,r.getLength()-1);this.oldLastRow=c,this.config=t,this.$lines.moveContainer(t),this.$updateCursorRow();for(var d=r.getNextFoldLine(o),$=d?d.start.row:Infinity,S=null,y=-1,m=o;;){if(m>$&&(m=d.end.row+1,d=r.getNextFoldLine(m,d),$=d?d.start.row:Infinity),m>c){for(;this.$lines.getLength()>y+1;)this.$lines.pop();break}S=this.$lines.get(++y),S?S.row=m:(S=this.$lines.createCell(m,t,this.session,n),this.$lines.push(S)),this.$renderCell(S,t,d,m),m++}this._signal("afterRender"),this.$updateGutterWidth(t)},i.prototype.$updateGutterWidth=function(t){var r=this.session,o=r.gutterRenderer||this.$renderer,c=r.$firstLineNumber,d=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||r.$useWrapMode)&&(d=r.getLength()+c-1);var $=o?o.getWidth(r,d,t):d.toString().length*t.characterWidth,S=this.$padding||this.$computePadding();$+=S.left+S.right,$!==this.gutterWidth&&!isNaN($)&&(this.gutterWidth=$,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",$))},i.prototype.$updateCursorRow=function(){if(!!this.$highlightGutterLine){var t=this.session.selection.getCursor();this.$cursorRow!==t.row&&(this.$cursorRow=t.row)}},i.prototype.updateLineHighlight=function(){if(!!this.$highlightGutterLine){var t=this.session.selection.cursor.row;if(this.$cursorRow=t,!(this.$cursorCell&&this.$cursorCell.row==t)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var r=this.$lines.cells;this.$cursorCell=null;for(var o=0;o<r.length;o++){var c=r[o];if(c.row>=this.$cursorRow){if(c.row>this.$cursorRow){var d=this.session.getFoldLine(this.$cursorRow);if(o>0&&d&&d.start.row==r[o-1].row)c=r[o-1];else break}c.element.className="ace_gutter-active-line "+c.element.className,this.$cursorCell=c;break}}}}},i.prototype.scrollLines=function(t){var r=this.config;if(this.config=t,this.$updateCursorRow(),this.$lines.pageChanged(r,t))return this.update(t);this.$lines.moveContainer(t);var o=Math.min(t.lastRow+t.gutterOffset,this.session.getLength()-1),c=this.oldLastRow;if(this.oldLastRow=o,!r||c<t.firstRow)return this.update(t);if(o<r.firstRow)return this.update(t);if(r.firstRow<t.firstRow)for(var d=this.session.getFoldedRowCount(r.firstRow,t.firstRow-1);d>0;d--)this.$lines.shift();if(c>o)for(var d=this.session.getFoldedRowCount(o+1,c);d>0;d--)this.$lines.pop();t.firstRow<r.firstRow&&this.$lines.unshift(this.$renderLines(t,t.firstRow,r.firstRow-1)),o>c&&this.$lines.push(this.$renderLines(t,c+1,o)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(t)},i.prototype.$renderLines=function(t,r,o){for(var c=[],d=r,$=this.session.getNextFoldLine(d),S=$?$.start.row:Infinity;d>S&&(d=$.end.row+1,$=this.session.getNextFoldLine(d,$),S=$?$.start.row:Infinity),!(d>o);){var y=this.$lines.createCell(d,t,this.session,n);this.$renderCell(y,t,$,d),c.push(y),d++}return c},i.prototype.$renderCell=function(t,r,o,c){var d=t.element,$=this.session,S=d.childNodes[0],y=d.childNodes[1],m=d.childNodes[2],b=$.$firstLineNumber,p=$.$breakpoints,w=$.$decorations,v=$.gutterRenderer||this.$renderer,f=this.$showFoldWidgets&&$.foldWidgets,a=o?o.start.row:Number.MAX_VALUE,h=r.lineHeight+"px",u;if(this.$useSvgGutterIcons?(u="ace_gutter-cell_svg-icons ",this.$annotations[c]?(m.className="ace_icon_svg"+this.$annotations[c].className,R.setStyle(m.style,"height",h),R.setStyle(m.style,"display","block")):R.setStyle(m.style,"display","none")):(u="ace_gutter-cell ",R.setStyle(m.style,"display","none")),this.$highlightGutterLine&&(c==this.$cursorRow||o&&c<this.$cursorRow&&c>=a&&this.$cursorRow<=o.end.row)&&(u+="ace_gutter-active-line ",this.$cursorCell!=t&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=t)),p[c]&&(u+=p[c]),w[c]&&(u+=w[c]),this.$annotations[c]&&(u+=this.$annotations[c].className),d.className!=u&&(d.className=u),f){var g=f[c];g==null&&(g=f[c]=$.getFoldWidget(c))}if(g){var u="ace_fold-widget ace_"+g;g=="start"&&c==a&&c<o.end.row?u+=" ace_closed":u+=" ace_open",y.className!=u&&(y.className=u),R.setStyle(y.style,"height",h),R.setStyle(y.style,"display","inline-block")}else y&&R.setStyle(y.style,"display","none");var A=(v?v.getText($,c):c+b).toString();return A!==S.data&&(S.data=A),R.setStyle(t.element.style,"height",this.$lines.computeLineHeight(c,r,$)+"px"),R.setStyle(t.element.style,"top",this.$lines.computeLineTop(c,r,$)+"px"),t.text=A,t},i.prototype.setHighlightGutterLine=function(t){this.$highlightGutterLine=t},i.prototype.setShowLineNumbers=function(t){this.$renderer=!t&&{getWidth:function(){return 0},getText:function(){return""}}},i.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},i.prototype.setShowFoldWidgets=function(t){t?R.addCssClass(this.element,"ace_folding-enabled"):R.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=t,this.$padding=null},i.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},i.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var t=R.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(t.borderLeftWidth)||0)+(parseInt(t.paddingLeft)||0)+1,this.$padding.right=(parseInt(t.borderRightWidth)||0)+(parseInt(t.paddingRight)||0),this.$padding},i.prototype.getRegion=function(t){var r=this.$padding||this.$computePadding(),o=this.element.getBoundingClientRect();if(t.x<r.left+o.left)return"markers";if(this.$showFoldWidgets&&t.x>o.right-r.right)return"foldWidgets"},i}();e.prototype.$fixedWidth=!1,e.prototype.$highlightGutterLine=!0,e.prototype.$renderer="",e.prototype.$showLineNumbers=!0,e.prototype.$showFoldWidgets=!0,k.implement(e.prototype,s);function n(i){var t=document.createTextNode("");i.appendChild(t);var r=R.createElement("span");i.appendChild(r);var o=R.createElement("span");return i.appendChild(o),i}x.Gutter=e}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(E,x,P){"use strict";var R=E("../range").Range,k=E("../lib/dom"),C=function(){function l(e){this.element=k.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)}return l.prototype.setPadding=function(e){this.$padding=e},l.prototype.setSession=function(e){this.session=e},l.prototype.setMarkers=function(e){this.markers=e},l.prototype.elt=function(e,n){var i=this.i!=-1&&this.element.childNodes[this.i];i?this.i++:(i=document.createElement("div"),this.element.appendChild(i),this.i=-1),i.style.cssText=n,i.className=e},l.prototype.update=function(e){if(!!e){this.config=e,this.i=0;var n;for(var i in this.markers){var t=this.markers[i];if(!t.range){t.update(n,this,this.session,e);continue}var r=t.range.clipRows(e.firstRow,e.lastRow);if(!r.isEmpty())if(r=r.toScreenRange(this.session),t.renderer){var o=this.$getTop(r.start.row,e),c=this.$padding+r.start.column*e.characterWidth;t.renderer(n,r,c,o,e)}else t.type=="fullLine"?this.drawFullLineMarker(n,r,t.clazz,e):t.type=="screenLine"?this.drawScreenLineMarker(n,r,t.clazz,e):r.isMultiLine()?t.type=="text"?this.drawTextMarker(n,r,t.clazz,e):this.drawMultiLineMarker(n,r,t.clazz,e):this.drawSingleLineMarker(n,r,t.clazz+" ace_start ace_br15",e)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},l.prototype.$getTop=function(e,n){return(e-n.firstRowScreen)*n.lineHeight},l.prototype.drawTextMarker=function(e,n,i,t,r){for(var o=this.session,c=n.start.row,d=n.end.row,$=c,S=0,y=0,m=o.getScreenLastRowColumn($),b=new R($,n.start.column,$,y);$<=d;$++)b.start.row=b.end.row=$,b.start.column=$==c?n.start.column:o.getRowWrapIndent($),b.end.column=m,S=y,y=m,m=$+1<d?o.getScreenLastRowColumn($+1):$==d?0:n.end.column,this.drawSingleLineMarker(e,b,i+($==c?" ace_start":"")+" ace_br"+s($==c||$==c+1&&n.start.column,S<y,y>m,$==d),t,$==d?0:1,r)},l.prototype.drawMultiLineMarker=function(e,n,i,t,r){var o=this.$padding,c=t.lineHeight,d=this.$getTop(n.start.row,t),$=o+n.start.column*t.characterWidth;if(r=r||"",this.session.$bidiHandler.isBidiRow(n.start.row)){var S=n.clone();S.end.row=S.start.row,S.end.column=this.session.getLine(S.start.row).length,this.drawBidiSingleLineMarker(e,S,i+" ace_br1 ace_start",t,null,r)}else this.elt(i+" ace_br1 ace_start","height:"+c+"px;right:0;top:"+d+"px;left:"+$+"px;"+(r||""));if(this.session.$bidiHandler.isBidiRow(n.end.row)){var S=n.clone();S.start.row=S.end.row,S.start.column=0,this.drawBidiSingleLineMarker(e,S,i+" ace_br12",t,null,r)}else{d=this.$getTop(n.end.row,t);var y=n.end.column*t.characterWidth;this.elt(i+" ace_br12","height:"+c+"px;width:"+y+"px;top:"+d+"px;left:"+o+"px;"+(r||""))}if(c=(n.end.row-n.start.row-1)*t.lineHeight,!(c<=0)){d=this.$getTop(n.start.row+1,t);var m=(n.start.column?1:0)|(n.end.column?0:8);this.elt(i+(m?" ace_br"+m:""),"height:"+c+"px;right:0;top:"+d+"px;left:"+o+"px;"+(r||""))}},l.prototype.drawSingleLineMarker=function(e,n,i,t,r,o){if(this.session.$bidiHandler.isBidiRow(n.start.row))return this.drawBidiSingleLineMarker(e,n,i,t,r,o);var c=t.lineHeight,d=(n.end.column+(r||0)-n.start.column)*t.characterWidth,$=this.$getTop(n.start.row,t),S=this.$padding+n.start.column*t.characterWidth;this.elt(i,"height:"+c+"px;width:"+d+"px;top:"+$+"px;left:"+S+"px;"+(o||""))},l.prototype.drawBidiSingleLineMarker=function(e,n,i,t,r,o){var c=t.lineHeight,d=this.$getTop(n.start.row,t),$=this.$padding,S=this.session.$bidiHandler.getSelections(n.start.column,n.end.column);S.forEach(function(y){this.elt(i,"height:"+c+"px;width:"+(y.width+(r||0))+"px;top:"+d+"px;left:"+($+y.left)+"px;"+(o||""))},this)},l.prototype.drawFullLineMarker=function(e,n,i,t,r){var o=this.$getTop(n.start.row,t),c=t.lineHeight;n.start.row!=n.end.row&&(c+=this.$getTop(n.end.row,t)-o),this.elt(i,"height:"+c+"px;top:"+o+"px;left:0;right:0;"+(r||""))},l.prototype.drawScreenLineMarker=function(e,n,i,t,r){var o=this.$getTop(n.start.row,t),c=t.lineHeight;this.elt(i,"height:"+c+"px;top:"+o+"px;left:0;right:0;"+(r||""))},l}();C.prototype.$padding=0;function s(l,e,n,i){return(l?1:0)|(e?2:0)|(n?4:0)|(i?8:0)}x.Marker=C}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter"],function(E,x,P){"use strict";var R=E("../lib/oop"),k=E("../lib/dom"),C=E("../lib/lang"),s=E("./lines").Lines,l=E("../lib/event_emitter").EventEmitter,e=function(){function n(i){this.dom=k,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",i.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new s(this.element)}return n.prototype.$updateEolChar=function(){var i=this.session.doc,t=i.getNewLineCharacter()==`
`&&i.getNewLineMode()!="windows",r=t?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=r)return this.EOL_CHAR=r,!0},n.prototype.setPadding=function(i){this.$padding=i,this.element.style.margin="0 "+i+"px"},n.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},n.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},n.prototype.$setFontMetrics=function(i){this.$fontMetrics=i,this.$fontMetrics.on("changeCharacterSize",function(t){this._signal("changeCharacterSize",t)}.bind(this)),this.$pollSizeChanges()},n.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},n.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},n.prototype.setSession=function(i){this.session=i,i&&this.$computeTabString()},n.prototype.setShowInvisibles=function(i){return this.showInvisibles==i?!1:(this.showInvisibles=i,typeof i=="string"?(this.showSpaces=/tab/i.test(i),this.showTabs=/space/i.test(i),this.showEOL=/eol/i.test(i)):this.showSpaces=this.showTabs=this.showEOL=i,this.$computeTabString(),!0)},n.prototype.setDisplayIndentGuides=function(i){return this.displayIndentGuides==i?!1:(this.displayIndentGuides=i,this.$computeTabString(),!0)},n.prototype.setHighlightIndentGuides=function(i){return this.$highlightIndentGuides===i?!1:(this.$highlightIndentGuides=i,i)},n.prototype.$computeTabString=function(){var i=this.session.getTabSize();this.tabSize=i;for(var t=this.$tabStrings=[0],r=1;r<i+1;r++)if(this.showTabs){var o=this.dom.createElement("span");o.className="ace_invisible ace_invisible_tab",o.textContent=C.stringRepeat(this.TAB_CHAR,r),t.push(o)}else t.push(this.dom.createTextNode(C.stringRepeat(" ",r),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var c="ace_indent-guide",d=this.showSpaces?" ace_invisible ace_invisible_space":"",$=this.showSpaces?C.stringRepeat(this.SPACE_CHAR,this.tabSize):C.stringRepeat(" ",this.tabSize),S=this.showTabs?" ace_invisible ace_invisible_tab":"",y=this.showTabs?C.stringRepeat(this.TAB_CHAR,this.tabSize):$,o=this.dom.createElement("span");o.className=c+d,o.textContent=$,this.$tabStrings[" "]=o;var o=this.dom.createElement("span");o.className=c+S,o.textContent=y,this.$tabStrings[" "]=o}},n.prototype.updateLines=function(i,t,r){if(this.config.lastRow!=i.lastRow||this.config.firstRow!=i.firstRow)return this.update(i);this.config=i;for(var o=Math.max(t,i.firstRow),c=Math.min(r,i.lastRow),d=this.element.childNodes,$=0,y=i.firstRow;y<o;y++){var m=this.session.getFoldLine(y);if(m)if(m.containsRow(o)){o=m.start.row;break}else y=m.end.row;$++}for(var S=!1,y=o,m=this.session.getNextFoldLine(y),b=m?m.start.row:Infinity;y>b&&(y=m.end.row+1,m=this.session.getNextFoldLine(y,m),b=m?m.start.row:Infinity),!(y>c);){var p=d[$++];if(p){this.dom.removeChildren(p),this.$renderLine(p,y,y==b?m:!1),S&&(p.style.top=this.$lines.computeLineTop(y,i,this.session)+"px");var w=i.lineHeight*this.session.getRowLength(y)+"px";p.style.height!=w&&(S=!0,p.style.height=w)}y++}if(S)for(;$<this.$lines.cells.length;){var v=this.$lines.cells[$++];v.element.style.top=this.$lines.computeLineTop(v.row,i,this.session)+"px"}},n.prototype.scrollLines=function(i){var t=this.config;if(this.config=i,this.$lines.pageChanged(t,i))return this.update(i);this.$lines.moveContainer(i);var r=i.lastRow,o=t?t.lastRow:-1;if(!t||o<i.firstRow)return this.update(i);if(r<t.firstRow)return this.update(i);if(!t||t.lastRow<i.firstRow)return this.update(i);if(i.lastRow<t.firstRow)return this.update(i);if(t.firstRow<i.firstRow)for(var c=this.session.getFoldedRowCount(t.firstRow,i.firstRow-1);c>0;c--)this.$lines.shift();if(t.lastRow>i.lastRow)for(var c=this.session.getFoldedRowCount(i.lastRow+1,t.lastRow);c>0;c--)this.$lines.pop();i.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLinesFragment(i,i.firstRow,t.firstRow-1)),i.lastRow>t.lastRow&&this.$lines.push(this.$renderLinesFragment(i,t.lastRow+1,i.lastRow)),this.$highlightIndentGuide()},n.prototype.$renderLinesFragment=function(i,t,r){for(var o=[],c=t,d=this.session.getNextFoldLine(c),$=d?d.start.row:Infinity;c>$&&(c=d.end.row+1,d=this.session.getNextFoldLine(c,d),$=d?d.start.row:Infinity),!(c>r);){var S=this.$lines.createCell(c,i,this.session),y=S.element;this.dom.removeChildren(y),k.setStyle(y.style,"height",this.$lines.computeLineHeight(c,i,this.session)+"px"),k.setStyle(y.style,"top",this.$lines.computeLineTop(c,i,this.session)+"px"),this.$renderLine(y,c,c==$?d:!1),this.$useLineGroups()?y.className="ace_line_group":y.className="ace_line",o.push(S),c++}return o},n.prototype.update=function(i){this.$lines.moveContainer(i),this.config=i;for(var t=i.firstRow,r=i.lastRow,o=this.$lines;o.getLength();)o.pop();o.push(this.$renderLinesFragment(i,t,r))},n.prototype.$renderToken=function(i,t,r,o){for(var c=this,d=/(\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]+)|(\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,$=this.dom.createFragment(this.element),S,y=0;S=d.exec(o);){var m=S[1],b=S[2],p=S[3],w=S[4],v=S[5];if(!(!c.showSpaces&&b)){var f=y!=S.index?o.slice(y,S.index):"";if(y=S.index+S[0].length,f&&$.appendChild(this.dom.createTextNode(f,this.element)),m){var a=c.session.getScreenTabSize(t+S.index);$.appendChild(c.$tabStrings[a].cloneNode(!0)),t+=a-1}else if(b)if(c.showSpaces){var h=this.dom.createElement("span");h.className="ace_invisible ace_invisible_space",h.textContent=C.stringRepeat(c.SPACE_CHAR,b.length),$.appendChild(h)}else $.appendChild(this.com.createTextNode(b,this.element));else if(p){var h=this.dom.createElement("span");h.className="ace_invisible ace_invisible_space ace_invalid",h.textContent=C.stringRepeat(c.SPACE_CHAR,p.length),$.appendChild(h)}else if(w){t+=1;var h=this.dom.createElement("span");h.style.width=c.config.characterWidth*2+"px",h.className=c.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",h.textContent=c.showSpaces?c.SPACE_CHAR:w,$.appendChild(h)}else if(v){t+=1;var h=this.dom.createElement("span");h.style.width=c.config.characterWidth*2+"px",h.className="ace_cjk",h.textContent=v,$.appendChild(h)}}}if($.appendChild(this.dom.createTextNode(y?o.slice(y):o,this.element)),this.$textToken[r.type])i.appendChild($);else{var u="ace_"+r.type.replace(/\./g," ace_"),h=this.dom.createElement("span");r.type=="fold"&&(h.style.width=r.value.length*this.config.characterWidth+"px"),h.className=u,h.appendChild($),i.appendChild(h)}return t+o.length},n.prototype.renderIndentGuide=function(i,t,r){var o=t.search(this.$indentGuideRe);if(o<=0||o>=r)return t;if(t[0]==" "){o-=o%this.tabSize;for(var c=o/this.tabSize,d=0;d<c;d++)i.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(o)}else if(t[0]==" "){for(var d=0;d<o;d++)i.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(o)}return this.$highlightIndentGuide(),t},n.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var i=this.session.doc.$lines;if(!!i){var t=this.session.selection.getCursor(),r=/^\s*/.exec(this.session.doc.getLine(t.row))[0].length,o=Math.floor(r/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:o,start:t.row};var c=this.session.$bracketHighlight;if(c){for(var d=this.session.$bracketHighlight.ranges,$=0;$<d.length;$++)if(t.row!==d[$].start.row){this.$highlightIndentGuideMarker.end=d[$].start.row,t.row>d[$].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&i[t.row]!==""&&t.column===i[t.row].length){this.$highlightIndentGuideMarker.dir=1;for(var $=t.row+1;$<i.length;$++){var S=i[$],y=/^\s*/.exec(S)[0].length;if(S!==""&&(this.$highlightIndentGuideMarker.end=$,y<=r))break}}this.$renderHighlightIndentGuide()}}},n.prototype.$clearActiveIndentGuide=function(){for(var i=this.$lines.cells,t=0;t<i.length;t++){var r=i[t],o=r.element.childNodes;if(o.length>0){for(var c=0;c<o.length;c++)if(o[c].classList&&o[c].classList.contains("ace_indent-guide-active")){o[c].classList.remove("ace_indent-guide-active");break}}}},n.prototype.$setIndentGuideActive=function(i,t){var r=this.session.doc.getLine(i.row);if(r!==""){var o=i.element.childNodes;if(o){var c=o[t-1];c&&c.classList&&c.classList.contains("ace_indent-guide")&&c.classList.add("ace_indent-guide-active")}}},n.prototype.$renderHighlightIndentGuide=function(){if(!!this.$lines){var i=this.$lines.cells;this.$clearActiveIndentGuide();var t=this.$highlightIndentGuideMarker.indentLevel;if(t!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var r=0;r<i.length;r++){var o=i[r];if(this.$highlightIndentGuideMarker.end&&o.row>=this.$highlightIndentGuideMarker.start+1){if(o.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(o,t)}}else for(var r=i.length-1;r>=0;r--){var o=i[r];if(this.$highlightIndentGuideMarker.end&&o.row<this.$highlightIndentGuideMarker.start){if(o.row<=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(o,t)}}}},n.prototype.$createLineElement=function(i){var t=this.dom.createElement("div");return t.className="ace_line",t.style.height=this.config.lineHeight+"px",t},n.prototype.$renderWrappedLine=function(i,t,r){var o=0,c=0,d=r[0],$=0,S=this.$createLineElement();i.appendChild(S);for(var y=0;y<t.length;y++){var m=t[y],b=m.value;if(y==0&&this.displayIndentGuides){if(o=b.length,b=this.renderIndentGuide(S,b,d),!b)continue;o-=b.length}if(o+b.length<d)$=this.$renderToken(S,$,m,b),o+=b.length;else{for(;o+b.length>=d;)$=this.$renderToken(S,$,m,b.substring(0,d-o)),b=b.substring(d-o),o=d,S=this.$createLineElement(),i.appendChild(S),S.appendChild(this.dom.createTextNode(C.stringRepeat("\xA0",r.indent),this.element)),c++,$=0,d=r[c]||Number.MAX_VALUE;b.length!=0&&(o+=b.length,$=this.$renderToken(S,$,m,b))}}r[r.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(S,$,null,"",!0)},n.prototype.$renderSimpleLine=function(i,t){for(var r=0,o=0;o<t.length;o++){var c=t[o],d=c.value;if(!(o==0&&this.displayIndentGuides&&(d=this.renderIndentGuide(i,d),!d))){if(r+d.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(i,r,c,d);r=this.$renderToken(i,r,c,d)}}},n.prototype.$renderOverflowMessage=function(i,t,r,o,c){r&&this.$renderToken(i,t,r,o.slice(0,this.MAX_LINE_LENGTH-t));var d=this.dom.createElement("span");d.className="ace_inline_button ace_keyword ace_toggle_wrap",d.textContent=c?"<hide>":"<click to see more...>",i.appendChild(d)},n.prototype.$renderLine=function(i,t,r){if(!r&&r!=!1&&(r=this.session.getFoldLine(t)),r)var o=this.$getFoldLineTokens(t,r);else var o=this.session.getTokens(t);var c=i;if(o.length){var d=this.session.getRowSplitData(t);if(d&&d.length){this.$renderWrappedLine(i,o,d);var c=i.lastChild}else{var c=i;this.$useLineGroups()&&(c=this.$createLineElement(),i.appendChild(c)),this.$renderSimpleLine(c,o)}}else this.$useLineGroups()&&(c=this.$createLineElement(),i.appendChild(c));if(this.showEOL&&c){r&&(t=r.end.row);var $=this.dom.createElement("span");$.className="ace_invisible ace_invisible_eol",$.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,c.appendChild($)}},n.prototype.$getFoldLineTokens=function(i,t){var r=this.session,o=[];function c($,S,y){for(var m=0,b=0;b+$[m].value.length<S;)if(b+=$[m].value.length,m++,m==$.length)return;if(b!=S){var p=$[m].value.substring(S-b);p.length>y-S&&(p=p.substring(0,y-S)),o.push({type:$[m].type,value:p}),b=S+p.length,m+=1}for(;b<y&&m<$.length;){var p=$[m].value;p.length+b>y?o.push({type:$[m].type,value:p.substring(0,y-b)}):o.push($[m]),b+=p.length,m+=1}}var d=r.getTokens(i);return t.walk(function($,S,y,m,b){$!=null?o.push({type:"fold",value:$}):(b&&(d=r.getTokens(S)),d.length&&c(d,m,y))},t.end.row,this.session.getLine(t.end.row).length),o},n.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},n}();e.prototype.$textToken={text:!0,rparen:!0,lparen:!0},e.prototype.EOF_CHAR="\xB6",e.prototype.EOL_CHAR_LF="\xAC",e.prototype.EOL_CHAR_CRLF="\xA4",e.prototype.EOL_CHAR=e.prototype.EOL_CHAR_LF,e.prototype.TAB_CHAR="\u2014",e.prototype.SPACE_CHAR="\xB7",e.prototype.$padding=0,e.prototype.MAX_LINE_LENGTH=1e4,e.prototype.showInvisibles=!1,e.prototype.showSpaces=!1,e.prototype.showTabs=!1,e.prototype.showEOL=!1,e.prototype.displayIndentGuides=!0,e.prototype.$highlightIndentGuides=!0,e.prototype.$tabStrings=[],e.prototype.destroy={},e.prototype.onChangeTabSize=e.prototype.$computeTabString,R.implement(e.prototype,l),x.Text=e}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(E,x,P){"use strict";var R=E("../lib/dom"),k=function(){function C(s){this.element=R.createElement("div"),this.element.className="ace_layer ace_cursor-layer",s.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),R.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return C.prototype.$updateOpacity=function(s){for(var l=this.cursors,e=l.length;e--;)R.setStyle(l[e].style,"opacity",s?"":"0")},C.prototype.$startCssAnimation=function(){for(var s=this.cursors,l=s.length;l--;)s[l].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&R.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},C.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,R.removeCssClass(this.element,"ace_animate-blinking")},C.prototype.setPadding=function(s){this.$padding=s},C.prototype.setSession=function(s){this.session=s},C.prototype.setBlinking=function(s){s!=this.isBlinking&&(this.isBlinking=s,this.restartTimer())},C.prototype.setBlinkInterval=function(s){s!=this.blinkInterval&&(this.blinkInterval=s,this.restartTimer())},C.prototype.setSmoothBlinking=function(s){s!=this.smoothBlinking&&(this.smoothBlinking=s,R.setCssClass(this.element,"ace_smooth-blinking",s),this.$updateCursors(!0),this.restartTimer())},C.prototype.addCursor=function(){var s=R.createElement("div");return s.className="ace_cursor",this.element.appendChild(s),this.cursors.push(s),s},C.prototype.removeCursor=function(){if(this.cursors.length>1){var s=this.cursors.pop();return s.parentNode.removeChild(s),s}},C.prototype.hideCursor=function(){this.isVisible=!1,R.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},C.prototype.showCursor=function(){this.isVisible=!0,R.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},C.prototype.restartTimer=function(){var s=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,R.removeCssClass(this.element,"ace_smooth-blinking")),s(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&R.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),R.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var l=function(){this.timeoutId=setTimeout(function(){s(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){s(!0),l()},this.blinkInterval),l()}},C.prototype.getPixelPosition=function(s,l){if(!this.config||!this.session)return{left:0,top:0};s||(s=this.session.selection.getCursor());var e=this.session.documentToScreenPosition(s),n=this.$padding+(this.session.$bidiHandler.isBidiRow(e.row,s.row)?this.session.$bidiHandler.getPosLeft(e.column):e.column*this.config.characterWidth),i=(e.row-(l?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:n,top:i}},C.prototype.isCursorInView=function(s,l){return s.top>=0&&s.top<l.maxHeight},C.prototype.update=function(s){this.config=s;var l=this.session.$selectionMarkers,e=0,n=0;(l===void 0||l.length===0)&&(l=[{cursor:null}]);for(var e=0,i=l.length;e<i;e++){var t=this.getPixelPosition(l[e].cursor,!0);if(!((t.top>s.height+s.offset||t.top<0)&&e>1)){var r=this.cursors[n++]||this.addCursor(),o=r.style;this.drawCursor?this.drawCursor(r,t,s,l[e],this.session):this.isCursorInView(t,s)?(R.setStyle(o,"display","block"),R.translate(r,t.left,t.top),R.setStyle(o,"width",Math.round(s.characterWidth)+"px"),R.setStyle(o,"height",s.lineHeight+"px")):R.setStyle(o,"display","none")}}for(;this.cursors.length>n;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=t,this.restartTimer()},C.prototype.$setOverwrite=function(s){s!=this.overwrite&&(this.overwrite=s,s?R.addCssClass(this.element,"ace_overwrite-cursors"):R.removeCssClass(this.element,"ace_overwrite-cursors"))},C.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},C}();k.prototype.$padding=0,k.prototype.drawCursor=null,x.Cursor=k}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(E,x,P){"use strict";var R=this&&this.__extends||function(){var r=function(o,c){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,$){d.__proto__=$}||function(d,$){for(var S in $)Object.prototype.hasOwnProperty.call($,S)&&(d[S]=$[S])},r(o,c)};return function(o,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");r(o,c);function d(){this.constructor=o}o.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}}(),k=E("./lib/oop"),C=E("./lib/dom"),s=E("./lib/event"),l=E("./lib/event_emitter").EventEmitter,e=32768,n=function(){function r(o,c){this.element=C.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+c,this.inner=C.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xA0",this.element.appendChild(this.inner),o.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addListener(this.element,"scroll",this.onScroll.bind(this)),s.addListener(this.element,"mousedown",s.preventDefault)}return r.prototype.setVisible=function(o){this.element.style.display=o?"":"none",this.isVisible=o,this.coeff=1},r}();k.implement(n.prototype,l);var i=function(r){R(o,r);function o(c,d){var $=r.call(this,c,"-v")||this;return $.scrollTop=0,$.scrollHeight=0,d.$scrollbarWidth=$.width=C.scrollbarWidth(c.ownerDocument),$.inner.style.width=$.element.style.width=($.width||15)+5+"px",$.$minWidth=0,$}return o.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var c=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-c)/(this.coeff-c)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},o.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},o.prototype.setHeight=function(c){this.element.style.height=c+"px"},o.prototype.setScrollHeight=function(c){this.scrollHeight=c,c>e?(this.coeff=e/c,c=e):this.coeff!=1&&(this.coeff=1),this.inner.style.height=c+"px"},o.prototype.setScrollTop=function(c){this.scrollTop!=c&&(this.skipEvent=!0,this.scrollTop=c,this.element.scrollTop=c*this.coeff)},o}(n);i.prototype.setInnerHeight=i.prototype.setScrollHeight;var t=function(r){R(o,r);function o(c,d){var $=r.call(this,c,"-h")||this;return $.scrollLeft=0,$.height=d.$scrollbarWidth,$.inner.style.height=$.element.style.height=($.height||15)+5+"px",$}return o.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},o.prototype.getHeight=function(){return this.isVisible?this.height:0},o.prototype.setWidth=function(c){this.element.style.width=c+"px"},o.prototype.setInnerWidth=function(c){this.inner.style.width=c+"px"},o.prototype.setScrollWidth=function(c){this.inner.style.width=c+"px"},o.prototype.setScrollLeft=function(c){this.scrollLeft!=c&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=c)},o}(n);x.ScrollBar=i,x.ScrollBarV=i,x.ScrollBarH=t,x.VScrollBar=i,x.HScrollBar=t}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(E,x,P){"use strict";var R=this&&this.__extends||function(){var t=function(r,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var $ in d)Object.prototype.hasOwnProperty.call(d,$)&&(c[$]=d[$])},t(r,o)};return function(r,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(r,o);function c(){this.constructor=r}r.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}}(),k=E("./lib/oop"),C=E("./lib/dom"),s=E("./lib/event"),l=E("./lib/event_emitter").EventEmitter;C.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
position: absolute;
background: rgba(128, 128, 128, 0.6);
-moz-box-sizing: border-box;
box-sizing: border-box;
border: 1px solid #bbb;
border-radius: 2px;
z-index: 8;
}
.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
position: absolute;
z-index: 6;
background: none;
overflow: hidden!important;
}
.ace_editor>.ace_sb-v {
z-index: 6;
right: 0;
top: 0;
width: 12px;
}
.ace_editor>.ace_sb-v div {
z-index: 8;
right: 0;
width: 100%;
}
.ace_editor>.ace_sb-h {
bottom: 0;
left: 0;
height: 12px;
}
.ace_editor>.ace_sb-h div {
bottom: 0;
height: 100%;
}
.ace_editor>.ace_sb_grabbed {
z-index: 8;
background: #000;
}`,"ace_scrollbar.css",!1);var e=function(){function t(r,o){this.element=C.createElement("div"),this.element.className="ace_sb"+o,this.inner=C.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,r.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return t.prototype.setVisible=function(r){this.element.style.display=r?"":"none",this.isVisible=r,this.coeff=1},t}();k.implement(e.prototype,l);var n=function(t){R(r,t);function r(o,c){var d=t.call(this,o,"-v")||this;return d.scrollTop=0,d.scrollHeight=0,d.parent=o,d.width=d.VScrollWidth,d.renderer=c,d.inner.style.width=d.element.style.width=(d.width||15)+"px",d.$minWidth=0,d}return r.prototype.onMouseDown=function(o,c){if(o==="mousedown"&&!(s.getButton(c)!==0||c.detail===2)){if(c.target===this.inner){var d=this,$=c.clientY,S=function(f){$=f.clientY},y=function(){clearInterval(w)},m=c.clientY,b=this.thumbTop,p=function(){if($!==void 0){var f=d.scrollTopFromThumbTop(b+$-m);f!==d.scrollTop&&d._emit("scroll",{data:f})}};s.capture(this.inner,S,y);var w=setInterval(p,20);return s.preventDefault(c)}var v=c.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(v)}),s.preventDefault(c)}},r.prototype.getHeight=function(){return this.height},r.prototype.scrollTopFromThumbTop=function(o){var c=o*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return c=c>>0,c<0?c=0:c>this.pageHeight-this.viewHeight&&(c=this.pageHeight-this.viewHeight),c},r.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},r.prototype.setHeight=function(o){this.height=Math.max(0,o),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},r.prototype.setScrollHeight=function(o,c){this.pageHeight===o&&!c||(this.pageHeight=o,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})))},r.prototype.setScrollTop=function(o){this.scrollTop=o,o<0&&(o=0),this.thumbTop=o*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},r}(e);n.prototype.setInnerHeight=n.prototype.setScrollHeight;var i=function(t){R(r,t);function r(o,c){var d=t.call(this,o,"-h")||this;return d.scrollLeft=0,d.scrollWidth=0,d.height=d.HScrollHeight,d.inner.style.height=d.element.style.height=(d.height||12)+"px",d.renderer=c,d}return r.prototype.onMouseDown=function(o,c){if(o==="mousedown"&&!(s.getButton(c)!==0||c.detail===2)){if(c.target===this.inner){var d=this,$=c.clientX,S=function(f){$=f.clientX},y=function(){clearInterval(w)},m=c.clientX,b=this.thumbLeft,p=function(){if($!==void 0){var f=d.scrollLeftFromThumbLeft(b+$-m);f!==d.scrollLeft&&d._emit("scroll",{data:f})}};s.capture(this.inner,S,y);var w=setInterval(p,20);return s.preventDefault(c)}var v=c.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(v)}),s.preventDefault(c)}},r.prototype.getHeight=function(){return this.isVisible?this.height:0},r.prototype.scrollLeftFromThumbLeft=function(o){var c=o*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return c=c>>0,c<0?c=0:c>this.pageWidth-this.viewWidth&&(c=this.pageWidth-this.viewWidth),c},r.prototype.setWidth=function(o){this.width=Math.max(0,o),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},r.prototype.setScrollWidth=function(o,c){this.pageWidth===o&&!c||(this.pageWidth=o,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})))},r.prototype.setScrollLeft=function(o){this.scrollLeft=o,o<0&&(o=0),this.thumbLeft=o*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},r}(e);i.prototype.setInnerWidth=i.prototype.setScrollWidth,x.ScrollBar=n,x.ScrollBarV=n,x.ScrollBarH=i,x.VScrollBar=n,x.HScrollBar=i}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(E,x,P){"use strict";var R=E("./lib/event"),k=function(){function C(s,l){this.onRender=s,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=l||window;var e=this;this._flush=function(n){e.pending=!1;var i=e.changes;if(i&&(R.blockIdle(100),e.changes=0,e.onRender(i)),e.changes){if(e.$recursionLimit--<0)return;e.schedule()}else e.$recursionLimit=2}}return C.prototype.schedule=function(s){this.changes=this.changes|s,this.changes&&!this.pending&&(R.nextFrame(this._flush),this.pending=!0)},C.prototype.clear=function(s){var l=this.changes;return this.changes=0,l},C}();x.RenderLoop=k}),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,x,P){var R=E("../lib/oop"),k=E("../lib/dom"),C=E("../lib/lang"),s=E("../lib/event"),l=E("../lib/useragent"),e=E("../lib/event_emitter").EventEmitter,n=512,i=typeof ResizeObserver=="function",t=200,r=function(){function o(c){this.el=k.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=k.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=k.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),c.appendChild(this.el),this.$measureNode.textContent=C.stringRepeat("X",n),this.$characterSize={width:0,height:0},i?this.$addObserver():this.checkForSizeChanges()}return o.prototype.$setMeasureNodeStyles=function(c,d){c.width=c.height="auto",c.left=c.top="0px",c.visibility="hidden",c.position="absolute",c.whiteSpace="pre",l.isIE<8?c["font-family"]="inherit":c.font="inherit",c.overflow=d?"hidden":"visible"},o.prototype.checkForSizeChanges=function(c){if(c===void 0&&(c=this.$measureSizes()),c&&(this.$characterSize.width!==c.width||this.$characterSize.height!==c.height)){this.$measureNode.style.fontWeight="bold";var d=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=c,this.charSizes=Object.create(null),this.allowBoldFonts=d&&d.width===c.width&&d.height===c.height,this._emit("changeCharacterSize",{data:c})}},o.prototype.$addObserver=function(){var c=this;this.$observer=new window.ResizeObserver(function(d){c.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},o.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var c=this;return this.$pollSizeChangesTimer=s.onIdle(function d(){c.checkForSizeChanges(),s.onIdle(d,500)},500)},o.prototype.setPolling=function(c){c?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},o.prototype.$measureSizes=function(c){var d={height:(c||this.$measureNode).clientHeight,width:(c||this.$measureNode).clientWidth/n};return d.width===0||d.height===0?null:d},o.prototype.$measureCharWidth=function(c){this.$main.textContent=C.stringRepeat(c,n);var d=this.$main.getBoundingClientRect();return d.width/n},o.prototype.getCharacterWidth=function(c){var d=this.charSizes[c];return d===void 0&&(d=this.charSizes[c]=this.$measureCharWidth(c)/this.$characterSize.width),d},o.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},o.prototype.$getZoom=function(c){return!c||!c.parentElement?1:(window.getComputedStyle(c).zoom||1)*this.$getZoom(c.parentElement)},o.prototype.$initTransformMeasureNodes=function(){var c=function(d,$){return["div",{style:"position: absolute;top:"+d+"px;left:"+$+"px;"}]};this.els=k.buildDom([c(0,0),c(t,0),c(0,t),c(t,t)],this.el)},o.prototype.transformCoordinates=function(c,d){if(c){var $=this.$getZoom(this.el);c=b(1/$,c)}function S(F,_,W){var O=F[1]*_[0]-F[0]*_[1];return[(-_[1]*W[0]+_[0]*W[1])/O,(+F[1]*W[0]-F[0]*W[1])/O]}function y(F,_){return[F[0]-_[0],F[1]-_[1]]}function m(F,_){return[F[0]+_[0],F[1]+_[1]]}function b(F,_){return[F*_[0],F*_[1]]}this.els||this.$initTransformMeasureNodes();function p(F){var _=F.getBoundingClientRect();return[_.left,_.top]}var w=p(this.els[0]),v=p(this.els[1]),f=p(this.els[2]),a=p(this.els[3]),h=S(y(a,v),y(a,f),y(m(v,f),m(a,w))),u=b(1+h[0],y(v,w)),g=b(1+h[1],y(f,w));if(d){var A=d,L=h[0]*A[0]/t+h[1]*A[1]/t+1,M=m(b(A[0],u),b(A[1],g));return m(b(1/L/t,M),w)}var T=y(c,w),I=S(y(u,b(h[0],T)),y(g,b(h[1],T)),T);return b(t,I)},o}();r.prototype.$characterSize={width:0,height:0},R.implement(r.prototype,e),x.FontMetrics=r}),ace.define("ace/css/editor.css",["require","exports","module"],function(E,x,P){P.exports=`
.ace_br1 {border-top-left-radius : 3px;}
.ace_br2 {border-top-right-radius : 3px;}
.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
.ace_br4 {border-bottom-right-radius: 3px;}
.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
.ace_br8 {border-bottom-left-radius : 3px;}
.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
.ace_editor {
position: relative;
overflow: hidden;
padding: 0;
font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
direction: ltr;
text-align: left;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
.ace_scroller {
position: absolute;
overflow: hidden;
top: 0;
bottom: 0;
background-color: inherit;
-ms-user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
user-select: none;
cursor: text;
}
.ace_content {
position: absolute;
box-sizing: border-box;
min-width: 100%;
contain: style size layout;
font-variant-ligatures: no-common-ligatures;
}
.ace_keyboard-focus:focus {
box-shadow: inset 0 0 0 2px #5E9ED6;
outline: none;
}
.ace_dragging .ace_scroller:before{
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
content: '';
background: rgba(250, 250, 250, 0.01);
z-index: 1000;
}
.ace_dragging.ace_dark .ace_scroller:before{
background: rgba(0, 0, 0, 0.01);
}
.ace_gutter {
position: absolute;
overflow : hidden;
width: auto;
top: 0;
bottom: 0;
left: 0;
cursor: default;
z-index: 4;
-ms-user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
user-select: none;
contain: style size layout;
}
.ace_gutter-active-line {
position: absolute;
left: 0;
right: 0;
}
.ace_scroller.ace_scroll-left:after {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
pointer-events: none;
}
.ace_gutter-cell, .ace_gutter-cell_svg-icons {
position: absolute;
top: 0;
left: 0;
right: 0;
padding-left: 19px;
padding-right: 6px;
background-repeat: no-repeat;
}
.ace_gutter-cell_svg-icons .ace_icon_svg{
margin-left: -14px;
float: left;
}
.ace_gutter-cell.ace_error, .ace_icon.ace_error {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");
background-repeat: no-repeat;
background-position: 2px center;
}
.ace_gutter-cell.ace_warning, .ace_icon.ace_warning {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");
background-repeat: no-repeat;
background-position: 2px center;
}
.ace_gutter-cell.ace_info, .ace_icon.ace_info {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
background-repeat: no-repeat;
background-position: 2px center;
}
.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
}
.ace_icon_svg.ace_error {
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
background-color: crimson;
}
.ace_icon_svg.ace_warning {
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
background-color: darkorange;
}
.ace_icon_svg.ace_info {
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
background-color: royalblue;
}
.ace_scrollbar {
contain: strict;
position: absolute;
right: 0;
bottom: 0;
z-index: 6;
}
.ace_scrollbar-inner {
position: absolute;
cursor: text;
left: 0;
top: 0;
}
.ace_scrollbar-v{
overflow-x: hidden;
overflow-y: scroll;
top: 0;
}
.ace_scrollbar-h {
overflow-x: scroll;
overflow-y: hidden;
left: 0;
}
.ace_print-margin {
position: absolute;
height: 100%;
}
.ace_text-input {
position: absolute;
z-index: 0;
width: 0.5em;
height: 1em;
opacity: 0;
background: transparent;
-moz-appearance: none;
appearance: none;
border: none;
resize: none;
outline: none;
overflow: hidden;
font: inherit;
padding: 0 1px;
margin: 0 -1px;
contain: strict;
-ms-user-select: text;
-moz-user-select: text;
-webkit-user-select: text;
user-select: text;
/*with \`pre-line\` chrome inserts &nbsp; instead of space*/
white-space: pre!important;
}
.ace_text-input.ace_composition {
background: transparent;
color: inherit;
z-index: 1000;
opacity: 1;
}
.ace_composition_placeholder { color: transparent }
.ace_composition_marker {
border-bottom: 1px solid;
position: absolute;
border-radius: 0;
margin-top: 1px;
}
[ace_nocontext=true] {
transform: none!important;
filter: none!important;
clip-path: none!important;
mask : none!important;
contain: none!important;
perspective: none!important;
mix-blend-mode: initial!important;
z-index: auto;
}
.ace_layer {
z-index: 1;
position: absolute;
overflow: hidden;
/* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
word-wrap: normal;
white-space: pre;
height: 100%;
width: 100%;
box-sizing: border-box;
/* setting pointer-events: auto; on node under the mouse, which changes
during scroll, will break mouse wheel scrolling in Safari */
pointer-events: none;
}
.ace_gutter-layer {
position: relative;
width: auto;
text-align: right;
pointer-events: auto;
height: 1000000px;
contain: style size layout;
}
.ace_text-layer {
font: inherit !important;
position: absolute;
height: 1000000px;
width: 1000000px;
contain: style size layout;
}
.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
contain: style size layout;
position: absolute;
top: 0;
left: 0;
right: 0;
}
.ace_hidpi .ace_text-layer,
.ace_hidpi .ace_gutter-layer,
.ace_hidpi .ace_content,
.ace_hidpi .ace_gutter {
contain: strict;
}
.ace_hidpi .ace_text-layer > .ace_line,
.ace_hidpi .ace_text-layer > .ace_line_group {
contain: strict;
}
.ace_cjk {
display: inline-block;
text-align: center;
}
.ace_cursor-layer {
z-index: 4;
}
.ace_cursor {
z-index: 4;
position: absolute;
box-sizing: border-box;
border-left: 2px solid;
/* workaround for smooth cursor repaintng whole screen in chrome */
transform: translatez(0);
}
.ace_multiselect .ace_cursor {
border-left-width: 1px;
}
.ace_slim-cursors .ace_cursor {
border-left-width: 1px;
}
.ace_overwrite-cursors .ace_cursor {
border-left-width: 0;
border-bottom: 1px solid;
}
.ace_hidden-cursors .ace_cursor {
opacity: 0.2;
}
.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
opacity: 0;
}
.ace_smooth-blinking .ace_cursor {
transition: opacity 0.18s;
}
.ace_animate-blinking .ace_cursor {
animation-duration: 1000ms;
animation-timing-function: step-end;
animation-name: blink-ace-animate;
animation-iteration-count: infinite;
}
.ace_animate-blinking.ace_smooth-blinking .ace_cursor {
animation-duration: 1000ms;
animation-timing-function: ease-in-out;
animation-name: blink-ace-animate-smooth;
}
@keyframes blink-ace-animate {
from, to { opacity: 1; }
60% { opacity: 0; }
}
@keyframes blink-ace-animate-smooth {
from, to { opacity: 1; }
45% { opacity: 1; }
60% { opacity: 0; }
85% { opacity: 0; }
}
.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
position: absolute;
z-index: 3;
}
.ace_marker-layer .ace_selection {
position: absolute;
z-index: 5;
}
.ace_marker-layer .ace_bracket {
position: absolute;
z-index: 6;
}
.ace_marker-layer .ace_error_bracket {
position: absolute;
border-bottom: 1px solid #DE5555;
border-radius: 0;
}
.ace_marker-layer .ace_active-line {
position: absolute;
z-index: 2;
}
.ace_marker-layer .ace_selected-word {
position: absolute;
z-index: 4;
box-sizing: border-box;
}
.ace_line .ace_fold {
box-sizing: border-box;
display: inline-block;
height: 11px;
margin-top: -2px;
vertical-align: middle;
background-image:
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
background-repeat: no-repeat, repeat-x;
background-position: center center, top left;
color: transparent;
border: 1px solid black;
border-radius: 2px;
cursor: pointer;
pointer-events: auto;
}
.ace_dark .ace_fold {
}
.ace_fold:hover{
background-image:
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
}
.ace_tooltip {
background-color: #f5f5f5;
border: 1px solid gray;
border-radius: 1px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
color: black;
max-width: 100%;
padding: 3px 4px;
position: fixed;
z-index: 999999;
box-sizing: border-box;
cursor: default;
white-space: pre;
word-wrap: break-word;
line-height: normal;
font-style: normal;
font-weight: normal;
letter-spacing: normal;
pointer-events: none;
}
.ace_tooltip:focus {
outline: 1px solid black;
}
.ace_gutter-tooltip_header {
font-weight: bold;
}
.ace_gutter-tooltip_body {
padding-top: 5px;
}
.ace_gutter-tooltip .ace_icon {
display: inline-block;
width: 18px;
}
.ace_icon_svg {
display: inline-block;
width: 12px;
vertical-align: top;
-webkit-mask-repeat: no-repeat;
-webkit-mask-size: 12px;
-webkit-mask-position: center;
}
.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
padding-right: 13px;
}
.ace_fold-widget {
box-sizing: border-box;
margin: 0 -12px 0 1px;
display: none;
width: 11px;
vertical-align: top;
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
background-repeat: no-repeat;
background-position: center;
border-radius: 3px;
border: 1px solid transparent;
cursor: pointer;
}
.ace_folding-enabled .ace_fold-widget {
display: inline-block;
}
.ace_fold-widget.ace_end {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
}
.ace_fold-widget.ace_closed {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
}
.ace_fold-widget:hover {
border: 1px solid rgba(0, 0, 0, 0.3);
background-color: rgba(255, 255, 255, 0.2);
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
}
.ace_fold-widget:active {
border: 1px solid rgba(0, 0, 0, 0.4);
background-color: rgba(0, 0, 0, 0.05);
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}
/**
* Dark version for fold widgets
*/
.ace_dark .ace_fold-widget {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
}
.ace_dark .ace_fold-widget.ace_end {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
}
.ace_dark .ace_fold-widget.ace_closed {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
}
.ace_dark .ace_fold-widget:hover {
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
background-color: rgba(255, 255, 255, 0.1);
}
.ace_dark .ace_fold-widget:active {
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
}
.ace_inline_button {
border: 1px solid lightgray;
display: inline-block;
margin: -1px 8px;
padding: 0 5px;
pointer-events: auto;
cursor: pointer;
}
.ace_inline_button:hover {
border-color: gray;
background: rgba(200,200,200,0.2);
display: inline-block;
pointer-events: auto;
}
.ace_fold-widget.ace_invalid {
background-color: #FFB4B4;
border-color: #DE5555;
}
.ace_fade-fold-widgets .ace_fold-widget {
transition: opacity 0.4s ease 0.05s;
opacity: 0;
}
.ace_fade-fold-widgets:hover .ace_fold-widget {
transition: opacity 0.05s ease 0.05s;
opacity:1;
}
.ace_underline {
text-decoration: underline;
}
.ace_bold {
font-weight: bold;
}
.ace_nobold .ace_bold {
font-weight: normal;
}
.ace_italic {
font-style: italic;
}
.ace_error-marker {
background-color: rgba(255, 0, 0,0.2);
position: absolute;
z-index: 9;
}
.ace_highlight-marker {
background-color: rgba(255, 255, 0,0.2);
position: absolute;
z-index: 8;
}
.ace_mobile-menu {
position: absolute;
line-height: 1.5;
border-radius: 4px;
-ms-user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
user-select: none;
background: white;
box-shadow: 1px 3px 2px grey;
border: 1px solid #dcdcdc;
color: black;
}
.ace_dark > .ace_mobile-menu {
background: #333;
color: #ccc;
box-shadow: 1px 3px 2px grey;
border: 1px solid #444;
}
.ace_mobile-button {
padding: 2px;
cursor: pointer;
overflow: hidden;
}
.ace_mobile-button:hover {
background-color: #eee;
opacity:1;
}
.ace_mobile-button:active {
background-color: #ddd;
}
.ace_placeholder {
font-family: arial;
transform: scale(0.9);
transform-origin: left;
white-space: pre;
opacity: 0.7;
margin: 0 10px;
}
.ace_ghost_text {
opacity: 0.5;
font-style: italic;
white-space: pre;
}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(E,x,P){"use strict";var R=E("../lib/dom"),k=E("../lib/oop"),C=E("../lib/event_emitter").EventEmitter,s=function(){function l(e,n){this.canvas=R.createElement("canvas"),this.renderer=n,this.pixelRatio=1,this.maxHeight=n.layerConfig.maxHeight,this.lineHeight=n.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=0+"px",this.canvas.style.right=0+"px",this.canvas.style.zIndex=7+"px",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 l.prototype.$updateDecorators=function(e){var n=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(e){this.maxHeight=e.maxHeight,this.lineHeight=e.lineHeight,this.canvasHeight=e.height;var i=(e.lastRow+1)*this.lineHeight;i<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight}var t=this.canvas.getContext("2d");function r(a,h){return a.priority<h.priority?-1:a.priority>h.priority?1:0}var o=this.renderer.session.$annotations;if(t.clearRect(0,0,this.canvas.width,this.canvas.height),o){var c={info:1,warning:2,error:3};o.forEach(function(a){a.priority=c[a.type]||null}),o=o.sort(r);for(var d=this.renderer.session.$foldData,$=0;$<o.length;$++){var S=o[$].row,y=this.compensateFoldRows(S,d),m=Math.round((S-y)*this.lineHeight*this.heightRatio),b=Math.round((S-y)*this.lineHeight*this.heightRatio),p=Math.round(((S-y)*this.lineHeight+this.lineHeight)*this.heightRatio),w=p-b;if(w<this.minDecorationHeight){var v=(b+p)/2|0;v<this.halfMinDecorationHeight?v=this.halfMinDecorationHeight:v+this.halfMinDecorationHeight>this.canvasHeight&&(v=this.canvasHeight-this.halfMinDecorationHeight),b=Math.round(v-this.halfMinDecorationHeight),p=Math.round(v+this.halfMinDecorationHeight)}t.fillStyle=n[o[$].type]||null,t.fillRect(0,m,this.canvasWidth,p-b)}}var f=this.renderer.session.selection.getCursor();if(f){var y=this.compensateFoldRows(f.row,d),m=Math.round((f.row-y)*this.lineHeight*this.heightRatio);t.fillStyle="rgba(0, 0, 0, 0.5)",t.fillRect(0,m,this.canvasWidth,2)}},l.prototype.compensateFoldRows=function(e,n){var i=0;if(n&&n.length>0)for(var t=0;t<n.length;t++)e>n[t].start.row&&e<n[t].end.row?i+=e-n[t].start.row:e>=n[t].end.row&&(i+=n[t].end.row-n[t].start.row);return i},l}();k.implement(s.prototype,C),x.Decorator=s}),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"],function(E,x,P){"use strict";var R=E("./lib/oop"),k=E("./lib/dom"),C=E("./lib/lang"),s=E("./config"),l=E("./layer/gutter").Gutter,e=E("./layer/marker").Marker,n=E("./layer/text").Text,i=E("./layer/cursor").Cursor,t=E("./scrollbar").HScrollBar,r=E("./scrollbar").VScrollBar,o=E("./scrollbar_custom").HScrollBar,c=E("./scrollbar_custom").VScrollBar,d=E("./renderloop").RenderLoop,$=E("./layer/font_metrics").FontMetrics,S=E("./lib/event_emitter").EventEmitter,y=E("./css/editor.css"),m=E("./layer/decorators").Decorator,b=E("./lib/useragent");k.importCssString(y,"ace_editor.css",!1);var p=function(){function w(v,f){var a=this;this.container=v||k.createElement("div"),k.addCssClass(this.container,"ace_editor"),k.HI_DPI&&k.addCssClass(this.container,"ace_hidpi"),this.setTheme(f),s.get("useStrictCSP")==null&&s.set("useStrictCSP",!1),this.$gutter=k.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=k.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=k.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 e(this.content);var h=this.$textLayer=new n(this.content);this.canvas=h.element,this.$markerFront=new e(this.content),this.$cursorLayer=new i(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new r(this.container,this),this.scrollBarH=new t(this.container,this),this.scrollBarV.on("scroll",function(u){a.$scrollAnimation||a.session.setScrollTop(u.data-a.scrollMargin.top)}),this.scrollBarH.on("scroll",function(u){a.$scrollAnimation||a.session.setScrollLeft(u.data-a.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new $(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(u){a.updateCharacterSize(),a.onResize(!0,a.gutterWidth,a.$size.width,a.$size.height),a._signal("changeCharacterSize",u)}),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=!b.isIOS,this.$loop=new d(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),s.resetOptions(this),s._signal("renderer",this)}return w.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(),k.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},w.prototype.setSession=function(v){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=v,v&&this.scrollMargin.top&&v.getScrollTop()<=0&&v.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(v),this.$markerBack.setSession(v),this.$markerFront.setSession(v),this.$gutterLayer.setSession(v),this.$textLayer.setSession(v),!!v&&(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))},w.prototype.updateLines=function(v,f,a){if(f===void 0&&(f=Infinity),this.$changedLines?(this.$changedLines.firstRow>v&&(this.$changedLines.firstRow=v),this.$changedLines.lastRow<f&&(this.$changedLines.lastRow=f)):this.$changedLines={firstRow:v,lastRow:f},this.$changedLines.lastRow<this.layerConfig.firstRow)if(a)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},w.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},w.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},w.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},w.prototype.updateFull=function(v){v?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},w.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},w.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},w.prototype.onResize=function(v,f,a,h){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=v?1:0;var u=this.container;h||(h=u.clientHeight||u.scrollHeight),a||(a=u.clientWidth||u.scrollWidth);var g=this.$updateCachedSize(v,f,a,h);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!a&&!h)return this.resizing=0;v&&(this.$gutterLayer.$padding=null),v?this.$renderChanges(g|this.$changes,!0):this.$loop.schedule(g|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},w.prototype.$updateCachedSize=function(v,f,a,h){h-=this.$extraHeight||0;var u=0,g=this.$size,A={width:g.width,height:g.height,scrollerHeight:g.scrollerHeight,scrollerWidth:g.scrollerWidth};if(h&&(v||g.height!=h)&&(g.height=h,u|=this.CHANGE_SIZE,g.scrollerHeight=g.height,this.$horizScroll&&(g.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(g.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",u=u|this.CHANGE_SCROLL),a&&(v||g.width!=a)){u|=this.CHANGE_SIZE,g.width=a,f==null&&(f=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=f,k.setStyle(this.scrollBarH.element.style,"left",f+"px"),k.setStyle(this.scroller.style,"left",f+this.margin.left+"px"),g.scrollerWidth=Math.max(0,a-f-this.scrollBarV.getWidth()-this.margin.h),k.setStyle(this.$gutter.style,"left",this.margin.left+"px");var L=this.scrollBarV.getWidth()+"px";k.setStyle(this.scrollBarH.element.style,"right",L),k.setStyle(this.scroller.style,"right",L),k.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(g.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||v)&&(u|=this.CHANGE_FULL)}return g.$dirty=!a||!h,u&&this._signal("resize",A),u},w.prototype.onGutterResize=function(v){var f=this.$showGutter?v:0;f!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,f,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},w.prototype.adjustWrapLimit=function(){var v=this.$size.scrollerWidth-this.$padding*2,f=Math.floor(v/this.characterWidth);return this.session.adjustWrapLimit(f,this.$showPrintMargin&&this.$printMarginColumn)},w.prototype.setAnimatedScroll=function(v){this.setOption("animatedScroll",v)},w.prototype.getAnimatedScroll=function(){return this.$animatedScroll},w.prototype.setShowInvisibles=function(v){this.setOption("showInvisibles",v),this.session.$bidiHandler.setShowInvisibles(v)},w.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},w.prototype.getDisplayIndentGuide=function(){return this.getOption("displayIndentGuides")},w.prototype.setDisplayIndentGuides=function(v){this.setOption("displayIndentGuides",v)},w.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},w.prototype.setHighlightIndentGuides=function(v){this.setOption("highlightIndentGuides",v)},w.prototype.setShowPrintMargin=function(v){this.setOption("showPrintMargin",v)},w.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},w.prototype.setPrintMarginColumn=function(v){this.setOption("printMarginColumn",v)},w.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},w.prototype.getShowGutter=function(){return this.getOption("showGutter")},w.prototype.setShowGutter=function(v){return this.setOption("showGutter",v)},w.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},w.prototype.setFadeFoldWidgets=function(v){this.setOption("fadeFoldWidgets",v)},w.prototype.setHighlightGutterLine=function(v){this.setOption("highlightGutterLine",v)},w.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},w.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var v=k.createElement("div");v.className="ace_layer ace_print-margin-layer",this.$printMarginEl=k.createElement("div"),this.$printMarginEl.className="ace_print-margin",v.appendChild(this.$printMarginEl),this.content.insertBefore(v,this.content.firstChild)}var f=this.$printMarginEl.style;f.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",f.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},w.prototype.getContainerElement=function(){return this.container},w.prototype.getMouseEventTarget=function(){return this.scroller},w.prototype.getTextAreaContainer=function(){return this.container},w.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var v=this.textarea.style,f=this.$composition;if(!this.$keepTextAreaAtCursor&&!f){k.translate(this.textarea,-100,0);return}var a=this.$cursorLayer.$pixelPos;if(!!a){f&&f.markerRange&&(a=this.$cursorLayer.getPixelPosition(f.markerRange.start,!0));var h=this.layerConfig,u=a.top,g=a.left;u-=h.offset;var A=f&&f.useTextareaForIME||b.isMobile?this.lineHeight:1;if(u<0||u>h.height-A){k.translate(this.textarea,0,0);return}var L=1,M=this.$size.height-A;if(!f)u+=this.lineHeight;else if(f.useTextareaForIME){var T=this.textarea.value;L=this.characterWidth*this.session.$getStringScreenWidth(T)[0]}else u+=this.lineHeight+2;g-=this.scrollLeft,g>this.$size.scrollerWidth-L&&(g=this.$size.scrollerWidth-L),g+=this.gutterWidth+this.margin.left,k.setStyle(v,"height",A+"px"),k.setStyle(v,"width",L+"px"),k.translate(this.textarea,Math.min(g,this.$size.scrollerWidth-L),Math.min(u,M))}}},w.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},w.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},w.prototype.getLastFullyVisibleRow=function(){var v=this.layerConfig,f=v.lastRow,a=this.session.documentToScreenRow(f,0)*v.lineHeight;return a-this.session.getScrollTop()>v.height-v.lineHeight?f-1:f},w.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},w.prototype.setPadding=function(v){this.$padding=v,this.$textLayer.setPadding(v),this.$cursorLayer.setPadding(v),this.$markerFront.setPadding(v),this.$markerBack.setPadding(v),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},w.prototype.setScrollMargin=function(v,f,a,h){var u=this.scrollMargin;u.top=v|0,u.bottom=f|0,u.right=h|0,u.left=a|0,u.v=u.top+u.bottom,u.h=u.left+u.right,u.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-u.top),this.updateFull()},w.prototype.setMargin=function(v,f,a,h){var u=this.margin;u.top=v|0,u.bottom=f|0,u.right=h|0,u.left=a|0,u.v=u.top+u.bottom,u.h=u.left+u.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},w.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},w.prototype.setHScrollBarAlwaysVisible=function(v){this.setOption("hScrollBarAlwaysVisible",v)},w.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},w.prototype.setVScrollBarAlwaysVisible=function(v){this.setOption("vScrollBarAlwaysVisible",v)},w.prototype.$updateScrollBarV=function(){var v=this.layerConfig.maxHeight,f=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(v-=(f-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>v-f&&(v=this.scrollTop+f,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(v+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},w.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},w.prototype.freeze=function(){this.$frozen=!0},w.prototype.unfreeze=function(){this.$frozen=!1},w.prototype.$renderChanges=function(v,f){if(this.$changes&&(v|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!v&&!f){this.$changes|=v;return}if(this.$size.$dirty)return this.$changes|=v,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",v),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var a=this.layerConfig;if(v&this.CHANGE_FULL||v&this.CHANGE_SIZE||v&this.CHANGE_TEXT||v&this.CHANGE_LINES||v&this.CHANGE_SCROLL||v&this.CHANGE_H_SCROLL){if(v|=this.$computeLayerConfig()|this.$loop.clear(),a.firstRow!=this.layerConfig.firstRow&&a.firstRowScreen==this.layerConfig.firstRowScreen){var h=this.scrollTop+(a.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;h>0&&(this.scrollTop=h,v=v|this.CHANGE_SCROLL,v|=this.$computeLayerConfig()|this.$loop.clear())}a=this.layerConfig,this.$updateScrollBarV(),v&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),k.translate(this.content,-this.scrollLeft,-a.offset);var u=a.width+2*this.$padding+"px",g=a.minHeight+"px";k.setStyle(this.content.style,"width",u),k.setStyle(this.content.style,"height",g)}if(v&this.CHANGE_H_SCROLL&&(k.translate(this.content,-this.scrollLeft,-a.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),v&this.CHANGE_FULL){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(),this._signal("afterRender",v);return}if(v&this.CHANGE_SCROLL){this.$changedLines=null,v&this.CHANGE_TEXT||v&this.CHANGE_LINES?this.$textLayer.update(a):this.$textLayer.scrollLines(a),this.$showGutter&&(v&this.CHANGE_GUTTER||v&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(),this._signal("afterRender",v);return}v&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(a),this.$showGutter&&this.$gutterLayer.update(a),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(a)):v&this.CHANGE_LINES?((this.$updateLines()||v&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(a),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(a)):v&this.CHANGE_TEXT||v&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(a),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(a)):v&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(a),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(a)),v&this.CHANGE_CURSOR&&(this.$cursorLayer.update(a),this.$moveTextAreaToCursor()),v&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(a),v&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(a),this._signal("afterRender",v)},w.prototype.$autosize=function(){var v=this.session.getScreenLength()*this.lineHeight,f=this.$maxLines*this.lineHeight,a=Math.min(f,Math.max((this.$minLines||1)*this.lineHeight,v))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(a+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&a>this.$maxPixelHeight&&(a=this.$maxPixelHeight);var h=a<=2*this.lineHeight,u=!h&&v>f;if(a!=this.desiredHeight||this.$size.height!=this.desiredHeight||u!=this.$vScroll){u!=this.$vScroll&&(this.$vScroll=u,this.scrollBarV.setVisible(u));var g=this.container.clientWidth;this.container.style.height=a+"px",this.$updateCachedSize(!0,this.$gutterWidth,g,a),this.desiredHeight=a,this._signal("autosize")}},w.prototype.$computeLayerConfig=function(){var v=this.session,f=this.$size,a=f.height<=2*this.lineHeight,h=this.session.getScreenLength(),u=h*this.lineHeight,g=this.$getLongestLine(),A=!a&&(this.$hScrollBarAlwaysVisible||f.scrollerWidth-g-2*this.$padding<0),L=this.$horizScroll!==A;L&&(this.$horizScroll=A,this.scrollBarH.setVisible(A));var M=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var T=f.scrollerHeight+this.lineHeight,I=!this.$maxLines&&this.$scrollPastEnd?(f.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;u+=I;var F=this.scrollMargin;this.session.setScrollTop(Math.max(-F.top,Math.min(this.scrollTop,u-f.scrollerHeight+F.bottom))),this.session.setScrollLeft(Math.max(-F.left,Math.min(this.scrollLeft,g+2*this.$padding-f.scrollerWidth+F.right)));var _=!a&&(this.$vScrollBarAlwaysVisible||f.scrollerHeight-u+I<0||this.scrollTop>F.top),W=M!==_;W&&(this.$vScroll=_,this.scrollBarV.setVisible(_));var O=this.scrollTop%this.lineHeight,B=Math.ceil(T/this.lineHeight)-1,H=Math.max(0,Math.round((this.scrollTop-O)/this.lineHeight)),z=H+B,Y,Z,N=this.lineHeight;H=v.screenToDocumentRow(H,0);var U=v.getFoldLine(H);U&&(H=U.start.row),Y=v.documentToScreenRow(H,0),Z=v.getRowLength(H)*N,z=Math.min(v.screenToDocumentRow(z,0),v.getLength()-1),T=f.scrollerHeight+v.getRowLength(z)*N+Z,O=this.scrollTop-Y*N;var X=0;return(this.layerConfig.width!=g||L)&&(X=this.CHANGE_H_SCROLL),(L||W)&&(X|=this.$updateCachedSize(!0,this.gutterWidth,f.width,f.height),this._signal("scrollbarVisibilityChanged"),W&&(g=this.$getLongestLine())),this.layerConfig={width:g,padding:this.$padding,firstRow:H,firstRowScreen:Y,lastRow:z,lineHeight:N,characterWidth:this.characterWidth,minHeight:T,maxHeight:u,offset:O,gutterOffset:N?Math.max(0,Math.ceil((O+f.height-f.scrollerHeight)/N)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(g-this.$padding),X},w.prototype.$updateLines=function(){if(!!this.$changedLines){var v=this.$changedLines.firstRow,f=this.$changedLines.lastRow;this.$changedLines=null;var a=this.layerConfig;if(!(v>a.lastRow+1)&&!(f<a.firstRow)){if(f===Infinity){this.$showGutter&&this.$gutterLayer.update(a),this.$textLayer.update(a);return}return this.$textLayer.updateLines(a,v,f),!0}}},w.prototype.$getLongestLine=function(){var v=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(v+=1),this.$textLayer&&v>this.$textLayer.MAX_LINE_LENGTH&&(v=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(v*this.characterWidth))},w.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},w.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},w.prototype.addGutterDecoration=function(v,f){this.$gutterLayer.addGutterDecoration(v,f)},w.prototype.removeGutterDecoration=function(v,f){this.$gutterLayer.removeGutterDecoration(v,f)},w.prototype.updateBreakpoints=function(v){this.$loop.schedule(this.CHANGE_GUTTER)},w.prototype.setAnnotations=function(v){this.$gutterLayer.setAnnotations(v),this.$loop.schedule(this.CHANGE_GUTTER)},w.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},w.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},w.prototype.showCursor=function(){this.$cursorLayer.showCursor()},w.prototype.scrollSelectionIntoView=function(v,f,a){this.scrollCursorIntoView(v,a),this.scrollCursorIntoView(f,a)},w.prototype.scrollCursorIntoView=function(v,f,a){if(this.$size.scrollerHeight!==0){var h=this.$cursorLayer.getPixelPosition(v),u=h.left,g=h.top,A=a&&a.top||0,L=a&&a.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var M=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;M+A>g?(f&&M+A>g+this.lineHeight&&(g-=f*this.$size.scrollerHeight),g===0&&(g=-this.scrollMargin.top),this.session.setScrollTop(g)):M+this.$size.scrollerHeight-L<g+this.lineHeight&&(f&&M+this.$size.scrollerHeight-L<g-this.lineHeight&&(g+=f*this.$size.scrollerHeight),this.session.setScrollTop(g+this.lineHeight+L-this.$size.scrollerHeight));var T=this.scrollLeft,I=2*this.layerConfig.characterWidth;u-I<T?(u-=I,u<this.$padding+I&&(u=-this.scrollMargin.left),this.session.setScrollLeft(u)):(u+=I,T+this.$size.scrollerWidth<u+this.characterWidth?this.session.setScrollLeft(Math.round(u+this.characterWidth-this.$size.scrollerWidth)):T<=this.$padding&&u-T<this.characterWidth&&this.session.setScrollLeft(0))}},w.prototype.getScrollTop=function(){return this.session.getScrollTop()},w.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},w.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},w.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},w.prototype.scrollToRow=function(v){this.session.setScrollTop(v*this.lineHeight)},w.prototype.alignCursor=function(v,f){typeof v=="number"&&(v={row:v,column:0});var a=this.$cursorLayer.getPixelPosition(v),h=this.$size.scrollerHeight-this.lineHeight,u=a.top-h*(f||0);return this.session.setScrollTop(u),u},w.prototype.$calcSteps=function(v,f){var a=0,h=this.STEPS,u=[],g=function(A,L,M){return M*(Math.pow(A-1,3)+1)+L};for(a=0;a<h;++a)u.push(g(a/this.STEPS,v,f-v));return u},w.prototype.scrollToLine=function(v,f,a,h){var u=this.$cursorLayer.getPixelPosition({row:v,column:0}),g=u.top;f&&(g-=this.$size.scrollerHeight/2);var A=this.scrollTop;this.session.setScrollTop(g),a!==!1&&this.animateScrolling(A,h)},w.prototype.animateScrolling=function(v,f){var a=this.scrollTop;if(!this.$animatedScroll)return;var h=this;if(v==a)return;if(this.$scrollAnimation){var u=this.$scrollAnimation.steps;if(u.length&&(v=u[0],v==a))return}var g=h.$calcSteps(v,a);this.$scrollAnimation={from:v,to:a,steps:g},clearInterval(this.$timer),h.session.setScrollTop(g.shift()),h.session.$scrollTop=a;function A(){h.$timer=clearInterval(h.$timer),h.$scrollAnimation=null,h.$stopAnimation=!1,f&&f()}this.$timer=setInterval(function(){if(h.$stopAnimation){A();return}if(!h.session)return clearInterval(h.$timer);g.length?(h.session.setScrollTop(g.shift()),h.session.$scrollTop=a):a!=null?(h.session.$scrollTop=-1,h.session.setScrollTop(a),a=null):A()},10)},w.prototype.scrollToY=function(v){this.scrollTop!==v&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=v)},w.prototype.scrollToX=function(v){this.scrollLeft!==v&&(this.scrollLeft=v),this.$loop.schedule(this.CHANGE_H_SCROLL)},w.prototype.scrollTo=function(v,f){this.session.setScrollTop(f),this.session.setScrollLeft(v)},w.prototype.scrollBy=function(v,f){f&&this.session.setScrollTop(this.session.getScrollTop()+f),v&&this.session.setScrollLeft(this.session.getScrollLeft()+v)},w.prototype.isScrollableBy=function(v,f){if(f<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||f>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||v<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||v>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},w.prototype.pixelToScreenCoordinates=function(v,f){var a;if(this.$hasCssTransforms){a={top:0,left:0};var h=this.$fontMetrics.transformCoordinates([v,f]);v=h[1]-this.gutterWidth-this.margin.left,f=h[0]}else a=this.scroller.getBoundingClientRect();var u=v+this.scrollLeft-a.left-this.$padding,g=u/this.characterWidth,A=Math.floor((f+this.scrollTop-a.top)/this.lineHeight),L=this.$blockCursor?Math.floor(g):Math.round(g);return{row:A,column:L,side:g-L>0?1:-1,offsetX:u}},w.prototype.screenToTextCoordinates=function(v,f){var a;if(this.$hasCssTransforms){a={top:0,left:0};var h=this.$fontMetrics.transformCoordinates([v,f]);v=h[1]-this.gutterWidth-this.margin.left,f=h[0]}else a=this.scroller.getBoundingClientRect();var u=v+this.scrollLeft-a.left-this.$padding,g=u/this.characterWidth,A=this.$blockCursor?Math.floor(g):Math.round(g),L=Math.floor((f+this.scrollTop-a.top)/this.lineHeight);return this.session.screenToDocumentPosition(L,Math.max(A,0),u)},w.prototype.textToScreenCoordinates=function(v,f){var a=this.scroller.getBoundingClientRect(),h=this.session.documentToScreenPosition(v,f),u=this.$padding+(this.session.$bidiHandler.isBidiRow(h.row,v)?this.session.$bidiHandler.getPosLeft(h.column):Math.round(h.column*this.characterWidth)),g=h.row*this.lineHeight;return{pageX:a.left+u-this.scrollLeft,pageY:a.top+g-this.scrollTop}},w.prototype.visualizeFocus=function(){k.addCssClass(this.container,"ace_focus")},w.prototype.visualizeBlur=function(){k.removeCssClass(this.container,"ace_focus")},w.prototype.showComposition=function(v){this.$composition=v,v.cssText||(v.cssText=this.textarea.style.cssText),v.useTextareaForIME==null&&(v.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(k.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):v.markerId=this.session.addMarker(v.markerRange,"ace_composition_marker","text")},w.prototype.setCompositionText=function(v){var f=this.session.selection.cursor;this.addToken(v,"composition_placeholder",f.row,f.column),this.$moveTextAreaToCursor()},w.prototype.hideComposition=function(){if(!!this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),k.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var v=this.session.selection.cursor;this.removeExtraToken(v.row,v.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},w.prototype.setGhostText=function(v,f){var a=this.session.selection.cursor,h=f||{row:a.row,column:a.column};this.removeGhostText();var u=v.split(`
`);this.addToken(u[0],"ghost_text",h.row,h.column),this.$ghostText={text:v,position:{row:h.row,column:h.column}},u.length>1&&(this.$ghostTextWidget={text:u.slice(1).join(`
`),row:h.row,column:h.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget))},w.prototype.removeGhostText=function(){if(!!this.$ghostText){var v=this.$ghostText.position;this.removeExtraToken(v.row,v.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},w.prototype.addToken=function(v,f,a,h){var u=this.session;u.bgTokenizer.lines[a]=null;var g={type:f,value:v},A=u.getTokens(a);if(h==null||!A.length)A.push(g);else for(var L=0,M=0;M<A.length;M++){var T=A[M];if(L+=T.value.length,h<=L){var I=T.value.length-(L-h),F=T.value.slice(0,I),_=T.value.slice(I);A.splice(M,1,{type:T.type,value:F},g,{type:T.type,value:_});break}}this.updateLines(a,a)},w.prototype.removeExtraToken=function(v,f){this.session.bgTokenizer.lines[v]=null,this.updateLines(v,v)},w.prototype.setTheme=function(v,f){var a=this;if(this.$themeId=v,a._dispatchEvent("themeChange",{theme:v}),!v||typeof v=="string"){var h=v||this.$options.theme.initialValue;s.loadModule(["theme",h],u)}else u(v);function u(g){if(a.$themeId!=v)return f&&f();if(!g||!g.cssClass)throw new Error("couldn't load module "+v+" or it didn't call define");g.$id&&(a.$themeId=g.$id),k.importCssString(g.cssText,g.cssClass,a.container),a.theme&&k.removeCssClass(a.container,a.theme.cssClass);var A="padding"in g?g.padding:"padding"in(a.theme||{})?4:a.$padding;a.$padding&&A!=a.$padding&&a.setPadding(A),a.$theme=g.cssClass,a.theme=g,k.addCssClass(a.container,g.cssClass),k.setCssClass(a.container,"ace_dark",g.isDark),a.$size&&(a.$size.width=0,a.$updateSizeAsync()),a._dispatchEvent("themeLoaded",{theme:g}),f&&f()}},w.prototype.getTheme=function(){return this.$themeId},w.prototype.setStyle=function(v,f){k.setCssClass(this.container,v,f!==!1)},w.prototype.unsetStyle=function(v){k.removeCssClass(this.container,v)},w.prototype.setCursorStyle=function(v){k.setStyle(this.scroller.style,"cursor",v)},w.prototype.setMouseCursor=function(v){k.setStyle(this.scroller.style,"cursor",v)},w.prototype.attachToShadowRoot=function(){k.importCssString(y,"ace_editor.css",this.container)},w.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},w.prototype.$updateCustomScrollbar=function(v){var f=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,v===!0?(this.scrollBarV=new c(this.container,this),this.scrollBarH=new o(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(a){f.$scrollAnimation||f.session.setScrollTop(a.data-f.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(a){f.$scrollAnimation||f.session.setScrollLeft(a.data-f.scrollMargin.left)}),this.$scrollDecorator=new m(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new r(this.container,this),this.scrollBarH=new t(this.container,this),this.scrollBarV.addEventListener("scroll",function(a){f.$scrollAnimation||f.session.setScrollTop(a.data-f.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(a){f.$scrollAnimation||f.session.setScrollLeft(a.data-f.scrollMargin.left)}))},w.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var v=this;this.$resizeTimer=C.delayedCall(function(){v.destroyed||v.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(f){var a=f[0].contentRect.width,h=f[0].contentRect.height;Math.abs(v.$size.width-a)>1||Math.abs(v.$size.height-h)>1?v.$resizeTimer.delay():v.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},w}();p.prototype.CHANGE_CURSOR=1,p.prototype.CHANGE_MARKER=2,p.prototype.CHANGE_GUTTER=4,p.prototype.CHANGE_SCROLL=8,p.prototype.CHANGE_LINES=16,p.prototype.CHANGE_TEXT=32,p.prototype.CHANGE_SIZE=64,p.prototype.CHANGE_MARKER_BACK=128,p.prototype.CHANGE_MARKER_FRONT=256,p.prototype.CHANGE_FULL=512,p.prototype.CHANGE_H_SCROLL=1024,p.prototype.$changes=0,p.prototype.$padding=null,p.prototype.$frozen=!1,p.prototype.STEPS=8,R.implement(p.prototype,S),s.defineOptions(p.prototype,"renderer",{useResizeObserver:{set:function(w){!w&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):w&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(w){this.$textLayer.setShowInvisibles(w)&&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(w){typeof w=="number"&&(this.$printMarginColumn=w),this.$showPrintMargin=!!w,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(w){this.$gutter.style.display=w?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(w){this.$gutterLayer.$useSvgGutterIcons=w},initialValue:!1},fadeFoldWidgets:{set:function(w){k.setCssClass(this.$gutter,"ace_fade-fold-widgets",w)},initialValue:!1},showFoldWidgets:{set:function(w){this.$gutterLayer.setShowFoldWidgets(w),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(w){this.$textLayer.setDisplayIndentGuides(w)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(w){this.$textLayer.setHighlightIndentGuides(w)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(w){this.$gutterLayer.setHighlightGutterLine(w),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(w){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(w){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(w){typeof w=="number"&&(w=w+"px"),this.container.style.fontSize=w,this.updateFontSize()},initialValue:12},fontFamily:{set:function(w){this.container.style.fontFamily=w,this.updateFontSize()}},maxLines:{set:function(w){this.updateFull()}},minLines:{set:function(w){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(w){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(w){w=+w||0,this.$scrollPastEnd!=w&&(this.$scrollPastEnd=w,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(w){this.$gutterLayer.$fixedWidth=!!w,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(w){this.$updateCustomScrollbar(w)},initialValue:!1},theme:{set:function(w){this.setTheme(w)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!b.isMobile&&!b.isIE}}),x.VirtualRenderer=p}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(E,x,P){"use strict";var R=E("../lib/oop"),k=E("../lib/net"),C=E("../lib/event_emitter").EventEmitter,s=E("../config");function l(t){var r="importScripts('"+k.qualifyURL(t)+"');";try{return new Blob([r],{type:"application/javascript"})}catch(d){var o=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,c=new o;return c.append(r),c.getBlob("application/javascript")}}function e(t){if(typeof Worker=="undefined")return{postMessage:function(){},terminate:function(){}};if(s.get("loadWorkerFromBlob")){var r=l(t),o=window.URL||window.webkitURL,c=o.createObjectURL(r);return new Worker(c)}return new Worker(t)}var n=function(t){t.postMessage||(t=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=t,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(){R.implement(this,C),this.$createWorkerFromOldConfig=function(t,r,o,c,d){if(E.nameToUrl&&!E.toUrl&&(E.toUrl=E.nameToUrl),s.get("packaged")||!E.toUrl)c=c||s.moduleUrl(r,"worker");else{var $=this.$normalizePath;c=c||$(E.toUrl("ace/worker/worker.js",null,"_"));var S={};t.forEach(function(y){S[y]=$(E.toUrl(y,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=e(c),d&&this.send("importScripts",d),this.$worker.postMessage({init:!0,tlns:S,module:r,classname:o}),this.$worker},this.onMessage=function(t){var r=t.data;switch(r.type){case"event":this._signal(r.name,{data:r.data});break;case"call":var o=this.callbacks[r.id];o&&(o(r.data),delete this.callbacks[r.id]);break;case"error":this.reportError(r.data);break;case"log":window.console&&console.log&&console.log.apply(console,r.data);break}},this.reportError=function(t){window.console&&console.error&&console.error(t)},this.$normalizePath=function(t){return k.qualifyURL(t)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(t,r){this.$worker.postMessage({command:t,args:r})},this.call=function(t,r,o){if(o){var c=this.callbackId++;this.callbacks[c]=o,r.push(c)}this.send(t,r)},this.emit=function(t,r){try{r.data&&r.data.err&&(r.data.err={message:r.data.err.message,stack:r.data.err.stack,code:r.data.err.code}),this.$worker&&this.$worker.postMessage({event:t,data:{data:r.data}})}catch(o){console.error(o.stack)}},this.attachToDocument=function(t){this.$doc&&this.terminate(),this.$doc=t,this.call("setValue",[t.getValue()]),t.on("change",this.changeListener,!0)},this.changeListener=function(t){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),t.action=="insert"?this.deltaQueue.push(t.start,t.lines):this.deltaQueue.push(t.start,t.end)},this.$sendDeltaQueue=function(){var t=this.deltaQueue;!t||(this.deltaQueue=null,t.length>50&&t.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:t}))}}).call(n.prototype);var i=function(t,r,o){var c=null,d=!1,$=Object.create(C),S=[],y=new n({messageBuffer:S,terminate:function(){},postMessage:function(b){S.push(b),!!c&&(d?setTimeout(m):m())}});y.setEmitSync=function(b){d=b};var m=function(){var b=S.shift();b.command?c[b.command].apply(c,b.args):b.event&&$._signal(b.event,b.data)};return $.postMessage=function(b){y.onMessage({data:b})},$.callback=function(b,p){this.postMessage({type:"call",id:p,data:b})},$.emit=function(b,p){this.postMessage({type:"event",name:b,data:p})},s.loadModule(["worker",r],function(b){for(c=new b[o]($);S.length;)m()}),y};x.UIWorkerClient=i,x.WorkerClient=n,x.createWorker=e}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(E,x,P){"use strict";var R=E("./range").Range,k=E("./lib/event_emitter").EventEmitter,C=E("./lib/oop"),s=function(){function l(e,n,i,t,r,o){var c=this;this.length=n,this.session=e,this.doc=e.getDocument(),this.mainClass=r,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=t,this.$onCursorChange=function(){setTimeout(function(){c.onCursorChange()})},this.$pos=i;var d=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=d.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)}return l.prototype.setup=function(){var e=this,n=this.doc,i=this.session;this.selectionBefore=i.selection.toJSON(),i.selection.inMultiSelectMode&&i.selection.toSingleRange(),this.pos=n.createAnchor(this.$pos.row,this.$pos.column);var t=this.pos;t.$insertRight=!0,t.detach(),t.markerId=i.addMarker(new R(t.row,t.column,t.row,t.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(r){var o=n.createAnchor(r.row,r.column);o.$insertRight=!0,o.detach(),e.others.push(o)}),i.setUndoSelect(!1)},l.prototype.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,n=this;this.othersActive=!0,this.others.forEach(function(i){i.markerId=e.addMarker(new R(i.row,i.column,i.row,i.column+n.length),n.othersClass,null,!1)})}},l.prototype.hideOtherMarkers=function(){if(!!this.othersActive){this.othersActive=!1;for(var e=0;e<this.others.length;e++)this.session.removeMarker(this.others[e].markerId)}},l.prototype.onUpdate=function(e){if(this.$updating)return this.updateAnchors(e);var n=e;if(n.start.row===n.end.row&&n.start.row===this.pos.row){this.$updating=!0;var i=e.action==="insert"?n.end.column-n.start.column:n.start.column-n.end.column,t=n.start.column>=this.pos.column&&n.start.column<=this.pos.column+this.length+1,r=n.start.column-this.pos.column;if(this.updateAnchors(e),t&&(this.length+=i),t&&!this.session.$fromUndo){if(e.action==="insert")for(var o=this.others.length-1;o>=0;o--){var c=this.others[o],d={row:c.row,column:c.column+r};this.doc.insertMergedLines(d,e.lines)}else if(e.action==="remove")for(var o=this.others.length-1;o>=0;o--){var c=this.others[o],d={row:c.row,column:c.column+r};this.doc.remove(new R(d.row,d.column,d.row,d.column-i))}}this.$updating=!1,this.updateMarkers()}},l.prototype.updateAnchors=function(e){this.pos.onChange(e);for(var n=this.others.length;n--;)this.others[n].onChange(e);this.updateMarkers()},l.prototype.updateMarkers=function(){if(!this.$updating){var e=this,n=this.session,i=function(r,o){n.removeMarker(r.markerId),r.markerId=n.addMarker(new R(r.row,r.column,r.row,r.column+e.length),o,null,!1)};i(this.pos,this.mainClass);for(var t=this.others.length;t--;)i(this.others[t],this.othersClass)}},l.prototype.onCursorChange=function(e){if(!(this.$updating||!this.session)){var n=this.session.selection.getCursor();n.row===this.pos.row&&n.column>=this.pos.column&&n.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},l.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},l.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var e=this.session.getUndoManager(),n=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,i=0;i<n;i++)e.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},l}();C.implement(s.prototype,k),x.PlaceHolder=s}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(E,x,P){var R=E("../lib/event"),k=E("../lib/useragent");function C(l,e){return l.row==e.row&&l.column==e.column}function s(l){var e=l.domEvent,n=e.altKey,i=e.shiftKey,t=e.ctrlKey,r=l.getAccelKey(),o=l.getButton();if(t&&k.isMac&&(o=e.button),l.editor.inMultiSelectMode&&o==2){l.editor.textInput.onContextMenu(l.domEvent);return}if(!t&&!n&&!r){o===0&&l.editor.inMultiSelectMode&&l.editor.exitMultiSelectMode();return}if(o===0){var c=l.editor,d=c.selection,$=c.inMultiSelectMode,S=l.getDocumentPosition(),y=d.getCursor(),m=l.inSelection()||d.isEmpty()&&C(S,y),b=l.x,p=l.y,w=function(_){b=_.clientX,p=_.clientY},v=c.session,f=c.renderer.pixelToScreenCoordinates(b,p),a=f,h;if(c.$mouseHandler.$enableJumpToDef)t&&n||r&&n?h=i?"block":"add":n&&c.$blockSelectEnabled&&(h="block");else if(r&&!n){if(h="add",!$&&i)return}else n&&c.$blockSelectEnabled&&(h="block");if(h&&k.isMac&&e.ctrlKey&&c.$mouseHandler.cancelContextMenu(),h=="add"){if(!$&&m)return;if(!$){var u=d.toOrientedRange();c.addSelectionMarker(u)}var g=d.rangeList.rangeAtPoint(S);c.inVirtualSelectionMode=!0,i&&(g=null,u=d.ranges[0]||u,c.removeSelectionMarker(u)),c.once("mouseup",function(){var _=d.toOrientedRange();g&&_.isEmpty()&&C(g.cursor,_.cursor)?d.substractPoint(_.cursor):(i?d.substractPoint(u.cursor):u&&(c.removeSelectionMarker(u),d.addRange(u)),d.addRange(_)),c.inVirtualSelectionMode=!1})}else if(h=="block"){l.stop(),c.inVirtualSelectionMode=!0;var A,L=[],M=function(){var _=c.renderer.pixelToScreenCoordinates(b,p),W=v.screenToDocumentPosition(_.row,_.column,_.offsetX);C(a,_)&&C(W,d.lead)||(a=_,c.selection.moveToPosition(W),c.renderer.scrollCursorIntoView(),c.removeSelectionMarkers(L),L=d.rectangularRangeBlock(a,f),c.$mouseHandler.$clickSelection&&L.length==1&&L[0].isEmpty()&&(L[0]=c.$mouseHandler.$clickSelection.clone()),L.forEach(c.addSelectionMarker,c),c.updateSelectionMarkers())};$&&!r?d.toSingleRange():!$&&r&&(A=d.toOrientedRange(),c.addSelectionMarker(A)),i?f=v.documentToScreenPosition(d.lead):d.moveToPosition(S),a={row:-1,column:-1};var T=function(_){M(),clearInterval(F),c.removeSelectionMarkers(L),L.length||(L=[d.toOrientedRange()]),A&&(c.removeSelectionMarker(A),d.toSingleRange(A));for(var W=0;W<L.length;W++)d.addRange(L[W]);c.inVirtualSelectionMode=!1,c.$mouseHandler.$clickSelection=null},I=M;R.capture(c.container,w,T);var F=setInterval(function(){I()},20);return l.preventDefault()}}}x.onMouseDown=s}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(E,x,P){x.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(k){k.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(k){k.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(k){k.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(k){k.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(k){k.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(k){k.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(k){k.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(k){k.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(k){k.multiSelect.rangeCount>1?k.multiSelect.joinSelections():k.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(k){k.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(k){k.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(k){k.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],x.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(k){k.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(k){return k&&k.inMultiSelectMode}}];var R=E("../keyboard/hash_handler").HashHandler;x.keyboardHandler=new R(x.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,x,P){var R=E("./range_list").RangeList,k=E("./range").Range,C=E("./selection").Selection,s=E("./mouse/multi_select_handler").onMouseDown,l=E("./lib/event"),e=E("./lib/lang"),n=E("./commands/multi_select_commands");x.commands=n.defaultCommands.concat(n.multiSelectCommands);var i=E("./search").Search,t=new i;function r(y,m,b){return t.$options.wrap=!0,t.$options.needle=m,t.$options.backwards=b==-1,t.find(y)}var o=E("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(o.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(y,m){if(!!y){if(!this.inMultiSelectMode&&this.rangeCount===0){var b=this.toOrientedRange();if(this.rangeList.add(b),this.rangeList.add(y),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),m||this.fromOrientedRange(y);this.rangeList.removeAll(),this.rangeList.add(b),this.$onAddRange(b)}y.cursor||(y.cursor=y.end);var p=this.rangeList.add(y);return this.$onAddRange(y),p.length&&this.$onRemoveRange(p),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),m||this.fromOrientedRange(y)}},this.toSingleRange=function(y){y=y||this.ranges[0];var m=this.rangeList.removeAll();m.length&&this.$onRemoveRange(m),y&&this.fromOrientedRange(y)},this.substractPoint=function(y){var m=this.rangeList.substractPoint(y);if(m)return this.$onRemoveRange(m),m[0]},this.mergeOverlappingRanges=function(){var y=this.rangeList.merge();y.length&&this.$onRemoveRange(y)},this.$onAddRange=function(y){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(y),this._signal("addRange",{range:y})},this.$onRemoveRange=function(y){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var m=this.rangeList.ranges.pop();y.push(m),this.rangeCount=0}for(var b=y.length;b--;){var p=this.ranges.indexOf(y[b]);this.ranges.splice(p,1)}this._signal("removeRange",{ranges:y}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),m=m||this.ranges[0],m&&!m.isEqual(this.getRange())&&this.fromOrientedRange(m)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new R,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var y=this.ranges.length?this.ranges:[this.getRange()],m=[],b=0;b<y.length;b++){var p=y[b],w=p.start.row,v=p.end.row;if(w===v)m.push(p.clone());else{for(m.push(new k(w,p.start.column,w,this.session.getLine(w).length));++w<v;)m.push(this.getLineRange(w,!0));m.push(new k(v,0,v,p.end.column))}b==0&&!this.isBackwards()&&(m=m.reverse())}this.toSingleRange();for(var b=m.length;b--;)this.addRange(m[b])},this.joinSelections=function(){var y=this.rangeList.ranges,m=y[y.length-1],b=k.fromPoints(y[0].start,m.end);this.toSingleRange(),this.setSelectionRange(b,m.cursor==m.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var y=this.rangeList.ranges,m=y[y.length-1],b=k.fromPoints(y[0].start,m.end);this.toSingleRange(),this.setSelectionRange(b,m.cursor==m.start)}else{var p=this.session.documentToScreenPosition(this.cursor),w=this.session.documentToScreenPosition(this.anchor),v=this.rectangularRangeBlock(p,w);v.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(y,m,b){var p=[],w=y.column<m.column;if(w)var v=y.column,f=m.column,a=y.offsetX,h=m.offsetX;else var v=m.column,f=y.column,a=m.offsetX,h=y.offsetX;var u=y.row<m.row;if(u)var g=y.row,A=m.row;else var g=m.row,A=y.row;v<0&&(v=0),g<0&&(g=0),g==A&&(b=!0);for(var L,M=g;M<=A;M++){var T=k.fromPoints(this.session.screenToDocumentPosition(M,v,a),this.session.screenToDocumentPosition(M,f,h));if(T.isEmpty()){if(L&&d(T.end,L))break;L=T.end}T.cursor=w?T.start:T.end,p.push(T)}if(u&&p.reverse(),!b){for(var I=p.length-1;p[I].isEmpty()&&I>0;)I--;if(I>0)for(var F=0;p[F].isEmpty();)F++;for(var _=I;_>=F;_--)p[_].isEmpty()&&p.splice(_,1)}return p}}.call(C.prototype);var c=E("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(y){y.cursor||(y.cursor=y.end);var m=this.getSelectionStyle();return y.marker=this.session.addMarker(y,"ace_selection",m),this.session.$selectionMarkers.push(y),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,y},this.removeSelectionMarker=function(y){if(!!y.marker){this.session.removeMarker(y.marker);var m=this.session.$selectionMarkers.indexOf(y);m!=-1&&this.session.$selectionMarkers.splice(m,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(y){for(var m=this.session.$selectionMarkers,b=y.length;b--;){var p=y[b];if(!!p.marker){this.session.removeMarker(p.marker);var w=m.indexOf(p);w!=-1&&m.splice(w,1)}}this.session.selectionMarkerCount=m.length},this.$onAddRange=function(y){this.addSelectionMarker(y.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(y){this.removeSelectionMarkers(y.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(y){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(n.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(y){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(n.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(y){var m=y.command,b=y.editor;if(!!b.multiSelect){if(m.multiSelectAction)m.multiSelectAction=="forEach"?p=b.forEachSelection(m,y.args):m.multiSelectAction=="forEachLine"?p=b.forEachSelection(m,y.args,!0):m.multiSelectAction=="single"?(b.exitMultiSelectMode(),p=m.exec(b,y.args||{})):p=m.multiSelectAction(b,y.args||{});else{var p=m.exec(b,y.args||{});b.multiSelect.addRange(b.multiSelect.toOrientedRange()),b.multiSelect.mergeOverlappingRanges()}return p}},this.forEachSelection=function(y,m,b){if(!this.inVirtualSelectionMode){var p=b&&b.keepOrder,w=b==!0||b&&b.$byLines,v=this.session,f=this.selection,a=f.rangeList,h=(p?f:a).ranges,u;if(!h.length)return y.exec?y.exec(this,m||{}):y(this,m||{});var g=f._eventRegistry;f._eventRegistry={};var A=new C(v);this.inVirtualSelectionMode=!0;for(var L=h.length;L--;){if(w)for(;L>0&&h[L].start.row==h[L-1].end.row;)L--;A.fromOrientedRange(h[L]),A.index=L,this.selection=v.selection=A;var M=y.exec?y.exec(this,m||{}):y(this,m||{});!u&&M!==void 0&&(u=M),A.toOrientedRange(h[L])}A.detach(),this.selection=v.selection=f,this.inVirtualSelectionMode=!1,f._eventRegistry=g,f.mergeOverlappingRanges(),f.ranges[0]&&f.fromOrientedRange(f.ranges[0]);var T=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),T&&T.from==T.to&&this.renderer.animateScrolling(T.from),u}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var y="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var m=this.multiSelect.rangeList.ranges,b=[],p=0;p<m.length;p++)b.push(this.session.getTextRange(m[p]));var w=this.session.getDocument().getNewLineCharacter();y=b.join(w),y.length==(b.length-1)*w.length&&(y="")}else this.selection.isEmpty()||(y=this.session.getTextRange(this.getSelectionRange()));return y},this.$checkMultiselectChange=function(y,m){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var b=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&m==this.multiSelect.anchor)return;var p=m==this.multiSelect.anchor?b.cursor==b.start?b.end:b.start:b.cursor;p.row!=m.row||this.session.$clipPositionToDocument(p.row,p.column).column!=m.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(y,m,b){if(m=m||{},m.needle=y||m.needle,m.needle==null){var p=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();m.needle=this.session.getTextRange(p)}this.$search.set(m);var w=this.$search.findAll(this.session);if(!w.length)return 0;var v=this.multiSelect;b||v.toSingleRange(w[0]);for(var f=w.length;f--;)v.addRange(w[f],!0);return p&&v.rangeList.rangeAtPoint(p.start)&&v.addRange(p,!0),w.length},this.selectMoreLines=function(y,m){var b=this.selection.toOrientedRange(),p=b.cursor==b.end,w=this.session.documentToScreenPosition(b.cursor);this.selection.$desiredColumn&&(w.column=this.selection.$desiredColumn);var v=this.session.screenToDocumentPosition(w.row+y,w.column);if(b.isEmpty())var a=v;else var f=this.session.documentToScreenPosition(p?b.end:b.start),a=this.session.screenToDocumentPosition(f.row+y,f.column);if(p){var h=k.fromPoints(v,a);h.cursor=h.start}else{var h=k.fromPoints(a,v);h.cursor=h.end}if(h.desiredColumn=w.column,!this.selection.inMultiSelectMode)this.selection.addRange(b);else if(m)var u=b.cursor;this.selection.addRange(h),u&&this.selection.substractPoint(u)},this.transposeSelections=function(y){for(var m=this.session,b=m.multiSelect,p=b.ranges,w=p.length;w--;){var v=p[w];if(v.isEmpty()){var f=m.getWordRange(v.start.row,v.start.column);v.start.row=f.start.row,v.start.column=f.start.column,v.end.row=f.end.row,v.end.column=f.end.column}}b.mergeOverlappingRanges();for(var a=[],w=p.length;w--;){var v=p[w];a.unshift(m.getTextRange(v))}y<0?a.unshift(a.pop()):a.push(a.shift());for(var w=p.length;w--;){var v=p[w],f=v.clone();m.replace(v,a[w]),v.start.row=f.start.row,v.start.column=f.start.column}b.fromOrientedRange(b.ranges[0])},this.selectMore=function(y,m,b){var p=this.session,w=p.multiSelect,v=w.toOrientedRange();if(!(v.isEmpty()&&(v=p.getWordRange(v.start.row,v.start.column),v.cursor=y==-1?v.start:v.end,this.multiSelect.addRange(v),b))){var f=p.getTextRange(v),a=r(p,f,y);a&&(a.cursor=y==-1?a.start:a.end,this.session.unfold(a),this.multiSelect.addRange(a),this.renderer.scrollCursorIntoView(null,.5)),m&&this.multiSelect.substractPoint(v.cursor)}},this.alignCursors=function(){var y=this.session,m=y.multiSelect,b=m.ranges,p=-1,w=b.filter(function(I){if(I.cursor.row==p)return!0;p=I.cursor.row});if(!b.length||w.length==b.length-1){var v=this.selection.getRange(),f=v.start.row,a=v.end.row,h=f==a;if(h){var u=this.session.getLength(),g;do g=this.session.getLine(a);while(/[=:]/.test(g)&&++a<u);do g=this.session.getLine(f);while(/[=:]/.test(g)&&--f>0);f<0&&(f=0),a>=u&&(a=u-1)}var A=this.session.removeFullLines(f,a);A=this.$reAlignText(A,h),this.session.insert({row:f,column:0},A.join(`
`)+`
`),h||(v.start.column=0,v.end.column=A[A.length-1].length),this.selection.setRange(v)}else{w.forEach(function(I){m.substractPoint(I.cursor)});var L=0,M=Infinity,T=b.map(function(I){var F=I.cursor,_=y.getLine(F.row),W=_.substr(F.column).search(/\S/g);return W==-1&&(W=0),F.column>L&&(L=F.column),W<M&&(M=W),W});b.forEach(function(I,F){var _=I.cursor,W=L-_.column,O=T[F]-M;W>O?y.insert(_,e.stringRepeat(" ",W-O)):y.remove(new k(_.row,_.column,_.row,_.column-W+O)),I.start.column=I.end.column=L,I.start.row=I.end.row=_.row,I.cursor=I.end}),m.fromOrientedRange(b[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(y,m){var b=!0,p=!0,w,v,f;return y.map(function(A){var L=A.match(/(\s*)(.*?)(\s*)([=:].*)/);return L?w==null?(w=L[1].length,v=L[2].length,f=L[3].length,L):(w+v+f!=L[1].length+L[2].length+L[3].length&&(p=!1),w!=L[1].length&&(b=!1),w>L[1].length&&(w=L[1].length),v<L[2].length&&(v=L[2].length),f>L[3].length&&(f=L[3].length),L):[A]}).map(m?h:b?p?u:h:g);function a(A){return e.stringRepeat(" ",A)}function h(A){return A[2]?a(w)+A[2]+a(v-A[2].length+f)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}function u(A){return A[2]?a(w+v-A[2].length)+A[2]+a(f)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}function g(A){return A[2]?a(w)+A[2]+a(f)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}}}).call(c.prototype);function d(y,m){return y.row==m.row&&y.column==m.column}x.onSessionChange=function(y){var m=y.session;m&&!m.multiSelect&&(m.$selectionMarkers=[],m.selection.$initRangeList(),m.multiSelect=m.selection),this.multiSelect=m&&m.multiSelect;var b=y.oldSession;b&&(b.multiSelect.off("addRange",this.$onAddRange),b.multiSelect.off("removeRange",this.$onRemoveRange),b.multiSelect.off("multiSelect",this.$onMultiSelect),b.multiSelect.off("singleSelect",this.$onSingleSelect),b.multiSelect.lead.off("change",this.$checkMultiselectChange),b.multiSelect.anchor.off("change",this.$checkMultiselectChange)),m&&(m.multiSelect.on("addRange",this.$onAddRange),m.multiSelect.on("removeRange",this.$onRemoveRange),m.multiSelect.on("multiSelect",this.$onMultiSelect),m.multiSelect.on("singleSelect",this.$onSingleSelect),m.multiSelect.lead.on("change",this.$checkMultiselectChange),m.multiSelect.anchor.on("change",this.$checkMultiselectChange)),m&&this.inMultiSelectMode!=m.selection.inMultiSelectMode&&(m.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function $(y){y.$multiselectOnSessionChange||(y.$onAddRange=y.$onAddRange.bind(y),y.$onRemoveRange=y.$onRemoveRange.bind(y),y.$onMultiSelect=y.$onMultiSelect.bind(y),y.$onSingleSelect=y.$onSingleSelect.bind(y),y.$multiselectOnSessionChange=x.onSessionChange.bind(y),y.$checkMultiselectChange=y.$checkMultiselectChange.bind(y),y.$multiselectOnSessionChange(y),y.on("changeSession",y.$multiselectOnSessionChange),y.on("mousedown",s),y.commands.addCommands(n.defaultCommands),S(y))}function S(y){if(!y.textInput)return;var m=y.textInput.getElement(),b=!1;l.addListener(m,"keydown",function(w){var v=w.keyCode==18&&!(w.ctrlKey||w.shiftKey||w.metaKey);y.$blockSelectEnabled&&v?b||(y.renderer.setMouseCursor("crosshair"),b=!0):b&&p()},y),l.addListener(m,"keyup",p,y),l.addListener(m,"blur",p,y);function p(w){b&&(y.renderer.setMouseCursor(""),b=!1)}}x.MultiSelect=$,E("./config").defineOptions(c.prototype,"editor",{enableMultiselect:{set:function(y){$(this),y?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",s)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",s))},value:!0},enableBlockSelect:{set:function(y){this.$blockSelectEnabled=y},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(E,x,P){"use strict";var R=E("../../range").Range,k=x.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(C,s,l){var e=C.getLine(l);return this.foldingStartMarker.test(e)?"start":s=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(e)?"end":""},this.getFoldWidgetRange=function(C,s,l){return null},this.indentationBlock=function(C,s,l){var e=/\S/,n=C.getLine(s),i=n.search(e);if(i!=-1){for(var t=l||n.length,r=C.getLength(),o=s,c=s;++s<r;){var d=C.getLine(s).search(e);if(d!=-1){if(d<=i){var $=C.getTokenAt(s,0);if(!$||$.type!=="string")break}c=s}}if(c>o){var S=C.getLine(c).length;return new R(o,t,c,S)}}},this.openingBracketBlock=function(C,s,l,e,n){var i={row:l,column:e+1},t=C.$findClosingBracket(s,i,n);if(!!t){var r=C.foldWidgets[t.row];return r==null&&(r=C.getFoldWidget(t.row)),r=="start"&&t.row>i.row&&(t.row--,t.column=C.getLine(t.row).length),R.fromPoints(i,t)}},this.closingBracketBlock=function(C,s,l,e,n){var i={row:l,column:e},t=C.$findOpeningBracket(s,i);if(!!t)return t.column++,i.column--,R.fromPoints(t,i)}}).call(k.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(E,x,P){"use strict";var R=E("../line_widgets").LineWidgets,k=E("../lib/dom"),C=E("../range").Range;function s(e,n,i){for(var t=0,r=e.length-1;t<=r;){var o=t+r>>1,c=i(n,e[o]);if(c>0)t=o+1;else if(c<0)r=o-1;else return o}return-(t+1)}function l(e,n,i){var t=e.getAnnotations().sort(C.comparePoints);if(!!t.length){var r=s(t,{row:n,column:-1},C.comparePoints);r<0&&(r=-r-1),r>=t.length?r=i>0?0:t.length-1:r===0&&i<0&&(r=t.length-1);var o=t[r];if(!(!o||!i)){if(o.row===n){do o=t[r+=i];while(o&&o.row===n);if(!o)return t.slice()}var c=[];n=o.row;do c[i<0?"unshift":"push"](o),o=t[r+=i];while(o&&o.row==n);return c.length&&c}}}x.showErrorMarker=function(e,n){var i=e.session;i.widgetManager||(i.widgetManager=new R(i),i.widgetManager.attach(e));var t=e.getCursorPosition(),r=t.row,o=i.widgetManager.getWidgetsAtRow(r).filter(function(w){return w.type=="errorMarker"})[0];o?o.destroy():r-=n;var c=l(i,r,n),d;if(c){var $=c[0];t.column=($.pos&&typeof $.column!="number"?$.pos.sc:$.column)||0,t.row=$.row,d=e.renderer.$gutterLayer.$annotations[t.row]}else{if(o)return;d={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(t.row),e.selection.moveToPosition(t);var S={row:t.row,fixedWidth:!0,coverGutter:!0,el:k.createElement("div"),type:"errorMarker"},y=S.el.appendChild(k.createElement("div")),m=S.el.appendChild(k.createElement("div"));m.className="error_widget_arrow "+d.className;var b=e.renderer.$cursorLayer.getPixelPosition(t).left;m.style.left=b+e.renderer.gutterWidth-5+"px",S.el.className="error_widget_wrapper",y.className="error_widget "+d.className,y.innerHTML=d.text.join("<br>"),y.appendChild(k.createElement("div"));var p=function(w,v,f){if(v===0&&(f==="esc"||f==="return"))return S.destroy(),{command:"null"}};S.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(p),i.widgetManager.removeLineWidget(S),e.off("changeSelection",S.destroy),e.off("changeSession",S.destroy),e.off("mouseup",S.destroy),e.off("change",S.destroy))},e.keyBinding.addKeyboardHandler(p),e.on("changeSelection",S.destroy),e.on("changeSession",S.destroy),e.on("mouseup",S.destroy),e.on("change",S.destroy),e.session.widgetManager.addLineWidget(S),S.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:S.el.offsetHeight})},k.importCssString(`
.error_widget_wrapper {
background: inherit;
color: inherit;
border:none
}
.error_widget {
border-top: solid 2px;
border-bottom: solid 2px;
margin: 5px 0;
padding: 10px 40px;
white-space: pre-wrap;
}
.error_widget.ace_error, .error_widget_arrow.ace_error{
border-color: #ff5a5a
}
.error_widget.ace_warning, .error_widget_arrow.ace_warning{
border-color: #F1D817
}
.error_widget.ace_info, .error_widget_arrow.ace_info{
border-color: #5a5a5a
}
.error_widget.ace_ok, .error_widget_arrow.ace_ok{
border-color: #5aaa5a
}
.error_widget_arrow {
position: absolute;
border: solid 5px;
border-top-color: transparent!important;
border-right-color: transparent!important;
border-left-color: transparent!important;
top: -5px;
}
`,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(E,x,P){"use strict";E("./loader_build")(x);var R=E("./lib/dom"),k=E("./range").Range,C=E("./editor").Editor,s=E("./edit_session").EditSession,l=E("./undomanager").UndoManager,e=E("./virtual_renderer").VirtualRenderer;E("./worker/worker_client"),E("./keyboard/hash_handler"),E("./placeholder"),E("./multi_select"),E("./mode/folding/fold_mode"),E("./theme/textmate"),E("./ext/error_marker"),x.config=E("./config"),x.edit=function(n,i){if(typeof n=="string"){var t=n;if(n=document.getElementById(t),!n)throw new Error("ace.edit can't find div #"+t)}if(n&&n.env&&n.env.editor instanceof C)return n.env.editor;var r="";if(n&&/input|textarea/i.test(n.tagName)){var o=n;r=o.value,n=R.createElement("pre"),o.parentNode.replaceChild(n,o)}else n&&(r=n.textContent,n.innerHTML="");var c=x.createEditSession(r),d=new C(new e(n),c,i),$={document:c,editor:d,onResize:d.resize.bind(d,null)};return o&&($.textarea=o),d.on("destroy",function(){$.editor.container.env=null}),d.container.env=d.env=$,d},x.createEditSession=function(n,i){var t=new s(n,i);return t.setUndoManager(new l),t},x.Range=k,x.Editor=C,x.EditSession=s,x.UndoManager=l,x.VirtualRenderer=e,x.version=x.config.version}),function(){ace.require(["ace/ace"],function(E){E&&(E.config.init(!0),E.define=ace.define),window.ace||(window.ace=E);for(var x in E)E.hasOwnProperty(x)&&(window.ace[x]=E[x]);window.ace.default=window.ace,fe&&(fe.exports=window.ace)})}()}}]);