1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234 |
- var xe=Object.defineProperty;var we=Object.getOwnPropertySymbols;var ke=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable;var be=(j,ee,M)=>ee in j?xe(j,ee,{enumerable:!0,configurable:!0,writable:!0,value:M}):j[ee]=M,$e=(j,ee)=>{for(var M in ee||(ee={}))ke.call(ee,M)&&be(j,M,ee[M]);if(we)for(var M of we(ee))Me.call(ee,M)&&be(j,M,ee[M]);return j};import{a as Te,bR as Re,eF as Ee,eG as _e,eH as Ie}from"./index.7e08ba81.js";var Ce={exports:{}};(function(j,ee){(function(){var M="ace",k=function(){return this}();!k&&typeof window!="undefined"&&(k=window);var B=function(r,i,n){if(typeof r!="string"){B.original?B.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(n=i),B.modules[r]||(B.payloads[r]=n,B.modules[r]=null)};B.modules={},B.payloads={};var R=function(r,i,n){if(typeof i=="string"){var t=l(r,i);if(t!=null)return n&&n(),t}else if(Object.prototype.toString.call(i)==="[object Array]"){for(var e=[],o=0,s=i.length;o<s;++o){var h=l(r,i[o]);if(h==null&&x.original)return;e.push(h)}return n&&n.apply(null,e)||!0}},x=function(r,i){var n=R("",r,i);return n==null&&x.original?x.original.apply(this,arguments):n},A=function(r,i){if(i.indexOf("!")!==-1){var n=i.split("!");return A(r,n[0])+"!"+A(r,n[1])}if(i.charAt(0)=="."){var t=r.split("/").slice(0,-1).join("/");for(i=t+"/"+i;i.indexOf(".")!==-1&&e!=i;){var e=i;i=i.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return i},l=function(r,i){i=A(r,i);var n=B.modules[i];if(!n){if(n=B.payloads[i],typeof n=="function"){var t={},e={id:i,uri:"",exports:t,packaged:!0},o=function(h,f){return R(i,h,f)},s=n(o,t,e);t=s||e.exports,B.modules[i]=t,delete B.payloads[i]}n=B.modules[i]=t||n}return n};function c(r){var i=k;r&&(k[r]||(k[r]={}),i=k[r]),(!i.define||!i.define.packaged)&&(B.original=i.define,i.define=B,i.define.packaged=!0),(!i.require||!i.require.packaged)&&(x.original=i.require,i.require=x,i.require.packaged=!0)}c(M)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(M,k,B){function R(x,A,l){Object.defineProperty(x,A,{value:l,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||R(String.prototype,"startsWith",function(x,A){return A=A||0,this.lastIndexOf(x,A)===A}),String.prototype.endsWith||R(String.prototype,"endsWith",function(x,A){var l=this;(A===void 0||A>l.length)&&(A=l.length),A-=x.length;var c=l.indexOf(x,A);return c!==-1&&c===A}),String.prototype.repeat||R(String.prototype,"repeat",function(x){for(var A="",l=this;x>0;)x&1&&(A+=l),(x>>=1)&&(l+=l);return A}),String.prototype.includes||R(String.prototype,"includes",function(x,A){return this.indexOf(x,A)!=-1}),Object.assign||(Object.assign=function(x){if(x==null)throw new TypeError("Cannot convert undefined or null to object");for(var A=Object(x),l=1;l<arguments.length;l++){var c=arguments[l];c!=null&&Object.keys(c).forEach(function(r){A[r]=c[r]})}return A}),Object.values||(Object.values=function(x){return Object.keys(x).map(function(A){return x[A]})}),Array.prototype.find||R(Array.prototype,"find",function(x){for(var A=this.length,l=arguments[1],c=0;c<A;c++){var r=this[c];if(x.call(l,r,c,this))return r}}),Array.prototype.findIndex||R(Array.prototype,"findIndex",function(x){for(var A=this.length,l=arguments[1],c=0;c<A;c++){var r=this[c];if(x.call(l,r,c,this))return c}}),Array.prototype.includes||R(Array.prototype,"includes",function(x,A){return this.indexOf(x,A)!=-1}),Array.prototype.fill||R(Array.prototype,"fill",function(x){for(var A=this,l=A.length>>>0,c=arguments[1],r=c>>0,i=r<0?Math.max(l+r,0):Math.min(r,l),n=arguments[2],t=n===void 0?l:n>>0,e=t<0?Math.max(l+t,0):Math.min(t,l);i<e;)A[i]=x,i++;return A}),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(M,k,B){M("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(M,k,B){k.deepCopy=function R(x){if(typeof x!="object"||!x)return x;var A;if(Array.isArray(x)){A=[];for(var l=0;l<x.length;l++)A[l]=R(x[l]);return A}if(Object.prototype.toString.call(x)!=="[object Object]")return x;A={};for(var l in x)A[l]=R(x[l]);return A}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(M,k,B){k.last=function(A){return A[A.length-1]},k.stringReverse=function(A){return A.split("").reverse().join("")},k.stringRepeat=function(A,l){for(var c="";l>0;)l&1&&(c+=A),(l>>=1)&&(A+=A);return c};var R=/^\s\s*/,x=/\s\s*$/;k.stringTrimLeft=function(A){return A.replace(R,"")},k.stringTrimRight=function(A){return A.replace(x,"")},k.copyObject=function(A){var l={};for(var c in A)l[c]=A[c];return l},k.copyArray=function(A){for(var l=[],c=0,r=A.length;c<r;c++)A[c]&&typeof A[c]=="object"?l[c]=this.copyObject(A[c]):l[c]=A[c];return l},k.deepCopy=M("./deep_copy").deepCopy,k.arrayToMap=function(A){for(var l={},c=0;c<A.length;c++)l[A[c]]=1;return l},k.createMap=function(A){var l=Object.create(null);for(var c in A)l[c]=A[c];return l},k.arrayRemove=function(A,l){for(var c=0;c<=A.length;c++)l===A[c]&&A.splice(c,1)},k.escapeRegExp=function(A){return A.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},k.escapeHTML=function(A){return(""+A).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},k.getMatchOffsets=function(A,l){var c=[];return A.replace(l,function(r){c.push({offset:arguments[arguments.length-2],length:r.length})}),c},k.deferredCall=function(A){var l=null,c=function(){l=null,A()},r=function(i){return r.cancel(),l=setTimeout(c,i||0),r};return r.schedule=r,r.call=function(){return this.cancel(),A(),r},r.cancel=function(){return clearTimeout(l),l=null,r},r.isPending=function(){return l},r},k.delayedCall=function(A,l){var c=null,r=function(){c=null,A()},i=function(n){c==null&&(c=setTimeout(r,n||l))};return i.delay=function(n){c&&clearTimeout(c),c=setTimeout(r,n||l)},i.schedule=i,i.call=function(){this.cancel(),A()},i.cancel=function(){c&&clearTimeout(c),c=null},i.isPending=function(){return c},i},k.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch(A){return!1}return!0},k.skipEmptyMatch=function(A,l,c){return c&&A.codePointAt(l)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(M,k,B){k.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},k.getOS=function(){return k.isMac?k.OS.MAC:k.isLinux?k.OS.LINUX:k.OS.WINDOWS};var R=typeof navigator=="object"?navigator:{},x=(/mac|win|linux/i.exec(R.platform)||["other"])[0].toLowerCase(),A=R.userAgent||"",l=R.appName||"";k.isWin=x=="win",k.isMac=x=="mac",k.isLinux=x=="linux",k.isIE=l=="Microsoft Internet Explorer"||l.indexOf("MSAppHost")>=0?parseFloat((A.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((A.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),k.isOldIE=k.isIE&&k.isIE<9,k.isGecko=k.isMozilla=A.match(/ Gecko\/\d+/),k.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",k.isWebKit=parseFloat(A.split("WebKit/")[1])||void 0,k.isChrome=parseFloat(A.split(" Chrome/")[1])||void 0,k.isSafari=parseFloat(A.split(" Safari/")[1])&&!k.isChrome||void 0,k.isEdge=parseFloat(A.split(" Edge/")[1])||void 0,k.isAIR=A.indexOf("AdobeAIR")>=0,k.isAndroid=A.indexOf("Android")>=0,k.isChromeOS=A.indexOf(" CrOS ")>=0,k.isIOS=/iPad|iPhone|iPod/.test(A)&&!window.MSStream,k.isIOS&&(k.isMac=!0),k.isMobile=k.isIOS||k.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(M,k,B){var R=M("./useragent"),x="http://www.w3.org/1999/xhtml";k.buildDom=function n(t,e,o){if(typeof t=="string"&&t){var s=document.createTextNode(t);return e&&e.appendChild(s),s}if(!Array.isArray(t))return t&&t.appendChild&&e&&e.appendChild(t),t;if(typeof t[0]!="string"||!t[0]){for(var h=[],f=0;f<t.length;f++){var L=n(t[f],e,o);L&&h.push(L)}return h}var w=document.createElement(t[0]),d=t[1],a=1;d&&typeof d=="object"&&!Array.isArray(d)&&(a=2);for(var f=a;f<t.length;f++)n(t[f],w,o);return a==2&&Object.keys(d).forEach(function(m){var g=d[m];m==="class"?w.className=Array.isArray(g)?g.join(" "):g:typeof g=="function"||m=="value"||m[0]=="$"?w[m]=g:m==="ref"?o&&(o[g]=w):m==="style"?typeof g=="string"&&(w.style.cssText=g):g!=null&&w.setAttribute(m,g)}),e&&e.appendChild(w),w},k.getDocumentHead=function(n){return n||(n=document),n.head||n.getElementsByTagName("head")[0]||n.documentElement},k.createElement=function(n,t){return document.createElementNS?document.createElementNS(t||x,n):document.createElement(n)},k.removeChildren=function(n){n.innerHTML=""},k.createTextNode=function(n,t){var e=t?t.ownerDocument:document;return e.createTextNode(n)},k.createFragment=function(n){var t=n?n.ownerDocument:document;return t.createDocumentFragment()},k.hasCssClass=function(n,t){var e=(n.className+"").split(/\s+/g);return e.indexOf(t)!==-1},k.addCssClass=function(n,t){k.hasCssClass(n,t)||(n.className+=" "+t)},k.removeCssClass=function(n,t){for(var e=n.className.split(/\s+/g);;){var o=e.indexOf(t);if(o==-1)break;e.splice(o,1)}n.className=e.join(" ")},k.toggleCssClass=function(n,t){for(var e=n.className.split(/\s+/g),o=!0;;){var s=e.indexOf(t);if(s==-1)break;o=!1,e.splice(s,1)}return o&&e.push(t),n.className=e.join(" "),o},k.setCssClass=function(n,t,e){e?k.addCssClass(n,t):k.removeCssClass(n,t)},k.hasCssString=function(n,t){var e=0,o;if(t=t||document,o=t.querySelectorAll("style")){for(;e<o.length;)if(o[e++].id===n)return!0}},k.removeElementById=function(n,t){t=t||document,t.getElementById(n)&&t.getElementById(n).remove()};var A,l=[];k.useStrictCSP=function(n){A=n,n==!1?c():l||(l=[])};function c(){var n=l;l=null,n&&n.forEach(function(t){r(t[0],t[1])})}function r(n,t,e){if(typeof document!="undefined"){if(l){if(e)c();else if(e===!1)return l.push([n,t])}if(!A){var o=e;!e||!e.getRootNode?o=document:(o=e.getRootNode(),(!o||o==e)&&(o=document));var s=o.ownerDocument||o;if(t&&k.hasCssString(t,o))return null;t&&(n+=`
- /*# sourceURL=ace/css/`+t+" */");var h=k.createElement("style");h.appendChild(s.createTextNode(n)),t&&(h.id=t),o==s&&(o=k.getDocumentHead(s)),o.insertBefore(h,o.firstChild)}}}if(k.importCssString=r,k.importCssStylsheet=function(n,t){k.buildDom(["link",{rel:"stylesheet",href:n}],k.getDocumentHead(t))},k.scrollbarWidth=function(n){var t=k.createElement("ace_inner");t.style.width="100%",t.style.minWidth="0px",t.style.height="200px",t.style.display="block";var e=k.createElement("ace_outer"),o=e.style;o.position="absolute",o.left="-10000px",o.overflow="hidden",o.width="200px",o.minWidth="0px",o.height="150px",o.display="block",e.appendChild(t);var s=n&&n.documentElement||document&&document.documentElement;if(!s)return 0;s.appendChild(e);var h=t.offsetWidth;o.overflow="scroll";var f=t.offsetWidth;return h===f&&(f=e.clientWidth),s.removeChild(e),h-f},k.computedStyle=function(n,t){return window.getComputedStyle(n,"")||{}},k.setStyle=function(n,t,e){n[t]!==e&&(n[t]=e)},k.HAS_CSS_ANIMATION=!1,k.HAS_CSS_TRANSFORMS=!1,k.HI_DPI=R.isWin?typeof window!="undefined"&&window.devicePixelRatio>=1.5:!0,R.isChromeOS&&(k.HI_DPI=!1),typeof document!="undefined"){var i=document.createElement("div");k.HI_DPI&&i.style.transform!==void 0&&(k.HAS_CSS_TRANSFORMS=!0),!R.isEdge&&typeof i.style.animationName!="undefined"&&(k.HAS_CSS_ANIMATION=!0),i=null}k.HAS_CSS_TRANSFORMS?k.translate=function(n,t,e){n.style.transform="translate("+Math.round(t)+"px, "+Math.round(e)+"px)"}:k.translate=function(n,t,e){n.style.top=Math.round(e)+"px",n.style.left=Math.round(t)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(M,k,B){/*
- * 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
- */var R=M("./dom");k.get=function(x,A){var l=new XMLHttpRequest;l.open("GET",x,!0),l.onreadystatechange=function(){l.readyState===4&&A(l.responseText)},l.send(null)},k.loadScript=function(x,A){var l=R.getDocumentHead(),c=document.createElement("script");c.src=x,l.appendChild(c),c.onload=c.onreadystatechange=function(r,i){(i||!c.readyState||c.readyState=="loaded"||c.readyState=="complete")&&(c=c.onload=c.onreadystatechange=null,i||A())}},k.qualifyURL=function(x){var A=document.createElement("a");return A.href=x,A.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(M,k,B){k.inherits=function(R,x){R.super_=x,R.prototype=Object.create(x.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}})},k.mixin=function(R,x){for(var A in x)R[A]=x[A];return R},k.implement=function(R,x){k.mixin(R,x)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(M,k,B){var R={},x=function(){this.propagationStopped=!0},A=function(){this.defaultPrevented=!0};R._emit=R._dispatchEvent=function(l,c){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var r=this._eventRegistry[l]||[],i=this._defaultHandlers[l];if(!(!r.length&&!i)){(typeof c!="object"||!c)&&(c={}),c.type||(c.type=l),c.stopPropagation||(c.stopPropagation=x),c.preventDefault||(c.preventDefault=A),r=r.slice();for(var n=0;n<r.length&&(r[n](c,this),!c.propagationStopped);n++);if(i&&!c.defaultPrevented)return i(c,this)}},R._signal=function(l,c){var r=(this._eventRegistry||{})[l];if(!!r){r=r.slice();for(var i=0;i<r.length;i++)r[i](c,this)}},R.once=function(l,c){var r=this;if(this.on(l,function i(){r.off(l,i),c.apply(null,arguments)}),!c)return new Promise(function(i){c=i})},R.setDefaultHandler=function(l,c){var r=this._defaultHandlers;if(r||(r=this._defaultHandlers={_disabled_:{}}),r[l]){var i=r[l],n=r._disabled_[l];n||(r._disabled_[l]=n=[]),n.push(i);var t=n.indexOf(c);t!=-1&&n.splice(t,1)}r[l]=c},R.removeDefaultHandler=function(l,c){var r=this._defaultHandlers;if(!!r){var i=r._disabled_[l];if(r[l]==c)i&&this.setDefaultHandler(l,i.pop());else if(i){var n=i.indexOf(c);n!=-1&&i.splice(n,1)}}},R.on=R.addEventListener=function(l,c,r){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[l];return i||(i=this._eventRegistry[l]=[]),i.indexOf(c)==-1&&i[r?"unshift":"push"](c),c},R.off=R.removeListener=R.removeEventListener=function(l,c){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[l];if(!!r){var i=r.indexOf(c);i!==-1&&r.splice(i,1)}},R.removeAllListeners=function(l){l||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[l]=void 0),this._defaultHandlers&&(this._defaultHandlers[l]=void 0)},k.EventEmitter=R}),ace.define("ace/lib/report_error",["require","exports","module"],function(M,k,B){k.reportError=function(x,A){var l=new Error(x);l.data=A,typeof console=="object"&&console.error&&console.error(l),setTimeout(function(){throw l})}}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error"],function(M,k,B){var R=M("./oop"),x=M("./event_emitter").EventEmitter,A=M("./report_error").reportError,l={setOptions:function(n){Object.keys(n).forEach(function(t){this.setOption(t,n[t])},this)},getOptions:function(n){var t={};if(n)Array.isArray(n)||(t=n,n=Object.keys(t));else{var e=this.$options;n=Object.keys(e).filter(function(o){return!e[o].hidden})}return n.forEach(function(o){t[o]=this.getOption(o)},this),t},setOption:function(n,t){if(this["$"+n]!==t){var e=this.$options[n];if(!e)return c('misspelled option "'+n+'"');if(e.forwardTo)return this[e.forwardTo]&&this[e.forwardTo].setOption(n,t);e.handlesSet||(this["$"+n]=t),e&&e.set&&e.set.call(this,t)}},getOption:function(n){var t=this.$options[n];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(n):t&&t.get?t.get.call(this):this["$"+n]:c('misspelled option "'+n+'"')}};function c(n){typeof console!="undefined"&&console.warn&&console.warn.apply(console,arguments)}var r,i=function(){function n(){this.$defaultOptions={}}return n.prototype.defineOptions=function(t,e,o){return t.$options||(this.$defaultOptions[e]=t.$options={}),Object.keys(o).forEach(function(s){var h=o[s];typeof h=="string"&&(h={forwardTo:h}),h.name||(h.name=s),t.$options[h.name]=h,"initialValue"in h&&(t["$"+h.name]=h.initialValue)}),R.implement(t,l),this},n.prototype.resetOptions=function(t){Object.keys(t.$options).forEach(function(e){var o=t.$options[e];"value"in o&&t.setOption(e,o.value)})},n.prototype.setDefaultValue=function(t,e,o){if(!t){for(t in this.$defaultOptions)if(this.$defaultOptions[t][e])break;if(!this.$defaultOptions[t][e])return!1}var s=this.$defaultOptions[t]||(this.$defaultOptions[t]={});s[e]&&(s.forwardTo?this.setDefaultValue(s.forwardTo,e,o):s[e].value=o)},n.prototype.setDefaultValues=function(t,e){Object.keys(e).forEach(function(o){this.setDefaultValue(t,o,e[o])},this)},n.prototype.setMessages=function(t){r=t},n.prototype.nls=function(t,e){r&&!r[t]&&c("No message found for '"+t+"' in the provided messages, falling back to default English message.");var o=r&&r[t]||t;return e&&(o=o.replace(/\$(\$|[\d]+)/g,function(s,h){return h=="$"?"$":e[h]})),o},n}();i.prototype.warn=c,i.prototype.reportError=A,R.implement(i.prototype,x),k.AppConfig=i}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(M,k,B){B.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(M,k,B){k.isDark=!1,k.cssClass="ace-tm",k.cssText=M("./textmate-css"),k.$id="ace/theme/textmate";var R=M("../lib/dom");R.importCssString(k.cssText,k.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(M,k,B){var R=M("./lib/lang"),x=M("./lib/net"),A=M("./lib/dom"),l=M("./lib/app_config").AppConfig;B.exports=k=new l;var c={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};k.get=function(t){if(!c.hasOwnProperty(t))throw new Error("Unknown config key: "+t);return c[t]},k.set=function(t,e){if(c.hasOwnProperty(t))c[t]=e;else if(this.setDefaultValue("",t,e)==!1)throw new Error("Unknown config key: "+t);t=="useStrictCSP"&&A.useStrictCSP(e)},k.all=function(){return R.copyObject(c)},k.$modes={},k.moduleUrl=function(t,e){if(c.$moduleUrls[t])return c.$moduleUrls[t];var o=t.split("/");e=e||o[o.length-2]||"";var s=e=="snippets"?"/":"-",h=o[o.length-1];if(e=="worker"&&s=="-"){var f=new RegExp("^"+e+"[\\-_]|[\\-_]"+e+"$","g");h=h.replace(f,"")}(!h||h==e)&&o.length>1&&(h=o[o.length-2]);var L=c[e+"Path"];return L==null?L=c.basePath:s=="/"&&(e=s=""),L&&L.slice(-1)!="/"&&(L+="/"),L+e+s+h+this.get("suffix")},k.setModuleUrl=function(t,e){return c.$moduleUrls[t]=e};var r=function(t,e){if(t==="ace/theme/textmate"||t==="./theme/textmate")return e(null,M("./theme/textmate"));if(i)return i(t,e);console.error("loader is not configured")},i;k.setLoader=function(t){i=t},k.dynamicModules=Object.create(null),k.$loading={},k.$loaded={},k.loadModule=function(t,e){var o;if(Array.isArray(t))var s=t[0],h=t[1];else if(typeof t=="string")var h=t;var f=function(L){if(L&&!k.$loading[h])return e&&e(L);if(k.$loading[h]||(k.$loading[h]=[]),k.$loading[h].push(e),!(k.$loading[h].length>1)){var w=function(){r(h,function(d,a){a&&(k.$loaded[h]=a),k._emit("load.module",{name:h,module:a});var m=k.$loading[h];k.$loading[h]=null,m.forEach(function(g){g&&g(a)})})};if(!k.get("packaged"))return w();x.loadScript(k.moduleUrl(h,s),w),n()}};if(k.dynamicModules[h])k.dynamicModules[h]().then(function(L){L.default?f(L.default):f(L)});else{try{o=this.$require(h)}catch(L){}f(o||k.$loaded[h])}},k.$require=function(t){if(typeof B.require=="function"){var e="require";return B[e](t)}},k.setModuleLoader=function(t,e){k.dynamicModules[t]=e};var n=function(){!c.basePath&&!c.workerPath&&!c.modePath&&!c.themePath&&!Object.keys(c.$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(){})};k.version="1.32.3"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(M,k,B){M("./lib/fixoldbrowsers");var R=M("./config");R.setLoader(function(c,r){M([c],function(i){r(null,i)})});var x=function(){return this||typeof window!="undefined"&&window}();B.exports=function(c){R.init=A,R.$require=M,c.require=M},A(!0);function A(c){if(!(!x||!x.document)){R.set("packaged",c||M.packaged||B.packaged||x.define&&(void 0).packaged);var r={},i="",n=document.currentScript||document._currentScript,t=n&&n.ownerDocument||document;n&&n.src&&(i=n.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var e=t.getElementsByTagName("script"),o=0;o<e.length;o++){var s=e[o],h=s.src||s.getAttribute("src");if(!!h){for(var f=s.attributes,L=0,w=f.length;L<w;L++){var d=f[L];d.name.indexOf("data-ace-")===0&&(r[l(d.name.replace(/^data-ace-/,""))]=d.value)}var a=h.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);a&&(i=a[1])}}i&&(r.base=r.base||i,r.packaged=!0),r.basePath=r.base,r.workerPath=r.workerPath||r.base,r.modePath=r.modePath||r.base,r.themePath=r.themePath||r.base,delete r.base;for(var m in r)typeof r[m]!="undefined"&&R.set(m,r[m])}}function l(c){return c.replace(/-(.)/g,function(r,i){return i.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(M,k,B){var R=function(){function x(A,l,c,r){this.start={row:A,column:l},this.end={row:c,column:r}}return x.prototype.isEqual=function(A){return this.start.row===A.start.row&&this.end.row===A.end.row&&this.start.column===A.start.column&&this.end.column===A.end.column},x.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},x.prototype.contains=function(A,l){return this.compare(A,l)==0},x.prototype.compareRange=function(A){var l,c=A.end,r=A.start;return l=this.compare(c.row,c.column),l==1?(l=this.compare(r.row,r.column),l==1?2:l==0?1:0):l==-1?-2:(l=this.compare(r.row,r.column),l==-1?-1:l==1?42:0)},x.prototype.comparePoint=function(A){return this.compare(A.row,A.column)},x.prototype.containsRange=function(A){return this.comparePoint(A.start)==0&&this.comparePoint(A.end)==0},x.prototype.intersects=function(A){var l=this.compareRange(A);return l==-1||l==0||l==1},x.prototype.isEnd=function(A,l){return this.end.row==A&&this.end.column==l},x.prototype.isStart=function(A,l){return this.start.row==A&&this.start.column==l},x.prototype.setStart=function(A,l){typeof A=="object"?(this.start.column=A.column,this.start.row=A.row):(this.start.row=A,this.start.column=l)},x.prototype.setEnd=function(A,l){typeof A=="object"?(this.end.column=A.column,this.end.row=A.row):(this.end.row=A,this.end.column=l)},x.prototype.inside=function(A,l){return this.compare(A,l)==0?!(this.isEnd(A,l)||this.isStart(A,l)):!1},x.prototype.insideStart=function(A,l){return this.compare(A,l)==0?!this.isEnd(A,l):!1},x.prototype.insideEnd=function(A,l){return this.compare(A,l)==0?!this.isStart(A,l):!1},x.prototype.compare=function(A,l){return!this.isMultiLine()&&A===this.start.row?l<this.start.column?-1:l>this.end.column?1:0:A<this.start.row?-1:A>this.end.row?1:this.start.row===A?l>=this.start.column?0:-1:this.end.row===A?l<=this.end.column?0:1:0},x.prototype.compareStart=function(A,l){return this.start.row==A&&this.start.column==l?-1:this.compare(A,l)},x.prototype.compareEnd=function(A,l){return this.end.row==A&&this.end.column==l?1:this.compare(A,l)},x.prototype.compareInside=function(A,l){return this.end.row==A&&this.end.column==l?1:this.start.row==A&&this.start.column==l?-1:this.compare(A,l)},x.prototype.clipRows=function(A,l){if(this.end.row>l)var c={row:l+1,column:0};else if(this.end.row<A)var c={row:A,column:0};if(this.start.row>l)var r={row:l+1,column:0};else if(this.start.row<A)var r={row:A,column:0};return x.fromPoints(r||this.start,c||this.end)},x.prototype.extend=function(A,l){var c=this.compare(A,l);if(c==0)return this;if(c==-1)var r={row:A,column:l};else var i={row:A,column:l};return x.fromPoints(r||this.start,i||this.end)},x.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},x.prototype.isMultiLine=function(){return this.start.row!==this.end.row},x.prototype.clone=function(){return x.fromPoints(this.start,this.end)},x.prototype.collapseRows=function(){return this.end.column==0?new x(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new x(this.start.row,0,this.end.row,0)},x.prototype.toScreenRange=function(A){var l=A.documentToScreenPosition(this.start),c=A.documentToScreenPosition(this.end);return new x(l.row,l.column,c.row,c.column)},x.prototype.moveBy=function(A,l){this.start.row+=A,this.start.column+=l,this.end.row+=A,this.end.column+=l},x}();R.fromPoints=function(x,A){return new R(x.row,x.column,A.row,A.column)},R.comparePoints=function(x,A){return x.row-A.row||x.column-A.column},k.Range=R}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(M,k,B){/*! @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 */var R=M("./oop"),x=function(){var A={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:"*"}};A.PRINTABLE_KEYS[173]="-";var l,c;for(c in A.FUNCTION_KEYS)l=A.FUNCTION_KEYS[c].toLowerCase(),A[l]=parseInt(c,10);for(c in A.PRINTABLE_KEYS)l=A.PRINTABLE_KEYS[c].toLowerCase(),A[l]=parseInt(c,10);return R.mixin(A,A.MODIFIER_KEYS),R.mixin(A,A.PRINTABLE_KEYS),R.mixin(A,A.FUNCTION_KEYS),A.enter=A.return,A.escape=A.esc,A.del=A.delete,function(){for(var r=["cmd","ctrl","alt","shift"],i=Math.pow(2,r.length);i--;)A.KEY_MODS[i]=r.filter(function(n){return i&A.KEY_MODS[n]}).join("-")+"-"}(),A.KEY_MODS[0]="",A.KEY_MODS[-1]="input-",A}();R.mixin(k,x),k.default=k,k.keyCodeToString=function(A){var l=x[A];return typeof l!="string"&&(l=String.fromCharCode(A)),l.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(M,k,B){var R=M("./keys"),x=M("./useragent"),A=null,l=0,c;function r(){c=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return c={passive:!1},!0}})}catch(L){}}function i(){return c==null&&r(),c}function n(L,w,d){this.elem=L,this.type=w,this.callback=d}n.prototype.destroy=function(){e(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var t=k.addListener=function(L,w,d,a){L.addEventListener(w,d,i()),a&&a.$toDestroy.push(new n(L,w,d))},e=k.removeListener=function(L,w,d){L.removeEventListener(w,d,i())};k.stopEvent=function(L){return k.stopPropagation(L),k.preventDefault(L),!1},k.stopPropagation=function(L){L.stopPropagation&&L.stopPropagation()},k.preventDefault=function(L){L.preventDefault&&L.preventDefault()},k.getButton=function(L){return L.type=="dblclick"?0:L.type=="contextmenu"||x.isMac&&L.ctrlKey&&!L.altKey&&!L.shiftKey?2:L.button},k.capture=function(L,w,d){var a=L&&L.ownerDocument||document;function m(g){w&&w(g),d&&d(g),e(a,"mousemove",w),e(a,"mouseup",m),e(a,"dragstart",m)}return t(a,"mousemove",w),t(a,"mouseup",m),t(a,"dragstart",m),m},k.addMouseWheelListener=function(L,w,d){t(L,"wheel",function(a){var m=.15,g=a.deltaX||0,v=a.deltaY||0;switch(a.deltaMode){case a.DOM_DELTA_PIXEL:a.wheelX=g*m,a.wheelY=v*m;break;case a.DOM_DELTA_LINE:var C=15;a.wheelX=g*C,a.wheelY=v*C;break;case a.DOM_DELTA_PAGE:var $=150;a.wheelX=g*$,a.wheelY=v*$;break}w(a)},d)},k.addMultiMouseDownListener=function(L,w,d,a,m){var g=0,v,C,$,b={2:"dblclick",3:"tripleclick",4:"quadclick"};function p(u){if(k.getButton(u)!==0?g=0:u.detail>1?(g++,g>4&&(g=1)):g=1,x.isIE){var y=Math.abs(u.clientX-v)>5||Math.abs(u.clientY-C)>5;(!$||y)&&(g=1),$&&clearTimeout($),$=setTimeout(function(){$=null},w[g-1]||600),g==1&&(v=u.clientX,C=u.clientY)}if(u._clicks=g,d[a]("mousedown",u),g>4)g=0;else if(g>1)return d[a](b[g],u)}Array.isArray(L)||(L=[L]),L.forEach(function(u){t(u,"mousedown",p,m)})};var o=function(L){return 0|(L.ctrlKey?1:0)|(L.altKey?2:0)|(L.shiftKey?4:0)|(L.metaKey?8:0)};k.getModifierString=function(L){return R.KEY_MODS[o(L)]};function s(L,w,d){var a=o(w);if(!x.isMac&&A){if(w.getModifierState&&(w.getModifierState("OS")||w.getModifierState("Win"))&&(a|=8),A.altGr)if((3&a)!=3)A.altGr=0;else return;if(d===18||d===17){var m="location"in w?w.location:w.keyLocation;if(d===17&&m===1)A[d]==1&&(l=w.timeStamp);else if(d===18&&a===3&&m===2){var g=w.timeStamp-l;g<50&&(A.altGr=!0)}}}if(d in R.MODIFIER_KEYS&&(d=-1),!a&&d===13){var m="location"in w?w.location:w.keyLocation;if(m===3&&(L(w,a,-d),w.defaultPrevented))return}if(x.isChromeOS&&a&8){if(L(w,a,d),w.defaultPrevented)return;a&=-9}return!a&&!(d in R.FUNCTION_KEYS)&&!(d in R.PRINTABLE_KEYS)?!1:L(w,a,d)}k.addCommandKeyListener=function(L,w,d){var a=null;t(L,"keydown",function(m){A[m.keyCode]=(A[m.keyCode]||0)+1;var g=s(w,m,m.keyCode);return a=m.defaultPrevented,g},d),t(L,"keypress",function(m){a&&(m.ctrlKey||m.altKey||m.shiftKey||m.metaKey)&&(k.stopEvent(m),a=null)},d),t(L,"keyup",function(m){A[m.keyCode]=null},d),A||(h(),t(window,"focus",h))};function h(){A=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!x.isOldIE){var f=1;k.nextTick=function(L,w){w=w||window;var d="zero-timeout-message-"+f++,a=function(m){m.data==d&&(k.stopPropagation(m),e(w,"message",a),L())};t(w,"message",a),w.postMessage(d,"*")}}k.$idleBlocked=!1,k.onIdle=function(L,w){return setTimeout(function d(){k.$idleBlocked?setTimeout(d,100):L()},w)},k.$idleBlockId=null,k.blockIdle=function(L){k.$idleBlockId&&clearTimeout(k.$idleBlockId),k.$idleBlocked=!0,k.$idleBlockId=setTimeout(function(){k.$idleBlocked=!1},L||100)},k.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),k.nextFrame?k.nextFrame=k.nextFrame.bind(window):k.nextFrame=function(L){setTimeout(L,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(M,k,B){var R;B.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/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(M,k,B){var R=M("../lib/event"),x=M("../config").nls,A=M("../lib/useragent"),l=M("../lib/dom"),c=M("../lib/lang"),r=M("../clipboard"),i=A.isChrome<18,n=A.isIE,t=A.isChrome>63,e=400,o=M("../lib/keys"),s=o.KEY_MODS,h=A.isIOS,f=h?/\s/:/\n/,L=A.isMobile,w;w=function(d,a){var m=l.createElement("textarea");m.className="ace_text-input",m.setAttribute("wrap","off"),m.setAttribute("autocorrect","off"),m.setAttribute("autocapitalize","off"),m.setAttribute("spellcheck","false"),m.style.opacity="0",d.insertBefore(m,d.firstChild);var g=!1,v=!1,C=!1,$=!1,b="";L||(m.style.fontSize="1px");var p=!1,u=!1,y="",S=0,T=0,E=0,_=Number.MAX_SAFE_INTEGER,I=Number.MIN_SAFE_INTEGER,D=0;try{var H=document.activeElement===m}catch(z){}this.setNumberOfExtraLines=function(z){if(_=Number.MAX_SAFE_INTEGER,I=Number.MIN_SAFE_INTEGER,z<0){D=0;return}D=z},this.setAriaOptions=function(z){if(z.activeDescendant?(m.setAttribute("aria-haspopup","true"),m.setAttribute("aria-autocomplete",z.inline?"both":"list"),m.setAttribute("aria-activedescendant",z.activeDescendant)):(m.setAttribute("aria-haspopup","false"),m.setAttribute("aria-autocomplete","both"),m.removeAttribute("aria-activedescendant")),z.role&&m.setAttribute("role",z.role),z.setLabel&&(m.setAttribute("aria-roledescription",x("editor")),a.session)){var K=a.session.selection.cursor.row;m.setAttribute("aria-label",x("Cursor at row $0",[K+1]))}},this.setAriaOptions({role:"textbox"}),R.addListener(m,"blur",function(z){u||(a.onBlur(z),H=!1)},a),R.addListener(m,"focus",function(z){if(!u){if(H=!0,A.isEdge)try{if(!document.hasFocus())return}catch(K){}a.onFocus(z),A.isEdge?setTimeout(F):F()}},a),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:a.renderer.enableKeyboardAccessibility}),b||t||this.$focusScroll=="browser")return m.focus({preventScroll:!0});var z=m.style.top;m.style.position="fixed",m.style.top="0px";try{var K=m.getBoundingClientRect().top!=0}catch(J){return}var Y=[];if(K)for(var Q=m.parentElement;Q&&Q.nodeType==1;)Y.push(Q),Q.setAttribute("ace_nocontext","true"),!Q.parentElement&&Q.getRootNode?Q=Q.getRootNode().host:Q=Q.parentElement;m.focus({preventScroll:!0}),K&&Y.forEach(function(J){J.removeAttribute("ace_nocontext")}),setTimeout(function(){m.style.position="",m.style.top=="0px"&&(m.style.top=z)},0)},this.blur=function(){m.blur()},this.isFocused=function(){return H},a.on("beforeEndOperation",function(){var z=a.curOp,K=z&&z.command&&z.command.name;if(K!="insertstring"){var Y=K&&(z.docChanged||z.selectionChanged);C&&Y&&(y=m.value="",ue()),F()}});var O=function(z,K){for(var Y=K,Q=1;Q<=z-_&&Q<2*D+1;Q++)Y+=a.session.getLine(z-Q).length+1;return Y},F=h?function(z){if(!(!H||g&&!z||$)){z||(z="");var K=`
- ab`+z+`cde fg
- `;K!=m.value&&(m.value=y=K);var Y=4,Q=4+(z.length||(a.selection.isEmpty()?0:1));(S!=Y||T!=Q)&&m.setSelectionRange(Y,Q),S=Y,T=Q}}:function(){if(!(C||$)&&!(!H&&!V)){C=!0;var z=0,K=0,Y="";if(a.session){var Q=a.selection,J=Q.getRange(),ne=Q.cursor.row;ne===I+1?(_=I+1,I=_+2*D):ne===_-1?(I=_-1,_=I-2*D):(ne<_-1||ne>I+1)&&(_=ne>D?ne-D:0,I=ne>D?ne+D:2*D);for(var oe=[],re=_;re<=I;re++)oe.push(a.session.getLine(re));if(Y=oe.join(`
- `),z=O(J.start.row,J.start.column),K=O(J.end.row,J.end.column),J.start.row<_){var ie=a.session.getLine(_-1);z=J.start.row<_-1?0:z,K+=ie.length+1,Y=ie+`
- `+Y}else if(J.end.row>I){var q=a.session.getLine(I+1);K=J.end.row>I+1?q.length:J.end.column,K+=Y.length+1,Y=Y+`
- `+q}else L&&ne>0&&(Y=`
- `+Y,K+=1,z+=1);Y.length>e&&(z<e&&K<e?Y=Y.slice(0,e):(Y=`
- `,z==K?z=K=0:(z=0,K=1)));var le=Y+`
- `;le!=y&&(m.value=y=le,S=T=le.length)}if(V&&(S=m.selectionStart,T=m.selectionEnd),T!=K||S!=z||m.selectionEnd!=T)try{m.setSelectionRange(z,K),S=z,T=K}catch(de){}C=!1}};this.resetSelection=F,H&&a.onFocus();var W=function(z){return z.selectionStart===0&&z.selectionEnd>=y.length&&z.value===y&&y&&z.selectionEnd!==T},N=function(z){C||(g?g=!1:W(m)?(a.selectAll(),F()):L&&m.selectionStart!=S&&F())},P=null;this.setInputHandler=function(z){P=z},this.getInputHandler=function(){return P};var V=!1,U=function(z,K){if(V&&(V=!1),v)return F(),z&&a.onPaste(z),v=!1,"";for(var Y=m.selectionStart,Q=m.selectionEnd,J=S,ne=y.length-T,oe=z,re=z.length-Y,ie=z.length-Q,q=0;J>0&&y[q]==z[q];)q++,J--;for(oe=oe.slice(q),q=1;ne>0&&y.length-q>S-1&&y[y.length-q]==z[z.length-q];)q++,ne--;re-=q-1,ie-=q-1;var le=oe.length-q+1;if(le<0&&(J=-le,le=0),oe=oe.slice(0,le),!K&&!oe&&!re&&!J&&!ne&&!ie)return"";$=!0;var de=!1;return A.isAndroid&&oe==". "&&(oe=" ",de=!0),oe&&!J&&!ne&&!re&&!ie||p?a.onTextInput(oe):a.onTextInput(oe,{extendLeft:J,extendRight:ne,restoreStart:re,restoreEnd:ie}),$=!1,y=z,S=Y,T=Q,E=ie,de?`
- `:oe},G=function(z){if(C)return he();if(z&&z.inputType){if(z.inputType=="historyUndo")return a.execCommand("undo");if(z.inputType=="historyRedo")return a.execCommand("redo")}var K=m.value,Y=U(K,!0);(K.length>e+100||f.test(Y)||L&&S<1&&S==T)&&F()},X=function(z,K,Y){var Q=z.clipboardData||window.clipboardData;if(!(!Q||i)){var J=n||Y?"Text":"text/plain";try{return K?Q.setData(J,K)!==!1:Q.getData(J)}catch(ne){if(!Y)return X(ne,K,!0)}}},Z=function(z,K){var Y=a.getCopyText();if(!Y)return R.preventDefault(z);X(z,Y)?(h&&(F(Y),g=Y,setTimeout(function(){g=!1},10)),K?a.onCut():a.onCopy(),R.preventDefault(z)):(g=!0,m.value=Y,m.select(),setTimeout(function(){g=!1,F(),K?a.onCut():a.onCopy()}))},ae=function(z){Z(z,!0)},se=function(z){Z(z,!1)},te=function(z){var K=X(z);r.pasteCancelled()||(typeof K=="string"?(K&&a.onPaste(K,z),A.isIE&&setTimeout(F),R.preventDefault(z)):(m.value="",v=!0))};R.addCommandKeyListener(m,a.onCommandKey.bind(a),a),R.addListener(m,"select",N,a),R.addListener(m,"input",G,a),R.addListener(m,"cut",ae,a),R.addListener(m,"copy",se,a),R.addListener(m,"paste",te,a),(!("oncut"in m)||!("oncopy"in m)||!("onpaste"in m))&&R.addListener(d,"keydown",function(z){if(!(A.isMac&&!z.metaKey||!z.ctrlKey))switch(z.keyCode){case 67:se(z);break;case 86:te(z);break;case 88:ae(z);break}},a);var ce=function(z){if(!(C||!a.onCompositionStart||a.$readOnly)&&(C={},!p)){z.data&&(C.useTextareaForIME=!1),setTimeout(he,0),a._signal("compositionStart"),a.on("mousedown",pe);var K=a.getSelectionRange();K.end.row=K.start.row,K.end.column=K.start.column,C.markerRange=K,C.selectionStart=S,a.onCompositionStart(C),C.useTextareaForIME?(y=m.value="",S=0,T=0):(m.msGetInputContext&&(C.context=m.msGetInputContext()),m.getInputContext&&(C.context=m.getInputContext()))}},he=function(){if(!(!C||!a.onCompositionUpdate||a.$readOnly)){if(p)return pe();if(C.useTextareaForIME)a.onCompositionUpdate(m.value);else{var z=m.value;U(z),C.markerRange&&(C.context&&(C.markerRange.start.column=C.selectionStart=C.context.compositionStartOffset),C.markerRange.end.column=C.markerRange.start.column+T-C.selectionStart+E)}}},ue=function(z){!a.onCompositionEnd||a.$readOnly||(C=!1,a.onCompositionEnd(),a.off("mousedown",pe),z&&G())};function pe(){u=!0,m.blur(),m.focus(),u=!1}var ve=c.delayedCall(he,50).schedule.bind(null,null);function Ae(z){z.keyCode==27&&m.value.length<m.selectionStart&&(C||(y=m.value),S=T=-1,F()),ve()}R.addListener(m,"compositionstart",ce,a),R.addListener(m,"compositionupdate",he,a),R.addListener(m,"keyup",Ae,a),R.addListener(m,"keydown",ve,a),R.addListener(m,"compositionend",ue,a),this.getElement=function(){return m},this.setCommandMode=function(z){p=z,m.readOnly=!1},this.setReadOnly=function(z){p||(m.readOnly=z)},this.setCopyWithEmptySelection=function(z){},this.onContextMenu=function(z){V=!0,F(),a._emit("nativecontextmenu",{target:a,domEvent:z}),this.moveToMouse(z,!0)},this.moveToMouse=function(z,K){b||(b=m.style.cssText),m.style.cssText=(K?"z-index:100000;":"")+(A.isIE?"opacity:0.1;":"")+"text-indent: -"+(S+T)*a.renderer.characterWidth*.5+"px;";var Y=a.container.getBoundingClientRect(),Q=l.computedStyle(a.container),J=Y.top+(parseInt(Q.borderTopWidth)||0),ne=Y.left+(parseInt(Y.borderLeftWidth)||0),oe=Y.bottom-J-m.clientHeight-2,re=function(ie){l.translate(m,ie.clientX-ne-2,Math.min(ie.clientY-J-2,oe))};re(z),z.type=="mousedown"&&(a.renderer.$isMousePressed=!0,clearTimeout(ge),A.isWin&&R.capture(a.container,re,fe))},this.onContextMenuClose=fe;var ge;function fe(){clearTimeout(ge),ge=setTimeout(function(){b&&(m.style.cssText=b,b=""),a.renderer.$isMousePressed=!1,a.renderer.$keepTextAreaAtCursor&&a.renderer.$moveTextAreaToCursor()},0)}var me=function(z){a.textInput.onContextMenu(z),fe()};R.addListener(m,"mouseup",me,a),R.addListener(m,"mousedown",function(z){z.preventDefault(),fe()},a),R.addListener(a.renderer.scroller,"contextmenu",me,a),R.addListener(m,"contextmenu",me,a),h&&Le(d,a,m);function Le(z,K,Y){var Q=null,J=!1;Y.addEventListener("keydown",function(oe){Q&&clearTimeout(Q),J=!0},!0),Y.addEventListener("keyup",function(oe){Q=setTimeout(function(){J=!1},100)},!0);var ne=function(oe){if(document.activeElement===Y&&!(J||C||K.$mouseHandler.isMousePressed)&&!g){var re=Y.selectionStart,ie=Y.selectionEnd,q=null,le=0;if(re==0?q=o.up:re==1?q=o.home:ie>T&&y[ie]==`
- `?q=o.end:re<S&&y[re-1]==" "?(q=o.left,le=s.option):re<S||re==S&&T!=S&&re==ie?q=o.left:ie>T&&y.slice(0,ie).split(`
- `).length>2?q=o.down:ie>T&&y[ie-1]==" "?(q=o.right,le=s.option):(ie>T||ie==T&&T!=S&&re==ie)&&(q=o.right),re!==ie&&(le|=s.shift),q){var de=K.onCommandKey({},le,q);if(!de&&K.commands){q=o.keyCodeToString(q);var ye=K.commands.findKeyCommand(le,q);ye&&K.execCommand(ye)}S=re,T=ie,F("")}}};document.addEventListener("selectionchange",ne),K.on("destroy",function(){document.removeEventListener("selectionchange",ne)})}this.destroy=function(){m.parentElement&&m.parentElement.removeChild(m)}},k.TextInput=w,k.$setUserAgentForTests=function(d,a){L=d,h=a}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(M,k,B){var R=M("../lib/useragent"),x=0,A=550,l=function(){function i(n){n.$clickSelection=null;var t=n.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(n)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(n)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(n)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(n)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(n));var e=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];e.forEach(function(o){n[o]=this[o]},this),n.selectByLines=this.extendSelectionBy.bind(n,"getLineRange"),n.selectByWords=this.extendSelectionBy.bind(n,"getWordRange")}return i.prototype.onMouseDown=function(n){var t=n.inSelection(),e=n.getDocumentPosition();this.mousedownEvent=n;var o=this.editor,s=n.getButton();if(s!==0){var h=o.getSelectionRange(),f=h.isEmpty();(f||s==1)&&o.selection.moveToPosition(e),s==2&&(o.textInput.onContextMenu(n.domEvent),R.isMozilla||n.preventDefault());return}if(this.mousedownEvent.time=Date.now(),t&&!o.isFocused()&&(o.focus(),this.$focusTimeout&&!this.$clickSelection&&!o.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(n);return}return this.captureMouse(n),this.startSelect(e,n.domEvent._clicks>1),n.preventDefault()},i.prototype.startSelect=function(n,t){n=n||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var e=this.editor;!this.mousedownEvent||(this.mousedownEvent.getShiftKey()?e.selection.selectToPosition(n):t||e.selection.moveToPosition(n),t||this.select(),e.setStyle("ace_selecting"),this.setState("select"))},i.prototype.select=function(){var n,t=this.editor,e=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var o=this.$clickSelection.comparePoint(e);if(o==-1)n=this.$clickSelection.end;else if(o==1)n=this.$clickSelection.start;else{var s=r(this.$clickSelection,e);e=s.cursor,n=s.anchor}t.selection.setSelectionAnchor(n.row,n.column)}t.selection.selectToPosition(e),t.renderer.scrollCursorIntoView()},i.prototype.extendSelectionBy=function(n){var t,e=this.editor,o=e.renderer.screenToTextCoordinates(this.x,this.y),s=e.selection[n](o.row,o.column);if(this.$clickSelection){var h=this.$clickSelection.comparePoint(s.start),f=this.$clickSelection.comparePoint(s.end);if(h==-1&&f<=0)t=this.$clickSelection.end,(s.end.row!=o.row||s.end.column!=o.column)&&(o=s.start);else if(f==1&&h>=0)t=this.$clickSelection.start,(s.start.row!=o.row||s.start.column!=o.column)&&(o=s.end);else if(h==-1&&f==1)o=s.end,t=s.start;else{var L=r(this.$clickSelection,o);o=L.cursor,t=L.anchor}e.selection.setSelectionAnchor(t.row,t.column)}e.selection.selectToPosition(o),e.renderer.scrollCursorIntoView()},i.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},i.prototype.focusWait=function(){var n=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(n>x||t-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},i.prototype.onDoubleClick=function(n){var t=n.getDocumentPosition(),e=this.editor,o=e.session,s=o.getBracketRange(t);s?(s.isEmpty()&&(s.start.column--,s.end.column++),this.setState("select")):(s=e.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=s,this.select()},i.prototype.onTripleClick=function(n){var t=n.getDocumentPosition(),e=this.editor;this.setState("selectByLines");var o=e.getSelectionRange();o.isMultiLine()&&o.contains(t.row,t.column)?(this.$clickSelection=e.selection.getLineRange(o.start.row),this.$clickSelection.end=e.selection.getLineRange(o.end.row).end):this.$clickSelection=e.selection.getLineRange(t.row),this.select()},i.prototype.onQuadClick=function(n){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},i.prototype.onMouseWheel=function(n){if(!n.getAccelKey()){n.getShiftKey()&&n.wheelY&&!n.wheelX&&(n.wheelX=n.wheelY,n.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var e=this.$lastScroll,o=n.domEvent.timeStamp,s=o-e.t,h=s?n.wheelX/s:e.vx,f=s?n.wheelY/s:e.vy;s<A&&(h=(h+e.vx)/2,f=(f+e.vy)/2);var L=Math.abs(h/f),w=!1;if(L>=1&&t.renderer.isScrollableBy(n.wheelX*n.speed,0)&&(w=!0),L<=1&&t.renderer.isScrollableBy(0,n.wheelY*n.speed)&&(w=!0),w)e.allowed=o;else if(o-e.allowed<A){var d=Math.abs(h)<=1.5*Math.abs(e.vx)&&Math.abs(f)<=1.5*Math.abs(e.vy);d?(w=!0,e.allowed=o):e.allowed=0}if(e.t=o,e.vx=h,e.vy=f,w)return t.renderer.scrollBy(n.wheelX*n.speed,n.wheelY*n.speed),n.stop()}},i}();l.prototype.selectEnd=l.prototype.selectByLinesEnd,l.prototype.selectAllEnd=l.prototype.selectByLinesEnd,l.prototype.selectByWordsEnd=l.prototype.selectByLinesEnd,k.DefaultHandlers=l;function c(i,n,t,e){return Math.sqrt(Math.pow(t-i,2)+Math.pow(e-n,2))}function r(i,n){if(i.start.row==i.end.row)var t=2*n.column-i.start.column-i.end.column;else if(i.start.row==i.end.row-1&&!i.start.column&&!i.end.column)var t=n.column-4;else var t=2*n.row-i.start.row-i.end.row;return t<0?{cursor:i.start,anchor:i.end}:{cursor:i.end,anchor:i.start}}}),ace.define("ace/lib/scroll",["require","exports","module"],function(M,k,B){k.preventParentScroll=function(x){x.stopPropagation();var A=x.currentTarget,l=A.scrollHeight>A.clientHeight;l||x.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(M,k,B){var R=this&&this.__extends||function(){var o=function(s,h){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,L){f.__proto__=L}||function(f,L){for(var w in L)Object.prototype.hasOwnProperty.call(L,w)&&(f[w]=L[w])},o(s,h)};return function(s,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");o(s,h);function f(){this.constructor=s}s.prototype=h===null?Object.create(h):(f.prototype=h.prototype,new f)}}(),x=this&&this.__values||function(o){var s=typeof Symbol=="function"&&Symbol.iterator,h=s&&o[s],f=0;if(h)return h.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&f>=o.length&&(o=void 0),{value:o&&o[f++],done:!o}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},A=M("./lib/dom");M("./lib/event");var l=M("./range").Range,c=M("./lib/scroll").preventParentScroll,r="ace_tooltip",i=function(){function o(s){this.isOpen=!1,this.$element=null,this.$parentNode=s}return o.prototype.$init=function(){return this.$element=A.createElement("div"),this.$element.className=r,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},o.prototype.getElement=function(){return this.$element||this.$init()},o.prototype.setText=function(s){this.getElement().textContent=s},o.prototype.setHtml=function(s){this.getElement().innerHTML=s},o.prototype.setPosition=function(s,h){this.getElement().style.left=s+"px",this.getElement().style.top=h+"px"},o.prototype.setClassName=function(s){A.addCssClass(this.getElement(),s)},o.prototype.setTheme=function(s){this.$element.className=r+" "+(s.isDark?"ace_dark ":"")+(s.cssClass||"")},o.prototype.show=function(s,h,f){s!=null&&this.setText(s),h!=null&&f!=null&&this.setPosition(h,f),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},o.prototype.hide=function(s){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=r,this.isOpen=!1)},o.prototype.getHeight=function(){return this.getElement().offsetHeight},o.prototype.getWidth=function(){return this.getElement().offsetWidth},o.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},o}(),n=function(){function o(){this.popups=[]}return o.prototype.addPopup=function(s){this.popups.push(s),this.updatePopups()},o.prototype.removePopup=function(s){var h=this.popups.indexOf(s);h!==-1&&(this.popups.splice(h,1),this.updatePopups())},o.prototype.updatePopups=function(){var s,h,f,L;this.popups.sort(function(b,p){return p.priority-b.priority});var w=[];try{for(var d=x(this.popups),a=d.next();!a.done;a=d.next()){var m=a.value,g=!0;try{for(var v=(f=void 0,x(w)),C=v.next();!C.done;C=v.next()){var $=C.value;if(this.doPopupsOverlap($,m)){g=!1;break}}}catch(b){f={error:b}}finally{try{C&&!C.done&&(L=v.return)&&L.call(v)}finally{if(f)throw f.error}}g?w.push(m):m.hide()}}catch(b){s={error:b}}finally{try{a&&!a.done&&(h=d.return)&&h.call(d)}finally{if(s)throw s.error}}},o.prototype.doPopupsOverlap=function(s,h){var f=s.getElement().getBoundingClientRect(),L=h.getElement().getBoundingClientRect();return f.left<L.right&&f.right>L.left&&f.top<L.bottom&&f.bottom>L.top},o}(),t=new n;k.popupManager=t,k.Tooltip=i;var e=function(o){R(s,o);function s(h){h===void 0&&(h=document.body);var f=o.call(this,h)||this;f.timeout=void 0,f.lastT=0,f.idleTime=350,f.lastEvent=void 0,f.onMouseOut=f.onMouseOut.bind(f),f.onMouseMove=f.onMouseMove.bind(f),f.waitForHover=f.waitForHover.bind(f),f.hide=f.hide.bind(f);var L=f.getElement();return L.style.whiteSpace="pre-wrap",L.style.pointerEvents="auto",L.addEventListener("mouseout",f.onMouseOut),L.tabIndex=-1,L.addEventListener("blur",function(){L.contains(document.activeElement)||this.hide()}.bind(f)),L.addEventListener("wheel",c),f}return s.prototype.addToEditor=function(h){h.on("mousemove",this.onMouseMove),h.on("mousedown",this.hide),h.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},s.prototype.removeFromEditor=function(h){h.off("mousemove",this.onMouseMove),h.off("mousedown",this.hide),h.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},s.prototype.onMouseMove=function(h,f){this.lastEvent=h,this.lastT=Date.now();var L=f.$mouseHandler.isMousePressed;if(this.isOpen){var w=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(w.row,w.column)||L||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||L||(this.lastEvent=h,this.timeout=setTimeout(this.waitForHover,this.idleTime))},s.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var h=Date.now()-this.lastT;if(this.idleTime-h>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-h);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},s.prototype.isOutsideOfText=function(h){var f=h.editor,L=h.getDocumentPosition(),w=f.session.getLine(L.row);if(L.column==w.length){var d=f.renderer.pixelToScreenCoordinates(h.clientX,h.clientY),a=f.session.documentToScreenPosition(L.row,L.column);if(a.column!=d.column||a.row!=d.row)return!0}return!1},s.prototype.setDataProvider=function(h){this.$gatherData=h},s.prototype.showForRange=function(h,f,L,w){var d=10;if(!(w&&w!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var a=h.renderer;this.isOpen||(t.addPopup(this),this.$registerCloseEvents(),this.setTheme(a.theme)),this.isOpen=!0,this.addMarker(f,h.session),this.range=l.fromPoints(f.start,f.end);var m=a.textToScreenCoordinates(f.start.row,f.start.column),g=a.scroller.getBoundingClientRect();m.pageX<g.left&&(m.pageX=g.left);var v=this.getElement();v.innerHTML="",v.appendChild(L),v.style.maxHeight="",v.style.display="block";var C=v.clientHeight,$=v.clientWidth,b=window.innerHeight-m.pageY-a.lineHeight,p=!0;m.pageY-C<0&&m.pageY<b&&(p=!1),v.style.maxHeight=(p?m.pageY:b)-d+"px",v.style.top=p?"":m.pageY+a.lineHeight+"px",v.style.bottom=p?window.innerHeight-m.pageY+"px":"",v.style.left=Math.min(m.pageX,window.innerWidth-$-d)+"px"}},s.prototype.addMarker=function(h,f){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=f,this.marker=f&&f.addMarker(h,"ace_highlight-marker","text")},s.prototype.hide=function(h){!h&&document.activeElement==this.getElement()||h&&h.target&&(h.type!="keydown"||h.ctrlKey||h.metaKey)&&this.$element.contains(h.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,t.removePopup(this)))},s.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},s.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},s.prototype.onMouseOut=function(h){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!h.relatedTarget||this.getElement().contains(h.relatedTarget)||h&&h.currentTarget.contains(h.relatedTarget)||h.relatedTarget.classList.contains("ace_content")||this.hide())},s}(i);k.HoverTooltip=e}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(M,k,B){var R=this&&this.__extends||function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,h){s.__proto__=h}||function(s,h){for(var f in h)Object.prototype.hasOwnProperty.call(h,f)&&(s[f]=h[f])},t(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(e,o);function s(){this.constructor=e}e.prototype=o===null?Object.create(o):(s.prototype=o.prototype,new s)}}(),x=this&&this.__values||function(t){var e=typeof Symbol=="function"&&Symbol.iterator,o=e&&t[e],s=0;if(o)return o.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&s>=t.length&&(t=void 0),{value:t&&t[s++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},A=M("../lib/dom"),l=M("../lib/event"),c=M("../tooltip").Tooltip,r=M("../config").nls;function i(t){var e=t.editor,o=e.renderer.$gutterLayer,s=new n(e);t.editor.setDefaultHandler("guttermousedown",function(a){if(!(!e.isFocused()||a.getButton()!=0)){var m=o.getRegion(a);if(m!="foldWidgets"){var g=a.getDocumentPosition().row,v=e.session.selection;if(a.getShiftKey())v.selectTo(g,0);else{if(a.domEvent.detail==2)return e.selectAll(),a.preventDefault();t.$clickSelection=e.selection.getLineRange(g)}return t.setState("selectByLines"),t.captureMouse(a),a.preventDefault()}}});var h,f;function L(){var a=f.getDocumentPosition().row,m=e.session.getLength();if(a==m){var g=e.renderer.pixelToScreenCoordinates(0,f.y).row,v=f.$pos;if(g>e.session.documentToScreenRow(v.row,v.column))return w()}if(s.showTooltip(a),!!s.isOpen)if(e.on("mousewheel",w),t.$tooltipFollowsMouse)d(f);else{var C=f.getGutterRow(),$=o.$lines.get(C);if($){var b=$.element.querySelector(".ace_gutter_annotation"),p=b.getBoundingClientRect(),u=s.getElement().style;u.left=p.right+"px",u.top=p.bottom+"px"}else d(f)}}function w(){h&&(h=clearTimeout(h)),s.isOpen&&(s.hideTooltip(),e.off("mousewheel",w))}function d(a){s.setPosition(a.x,a.y)}t.editor.setDefaultHandler("guttermousemove",function(a){var m=a.domEvent.target||a.domEvent.srcElement;if(A.hasCssClass(m,"ace_fold-widget"))return w();s.isOpen&&t.$tooltipFollowsMouse&&d(a),f=a,!h&&(h=setTimeout(function(){h=null,f&&!t.isMousePressed?L():w()},50))}),l.addListener(e.renderer.$gutter,"mouseout",function(a){f=null,!(!s.isOpen||h)&&(h=setTimeout(function(){h=null,w()},50))},e),e.on("changeSession",w),e.on("input",w)}k.GutterHandler=i;var n=function(t){R(e,t);function e(o){var s=t.call(this,o.container)||this;return s.editor=o,s}return e.prototype.setPosition=function(o,s){var h=window.innerWidth||document.documentElement.clientWidth,f=window.innerHeight||document.documentElement.clientHeight,L=this.getWidth(),w=this.getHeight();o+=15,s+=15,o+L>h&&(o-=o+L-h),s+w>f&&(s-=20+w),c.prototype.setPosition.call(this,o,s)},Object.defineProperty(e,"annotationLabels",{get:function(){return{error:{singular:r("error"),plural:r("errors")},warning:{singular:r("warning"),plural:r("warnings")},info:{singular:r("information message"),plural:r("information messages")}}},enumerable:!1,configurable:!0}),e.prototype.showTooltip=function(o){var s=this.editor.renderer.$gutterLayer,h=s.$annotations[o],f;h?f={text:Array.from(h.text),type:Array.from(h.type)}:f={text:[],type:[]};var L=s.session.getFoldLine(o);if(L&&s.$showFoldedAnnotations){for(var w={error:[],warning:[],info:[]},d,a=o+1;a<=L.end.row;a++)if(!!s.$annotations[a])for(var m=0;m<s.$annotations[a].text.length;m++){var g=s.$annotations[a].type[m];if(w[g].push(s.$annotations[a].text[m]),g==="error"){d="error_fold";continue}if(g==="warning"){d="warning_fold";continue}}if(d==="error_fold"||d==="warning_fold"){var v="".concat(e.annotationsToSummaryString(w)," in folded code.");f.text.push(v),f.type.push(d)}}if(f.text.length===0)return this.hide();for(var C={error:[],warning:[],info:[]},$=s.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",a=0;a<f.text.length;a++){var b="<span class='ace_".concat(f.type[a]," ").concat($,"' aria-label='").concat(e.annotationLabels[f.type[a].replace("_fold","")].singular,"' role=img> </span> ").concat(f.text[a]);C[f.type[a].replace("_fold","")].push(b)}var p=[].concat(C.error,C.warning,C.info).join("<br>");this.setHtml(p),this.$element.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.editor._signal("showGutterTooltip",this)},e.prototype.hideTooltip=function(){this.$element.removeAttribute("aria-live"),this.hide(),this.editor._signal("hideGutterTooltip",this)},e.annotationsToSummaryString=function(o){var s,h,f=[],L=["error","warning","info"];try{for(var w=x(L),d=w.next();!d.done;d=w.next()){var a=d.value;if(!!o[a].length){var m=o[a].length===1?e.annotationLabels[a].singular:e.annotationLabels[a].plural;f.push("".concat(o[a].length," ").concat(m))}}}catch(g){s={error:g}}finally{try{d&&!d.done&&(h=w.return)&&h.call(w)}finally{if(s)throw s.error}}return f.join(", ")},e}(c);k.GutterTooltip=n}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(M,k,B){var R=M("../lib/event"),x=M("../lib/useragent"),A=function(){function l(c,r){this.speed,this.wheelX,this.wheelY,this.domEvent=c,this.editor=r,this.x=this.clientX=c.clientX,this.y=this.clientY=c.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return l.prototype.stopPropagation=function(){R.stopPropagation(this.domEvent),this.propagationStopped=!0},l.prototype.preventDefault=function(){R.preventDefault(this.domEvent),this.defaultPrevented=!0},l.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},l.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},l.prototype.getGutterRow=function(){var c=this.getDocumentPosition().row,r=this.editor.session.documentToScreenRow(c,0),i=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return r-i},l.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var c=this.editor,r=c.getSelectionRange();if(r.isEmpty())this.$inSelection=!1;else{var i=this.getDocumentPosition();this.$inSelection=r.contains(i.row,i.column)}return this.$inSelection},l.prototype.getButton=function(){return R.getButton(this.domEvent)},l.prototype.getShiftKey=function(){return this.domEvent.shiftKey},l.prototype.getAccelKey=function(){return x.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},l}();k.MouseEvent=A}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(M,k,B){var R=M("../lib/dom"),x=M("../lib/event"),A=M("../lib/useragent"),l=200,c=200,r=5;function i(t){var e=t.editor,o=R.createElement("div");o.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",o.textContent="\xA0";var s=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];s.forEach(function(O){t[O]=this[O]},this),e.on("mousedown",this.onMouseDown.bind(t));var h=e.container,f,L,w,d,a,m,g=0,v,C,$,b,p;this.onDragStart=function(O){if(this.cancelDrag||!h.draggable){var F=this;return setTimeout(function(){F.startSelect(),F.captureMouse(O)},0),O.preventDefault()}a=e.getSelectionRange();var W=O.dataTransfer;W.effectAllowed=e.getReadOnly()?"copy":"copyMove",e.container.appendChild(o),W.setDragImage&&W.setDragImage(o,0,0),setTimeout(function(){e.container.removeChild(o)}),W.clearData(),W.setData("Text",e.session.getTextRange()),C=!0,this.setState("drag")},this.onDragEnd=function(O){if(h.draggable=!1,C=!1,this.setState(null),!e.getReadOnly()){var F=O.dataTransfer.dropEffect;!v&&F=="move"&&e.session.remove(e.getSelectionRange()),e.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(O){if(!(e.getReadOnly()||!D(O.dataTransfer)))return L=O.clientX,w=O.clientY,f||T(),g++,O.dataTransfer.dropEffect=v=H(O),x.preventDefault(O)},this.onDragOver=function(O){if(!(e.getReadOnly()||!D(O.dataTransfer)))return L=O.clientX,w=O.clientY,f||(T(),g++),_!==null&&(_=null),O.dataTransfer.dropEffect=v=H(O),x.preventDefault(O)},this.onDragLeave=function(O){if(g--,g<=0&&f)return E(),v=null,x.preventDefault(O)},this.onDrop=function(O){if(!!m){var F=O.dataTransfer;if(C)switch(v){case"move":a.contains(m.row,m.column)?a={start:m,end:m}:a=e.moveText(a,m);break;case"copy":a=e.moveText(a,m,!0);break}else{var W=F.getData("Text");a={start:m,end:e.session.insert(m,W)},e.focus(),v=null}return E(),x.preventDefault(O)}},x.addListener(h,"dragstart",this.onDragStart.bind(t),e),x.addListener(h,"dragend",this.onDragEnd.bind(t),e),x.addListener(h,"dragenter",this.onDragEnter.bind(t),e),x.addListener(h,"dragover",this.onDragOver.bind(t),e),x.addListener(h,"dragleave",this.onDragLeave.bind(t),e),x.addListener(h,"drop",this.onDrop.bind(t),e);function u(O,F){var W=Date.now(),N=!F||O.row!=F.row,P=!F||O.column!=F.column;if(!b||N||P)e.moveCursorToPosition(O),b=W,p={x:L,y:w};else{var V=n(p.x,p.y,L,w);V>r?b=null:W-b>=c&&(e.renderer.scrollCursorIntoView(),b=null)}}function y(O,F){var W=Date.now(),N=e.renderer.layerConfig.lineHeight,P=e.renderer.layerConfig.characterWidth,V=e.renderer.scroller.getBoundingClientRect(),U={x:{left:L-V.left,right:V.right-L},y:{top:w-V.top,bottom:V.bottom-w}},G=Math.min(U.x.left,U.x.right),X=Math.min(U.y.top,U.y.bottom),Z={row:O.row,column:O.column};G/P<=2&&(Z.column+=U.x.left<U.x.right?-3:2),X/N<=1&&(Z.row+=U.y.top<U.y.bottom?-1:1);var ae=O.row!=Z.row,se=O.column!=Z.column,te=!F||O.row!=F.row;ae||se&&!te?$?W-$>=l&&e.renderer.scrollCursorIntoView(Z):$=W:$=null}function S(){var O=m;m=e.renderer.screenToTextCoordinates(L,w),u(m,O),y(m,O)}function T(){a=e.selection.toOrientedRange(),f=e.session.addMarker(a,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval(d),S(),d=setInterval(S,20),g=0,x.addListener(document,"mousemove",I)}function E(){clearInterval(d),e.session.removeMarker(f),f=null,e.selection.fromOrientedRange(a),e.isFocused()&&!C&&e.$resetCursorStyle(),a=null,m=null,g=0,$=null,b=null,x.removeListener(document,"mousemove",I)}var _=null;function I(){_==null&&(_=setTimeout(function(){_!=null&&f&&E()},20))}function D(O){var F=O.types;return!F||Array.prototype.some.call(F,function(W){return W=="text/plain"||W=="Text"})}function H(O){var F=["copy","copymove","all","uninitialized"],W=["move","copymove","linkmove","all","uninitialized"],N=A.isMac?O.altKey:O.ctrlKey,P="uninitialized";try{P=O.dataTransfer.effectAllowed.toLowerCase()}catch(U){}var V="none";return N&&F.indexOf(P)>=0?V="copy":W.indexOf(P)>=0?V="move":F.indexOf(P)>=0&&(V="copy"),V}}(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,e=t.container;e.draggable=!0,t.renderer.$cursorLayer.setBlinking(!1),t.setStyle("ace_dragging");var o=A.isWin?"default":"move";t.renderer.setCursorStyle(o),this.setState("dragReady")},this.onMouseDrag=function(t){var e=this.editor.container;if(A.isIE&&this.state=="dragReady"){var o=n(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);o>3&&e.dragDrop()}if(this.state==="dragWait"){var o=n(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);o>0&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(t){if(!!this.$dragEnabled){this.mousedownEvent=t;var e=this.editor,o=t.inSelection(),s=t.getButton(),h=t.domEvent.detail||1;if(h===1&&s===0&&o){if(t.editor.inMultiSelectMode&&(t.getAccelKey()||t.getShiftKey()))return;this.mousedownEvent.time=Date.now();var f=t.domEvent.target||t.domEvent.srcElement;if("unselectable"in f&&(f.unselectable="on"),e.getDragDelay()){if(A.isWebKit){this.cancelDrag=!0;var L=e.container;L.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(t,this.onMouseDrag.bind(this)),t.defaultPrevented=!0}}}}).call(i.prototype);function n(t,e,o,s){return Math.sqrt(Math.pow(o-t,2)+Math.pow(s-e,2))}k.DragdropHandler=i}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(M,k,B){var R=M("./mouse_event").MouseEvent,x=M("../lib/event"),A=M("../lib/dom");k.addTouchListeners=function(l,c){var r="scroll",i,n,t,e,o,s,h=0,f,L=0,w=0,d=0,a,m;function g(){var u=window.navigator&&window.navigator.clipboard,y=!1,S=function(){var E=c.getCopyText(),_=c.session.getUndoManager().hasUndo();m.replaceChild(A.buildDom(y?["span",!E&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],E&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],E&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],u&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],_&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),m.firstChild)},T=function(E){var _=E.target.getAttribute("action");if(_=="more"||!y)return y=!y,S();_=="paste"?u.readText().then(function(I){c.execCommand(_,I)}):_&&((_=="cut"||_=="copy")&&(u?u.writeText(c.getCopyText()):document.execCommand("copy")),c.execCommand(_)),m.firstChild.style.display="none",y=!1,_!="openCommandPalette"&&c.focus()};m=A.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(E){r="menu",E.stopPropagation(),E.preventDefault(),c.textInput.focus()},ontouchend:function(E){E.stopPropagation(),E.preventDefault(),T(E)},onclick:T},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],c.container)}function v(){m||g();var u=c.selection.cursor,y=c.renderer.textToScreenCoordinates(u.row,u.column),S=c.renderer.textToScreenCoordinates(0,0).pageX,T=c.renderer.scrollLeft,E=c.container.getBoundingClientRect();m.style.top=y.pageY-E.top-3+"px",y.pageX-E.left<E.width-70?(m.style.left="",m.style.right="10px"):(m.style.right="",m.style.left=S+T-E.left+"px"),m.style.display="",m.firstChild.style.display="none",c.on("input",C)}function C(u){m&&(m.style.display="none"),c.off("input",C)}function $(){o=null,clearTimeout(o);var u=c.selection.getRange(),y=u.contains(f.row,f.column);(u.isEmpty()||!y)&&(c.selection.moveToPosition(f),c.selection.selectWord()),r="wait",v()}function b(){o=null,clearTimeout(o),c.selection.moveToPosition(f);var u=L>=2?c.selection.getLineRange(f.row):c.session.getBracketRange(f);u&&!u.isEmpty()?c.selection.setRange(u):c.selection.selectWord(),r="wait"}x.addListener(l,"contextmenu",function(u){if(!!a){var y=c.textInput.getElement();y.focus()}},c),x.addListener(l,"touchstart",function(u){var y=u.touches;if(o||y.length>1){clearTimeout(o),o=null,t=-1,r="zoom";return}a=c.$mouseHandler.isMousePressed=!0;var S=c.renderer.layerConfig.lineHeight,T=c.renderer.layerConfig.lineHeight,E=u.timeStamp;e=E;var _=y[0],I=_.clientX,D=_.clientY;Math.abs(i-I)+Math.abs(n-D)>S&&(t=-1),i=u.clientX=I,n=u.clientY=D,w=d=0;var H=new R(u,c);if(f=H.getDocumentPosition(),E-t<500&&y.length==1&&!h)L++,u.preventDefault(),u.button=0,b();else{L=0;var O=c.selection.cursor,F=c.selection.isEmpty()?O:c.selection.anchor,W=c.renderer.$cursorLayer.getPixelPosition(O,!0),N=c.renderer.$cursorLayer.getPixelPosition(F,!0),P=c.renderer.scroller.getBoundingClientRect(),V=c.renderer.layerConfig.offset,U=c.renderer.scrollLeft,G=function(ae,se){return ae=ae/T,se=se/S-.75,ae*ae+se*se};if(u.clientX<P.left){r="zoom";return}var X=G(u.clientX-P.left-W.left+U,u.clientY-P.top-W.top+V),Z=G(u.clientX-P.left-N.left+U,u.clientY-P.top-N.top+V);X<3.5&&Z<3.5&&(r=X>Z?"cursor":"anchor"),Z<3.5?r="anchor":X<3.5?r="cursor":r="scroll",o=setTimeout($,450)}t=E},c),x.addListener(l,"touchend",function(u){a=c.$mouseHandler.isMousePressed=!1,s&&clearInterval(s),r=="zoom"?(r="",h=0):o?(c.selection.moveToPosition(f),h=0,v()):r=="scroll"?(p(),C()):v(),clearTimeout(o),o=null},c),x.addListener(l,"touchmove",function(u){o&&(clearTimeout(o),o=null);var y=u.touches;if(!(y.length>1||r=="zoom")){var S=y[0],T=i-S.clientX,E=n-S.clientY;if(r=="wait")if(T*T+E*E>4)r="cursor";else return u.preventDefault();i=S.clientX,n=S.clientY,u.clientX=S.clientX,u.clientY=S.clientY;var _=u.timeStamp,I=_-e;if(e=_,r=="scroll"){var D=new R(u,c);D.speed=1,D.wheelX=T,D.wheelY=E,10*Math.abs(T)<Math.abs(E)&&(T=0),10*Math.abs(E)<Math.abs(T)&&(E=0),I!=0&&(w=T/I,d=E/I),c._emit("mousewheel",D),D.propagationStopped||(w=d=0)}else{var H=new R(u,c),O=H.getDocumentPosition();r=="cursor"?c.selection.moveCursorToPosition(O):r=="anchor"&&c.selection.setSelectionAnchor(O.row,O.column),c.renderer.scrollCursorIntoView(O),u.preventDefault()}}},c);function p(){h+=60,s=setInterval(function(){h--<=0&&(clearInterval(s),s=null),Math.abs(w)<.01&&(w=0),Math.abs(d)<.01&&(d=0),h<20&&(w=.9*w),h<20&&(d=.9*d);var u=c.session.getScrollTop();c.renderer.scrollBy(10*w,10*d),u==c.session.getScrollTop()&&(h=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(M,k,B){var R=M("../lib/event"),x=M("../lib/useragent"),A=M("./default_handlers").DefaultHandlers,l=M("./default_gutter_handler").GutterHandler,c=M("./mouse_event").MouseEvent,r=M("./dragdrop_handler").DragdropHandler,i=M("./touch_handler").addTouchListeners,n=M("../config"),t=function(){function e(o){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var s=this;this.editor=o,new A(this),new l(this),new r(this);var h=function(w){var d=!document.hasFocus||!document.hasFocus()||!o.isFocused()&&document.activeElement==(o.textInput&&o.textInput.getElement());d&&window.focus(),o.focus(),setTimeout(function(){o.isFocused()||o.focus()})},f=o.renderer.getMouseEventTarget();R.addListener(f,"click",this.onMouseEvent.bind(this,"click"),o),R.addListener(f,"mousemove",this.onMouseMove.bind(this,"mousemove"),o),R.addMultiMouseDownListener([f,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),i(o.container,o);var L=o.renderer.$gutter;R.addListener(L,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),o),R.addListener(L,"click",this.onMouseEvent.bind(this,"gutterclick"),o),R.addListener(L,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),o),R.addListener(L,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),o),R.addListener(f,"mousedown",h,o),R.addListener(L,"mousedown",h,o),x.isIE&&o.renderer.scrollBarV&&(R.addListener(o.renderer.scrollBarV.element,"mousedown",h,o),R.addListener(o.renderer.scrollBarH.element,"mousedown",h,o)),o.on("mousemove",function(w){if(!(s.state||s.$dragDelay||!s.$dragEnabled)){var d=o.renderer.screenToTextCoordinates(w.x,w.y),a=o.session.selection.getRange(),m=o.renderer;!a.isEmpty()&&a.insideStart(d.row,d.column)?m.setCursorStyle("default"):m.setCursorStyle("")}},o)}return e.prototype.onMouseEvent=function(o,s){!this.editor.session||this.editor._emit(o,new c(s,this.editor))},e.prototype.onMouseMove=function(o,s){var h=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!h||!h.length||this.editor._emit(o,new c(s,this.editor))},e.prototype.onMouseWheel=function(o,s){var h=new c(s,this.editor);h.speed=this.$scrollSpeed*2,h.wheelX=s.wheelX,h.wheelY=s.wheelY,this.editor._emit(o,h)},e.prototype.setState=function(o){this.state=o},e.prototype.captureMouse=function(o,s){this.x=o.x,this.y=o.y,this.isMousePressed=!0;var h=this.editor,f=this.editor.renderer;f.$isMousePressed=!0;var L=this,w=function(v){if(!!v){if(x.isWebKit&&!v.which&&L.releaseMouse)return L.releaseMouse();L.x=v.clientX,L.y=v.clientY,s&&s(v),L.mouseEvent=new c(v,L.editor),L.$mouseMoved=!0}},d=function(v){h.off("beforeEndOperation",m),clearInterval(g),h.session&&a(),L[L.state+"End"]&&L[L.state+"End"](v),L.state="",L.isMousePressed=f.$isMousePressed=!1,f.$keepTextAreaAtCursor&&f.$moveTextAreaToCursor(),L.$onCaptureMouseMove=L.releaseMouse=null,v&&L.onMouseEvent("mouseup",v),h.endOperation()},a=function(){L[L.state]&&L[L.state](),L.$mouseMoved=!1};if(x.isOldIE&&o.domEvent.type=="dblclick")return setTimeout(function(){d(o)});var m=function(v){!L.releaseMouse||h.curOp.command.name&&h.curOp.selectionChanged&&(L[L.state+"End"]&&L[L.state+"End"](),L.state="",L.releaseMouse())};h.on("beforeEndOperation",m),h.startOperation({command:{name:"mouse"}}),L.$onCaptureMouseMove=w,L.releaseMouse=R.capture(this.editor.container,w,d);var g=setInterval(a,20)},e.prototype.cancelContextMenu=function(){var o=function(s){s&&s.domEvent&&s.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",o),s&&s.domEvent&&R.stopEvent(s.domEvent))}.bind(this);setTimeout(o,10),this.editor.on("nativecontextmenu",o)},e.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},e}();t.prototype.releaseMouse=null,n.defineOptions(t.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:x.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),k.MouseHandler=t}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(M,k,B){var R=M("../lib/dom"),x=function(){function A(l){l.on("click",function(c){var r=c.getDocumentPosition(),i=l.session,n=i.getFoldAt(r.row,r.column,1);n&&(c.getAccelKey()?i.removeFold(n):i.expandFold(n),c.stop());var t=c.domEvent&&c.domEvent.target;t&&R.hasCssClass(t,"ace_inline_button")&&R.hasCssClass(t,"ace_toggle_wrap")&&(i.setOption("wrap",!i.getUseWrapMode()),l.renderer.scrollCursorIntoView())}),l.on("gutterclick",function(c){var r=l.renderer.$gutterLayer.getRegion(c);if(r=="foldWidgets"){var i=c.getDocumentPosition().row,n=l.session;n.foldWidgets&&n.foldWidgets[i]&&l.session.onFoldWidgetClick(i,c),l.isFocused()||l.focus(),c.stop()}}),l.on("gutterdblclick",function(c){var r=l.renderer.$gutterLayer.getRegion(c);if(r=="foldWidgets"){var i=c.getDocumentPosition().row,n=l.session,t=n.getParentFoldRangeData(i,!0),e=t.range||t.firstRange;if(e){i=e.start.row;var o=n.getFoldAt(i,n.getLine(i).length,1);o?n.removeFold(o):(n.addFold("...",e),l.renderer.scrollCursorIntoView({row:e.start.row,column:0}))}c.stop()}})}return A}();k.FoldHandler=x}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(M,k,B){var R=M("../lib/keys"),x=M("../lib/event"),A=function(){function l(c){this.$editor=c,this.$data={editor:c},this.$handlers=[],this.setDefaultHandler(c.commands)}return l.prototype.setDefaultHandler=function(c){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=c,this.addKeyboardHandler(c,0)},l.prototype.setKeyboardHandler=function(c){var r=this.$handlers;if(r[r.length-1]!=c){for(;r[r.length-1]&&r[r.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(r[r.length-1]);this.addKeyboardHandler(c,1)}},l.prototype.addKeyboardHandler=function(c,r){if(!!c){typeof c=="function"&&!c.handleKeyboard&&(c.handleKeyboard=c);var i=this.$handlers.indexOf(c);i!=-1&&this.$handlers.splice(i,1),r==null?this.$handlers.push(c):this.$handlers.splice(r,0,c),i==-1&&c.attach&&c.attach(this.$editor)}},l.prototype.removeKeyboardHandler=function(c){var r=this.$handlers.indexOf(c);return r==-1?!1:(this.$handlers.splice(r,1),c.detach&&c.detach(this.$editor),!0)},l.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},l.prototype.getStatusText=function(){var c=this.$data,r=c.editor;return this.$handlers.map(function(i){return i.getStatusText&&i.getStatusText(r,c)||""}).filter(Boolean).join(" ")},l.prototype.$callKeyboardHandlers=function(c,r,i,n){for(var t,e=!1,o=this.$editor.commands,s=this.$handlers.length;s--&&(t=this.$handlers[s].handleKeyboard(this.$data,c,r,i,n),!(!(!t||!t.command)&&(t.command=="null"?e=!0:e=o.exec(t.command,this.$editor,t.args,n),e&&n&&c!=-1&&t.passEvent!=!0&&t.command.passEvent!=!0&&x.stopEvent(n),e))););return!e&&c==-1&&(t={command:"insertstring"},e=o.exec("insertstring",this.$editor,r)),e&&this.$editor._signal&&this.$editor._signal("keyboardActivity",t),e},l.prototype.onCommandKey=function(c,r,i){var n=R.keyCodeToString(i);return this.$callKeyboardHandlers(r,n,i,c)},l.prototype.onTextInput=function(c){return this.$callKeyboardHandlers(-1,c)},l}();k.KeyBinding=A}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(M,k,B){var R=0,x=0,A=!1,l=!1,c=!1,r=[[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]],i=[[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]],n=0,t=1,e=0,o=1,s=2,h=3,f=4,L=5,w=6,d=7,a=8,m=9,g=10,v=11,C=12,$=13,b=14,p=15,u=16,y=17,S=18,T=[S,S,S,S,S,S,S,S,S,w,L,w,a,L,S,S,S,S,S,S,S,S,S,S,S,S,S,S,L,L,L,w,a,f,f,v,v,v,f,f,f,f,f,g,m,g,m,m,s,s,s,s,s,s,s,s,s,s,m,f,f,f,f,f,f,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,f,f,f,f,f,f,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,f,f,f,f,S,S,S,S,S,S,L,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,m,f,v,v,v,v,f,f,f,f,e,f,f,S,f,f,v,v,s,s,f,e,f,f,f,s,e,f,f,f,f,f],E=[a,a,a,a,a,a,a,a,a,a,a,S,S,S,e,o,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,a,L,$,b,p,u,y,m,v,v,v,v,v,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,m,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,a];function _(O,F,W,N){var P=R?i:r,V=null,U=null,G=null,X=0,Z=null,ae=null,se=-1,te=null,ce=null,he=[];if(!N)for(te=0,N=[];te<W;te++)N[te]=H(O[te]);for(x=R,A=!1,l=!1,c=!1,ce=0;ce<W;ce++){if(V=X,he[ce]=U=D(O,N,he,ce),X=P[V][U],Z=X&240,X&=15,F[ce]=G=P[X][5],Z>0)if(Z==16){for(te=se;te<ce;te++)F[te]=1;se=-1}else se=-1;if(ae=P[X][6],ae)se==-1&&(se=ce);else if(se>-1){for(te=se;te<ce;te++)F[te]=G;se=-1}N[ce]==L&&(F[ce]=0),x|=G}if(c){for(te=0;te<W;te++)if(N[te]==w){F[te]=R;for(var ue=te-1;ue>=0&&N[ue]==a;ue--)F[ue]=R}}}function I(O,F,W){if(!(x<O)){if(O==1&&R==t&&!l){W.reverse();return}for(var N=W.length,P=0,V,U,G,X;P<N;){if(F[P]>=O){for(V=P+1;V<N&&F[V]>=O;)V++;for(U=P,G=V-1;U<G;U++,G--)X=W[U],W[U]=W[G],W[G]=X;P=V}P++}}}function D(O,F,W,N){var P=F[N],V,U,G,X;switch(P){case e:case o:A=!1;case f:case h:return P;case s:return A?h:s;case d:return A=!0,o;case a:return f;case m:return N<1||N+1>=F.length||(V=W[N-1])!=s&&V!=h||(U=F[N+1])!=s&&U!=h?f:(A&&(U=h),U==V?U:f);case g:return V=N>0?W[N-1]:L,V==s&&N+1<F.length&&F[N+1]==s?s:f;case v:if(N>0&&W[N-1]==s)return s;if(A)return f;for(X=N+1,G=F.length;X<G&&F[X]==v;)X++;return X<G&&F[X]==s?s:f;case C:for(G=F.length,X=N+1;X<G&&F[X]==C;)X++;if(X<G){var Z=O[N],ae=Z>=1425&&Z<=2303||Z==64286;if(V=F[X],ae&&(V==o||V==d))return o}return N<1||(V=F[N-1])==L?f:W[N-1];case L:return A=!1,l=!0,R;case w:return c=!0,f;case $:case b:case u:case y:case p:A=!1;case S:return f}}function H(O){var F=O.charCodeAt(0),W=F>>8;return W==0?F>191?e:T[F]:W==5?/[\u0591-\u05f4]/.test(O)?o:e:W==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(O)?C:/[\u0660-\u0669\u066b-\u066c]/.test(O)?h:F==1642?v:/[\u06f0-\u06f9]/.test(O)?s:d:W==32&&F<=8287?E[F&255]:W==254&&F>=65136?d:f}k.L=e,k.R=o,k.EN=s,k.ON_R=3,k.AN=4,k.R_H=5,k.B=6,k.RLE=7,k.DOT="\xB7",k.doBidiReorder=function(O,F,W){if(O.length<2)return{};var N=O.split(""),P=new Array(N.length),V=new Array(N.length),U=[];R=W?t:n,_(N,U,N.length,F);for(var G=0;G<P.length;P[G]=G,G++);I(2,U,P),I(1,U,P);for(var G=0;G<P.length-1;G++)F[G]===h?U[G]=k.AN:U[G]===o&&(F[G]>d&&F[G]<$||F[G]===f||F[G]===S)?U[G]=k.ON_R:G>0&&N[G-1]==="\u0644"&&/\u0622|\u0623|\u0625|\u0627/.test(N[G])&&(U[G-1]=U[G]=k.R_H,G++);N[N.length-1]===k.DOT&&(U[N.length-1]=k.B),N[0]==="\u202B"&&(U[0]=k.RLE);for(var G=0;G<P.length;G++)V[G]=U[P[G]];return{logicalFromVisual:P,bidiLevels:V}},k.hasBidiCharacters=function(O,F){for(var W=!1,N=0;N<O.length;N++)F[N]=H(O.charAt(N)),!W&&(F[N]==o||F[N]==d||F[N]==h)&&(W=!0);return W},k.getVisualFromLogicalIdx=function(O,F){for(var W=0;W<F.logicalFromVisual.length;W++)if(F.logicalFromVisual[W]==O)return W;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(M,k,B){var R=M("./lib/bidiutil"),x=M("./lib/lang"),A=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,l=function(){function c(r){this.session=r,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=A.test(r.getValue())}return c.prototype.isBidiRow=function(r,i,n){return this.seenBidi?(r!==this.currentRow&&(this.currentRow=r,this.updateRowLine(i,n),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},c.prototype.onChange=function(r){this.seenBidi?this.currentRow=null:r.action=="insert"&&A.test(r.lines.join(`
- `))&&(this.seenBidi=!0,this.currentRow=null)},c.prototype.getDocumentRow=function(){var r=0,i=this.session.$screenRowCache;if(i.length){var n=this.session.$getRowCacheIndex(i,this.currentRow);n>=0&&(r=this.session.$docRowCache[n])}return r},c.prototype.getSplitIndex=function(){var r=0,i=this.session.$screenRowCache;if(i.length)for(var n,t=this.session.$getRowCacheIndex(i,this.currentRow);this.currentRow-r>0&&(n=this.session.$getRowCacheIndex(i,this.currentRow-r-1),n===t);)t=n,r++;else r=this.currentRow;return r},c.prototype.updateRowLine=function(r,i){r===void 0&&(r=this.getDocumentRow());var n=r===this.session.getLength()-1,t=n?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(r),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var e=this.session.$wrapData[r];e&&(i===void 0&&(i=this.getSplitIndex()),i>0&&e.length?(this.wrapIndent=e.indent,this.wrapOffset=this.wrapIndent*this.charWidths[R.L],this.line=i<e.length?this.line.substring(e[i-1],e[i]):this.line.substring(e[e.length-1])):this.line=this.line.substring(0,e[i]),i==e.length&&(this.line+=this.showInvisibles?t:R.DOT))}else this.line+=this.showInvisibles?t:R.DOT;var o=this.session,s=0,h;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(f,L){return f===" "||o.isFullWidth(f.charCodeAt(0))?(h=f===" "?o.getScreenTabSize(L+s):2,s+=h-1,x.stringRepeat(R.DOT,h)):f}),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)},c.prototype.updateBidiMap=function(){var r=[];R.hasBidiCharacters(this.line,r)||this.isRtlDir?this.bidiMap=R.doBidiReorder(this.line,r,this.isRtlDir):this.bidiMap={}},c.prototype.markAsDirty=function(){this.currentRow=null},c.prototype.updateCharacterWidths=function(r){if(this.characterWidth!==r.$characterSize.width){this.fontMetrics=r;var i=this.characterWidth=r.$characterSize.width,n=r.$measureCharWidth("\u05D4");this.charWidths[R.L]=this.charWidths[R.EN]=this.charWidths[R.ON_R]=i,this.charWidths[R.R]=this.charWidths[R.AN]=n,this.charWidths[R.R_H]=n*.45,this.charWidths[R.B]=this.charWidths[R.RLE]=0,this.currentRow=null}},c.prototype.setShowInvisibles=function(r){this.showInvisibles=r,this.currentRow=null},c.prototype.setEolChar=function(r){this.EOL=r},c.prototype.setContentWidth=function(r){this.contentWidth=r},c.prototype.isRtlLine=function(r){return this.$isRtl?!0:r!=null?this.session.getLine(r).charAt(0)==this.RLE:this.isRtlDir},c.prototype.setRtlDirection=function(r,i){for(var n=r.getCursorPosition(),t=r.selection.getSelectionAnchor().row;t<=n.row;t++)!i&&r.session.getLine(t).charAt(0)===r.session.$bidiHandler.RLE?r.session.doc.removeInLine(t,0,1):i&&r.session.getLine(t).charAt(0)!==r.session.$bidiHandler.RLE&&r.session.doc.insert({column:0,row:t},r.session.$bidiHandler.RLE)},c.prototype.getPosLeft=function(r){r-=this.wrapIndent;var i=this.line.charAt(0)===this.RLE?1:0,n=r>i?this.session.getOverwrite()?r:r-1:i,t=R.getVisualFromLogicalIdx(n,this.bidiMap),e=this.bidiMap.bidiLevels,o=0;!this.session.getOverwrite()&&r<=i&&e[t]%2!==0&&t++;for(var s=0;s<t;s++)o+=this.charWidths[e[s]];return!this.session.getOverwrite()&&r>i&&e[t]%2===0&&(o+=this.charWidths[e[t]]),this.wrapIndent&&(o+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(o+=this.rtlLineOffset),o},c.prototype.getSelections=function(r,i){var n=this.bidiMap,t=n.bidiLevels,e,o=[],s=0,h=Math.min(r,i)-this.wrapIndent,f=Math.max(r,i)-this.wrapIndent,L=!1,w=!1,d=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var a,m=0;m<t.length;m++)a=n.logicalFromVisual[m],e=t[m],L=a>=h&&a<f,L&&!w?d=s:!L&&w&&o.push({left:d,width:s-d}),s+=this.charWidths[e],w=L;if(L&&m===t.length&&o.push({left:d,width:s-d}),this.isRtlDir)for(var g=0;g<o.length;g++)o[g].left+=this.rtlLineOffset;return o},c.prototype.offsetToCol=function(n){this.isRtlDir&&(n-=this.rtlLineOffset);var i=0,n=Math.max(n,0),t=0,e=0,o=this.bidiMap.bidiLevels,s=this.charWidths[o[e]];for(this.wrapIndent&&(n-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);n>t+s/2;){if(t+=s,e===o.length-1){s=0;break}s=this.charWidths[o[++e]]}return e>0&&o[e-1]%2!==0&&o[e]%2===0?(n<t&&e--,i=this.bidiMap.logicalFromVisual[e]):e>0&&o[e-1]%2===0&&o[e]%2!==0?i=1+(n>t?this.bidiMap.logicalFromVisual[e]:this.bidiMap.logicalFromVisual[e-1]):this.isRtlDir&&e===o.length-1&&s===0&&o[e-1]%2===0||!this.isRtlDir&&e===0&&o[e]%2!==0?i=1+this.bidiMap.logicalFromVisual[e]:(e>0&&o[e-1]%2!==0&&s!==0&&e--,i=this.bidiMap.logicalFromVisual[e]),i===0&&this.isRtlDir&&i++,i+this.wrapIndent},c}();k.BidiHandler=l}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(M,k,B){var R=M("./lib/oop"),x=M("./lib/lang"),A=M("./lib/event_emitter").EventEmitter,l=M("./range").Range,c=function(){function r(i){this.session=i,this.doc=i.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(t){n.$cursorChanged=!0,n.$silent||n._emit("changeCursor"),!n.$isEmpty&&!n.$silent&&n._emit("changeSelection"),!n.$keepDesiredColumnOnChange&&t.old.column!=t.value.column&&(n.$desiredColumn=null)}),this.anchor.on("change",function(){n.$anchorChanged=!0,!n.$isEmpty&&!n.$silent&&n._emit("changeSelection")})}return r.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},r.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},r.prototype.getCursor=function(){return this.lead.getPosition()},r.prototype.setAnchor=function(i,n){this.$isEmpty=!1,this.anchor.setPosition(i,n)},r.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},r.prototype.getSelectionLead=function(){return this.lead.getPosition()},r.prototype.isBackwards=function(){var i=this.anchor,n=this.lead;return i.row>n.row||i.row==n.row&&i.column>n.column},r.prototype.getRange=function(){var i=this.anchor,n=this.lead;return this.$isEmpty?l.fromPoints(n,n):this.isBackwards()?l.fromPoints(n,i):l.fromPoints(i,n)},r.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},r.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},r.prototype.setRange=function(i,n){var t=n?i.end:i.start,e=n?i.start:i.end;this.$setSelection(t.row,t.column,e.row,e.column)},r.prototype.$setSelection=function(i,n,t,e){if(!this.$silent){var o=this.$isEmpty,s=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(i,n),this.cursor.setPosition(t,e),this.$isEmpty=!l.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||o!=this.$isEmpty||s)&&this._emit("changeSelection")}},r.prototype.$moveSelection=function(i){var n=this.lead;this.$isEmpty&&this.setSelectionAnchor(n.row,n.column),i.call(this)},r.prototype.selectTo=function(i,n){this.$moveSelection(function(){this.moveCursorTo(i,n)})},r.prototype.selectToPosition=function(i){this.$moveSelection(function(){this.moveCursorToPosition(i)})},r.prototype.moveTo=function(i,n){this.clearSelection(),this.moveCursorTo(i,n)},r.prototype.moveToPosition=function(i){this.clearSelection(),this.moveCursorToPosition(i)},r.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},r.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},r.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},r.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},r.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},r.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},r.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},r.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},r.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},r.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},r.prototype.getWordRange=function(i,n){if(typeof n=="undefined"){var t=i||this.lead;i=t.row,n=t.column}return this.session.getWordRange(i,n)},r.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},r.prototype.selectAWord=function(){var i=this.getCursor(),n=this.session.getAWordRange(i.row,i.column);this.setSelectionRange(n)},r.prototype.getLineRange=function(i,n){var t=typeof i=="number"?i:this.lead.row,e,o=this.session.getFoldLine(t);return o?(t=o.start.row,e=o.end.row):e=t,n===!0?new l(t,0,e,this.session.getLine(e).length):new l(t,0,e+1,0)},r.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},r.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},r.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},r.prototype.wouldMoveIntoSoftTab=function(i,n,t){var e=i.column,o=i.column+n;return t<0&&(e=i.column-n,o=i.column),this.session.isTabStop(i)&&this.doc.getLine(i.row).slice(e,o).split(" ").length-1==n},r.prototype.moveCursorLeft=function(){var i=this.lead.getPosition(),n;if(n=this.session.getFoldAt(i.row,i.column,-1))this.moveCursorTo(n.start.row,n.start.column);else if(i.column===0)i.row>0&&this.moveCursorTo(i.row-1,this.doc.getLine(i.row-1).length);else{var t=this.session.getTabSize();this.wouldMoveIntoSoftTab(i,t,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-t):this.moveCursorBy(0,-1)}},r.prototype.moveCursorRight=function(){var i=this.lead.getPosition(),n;if(n=this.session.getFoldAt(i.row,i.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 t=this.session.getTabSize(),i=this.lead;this.wouldMoveIntoSoftTab(i,t,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,t):this.moveCursorBy(0,1)}},r.prototype.moveCursorLineStart=function(){var i=this.lead.row,n=this.lead.column,t=this.session.documentToScreenRow(i,n),e=this.session.screenToDocumentPosition(t,0),o=this.session.getDisplayLine(i,null,e.row,e.column),s=o.match(/^\s*/);s[0].length!=n&&!this.session.$useEmacsStyleLineStart&&(e.column+=s[0].length),this.moveCursorToPosition(e)},r.prototype.moveCursorLineEnd=function(){var i=this.lead,n=this.session.getDocumentLastRowColumnPosition(i.row,i.column);if(this.lead.column==n.column){var t=this.session.getLine(n.row);if(n.column==t.length){var e=t.search(/\s+$/);e>0&&(n.column=e)}}this.moveCursorTo(n.row,n.column)},r.prototype.moveCursorFileEnd=function(){var i=this.doc.getLength()-1,n=this.doc.getLine(i).length;this.moveCursorTo(i,n)},r.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},r.prototype.moveCursorLongWordRight=function(){var i=this.lead.row,n=this.lead.column,t=this.doc.getLine(i),e=t.substring(n);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var o=this.session.getFoldAt(i,n,1);if(o){this.moveCursorTo(o.end.row,o.end.column);return}if(this.session.nonTokenRe.exec(e)&&(n+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,e=t.substring(n)),n>=t.length){this.moveCursorTo(i,t.length),this.moveCursorRight(),i<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(e)&&(n+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(i,n)},r.prototype.moveCursorLongWordLeft=function(){var i=this.lead.row,n=this.lead.column,t;if(t=this.session.getFoldAt(i,n,-1)){this.moveCursorTo(t.start.row,t.start.column);return}var e=this.session.getFoldStringAt(i,n,-1);e==null&&(e=this.doc.getLine(i).substring(0,n));var o=x.stringReverse(e);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(o)&&(n-=this.session.nonTokenRe.lastIndex,o=o.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),n<=0){this.moveCursorTo(i,0),this.moveCursorLeft(),i>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(o)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(i,n)},r.prototype.$shortWordEndIndex=function(i){var n=0,t,e=/\s/,o=this.session.tokenRe;if(o.lastIndex=0,this.session.tokenRe.exec(i))n=this.session.tokenRe.lastIndex;else{for(;(t=i[n])&&e.test(t);)n++;if(n<1){for(o.lastIndex=0;(t=i[n])&&!o.test(t);)if(o.lastIndex=0,n++,e.test(t))if(n>2){n--;break}else{for(;(t=i[n])&&e.test(t);)n++;if(n>2)break}}}return o.lastIndex=0,n},r.prototype.moveCursorShortWordRight=function(){var i=this.lead.row,n=this.lead.column,t=this.doc.getLine(i),e=t.substring(n),o=this.session.getFoldAt(i,n,1);if(o)return this.moveCursorTo(o.end.row,o.end.column);if(n==t.length){var s=this.doc.getLength();do i++,e=this.doc.getLine(i);while(i<s&&/^\s*$/.test(e));/^\s+/.test(e)||(e=""),n=0}var h=this.$shortWordEndIndex(e);this.moveCursorTo(i,n+h)},r.prototype.moveCursorShortWordLeft=function(){var i=this.lead.row,n=this.lead.column,t;if(t=this.session.getFoldAt(i,n,-1))return this.moveCursorTo(t.start.row,t.start.column);var e=this.session.getLine(i).substring(0,n);if(n===0){do i--,e=this.doc.getLine(i);while(i>0&&/^\s*$/.test(e));n=e.length,/\s+$/.test(e)||(e="")}var o=x.stringReverse(e),s=this.$shortWordEndIndex(o);return this.moveCursorTo(i,n-s)},r.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},r.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},r.prototype.moveCursorBy=function(i,n){var t=this.session.documentToScreenPosition(this.lead.row,this.lead.column),e;if(n===0&&(i!==0&&(this.session.$bidiHandler.isBidiRow(t.row,this.lead.row)?(e=this.session.$bidiHandler.getPosLeft(t.column),t.column=Math.round(e/this.session.$bidiHandler.charWidths[0])):e=t.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?t.column=this.$desiredColumn:this.$desiredColumn=t.column),i!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var o=this.session.lineWidgets[this.lead.row];i<0?i-=o.rowsAbove||0:i>0&&(i+=o.rowCount-(o.rowsAbove||0))}var s=this.session.screenToDocumentPosition(t.row+i,t.column,e);i!==0&&n===0&&s.row===this.lead.row&&(s.column,this.lead.column),this.moveCursorTo(s.row,s.column+n,n===0)},r.prototype.moveCursorToPosition=function(i){this.moveCursorTo(i.row,i.column)},r.prototype.moveCursorTo=function(i,n,t){var e=this.session.getFoldAt(i,n,1);e&&(i=e.start.row,n=e.start.column),this.$keepDesiredColumnOnChange=!0;var o=this.session.getLine(i);/[\uDC00-\uDFFF]/.test(o.charAt(n))&&o.charAt(n-1)&&(this.lead.row==i&&this.lead.column==n+1?n=n-1:n=n+1),this.lead.setPosition(i,n),this.$keepDesiredColumnOnChange=!1,t||(this.$desiredColumn=null)},r.prototype.moveCursorToScreen=function(i,n,t){var e=this.session.screenToDocumentPosition(i,n);this.moveCursorTo(e.row,e.column,t)},r.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},r.prototype.fromOrientedRange=function(i){this.setSelectionRange(i,i.cursor==i.start),this.$desiredColumn=i.desiredColumn||this.$desiredColumn},r.prototype.toOrientedRange=function(i){var n=this.getRange();return i?(i.start.column=n.start.column,i.start.row=n.start.row,i.end.column=n.end.column,i.end.row=n.end.row):i=n,i.cursor=this.isBackwards()?i.start:i.end,i.desiredColumn=this.$desiredColumn,i},r.prototype.getRangeOfMovements=function(i){var n=this.getCursor();try{i(this);var t=this.getCursor();return l.fromPoints(n,t)}catch(e){return l.fromPoints(n,n)}finally{this.moveCursorToPosition(n)}},r.prototype.toJSON=function(){if(this.rangeCount)var i=this.ranges.map(function(n){var t=n.clone();return t.isBackwards=n.cursor==n.start,t});else{var i=this.getRange();i.isBackwards=this.isBackwards()}return i},r.prototype.fromJSON=function(i){if(i.start==null)if(this.rangeList&&i.length>1){this.toSingleRange(i[0]);for(var n=i.length;n--;){var t=l.fromPoints(i[n].start,i[n].end);i[n].isBackwards&&(t.cursor=t.start),this.addRange(t,!0)}return}else i=i[0];this.rangeList&&this.toSingleRange(i),this.setSelectionRange(i,i.isBackwards)},r.prototype.isEqual=function(i){if((i.length||this.rangeCount)&&i.length!=this.rangeCount)return!1;if(!i.length||!this.ranges)return this.getRange().isEqual(i);for(var n=this.ranges.length;n--;)if(!this.ranges[n].isEqual(i[n]))return!1;return!0},r}();c.prototype.setSelectionAnchor=c.prototype.setAnchor,c.prototype.getSelectionAnchor=c.prototype.getAnchor,c.prototype.setSelectionRange=c.prototype.setRange,R.implement(c.prototype,A),k.Selection=c}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(M,k,B){var R=M("./lib/report_error").reportError,x=2e3,A=function(){function l(c){this.splitRegex,this.states=c,this.regExps={},this.matchMappings={};for(var r in this.states){for(var i=this.states[r],n=[],t=0,e=this.matchMappings[r]={defaultToken:"text"},o="g",s=[],h=0;h<i.length;h++){var f=i[h];if(f.defaultToken&&(e.defaultToken=f.defaultToken),f.caseInsensitive&&o.indexOf("i")===-1&&(o+="i"),f.unicode&&o.indexOf("u")===-1&&(o+="u"),f.regex!=null){f.regex instanceof RegExp&&(f.regex=f.regex.toString().slice(1,-1));var L=f.regex,w=new RegExp("(?:("+L+")|(.))").exec("a").length-2;Array.isArray(f.token)?f.token.length==1||w==1?f.token=f.token[0]:w-1!=f.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:f,groupCount:w-1}),f.token=f.token[0]):(f.tokenArray=f.token,f.token=null,f.onMatch=this.$arrayTokens):typeof f.token=="function"&&!f.onMatch&&(w>1?f.onMatch=this.$applyToken:f.onMatch=f.token),w>1&&(/\\\d/.test(f.regex)?L=f.regex.replace(/\\([0-9]+)/g,function(d,a){return"\\"+(parseInt(a,10)+t+1)}):(w=1,L=this.removeCapturingGroups(f.regex)),!f.splitRegex&&typeof f.token!="string"&&s.push(f)),e[t]=h,t+=w,n.push(L),f.onMatch||(f.onMatch=null)}}n.length||(e[0]=0,n.push("$")),s.forEach(function(d){d.splitRegex=this.createSplitterRegexp(d.regex,o)},this),this.regExps[r]=new RegExp("("+n.join(")|(")+")|($)",o)}}return l.prototype.$setMaxTokenCount=function(c){x=c|0},l.prototype.$applyToken=function(c){var r=this.splitRegex.exec(c).slice(1),i=this.token.apply(this,r);if(typeof i=="string")return[{type:i,value:c}];for(var n=[],t=0,e=i.length;t<e;t++)r[t]&&(n[n.length]={type:i[t],value:r[t]});return n},l.prototype.$arrayTokens=function(c){if(!c)return[];var r=this.splitRegex.exec(c);if(!r)return"text";for(var i=[],n=this.tokenArray,t=0,e=n.length;t<e;t++)r[t+1]&&(i[i.length]={type:n[t],value:r[t+1]});return i},l.prototype.removeCapturingGroups=function(c){var r=c.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(i,n){return n?"(?:":i});return r},l.prototype.createSplitterRegexp=function(c,r){if(c.indexOf("(?=")!=-1){var i=0,n=!1,t={};c.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,o,s,h,f,L){return n?n=f!="]":f?n=!0:h?(i==t.stack&&(t.end=L+1,t.stack=-1),i--):s&&(i++,s.length!=1&&(t.stack=i,t.start=L)),e}),t.end!=null&&/^\)*$/.test(c.substr(t.end))&&(c=c.substring(0,t.start)+c.substr(t.end))}return c.charAt(0)!="^"&&(c="^"+c),c.charAt(c.length-1)!="$"&&(c+="$"),new RegExp(c,(r||"").replace("g",""))},l.prototype.getLineTokens=function(c,r){if(r&&typeof r!="string"){var i=r.slice(0);r=i[0],r==="#tmp"&&(i.shift(),r=i.shift())}else var i=[];var n=r||"start",t=this.states[n];t||(n="start",t=this.states[n]);var e=this.matchMappings[n],o=this.regExps[n];o.lastIndex=0;for(var s,h=[],f=0,L=0,w={type:null,value:""};s=o.exec(c);){var d=e.defaultToken,a=null,m=s[0],g=o.lastIndex;if(g-m.length>f){var v=c.substring(f,g-m.length);w.type==d?w.value+=v:(w.type&&h.push(w),w={type:d,value:v})}for(var C=0;C<s.length-2;C++)if(s[C+1]!==void 0){a=t[e[C]],a.onMatch?d=a.onMatch(m,n,i,c):d=a.token,a.next&&(typeof a.next=="string"?n=a.next:n=a.next(n,i),t=this.states[n],t||(this.reportError("state doesn't exist",n),n="start",t=this.states[n]),e=this.matchMappings[n],f=g,o=this.regExps[n],o.lastIndex=g),a.consumeLineEnd&&(f=g);break}if(m){if(typeof d=="string")(!a||a.merge!==!1)&&w.type===d?w.value+=m:(w.type&&h.push(w),w={type:d,value:m});else if(d){w.type&&h.push(w),w={type:null,value:""};for(var C=0;C<d.length;C++)h.push(d[C])}}if(f==c.length)break;if(f=g,L++>x){for(L>2*c.length&&this.reportError("infinite loop with in ace tokenizer",{startState:r,line:c});f<c.length;)w.type&&h.push(w),w={value:c.substring(f,f+=500),type:"overflow"};n="start",i=[];break}}return w.type&&h.push(w),i.length>1&&i[0]!==n&&i.unshift("#tmp",n),{tokens:h,state:i.length?i:n}},l}();A.prototype.reportError=R,k.Tokenizer=A}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(M,k,B){var R=M("../lib/deep_copy").deepCopy,x;x=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},function(){this.addRules=function(c,r){if(!r){for(var i in c)this.$rules[i]=c[i];return}for(var i in c){for(var n=c[i],t=0;t<n.length;t++){var e=n[t];(e.next||e.onMatch)&&(typeof e.next=="string"&&e.next.indexOf(r)!==0&&(e.next=r+e.next),e.nextState&&e.nextState.indexOf(r)!==0&&(e.nextState=r+e.nextState))}this.$rules[r+i]=n}},this.getRules=function(){return this.$rules},this.embedRules=function(c,r,i,n,t){var e=typeof c=="function"?new c().getRules():c;if(n)for(var o=0;o<n.length;o++)n[o]=r+n[o];else{n=[];for(var s in e)n.push(r+s)}if(this.addRules(e,r),i)for(var h=Array.prototype[t?"push":"unshift"],o=0;o<n.length;o++)h.apply(this.$rules[n[o]],R(i));this.$embeds||(this.$embeds=[]),this.$embeds.push(r)},this.getEmbeds=function(){return this.$embeds};var A=function(c,r){return(c!="start"||r.length)&&r.unshift(this.nextState,c),this.nextState},l=function(c,r){return r.shift(),r.shift()||"start"};this.normalizeRules=function(){var c=0,r=this.$rules;function i(n){var t=r[n];t.processed=!0;for(var e=0;e<t.length;e++){var o=t[e],s=null;Array.isArray(o)&&(s=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 h=o.next||o.push;if(h&&Array.isArray(h)){var f=o.stateName;f||(f=o.token,typeof f!="string"&&(f=f[0]||""),r[f]&&(f+=c++)),r[f]=h,o.next=f,i(f)}else h=="pop"&&(o.next=l);if(o.push&&(o.nextState=o.next||o.push,o.next=A,delete o.push),o.rules)for(var L in o.rules)r[L]?r[L].push&&r[L].push.apply(r[L],o.rules[L]):r[L]=o.rules[L];var w=typeof o=="string"?o:o.include;if(w&&(w==="$self"&&(w="start"),Array.isArray(w)?s=w.map(function(a){return r[a]}):s=r[w]),s){var d=[e,1].concat(s);o.noEscape&&(d=d.filter(function(a){return!a.next})),t.splice.apply(t,d),e--}o.keywordMap&&(o.token=this.createKeywordMapper(o.keywordMap,o.defaultToken||"text",o.caseInsensitive),delete o.defaultToken)}}Object.keys(r).forEach(i,this)},this.createKeywordMapper=function(c,r,i,n){var t=Object.create(null);return this.$keywordList=[],Object.keys(c).forEach(function(e){for(var o=c[e],s=o.split(n||"|"),h=s.length;h--;){var f=s[h];this.$keywordList.push(f),i&&(f=f.toLowerCase()),t[f]=e}},this),c=null,i?function(e){return t[e.toLowerCase()]||r}:function(e){return t[e]||r}},this.getKeywords=function(){return this.$keywords}}.call(x.prototype),k.TextHighlightRules=x}),ace.define("ace/mode/behaviour",["require","exports","module"],function(M,k,B){var R;R=function(){this.$behaviours={}},function(){this.add=function(x,A,l){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[x]:this.$behaviours[x]={}}this.$behaviours[x][A]=l},this.addBehaviours=function(x){for(var A in x)for(var l in x[A])this.add(A,l,x[A][l])},this.remove=function(x){this.$behaviours&&this.$behaviours[x]&&delete this.$behaviours[x]},this.inherit=function(x,A){if(typeof x=="function")var l=new x().getBehaviours(A);else var l=x.getBehaviours(A);this.addBehaviours(l)},this.getBehaviours=function(x){if(x){for(var A={},l=0;l<x.length;l++)this.$behaviours[x[l]]&&(A[x[l]]=this.$behaviours[x[l]]);return A}else return this.$behaviours}}.call(R.prototype),k.Behaviour=R}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(M,k,B){var R=M("./range").Range,x=function(){function A(l,c,r){this.$session=l,this.$row=c,this.$rowTokens=l.getTokens(c);var i=l.getTokenAt(c,r);this.$tokenIndex=i?i.index:-1}return A.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]},A.prototype.stepForward=function(){this.$tokenIndex+=1;for(var l;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,l||(l=this.$session.getLength()),this.$row>=l)return this.$row=l-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},A.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},A.prototype.getCurrentTokenRow=function(){return this.$row},A.prototype.getCurrentTokenColumn=function(){var l=this.$rowTokens,c=this.$tokenIndex,r=l[c].start;if(r!==void 0)return r;for(r=0;c>0;)c-=1,r+=l[c].value.length;return r},A.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},A.prototype.getCurrentTokenRange=function(){var l=this.$rowTokens[this.$tokenIndex],c=this.getCurrentTokenColumn();return new R(this.$row,c,this.$row,c+l.value.length)},A}();k.TokenIterator=x}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(M,k,B){var R=M("../../lib/oop"),x=M("../behaviour").Behaviour,A=M("../../token_iterator").TokenIterator,l=M("../../lib/lang"),c=["text","paren.rparen","rparen","paren","punctuation.operator"],r=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],i,n={},t={'"':'"',"'":"'"},e=function(h){var f=-1;if(h.multiSelect&&(f=h.selection.index,n.rangeCount!=h.multiSelect.rangeCount&&(n={rangeCount:h.multiSelect.rangeCount})),n[f])return i=n[f];i=n[f]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},o=function(h,f,L,w){var d=h.end.row-h.start.row;return{text:L+f+w,selection:[0,h.start.column+1,d,h.end.column+(d?0:1)]}},s;s=function(h){h=h||{},this.add("braces","insertion",function(f,L,w,d,a){var m=w.getCursorPosition(),g=d.doc.getLine(m.row);if(a=="{"){e(w);var v=w.getSelectionRange(),C=d.doc.getTextRange(v);if(C!==""&&C!=="{"&&w.getWrapBehavioursEnabled())return o(v,C,"{","}");if(s.isSaneInsertion(w,d))return/[\]\}\)]/.test(g[m.column])||w.inMultiSelectMode||h.braces?(s.recordAutoInsert(w,d,"}"),{text:"{}",selection:[1,1]}):(s.recordMaybeInsert(w,d,"{"),{text:"{",selection:[1,1]})}else if(a=="}"){e(w);var $=g.substring(m.column,m.column+1);if($=="}"){var b=d.$findOpeningBracket("}",{column:m.column+1,row:m.row});if(b!==null&&s.isAutoInsertedClosing(m,g,a))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(a==`
- `||a==`\r
- `){e(w);var p="";s.isMaybeInsertedClosing(m,g)&&(p=l.stringRepeat("}",i.maybeInsertedBrackets),s.clearMaybeInsertedClosing());var $=g.substring(m.column,m.column+1);if($==="}"){var u=d.findMatchingBracket({row:m.row,column:m.column+1},"}");if(!u)return null;var y=this.$getIndent(d.getLine(u.row))}else if(p)var y=this.$getIndent(g);else{s.clearMaybeInsertedClosing();return}var S=y+d.getTabString();return{text:`
- `+S+`
- `+y+p,selection:[1,S.length,1,S.length]}}else s.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(f,L,w,d,a){var m=d.doc.getTextRange(a);if(!a.isMultiLine()&&m=="{"){e(w);var g=d.doc.getLine(a.start.row),v=g.substring(a.end.column,a.end.column+1);if(v=="}")return a.end.column++,a;i.maybeInsertedBrackets--}}),this.add("parens","insertion",function(f,L,w,d,a){if(a=="("){e(w);var m=w.getSelectionRange(),g=d.doc.getTextRange(m);if(g!==""&&w.getWrapBehavioursEnabled())return o(m,g,"(",")");if(s.isSaneInsertion(w,d))return s.recordAutoInsert(w,d,")"),{text:"()",selection:[1,1]}}else if(a==")"){e(w);var v=w.getCursorPosition(),C=d.doc.getLine(v.row),$=C.substring(v.column,v.column+1);if($==")"){var b=d.$findOpeningBracket(")",{column:v.column+1,row:v.row});if(b!==null&&s.isAutoInsertedClosing(v,C,a))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(f,L,w,d,a){var m=d.doc.getTextRange(a);if(!a.isMultiLine()&&m=="("){e(w);var g=d.doc.getLine(a.start.row),v=g.substring(a.start.column+1,a.start.column+2);if(v==")")return a.end.column++,a}}),this.add("brackets","insertion",function(f,L,w,d,a){if(a=="["){e(w);var m=w.getSelectionRange(),g=d.doc.getTextRange(m);if(g!==""&&w.getWrapBehavioursEnabled())return o(m,g,"[","]");if(s.isSaneInsertion(w,d))return s.recordAutoInsert(w,d,"]"),{text:"[]",selection:[1,1]}}else if(a=="]"){e(w);var v=w.getCursorPosition(),C=d.doc.getLine(v.row),$=C.substring(v.column,v.column+1);if($=="]"){var b=d.$findOpeningBracket("]",{column:v.column+1,row:v.row});if(b!==null&&s.isAutoInsertedClosing(v,C,a))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(f,L,w,d,a){var m=d.doc.getTextRange(a);if(!a.isMultiLine()&&m=="["){e(w);var g=d.doc.getLine(a.start.row),v=g.substring(a.start.column+1,a.start.column+2);if(v=="]")return a.end.column++,a}}),this.add("string_dquotes","insertion",function(f,L,w,d,a){var m=d.$mode.$quotes||t;if(a.length==1&&m[a]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(a)!=-1)return;e(w);var g=a,v=w.getSelectionRange(),C=d.doc.getTextRange(v);if(C!==""&&(C.length!=1||!m[C])&&w.getWrapBehavioursEnabled())return o(v,C,g,g);if(!C){var $=w.getCursorPosition(),b=d.doc.getLine($.row),p=b.substring($.column-1,$.column),u=b.substring($.column,$.column+1),y=d.getTokenAt($.row,$.column),S=d.getTokenAt($.row,$.column+1);if(p=="\\"&&y&&/escape/.test(y.type))return null;var T=y&&/string|escape/.test(y.type),E=!S||/string|escape/.test(S.type),_;if(u==g)_=T!==E,_&&/string\.end/.test(S.type)&&(_=!1);else{if(T&&!E||T&&E)return null;var I=d.$mode.tokenRe;I.lastIndex=0;var D=I.test(p);I.lastIndex=0;var H=I.test(u),O=d.$mode.$pairQuotesAfter,F=O&&O[g]&&O[g].test(p);if(!F&&D||H||u&&!/[\s;,.})\]\\]/.test(u))return null;var W=b[$.column-2];if(p==g&&(W==g||I.test(W)))return null;_=!0}return{text:_?g+g:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(f,L,w,d,a){var m=d.$mode.$quotes||t,g=d.doc.getTextRange(a);if(!a.isMultiLine()&&m.hasOwnProperty(g)){e(w);var v=d.doc.getLine(a.start.row),C=v.substring(a.start.column+1,a.start.column+2);if(C==g)return a.end.column++,a}}),h.closeDocComment!==!1&&this.add("doc comment end","insertion",function(f,L,w,d,a){if(f==="doc-start"&&(a===`
- `||a===`\r
- `)&&w.selection.isEmpty()){var m=w.getCursorPosition(),g=d.doc.getLine(m.row),v=d.doc.getLine(m.row+1),C=this.$getIndent(g);if(/\s*\*/.test(v))return/^\s*\*/.test(g)?{text:a+C+"* ",selection:[1,3+C.length,1,3+C.length]}:{text:a+C+" * ",selection:[1,3+C.length,1,3+C.length]};if(/\/\*\*/.test(g.substring(0,m.column)))return{text:a+C+" * "+a+" "+C+"*/",selection:[1,4+C.length,1,4+C.length]}}})},s.isSaneInsertion=function(h,f){var L=h.getCursorPosition(),w=new A(f,L.row,L.column);if(!this.$matchTokenType(w.getCurrentToken()||"text",c)){if(/[)}\]]/.test(h.session.getLine(L.row)[L.column]))return!0;var d=new A(f,L.row,L.column+1);if(!this.$matchTokenType(d.getCurrentToken()||"text",c))return!1}return w.stepForward(),w.getCurrentTokenRow()!==L.row||this.$matchTokenType(w.getCurrentToken()||"text",r)},s.$matchTokenType=function(h,f){return f.indexOf(h.type||h)>-1},s.recordAutoInsert=function(h,f,L){var w=h.getCursorPosition(),d=f.doc.getLine(w.row);this.isAutoInsertedClosing(w,d,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=w.row,i.autoInsertedLineEnd=L+d.substr(w.column),i.autoInsertedBrackets++},s.recordMaybeInsert=function(h,f,L){var w=h.getCursorPosition(),d=f.doc.getLine(w.row);this.isMaybeInsertedClosing(w,d)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=w.row,i.maybeInsertedLineStart=d.substr(0,w.column)+L,i.maybeInsertedLineEnd=d.substr(w.column),i.maybeInsertedBrackets++},s.isAutoInsertedClosing=function(h,f,L){return i.autoInsertedBrackets>0&&h.row===i.autoInsertedRow&&L===i.autoInsertedLineEnd[0]&&f.substr(h.column)===i.autoInsertedLineEnd},s.isMaybeInsertedClosing=function(h,f){return i.maybeInsertedBrackets>0&&h.row===i.maybeInsertedRow&&f.substr(h.column)===i.maybeInsertedLineEnd&&f.substr(0,h.column)==i.maybeInsertedLineStart},s.popAutoInsertedClosing=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},s.clearMaybeInsertedClosing=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},R.inherits(s,x),k.CstyleBehaviour=s}),ace.define("ace/unicode",["require","exports","module"],function(M,k,B){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],x=0,A=[],l=0;l<R.length;l+=2)A.push(x+=R[l]),R[l+1]&&A.push(45,x+=R[l+1]);k.wordChars=String.fromCharCode.apply(null,A)}),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(M,k,B){var R=M("../config"),x=M("../tokenizer").Tokenizer,A=M("./text_highlight_rules").TextHighlightRules,l=M("./behaviour/cstyle").CstyleBehaviour,c=M("../unicode"),r=M("../lib/lang"),i=M("../token_iterator").TokenIterator,n=M("../range").Range,t;t=function(){this.HighlightRules=A},function(){this.$defaultBehaviour=new l,this.tokenRe=new RegExp("^["+c.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+c.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new x(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,o,s,h){var f=o.doc,L=!0,w=!0,d=1/0,a=o.getTabSize(),m=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var C=this.lineCommentStart.map(r.escapeRegExp).join("|"),g=this.lineCommentStart[0];else var C=r.escapeRegExp(this.lineCommentStart),g=this.lineCommentStart;C=new RegExp("^(\\s*)(?:"+C+") ?"),m=o.getUseSoftTabs();var p=function(H,O){var F=H.match(C);if(!!F){var W=F[1].length,N=F[0].length;!S(H,W,N)&&F[0][N-1]==" "&&N--,f.removeInLine(O,W,N)}},y=g+" ",b=function(H,O){(!L||/\S/.test(H))&&(S(H,d,d)?f.insertInLine({row:O,column:d},y):f.insertInLine({row:O,column:d},g))},u=function(H,O){return C.test(H)},S=function(H,O,F){for(var W=0;O--&&H.charAt(O)==" ";)W++;if(W%a!=0)return!1;for(var W=0;H.charAt(F++)==" ";)W++;return a>2?W%a!=a-1:W%a==0}}else{if(!this.blockComment)return!1;var g=this.blockComment.start,v=this.blockComment.end,C=new RegExp("^(\\s*)(?:"+r.escapeRegExp(g)+")"),$=new RegExp("(?:"+r.escapeRegExp(v)+")\\s*$"),b=function(_,I){u(_,I)||(!L||/\S/.test(_))&&(f.insertInLine({row:I,column:_.length},v),f.insertInLine({row:I,column:d},g))},p=function(_,I){var D;(D=_.match($))&&f.removeInLine(I,_.length-D[0].length,_.length),(D=_.match(C))&&f.removeInLine(I,D[1].length,D[0].length)},u=function(_,I){if(C.test(_))return!0;for(var D=o.getTokens(I),H=0;H<D.length;H++)if(D[H].type==="comment")return!0}}function T(_){for(var I=s;I<=h;I++)_(f.getLine(I),I)}var E=1/0;T(function(_,I){var D=_.search(/\S/);D!==-1?(D<d&&(d=D),w&&!u(_,I)&&(w=!1)):E>_.length&&(E=_.length)}),d==1/0&&(d=E,L=!1,w=!1),m&&d%a!=0&&(d=Math.floor(d/a)*a),T(w?p:b)},this.toggleBlockComment=function(e,o,s,h){var f=this.blockComment;if(!!f){!f.start&&f[0]&&(f=f[0]);var L=new i(o,h.row,h.column),w=L.getCurrentToken();o.selection;var d=o.selection.toOrientedRange(),a,m;if(w&&/comment/.test(w.type)){for(var g,v;w&&/comment/.test(w.type);){var C=w.value.indexOf(f.start);if(C!=-1){var $=L.getCurrentTokenRow(),b=L.getCurrentTokenColumn()+C;g=new n($,b,$,b+f.start.length);break}w=L.stepBackward()}for(var L=new i(o,h.row,h.column),w=L.getCurrentToken();w&&/comment/.test(w.type);){var C=w.value.indexOf(f.end);if(C!=-1){var $=L.getCurrentTokenRow(),b=L.getCurrentTokenColumn()+C;v=new n($,b,$,b+f.end.length);break}w=L.stepForward()}v&&o.remove(v),g&&(o.remove(g),a=g.start.row,m=-f.start.length)}else m=f.start.length,a=s.start.row,o.insert(s.end,f.end),o.insert(s.start,f.start);d.start.row==a&&(d.start.column+=m),d.end.row==a&&(d.end.column+=m),o.selection.fromOrientedRange(d)}},this.getNextLineIndent=function(e,o,s){return this.$getIndent(o)},this.checkOutdent=function(e,o,s){return!1},this.autoOutdent=function(e,o,s){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){this.$embeds=[],this.$modes={};for(var o in e)if(e[o]){var s=e[o],h=s.prototype.$id,f=R.$modes[h];f||(R.$modes[h]=f=new s),R.$modes[o]||(R.$modes[o]=f),this.$embeds.push(o),this.$modes[o]=f}for(var L=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],w=function(a){(function(m){var g=L[a],v=m[g];m[L[a]]=function(){return this.$delegator(g,arguments,v)}})(d)},d=this,o=0;o<L.length;o++)w(o)},this.$delegator=function(e,o,s){var h=o[0]||"start";if(typeof h!="string"){if(Array.isArray(h[2])){var f=h[2][h[2].length-1],L=this.$modes[f];if(L)return L[e].apply(L,[h[1]].concat([].slice.call(o,1)))}h=h[0]||"start"}for(var w=0;w<this.$embeds.length;w++)if(!!this.$modes[this.$embeds[w]]){var d=h.split(this.$embeds[w]);if(!d[0]&&d[1]){o[0]=d[1];var L=this.$modes[this.$embeds[w]];return L[e].apply(L,o)}}var a=s.apply(this,o);return s?a:void 0},this.transformAction=function(e,o,s,h,f){if(this.$behaviour){var L=this.$behaviour.getBehaviours();for(var w in L)if(L[w][o]){var d=L[w][o].apply(this,arguments);if(d)return d}}},this.getKeywords=function(e){if(!this.completionKeywords){var o=this.$tokenizer.rules,s=[];for(var h in o)for(var f=o[h],L=0,w=f.length;L<w;L++)if(typeof f[L].token=="string")/keyword|support|storage/.test(f[L].token)&&s.push(f[L].regex);else if(typeof f[L].token=="object"){for(var d=0,a=f[L].token.length;d<a;d++)if(/keyword|support|storage/.test(f[L].token[d])){var h=f[L].regex.match(/\(.+?\)/g)[d];s.push(h.substr(1,h.length-2))}}this.completionKeywords=s}return e?s.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,o,s,h){var f=this.$keywordList||this.$createKeywordList();return f.map(function(L){return{name:L,value:L,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}.call(t.prototype),k.Mode=t}),ace.define("ace/apply_delta",["require","exports","module"],function(M,k,B){k.applyDelta=function(R,x,A){var l=x.start.row,c=x.start.column,r=R[l]||"";switch(x.action){case"insert":var i=x.lines;if(i.length===1)R[l]=r.substring(0,c)+x.lines[0]+r.substring(c);else{var n=[l,1].concat(x.lines);R.splice.apply(R,n),R[l]=r.substring(0,c)+R[l],R[l+x.lines.length-1]+=r.substring(c)}break;case"remove":var t=x.end.column,e=x.end.row;l===e?R[l]=r.substring(0,c)+r.substring(t):R.splice(l,e-l+1,r.substring(0,c)+R[e].substring(t));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(M,k,B){var R=M("./lib/oop"),x=M("./lib/event_emitter").EventEmitter,A=function(){function r(i,n,t){this.$onChange=this.onChange.bind(this),this.attach(i),typeof n!="number"?this.setPosition(n.row,n.column):this.setPosition(n,t)}return r.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},r.prototype.getDocument=function(){return this.document},r.prototype.onChange=function(i){if(!(i.start.row==i.end.row&&i.start.row!=this.row)&&!(i.start.row>this.row)){var n=c(i,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},r.prototype.setPosition=function(i,n,t){var e;if(t?e={row:i,column:n}:e=this.$clipPositionToDocument(i,n),!(this.row==e.row&&this.column==e.column)){var o={row:this.row,column:this.column};this.row=e.row,this.column=e.column,this._signal("change",{old:o,value:e})}},r.prototype.detach=function(){this.document.off("change",this.$onChange)},r.prototype.attach=function(i){this.document=i||this.document,this.document.on("change",this.$onChange)},r.prototype.$clipPositionToDocument=function(i,n){var t={};return i>=this.document.getLength()?(t.row=Math.max(0,this.document.getLength()-1),t.column=this.document.getLine(t.row).length):i<0?(t.row=0,t.column=0):(t.row=i,t.column=Math.min(this.document.getLine(t.row).length,Math.max(0,n))),n<0&&(t.column=0),t},r}();A.prototype.$insertRight=!1,R.implement(A.prototype,x);function l(r,i,n){var t=n?r.column<=i.column:r.column<i.column;return r.row<i.row||r.row==i.row&&t}function c(r,i,n){var t=r.action=="insert",e=(t?1:-1)*(r.end.row-r.start.row),o=(t?1:-1)*(r.end.column-r.start.column),s=r.start,h=t?s:r.end;return l(i,s,n)?{row:i.row,column:i.column}:l(h,i,!n)?{row:i.row+e,column:i.column+(i.row==h.row?o:0)}:{row:s.row,column:s.column}}k.Anchor=A}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(M,k,B){var R=M("./lib/oop"),x=M("./apply_delta").applyDelta,A=M("./lib/event_emitter").EventEmitter,l=M("./range").Range,c=M("./anchor").Anchor,r=function(){function i(n){this.$lines=[""],n.length===0?this.$lines=[""]:Array.isArray(n)?this.insertMergedLines({row:0,column:0},n):this.insert({row:0,column:0},n)}return i.prototype.setValue=function(n){var t=this.getLength()-1;this.remove(new l(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},n||"")},i.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},i.prototype.createAnchor=function(n,t){return new c(this,n,t)},i.prototype.$detectNewLine=function(n){var t=n.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:`
- `,this._signal("changeNewLineMode")},i.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
- `;case"unix":return`
- `;default:return this.$autoNewLine||`
- `}},i.prototype.setNewLineMode=function(n){this.$newLineMode!==n&&(this.$newLineMode=n,this._signal("changeNewLineMode"))},i.prototype.getNewLineMode=function(){return this.$newLineMode},i.prototype.isNewLine=function(n){return n==`\r
- `||n=="\r"||n==`
- `},i.prototype.getLine=function(n){return this.$lines[n]||""},i.prototype.getLines=function(n,t){return this.$lines.slice(n,t+1)},i.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},i.prototype.getLength=function(){return this.$lines.length},i.prototype.getTextRange=function(n){return this.getLinesForRange(n).join(this.getNewLineCharacter())},i.prototype.getLinesForRange=function(n){var t;if(n.start.row===n.end.row)t=[this.getLine(n.start.row).substring(n.start.column,n.end.column)];else{t=this.getLines(n.start.row,n.end.row),t[0]=(t[0]||"").substring(n.start.column);var e=t.length-1;n.end.row-n.start.row==e&&(t[e]=t[e].substring(0,n.end.column))}return t},i.prototype.insertLines=function(n,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(n,t)},i.prototype.removeLines=function(n,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(n,t)},i.prototype.insertNewLine=function(n){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(n,["",""])},i.prototype.insert=function(n,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(n,this.$split(t))},i.prototype.insertInLine=function(n,t){var e=this.clippedPos(n.row,n.column),o=this.pos(n.row,n.column+t.length);return this.applyDelta({start:e,end:o,action:"insert",lines:[t]},!0),this.clonePos(o)},i.prototype.clippedPos=function(n,t){var e=this.getLength();n===void 0?n=e:n<0?n=0:n>=e&&(n=e-1,t=void 0);var o=this.getLine(n);return t==null&&(t=o.length),t=Math.min(Math.max(t,0),o.length),{row:n,column:t}},i.prototype.clonePos=function(n){return{row:n.row,column:n.column}},i.prototype.pos=function(n,t){return{row:n,column:t}},i.prototype.$clipPosition=function(n){var t=this.getLength();return n.row>=t?(n.row=Math.max(0,t-1),n.column=this.getLine(t-1).length):(n.row=Math.max(0,n.row),n.column=Math.min(Math.max(n.column,0),this.getLine(n.row).length)),n},i.prototype.insertFullLines=function(n,t){n=Math.min(Math.max(n,0),this.getLength());var e=0;n<this.getLength()?(t=t.concat([""]),e=0):(t=[""].concat(t),n--,e=this.$lines[n].length),this.insertMergedLines({row:n,column:e},t)},i.prototype.insertMergedLines=function(n,t){var e=this.clippedPos(n.row,n.column),o={row:e.row+t.length-1,column:(t.length==1?e.column:0)+t[t.length-1].length};return this.applyDelta({start:e,end:o,action:"insert",lines:t}),this.clonePos(o)},i.prototype.remove=function(n){var t=this.clippedPos(n.start.row,n.start.column),e=this.clippedPos(n.end.row,n.end.column);return this.applyDelta({start:t,end:e,action:"remove",lines:this.getLinesForRange({start:t,end:e})}),this.clonePos(t)},i.prototype.removeInLine=function(n,t,e){var o=this.clippedPos(n,t),s=this.clippedPos(n,e);return this.applyDelta({start:o,end:s,action:"remove",lines:this.getLinesForRange({start:o,end:s})},!0),this.clonePos(o)},i.prototype.removeFullLines=function(n,t){n=Math.min(Math.max(0,n),this.getLength()-1),t=Math.min(Math.max(0,t),this.getLength()-1);var e=t==this.getLength()-1&&n>0,o=t<this.getLength()-1,s=e?n-1:n,h=e?this.getLine(s).length:0,f=o?t+1:t,L=o?0:this.getLine(f).length,w=new l(s,h,f,L),d=this.$lines.slice(n,t+1);return this.applyDelta({start:w.start,end:w.end,action:"remove",lines:this.getLinesForRange(w)}),d},i.prototype.removeNewLine=function(n){n<this.getLength()-1&&n>=0&&this.applyDelta({start:this.pos(n,this.getLine(n).length),end:this.pos(n+1,0),action:"remove",lines:["",""]})},i.prototype.replace=function(n,t){if(n instanceof l||(n=l.fromPoints(n.start,n.end)),t.length===0&&n.isEmpty())return n.start;if(t==this.getTextRange(n))return n.end;this.remove(n);var e;return t?e=this.insert(n.start,t):e=n.start,e},i.prototype.applyDeltas=function(n){for(var t=0;t<n.length;t++)this.applyDelta(n[t])},i.prototype.revertDeltas=function(n){for(var t=n.length-1;t>=0;t--)this.revertDelta(n[t])},i.prototype.applyDelta=function(n,t){var e=n.action=="insert";(e?n.lines.length<=1&&!n.lines[0]:!l.comparePoints(n.start,n.end))||(e&&n.lines.length>2e4?this.$splitAndapplyLargeDelta(n,2e4):(x(this.$lines,n,t),this._signal("change",n)))},i.prototype.$safeApplyDelta=function(n){var t=this.$lines.length;(n.action=="remove"&&n.start.row<t&&n.end.row<t||n.action=="insert"&&n.start.row<=t)&&this.applyDelta(n)},i.prototype.$splitAndapplyLargeDelta=function(n,t){for(var e=n.lines,o=e.length-t+1,s=n.start.row,h=n.start.column,f=0,L=0;f<o;f=L){L+=t-1;var w=e.slice(f,L);w.push(""),this.applyDelta({start:this.pos(s+f,h),end:this.pos(s+L,h=0),action:n.action,lines:w},!0)}n.lines=e.slice(f),n.start.row=s+f,n.start.column=h,this.applyDelta(n,!0)},i.prototype.revertDelta=function(n){this.$safeApplyDelta({start:this.clonePos(n.start),end:this.clonePos(n.end),action:n.action=="insert"?"remove":"insert",lines:n.lines.slice()})},i.prototype.indexToPosition=function(n,t){for(var e=this.$lines||this.getAllLines(),o=this.getNewLineCharacter().length,s=t||0,h=e.length;s<h;s++)if(n-=e[s].length+o,n<0)return{row:s,column:n+e[s].length+o};return{row:h-1,column:n+e[h-1].length+o}},i.prototype.positionToIndex=function(n,t){for(var e=this.$lines||this.getAllLines(),o=this.getNewLineCharacter().length,s=0,h=Math.min(n.row,e.length),f=t||0;f<h;++f)s+=e[f].length+o;return s+n.column},i.prototype.$split=function(n){return n.split(/\r\n|\r|\n/)},i}();r.prototype.$autoNewLine="",r.prototype.$newLineMode="auto",R.implement(r.prototype,A),k.Document=r}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(M,k,B){var R=M("./lib/oop"),x=M("./lib/event_emitter").EventEmitter,A=function(){function l(c,r){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=c;var i=this;this.$worker=function(){if(!!i.running){for(var n=new Date,t=i.currentLine,e=-1,o=i.doc,s=t;i.lines[t];)t++;var h=o.getLength(),f=0;for(i.running=!1;t<h;){i.$tokenizeRow(t),e=t;do t++;while(i.lines[t]);if(f++,f%5===0&&new Date-n>20){i.running=setTimeout(i.$worker,20);break}}i.currentLine=t,e==-1&&(e=t),s<=e&&i.fireUpdateEvent(s,e)}}}return l.prototype.setTokenizer=function(c){this.tokenizer=c,this.lines=[],this.states=[],this.start(0)},l.prototype.setDocument=function(c){this.doc=c,this.lines=[],this.states=[],this.stop()},l.prototype.fireUpdateEvent=function(c,r){var i={first:c,last:r};this._signal("update",{data:i})},l.prototype.start=function(c){this.currentLine=Math.min(c||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)},l.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},l.prototype.$updateOnChange=function(c){var r=c.start.row,i=c.end.row-r;if(i===0)this.lines[r]=null;else if(c.action=="remove")this.lines.splice(r,i+1,null),this.states.splice(r,i+1,null);else{var n=Array(i+1);n.unshift(r,1),this.lines.splice.apply(this.lines,n),this.states.splice.apply(this.states,n)}this.currentLine=Math.min(r,this.currentLine,this.doc.getLength()),this.stop()},l.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},l.prototype.getTokens=function(c){return this.lines[c]||this.$tokenizeRow(c)},l.prototype.getState=function(c){return this.currentLine==c&&this.$tokenizeRow(c),this.states[c]||"start"},l.prototype.$tokenizeRow=function(c){var r=this.doc.getLine(c),i=this.states[c-1],n=this.tokenizer.getLineTokens(r,i,c);return this.states[c]+""!=n.state+""?(this.states[c]=n.state,this.lines[c+1]=null,this.currentLine>c+1&&(this.currentLine=c+1)):this.currentLine==c&&(this.currentLine=c+1),this.lines[c]=n.tokens},l.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},l}();R.implement(A.prototype,x),k.BackgroundTokenizer=A}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(M,k,B){var R=M("./lib/lang"),x=M("./range").Range,A=function(){function l(c,r,i){i===void 0&&(i="text"),this.setRegexp(c),this.clazz=r,this.type=i}return l.prototype.setRegexp=function(c){this.regExp+""!=c+""&&(this.regExp=c,this.cache=[])},l.prototype.update=function(c,r,i,n){if(!!this.regExp)for(var t=n.firstRow,e=n.lastRow,o={},s=t;s<=e;s++){var h=this.cache[s];h==null&&(h=R.getMatchOffsets(i.getLine(s),this.regExp),h.length>this.MAX_RANGES&&(h=h.slice(0,this.MAX_RANGES)),h=h.map(function(d){return new x(s,d.offset,s,d.offset+d.length)}),this.cache[s]=h.length?h:"");for(var f=h.length;f--;){var L=h[f].toScreenRange(i),w=L.toString();o[w]||(o[w]=!0,r.drawSingleLineMarker(c,L,this.clazz,n))}}},l}();A.prototype.MAX_RANGES=500,k.SearchHighlight=A}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(M,k,B){var R=function(){function d(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return d.prototype.addSession=function(a){this.$session=a},d.prototype.add=function(a,m,g){if(!this.$fromUndo&&a!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),m===!1||!this.lastDeltas){this.lastDeltas=[];var v=this.$undoStack.length;v>this.$undoDepth-1&&this.$undoStack.splice(0,v-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),a.id=this.$rev=++this.$maxRev}(a.action=="remove"||a.action=="insert")&&(this.$lastDelta=a),this.lastDeltas.push(a)}},d.prototype.addSelection=function(a,m){this.selections.push({value:a,rev:m||this.$rev})},d.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},d.prototype.markIgnored=function(a,m){m==null&&(m=this.$rev+1);for(var g=this.$undoStack,v=g.length;v--;){var C=g[v][0];if(C.id<=a)break;C.id<m&&(C.ignore=!0)}this.lastDeltas=null},d.prototype.getSelection=function(a,m){for(var g=this.selections,v=g.length;v--;){var C=g[v];if(C.rev<a)return m&&(C=g[v+1]),C}},d.prototype.getRevision=function(){return this.$rev},d.prototype.getDeltas=function(a,m){m==null&&(m=this.$rev+1);for(var g=this.$undoStack,v=null,C=0,$=g.length;$--;){var b=g[$][0];if(b.id<m&&!v&&(v=$+1),b.id<=a){C=$+1;break}}return g.slice(C,v)},d.prototype.getChangedRanges=function(a,m){m==null&&(m=this.$rev+1)},d.prototype.getChangedLines=function(a,m){m==null&&(m=this.$rev+1)},d.prototype.undo=function(a,m){this.lastDeltas=null;var g=this.$undoStack;if(!!x(g,g.length)){a||(a=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var v=g.pop(),C=null;return v&&(C=a.undoChanges(v,m),this.$redoStack.push(v),this.$syncRev()),this.$fromUndo=!1,C}},d.prototype.redo=function(a,m){if(this.lastDeltas=null,a||(a=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var g=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);w(this.$redoStack,g),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function($){$[0].id=++this.$maxRev},this)}var v=this.$redoStack.pop(),C=null;return v&&(C=a.redoChanges(v,m),this.$undoStack.push(v),this.$syncRev()),this.$fromUndo=!1,C},d.prototype.$syncRev=function(){var a=this.$undoStack,m=a[a.length-1],g=m&&m[0].id||0;this.$redoStackBaseRev=g,this.$rev=g},d.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=[]},d.prototype.canUndo=function(){return this.$undoStack.length>0},d.prototype.canRedo=function(){return this.$redoStack.length>0},d.prototype.bookmark=function(a){a==null&&(a=this.$rev),this.mark=a},d.prototype.isAtBookmark=function(){return this.$rev===this.mark},d.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},d.prototype.fromJSON=function(a){this.reset(),this.$undoStack=a.$undoStack,this.$redoStack=a.$redoStack},d.prototype.$prettyPrint=function(a){return a?i(a):i(this.$undoStack)+`
- ---
- `+i(this.$redoStack)},d}();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 x(d,a){for(var m=a;m--;){var g=d[m];if(g&&!g[0].ignore){for(;m<a-1;){var v=e(d[m],d[m+1]);d[m]=v[0],d[m+1]=v[1],m++}return!0}}}var A=M("./range").Range,l=A.comparePoints;A.comparePoints;function c(d){return{row:d.row,column:d.column}}function r(d){return{start:c(d.start),end:c(d.end),action:d.action,lines:d.lines.slice()}}function i(d){if(d=d||this,Array.isArray(d))return d.map(i).join(`
- `);var a="";return d.action?(a=d.action=="insert"?"+":"-",a+="["+d.lines+"]"):d.value&&(Array.isArray(d.value)?a=d.value.map(n).join(`
- `):a=n(d.value)),d.start&&(a+=n(d)),(d.id||d.rev)&&(a+=" ("+(d.id||d.rev)+")"),a}function n(d){return d.start.row+":"+d.start.column+"=>"+d.end.row+":"+d.end.column}function t(d,a){var m=d.action=="insert",g=a.action=="insert";if(m&&g)if(l(a.start,d.end)>=0)s(a,d,-1);else if(l(a.start,d.start)<=0)s(d,a,1);else return null;else if(m&&!g)if(l(a.start,d.end)>=0)s(a,d,-1);else if(l(a.end,d.start)<=0)s(d,a,-1);else return null;else if(!m&&g)if(l(a.start,d.start)>=0)s(a,d,1);else if(l(a.start,d.start)<=0)s(d,a,1);else return null;else if(!m&&!g)if(l(a.start,d.start)>=0)s(a,d,1);else if(l(a.end,d.start)<=0)s(d,a,-1);else return null;return[a,d]}function e(d,a){for(var m=d.length;m--;)for(var g=0;g<a.length;g++)if(!t(d[m],a[g])){for(;m<d.length;){for(;g--;)t(a[g],d[m]);g=a.length,m++}return[d,a]}return d.selectionBefore=a.selectionBefore=d.selectionAfter=a.selectionAfter=null,[a,d]}function o(d,a){var m=d.action=="insert",g=a.action=="insert";if(m&&g)l(d.start,a.start)<0?s(a,d,1):s(d,a,1);else if(m&&!g)l(d.start,a.end)>=0?s(d,a,-1):(l(d.start,a.start)<=0||s(d,A.fromPoints(a.start,d.start),-1),s(a,d,1));else if(!m&&g)l(a.start,d.end)>=0?s(a,d,-1):(l(a.start,d.start)<=0||s(a,A.fromPoints(d.start,a.start),-1),s(d,a,1));else if(!m&&!g)if(l(a.start,d.end)>=0)s(a,d,-1);else if(l(a.end,d.start)<=0)s(d,a,-1);else{var v,C;return l(d.start,a.start)<0&&(v=d,d=f(d,a.start)),l(d.end,a.end)>0&&(C=f(d,a.end)),h(a.end,d.start,d.end,-1),C&&!v&&(d.lines=C.lines,d.start=C.start,d.end=C.end,C=d),[a,v,C].filter(Boolean)}return[a,d]}function s(d,a,m){h(d.start,a.start,a.end,m),h(d.end,a.start,a.end,m)}function h(d,a,m,g){d.row==(g==1?a:m).row&&(d.column+=g*(m.column-a.column)),d.row+=g*(m.row-a.row)}function f(d,a){var m=d.lines,g=d.end;d.end=c(a);var v=d.end.row-d.start.row,C=m.splice(v,m.length),$=v?a.column:a.column-d.start.column;m.push(C[0].substring(0,$)),C[0]=C[0].substr($);var b={start:c(a),end:g,lines:C,action:d.action};return b}function L(d,a){a=r(a);for(var m=d.length;m--;){for(var g=d[m],v=0;v<g.length;v++){var C=g[v],$=o(C,a);a=$[0],$.length!=2&&($[2]?(g.splice(v+1,1,$[1],$[2]),v++):$[1]||(g.splice(v,1),v--))}g.length||d.splice(m,1)}return d}function w(d,a){for(var m=0;m<a.length;m++)for(var g=a[m],v=0;v<g.length;v++)L(d,g[v])}k.UndoManager=R}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(M,k,B){var R=M("../range").Range,x=function(){function A(l,c){this.foldData=l,Array.isArray(c)?this.folds=c:c=this.folds=[c];var r=c[c.length-1];this.range=new R(c[0].start.row,c[0].start.column,r.end.row,r.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(i){i.setFoldLine(this)},this)}return A.prototype.shiftRow=function(l){this.start.row+=l,this.end.row+=l,this.folds.forEach(function(c){c.start.row+=l,c.end.row+=l})},A.prototype.addFold=function(l){if(l.sameRow){if(l.start.row<this.startRow||l.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(l),this.folds.sort(function(c,r){return-c.range.compareEnd(r.start.row,r.start.column)}),this.range.compareEnd(l.start.row,l.start.column)>0?(this.end.row=l.end.row,this.end.column=l.end.column):this.range.compareStart(l.end.row,l.end.column)<0&&(this.start.row=l.start.row,this.start.column=l.start.column)}else if(l.start.row==this.end.row)this.folds.push(l),this.end.row=l.end.row,this.end.column=l.end.column;else if(l.end.row==this.start.row)this.folds.unshift(l),this.start.row=l.start.row,this.start.column=l.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");l.foldLine=this},A.prototype.containsRow=function(l){return l>=this.start.row&&l<=this.end.row},A.prototype.walk=function(l,c,r){var i=0,n=this.folds,t,e,o,s=!0;c==null&&(c=this.end.row,r=this.end.column);for(var h=0;h<n.length;h++){if(t=n[h],e=t.range.compareStart(c,r),e==-1){l(null,c,r,i,s);return}if(o=l(null,t.start.row,t.start.column,i,s),o=!o&&l(t.placeholder,t.start.row,t.start.column,i),o||e===0)return;s=!t.sameRow,i=t.end.column}l(null,c,r,i,s)},A.prototype.getNextFoldTo=function(l,c){for(var r,i,n=0;n<this.folds.length;n++){if(r=this.folds[n],i=r.range.compareEnd(l,c),i==-1)return{fold:r,kind:"after"};if(i===0)return{fold:r,kind:"inside"}}return null},A.prototype.addRemoveChars=function(l,c,r){var i=this.getNextFoldTo(l,c),n,t;if(i){if(n=i.fold,i.kind=="inside"&&n.start.column!=c&&n.start.row!=l)window.console&&window.console.log(l,c,n);else if(n.start.row==l){t=this.folds;var e=t.indexOf(n);for(e===0&&(this.start.column+=r),e;e<t.length;e++){if(n=t[e],n.start.column+=r,!n.sameRow)return;n.end.column+=r}this.end.column+=r}}},A.prototype.split=function(l,c){var r=this.getNextFoldTo(l,c);if(!r||r.kind=="inside")return null;var i=r.fold,n=this.folds,t=this.foldData,e=n.indexOf(i),o=n[e-1];this.end.row=o.end.row,this.end.column=o.end.column,n=n.splice(e,n.length-e);var s=new A(t,n);return t.splice(t.indexOf(this)+1,0,s),s},A.prototype.merge=function(l){for(var c=l.folds,r=0;r<c.length;r++)this.addFold(c[r]);var i=this.foldData;i.splice(i.indexOf(l),1)},A.prototype.toString=function(){var l=[this.range.toString()+": ["];return this.folds.forEach(function(c){l.push(" "+c.toString())}),l.push("]"),l.join(`
- `)},A.prototype.idxToPosition=function(l){for(var c=0,r=0;r<this.folds.length;r++){var i=this.folds[r];if(l-=i.start.column-c,l<0)return{row:i.start.row,column:i.start.column+l};if(l-=i.placeholder.length,l<0)return i.start;c=i.end.column}return{row:this.end.row,column:this.end.column+l}},A}();k.FoldLine=x}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(M,k,B){var R=M("./range").Range,x=R.comparePoints,A=function(){function l(){this.ranges=[],this.$bias=1}return l.prototype.pointIndex=function(c,r,i){for(var n=this.ranges,t=i||0;t<n.length;t++){var e=n[t],o=x(c,e.end);if(!(o>0)){var s=x(c,e.start);return o===0?r&&s!==0?-t-2:t:s>0||s===0&&!r?t:-t-1}}return-t-1},l.prototype.add=function(c){var r=!c.isEmpty(),i=this.pointIndex(c.start,r);i<0&&(i=-i-1);var n=this.pointIndex(c.end,r,i);return n<0?n=-n-1:n++,this.ranges.splice(i,n-i,c)},l.prototype.addList=function(c){for(var r=[],i=c.length;i--;)r.push.apply(r,this.add(c[i]));return r},l.prototype.substractPoint=function(c){var r=this.pointIndex(c);if(r>=0)return this.ranges.splice(r,1)},l.prototype.merge=function(){var c=[],r=this.ranges;r=r.sort(function(o,s){return x(o.start,s.start)});for(var i=r[0],n,t=1;t<r.length;t++){n=i,i=r[t];var e=x(n.end,i.start);e<0||e==0&&!n.isEmpty()&&!i.isEmpty()||(x(n.end,i.end)<0&&(n.end.row=i.end.row,n.end.column=i.end.column),r.splice(t,1),c.push(i),i=n,t--)}return this.ranges=r,c},l.prototype.contains=function(c,r){return this.pointIndex({row:c,column:r})>=0},l.prototype.containsPoint=function(c){return this.pointIndex(c)>=0},l.prototype.rangeAtPoint=function(c){var r=this.pointIndex(c);if(r>=0)return this.ranges[r]},l.prototype.clipRows=function(c,r){var i=this.ranges;if(i[0].start.row>r||i[i.length-1].start.row<c)return[];var n=this.pointIndex({row:c,column:0});n<0&&(n=-n-1);var t=this.pointIndex({row:r,column:0},n);t<0&&(t=-t-1);for(var e=[],o=n;o<t;o++)e.push(i[o]);return e},l.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},l.prototype.attach=function(c){this.session&&this.detach(),this.session=c,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},l.prototype.detach=function(){!this.session||(this.session.removeListener("change",this.onChange),this.session=null)},l.prototype.$onChange=function(c){for(var r=c.start,i=c.end,n=r.row,t=i.row,e=this.ranges,o=0,s=e.length;o<s;o++){var h=e[o];if(h.end.row>=n)break}if(c.action=="insert")for(var f=t-n,L=-r.column+i.column;o<s;o++){var h=e[o];if(h.start.row>n)break;if(h.start.row==n&&h.start.column>=r.column&&(h.start.column==r.column&&this.$bias<=0||(h.start.column+=L,h.start.row+=f)),h.end.row==n&&h.end.column>=r.column){if(h.end.column==r.column&&this.$bias<0)continue;h.end.column==r.column&&L>0&&o<s-1&&h.end.column>h.start.column&&h.end.column==e[o+1].start.column&&(h.end.column-=L),h.end.column+=L,h.end.row+=f}}else for(var f=n-t,L=r.column-i.column;o<s;o++){var h=e[o];if(h.start.row>t)break;h.end.row<t&&(n<h.end.row||n==h.end.row&&r.column<h.end.column)?(h.end.row=n,h.end.column=r.column):h.end.row==t?h.end.column<=i.column?(f||h.end.column>r.column)&&(h.end.column=r.column,h.end.row=r.row):(h.end.column+=L,h.end.row+=f):h.end.row>t&&(h.end.row+=f),h.start.row<t&&(n<h.start.row||n==h.start.row&&r.column<h.start.column)?(h.start.row=n,h.start.column=r.column):h.start.row==t?h.start.column<=i.column?(f||h.start.column>r.column)&&(h.start.column=r.column,h.start.row=r.row):(h.start.column+=L,h.start.row+=f):h.start.row>t&&(h.start.row+=f)}if(f!=0&&o<s)for(;o<s;o++){var h=e[o];h.start.row+=f,h.end.row+=f}},l}();A.prototype.comparePoints=x,k.RangeList=A}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(M,k,B){var R=this&&this.__extends||function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var h in s)Object.prototype.hasOwnProperty.call(s,h)&&(o[h]=s[h])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function o(){this.constructor=t}t.prototype=e===null?Object.create(e):(o.prototype=e.prototype,new o)}}(),x=M("../range_list").RangeList,A=function(n){R(t,n);function t(e,o){var s=n.call(this)||this;return s.foldLine=null,s.placeholder=o,s.range=e,s.start=e.start,s.end=e.end,s.sameRow=e.start.row==e.end.row,s.subFolds=s.ranges=[],s}return t.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},t.prototype.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(o){o.setFoldLine(e)})},t.prototype.clone=function(){var e=this.range.clone(),o=new t(e,this.placeholder);return this.subFolds.forEach(function(s){o.subFolds.push(s.clone())}),o.collapseChildren=this.collapseChildren,o},t.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){c(e,this.start);for(var L=e.start.row,w=e.start.column,o=0,s=-1;o<this.subFolds.length&&(s=this.subFolds[o].range.compare(L,w),s==1);o++);var h=this.subFolds[o],f=0;if(s==0){if(h.range.containsRange(e))return h.addSubFold(e);f=1}for(var L=e.range.end.row,w=e.range.end.column,d=o,s=-1;d<this.subFolds.length&&(s=this.subFolds[d].range.compare(L,w),s==1);d++);s==0&&d++;for(var a=this.subFolds.splice(o,d-o,e),m=s==0?a.length-1:a.length,g=f;g<m;g++)e.addSubFold(a[g]);return e.setFoldLine(this.foldLine),e}},t.prototype.restoreRange=function(e){return i(e,this.start)},t}(x);function l(n,t){n.row-=t.row,n.row==0&&(n.column-=t.column)}function c(n,t){l(n.start,t),l(n.end,t)}function r(n,t){n.row==0&&(n.column+=t.column),n.row+=t.row}function i(n,t){r(n.start,t),r(n.end,t)}k.Fold=A}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(M,k,B){var R=M("../range").Range,x=M("./fold_line").FoldLine,A=M("./fold").Fold,l=M("../token_iterator").TokenIterator,c=M("../mouse/mouse_event").MouseEvent;function r(){this.getFoldAt=function(i,n,t){var e=this.getFoldLine(i);if(!e)return null;for(var o=e.folds,s=0;s<o.length;s++){var h=o[s].range;if(h.contains(i,n)){if(t==1&&h.isEnd(i,n)&&!h.isEmpty())continue;if(t==-1&&h.isStart(i,n)&&!h.isEmpty())continue;return o[s]}}},this.getFoldsInRange=function(i){var n=i.start,t=i.end,e=this.$foldData,o=[];n.column+=1,t.column-=1;for(var s=0;s<e.length;s++){var h=e[s].range.compareRange(i);if(h!=2){if(h==-2)break;for(var f=e[s].folds,L=0;L<f.length;L++){var w=f[L];if(h=w.range.compareRange(i),h==-2)break;if(h==2)continue;if(h==42)break;o.push(w)}}}return n.column-=1,t.column+=1,o},this.getFoldsInRangeList=function(i){if(Array.isArray(i)){var n=[];i.forEach(function(t){n=n.concat(this.getFoldsInRange(t))},this)}else var n=this.getFoldsInRange(i);return n},this.getAllFolds=function(){for(var i=[],n=this.$foldData,t=0;t<n.length;t++)for(var e=0;e<n[t].folds.length;e++)i.push(n[t].folds[e]);return i},this.getFoldStringAt=function(i,n,t,e){if(e=e||this.getFoldLine(i),!e)return null;for(var o={end:{column:0}},s,h,f=0;f<e.folds.length;f++){h=e.folds[f];var L=h.range.compareEnd(i,n);if(L==-1){s=this.getLine(h.start.row).substring(o.end.column,h.start.column);break}else if(L===0)return null;o=h}return s||(s=this.getLine(h.start.row).substring(o.end.column)),t==-1?s.substring(0,n-o.end.column):t==1?s.substring(n-o.end.column):s},this.getFoldLine=function(i,n){var t=this.$foldData,e=0;for(n&&(e=t.indexOf(n)),e==-1&&(e=0),e;e<t.length;e++){var o=t[e];if(o.start.row<=i&&o.end.row>=i)return o;if(o.end.row>i)return null}return null},this.getNextFoldLine=function(i,n){var t=this.$foldData,e=0;for(n&&(e=t.indexOf(n)),e==-1&&(e=0),e;e<t.length;e++){var o=t[e];if(o.end.row>=i)return o}return null},this.getFoldedRowCount=function(i,n){for(var t=this.$foldData,e=n-i+1,o=0;o<t.length;o++){var s=t[o],h=s.end.row,f=s.start.row;if(h>=n){f<n&&(f>=i?e-=n-f:e=0);break}else h>=i&&(f>=i?e-=h-f:e-=h-i+1)}return e},this.$addFoldLine=function(i){return this.$foldData.push(i),this.$foldData.sort(function(n,t){return n.start.row-t.start.row}),i},this.addFold=function(i,n){var t=this.$foldData,e=!1,o;i instanceof A?o=i:(o=new A(n,i),o.collapseChildren=n.collapseChildren),this.$clipRangeToDocument(o.range);var s=o.start.row,h=o.start.column,f=o.end.row,L=o.end.column,w=this.getFoldAt(s,h,1),d=this.getFoldAt(f,L,-1);if(w&&d==w)return w.addSubFold(o);w&&!w.range.isStart(s,h)&&this.removeFold(w),d&&!d.range.isEnd(f,L)&&this.removeFold(d);var a=this.getFoldsInRange(o.range);a.length>0&&(this.removeFolds(a),o.collapseChildren||a.forEach(function(C){o.addSubFold(C)}));for(var m=0;m<t.length;m++){var g=t[m];if(f==g.start.row){g.addFold(o),e=!0;break}else if(s==g.end.row){if(g.addFold(o),e=!0,!o.sameRow){var v=t[m+1];if(v&&v.start.row==f){g.merge(v);break}}break}else if(f<=g.start.row)break}return e||(g=this.$addFoldLine(new x(this.$foldData,o))),this.$useWrapMode?this.$updateWrapData(g.start.row,g.start.row):this.$updateRowLengthCache(g.start.row,g.start.row),this.$modified=!0,this._signal("changeFold",{data:o,action:"add"}),o},this.addFolds=function(i){i.forEach(function(n){this.addFold(n)},this)},this.removeFold=function(i){var n=i.foldLine,t=n.start.row,e=n.end.row,o=this.$foldData,s=n.folds;if(s.length==1)o.splice(o.indexOf(n),1);else if(n.range.isEnd(i.end.row,i.end.column))s.pop(),n.end.row=s[s.length-1].end.row,n.end.column=s[s.length-1].end.column;else if(n.range.isStart(i.start.row,i.start.column))s.shift(),n.start.row=s[0].start.row,n.start.column=s[0].start.column;else if(i.sameRow)s.splice(s.indexOf(i),1);else{var h=n.split(i.start.row,i.start.column);s=h.folds,s.shift(),h.start.row=s[0].start.row,h.start.column=s[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(t,e):this.$updateRowLengthCache(t,e)),this.$modified=!0,this._signal("changeFold",{data:i,action:"remove"})},this.removeFolds=function(i){for(var n=[],t=0;t<i.length;t++)n.push(i[t]);n.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(i){this.removeFold(i),i.subFolds.forEach(function(n){i.restoreRange(n),this.addFold(n)},this),i.collapseChildren>0&&this.foldAll(i.start.row+1,i.end.row,i.collapseChildren-1),i.subFolds=[]},this.expandFolds=function(i){i.forEach(function(n){this.expandFold(n)},this)},this.unfold=function(i,n){var t,e;if(i==null)t=new R(0,0,this.getLength(),0),n==null&&(n=!0);else if(typeof i=="number")t=new R(i,0,i,this.getLine(i).length);else if("row"in i)t=R.fromPoints(i,i);else{if(Array.isArray(i))return e=[],i.forEach(function(s){e=e.concat(this.unfold(s))},this),e;t=i}e=this.getFoldsInRangeList(t);for(var o=e;e.length==1&&R.comparePoints(e[0].start,t.start)<0&&R.comparePoints(e[0].end,t.end)>0;)this.expandFolds(e),e=this.getFoldsInRangeList(t);if(n!=!1?this.removeFolds(e):this.expandFolds(e),o.length)return o},this.isRowFolded=function(i,n){return!!this.getFoldLine(i,n)},this.getRowFoldEnd=function(i,n){var t=this.getFoldLine(i,n);return t?t.end.row:i},this.getRowFoldStart=function(i,n){var t=this.getFoldLine(i,n);return t?t.start.row:i},this.getFoldDisplayLine=function(i,n,t,e,o){e==null&&(e=i.start.row),o==null&&(o=0),n==null&&(n=i.end.row),t==null&&(t=this.getLine(n).length);var s=this.doc,h="";return i.walk(function(f,L,w,d){if(!(L<e)){if(L==e){if(w<o)return;d=Math.max(o,d)}f!=null?h+=f:h+=s.getLine(L).substring(d,w)}},n,t),h},this.getDisplayLine=function(i,n,t,e){var o=this.getFoldLine(i);if(o)return this.getFoldDisplayLine(o,i,n,t,e);var s;return s=this.doc.getLine(i),s.substring(e||0,n||s.length)},this.$cloneFoldData=function(){var i=[];return i=this.$foldData.map(function(n){var t=n.folds.map(function(e){return e.clone()});return new x(i,t)}),i},this.toggleFold=function(i){var n=this.selection,t=n.getRange(),e,o;if(t.isEmpty()){var s=t.start;if(e=this.getFoldAt(s.row,s.column),e){this.expandFold(e);return}else(o=this.findMatchingBracket(s))?t.comparePoint(o)==1?t.end=o:(t.start=o,t.start.column++,t.end.column--):(o=this.findMatchingBracket({row:s.row,column:s.column+1}))?(t.comparePoint(o)==1?t.end=o:t.start=o,t.start.column++):t=this.getCommentFoldRange(s.row,s.column)||t}else{var h=this.getFoldsInRange(t);if(i&&h.length){this.expandFolds(h);return}else h.length==1&&(e=h[0])}if(e||(e=this.getFoldAt(t.start.row,t.start.column)),e&&e.range.toString()==t.toString()){this.expandFold(e);return}var f="...";if(!t.isMultiLine()){if(f=this.getTextRange(t),f.length<4)return;f=f.trim().substring(0,2)+".."}this.addFold(f,t)},this.getCommentFoldRange=function(i,n,t){var e=new l(this,i,n),o=e.getCurrentToken(),s=o&&o.type;if(o&&/^comment|string/.test(s)){s=s.match(/comment|string/)[0],s=="comment"&&(s+="|doc-start|\\.doc");var h=new RegExp(s),f=new R;if(t!=1){do o=e.stepBackward();while(o&&h.test(o.type)&&!/^comment.end/.test(o.type));o=e.stepForward()}if(f.start.row=e.getCurrentTokenRow(),f.start.column=e.getCurrentTokenColumn()+(/^comment.start/.test(o.type)?o.value.length:2),e=new l(this,i,n),t!=-1){var L=-1;do if(o=e.stepForward(),L==-1){var w=this.getState(e.$row);h.test(w)||(L=e.$row)}else if(e.$row>L)break;while(o&&h.test(o.type)&&!/^comment.start/.test(o.type));o=e.stepBackward()}else o=e.getCurrentToken();return f.end.row=e.getCurrentTokenRow(),f.end.column=e.getCurrentTokenColumn(),/^comment.end/.test(o.type)||(f.end.column+=o.value.length-2),f}},this.foldAll=function(i,n,t,e){t==null&&(t=1e5);var o=this.foldWidgets;if(!!o){n=n||this.getLength(),i=i||0;for(var s=i;s<n;s++)if(o[s]==null&&(o[s]=this.getFoldWidget(s)),o[s]=="start"&&!(e&&!e(s))){var h=this.getFoldWidgetRange(s);h&&h.isMultiLine()&&h.end.row<=n&&h.start.row>=i&&(s=h.end.row,h.collapseChildren=t,this.addFold("...",h))}}},this.foldToLevel=function(i){for(this.foldAll();i-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var i=this;this.foldAll(null,null,null,function(n){for(var t=i.getTokens(n),e=0;e<t.length;e++){var o=t[e];if(!(o.type=="text"&&/^\s+$/.test(o.value)))return!!/comment/.test(o.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(i){if(!this.$foldStyles[i])throw new Error("invalid fold style: "+i+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=i){this.$foldStyle=i,i=="manual"&&this.unfold();var n=this.$foldMode;this.$setFolding(null),this.$setFolding(n)}},this.$setFolding=function(i){if(this.$foldMode!=i){if(this.$foldMode=i,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!i||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=i.getFoldWidget.bind(i,this,this.$foldStyle),this.getFoldWidgetRange=i.getFoldWidgetRange.bind(i,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(i,n){var t=this.foldWidgets;if(!t||n&&t[i])return{};for(var e=i-1,o;e>=0;){var s=t[e];if(s==null&&(s=t[e]=this.getFoldWidget(e)),s=="start"){var h=this.getFoldWidgetRange(e);if(o||(o=h),h&&h.end.row>=i)break}e--}return{range:e!==-1&&h,firstRange:o}},this.onFoldWidgetClick=function(i,n){n instanceof c&&(n=n.domEvent);var t={children:n.shiftKey,all:n.ctrlKey||n.metaKey,siblings:n.altKey},e=this.$toggleFoldWidget(i,t);if(!e){var o=n.target||n.srcElement;o&&/ace_fold-widget/.test(o.className)&&(o.className+=" ace_invalid")}},this.$toggleFoldWidget=function(i,n){if(!!this.getFoldWidget){var t=this.getFoldWidget(i),e=this.getLine(i),o=t==="end"?-1:1,s=this.getFoldAt(i,o===-1?0:e.length,o);if(s)return n.children||n.all?this.removeFold(s):this.expandFold(s),s;var h=this.getFoldWidgetRange(i,!0);if(h&&!h.isMultiLine()&&(s=this.getFoldAt(h.start.row,h.start.column,1),s&&h.isEqual(s.range)))return this.removeFold(s),s;if(n.siblings){var f=this.getParentFoldRangeData(i);if(f.range)var L=f.range.start.row+1,w=f.range.end.row;this.foldAll(L,w,n.all?1e4:0)}else n.children?(w=h?h.end.row:this.getLength(),this.foldAll(i+1,w,n.all?1e4:0)):h&&(n.all&&(h.collapseChildren=1e4),this.addFold("...",h));return h}},this.toggleFoldWidget=function(i){var n=this.selection.getCursor().row;n=this.getRowFoldStart(n);var t=this.$toggleFoldWidget(n,{});if(!t){var e=this.getParentFoldRangeData(n,!0);if(t=e.range||e.firstRange,t){n=t.start.row;var o=this.getFoldAt(n,this.getLine(n).length,1);o?this.removeFold(o):this.addFold("...",t)}}},this.updateFoldWidgets=function(i){var n=i.start.row,t=i.end.row-n;if(t===0)this.foldWidgets[n]=null;else if(i.action=="remove")this.foldWidgets.splice(n,t+1,null);else{var e=Array(t+1);e.unshift(n,1),this.foldWidgets.splice.apply(this.foldWidgets,e)}},this.tokenizerUpdateFoldWidgets=function(i){var n=i.data;n.first!=n.last&&this.foldWidgets.length>n.first&&this.foldWidgets.splice(n.first,this.foldWidgets.length)}}k.Folding=r}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(M,k,B){var R=M("../token_iterator").TokenIterator,x=M("../range").Range;function A(){this.findMatchingBracket=function(l,c){if(l.column==0)return null;var r=c||this.getLine(l.row).charAt(l.column-1);if(r=="")return null;var i=r.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],l):this.$findOpeningBracket(i[2],l):null},this.getBracketRange=function(l){var c=this.getLine(l.row),r=!0,i,n=c.charAt(l.column-1),t=n&&n.match(/([\(\[\{])|([\)\]\}])/);if(t||(n=c.charAt(l.column),l={row:l.row,column:l.column+1},t=n&&n.match(/([\(\[\{])|([\)\]\}])/),r=!1),!t)return null;if(t[1]){var e=this.$findClosingBracket(t[1],l);if(!e)return null;i=x.fromPoints(l,e),r||(i.end.column++,i.start.column--),i.cursor=i.end}else{var e=this.$findOpeningBracket(t[2],l);if(!e)return null;i=x.fromPoints(e,l),r||(i.start.column++,i.end.column--),i.cursor=i.start}return i},this.getMatchingBracketRanges=function(l,c){var r=this.getLine(l.row),i=/([\(\[\{])|([\)\]\}])/,n=!c&&r.charAt(l.column-1),t=n&&n.match(i);if(t||(n=(c===void 0||c)&&r.charAt(l.column),l={row:l.row,column:l.column+1},t=n&&n.match(i)),!t)return null;var e=new x(l.row,l.column-1,l.row,l.column),o=t[1]?this.$findClosingBracket(t[1],l):this.$findOpeningBracket(t[2],l);if(!o)return[e];var s=new x(o.row,o.column,o.row,o.column+1);return[e,s]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(l,c,r){var i=this.$brackets[l],n=1,t=new R(this,c.row,c.column),e=t.getCurrentToken();if(e||(e=t.stepForward()),!!e){r||(r=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var o=c.column-t.getCurrentTokenColumn()-2,s=e.value;;){for(;o>=0;){var h=s.charAt(o);if(h==i){if(n-=1,n==0)return{row:t.getCurrentTokenRow(),column:o+t.getCurrentTokenColumn()}}else h==l&&(n+=1);o-=1}do e=t.stepBackward();while(e&&!r.test(e.type));if(e==null)break;s=e.value,o=s.length-1}return null}},this.$findClosingBracket=function(l,c,r){var i=this.$brackets[l],n=1,t=new R(this,c.row,c.column),e=t.getCurrentToken();if(e||(e=t.stepForward()),!!e){r||(r=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var o=c.column-t.getCurrentTokenColumn();;){for(var s=e.value,h=s.length;o<h;){var f=s.charAt(o);if(f==i){if(n-=1,n==0)return{row:t.getCurrentTokenRow(),column:o+t.getCurrentTokenColumn()}}else f==l&&(n+=1);o+=1}do e=t.stepForward();while(e&&!r.test(e.type));if(e==null)break;o=0}return null}},this.getMatchingTags=function(l){var c=new R(this,l.row,l.column),r=this.$findTagName(c);if(!!r){var i=c.stepBackward();return i.value==="<"?this.$findClosingTag(c,r):this.$findOpeningTag(c,r)}},this.$findTagName=function(l){var c=l.getCurrentToken(),r=!1,i=!1;if(c&&c.type.indexOf("tag-name")===-1)do i?c=l.stepBackward():c=l.stepForward(),c&&(c.value==="/>"?i=!0:c.type.indexOf("tag-name")!==-1&&(r=!0));while(c&&!r);return c},this.$findClosingTag=function(l,c){var r,i=c.value,n=c.value,t=0,e=new x(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);c=l.stepForward();var o=new x(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+c.value.length),s=!1;do if(r=c,c=l.stepForward(),c){if(c.value===">"&&!s){var h=new x(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);s=!0}if(c.type.indexOf("tag-name")!==-1){if(i=c.value,n===i){if(r.value==="<")t++;else if(r.value==="</"&&(t--,t<0)){l.stepBackward();var f=new x(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+2);c=l.stepForward();var L=new x(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+c.value.length);if(c=l.stepForward(),c&&c.value===">")var w=new x(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);else return}}}else if(n===i&&c.value==="/>"&&(t--,t<0))var f=new x(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+2),L=f,w=L,h=new x(o.end.row,o.end.column,o.end.row,o.end.column+1)}while(c&&t>=0);if(e&&h&&f&&w&&o&&L)return{openTag:new x(e.start.row,e.start.column,h.end.row,h.end.column),closeTag:new x(f.start.row,f.start.column,w.end.row,w.end.column),openTagName:o,closeTagName:L}},this.$findOpeningTag=function(l,c){var r=l.getCurrentToken(),i=c.value,n=0,t=l.getCurrentTokenRow(),e=l.getCurrentTokenColumn(),o=e+2,s=new x(t,e,t,o);l.stepForward();var h=new x(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+c.value.length);if(c=l.stepForward(),!(!c||c.value!==">")){var f=new x(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);l.stepBackward(),l.stepBackward();do if(c=r,t=l.getCurrentTokenRow(),e=l.getCurrentTokenColumn(),o=e+c.value.length,r=l.stepBackward(),c){if(c.type.indexOf("tag-name")!==-1){if(i===c.value)if(r.value==="<"){if(n++,n>0){var L=new x(t,e,t,o),w=new x(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);do c=l.stepForward();while(c&&c.value!==">");var d=new x(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1)}}else r.value==="</"&&n--}else if(c.value==="/>"){for(var a=0,m=r;m;){if(m.type.indexOf("tag-name")!==-1&&m.value===i){n--;break}else if(m.value==="<")break;m=l.stepBackward(),a++}for(var g=0;g<a;g++)l.stepForward()}}while(r&&n<=0);if(w&&d&&s&&f&&L&&h)return{openTag:new x(w.start.row,w.start.column,d.end.row,d.end.column),closeTag:new x(s.start.row,s.start.column,f.end.row,f.end.column),openTagName:L,closeTagName:h}}}}k.BracketMatch=A}),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/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(M,k,B){var R=M("./lib/oop"),x=M("./lib/lang"),A=M("./bidihandler").BidiHandler,l=M("./config"),c=M("./lib/event_emitter").EventEmitter,r=M("./selection").Selection,i=M("./mode/text").Mode,n=M("./range").Range,t=M("./document").Document,e=M("./background_tokenizer").BackgroundTokenizer,o=M("./search_highlight").SearchHighlight,s=M("./undomanager").UndoManager,h=function(){function $(b,p){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++$.$uid,this.$foldData.toString=function(){return this.join(`
- `)},this.bgTokenizer=new e(new i().getTokenizer(),this);var u=this;this.bgTokenizer.on("update",function(y){u._signal("tokenizerUpdate",y)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof b!="object"||!b.getLine)&&(b=new t(b)),this.setDocument(b),this.selection=new r(this),this.$bidiHandler=new A(this),l.resetOptions(this),this.setMode(p),l._signal("session",this),this.destroyed=!1}return $.prototype.setDocument=function(b){this.doc&&this.doc.off("change",this.$onChange),this.doc=b,b.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},$.prototype.getDocument=function(){return this.doc},$.prototype.$resetRowCache=function(b){if(!b){this.$docRowCache=[],this.$screenRowCache=[];return}var p=this.$docRowCache.length,u=this.$getRowCacheIndex(this.$docRowCache,b)+1;p>u&&(this.$docRowCache.splice(u,p),this.$screenRowCache.splice(u,p))},$.prototype.$getRowCacheIndex=function(b,p){for(var u=0,y=b.length-1;u<=y;){var S=u+y>>1,T=b[S];if(p>T)u=S+1;else if(p<T)y=S-1;else return S}return u-1},$.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},$.prototype.onChangeFold=function(b){var p=b.data;this.$resetRowCache(p.start.row)},$.prototype.onChange=function(b){this.$modified=!0,this.$bidiHandler.onChange(b),this.$resetRowCache(b.start.row);var p=this.$updateInternalDataOnChange(b);!this.$fromUndo&&this.$undoManager&&(p&&p.length&&(this.$undoManager.add({action:"removeFolds",folds:p},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(b,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(b),this._signal("change",b)},$.prototype.setValue=function(b){this.doc.setValue(b),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},$.fromJSON=function(b){typeof b=="string"&&(b=JSON.parse(b));var p=new s;p.$undoStack=b.history.undo,p.$redoStack=b.history.redo,p.mark=b.history.mark,p.$rev=b.history.rev;var u=new $(b.value);return b.folds.forEach(function(y){u.addFold("...",n.fromPoints(y.start,y.end))}),u.setAnnotations(b.annotations),u.setBreakpoints(b.breakpoints),u.setMode(b.mode),u.setScrollLeft(b.scrollLeft),u.setScrollTop(b.scrollTop),u.setUndoManager(p),u.selection.fromJSON(b.selection),u},$.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(b){return b.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},$.prototype.toString=function(){return this.doc.getValue()},$.prototype.getSelection=function(){return this.selection},$.prototype.getState=function(b){return this.bgTokenizer.getState(b)},$.prototype.getTokens=function(b){return this.bgTokenizer.getTokens(b)},$.prototype.getTokenAt=function(b,p){var u=this.bgTokenizer.getTokens(b),y,S=0;if(p==null){var T=u.length-1;S=this.getLine(b).length}else for(var T=0;T<u.length&&(S+=u[T].value.length,!(S>=p));T++);return y=u[T],y?(y.index=T,y.start=S-y.value.length,y):null},$.prototype.setUndoManager=function(b){if(this.$undoManager=b,this.$informUndoManager&&this.$informUndoManager.cancel(),b){var p=this;b.addSession(this),this.$syncInformUndoManager=function(){p.$informUndoManager.cancel(),p.mergeUndoDeltas=!1},this.$informUndoManager=x.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},$.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},$.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},$.prototype.getTabString=function(){return this.getUseSoftTabs()?x.stringRepeat(" ",this.getTabSize()):" "},$.prototype.setUseSoftTabs=function(b){this.setOption("useSoftTabs",b)},$.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},$.prototype.setTabSize=function(b){this.setOption("tabSize",b)},$.prototype.getTabSize=function(){return this.$tabSize},$.prototype.isTabStop=function(b){return this.$useSoftTabs&&b.column%this.$tabSize===0},$.prototype.setNavigateWithinSoftTabs=function(b){this.setOption("navigateWithinSoftTabs",b)},$.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},$.prototype.setOverwrite=function(b){this.setOption("overwrite",b)},$.prototype.getOverwrite=function(){return this.$overwrite},$.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},$.prototype.addGutterDecoration=function(b,p){this.$decorations[b]||(this.$decorations[b]=""),this.$decorations[b]+=" "+p,this._signal("changeBreakpoint",{})},$.prototype.removeGutterDecoration=function(b,p){this.$decorations[b]=(this.$decorations[b]||"").replace(" "+p,""),this._signal("changeBreakpoint",{})},$.prototype.getBreakpoints=function(){return this.$breakpoints},$.prototype.setBreakpoints=function(b){this.$breakpoints=[];for(var p=0;p<b.length;p++)this.$breakpoints[b[p]]="ace_breakpoint";this._signal("changeBreakpoint",{})},$.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},$.prototype.setBreakpoint=function(b,p){p===void 0&&(p="ace_breakpoint"),p?this.$breakpoints[b]=p:delete this.$breakpoints[b],this._signal("changeBreakpoint",{})},$.prototype.clearBreakpoint=function(b){delete this.$breakpoints[b],this._signal("changeBreakpoint",{})},$.prototype.addMarker=function(b,p,u,y){var S=this.$markerId++,T={range:b,type:u||"line",renderer:typeof u=="function"?u:null,clazz:p,inFront:!!y,id:S};return y?(this.$frontMarkers[S]=T,this._signal("changeFrontMarker")):(this.$backMarkers[S]=T,this._signal("changeBackMarker")),S},$.prototype.addDynamicMarker=function(b,p){if(!!b.update){var u=this.$markerId++;return b.id=u,b.inFront=!!p,p?(this.$frontMarkers[u]=b,this._signal("changeFrontMarker")):(this.$backMarkers[u]=b,this._signal("changeBackMarker")),b}},$.prototype.removeMarker=function(b){var p=this.$frontMarkers[b]||this.$backMarkers[b];if(!!p){var u=p.inFront?this.$frontMarkers:this.$backMarkers;delete u[b],this._signal(p.inFront?"changeFrontMarker":"changeBackMarker")}},$.prototype.getMarkers=function(b){return b?this.$frontMarkers:this.$backMarkers},$.prototype.highlight=function(b){if(!this.$searchHighlight){var p=new o(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(p)}this.$searchHighlight.setRegexp(b)},$.prototype.highlightLines=function(b,p,u,y){typeof p!="number"&&(u=p,p=b),u||(u="ace_step");var S=new n(b,0,p,1/0);return S.id=this.addMarker(S,u,"fullLine",y),S},$.prototype.setAnnotations=function(b){this.$annotations=b,this._signal("changeAnnotation",{})},$.prototype.getAnnotations=function(){return this.$annotations||[]},$.prototype.clearAnnotations=function(){this.setAnnotations([])},$.prototype.$detectNewLine=function(b){var p=b.match(/^.*?(\r?\n)/m);p?this.$autoNewLine=p[1]:this.$autoNewLine=`
- `},$.prototype.getWordRange=function(b,p){var u=this.getLine(b),y=!1;if(p>0&&(y=!!u.charAt(p-1).match(this.tokenRe)),y||(y=!!u.charAt(p).match(this.tokenRe)),y)var S=this.tokenRe;else if(/^\s+$/.test(u.slice(p-1,p+1)))var S=/\s/;else var S=this.nonTokenRe;var T=p;if(T>0){do T--;while(T>=0&&u.charAt(T).match(S));T++}for(var E=p;E<u.length&&u.charAt(E).match(S);)E++;return new n(b,T,b,E)},$.prototype.getAWordRange=function(b,p){for(var u=this.getWordRange(b,p),y=this.getLine(u.end.row);y.charAt(u.end.column).match(/[ \t]/);)u.end.column+=1;return u},$.prototype.setNewLineMode=function(b){this.doc.setNewLineMode(b)},$.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},$.prototype.setUseWorker=function(b){this.setOption("useWorker",b)},$.prototype.getUseWorker=function(){return this.$useWorker},$.prototype.onReloadTokenizer=function(b){var p=b.data;this.bgTokenizer.start(p.first),this._signal("tokenizerUpdate",b)},$.prototype.setMode=function(b,p){if(b&&typeof b=="object"){if(b.getTokenizer)return this.$onChangeMode(b);var u=b,y=u.path}else y=b||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new i),this.$modes[y]&&!u){this.$onChangeMode(this.$modes[y]),p&&p();return}this.$modeId=y,l.loadModule(["mode",y],function(S){if(this.$modeId!==y)return p&&p();this.$modes[y]&&!u?this.$onChangeMode(this.$modes[y]):S&&S.Mode&&(S=new S.Mode(u),u||(this.$modes[y]=S,S.$id=y),this.$onChangeMode(S)),p&&p()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},$.prototype.$onChangeMode=function(b,p){if(p||(this.$modeId=b.$id),this.$mode!==b){var u=this.$mode;this.$mode=b,this.$stopWorker(),this.$useWorker&&this.$startWorker();var y=b.getTokenizer();if(y.on!==void 0){var S=this.onReloadTokenizer.bind(this);y.on("update",S)}this.bgTokenizer.setTokenizer(y),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=b.tokenRe,this.nonTokenRe=b.nonTokenRe,p||(b.attachToSession&&b.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(b.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:u,mode:b}))}},$.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},$.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(b){l.warn("Could not load worker",b),this.$worker=null}},$.prototype.getMode=function(){return this.$mode},$.prototype.setScrollTop=function(b){this.$scrollTop===b||isNaN(b)||(this.$scrollTop=b,this._signal("changeScrollTop",b))},$.prototype.getScrollTop=function(){return this.$scrollTop},$.prototype.setScrollLeft=function(b){this.$scrollLeft===b||isNaN(b)||(this.$scrollLeft=b,this._signal("changeScrollLeft",b))},$.prototype.getScrollLeft=function(){return this.$scrollLeft},$.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},$.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var b=0;return this.lineWidgets.forEach(function(p){p&&p.screenWidth>b&&(b=p.screenWidth)}),this.lineWidgetWidth=b},$.prototype.$computeWidth=function(b){if(this.$modified||b){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var p=this.doc.getAllLines(),u=this.$rowLengthCache,y=0,S=0,T=this.$foldData[S],E=T?T.start.row:1/0,_=p.length,I=0;I<_;I++){if(I>E){if(I=T.end.row+1,I>=_)break;T=this.$foldData[S++],E=T?T.start.row:1/0}u[I]==null&&(u[I]=this.$getStringScreenWidth(p[I])[0]),u[I]>y&&(y=u[I])}this.screenWidth=y}},$.prototype.getLine=function(b){return this.doc.getLine(b)},$.prototype.getLines=function(b,p){return this.doc.getLines(b,p)},$.prototype.getLength=function(){return this.doc.getLength()},$.prototype.getTextRange=function(b){return this.doc.getTextRange(b||this.selection.getRange())},$.prototype.insert=function(b,p){return this.doc.insert(b,p)},$.prototype.remove=function(b){return this.doc.remove(b)},$.prototype.removeFullLines=function(b,p){return this.doc.removeFullLines(b,p)},$.prototype.undoChanges=function(b,p){if(!!b.length){this.$fromUndo=!0;for(var u=b.length-1;u!=-1;u--){var y=b[u];y.action=="insert"||y.action=="remove"?this.doc.revertDelta(y):y.folds&&this.addFolds(y.folds)}!p&&this.$undoSelect&&(b.selectionBefore?this.selection.fromJSON(b.selectionBefore):this.selection.setRange(this.$getUndoSelection(b,!0))),this.$fromUndo=!1}},$.prototype.redoChanges=function(b,p){if(!!b.length){this.$fromUndo=!0;for(var u=0;u<b.length;u++){var y=b[u];(y.action=="insert"||y.action=="remove")&&this.doc.$safeApplyDelta(y)}!p&&this.$undoSelect&&(b.selectionAfter?this.selection.fromJSON(b.selectionAfter):this.selection.setRange(this.$getUndoSelection(b,!1))),this.$fromUndo=!1}},$.prototype.setUndoSelect=function(b){this.$undoSelect=b},$.prototype.$getUndoSelection=function(b,p){function u(_){return p?_.action!=="insert":_.action==="insert"}for(var y,S,T=0;T<b.length;T++){var E=b[T];if(!!E.start){if(!y){u(E)?y=n.fromPoints(E.start,E.end):y=n.fromPoints(E.start,E.start);continue}u(E)?(S=E.start,y.compare(S.row,S.column)==-1&&y.setStart(S),S=E.end,y.compare(S.row,S.column)==1&&y.setEnd(S)):(S=E.start,y.compare(S.row,S.column)==-1&&(y=n.fromPoints(E.start,E.start)))}}return y},$.prototype.replace=function(b,p){return this.doc.replace(b,p)},$.prototype.moveText=function(b,p,u){var y=this.getTextRange(b),S=this.getFoldsInRange(b),T=n.fromPoints(p,p);if(!u){this.remove(b);var E=b.start.row-b.end.row,_=E?-b.end.column:b.start.column-b.end.column;_&&(T.start.row==b.end.row&&T.start.column>b.end.column&&(T.start.column+=_),T.end.row==b.end.row&&T.end.column>b.end.column&&(T.end.column+=_)),E&&T.start.row>=b.end.row&&(T.start.row+=E,T.end.row+=E)}if(T.end=this.insert(T.start,y),S.length){var I=b.start,D=T.start,E=D.row-I.row,_=D.column-I.column;this.addFolds(S.map(function(F){return F=F.clone(),F.start.row==I.row&&(F.start.column+=_),F.end.row==I.row&&(F.end.column+=_),F.start.row+=E,F.end.row+=E,F}))}return T},$.prototype.indentRows=function(b,p,u){u=u.replace(/\t/g,this.getTabString());for(var y=b;y<=p;y++)this.doc.insertInLine({row:y,column:0},u)},$.prototype.outdentRows=function(b){for(var p=b.collapseRows(),u=new n(0,0,0,0),y=this.getTabSize(),S=p.start.row;S<=p.end.row;++S){var T=this.getLine(S);u.start.row=S,u.end.row=S;for(var E=0;E<y&&T.charAt(E)==" ";++E);E<y&&T.charAt(E)==" "?(u.start.column=E,u.end.column=E+1):(u.start.column=0,u.end.column=E),this.remove(u)}},$.prototype.$moveLines=function(b,p,u){if(b=this.getRowFoldStart(b),p=this.getRowFoldEnd(p),u<0){var y=this.getRowFoldStart(b+u);if(y<0)return 0;var S=y-b}else if(u>0){var y=this.getRowFoldEnd(p+u);if(y>this.doc.getLength()-1)return 0;var S=y-p}else{b=this.$clipRowToDocument(b),p=this.$clipRowToDocument(p);var S=p-b+1}var T=new n(b,0,p,Number.MAX_VALUE),E=this.getFoldsInRange(T).map(function(I){return I=I.clone(),I.start.row+=S,I.end.row+=S,I}),_=u==0?this.doc.getLines(b,p):this.doc.removeFullLines(b,p);return this.doc.insertFullLines(b+S,_),E.length&&this.addFolds(E),S},$.prototype.moveLinesUp=function(b,p){return this.$moveLines(b,p,-1)},$.prototype.moveLinesDown=function(b,p){return this.$moveLines(b,p,1)},$.prototype.duplicateLines=function(b,p){return this.$moveLines(b,p,0)},$.prototype.$clipRowToDocument=function(b){return Math.max(0,Math.min(b,this.doc.getLength()-1))},$.prototype.$clipColumnToRow=function(b,p){return p<0?0:Math.min(this.doc.getLine(b).length,p)},$.prototype.$clipPositionToDocument=function(b,p){if(p=Math.max(0,p),b<0)b=0,p=0;else{var u=this.doc.getLength();b>=u?(b=u-1,p=this.doc.getLine(u-1).length):p=Math.min(this.doc.getLine(b).length,p)}return{row:b,column:p}},$.prototype.$clipRangeToDocument=function(b){b.start.row<0?(b.start.row=0,b.start.column=0):b.start.column=this.$clipColumnToRow(b.start.row,b.start.column);var p=this.doc.getLength()-1;return b.end.row>p?(b.end.row=p,b.end.column=this.doc.getLine(p).length):b.end.column=this.$clipColumnToRow(b.end.row,b.end.column),b},$.prototype.setUseWrapMode=function(b){if(b!=this.$useWrapMode){if(this.$useWrapMode=b,this.$modified=!0,this.$resetRowCache(0),b){var p=this.getLength();this.$wrapData=Array(p),this.$updateWrapData(0,p-1)}this._signal("changeWrapMode")}},$.prototype.getUseWrapMode=function(){return this.$useWrapMode},$.prototype.setWrapLimitRange=function(b,p){(this.$wrapLimitRange.min!==b||this.$wrapLimitRange.max!==p)&&(this.$wrapLimitRange={min:b,max:p},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},$.prototype.adjustWrapLimit=function(b,p){var u=this.$wrapLimitRange;u.max<0&&(u={min:p,max:p});var y=this.$constrainWrapLimit(b,u.min,u.max);return y!=this.$wrapLimit&&y>1?(this.$wrapLimit=y,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},$.prototype.$constrainWrapLimit=function(b,p,u){return p&&(b=Math.max(p,b)),u&&(b=Math.min(u,b)),b},$.prototype.getWrapLimit=function(){return this.$wrapLimit},$.prototype.setWrapLimit=function(b){this.setWrapLimitRange(b,b)},$.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},$.prototype.$updateInternalDataOnChange=function(b){var p=this.$useWrapMode,u=b.action,y=b.start,S=b.end,T=y.row,E=S.row,_=E-T,I=null;if(this.$updating=!0,_!=0)if(u==="remove"){this[p?"$wrapData":"$rowLengthCache"].splice(T,_);var D=this.$foldData;I=this.getFoldsInRange(b),this.removeFolds(I);var H=this.getFoldLine(S.row),O=0;if(H){H.addRemoveChars(S.row,S.column,y.column-S.column),H.shiftRow(-_);var F=this.getFoldLine(T);F&&F!==H&&(F.merge(H),H=F),O=D.indexOf(H)+1}for(O;O<D.length;O++){var H=D[O];H.start.row>=S.row&&H.shiftRow(-_)}E=T}else{var W=Array(_);W.unshift(T,0);var N=p?this.$wrapData:this.$rowLengthCache;N.splice.apply(N,W);var D=this.$foldData,H=this.getFoldLine(T),O=0;if(H){var P=H.range.compareInside(y.row,y.column);P==0?(H=H.split(y.row,y.column),H&&(H.shiftRow(_),H.addRemoveChars(E,0,S.column-y.column))):P==-1&&(H.addRemoveChars(T,0,S.column-y.column),H.shiftRow(_)),O=D.indexOf(H)+1}for(O;O<D.length;O++){var H=D[O];H.start.row>=T&&H.shiftRow(_)}}else{_=Math.abs(b.start.column-b.end.column),u==="remove"&&(I=this.getFoldsInRange(b),this.removeFolds(I),_=-_);var H=this.getFoldLine(T);H&&H.addRemoveChars(T,y.column,_)}return p&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,p?this.$updateWrapData(T,E):this.$updateRowLengthCache(T,E),I},$.prototype.$updateRowLengthCache=function(b,p){this.$rowLengthCache[b]=null,this.$rowLengthCache[p]=null},$.prototype.$updateWrapData=function(b,p){var u=this.doc.getAllLines(),y=this.getTabSize(),S=this.$wrapData,T=this.$wrapLimit,E,_,I=b;for(p=Math.min(p,u.length-1);I<=p;)_=this.getFoldLine(I,_),_?(E=[],_.walk(function(D,H,O,F){var W;if(D!=null){W=this.$getDisplayTokens(D,E.length),W[0]=w;for(var N=1;N<W.length;N++)W[N]=d}else W=this.$getDisplayTokens(u[H].substring(F,O),E.length);E=E.concat(W)}.bind(this),_.end.row,u[_.end.row].length+1),S[_.start.row]=this.$computeWrapSplits(E,T,y),I=_.end.row+1):(E=this.$getDisplayTokens(u[I]),S[I]=this.$computeWrapSplits(E,T,y),I++)},$.prototype.$computeWrapSplits=function(b,p,u){if(b.length==0)return[];var y=[],S=b.length,T=0,E=0,_=this.$wrapAsCode,I=this.$indentedSoftWrap,D=p<=Math.max(2*u,8)||I===!1?0:Math.floor(p/2);function H(){var P=0;if(D===0)return P;if(I)for(var V=0;V<b.length;V++){var U=b[V];if(U==m)P+=1;else if(U==g)P+=u;else{if(U==v)continue;break}}return _&&I!==!1&&(P+=u),Math.min(P,D)}function O(P){for(var V=P-T,U=T;U<P;U++){var G=b[U];(G===12||G===2)&&(V-=1)}y.length||(F=H(),y.indent=F),E+=V,y.push(E),T=P}for(var F=0;S-T>p-F;){var W=T+p-F;if(b[W-1]>=m&&b[W]>=m){O(W);continue}if(b[W]==w||b[W]==d){for(W;W!=T-1&&b[W]!=w;W--);if(W>T){O(W);continue}for(W=T+p,W;W<b.length&&b[W]==d;W++);if(W==b.length)break;O(W);continue}for(var N=Math.max(W-(p-(p>>2)),T-1);W>N&&b[W]<w;)W--;if(_){for(;W>N&&b[W]<w;)W--;for(;W>N&&b[W]==a;)W--}else for(;W>N&&b[W]<m;)W--;if(W>N){O(++W);continue}W=T+p,b[W]==L&&W--,O(W-F)}return y},$.prototype.$getDisplayTokens=function(b,p){var u=[],y;p=p||0;for(var S=0;S<b.length;S++){var T=b.charCodeAt(S);if(T==9){y=this.getScreenTabSize(u.length+p),u.push(g);for(var E=1;E<y;E++)u.push(v)}else T==32?u.push(m):T>39&&T<48||T>57&&T<64?u.push(a):T>=4352&&C(T)?u.push(f,L):u.push(f)}return u},$.prototype.$getStringScreenWidth=function(b,p,u){if(p==0)return[0,0];p==null&&(p=1/0),u=u||0;var y,S;for(S=0;S<b.length&&(y=b.charCodeAt(S),y==9?u+=this.getScreenTabSize(u):y>=4352&&C(y)?u+=2:u+=1,!(u>p));S++);return[u,S]},$.prototype.getRowLength=function(b){var p=1;return this.lineWidgets&&(p+=this.lineWidgets[b]&&this.lineWidgets[b].rowCount||0),!this.$useWrapMode||!this.$wrapData[b]?p:this.$wrapData[b].length+p},$.prototype.getRowLineCount=function(b){return!this.$useWrapMode||!this.$wrapData[b]?1:this.$wrapData[b].length+1},$.prototype.getRowWrapIndent=function(b){if(this.$useWrapMode){var p=this.screenToDocumentPosition(b,Number.MAX_VALUE),u=this.$wrapData[p.row];return u.length&&u[0]<p.column?u.indent:0}else return 0},$.prototype.getScreenLastRowColumn=function(b){var p=this.screenToDocumentPosition(b,Number.MAX_VALUE);return this.documentToScreenColumn(p.row,p.column)},$.prototype.getDocumentLastRowColumn=function(b,p){var u=this.documentToScreenRow(b,p);return this.getScreenLastRowColumn(u)},$.prototype.getDocumentLastRowColumnPosition=function(b,p){var u=this.documentToScreenRow(b,p);return this.screenToDocumentPosition(u,Number.MAX_VALUE/10)},$.prototype.getRowSplitData=function(b){if(this.$useWrapMode)return this.$wrapData[b]},$.prototype.getScreenTabSize=function(b){return this.$tabSize-(b%this.$tabSize|0)},$.prototype.screenToDocumentRow=function(b,p){return this.screenToDocumentPosition(b,p).row},$.prototype.screenToDocumentColumn=function(b,p){return this.screenToDocumentPosition(b,p).column},$.prototype.screenToDocumentPosition=function(b,p,u){if(b<0)return{row:0,column:0};var y,S=0,T=0,E,_=0,I=0,D=this.$screenRowCache,H=this.$getRowCacheIndex(D,b),O=D.length;if(O&&H>=0)var _=D[H],S=this.$docRowCache[H],F=b>D[O-1];else var F=!O;for(var W=this.getLength()-1,N=this.getNextFoldLine(S),P=N?N.start.row:1/0;_<=b&&(I=this.getRowLength(S),!(_+I>b||S>=W));)_+=I,S++,S>P&&(S=N.end.row+1,N=this.getNextFoldLine(S,N),P=N?N.start.row:1/0),F&&(this.$docRowCache.push(S),this.$screenRowCache.push(_));if(N&&N.start.row<=S)y=this.getFoldDisplayLine(N),S=N.start.row;else{if(_+I<=b||S>W)return{row:W,column:this.getLine(W).length};y=this.getLine(S),N=null}var V=0,U=Math.floor(b-_);if(this.$useWrapMode){var G=this.$wrapData[S];G&&(E=G[U],U>0&&G.length&&(V=G.indent,T=G[U-1]||G[G.length-1],y=y.substring(T)))}return u!==void 0&&this.$bidiHandler.isBidiRow(_+U,S,U)&&(p=this.$bidiHandler.offsetToCol(u)),T+=this.$getStringScreenWidth(y,p-V)[1],this.$useWrapMode&&T>=E&&(T=E-1),N?N.idxToPosition(T):{row:S,column:T}},$.prototype.documentToScreenPosition=function(b,p){if(typeof p=="undefined")var u=this.$clipPositionToDocument(b.row,b.column);else u=this.$clipPositionToDocument(b,p);b=u.row,p=u.column;var y=0,S=null,T=null;T=this.getFoldAt(b,p,1),T&&(b=T.start.row,p=T.start.column);var E,_=0,I=this.$docRowCache,D=this.$getRowCacheIndex(I,b),H=I.length;if(H&&D>=0)var _=I[D],y=this.$screenRowCache[D],O=b>I[H-1];else var O=!H;for(var F=this.getNextFoldLine(_),W=F?F.start.row:1/0;_<b;){if(_>=W){if(E=F.end.row+1,E>b)break;F=this.getNextFoldLine(E,F),W=F?F.start.row:1/0}else E=_+1;y+=this.getRowLength(_),_=E,O&&(this.$docRowCache.push(_),this.$screenRowCache.push(y))}var N="";F&&_>=W?(N=this.getFoldDisplayLine(F,b,p),S=F.start.row):(N=this.getLine(b).substring(0,p),S=b);var P=0;if(this.$useWrapMode){var V=this.$wrapData[S];if(V){for(var U=0;N.length>=V[U];)y++,U++;N=N.substring(V[U-1]||0,N.length),P=U>0?V.indent:0}}return this.lineWidgets&&this.lineWidgets[_]&&this.lineWidgets[_].rowsAbove&&(y+=this.lineWidgets[_].rowsAbove),{row:y,column:P+this.$getStringScreenWidth(N)[0]}},$.prototype.documentToScreenColumn=function(b,p){return this.documentToScreenPosition(b,p).column},$.prototype.documentToScreenRow=function(b,p){return this.documentToScreenPosition(b,p).row},$.prototype.getScreenLength=function(){var b=0,p=null;if(this.$useWrapMode)for(var S=this.$wrapData.length,T=0,y=0,p=this.$foldData[y++],E=p?p.start.row:1/0;T<S;){var _=this.$wrapData[T];b+=_?_.length+1:1,T++,T>E&&(T=p.end.row+1,p=this.$foldData[y++],E=p?p.start.row:1/0)}else{b=this.getLength();for(var u=this.$foldData,y=0;y<u.length;y++)p=u[y],b-=p.end.row-p.start.row}return this.lineWidgets&&(b+=this.$getWidgetScreenLength()),b},$.prototype.$setFontMetrics=function(b){!this.$enableVarChar||(this.$getStringScreenWidth=function(p,u,y){if(u===0)return[0,0];u||(u=1/0),y=y||0;var S,T;for(T=0;T<p.length&&(S=p.charAt(T),S===" "?y+=this.getScreenTabSize(y):y+=b.getCharacterWidth(S),!(y>u));T++);return[y,T]})},$.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()},$}();h.$uid=0,h.prototype.$modes=l.$modes,h.prototype.getValue=h.prototype.toString,h.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},h.prototype.$overwrite=!1,h.prototype.$mode=null,h.prototype.$modeId=null,h.prototype.$scrollTop=0,h.prototype.$scrollLeft=0,h.prototype.$wrapLimit=80,h.prototype.$useWrapMode=!1,h.prototype.$wrapLimitRange={min:null,max:null},h.prototype.lineWidgets=null,h.prototype.isFullWidth=C,R.implement(h.prototype,c);var f=1,L=2,w=3,d=4,a=9,m=10,g=11,v=12;function C($){return $<4352?!1:$>=4352&&$<=4447||$>=4515&&$<=4519||$>=4602&&$<=4607||$>=9001&&$<=9002||$>=11904&&$<=11929||$>=11931&&$<=12019||$>=12032&&$<=12245||$>=12272&&$<=12283||$>=12288&&$<=12350||$>=12353&&$<=12438||$>=12441&&$<=12543||$>=12549&&$<=12589||$>=12593&&$<=12686||$>=12688&&$<=12730||$>=12736&&$<=12771||$>=12784&&$<=12830||$>=12832&&$<=12871||$>=12880&&$<=13054||$>=13056&&$<=19903||$>=19968&&$<=42124||$>=42128&&$<=42182||$>=43360&&$<=43388||$>=44032&&$<=55203||$>=55216&&$<=55238||$>=55243&&$<=55291||$>=63744&&$<=64255||$>=65040&&$<=65049||$>=65072&&$<=65106||$>=65108&&$<=65126||$>=65128&&$<=65131||$>=65281&&$<=65376||$>=65504&&$<=65510}M("./edit_session/folding").Folding.call(h.prototype),M("./edit_session/bracket_match").BracketMatch.call(h.prototype),l.defineOptions(h.prototype,"session",{wrap:{set:function($){if(!$||$=="off"?$=!1:$=="free"?$=!0:$=="printMargin"?$=-1:typeof $=="string"&&($=parseInt($,10)||!1),this.$wrap!=$)if(this.$wrap=$,!$)this.setUseWrapMode(!1);else{var b=typeof $=="number"?$:null;this.setWrapLimitRange(b,b),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function($){$=$=="auto"?this.$mode.type!="text":$!="text",$!=this.$wrapAsCode&&(this.$wrapAsCode=$,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($){this.$useWorker=$,this.$stopWorker(),$&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function($){$=parseInt($),$>0&&this.$tabSize!==$&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=$,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function($){this.setFoldStyle($)},handlesSet:!0},overwrite:{set:function($){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function($){this.doc.setNewLineMode($)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function($){this.setMode($)},get:function(){return this.$modeId},handlesSet:!0}}),k.EditSession=h}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(M,k,B){var R=M("./lib/lang"),x=M("./lib/oop"),A=M("./range").Range,l=function(){function r(){this.$options={}}return r.prototype.set=function(i){return x.mixin(this.$options,i),this},r.prototype.getOptions=function(){return R.copyObject(this.$options)},r.prototype.setOptions=function(i){this.$options=i},r.prototype.find=function(i){var n=this.$options,t=this.$matchIterator(i,n);if(!t)return!1;var e=null;return t.forEach(function(o,s,h,f){return e=new A(o,s,h,f),s==f&&n.start&&n.start.start&&n.skipCurrent!=!1&&e.isEqual(n.start)?(e=null,!1):!0}),e},r.prototype.findAll=function(i){var n=this.$options;if(!n.needle)return[];this.$assembleRegExp(n);var t=n.range,e=t?i.getLines(t.start.row,t.end.row):i.doc.getAllLines(),o=[],s=n.re;if(n.$isMultiLine){var h=s.length,f=e.length-h,L;e:for(var w=s.offset||0;w<=f;w++){for(var d=0;d<h;d++)if(e[w+d].search(s[d])==-1)continue e;var a=e[w],m=e[w+h-1],g=a.length-a.match(s[0])[0].length,v=m.match(s[h-1])[0].length;L&&L.end.row===w&&L.end.column>g||(o.push(L=new A(w,g,w+h-1,v)),h>2&&(w=w+h-2))}}else for(var C=0;C<e.length;C++)for(var $=R.getMatchOffsets(e[C],s),d=0;d<$.length;d++){var b=$[d];o.push(new A(C,b.offset,C,b.offset+b.length))}if(t){for(var p=t.start.column,u=t.end.column,C=0,d=o.length-1;C<d&&o[C].start.column<p&&o[C].start.row==0;)C++;for(var y=t.end.row-t.start.row;C<d&&o[d].end.column>u&&o[d].end.row==y;)d--;for(o=o.slice(C,d+1),C=0,d=o.length;C<d;C++)o[C].start.row+=t.start.row,o[C].end.row+=t.start.row}return o},r.prototype.replace=function(i,n){var t=this.$options,e=this.$assembleRegExp(t);if(t.$isMultiLine)return n;if(!!e){var o=e.exec(i);if(!o||o[0].length!=i.length)return null;if(n=i.replace(e,n),t.preserveCase){n=n.split("");for(var s=Math.min(i.length,i.length);s--;){var h=i[s];h&&h.toLowerCase()!=h?n[s]=n[s].toUpperCase():n[s]=n[s].toLowerCase()}n=n.join("")}return n}},r.prototype.$assembleRegExp=function(i,n){if(i.needle instanceof RegExp)return i.re=i.needle;var t=i.needle;if(!i.needle)return i.re=!1;i.regExp||(t=R.escapeRegExp(t));var e=i.caseSensitive?"gm":"gmi";try{new RegExp(t,"u"),i.$supportsUnicodeFlag=!0,e+="u"}catch(s){i.$supportsUnicodeFlag=!1}if(i.wholeWord&&(t=c(t,i)),i.$isMultiLine=!n&&/[\n\r]/.test(t),i.$isMultiLine)return i.re=this.$assembleMultilineRegExp(t,e);try{var o=new RegExp(t,e)}catch(s){o=!1}return i.re=o},r.prototype.$assembleMultilineRegExp=function(i,n){for(var t=i.replace(/\r\n|\r|\n/g,`$
- ^`).split(`
- `),e=[],o=0;o<t.length;o++)try{e.push(new RegExp(t[o],n))}catch(s){return!1}return e},r.prototype.$matchIterator=function(i,n){var t=this.$assembleRegExp(n);if(!t)return!1;var e=n.backwards==!0,o=n.skipCurrent!=!1,s=t.unicode,h=n.range,f=n.start;f||(f=h?h[e?"end":"start"]:i.selection.getRange()),f.start&&(f=f[o!=e?"end":"start"]);var L=h?h.start.row:0,w=h?h.end.row:i.getLength()-1;if(e)var d=function(g){var v=f.row;if(!m(v,f.column,g)){for(v--;v>=L;v--)if(m(v,Number.MAX_VALUE,g))return;if(n.wrap!=!1){for(v=w,L=f.row;v>=L;v--)if(m(v,Number.MAX_VALUE,g))return}}};else var d=function(v){var C=f.row;if(!m(C,f.column,v)){for(C=C+1;C<=w;C++)if(m(C,0,v))return;if(n.wrap!=!1){for(C=L,w=f.row;C<=w;C++)if(m(C,0,v))return}}};if(n.$isMultiLine)var a=t.length,m=function(g,v,C){var $=e?g-a+1:g;if(!($<0||$+a>i.getLength())){var b=i.getLine($),p=b.search(t[0]);if(!(!e&&p<v||p===-1)){for(var u=1;u<a;u++)if(b=i.getLine($+u),b.search(t[u])==-1)return;var y=b.match(t[a-1])[0].length;if(!(e&&y>v)&&C($,p,$+a-1,y))return!0}}};else if(e)var m=function(v,C,$){var b=i.getLine(v),p=[],u,y=0;for(t.lastIndex=0;u=t.exec(b);){var S=u[0].length;if(y=u.index,!S){if(y>=b.length)break;t.lastIndex=y+=R.skipEmptyMatch(b,y,s)}if(u.index+S>C)break;p.push(u.index,S)}for(var T=p.length-1;T>=0;T-=2){var E=p[T-1],S=p[T];if($(v,E,v,E+S))return!0}};else var m=function(v,C,$){var b=i.getLine(v),p,u;for(t.lastIndex=C;u=t.exec(b);){var y=u[0].length;if(p=u.index,$(v,p,v,p+y))return!0;if(!y&&(t.lastIndex=p+=R.skipEmptyMatch(b,p,s),p>=b.length))return!1}};return{forEach:d}},r}();function c(r,i){var n=R.supportsLookbehind();function t(h,f){f===void 0&&(f=!0);var L=n&&i.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return L.test(h)||i.regExp?n&&i.$supportsUnicodeFlag?f?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var e=Array.from(r),o=e[0],s=e[e.length-1];return t(o)+r+t(s,!1)}k.Search=l}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(M,k,B){var R=this&&this.__extends||function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var h in s)Object.prototype.hasOwnProperty.call(s,h)&&(o[h]=s[h])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function o(){this.constructor=t}t.prototype=e===null?Object.create(e):(o.prototype=e.prototype,new o)}}(),x=M("../lib/keys"),A=M("../lib/useragent"),l=x.KEY_MODS,c=function(){function n(t,e){this.$init(t,e,!1)}return n.prototype.$init=function(t,e,o){this.platform=e||(A.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(t),this.$singleCommand=o},n.prototype.addCommand=function(t){this.commands[t.name]&&this.removeCommand(t),this.commands[t.name]=t,t.bindKey&&this._buildKeyHash(t)},n.prototype.removeCommand=function(t,e){var o=t&&(typeof t=="string"?t:t.name);t=this.commands[o],e||delete this.commands[o];var s=this.commandKeyBinding;for(var h in s){var f=s[h];if(f==t)delete s[h];else if(Array.isArray(f)){var L=f.indexOf(t);L!=-1&&(f.splice(L,1),f.length==1&&(s[h]=f[0]))}}},n.prototype.bindKey=function(t,e,o){if(typeof t=="object"&&t&&(o==null&&(o=t.position),t=t[this.platform]),!!t){if(typeof e=="function")return this.addCommand({exec:e,bindKey:t,name:e.name||t});t.split("|").forEach(function(s){var h="";if(s.indexOf(" ")!=-1){var f=s.split(/\s+/);s=f.pop(),f.forEach(function(d){var a=this.parseKeys(d),m=l[a.hashId]+a.key;h+=(h?" ":"")+m,this._addCommandToBinding(h,"chainKeys")},this),h+=" "}var L=this.parseKeys(s),w=l[L.hashId]+L.key;this._addCommandToBinding(h+w,e,o)},this)}},n.prototype._addCommandToBinding=function(t,e,o){var s=this.commandKeyBinding,h;if(!e)delete s[t];else if(!s[t]||this.$singleCommand)s[t]=e;else{Array.isArray(s[t])?(h=s[t].indexOf(e))!=-1&&s[t].splice(h,1):s[t]=[s[t]],typeof o!="number"&&(o=r(e));var f=s[t];for(h=0;h<f.length;h++){var L=f[h],w=r(L);if(w>o)break}f.splice(h,0,e)}},n.prototype.addCommands=function(t){t&&Object.keys(t).forEach(function(e){var o=t[e];if(!!o){if(typeof o=="string")return this.bindKey(o,e);typeof o=="function"&&(o={exec:o}),typeof o=="object"&&(o.name||(o.name=e),this.addCommand(o))}},this)},n.prototype.removeCommands=function(t){Object.keys(t).forEach(function(e){this.removeCommand(t[e])},this)},n.prototype.bindKeys=function(t){Object.keys(t).forEach(function(e){this.bindKey(e,t[e])},this)},n.prototype._buildKeyHash=function(t){this.bindKey(t.bindKey,t)},n.prototype.parseKeys=function(t){var e=t.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(w){return w}),o=e.pop(),s=x[o];if(x.FUNCTION_KEYS[s])o=x.FUNCTION_KEYS[s].toLowerCase();else if(e.length){if(e.length==1&&e[0]=="shift")return{key:o.toUpperCase(),hashId:-1}}else return{key:o,hashId:-1};for(var h=0,f=e.length;f--;){var L=x.KEY_MODS[e[f]];if(L==null)return typeof console!="undefined"&&console.error("invalid modifier "+e[f]+" in "+t),!1;h|=L}return{key:o,hashId:h}},n.prototype.findKeyCommand=function(t,e){var o=l[t]+e;return this.commandKeyBinding[o]},n.prototype.handleKeyboard=function(t,e,o,s){if(!(s<0)){var h=l[e]+o,f=this.commandKeyBinding[h];return t.$keyChain&&(t.$keyChain+=" "+h,f=this.commandKeyBinding[t.$keyChain]||f),f&&(f=="chainKeys"||f[f.length-1]=="chainKeys")?(t.$keyChain=t.$keyChain||h,{command:"null"}):(t.$keyChain&&((!e||e==4)&&o.length==1?t.$keyChain=t.$keyChain.slice(0,-h.length-1):(e==-1||s>0)&&(t.$keyChain="")),{command:f})}},n.prototype.getStatusText=function(t,e){return e.$keyChain||""},n}();function r(n){return typeof n=="object"&&n.bindKey&&n.bindKey.position||(n.isDefault?-100:0)}var i=function(n){R(t,n);function t(e,o){var s=n.call(this,e,o)||this;return s.$singleCommand=!0,s}return t}(c);i.call=function(n,t,e){c.prototype.$init.call(n,t,e,!0)},c.call=function(n,t,e){c.prototype.$init.call(n,t,e,!1)},k.HashHandler=i,k.MultiHashHandler=c}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(M,k,B){var R=this&&this.__extends||function(){var r=function(i,n){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},r(i,n)};return function(i,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");r(i,n);function t(){this.constructor=i}i.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}}(),x=M("../lib/oop"),A=M("../keyboard/hash_handler").MultiHashHandler,l=M("../lib/event_emitter").EventEmitter,c=function(r){R(i,r);function i(n,t){var e=r.call(this,t,n)||this;return e.byName=e.commands,e.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)}),e}return i.prototype.exec=function(n,t,e){if(Array.isArray(n)){for(var o=n.length;o--;)if(this.exec(n[o],t,e))return!0;return!1}if(typeof n=="string"&&(n=this.commands[n]),!n||t&&t.$readOnly&&!n.readOnly||this.$checkCommandState!=!1&&n.isAvailable&&!n.isAvailable(t))return!1;var s={editor:t,command:n,args:e};return s.returnValue=this._emit("exec",s),this._signal("afterExec",s),s.returnValue!==!1},i.prototype.toggleRecording=function(n){if(!this.$inReplay)return n&&n._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)},i.prototype.replay=function(n){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(n);try{this.$inReplay=!0,this.macro.forEach(function(t){typeof t=="string"?this.exec(t,n):this.exec(t[0],n,t[1])},this)}finally{this.$inReplay=!1}}},i.prototype.trimMacro=function(n){return n.map(function(t){return typeof t[0]!="string"&&(t[0]=t[0].name),t[1]||(t=t[0]),t})},i}(A);x.implement(c.prototype,l),k.CommandManager=c}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(M,k,B){var R=M("../lib/lang"),x=M("../config"),A=M("../range").Range;function l(r,i){return{win:r,mac:i}}k.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:l("Ctrl-,","Command-,"),exec:function(r){x.loadModule("ace/ext/settings_menu",function(i){i.init(r),r.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:l("Alt-E","F4"),exec:function(r){x.loadModule("ace/ext/error_marker",function(i){i.showErrorMarker(r,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:l("Alt-Shift-E","Shift-F4"),exec:function(r){x.loadModule("ace/ext/error_marker",function(i){i.showErrorMarker(r,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:l("Ctrl-A","Command-A"),exec:function(r){r.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:l(null,"Ctrl-L"),exec:function(r){r.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:l("Ctrl-L","Command-L"),exec:function(r,i){typeof i=="number"&&!isNaN(i)&&r.gotoLine(i),r.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:l("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(r){r.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:l("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(r){r.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:l("F2","F2"),exec:function(r){r.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:l("Alt-F2","Alt-F2"),exec:function(r){r.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:l(null,"Ctrl-Command-Option-0"),exec:function(r){r.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:l(null,"Ctrl-Command-Option-0"),exec:function(r){r.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:l("Alt-0","Command-Option-0"),exec:function(r){r.session.foldAll(),r.session.unfold(r.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:l("Alt-Shift-0","Command-Option-Shift-0"),exec:function(r){r.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:l("Ctrl-K","Command-G"),exec:function(r){r.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:l("Ctrl-Shift-K","Command-Shift-G"),exec:function(r){r.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:l("Alt-K","Ctrl-G"),exec:function(r){r.selection.isEmpty()?r.selection.selectWord():r.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:l("Alt-Shift-K","Ctrl-Shift-G"),exec:function(r){r.selection.isEmpty()?r.selection.selectWord():r.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:l("Ctrl-F","Command-F"),exec:function(r){x.loadModule("ace/ext/searchbox",function(i){i.Search(r)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(r){r.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:l("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(r){r.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:l("Ctrl-Home","Command-Home|Command-Up"),exec:function(r){r.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:l("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(r){r.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:l("Up","Up|Ctrl-P"),exec:function(r,i){r.navigateUp(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:l("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(r){r.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:l("Ctrl-End","Command-End|Command-Down"),exec:function(r){r.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:l("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(r){r.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:l("Down","Down|Ctrl-N"),exec:function(r,i){r.navigateDown(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:l("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(r){r.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:l("Ctrl-Left","Option-Left"),exec:function(r){r.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:l("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(r){r.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:l("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(r){r.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:l("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(r){r.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:l("Left","Left|Ctrl-B"),exec:function(r,i){r.navigateLeft(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:l("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(r){r.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:l("Ctrl-Right","Option-Right"),exec:function(r){r.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:l("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(r){r.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:l("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(r){r.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:l("Shift-Right","Shift-Right"),exec:function(r){r.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:l("Right","Right|Ctrl-F"),exec:function(r,i){r.navigateRight(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(r){r.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:l(null,"Option-PageDown"),exec:function(r){r.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:l("PageDown","PageDown|Ctrl-V"),exec:function(r){r.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(r){r.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:l(null,"Option-PageUp"),exec:function(r){r.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(r){r.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:l("Ctrl-Up",null),exec:function(r){r.renderer.scrollBy(0,-2*r.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:l("Ctrl-Down",null),exec:function(r){r.renderer.scrollBy(0,2*r.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(r){r.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(r){r.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:l("Ctrl-Alt-E","Command-Option-E"),exec:function(r){r.commands.toggleRecording(r)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:l("Ctrl-Shift-E","Command-Shift-E"),exec:function(r){r.commands.replay(r)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:l("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(r){r.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:l("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(r){r.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:l("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(r){r.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:l(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(r){},readOnly:!0},{name:"cut",description:"Cut",exec:function(r){var i=r.$copyWithEmptySelection&&r.selection.isEmpty(),n=i?r.selection.getLineRange():r.selection.getRange();r._emit("cut",n),n.isEmpty()||r.session.remove(n),r.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(r,i){r.$handlePaste(i)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:l("Ctrl-D","Command-D"),exec:function(r){r.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:l("Ctrl-Shift-D","Command-Shift-D"),exec:function(r){r.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:l("Ctrl-Alt-S","Command-Alt-S"),exec:function(r){r.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:l("Ctrl-/","Command-/"),exec:function(r){r.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:l("Ctrl-Shift-/","Command-Shift-/"),exec:function(r){r.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:l("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(r){r.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:l("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(r){r.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:l("Ctrl-H","Command-Option-F"),exec:function(r){x.loadModule("ace/ext/searchbox",function(i){i.Search(r,!0)})}},{name:"undo",description:"Undo",bindKey:l("Ctrl-Z","Command-Z"),exec:function(r){r.undo()}},{name:"redo",description:"Redo",bindKey:l("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(r){r.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:l("Alt-Shift-Up","Command-Option-Up"),exec:function(r){r.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:l("Alt-Up","Option-Up"),exec:function(r){r.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:l("Alt-Shift-Down","Command-Option-Down"),exec:function(r){r.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:l("Alt-Down","Option-Down"),exec:function(r){r.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:l("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(r){r.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:l("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(r){r.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:l("Shift-Delete",null),exec:function(r){if(r.selection.isEmpty())r.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:l("Alt-Backspace","Command-Backspace"),exec:function(r){r.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:l("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(r){r.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:l("Ctrl-Shift-Backspace",null),exec:function(r){var i=r.selection.getRange();i.start.column=0,r.session.remove(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:l("Ctrl-Shift-Delete",null),exec:function(r){var i=r.selection.getRange();i.end.column=Number.MAX_VALUE,r.session.remove(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:l("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(r){r.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:l("Ctrl-Delete","Alt-Delete"),exec:function(r){r.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:l("Shift-Tab","Shift-Tab"),exec:function(r){r.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:l("Tab","Tab"),exec:function(r){r.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:l("Ctrl-[","Ctrl-["),exec:function(r){r.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:l("Ctrl-]","Ctrl-]"),exec:function(r){r.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(r,i){r.insert(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(r,i){r.insert(R.stringRepeat(i.text||"",i.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:l(null,"Ctrl-O"),exec:function(r){r.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:l("Alt-Shift-X","Ctrl-T"),exec:function(r){r.transposeLetters()},multiSelectAction:function(r){r.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:l("Ctrl-U","Ctrl-U"),exec:function(r){r.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:l("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(r){r.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:l(null,null),exec:function(r){r.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:l("Ctrl-Shift-L","Command-Shift-L"),exec:function(r){var i=r.selection.getRange();i.start.column=i.end.column=0,i.end.row++,r.selection.setRange(i,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:l("Ctrl+F3","F3"),exec:function(r){r.openLink()}},{name:"joinlines",description:"Join lines",bindKey:l(null,null),exec:function(r){for(var i=r.selection.isBackwards(),n=i?r.selection.getSelectionLead():r.selection.getSelectionAnchor(),t=i?r.selection.getSelectionAnchor():r.selection.getSelectionLead(),e=r.session.doc.getLine(n.row).length,o=r.session.doc.getTextRange(r.selection.getRange()),s=o.replace(/\n\s*/," ").length,h=r.session.doc.getLine(n.row),f=n.row+1;f<=t.row+1;f++){var L=R.stringTrimLeft(R.stringTrimRight(r.session.doc.getLine(f)));L.length!==0&&(L=" "+L),h+=L}t.row+1<r.session.doc.getLength()-1&&(h+=r.session.doc.getNewLineCharacter()),r.clearSelection(),r.session.doc.replace(new A(n.row,0,t.row+2,0),h),s>0?(r.selection.moveCursorTo(n.row,n.column),r.selection.selectTo(n.row,n.column+s)):(e=r.session.doc.getLine(n.row).length>e?e+1:e,r.selection.moveCursorTo(n.row,e))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:l(null,null),exec:function(r){var i=r.session.doc.getLength()-1,n=r.session.doc.getLine(i).length,t=r.selection.rangeList.ranges,e=[];t.length<1&&(t=[r.selection.getRange()]);for(var o=0;o<t.length;o++)o==t.length-1&&(t[o].end.row===i&&t[o].end.column===n||e.push(new A(t[o].end.row,t[o].end.column,i,n))),o===0?t[o].start.row===0&&t[o].start.column===0||e.push(new A(0,0,t[o].start.row,t[o].start.column)):e.push(new A(t[o-1].end.row,t[o-1].end.column,t[o].start.row,t[o].start.column));r.exitMultiSelectMode(),r.clearSelection();for(var o=0;o<e.length;o++)r.selection.addRange(e[o],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(r){r.selection.clearSelection(),r.navigateLineEnd(),r.insert(`
- `)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(r){r.selection.clearSelection();var i=r.getCursorPosition();r.selection.moveTo(i.row-1,Number.MAX_VALUE),r.insert(`
- `),i.row===0&&r.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(r){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),r.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:l("F1","F1"),exec:function(r){r.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:l(null,null),exec:function(r){r.prompt({$type:"modes"})},readOnly:!0}];for(var c=1;c<9;c++)k.commands.push({name:"foldToLevel"+c,description:"Fold To Level "+c,level:c,exec:function(r){r.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(M,k,B){var R=M("./lib/dom"),x=function(){function A(l){this.session=l,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 A.prototype.getRowLength=function(l){var c;return this.lineWidgets?c=this.lineWidgets[l]&&this.lineWidgets[l].rowCount||0:c=0,!this.$useWrapMode||!this.$wrapData[l]?1+c:this.$wrapData[l].length+1+c},A.prototype.$getWidgetScreenLength=function(){var l=0;return this.lineWidgets.forEach(function(c){c&&c.rowCount&&!c.hidden&&(l+=c.rowCount)}),l},A.prototype.$onChangeEditor=function(l){this.attach(l.editor)},A.prototype.attach=function(l){l&&l.widgetManager&&l.widgetManager!=this&&l.widgetManager.detach(),this.editor!=l&&(this.detach(),this.editor=l,l&&(l.widgetManager=this,l.renderer.on("beforeRender",this.measureWidgets),l.renderer.on("afterRender",this.renderWidgets)))},A.prototype.detach=function(l){var c=this.editor;if(!!c){this.editor=null,c.widgetManager=null,c.renderer.off("beforeRender",this.measureWidgets),c.renderer.off("afterRender",this.renderWidgets);var r=this.session.lineWidgets;r&&r.forEach(function(i){i&&i.el&&i.el.parentNode&&(i._inDocument=!1,i.el.parentNode.removeChild(i.el))})}},A.prototype.updateOnFold=function(l,c){var r=c.lineWidgets;if(!(!r||!l.action)){for(var i=l.data,n=i.start.row,t=i.end.row,e=l.action=="add",o=n+1;o<t;o++)r[o]&&(r[o].hidden=e);r[t]&&(e?r[n]?r[t].hidden=e:r[n]=r[t]:(r[n]==r[t]&&(r[n]=void 0),r[t].hidden=e))}},A.prototype.updateOnChange=function(l){var c=this.session.lineWidgets;if(!!c){var r=l.start.row,i=l.end.row-r;if(i!==0)if(l.action=="remove"){var n=c.splice(r+1,i);!c[r]&&n[n.length-1]&&(c[r]=n.pop()),n.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var t=new Array(i);c[r]&&c[r].column!=null&&l.start.column>c[r].column&&r++,t.unshift(r,0),c.splice.apply(c,t),this.$updateRows()}}},A.prototype.$updateRows=function(){var l=this.session.lineWidgets;if(!!l){var c=!0;l.forEach(function(r,i){if(r)for(c=!1,r.row=i;r.$oldWidget;)r.$oldWidget.row=i,r=r.$oldWidget}),c&&(this.session.lineWidgets=null)}},A.prototype.$registerLineWidget=function(l){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var c=this.session.lineWidgets[l.row];return c&&(l.$oldWidget=c,c.el&&c.el.parentNode&&(c.el.parentNode.removeChild(c.el),c._inDocument=!1)),this.session.lineWidgets[l.row]=l,l},A.prototype.addLineWidget=function(l){if(this.$registerLineWidget(l),l.session=this.session,!this.editor)return l;var c=this.editor.renderer;l.html&&!l.el&&(l.el=R.createElement("div"),l.el.innerHTML=l.html),l.text&&!l.el&&(l.el=R.createElement("div"),l.el.textContent=l.text),l.el&&(R.addCssClass(l.el,"ace_lineWidgetContainer"),l.className&&R.addCssClass(l.el,l.className),l.el.style.position="absolute",l.el.style.zIndex="5",c.container.appendChild(l.el),l._inDocument=!0,l.coverGutter||(l.el.style.zIndex="3"),l.pixelHeight==null&&(l.pixelHeight=l.el.offsetHeight)),l.rowCount==null&&(l.rowCount=l.pixelHeight/c.layerConfig.lineHeight);var r=this.session.getFoldAt(l.row,0);if(l.$fold=r,r){var i=this.session.lineWidgets;l.row==r.end.row&&!i[r.start.row]?i[r.start.row]=l:l.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:l.row}}}),this.$updateRows(),this.renderWidgets(null,c),this.onWidgetChanged(l),l},A.prototype.removeLineWidget=function(l){if(l._inDocument=!1,l.session=null,l.el&&l.el.parentNode&&l.el.parentNode.removeChild(l.el),l.editor&&l.editor.destroy)try{l.editor.destroy()}catch(r){}if(this.session.lineWidgets){var c=this.session.lineWidgets[l.row];if(c==l)this.session.lineWidgets[l.row]=l.$oldWidget,l.$oldWidget&&this.onWidgetChanged(l.$oldWidget);else for(;c;){if(c.$oldWidget==l){c.$oldWidget=l.$oldWidget;break}c=c.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:l.row}}}),this.$updateRows()},A.prototype.getWidgetsAtRow=function(l){for(var c=this.session.lineWidgets,r=c&&c[l],i=[];r;)i.push(r),r=r.$oldWidget;return i},A.prototype.onWidgetChanged=function(l){this.session._changedWidgets.push(l),this.editor&&this.editor.renderer.updateFull()},A.prototype.measureWidgets=function(l,c){var r=this.session._changedWidgets,i=c.layerConfig;if(!(!r||!r.length)){for(var n=1/0,t=0;t<r.length;t++){var e=r[t];if(!(!e||!e.el)&&e.session==this.session){if(!e._inDocument){if(this.session.lineWidgets[e.row]!=e)continue;e._inDocument=!0,c.container.appendChild(e.el)}e.h=e.el.offsetHeight,e.fixedWidth||(e.w=e.el.offsetWidth,e.screenWidth=Math.ceil(e.w/i.characterWidth));var o=e.h/i.lineHeight;e.coverLine&&(o-=this.session.getRowLineCount(e.row),o<0&&(o=0)),e.rowCount!=o&&(e.rowCount=o,e.row<n&&(n=e.row))}}n!=1/0&&(this.session._emit("changeFold",{data:{start:{row:n}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},A.prototype.renderWidgets=function(l,c){var r=c.layerConfig,i=this.session.lineWidgets;if(!!i){for(var n=Math.min(this.firstRow,r.firstRow),t=Math.max(this.lastRow,r.lastRow,i.length);n>0&&!i[n];)n--;this.firstRow=r.firstRow,this.lastRow=r.lastRow,c.$cursorLayer.config=r;for(var e=n;e<=t;e++){var o=i[e];if(!(!o||!o.el)){if(o.hidden){o.el.style.top=-100-(o.pixelHeight||0)+"px";continue}o._inDocument||(o._inDocument=!0,c.container.appendChild(o.el));var s=c.$cursorLayer.getPixelPosition({row:e,column:0},!0).top;o.coverLine||(s+=r.lineHeight*this.session.getRowLineCount(o.row)),o.el.style.top=s-r.offset+"px";var h=o.coverGutter?0:c.gutterWidth;o.fixedWidth||(h-=c.scrollLeft),o.el.style.left=h+"px",o.fullWidth&&o.screenWidth&&(o.el.style.minWidth=r.width+2*r.padding+"px"),o.fixedWidth?o.el.style.right=c.scrollBar.getWidth()+"px":o.el.style.right=""}}}},A}();k.LineWidgets=x}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(M,k,B){var R=M("../lib/keys"),x=M("../mouse/default_gutter_handler").GutterTooltip,A=function(){function c(r){this.editor=r,this.gutterLayer=r.renderer.$gutterLayer,this.element=r.renderer.$gutter,this.lines=r.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new x(this.editor)}return c.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},c.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},c.prototype.$onGutterKeyDown=function(r){if(this.annotationTooltip.isOpen){r.preventDefault(),r.keyCode===R.escape&&this.annotationTooltip.hideTooltip();return}if(r.target===this.element){if(r.keyCode!=R.enter)return;r.preventDefault();var i=this.editor.getCursorPosition().row;this.editor.isRowVisible(i)||this.editor.scrollToLine(i,!0,!0),setTimeout(function(){var n=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),t=this.$findNearestFoldWidget(n),e=this.$findNearestAnnotation(n);if(!(t===null&&e===null)){if(t===null&&e!==null){this.activeRowIndex=e,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(t!==null&&e===null){this.activeRowIndex=t,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(e-n)<Math.abs(t-n)){this.activeRowIndex=e,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}else{this.activeRowIndex=t,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}}}.bind(this),10);return}this.$handleGutterKeyboardInteraction(r),setTimeout(function(){this.editor._signal("gutterkeydown",new l(r,this))}.bind(this),10)},c.prototype.$handleGutterKeyboardInteraction=function(r){if(r.keyCode===R.tab){r.preventDefault();return}if(r.keyCode===R.escape){r.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(r.keyCode===R.up){switch(r.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(r.keyCode===R.down){switch(r.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(r.keyCode===R.left){r.preventDefault(),this.$switchLane("annotation");return}if(r.keyCode===R.right){r.preventDefault(),this.$switchLane("fold");return}if(r.keyCode===R.enter||r.keyCode===R.space){switch(r.preventDefault(),this.activeLane){case"fold":if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="start"){var i=this.$rowIndexToRow(this.activeRowIndex);this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),r),setTimeout(function(){this.$rowIndexToRow(this.activeRowIndex)!==i&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(i),this.$focusFoldWidget(this.activeRowIndex))}.bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var n=this.lines.cells[this.activeRowIndex].element.childNodes[2],t=n.getBoundingClientRect(),e=this.annotationTooltip.getElement().style;e.left=t.right+"px",e.top=t.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},c.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},c.prototype.$isFoldWidgetVisible=function(r){var i=this.editor.isRowFullyVisible(this.$rowIndexToRow(r)),n=this.$getFoldWidget(r).style.display!=="none";return i&&n},c.prototype.$isAnnotationVisible=function(r){var i=this.editor.isRowFullyVisible(this.$rowIndexToRow(r)),n=this.$getAnnotation(r).style.display!=="none";return i&&n},c.prototype.$getFoldWidget=function(r){var i=this.lines.get(r),n=i.element;return n.childNodes[1]},c.prototype.$getAnnotation=function(r){var i=this.lines.get(r),n=i.element;return n.childNodes[2]},c.prototype.$findNearestFoldWidget=function(r){if(this.$isFoldWidgetVisible(r))return r;for(var i=0;r-i>0||r+i<this.lines.getLength()-1;){if(i++,r-i>=0&&this.$isFoldWidgetVisible(r-i))return r-i;if(r+i<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(r+i))return r+i}return null},c.prototype.$findNearestAnnotation=function(r){if(this.$isAnnotationVisible(r))return r;for(var i=0;r-i>0||r+i<this.lines.getLength()-1;){if(i++,r-i>=0&&this.$isAnnotationVisible(r-i))return r-i;if(r+i<=this.lines.getLength()-1&&this.$isAnnotationVisible(r+i))return r+i}return null},c.prototype.$focusFoldWidget=function(r){if(r!=null){var i=this.$getFoldWidget(r);i.classList.add(this.editor.renderer.keyboardFocusClassName),i.focus()}},c.prototype.$focusAnnotation=function(r){if(r!=null){var i=this.$getAnnotation(r);i.classList.add(this.editor.renderer.keyboardFocusClassName),i.focus()}},c.prototype.$blurFoldWidget=function(r){var i=this.$getFoldWidget(r);i.classList.remove(this.editor.renderer.keyboardFocusClassName),i.blur()},c.prototype.$blurAnnotation=function(r){var i=this.$getAnnotation(r);i.classList.remove(this.editor.renderer.keyboardFocusClassName),i.blur()},c.prototype.$moveFoldWidgetUp=function(){for(var r=this.activeRowIndex;r>0;)if(r--,this.$isFoldWidgetVisible(r)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=r,this.$focusFoldWidget(this.activeRowIndex);return}},c.prototype.$moveFoldWidgetDown=function(){for(var r=this.activeRowIndex;r<this.lines.getLength()-1;)if(r++,this.$isFoldWidgetVisible(r)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=r,this.$focusFoldWidget(this.activeRowIndex);return}},c.prototype.$moveAnnotationUp=function(){for(var r=this.activeRowIndex;r>0;)if(r--,this.$isAnnotationVisible(r)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=r,this.$focusAnnotation(this.activeRowIndex);return}},c.prototype.$moveAnnotationDown=function(){for(var r=this.activeRowIndex;r<this.lines.getLength()-1;)if(r++,this.$isAnnotationVisible(r)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=r,this.$focusAnnotation(this.activeRowIndex);return}},c.prototype.$switchLane=function(r){switch(r){case"annotation":if(this.activeLane==="annotation")break;var i=this.$findNearestAnnotation(this.activeRowIndex);if(i==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=i,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var n=this.$findNearestFoldWidget(this.activeRowIndex);if(n==null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=n,this.$focusFoldWidget(this.activeRowIndex);break}},c.prototype.$rowIndexToRow=function(r){var i=this.lines.get(r);return i?i.row:null},c.prototype.$rowToRowIndex=function(r){for(var i=0;i<this.lines.getLength();i++){var n=this.lines.get(i);if(n.row==r)return i}return null},c}();k.GutterKeyboardHandler=A;var l=function(){function c(r,i){this.gutterKeyboardHandler=i,this.domEvent=r}return c.prototype.getKey=function(){return R.keyCodeToString(this.domEvent.keyCode)},c.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},c.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},c.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},c}();k.GutterKeyboardEvent=l}),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/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys"],function(M,k,B){var R=this&&this.__values||function(p){var u=typeof Symbol=="function"&&Symbol.iterator,y=u&&p[u],S=0;if(y)return y.call(p);if(p&&typeof p.length=="number")return{next:function(){return p&&S>=p.length&&(p=void 0),{value:p&&p[S++],done:!p}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")},x=M("./lib/oop"),A=M("./lib/dom"),l=M("./lib/lang"),c=M("./lib/useragent"),r=M("./keyboard/textinput").TextInput,i=M("./mouse/mouse_handler").MouseHandler,n=M("./mouse/fold_handler").FoldHandler,t=M("./keyboard/keybinding").KeyBinding,e=M("./edit_session").EditSession,o=M("./search").Search,s=M("./range").Range,h=M("./lib/event_emitter").EventEmitter,f=M("./commands/command_manager").CommandManager,L=M("./commands/default_commands").commands,w=M("./config"),d=M("./token_iterator").TokenIterator,a=M("./line_widgets").LineWidgets,m=M("./keyboard/gutter_handler").GutterKeyboardHandler,g=M("./config").nls,v=M("./clipboard"),C=M("./lib/keys"),$=function(){function p(u,y,S){this.session,this.$toDestroy=[];var T=u.getContainerElement();this.container=T,this.renderer=u,this.id="editor"+ ++p.$uid,this.commands=new f(c.isMac?"mac":"win",L),typeof document=="object"&&(this.textInput=new r(u.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new i(this),new n(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=l.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(E,_){_._$emitInputEvent.schedule(31)}),this.setSession(y||S&&S.session||new e("")),w.resetOptions(this),S&&this.setOptions(S),w._signal("editor",this)}return p.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=l.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)},p.prototype.startOperation=function(u){if(this.curOp){if(!u||this.curOp.command)return;this.prevOp=this.curOp}u||(this.previousCommand=null,u={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:u.command||{},args:u.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},p.prototype.endOperation=function(u){if(this.curOp&&this.session){if(u&&u.returnValue===!1||!this.session)return this.curOp=null;if(u==!0&&this.curOp.command&&this.curOp.command.name=="mouse"||(this._signal("beforeEndOperation"),!this.curOp))return;var y=this.curOp.command,S=y&&y.scrollIntoView;if(S){switch(S){case"center-animate":S="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var T=this.selection.getRange(),E=this.renderer.layerConfig;(T.start.row>=E.lastRow||T.end.row<=E.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}S=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}var _=this.selection.toJSON();this.curOp.selectionAfter=_,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(_),this.prevOp=this.curOp,this.curOp=null}},p.prototype.$historyTracker=function(u){if(!!this.$mergeUndoDeltas){var y=this.prevOp,S=this.$mergeableCommands,T=y.command&&u.command.name==y.command.name;if(u.command.name=="insertstring"){var E=u.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),T=T&&this.mergeNextCommand&&(!/\s/.test(E)||/\s/.test(y.args)),this.mergeNextCommand=!0}else T=T&&S.indexOf(u.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(T=!1),T?this.session.mergeUndoDeltas=!0:S.indexOf(u.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},p.prototype.setKeyboardHandler=function(u,y){if(u&&typeof u=="string"&&u!="ace"){this.$keybindingId=u;var S=this;w.loadModule(["keybinding",u],function(T){S.$keybindingId==u&&S.keyBinding.setKeyboardHandler(T&&T.handler),y&&y()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(u),y&&y()},p.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},p.prototype.setSession=function(u){if(this.session!=u){this.curOp&&this.endOperation(),this.curOp={};var y=this.session;if(y){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 S=this.session.getSelection();S.off("changeCursor",this.$onCursorChange),S.off("changeSelection",this.$onSelectionChange)}this.session=u,u?(this.$onDocumentChange=this.onDocumentChange.bind(this),u.on("change",this.$onDocumentChange),this.renderer.setSession(u),this.$onChangeMode=this.onChangeMode.bind(this),u.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),u.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),u.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),u.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),u.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),u.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=u.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(u)),this._signal("changeSession",{session:u,oldSession:y}),this.curOp=null,y&&y._signal("changeEditor",{oldEditor:this}),u&&u._signal("changeEditor",{editor:this}),u&&!u.destroyed&&u.bgTokenizer.scheduleStart()}},p.prototype.getSession=function(){return this.session},p.prototype.setValue=function(u,y){return this.session.doc.setValue(u),y?y==1?this.navigateFileEnd():y==-1&&this.navigateFileStart():this.selectAll(),u},p.prototype.getValue=function(){return this.session.getValue()},p.prototype.getSelection=function(){return this.selection},p.prototype.resize=function(u){this.renderer.onResize(u)},p.prototype.setTheme=function(u,y){this.renderer.setTheme(u,y)},p.prototype.getTheme=function(){return this.renderer.getTheme()},p.prototype.setStyle=function(u){this.renderer.setStyle(u)},p.prototype.unsetStyle=function(u){this.renderer.unsetStyle(u)},p.prototype.getFontSize=function(){return this.getOption("fontSize")||A.computedStyle(this.container).fontSize},p.prototype.setFontSize=function(u){this.setOption("fontSize",u)},p.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var u=this;this.$highlightPending=!0,setTimeout(function(){u.$highlightPending=!1;var y=u.session;if(!(!y||y.destroyed)){y.$bracketHighlight&&(y.$bracketHighlight.markerIds.forEach(function(F){y.removeMarker(F)}),y.$bracketHighlight=null);var S=u.getCursorPosition(),T=u.getKeyboardHandler(),E=T&&T.$getDirectionForHighlight&&T.$getDirectionForHighlight(u),_=y.getMatchingBracketRanges(S,E);if(!_){var I=new d(y,S.row,S.column),D=I.getCurrentToken();if(D&&/\b(?:tag-open|tag-name)/.test(D.type)){var H=y.getMatchingTags(S);H&&(_=[H.openTagName,H.closeTagName])}}if(!_&&y.$mode.getMatching&&(_=y.$mode.getMatching(u.session)),!_){u.getHighlightIndentGuides()&&u.renderer.$textLayer.$highlightIndentGuide();return}var O="ace_bracket";Array.isArray(_)?_.length==1&&(O="ace_error_bracket"):_=[_],_.length==2&&(s.comparePoints(_[0].end,_[1].start)==0?_=[s.fromPoints(_[0].start,_[1].end)]:s.comparePoints(_[0].start,_[1].end)==0&&(_=[s.fromPoints(_[1].start,_[0].end)])),y.$bracketHighlight={ranges:_,markerIds:_.map(function(F){return y.addMarker(F,O,"text")})},u.getHighlightIndentGuides()&&u.renderer.$textLayer.$highlightIndentGuide()}},50)}},p.prototype.focus=function(){this.textInput.focus()},p.prototype.isFocused=function(){return this.textInput.isFocused()},p.prototype.blur=function(){this.textInput.blur()},p.prototype.onFocus=function(u){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",u))},p.prototype.onBlur=function(u){!this.$isFocused||(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",u))},p.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},p.prototype.onDocumentChange=function(u){var y=this.session.$useWrapMode,S=u.start.row==u.end.row?u.end.row:1/0;this.renderer.updateLines(u.start.row,S,y),this._signal("change",u),this.$cursorChange()},p.prototype.onTokenizerUpdate=function(u){var y=u.data;this.renderer.updateLines(y.first,y.last)},p.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},p.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},p.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},p.prototype.$updateHighlightActiveLine=function(){var u=this.getSession(),y;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(y=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(y=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(y=!1)),u.$highlightLineMarker&&!y)u.removeMarker(u.$highlightLineMarker.id),u.$highlightLineMarker=null;else if(!u.$highlightLineMarker&&y){var S=new s(y.row,y.column,y.row,1/0);S.id=u.addMarker(S,"ace_active-line","screenLine"),u.$highlightLineMarker=S}else y&&(u.$highlightLineMarker.start.row=y.row,u.$highlightLineMarker.end.row=y.row,u.$highlightLineMarker.start.column=y.column,u._signal("changeBackMarker"))},p.prototype.onSelectionChange=function(u){var y=this.session;if(y.$selectionMarker&&y.removeMarker(y.$selectionMarker),y.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var S=this.selection.getRange(),T=this.getSelectionStyle();y.$selectionMarker=y.addMarker(S,"ace_selection",T)}var E=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(E),this._signal("changeSelection")},p.prototype.$getSelectionHighLightRegexp=function(){var u=this.session,y=this.getSelectionRange();if(!(y.isEmpty()||y.isMultiLine())){var S=y.start.column,T=y.end.column,E=u.getLine(y.start.row),_=E.substring(S,T);if(!(_.length>5e3||!/[\w\d]/.test(_))){var I=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:_}),D=E.substring(S-1,T+1);if(!!I.test(D))return I}}},p.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},p.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},p.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},p.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},p.prototype.onChangeMode=function(u){this.renderer.updateText(),this._emit("changeMode",u)},p.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},p.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},p.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},p.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},p.prototype.getCopyText=function(){var u=this.getSelectedText(),y=this.session.doc.getNewLineCharacter(),S=!1;if(!u&&this.$copyWithEmptySelection){S=!0;for(var T=this.selection.getAllRanges(),E=0;E<T.length;E++){var _=T[E];E&&T[E-1].start.row==_.start.row||(u+=this.session.getLine(_.start.row)+y)}}var I={text:u};return this._signal("copy",I),v.lineMode=S?I.text:!1,I.text},p.prototype.onCopy=function(){this.commands.exec("copy",this)},p.prototype.onCut=function(){this.commands.exec("cut",this)},p.prototype.onPaste=function(u,y){var S={text:u,event:y};this.commands.exec("paste",this,S)},p.prototype.$handlePaste=function(u){typeof u=="string"&&(u={text:u}),this._signal("paste",u);var y=u.text,S=y===v.lineMode,T=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)S?T.insert({row:this.selection.lead.row,column:0},y):this.insert(y);else if(S)this.selection.rangeList.ranges.forEach(function(O){T.insert({row:O.start.row,column:0},y)});else{var E=y.split(/\r\n|\r|\n/),_=this.selection.rangeList.ranges,I=E.length==2&&(!E[0]||!E[1]);if(E.length!=_.length||I)return this.commands.exec("insertstring",this,y);for(var D=_.length;D--;){var H=_[D];H.isEmpty()||T.remove(H),T.insert(H.start,E[D])}}},p.prototype.execCommand=function(u,y){return this.commands.exec(u,this,y)},p.prototype.insert=function(u,y){var S=this.session,T=S.getMode(),E=this.getCursorPosition();if(this.getBehavioursEnabled()&&!y){var _=T.transformAction(S.getState(E.row),"insertion",this,S,u);_&&(u!==_.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),u=_.text)}if(u==" "&&(u=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&u.indexOf(`
- `)==-1){var I=s.fromPoints(E,E);I.end.column+=u.length,this.session.remove(I)}}else{var I=this.getSelectionRange();E=this.session.remove(I),this.clearSelection()}if(u==`
- `||u==`\r
- `){var F=S.getLine(E.row);if(E.column>F.search(/\S|$/)){var D=F.substr(E.column).search(/\S|$/);S.doc.removeInLine(E.row,E.column,E.column+D)}}this.clearSelection();var H=E.column,O=S.getState(E.row),F=S.getLine(E.row),W=T.checkOutdent(O,F,u);if(S.insert(E,u),_&&_.selection&&(_.selection.length==2?this.selection.setSelectionRange(new s(E.row,H+_.selection[0],E.row,H+_.selection[1])):this.selection.setSelectionRange(new s(E.row+_.selection[0],_.selection[1],E.row+_.selection[2],_.selection[3]))),this.$enableAutoIndent){if(S.getDocument().isNewLine(u)){var N=T.getNextLineIndent(O,F.slice(0,E.column),S.getTabString());S.insert({row:E.row+1,column:0},N)}W&&T.autoOutdent(O,S,E.row)}},p.prototype.autoIndent=function(){var u=this.session,y=u.getMode(),S,T;if(this.selection.isEmpty())S=0,T=u.doc.getLength()-1;else{var E=this.getSelectionRange();S=E.start.row,T=E.end.row}for(var _="",I="",D="",H,O,F,W=u.getTabString(),N=S;N<=T;N++)N>0&&(_=u.getState(N-1),I=u.getLine(N-1),D=y.getNextLineIndent(_,I,W)),H=u.getLine(N),O=y.$getIndent(H),D!==O&&(O.length>0&&(F=new s(N,0,N,O.length),u.remove(F)),D.length>0&&u.insert({row:N,column:0},D)),y.autoOutdent(_,u,N)},p.prototype.onTextInput=function(u,y){if(!y)return this.keyBinding.onTextInput(u);this.startOperation({command:{name:"insertstring"}});var S=this.applyComposition.bind(this,u,y);this.selection.rangeCount?this.forEachSelection(S):S(),this.endOperation()},p.prototype.applyComposition=function(u,y){if(y.extendLeft||y.extendRight){var S=this.selection.getRange();S.start.column-=y.extendLeft,S.end.column+=y.extendRight,S.start.column<0&&(S.start.row--,S.start.column+=this.session.getLine(S.start.row).length+1),this.selection.setRange(S),!u&&!S.isEmpty()&&this.remove()}if((u||!this.selection.isEmpty())&&this.insert(u,!0),y.restoreStart||y.restoreEnd){var S=this.selection.getRange();S.start.column-=y.restoreStart,S.end.column-=y.restoreEnd,this.selection.setRange(S)}},p.prototype.onCommandKey=function(u,y,S){return this.keyBinding.onCommandKey(u,y,S)},p.prototype.setOverwrite=function(u){this.session.setOverwrite(u)},p.prototype.getOverwrite=function(){return this.session.getOverwrite()},p.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},p.prototype.setScrollSpeed=function(u){this.setOption("scrollSpeed",u)},p.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},p.prototype.setDragDelay=function(u){this.setOption("dragDelay",u)},p.prototype.getDragDelay=function(){return this.getOption("dragDelay")},p.prototype.setSelectionStyle=function(u){this.setOption("selectionStyle",u)},p.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},p.prototype.setHighlightActiveLine=function(u){this.setOption("highlightActiveLine",u)},p.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},p.prototype.setHighlightGutterLine=function(u){this.setOption("highlightGutterLine",u)},p.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},p.prototype.setHighlightSelectedWord=function(u){this.setOption("highlightSelectedWord",u)},p.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},p.prototype.setAnimatedScroll=function(u){this.renderer.setAnimatedScroll(u)},p.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},p.prototype.setShowInvisibles=function(u){this.renderer.setShowInvisibles(u)},p.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},p.prototype.setDisplayIndentGuides=function(u){this.renderer.setDisplayIndentGuides(u)},p.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},p.prototype.setHighlightIndentGuides=function(u){this.renderer.setHighlightIndentGuides(u)},p.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},p.prototype.setShowPrintMargin=function(u){this.renderer.setShowPrintMargin(u)},p.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},p.prototype.setPrintMarginColumn=function(u){this.renderer.setPrintMarginColumn(u)},p.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},p.prototype.setReadOnly=function(u){this.setOption("readOnly",u)},p.prototype.getReadOnly=function(){return this.getOption("readOnly")},p.prototype.setBehavioursEnabled=function(u){this.setOption("behavioursEnabled",u)},p.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},p.prototype.setWrapBehavioursEnabled=function(u){this.setOption("wrapBehavioursEnabled",u)},p.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},p.prototype.setShowFoldWidgets=function(u){this.setOption("showFoldWidgets",u)},p.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},p.prototype.setFadeFoldWidgets=function(u){this.setOption("fadeFoldWidgets",u)},p.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},p.prototype.remove=function(u){this.selection.isEmpty()&&(u=="left"?this.selection.selectLeft():this.selection.selectRight());var y=this.getSelectionRange();if(this.getBehavioursEnabled()){var S=this.session,T=S.getState(y.start.row),E=S.getMode().transformAction(T,"deletion",this,S,y);if(y.end.column===0){var _=S.getTextRange(y);if(_[_.length-1]==`
- `){var I=S.getLine(y.end.row);/^\s+$/.test(I)&&(y.end.column=I.length)}}E&&(y=E)}this.session.remove(y),this.clearSelection()},p.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},p.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},p.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},p.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var u=this.getSelectionRange();u.start.column==u.end.column&&u.start.row==u.end.row&&(u.end.column=0,u.end.row++),this.session.remove(u),this.clearSelection()},p.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var u=this.getCursorPosition();this.insert(`
- `),this.moveCursorToPosition(u)},p.prototype.setGhostText=function(u,y){this.session.widgetManager||(this.session.widgetManager=new a(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(u,y)},p.prototype.removeGhostText=function(){!this.session.widgetManager||this.renderer.removeGhostText()},p.prototype.transposeLetters=function(){if(!!this.selection.isEmpty()){var u=this.getCursorPosition(),y=u.column;if(y!==0){var S=this.session.getLine(u.row),T,E;y<S.length?(T=S.charAt(y)+S.charAt(y-1),E=new s(u.row,y-1,u.row,y+1)):(T=S.charAt(y-1)+S.charAt(y-2),E=new s(u.row,y-2,u.row,y)),this.session.replace(E,T),this.session.selection.moveToPosition(E.end)}}},p.prototype.toLowerCase=function(){var u=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var y=this.getSelectionRange(),S=this.session.getTextRange(y);this.session.replace(y,S.toLowerCase()),this.selection.setSelectionRange(u)},p.prototype.toUpperCase=function(){var u=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var y=this.getSelectionRange(),S=this.session.getTextRange(y);this.session.replace(y,S.toUpperCase()),this.selection.setSelectionRange(u)},p.prototype.indent=function(){var u=this.session,y=this.getSelectionRange();if(y.start.row<y.end.row){var S=this.$getSelectedRows();u.indentRows(S.first,S.last," ");return}else if(y.start.column<y.end.column){var T=u.getTextRange(y);if(!/^\s+$/.test(T)){var S=this.$getSelectedRows();u.indentRows(S.first,S.last," ");return}}var E=u.getLine(y.start.row),_=y.start,I=u.getTabSize(),D=u.documentToScreenColumn(_.row,_.column);if(this.session.getUseSoftTabs())var H=I-D%I,O=l.stringRepeat(" ",H);else{for(var H=D%I;E[y.start.column-1]==" "&&H;)y.start.column--,H--;this.selection.setSelectionRange(y),O=" "}return this.insert(O)},p.prototype.blockIndent=function(){var u=this.$getSelectedRows();this.session.indentRows(u.first,u.last," ")},p.prototype.blockOutdent=function(){var u=this.session.getSelection();this.session.outdentRows(u.getRange())},p.prototype.sortLines=function(){for(var u=this.$getSelectedRows(),y=this.session,S=[],T=u.first;T<=u.last;T++)S.push(y.getLine(T));S.sort(function(I,D){return I.toLowerCase()<D.toLowerCase()?-1:I.toLowerCase()>D.toLowerCase()?1:0});for(var E=new s(0,0,0,0),T=u.first;T<=u.last;T++){var _=y.getLine(T);E.start.row=T,E.end.row=T,E.end.column=_.length,y.replace(E,S[T-u.first])}},p.prototype.toggleCommentLines=function(){var u=this.session.getState(this.getCursorPosition().row),y=this.$getSelectedRows();this.session.getMode().toggleCommentLines(u,this.session,y.first,y.last)},p.prototype.toggleBlockComment=function(){var u=this.getCursorPosition(),y=this.session.getState(u.row),S=this.getSelectionRange();this.session.getMode().toggleBlockComment(y,this.session,S,u)},p.prototype.getNumberAt=function(u,y){var S=/[\-]?[0-9]+(?:\.[0-9]+)?/g;S.lastIndex=0;for(var T=this.session.getLine(u);S.lastIndex<y;){var E=S.exec(T);if(E.index<=y&&E.index+E[0].length>=y){var _={value:E[0],start:E.index,end:E.index+E[0].length};return _}}return null},p.prototype.modifyNumber=function(u){var y=this.selection.getCursor().row,S=this.selection.getCursor().column,T=new s(y,S-1,y,S),E=this.session.getTextRange(T);if(!isNaN(parseFloat(E))&&isFinite(E)){var _=this.getNumberAt(y,S);if(_){var I=_.value.indexOf(".")>=0?_.start+_.value.indexOf(".")+1:_.end,D=_.start+_.value.length-I,H=parseFloat(_.value);H*=Math.pow(10,D),I!==_.end&&S<I?u*=Math.pow(10,_.end-S-1):u*=Math.pow(10,_.end-S),H+=u,H/=Math.pow(10,D);var O=H.toFixed(D),F=new s(y,_.start,y,_.end);this.session.replace(F,O),this.moveCursorTo(y,Math.max(_.start+1,S+O.length-_.value.length))}}else this.toggleWord()},p.prototype.toggleWord=function(){var u=this.selection.getCursor().row,y=this.selection.getCursor().column;this.selection.selectWord();var S=this.getSelectedText(),T=this.selection.getWordRange().start.column,E=S.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),_=y-T-1;_<0&&(_=0);var I=0,D=0,H=this;S.match(/[A-Za-z0-9_]+/)&&E.forEach(function(X,Z){D=I+X.length,_>=I&&_<=D&&(S=X,H.selection.clearSelection(),H.moveCursorTo(u,I+T),H.selection.selectTo(u,D+T)),I=D});for(var O=this.$toggleWordPairs,F,W=0;W<O.length;W++)for(var N=O[W],P=0;P<=1;P++){var V=+!P,U=S.match(new RegExp("^\\s?_?("+l.escapeRegExp(N[P])+")\\s?$","i"));if(U){var G=S.match(new RegExp("([_]|^|\\s)("+l.escapeRegExp(U[1])+")($|\\s)","g"));G&&(F=S.replace(new RegExp(l.escapeRegExp(N[P]),"i"),function(X){var Z=N[V];return X.toUpperCase()==X?Z=Z.toUpperCase():X.charAt(0).toUpperCase()==X.charAt(0)&&(Z=Z.substr(0,0)+N[V].charAt(0).toUpperCase()+Z.substr(1)),Z}),this.insert(F),F="")}}},p.prototype.findLinkAt=function(u,y){var S,T,E=this.session.getLine(u),_=E.split(/((?:https?|ftp):\/\/[\S]+)/),I=y;I<0&&(I=0);var D=0,H=0,O;try{for(var F=R(_),W=F.next();!W.done;W=F.next()){var N=W.value;if(H=D+N.length,I>=D&&I<=H&&N.match(/((?:https?|ftp):\/\/[\S]+)/)){O=N.replace(/[\s:.,'";}\]]+$/,"");break}D=H}}catch(P){S={error:P}}finally{try{W&&!W.done&&(T=F.return)&&T.call(F)}finally{if(S)throw S.error}}return O},p.prototype.openLink=function(){var u=this.selection.getCursor(),y=this.findLinkAt(u.row,u.column);return y&&window.open(y,"_blank"),y!=null},p.prototype.removeLines=function(){var u=this.$getSelectedRows();this.session.removeFullLines(u.first,u.last),this.clearSelection()},p.prototype.duplicateSelection=function(){var u=this.selection,y=this.session,S=u.getRange(),T=u.isBackwards();if(S.isEmpty()){var E=S.start.row;y.duplicateLines(E,E)}else{var _=T?S.start:S.end,I=y.insert(_,y.getTextRange(S));S.start=_,S.end=I,u.setSelectionRange(S,T)}},p.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},p.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},p.prototype.moveText=function(u,y,S){return this.session.moveText(u,y,S)},p.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},p.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},p.prototype.$moveLines=function(u,y){var S,T,E=this.selection;if(!E.inMultiSelectMode||this.inVirtualSelectionMode){var _=E.toOrientedRange();S=this.$getSelectedRows(_),T=this.session.$moveLines(S.first,S.last,y?0:u),y&&u==-1&&(T=0),_.moveBy(T,0),E.fromOrientedRange(_)}else{var I=E.rangeList.ranges;E.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var D=0,H=0,O=I.length,F=0;F<O;F++){var W=F;I[F].moveBy(D,0),S=this.$getSelectedRows(I[F]);for(var N=S.first,P=S.last;++F<O;){H&&I[F].moveBy(H,0);var V=this.$getSelectedRows(I[F]);if(y&&V.first!=P)break;if(!y&&V.first>P+1)break;P=V.last}for(F--,D=this.session.$moveLines(N,P,y?0:u),y&&u==-1&&(W=F+1);W<=F;)I[W].moveBy(D,0),W++;y||(D=0),H+=D}E.fromOrientedRange(E.ranges[0]),E.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},p.prototype.$getSelectedRows=function(u){return u=(u||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(u.start.row),last:this.session.getRowFoldEnd(u.end.row)}},p.prototype.onCompositionStart=function(u){this.renderer.showComposition(u)},p.prototype.onCompositionUpdate=function(u){this.renderer.setCompositionText(u)},p.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},p.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},p.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},p.prototype.isRowVisible=function(u){return u>=this.getFirstVisibleRow()&&u<=this.getLastVisibleRow()},p.prototype.isRowFullyVisible=function(u){return u>=this.renderer.getFirstFullyVisibleRow()&&u<=this.renderer.getLastFullyVisibleRow()},p.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},p.prototype.$moveByPage=function(u,y){var S=this.renderer,T=this.renderer.layerConfig,E=u*Math.floor(T.height/T.lineHeight);y===!0?this.selection.$moveSelection(function(){this.moveCursorBy(E,0)}):y===!1&&(this.selection.moveCursorBy(E,0),this.selection.clearSelection());var _=S.scrollTop;S.scrollBy(0,E*T.lineHeight),y!=null&&S.scrollCursorIntoView(null,.5),S.animateScrolling(_)},p.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},p.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},p.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},p.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},p.prototype.scrollPageDown=function(){this.$moveByPage(1)},p.prototype.scrollPageUp=function(){this.$moveByPage(-1)},p.prototype.scrollToRow=function(u){this.renderer.scrollToRow(u)},p.prototype.scrollToLine=function(u,y,S,T){this.renderer.scrollToLine(u,y,S,T)},p.prototype.centerSelection=function(){var u=this.getSelectionRange(),y={row:Math.floor(u.start.row+(u.end.row-u.start.row)/2),column:Math.floor(u.start.column+(u.end.column-u.start.column)/2)};this.renderer.alignCursor(y,.5)},p.prototype.getCursorPosition=function(){return this.selection.getCursor()},p.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},p.prototype.getSelectionRange=function(){return this.selection.getRange()},p.prototype.selectAll=function(){this.selection.selectAll()},p.prototype.clearSelection=function(){this.selection.clearSelection()},p.prototype.moveCursorTo=function(u,y){this.selection.moveCursorTo(u,y)},p.prototype.moveCursorToPosition=function(u){this.selection.moveCursorToPosition(u)},p.prototype.jumpToMatching=function(u,y){var S=this.getCursorPosition(),T=new d(this.session,S.row,S.column),E=T.getCurrentToken(),_=0;E&&E.type.indexOf("tag-name")!==-1&&(E=T.stepBackward());var I=E||T.stepForward();if(!!I){var D,H=!1,O={},F=S.column-I.start,W,N={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(I.value.match(/[{}()\[\]]/g)){for(;F<I.value.length&&!H;F++)if(!!N[I.value[F]])switch(W=N[I.value[F]]+"."+I.type.replace("rparen","lparen"),isNaN(O[W])&&(O[W]=0),I.value[F]){case"(":case"[":case"{":O[W]++;break;case")":case"]":case"}":O[W]--,O[W]===-1&&(D="bracket",H=!0);break}}else I.type.indexOf("tag-name")!==-1&&(isNaN(O[I.value])&&(O[I.value]=0),E.value==="<"&&_>1?O[I.value]++:E.value==="</"&&O[I.value]--,O[I.value]===-1&&(D="tag",H=!0));H||(E=I,_++,I=T.stepForward(),F=0)}while(I&&!H);if(!!D){var P,V;if(D==="bracket")P=this.session.getBracketRange(S),P||(P=new s(T.getCurrentTokenRow(),T.getCurrentTokenColumn()+F-1,T.getCurrentTokenRow(),T.getCurrentTokenColumn()+F-1),V=P.start,(y||V.row===S.row&&Math.abs(V.column-S.column)<2)&&(P=this.session.getBracketRange(V)));else if(D==="tag"){if(!I||I.type.indexOf("tag-name")===-1)return;if(P=new s(T.getCurrentTokenRow(),T.getCurrentTokenColumn()-2,T.getCurrentTokenRow(),T.getCurrentTokenColumn()-2),P.compare(S.row,S.column)===0){var U=this.session.getMatchingTags(S);U&&(U.openTag.contains(S.row,S.column)?(P=U.closeTag,V=P.start):(P=U.openTag,U.closeTag.start.row===S.row&&U.closeTag.start.column===S.column?V=P.end:V=P.start))}V=V||P.start}V=P&&P.cursor||V,V&&(u?P&&y?this.selection.setRange(P):P&&P.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(V.row,V.column):this.selection.moveTo(V.row,V.column))}}},p.prototype.gotoLine=function(u,y,S){this.selection.clearSelection(),this.session.unfold({row:u-1,column:y||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(u-1,y||0),this.isRowFullyVisible(u-1)||this.scrollToLine(u-1,!0,S)},p.prototype.navigateTo=function(u,y){this.selection.moveTo(u,y)},p.prototype.navigateUp=function(u){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var y=this.selection.anchor.getPosition();return this.moveCursorToPosition(y)}this.selection.clearSelection(),this.selection.moveCursorBy(-u||-1,0)},p.prototype.navigateDown=function(u){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var y=this.selection.anchor.getPosition();return this.moveCursorToPosition(y)}this.selection.clearSelection(),this.selection.moveCursorBy(u||1,0)},p.prototype.navigateLeft=function(u){if(this.selection.isEmpty())for(u=u||1;u--;)this.selection.moveCursorLeft();else{var y=this.getSelectionRange().start;this.moveCursorToPosition(y)}this.clearSelection()},p.prototype.navigateRight=function(u){if(this.selection.isEmpty())for(u=u||1;u--;)this.selection.moveCursorRight();else{var y=this.getSelectionRange().end;this.moveCursorToPosition(y)}this.clearSelection()},p.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},p.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},p.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},p.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},p.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},p.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},p.prototype.replace=function(u,y){y&&this.$search.set(y);var S=this.$search.find(this.session),T=0;return S&&(this.$tryReplace(S,u)&&(T=1),this.selection.setSelectionRange(S),this.renderer.scrollSelectionIntoView(S.start,S.end)),T},p.prototype.replaceAll=function(u,y){y&&this.$search.set(y);var S=this.$search.findAll(this.session),T=0;if(!S.length)return T;var E=this.getSelectionRange();this.selection.moveTo(0,0);for(var _=S.length-1;_>=0;--_)this.$tryReplace(S[_],u)&&T++;return this.selection.setSelectionRange(E),T},p.prototype.$tryReplace=function(u,y){var S=this.session.getTextRange(u);return y=this.$search.replace(S,y),y!==null?(u.end=this.session.replace(u,y),u):null},p.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},p.prototype.find=function(u,y,S){y||(y={}),typeof u=="string"||u instanceof RegExp?y.needle=u:typeof u=="object"&&x.mixin(y,u);var T=this.selection.getRange();y.needle==null&&(u=this.session.getTextRange(T)||this.$search.$options.needle,u||(T=this.session.getWordRange(T.start.row,T.start.column),u=this.session.getTextRange(T)),this.$search.set({needle:u})),this.$search.set(y),y.start||this.$search.set({start:T});var E=this.$search.find(this.session);if(y.preventScroll)return E;if(E)return this.revealRange(E,S),E;y.backwards?T.start=T.end:T.end=T.start,this.selection.setRange(T)},p.prototype.findNext=function(u,y){this.find({skipCurrent:!0,backwards:!1},u,y)},p.prototype.findPrevious=function(u,y){this.find(u,{skipCurrent:!0,backwards:!0},y)},p.prototype.revealRange=function(u,y){this.session.unfold(u),this.selection.setSelectionRange(u);var S=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(u.start,u.end,.5),y!==!1&&this.renderer.animateScrolling(S)},p.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},p.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},p.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(u){u.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()},p.prototype.setAutoScrollEditorIntoView=function(u){if(!!u){var y,S=this,T=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var E=this.$scrollAnchor;E.style.cssText="position:absolute",this.container.insertBefore(E,this.container.firstChild);var _=this.on("changeSelection",function(){T=!0}),I=this.renderer.on("beforeRender",function(){T&&(y=S.renderer.container.getBoundingClientRect())}),D=this.renderer.on("afterRender",function(){if(T&&y&&(S.isFocused()||S.searchBox&&S.searchBox.isFocused())){var H=S.renderer,O=H.$cursorLayer.$pixelPos,F=H.layerConfig,W=O.top-F.offset;O.top>=0&&W+y.top<0?T=!0:O.top<F.height&&O.top+y.top+F.lineHeight>window.innerHeight?T=!1:T=null,T!=null&&(E.style.top=W+"px",E.style.left=O.left+"px",E.style.height=F.lineHeight+"px",E.scrollIntoView(T)),T=y=null}});this.setAutoScrollEditorIntoView=function(H){H||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",_),this.renderer.off("afterRender",D),this.renderer.off("beforeRender",I))}}},p.prototype.$resetCursorStyle=function(){var u=this.$cursorStyle||"ace",y=this.renderer.$cursorLayer;!y||(y.setSmoothBlinking(/smooth/.test(u)),y.isBlinking=!this.$readOnly&&u!="wide",A.setCssClass(y.element,"ace_slim-cursors",/slim/.test(u)))},p.prototype.prompt=function(u,y,S){var T=this;w.loadModule("ace/ext/prompt",function(E){E.prompt(T,u,y,S)})},p}();$.$uid=0,$.prototype.curOp=null,$.prototype.prevOp={},$.prototype.$mergeableCommands=["backspace","del","insertstring"],$.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"],["&&","||"],["==","!="]],x.implement($.prototype,h),w.defineOptions($.prototype,"editor",{selectionStyle:{set:function(p){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:p})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(p){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(p){this.textInput.setReadOnly(p),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(p){this.textInput.setCopyWithEmptySelection(p)},initialValue:!1},cursorStyle:{set:function(p){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(p){this.setAutoScrollEditorIntoView(p)}},keyboardHandler:{set:function(p){this.setKeyboardHandler(p)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(p){this.session.setValue(p)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(p){this.setSession(p)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(p){this.renderer.$gutterLayer.setShowLineNumbers(p),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),p&&this.$relativeLineNumbers?b.attach(this):b.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(p){this.$showLineNumbers&&p?b.attach(this):b.detach(this)}},placeholder:{set:function(p){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var u=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(u&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),A.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!u&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),A.addCssClass(this.container,"ace_hasPlaceholder");var y=A.createElement("div");y.className="ace_placeholder",y.textContent=this.$placeholder||"",this.renderer.placeholderNode=y,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!u&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(p){var u={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(T){T.blur(),T.renderer.scroller.focus()},readOnly:!0},y=function(T){if(T.target==this.renderer.scroller&&T.keyCode===C.enter){T.preventDefault();var E=this.getCursorPosition().row;this.isRowVisible(E)||this.scrollToLine(E,!0,!0),this.focus()}},S;p?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(c.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",g("editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",g("Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",y.bind(this)),this.commands.addCommand(u),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",g("editor")),this.renderer.$gutter.setAttribute("aria-label",g("Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),S||(S=new m(this)),S.addListener()):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",y.bind(this)),this.commands.removeCommand(u),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),S&&S.removeListener())},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",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var b={getText:function(p,u){return(Math.abs(p.selection.lead.row-u)||u+1+(u<9?"\xB7":""))+""},getWidth:function(p,u,y){return Math.max(u.toString().length,(y.lastRow+1).toString().length,2)*y.characterWidth},update:function(p,u){u.renderer.$loop.schedule(u.renderer.CHANGE_GUTTER)},attach:function(p){p.renderer.$gutterLayer.$renderer=this,p.on("changeSelection",this.update),this.update(null,p)},detach:function(p){p.renderer.$gutterLayer.$renderer==this&&(p.renderer.$gutterLayer.$renderer=null),p.off("changeSelection",this.update),this.update(null,p)}};k.Editor=$}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(M,k,B){var R=M("../lib/dom"),x=function(){function A(l,c){this.element=l,this.canvasHeight=c||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return A.prototype.moveContainer=function(l){R.translate(this.element,0,-(l.firstRowScreen*l.lineHeight%this.canvasHeight)-l.offset*this.$offsetCoefficient)},A.prototype.pageChanged=function(l,c){return Math.floor(l.firstRowScreen*l.lineHeight/this.canvasHeight)!==Math.floor(c.firstRowScreen*c.lineHeight/this.canvasHeight)},A.prototype.computeLineTop=function(l,c,r){var i=c.firstRowScreen*c.lineHeight,n=Math.floor(i/this.canvasHeight),t=r.documentToScreenRow(l,0)*c.lineHeight;return t-n*this.canvasHeight},A.prototype.computeLineHeight=function(l,c,r){return c.lineHeight*r.getRowLineCount(l)},A.prototype.getLength=function(){return this.cells.length},A.prototype.get=function(l){return this.cells[l]},A.prototype.shift=function(){this.$cacheCell(this.cells.shift())},A.prototype.pop=function(){this.$cacheCell(this.cells.pop())},A.prototype.push=function(l){if(Array.isArray(l)){this.cells.push.apply(this.cells,l);for(var c=R.createFragment(this.element),r=0;r<l.length;r++)c.appendChild(l[r].element);this.element.appendChild(c)}else this.cells.push(l),this.element.appendChild(l.element)},A.prototype.unshift=function(l){if(Array.isArray(l)){this.cells.unshift.apply(this.cells,l);for(var c=R.createFragment(this.element),r=0;r<l.length;r++)c.appendChild(l[r].element);this.element.firstChild?this.element.insertBefore(c,this.element.firstChild):this.element.appendChild(c)}else this.cells.unshift(l),this.element.insertAdjacentElement("afterbegin",l.element)},A.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},A.prototype.$cacheCell=function(l){!l||(l.element.remove(),this.cellCache.push(l))},A.prototype.createCell=function(l,c,r,i){var n=this.cellCache.pop();if(!n){var t=R.createElement("div");i&&i(t),this.element.appendChild(t),n={element:t,text:"",row:l}}return n.row=l,n},A}();k.Lines=x}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(M,k,B){var R=M("../lib/dom"),x=M("../lib/oop"),A=M("../lib/lang"),l=M("../lib/event_emitter").EventEmitter,c=M("./lines").Lines,r=M("../config").nls,i=function(){function t(e){this.element=R.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new c(this.element),this.$lines.$offsetCoefficient=1}return t.prototype.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},t.prototype.addGutterDecoration=function(e,o){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,o)},t.prototype.removeGutterDecoration=function(e,o){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,o)},t.prototype.setAnnotations=function(e){this.$annotations=[];for(var o=0;o<e.length;o++){var s=e[o],h=s.row,f=this.$annotations[h];f||(f=this.$annotations[h]={text:[],type:[]});var L=s.text,w=s.type;L=L?A.escapeHTML(L):s.html||"",f.text.indexOf(L)===-1&&(f.text.push(L),f.type.push(w));var d=s.className;d?f.className=d:w=="error"?f.className=" ace_error":w=="warning"&&f.className!=" ace_error"?f.className=" ace_warning":w=="info"&&!f.className&&(f.className=" ace_info")}},t.prototype.$updateAnnotations=function(e){if(!!this.$annotations.length){var o=e.start.row,s=e.end.row-o;if(s!==0)if(e.action=="remove")this.$annotations.splice(o,s+1,null);else{var h=new Array(s+1);h.unshift(o,1),this.$annotations.splice.apply(this.$annotations,h)}}},t.prototype.update=function(e){this.config=e;var o=this.session,s=e.firstRow,h=Math.min(e.lastRow+e.gutterOffset,o.getLength()-1);this.oldLastRow=h,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var f=o.getNextFoldLine(s),L=f?f.start.row:1/0,w=null,d=-1,a=s;;){if(a>L&&(a=f.end.row+1,f=o.getNextFoldLine(a,f),L=f?f.start.row:1/0),a>h){for(;this.$lines.getLength()>d+1;)this.$lines.pop();break}w=this.$lines.get(++d),w?w.row=a:(w=this.$lines.createCell(a,e,this.session,n),this.$lines.push(w)),this.$renderCell(w,e,f,a),a++}this._signal("afterRender"),this.$updateGutterWidth(e)},t.prototype.$updateGutterWidth=function(e){var o=this.session,s=o.gutterRenderer||this.$renderer,h=o.$firstLineNumber,f=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||o.$useWrapMode)&&(f=o.getLength()+h-1);var L=s?s.getWidth(o,f,e):f.toString().length*e.characterWidth,w=this.$padding||this.$computePadding();L+=w.left+w.right,L!==this.gutterWidth&&!isNaN(L)&&(this.gutterWidth=L,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",L))},t.prototype.$updateCursorRow=function(){if(!!this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},t.prototype.updateLineHighlight=function(){if(!!this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!(this.$cursorCell&&this.$cursorCell.row==e)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var o=this.$lines.cells;this.$cursorCell=null;for(var s=0;s<o.length;s++){var h=o[s];if(h.row>=this.$cursorRow){if(h.row>this.$cursorRow){var f=this.session.getFoldLine(this.$cursorRow);if(s>0&&f&&f.start.row==o[s-1].row)h=o[s-1];else break}h.element.className="ace_gutter-active-line "+h.element.className,this.$cursorCell=h;break}}}}},t.prototype.scrollLines=function(e){var o=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(o,e))return this.update(e);this.$lines.moveContainer(e);var s=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),h=this.oldLastRow;if(this.oldLastRow=s,!o||h<e.firstRow)return this.update(e);if(s<o.firstRow)return this.update(e);if(o.firstRow<e.firstRow)for(var f=this.session.getFoldedRowCount(o.firstRow,e.firstRow-1);f>0;f--)this.$lines.shift();if(h>s)for(var f=this.session.getFoldedRowCount(s+1,h);f>0;f--)this.$lines.pop();e.firstRow<o.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,o.firstRow-1)),s>h&&this.$lines.push(this.$renderLines(e,h+1,s)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},t.prototype.$renderLines=function(e,o,s){for(var h=[],f=o,L=this.session.getNextFoldLine(f),w=L?L.start.row:1/0;f>w&&(f=L.end.row+1,L=this.session.getNextFoldLine(f,L),w=L?L.start.row:1/0),!(f>s);){var d=this.$lines.createCell(f,e,this.session,n);this.$renderCell(d,e,L,f),h.push(d),f++}return h},t.prototype.$renderCell=function(e,o,s,h){var f=e.element,L=this.session,w=f.childNodes[0],d=f.childNodes[1],a=f.childNodes[2],m=a.firstChild,g=L.$firstLineNumber,v=L.$breakpoints,C=L.$decorations,$=L.gutterRenderer||this.$renderer,b=this.$showFoldWidgets&&L.foldWidgets,p=s?s.start.row:Number.MAX_VALUE,u=o.lineHeight+"px",y=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",S=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",T=($?$.getText(L,h):h+g).toString();if(this.$highlightGutterLine&&(h==this.$cursorRow||s&&h<this.$cursorRow&&h>=p&&this.$cursorRow<=s.end.row)&&(y+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),v[h]&&(y+=v[h]),C[h]&&(y+=C[h]),this.$annotations[h]&&h!==p&&(y+=this.$annotations[h].className),b){var E=b[h];E==null&&(E=b[h]=L.getFoldWidget(h))}if(E){var _="ace_fold-widget ace_"+E,I=E=="start"&&h==p&&h<s.end.row;if(I){_+=" ace_closed";for(var D="",H=!1,O=h+1;O<=s.end.row;O++)if(!!this.$annotations[O]){if(this.$annotations[O].className===" ace_error"){H=!0,D=" ace_error_fold";break}if(this.$annotations[O].className===" ace_warning"){H=!0,D=" ace_warning_fold";continue}}y+=D}else _+=" ace_open";d.className!=_&&(d.className=_),R.setStyle(d.style,"height",u),R.setStyle(d.style,"display","inline-block"),d.setAttribute("role","button"),d.setAttribute("tabindex","-1");var F=L.getFoldWidgetRange(h);F?d.setAttribute("aria-label",r("Toggle code folding, rows $0 through $1",[F.start.row+1,F.end.row+1])):s?d.setAttribute("aria-label",r("Toggle code folding, rows $0 through $1",[s.start.row+1,s.end.row+1])):d.setAttribute("aria-label",r("Toggle code folding, row $0",[h+1])),I?(d.setAttribute("aria-expanded","false"),d.setAttribute("title",r("Unfold code"))):(d.setAttribute("aria-expanded","true"),d.setAttribute("title",r("Fold code")))}else d&&(R.setStyle(d.style,"display","none"),d.setAttribute("tabindex","0"),d.removeAttribute("role"),d.removeAttribute("aria-label"));return H&&this.$showFoldedAnnotations?(a.className="ace_gutter_annotation",m.className=S,m.className+=D,R.setStyle(m.style,"height",u),R.setStyle(a.style,"display","block"),R.setStyle(a.style,"height",u),a.setAttribute("aria-label",r("Read annotations row $0",[T])),a.setAttribute("tabindex","-1"),a.setAttribute("role","button")):this.$annotations[h]?(a.className="ace_gutter_annotation",m.className=S,this.$useSvgGutterIcons?m.className+=this.$annotations[h].className:f.classList.add(this.$annotations[h].className.replace(" ","")),R.setStyle(m.style,"height",u),R.setStyle(a.style,"display","block"),R.setStyle(a.style,"height",u),a.setAttribute("aria-label",r("Read annotations row $0",[T])),a.setAttribute("tabindex","-1"),a.setAttribute("role","button")):(R.setStyle(a.style,"display","none"),a.removeAttribute("aria-label"),a.removeAttribute("role"),a.setAttribute("tabindex","0")),T!==w.data&&(w.data=T),f.className!=y&&(f.className=y),R.setStyle(e.element.style,"height",this.$lines.computeLineHeight(h,o,L)+"px"),R.setStyle(e.element.style,"top",this.$lines.computeLineTop(h,o,L)+"px"),e.text=T,a.style.display==="none"&&d.style.display==="none"?e.element.setAttribute("aria-hidden",!0):e.element.setAttribute("aria-hidden",!1),e},t.prototype.setHighlightGutterLine=function(e){this.$highlightGutterLine=e},t.prototype.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},t.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},t.prototype.setShowFoldWidgets=function(e){e?R.addCssClass(this.element,"ace_folding-enabled"):R.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},t.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},t.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=R.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(e.borderLeftWidth)||0)+(parseInt(e.paddingLeft)||0)+1,this.$padding.right=(parseInt(e.borderRightWidth)||0)+(parseInt(e.paddingRight)||0),this.$padding},t.prototype.getRegion=function(e){var o=this.$padding||this.$computePadding(),s=this.element.getBoundingClientRect();if(e.x<o.left+s.left)return"markers";if(this.$showFoldWidgets&&e.x>s.right-o.right)return"foldWidgets"},t}();i.prototype.$fixedWidth=!1,i.prototype.$highlightGutterLine=!0,i.prototype.$renderer="",i.prototype.$showLineNumbers=!0,i.prototype.$showFoldWidgets=!0,x.implement(i.prototype,l);function n(t){var e=document.createTextNode("");t.appendChild(e);var o=R.createElement("span");t.appendChild(o);var s=R.createElement("span");t.appendChild(s);var h=R.createElement("span");return s.appendChild(h),t}k.Gutter=i}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(M,k,B){var R=M("../range").Range,x=M("../lib/dom"),A=function(){function c(r){this.element=x.createElement("div"),this.element.className="ace_layer ace_marker-layer",r.appendChild(this.element)}return c.prototype.setPadding=function(r){this.$padding=r},c.prototype.setSession=function(r){this.session=r},c.prototype.setMarkers=function(r){this.markers=r},c.prototype.elt=function(r,i){var n=this.i!=-1&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=i,n.className=r},c.prototype.update=function(r){if(!!r){this.config=r,this.i=0;var i;for(var n in this.markers){var t=this.markers[n];if(!t.range){t.update(i,this,this.session,r);continue}var e=t.range.clipRows(r.firstRow,r.lastRow);if(!e.isEmpty())if(e=e.toScreenRange(this.session),t.renderer){var o=this.$getTop(e.start.row,r),s=this.$padding+e.start.column*r.characterWidth;t.renderer(i,e,s,o,r)}else t.type=="fullLine"?this.drawFullLineMarker(i,e,t.clazz,r):t.type=="screenLine"?this.drawScreenLineMarker(i,e,t.clazz,r):e.isMultiLine()?t.type=="text"?this.drawTextMarker(i,e,t.clazz,r):this.drawMultiLineMarker(i,e,t.clazz,r):this.drawSingleLineMarker(i,e,t.clazz+" ace_start ace_br15",r)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},c.prototype.$getTop=function(r,i){return(r-i.firstRowScreen)*i.lineHeight},c.prototype.drawTextMarker=function(r,i,n,t,e){for(var o=this.session,s=i.start.row,h=i.end.row,f=s,L=0,w=0,d=o.getScreenLastRowColumn(f),a=new R(f,i.start.column,f,w);f<=h;f++)a.start.row=a.end.row=f,a.start.column=f==s?i.start.column:o.getRowWrapIndent(f),a.end.column=d,L=w,w=d,d=f+1<h?o.getScreenLastRowColumn(f+1):f==h?0:i.end.column,this.drawSingleLineMarker(r,a,n+(f==s?" ace_start":"")+" ace_br"+l(f==s||f==s+1&&i.start.column,L<w,w>d,f==h),t,f==h?0:1,e)},c.prototype.drawMultiLineMarker=function(r,i,n,t,e){var o=this.$padding,s=t.lineHeight,h=this.$getTop(i.start.row,t),f=o+i.start.column*t.characterWidth;if(e=e||"",this.session.$bidiHandler.isBidiRow(i.start.row)){var L=i.clone();L.end.row=L.start.row,L.end.column=this.session.getLine(L.start.row).length,this.drawBidiSingleLineMarker(r,L,n+" ace_br1 ace_start",t,null,e)}else this.elt(n+" ace_br1 ace_start","height:"+s+"px;right:0;top:"+h+"px;left:"+f+"px;"+(e||""));if(this.session.$bidiHandler.isBidiRow(i.end.row)){var L=i.clone();L.start.row=L.end.row,L.start.column=0,this.drawBidiSingleLineMarker(r,L,n+" ace_br12",t,null,e)}else{h=this.$getTop(i.end.row,t);var w=i.end.column*t.characterWidth;this.elt(n+" ace_br12","height:"+s+"px;width:"+w+"px;top:"+h+"px;left:"+o+"px;"+(e||""))}if(s=(i.end.row-i.start.row-1)*t.lineHeight,!(s<=0)){h=this.$getTop(i.start.row+1,t);var d=(i.start.column?1:0)|(i.end.column?0:8);this.elt(n+(d?" ace_br"+d:""),"height:"+s+"px;right:0;top:"+h+"px;left:"+o+"px;"+(e||""))}},c.prototype.drawSingleLineMarker=function(r,i,n,t,e,o){if(this.session.$bidiHandler.isBidiRow(i.start.row))return this.drawBidiSingleLineMarker(r,i,n,t,e,o);var s=t.lineHeight,h=(i.end.column+(e||0)-i.start.column)*t.characterWidth,f=this.$getTop(i.start.row,t),L=this.$padding+i.start.column*t.characterWidth;this.elt(n,"height:"+s+"px;width:"+h+"px;top:"+f+"px;left:"+L+"px;"+(o||""))},c.prototype.drawBidiSingleLineMarker=function(r,i,n,t,e,o){var s=t.lineHeight,h=this.$getTop(i.start.row,t),f=this.$padding,L=this.session.$bidiHandler.getSelections(i.start.column,i.end.column);L.forEach(function(w){this.elt(n,"height:"+s+"px;width:"+(w.width+(e||0))+"px;top:"+h+"px;left:"+(f+w.left)+"px;"+(o||""))},this)},c.prototype.drawFullLineMarker=function(r,i,n,t,e){var o=this.$getTop(i.start.row,t),s=t.lineHeight;i.start.row!=i.end.row&&(s+=this.$getTop(i.end.row,t)-o),this.elt(n,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(e||""))},c.prototype.drawScreenLineMarker=function(r,i,n,t,e){var o=this.$getTop(i.start.row,t),s=t.lineHeight;this.elt(n,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(e||""))},c}();A.prototype.$padding=0;function l(c,r,i,n){return(c?1:0)|(r?2:0)|(i?4:0)|(n?8:0)}k.Marker=A}),ace.define("ace/layer/text_util",["require","exports","module"],function(M,k,B){var R=new Set(["text","rparen","lparen"]);k.isTextToken=function(x){return R.has(x)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(M,k,B){var R=M("../lib/oop"),x=M("../lib/dom"),A=M("../lib/lang"),l=M("./lines").Lines,c=M("../lib/event_emitter").EventEmitter,r=M("../config").nls,i=M("./text_util").isTextToken,n=function(){function t(e){this.dom=x,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new l(this.element)}return t.prototype.$updateEolChar=function(){var e=this.session.doc,o=e.getNewLineCharacter()==`
- `&&e.getNewLineMode()!="windows",s=o?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=s)return this.EOL_CHAR=s,!0},t.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},t.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},t.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},t.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(o){this._signal("changeCharacterSize",o)}.bind(this)),this.$pollSizeChanges()},t.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},t.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},t.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString()},t.prototype.setShowInvisibles=function(e){return this.showInvisibles==e?!1:(this.showInvisibles=e,typeof e=="string"?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},t.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},t.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides===e?!1:(this.$highlightIndentGuides=e,e)},t.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var o=this.$tabStrings=[0],s=1;s<e+1;s++)if(this.showTabs){var h=this.dom.createElement("span");h.className="ace_invisible ace_invisible_tab",h.textContent=A.stringRepeat(this.TAB_CHAR,s),o.push(h)}else o.push(this.dom.createTextNode(A.stringRepeat(" ",s),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var f="ace_indent-guide",L=this.showSpaces?" ace_invisible ace_invisible_space":"",w=this.showSpaces?A.stringRepeat(this.SPACE_CHAR,this.tabSize):A.stringRepeat(" ",this.tabSize),d=this.showTabs?" ace_invisible ace_invisible_tab":"",a=this.showTabs?A.stringRepeat(this.TAB_CHAR,this.tabSize):w,h=this.dom.createElement("span");h.className=f+L,h.textContent=w,this.$tabStrings[" "]=h;var h=this.dom.createElement("span");h.className=f+d,h.textContent=a,this.$tabStrings[" "]=h}},t.prototype.updateLines=function(e,o,s){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var h=Math.max(o,e.firstRow),f=Math.min(s,e.lastRow),L=this.element.childNodes,w=0,a=e.firstRow;a<h;a++){var m=this.session.getFoldLine(a);if(m)if(m.containsRow(h)){h=m.start.row;break}else a=m.end.row;w++}for(var d=!1,a=h,m=this.session.getNextFoldLine(a),g=m?m.start.row:1/0;a>g&&(a=m.end.row+1,m=this.session.getNextFoldLine(a,m),g=m?m.start.row:1/0),!(a>f);){var v=L[w++];if(v){this.dom.removeChildren(v),this.$renderLine(v,a,a==g?m:!1),d&&(v.style.top=this.$lines.computeLineTop(a,e,this.session)+"px");var C=e.lineHeight*this.session.getRowLength(a)+"px";v.style.height!=C&&(d=!0,v.style.height=C)}a++}if(d)for(;w<this.$lines.cells.length;){var $=this.$lines.cells[w++];$.element.style.top=this.$lines.computeLineTop($.row,e,this.session)+"px"}},t.prototype.scrollLines=function(e){var o=this.config;if(this.config=e,this.$lines.pageChanged(o,e))return this.update(e);this.$lines.moveContainer(e);var s=e.lastRow,h=o?o.lastRow:-1;if(!o||h<e.firstRow)return this.update(e);if(s<o.firstRow)return this.update(e);if(!o||o.lastRow<e.firstRow)return this.update(e);if(e.lastRow<o.firstRow)return this.update(e);if(o.firstRow<e.firstRow)for(var f=this.session.getFoldedRowCount(o.firstRow,e.firstRow-1);f>0;f--)this.$lines.shift();if(o.lastRow>e.lastRow)for(var f=this.session.getFoldedRowCount(e.lastRow+1,o.lastRow);f>0;f--)this.$lines.pop();e.firstRow<o.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,o.firstRow-1)),e.lastRow>o.lastRow&&this.$lines.push(this.$renderLinesFragment(e,o.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},t.prototype.$renderLinesFragment=function(e,o,s){for(var h=[],f=o,L=this.session.getNextFoldLine(f),w=L?L.start.row:1/0;f>w&&(f=L.end.row+1,L=this.session.getNextFoldLine(f,L),w=L?L.start.row:1/0),!(f>s);){var d=this.$lines.createCell(f,e,this.session),a=d.element;this.dom.removeChildren(a),x.setStyle(a.style,"height",this.$lines.computeLineHeight(f,e,this.session)+"px"),x.setStyle(a.style,"top",this.$lines.computeLineTop(f,e,this.session)+"px"),this.$renderLine(a,f,f==w?L:!1),this.$useLineGroups()?a.className="ace_line_group":a.className="ace_line",h.push(d),f++}return h},t.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var o=e.firstRow,s=e.lastRow,h=this.$lines;h.getLength();)h.pop();h.push(this.$renderLinesFragment(e,o,s))},t.prototype.$renderToken=function(e,o,s,h){for(var f=this,L=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\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,w=this.dom.createFragment(this.element),d,a=0;d=L.exec(h);){var m=d[1],g=d[2],v=d[3],C=d[4],$=d[5];if(!(!f.showSpaces&&g)){var b=a!=d.index?h.slice(a,d.index):"";if(a=d.index+d[0].length,b&&w.appendChild(this.dom.createTextNode(b,this.element)),m){var p=f.session.getScreenTabSize(o+d.index);w.appendChild(f.$tabStrings[p].cloneNode(!0)),o+=p-1}else if(g)if(f.showSpaces){var u=this.dom.createElement("span");u.className="ace_invisible ace_invisible_space",u.textContent=A.stringRepeat(f.SPACE_CHAR,g.length),w.appendChild(u)}else w.appendChild(this.dom.createTextNode(g,this.element));else if(v){var u=this.dom.createElement("span");u.className="ace_invisible ace_invisible_space ace_invalid",u.textContent=A.stringRepeat(f.SPACE_CHAR,v.length),w.appendChild(u)}else if(C){o+=1;var u=this.dom.createElement("span");u.style.width=f.config.characterWidth*2+"px",u.className=f.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",u.textContent=f.showSpaces?f.SPACE_CHAR:C,w.appendChild(u)}else if($){o+=1;var u=this.dom.createElement("span");u.style.width=f.config.characterWidth*2+"px",u.className="ace_cjk",u.textContent=$,w.appendChild(u)}}}if(w.appendChild(this.dom.createTextNode(a?h.slice(a):h,this.element)),i(s.type))e.appendChild(w);else{var y="ace_"+s.type.replace(/\./g," ace_"),u=this.dom.createElement("span");s.type=="fold"&&(u.style.width=s.value.length*this.config.characterWidth+"px",u.setAttribute("title",r("Unfold code"))),u.className=y,u.appendChild(w),e.appendChild(u)}return o+h.length},t.prototype.renderIndentGuide=function(e,o,s){var h=o.search(this.$indentGuideRe);if(h<=0||h>=s)return o;if(o[0]==" "){h-=h%this.tabSize;for(var f=h/this.tabSize,L=0;L<f;L++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),o.substr(h)}else if(o[0]==" "){for(var L=0;L<h;L++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),o.substr(h)}return this.$highlightIndentGuide(),o},t.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var e=this.session.doc.$lines;if(!!e){var o=this.session.selection.getCursor(),s=/^\s*/.exec(this.session.doc.getLine(o.row))[0].length,h=Math.floor(s/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:h,start:o.row};var f=this.session.$bracketHighlight;if(f){for(var L=this.session.$bracketHighlight.ranges,w=0;w<L.length;w++)if(o.row!==L[w].start.row){this.$highlightIndentGuideMarker.end=L[w].start.row,o.row>L[w].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&e[o.row]!==""&&o.column===e[o.row].length){this.$highlightIndentGuideMarker.dir=1;for(var w=o.row+1;w<e.length;w++){var d=e[w],a=/^\s*/.exec(d)[0].length;if(d!==""&&(this.$highlightIndentGuideMarker.end=w,a<=s))break}}this.$renderHighlightIndentGuide()}}},t.prototype.$clearActiveIndentGuide=function(){for(var e=this.$lines.cells,o=0;o<e.length;o++){var s=e[o],h=s.element.childNodes;if(h.length>0){for(var f=0;f<h.length;f++)if(h[f].classList&&h[f].classList.contains("ace_indent-guide-active")){h[f].classList.remove("ace_indent-guide-active");break}}}},t.prototype.$setIndentGuideActive=function(e,o){var s=this.session.doc.getLine(e.row);if(s!==""){var h=e.element.childNodes;if(h){var f=h[o-1];f&&f.classList&&f.classList.contains("ace_indent-guide")&&f.classList.add("ace_indent-guide-active")}}},t.prototype.$renderHighlightIndentGuide=function(){if(!!this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var o=this.$highlightIndentGuideMarker.indentLevel;if(o!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var s=0;s<e.length;s++){var h=e[s];if(this.$highlightIndentGuideMarker.end&&h.row>=this.$highlightIndentGuideMarker.start+1){if(h.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(h,o)}}else for(var s=e.length-1;s>=0;s--){var h=e[s];if(this.$highlightIndentGuideMarker.end&&h.row<this.$highlightIndentGuideMarker.start){if(h.row<=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(h,o)}}}},t.prototype.$createLineElement=function(e){var o=this.dom.createElement("div");return o.className="ace_line",o.style.height=this.config.lineHeight+"px",o},t.prototype.$renderWrappedLine=function(e,o,s){var h=0,f=0,L=s[0],w=0,d=this.$createLineElement();e.appendChild(d);for(var a=0;a<o.length;a++){var m=o[a],g=m.value;if(a==0&&this.displayIndentGuides){if(h=g.length,g=this.renderIndentGuide(d,g,L),!g)continue;h-=g.length}if(h+g.length<L)w=this.$renderToken(d,w,m,g),h+=g.length;else{for(;h+g.length>=L;)w=this.$renderToken(d,w,m,g.substring(0,L-h)),g=g.substring(L-h),h=L,d=this.$createLineElement(),e.appendChild(d),d.appendChild(this.dom.createTextNode(A.stringRepeat("\xA0",s.indent),this.element)),f++,w=0,L=s[f]||Number.MAX_VALUE;g.length!=0&&(h+=g.length,w=this.$renderToken(d,w,m,g))}}s[s.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(d,w,null,"",!0)},t.prototype.$renderSimpleLine=function(e,o){for(var s=0,h=0;h<o.length;h++){var f=o[h],L=f.value;if(!(h==0&&this.displayIndentGuides&&(L=this.renderIndentGuide(e,L),!L))){if(s+L.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,s,f,L);s=this.$renderToken(e,s,f,L)}}},t.prototype.$renderOverflowMessage=function(e,o,s,h,f){s&&this.$renderToken(e,o,s,h.slice(0,this.MAX_LINE_LENGTH-o));var L=this.dom.createElement("span");L.className="ace_inline_button ace_keyword ace_toggle_wrap",L.textContent=f?"<hide>":"<click to see more...>",e.appendChild(L)},t.prototype.$renderLine=function(e,o,s){if(!s&&s!=!1&&(s=this.session.getFoldLine(o)),s)var h=this.$getFoldLineTokens(o,s);else var h=this.session.getTokens(o);var f=e;if(h.length){var L=this.session.getRowSplitData(o);if(L&&L.length){this.$renderWrappedLine(e,h,L);var f=e.lastChild}else{var f=e;this.$useLineGroups()&&(f=this.$createLineElement(),e.appendChild(f)),this.$renderSimpleLine(f,h)}}else this.$useLineGroups()&&(f=this.$createLineElement(),e.appendChild(f));if(this.showEOL&&f){s&&(o=s.end.row);var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_eol",w.textContent=o==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,f.appendChild(w)}},t.prototype.$getFoldLineTokens=function(e,o){var s=this.session,h=[];function f(w,d,a){for(var m=0,g=0;g+w[m].value.length<d;)if(g+=w[m].value.length,m++,m==w.length)return;if(g!=d){var v=w[m].value.substring(d-g);v.length>a-d&&(v=v.substring(0,a-d)),h.push({type:w[m].type,value:v}),g=d+v.length,m+=1}for(;g<a&&m<w.length;){var v=w[m].value;v.length+g>a?h.push({type:w[m].type,value:v.substring(0,a-g)}):h.push(w[m]),g+=v.length,m+=1}}var L=s.getTokens(e);return o.walk(function(w,d,a,m,g){w!=null?h.push({type:"fold",value:w}):(g&&(L=s.getTokens(d)),L.length&&f(L,m,a))},o.end.row,this.session.getLine(o.end.row).length),h},t.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},t}();n.prototype.EOF_CHAR="\xB6",n.prototype.EOL_CHAR_LF="\xAC",n.prototype.EOL_CHAR_CRLF="\xA4",n.prototype.EOL_CHAR=n.prototype.EOL_CHAR_LF,n.prototype.TAB_CHAR="\u2014",n.prototype.SPACE_CHAR="\xB7",n.prototype.$padding=0,n.prototype.MAX_LINE_LENGTH=1e4,n.prototype.showInvisibles=!1,n.prototype.showSpaces=!1,n.prototype.showTabs=!1,n.prototype.showEOL=!1,n.prototype.displayIndentGuides=!0,n.prototype.$highlightIndentGuides=!0,n.prototype.$tabStrings=[],n.prototype.destroy={},n.prototype.onChangeTabSize=n.prototype.$computeTabString,R.implement(n.prototype,c),k.Text=n}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(M,k,B){var R=M("../lib/dom"),x=function(){function A(l){this.element=R.createElement("div"),this.element.className="ace_layer ace_cursor-layer",l.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 A.prototype.$updateOpacity=function(l){for(var c=this.cursors,r=c.length;r--;)R.setStyle(c[r].style,"opacity",l?"":"0")},A.prototype.$startCssAnimation=function(){for(var l=this.cursors,c=l.length;c--;)l[c].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&R.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},A.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,R.removeCssClass(this.element,"ace_animate-blinking")},A.prototype.setPadding=function(l){this.$padding=l},A.prototype.setSession=function(l){this.session=l},A.prototype.setBlinking=function(l){l!=this.isBlinking&&(this.isBlinking=l,this.restartTimer())},A.prototype.setBlinkInterval=function(l){l!=this.blinkInterval&&(this.blinkInterval=l,this.restartTimer())},A.prototype.setSmoothBlinking=function(l){l!=this.smoothBlinking&&(this.smoothBlinking=l,R.setCssClass(this.element,"ace_smooth-blinking",l),this.$updateCursors(!0),this.restartTimer())},A.prototype.addCursor=function(){var l=R.createElement("div");return l.className="ace_cursor",this.element.appendChild(l),this.cursors.push(l),l},A.prototype.removeCursor=function(){if(this.cursors.length>1){var l=this.cursors.pop();return l.parentNode.removeChild(l),l}},A.prototype.hideCursor=function(){this.isVisible=!1,R.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},A.prototype.showCursor=function(){this.isVisible=!0,R.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},A.prototype.restartTimer=function(){var l=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,R.removeCssClass(this.element,"ace_smooth-blinking")),l(!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 c=function(){this.timeoutId=setTimeout(function(){l(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){l(!0),c()},this.blinkInterval),c()}},A.prototype.getPixelPosition=function(l,c){if(!this.config||!this.session)return{left:0,top:0};l||(l=this.session.selection.getCursor());var r=this.session.documentToScreenPosition(l),i=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,l.row)?this.session.$bidiHandler.getPosLeft(r.column):r.column*this.config.characterWidth),n=(r.row-(c?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:i,top:n}},A.prototype.isCursorInView=function(l,c){return l.top>=0&&l.top<c.maxHeight},A.prototype.update=function(l){this.config=l;var c=this.session.$selectionMarkers,r=0,i=0;(c===void 0||c.length===0)&&(c=[{cursor:null}]);for(var r=0,n=c.length;r<n;r++){var t=this.getPixelPosition(c[r].cursor,!0);if(!((t.top>l.height+l.offset||t.top<0)&&r>1)){var e=this.cursors[i++]||this.addCursor(),o=e.style;this.drawCursor?this.drawCursor(e,t,l,c[r],this.session):this.isCursorInView(t,l)?(R.setStyle(o,"display","block"),R.translate(e,t.left,t.top),R.setStyle(o,"width",Math.round(l.characterWidth)+"px"),R.setStyle(o,"height",l.lineHeight+"px")):R.setStyle(o,"display","none")}}for(;this.cursors.length>i;)this.removeCursor();var s=this.session.getOverwrite();this.$setOverwrite(s),this.$pixelPos=t,this.restartTimer()},A.prototype.$setOverwrite=function(l){l!=this.overwrite&&(this.overwrite=l,l?R.addCssClass(this.element,"ace_overwrite-cursors"):R.removeCssClass(this.element,"ace_overwrite-cursors"))},A.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},A}();x.prototype.$padding=0,x.prototype.drawCursor=null,k.Cursor=x}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(M,k,B){var R=this&&this.__extends||function(){var e=function(o,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,f){h.__proto__=f}||function(h,f){for(var L in f)Object.prototype.hasOwnProperty.call(f,L)&&(h[L]=f[L])},e(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");e(o,s);function h(){this.constructor=o}o.prototype=s===null?Object.create(s):(h.prototype=s.prototype,new h)}}(),x=M("./lib/oop"),A=M("./lib/dom"),l=M("./lib/event"),c=M("./lib/event_emitter").EventEmitter,r=32768,i=function(){function e(o,s){this.element=A.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+s,this.inner=A.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,l.addListener(this.element,"scroll",this.onScroll.bind(this)),l.addListener(this.element,"mousedown",l.preventDefault)}return e.prototype.setVisible=function(o){this.element.style.display=o?"":"none",this.isVisible=o,this.coeff=1},e}();x.implement(i.prototype,c);var n=function(e){R(o,e);function o(s,h){var f=e.call(this,s,"-v")||this;return f.scrollTop=0,f.scrollHeight=0,h.$scrollbarWidth=f.width=A.scrollbarWidth(s.ownerDocument),f.inner.style.width=f.element.style.width=(f.width||15)+5+"px",f.$minWidth=0,f}return o.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var s=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-s)/(this.coeff-s)}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(s){this.element.style.height=s+"px"},o.prototype.setScrollHeight=function(s){this.scrollHeight=s,s>r?(this.coeff=r/s,s=r):this.coeff!=1&&(this.coeff=1),this.inner.style.height=s+"px"},o.prototype.setScrollTop=function(s){this.scrollTop!=s&&(this.skipEvent=!0,this.scrollTop=s,this.element.scrollTop=s*this.coeff)},o}(i);n.prototype.setInnerHeight=n.prototype.setScrollHeight;var t=function(e){R(o,e);function o(s,h){var f=e.call(this,s,"-h")||this;return f.scrollLeft=0,f.height=h.$scrollbarWidth,f.inner.style.height=f.element.style.height=(f.height||15)+5+"px",f}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(s){this.element.style.width=s+"px"},o.prototype.setInnerWidth=function(s){this.inner.style.width=s+"px"},o.prototype.setScrollWidth=function(s){this.inner.style.width=s+"px"},o.prototype.setScrollLeft=function(s){this.scrollLeft!=s&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=s)},o}(i);k.ScrollBar=n,k.ScrollBarV=n,k.ScrollBarH=t,k.VScrollBar=n,k.HScrollBar=t}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(M,k,B){var R=this&&this.__extends||function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,h){s.__proto__=h}||function(s,h){for(var f in h)Object.prototype.hasOwnProperty.call(h,f)&&(s[f]=h[f])},t(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(e,o);function s(){this.constructor=e}e.prototype=o===null?Object.create(o):(s.prototype=o.prototype,new s)}}(),x=M("./lib/oop"),A=M("./lib/dom"),l=M("./lib/event"),c=M("./lib/event_emitter").EventEmitter;A.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 r=function(){function t(e,o){this.element=A.createElement("div"),this.element.className="ace_sb"+o,this.inner=A.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,l.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return t.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},t}();x.implement(r.prototype,c);var i=function(t){R(e,t);function e(o,s){var h=t.call(this,o,"-v")||this;return h.scrollTop=0,h.scrollHeight=0,h.parent=o,h.width=h.VScrollWidth,h.renderer=s,h.inner.style.width=h.element.style.width=(h.width||15)+"px",h.$minWidth=0,h}return e.prototype.onMouseDown=function(o,s){if(o==="mousedown"&&!(l.getButton(s)!==0||s.detail===2)){if(s.target===this.inner){var h=this,f=s.clientY,L=function(C){f=C.clientY},w=function(){clearInterval(g)},d=s.clientY,a=this.thumbTop,m=function(){if(f!==void 0){var C=h.scrollTopFromThumbTop(a+f-d);C!==h.scrollTop&&h._emit("scroll",{data:C})}};l.capture(this.inner,L,w);var g=setInterval(m,20);return l.preventDefault(s)}var v=s.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(v)}),l.preventDefault(s)}},e.prototype.getHeight=function(){return this.height},e.prototype.scrollTopFromThumbTop=function(o){var s=o*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return s=s>>0,s<0?s=0:s>this.pageHeight-this.viewHeight&&(s=this.pageHeight-this.viewHeight),s},e.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},e.prototype.setHeight=function(o){this.height=Math.max(0,o),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},e.prototype.setScrollHeight=function(o,s){this.pageHeight===o&&!s||(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})))},e.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"},e}(r);i.prototype.setInnerHeight=i.prototype.setScrollHeight;var n=function(t){R(e,t);function e(o,s){var h=t.call(this,o,"-h")||this;return h.scrollLeft=0,h.scrollWidth=0,h.height=h.HScrollHeight,h.inner.style.height=h.element.style.height=(h.height||12)+"px",h.renderer=s,h}return e.prototype.onMouseDown=function(o,s){if(o==="mousedown"&&!(l.getButton(s)!==0||s.detail===2)){if(s.target===this.inner){var h=this,f=s.clientX,L=function(C){f=C.clientX},w=function(){clearInterval(g)},d=s.clientX,a=this.thumbLeft,m=function(){if(f!==void 0){var C=h.scrollLeftFromThumbLeft(a+f-d);C!==h.scrollLeft&&h._emit("scroll",{data:C})}};l.capture(this.inner,L,w);var g=setInterval(m,20);return l.preventDefault(s)}var v=s.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(v)}),l.preventDefault(s)}},e.prototype.getHeight=function(){return this.isVisible?this.height:0},e.prototype.scrollLeftFromThumbLeft=function(o){var s=o*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return s=s>>0,s<0?s=0:s>this.pageWidth-this.viewWidth&&(s=this.pageWidth-this.viewWidth),s},e.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)},e.prototype.setScrollWidth=function(o,s){this.pageWidth===o&&!s||(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})))},e.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"},e}(r);n.prototype.setInnerWidth=n.prototype.setScrollWidth,k.ScrollBar=i,k.ScrollBarV=i,k.ScrollBarH=n,k.VScrollBar=i,k.HScrollBar=n}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(M,k,B){var R=M("./lib/event"),x=function(){function A(l,c){this.onRender=l,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=c||window;var r=this;this._flush=function(i){r.pending=!1;var n=r.changes;if(n&&(R.blockIdle(100),r.changes=0,r.onRender(n)),r.changes){if(r.$recursionLimit--<0)return;r.schedule()}else r.$recursionLimit=2}}return A.prototype.schedule=function(l){this.changes=this.changes|l,this.changes&&!this.pending&&(R.nextFrame(this._flush),this.pending=!0)},A.prototype.clear=function(l){var c=this.changes;return this.changes=0,c},A}();k.RenderLoop=x}),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(M,k,B){var R=M("../lib/oop"),x=M("../lib/dom"),A=M("../lib/lang"),l=M("../lib/event"),c=M("../lib/useragent"),r=M("../lib/event_emitter").EventEmitter,i=512,n=typeof ResizeObserver=="function",t=200,e=function(){function o(s){this.el=x.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=x.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=x.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),s.appendChild(this.el),this.$measureNode.textContent=A.stringRepeat("X",i),this.$characterSize={width:0,height:0},n?this.$addObserver():this.checkForSizeChanges()}return o.prototype.$setMeasureNodeStyles=function(s,h){s.width=s.height="auto",s.left=s.top="0px",s.visibility="hidden",s.position="absolute",s.whiteSpace="pre",c.isIE<8?s["font-family"]="inherit":s.font="inherit",s.overflow=h?"hidden":"visible"},o.prototype.checkForSizeChanges=function(s){if(s===void 0&&(s=this.$measureSizes()),s&&(this.$characterSize.width!==s.width||this.$characterSize.height!==s.height)){this.$measureNode.style.fontWeight="bold";var h=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=s,this.charSizes=Object.create(null),this.allowBoldFonts=h&&h.width===s.width&&h.height===s.height,this._emit("changeCharacterSize",{data:s})}},o.prototype.$addObserver=function(){var s=this;this.$observer=new window.ResizeObserver(function(h){s.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},o.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var s=this;return this.$pollSizeChangesTimer=l.onIdle(function h(){s.checkForSizeChanges(),l.onIdle(h,500)},500)},o.prototype.setPolling=function(s){s?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},o.prototype.$measureSizes=function(s){var h={height:(s||this.$measureNode).clientHeight,width:(s||this.$measureNode).clientWidth/i};return h.width===0||h.height===0?null:h},o.prototype.$measureCharWidth=function(s){this.$main.textContent=A.stringRepeat(s,i);var h=this.$main.getBoundingClientRect();return h.width/i},o.prototype.getCharacterWidth=function(s){var h=this.charSizes[s];return h===void 0&&(h=this.charSizes[s]=this.$measureCharWidth(s)/this.$characterSize.width),h},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(s){return!s||!s.parentElement?1:(window.getComputedStyle(s).zoom||1)*this.$getZoom(s.parentElement)},o.prototype.$initTransformMeasureNodes=function(){var s=function(h,f){return["div",{style:"position: absolute;top:"+h+"px;left:"+f+"px;"}]};this.els=x.buildDom([s(0,0),s(t,0),s(0,t),s(t,t)],this.el)},o.prototype.transformCoordinates=function(s,h){if(s){var f=this.$getZoom(this.el);s=a(1/f,s)}function L(I,D,H){var O=I[1]*D[0]-I[0]*D[1];return[(-D[1]*H[0]+D[0]*H[1])/O,(+I[1]*H[0]-I[0]*H[1])/O]}function w(I,D){return[I[0]-D[0],I[1]-D[1]]}function d(I,D){return[I[0]+D[0],I[1]+D[1]]}function a(I,D){return[I*D[0],I*D[1]]}this.els||this.$initTransformMeasureNodes();function m(I){var D=I.getBoundingClientRect();return[D.left,D.top]}var g=m(this.els[0]),v=m(this.els[1]),C=m(this.els[2]),$=m(this.els[3]),b=L(w($,v),w($,C),w(d(v,C),d($,g))),p=a(1+b[0],w(v,g)),u=a(1+b[1],w(C,g));if(h){var y=h,S=b[0]*y[0]/t+b[1]*y[1]/t+1,T=d(a(y[0],p),a(y[1],u));return d(a(1/S/t,T),g)}var E=w(s,g),_=L(w(p,a(b[0],E)),w(u,a(b[1],E)),E);return a(t,_)},o}();e.prototype.$characterSize={width:0,height:0},R.implement(e.prototype,r),k.FontMetrics=e}),ace.define("ace/css/editor-css",["require","exports","module"],function(M,k,B){B.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_gutter_annotation {
- margin-left: -14px;
- float: left;
- }
- .ace_gutter-cell .ace_gutter_annotation {
- margin-left: -19px;
- float: left;
- }
- .ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold {
- 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, .ace_icon.ace_warning_fold {
- 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,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
- background-color: crimson;
- }
- .ace_icon_svg.ace_warning {
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
- background-color: darkorange;
- }
- .ace_icon_svg.ace_info {
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
- background-color: royalblue;
- }
- .ace_icon_svg.ace_error_fold {
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
- background-color: crimson;
- }
- .ace_icon_svg.ace_warning_fold {
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
- background-color: darkorange;
- }
- .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 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-wrap;
- word-wrap: break-word;
- line-height: normal;
- font-style: normal;
- font-weight: normal;
- letter-spacing: normal;
- pointer-events: none;
- overflow: auto;
- max-width: min(60em, 66vw);
- overscroll-behavior: contain;
- }
- .ace_tooltip pre {
- white-space: pre-wrap;
- }
- .ace_tooltip.ace_dark {
- background-color: #636363;
- color: #fff;
- }
- .ace_tooltip:focus {
- outline: 1px solid #5E9ED6;
- }
- .ace_icon {
- display: inline-block;
- width: 18px;
- vertical-align: top;
- }
- .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_screenreader-only {
- position:absolute;
- left:-10000px;
- top:auto;
- width:1px;
- height:1px;
- overflow:hidden;
- }`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(M,k,B){var R=M("../lib/dom"),x=M("../lib/oop"),A=M("../lib/event_emitter").EventEmitter,l=function(){function c(r,i){this.canvas=R.createElement("canvas"),this.renderer=i,this.pixelRatio=1,this.maxHeight=i.layerConfig.maxHeight,this.lineHeight=i.layerConfig.lineHeight,this.canvasHeight=r.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=r.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)"},r.element.appendChild(this.canvas)}return c.prototype.$updateDecorators=function(r){var i=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(r){this.maxHeight=r.maxHeight,this.lineHeight=r.lineHeight,this.canvasHeight=r.height;var n=(r.lastRow+1)*this.lineHeight;n<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight}var t=this.canvas.getContext("2d");function e($,b){return $.priority<b.priority?-1:$.priority>b.priority?1:0}var o=this.renderer.session.$annotations;if(t.clearRect(0,0,this.canvas.width,this.canvas.height),o){var s={info:1,warning:2,error:3};o.forEach(function($){$.priority=s[$.type]||null}),o=o.sort(e);for(var h=this.renderer.session.$foldData,f=0;f<o.length;f++){var L=o[f].row,w=this.compensateFoldRows(L,h),d=Math.round((L-w)*this.lineHeight*this.heightRatio),a=Math.round((L-w)*this.lineHeight*this.heightRatio),m=Math.round(((L-w)*this.lineHeight+this.lineHeight)*this.heightRatio),g=m-a;if(g<this.minDecorationHeight){var v=(a+m)/2|0;v<this.halfMinDecorationHeight?v=this.halfMinDecorationHeight:v+this.halfMinDecorationHeight>this.canvasHeight&&(v=this.canvasHeight-this.halfMinDecorationHeight),a=Math.round(v-this.halfMinDecorationHeight),m=Math.round(v+this.halfMinDecorationHeight)}t.fillStyle=i[o[f].type]||null,t.fillRect(0,d,this.canvasWidth,m-a)}}var C=this.renderer.session.selection.getCursor();if(C){var w=this.compensateFoldRows(C.row,h),d=Math.round((C.row-w)*this.lineHeight*this.heightRatio);t.fillStyle="rgba(0, 0, 0, 0.5)",t.fillRect(0,d,this.canvasWidth,2)}},c.prototype.compensateFoldRows=function(r,i){var n=0;if(i&&i.length>0)for(var t=0;t<i.length;t++)r>i[t].start.row&&r<i[t].end.row?n+=r-i[t].start.row:r>=i[t].end.row&&(n+=i[t].end.row-i[t].start.row);return n},c}();x.implement(l.prototype,A),k.Decorator=l}),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(M,k,B){var R=M("./lib/oop"),x=M("./lib/dom"),A=M("./lib/lang"),l=M("./config"),c=M("./layer/gutter").Gutter,r=M("./layer/marker").Marker,i=M("./layer/text").Text,n=M("./layer/cursor").Cursor,t=M("./scrollbar").HScrollBar,e=M("./scrollbar").VScrollBar,o=M("./scrollbar_custom").HScrollBar,s=M("./scrollbar_custom").VScrollBar,h=M("./renderloop").RenderLoop,f=M("./layer/font_metrics").FontMetrics,L=M("./lib/event_emitter").EventEmitter,w=M("./css/editor-css"),d=M("./layer/decorators").Decorator,a=M("./lib/useragent");x.importCssString(w,"ace_editor.css",!1);var m=function(){function g(v,C){var $=this;this.container=v||x.createElement("div"),x.addCssClass(this.container,"ace_editor"),x.HI_DPI&&x.addCssClass(this.container,"ace_hidpi"),this.setTheme(C),l.get("useStrictCSP")==null&&l.set("useStrictCSP",!1),this.$gutter=x.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=x.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=x.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new c(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new r(this.content);var b=this.$textLayer=new i(this.content);this.canvas=b.element,this.$markerFront=new r(this.content),this.$cursorLayer=new n(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new e(this.container,this),this.scrollBarH=new t(this.container,this),this.scrollBarV.on("scroll",function(p){$.$scrollAnimation||$.session.setScrollTop(p.data-$.scrollMargin.top)}),this.scrollBarH.on("scroll",function(p){$.$scrollAnimation||$.session.setScrollLeft(p.data-$.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new f(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(p){$.updateCharacterSize(),$.onResize(!0,$.gutterWidth,$.$size.width,$.$size.height),$._signal("changeCharacterSize",p)}),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=!a.isIOS,this.$loop=new h(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),l.resetOptions(this),l._signal("renderer",this)}return g.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(),x.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},g.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))},g.prototype.updateLines=function(v,C,$){if(C===void 0&&(C=1/0),this.$changedLines?(this.$changedLines.firstRow>v&&(this.$changedLines.firstRow=v),this.$changedLines.lastRow<C&&(this.$changedLines.lastRow=C)):this.$changedLines={firstRow:v,lastRow:C},this.$changedLines.lastRow<this.layerConfig.firstRow)if($)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},g.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},g.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},g.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},g.prototype.updateFull=function(v){v?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},g.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},g.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},g.prototype.onResize=function(v,C,$,b){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=v?1:0;var p=this.container;b||(b=p.clientHeight||p.scrollHeight),$||($=p.clientWidth||p.scrollWidth);var u=this.$updateCachedSize(v,C,$,b);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!$&&!b)return this.resizing=0;v&&(this.$gutterLayer.$padding=null),v?this.$renderChanges(u|this.$changes,!0):this.$loop.schedule(u|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},g.prototype.$updateCachedSize=function(v,C,$,b){b-=this.$extraHeight||0;var p=0,u=this.$size,y={width:u.width,height:u.height,scrollerHeight:u.scrollerHeight,scrollerWidth:u.scrollerWidth};if(b&&(v||u.height!=b)&&(u.height=b,p|=this.CHANGE_SIZE,u.scrollerHeight=u.height,this.$horizScroll&&(u.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(u.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",p=p|this.CHANGE_SCROLL),$&&(v||u.width!=$)){p|=this.CHANGE_SIZE,u.width=$,C==null&&(C=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=C,x.setStyle(this.scrollBarH.element.style,"left",C+"px"),x.setStyle(this.scroller.style,"left",C+this.margin.left+"px"),u.scrollerWidth=Math.max(0,$-C-this.scrollBarV.getWidth()-this.margin.h),x.setStyle(this.$gutter.style,"left",this.margin.left+"px");var S=this.scrollBarV.getWidth()+"px";x.setStyle(this.scrollBarH.element.style,"right",S),x.setStyle(this.scroller.style,"right",S),x.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(u.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||v)&&(p|=this.CHANGE_FULL)}return u.$dirty=!$||!b,p&&this._signal("resize",y),p},g.prototype.onGutterResize=function(v){var C=this.$showGutter?v:0;C!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,C,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()},g.prototype.adjustWrapLimit=function(){var v=this.$size.scrollerWidth-this.$padding*2,C=Math.floor(v/this.characterWidth);return this.session.adjustWrapLimit(C,this.$showPrintMargin&&this.$printMarginColumn)},g.prototype.setAnimatedScroll=function(v){this.setOption("animatedScroll",v)},g.prototype.getAnimatedScroll=function(){return this.$animatedScroll},g.prototype.setShowInvisibles=function(v){this.setOption("showInvisibles",v),this.session.$bidiHandler.setShowInvisibles(v)},g.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},g.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},g.prototype.setDisplayIndentGuides=function(v){this.setOption("displayIndentGuides",v)},g.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},g.prototype.setHighlightIndentGuides=function(v){this.setOption("highlightIndentGuides",v)},g.prototype.setShowPrintMargin=function(v){this.setOption("showPrintMargin",v)},g.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},g.prototype.setPrintMarginColumn=function(v){this.setOption("printMarginColumn",v)},g.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},g.prototype.getShowGutter=function(){return this.getOption("showGutter")},g.prototype.setShowGutter=function(v){return this.setOption("showGutter",v)},g.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},g.prototype.setFadeFoldWidgets=function(v){this.setOption("fadeFoldWidgets",v)},g.prototype.setHighlightGutterLine=function(v){this.setOption("highlightGutterLine",v)},g.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},g.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var v=x.createElement("div");v.className="ace_layer ace_print-margin-layer",this.$printMarginEl=x.createElement("div"),this.$printMarginEl.className="ace_print-margin",v.appendChild(this.$printMarginEl),this.content.insertBefore(v,this.content.firstChild)}var C=this.$printMarginEl.style;C.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",C.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},g.prototype.getContainerElement=function(){return this.container},g.prototype.getMouseEventTarget=function(){return this.scroller},g.prototype.getTextAreaContainer=function(){return this.container},g.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var v=this.textarea.style,C=this.$composition;if(!this.$keepTextAreaAtCursor&&!C){x.translate(this.textarea,-100,0);return}var $=this.$cursorLayer.$pixelPos;if(!!$){C&&C.markerRange&&($=this.$cursorLayer.getPixelPosition(C.markerRange.start,!0));var b=this.layerConfig,p=$.top,u=$.left;p-=b.offset;var y=C&&C.useTextareaForIME||a.isMobile?this.lineHeight:1;if(p<0||p>b.height-y){x.translate(this.textarea,0,0);return}var S=1,T=this.$size.height-y;if(!C)p+=this.lineHeight;else if(C.useTextareaForIME){var E=this.textarea.value;S=this.characterWidth*this.session.$getStringScreenWidth(E)[0]}else p+=this.lineHeight+2;u-=this.scrollLeft,u>this.$size.scrollerWidth-S&&(u=this.$size.scrollerWidth-S),u+=this.gutterWidth+this.margin.left,x.setStyle(v,"height",y+"px"),x.setStyle(v,"width",S+"px"),x.translate(this.textarea,Math.min(u,this.$size.scrollerWidth-S),Math.min(p,T))}}},g.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},g.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},g.prototype.getLastFullyVisibleRow=function(){var v=this.layerConfig,C=v.lastRow,$=this.session.documentToScreenRow(C,0)*v.lineHeight;return $-this.session.getScrollTop()>v.height-v.lineHeight?C-1:C},g.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},g.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()},g.prototype.setScrollMargin=function(v,C,$,b){var p=this.scrollMargin;p.top=v|0,p.bottom=C|0,p.right=b|0,p.left=$|0,p.v=p.top+p.bottom,p.h=p.left+p.right,p.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-p.top),this.updateFull()},g.prototype.setMargin=function(v,C,$,b){var p=this.margin;p.top=v|0,p.bottom=C|0,p.right=b|0,p.left=$|0,p.v=p.top+p.bottom,p.h=p.left+p.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},g.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},g.prototype.setHScrollBarAlwaysVisible=function(v){this.setOption("hScrollBarAlwaysVisible",v)},g.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},g.prototype.setVScrollBarAlwaysVisible=function(v){this.setOption("vScrollBarAlwaysVisible",v)},g.prototype.$updateScrollBarV=function(){var v=this.layerConfig.maxHeight,C=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(v-=(C-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>v-C&&(v=this.scrollTop+C,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(v+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},g.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},g.prototype.freeze=function(){this.$frozen=!0},g.prototype.unfreeze=function(){this.$frozen=!1},g.prototype.$renderChanges=function(v,C){if(this.$changes&&(v|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!v&&!C){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 $=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(),$.firstRow!=this.layerConfig.firstRow&&$.firstRowScreen==this.layerConfig.firstRowScreen){var b=this.scrollTop+($.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;b>0&&(this.scrollTop=b,v=v|this.CHANGE_SCROLL,v|=this.$computeLayerConfig()|this.$loop.clear())}$=this.layerConfig,this.$updateScrollBarV(),v&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),x.translate(this.content,-this.scrollLeft,-$.offset);var p=$.width+2*this.$padding+"px",u=$.minHeight+"px";x.setStyle(this.content.style,"width",p),x.setStyle(this.content.style,"height",u)}if(v&this.CHANGE_H_SCROLL&&(x.translate(this.content,-this.scrollLeft,-$.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),v&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update($),this.$showGutter&&this.$gutterLayer.update($),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators($),this.$markerBack.update($),this.$markerFront.update($),this.$cursorLayer.update($),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($):this.$textLayer.scrollLines($),this.$showGutter&&(v&this.CHANGE_GUTTER||v&this.CHANGE_LINES?this.$gutterLayer.update($):this.$gutterLayer.scrollLines($)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators($),this.$markerBack.update($),this.$markerFront.update($),this.$cursorLayer.update($),this.$moveTextAreaToCursor(),this._signal("afterRender",v);return}v&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update($),this.$showGutter&&this.$gutterLayer.update($),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators($)):v&this.CHANGE_LINES?((this.$updateLines()||v&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update($),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators($)):v&this.CHANGE_TEXT||v&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update($),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators($)):v&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight($),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators($)),v&this.CHANGE_CURSOR&&(this.$cursorLayer.update($),this.$moveTextAreaToCursor()),v&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update($),v&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update($),this._signal("afterRender",v)},g.prototype.$autosize=function(){var v=this.session.getScreenLength()*this.lineHeight,C=this.$maxLines*this.lineHeight,$=Math.min(C,Math.max((this.$minLines||1)*this.lineHeight,v))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&($+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&$>this.$maxPixelHeight&&($=this.$maxPixelHeight);var b=$<=2*this.lineHeight,p=!b&&v>C;if($!=this.desiredHeight||this.$size.height!=this.desiredHeight||p!=this.$vScroll){p!=this.$vScroll&&(this.$vScroll=p,this.scrollBarV.setVisible(p));var u=this.container.clientWidth;this.container.style.height=$+"px",this.$updateCachedSize(!0,this.$gutterWidth,u,$),this.desiredHeight=$,this._signal("autosize")}},g.prototype.$computeLayerConfig=function(){var v=this.session,C=this.$size,$=C.height<=2*this.lineHeight,b=this.session.getScreenLength(),p=b*this.lineHeight,u=this.$getLongestLine(),y=!$&&(this.$hScrollBarAlwaysVisible||C.scrollerWidth-u-2*this.$padding<0),S=this.$horizScroll!==y;S&&(this.$horizScroll=y,this.scrollBarH.setVisible(y));var T=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var E=C.scrollerHeight+this.lineHeight,_=!this.$maxLines&&this.$scrollPastEnd?(C.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;p+=_;var I=this.scrollMargin;this.session.setScrollTop(Math.max(-I.top,Math.min(this.scrollTop,p-C.scrollerHeight+I.bottom))),this.session.setScrollLeft(Math.max(-I.left,Math.min(this.scrollLeft,u+2*this.$padding-C.scrollerWidth+I.right)));var D=!$&&(this.$vScrollBarAlwaysVisible||C.scrollerHeight-p+_<0||this.scrollTop>I.top),H=T!==D;H&&(this.$vScroll=D,this.scrollBarV.setVisible(D));var O=this.scrollTop%this.lineHeight,F=Math.ceil(E/this.lineHeight)-1,W=Math.max(0,Math.round((this.scrollTop-O)/this.lineHeight)),N=W+F,P,V,U=this.lineHeight;W=v.screenToDocumentRow(W,0);var G=v.getFoldLine(W);G&&(W=G.start.row),P=v.documentToScreenRow(W,0),V=v.getRowLength(W)*U,N=Math.min(v.screenToDocumentRow(N,0),v.getLength()-1),E=C.scrollerHeight+v.getRowLength(N)*U+V,O=this.scrollTop-P*U;var X=0;return(this.layerConfig.width!=u||S)&&(X=this.CHANGE_H_SCROLL),(S||H)&&(X|=this.$updateCachedSize(!0,this.gutterWidth,C.width,C.height),this._signal("scrollbarVisibilityChanged"),H&&(u=this.$getLongestLine())),this.layerConfig={width:u,padding:this.$padding,firstRow:W,firstRowScreen:P,lastRow:N,lineHeight:U,characterWidth:this.characterWidth,minHeight:E,maxHeight:p,offset:O,gutterOffset:U?Math.max(0,Math.ceil((O+C.height-C.scrollerHeight)/U)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(u-this.$padding),X},g.prototype.$updateLines=function(){if(!!this.$changedLines){var v=this.$changedLines.firstRow,C=this.$changedLines.lastRow;this.$changedLines=null;var $=this.layerConfig;if(!(v>$.lastRow+1)&&!(C<$.firstRow)){if(C===1/0){this.$showGutter&&this.$gutterLayer.update($),this.$textLayer.update($);return}return this.$textLayer.updateLines($,v,C),!0}}},g.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))},g.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},g.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},g.prototype.addGutterDecoration=function(v,C){this.$gutterLayer.addGutterDecoration(v,C)},g.prototype.removeGutterDecoration=function(v,C){this.$gutterLayer.removeGutterDecoration(v,C)},g.prototype.updateBreakpoints=function(v){this._rows=v,this.$loop.schedule(this.CHANGE_GUTTER)},g.prototype.setAnnotations=function(v){this.$gutterLayer.setAnnotations(v),this.$loop.schedule(this.CHANGE_GUTTER)},g.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},g.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},g.prototype.showCursor=function(){this.$cursorLayer.showCursor()},g.prototype.scrollSelectionIntoView=function(v,C,$){this.scrollCursorIntoView(v,$),this.scrollCursorIntoView(C,$)},g.prototype.scrollCursorIntoView=function(v,C,$){if(this.$size.scrollerHeight!==0){var b=this.$cursorLayer.getPixelPosition(v),p=b.left,u=b.top,y=$&&$.top||0,S=$&&$.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var T=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;T+y>u?(C&&T+y>u+this.lineHeight&&(u-=C*this.$size.scrollerHeight),u===0&&(u=-this.scrollMargin.top),this.session.setScrollTop(u)):T+this.$size.scrollerHeight-S<u+this.lineHeight&&(C&&T+this.$size.scrollerHeight-S<u-this.lineHeight&&(u+=C*this.$size.scrollerHeight),this.session.setScrollTop(u+this.lineHeight+S-this.$size.scrollerHeight));var E=this.scrollLeft,_=2*this.layerConfig.characterWidth;p-_<E?(p-=_,p<this.$padding+_&&(p=-this.scrollMargin.left),this.session.setScrollLeft(p)):(p+=_,E+this.$size.scrollerWidth<p+this.characterWidth?this.session.setScrollLeft(Math.round(p+this.characterWidth-this.$size.scrollerWidth)):E<=this.$padding&&p-E<this.characterWidth&&this.session.setScrollLeft(0))}},g.prototype.getScrollTop=function(){return this.session.getScrollTop()},g.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},g.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},g.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},g.prototype.scrollToRow=function(v){this.session.setScrollTop(v*this.lineHeight)},g.prototype.alignCursor=function(v,C){typeof v=="number"&&(v={row:v,column:0});var $=this.$cursorLayer.getPixelPosition(v),b=this.$size.scrollerHeight-this.lineHeight,p=$.top-b*(C||0);return this.session.setScrollTop(p),p},g.prototype.$calcSteps=function(v,C){var $=0,b=this.STEPS,p=[],u=function(y,S,T){return T*(Math.pow(y-1,3)+1)+S};for($=0;$<b;++$)p.push(u($/this.STEPS,v,C-v));return p},g.prototype.scrollToLine=function(v,C,$,b){var p=this.$cursorLayer.getPixelPosition({row:v,column:0}),u=p.top;C&&(u-=this.$size.scrollerHeight/2);var y=this.scrollTop;this.session.setScrollTop(u),$!==!1&&this.animateScrolling(y,b)},g.prototype.animateScrolling=function(v,C){var $=this.scrollTop;if(!this.$animatedScroll)return;var b=this;if(v==$)return;if(this.$scrollAnimation){var p=this.$scrollAnimation.steps;if(p.length&&(v=p[0],v==$))return}var u=b.$calcSteps(v,$);this.$scrollAnimation={from:v,to:$,steps:u},clearInterval(this.$timer),b.session.setScrollTop(u.shift()),b.session.$scrollTop=$;function y(){b.$timer=clearInterval(b.$timer),b.$scrollAnimation=null,b.$stopAnimation=!1,C&&C()}this.$timer=setInterval(function(){if(b.$stopAnimation){y();return}if(!b.session)return clearInterval(b.$timer);u.length?(b.session.setScrollTop(u.shift()),b.session.$scrollTop=$):$!=null?(b.session.$scrollTop=-1,b.session.setScrollTop($),$=null):y()},10)},g.prototype.scrollToY=function(v){this.scrollTop!==v&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=v)},g.prototype.scrollToX=function(v){this.scrollLeft!==v&&(this.scrollLeft=v),this.$loop.schedule(this.CHANGE_H_SCROLL)},g.prototype.scrollTo=function(v,C){this.session.setScrollTop(C),this.session.setScrollLeft(v)},g.prototype.scrollBy=function(v,C){C&&this.session.setScrollTop(this.session.getScrollTop()+C),v&&this.session.setScrollLeft(this.session.getScrollLeft()+v)},g.prototype.isScrollableBy=function(v,C){if(C<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||C>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},g.prototype.pixelToScreenCoordinates=function(v,C){var $;if(this.$hasCssTransforms){$={top:0,left:0};var b=this.$fontMetrics.transformCoordinates([v,C]);v=b[1]-this.gutterWidth-this.margin.left,C=b[0]}else $=this.scroller.getBoundingClientRect();var p=v+this.scrollLeft-$.left-this.$padding,u=p/this.characterWidth,y=Math.floor((C+this.scrollTop-$.top)/this.lineHeight),S=this.$blockCursor?Math.floor(u):Math.round(u);return{row:y,column:S,side:u-S>0?1:-1,offsetX:p}},g.prototype.screenToTextCoordinates=function(v,C){var $;if(this.$hasCssTransforms){$={top:0,left:0};var b=this.$fontMetrics.transformCoordinates([v,C]);v=b[1]-this.gutterWidth-this.margin.left,C=b[0]}else $=this.scroller.getBoundingClientRect();var p=v+this.scrollLeft-$.left-this.$padding,u=p/this.characterWidth,y=this.$blockCursor?Math.floor(u):Math.round(u),S=Math.floor((C+this.scrollTop-$.top)/this.lineHeight);return this.session.screenToDocumentPosition(S,Math.max(y,0),p)},g.prototype.textToScreenCoordinates=function(v,C){var $=this.scroller.getBoundingClientRect(),b=this.session.documentToScreenPosition(v,C),p=this.$padding+(this.session.$bidiHandler.isBidiRow(b.row,v)?this.session.$bidiHandler.getPosLeft(b.column):Math.round(b.column*this.characterWidth)),u=b.row*this.lineHeight;return{pageX:$.left+p-this.scrollLeft,pageY:$.top+u-this.scrollTop}},g.prototype.visualizeFocus=function(){x.addCssClass(this.container,"ace_focus")},g.prototype.visualizeBlur=function(){x.removeCssClass(this.container,"ace_focus")},g.prototype.showComposition=function(v){this.$composition=v,v.cssText||(v.cssText=this.textarea.style.cssText),v.useTextareaForIME==null&&(v.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(x.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")},g.prototype.setCompositionText=function(v){var C=this.session.selection.cursor;this.addToken(v,"composition_placeholder",C.row,C.column),this.$moveTextAreaToCursor()},g.prototype.hideComposition=function(){if(!!this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),x.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=""}},g.prototype.setGhostText=function(v,C){var $=this.session.selection.cursor,b=C||{row:$.row,column:$.column};this.removeGhostText();var p=v.split(`
- `);if(this.addToken(p[0],"ghost_text",b.row,b.column),this.$ghostText={text:v,position:{row:b.row,column:b.column}},p.length>1){this.$ghostTextWidget={text:p.slice(1).join(`
- `),row:b.row,column:b.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var u=this.$cursorLayer.getPixelPosition(b,!0),y=this.container,S=y.getBoundingClientRect().height,T=p.length*this.lineHeight,E=T<S-u.top;if(E)return;T<S?this.scrollBy(0,(p.length-1)*this.lineHeight):this.scrollBy(0,u.top)}},g.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}},g.prototype.addToken=function(v,C,$,b){var p=this.session;p.bgTokenizer.lines[$]=null;var u={type:C,value:v},y=p.getTokens($);if(b==null||!y.length)y.push(u);else for(var S=0,T=0;T<y.length;T++){var E=y[T];if(S+=E.value.length,b<=S){var _=E.value.length-(S-b),I=E.value.slice(0,_),D=E.value.slice(_);y.splice(T,1,{type:E.type,value:I},u,{type:E.type,value:D});break}}this.updateLines($,$)},g.prototype.removeExtraToken=function(v,C){this.session.bgTokenizer.lines[v]=null,this.updateLines(v,v)},g.prototype.setTheme=function(v,C){var $=this;if(this.$themeId=v,$._dispatchEvent("themeChange",{theme:v}),!v||typeof v=="string"){var b=v||this.$options.theme.initialValue;l.loadModule(["theme",b],p)}else p(v);function p(u){if($.$themeId!=v)return C&&C();if(!u||!u.cssClass)throw new Error("couldn't load module "+v+" or it didn't call define");u.$id&&($.$themeId=u.$id),x.importCssString(u.cssText,u.cssClass,$.container),$.theme&&x.removeCssClass($.container,$.theme.cssClass);var y="padding"in u?u.padding:"padding"in($.theme||{})?4:$.$padding;$.$padding&&y!=$.$padding&&$.setPadding(y),$.$theme=u.cssClass,$.theme=u,x.addCssClass($.container,u.cssClass),x.setCssClass($.container,"ace_dark",u.isDark),$.$size&&($.$size.width=0,$.$updateSizeAsync()),$._dispatchEvent("themeLoaded",{theme:u}),C&&C()}},g.prototype.getTheme=function(){return this.$themeId},g.prototype.setStyle=function(v,C){x.setCssClass(this.container,v,C!==!1)},g.prototype.unsetStyle=function(v){x.removeCssClass(this.container,v)},g.prototype.setCursorStyle=function(v){x.setStyle(this.scroller.style,"cursor",v)},g.prototype.setMouseCursor=function(v){x.setStyle(this.scroller.style,"cursor",v)},g.prototype.attachToShadowRoot=function(){x.importCssString(w,"ace_editor.css",this.container)},g.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},g.prototype.$updateCustomScrollbar=function(v){var C=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,v===!0?(this.scrollBarV=new s(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($){C.$scrollAnimation||C.session.setScrollTop($.data-C.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function($){C.$scrollAnimation||C.session.setScrollLeft($.data-C.scrollMargin.left)}),this.$scrollDecorator=new d(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new e(this.container,this),this.scrollBarH=new t(this.container,this),this.scrollBarV.addEventListener("scroll",function($){C.$scrollAnimation||C.session.setScrollTop($.data-C.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function($){C.$scrollAnimation||C.session.setScrollLeft($.data-C.scrollMargin.left)}))},g.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var v=this;this.$resizeTimer=A.delayedCall(function(){v.destroyed||v.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(C){var $=C[0].contentRect.width,b=C[0].contentRect.height;Math.abs(v.$size.width-$)>1||Math.abs(v.$size.height-b)>1?v.$resizeTimer.delay():v.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},g}();m.prototype.CHANGE_CURSOR=1,m.prototype.CHANGE_MARKER=2,m.prototype.CHANGE_GUTTER=4,m.prototype.CHANGE_SCROLL=8,m.prototype.CHANGE_LINES=16,m.prototype.CHANGE_TEXT=32,m.prototype.CHANGE_SIZE=64,m.prototype.CHANGE_MARKER_BACK=128,m.prototype.CHANGE_MARKER_FRONT=256,m.prototype.CHANGE_FULL=512,m.prototype.CHANGE_H_SCROLL=1024,m.prototype.$changes=0,m.prototype.$padding=null,m.prototype.$frozen=!1,m.prototype.STEPS=8,R.implement(m.prototype,L),l.defineOptions(m.prototype,"renderer",{useResizeObserver:{set:function(g){!g&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):g&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(g){this.$textLayer.setShowInvisibles(g)&&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(g){typeof g=="number"&&(this.$printMarginColumn=g),this.$showPrintMargin=!!g,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(g){this.$gutter.style.display=g?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(g){this.$gutterLayer.$useSvgGutterIcons=g},initialValue:!1},showFoldedAnnotations:{set:function(g){this.$gutterLayer.$showFoldedAnnotations=g},initialValue:!1},fadeFoldWidgets:{set:function(g){x.setCssClass(this.$gutter,"ace_fade-fold-widgets",g)},initialValue:!1},showFoldWidgets:{set:function(g){this.$gutterLayer.setShowFoldWidgets(g),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(g){this.$textLayer.setDisplayIndentGuides(g)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(g){this.$textLayer.setHighlightIndentGuides(g)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(g){this.$gutterLayer.setHighlightGutterLine(g),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(g){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(g){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(g){typeof g=="number"&&(g=g+"px"),this.container.style.fontSize=g,this.updateFontSize()},initialValue:12},fontFamily:{set:function(g){this.container.style.fontFamily=g,this.updateFontSize()}},maxLines:{set:function(g){this.updateFull()}},minLines:{set:function(g){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(g){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(g){g=+g||0,this.$scrollPastEnd!=g&&(this.$scrollPastEnd=g,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(g){this.$gutterLayer.$fixedWidth=!!g,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(g){this.$updateCustomScrollbar(g)},initialValue:!1},theme:{set:function(g){this.setTheme(g)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!a.isMobile&&!a.isIE}}),k.VirtualRenderer=m}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(M,k,B){var R=M("../lib/oop"),x=M("../lib/net"),A=M("../lib/event_emitter").EventEmitter,l=M("../config");function c(t){var e="importScripts('"+x.qualifyURL(t)+"');";try{return new Blob([e],{type:"application/javascript"})}catch(h){var o=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,s=new o;return s.append(e),s.getBlob("application/javascript")}}function r(t){if(typeof Worker=="undefined")return{postMessage:function(){},terminate:function(){}};if(l.get("loadWorkerFromBlob")){var e=c(t),o=window.URL||window.webkitURL,s=o.createObjectURL(e);return new Worker(s)}return new Worker(t)}var i=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,A),this.$createWorkerFromOldConfig=function(t,e,o,s,h){if(M.nameToUrl&&!M.toUrl&&(M.toUrl=M.nameToUrl),l.get("packaged")||!M.toUrl)s=s||l.moduleUrl(e,"worker");else{var f=this.$normalizePath;s=s||f(M.toUrl("ace/worker/worker.js",null,"_"));var L={};t.forEach(function(w){L[w]=f(M.toUrl(w,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=r(s),h&&this.send("importScripts",h),this.$worker.postMessage({init:!0,tlns:L,module:e,classname:o}),this.$worker},this.onMessage=function(t){var e=t.data;switch(e.type){case"event":this._signal(e.name,{data:e.data});break;case"call":var o=this.callbacks[e.id];o&&(o(e.data),delete this.callbacks[e.id]);break;case"error":this.reportError(e.data);break;case"log":window.console&&console.log&&console.log.apply(console,e.data);break}},this.reportError=function(t){window.console&&console.error&&console.error(t)},this.$normalizePath=function(t){return x.qualifyURL(t)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(t){t.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(t,e){this.$worker.postMessage({command:t,args:e})},this.call=function(t,e,o){if(o){var s=this.callbackId++;this.callbacks[s]=o,e.push(s)}this.send(t,e)},this.emit=function(t,e){try{e.data&&e.data.err&&(e.data.err={message:e.data.err.message,stack:e.data.err.stack,code:e.data.err.code}),this.$worker&&this.$worker.postMessage({event:t,data:{data:e.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(i.prototype);var n=function(t,e,o){var s=null,h=!1,f=Object.create(A),L=[],w=new i({messageBuffer:L,terminate:function(){},postMessage:function(a){L.push(a),s&&(h?setTimeout(d):d())}});w.setEmitSync=function(a){h=a};var d=function(){var a=L.shift();a.command?s[a.command].apply(s,a.args):a.event&&f._signal(a.event,a.data)};return f.postMessage=function(a){w.onMessage({data:a})},f.callback=function(a,m){this.postMessage({type:"call",id:m,data:a})},f.emit=function(a,m){this.postMessage({type:"event",name:a,data:m})},l.loadModule(["worker",e],function(a){for(s=new a[o](f);L.length;)d()}),w};k.UIWorkerClient=n,k.WorkerClient=i,k.createWorker=r}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(M,k,B){var R=M("./range").Range,x=M("./lib/event_emitter").EventEmitter,A=M("./lib/oop"),l=function(){function c(r,i,n,t,e,o){var s=this;this.length=i,this.session=r,this.doc=r.getDocument(),this.mainClass=e,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=t,this.$onCursorChange=function(){setTimeout(function(){s.onCursorChange()})},this.$pos=n;var h=r.getUndoManager().$undoStack||r.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=h.length,this.setup(),r.selection.on("changeCursor",this.$onCursorChange)}return c.prototype.setup=function(){var r=this,i=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=i.createAnchor(this.$pos.row,this.$pos.column);var t=this.pos;t.$insertRight=!0,t.detach(),t.markerId=n.addMarker(new R(t.row,t.column,t.row,t.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(e){var o=i.createAnchor(e.row,e.column);o.$insertRight=!0,o.detach(),r.others.push(o)}),n.setUndoSelect(!1)},c.prototype.showOtherMarkers=function(){if(!this.othersActive){var r=this.session,i=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=r.addMarker(new R(n.row,n.column,n.row,n.column+i.length),i.othersClass,null,!1)})}},c.prototype.hideOtherMarkers=function(){if(!!this.othersActive){this.othersActive=!1;for(var r=0;r<this.others.length;r++)this.session.removeMarker(this.others[r].markerId)}},c.prototype.onUpdate=function(r){if(this.$updating)return this.updateAnchors(r);var i=r;if(i.start.row===i.end.row&&i.start.row===this.pos.row){this.$updating=!0;var n=r.action==="insert"?i.end.column-i.start.column:i.start.column-i.end.column,t=i.start.column>=this.pos.column&&i.start.column<=this.pos.column+this.length+1,e=i.start.column-this.pos.column;if(this.updateAnchors(r),t&&(this.length+=n),t&&!this.session.$fromUndo){if(r.action==="insert")for(var o=this.others.length-1;o>=0;o--){var s=this.others[o],h={row:s.row,column:s.column+e};this.doc.insertMergedLines(h,r.lines)}else if(r.action==="remove")for(var o=this.others.length-1;o>=0;o--){var s=this.others[o],h={row:s.row,column:s.column+e};this.doc.remove(new R(h.row,h.column,h.row,h.column-n))}}this.$updating=!1,this.updateMarkers()}},c.prototype.updateAnchors=function(r){this.pos.onChange(r);for(var i=this.others.length;i--;)this.others[i].onChange(r);this.updateMarkers()},c.prototype.updateMarkers=function(){if(!this.$updating){var r=this,i=this.session,n=function(e,o){i.removeMarker(e.markerId),e.markerId=i.addMarker(new R(e.row,e.column,e.row,e.column+r.length),o,null,!1)};n(this.pos,this.mainClass);for(var t=this.others.length;t--;)n(this.others[t],this.othersClass)}},c.prototype.onCursorChange=function(r){if(!(this.$updating||!this.session)){var i=this.session.selection.getCursor();i.row===this.pos.row&&i.column>=this.pos.column&&i.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",r)):(this.hideOtherMarkers(),this._emit("cursorLeave",r))}},c.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},c.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var r=this.session.getUndoManager(),i=(r.$undoStack||r.$undostack).length-this.$undoStackDepth,n=0;n<i;n++)r.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},c}();A.implement(l.prototype,x),k.PlaceHolder=l}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(M,k,B){var R=M("../lib/event"),x=M("../lib/useragent");function A(c,r){return c.row==r.row&&c.column==r.column}function l(c){var r=c.domEvent,i=r.altKey,n=r.shiftKey,t=r.ctrlKey,e=c.getAccelKey(),o=c.getButton();if(t&&x.isMac&&(o=r.button),c.editor.inMultiSelectMode&&o==2){c.editor.textInput.onContextMenu(c.domEvent);return}if(!t&&!i&&!e){o===0&&c.editor.inMultiSelectMode&&c.editor.exitMultiSelectMode();return}if(o===0){var s=c.editor,h=s.selection,f=s.inMultiSelectMode,L=c.getDocumentPosition(),w=h.getCursor(),d=c.inSelection()||h.isEmpty()&&A(L,w),a=c.x,m=c.y,g=function(D){a=D.clientX,m=D.clientY},v=s.session,C=s.renderer.pixelToScreenCoordinates(a,m),$=C,b;if(s.$mouseHandler.$enableJumpToDef)t&&i||e&&i?b=n?"block":"add":i&&s.$blockSelectEnabled&&(b="block");else if(e&&!i){if(b="add",!f&&n)return}else i&&s.$blockSelectEnabled&&(b="block");if(b&&x.isMac&&r.ctrlKey&&s.$mouseHandler.cancelContextMenu(),b=="add"){if(!f&&d)return;if(!f){var p=h.toOrientedRange();s.addSelectionMarker(p)}var u=h.rangeList.rangeAtPoint(L);s.inVirtualSelectionMode=!0,n&&(u=null,p=h.ranges[0]||p,s.removeSelectionMarker(p)),s.once("mouseup",function(){var D=h.toOrientedRange();u&&D.isEmpty()&&A(u.cursor,D.cursor)?h.substractPoint(D.cursor):(n?h.substractPoint(p.cursor):p&&(s.removeSelectionMarker(p),h.addRange(p)),h.addRange(D)),s.inVirtualSelectionMode=!1})}else if(b=="block"){c.stop(),s.inVirtualSelectionMode=!0;var y,S=[],T=function(){var D=s.renderer.pixelToScreenCoordinates(a,m),H=v.screenToDocumentPosition(D.row,D.column,D.offsetX);A($,D)&&A(H,h.lead)||($=D,s.selection.moveToPosition(H),s.renderer.scrollCursorIntoView(),s.removeSelectionMarkers(S),S=h.rectangularRangeBlock($,C),s.$mouseHandler.$clickSelection&&S.length==1&&S[0].isEmpty()&&(S[0]=s.$mouseHandler.$clickSelection.clone()),S.forEach(s.addSelectionMarker,s),s.updateSelectionMarkers())};f&&!e?h.toSingleRange():!f&&e&&(y=h.toOrientedRange(),s.addSelectionMarker(y)),n?C=v.documentToScreenPosition(h.lead):h.moveToPosition(L),$={row:-1,column:-1};var E=function(D){T(),clearInterval(I),s.removeSelectionMarkers(S),S.length||(S=[h.toOrientedRange()]),y&&(s.removeSelectionMarker(y),h.toSingleRange(y));for(var H=0;H<S.length;H++)h.addRange(S[H]);s.inVirtualSelectionMode=!1,s.$mouseHandler.$clickSelection=null},_=T;R.capture(s.container,g,E);var I=setInterval(function(){_()},20);return c.preventDefault()}}}k.onMouseDown=l}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(M,k,B){k.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(x){x.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(x){x.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(x){x.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(x){x.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(x){x.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(x){x.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(x){x.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(x){x.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(x){x.multiSelect.rangeCount>1?x.multiSelect.joinSelections():x.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(x){x.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(x){x.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(x){x.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],k.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(x){x.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(x){return x&&x.inMultiSelectMode}}];var R=M("../keyboard/hash_handler").HashHandler;k.keyboardHandler=new R(k.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(M,k,B){var R=M("./range_list").RangeList,x=M("./range").Range,A=M("./selection").Selection,l=M("./mouse/multi_select_handler").onMouseDown,c=M("./lib/event"),r=M("./lib/lang"),i=M("./commands/multi_select_commands");k.commands=i.defaultCommands.concat(i.multiSelectCommands);var n=M("./search").Search,t=new n;function e(w,d,a){return t.$options.wrap=!0,t.$options.needle=d,t.$options.backwards=a==-1,t.find(w)}var o=M("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(o.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(w,d){if(!!w){if(!this.inMultiSelectMode&&this.rangeCount===0){var a=this.toOrientedRange();if(this.rangeList.add(a),this.rangeList.add(w),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),d||this.fromOrientedRange(w);this.rangeList.removeAll(),this.rangeList.add(a),this.$onAddRange(a)}w.cursor||(w.cursor=w.end);var m=this.rangeList.add(w);return this.$onAddRange(w),m.length&&this.$onRemoveRange(m),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),d||this.fromOrientedRange(w)}},this.toSingleRange=function(w){w=w||this.ranges[0];var d=this.rangeList.removeAll();d.length&&this.$onRemoveRange(d),w&&this.fromOrientedRange(w)},this.substractPoint=function(w){var d=this.rangeList.substractPoint(w);if(d)return this.$onRemoveRange(d),d[0]},this.mergeOverlappingRanges=function(){var w=this.rangeList.merge();w.length&&this.$onRemoveRange(w)},this.$onAddRange=function(w){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(w),this._signal("addRange",{range:w})},this.$onRemoveRange=function(w){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var d=this.rangeList.ranges.pop();w.push(d),this.rangeCount=0}for(var a=w.length;a--;){var m=this.ranges.indexOf(w[a]);this.ranges.splice(m,1)}this._signal("removeRange",{ranges:w}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),d=d||this.ranges[0],d&&!d.isEqual(this.getRange())&&this.fromOrientedRange(d)},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 w=this.ranges.length?this.ranges:[this.getRange()],d=[],a=0;a<w.length;a++){var m=w[a],g=m.start.row,v=m.end.row;if(g===v)d.push(m.clone());else{for(d.push(new x(g,m.start.column,g,this.session.getLine(g).length));++g<v;)d.push(this.getLineRange(g,!0));d.push(new x(v,0,v,m.end.column))}a==0&&!this.isBackwards()&&(d=d.reverse())}this.toSingleRange();for(var a=d.length;a--;)this.addRange(d[a])},this.joinSelections=function(){var w=this.rangeList.ranges,d=w[w.length-1],a=x.fromPoints(w[0].start,d.end);this.toSingleRange(),this.setSelectionRange(a,d.cursor==d.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var w=this.rangeList.ranges,d=w[w.length-1],a=x.fromPoints(w[0].start,d.end);this.toSingleRange(),this.setSelectionRange(a,d.cursor==d.start)}else{var m=this.session.documentToScreenPosition(this.cursor),g=this.session.documentToScreenPosition(this.anchor),v=this.rectangularRangeBlock(m,g);v.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(w,d,a){var m=[],g=w.column<d.column;if(g)var v=w.column,C=d.column,$=w.offsetX,b=d.offsetX;else var v=d.column,C=w.column,$=d.offsetX,b=w.offsetX;var p=w.row<d.row;if(p)var u=w.row,y=d.row;else var u=d.row,y=w.row;v<0&&(v=0),u<0&&(u=0),u==y&&(a=!0);for(var S,T=u;T<=y;T++){var E=x.fromPoints(this.session.screenToDocumentPosition(T,v,$),this.session.screenToDocumentPosition(T,C,b));if(E.isEmpty()){if(S&&h(E.end,S))break;S=E.end}E.cursor=g?E.start:E.end,m.push(E)}if(p&&m.reverse(),!a){for(var _=m.length-1;m[_].isEmpty()&&_>0;)_--;if(_>0)for(var I=0;m[I].isEmpty();)I++;for(var D=_;D>=I;D--)m[D].isEmpty()&&m.splice(D,1)}return m}}.call(A.prototype);var s=M("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(w){w.cursor||(w.cursor=w.end);var d=this.getSelectionStyle();return w.marker=this.session.addMarker(w,"ace_selection",d),this.session.$selectionMarkers.push(w),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,w},this.removeSelectionMarker=function(w){if(!!w.marker){this.session.removeMarker(w.marker);var d=this.session.$selectionMarkers.indexOf(w);d!=-1&&this.session.$selectionMarkers.splice(d,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(w){for(var d=this.session.$selectionMarkers,a=w.length;a--;){var m=w[a];if(!!m.marker){this.session.removeMarker(m.marker);var g=d.indexOf(m);g!=-1&&d.splice(g,1)}}this.session.selectionMarkerCount=d.length},this.$onAddRange=function(w){this.addSelectionMarker(w.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(w){this.removeSelectionMarkers(w.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(w){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(i.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(w){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(i.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(w){var d=w.command,a=w.editor;if(!!a.multiSelect){if(d.multiSelectAction)d.multiSelectAction=="forEach"?m=a.forEachSelection(d,w.args):d.multiSelectAction=="forEachLine"?m=a.forEachSelection(d,w.args,!0):d.multiSelectAction=="single"?(a.exitMultiSelectMode(),m=d.exec(a,w.args||{})):m=d.multiSelectAction(a,w.args||{});else{var m=d.exec(a,w.args||{});a.multiSelect.addRange(a.multiSelect.toOrientedRange()),a.multiSelect.mergeOverlappingRanges()}return m}},this.forEachSelection=function(w,d,a){if(!this.inVirtualSelectionMode){var m=a&&a.keepOrder,g=a==!0||a&&a.$byLines,v=this.session,C=this.selection,$=C.rangeList,b=(m?C:$).ranges,p;if(!b.length)return w.exec?w.exec(this,d||{}):w(this,d||{});var u=C._eventRegistry;C._eventRegistry={};var y=new A(v);this.inVirtualSelectionMode=!0;for(var S=b.length;S--;){if(g)for(;S>0&&b[S].start.row==b[S-1].end.row;)S--;y.fromOrientedRange(b[S]),y.index=S,this.selection=v.selection=y;var T=w.exec?w.exec(this,d||{}):w(this,d||{});!p&&T!==void 0&&(p=T),y.toOrientedRange(b[S])}y.detach(),this.selection=v.selection=C,this.inVirtualSelectionMode=!1,C._eventRegistry=u,C.mergeOverlappingRanges(),C.ranges[0]&&C.fromOrientedRange(C.ranges[0]);var E=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),E&&E.from==E.to&&this.renderer.animateScrolling(E.from),p}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var w="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var d=this.multiSelect.rangeList.ranges,a=[],m=0;m<d.length;m++)a.push(this.session.getTextRange(d[m]));var g=this.session.getDocument().getNewLineCharacter();w=a.join(g),w.length==(a.length-1)*g.length&&(w="")}else this.selection.isEmpty()||(w=this.session.getTextRange(this.getSelectionRange()));return w},this.$checkMultiselectChange=function(w,d){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var a=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&d==this.multiSelect.anchor)return;var m=d==this.multiSelect.anchor?a.cursor==a.start?a.end:a.start:a.cursor;m.row!=d.row||this.session.$clipPositionToDocument(m.row,m.column).column!=d.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(w,d,a){if(d=d||{},d.needle=w||d.needle,d.needle==null){var m=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();d.needle=this.session.getTextRange(m)}this.$search.set(d);var g=this.$search.findAll(this.session);if(!g.length)return 0;var v=this.multiSelect;a||v.toSingleRange(g[0]);for(var C=g.length;C--;)v.addRange(g[C],!0);return m&&v.rangeList.rangeAtPoint(m.start)&&v.addRange(m,!0),g.length},this.selectMoreLines=function(w,d){var a=this.selection.toOrientedRange(),m=a.cursor==a.end,g=this.session.documentToScreenPosition(a.cursor);this.selection.$desiredColumn&&(g.column=this.selection.$desiredColumn);var v=this.session.screenToDocumentPosition(g.row+w,g.column);if(a.isEmpty())var $=v;else var C=this.session.documentToScreenPosition(m?a.end:a.start),$=this.session.screenToDocumentPosition(C.row+w,C.column);if(m){var b=x.fromPoints(v,$);b.cursor=b.start}else{var b=x.fromPoints($,v);b.cursor=b.end}if(b.desiredColumn=g.column,!this.selection.inMultiSelectMode)this.selection.addRange(a);else if(d)var p=a.cursor;this.selection.addRange(b),p&&this.selection.substractPoint(p)},this.transposeSelections=function(w){for(var d=this.session,a=d.multiSelect,m=a.ranges,g=m.length;g--;){var v=m[g];if(v.isEmpty()){var C=d.getWordRange(v.start.row,v.start.column);v.start.row=C.start.row,v.start.column=C.start.column,v.end.row=C.end.row,v.end.column=C.end.column}}a.mergeOverlappingRanges();for(var $=[],g=m.length;g--;){var v=m[g];$.unshift(d.getTextRange(v))}w<0?$.unshift($.pop()):$.push($.shift());for(var g=m.length;g--;){var v=m[g],b=v.clone();d.replace(v,$[g]),v.start.row=b.start.row,v.start.column=b.start.column}a.fromOrientedRange(a.ranges[0])},this.selectMore=function(w,d,a){var m=this.session,g=m.multiSelect,v=g.toOrientedRange();if(!(v.isEmpty()&&(v=m.getWordRange(v.start.row,v.start.column),v.cursor=w==-1?v.start:v.end,this.multiSelect.addRange(v),a))){var C=m.getTextRange(v),$=e(m,C,w);$&&($.cursor=w==-1?$.start:$.end,this.session.unfold($),this.multiSelect.addRange($),this.renderer.scrollCursorIntoView(null,.5)),d&&this.multiSelect.substractPoint(v.cursor)}},this.alignCursors=function(){var w=this.session,d=w.multiSelect,a=d.ranges,m=-1,g=a.filter(function(_){if(_.cursor.row==m)return!0;m=_.cursor.row});if(!a.length||g.length==a.length-1){var v=this.selection.getRange(),C=v.start.row,$=v.end.row,b=C==$;if(b){var p=this.session.getLength(),u;do u=this.session.getLine($);while(/[=:]/.test(u)&&++$<p);do u=this.session.getLine(C);while(/[=:]/.test(u)&&--C>0);C<0&&(C=0),$>=p&&($=p-1)}var y=this.session.removeFullLines(C,$);y=this.$reAlignText(y,b),this.session.insert({row:C,column:0},y.join(`
- `)+`
- `),b||(v.start.column=0,v.end.column=y[y.length-1].length),this.selection.setRange(v)}else{g.forEach(function(_){d.substractPoint(_.cursor)});var S=0,T=1/0,E=a.map(function(_){var I=_.cursor,D=w.getLine(I.row),H=D.substr(I.column).search(/\S/g);return H==-1&&(H=0),I.column>S&&(S=I.column),H<T&&(T=H),H});a.forEach(function(_,I){var D=_.cursor,H=S-D.column,O=E[I]-T;H>O?w.insert(D,r.stringRepeat(" ",H-O)):w.remove(new x(D.row,D.column,D.row,D.column-H+O)),_.start.column=_.end.column=S,_.start.row=_.end.row=D.row,_.cursor=_.end}),d.fromOrientedRange(a[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(w,d){var a=!0,m=!0,g,v,C;return w.map(function(y){var S=y.match(/(\s*)(.*?)(\s*)([=:].*)/);return S?g==null?(g=S[1].length,v=S[2].length,C=S[3].length,S):(g+v+C!=S[1].length+S[2].length+S[3].length&&(m=!1),g!=S[1].length&&(a=!1),g>S[1].length&&(g=S[1].length),v<S[2].length&&(v=S[2].length),C>S[3].length&&(C=S[3].length),S):[y]}).map(d?b:a?m?p:b:u);function $(y){return r.stringRepeat(" ",y)}function b(y){return y[2]?$(g)+y[2]+$(v-y[2].length+C)+y[4].replace(/^([=:])\s+/,"$1 "):y[0]}function p(y){return y[2]?$(g+v-y[2].length)+y[2]+$(C)+y[4].replace(/^([=:])\s+/,"$1 "):y[0]}function u(y){return y[2]?$(g)+y[2]+$(C)+y[4].replace(/^([=:])\s+/,"$1 "):y[0]}}}).call(s.prototype);function h(w,d){return w.row==d.row&&w.column==d.column}k.onSessionChange=function(w){var d=w.session;d&&!d.multiSelect&&(d.$selectionMarkers=[],d.selection.$initRangeList(),d.multiSelect=d.selection),this.multiSelect=d&&d.multiSelect;var a=w.oldSession;a&&(a.multiSelect.off("addRange",this.$onAddRange),a.multiSelect.off("removeRange",this.$onRemoveRange),a.multiSelect.off("multiSelect",this.$onMultiSelect),a.multiSelect.off("singleSelect",this.$onSingleSelect),a.multiSelect.lead.off("change",this.$checkMultiselectChange),a.multiSelect.anchor.off("change",this.$checkMultiselectChange)),d&&(d.multiSelect.on("addRange",this.$onAddRange),d.multiSelect.on("removeRange",this.$onRemoveRange),d.multiSelect.on("multiSelect",this.$onMultiSelect),d.multiSelect.on("singleSelect",this.$onSingleSelect),d.multiSelect.lead.on("change",this.$checkMultiselectChange),d.multiSelect.anchor.on("change",this.$checkMultiselectChange)),d&&this.inMultiSelectMode!=d.selection.inMultiSelectMode&&(d.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function f(w){w.$multiselectOnSessionChange||(w.$onAddRange=w.$onAddRange.bind(w),w.$onRemoveRange=w.$onRemoveRange.bind(w),w.$onMultiSelect=w.$onMultiSelect.bind(w),w.$onSingleSelect=w.$onSingleSelect.bind(w),w.$multiselectOnSessionChange=k.onSessionChange.bind(w),w.$checkMultiselectChange=w.$checkMultiselectChange.bind(w),w.$multiselectOnSessionChange(w),w.on("changeSession",w.$multiselectOnSessionChange),w.on("mousedown",l),w.commands.addCommands(i.defaultCommands),L(w))}function L(w){if(!w.textInput)return;var d=w.textInput.getElement(),a=!1;c.addListener(d,"keydown",function(g){var v=g.keyCode==18&&!(g.ctrlKey||g.shiftKey||g.metaKey);w.$blockSelectEnabled&&v?a||(w.renderer.setMouseCursor("crosshair"),a=!0):a&&m()},w),c.addListener(d,"keyup",m,w),c.addListener(d,"blur",m,w);function m(g){a&&(w.renderer.setMouseCursor(""),a=!1)}}k.MultiSelect=f,M("./config").defineOptions(s.prototype,"editor",{enableMultiselect:{set:function(w){f(this),w?this.on("mousedown",l):this.off("mousedown",l)},value:!0},enableBlockSelect:{set:function(w){this.$blockSelectEnabled=w},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(M,k,B){var R=M("../../range").Range,x=k.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(A,l,c){var r=A.getLine(c);return this.foldingStartMarker.test(r)?"start":l=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(A,l,c){return null},this.indentationBlock=function(A,l,c){var r=/\S/,i=A.getLine(l),n=i.search(r);if(n!=-1){for(var t=c||i.length,e=A.getLength(),o=l,s=l;++l<e;){var h=A.getLine(l).search(r);if(h!=-1){if(h<=n){var f=A.getTokenAt(l,0);if(!f||f.type!=="string")break}s=l}}if(s>o){var L=A.getLine(s).length;return new R(o,t,s,L)}}},this.openingBracketBlock=function(A,l,c,r,i){var n={row:c,column:r+1},t=A.$findClosingBracket(l,n,i);if(!!t){var e=A.foldWidgets[t.row];return e==null&&(e=A.getFoldWidget(t.row)),e=="start"&&t.row>n.row&&(t.row--,t.column=A.getLine(t.row).length),R.fromPoints(n,t)}},this.closingBracketBlock=function(A,l,c,r,i){var n={row:c,column:r},t=A.$findOpeningBracket(l,n);if(!!t)return t.column++,n.column--,R.fromPoints(t,n)}}).call(x.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(M,k,B){var R=M("../line_widgets").LineWidgets,x=M("../lib/dom"),A=M("../range").Range,l=M("../config").nls;function c(i,n,t){for(var e=0,o=i.length-1;e<=o;){var s=e+o>>1,h=t(n,i[s]);if(h>0)e=s+1;else if(h<0)o=s-1;else return s}return-(e+1)}function r(i,n,t){var e=i.getAnnotations().sort(A.comparePoints);if(!!e.length){var o=c(e,{row:n,column:-1},A.comparePoints);o<0&&(o=-o-1),o>=e.length?o=t>0?0:e.length-1:o===0&&t<0&&(o=e.length-1);var s=e[o];if(!(!s||!t)){if(s.row===n){do s=e[o+=t];while(s&&s.row===n);if(!s)return e.slice()}var h=[];n=s.row;do h[t<0?"unshift":"push"](s),s=e[o+=t];while(s&&s.row==n);return h.length&&h}}}k.showErrorMarker=function(i,n){var t=i.session;t.widgetManager||(t.widgetManager=new R(t),t.widgetManager.attach(i));var e=i.getCursorPosition(),o=e.row,s=t.widgetManager.getWidgetsAtRow(o).filter(function(v){return v.type=="errorMarker"})[0];s?s.destroy():o-=n;var h=r(t,o,n),f;if(h){var L=h[0];e.column=(L.pos&&typeof L.column!="number"?L.pos.sc:L.column)||0,e.row=L.row,f=i.renderer.$gutterLayer.$annotations[e.row]}else{if(s)return;f={text:[l("Looks good!")],className:"ace_ok"}}i.session.unfold(e.row),i.selection.moveToPosition(e);var w={row:e.row,fixedWidth:!0,coverGutter:!0,el:x.createElement("div"),type:"errorMarker"},d=w.el.appendChild(x.createElement("div")),a=w.el.appendChild(x.createElement("div"));a.className="error_widget_arrow "+f.className;var m=i.renderer.$cursorLayer.getPixelPosition(e).left;a.style.left=m+i.renderer.gutterWidth-5+"px",w.el.className="error_widget_wrapper",d.className="error_widget "+f.className,d.innerHTML=f.text.join("<br>"),d.appendChild(x.createElement("div"));var g=function(v,C,$){if(C===0&&($==="esc"||$==="return"))return w.destroy(),{command:"null"}};w.destroy=function(){i.$mouseHandler.isMousePressed||(i.keyBinding.removeKeyboardHandler(g),t.widgetManager.removeLineWidget(w),i.off("changeSelection",w.destroy),i.off("changeSession",w.destroy),i.off("mouseup",w.destroy),i.off("change",w.destroy))},i.keyBinding.addKeyboardHandler(g),i.on("changeSelection",w.destroy),i.on("changeSession",w.destroy),i.on("mouseup",w.destroy),i.on("change",w.destroy),i.session.widgetManager.addLineWidget(w),w.el.onmousedown=i.focus.bind(i),i.renderer.scrollCursorIntoView(null,.5,{bottom:w.el.offsetHeight})},x.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(M,k,B){M("./loader_build")(k);var R=M("./lib/dom"),x=M("./range").Range,A=M("./editor").Editor,l=M("./edit_session").EditSession,c=M("./undomanager").UndoManager,r=M("./virtual_renderer").VirtualRenderer;M("./worker/worker_client"),M("./keyboard/hash_handler"),M("./placeholder"),M("./multi_select"),M("./mode/folding/fold_mode"),M("./theme/textmate"),M("./ext/error_marker"),k.config=M("./config"),k.edit=function(i,n){if(typeof i=="string"){var t=i;if(i=document.getElementById(t),!i)throw new Error("ace.edit can't find div #"+t)}if(i&&i.env&&i.env.editor instanceof A)return i.env.editor;var e="";if(i&&/input|textarea/i.test(i.tagName)){var o=i;e=o.value,i=R.createElement("pre"),o.parentNode.replaceChild(i,o)}else i&&(e=i.textContent,i.innerHTML="");var s=k.createEditSession(e),h=new A(new r(i),s,n),f={document:s,editor:h,onResize:h.resize.bind(h,null)};return o&&(f.textarea=o),h.on("destroy",function(){f.editor.container.env=null}),h.container.env=h.env=f,h},k.createEditSession=function(i,n){var t=new l(i,n);return t.setUndoManager(new c),t},k.Range=x,k.Editor=A,k.EditSession=l,k.UndoManager=c,k.VirtualRenderer=r,k.version=k.config.version}),function(){ace.require(["ace/ace"],function(M){M&&(M.config.init(!0),M.define=ace.define);var k=function(){return this}();!k&&typeof window!="undefined"&&(k=window),!k&&typeof self!="undefined"&&(k=self),k.ace||(k.ace=M);for(var B in M)M.hasOwnProperty(B)&&(k.ace[B]=M[B]);k.ace.default=k.ace,j&&(j.exports=k.ace)})}()})(Ce);var Oe=Ce.exports;const Se=["blur","input","change","changeSelectionStyle","changeSession","copy","focus","paste"],Be=Te({name:"VAceEditor",props:{value:{type:String,required:!0},lang:{type:String,default:"text"},theme:{type:String,default:"chrome"},options:Object,placeholder:String,readonly:Boolean,wrap:Boolean,printMargin:{type:[Boolean,Number],default:!0},minLines:Number,maxLines:Number},emits:["update:value","init",...Se],render(){return Re("div")},mounted(){const j=this._editor=Ee(Oe.edit(this.$el,$e({placeholder:this.placeholder,readOnly:this.readonly,value:this.value,mode:"ace/mode/"+this.lang,theme:"ace/theme/"+this.theme,wrap:this.wrap,printMargin:this.printMargin,useWorker:!1,minLines:this.minLines,maxLines:this.maxLines},this.options)));this._contentBackup=this.value,this._isSettingContent=!1,j.on("change",()=>{if(this._isSettingContent)return;const ee=j.getValue();this._contentBackup=ee,this.$emit("update:value",ee)}),Se.forEach(ee=>{const M="on"+_e(ee);typeof this.$.vnode.props[M]=="function"&&j.on(ee,this.$emit.bind(this,ee))}),this._ro=new Ie(()=>j.resize()),this._ro.observe(this.$el),this.$emit("init",j)},beforeUnmount(){var j,ee;(j=this._ro)===null||j===void 0||j.disconnect(),(ee=this._editor)===null||ee===void 0||ee.destroy()},methods:{focus(){this._editor.focus()},blur(){this._editor.blur()},selectAll(){this._editor.selectAll()},getAceInstance(){return this._editor}},watch:{value(j){if(this._contentBackup!==j){try{this._isSettingContent=!0,this._editor.setValue(j,1)}finally{this._isSettingContent=!1}this._contentBackup=j}},theme(j){this._editor.setTheme("ace/theme/"+j)},options(j){this._editor.setOptions(j)},readonly(j){this._editor.setReadOnly(j)},placeholder(j){this._editor.setOption("placeholder",j)},wrap(j){this._editor.setWrapBehavioursEnabled(j)},printMargin(j){this._editor.setOption("printMargin",j)},lang(j){this._editor.setOption("mode","ace/mode/"+j)},minLines(j){this._editor.setOption("minLines",j)},maxLines(j){this._editor.setOption("maxLines",j)}}});var Fe={exports:{}};(function(j,ee){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(M,k,B){var R=M("../lib/oop"),x=M("./text_highlight_rules").TextHighlightRules,A=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};R.inherits(A,x),k.JsonHighlightRules=A}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(M,k,B){var R=M("../range").Range,x=function(){};(function(){this.checkOutdent=function(A,l){return/^\s+$/.test(A)?/^\s*\}/.test(l):!1},this.autoOutdent=function(A,l){var c=A.getLine(l),r=c.match(/^(\s*\})/);if(!r)return 0;var i=r[1].length,n=A.findMatchingBracket({row:l,column:i});if(!n||n.row==l)return 0;var t=this.$getIndent(A.getLine(n.row));A.replace(new R(l,0,l,i-1),t)},this.$getIndent=function(A){return A.match(/^\s*/)[0]}}).call(x.prototype),k.MatchingBraceOutdent=x}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(M,k,B){var R=M("../../lib/oop"),x=M("../../range").Range,A=M("./fold_mode").FoldMode,l=k.FoldMode=function(c){c&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+c.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+c.end)))};R.inherits(l,A),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(c,r,i){var n=c.getLine(i);if(this.singleLineBlockCommentRe.test(n)&&!this.startRegionRe.test(n)&&!this.tripleStarBlockCommentRe.test(n))return"";var t=this._getFoldWidgetBase(c,r,i);return!t&&this.startRegionRe.test(n)?"start":t},this.getFoldWidgetRange=function(c,r,i,n){var t=c.getLine(i);if(this.startRegionRe.test(t))return this.getCommentRegionBlock(c,t,i);var s=t.match(this.foldingStartMarker);if(s){var e=s.index;if(s[1])return this.openingBracketBlock(c,s[1],i,e);var o=c.getCommentFoldRange(i,e+s[0].length,1);return o&&!o.isMultiLine()&&(n?o=this.getSectionRange(c,i):r!="all"&&(o=null)),o}if(r!=="markbegin"){var s=t.match(this.foldingStopMarker);if(s){var e=s.index+s[0].length;return s[1]?this.closingBracketBlock(c,s[1],i,e):c.getCommentFoldRange(i,e,-1)}}},this.getSectionRange=function(c,r){var i=c.getLine(r),n=i.search(/\S/),t=r,e=i.length;r=r+1;for(var o=r,s=c.getLength();++r<s;){i=c.getLine(r);var h=i.search(/\S/);if(h!==-1){if(n>h)break;var f=this.getFoldWidgetRange(c,"all",r);if(f){if(f.start.row<=t)break;if(f.isMultiLine())r=f.end.row;else if(n==h)break}o=r}}return new x(t,e,o,c.getLine(o).length)},this.getCommentRegionBlock=function(c,r,i){for(var n=r.search(/\s*$/),t=c.getLength(),e=i,o=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,s=1;++i<t;){r=c.getLine(i);var h=o.exec(r);if(!!h&&(h[1]?s--:s++,!s))break}var f=i;if(f>e)return new x(e,n,f,r.length)}}.call(l.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle","ace/worker/worker_client"],function(M,k,B){var R=M("../lib/oop"),x=M("./text").Mode,A=M("./json_highlight_rules").JsonHighlightRules,l=M("./matching_brace_outdent").MatchingBraceOutdent,c=M("./folding/cstyle").FoldMode,r=M("../worker/worker_client").WorkerClient,i=function(){this.HighlightRules=A,this.$outdent=new l,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new c};R.inherits(i,x),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(n,t,e){var o=this.$getIndent(t);if(n=="start"){var s=t.match(/^.*[\{\(\[]\s*$/);s&&(o+=e)}return o},this.checkOutdent=function(n,t,e){return this.$outdent.checkOutdent(t,e)},this.autoOutdent=function(n,t,e){this.$outdent.autoOutdent(t,e)},this.createWorker=function(n){var t=new r(["ace"],"ace/mode/json_worker","JsonWorker");return t.attachToDocument(n.getDocument()),t.on("annotate",function(e){n.setAnnotations(e.data)}),t.on("terminate",function(){n.clearAnnotations()}),t},this.$id="ace/mode/json"}.call(i.prototype),k.Mode=i}),function(){ace.require(["ace/mode/json"],function(M){j&&(j.exports=M)})}()})(Fe);var De={exports:{}};(function(j,ee){ace.define("ace/theme/chrome-css",["require","exports","module"],function(M,k,B){B.exports=`.ace-chrome .ace_gutter {
- background: #ebebeb;
- color: #333;
- overflow : hidden;
- }
- .ace-chrome .ace_print-margin {
- width: 1px;
- background: #e8e8e8;
- }
- .ace-chrome {
- background-color: #FFFFFF;
- color: black;
- }
- .ace-chrome .ace_cursor {
- color: black;
- }
- .ace-chrome .ace_invisible {
- color: rgb(191, 191, 191);
- }
- .ace-chrome .ace_constant.ace_buildin {
- color: rgb(88, 72, 246);
- }
- .ace-chrome .ace_constant.ace_language {
- color: rgb(88, 92, 246);
- }
- .ace-chrome .ace_constant.ace_library {
- color: rgb(6, 150, 14);
- }
- .ace-chrome .ace_invalid {
- background-color: rgb(153, 0, 0);
- color: white;
- }
- .ace-chrome .ace_fold {
- }
- .ace-chrome .ace_support.ace_function {
- color: rgb(60, 76, 114);
- }
- .ace-chrome .ace_support.ace_constant {
- color: rgb(6, 150, 14);
- }
- .ace-chrome .ace_support.ace_type,
- .ace-chrome .ace_support.ace_class
- .ace-chrome .ace_support.ace_other {
- color: rgb(109, 121, 222);
- }
- .ace-chrome .ace_variable.ace_parameter {
- font-style:italic;
- color:#FD971F;
- }
- .ace-chrome .ace_keyword.ace_operator {
- color: rgb(104, 118, 135);
- }
- .ace-chrome .ace_comment {
- color: #236e24;
- }
- .ace-chrome .ace_comment.ace_doc {
- color: #236e24;
- }
- .ace-chrome .ace_comment.ace_doc.ace_tag {
- color: #236e24;
- }
- .ace-chrome .ace_constant.ace_numeric {
- color: rgb(0, 0, 205);
- }
- .ace-chrome .ace_variable {
- color: rgb(49, 132, 149);
- }
- .ace-chrome .ace_xml-pe {
- color: rgb(104, 104, 91);
- }
- .ace-chrome .ace_entity.ace_name.ace_function {
- color: #0000A2;
- }
- .ace-chrome .ace_heading {
- color: rgb(12, 7, 255);
- }
- .ace-chrome .ace_list {
- color:rgb(185, 6, 144);
- }
- .ace-chrome .ace_marker-layer .ace_selection {
- background: rgb(181, 213, 255);
- }
- .ace-chrome .ace_marker-layer .ace_step {
- background: rgb(252, 255, 0);
- }
- .ace-chrome .ace_marker-layer .ace_stack {
- background: rgb(164, 229, 101);
- }
- .ace-chrome .ace_marker-layer .ace_bracket {
- margin: -1px 0 0 -1px;
- border: 1px solid rgb(192, 192, 192);
- }
- .ace-chrome .ace_marker-layer .ace_active-line {
- background: rgba(0, 0, 0, 0.07);
- }
- .ace-chrome .ace_gutter-active-line {
- background-color : #dcdcdc;
- }
- .ace-chrome .ace_marker-layer .ace_selected-word {
- background: rgb(250, 250, 255);
- border: 1px solid rgb(200, 200, 250);
- }
- .ace-chrome .ace_storage,
- .ace-chrome .ace_keyword,
- .ace-chrome .ace_meta.ace_tag {
- color: rgb(147, 15, 128);
- }
- .ace-chrome .ace_string.ace_regex {
- color: rgb(255, 0, 0)
- }
- .ace-chrome .ace_string {
- color: #1A1AA6;
- }
- .ace-chrome .ace_entity.ace_other.ace_attribute-name {
- color: #994409;
- }
- .ace-chrome .ace_indent-guide {
- background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
- }
-
- .ace-chrome .ace_indent-guide-active {
- background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
- }
- `}),ace.define("ace/theme/chrome",["require","exports","module","ace/theme/chrome-css","ace/lib/dom"],function(M,k,B){k.isDark=!1,k.cssClass="ace-chrome",k.cssText=M("./chrome-css");var R=M("../lib/dom");R.importCssString(k.cssText,k.cssClass,!1)}),function(){ace.require(["ace/theme/chrome"],function(M){j&&(j.exports=M)})}()})(De);var We={exports:{}};(function(j,ee){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(M,k,B){var R=M("./lib/dom"),x=M("./lib/oop"),A=M("./lib/event_emitter").EventEmitter,l=M("./lib/lang"),c=M("./range").Range,r=M("./range_list").RangeList,i=M("./keyboard/hash_handler").HashHandler,n=M("./tokenizer").Tokenizer,t=M("./clipboard"),e={CURRENT_WORD:function(a){return a.session.getTextRange(a.session.getWordRange())},SELECTION:function(a,m,g){var v=a.session.getTextRange();return g?v.replace(/\n\r?([ \t]*\S)/g,`
- `+g+"$1"):v},CURRENT_LINE:function(a){return a.session.getLine(a.getCursorPosition().row)},PREV_LINE:function(a){return a.session.getLine(a.getCursorPosition().row-1)},LINE_INDEX:function(a){return a.getCursorPosition().row},LINE_NUMBER:function(a){return a.getCursorPosition().row+1},SOFT_TABS:function(a){return a.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(a){return a.session.getTabSize()},CLIPBOARD:function(a){return t.getText&&t.getText()},FILENAME:function(a){return/[^/\\]*$/.exec(this.FILEPATH(a))[0]},FILENAME_BASE:function(a){return/[^/\\]*$/.exec(this.FILEPATH(a))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(a){return this.FILEPATH(a).replace(/[^/\\]*$/,"")},FILEPATH:function(a){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(a){var m=a.session.$mode||{};return m.blockComment&&m.blockComment.start||""},BLOCK_COMMENT_END:function(a){var m=a.session.$mode||{};return m.blockComment&&m.blockComment.end||""},LINE_COMMENT:function(a){var m=a.session.$mode||{};return m.lineCommentStart||""},CURRENT_YEAR:o.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:o.bind(null,{year:"2-digit"}),CURRENT_MONTH:o.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:o.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:o.bind(null,{month:"short"}),CURRENT_DATE:o.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:o.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:o.bind(null,{weekday:"short"}),CURRENT_HOUR:o.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:o.bind(null,{minute:"2-digit"}),CURRENT_SECOND:o.bind(null,{second:"2-digit"})};e.SELECTED_TEXT=e.SELECTION;function o(a){var m=new Date().toLocaleString("en-us",a);return m.length==1?"0"+m:m}var s=function(){function a(){this.snippetMap={},this.snippetNameMap={},this.variables=e}return a.prototype.getTokenizer=function(){return a.$tokenizer||this.createTokenizer()},a.prototype.createTokenizer=function(){function m(C){return C=C.substr(1),/^\d+$/.test(C)?[{tabstopId:parseInt(C,10)}]:[{text:C}]}function g(C){return"(?:[^\\\\"+C+"]|\\\\.)"}var v={regex:"/("+g("/")+"+)/",onMatch:function(C,$,b){var p=b[0];return p.fmtString=!0,p.guard=C.slice(1,-1),p.flag="",""},next:"formatString"};return a.$tokenizer=new n({start:[{regex:/\\./,onMatch:function(C,$,b){var p=C[1];return(p=="}"&&b.length||"`$\\".indexOf(p)!=-1)&&(C=p),[C]}},{regex:/}/,onMatch:function(C,$,b){return[b.length?b.shift():C]}},{regex:/\$(?:\d+|\w+)/,onMatch:m},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(C,$,b){var p=m(C.substr(1));return b.unshift(p[0]),p},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+g("\\|")+"*\\|",onMatch:function(C,$,b){var p=C.slice(1,-1).replace(/\\[,|\\]|,/g,function(u){return u.length==2?u[1]:"\0"}).split("\0").map(function(u){return{value:u}});return b[0].choices=p,[p[0]]},next:"start"},v,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(C,$,b){return b.length&&b[0].expectElse?(b[0].expectElse=!1,b[0].ifEnd={elseEnd:b[0]},[b[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(C,$,b){var p=C[1];return p=="}"&&b.length||"`$\\".indexOf(p)!=-1?C=p:p=="n"?C=`
- `:p=="t"?C=" ":"ulULE".indexOf(p)!=-1&&(C={changeCase:p,local:p>"a"}),[C]}},{regex:"/\\w*}",onMatch:function(C,$,b){var p=b.shift();return p&&(p.flag=C.slice(1,-1)),this.next=p&&p.tabstopId?"start":"",[p||C]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(C,$,b){return[{text:C.slice(1)}]}},{regex:/\${\w+/,onMatch:function(C,$,b){var p={text:C.slice(2)};return b.unshift(p),[p]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(C,$,b){var p=b.shift();return this.next=p&&p.tabstopId?"start":"",[p||C]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(C,$,b){var p=b[0];return p.formatFunction=C.slice(2,-1),[b.shift()]},next:"formatString"},v,{regex:/:[\?\-+]?/,onMatch:function(C,$,b){C[1]=="+"&&(b[0].ifEnd=b[0]),C[1]=="?"&&(b[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),a.$tokenizer},a.prototype.tokenizeTmSnippet=function(m,g){return this.getTokenizer().getLineTokens(m,g).tokens.map(function(v){return v.value||v})},a.prototype.getVariableValue=function(m,g,v){if(/^\d+$/.test(g))return(this.variables.__||{})[g]||"";if(/^[A-Z]\d+$/.test(g))return(this.variables[g[0]+"__"]||{})[g.substr(1)]||"";if(g=g.replace(/^TM_/,""),!this.variables.hasOwnProperty(g))return"";var C=this.variables[g];return typeof C=="function"&&(C=this.variables[g](m,g,v)),C==null?"":C},a.prototype.tmStrFormat=function(m,g,v){if(!g.fmt)return m;var C=g.flag||"",$=g.guard;$=new RegExp($,C.replace(/[^gim]/g,""));var b=typeof g.fmt=="string"?this.tokenizeTmSnippet(g.fmt,"formatString"):g.fmt,p=this,u=m.replace($,function(){var y=p.variables.__;p.variables.__=[].slice.call(arguments);for(var S=p.resolveVariables(b,v),T="E",E=0;E<S.length;E++){var _=S[E];if(typeof _=="object")if(S[E]="",_.changeCase&&_.local){var I=S[E+1];I&&typeof I=="string"&&(_.changeCase=="u"?S[E]=I[0].toUpperCase():S[E]=I[0].toLowerCase(),S[E+1]=I.substr(1))}else _.changeCase&&(T=_.changeCase);else T=="U"?S[E]=_.toUpperCase():T=="L"&&(S[E]=_.toLowerCase())}return p.variables.__=y,S.join("")});return u},a.prototype.tmFormatFunction=function(m,g,v){return g.formatFunction=="upcase"?m.toUpperCase():g.formatFunction=="downcase"?m.toLowerCase():m},a.prototype.resolveVariables=function(m,g){for(var v=[],C="",$=!0,b=0;b<m.length;b++){var p=m[b];if(typeof p=="string"){v.push(p),p==`
- `?($=!0,C=""):$&&(C=/^\t*/.exec(p)[0],$=/\S/.test(p));continue}if(!!p){if($=!1,p.fmtString){var u=m.indexOf(p,b+1);u==-1&&(u=m.length),p.fmt=m.slice(b+1,u),b=u}if(p.text){var y=this.getVariableValue(g,p.text,C)+"";p.fmtString&&(y=this.tmStrFormat(y,p,g)),p.formatFunction&&(y=this.tmFormatFunction(y,p,g)),y&&!p.ifEnd?(v.push(y),S(p)):!y&&p.ifEnd&&S(p.ifEnd)}else p.elseEnd?S(p.elseEnd):(p.tabstopId!=null||p.changeCase!=null)&&v.push(p)}}function S(T){var E=m.indexOf(T,b+1);E!=-1&&(b=E)}return v},a.prototype.getDisplayTextForSnippet=function(m,g){var v=h.call(this,m,g);return v.text},a.prototype.insertSnippetForSelection=function(m,g,v){v===void 0&&(v={});var C=h.call(this,m,g,v),$=m.getSelectionRange(),b=m.session.replace($,C.text),p=new f(m),u=m.inVirtualSelectionMode&&m.selection.index;p.addTabstops(C.tabstops,$.start,b,u)},a.prototype.insertSnippet=function(m,g,v){v===void 0&&(v={});var C=this;if(m.inVirtualSelectionMode)return C.insertSnippetForSelection(m,g,v);m.forEachSelection(function(){C.insertSnippetForSelection(m,g,v)},null,{keepOrder:!0}),m.tabstopManager&&m.tabstopManager.tabNext()},a.prototype.$getScope=function(m){var g=m.session.$mode.$id||"";if(g=g.split("/").pop(),g==="html"||g==="php"){g==="php"&&!m.session.$mode.inlinePhp&&(g="html");var v=m.getCursorPosition(),C=m.session.getState(v.row);typeof C=="object"&&(C=C[0]),C.substring&&(C.substring(0,3)=="js-"?g="javascript":C.substring(0,4)=="css-"?g="css":C.substring(0,4)=="php-"&&(g="php"))}return g},a.prototype.getActiveScopes=function(m){var g=this.$getScope(m),v=[g],C=this.snippetMap;return C[g]&&C[g].includeScopes&&v.push.apply(v,C[g].includeScopes),v.push("_"),v},a.prototype.expandWithTab=function(m,g){var v=this,C=m.forEachSelection(function(){return v.expandSnippetForSelection(m,g)},null,{keepOrder:!0});return C&&m.tabstopManager&&m.tabstopManager.tabNext(),C},a.prototype.expandSnippetForSelection=function(m,g){var v=m.getCursorPosition(),C=m.session.getLine(v.row),$=C.substring(0,v.column),b=C.substr(v.column),p=this.snippetMap,u;return this.getActiveScopes(m).some(function(y){var S=p[y];return S&&(u=this.findMatchingSnippet(S,$,b)),!!u},this),u?(g&&g.dryRun||(m.session.doc.removeInLine(v.row,v.column-u.replaceBefore.length,v.column+u.replaceAfter.length),this.variables.M__=u.matchBefore,this.variables.T__=u.matchAfter,this.insertSnippetForSelection(m,u.content),this.variables.M__=this.variables.T__=null),!0):!1},a.prototype.findMatchingSnippet=function(m,g,v){for(var C=m.length;C--;){var $=m[C];if(!($.startRe&&!$.startRe.test(g))&&!($.endRe&&!$.endRe.test(v))&&!(!$.startRe&&!$.endRe))return $.matchBefore=$.startRe?$.startRe.exec(g):[""],$.matchAfter=$.endRe?$.endRe.exec(v):[""],$.replaceBefore=$.triggerRe?$.triggerRe.exec(g)[0]:"",$.replaceAfter=$.endTriggerRe?$.endTriggerRe.exec(v)[0]:"",$}},a.prototype.register=function(m,g){var v=this.snippetMap,C=this.snippetNameMap,$=this;m||(m=[]);function b(y){return y&&!/^\^?\(.*\)\$?$|^\\b$/.test(y)&&(y="(?:"+y+")"),y||""}function p(y,S,T){return y=b(y),S=b(S),T?(y=S+y,y&&y[y.length-1]!="$"&&(y=y+"$")):(y=y+S,y&&y[0]!="^"&&(y="^"+y)),new RegExp(y)}function u(y){y.scope||(y.scope=g||"_"),g=y.scope,v[g]||(v[g]=[],C[g]={});var S=C[g];if(y.name){var T=S[y.name];T&&$.unregister(T),S[y.name]=y}v[g].push(y),y.prefix&&(y.tabTrigger=y.prefix),!y.content&&y.body&&(y.content=Array.isArray(y.body)?y.body.join(`
- `):y.body),y.tabTrigger&&!y.trigger&&(!y.guard&&/^\w/.test(y.tabTrigger)&&(y.guard="\\b"),y.trigger=l.escapeRegExp(y.tabTrigger)),!(!y.trigger&&!y.guard&&!y.endTrigger&&!y.endGuard)&&(y.startRe=p(y.trigger,y.guard,!0),y.triggerRe=new RegExp(y.trigger),y.endRe=p(y.endTrigger,y.endGuard,!0),y.endTriggerRe=new RegExp(y.endTrigger))}Array.isArray(m)?m.forEach(u):Object.keys(m).forEach(function(y){u(m[y])}),this._signal("registerSnippets",{scope:g})},a.prototype.unregister=function(m,g){var v=this.snippetMap,C=this.snippetNameMap;function $(b){var p=C[b.scope||g];if(p&&p[b.name]){delete p[b.name];var u=v[b.scope||g],y=u&&u.indexOf(b);y>=0&&u.splice(y,1)}}m.content?$(m):Array.isArray(m)&&m.forEach($)},a.prototype.parseSnippetFile=function(m){m=m.replace(/\r/g,"");for(var g=[],v={},C=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,$;$=C.exec(m);){if($[1])try{v=JSON.parse($[1]),g.push(v)}catch(y){}if($[4])v.content=$[4].replace(/^\t/gm,""),g.push(v),v={};else{var b=$[2],p=$[3];if(b=="regex"){var u=/\/((?:[^\/\\]|\\.)*)|$/g;v.guard=u.exec(p)[1],v.trigger=u.exec(p)[1],v.endTrigger=u.exec(p)[1],v.endGuard=u.exec(p)[1]}else b=="snippet"?(v.tabTrigger=p.match(/^\S*/)[0],v.name||(v.name=p)):b&&(v[b]=p)}}return g},a.prototype.getSnippetByName=function(m,g){var v=this.snippetNameMap,C;return this.getActiveScopes(g).some(function($){var b=v[$];return b&&(C=b[m]),!!C},this),C},a}();x.implement(s.prototype,A);var h=function(a,m,g){g===void 0&&(g={});var v=a.getCursorPosition(),C=a.session.getLine(v.row),$=a.session.getTabString(),b=C.match(/^\s*/)[0];v.column<b.length&&(b=b.slice(0,v.column)),m=m.replace(/\r/g,"");var p=this.tokenizeTmSnippet(m);p=this.resolveVariables(p,a),p=p.map(function(N){return N==`
- `&&!g.excludeExtraIndent?N+b:typeof N=="string"?N.replace(/\t/g,$):N});var u=[];p.forEach(function(N,P){if(typeof N=="object"){var V=N.tabstopId,U=u[V];if(U||(U=u[V]=[],U.index=V,U.value="",U.parents={}),U.indexOf(N)===-1){N.choices&&!U.choices&&(U.choices=N.choices),U.push(N);var G=p.indexOf(N,P+1);if(G!==-1){var X=p.slice(P+1,G),Z=X.some(function(ae){return typeof ae=="object"});Z&&!U.value?U.value=X:X.length&&(!U.value||typeof U.value!="string")&&(U.value=X.join(""))}}}}),u.forEach(function(N){N.length=0});var y={};function S(N){for(var P=[],V=0;V<N.length;V++){var U=N[V];if(typeof U=="object"){if(y[U.tabstopId])continue;var G=N.lastIndexOf(U,V-1);U=P[G]||{tabstopId:U.tabstopId}}P[V]=U}return P}for(var T=0;T<p.length;T++){var E=p[T];if(typeof E=="object"){var _=E.tabstopId,I=u[_],D=p.indexOf(E,T+1);if(y[_]){y[_]===E&&(delete y[_],Object.keys(y).forEach(function(N){I.parents[N]=!0}));continue}y[_]=E;var H=I.value;typeof H!="string"?H=S(H):E.fmt&&(H=this.tmStrFormat(H,E,a)),p.splice.apply(p,[T+1,Math.max(0,D-T)].concat(H,E)),I.indexOf(E)===-1&&I.push(E)}}var O=0,F=0,W="";return p.forEach(function(N){if(typeof N=="string"){var P=N.split(`
- `);P.length>1?(F=P[P.length-1].length,O+=P.length-1):F+=N.length,W+=N}else N&&(N.start?N.end={row:O,column:F}:N.start={row:O,column:F})}),{text:W,tabstops:u,tokens:p}},f=function(){function a(m){if(this.index=0,this.ranges=[],this.tabstops=[],m.tabstopManager)return m.tabstopManager;m.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=l.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(m)}return a.prototype.attach=function(m){this.$openTabstops=null,this.selectedTabstop=null,this.editor=m,this.session=m.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},a.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},a.prototype.onChange=function(m){for(var g=m.action[0]=="r",v=this.selectedTabstop||{},C=v.parents||{},$=this.tabstops.slice(),b=0;b<$.length;b++){var p=$[b],u=p==v||C[p.index];if(p.rangeList.$bias=u?0:1,m.action=="remove"&&p!==v){var y=p.parents&&p.parents[v.index],S=p.rangeList.pointIndex(m.start,y);S=S<0?-S-1:S+1;var T=p.rangeList.pointIndex(m.end,y);T=T<0?-T-1:T-1;for(var E=p.rangeList.ranges.slice(S,T),_=0;_<E.length;_++)this.removeRange(E[_])}p.rangeList.$onChange(m)}var I=this.session;!this.$inChange&&g&&I.getLength()==1&&!I.getValue()&&this.detach()},a.prototype.updateLinkedFields=function(){var m=this.selectedTabstop;if(!(!m||!m.hasLinkedRanges||!m.firstNonLinked)){this.$inChange=!0;for(var g=this.session,v=g.getTextRange(m.firstNonLinked),C=0;C<m.length;C++){var $=m[C];if(!!$.linked){var b=$.original,p=k.snippetManager.tmStrFormat(v,b,this.editor);g.replace($,p)}}this.$inChange=!1}},a.prototype.onAfterExec=function(m){m.command&&!m.command.readOnly&&this.updateLinkedFields()},a.prototype.onChangeSelection=function(){if(!!this.editor){for(var m=this.editor.selection.lead,g=this.editor.selection.anchor,v=this.editor.selection.isEmpty(),C=0;C<this.ranges.length;C++)if(!this.ranges[C].linked){var $=this.ranges[C].contains(m.row,m.column),b=v||this.ranges[C].contains(g.row,g.column);if($&&b)return}this.detach()}},a.prototype.onChangeSession=function(){this.detach()},a.prototype.tabNext=function(m){var g=this.tabstops.length,v=this.index+(m||1);v=Math.min(Math.max(v,1),g),v==g&&(v=0),this.selectTabstop(v),v===0&&this.detach()},a.prototype.selectTabstop=function(m){this.$openTabstops=null;var g=this.tabstops[this.index];if(g&&this.addTabstopMarkers(g),this.index=m,g=this.tabstops[this.index],!(!g||!g.length)){this.selectedTabstop=g;var v=g.firstNonLinked||g;if(g.choices&&(v.cursor=v.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(v);else{var C=this.editor.multiSelect;C.toSingleRange(v);for(var $=0;$<g.length;$++)g.hasLinkedRanges&&g[$].linked||C.addRange(g[$].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},a.prototype.addTabstops=function(m,g,v){var C=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!m[0]){var $=c.fromPoints(v,v);w($.start,g),w($.end,g),m[0]=[$],m[0].index=0}var b=this.index,p=[b+1,0],u=this.ranges;m.forEach(function(y,S){for(var T=this.$openTabstops[S]||y,E=0;E<y.length;E++){var _=y[E],I=c.fromPoints(_.start,_.end||_.start);L(I.start,g),L(I.end,g),I.original=_,I.tabstop=T,u.push(I),T!=y?T.unshift(I):T[E]=I,_.fmtString||T.firstNonLinked&&C?(I.linked=!0,T.hasLinkedRanges=!0):T.firstNonLinked||(T.firstNonLinked=I)}T.firstNonLinked||(T.hasLinkedRanges=!1),T===y&&(p.push(T),this.$openTabstops[S]=T),this.addTabstopMarkers(T),T.rangeList=T.rangeList||new r,T.rangeList.$bias=0,T.rangeList.addList(T)},this),p.length>2&&(this.tabstops.length&&p.push(p.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,p))},a.prototype.addTabstopMarkers=function(m){var g=this.session;m.forEach(function(v){v.markerId||(v.markerId=g.addMarker(v,"ace_snippet-marker","text"))})},a.prototype.removeTabstopMarkers=function(m){var g=this.session;m.forEach(function(v){g.removeMarker(v.markerId),v.markerId=null})},a.prototype.removeRange=function(m){var g=m.tabstop.indexOf(m);g!=-1&&m.tabstop.splice(g,1),g=this.ranges.indexOf(m),g!=-1&&this.ranges.splice(g,1),g=m.tabstop.rangeList.ranges.indexOf(m),g!=-1&&m.tabstop.splice(g,1),this.session.removeMarker(m.markerId),m.tabstop.length||(g=this.tabstops.indexOf(m.tabstop),g!=-1&&this.tabstops.splice(g,1),this.tabstops.length||this.detach())},a}();f.prototype.keyboardHandler=new i,f.prototype.keyboardHandler.bindKeys({Tab:function(a){k.snippetManager&&k.snippetManager.expandWithTab(a)||(a.tabstopManager.tabNext(1),a.renderer.scrollCursorIntoView())},"Shift-Tab":function(a){a.tabstopManager.tabNext(-1),a.renderer.scrollCursorIntoView()},Esc:function(a){a.tabstopManager.detach()}});var L=function(a,m){a.row==0&&(a.column+=m.column),a.row+=m.row},w=function(a,m){a.row==m.row&&(a.column-=m.column),a.row-=m.row};R.importCssString(`
- .ace_snippet-marker {
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- background: rgba(194, 193, 208, 0.09);
- border: 1px dotted rgba(211, 208, 235, 0.62);
- position: absolute;
- }`,"snippets.css",!1),k.snippetManager=new s;var d=M("./editor").Editor;(function(){this.insertSnippet=function(a,m){return k.snippetManager.insertSnippet(this,a,m)},this.expandSnippet=function(a){return k.snippetManager.expandWithTab(this,a)}}).call(d.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(M,k,B){var R=M("../virtual_renderer").VirtualRenderer,x=M("../editor").Editor,A=M("../range").Range,l=M("../lib/event"),c=M("../lib/lang"),r=M("../lib/dom"),i=M("../config").nls,n=M("./../lib/useragent"),t=function(L){return"suggest-aria-id:".concat(L)},e=n.isSafari?"menu":"listbox",o=n.isSafari?"menuitem":"option",s=n.isSafari?"aria-current":"aria-selected",h=function(L){var w=new R(L);w.$maxLines=4;var d=new x(w);return d.setHighlightActiveLine(!1),d.setShowPrintMargin(!1),d.renderer.setShowGutter(!1),d.renderer.setHighlightGutterLine(!1),d.$mouseHandler.$focusTimeout=0,d.$highlightTagPending=!0,d},f=function(){function L(w){var d=r.createElement("div"),a=h(d);w&&w.appendChild(d),d.style.display="none",a.renderer.content.style.cursor="default",a.renderer.setStyle("ace_autocomplete"),a.renderer.$textLayer.element.setAttribute("role",e),a.renderer.$textLayer.element.setAttribute("aria-roledescription",i("Autocomplete suggestions")),a.renderer.$textLayer.element.setAttribute("aria-label",i("Autocomplete suggestions")),a.renderer.textarea.setAttribute("aria-hidden","true"),a.setOption("displayIndentGuides",!1),a.setOption("dragDelay",150);var m=function(){};a.focus=m,a.$isFocused=!0,a.renderer.$cursorLayer.restartTimer=m,a.renderer.$cursorLayer.element.style.opacity="0",a.renderer.$maxLines=8,a.renderer.$keepTextAreaAtCursor=!1,a.setHighlightActiveLine(!1),a.session.highlight(""),a.session.$searchHighlight.clazz="ace_highlight-marker",a.on("mousedown",function(u){var y=u.getDocumentPosition();a.selection.moveToPosition(y),C.start.row=C.end.row=y.row,u.stop()});var g,v=new A(-1,0,-1,1/0),C=new A(-1,0,-1,1/0);C.id=a.session.addMarker(C,"ace_active-line","fullLine"),a.setSelectOnHover=function(u){u?v.id&&(a.session.removeMarker(v.id),v.id=null):v.id=a.session.addMarker(v,"ace_line-hover","fullLine")},a.setSelectOnHover(!1),a.on("mousemove",function(u){if(!g){g=u;return}if(!(g.x==u.x&&g.y==u.y)){g=u,g.scrollTop=a.renderer.scrollTop,a.isMouseOver=!0;var y=g.getDocumentPosition().row;v.start.row!=y&&(v.id||a.setRow(y),b(y))}}),a.renderer.on("beforeRender",function(){if(g&&v.start.row!=-1){g.$pos=null;var u=g.getDocumentPosition().row;v.id||a.setRow(u),b(u,!0)}}),a.renderer.on("afterRender",function(){var u=a.getRow(),y=a.renderer.$textLayer,S=y.element.childNodes[u-y.config.firstRow],T=document.activeElement;if(S!==a.selectedNode&&a.selectedNode&&(r.removeCssClass(a.selectedNode,"ace_selected"),T.removeAttribute("aria-activedescendant"),a.selectedNode.removeAttribute(s),a.selectedNode.removeAttribute("id")),a.selectedNode=S,S){r.addCssClass(S,"ace_selected");var E=t(u);S.id=E,y.element.setAttribute("aria-activedescendant",E),T.setAttribute("aria-activedescendant",E),S.setAttribute("role",o),S.setAttribute("aria-roledescription",i("item")),S.setAttribute("aria-label",a.getData(u).value),S.setAttribute("aria-setsize",a.data.length),S.setAttribute("aria-posinset",u+1),S.setAttribute("aria-describedby","doc-tooltip"),S.setAttribute(s,"true")}});var $=function(){b(-1)},b=function(u,y){u!==v.start.row&&(v.start.row=v.end.row=u,y||a.session._emit("changeBackMarker"),a._emit("changeHoverMarker"))};a.getHoveredRow=function(){return v.start.row},l.addListener(a.container,"mouseout",function(){a.isMouseOver=!1,$()}),a.on("hide",$),a.on("changeSelection",$),a.session.doc.getLength=function(){return a.data.length},a.session.doc.getLine=function(u){var y=a.data[u];return typeof y=="string"?y:y&&y.value||""};var p=a.session.bgTokenizer;return p.$tokenizeRow=function(u){var y=a.data[u],S=[];if(!y)return S;typeof y=="string"&&(y={value:y});var T=y.caption||y.value||y.name;function E(N,P){N&&S.push({type:(y.className||"")+(P||""),value:N})}for(var _=T.toLowerCase(),I=(a.filterText||"").toLowerCase(),D=0,H=0,O=0;O<=I.length;O++)if(O!=H&&(y.matchMask&1<<O||O==I.length)){var F=I.slice(H,O);H=O;var W=_.indexOf(F,D);if(W==-1)continue;E(T.slice(D,W),""),D=W+F.length,E(T.slice(W,D),"completion-highlight")}return E(T.slice(D,T.length),""),S.push({type:"completion-spacer",value:" "}),y.meta&&S.push({type:"completion-meta",value:y.meta}),y.message&&S.push({type:"completion-message",value:y.message}),S},p.$updateOnChange=m,p.start=m,a.session.$computeWidth=function(){return this.screenWidth=0},a.isOpen=!1,a.isTopdown=!1,a.autoSelect=!0,a.filterText="",a.isMouseOver=!1,a.data=[],a.setData=function(u,y){a.filterText=y||"",a.setValue(c.stringRepeat(`
- `,u.length),-1),a.data=u||[],a.setRow(0)},a.getData=function(u){return a.data[u]},a.getRow=function(){return C.start.row},a.setRow=function(u){u=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,u)),C.start.row!=u&&(a.selection.clearSelection(),C.start.row=C.end.row=u||0,a.session._emit("changeBackMarker"),a.moveCursorTo(u||0,0),a.isOpen&&a._signal("select"))},a.on("changeSelection",function(){a.isOpen&&a.setRow(a.selection.lead.row),a.renderer.scrollCursorIntoView()}),a.hide=function(){this.container.style.display="none",a.anchorPos=null,a.anchor=null,a.isOpen&&(a.isOpen=!1,this._signal("hide"))},a.tryShow=function(u,y,S,T){if(!T&&a.isOpen&&a.anchorPos&&a.anchor&&a.anchorPos.top===u.top&&a.anchorPos.left===u.left&&a.anchor===S)return!0;var E=this.container,_=window.innerHeight,I=window.innerWidth,D=this.renderer,H=D.$maxLines*y*1.4,O={top:0,bottom:0,left:0},F=_-u.top-3*this.$borderSize-y,W=u.top-3*this.$borderSize;S||(W<=F||F>=H?S="bottom":S="top"),S==="top"?(O.bottom=u.top-this.$borderSize,O.top=O.bottom-H):S==="bottom"&&(O.top=u.top+y+this.$borderSize,O.bottom=O.top+H);var N=O.top>=0&&O.bottom<=_;if(!T&&!N)return!1;N?D.$maxPixelHeight=null:S==="top"?D.$maxPixelHeight=W:D.$maxPixelHeight=F,S==="top"?(E.style.top="",E.style.bottom=_-O.bottom+"px",a.isTopdown=!1):(E.style.top=O.top+"px",E.style.bottom="",a.isTopdown=!0),E.style.display="";var P=u.left;return P+E.offsetWidth>I&&(P=I-E.offsetWidth),E.style.left=P+"px",E.style.right="",a.isOpen||(a.isOpen=!0,this._signal("show"),g=null),a.anchorPos=u,a.anchor=S,!0},a.show=function(u,y,S){this.tryShow(u,y,S?"bottom":void 0,!0)},a.goTo=function(u){var y=this.getRow(),S=this.session.getLength()-1;switch(u){case"up":y=y<=0?S:y-1;break;case"down":y=y>=S?-1:y+1;break;case"start":y=0;break;case"end":y=S;break}this.setRow(y)},a.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},a.$imageSize=0,a.$borderSize=1,a}return L}();r.importCssString(`
- .ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
- background-color: #CAD6FA;
- z-index: 1;
- }
- .ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
- background-color: #3a674e;
- }
- .ace_editor.ace_autocomplete .ace_line-hover {
- border: 1px solid #abbffe;
- margin-top: -1px;
- background: rgba(233,233,253,0.4);
- position: absolute;
- z-index: 2;
- }
- .ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
- border: 1px solid rgba(109, 150, 13, 0.8);
- background: rgba(58, 103, 78, 0.62);
- }
- .ace_completion-meta {
- opacity: 0.5;
- margin-left: 0.9em;
- }
- .ace_completion-message {
- margin-left: 0.9em;
- color: blue;
- }
- .ace_editor.ace_autocomplete .ace_completion-highlight{
- color: #2d69c7;
- }
- .ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
- color: #93ca12;
- }
- .ace_editor.ace_autocomplete {
- width: 300px;
- z-index: 200000;
- border: 1px lightgray solid;
- position: fixed;
- box-shadow: 2px 3px 5px rgba(0,0,0,.2);
- line-height: 1.4;
- background: #fefefe;
- color: #111;
- }
- .ace_dark.ace_editor.ace_autocomplete {
- border: 1px #484747 solid;
- box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
- line-height: 1.4;
- background: #25282c;
- color: #c1c1c1;
- }
- .ace_autocomplete .ace_text-layer {
- width: calc(100% - 8px);
- }
- .ace_autocomplete .ace_line {
- display: flex;
- align-items: center;
- }
- .ace_autocomplete .ace_line > * {
- min-width: 0;
- flex: 0 0 auto;
- }
- .ace_autocomplete .ace_line .ace_ {
- flex: 0 1 auto;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- .ace_autocomplete .ace_completion-spacer {
- flex: 1;
- }
- .ace_autocomplete.ace_loading:after {
- content: "";
- position: absolute;
- top: 0px;
- height: 2px;
- width: 8%;
- background: blue;
- z-index: 100;
- animation: ace_progress 3s infinite linear;
- animation-delay: 300ms;
- transform: translateX(-100%) scaleX(1);
- }
- @keyframes ace_progress {
- 0% { transform: translateX(-100%) scaleX(1) }
- 50% { transform: translateX(625%) scaleX(2) }
- 100% { transform: translateX(1500%) scaleX(3) }
- }
- @media (prefers-reduced-motion) {
- .ace_autocomplete.ace_loading:after {
- transform: translateX(625%) scaleX(2);
- animation: none;
- }
- }
- `,"autocompletion.css",!1),k.AcePopup=f,k.$singleLineEditor=h,k.getAriaId=t}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(M,k,B){var R=function(){function x(A){this.editor=A,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return x.prototype.setScreenReaderContent=function(A){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",function(){var c=this.popup.getRow(),r=this.popup.renderer.$textLayer,i=r.element.childNodes[c-r.config.firstRow];if(i){for(var n="doc-tooltip ",t=0;t<this._lines.length;t++)n+="ace-inline-screenreader-line-".concat(t," ");i.setAttribute("aria-describedby",n)}}.bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=A.split(/\r\n|\r|\n/);var l=this.createCodeBlock();this.screenReaderDiv.appendChild(l)},x.prototype.destroy=function(){this.screenReaderDiv.remove()},x.prototype.createCodeBlock=function(){var A=document.createElement("pre");A.setAttribute("id","ace-inline-screenreader");for(var l=0;l<this._lines.length;l++){var c=document.createElement("code");c.setAttribute("id","ace-inline-screenreader-line-".concat(l));var r=document.createTextNode(this._lines[l]);c.appendChild(r),A.appendChild(c)}return A},x}();k.AceInlineScreenReader=R}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(M,k,B){var R=M("../snippets").snippetManager,x=M("./inline_screenreader").AceInlineScreenReader,A=function(){function l(){this.editor=null}return l.prototype.show=function(c,r,i){if(i=i||"",c&&this.editor&&this.editor!==c&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!c||!r)return!1;this.inlineScreenReader||(this.inlineScreenReader=new x(c));var n=r.snippet?R.getDisplayTextForSnippet(c,r.snippet):r.value;return r.hideInlinePreview||!n||!n.startsWith(i)?!1:(this.editor=c,this.inlineScreenReader.setScreenReaderContent(n),n=n.slice(i.length),n===""?c.removeGhostText():c.setGhostText(n),!0)},l.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},l.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},l.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},l}();k.AceInline=A}),ace.define("ace/autocomplete/util",["require","exports","module"],function(M,k,B){k.parForEach=function(x,A,l){var c=0,r=x.length;r===0&&l();for(var i=0;i<r;i++)A(x[i],function(n,t){c++,c===r&&l(n,t)})};var R=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;k.retrievePrecedingIdentifier=function(x,A,l){l=l||R;for(var c=[],r=A-1;r>=0&&l.test(x[r]);r--)c.push(x[r]);return c.reverse().join("")},k.retrieveFollowingIdentifier=function(x,A,l){l=l||R;for(var c=[],r=A;r<x.length&&l.test(x[r]);r++)c.push(x[r]);return c},k.getCompletionPrefix=function(x){var A=x.getCursorPosition(),l=x.session.getLine(A.row),c;return x.completers.forEach(function(r){r.identifierRegexps&&r.identifierRegexps.forEach(function(i){!c&&i&&(c=this.retrievePrecedingIdentifier(l,A.column,i))}.bind(this))}.bind(this)),c||this.retrievePrecedingIdentifier(l,A.column)},k.triggerAutocomplete=function(x){var A=x.getCursorPosition(),l=x.session.getLine(A.row),c=A.column===0?0:A.column-1,r=l[c];return x.completers.some(function(i){if(i.triggerCharacters&&Array.isArray(i.triggerCharacters))return i.triggerCharacters.includes(r)})}}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event","ace/lib/scroll"],function(M,k,B){var R=M("./keyboard/hash_handler").HashHandler,x=M("./autocomplete/popup").AcePopup,A=M("./autocomplete/inline").AceInline,l=M("./autocomplete/popup").getAriaId,c=M("./autocomplete/util"),r=M("./lib/lang"),i=M("./lib/dom"),n=M("./snippets").snippetManager,t=M("./config"),e=M("./lib/event"),o=M("./lib/scroll").preventParentScroll,s=function(w,d){d.completer&&d.completer.destroy()},h=function(){function w(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new R,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=r.delayedCall(function(){this.updateCompletions(!0)}.bind(this)),this.tooltipTimer=r.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=r.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=r.delayedCall(function(){this.stickySelection=!0}.bind(this),this.stickySelectionDelay),this.$firstOpenTimer=r.delayedCall(function(){var d=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!d||this.editor.completers.length===0||(this.completions=new L(w.completionsForLoading),this.openPopup(this.editor,d.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}.bind(this),this.stickySelectionDelay)}return Object.defineProperty(w,"completionsForLoading",{get:function(){return[{caption:t.nls("Loading..."),value:""}]},enumerable:!1,configurable:!0}),w.prototype.$init=function(){return this.popup=new x(this.parentNode||document.body||document.documentElement),this.popup.on("click",function(d){this.insertMatch(),d.stop()}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),e.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},w.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new A,this.inlineRenderer},w.prototype.getPopup=function(){return this.popup||this.$init()},w.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},w.prototype.$seen=function(d){!this.hasSeen.has(d)&&d&&d.completer&&d.completer.onSeen&&typeof d.completer.onSeen=="function"&&(d.completer.onSeen(this.editor,d),this.hasSeen.add(d))},w.prototype.$onPopupChange=function(d){if(this.inlineRenderer&&this.inlineEnabled){var a=d?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(a),this.popup.isMouseOver&&this.setSelectOnHover){this.tooltipTimer.call(null,null);return}this.popupTimer.schedule(),this.tooltipTimer.schedule()}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},w.prototype.$updateGhostText=function(d){var a=this.base.row,m=this.base.column,g=this.editor.getCursorPosition().column,v=this.editor.session.getLine(a).slice(m,g);this.inlineRenderer.show(this.editor,d,v)?this.$seen(d):this.inlineRenderer.hide()},w.prototype.$onPopupRender=function(){var d=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var a=this.popup.getFirstVisibleRow();a<=this.popup.getLastVisibleRow();a++){var m=this.popup.getData(a);m&&(!d||m.hideInlinePreview)&&this.$seen(m)}},w.prototype.$onPopupShow=function(d){this.$onPopupChange(d),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},w.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var d=this.editor.container.parentNode,a=[];d;)a.push(d),d.addEventListener("scroll",this.onLayoutChange,{passive:!0}),d=d.parentNode;this.$elements=a}},w.prototype.unObserveLayoutChanges=function(){var d=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(a){a.removeEventListener("scroll",d.onLayoutChange,{passive:!0})}),this.$elements=null},w.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},w.prototype.$updatePopupPosition=function(){var d=this.editor,a=d.renderer,m=a.layerConfig.lineHeight,g=a.$cursorLayer.getPixelPosition(this.base,!0);g.left-=this.popup.getTextLeftOffset();var v=d.container.getBoundingClientRect();g.top+=v.top-a.layerConfig.offset,g.left+=v.left-d.renderer.scrollLeft,g.left+=a.gutterWidth;var C={top:g.top,left:g.left};a.$ghostText&&a.$ghostTextWidget&&this.base.row===a.$ghostText.position.row&&(C.top+=a.$ghostTextWidget.el.offsetHeight);var $=d.container.getBoundingClientRect().bottom-m,b=$<C.top?{top:$,left:C.left}:C;this.popup.tryShow(b,m,"bottom")||this.popup.tryShow(g,m,"top")||this.popup.show(g,m)},w.prototype.openPopup=function(d,a,m){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var g=this.popup.getRow(),v=this.popup.data[g];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:l(this.popup.getRow()),inline:this.inlineEnabled}),d.keyBinding.addKeyboardHandler(this.keyboardHandler);var C;this.stickySelection&&(C=this.popup.data.indexOf(v)),(!C||C===-1)&&(C=0),this.popup.setRow(this.autoSelect?C:-1),C===g&&v!==this.completions.filtered[C]&&this.$onPopupChange();var $=this.inlineRenderer&&this.inlineEnabled;if(C===g&&$){var b=this.popup.getData(this.popup.getRow());this.$updateGhostText(b)}m?m&&!a&&this.detach():(this.popup.setTheme(d.getTheme()),this.popup.setFontSize(d.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},w.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off("afterRender",this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},w.prototype.changeListener=function(d){var a=this.editor.selection.lead;(a.row!=this.base.row||a.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},w.prototype.blurListener=function(d){var a=document.activeElement,m=this.editor.textInput.getElement(),g=d.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(d.relatedTarget),v=this.popup&&this.popup.container;a!=m&&a.parentNode!=v&&!g&&a!=this.tooltipNode&&d.relatedTarget!=m&&this.detach()},w.prototype.mousedownListener=function(d){this.detach()},w.prototype.mousewheelListener=function(d){this.popup.isMouseOver||this.detach()},w.prototype.mouseOutListener=function(d){this.popup.isOpen&&this.$updatePopupPosition()},w.prototype.goTo=function(d){this.popup.goTo(d)},w.prototype.insertMatch=function(d,a){if(d||(d=this.popup.getData(this.popup.getRow())),!d)return!1;if(d.value==="")return this.detach();var m=this.completions,g=this.getCompletionProvider().insertMatch(this.editor,d,m.filterText,a);return this.completions==m&&this.detach(),g},w.prototype.showPopup=function(d,a){this.editor&&this.detach(),this.activated=!0,this.editor=d,d.completer!=this&&(d.completer&&d.completer.detach(),d.completer=this),d.on("changeSelection",this.changeListener),d.on("blur",this.blurListener),d.on("mousedown",this.mousedownListener),d.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,a)},w.prototype.getCompletionProvider=function(d){return this.completionProvider||(this.completionProvider=new f(d)),this.completionProvider},w.prototype.gatherCompletions=function(d,a){return this.getCompletionProvider().gatherCompletions(d,a)},w.prototype.updateCompletions=function(d,a){if(d&&this.base&&this.completions){var g=this.editor.getCursorPosition(),v=this.editor.session.getTextRange({start:this.base,end:g});if(v==this.completions.filterText)return;if(this.completions.setFilter(v),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==v&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,v,d);return}if(a&&a.matches){var g=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(g.row,g.column),this.base.$insertRight=!0,this.completions=new L(a.matches),this.openPopup(this.editor,"",d)}var m=this.editor.getSession(),g=this.editor.getCursorPosition(),v=c.getCompletionPrefix(this.editor);this.base=m.doc.createAnchor(g.row,g.column-v.length),this.base.$insertRight=!0;var C={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:v,pos:g}).provideCompletions(this.editor,C,function($,b,p){var u=b.filtered,y=c.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),p){if(!u.length){var S=!this.autoShown&&this.emptyMessage;if(typeof S=="function"&&(S=this.emptyMessage(y)),S){var T=[{caption:S,value:""}];this.completions=new L(T),this.openPopup(this.editor,y,d),this.popup.renderer.setStyle("ace_loading",!1);return}return this.detach()}if(u.length==1&&u[0].value==y&&!u[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&u.length==1)return this.insertMatch(u[0])}this.completions=!p&&this.showLoadingState?new L(w.completionsForLoading.concat(u),b.filterText):b,this.openPopup(this.editor,y,d),this.popup.renderer.setStyle("ace_loading",!p)}.bind(this)),this.showLoadingState&&!this.autoShown&&!(this.popup&&this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},w.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},w.prototype.updateDocTooltip=function(){var d=this.popup,a=this.completions.filtered,m=a&&(a[d.getHoveredRow()]||a[d.getRow()]),g=null;if(!m||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var v=this.editor.completers.length,C=0;C<v;C++){var $=this.editor.completers[C];if($.getDocTooltip&&m.completerId===$.id){g=$.getDocTooltip(m);break}}if(!g&&typeof m!="string"&&(g=m),typeof g=="string"&&(g={docText:g}),!g||!(g.docHTML||g.docText))return this.hideDocTooltip();this.showDocTooltip(g)},w.prototype.showDocTooltip=function(d){this.tooltipNode||(this.tooltipNode=i.createElement("div"),this.tooltipNode.style.margin="0",this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.style.overscrollBehavior="contain",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"),this.tooltipNode.addEventListener("wheel",o));var a=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(a.isDark?"ace_dark ":"")+(a.cssClass||"");var m=this.tooltipNode;d.docHTML?m.innerHTML=d.docHTML:d.docText&&(m.textContent=d.docText),m.parentNode||this.popup.container.appendChild(this.tooltipNode);var g=this.popup,v=g.container.getBoundingClientRect();m.style.top=g.container.style.top,m.style.bottom=g.container.style.bottom,m.style.display="block",window.innerWidth-v.right<320?v.left<320?g.isTopdown?(m.style.top=v.bottom+"px",m.style.left=v.left+"px",m.style.right="",m.style.bottom=""):(m.style.top=g.container.offsetTop-m.offsetHeight+"px",m.style.left=v.left+"px",m.style.right="",m.style.bottom=""):(m.style.right=window.innerWidth-v.left+"px",m.style.left=""):(m.style.left=v.right+1+"px",m.style.right="")},w.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var d=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==d&&this.editor.focus(),this.tooltipNode=null,d.parentNode&&d.parentNode.removeChild(d)}},w.prototype.onTooltipClick=function(d){for(var a=d.target;a&&a!=this.tooltipNode;){if(a.nodeName=="A"&&a.href){a.rel="noreferrer",a.target="_blank";break}a=a.parentNode}},w.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var d=this.popup.container;d&&d.parentNode&&d.parentNode.removeChild(d)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",s),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},w}();h.prototype.commands={Up:function(w){w.completer.goTo("up")},Down:function(w){w.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(w){w.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(w){w.completer.goTo("end")},Esc:function(w){w.completer.detach()},Return:function(w){return w.completer.insertMatch()},"Shift-Return":function(w){w.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(w){var d=w.completer.insertMatch();if(!d&&!w.tabstopManager)w.completer.goTo("down");else return d},PageUp:function(w){w.completer.popup.gotoPageUp()},PageDown:function(w){w.completer.popup.gotoPageDown()}},h.for=function(w){return w.completer instanceof h||(w.completer&&(w.completer.destroy(),w.completer=null),t.get("sharedPopups")?(h.$sharedInstance||(h.$sharedInstance=new h),w.completer=h.$sharedInstance):(w.completer=new h,w.once("destroy",s))),w.completer},h.startCommand={name:"startAutocomplete",exec:function(w,d){var a=h.for(w);a.autoInsert=!1,a.autoSelect=!0,a.autoShown=!1,a.showPopup(w,d),a.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var f=function(){function w(d){this.initialPosition=d,this.active=!0}return w.prototype.insertByIndex=function(d,a,m){return!this.completions||!this.completions.filtered?!1:this.insertMatch(d,this.completions.filtered[a],m)},w.prototype.insertMatch=function(d,a,m){if(!a)return!1;if(d.startOperation({command:{name:"insertMatch"}}),a.completer&&a.completer.insertMatch)a.completer.insertMatch(d,a);else{if(!this.completions)return!1;var g=this.completions.filterText.length,v=0;if(a.range&&a.range.start.row===a.range.end.row&&(g-=this.initialPosition.prefix.length,g+=this.initialPosition.pos.column-a.range.start.column,v+=a.range.end.column-this.initialPosition.pos.column),g||v){var C;d.selection.getAllRanges?C=d.selection.getAllRanges():C=[d.getSelectionRange()];for(var $=0,b;b=C[$];$++)b.start.column-=g,b.end.column+=v,d.session.remove(b)}a.snippet?n.insertSnippet(d,a.snippet):this.$insertString(d,a),a.completer&&a.completer.onInsert&&typeof a.completer.onInsert=="function"&&a.completer.onInsert(d,a),a.command&&a.command==="startAutocomplete"&&d.execCommand(a.command)}return d.endOperation(),!0},w.prototype.$insertString=function(d,a){var m=a.value||a;d.execCommand("insertstring",m)},w.prototype.gatherCompletions=function(d,a){var m=d.getSession(),g=d.getCursorPosition(),v=c.getCompletionPrefix(d),C=[];this.completers=d.completers;var $=d.completers.length;return d.completers.forEach(function(b,p){b.getCompletions(d,m,g,v,function(u,y){b.hideInlinePreview&&(y=y.map(function(S){return Object.assign(S,{hideInlinePreview:b.hideInlinePreview})})),!u&&y&&(C=C.concat(y)),a(null,{prefix:c.getCompletionPrefix(d),matches:C,finished:--$===0})})}),!0},w.prototype.provideCompletions=function(d,a,m){var g=function(b){var p=b.prefix,u=b.matches;this.completions=new L(u),a.exactMatch&&(this.completions.exactMatch=!0),a.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(p),(b.finished||this.completions.filtered.length)&&m(null,this.completions,b.finished)}.bind(this),v=!0,C=null;if(this.gatherCompletions(d,function(b,p){if(!!this.active){b&&(m(b,[],!0),this.detach());var u=p.prefix;if(u.indexOf(p.prefix)===0){if(v){C=p;return}g(p)}}}.bind(this)),v=!1,C){var $=C;C=null,g($)}},w.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(d){typeof d.cancel=="function"&&d.cancel()})},w}(),L=function(){function w(d,a){this.all=d,this.filtered=d,this.filterText=a||"",this.exactMatch=!1,this.ignoreCaption=!1}return w.prototype.setFilter=function(d){if(d.length>this.filterText&&d.lastIndexOf(this.filterText,0)===0)var a=this.filtered;else var a=this.all;this.filterText=d,a=this.filterCompletions(a,this.filterText),a=a.sort(function(g,v){return v.exactMatch-g.exactMatch||v.$score-g.$score||(g.caption||g.value).localeCompare(v.caption||v.value)});var m=null;a=a.filter(function(g){var v=g.snippet||g.caption||g.value;return v===m?!1:(m=v,!0)}),this.filtered=a},w.prototype.filterCompletions=function(d,a){var m=[],g=a.toUpperCase(),v=a.toLowerCase();e:for(var C=0,$;$=d[C];C++){var b=!this.ignoreCaption&&$.caption||$.value||$.snippet;if(!!b){var p=-1,u=0,y=0,S,T;if(this.exactMatch){if(a!==b.substr(0,a.length))continue e}else{var E=b.toLowerCase().indexOf(v);if(E>-1)y=E;else for(var _=0;_<a.length;_++){var I=b.indexOf(v[_],p+1),D=b.indexOf(g[_],p+1);if(S=I>=0&&(D<0||I<D)?I:D,S<0)continue e;T=S-p-1,T>0&&(p===-1&&(y+=10),y+=T,u=u|1<<_),p=S}}$.matchMask=u,$.exactMatch=y?0:1,$.$score=($.score||0)-y,m.push($)}}return m},w}();k.Autocomplete=h,k.CompletionProvider=f,k.FilteredList=L}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(M,k,B){var R=M("../range").Range,x=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;function A(c,r){var i=c.getTextRange(R.fromPoints({row:0,column:0},r));return i.split(x).length-1}function l(c,r){var i=A(c,r),n=c.getValue().split(x),t=Object.create(null),e=n[i];return n.forEach(function(o,s){if(!(!o||o===e)){var h=Math.abs(i-s),f=n.length-h;t[o]?t[o]=Math.max(f,t[o]):t[o]=f}}),t}k.getCompletions=function(c,r,i,n,t){var e=l(r,i),o=Object.keys(e);t(null,o.map(function(s){return{caption:s,value:s,score:e[s],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],function(M,k,B){var R=M("../snippets").snippetManager,x=M("../autocomplete").Autocomplete,A=M("../config"),l=M("../lib/lang"),c=M("../autocomplete/util"),r=M("../autocomplete/text_completer"),i={getCompletions:function(g,v,C,$,b){if(v.$mode.completer)return v.$mode.completer.getCompletions(g,v,C,$,b);var p=g.session.getState(C.row),u=v.$mode.getCompletions(p,v,C,$);u=u.map(function(y){return y.completerId=i.id,y}),b(null,u)},id:"keywordCompleter"},n=function(g){var v={};return g.replace(/\${(\d+)(:(.*?))?}/g,function(C,$,b,p){return v[$]=p||""}).replace(/\$(\d+?)/g,function(C,$){return v[$]})},t={getCompletions:function(g,v,C,$,b){var p=[],u=v.getTokenAt(C.row,C.column);u&&u.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?p.push("html-tag"):p=R.getActiveScopes(g);var y=R.snippetMap,S=[];p.forEach(function(T){for(var E=y[T]||[],_=E.length;_--;){var I=E[_],D=I.name||I.tabTrigger;!D||S.push({caption:D,snippet:I.content,meta:I.tabTrigger&&!I.name?I.tabTrigger+"\u21E5 ":"snippet",completerId:t.id})}},this),b(null,S)},getDocTooltip:function(g){g.snippet&&!g.docHTML&&(g.docHTML=["<b>",l.escapeHTML(g.caption),"</b>","<hr></hr>",l.escapeHTML(n(g.snippet))].join(""))},id:"snippetCompleter"},e=[t,r,i];k.setCompleters=function(g){e.length=0,g&&e.push.apply(e,g)},k.addCompleter=function(g){e.push(g)},k.textCompleter=r,k.keyWordCompleter=i,k.snippetCompleter=t;var o={name:"expandSnippet",exec:function(g){return R.expandWithTab(g)},bindKey:"Tab"},s=function(g,v){h(v.session.$mode)},h=function(g){typeof g=="string"&&(g=A.$modes[g]),g&&(R.files||(R.files={}),f(g.$id,g.snippetFileId),g.modes&&g.modes.forEach(h))},f=function(g,v){!v||!g||R.files[g]||(R.files[g]={},A.loadModule(v,function(C){!C||(R.files[g]=C,!C.snippets&&C.snippetText&&(C.snippets=R.parseSnippetFile(C.snippetText)),R.register(C.snippets||[],C.scope),C.includeScopes&&(R.snippetMap[C.scope].includeScopes=C.includeScopes,C.includeScopes.forEach(function($){h("ace/mode/"+$)})))}))},L=function(g){var v=g.editor,C=v.completer&&v.completer.activated;if(g.command.name==="backspace")C&&!c.getCompletionPrefix(v)&&v.completer.detach();else if(g.command.name==="insertstring"&&!C){w=g;var $=g.editor.$liveAutocompletionDelay;$?d.delay($):a(g)}},w,d=l.delayedCall(function(){a(w)},0),a=function(g){var v=g.editor,C=c.getCompletionPrefix(v),$=c.triggerAutocomplete(v);if(C&&C.length>=v.$liveAutocompletionThreshold||$){var b=x.for(v);b.autoShown=!0,b.showPopup(v)}},m=M("../editor").Editor;M("../config").defineOptions(m.prototype,"editor",{enableBasicAutocompletion:{set:function(g){g?(this.completers||(this.completers=Array.isArray(g)?g:e),this.commands.addCommand(x.startCommand)):this.commands.removeCommand(x.startCommand)},value:!1},enableLiveAutocompletion:{set:function(g){g?(this.completers||(this.completers=Array.isArray(g)?g:e),this.commands.on("afterExec",L)):this.commands.off("afterExec",L)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(g){g?(this.commands.addCommand(o),this.on("changeMode",s),s(null,this)):(this.commands.removeCommand(o),this.off("changeMode",s))},value:!1}})}),function(){ace.require(["ace/ext/language_tools"],function(M){j&&(j.exports=M)})}()})(We);var Pe="/qasimadmin/assets/worker-json.b183eeb3.js";export{Be as V,Oe as a,Pe as w};
|