"use strict";(()=>{var Bt=Object.create;var Fe=Object.defineProperty;var Ht=Object.getOwnPropertyDescriptor;var zt=Object.getOwnPropertyNames;var Pt=Object.getPrototypeOf,jt=Object.prototype.hasOwnProperty;var Ut=(d,v,R)=>v in d?Fe(d,v,{enumerable:!0,configurable:!0,writable:!0,value:R}):d[v]=R;var re=(d,v)=>()=>(v||d((v={exports:{}}).exports,v),v.exports);var Vt=(d,v,R,$)=>{if(v&&typeof v=="object"||typeof v=="function")for(let b of zt(v))!jt.call(d,b)&&b!==R&&Fe(d,b,{get:()=>v[b],enumerable:!($=Ht(v,b))||$.enumerable});return d};var oe=(d,v,R)=>(R=d!=null?Bt(Pt(d)):{},Vt(v||!d||!d.__esModule?Fe(R,"default",{value:d,enumerable:!0}):R,d));var Ue=(d,v,R)=>Ut(d,typeof v!="symbol"?v+"":v,R);var Ge=re((Ve,pe)=>{(function(){var d="ace",v=(function(){return this})();if(!v&&typeof window<"u"&&(v=window),!d&&typeof requirejs<"u")return;var R=function(o,i,n){if(typeof o!="string"){R.original?R.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(n=i),R.modules[o]||(R.payloads[o]=n,R.modules[o]=null)};R.modules={},R.payloads={};var $=function(o,i,n){if(typeof i=="string"){var t=s(o,i);if(t!=null)return n&&n(),t}else if(Object.prototype.toString.call(i)==="[object Array]"){for(var e=[],r=0,l=i.length;rs.length)&&(h=s.length),h-=b.length;var a=s.indexOf(b,h);return a!==-1&&a===h}),String.prototype.repeat||$(String.prototype,"repeat",function(b){for(var h="",s=this;b>0;)b&1&&(h+=s),(b>>=1)&&(s+=s);return h}),String.prototype.includes||$(String.prototype,"includes",function(b,h){return this.indexOf(b,h)!=-1}),Object.assign||(Object.assign=function(b){if(b==null)throw new TypeError("Cannot convert undefined or null to object");for(var h=Object(b),s=1;s>>0,a=arguments[1],o=a>>0,i=o<0?Math.max(s+o,0):Math.min(o,s),n=arguments[2],t=n===void 0?s:n>>0,e=t<0?Math.max(s+t,0):Math.min(t,s);i0;)s&1&&(a+=h),(s>>=1)&&(h+=h);return a};var $=/^\s\s*/,b=/\s\s*$/;v.stringTrimLeft=function(h){return h.replace($,"")},v.stringTrimRight=function(h){return h.replace(b,"")},v.copyObject=function(h){var s={};for(var a in h)s[a]=h[a];return s},v.copyArray=function(h){for(var s=[],a=0,o=h.length;a65535?2:1}});ace.define("ace/lib/useragent",["require","exports","module"],function(d,v,R){"use strict";v.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},v.getOS=function(){return v.isMac?v.OS.MAC:v.isLinux?v.OS.LINUX:v.OS.WINDOWS};var $=typeof navigator=="object"?navigator:{},b=(/mac|win|linux/i.exec($.platform)||["other"])[0].toLowerCase(),h=$.userAgent||"",s=$.appName||"";v.isWin=b=="win",v.isMac=b=="mac",v.isLinux=b=="linux",v.isIE=s=="Microsoft Internet Explorer"||s.indexOf("MSAppHost")>=0?parseFloat((h.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((h.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),v.isOldIE=v.isIE&&v.isIE<9,v.isGecko=v.isMozilla=h.match(/ Gecko\/\d+/),v.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",v.isWebKit=parseFloat(h.split("WebKit/")[1])||void 0,v.isChrome=parseFloat(h.split(" Chrome/")[1])||void 0,v.isSafari=parseFloat(h.split(" Safari/")[1])&&!v.isChrome||void 0,v.isEdge=parseFloat(h.split(" Edge/")[1])||void 0,v.isAIR=h.indexOf("AdobeAIR")>=0,v.isAndroid=h.indexOf("Android")>=0,v.isChromeOS=h.indexOf(" CrOS ")>=0,v.isIOS=/iPad|iPhone|iPod/.test(h)&&!window.MSStream,v.isIOS&&(v.isMac=!0),v.isMobile=v.isIOS||v.isAndroid});ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(d,v,R){"use strict";var $=d("./useragent"),b="http://www.w3.org/1999/xhtml";v.buildDom=function n(t,e,r){if(typeof t=="string"&&t){var l=document.createTextNode(t);return e&&e.appendChild(l),l}if(!Array.isArray(t))return t&&t.appendChild&&e&&e.appendChild(t),t;if(typeof t[0]!="string"||!t[0]){for(var c=[],u=0;u"u")){if(s){if(e)a();else if(e===!1)return s.push([n,t])}if(!h){var r=e;!e||!e.getRootNode?r=document:(r=e.getRootNode(),(!r||r==e)&&(r=document));var l=r.ownerDocument||r;if(t&&v.hasCssString(t,r))return null;t&&(n+=` /*# sourceURL=ace/css/`+t+" */");var c=v.createElement("style");c.appendChild(l.createTextNode(n)),t&&(c.id=t),r==l&&(r=v.getDocumentHead(l)),r.insertBefore(c,r.firstChild)}}}if(v.importCssString=o,v.importCssStylsheet=function(n,t){v.buildDom(["link",{rel:"stylesheet",href:n}],v.getDocumentHead(t))},v.$fixPositionBug=function(n){var t=n.getBoundingClientRect();if(n.style.left){var e=parseFloat(n.style.left),r=+t.left;Math.abs(e-r)>1&&(n.style.left=2*e-r+"px")}if(n.style.right){var e=parseFloat(n.style.right),r=window.innerWidth-t.right;Math.abs(e-r)>1&&(n.style.right=2*e-r+"px")}if(n.style.top){var e=parseFloat(n.style.top),r=+t.top;Math.abs(e-r)>1&&(n.style.top=2*e-r+"px")}if(n.style.bottom){var e=parseFloat(n.style.bottom),r=window.innerHeight-t.bottom;Math.abs(e-r)>1&&(n.style.bottom=2*e-r+"px")}},v.scrollbarWidth=function(n){var t=v.createElement("ace_inner");t.style.width="100%",t.style.minWidth="0px",t.style.height="200px",t.style.display="block";var e=v.createElement("ace_outer"),r=e.style;r.position="absolute",r.left="-10000px",r.overflow="hidden",r.width="200px",r.minWidth="0px",r.height="150px",r.display="block",e.appendChild(t);var l=n&&n.documentElement||document&&document.documentElement;if(!l)return 0;l.appendChild(e);var c=t.offsetWidth;r.overflow="scroll";var u=t.offsetWidth;return c===u&&(u=e.clientWidth),l.removeChild(e),c-u},v.computedStyle=function(n,t){return window.getComputedStyle(n,"")||{}},v.setStyle=function(n,t,e){n[t]!==e&&(n[t]=e)},v.HAS_CSS_ANIMATION=!1,v.HAS_CSS_TRANSFORMS=!1,v.HI_DPI=$.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,$.isChromeOS&&(v.HI_DPI=!1),typeof document<"u"){var i=document.createElement("div");v.HI_DPI&&i.style.transform!==void 0&&(v.HAS_CSS_TRANSFORMS=!0),!$.isEdge&&typeof i.style.animationName<"u"&&(v.HAS_CSS_ANIMATION=!0),i=null}v.HAS_CSS_TRANSFORMS?v.translate=function(n,t,e){n.style.transform="translate("+Math.round(t)+"px, "+Math.round(e)+"px)"}:v.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(d,v,R){"use strict";var $=d("./dom");v.get=function(b,h){var s=new XMLHttpRequest;s.open("GET",b,!0),s.onreadystatechange=function(){s.readyState===4&&h(s.responseText)},s.send(null)},v.loadScript=function(b,h){var s=$.getDocumentHead(),a=document.createElement("script");a.src=b,s.appendChild(a),a.onload=a.onreadystatechange=function(o,i){(i||!a.readyState||a.readyState=="loaded"||a.readyState=="complete")&&(a=a.onload=a.onreadystatechange=null,i||h())}},v.qualifyURL=function(b){var h=document.createElement("a");return h.href=b,h.href}});ace.define("ace/lib/oop",["require","exports","module"],function(d,v,R){"use strict";v.inherits=function($,b){$.super_=b,$.prototype=Object.create(b.prototype,{constructor:{value:$,enumerable:!1,writable:!0,configurable:!0}})},v.mixin=function($,b){for(var h in b)$[h]=b[h];return $},v.implement=function($,b){v.mixin($,b)}});ace.define("ace/lib/event_emitter",["require","exports","module"],function(d,v,R){"use strict";var $={},b=function(){this.propagationStopped=!0},h=function(){this.defaultPrevented=!0};$._emit=$._dispatchEvent=function(s,a){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var o=this._eventRegistry[s]||[],i=this._defaultHandlers[s];if(!(!o.length&&!i)){(typeof a!="object"||!a)&&(a={}),a.type||(a.type=s),a.stopPropagation||(a.stopPropagation=b),a.preventDefault||(a.preventDefault=h),o=o.slice();for(var n=0;n1&&(c=r[r.length-2]);var g=a[e+"Path"];return g==null?g=a.basePath:l=="/"&&(e=l=""),g&&g.slice(-1)!="/"&&(g+="/"),g+e+l+c+this.get("suffix")},v.setModuleUrl=function(t,e){return a.$moduleUrls[t]=e};var o=function(t,e){if(t==="ace/theme/textmate"||t==="./theme/textmate")return e(null,d("./theme/textmate"));if(i)return i(t,e);console.error("loader is not configured")},i;v.setLoader=function(t){i=t},v.dynamicModules=Object.create(null),v.$loading={},v.$loaded={},v.loadModule=function(t,e){var r;if(Array.isArray(t))var l=t[0],c=t[1];else if(typeof t=="string")var c=t;var u=function(g){if(g&&!v.$loading[c])return e&&e(g);if(v.$loading[c]||(v.$loading[c]=[]),v.$loading[c].push(e),!(v.$loading[c].length>1)){var p=function(){o(c,function(w,k){k&&(v.$loaded[c]=k),v._emit("load.module",{name:c,module:k});var y=v.$loading[c];v.$loading[c]=null,y.forEach(function(A){A&&A(k)})})};if(!v.get("packaged"))return p();b.loadScript(v.moduleUrl(c,l),p),n()}};if(v.dynamicModules[c])v.dynamicModules[c]().then(function(g){g.default?u(g.default):u(g)});else{try{r=this.$require(c)}catch{}u(r||v.$loaded[c])}},v.$require=function(t){if(typeof R.require=="function"){var e="require";return R[e](t)}},v.setModuleLoader=function(t,e){v.dynamicModules[t]=e};var n=function(){!a.basePath&&!a.workerPath&&!a.modePath&&!a.themePath&&!Object.keys(a.$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(){})};v.version="1.43.5"});ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(d,v,R){"use strict";d("./lib/fixoldbrowsers");var $=d("./config");$.setLoader(function(a,o){d([a],function(i){o(null,i)})});var b=(function(){return this||typeof window<"u"&&window})();R.exports=function(a){$.init=h,$.$require=d,a.require=d,typeof define=="function"&&(a.define=define)},h(!0);function h(a){if(!(!b||!b.document)){$.set("packaged",a||d.packaged||R.packaged||b.define&&define.packaged);var o={},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"),r=0;r ["+this.end.row+"/"+this.end.column+"]"},b.prototype.contains=function(h,s){return this.compare(h,s)==0},b.prototype.compareRange=function(h){var s,a=h.end,o=h.start;return s=this.compare(a.row,a.column),s==1?(s=this.compare(o.row,o.column),s==1?2:s==0?1:0):s==-1?-2:(s=this.compare(o.row,o.column),s==-1?-1:s==1?42:0)},b.prototype.comparePoint=function(h){return this.compare(h.row,h.column)},b.prototype.containsRange=function(h){return this.comparePoint(h.start)==0&&this.comparePoint(h.end)==0},b.prototype.intersects=function(h){var s=this.compareRange(h);return s==-1||s==0||s==1},b.prototype.isEnd=function(h,s){return this.end.row==h&&this.end.column==s},b.prototype.isStart=function(h,s){return this.start.row==h&&this.start.column==s},b.prototype.setStart=function(h,s){typeof h=="object"?(this.start.column=h.column,this.start.row=h.row):(this.start.row=h,this.start.column=s)},b.prototype.setEnd=function(h,s){typeof h=="object"?(this.end.column=h.column,this.end.row=h.row):(this.end.row=h,this.end.column=s)},b.prototype.inside=function(h,s){return this.compare(h,s)==0?!(this.isEnd(h,s)||this.isStart(h,s)):!1},b.prototype.insideStart=function(h,s){return this.compare(h,s)==0?!this.isEnd(h,s):!1},b.prototype.insideEnd=function(h,s){return this.compare(h,s)==0?!this.isStart(h,s):!1},b.prototype.compare=function(h,s){return!this.isMultiLine()&&h===this.start.row?sthis.end.column?1:0:hthis.end.row?1:this.start.row===h?s>=this.start.column?0:-1:this.end.row===h?s<=this.end.column?0:1:0},b.prototype.compareStart=function(h,s){return this.start.row==h&&this.start.column==s?-1:this.compare(h,s)},b.prototype.compareEnd=function(h,s){return this.end.row==h&&this.end.column==s?1:this.compare(h,s)},b.prototype.compareInside=function(h,s){return this.end.row==h&&this.end.column==s?1:this.start.row==h&&this.start.column==s?-1:this.compare(h,s)},b.prototype.clipRows=function(h,s){if(this.end.row>s)var a={row:s+1,column:0};else if(this.end.rows)var o={row:s+1,column:0};else if(this.start.row1?(A++,A>4&&(A=1)):A=1,b.isIE){var f=Math.abs(m.clientX-M)>5||Math.abs(m.clientY-E)>5;(!_||f)&&(A=1),_&&clearTimeout(_),_=setTimeout(function(){_=null},p[A-1]||600),A==1&&(M=m.clientX,E=m.clientY)}if(m._clicks=A,w[k]("mousedown",m),A>4)A=0;else if(A>1)return w[k](C[A],m)}Array.isArray(g)||(g=[g]),g.forEach(function(m){t(m,"mousedown",x,y)})};function r(g){return 0|(g.ctrlKey?1:0)|(g.altKey?2:0)|(g.shiftKey?4:0)|(g.metaKey?8:0)}v.getModifierString=function(g){return $.KEY_MODS[r(g)]};function l(g,p,w){var k=r(p);if(!w&&p.code&&(w=$.$codeToKeyCode[p.code]||w),!b.isMac&&h){if(p.getModifierState&&(p.getModifierState("OS")||p.getModifierState("Win"))&&(k|=8),h.altGr)if((3&k)!=3)h.altGr=0;else return;if(w===18||w===17){var y=p.location;if(w===17&&y===1)h[w]==1&&(s=p.timeStamp);else if(w===18&&k===3&&y===2){var A=p.timeStamp-s;A<50&&(h.altGr=!0)}}}if(w in $.MODIFIER_KEYS&&(w=-1),!(!k&&w===13&&p.location===3&&(g(p,k,-w),p.defaultPrevented))){if(b.isChromeOS&&k&8){if(g(p,k,w),p.defaultPrevented)return;k&=-9}return!k&&!(w in $.FUNCTION_KEYS)&&!(w in $.PRINTABLE_KEYS)?!1:g(p,k,w)}}v.addCommandKeyListener=function(g,p,w){var k=null;t(g,"keydown",function(y){h[y.keyCode]=(h[y.keyCode]||0)+1;var A=l(p,y,y.keyCode);return k=y.defaultPrevented,A},w),t(g,"keypress",function(y){k&&(y.ctrlKey||y.altKey||y.shiftKey||y.metaKey)&&(v.stopEvent(y),k=null)},w),t(g,"keyup",function(y){h[y.keyCode]=null},w),h||(c(),t(window,"focus",c))};function c(){h=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!b.isOldIE){var u=1;v.nextTick=function(g,p){p=p||window;var w="zero-timeout-message-"+u++,k=function(y){y.data==w&&(v.stopPropagation(y),e(p,"message",k),g())};t(p,"message",k),p.postMessage(w,"*")}}v.$idleBlocked=!1,v.onIdle=function(g,p){return setTimeout(function w(){v.$idleBlocked?setTimeout(w,100):g()},p)},v.$idleBlockId=null,v.blockIdle=function(g){v.$idleBlockId&&clearTimeout(v.$idleBlockId),v.$idleBlocked=!0,v.$idleBlockId=setTimeout(function(){v.$idleBlocked=!1},g||100)},v.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),v.nextFrame?v.nextFrame=v.nextFrame.bind(window):v.nextFrame=function(g){setTimeout(g,17)}});ace.define("ace/clipboard",["require","exports","module"],function(d,v,R){"use strict";var $;R.exports={lineMode:!1,pasteCancelled:function(){return $&&$>Date.now()-50?!0:$=!1},cancel:function(){$=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(d,v,R){"use strict";var $=d("../lib/event"),b=d("../config").nls,h=d("../lib/useragent"),s=d("../lib/dom"),a=d("../lib/lang"),o=d("../clipboard"),i=h.isChrome<18,n=h.isIE,t=h.isChrome>63,e=400,r=d("../lib/keys"),l=r.KEY_MODS,c=h.isIOS,u=c?/\s/:/\n/,g=h.isMobile,p=(function(){function w(k,y){var A=this;this.host=y,this.text=s.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","off"),this.text.setAttribute("autocomplete","off"),this.text.setAttribute("autocorrect","off"),this.text.setAttribute("autocapitalize","off"),this.text.setAttribute("spellcheck","false"),this.text.style.opacity="0",k.insertBefore(this.text,k.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",g||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch{}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),$.addListener(this.text,"blur",function(M){A.ignoreFocusEvents||(y.onBlur(M),A.$isFocused=!1)},y),$.addListener(this.text,"focus",function(M){if(!A.ignoreFocusEvents){if(A.$isFocused=!0,h.isEdge)try{if(!document.hasFocus())return}catch{}y.onFocus(M),h.isEdge?setTimeout(A.resetSelection.bind(A)):A.resetSelection()}},y),this.$focusScroll=!1,y.on("beforeEndOperation",function(){var M=y.curOp,E=M&&M.command&&M.command.name;if(E!="insertstring"){var _=E&&(M.docChanged||M.selectionChanged);A.inComposition&&_&&(A.lastValue=A.text.value="",A.onCompositionEnd()),A.resetSelection()}}),y.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=c?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&y.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,$.addCommandKeyListener(this.text,function(M,E,_){if(!A.inComposition)return y.onCommandKey(M,E,_)},y),$.addListener(this.text,"select",this.onSelect.bind(this),y),$.addListener(this.text,"input",this.onInput.bind(this),y),$.addListener(this.text,"cut",this.onCut.bind(this),y),$.addListener(this.text,"copy",this.onCopy.bind(this),y),$.addListener(this.text,"paste",this.onPaste.bind(this),y),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&$.addListener(k,"keydown",function(M){if(!(h.isMac&&!M.metaKey||!M.ctrlKey))switch(M.keyCode){case 67:A.onCopy(M);break;case 86:A.onPaste(M);break;case 88:A.onCut(M);break}},y),this.syncComposition=a.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),$.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),y),$.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),y),$.addListener(this.text,"keyup",this.onKeyup.bind(this),y),$.addListener(this.text,"keydown",this.syncComposition.bind(this),y),$.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),y),this.closeTimeout,$.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),y),$.addListener(this.text,"mousedown",function(M){M.preventDefault(),A.onContextMenuClose()},y),$.addListener(y.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),y),$.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),y),c&&this.addIosSelectionHandler(k,y,this.text)}return w.prototype.addIosSelectionHandler=function(k,y,A){var M=this,E=null,_=!1;A.addEventListener("keydown",function(x){E&&clearTimeout(E),_=!0},!0),A.addEventListener("keyup",function(x){E=setTimeout(function(){_=!1},100)},!0);var C=function(x){if(document.activeElement===A&&!(_||M.inComposition||y.$mouseHandler.isMousePressed)&&!M.copied){var m=A.selectionStart,f=A.selectionEnd,S=null,L=0;if(m==0?S=r.up:m==1?S=r.home:f>M.lastSelectionEnd&&M.lastValue[f]==` `?S=r.end:mM.lastSelectionEnd&&M.lastValue.slice(0,f).split(` `).length>2?S=r.down:f>M.lastSelectionEnd&&M.lastValue[f-1]==" "?(S=r.right,L=l.option):(f>M.lastSelectionEnd||f==M.lastSelectionEnd&&M.lastSelectionEnd!=M.lastSelectionStart&&m==f)&&(S=r.right),m!==f&&(L|=l.shift),S){var T=y.onCommandKey({},L,S);if(!T&&y.commands){S=r.keyCodeToString(S);var I=y.commands.findKeyCommand(L,S);I&&y.execCommand(I)}M.lastSelectionStart=m,M.lastSelectionEnd=f,M.resetSelection("")}}};document.addEventListener("selectionchange",C),y.on("destroy",function(){document.removeEventListener("selectionchange",C)})},w.prototype.onContextMenuClose=function(){var k=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){k.tempStyle&&(k.text.style.cssText=k.tempStyle,k.tempStyle=""),k.host.renderer.$isMousePressed=!1,k.host.renderer.$keepTextAreaAtCursor&&k.host.renderer.$moveTextAreaToCursor()},0)},w.prototype.$onContextMenu=function(k){this.host.textInput.onContextMenu(k),this.onContextMenuClose()},w.prototype.onKeyup=function(k){k.keyCode==27&&this.text.value.lengthe+100||u.test(A)||g&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},w.prototype.sendText=function(k,y){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),k&&this.host.onPaste(k),this.pasted=!1,"";for(var A=this.text.selectionStart,M=this.text.selectionEnd,E=this.lastSelectionStart,_=this.lastValue.length-this.lastSelectionEnd,C=k,x=k.length-A,m=k.length-M,f=0;E>0&&this.lastValue[f]==k[f];)f++,E--;for(C=C.slice(f),f=1;_>0&&this.lastValue.length-f>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-f]==k[k.length-f];)f++,_--;x-=f-1,m-=f-1;var S=C.length-f+1;if(S<0&&(E=-S,S=0),C=C.slice(0,S),!y&&!C&&!x&&!E&&!_&&!m)return"";this.sendingText=!0;var L=!1;return h.isAndroid&&C==". "&&(C=" ",L=!0),C&&!E&&!_&&!x&&!m||this.commandMode?this.host.onTextInput(C):this.host.onTextInput(C,{extendLeft:E,extendRight:_,restoreStart:x,restoreEnd:m}),this.sendingText=!1,this.lastValue=k,this.lastSelectionStart=A,this.lastSelectionEnd=M,this.lastRestoreEnd=m,L?` `:C},w.prototype.onSelect=function(k){var y=this;if(!this.inComposition){var A=function(M){return M.selectionStart===0&&M.selectionEnd>=y.lastValue.length&&M.value===y.lastValue&&y.lastValue&&M.selectionEnd!==y.lastSelectionEnd};this.copied?this.copied=!1:A(this.text)?(this.host.selectAll(),this.resetSelection()):g&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},w.prototype.$resetSelectionIOS=function(k){if(!(!this.$isFocused||this.copied&&!k||this.sendingText)){k||(k="");var y=` ab`+k+`cde fg `;y!=this.text.value&&(this.text.value=this.lastValue=y);var A=4,M=4+(k.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=A||this.lastSelectionEnd!=M)&&this.text.setSelectionRange(A,M),this.lastSelectionStart=A,this.lastSelectionEnd=M}},w.prototype.$resetSelection=function(){var k=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var y=0,A=0,M="",E=function(I,D){for(var O=D,N=1;N<=I-k.rowStart&&N<2*k.numberOfExtraLines+1;N++)O+=k.host.session.getLine(I-N).length+1;return O};if(this.host.session){var _=this.host.selection,C=_.getRange(),x=_.cursor.row;x===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):x===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(xthis.rowEnd+1)&&(this.rowStart=x>this.numberOfExtraLines?x-this.numberOfExtraLines:0,this.rowEnd=x>this.numberOfExtraLines?x+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var m=[],f=this.rowStart;f<=this.rowEnd;f++)m.push(this.host.session.getLine(f));if(M=m.join(` `),y=E(C.start.row,C.start.column),A=E(C.end.row,C.end.column),C.start.rowthis.rowEnd){var L=this.host.session.getLine(this.rowEnd+1);A=C.end.row>this.rowEnd+1?L.length:C.end.column,A+=M.length+1,M=M+` `+L}else g&&x>0&&(M=` `+M,A+=1,y+=1);M.length>e&&(y1),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 r=this.$clickSelection.comparePoint(e);if(r==-1)n=this.$clickSelection.end;else if(r==1)n=this.$clickSelection.start;else{var l=o(this.$clickSelection,e,t.session);e=l.cursor,n=l.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,r=e.renderer.screenToTextCoordinates(this.x,this.y),l=e.selection[n](r.row,r.column);if(this.$clickSelection){var c=this.$clickSelection.comparePoint(l.start),u=this.$clickSelection.comparePoint(l.end);if(c==-1&&u<=0)t=this.$clickSelection.end,(l.end.row!=r.row||l.end.column!=r.column)&&(r=l.start);else if(u==1&&c>=0)t=this.$clickSelection.start,(l.start.row!=r.row||l.start.column!=r.column)&&(r=l.end);else if(c==-1&&u==1)r=l.end,t=l.start;else{var g=o(this.$clickSelection,r,e.session);r=g.cursor,t=g.anchor}e.selection.setSelectionAnchor(t.row,t.column)}e.selection.selectToPosition(r),e.renderer.scrollCursorIntoView()},i.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},i.prototype.focusWait=function(){var n=a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(n>b||t-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},i.prototype.onDoubleClick=function(n){var t=n.getDocumentPosition(),e=this.editor,r=e.session,l=r.getBracketRange(t);l?(l.isEmpty()&&(l.start.column--,l.end.column++),this.setState("select")):(l=e.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=l,this.select()},i.prototype.onTripleClick=function(n){var t=n.getDocumentPosition(),e=this.editor;this.setState("selectByLines");var r=e.getSelectionRange();r.isMultiLine()&&r.contains(t.row,t.column)?(this.$clickSelection=e.selection.getLineRange(r.start.row),this.$clickSelection.end=e.selection.getLineRange(r.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,r=n.domEvent.timeStamp,l=r-e.t,c=l?n.wheelX/l:e.vx,u=l?n.wheelY/l:e.vy;l=1&&t.renderer.isScrollableBy(n.wheelX*n.speed,0)&&(p=!0),g<=1&&t.renderer.isScrollableBy(0,n.wheelY*n.speed)&&(p=!0),p)e.allowed=r;else if(r-e.allowedh.clientHeight;s||b.preventDefault()}});ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(d,v,R){"use strict";var $=this&&this.__extends||(function(){var l=function(c,u){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,p){g.__proto__=p}||function(g,p){for(var w in p)Object.prototype.hasOwnProperty.call(p,w)&&(g[w]=p[w])},l(c,u)};return function(c,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");l(c,u);function g(){this.constructor=c}c.prototype=u===null?Object.create(u):(g.prototype=u.prototype,new g)}})(),b=this&&this.__values||function(l){var c=typeof Symbol=="function"&&Symbol.iterator,u=c&&l[c],g=0;if(u)return u.call(l);if(l&&typeof l.length=="number")return{next:function(){return l&&g>=l.length&&(l=void 0),{value:l&&l[g++],done:!l}}};throw new TypeError(c?"Object is not iterable.":"Symbol.iterator is not defined.")},h=d("./lib/dom"),s=d("./lib/event"),a=d("./range").Range,o=d("./lib/scroll").preventParentScroll,i="ace_tooltip",n=(function(){function l(c){this.isOpen=!1,this.$element=null,this.$parentNode=c}return l.prototype.$init=function(){return this.$element=h.createElement("div"),this.$element.className=i,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},l.prototype.getElement=function(){return this.$element||this.$init()},l.prototype.setText=function(c){this.getElement().textContent=c},l.prototype.setHtml=function(c){this.getElement().innerHTML=c},l.prototype.setPosition=function(c,u){this.getElement().style.left=c+"px",this.getElement().style.top=u+"px"},l.prototype.setClassName=function(c){h.addCssClass(this.getElement(),c)},l.prototype.setTheme=function(c){this.theme&&(this.theme.isDark&&h.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&h.removeCssClass(this.getElement(),this.theme.cssClass)),c.isDark&&h.addCssClass(this.getElement(),"ace_dark"),c.cssClass&&h.addCssClass(this.getElement(),c.cssClass),this.theme={isDark:c.isDark,cssClass:c.cssClass}},l.prototype.show=function(c,u,g){c!=null&&this.setText(c),u!=null&&g!=null&&this.setPosition(u,g),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},l.prototype.hide=function(c){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=i,this.isOpen=!1)},l.prototype.getHeight=function(){return this.getElement().offsetHeight},l.prototype.getWidth=function(){return this.getElement().offsetWidth},l.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},l})(),t=(function(){function l(){this.popups=[]}return l.prototype.addPopup=function(c){this.popups.push(c),this.updatePopups()},l.prototype.removePopup=function(c){var u=this.popups.indexOf(c);u!==-1&&(this.popups.splice(u,1),this.updatePopups())},l.prototype.updatePopups=function(){var c,u,g,p;this.popups.sort(function(x,m){return m.priority-x.priority});var w=[];try{for(var k=b(this.popups),y=k.next();!y.done;y=k.next()){var A=y.value,M=!0;try{for(var E=(g=void 0,b(w)),_=E.next();!_.done;_=E.next()){var C=_.value;if(this.doPopupsOverlap(C,A)){M=!1;break}}}catch(x){g={error:x}}finally{try{_&&!_.done&&(p=E.return)&&p.call(E)}finally{if(g)throw g.error}}M?w.push(A):A.hide()}}catch(x){c={error:x}}finally{try{y&&!y.done&&(u=k.return)&&u.call(k)}finally{if(c)throw c.error}}},l.prototype.doPopupsOverlap=function(c,u){var g=c.getElement().getBoundingClientRect(),p=u.getElement().getBoundingClientRect();return g.leftp.left&&g.topp.top},l})(),e=new t;v.popupManager=e,v.Tooltip=n;var r=(function(l){$(c,l);function c(u){u===void 0&&(u=document.body);var g=l.call(this,u)||this;g.timeout=void 0,g.lastT=0,g.idleTime=350,g.lastEvent=void 0,g.onMouseOut=g.onMouseOut.bind(g),g.onMouseMove=g.onMouseMove.bind(g),g.waitForHover=g.waitForHover.bind(g),g.hide=g.hide.bind(g);var p=g.getElement();return p.style.whiteSpace="pre-wrap",p.style.pointerEvents="auto",p.addEventListener("mouseout",g.onMouseOut),p.tabIndex=-1,p.addEventListener("blur",function(){p.contains(document.activeElement)||this.hide()}.bind(g)),p.addEventListener("wheel",o),g}return c.prototype.addToEditor=function(u){u.on("mousemove",this.onMouseMove),u.on("mousedown",this.hide);var g=u.renderer.getMouseEventTarget();g&&typeof g.removeEventListener=="function"&&g.addEventListener("mouseout",this.onMouseOut,!0)},c.prototype.removeFromEditor=function(u){u.off("mousemove",this.onMouseMove),u.off("mousedown",this.hide);var g=u.renderer.getMouseEventTarget();g&&typeof g.removeEventListener=="function"&&g.removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},c.prototype.onMouseMove=function(u,g){this.lastEvent=u,this.lastT=Date.now();var p=g.$mouseHandler.isMousePressed;if(this.isOpen){var w=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(w.row,w.column)||p||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||p||(this.lastEvent=u,this.timeout=setTimeout(this.waitForHover,this.idleTime))},c.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var u=Date.now()-this.lastT;if(this.idleTime-u>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-u);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},c.prototype.isOutsideOfText=function(u){var g=u.editor,p=u.getDocumentPosition(),w=g.session.getLine(p.row);if(p.column==w.length){var k=g.renderer.pixelToScreenCoordinates(u.clientX,u.clientY),y=g.session.documentToScreenPosition(p.row,p.column);if(y.column!=k.column||y.row!=k.row)return!0}return!1},c.prototype.setDataProvider=function(u){this.$gatherData=u},c.prototype.showForRange=function(u,g,p,w){if(!(w&&w!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var k=u.renderer;this.isOpen||(e.addPopup(this),this.$registerCloseEvents(),this.setTheme(k.theme)),this.isOpen=!0,this.range=a.fromPoints(g.start,g.end);var y=k.textToScreenCoordinates(g.start.row,g.start.column),A=k.scroller.getBoundingClientRect();y.pageX=e.length&&(e=void 0),{value:e&&e[c++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},h=d("../lib/dom"),s=d("./mouse_event").MouseEvent,a=d("../tooltip").HoverTooltip,o=d("../config").nls,i=d("../range").Range;function n(e){var r=e.editor,l=r.renderer.$gutterLayer;e.$tooltip=new t(r),e.$tooltip.addToEditor(r),e.$tooltip.setDataProvider(function(c,u){var g=c.getDocumentPosition().row;e.$tooltip.showTooltip(g)}),e.editor.setDefaultHandler("guttermousedown",function(c){if(!(!r.isFocused()||c.getButton()!=0)){var u=l.getRegion(c);if(u!="foldWidgets"){var g=c.getDocumentPosition().row,p=r.session.selection;if(c.getShiftKey())p.selectTo(g,0);else{if(c.domEvent.detail==2)return r.selectAll(),c.preventDefault();e.$clickSelection=r.selection.getLineRange(g)}return e.setState("selectByLines"),e.captureMouse(c),c.preventDefault()}}})}v.GutterHandler=n;var t=(function(e){$(r,e);function r(l){var c=e.call(this,l.container)||this;c.id="gt"+ ++r.$uid,c.editor=l,c.visibleTooltipRow;var u=c.getElement();return u.setAttribute("role","tooltip"),u.setAttribute("id",c.id),u.style.pointerEvents="auto",c.idleTime=50,c.onDomMouseMove=c.onDomMouseMove.bind(c),c.onDomMouseOut=c.onDomMouseOut.bind(c),c.setClassName("ace_gutter-tooltip"),c}return r.prototype.onDomMouseMove=function(l){var c=new s(l,this.editor);this.onMouseMove(c,this.editor)},r.prototype.onDomMouseOut=function(l){var c=new s(l,this.editor);this.onMouseOut(c)},r.prototype.addToEditor=function(l){var c=l.renderer.$gutter;c.addEventListener("mousemove",this.onDomMouseMove),c.addEventListener("mouseout",this.onDomMouseOut),e.prototype.addToEditor.call(this,l)},r.prototype.removeFromEditor=function(l){var c=l.renderer.$gutter;c.removeEventListener("mousemove",this.onDomMouseMove),c.removeEventListener("mouseout",this.onDomMouseOut),e.prototype.removeFromEditor.call(this,l)},r.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),e.prototype.destroy.call(this)},Object.defineProperty(r,"annotationLabels",{get:function(){return{error:{singular:o("gutter-tooltip.aria-label.error.singular","error"),plural:o("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:o("gutter-tooltip.aria-label.security.singular","security finding"),plural:o("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:o("gutter-tooltip.aria-label.warning.singular","warning"),plural:o("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:o("gutter-tooltip.aria-label.info.singular","information message"),plural:o("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:o("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:o("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),r.prototype.showTooltip=function(l){var c,u=this.editor.renderer.$gutterLayer,g=u.$annotations[l],p;g?p={displayText:Array.from(g.displayText),type:Array.from(g.type)}:p={displayText:[],type:[]};var w=u.session.getFoldLine(l);if(w&&u.$showFoldedAnnotations){for(var k={error:[],security:[],warning:[],info:[],hint:[]},y={error:1,security:2,warning:3,info:4,hint:5},A,M=l+1;M<=w.end.row;M++)if(u.$annotations[M])for(var E=0;E2)return u.childNodes[2]}},r.prototype.$findCellByRow=function(l){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(c){return c.row===l})},r.prototype.hide=function(l){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.visibleTooltipRow!=null){var c=this.$findLinkedAnnotationNode(this.visibleTooltipRow);c&&c.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),e.prototype.hide.call(this,l)}},r.annotationsToSummaryString=function(l){var c,u,g=[],p=["error","security","warning","info","hint"];try{for(var w=b(p),k=w.next();!k.done;k=w.next()){var y=k.value;if(l[y].length){var A=l[y].length===1?r.annotationLabels[y].singular:r.annotationLabels[y].plural;g.push("".concat(l[y].length," ").concat(A))}}}catch(M){c={error:M}}finally{try{k&&!k.done&&(u=w.return)&&u.call(w)}finally{if(c)throw c.error}}return g.join(", ")},r.prototype.isOutsideOfText=function(l){var c=l.editor,u=c.renderer.$gutter.getBoundingClientRect();return!(l.clientX>=u.left&&l.clientX<=u.right&&l.clientY>=u.top&&l.clientY<=u.bottom)},r})(a);t.$uid=0,v.GutterTooltip=t});ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(d,v,R){"use strict";var $=d("../lib/dom"),b=d("../lib/event"),h=d("../lib/useragent"),s=200,a=200,o=5;function i(t){var e=t.editor,r=$.createElement("div");r.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",r.textContent="\xA0";var l=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];l.forEach(function(F){t[F]=this[F]},this),e.on("mousedown",this.onMouseDown.bind(t));var c=e.container,u,g,p,w,k,y,A=0,M,E,_,C,x;this.onDragStart=function(F){if(this.cancelDrag||!c.draggable){var B=this;return setTimeout(function(){B.startSelect(),B.captureMouse(F)},0),F.preventDefault()}k=e.getSelectionRange();var W=F.dataTransfer;W.effectAllowed=e.getReadOnly()?"copy":"copyMove",e.container.appendChild(r),W.setDragImage&&W.setDragImage(r,0,0),setTimeout(function(){e.container.removeChild(r)}),W.clearData(),W.setData("Text",e.session.getTextRange()),E=!0,this.setState("drag")},this.onDragEnd=function(F){if(c.draggable=!1,E=!1,this.setState(null),!e.getReadOnly()){var B=F.dataTransfer.dropEffect;!M&&B=="move"&&e.session.remove(e.getSelectionRange()),e.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(F){if(!(e.getReadOnly()||!O(F.dataTransfer)))return g=F.clientX,p=F.clientY,u||L(),A++,F.dataTransfer.dropEffect=M=N(F),b.preventDefault(F)},this.onDragOver=function(F){if(!(e.getReadOnly()||!O(F.dataTransfer)))return g=F.clientX,p=F.clientY,u||(L(),A++),I!==null&&(I=null),F.dataTransfer.dropEffect=M=N(F),b.preventDefault(F)},this.onDragLeave=function(F){if(A--,A<=0&&u)return T(),M=null,b.preventDefault(F)},this.onDrop=function(F){if(y){var B=F.dataTransfer;if(E)switch(M){case"move":k.contains(y.row,y.column)?k={start:y,end:y}:k=e.moveText(k,y);break;case"copy":k=e.moveText(k,y,!0);break}else{var W=B.getData("Text");k={start:y,end:e.session.insert(y,W)},e.focus(),M=null}return T(),b.preventDefault(F)}},b.addListener(c,"dragstart",this.onDragStart.bind(t),e),b.addListener(c,"dragend",this.onDragEnd.bind(t),e),b.addListener(c,"dragenter",this.onDragEnter.bind(t),e),b.addListener(c,"dragover",this.onDragOver.bind(t),e),b.addListener(c,"dragleave",this.onDragLeave.bind(t),e),b.addListener(c,"drop",this.onDrop.bind(t),e);function m(F,B){var W=Date.now(),H=!B||F.row!=B.row,z=!B||F.column!=B.column;if(!C||H||z)e.moveCursorToPosition(F),C=W,x={x:g,y:p};else{var U=n(x.x,x.y,g,p);U>o?C=null:W-C>=a&&(e.renderer.scrollCursorIntoView(),C=null)}}function f(F,B){var W=Date.now(),H=e.renderer.layerConfig.lineHeight,z=e.renderer.layerConfig.characterWidth,U=e.renderer.scroller.getBoundingClientRect(),j={x:{left:g-U.left,right:U.right-g},y:{top:p-U.top,bottom:U.bottom-p}},P=Math.min(j.x.left,j.x.right),G=Math.min(j.y.top,j.y.bottom),V={row:F.row,column:F.column};P/z<=2&&(V.column+=j.x.left=s&&e.renderer.scrollCursorIntoView(V):_=W:_=null}function S(){var F=y;y=e.renderer.screenToTextCoordinates(g,p),m(y,F),f(y,F)}function L(){k=e.selection.toOrientedRange(),u=e.session.addMarker(k,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval(w),S(),w=setInterval(S,20),A=0,b.addListener(document,"mousemove",D)}function T(){clearInterval(w),e.session.removeMarker(u),u=null,e.selection.fromOrientedRange(k),e.isFocused()&&!E&&e.$resetCursorStyle(),k=null,y=null,A=0,_=null,C=null,b.removeListener(document,"mousemove",D)}var I=null;function D(){I==null&&(I=setTimeout(function(){I!=null&&u&&T()},20))}function O(F){var B=F.types;return!B||Array.prototype.some.call(B,function(W){return W=="text/plain"||W=="Text"})}function N(F){var B=["copy","copymove","all","uninitialized"],W=["move","copymove","linkmove","all","uninitialized"],H=h.isMac?F.altKey:F.ctrlKey,z="uninitialized";try{z=F.dataTransfer.effectAllowed.toLowerCase()}catch{}var U="none";return H&&B.indexOf(z)>=0?U="copy":W.indexOf(z)>=0?U="move":B.indexOf(z)>=0&&(U="copy"),U}}(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 r=h.isWin?"default":"move";t.renderer.setCursorStyle(r),this.setState("dragReady")},this.onMouseDrag=function(t){var e=this.editor.container;if(h.isIE&&this.state=="dragReady"){var r=n(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);r>3&&e.dragDrop()}if(this.state==="dragWait"){var r=n(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);r>0&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(t){if(this.$dragEnabled){this.mousedownEvent=t;var e=this.editor,r=t.inSelection(),l=t.getButton(),c=t.domEvent.detail||1;if(c===1&&l===0&&r){if(t.editor.inMultiSelectMode&&(t.getAccelKey()||t.getShiftKey()))return;this.mousedownEvent.time=Date.now();var u=t.domEvent.target||t.domEvent.srcElement;if("unselectable"in u&&(u.unselectable="on"),e.getDragDelay()){if(h.isWebKit){this.cancelDrag=!0;var g=e.container;g.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,r,l){return Math.sqrt(Math.pow(r-t,2)+Math.pow(l-e,2))}v.DragdropHandler=i});ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(d,v,R){"use strict";var $=d("./mouse_event").MouseEvent,b=d("../lib/event"),h=d("../lib/dom");v.addTouchListeners=function(s,a){var o="scroll",i,n,t,e,r,l,c=0,u,g=0,p=0,w=0,k,y;function A(){var m=window.navigator&&window.navigator.clipboard,f=!1,S=function(){var I=a.getCopyText(),D=a.session.getUndoManager().hasUndo();y.replaceChild(h.buildDom(f?["span",!I&&L("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],I&&L("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],I&&L("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],m&&L("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],D&&L("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],L("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],L("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),y.firstChild)},L=function(I){return a.commands.canExecute(I,a)},T=function(I){var D=I.target.getAttribute("action");if(D=="more"||!f)return f=!f,S();D=="paste"?m.readText().then(function(O){a.execCommand(D,O)}):D&&((D=="cut"||D=="copy")&&(m?m.writeText(a.getCopyText()):document.execCommand("copy")),a.execCommand(D)),y.firstChild.style.display="none",f=!1,D!="openCommandPalette"&&a.focus()};y=h.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(I){o="menu",I.stopPropagation(),I.preventDefault(),a.textInput.focus()},ontouchend:function(I){I.stopPropagation(),I.preventDefault(),T(I)},onclick:T},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],a.container)}function M(){if(!a.getOption("enableMobileMenu")){y&&E();return}y||A();var m=a.selection.cursor,f=a.renderer.textToScreenCoordinates(m.row,m.column),S=a.renderer.textToScreenCoordinates(0,0).pageX,L=a.renderer.scrollLeft,T=a.container.getBoundingClientRect();y.style.top=f.pageY-T.top-3+"px",f.pageX-T.left=2?a.selection.getLineRange(u.row):a.session.getBracketRange(u);m&&!m.isEmpty()?a.selection.setRange(m):a.selection.selectWord(),o="wait"}b.addListener(s,"contextmenu",function(m){if(k){var f=a.textInput.getElement();f.focus()}},a),b.addListener(s,"touchstart",function(m){var f=m.touches;if(r||f.length>1){clearTimeout(r),r=null,t=-1,o="zoom";return}k=a.$mouseHandler.isMousePressed=!0;var S=a.renderer.layerConfig.lineHeight,L=a.renderer.layerConfig.lineHeight,T=m.timeStamp;e=T;var I=f[0],D=I.clientX,O=I.clientY;Math.abs(i-D)+Math.abs(n-O)>S&&(t=-1),i=m.clientX=D,n=m.clientY=O,p=w=0;var N=new $(m,a);if(u=N.getDocumentPosition(),T-t<500&&f.length==1&&!c)g++,m.preventDefault(),m.button=0,C();else{g=0;var F=a.selection.cursor,B=a.selection.isEmpty()?F:a.selection.anchor,W=a.renderer.$cursorLayer.getPixelPosition(F,!0),H=a.renderer.$cursorLayer.getPixelPosition(B,!0),z=a.renderer.scroller.getBoundingClientRect(),U=a.renderer.layerConfig.offset,j=a.renderer.scrollLeft,P=function(Y,Q){return Y=Y/L,Q=Q/S-.75,Y*Y+Q*Q};if(m.clientXV?"cursor":"anchor"),V<3.5?o="anchor":G<3.5?o="cursor":o="scroll",r=setTimeout(_,450)}t=T},a),b.addListener(s,"touchend",function(m){k=a.$mouseHandler.isMousePressed=!1,l&&clearInterval(l),o=="zoom"?(o="",c=0):r?(a.selection.moveToPosition(u),c=0,M()):o=="scroll"?(x(),E()):M(),clearTimeout(r),r=null},a),b.addListener(s,"touchmove",function(m){r&&(clearTimeout(r),r=null);var f=m.touches;if(!(f.length>1||o=="zoom")){var S=f[0],L=i-S.clientX,T=n-S.clientY;if(o=="wait")if(L*L+T*T>4)o="cursor";else return m.preventDefault();i=S.clientX,n=S.clientY,m.clientX=S.clientX,m.clientY=S.clientY;var I=m.timeStamp,D=I-e;if(e=I,o=="scroll"){var O=new $(m,a);O.speed=1,O.wheelX=L,O.wheelY=T,10*Math.abs(L)0)if(ie==16){for(q=ne;q-1){for(q=ne;q=0&&V[ge]==_;ge--)P[ge]=h}}}function W(j,P,G){if(!(s=j){for(Q=Y+1;Q=j;)Q++;for(X=Y,K=Q-1;X=P.length||(Q=G[V-1])!=w&&Q!=k||(X=P[V+1])!=w&&X!=k?y:(a&&(X=k),X==Q?X:y);case x:return Q=V>0?G[V-1]:A,Q==w&&V+10&&G[V-1]==w)return w;if(a)return y;for(J=V+1,K=P.length;J=1425&&ie<=2303||ie==64286;if(Q=P[J],fe&&(Q==p||Q==E))return p}return V<1||(Q=P[V-1])==A?y:G[V-1];case A:return a=!1,i=!0,h;case M:return n=!0,y;case S:case L:case I:case D:case T:a=!1;case O:return y}}function z(j){var P=j.charCodeAt(0),G=P>>8;return G==0?P>191?g:N[P]:G==5?/[\u0591-\u05f4]/.test(j)?p:g:G==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(j)?f:/[\u0660-\u0669\u066b-\u066c]/.test(j)?k:P==1642?m:/[\u06f0-\u06f9]/.test(j)?w:E:G==32&&P<=8287?F[P&255]:G==254&&P>=65136?E:y}function U(j){return j>="\u064B"&&j<="\u0655"}v.L=g,v.R=p,v.EN=w,v.ON_R=3,v.AN=4,v.R_H=5,v.B=6,v.RLE=7,v.DOT="\xB7",v.doBidiReorder=function(j,P,G){if(j.length<2)return{};var V=j.split(""),Y=new Array(V.length),Q=new Array(V.length),X=[];h=G?u:c,B(V,X,V.length,P);for(var K=0;KE&&P[K]0&&V[K-1]==="\u0644"&&/\u0622|\u0623|\u0625|\u0627/.test(V[K])&&(X[K-1]=X[K]=v.R_H,K++);V[V.length-1]===v.DOT&&(X[V.length-1]=v.B),V[0]==="\u202B"&&(X[0]=v.RLE);for(var K=0;K=0&&(o=this.session.$docRowCache[n])}return o},a.prototype.getSplitIndex=function(){var o=0,i=this.session.$screenRowCache;if(i.length)for(var n,t=this.session.$getRowCacheIndex(i,this.currentRow);this.currentRow-o>0&&(n=this.session.$getRowCacheIndex(i,this.currentRow-o-1),n===t);)t=n,o++;else o=this.currentRow;return o},a.prototype.updateRowLine=function(o,i){o===void 0&&(o=this.getDocumentRow());var n=o===this.session.getLength()-1,t=n?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(o),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var e=this.session.$wrapData[o];e&&(i===void 0&&(i=this.getSplitIndex()),i>0&&e.length?(this.wrapIndent=e.indent,this.wrapOffset=this.wrapIndent*this.charWidths[$.L],this.line=ii?this.session.getOverwrite()?o:o-1:i,t=$.getVisualFromLogicalIdx(n,this.bidiMap),e=this.bidiMap.bidiLevels,r=0;!this.session.getOverwrite()&&o<=i&&e[t]%2!==0&&t++;for(var l=0;li&&e[t]%2===0&&(r+=this.charWidths[e[t]]),this.wrapIndent&&(r+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(r+=this.rtlLineOffset),r},a.prototype.getSelections=function(o,i){var n=this.bidiMap,t=n.bidiLevels,e,r=[],l=0,c=Math.min(o,i)-this.wrapIndent,u=Math.max(o,i)-this.wrapIndent,g=!1,p=!1,w=0;this.wrapIndent&&(l+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var k,y=0;y=c&&kt+l/2;){if(t+=l,e===r.length-1){l=0;break}l=this.charWidths[r[++e]]}return e>0&&r[e-1]%2!==0&&r[e]%2===0?(n0&&r[e-1]%2===0&&r[e]%2!==0?i=1+(n>t?this.bidiMap.logicalFromVisual[e]:this.bidiMap.logicalFromVisual[e-1]):this.isRtlDir&&e===r.length-1&&l===0&&r[e-1]%2===0||!this.isRtlDir&&e===0&&r[e]%2!==0?i=1+this.bidiMap.logicalFromVisual[e]:(e>0&&r[e-1]%2!==0&&l!==0&&e--,i=this.bidiMap.logicalFromVisual[e]),i===0&&this.isRtlDir&&i++,i+this.wrapIndent},a})();v.BidiHandler=s});ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(d,v,R){"use strict";var $=d("./lib/oop"),b=d("./lib/lang"),h=d("./lib/event_emitter").EventEmitter,s=d("./range").Range,a=(function(){function o(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 o.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},o.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},o.prototype.getCursor=function(){return this.lead.getPosition()},o.prototype.setAnchor=function(i,n){this.$isEmpty=!1,this.anchor.setPosition(i,n)},o.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},o.prototype.getSelectionLead=function(){return this.lead.getPosition()},o.prototype.isBackwards=function(){var i=this.anchor,n=this.lead;return i.row>n.row||i.row==n.row&&i.column>n.column},o.prototype.getRange=function(){var i=this.anchor,n=this.lead;return this.$isEmpty?s.fromPoints(n,n):this.isBackwards()?s.fromPoints(n,i):s.fromPoints(i,n)},o.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},o.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},o.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)},o.prototype.$setSelection=function(i,n,t,e){if(!this.$silent){var r=this.$isEmpty,l=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(i,n),this.cursor.setPosition(t,e),this.$isEmpty=!s.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||r!=this.$isEmpty||l)&&this._emit("changeSelection")}},o.prototype.$moveSelection=function(i){var n=this.lead;this.$isEmpty&&this.setSelectionAnchor(n.row,n.column),i.call(this)},o.prototype.selectTo=function(i,n){this.$moveSelection(function(){this.moveCursorTo(i,n)})},o.prototype.selectToPosition=function(i){this.$moveSelection(function(){this.moveCursorToPosition(i)})},o.prototype.moveTo=function(i,n){this.clearSelection(),this.moveCursorTo(i,n)},o.prototype.moveToPosition=function(i){this.clearSelection(),this.moveCursorToPosition(i)},o.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},o.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},o.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},o.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},o.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},o.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},o.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},o.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},o.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},o.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},o.prototype.getWordRange=function(i,n){if(typeof n>"u"){var t=i||this.lead;i=t.row,n=t.column}return this.session.getWordRange(i,n)},o.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},o.prototype.selectAWord=function(){var i=this.getCursor(),n=this.session.getAWordRange(i.row,i.column);this.setSelectionRange(n)},o.prototype.getLineRange=function(i,n){var t=typeof i=="number"?i:this.lead.row,e,r=this.session.getFoldLine(t);return r?(t=r.start.row,e=r.end.row):e=t,n===!0?new s(t,0,e,this.session.getLine(e).length):new s(t,0,e+1,0)},o.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},o.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},o.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},o.prototype.wouldMoveIntoSoftTab=function(i,n,t){var e=i.column,r=i.column+n;return t<0&&(e=i.column-n,r=i.column),this.session.isTabStop(i)&&this.doc.getLine(i.row).slice(e,r).split(" ").length-1==n},o.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)}},o.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.row0&&(n.column=e)}}this.moveCursorTo(n.row,n.column)},o.prototype.moveCursorFileEnd=function(){var i=this.doc.getLength()-1,n=this.doc.getLine(i).length;this.moveCursorTo(i,n)},o.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},o.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 r=this.session.getFoldAt(i,n,1);if(r){this.moveCursorTo(r.end.row,r.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(),i0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(r)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(i,n)},o.prototype.$shortWordEndIndex=function(i){var n=0,t,e=/\s/,r=this.session.tokenRe;if(r.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(r.lastIndex=0;(t=i[n])&&!r.test(t);)if(r.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 r.lastIndex=0,n},o.prototype.moveCursorShortWordRight=function(){var i=this.lead.row,n=this.lead.column,t=this.doc.getLine(i),e=t.substring(n),r=this.session.getFoldAt(i,n,1);if(r)return this.moveCursorTo(r.end.row,r.end.column);if(n==t.length){var l=this.doc.getLength();do i++,e=this.doc.getLine(i);while(i0&&/^\s*$/.test(e));n=e.length,/\s+$/.test(e)||(e="")}var r=b.stringReverse(e),l=this.$shortWordEndIndex(r);return this.moveCursorTo(i,n-l)},o.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},o.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},o.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 r=this.session.lineWidgets[this.lead.row];i<0?i-=r.rowsAbove||0:i>0&&(i+=r.rowCount-(r.rowsAbove||0))}var l=this.session.screenToDocumentPosition(t.row+i,t.column,e);i!==0&&n===0&&l.row===this.lead.row&&(l.column,this.lead.column),this.moveCursorTo(l.row,l.column+n,n===0)},o.prototype.moveCursorToPosition=function(i){this.moveCursorTo(i.row,i.column)},o.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 r=this.session.getLine(i);/[\uDC00-\uDFFF]/.test(r.charAt(n))&&r.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)},o.prototype.moveCursorToScreen=function(i,n,t){var e=this.session.screenToDocumentPosition(i,n);this.moveCursorTo(e.row,e.column,t)},o.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},o.prototype.fromOrientedRange=function(i){this.setSelectionRange(i,i.cursor==i.start),this.$desiredColumn=i.desiredColumn||this.$desiredColumn},o.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},o.prototype.getRangeOfMovements=function(i){var n=this.getCursor();try{i(this);var t=this.getCursor();return s.fromPoints(n,t)}catch{return s.fromPoints(n,n)}finally{this.moveCursorToPosition(n)}},o.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},o.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=s.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)},o.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},o})();a.prototype.setSelectionAnchor=a.prototype.setAnchor,a.prototype.getSelectionAnchor=a.prototype.getAnchor,a.prototype.setSelectionRange=a.prototype.setRange,$.implement(a.prototype,h),v.Selection=a});ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(d,v,R){"use strict";var $=d("./lib/report_error").reportError,b=2e3,h=(function(){function s(a){this.splitRegex,this.states=a,this.regExps={},this.matchMappings={};for(var o in this.states){for(var i=this.states[o],n=[],t=0,e=this.matchMappings[o]={defaultToken:"text"},r="g",l=[],c=0;c1?u.onMatch=this.$applyToken:u.onMatch=u.token),p>1&&(/\\\d/.test(u.regex)?g=u.regex.replace(/\\([0-9]+)/g,function(w,k){return"\\"+(parseInt(k,10)+t+1)}):(p=1,g=this.removeCapturingGroups(u.regex)),!u.splitRegex&&typeof u.token!="string"&&l.push(u)),e[t]=c,t+=p,n.push(g),u.onMatch||(u.onMatch=null)}}n.length||(e[0]=0,n.push("$")),l.forEach(function(w){w.splitRegex=this.createSplitterRegexp(w.regex,r)},this),this.regExps[o]=new RegExp("("+n.join(")|(")+")|($)",r)}}return s.prototype.$setMaxTokenCount=function(a){b=a|0},s.prototype.$applyToken=function(a){var o=this.splitRegex.exec(a).slice(1),i=this.token.apply(this,o);if(typeof i=="string")return[{type:i,value:a}];for(var n=[],t=0,e=i.length;tu){var M=a.substring(u,A-y.length);p.type==w?p.value+=M:(p.type&&c.push(p),p={type:w,value:M})}for(var E=0;Eb){for(g>2*a.length&&this.reportError("infinite loop with in ace tokenizer",{startState:o,line:a});u1&&i[0]!==n&&i.unshift("#tmp",n),{tokens:c,state:i.length?i:n}},s})();h.prototype.reportError=$,v.Tokenizer=h});ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(d,v,R){"use strict";var $=d("../lib/deep_copy").deepCopy,b;b=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(a,o){if(!o){for(var i in a)this.$rules[i]=a[i];return}for(var i in a){for(var n=a[i],t=0;t=this.$rowTokens.length;){if(this.$row+=1,s||(s=this.$session.getLength()),this.$row>=s)return this.$row=s-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},h.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},h.prototype.getCurrentTokenRow=function(){return this.$row},h.prototype.getCurrentTokenColumn=function(){var s=this.$rowTokens,a=this.$tokenIndex,o=s[a].start;if(o!==void 0)return o;for(o=0;a>0;)a-=1,o+=s[a].value.length;return o},h.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},h.prototype.getCurrentTokenRange=function(){var s=this.$rowTokens[this.$tokenIndex],a=this.getCurrentTokenColumn();return new $(this.$row,a,this.$row,a+s.value.length)},h})();v.TokenIterator=b});ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(d,v,R){"use strict";var $=d("../../lib/oop"),b=d("../behaviour").Behaviour,h=d("../../token_iterator").TokenIterator,s=d("../../lib/lang"),a=["text","paren.rparen","rparen","paren","punctuation.operator"],o=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],i,n={},t={'"':'"',"'":"'"},e=function(c){var u=-1;if(c.multiSelect&&(u=c.selection.index,n.rangeCount!=c.multiSelect.rangeCount&&(n={rangeCount:c.multiSelect.rangeCount})),n[u])return i=n[u];i=n[u]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},r=function(c,u,g,p){var w=c.end.row-c.start.row;return{text:g+u+p,selection:[0,c.start.column+1,w,c.end.column+(w?0:1)]}},l;l=function(c){c=c||{},this.add("braces","insertion",function(u,g,p,w,k){var y=p.getCursorPosition(),A=w.doc.getLine(y.row);if(k=="{"){e(p);var M=p.getSelectionRange(),E=w.doc.getTextRange(M),_=w.getTokenAt(y.row,y.column);if(E!==""&&E!=="{"&&p.getWrapBehavioursEnabled())return r(M,E,"{","}");if(_&&/(?:string)\.quasi|\.xml/.test(_.type)){var C=[/tag\-(?:open|name)/,/attribute\-name/];return C.some(function(I){return I.test(_.type)})||/(string)\.quasi/.test(_.type)&&_.value[y.column-_.start-1]!=="$"?void 0:(l.recordAutoInsert(p,w,"}"),{text:"{}",selection:[1,1]})}else if(l.isSaneInsertion(p,w))return/[\]\}\)]/.test(A[y.column])||p.inMultiSelectMode||c.braces?(l.recordAutoInsert(p,w,"}"),{text:"{}",selection:[1,1]}):(l.recordMaybeInsert(p,w,"{"),{text:"{",selection:[1,1]})}else if(k=="}"){e(p);var x=A.substring(y.column,y.column+1);if(x=="}"){var m=w.$findOpeningBracket("}",{column:y.column+1,row:y.row});if(m!==null&&l.isAutoInsertedClosing(y,A,k))return l.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(k==` `||k==`\r `){e(p);var f="";l.isMaybeInsertedClosing(y,A)&&(f=s.stringRepeat("}",i.maybeInsertedBrackets),l.clearMaybeInsertedClosing());var x=A.substring(y.column,y.column+1);if(x==="}"){var S=w.findMatchingBracket({row:y.row,column:y.column+1},"}");if(!S)return null;var L=this.$getIndent(w.getLine(S.row))}else if(f)var L=this.$getIndent(A);else{l.clearMaybeInsertedClosing();return}var T=L+w.getTabString();return{text:` `+T+` `+L+f,selection:[1,T.length,1,T.length]}}else l.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(u,g,p,w,k){var y=w.doc.getTextRange(k);if(!k.isMultiLine()&&y=="{"){e(p);var A=w.doc.getLine(k.start.row),M=A.substring(k.end.column,k.end.column+1);if(M=="}")return k.end.column++,k;i.maybeInsertedBrackets--}}),this.add("parens","insertion",function(u,g,p,w,k){if(k=="("){e(p);var y=p.getSelectionRange(),A=w.doc.getTextRange(y);if(A!==""&&p.getWrapBehavioursEnabled())return r(y,A,"(",")");if(l.isSaneInsertion(p,w))return l.recordAutoInsert(p,w,")"),{text:"()",selection:[1,1]}}else if(k==")"){e(p);var M=p.getCursorPosition(),E=w.doc.getLine(M.row),_=E.substring(M.column,M.column+1);if(_==")"){var C=w.$findOpeningBracket(")",{column:M.column+1,row:M.row});if(C!==null&&l.isAutoInsertedClosing(M,E,k))return l.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(u,g,p,w,k){var y=w.doc.getTextRange(k);if(!k.isMultiLine()&&y=="("){e(p);var A=w.doc.getLine(k.start.row),M=A.substring(k.start.column+1,k.start.column+2);if(M==")")return k.end.column++,k}}),this.add("brackets","insertion",function(u,g,p,w,k){if(k=="["){e(p);var y=p.getSelectionRange(),A=w.doc.getTextRange(y);if(A!==""&&p.getWrapBehavioursEnabled())return r(y,A,"[","]");if(l.isSaneInsertion(p,w))return l.recordAutoInsert(p,w,"]"),{text:"[]",selection:[1,1]}}else if(k=="]"){e(p);var M=p.getCursorPosition(),E=w.doc.getLine(M.row),_=E.substring(M.column,M.column+1);if(_=="]"){var C=w.$findOpeningBracket("]",{column:M.column+1,row:M.row});if(C!==null&&l.isAutoInsertedClosing(M,E,k))return l.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(u,g,p,w,k){var y=w.doc.getTextRange(k);if(!k.isMultiLine()&&y=="["){e(p);var A=w.doc.getLine(k.start.row),M=A.substring(k.start.column+1,k.start.column+2);if(M=="]")return k.end.column++,k}}),this.add("string_dquotes","insertion",function(u,g,p,w,k){var y=w.$mode.$quotes||t;if(k.length==1&&y[k]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(k)!=-1)return;e(p);var A=k,M=p.getSelectionRange(),E=w.doc.getTextRange(M);if(E!==""&&(E.length!=1||!y[E])&&p.getWrapBehavioursEnabled())return r(M,E,A,A);if(!E){var _=p.getCursorPosition(),C=w.doc.getLine(_.row),x=C.substring(_.column-1,_.column),m=C.substring(_.column,_.column+1),f=w.getTokenAt(_.row,_.column),S=w.getTokenAt(_.row,_.column+1);if(x=="\\"&&f&&/escape/.test(f.type))return null;var L=f&&/string|escape/.test(f.type),T=!S||/string|escape/.test(S.type),I;if(m==A)I=L!==T,I&&/string\.end/.test(S.type)&&(I=!1);else{if(L&&!T||L&&T)return null;var D=w.$mode.tokenRe;D.lastIndex=0;var O=D.test(x);D.lastIndex=0;var N=D.test(m),F=w.$mode.$pairQuotesAfter,B=F&&F[A]&&F[A].test(x);if(!B&&O||N||m&&!/[\s;,.})\]\\]/.test(m))return null;var W=C[_.column-2];if(x==A&&(W==A||D.test(W)))return null;I=!0}return{text:I?A+A:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(u,g,p,w,k){var y=w.$mode.$quotes||t,A=w.doc.getTextRange(k);if(!k.isMultiLine()&&y.hasOwnProperty(A)){e(p);var M=w.doc.getLine(k.start.row),E=M.substring(k.start.column+1,k.start.column+2);if(E==A)return k.end.column++,k}}),c.closeDocComment!==!1&&this.add("doc comment end","insertion",function(u,g,p,w,k){if(u==="doc-start"&&(k===` `||k===`\r `)&&p.selection.isEmpty()){var y=p.getCursorPosition();if(y.column===0)return;for(var A=w.doc.getLine(y.row),M=w.doc.getLine(y.row+1),E=w.getTokens(y.row),_=0,C=0;C=y.column){if(_===y.column){if(!/\.doc/.test(x.type))return;if(/\*\//.test(x.value)){var m=E[C+1];if(!m||!/\.doc/.test(m.type))return}}var f=y.column-(_-x.value.length),S=x.value.indexOf("*/"),L=x.value.indexOf("/**",S>-1?S+2:0);if(L!==-1&&f>L&&f=S&&f<=L||!/\.doc/.test(x.type))return;break}}var T=this.$getIndent(A);if(/\s*\*/.test(M))return/^\s*\*/.test(A)?{text:k+T+"* ",selection:[1,2+T.length,1,2+T.length]}:{text:k+T+" * ",selection:[1,3+T.length,1,3+T.length]};if(/\/\*\*/.test(A.substring(0,y.column)))return{text:k+T+" * "+k+" "+T+"*/",selection:[1,4+T.length,1,4+T.length]}}})},l.isSaneInsertion=function(c,u){var g=c.getCursorPosition(),p=new h(u,g.row,g.column);if(!this.$matchTokenType(p.getCurrentToken()||"text",a)){if(/[)}\]]/.test(c.session.getLine(g.row)[g.column]))return!0;var w=new h(u,g.row,g.column+1);if(!this.$matchTokenType(w.getCurrentToken()||"text",a))return!1}return p.stepForward(),p.getCurrentTokenRow()!==g.row||this.$matchTokenType(p.getCurrentToken()||"text",o)},l.$matchTokenType=function(c,u){return u.indexOf(c.type||c)>-1},l.recordAutoInsert=function(c,u,g){var p=c.getCursorPosition(),w=u.doc.getLine(p.row);this.isAutoInsertedClosing(p,w,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=p.row,i.autoInsertedLineEnd=g+w.substr(p.column),i.autoInsertedBrackets++},l.recordMaybeInsert=function(c,u,g){var p=c.getCursorPosition(),w=u.doc.getLine(p.row);this.isMaybeInsertedClosing(p,w)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=p.row,i.maybeInsertedLineStart=w.substr(0,p.column)+g,i.maybeInsertedLineEnd=w.substr(p.column),i.maybeInsertedBrackets++},l.isAutoInsertedClosing=function(c,u,g){return i.autoInsertedBrackets>0&&c.row===i.autoInsertedRow&&g===i.autoInsertedLineEnd[0]&&u.substr(c.column)===i.autoInsertedLineEnd},l.isMaybeInsertedClosing=function(c,u){return i.maybeInsertedBrackets>0&&c.row===i.maybeInsertedRow&&u.substr(c.column)===i.maybeInsertedLineEnd&&u.substr(0,c.column)==i.maybeInsertedLineStart},l.popAutoInsertedClosing=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},l.clearMaybeInsertedClosing=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},$.inherits(l,b),v.CstyleBehaviour=l});ace.define("ace/unicode",["require","exports","module"],function(d,v,R){"use strict";for(var $=[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],b=0,h=[],s=0;s<$.length;s+=2)h.push(b+=$[s]),$[s+1]&&h.push(45,b+=$[s+1]);v.wordChars=String.fromCharCode.apply(null,h)});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(d,v,R){"use strict";var $=d("../config"),b=d("../tokenizer").Tokenizer,h=d("./text_highlight_rules").TextHighlightRules,s=d("./behaviour/cstyle").CstyleBehaviour,a=d("../unicode"),o=d("../lib/lang"),i=d("../token_iterator").TokenIterator,n=d("../range").Range,t;t=function(){this.HighlightRules=h},(function(){this.$defaultBehaviour=new s,this.tokenRe=new RegExp("^["+a.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+a.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new b(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,r,l,c){var u=r.doc,g=!0,p=!0,w=1/0,k=r.getTabSize(),y=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var E=this.lineCommentStart.map(o.escapeRegExp).join("|"),A=this.lineCommentStart[0];else var E=o.escapeRegExp(this.lineCommentStart),A=this.lineCommentStart;E=new RegExp("^(\\s*)(?:"+E+") ?"),y=r.getUseSoftTabs();var x=function(N,F){var B=N.match(E);if(B){var W=B[1].length,H=B[0].length;!S(N,W,H)&&B[0][H-1]==" "&&H--,u.removeInLine(F,W,H)}},f=A+" ",C=function(N,F){(!g||/\S/.test(N))&&(S(N,w,w)?u.insertInLine({row:F,column:w},f):u.insertInLine({row:F,column:w},A))},m=function(N,F){return E.test(N)},S=function(N,F,B){for(var W=0;F--&&N.charAt(F)==" ";)W++;if(W%k!=0)return!1;for(var W=0;N.charAt(B++)==" ";)W++;return k>2?W%k!=k-1:W%k==0}}else{if(!this.blockComment)return!1;var A=this.blockComment.start,M=this.blockComment.end,E=new RegExp("^(\\s*)(?:"+o.escapeRegExp(A)+")"),_=new RegExp("(?:"+o.escapeRegExp(M)+")\\s*$"),C=function(I,D){m(I,D)||(!g||/\S/.test(I))&&(u.insertInLine({row:D,column:I.length},M),u.insertInLine({row:D,column:w},A))},x=function(I,D){var O;(O=I.match(_))&&u.removeInLine(D,I.length-O[0].length,I.length),(O=I.match(E))&&u.removeInLine(D,O[1].length,O[0].length)},m=function(I,D){if(E.test(I))return!0;for(var O=r.getTokens(D),N=0;NI.length&&(T=I.length)}),w==1/0&&(w=T,g=!1,p=!1),y&&w%k!=0&&(w=Math.floor(w/k)*k),L(p?x:C)},this.toggleBlockComment=function(e,r,l,c){var u=this.blockComment;if(u){!u.start&&u[0]&&(u=u[0]);var g=new i(r,c.row,c.column),p=g.getCurrentToken(),w=r.selection,k=r.selection.toOrientedRange(),y,A;if(p&&/comment/.test(p.type)){for(var M,E;p&&/comment/.test(p.type);){var _=p.value.indexOf(u.start);if(_!=-1){var C=g.getCurrentTokenRow(),x=g.getCurrentTokenColumn()+_;M=new n(C,x,C,x+u.start.length);break}p=g.stepBackward()}for(var g=new i(r,c.row,c.column),p=g.getCurrentToken();p&&/comment/.test(p.type);){var _=p.value.indexOf(u.end);if(_!=-1){var C=g.getCurrentTokenRow(),x=g.getCurrentTokenColumn()+_;E=new n(C,x,C,x+u.end.length);break}p=g.stepForward()}E&&r.remove(E),M&&(r.remove(M),y=M.start.row,A=-u.start.length)}else A=u.start.length,y=l.start.row,r.insert(l.end,u.end),r.insert(l.start,u.start);k.start.row==y&&(k.start.column+=A),k.end.row==y&&(k.end.column+=A),r.selection.fromOrientedRange(k)}},this.getNextLineIndent=function(e,r,l){return this.$getIndent(r)},this.checkOutdent=function(e,r,l){return!1},this.autoOutdent=function(e,r,l){},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 r in e)if(e[r]){var l=e[r],c=l.prototype.$id,u=$.$modes[c];u||($.$modes[c]=u=new l),$.$modes[r]||($.$modes[r]=u),this.$embeds.push(r),this.$modes[r]=u}for(var g=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],p=function(k){(function(y){var A=g[k],M=y[A];y[g[k]]=function(){return this.$delegator(A,arguments,M)}})(w)},w=this,r=0;ra[o].column&&o++,t.unshift(o,0),a.splice.apply(a,t),this.$updateRows()}}},h.prototype.$updateRows=function(){var s=this.session.lineWidgets;if(s){var a=!0;s.forEach(function(o,i){if(o)for(a=!1,o.row=i;o.$oldWidget;)o.$oldWidget.row=i,o=o.$oldWidget}),a&&(this.session.lineWidgets=null)}},h.prototype.$registerLineWidget=function(s){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var a=this.session.lineWidgets[s.row];return a&&(s.$oldWidget=a,a.el&&a.el.parentNode&&(a.el.parentNode.removeChild(a.el),a._inDocument=!1)),this.session.lineWidgets[s.row]=s,s},h.prototype.addLineWidget=function(s){if(this.$registerLineWidget(s),s.session=this.session,!this.editor)return s;var a=this.editor.renderer;s.html&&!s.el&&(s.el=$.createElement("div"),s.el.innerHTML=s.html),s.text&&!s.el&&(s.el=$.createElement("div"),s.el.textContent=s.text),s.el&&($.addCssClass(s.el,"ace_lineWidgetContainer"),s.className&&$.addCssClass(s.el,s.className),s.el.style.position="absolute",s.el.style.zIndex="5",a.container.appendChild(s.el),s._inDocument=!0,s.coverGutter||(s.el.style.zIndex="3"),s.pixelHeight==null&&(s.pixelHeight=s.el.offsetHeight)),s.rowCount==null&&(s.rowCount=s.pixelHeight/a.layerConfig.lineHeight);var o=this.session.getFoldAt(s.row,0);if(s.$fold=o,o){var i=this.session.lineWidgets;s.row==o.end.row&&!i[o.start.row]?i[o.start.row]=s:s.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:s.row}}}),this.$updateRows(),this.renderWidgets(null,a),this.onWidgetChanged(s),s},h.prototype.removeLineWidget=function(s){if(s._inDocument=!1,s.session=null,s.el&&s.el.parentNode&&s.el.parentNode.removeChild(s.el),s.editor&&s.editor.destroy)try{s.editor.destroy()}catch{}if(this.session.lineWidgets){var a=this.session.lineWidgets[s.row];if(a==s)this.session.lineWidgets[s.row]=s.$oldWidget,s.$oldWidget&&this.onWidgetChanged(s.$oldWidget);else for(;a;){if(a.$oldWidget==s){a.$oldWidget=s.$oldWidget;break}a=a.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:s.row}}}),this.$updateRows()},h.prototype.getWidgetsAtRow=function(s){for(var a=this.session.lineWidgets,o=a&&a[s],i=[];o;)i.push(o),o=o.$oldWidget;return i},h.prototype.onWidgetChanged=function(s){this.session._changedWidgets.push(s),this.editor&&this.editor.renderer.updateFull()},h.prototype.measureWidgets=function(s,a){var o=this.session._changedWidgets,i=a.layerConfig;if(!(!o||!o.length)){for(var n=1/0,t=0;t0&&!i[n];)n--;this.firstRow=o.firstRow,this.lastRow=o.lastRow,a.$cursorLayer.config=o;for(var e=n;e<=t;e++){var r=i[e];if(!(!r||!r.el)){if(r.hidden){r.el.style.top=-100-(r.pixelHeight||0)+"px";continue}r._inDocument||(r._inDocument=!0,a.container.appendChild(r.el));var l=a.$cursorLayer.getPixelPosition({row:e,column:0},!0).top;r.coverLine||(l+=o.lineHeight*this.session.getRowLineCount(r.row)),r.el.style.top=l-o.offset+"px";var c=r.coverGutter?0:a.gutterWidth;r.fixedWidth||(c-=a.scrollLeft),r.el.style.left=c+"px",r.fullWidth&&r.screenWidth&&(r.el.style.minWidth=o.width+2*o.padding+"px"),r.fixedWidth?r.el.style.right=a.scrollBar.getWidth()+"px":r.el.style.right=""}}}},h})();v.LineWidgets=b});ace.define("ace/apply_delta",["require","exports","module"],function(d,v,R){"use strict";function $(s,a){throw console.log("Invalid Delta:",s),"Invalid Delta: "+a}function b(s,a){return a.row>=0&&a.row=0&&a.column<=s[a.row].length}function h(s,a){a.action!="insert"&&a.action!="remove"&&$(a,"delta.action must be 'insert' or 'remove'"),a.lines instanceof Array||$(a,"delta.lines must be an Array"),(!a.start||!a.end)&&$(a,"delta.start/end must be an present");var o=a.start;b(s,a.start)||$(a,"delta.start must be contained in document");var i=a.end;a.action=="remove"&&!b(s,i)&&$(a,"delta.end must contained in document for 'remove' actions");var n=i.row-o.row,t=i.column-(n==0?o.column:0);(n!=a.lines.length-1||a.lines[n].length!=t)&&$(a,"delta.range must match delta lines")}v.applyDelta=function(s,a,o){var i=a.start.row,n=a.start.column,t=s[i]||"";switch(a.action){case"insert":var e=a.lines;if(e.length===1)s[i]=t.substring(0,n)+a.lines[0]+t.substring(n);else{var r=[i,1].concat(a.lines);s.splice.apply(s,r),s[i]=t.substring(0,n)+s[i],s[i+a.lines.length-1]+=t.substring(n)}break;case"remove":var l=a.end.column,c=a.end.row;i===c?s[i]=t.substring(0,n)+t.substring(l):s.splice(i,c-i+1,t.substring(0,n)+s[c].substring(l));break}}});ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(d,v,R){"use strict";var $=d("./lib/oop"),b=d("./lib/event_emitter").EventEmitter,h=(function(){function o(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 o.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},o.prototype.getDocument=function(){return this.document},o.prototype.onChange=function(i){if(!(i.start.row==i.end.row&&i.start.row!=this.row)&&!(i.start.row>this.row)){var n=a(i,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},o.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 r={row:this.row,column:this.column};this.row=e.row,this.column=e.column,this._signal("change",{old:r,value:e})}},o.prototype.detach=function(){this.document.off("change",this.$onChange)},o.prototype.attach=function(i){this.document=i||this.document,this.document.on("change",this.$onChange)},o.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},o})();h.prototype.$insertRight=!1,$.implement(h.prototype,b);function s(o,i,n){var t=n?o.column<=i.column:o.column=e&&(n=e-1,t=void 0);var r=this.getLine(n);return t==null&&(t=r.length),t=Math.min(Math.max(t,0),r.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;n0,r=t=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 s||(n=s.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=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]:!s.comparePoints(n.start,n.end))||(e&&n.lines.length>2e4?this.$splitAndapplyLargeDelta(n,2e4):(b(this.$lines,n,t),this._signal("change",n)))},i.prototype.$safeApplyDelta=function(n){var t=this.$lines.length;(n.action=="remove"&&n.start.row20){i.running=setTimeout(i.$worker,20);break}}i.currentLine=t,e==-1&&(e=t),l<=e&&i.fireUpdateEvent(l,e)}}}return s.prototype.setTokenizer=function(a){this.tokenizer=a,this.lines=[],this.states=[],this.start(0)},s.prototype.setDocument=function(a){this.doc=a,this.lines=[],this.states=[],this.stop()},s.prototype.fireUpdateEvent=function(a,o){var i={first:a,last:o};this._signal("update",{data:i})},s.prototype.start=function(a){this.currentLine=Math.min(a||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},s.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},s.prototype.$updateOnChange=function(a){var o=a.start.row,i=a.end.row-o;if(i===0)this.lines[o]=null;else if(a.action=="remove")this.lines.splice(o,i+1,null),this.states.splice(o,i+1,null);else{var n=Array(i+1);n.unshift(o,1),this.lines.splice.apply(this.lines,n),this.states.splice.apply(this.states,n)}this.currentLine=Math.min(o,this.currentLine,this.doc.getLength()),this.stop()},s.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},s.prototype.getTokens=function(a){return this.lines[a]||this.$tokenizeRow(a)},s.prototype.getState=function(a){return this.currentLine==a&&this.$tokenizeRow(a),this.states[a]||"start"},s.prototype.$tokenizeRow=function(a){var o=this.doc.getLine(a),i=this.states[a-1],n=this.tokenizer.getLineTokens(o,i,a);return this.states[a]+""!=n.state+""?(this.states[a]=n.state,this.lines[a+1]=null,this.currentLine>a+1&&(this.currentLine=a+1)):this.currentLine==a&&(this.currentLine=a+1),this.lines[a]=n.tokens},s.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},s})();$.implement(h.prototype,b),v.BackgroundTokenizer=h});ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(d,v,R){"use strict";var $=d("./lib/lang"),b=d("./range").Range,h=(function(){function s(a,o,i){i===void 0&&(i="text"),this.setRegexp(a),this.clazz=o,this.type=i,this.docLen=0}return s.prototype.setRegexp=function(a){this.regExp+""!=a+""&&(this.regExp=a,this.cache=[])},s.prototype.update=function(a,o,i,n){if(this.regExp){for(var t=n.firstRow,e=n.lastRow,r={},l=i.$editor&&i.$editor.$search,c=l&&l.$isMultilineSearch(i.$editor.getLastSearchOptions()),u=t;u<=e;u++){var g=this.cache[u];if(g==null||i.getValue().length!=this.docLen){if(c){g=[];var p=l.$multiLineForward(i,this.regExp,u,e);if(p){var w=p.endRow<=e?p.endRow-1:e;w>u&&(u=w),g.push(new b(p.startRow,p.startCol,p.endRow,p.endCol))}g.length>this.MAX_RANGES&&(g=g.slice(0,this.MAX_RANGES))}else g=$.getMatchOffsets(i.getLine(u),this.regExp),g.length>this.MAX_RANGES&&(g=g.slice(0,this.MAX_RANGES)),g=g.map(function(M){return new b(u,M.offset,u,M.offset+M.length)});this.cache[u]=g.length?g:""}if(g.length!==0)for(var k=g.length;k--;){var y=g[k].toScreenRange(i),A=y.toString();r[A]||(r[A]=!0,o.drawSingleLineMarker(a,y,this.clazz,n))}}this.docLen=i.getValue().length}},s})();h.prototype.MAX_RANGES=500,v.SearchHighlight=h});ace.define("ace/undomanager",["require","exports","module","ace/range"],function(d,v,R){"use strict";var $=(function(){function y(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return y.prototype.addSession=function(A){this.$session=A},y.prototype.add=function(A,M,E){if(!this.$fromUndo&&A!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),M===!1||!this.lastDeltas){this.lastDeltas=[];var _=this.$undoStack.length;_>this.$undoDepth-1&&this.$undoStack.splice(0,_-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)}},y.prototype.addSelection=function(A,M){this.selections.push({value:A,rev:M||this.$rev})},y.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},y.prototype.markIgnored=function(A,M){M==null&&(M=this.$rev+1);for(var E=this.$undoStack,_=E.length;_--;){var C=E[_][0];if(C.id<=A)break;C.id0},y.prototype.canRedo=function(){return this.$redoStack.length>0},y.prototype.bookmark=function(A){A==null&&(A=this.$rev),this.mark=A},y.prototype.isAtBookmark=function(){return this.$rev===this.mark},y.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},y.prototype.fromJSON=function(A){this.reset(),this.$undoStack=A.$undoStack,this.$redoStack=A.$redoStack},y.prototype.$prettyPrint=function(A){return A?t(A):t(this.$undoStack)+` --- `+t(this.$redoStack)},y})();$.prototype.hasUndo=$.prototype.canUndo,$.prototype.hasRedo=$.prototype.canRedo,$.prototype.isClean=$.prototype.isAtBookmark,$.prototype.markClean=$.prototype.bookmark;function b(y,A){for(var M=A;M--;){var E=y[M];if(E&&!E[0].ignore){for(;M0){m.row+=_,m.column+=m.row==E.row?C:0;continue}!A&&S<=0&&(m.row=M.row,m.column=M.column,S===0&&(m.bias=1))}}}function i(y){return{row:y.row,column:y.column}}function n(y){return{start:i(y.start),end:i(y.end),action:y.action,lines:y.lines.slice()}}function t(y){if(y=y||this,Array.isArray(y))return y.map(t).join(` `);var A="";return y.action?(A=y.action=="insert"?"+":"-",A+="["+y.lines+"]"):y.value&&(Array.isArray(y.value)?A=y.value.map(e).join(` `):A=e(y.value)),y.start&&(A+=e(y)),(y.id||y.rev)&&(A+=" ("+(y.id||y.rev)+")"),A}function e(y){return y.start.row+":"+y.start.column+"=>"+y.end.row+":"+y.end.column}function r(y,A){var M=y.action=="insert",E=A.action=="insert";if(M&&E)if(s(A.start,y.end)>=0)u(A,y,-1);else if(s(A.start,y.start)<=0)u(y,A,1);else return null;else if(M&&!E)if(s(A.start,y.end)>=0)u(A,y,-1);else if(s(A.end,y.start)<=0)u(y,A,-1);else return null;else if(!M&&E)if(s(A.start,y.start)>=0)u(A,y,1);else if(s(A.start,y.start)<=0)u(y,A,1);else return null;else if(!M&&!E)if(s(A.start,y.start)>=0)u(A,y,1);else if(s(A.end,y.start)<=0)u(y,A,-1);else return null;return[A,y]}function l(y,A){for(var M=y.length;M--;)for(var E=0;E=0?u(y,A,-1):(s(y.start,A.start)<=0||u(y,h.fromPoints(A.start,y.start),-1),u(A,y,1));else if(!M&&E)s(A.start,y.end)>=0?u(A,y,-1):(s(A.start,y.start)<=0||u(A,h.fromPoints(y.start,A.start),-1),u(y,A,1));else if(!M&&!E)if(s(A.start,y.end)>=0)u(A,y,-1);else if(s(A.end,y.start)<=0)u(y,A,-1);else{var _,C;return s(y.start,A.start)<0&&(_=y,y=p(y,A.start)),s(y.end,A.end)>0&&(C=p(y,A.end)),g(A.end,y.start,y.end,-1),C&&!_&&(y.lines=C.lines,y.start=C.start,y.end=C.end,C=y),[A,_,C].filter(Boolean)}return[A,y]}function u(y,A,M){g(y.start,A.start,A.end,M),g(y.end,A.start,A.end,M)}function g(y,A,M,E){y.row==(E==1?A:M).row&&(y.column+=E*(M.column-A.column)),y.row+=E*(M.row-A.row)}function p(y,A){var M=y.lines,E=y.end;y.end=i(A);var _=y.end.row-y.start.row,C=M.splice(_,M.length),x=_?A.column:A.column-y.start.column;M.push(C[0].substring(0,x)),C[0]=C[0].substr(x);var m={start:i(A),end:E,lines:C,action:y.action};return m}function w(y,A){A=n(A);for(var M=y.length;M--;){for(var E=y[M],_=0;_this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(s),this.folds.sort(function(a,o){return-a.range.compareEnd(o.start.row,o.start.column)}),this.range.compareEnd(s.start.row,s.start.column)>0?(this.end.row=s.end.row,this.end.column=s.end.column):this.range.compareStart(s.end.row,s.end.column)<0&&(this.start.row=s.start.row,this.start.column=s.start.column)}else if(s.start.row==this.end.row)this.folds.push(s),this.end.row=s.end.row,this.end.column=s.end.column;else if(s.end.row==this.start.row)this.folds.unshift(s),this.start.row=s.start.row,this.start.column=s.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");s.foldLine=this},h.prototype.containsRow=function(s){return s>=this.start.row&&s<=this.end.row},h.prototype.walk=function(s,a,o){var i=0,n=this.folds,t,e,r,l=!0;a==null&&(a=this.end.row,o=this.end.column);for(var c=0;c0)){var l=b(a,e.start);return r===0?o&&l!==0?-t-2:t:l>0||l===0&&!o?t:-t-1}}return-t-1},s.prototype.add=function(a){var o=!a.isEmpty(),i=this.pointIndex(a.start,o);i<0&&(i=-i-1);var n=this.pointIndex(a.end,o,i);return n<0?n=-n-1:n++,this.ranges.splice(i,n-i,a)},s.prototype.addList=function(a){for(var o=[],i=a.length;i--;)o.push.apply(o,this.add(a[i]));return o},s.prototype.substractPoint=function(a){var o=this.pointIndex(a);if(o>=0)return this.ranges.splice(o,1)},s.prototype.merge=function(){var a=[],o=this.ranges;o=o.sort(function(r,l){return b(r.start,l.start)});for(var i=o[0],n,t=1;t=0},s.prototype.containsPoint=function(a){return this.pointIndex(a)>=0},s.prototype.rangeAtPoint=function(a){var o=this.pointIndex(a);if(o>=0)return this.ranges[o]},s.prototype.clipRows=function(a,o){var i=this.ranges;if(i[0].start.row>o||i[i.length-1].start.row=n)break}if(a.action=="insert")for(var u=t-n,g=-o.column+i.column;rn)break;if(c.start.row==n&&c.start.column>=o.column&&(c.start.column==o.column&&this.$bias<=0||(c.start.column+=g,c.start.row+=u)),c.end.row==n&&c.end.column>=o.column){if(c.end.column==o.column&&this.$bias<0)continue;c.end.column==o.column&&g>0&&rc.start.column&&c.end.column==e[r+1].start.column&&(c.end.column-=g),c.end.column+=g,c.end.row+=u}}else for(var u=n-t,g=o.column-i.column;rt)break;c.end.rowo.column)&&(c.end.column=o.column,c.end.row=o.row):(c.end.column+=g,c.end.row+=u):c.end.row>t&&(c.end.row+=u),c.start.rowo.column)&&(c.start.column=o.column,c.start.row=o.row):(c.start.column+=g,c.start.row+=u):c.start.row>t&&(c.start.row+=u)}if(u!=0&&r=i)return r;if(r.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=i)return r}return null},this.getFoldedRowCount=function(i,n){for(var t=this.$foldData,e=n-i+1,r=0;r=n){u=i?e-=n-u:e=0);break}else c>=i&&(u>=i?e-=c-u:e-=c-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,r;i instanceof h?r=i:(r=new h(n,i),r.collapseChildren=n.collapseChildren),this.$clipRangeToDocument(r.range);var l=r.start.row,c=r.start.column,u=r.end.row,g=r.end.column,p=this.getFoldAt(l,c,1),w=this.getFoldAt(u,g,-1);if(p&&w==p)return p.addSubFold(r);p&&!p.range.isStart(l,c)&&this.removeFold(p),w&&!w.range.isEnd(u,g)&&this.removeFold(w);var k=this.getFoldsInRange(r.range);k.length>0&&(this.removeFolds(k),r.collapseChildren||k.forEach(function(E){r.addSubFold(E)}));for(var y=0;y0&&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 $(0,0,this.getLength(),0),n==null&&(n=!0);else if(typeof i=="number")t=new $(i,0,i,this.getLine(i).length);else if("row"in i)t=$.fromPoints(i,i);else{if(Array.isArray(i))return e=[],i.forEach(function(l){e=e.concat(this.unfold(l))},this),e;t=i}e=this.getFoldsInRangeList(t);for(var r=e;e.length==1&&$.comparePoints(e[0].start,t.start)<0&&$.comparePoints(e[0].end,t.end)>0;)this.expandFolds(e),e=this.getFoldsInRangeList(t);if(n!=!1?this.removeFolds(e):this.expandFolds(e),r.length)return r},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,r){e==null&&(e=i.start.row),r==null&&(r=0),n==null&&(n=i.end.row),t==null&&(t=this.getLine(n).length);var l=this.doc,c="";return i.walk(function(u,g,p,w){if(!(gp)break;while(r&&c.test(r.type));r=e.stepBackward()}else r=e.getCurrentToken();return u.end.row=e.getCurrentTokenRow(),u.end.column=e.getCurrentTokenColumn(),u.start.row==u.end.row&&u.start.column>u.end.column?void 0:u}},this.foldAll=function(i,n,t,e){t==null&&(t=1e5);var r=this.foldWidgets;if(r){n=n||this.getLength(),i=i||0;for(var l=i;l=i&&(l=c.end.row,c.collapseChildren=t,this.addFold("...",c))}}},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=0;){var l=t[e];if(l==null&&(l=t[e]=this.getFoldWidget(e)),l=="start"){var c=this.getFoldWidgetRange(e);if(r||(r=c),c&&c.end.row>=i)break}e--}return{range:e!==-1&&c,firstRange:r}},this.onFoldWidgetClick=function(i,n){n instanceof a&&(n=n.domEvent);var t={children:n.shiftKey,all:n.ctrlKey||n.metaKey,siblings:n.altKey},e=this.$toggleFoldWidget(i,t);if(!e){var r=n.target||n.srcElement;r&&/ace_fold-widget/.test(r.className)&&(r.className+=" ace_invalid")}},this.$toggleFoldWidget=function(i,n){if(this.getFoldWidget){var t=this.getFoldWidget(i),e=this.getLine(i),r=t==="end"?-1:1,l=this.getFoldAt(i,r===-1?0:e.length,r);if(l)return n.children||n.all?this.removeFold(l):this.expandFold(l),l;var c=this.getFoldWidgetRange(i,!0);if(c&&!c.isMultiLine()&&(l=this.getFoldAt(c.start.row,c.start.column,1),l&&c.isEqual(l.range)))return this.removeFold(l),l;if(n.siblings){var u=this.getParentFoldRangeData(i);if(u.range)var g=u.range.start.row+1,p=u.range.end.row;this.foldAll(g,p,n.all?1e4:0)}else n.children?(p=c?c.end.row:this.getLength(),this.foldAll(i+1,p,n.all?1e4:0)):c&&(n.all&&(c.collapseChildren=1e4),this.addFold("...",c));return c}},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 r=this.getFoldAt(n,this.getLine(n).length,1);r?this.removeFold(r):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)}}v.Folding=o});ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(d,v,R){"use strict";var $=d("../token_iterator").TokenIterator,b=d("../range").Range;function h(){this.findMatchingBracket=function(s,a){if(s.column==0)return null;var o=a||this.getLine(s.row).charAt(s.column-1);if(o=="")return null;var i=o.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],s):this.$findOpeningBracket(i[2],s):null},this.getBracketRange=function(s){var a=this.getLine(s.row),o=!0,i,n=a.charAt(s.column-1),t=n&&n.match(/([\(\[\{])|([\)\]\}])/);if(t||(n=a.charAt(s.column),s={row:s.row,column:s.column+1},t=n&&n.match(/([\(\[\{])|([\)\]\}])/),o=!1),!t)return null;if(t[1]){var e=this.$findClosingBracket(t[1],s);if(!e)return null;i=b.fromPoints(s,e),o||(i.end.column++,i.start.column--),i.cursor=i.end}else{var e=this.$findOpeningBracket(t[2],s);if(!e)return null;i=b.fromPoints(e,s),o||(i.start.column++,i.end.column--),i.cursor=i.start}return i},this.getMatchingBracketRanges=function(s,a){var o=this.getLine(s.row),i=/([\(\[\{])|([\)\]\}])/,n=!a&&o.charAt(s.column-1),t=n&&n.match(i);if(t||(n=(a===void 0||a)&&o.charAt(s.column),s={row:s.row,column:s.column+1},t=n&&n.match(i)),!t)return null;var e=new b(s.row,s.column-1,s.row,s.column),r=t[1]?this.$findClosingBracket(t[1],s):this.$findOpeningBracket(t[2],s);if(!r)return[e];var l=new b(r.row,r.column,r.row,r.column+1);return[e,l]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(s,a,o){var i=this.$brackets[s],n=1,t=new $(this,a.row,a.column),e=t.getCurrentToken();if(e||(e=t.stepForward()),!!e){o||(o=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var r=a.column-t.getCurrentTokenColumn()-2,l=e.value;;){for(;r>=0;){var c=l.charAt(r);if(c==i){if(n-=1,n==0)return{row:t.getCurrentTokenRow(),column:r+t.getCurrentTokenColumn()}}else c==s&&(n+=1);r-=1}do e=t.stepBackward();while(e&&!o.test(e.type));if(e==null)break;l=e.value,r=l.length-1}return null}},this.$findClosingBracket=function(s,a,o){var i=this.$brackets[s],n=1,t=new $(this,a.row,a.column),e=t.getCurrentToken();if(e||(e=t.stepForward()),!!e){o||(o=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var r=a.column-t.getCurrentTokenColumn();;){for(var l=e.value,c=l.length;r"?i=!0:a.type.indexOf("tag-name")!==-1&&(o=!0));while(a&&!o);return a},this.$findClosingTag=function(s,a){var o,i=a.value,n=a.value,t=0,e=new b(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);a=s.stepForward();var r=new b(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+a.value.length),l=!1;do{if(o=a,o.type.indexOf("tag-close")!==-1&&!l){var c=new b(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);l=!0}if(a=s.stepForward(),a){if(a.value===">"&&!l){var c=new b(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);l=!0}if(a.type.indexOf("tag-name")!==-1){if(i=a.value,n===i){if(o.value==="<")t++;else if(o.value==="")var p=new b(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);else return}}}else if(n===i&&a.value==="/>"&&(t--,t<0))var u=new b(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+2),g=u,p=g,c=new b(r.end.row,r.end.column,r.end.row,r.end.column+1)}}while(a&&t>=0);if(e&&c&&u&&p&&r&&g)return{openTag:new b(e.start.row,e.start.column,c.end.row,c.end.column),closeTag:new b(u.start.row,u.start.column,p.end.row,p.end.column),openTagName:r,closeTagName:g}},this.$findOpeningTag=function(s,a){var o=s.getCurrentToken(),i=a.value,n=0,t=s.getCurrentTokenRow(),e=s.getCurrentTokenColumn(),r=e+2,l=new b(t,e,t,r);s.stepForward();var c=new b(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+a.value.length);if(a.type.indexOf("tag-close")===-1&&(a=s.stepForward()),!(!a||a.value!==">")){var u=new b(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);s.stepBackward(),s.stepBackward();do if(a=o,t=s.getCurrentTokenRow(),e=s.getCurrentTokenColumn(),r=e+a.value.length,o=s.stepBackward(),a){if(a.type.indexOf("tag-name")!==-1){if(i===a.value)if(o.value==="<"){if(n++,n>0){var g=new b(t,e,t,r),p=new b(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);do a=s.stepForward();while(a&&a.value!==">");var w=new b(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1)}}else o.value===""){for(var k=0,y=o;y;){if(y.type.indexOf("tag-name")!==-1&&y.value===i){n--;break}else if(y.value==="<")break;y=s.stepBackward(),k++}for(var A=0;Af&&(this.$docRowCache.splice(f,m),this.$screenRowCache.splice(f,m))},C.prototype.$getRowCacheIndex=function(x,m){for(var f=0,S=x.length-1;f<=S;){var L=f+S>>1,T=x[L];if(m>T)f=L+1;else if(m=m));T++);return S=f[T],S?(S.index=T,S.start=L-S.value.length,S):null},C.prototype.setUndoManager=function(x){if(this.$undoManager=x,this.$informUndoManager&&this.$informUndoManager.cancel(),x){var m=this;x.addSession(this),this.$syncInformUndoManager=function(){m.$informUndoManager.cancel(),m.mergeUndoDeltas=!1},this.$informUndoManager=b.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},C.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},C.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},C.prototype.getTabString=function(){return this.getUseSoftTabs()?b.stringRepeat(" ",this.getTabSize()):" "},C.prototype.setUseSoftTabs=function(x){this.setOption("useSoftTabs",x)},C.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},C.prototype.setTabSize=function(x){this.setOption("tabSize",x)},C.prototype.getTabSize=function(){return this.$tabSize},C.prototype.isTabStop=function(x){return this.$useSoftTabs&&x.column%this.$tabSize===0},C.prototype.setNavigateWithinSoftTabs=function(x){this.setOption("navigateWithinSoftTabs",x)},C.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},C.prototype.setOverwrite=function(x){this.setOption("overwrite",x)},C.prototype.getOverwrite=function(){return this.$overwrite},C.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},C.prototype.addGutterDecoration=function(x,m){this.$decorations[x]||(this.$decorations[x]=""),this.$decorations[x]+=" "+m,this._signal("changeBreakpoint",{})},C.prototype.removeGutterCustomWidget=function(x){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(x)},C.prototype.addGutterCustomWidget=function(x,m){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(x,m)},C.prototype.removeGutterDecoration=function(x,m){this.$decorations[x]=(this.$decorations[x]||"").replace(" "+m,""),this._signal("changeBreakpoint",{})},C.prototype.getBreakpoints=function(){return this.$breakpoints},C.prototype.setBreakpoints=function(x){this.$breakpoints=[];for(var m=0;m0&&(S=!!f.charAt(m-1).match(this.tokenRe)),S||(S=!!f.charAt(m).match(this.tokenRe)),S)var L=this.tokenRe;else if(/^\s+$/.test(f.slice(m-1,m+1)))var L=/\s/;else var L=this.nonTokenRe;var T=m;if(T>0){do T--;while(T>=0&&f.charAt(T).match(L));T++}for(var I=m;Ix&&(x=m.screenWidth)}),this.lineWidgetWidth=x},C.prototype.$computeWidth=function(x){if(this.$modified||x){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var m=this.doc.getAllLines(),f=this.$rowLengthCache,S=0,L=0,T=this.$foldData[L],I=T?T.start.row:1/0,D=m.length,O=0;OI){if(O=T.end.row+1,O>=D)break;T=this.$foldData[L++],I=T?T.start.row:1/0}f[O]==null&&(f[O]=this.$getStringScreenWidth(m[O])[0]),f[O]>S&&(S=f[O])}this.screenWidth=S}},C.prototype.getLine=function(x){return this.doc.getLine(x)},C.prototype.getLines=function(x,m){return this.doc.getLines(x,m)},C.prototype.getLength=function(){return this.doc.getLength()},C.prototype.getTextRange=function(x){return this.doc.getTextRange(x||this.selection.getRange())},C.prototype.insert=function(x,m){return this.doc.insert(x,m)},C.prototype.remove=function(x){return this.doc.remove(x)},C.prototype.removeFullLines=function(x,m){return this.doc.removeFullLines(x,m)},C.prototype.undoChanges=function(x,m){if(x.length){this.$fromUndo=!0;for(var f=x.length-1;f!=-1;f--){var S=x[f];S.action=="insert"||S.action=="remove"?this.doc.revertDelta(S):S.folds&&this.addFolds(S.folds)}!m&&this.$undoSelect&&(x.selectionBefore?this.selection.fromJSON(x.selectionBefore):this.selection.setRange(this.$getUndoSelection(x,!0))),this.$fromUndo=!1}},C.prototype.redoChanges=function(x,m){if(x.length){this.$fromUndo=!0;for(var f=0;fx.end.column&&(T.start.column+=D),T.end.row==x.end.row&&T.end.column>x.end.column&&(T.end.column+=D)),I&&T.start.row>=x.end.row&&(T.start.row+=I,T.end.row+=I)}if(T.end=this.insert(T.start,S),L.length){var O=x.start,N=T.start,I=N.row-O.row,D=N.column-O.column;this.addFolds(L.map(function(W){return W=W.clone(),W.start.row==O.row&&(W.start.column+=D),W.end.row==O.row&&(W.end.column+=D),W.start.row+=I,W.end.row+=I,W}))}return T},C.prototype.indentRows=function(x,m,f){f=f.replace(/\t/g,this.getTabString());for(var S=x;S<=m;S++)this.doc.insertInLine({row:S,column:0},f)},C.prototype.outdentRows=function(x){for(var m=x.collapseRows(),f=new n(0,0,0,0),S=this.getTabSize(),L=m.start.row;L<=m.end.row;++L){var T=this.getLine(L);f.start.row=L,f.end.row=L;for(var I=0;I0){var S=this.getRowFoldEnd(m+f);if(S>this.doc.getLength()-1)return 0;var L=S-m}else{x=this.$clipRowToDocument(x),m=this.$clipRowToDocument(m);var L=m-x+1}var T=new n(x,0,m,Number.MAX_VALUE),I=this.getFoldsInRange(T).map(function(O){return O=O.clone(),O.start.row+=L,O.end.row+=L,O}),D=f==0?this.doc.getLines(x,m):this.doc.removeFullLines(x,m);return this.doc.insertFullLines(x+L,D),I.length&&this.addFolds(I),L},C.prototype.moveLinesUp=function(x,m){return this.$moveLines(x,m,-1)},C.prototype.moveLinesDown=function(x,m){return this.$moveLines(x,m,1)},C.prototype.duplicateLines=function(x,m){return this.$moveLines(x,m,0)},C.prototype.$clipRowToDocument=function(x){return Math.max(0,Math.min(x,this.doc.getLength()-1))},C.prototype.$clipColumnToRow=function(x,m){return m<0?0:Math.min(this.doc.getLine(x).length,m)},C.prototype.$clipPositionToDocument=function(x,m){if(m=Math.max(0,m),x<0)x=0,m=0;else{var f=this.doc.getLength();x>=f?(x=f-1,m=this.doc.getLine(f-1).length):m=Math.min(this.doc.getLine(x).length,m)}return{row:x,column:m}},C.prototype.$clipRangeToDocument=function(x){x.start.row<0?(x.start.row=0,x.start.column=0):x.start.column=this.$clipColumnToRow(x.start.row,x.start.column);var m=this.doc.getLength()-1;return x.end.row>m?(x.end.row=m,x.end.column=this.doc.getLine(m).length):x.end.column=this.$clipColumnToRow(x.end.row,x.end.column),x},C.prototype.setUseWrapMode=function(x){if(x!=this.$useWrapMode){if(this.$useWrapMode=x,this.$modified=!0,this.$resetRowCache(0),x){var m=this.getLength();this.$wrapData=Array(m),this.$updateWrapData(0,m-1)}this._signal("changeWrapMode")}},C.prototype.getUseWrapMode=function(){return this.$useWrapMode},C.prototype.setWrapLimitRange=function(x,m){(this.$wrapLimitRange.min!==x||this.$wrapLimitRange.max!==m)&&(this.$wrapLimitRange={min:x,max:m},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},C.prototype.adjustWrapLimit=function(x,m){var f=this.$wrapLimitRange;f.max<0&&(f={min:m,max:m});var S=this.$constrainWrapLimit(x,f.min,f.max);return S!=this.$wrapLimit&&S>1?(this.$wrapLimit=S,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},C.prototype.$constrainWrapLimit=function(x,m,f){return m&&(x=Math.max(m,x)),f&&(x=Math.min(f,x)),x},C.prototype.getWrapLimit=function(){return this.$wrapLimit},C.prototype.setWrapLimit=function(x){this.setWrapLimitRange(x,x)},C.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},C.prototype.$updateInternalDataOnChange=function(x){var m=this.$useWrapMode,f=x.action,S=x.start,L=x.end,T=S.row,I=L.row,D=I-T,O=null;if(this.$updating=!0,D!=0)if(f==="remove"){this[m?"$wrapData":"$rowLengthCache"].splice(T,D);var N=this.$foldData;O=this.getFoldsInRange(x),this.removeFolds(O);var F=this.getFoldLine(L.row),B=0;if(F){F.addRemoveChars(L.row,L.column,S.column-L.column),F.shiftRow(-D);var W=this.getFoldLine(T);W&&W!==F&&(W.merge(F),F=W),B=N.indexOf(F)+1}for(B;B=L.row&&F.shiftRow(-D)}I=T}else{var H=Array(D);H.unshift(T,0);var z=m?this.$wrapData:this.$rowLengthCache;z.splice.apply(z,H);var N=this.$foldData,F=this.getFoldLine(T),B=0;if(F){var U=F.range.compareInside(S.row,S.column);U==0?(F=F.split(S.row,S.column),F&&(F.shiftRow(D),F.addRemoveChars(I,0,L.column-S.column))):U==-1&&(F.addRemoveChars(T,0,L.column-S.column),F.shiftRow(D)),B=N.indexOf(F)+1}for(B;B=T&&F.shiftRow(D)}}else{D=Math.abs(x.start.column-x.end.column),f==="remove"&&(O=this.getFoldsInRange(x),this.removeFolds(O),D=-D);var F=this.getFoldLine(T);F&&F.addRemoveChars(T,S.column,D)}return m&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,m?this.$updateWrapData(T,I):this.$updateRowLengthCache(T,I),O},C.prototype.$updateRowLengthCache=function(x,m){this.$rowLengthCache[x]=null,this.$rowLengthCache[m]=null},C.prototype.$updateWrapData=function(x,m){var f=this.doc.getAllLines(),S=this.getTabSize(),L=this.$wrapData,T=this.$wrapLimit,I,D,O=x;for(m=Math.min(m,f.length-1);O<=m;)D=this.getFoldLine(O,D),D?(I=[],D.walk(function(N,F,B,W){var H;if(N!=null){H=this.$getDisplayTokens(N,I.length),H[0]=w;for(var z=1;zm-W;){var H=T+m-W;if(x[H-1]>=A&&x[H]>=A){B(H);continue}if(x[H]==w||x[H]==k){for(H;H!=T-1&&x[H]!=w;H--);if(H>T){B(H);continue}for(H=T+m,H;H>2)),T-1);H>z&&x[H]z&&x[H]z&&x[H]==y;)H--}else for(;H>z&&x[H]z){B(++H);continue}H=T+m,x[H]==p&&H--,B(H-W)}return S},C.prototype.$getDisplayTokens=function(x,m){var f=[],S;m=m||0;for(var L=0;L39&&T<48||T>57&&T<64?f.push(y):T>=4352&&_(T)?f.push(g,p):f.push(g)}return f},C.prototype.$getStringScreenWidth=function(x,m,f){if(m==0)return[0,0];m==null&&(m=1/0),f=f||0;var S,L;for(L=0;L=4352&&_(S)?f+=2:f+=1,!(f>m));L++);return[f,L]},C.prototype.getRowLength=function(x){var m=1;return this.lineWidgets&&(m+=this.lineWidgets[x]&&this.lineWidgets[x].rowCount||0),!this.$useWrapMode||!this.$wrapData[x]?m:this.$wrapData[x].length+m},C.prototype.getRowLineCount=function(x){return!this.$useWrapMode||!this.$wrapData[x]?1:this.$wrapData[x].length+1},C.prototype.getRowWrapIndent=function(x){if(this.$useWrapMode){var m=this.screenToDocumentPosition(x,Number.MAX_VALUE),f=this.$wrapData[m.row];return f.length&&f[0]=0)var D=N[F],L=this.$docRowCache[F],W=x>N[B-1];else var W=!B;for(var H=this.getLength()-1,z=this.getNextFoldLine(L),U=z?z.start.row:1/0;D<=x&&(O=this.getRowLength(L),!(D+O>x||L>=H));)D+=O,L++,L>U&&(L=z.end.row+1,z=this.getNextFoldLine(L,z),U=z?z.start.row:1/0),W&&(this.$docRowCache.push(L),this.$screenRowCache.push(D));if(z&&z.start.row<=L)S=this.getFoldDisplayLine(z),L=z.start.row;else{if(D+O<=x||L>H)return{row:H,column:this.getLine(H).length};S=this.getLine(L),z=null}var j=0,P=Math.floor(x-D);if(this.$useWrapMode){var G=this.$wrapData[L];G&&(I=G[P],P>0&&G.length&&(j=G.indent,T=G[P-1]||G[G.length-1],S=S.substring(T)))}return f!==void 0&&this.$bidiHandler.isBidiRow(D+P,L,P)&&(m=this.$bidiHandler.offsetToCol(f)),T+=this.$getStringScreenWidth(S,m-j)[1],this.$useWrapMode&&T>=I&&(T=I-1),z?z.idxToPosition(T):{row:L,column:T}},C.prototype.documentToScreenPosition=function(x,m){if(typeof m>"u")var f=this.$clipPositionToDocument(x.row,x.column);else f=this.$clipPositionToDocument(x,m);x=f.row,m=f.column;var S=0,L=null,T=null;T=this.getFoldAt(x,m,1),T&&(x=T.start.row,m=T.start.column);var I,D=0,O=this.$docRowCache,N=this.$getRowCacheIndex(O,x),F=O.length;if(F&&N>=0)var D=O[N],S=this.$screenRowCache[N],B=x>O[F-1];else var B=!F;for(var W=this.getNextFoldLine(D),H=W?W.start.row:1/0;D=H){if(I=W.end.row+1,I>x)break;W=this.getNextFoldLine(I,W),H=W?W.start.row:1/0}else I=D+1;S+=this.getRowLength(D),D=I,B&&(this.$docRowCache.push(D),this.$screenRowCache.push(S))}var z="";W&&D>=H?(z=this.getFoldDisplayLine(W,x,m),L=W.start.row):(z=this.getLine(x).substring(0,m),L=x);var U=0;if(this.$useWrapMode){var j=this.$wrapData[L];if(j){for(var P=0;z.length>=j[P];)S++,P++;z=z.substring(j[P-1]||0,z.length),U=P>0?j.indent:0}}return this.lineWidgets&&this.lineWidgets[D]&&this.lineWidgets[D].rowsAbove&&(S+=this.lineWidgets[D].rowsAbove),{row:S,column:U+this.$getStringScreenWidth(z)[0]}},C.prototype.documentToScreenColumn=function(x,m){return this.documentToScreenPosition(x,m).column},C.prototype.documentToScreenRow=function(x,m){return this.documentToScreenPosition(x,m).row},C.prototype.getScreenLength=function(){var x=0,m=null;if(this.$useWrapMode)for(var L=this.$wrapData.length,T=0,S=0,m=this.$foldData[S++],I=m?m.start.row:1/0;TI&&(T=m.end.row+1,m=this.$foldData[S++],I=m?m.start.row:1/0)}else{x=this.getLength();for(var f=this.$foldData,S=0;Sf));T++);return[S,T]})},C.prototype.getPrecedingCharacter=function(){var x=this.selection.getCursor();if(x.column===0)return x.row===0?"":this.doc.getNewLineCharacter();var m=this.getLine(x.row);return m[x.column-1]},C.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},C})();u.$uid=0,u.prototype.$modes=s.$modes,u.prototype.getValue=u.prototype.toString,u.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},u.prototype.$overwrite=!1,u.prototype.$mode=null,u.prototype.$modeId=null,u.prototype.$scrollTop=0,u.prototype.$scrollLeft=0,u.prototype.$wrapLimit=80,u.prototype.$useWrapMode=!1,u.prototype.$wrapLimitRange={min:null,max:null},u.prototype.lineWidgets=null,u.prototype.isFullWidth=_,$.implement(u.prototype,a);var g=1,p=2,w=3,k=4,y=9,A=10,M=11,E=12;function _(C){return C<4352?!1:C>=4352&&C<=4447||C>=4515&&C<=4519||C>=4602&&C<=4607||C>=9001&&C<=9002||C>=11904&&C<=11929||C>=11931&&C<=12019||C>=12032&&C<=12245||C>=12272&&C<=12283||C>=12288&&C<=12350||C>=12353&&C<=12438||C>=12441&&C<=12543||C>=12549&&C<=12589||C>=12593&&C<=12686||C>=12688&&C<=12730||C>=12736&&C<=12771||C>=12784&&C<=12830||C>=12832&&C<=12871||C>=12880&&C<=13054||C>=13056&&C<=19903||C>=19968&&C<=42124||C>=42128&&C<=42182||C>=43360&&C<=43388||C>=44032&&C<=55203||C>=55216&&C<=55238||C>=55243&&C<=55291||C>=63744&&C<=64255||C>=65040&&C<=65049||C>=65072&&C<=65106||C>=65108&&C<=65126||C>=65128&&C<=65131||C>=65281&&C<=65376||C>=65504&&C<=65510}d("./edit_session/folding").Folding.call(u.prototype),d("./edit_session/bracket_match").BracketMatch.call(u.prototype),s.defineOptions(u.prototype,"session",{wrap:{set:function(C){if(!C||C=="off"?C=!1:C=="free"?C=!0:C=="printMargin"?C=-1:typeof C=="string"&&(C=parseInt(C,10)||!1),this.$wrap!=C)if(this.$wrap=C,!C)this.setUseWrapMode(!1);else{var x=typeof C=="number"?C:null;this.setWrapLimitRange(x,x),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(C){C=C=="auto"?this.$mode.type!="text":C!="text",C!=this.$wrapAsCode&&(this.$wrapAsCode=C,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(C){this.$useWorker=C,this.$stopWorker(),C&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(C){C=parseInt(C),C>0&&this.$tabSize!==C&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=C,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(C){this.setFoldStyle(C)},handlesSet:!0},overwrite:{set:function(C){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(C){this.doc.setNewLineMode(C)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(C){this.setMode(C)},get:function(){return this.$modeId},handlesSet:!0}}),v.EditSession=u});ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(d,v,R){"use strict";var $=d("./lib/lang"),b=d("./lib/oop"),h=d("./range").Range,s=(function(){function n(){this.$options={}}return n.prototype.set=function(t){return b.mixin(this.$options,t),this},n.prototype.getOptions=function(){return $.copyObject(this.$options)},n.prototype.setOptions=function(t){this.$options=t},n.prototype.find=function(t){var e=this.$options,r=this.$matchIterator(t,e);if(!r)return!1;var l=null;return r.forEach(function(c,u,g,p){return l=new h(c,u,g,p),u==p&&e.start&&e.start.start&&e.skipCurrent!=!1&&l.isEqual(e.start)?(l=null,!1):!0}),l},n.prototype.findAll=function(t){var e=this.$options;if(!e.needle)return[];this.$assembleRegExp(e);var r=e.range,l=r?t.getLines(r.start.row,r.end.row):t.doc.getAllLines(),c=[],u=e.re;if(e.$isMultiLine){var g=u.length,p=l.length-g,w;e:for(var k=u.offset||0;k<=p;k++){for(var y=0;yE||(c.push(w=new h(k,E,k+g-1,_)),g>2&&(k=k+g-2))}}else for(var C,x=0;xx&&(x=f),c.push(new h(C.startRow,C.startCol,C.endRow,C.endCol))}}else{C=$.getMatchOffsets(l[x],u);for(var y=0;yT&&c[y].end.row==I;)y--;for(c=c.slice(x,y+1),x=0,y=c.length;x=c){r+="\\";break}var g=t.charCodeAt(l);switch(g){case e.Backslash:r+="\\";break;case e.n:r+=` `;break;case e.t:r+=" ";break}continue}if(u===e.DollarSign){if(l++,l>=c){r+="$";break}var p=t.charCodeAt(l);if(p===e.DollarSign){r+="$$";continue}if(p===e.Digit0||p===e.Ampersand){r+="$&";continue}if(e.Digit1<=p&&p<=e.Digit9){r+="$"+t[l];continue}}r+=t[l]}return r||t},n.prototype.replace=function(t,e){var r=this.$options,l=this.$assembleRegExp(r);if(r.$isMultiLine)return e;if(l){var c=this.$isMultilineSearch(r);c&&(t=t.replace(/\r\n|\r|\n/g,` `));var u=l.exec(t);if(!u||!c&&u[0].length!=t.length)return null;if(e=r.regExp?this.parseReplaceString(e):e.replace(/\$/g,"$$$$"),e=t.replace(l,e),r.preserveCase){e=e.split("");for(var g=Math.min(t.length,t.length);g--;){var p=t[g];p&&p.toLowerCase()!=p?e[g]=e[g].toUpperCase():e[g]=e[g].toLowerCase()}e=e.join("")}return e}},n.prototype.$assembleRegExp=function(t,e){if(t.needle instanceof RegExp)return t.re=t.needle;var r=t.needle;if(!t.needle)return t.re=!1;t.regExp||(r=$.escapeRegExp(r));var l=t.caseSensitive?"gm":"gmi";try{new RegExp(r,"u"),t.$supportsUnicodeFlag=!0,l+="u"}catch{t.$supportsUnicodeFlag=!1}if(t.wholeWord&&(r=a(r,t)),t.$isMultiLine=!e&&/[\n\r]/.test(r),t.$isMultiLine)return t.re=this.$assembleMultilineRegExp(r,l);try{var c=new RegExp(r,l)}catch{c=!1}return t.re=c},n.prototype.$assembleMultilineRegExp=function(t,e){for(var r=t.replace(/\r\n|\r|\n/g,`$ ^`).split(` `),l=[],c=0;cl);p++){var w=t.getLine(g++);c=c==null?w:c+` `+w}var k=e.exec(c);if(e.lastIndex=0,k){var y=c.slice(0,k.index).split(` `),A=k[0].split(` `),M=r+y.length-1,E=y[y.length-1].length,_=M+A.length-1,C=A.length==1?E+A[0].length:A[A.length-1].length;return{startRow:M,startCol:E,endRow:_,endCol:C}}}return null},n.prototype.$multiLineBackward=function(t,e,r,l,c){for(var u,g=i(t,l),p=t.getLine(l).length-r,w=l;w>=c;){for(var k=0;k=c;k++){var y=t.getLine(w--);u=u==null?y:y+` `+u}var A=o(u,e,p);if(A){var M=u.slice(0,A.index).split(` `),E=A[0].split(` `),_=w+M.length,C=M[M.length-1].length,x=_+E.length-1,m=E.length==1?C+E[0].length:E[E.length-1].length;return{startRow:_,startCol:C,endRow:x,endCol:m}}}return null},n.prototype.$matchIterator=function(t,e){var r=this.$assembleRegExp(e);if(!r)return!1;var l=this.$isMultilineSearch(e),c=this.$multiLineForward,u=this.$multiLineBackward,g=e.backwards==!0,p=e.skipCurrent!=!1,w=r.unicode,k=e.range,y=e.start;y||(y=k?k[g?"end":"start"]:t.selection.getRange()),y.start&&(y=y[p!=g?"end":"start"]);var A=k?k.start.row:0,M=k?k.end.row:t.getLength()-1;if(g)var E=function(x){var m=y.row;if(!C(m,y.column,x)){for(m--;m>=A;m--)if(C(m,Number.MAX_VALUE,x))return;if(e.wrap!=!1){for(m=M,A=y.row;m>=A;m--)if(C(m,Number.MAX_VALUE,x))return}}};else var E=function(m){var f=y.row;if(!C(f,y.column,m)){for(f=f+1;f<=M;f++)if(C(f,0,m))return;if(e.wrap!=!1){for(f=A,M=y.row;f<=M;f++)if(C(f,0,m))return}}};if(e.$isMultiLine)var _=r.length,C=function(x,m,f){var S=g?x-_+1:x;if(!(S<0||S+_>t.getLength())){var L=t.getLine(S),T=L.search(r[0]);if(!(!g&&Tm)&&f(S,T,S+_-1,D))return!0}}};else if(g)var C=function(m,f,S){if(l){var L=u(t,r,f,m,A);if(!L)return!1;if(S(L.startRow,L.startCol,L.endRow,L.endCol))return!0}else{var T=t.getLine(m),I=[],D,O=0;for(r.lastIndex=0;D=r.exec(T);){var N=D[0].length;if(O=D.index,!N){if(O>=T.length)break;r.lastIndex=O+=$.skipEmptyMatch(T,O,w)}if(D.index+N>f)break;I.push(D.index,N)}for(var F=I.length-1;F>=0;F-=2){var B=I[F-1],N=I[F];if(S(m,B,m,B+N))return!0}}};else var C=function(m,f,S){if(r.lastIndex=f,l){var L=c(t,r,m,M);if(L){var T=L.endRow<=M?L.endRow-1:M;T>m&&(m=T)}if(!L)return!1;if(S(L.startRow,L.startCol,L.endRow,L.endCol))return!0}else for(var I=t.getLine(m),D,O;O=r.exec(I);){var N=O[0].length;if(D=O.index,S(m,D,m,D+N))return!0;if(!N&&(r.lastIndex=D+=$.skipEmptyMatch(I,D,w),D>=I.length))return!1}};return{forEach:E}},n})();function a(n,t){var e=$.supportsLookbehind();function r(g,p){p===void 0&&(p=!0);var w=e&&t.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return w.test(g)||t.regExp?e&&t.$supportsUnicodeFlag?p?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var l=Array.from(n),c=l[0],u=l[l.length-1];return r(c)+n+r(u,!1)}function o(n,t,e){for(var r=null,l=0;l<=n.length;){t.lastIndex=l;var c=t.exec(n);if(!c)break;var u=c.index+c[0].length;if(u>n.length-e)break;(!r||u>r.index+r[0].length)&&(r=c),l=c.index+1}return r}function i(n,t){var e=5e3,r={row:t,column:0},l=n.doc.positionToIndex(r),c=l+e,u=n.doc.indexToPosition(c),g=u.row;return g+1}v.Search=s});ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(d,v,R){"use strict";var $=this&&this.__extends||(function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,l){r.__proto__=l}||function(r,l){for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(r[c]=l[c])},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 r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),b=d("../lib/keys"),h=d("../lib/useragent"),s=b.KEY_MODS,a=(function(){function n(t,e){this.$init(t,e,!1)}return n.prototype.$init=function(t,e,r){this.platform=e||(h.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(t),this.$singleCommand=r},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 r=t&&(typeof t=="string"?t:t.name);t=this.commands[r],e||delete this.commands[r];var l=this.commandKeyBinding;for(var c in l){var u=l[c];if(u==t)delete l[c];else if(Array.isArray(u)){var g=u.indexOf(t);g!=-1&&(u.splice(g,1),u.length==1&&(l[c]=u[0]))}}},n.prototype.bindKey=function(t,e,r){if(typeof t=="object"&&t&&(r==null&&(r=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(l){var c="";if(l.indexOf(" ")!=-1){var u=l.split(/\s+/);l=u.pop(),u.forEach(function(w){var k=this.parseKeys(w),y=s[k.hashId]+k.key;c+=(c?" ":"")+y,this._addCommandToBinding(c,"chainKeys")},this),c+=" "}var g=this.parseKeys(l),p=s[g.hashId]+g.key;this._addCommandToBinding(c+p,e,r)},this)}},n.prototype._addCommandToBinding=function(t,e,r){var l=this.commandKeyBinding,c;if(!e)delete l[t];else if(!l[t]||this.$singleCommand)l[t]=e;else{Array.isArray(l[t])?(c=l[t].indexOf(e))!=-1&&l[t].splice(c,1):l[t]=[l[t]],typeof r!="number"&&(r=o(e));var u=l[t];for(c=0;cr)break}u.splice(c,0,e)}},n.prototype.addCommands=function(t){t&&Object.keys(t).forEach(function(e){var r=t[e];if(r){if(typeof r=="string")return this.bindKey(r,e);typeof r=="function"&&(r={exec:r}),typeof r=="object"&&(r.name||(r.name=e),this.addCommand(r))}},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(p){return p}),r=e.pop(),l=b[r];if(b.FUNCTION_KEYS[l])r=b.FUNCTION_KEYS[l].toLowerCase();else if(e.length){if(e.length==1&&e[0]=="shift")return{key:r.toUpperCase(),hashId:-1}}else return{key:r,hashId:-1};for(var c=0,u=e.length;u--;){var g=b.KEY_MODS[e[u]];if(g==null)return typeof console<"u"&&console.error("invalid modifier "+e[u]+" in "+t),!1;c|=g}return{key:r,hashId:c}},n.prototype.findKeyCommand=function(t,e){var r=s[t]+e;return this.commandKeyBinding[r]},n.prototype.handleKeyboard=function(t,e,r,l){if(!(l<0)){var c=s[e]+r,u=this.commandKeyBinding[c];return t.$keyChain&&(t.$keyChain+=" "+c,u=this.commandKeyBinding[t.$keyChain]||u),u&&(u=="chainKeys"||u[u.length-1]=="chainKeys")?(t.$keyChain=t.$keyChain||c,{command:"null"}):(t.$keyChain&&((!e||e==4)&&r.length==1?t.$keyChain=t.$keyChain.slice(0,-c.length-1):(e==-1||l>0)&&(t.$keyChain="")),{command:u})}},n.prototype.getStatusText=function(t,e){return e.$keyChain||""},n})();function o(n){return typeof n=="object"&&n.bindKey&&n.bindKey.position||(n.isDefault?-100:0)}var i=(function(n){$(t,n);function t(e,r){var l=n.call(this,e,r)||this;return l.$singleCommand=!0,l}return t})(a);i.call=function(n,t,e){a.prototype.$init.call(n,t,e,!0)},a.call=function(n,t,e){a.prototype.$init.call(n,t,e,!1)},v.HashHandler=i,v.MultiHashHandler=a});ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(d,v,R){"use strict";var $=this&&this.__extends||(function(){var o=function(i,n){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},o(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");o(i,n);function t(){this.constructor=i}i.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}})(),b=d("../lib/oop"),h=d("../keyboard/hash_handler").MultiHashHandler,s=d("../lib/event_emitter").EventEmitter,a=(function(o){$(i,o);function i(n,t){var e=o.call(this,t,n)||this;return e.byName=e.commands,e.setDefaultHandler("exec",function(r){return r.args?r.command.exec(r.editor,r.args,r.event,!1):r.command.exec(r.editor,{},r.event,!0)}),e}return i.prototype.exec=function(n,t,e){if(Array.isArray(n)){for(var r=n.length;r--;)if(this.exec(n[r],t,e))return!0;return!1}typeof n=="string"&&(n=this.commands[n]);var l={editor:t,command:n,args:e};return this.canExecute(n,t)?(l.returnValue=this._emit("exec",l),this._signal("afterExec",l),l.returnValue!==!1):(this._signal("commandUnavailable",l),!1)},i.prototype.canExecute=function(n,t){return typeof n=="string"&&(n=this.commands[n]),!(!n||t&&t.$readOnly&&!n.readOnly||this.$checkCommandState!=!1&&n.isAvailable&&!n.isAvailable(t))},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})(h);b.implement(a.prototype,s),v.CommandManager=a});ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(d,v,R){"use strict";var $=d("../lib/lang"),b=d("../config"),h=d("../range").Range;function s(o,i){return{win:o,mac:i}}v.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:s("Ctrl-,","Command-,"),exec:function(o){b.loadModule("ace/ext/settings_menu",function(i){i.init(o),o.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:s("Alt-E","F4"),exec:function(o){b.loadModule("ace/ext/error_marker",function(i){i.showErrorMarker(o,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:s("Alt-Shift-E","Shift-F4"),exec:function(o){b.loadModule("ace/ext/error_marker",function(i){i.showErrorMarker(o,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:s("Ctrl-A","Command-A"),exec:function(o){o.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:s(null,"Ctrl-L"),exec:function(o){o.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:s("Ctrl-L","Command-L"),exec:function(o,i){typeof i=="number"&&!isNaN(i)&&o.gotoLine(i),o.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:s("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(o){o.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:s("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(o){o.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:s("F2","F2"),exec:function(o){o.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:s("Alt-F2","Alt-F2"),exec:function(o){o.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(o){o.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(o){o.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:s("Alt-0","Command-Option-0"),exec:function(o){o.session.foldAll(),o.session.unfold(o.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(o){o.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:s("Ctrl-K","Command-G"),exec:function(o){o.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:s("Ctrl-Shift-K","Command-Shift-G"),exec:function(o){o.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:s("Alt-K","Ctrl-G"),exec:function(o){o.selection.isEmpty()?o.selection.selectWord():o.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:s("Alt-Shift-K","Ctrl-Shift-G"),exec:function(o){o.selection.isEmpty()?o.selection.selectWord():o.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:s("Ctrl-F","Command-F"),exec:function(o){b.loadModule("ace/ext/searchbox",function(i){i.Search(o)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(o){o.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:s("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(o){o.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:s("Ctrl-Home","Command-Home|Command-Up"),exec:function(o){o.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:s("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(o){o.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:s("Up","Up|Ctrl-P"),exec:function(o,i){o.navigateUp(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:s("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(o){o.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:s("Ctrl-End","Command-End|Command-Down"),exec:function(o){o.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:s("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(o){o.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:s("Down","Down|Ctrl-N"),exec:function(o,i){o.navigateDown(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:s("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(o){o.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:s("Ctrl-Left","Option-Left"),exec:function(o){o.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:s("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(o){o.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:s("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(o){o.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:s("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(o){o.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:s("Left","Left|Ctrl-B"),exec:function(o,i){o.navigateLeft(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:s("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(o){o.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:s("Ctrl-Right","Option-Right"),exec:function(o){o.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:s("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(o){o.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:s("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(o){o.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:s("Shift-Right","Shift-Right"),exec:function(o){o.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:s("Right","Right|Ctrl-F"),exec:function(o,i){o.navigateRight(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(o){o.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:s(null,"Option-PageDown"),exec:function(o){o.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:s("PageDown","PageDown|Ctrl-V"),exec:function(o){o.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(o){o.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:s(null,"Option-PageUp"),exec:function(o){o.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(o){o.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:s("Ctrl-Up",null),exec:function(o){o.renderer.scrollBy(0,-2*o.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:s("Ctrl-Down",null),exec:function(o){o.renderer.scrollBy(0,2*o.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(o){o.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(o){o.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:s("Ctrl-Alt-E","Command-Option-E"),exec:function(o){o.commands.toggleRecording(o)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(o){o.commands.replay(o)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:s("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(o){o.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:s("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(o){o.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:s("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(o){o.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:s(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(o){},readOnly:!0},{name:"cut",description:"Cut",exec:function(o){var i=o.$copyWithEmptySelection&&o.selection.isEmpty(),n=i?o.selection.getLineRange():o.selection.getRange();o._emit("cut",n),n.isEmpty()||o.session.remove(n),o.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(o,i){o.$handlePaste(i)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:s("Ctrl-D","Command-D"),exec:function(o){o.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(o){o.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(o){o.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:s("Ctrl-/","Command-/"),exec:function(o){o.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(o){o.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(o){o.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(o){o.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(o){b.loadModule("ace/ext/searchbox",function(i){i.Search(o,!0)})}},{name:"undo",description:"Undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(o){o.undo()}},{name:"redo",description:"Redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(o){o.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(o){o.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:s("Alt-Up","Option-Up"),exec:function(o){o.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(o){o.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:s("Alt-Down","Option-Down"),exec:function(o){o.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(o){o.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:s("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(o){o.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:s("Shift-Delete",null),exec:function(o){if(o.selection.isEmpty())o.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:s("Alt-Backspace","Command-Backspace"),exec:function(o){o.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:s("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(o){o.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:s("Ctrl-Shift-Backspace",null),exec:function(o){var i=o.selection.getRange();i.start.column=0,o.session.remove(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:s("Ctrl-Shift-Delete",null),exec:function(o){var i=o.selection.getRange();i.end.column=Number.MAX_VALUE,o.session.remove(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(o){o.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(o){o.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(o){o.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:s("Tab","Tab"),exec:function(o){o.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(o){o.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:s("Ctrl-]","Ctrl-]"),exec:function(o){o.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(o,i){o.insert(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(o,i){o.insert($.stringRepeat(i.text||"",i.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:s(null,"Ctrl-O"),exec:function(o){o.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:s("Alt-Shift-X","Ctrl-T"),exec:function(o){o.transposeLetters()},multiSelectAction:function(o){o.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(o){o.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(o){o.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:s(null,null),exec:function(o){o.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:s("Ctrl-Shift-L","Command-Shift-L"),exec:function(o){var i=o.selection.getRange();i.start.column=i.end.column=0,i.end.row++,o.selection.setRange(i,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:s("Ctrl+F3","F3"),exec:function(o){o.openLink()}},{name:"joinlines",description:"Join lines",bindKey:s(null,null),exec:function(o){for(var i=o.selection.isBackwards(),n=i?o.selection.getSelectionLead():o.selection.getSelectionAnchor(),t=i?o.selection.getSelectionAnchor():o.selection.getSelectionLead(),e=o.session.doc.getLine(n.row).length,r=o.session.doc.getTextRange(o.selection.getRange()),l=r.replace(/\n\s*/," ").length,c=o.session.doc.getLine(n.row),u=n.row+1;u<=t.row+1;u++){var g=$.stringTrimLeft($.stringTrimRight(o.session.doc.getLine(u)));g.length!==0&&(g=" "+g),c+=g}t.row+10?(o.selection.moveCursorTo(n.row,n.column),o.selection.selectTo(n.row,n.column+l)):(e=o.session.doc.getLine(n.row).length>e?e+1:e,o.selection.moveCursorTo(n.row,e))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:s(null,null),exec:function(o){var i=o.session.doc.getLength()-1,n=o.session.doc.getLine(i).length,t=o.selection.rangeList.ranges,e=[];t.length<1&&(t=[o.selection.getRange()]);for(var r=0;r0||a+o=0&&this.$isCustomWidgetVisible(a-o))return a-o;if(a+o<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(a+o))return a+o;if(a-o>=0&&this.$isFoldWidgetVisible(a-o))return a-o;if(a+o<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(a+o))return a+o}return null},s.prototype.$findNearestAnnotation=function(a){if(this.$isAnnotationVisible(a))return a;for(var o=0;a-o>0||a+o=0&&this.$isAnnotationVisible(a-o))return a-o;if(a+o<=this.lines.getLength()-1&&this.$isAnnotationVisible(a+o))return a+o}return null},s.prototype.$focusFoldWidget=function(a){if(a!=null){var o=this.$getFoldWidget(a);o.classList.add(this.editor.renderer.keyboardFocusClassName),o.focus()}},s.prototype.$focusCustomWidget=function(a){if(a!=null){var o=this.$getCustomWidget(a);o&&(o.classList.add(this.editor.renderer.keyboardFocusClassName),o.focus())}},s.prototype.$focusAnnotation=function(a){if(a!=null){var o=this.$getAnnotation(a);o.classList.add(this.editor.renderer.keyboardFocusClassName),o.focus()}},s.prototype.$blurFoldWidget=function(a){var o=this.$getFoldWidget(a);o.classList.remove(this.editor.renderer.keyboardFocusClassName),o.blur()},s.prototype.$blurCustomWidget=function(a){var o=this.$getCustomWidget(a);o&&(o.classList.remove(this.editor.renderer.keyboardFocusClassName),o.blur())},s.prototype.$blurAnnotation=function(a){var o=this.$getAnnotation(a);o.classList.remove(this.editor.renderer.keyboardFocusClassName),o.blur()},s.prototype.$moveFoldWidgetUp=function(){for(var a=this.activeRowIndex;a>0;)if(a--,this.$isFoldWidgetVisible(a)||this.$isCustomWidgetVisible(a)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=a,this.$isFoldWidgetVisible(a)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},s.prototype.$moveFoldWidgetDown=function(){for(var a=this.activeRowIndex;a0;)if(a--,this.$isAnnotationVisible(a)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=a,this.$focusAnnotation(this.activeRowIndex);return}},s.prototype.$moveAnnotationDown=function(){for(var a=this.activeRowIndex;a=m.length&&(m=void 0),{value:m&&m[L++],done:!m}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")},b=d("./lib/oop"),h=d("./lib/dom"),s=d("./lib/lang"),a=d("./lib/useragent"),o=d("./keyboard/textinput").TextInput,i=d("./mouse/mouse_handler").MouseHandler,n=d("./mouse/fold_handler").FoldHandler,t=d("./keyboard/keybinding").KeyBinding,e=d("./edit_session").EditSession,r=d("./search").Search,l=d("./range").Range,c=d("./lib/event_emitter").EventEmitter,u=d("./commands/command_manager").CommandManager,g=d("./commands/default_commands").commands,p=d("./config"),w=d("./token_iterator").TokenIterator,k=d("./keyboard/gutter_handler").GutterKeyboardHandler,y=d("./config").nls,A=d("./clipboard"),M=d("./lib/keys"),E=d("./lib/event"),_=d("./tooltip").HoverTooltip,C=(function(){function m(f,S,L){this.id="editor"+ ++m.$uid,this.session,this.$toDestroy=[];var T=f.getContainerElement();this.container=T,this.renderer=f,this.commands=new u(a.isMac?"mac":"win",g),typeof document=="object"&&(this.textInput=new o(f.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new i(this),new n(this)),this.keyBinding=new t(this),this.$search=new r().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(I,D){D._$emitInputEvent.schedule(31)}),this.setSession(S||L&&L.session||new e("")),p.resetOptions(this),L&&this.setOptions(L),p._signal("editor",this)}return m.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},m.prototype.startOperation=function(f){this.session.startOperation(f)},m.prototype.endOperation=function(f){this.session.endOperation(f)},m.prototype.onStartOperation=function(f){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,f||(this.previousCommand=null)},m.prototype.onEndOperation=function(f){if(this.curOp&&this.session){if(f&&f.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var S=this.curOp.command,L=S&&S.scrollIntoView;if(L){switch(L){case"center-animate":L="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var T=this.selection.getRange(),I=this.renderer.layerConfig;(T.start.row>=I.lastRow||T.end.row<=I.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break;default:break}L=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},m.prototype.$historyTracker=function(f){if(this.$mergeUndoDeltas){var S=this.prevOp,L=this.$mergeableCommands,T=S.command&&f.command.name==S.command.name;if(f.command.name=="insertstring"){var I=f.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),T=T&&this.mergeNextCommand&&(!/\s/.test(I)||/\s/.test(S.args)),this.mergeNextCommand=!0}else T=T&&L.indexOf(f.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(T=!1),T?this.session.mergeUndoDeltas=!0:L.indexOf(f.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},m.prototype.setKeyboardHandler=function(f,S){if(f&&typeof f=="string"&&f!="ace"){this.$keybindingId=f;var L=this;p.loadModule(["keybinding",f],function(T){L.$keybindingId==f&&L.keyBinding.setKeyboardHandler(T&&T.handler),S&&S()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(f),S&&S()},m.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},m.prototype.setSession=function(f){if(this.session!=f){this.curOp&&this.endOperation(),this.curOp={};var S=this.session;if(S){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var L=this.session.getSelection();L.off("changeCursor",this.$onCursorChange),L.off("changeSelection",this.$onSelectionChange)}this.session=f,f?(this.$onDocumentChange=this.onDocumentChange.bind(this),f.on("change",this.$onDocumentChange),this.renderer.setSession(f),this.$onChangeMode=this.onChangeMode.bind(this),f.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),f.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),f.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),f.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),f.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),f.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=f.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(f)),this._signal("changeSession",{session:f,oldSession:S}),this.curOp=null,S&&S._signal("changeEditor",{oldEditor:this}),S&&(S.$editor=null),f&&f._signal("changeEditor",{editor:this}),f&&(f.$editor=this),f&&!f.destroyed&&f.bgTokenizer.scheduleStart()}},m.prototype.getSession=function(){return this.session},m.prototype.setValue=function(f,S){return this.session.doc.setValue(f),S?S==1?this.navigateFileEnd():S==-1&&this.navigateFileStart():this.selectAll(),f},m.prototype.getValue=function(){return this.session.getValue()},m.prototype.getSelection=function(){return this.selection},m.prototype.resize=function(f){this.renderer.onResize(f)},m.prototype.setTheme=function(f,S){this.renderer.setTheme(f,S)},m.prototype.getTheme=function(){return this.renderer.getTheme()},m.prototype.setStyle=function(f,S){this.renderer.setStyle(f,S)},m.prototype.unsetStyle=function(f){this.renderer.unsetStyle(f)},m.prototype.getFontSize=function(){return this.getOption("fontSize")||h.computedStyle(this.container).fontSize},m.prototype.setFontSize=function(f){this.setOption("fontSize",f)},m.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var f=this;this.$highlightPending=!0,setTimeout(function(){f.$highlightPending=!1;var S=f.session;if(!(!S||S.destroyed)){S.$bracketHighlight&&(S.$bracketHighlight.markerIds.forEach(function(W){S.removeMarker(W)}),S.$bracketHighlight=null);var L=f.getCursorPosition(),T=f.getKeyboardHandler(),I=T&&T.$getDirectionForHighlight&&T.$getDirectionForHighlight(f),D=S.getMatchingBracketRanges(L,I);if(!D){var O=new w(S,L.row,L.column),N=O.getCurrentToken();if(N&&/\b(?:tag-open|tag-name)/.test(N.type)){var F=S.getMatchingTags(L);F&&(D=[F.openTagName.isEmpty()?F.openTag:F.openTagName,F.closeTagName.isEmpty()?F.closeTag:F.closeTagName])}}if(!D&&S.$mode.getMatching&&(D=S.$mode.getMatching(f.session)),!D){f.getHighlightIndentGuides()&&f.renderer.$textLayer.$highlightIndentGuide();return}var B="ace_bracket";Array.isArray(D)?D.length==1&&(B="ace_error_bracket"):D=[D],D.length==2&&(l.comparePoints(D[0].end,D[1].start)==0?D=[l.fromPoints(D[0].start,D[1].end)]:l.comparePoints(D[0].start,D[1].end)==0&&(D=[l.fromPoints(D[1].start,D[0].end)])),S.$bracketHighlight={ranges:D,markerIds:D.map(function(W){return S.addMarker(W,B,"text")})},f.getHighlightIndentGuides()&&f.renderer.$textLayer.$highlightIndentGuide()}},50)}},m.prototype.focus=function(){this.textInput.focus()},m.prototype.isFocused=function(){return this.textInput.isFocused()},m.prototype.blur=function(){this.textInput.blur()},m.prototype.onFocus=function(f){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",f))},m.prototype.onBlur=function(f){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",f))},m.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},m.prototype.onDocumentChange=function(f){var S=this.session.$useWrapMode,L=f.start.row==f.end.row?f.end.row:1/0;this.renderer.updateLines(f.start.row,L,S),this._signal("change",f),this.$cursorChange()},m.prototype.onTokenizerUpdate=function(f){var S=f.data;this.renderer.updateLines(S.first,S.last)},m.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},m.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},m.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},m.prototype.$updateHighlightActiveLine=function(){var f=this.getSession(),S;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(S=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(S=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(S=!1)),f.$highlightLineMarker&&!S)f.removeMarker(f.$highlightLineMarker.id),f.$highlightLineMarker=null;else if(!f.$highlightLineMarker&&S){var L=new l(S.row,S.column,S.row,1/0);L.id=f.addMarker(L,"ace_active-line","screenLine"),f.$highlightLineMarker=L}else S&&(f.$highlightLineMarker.start.row=S.row,f.$highlightLineMarker.end.row=S.row,f.$highlightLineMarker.start.column=S.column,f._signal("changeBackMarker"))},m.prototype.onSelectionChange=function(f){var S=this.session;if(S.$selectionMarker&&S.removeMarker(S.$selectionMarker),S.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var L=this.selection.getRange(),T=this.getSelectionStyle();S.$selectionMarker=S.addMarker(L,"ace_selection",T)}var I=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(I),this._signal("changeSelection")},m.prototype.$getSelectionHighLightRegexp=function(){var f=this.session,S=this.getSelectionRange();if(!(S.isEmpty()||S.isMultiLine())){var L=S.start.column,T=S.end.column,I=f.getLine(S.start.row),D=I.substring(L,T);if(!(D.length>5e3||!/[\w\d]/.test(D))){var O=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:D}),N=I.substring(L-1,T+1);if(O.test(N))return O}}},m.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},m.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},m.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},m.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},m.prototype.onChangeMode=function(f){this.renderer.updateText(),this._emit("changeMode",f)},m.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},m.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},m.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},m.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},m.prototype.getCopyText=function(){var f=this.getSelectedText(),S=this.session.doc.getNewLineCharacter(),L=!1;if(!f&&this.$copyWithEmptySelection){L=!0;for(var T=this.selection.getAllRanges(),I=0;IW.search(/\S|$/)){var N=W.substr(I.column).search(/\S|$/);L.doc.removeInLine(I.row,I.column,I.column+N)}}this.clearSelection();var F=I.column,B=L.getState(I.row),W=L.getLine(I.row),H=T.checkOutdent(B,W,f);if(L.insert(I,f),D&&D.selection&&(D.selection.length==2?this.selection.setSelectionRange(new l(I.row,F+D.selection[0],I.row,F+D.selection[1])):this.selection.setSelectionRange(new l(I.row+D.selection[0],D.selection[1],I.row+D.selection[2],D.selection[3]))),this.$enableAutoIndent){if(L.getDocument().isNewLine(f)){var z=T.getNextLineIndent(B,W.slice(0,I.column),L.getTabString());L.insert({row:I.row+1,column:0},z)}H&&T.autoOutdent(B,L,I.row)}},m.prototype.autoIndent=function(){for(var f=this.session,S=f.getMode(),L=this.selection.isEmpty()?[new l(0,0,f.doc.getLength()-1,0)]:this.selection.getAllRanges(),T="",I="",D="",O=f.getTabString(),N=0;N0&&(T=f.getState(W-1),I=f.getLine(W-1),D=S.getNextLineIndent(T,I,O));var H=f.getLine(W),z=S.$getIndent(H);if(D!==z){if(z.length>0){var U=new l(W,0,W,z.length);f.remove(U)}D.length>0&&f.insert({row:W,column:0},D)}S.autoOutdent(T,f,W)}},m.prototype.onTextInput=function(f,S){if(!S)return this.keyBinding.onTextInput(f);this.startOperation({command:{name:"insertstring"}});var L=this.applyComposition.bind(this,f,S);this.selection.rangeCount?this.forEachSelection(L):L(),this.endOperation()},m.prototype.applyComposition=function(f,S){if(S.extendLeft||S.extendRight){var L=this.selection.getRange();L.start.column-=S.extendLeft,L.end.column+=S.extendRight,L.start.column<0&&(L.start.row--,L.start.column+=this.session.getLine(L.start.row).length+1),this.selection.setRange(L),!f&&!L.isEmpty()&&this.remove()}if((f||!this.selection.isEmpty())&&this.insert(f,!0),S.restoreStart||S.restoreEnd){var L=this.selection.getRange();L.start.column-=S.restoreStart,L.end.column-=S.restoreEnd,this.selection.setRange(L)}},m.prototype.onCommandKey=function(f,S,L){return this.keyBinding.onCommandKey(f,S,L)},m.prototype.setOverwrite=function(f){this.session.setOverwrite(f)},m.prototype.getOverwrite=function(){return this.session.getOverwrite()},m.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},m.prototype.setScrollSpeed=function(f){this.setOption("scrollSpeed",f)},m.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},m.prototype.setDragDelay=function(f){this.setOption("dragDelay",f)},m.prototype.getDragDelay=function(){return this.getOption("dragDelay")},m.prototype.setSelectionStyle=function(f){this.setOption("selectionStyle",f)},m.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},m.prototype.setHighlightActiveLine=function(f){this.setOption("highlightActiveLine",f)},m.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},m.prototype.setHighlightGutterLine=function(f){this.setOption("highlightGutterLine",f)},m.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},m.prototype.setHighlightSelectedWord=function(f){this.setOption("highlightSelectedWord",f)},m.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},m.prototype.setAnimatedScroll=function(f){this.renderer.setAnimatedScroll(f)},m.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},m.prototype.setShowInvisibles=function(f){this.renderer.setShowInvisibles(f)},m.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},m.prototype.setDisplayIndentGuides=function(f){this.renderer.setDisplayIndentGuides(f)},m.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},m.prototype.setHighlightIndentGuides=function(f){this.renderer.setHighlightIndentGuides(f)},m.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},m.prototype.setShowPrintMargin=function(f){this.renderer.setShowPrintMargin(f)},m.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},m.prototype.setPrintMarginColumn=function(f){this.renderer.setPrintMarginColumn(f)},m.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},m.prototype.setReadOnly=function(f){this.setOption("readOnly",f)},m.prototype.getReadOnly=function(){return this.getOption("readOnly")},m.prototype.setBehavioursEnabled=function(f){this.setOption("behavioursEnabled",f)},m.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},m.prototype.setWrapBehavioursEnabled=function(f){this.setOption("wrapBehavioursEnabled",f)},m.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},m.prototype.setShowFoldWidgets=function(f){this.setOption("showFoldWidgets",f)},m.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},m.prototype.setFadeFoldWidgets=function(f){this.setOption("fadeFoldWidgets",f)},m.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},m.prototype.remove=function(f){this.selection.isEmpty()&&(f=="left"?this.selection.selectLeft():this.selection.selectRight());var S=this.getSelectionRange();if(this.getBehavioursEnabled()){var L=this.session,T=L.getState(S.start.row),I=L.getMode().transformAction(T,"deletion",this,L,S);if(S.end.column===0){var D=L.getTextRange(S);if(D[D.length-1]==` `){var O=L.getLine(S.end.row);/^\s+$/.test(O)&&(S.end.column=O.length)}}I&&(S=I)}this.session.remove(S),this.clearSelection()},m.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},m.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},m.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},m.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var f=this.getSelectionRange();f.start.column==f.end.column&&f.start.row==f.end.row&&(f.end.column=0,f.end.row++),this.session.remove(f),this.clearSelection()},m.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var f=this.getCursorPosition();this.insert(` `),this.moveCursorToPosition(f)},m.prototype.setGhostText=function(f,S){this.renderer.setGhostText(f,S)},m.prototype.removeGhostText=function(){this.renderer.removeGhostText()},m.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var f=this.getCursorPosition(),S=f.column;if(S!==0){var L=this.session.getLine(f.row),T,I;SN.toLowerCase()?1:0});for(var I=new l(0,0,0,0),T=f.first;T<=f.last;T++){var D=S.getLine(T);I.start.row=T,I.end.row=T,I.end.column=D.length,S.replace(I,L[T-f.first])}},m.prototype.toggleCommentLines=function(){var f=this.session.getState(this.getCursorPosition().row),S=this.$getSelectedRows();this.session.getMode().toggleCommentLines(f,this.session,S.first,S.last)},m.prototype.toggleBlockComment=function(){var f=this.getCursorPosition(),S=this.session.getState(f.row),L=this.getSelectionRange();this.session.getMode().toggleBlockComment(S,this.session,L,f)},m.prototype.getNumberAt=function(f,S){var L=/[\-]?[0-9]+(?:\.[0-9]+)?/g;L.lastIndex=0;for(var T=this.session.getLine(f);L.lastIndex=S){var D={value:I[0],start:I.index,end:I.index+I[0].length};return D}}return null},m.prototype.modifyNumber=function(f){var S=this.selection.getCursor().row,L=this.selection.getCursor().column,T=new l(S,L-1,S,L),I=this.session.getTextRange(T);if(!isNaN(parseFloat(I))&&isFinite(I)){var D=this.getNumberAt(S,L);if(D){var O=D.value.indexOf(".")>=0?D.start+D.value.indexOf(".")+1:D.end,N=D.start+D.value.length-O,F=parseFloat(D.value);F*=Math.pow(10,N),O!==D.end&&L=O&&D<=N&&(L=V,F.selection.clearSelection(),F.moveCursorTo(f,O+T),F.selection.selectTo(f,N+T)),O=N});for(var B=this.$toggleWordPairs,W,H=0;H=N&&O<=F&&z.match(/((?:https?|ftp):\/\/[\S]+)/)){B=z.replace(/[\s:.,'";}\]]+$/,"");break}N=F}}catch(U){L={error:U}}finally{try{H&&!H.done&&(T=W.return)&&T.call(W)}finally{if(L)throw L.error}}return B},m.prototype.openLink=function(){var f=this.selection.getCursor(),S=this.findLinkAt(f.row,f.column);return S&&window.open(S,"_blank"),S!=null},m.prototype.removeLines=function(){var f=this.$getSelectedRows();this.session.removeFullLines(f.first,f.last),this.clearSelection()},m.prototype.duplicateSelection=function(){var f=this.selection,S=this.session,L=f.getRange(),T=f.isBackwards();if(L.isEmpty()){var I=L.start.row;S.duplicateLines(I,I)}else{var D=T?L.start:L.end,O=S.insert(D,S.getTextRange(L));L.start=D,L.end=O,f.setSelectionRange(L,T)}},m.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},m.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},m.prototype.moveText=function(f,S,L){return this.session.moveText(f,S,L)},m.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},m.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},m.prototype.$moveLines=function(f,S){var L,T,I=this.selection;if(!I.inMultiSelectMode||this.inVirtualSelectionMode){var D=I.toOrientedRange();L=this.$getSelectedRows(D),T=this.session.$moveLines(L.first,L.last,S?0:f),S&&f==-1&&(T=0),D.moveBy(T,0),I.fromOrientedRange(D)}else{var O=I.rangeList.ranges;I.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var N=0,F=0,B=O.length,W=0;WU+1)break;U=j.last}for(W--,N=this.session.$moveLines(z,U,S?0:f),S&&f==-1&&(H=W+1);H<=W;)O[H].moveBy(N,0),H++;S||(N=0),F+=N}I.fromOrientedRange(I.ranges[0]),I.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},m.prototype.$getSelectedRows=function(f){return f=(f||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(f.start.row),last:this.session.getRowFoldEnd(f.end.row)}},m.prototype.onCompositionStart=function(f){this.renderer.showComposition(f)},m.prototype.onCompositionUpdate=function(f){this.renderer.setCompositionText(f)},m.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},m.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},m.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},m.prototype.isRowVisible=function(f){return f>=this.getFirstVisibleRow()&&f<=this.getLastVisibleRow()},m.prototype.isRowFullyVisible=function(f){return f>=this.renderer.getFirstFullyVisibleRow()&&f<=this.renderer.getLastFullyVisibleRow()},m.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},m.prototype.$moveByPage=function(f,S){var L=this.renderer,T=this.renderer.layerConfig,I=f*Math.floor(T.height/T.lineHeight);S===!0?this.selection.$moveSelection(function(){this.moveCursorBy(I,0)}):S===!1&&(this.selection.moveCursorBy(I,0),this.selection.clearSelection());var D=L.scrollTop;L.scrollBy(0,I*T.lineHeight),S!=null&&L.scrollCursorIntoView(null,.5),L.animateScrolling(D)},m.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},m.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},m.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},m.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},m.prototype.scrollPageDown=function(){this.$moveByPage(1)},m.prototype.scrollPageUp=function(){this.$moveByPage(-1)},m.prototype.scrollToRow=function(f){this.renderer.scrollToRow(f)},m.prototype.scrollToLine=function(f,S,L,T){this.renderer.scrollToLine(f,S,L,T)},m.prototype.centerSelection=function(){var f=this.getSelectionRange(),S={row:Math.floor(f.start.row+(f.end.row-f.start.row)/2),column:Math.floor(f.start.column+(f.end.column-f.start.column)/2)};this.renderer.alignCursor(S,.5)},m.prototype.getCursorPosition=function(){return this.selection.getCursor()},m.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},m.prototype.getSelectionRange=function(){return this.selection.getRange()},m.prototype.selectAll=function(){this.selection.selectAll()},m.prototype.clearSelection=function(){this.selection.clearSelection()},m.prototype.moveCursorTo=function(f,S){this.selection.moveCursorTo(f,S)},m.prototype.moveCursorToPosition=function(f){this.selection.moveCursorToPosition(f)},m.prototype.jumpToMatching=function(f,S){var L=this.getCursorPosition(),T=new w(this.session,L.row,L.column),I=T.getCurrentToken(),D=0;I&&I.type.indexOf("tag-name")!==-1&&(I=T.stepBackward());var O=I||T.stepForward();if(O){var N,F=!1,B={},W=L.column-O.start,H,z={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(O.value.match(/[{}()\[\]]/g)){for(;W1?B[O.value]++:I.value==="=0;--D)this.$tryReplace(L[D],f)&&T++;return this.selection.setSelectionRange(I),T},m.prototype.$tryReplace=function(f,S){var L=this.session.getTextRange(f);return S=this.$search.replace(L,S),S!==null?(f.end=this.session.replace(f,S),f):null},m.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},m.prototype.find=function(f,S,L){S||(S={}),typeof f=="string"||f instanceof RegExp?S.needle=f:typeof f=="object"&&b.mixin(S,f);var T=this.selection.getRange();S.needle==null&&(f=this.session.getTextRange(T)||this.$search.$options.needle,f||(T=this.session.getWordRange(T.start.row,T.start.column),f=this.session.getTextRange(T)),this.$search.set({needle:f})),this.$search.set(S),S.start||this.$search.set({start:T});var I=this.$search.find(this.session);if(S.preventScroll)return I;if(I)return this.revealRange(I,L),I;S.backwards?T.start=T.end:T.end=T.start,this.selection.setRange(T)},m.prototype.findNext=function(f,S){this.find({skipCurrent:!0,backwards:!1},f,S)},m.prototype.findPrevious=function(f,S){this.find(f,{skipCurrent:!0,backwards:!0},S)},m.prototype.revealRange=function(f,S){this.session.unfold(f),this.selection.setSelectionRange(f);var L=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(f.start,f.end,.5),S!==!1&&this.renderer.animateScrolling(L)},m.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},m.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},m.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(f){f.destroy()}),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},m.prototype.setAutoScrollEditorIntoView=function(f){if(f){var S,L=this,T=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var I=this.$scrollAnchor;I.style.cssText="position:absolute",this.container.insertBefore(I,this.container.firstChild);var D=this.on("changeSelection",function(){T=!0}),O=this.renderer.on("beforeRender",function(){T&&(S=L.renderer.container.getBoundingClientRect())}),N=this.renderer.on("afterRender",function(){if(T&&S&&(L.isFocused()||L.searchBox&&L.searchBox.isFocused())){var F=L.renderer,B=F.$cursorLayer.$pixelPos,W=F.layerConfig,H=B.top-W.offset;B.top>=0&&H+S.top<0?T=!0:B.topwindow.innerHeight?T=!1:T=null,T!=null&&(I.style.top=H+"px",I.style.left=B.left+"px",I.style.height=W.lineHeight+"px",I.scrollIntoView(T)),T=S=null}});this.setAutoScrollEditorIntoView=function(F){F||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",D),this.renderer.off("afterRender",N),this.renderer.off("beforeRender",O))}}},m.prototype.$resetCursorStyle=function(){var f=this.$cursorStyle||"ace",S=this.renderer.$cursorLayer;S&&(S.setSmoothBlinking(/smooth/.test(f)),S.isBlinking=!this.$readOnly&&f!="wide",h.setCssClass(S.element,"ace_slim-cursors",/slim/.test(f)))},m.prototype.prompt=function(f,S,L){var T=this;p.loadModule("ace/ext/prompt",function(I){I.prompt(T,f,S,L)})},m})();C.$uid=0,C.prototype.curOp=null,C.prototype.prevOp={},C.prototype.$mergeableCommands=["backspace","del","insertstring"],C.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"],["&&","||"],["==","!="]],b.implement(C.prototype,c),p.defineOptions(C.prototype,"editor",{selectionStyle:{set:function(m){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:m})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(m){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(m){var f=this;if(this.textInput.setReadOnly(m),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(L){var T=!1;if(L&&L.type=="keydown"){if(L&&L.key&&!L.ctrlKey&&!L.metaKey&&(L.key==" "&&L.preventDefault(),T=L.key.length==1),!T)return}else L&&L.type!=="exec"&&(T=!0);if(T){f.hoverTooltip||(f.hoverTooltip=new _);var I=h.createElement("div");I.textContent=y("editor.tooltip.disable-editing","Editing is disabled"),f.hoverTooltip.isOpen||f.hoverTooltip.showForRange(f,f.getSelectionRange(),I)}else f.hoverTooltip&&f.hoverTooltip.isOpen&&f.hoverTooltip.hide()});var S=this.textInput.getElement();m?(E.addListener(S,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(E.removeListener(S,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback),this.hoverTooltip&&(this.hoverTooltip.destroy(),this.hoverTooltip=null))}},initialValue:!1},copyWithEmptySelection:{set:function(m){this.textInput.setCopyWithEmptySelection(m)},initialValue:!1},cursorStyle:{set:function(m){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(m){this.setAutoScrollEditorIntoView(m)}},keyboardHandler:{set:function(m){this.setKeyboardHandler(m)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(m){this.session.setValue(m)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(m){this.setSession(m)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(m){this.renderer.$gutterLayer.setShowLineNumbers(m),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),m&&this.$relativeLineNumbers?x.attach(this):x.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(m){this.$showLineNumbers&&m?x.attach(this):x.detach(this)}},placeholder:{set:function(m){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var f=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(f&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),h.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!f&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),h.addCssClass(this.container,"ace_hasPlaceholder");var S=h.createElement("div");S.className="ace_placeholder",S.textContent=this.$placeholder||"",this.renderer.placeholderNode=S,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!f&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(m){var f={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},S=function(T){if(T.target==this.renderer.scroller&&T.keyCode===M.enter){T.preventDefault();var I=this.getCursorPosition().row;this.isRowVisible(I)||this.scrollToLine(I,!0,!0),this.focus()}},L;m?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(a.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",y("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",y("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",S.bind(this)),this.commands.addCommand(f),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",y("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",y("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),L||(L=new k(this)),L.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",S.bind(this)),this.commands.removeCommand(f),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),L&&L.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(m){this.$textInputAriaLabel=m},initialValue:""},enableMobileMenu:{set:function(m){this.$enableMobileMenu=m},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var x={getText:function(m,f){return(Math.abs(m.selection.lead.row-f)||f+1+(f<9?"\xB7":""))+""},getWidth:function(m,f,S){return Math.max(f.toString().length,(S.lastRow+1).toString().length,2)*S.characterWidth},update:function(m,f){f.renderer.$loop.schedule(f.renderer.CHANGE_GUTTER)},attach:function(m){m.renderer.$gutterLayer.$renderer=this,m.on("changeSelection",this.update),this.update(null,m)},detach:function(m){m.renderer.$gutterLayer.$renderer==this&&(m.renderer.$gutterLayer.$renderer=null),m.off("changeSelection",this.update),this.update(null,m)}};v.Editor=C});ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(d,v,R){"use strict";var $=d("../lib/dom"),b=(function(){function h(s,a){this.element=s,this.canvasHeight=a||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return h.prototype.moveContainer=function(s){$.translate(this.element,0,-(s.firstRowScreen*s.lineHeight%this.canvasHeight)-s.offset*this.$offsetCoefficient)},h.prototype.pageChanged=function(s,a){return Math.floor(s.firstRowScreen*s.lineHeight/this.canvasHeight)!==Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)},h.prototype.computeLineTop=function(s,a,o){var i=a.firstRowScreen*a.lineHeight,n=Math.floor(i/this.canvasHeight),t=o.documentToScreenRow(s,0)*a.lineHeight;return t-n*this.canvasHeight},h.prototype.computeLineHeight=function(s,a,o){return a.lineHeight*o.getRowLineCount(s)},h.prototype.getLength=function(){return this.cells.length},h.prototype.get=function(s){return this.cells[s]},h.prototype.shift=function(){this.$cacheCell(this.cells.shift())},h.prototype.pop=function(){this.$cacheCell(this.cells.pop())},h.prototype.push=function(s){if(Array.isArray(s)){this.cells.push.apply(this.cells,s);for(var a=$.createFragment(this.element),o=0;og&&(k=u.end.row+1,u=r.getNextFoldLine(k,u),g=u?u.start.row:1/0),k>c){for(;this.$lines.getLength()>w+1;)this.$lines.pop();break}p=this.$lines.get(++w),p?p.row=k:(p=this.$lines.createCell(k,e,this.session,n),this.$lines.push(p)),this.$renderCell(p,e,u,k),k++}this._signal("afterRender"),this.$updateGutterWidth(e),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},t.prototype.$updateGutterWidth=function(e){var r=this.session,l=r.gutterRenderer||this.$renderer,c=r.$firstLineNumber,u=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||r.$useWrapMode)&&(u=r.getLength()+c-1);var g=l?l.getWidth(r,u,e):u.toString().length*e.characterWidth,p=this.$padding||this.$computePadding();g+=p.left+p.right,g!==this.gutterWidth&&!isNaN(g)&&(this.gutterWidth=g,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",g))},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.$showCursorMarker&&this.$updateCursorMarker(),!!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 r=this.$lines.cells;this.$cursorCell=null;for(var l=0;l=this.$cursorRow){if(c.row>this.$cursorRow){var u=this.session.getFoldLine(this.$cursorRow);if(l>0&&u&&u.start.row==r[l-1].row)c=r[l-1];else break}c.element.className="ace_gutter-active-line "+c.element.className,this.$cursorCell=c;break}}}}},t.prototype.$updateCursorMarker=function(){if(this.session){var e=this.session;this.$highlightElement||(this.$highlightElement=$.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var r=e.selection.cursor,l=this.config,c=this.$lines,u=l.firstRowScreen*l.lineHeight,g=Math.floor(u/c.canvasHeight),p=e.documentToScreenRow(r)*l.lineHeight,w=p-g*c.canvasHeight;$.setStyle(this.$highlightElement.style,"height",l.lineHeight+"px"),$.setStyle(this.$highlightElement.style,"top",w+"px")}},t.prototype.scrollLines=function(e){var r=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(r,e))return this.update(e);this.$lines.moveContainer(e);var l=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),c=this.oldLastRow;if(this.oldLastRow=l,!r||c0;u--)this.$lines.shift();if(c>l)for(var u=this.session.getFoldedRowCount(l+1,c);u>0;u--)this.$lines.pop();e.firstRowc&&this.$lines.push(this.$renderLines(e,c+1,l)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},t.prototype.$renderLines=function(e,r,l){for(var c=[],u=r,g=this.session.getNextFoldLine(u),p=g?g.start.row:1/0;u>p&&(u=g.end.row+1,g=this.session.getNextFoldLine(u,g),p=g?g.start.row:1/0),!(u>l);){var w=this.$lines.createCell(u,e,this.session,n);this.$renderCell(w,e,g,u),c.push(w),u++}return c},t.prototype.$renderCell=function(e,r,l,c){var u=e.element,g=this.session,p=u.childNodes[0],w=u.childNodes[1],k=u.childNodes[2],y=u.childNodes[3],A=k.firstChild,M=g.$firstLineNumber,E=g.$breakpoints,_=g.$decorations,C=g.gutterRenderer||this.$renderer,x=this.$showFoldWidgets&&g.foldWidgets,m=l?l.start.row:Number.MAX_VALUE,f=r.lineHeight+"px",S=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",L=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",T=(C?C.getText(g,c):c+M).toString();if(this.$highlightGutterLine&&(c==this.$cursorRow||l&&c=m&&this.$cursorRow<=l.end.row)&&(S+="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)),E[c]&&(S+=E[c]),_[c]&&(S+=_[c]),this.$annotations[c]&&c!==m&&(S+=this.$annotations[c].className),x){var I=x[c];I==null&&(I=x[c]=g.getFoldWidget(c))}if(I){var D="ace_fold-widget ace_"+I,O=I=="start"&&c==m&&cr[c].row)){for(;l<=c;){var u=Math.floor((l+c)/2),g=r[u];if(g.row>e)c=u-1;else if(g.rowl.right-r.right)return"foldWidgets"},t})();i.prototype.$fixedWidth=!1,i.prototype.$highlightGutterLine=!0,i.prototype.$renderer=void 0,i.prototype.$showLineNumbers=!0,i.prototype.$showFoldWidgets=!0,b.implement(i.prototype,s);function n(t){var e=document.createTextNode("");t.appendChild(e);var r=$.createElement("span");t.appendChild(r);var l=$.createElement("span");t.appendChild(l);var c=$.createElement("span");return l.appendChild(c),t}v.Gutter=i});ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(d,v,R){"use strict";var $=d("../range").Range,b=d("../lib/dom"),h=(function(){function a(o){this.element=b.createElement("div"),this.element.className="ace_layer ace_marker-layer",o.appendChild(this.element)}return a.prototype.setPadding=function(o){this.$padding=o},a.prototype.setSession=function(o){this.session=o},a.prototype.setMarkers=function(o){this.markers=o},a.prototype.elt=function(o,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=o},a.prototype.update=function(o){if(o){this.config=o,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,o);continue}var e=t.range.clipRows(o.firstRow,o.lastRow);if(!e.isEmpty())if(e=e.toScreenRange(this.session),t.renderer){var r=this.$getTop(e.start.row,o),l=this.$padding+e.start.column*o.characterWidth;t.renderer(i,e,l,r,o)}else t.type=="fullLine"?this.drawFullLineMarker(i,e,t.clazz,o):t.type=="screenLine"?this.drawScreenLineMarker(i,e,t.clazz,o):e.isMultiLine()?t.type=="text"?this.drawTextMarker(i,e,t.clazz,o):this.drawMultiLineMarker(i,e,t.clazz,o):this.drawSingleLineMarker(i,e,t.clazz+" ace_start ace_br15",o)}if(this.i!=-1)for(;this.iw,u==c),t,u==c?0:1,e)},a.prototype.drawMultiLineMarker=function(o,i,n,t,e){var r=this.$padding,l=t.lineHeight,c=this.$getTop(i.start.row,t),u=r+i.start.column*t.characterWidth;if(e=e||"",this.session.$bidiHandler.isBidiRow(i.start.row)){var g=i.clone();g.end.row=g.start.row,g.end.column=this.session.getLine(g.start.row).length,this.drawBidiSingleLineMarker(o,g,n+" ace_br1 ace_start",t,null,e)}else this.elt(n+" ace_br1 ace_start","height:"+l+"px;right:"+r+"px;top:"+c+"px;left:"+u+"px;"+(e||""));if(this.session.$bidiHandler.isBidiRow(i.end.row)){var g=i.clone();g.start.row=g.end.row,g.start.column=0,this.drawBidiSingleLineMarker(o,g,n+" ace_br12",t,null,e)}else{c=this.$getTop(i.end.row,t);var p=i.end.column*t.characterWidth;this.elt(n+" ace_br12","height:"+l+"px;width:"+p+"px;top:"+c+"px;left:"+r+"px;"+(e||""))}if(l=(i.end.row-i.start.row-1)*t.lineHeight,!(l<=0)){c=this.$getTop(i.start.row+1,t);var w=(i.start.column?1:0)|(i.end.column?0:8);this.elt(n+(w?" ace_br"+w:""),"height:"+l+"px;right:"+r+"px;top:"+c+"px;left:"+r+"px;"+(e||""))}},a.prototype.drawSingleLineMarker=function(o,i,n,t,e,r){if(this.session.$bidiHandler.isBidiRow(i.start.row))return this.drawBidiSingleLineMarker(o,i,n,t,e,r);var l=t.lineHeight,c=(i.end.column+(e||0)-i.start.column)*t.characterWidth,u=this.$getTop(i.start.row,t),g=this.$padding+i.start.column*t.characterWidth;this.elt(n,"height:"+l+"px;width:"+c+"px;top:"+u+"px;left:"+g+"px;"+(r||""))},a.prototype.drawBidiSingleLineMarker=function(o,i,n,t,e,r){var l=t.lineHeight,c=this.$getTop(i.start.row,t),u=this.$padding,g=this.session.$bidiHandler.getSelections(i.start.column,i.end.column);g.forEach(function(p){this.elt(n,"height:"+l+"px;width:"+(p.width+(e||0))+"px;top:"+c+"px;left:"+(u+p.left)+"px;"+(r||""))},this)},a.prototype.drawFullLineMarker=function(o,i,n,t,e){var r=this.$getTop(i.start.row,t),l=t.lineHeight;i.start.row!=i.end.row&&(l+=this.$getTop(i.end.row,t)-r),this.elt(n,"height:"+l+"px;top:"+r+"px;left:0;right:0;"+(e||""))},a.prototype.drawScreenLineMarker=function(o,i,n,t,e){var r=this.$getTop(i.start.row,t),l=t.lineHeight;this.elt(n,"height:"+l+"px;top:"+r+"px;left:0;right:0;"+(e||""))},a})();h.prototype.$padding=0;function s(a,o,i,n){return(a?1:0)|(o?2:0)|(i?4:0)|(n?8:0)}v.Marker=h});ace.define("ace/layer/text_util",["require","exports","module"],function(d,v,R){var $=new Set(["text","rparen","lparen"]);v.isTextToken=function(b){return $.has(b)}});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(d,v,R){"use strict";var $=d("../lib/oop"),b=d("../lib/dom"),h=d("../lib/lang"),s=d("./lines").Lines,a=d("../lib/event_emitter").EventEmitter,o=d("../config").nls,i=d("./text_util").isTextToken,n=(function(){function t(e){this.dom=b,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 s(this.element)}return t.prototype.$updateEolChar=function(){var e=this.session.doc,r=e.getNewLineCharacter()==` `&&e.getNewLineMode()!="windows",l=r?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=l)return this.EOL_CHAR=l,!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(r){this._signal("changeCharacterSize",r)}.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 r=this.$tabStrings=[0],l=1;lA&&(k=y.end.row+1,y=this.session.getNextFoldLine(k,y),A=y?y.start.row:1/0),!(k>u);){var M=g[p++];if(M){this.dom.removeChildren(M),this.$renderLine(M,k,k==A?y:!1),w&&(M.style.top=this.$lines.computeLineTop(k,e,this.session)+"px");var E=e.lineHeight*this.session.getRowLength(k)+"px";M.style.height!=E&&(w=!0,M.style.height=E)}k++}if(w)for(;p0;u--)this.$lines.shift();if(r.lastRow>e.lastRow)for(var u=this.session.getFoldedRowCount(e.lastRow+1,r.lastRow);u>0;u--)this.$lines.pop();e.firstRowr.lastRow&&this.$lines.push(this.$renderLinesFragment(e,r.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},t.prototype.$renderLinesFragment=function(e,r,l){for(var c=[],u=r,g=this.session.getNextFoldLine(u),p=g?g.start.row:1/0;u>p&&(u=g.end.row+1,g=this.session.getNextFoldLine(u,g),p=g?g.start.row:1/0),!(u>l);){var w=this.$lines.createCell(u,e,this.session),k=w.element;this.dom.removeChildren(k),b.setStyle(k.style,"height",this.$lines.computeLineHeight(u,e,this.session)+"px"),b.setStyle(k.style,"top",this.$lines.computeLineTop(u,e,this.session)+"px"),this.$renderLine(k,u,u==p?g:!1),this.$useLineGroups()?k.className="ace_line_group":k.className="ace_line",c.push(w),u++}return c},t.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var r=e.firstRow,l=e.lastRow,c=this.$lines;c.getLength();)c.pop();c.push(this.$renderLinesFragment(e,r,l))},t.prototype.$renderToken=function(e,r,l,c){for(var u=this,g=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,p=this.dom.createFragment(this.element),w,k=0;w=g.exec(c);){var y=w[1],A=w[2],M=w[3],E=w[4],_=w[5];if(!(!u.showSpaces&&A)){var C=k!=w.index?c.slice(k,w.index):"";if(k=w.index+w[0].length,C&&p.appendChild(this.dom.createTextNode(C,this.element)),y){var x=u.session.getScreenTabSize(r+w.index),m=u.$tabStrings[x].cloneNode(!0);m.charCount=1,p.appendChild(m),r+=x-1}else if(A)if(u.showSpaces){var f=this.dom.createElement("span");f.className="ace_invisible ace_invisible_space",f.textContent=h.stringRepeat(u.SPACE_CHAR,A.length),p.appendChild(f)}else p.appendChild(this.dom.createTextNode(A,this.element));else if(M){var f=this.dom.createElement("span");f.className="ace_invisible ace_invisible_space ace_invalid",f.textContent=h.stringRepeat(u.SPACE_CHAR,M.length),p.appendChild(f)}else if(E){r+=1;var f=this.dom.createElement("span");f.style.width=u.config.characterWidth*2+"px",f.className=u.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",f.textContent=u.showSpaces?u.SPACE_CHAR:E,p.appendChild(f)}else if(_){r+=1;var f=this.dom.createElement("span");f.style.width=u.config.characterWidth*2+"px",f.className="ace_cjk",f.textContent=_,p.appendChild(f)}}}if(p.appendChild(this.dom.createTextNode(k?c.slice(k):c,this.element)),i(l.type))e.appendChild(p);else{var S="ace_"+l.type.replace(/\./g," ace_"),f=this.dom.createElement("span");l.type=="fold"&&(f.style.width=l.value.length*this.config.characterWidth+"px",f.setAttribute("title",o("inline-fold.closed.title","Unfold code"))),f.className=S,f.appendChild(p),e.appendChild(f)}return r+c.length},t.prototype.renderIndentGuide=function(e,r,l){var c=r.search(this.$indentGuideRe);if(c<=0||c>=l)return r;if(r[0]==" "){c-=c%this.tabSize;for(var u=c/this.tabSize,g=0;gg[p].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&e[r.row]!==""&&r.column===e[r.row].length){this.$highlightIndentGuideMarker.dir=1;for(var p=r.row+1;p0)c=e.element.childNodes[0];else return;var u=c.childNodes;if(u){var g=u[r-1];g&&g.classList&&g.classList.contains("ace_indent-guide")&&g.classList.add("ace_indent-guide-active")}}},t.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var r=this.$highlightIndentGuideMarker.indentLevel;if(r!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var l=0;l=this.$highlightIndentGuideMarker.start+1){if(c.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(c,r)}}else for(var l=e.length-1;l>=0;l--){var c=e[l];if(this.$highlightIndentGuideMarker.end&&c.row=g;){p=this.$renderToken(w,p,y,A.substring(0,g-c)),A=A.substring(g-c),c=g,w=this.$createLineElement(),e.appendChild(w);var M=this.dom.createTextNode(h.stringRepeat("\xA0",l.indent),this.element);M.charCount=0,w.appendChild(M),u++,p=0,g=l[u]||Number.MAX_VALUE}A.length!=0&&(c+=A.length,p=this.$renderToken(w,p,y,A))}}l[l.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(w,p,null,"",!0)},t.prototype.$renderSimpleLine=function(e,r){for(var l=0,c=0;cthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,l,u,g);l=this.$renderToken(e,l,u,g)}}},t.prototype.$renderOverflowMessage=function(e,r,l,c,u){l&&this.$renderToken(e,r,l,c.slice(0,this.MAX_LINE_LENGTH-r));var g=this.dom.createElement("span");g.className="ace_inline_button ace_keyword ace_toggle_wrap",g.textContent=u?"":"",e.appendChild(g)},t.prototype.$renderLine=function(e,r,l){if(!l&&l!=!1&&(l=this.session.getFoldLine(r)),l)var c=this.$getFoldLineTokens(r,l);else var c=this.session.getTokens(r);var u=e;if(c.length){var g=this.session.getRowSplitData(r);if(g&&g.length){this.$renderWrappedLine(e,c,g);var u=e.lastChild}else{var u=e;this.$useLineGroups()&&(u=this.$createLineElement(),e.appendChild(u)),this.$renderSimpleLine(u,c)}}else this.$useLineGroups()&&(u=this.$createLineElement(),e.appendChild(u));if(this.showEOL&&u){l&&(r=l.end.row);var p=this.dom.createElement("span");p.className="ace_invisible ace_invisible_eol",p.textContent=r==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,u.appendChild(p)}},t.prototype.$getFoldLineTokens=function(e,r){var l=this.session,c=[];function u(p,w,k){for(var y=0,A=0;A+p[y].value.lengthk-w&&(M=M.substring(0,k-w)),c.push({type:p[y].type,value:M}),A=w+M.length,y+=1}for(;Ak?c.push({type:p[y].type,value:M.substring(0,k-A)}):c.push(p[y]),A+=M.length,y+=1}}var g=l.getTokens(e);return r.walk(function(p,w,k,y,A){p!=null?c.push({type:"fold",value:p}):(A&&(g=l.getTokens(w)),g.length&&u(g,y,k))},r.end.row,this.session.getLine(r.end.row).length),c},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,$.implement(n.prototype,a),v.Text=n});ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(d,v,R){"use strict";var $=d("../lib/dom"),b=(function(){function h(s){this.element=$.createElement("div"),this.element.className="ace_layer ace_cursor-layer",s.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),$.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return h.prototype.$updateOpacity=function(s){for(var a=this.cursors,o=a.length;o--;)$.setStyle(a[o].style,"opacity",s?"":"0")},h.prototype.$startCssAnimation=function(){for(var s=this.cursors,a=s.length;a--;)s[a].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&$.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},h.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,$.removeCssClass(this.element,"ace_animate-blinking")},h.prototype.setPadding=function(s){this.$padding=s},h.prototype.setSession=function(s){this.session=s},h.prototype.setBlinking=function(s){s!=this.isBlinking&&(this.isBlinking=s,this.restartTimer())},h.prototype.setBlinkInterval=function(s){s!=this.blinkInterval&&(this.blinkInterval=s,this.restartTimer())},h.prototype.setSmoothBlinking=function(s){s!=this.smoothBlinking&&(this.smoothBlinking=s,$.setCssClass(this.element,"ace_smooth-blinking",s),this.$updateCursors(!0),this.restartTimer())},h.prototype.addCursor=function(){var s=$.createElement("div");return s.className="ace_cursor",this.element.appendChild(s),this.cursors.push(s),s},h.prototype.removeCursor=function(){if(this.cursors.length>1){var s=this.cursors.pop();return s.parentNode.removeChild(s),s}},h.prototype.hideCursor=function(){this.isVisible=!1,$.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},h.prototype.showCursor=function(){this.isVisible=!0,$.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},h.prototype.restartTimer=function(){var s=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,$.removeCssClass(this.element,"ace_smooth-blinking")),s(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&$.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),$.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var a=function(){this.timeoutId=setTimeout(function(){s(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){s(!0),a()},this.blinkInterval),a()}},h.prototype.getPixelPosition=function(s,a){if(!this.config||!this.session)return{left:0,top:0};s||(s=this.session.selection.getCursor());var o=this.session.documentToScreenPosition(s),i=this.$padding+(this.session.$bidiHandler.isBidiRow(o.row,s.row)?this.session.$bidiHandler.getPosLeft(o.column):o.column*this.config.characterWidth),n=(o.row-(a?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:i,top:n}},h.prototype.isCursorInView=function(s,a){return s.top>=0&&s.tops.height+s.offset||t.top<0)&&o>1)){var e=this.cursors[i++]||this.addCursor(),r=e.style;this.drawCursor?this.drawCursor(e,t,s,a[o],this.session):this.isCursorInView(t,s)?($.setStyle(r,"display","block"),$.translate(e,t.left,t.top),$.setStyle(r,"width",Math.round(s.characterWidth)+"px"),$.setStyle(r,"height",s.lineHeight+"px")):$.setStyle(r,"display","none")}}for(;this.cursors.length>i;)this.removeCursor();var l=this.session.getOverwrite();this.$setOverwrite(l),this.$pixelPos=t,this.restartTimer()},h.prototype.$setOverwrite=function(s){s!=this.overwrite&&(this.overwrite=s,s?$.addCssClass(this.element,"ace_overwrite-cursors"):$.removeCssClass(this.element,"ace_overwrite-cursors"))},h.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},h})();b.prototype.$padding=0,b.prototype.drawCursor=null,v.Cursor=b});ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(d,v,R){"use strict";var $=this&&this.__extends||(function(){var e=function(r,l){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var g in u)Object.prototype.hasOwnProperty.call(u,g)&&(c[g]=u[g])},e(r,l)};return function(r,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");e(r,l);function c(){this.constructor=r}r.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}})(),b=d("./lib/oop"),h=d("./lib/dom"),s=d("./lib/event"),a=d("./lib/event_emitter").EventEmitter,o=32768,i=(function(){function e(r,l){this.element=h.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+l,this.inner=h.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xA0",this.element.appendChild(this.inner),r.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addListener(this.element,"scroll",this.onScroll.bind(this)),s.addListener(this.element,"mousedown",s.preventDefault)}return e.prototype.setVisible=function(r){this.element.style.display=r?"":"none",this.isVisible=r,this.coeff=1},e})();b.implement(i.prototype,a);var n=(function(e){$(r,e);function r(l,c){var u=e.call(this,l,"-v")||this;return u.scrollTop=0,u.scrollHeight=0,c.$scrollbarWidth=u.width=h.scrollbarWidth(l.ownerDocument),u.inner.style.width=u.element.style.width=(u.width||15)+5+"px",u.$minWidth=0,u}return r.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var l=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-l)/(this.coeff-l)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},r.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},r.prototype.setHeight=function(l){this.element.style.height=l+"px"},r.prototype.setScrollHeight=function(l){this.scrollHeight=l,l>o?(this.coeff=o/l,l=o):this.coeff!=1&&(this.coeff=1),this.inner.style.height=l+"px"},r.prototype.setScrollTop=function(l){this.scrollTop!=l&&(this.skipEvent=!0,this.scrollTop=l,this.element.scrollTop=l*this.coeff)},r})(i);n.prototype.setInnerHeight=n.prototype.setScrollHeight;var t=(function(e){$(r,e);function r(l,c){var u=e.call(this,l,"-h")||this;return u.scrollLeft=0,u.height=c.$scrollbarWidth,u.inner.style.height=u.element.style.height=(u.height||15)+5+"px",u}return r.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},r.prototype.getHeight=function(){return this.isVisible?this.height:0},r.prototype.setWidth=function(l){this.element.style.width=l+"px"},r.prototype.setInnerWidth=function(l){this.inner.style.width=l+"px"},r.prototype.setScrollWidth=function(l){this.inner.style.width=l+"px"},r.prototype.setScrollLeft=function(l){this.scrollLeft!=l&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=l)},r})(i);v.ScrollBar=n,v.ScrollBarV=n,v.ScrollBarH=t,v.VScrollBar=n,v.HScrollBar=t});ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(d,v,R){"use strict";var $=this&&this.__extends||(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,c){l.__proto__=c}||function(l,c){for(var u in c)Object.prototype.hasOwnProperty.call(c,u)&&(l[u]=c[u])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function l(){this.constructor=e}e.prototype=r===null?Object.create(r):(l.prototype=r.prototype,new l)}})(),b=d("./lib/oop"),h=d("./lib/dom"),s=d("./lib/event"),a=d("./lib/event_emitter").EventEmitter;h.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 o=(function(){function t(e,r){this.element=h.createElement("div"),this.element.className="ace_sb"+r,this.inner=h.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,s.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})();b.implement(o.prototype,a);var i=(function(t){$(e,t);function e(r,l){var c=t.call(this,r,"-v")||this;return c.scrollTop=0,c.scrollHeight=0,c.parent=r,c.width=c.VScrollWidth,c.renderer=l,c.inner.style.width=c.element.style.width=(c.width||15)+"px",c.$minWidth=0,c}return e.prototype.onMouseDown=function(r,l){if(r==="mousedown"&&!(s.getButton(l)!==0||l.detail===2)){if(l.target===this.inner){var c=this,u=l.clientY,g=function(E){u=E.clientY},p=function(){clearInterval(A)},w=l.clientY,k=this.thumbTop,y=function(){if(u!==void 0){var E=c.scrollTopFromThumbTop(k+u-w);E!==c.scrollTop&&c._emit("scroll",{data:E})}};s.capture(this.inner,g,p);var A=setInterval(y,20);return s.preventDefault(l)}var M=l.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(M)}),s.preventDefault(l)}},e.prototype.getHeight=function(){return this.height},e.prototype.scrollTopFromThumbTop=function(r){var l=r*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return l=l>>0,l<0?l=0:l>this.pageHeight-this.viewHeight&&(l=this.pageHeight-this.viewHeight),l},e.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},e.prototype.setHeight=function(r){this.height=Math.max(0,r),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},e.prototype.setScrollHeight=function(r,l){this.pageHeight===r&&!l||(this.pageHeight=r,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(r){this.scrollTop=r,r<0&&(r=0),this.thumbTop=r*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},e})(o);i.prototype.setInnerHeight=i.prototype.setScrollHeight;var n=(function(t){$(e,t);function e(r,l){var c=t.call(this,r,"-h")||this;return c.scrollLeft=0,c.scrollWidth=0,c.height=c.HScrollHeight,c.inner.style.height=c.element.style.height=(c.height||12)+"px",c.renderer=l,c}return e.prototype.onMouseDown=function(r,l){if(r==="mousedown"&&!(s.getButton(l)!==0||l.detail===2)){if(l.target===this.inner){var c=this,u=l.clientX,g=function(E){u=E.clientX},p=function(){clearInterval(A)},w=l.clientX,k=this.thumbLeft,y=function(){if(u!==void 0){var E=c.scrollLeftFromThumbLeft(k+u-w);E!==c.scrollLeft&&c._emit("scroll",{data:E})}};s.capture(this.inner,g,p);var A=setInterval(y,20);return s.preventDefault(l)}var M=l.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(M)}),s.preventDefault(l)}},e.prototype.getHeight=function(){return this.isVisible?this.height:0},e.prototype.scrollLeftFromThumbLeft=function(r){var l=r*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return l=l>>0,l<0?l=0:l>this.pageWidth-this.viewWidth&&(l=this.pageWidth-this.viewWidth),l},e.prototype.setWidth=function(r){this.width=Math.max(0,r),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},e.prototype.setScrollWidth=function(r,l){this.pageWidth===r&&!l||(this.pageWidth=r,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(r){this.scrollLeft=r,r<0&&(r=0),this.thumbLeft=r*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},e})(o);n.prototype.setInnerWidth=n.prototype.setScrollWidth,v.ScrollBar=i,v.ScrollBarV=i,v.ScrollBarH=n,v.VScrollBar=i,v.HScrollBar=n});ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(d,v,R){"use strict";var $=d("./lib/event"),b=(function(){function h(s,a){this.onRender=s,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=a||window;var o=this;this._flush=function(i){o.pending=!1;var n=o.changes;if(n&&($.blockIdle(100),o.changes=0,o.onRender(n)),o.changes){if(o.$recursionLimit--<0)return;o.schedule()}else o.$recursionLimit=2}}return h.prototype.schedule=function(s){this.changes=this.changes|s,this.changes&&!this.pending&&($.nextFrame(this._flush),this.pending=!0)},h.prototype.clear=function(s){var a=this.changes;return this.changes=0,a},h})();v.RenderLoop=b});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(d,v,R){var $=d("../lib/oop"),b=d("../lib/dom"),h=d("../lib/lang"),s=d("../lib/event"),a=d("../lib/useragent"),o=d("../lib/event_emitter").EventEmitter,i=512,n=typeof ResizeObserver=="function",t=200,e=(function(){function r(l){this.el=b.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=b.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=b.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),l.appendChild(this.el),this.$measureNode.textContent=h.stringRepeat("X",i),this.$characterSize={width:0,height:0},n?this.$addObserver():this.checkForSizeChanges()}return r.prototype.$setMeasureNodeStyles=function(l,c){l.width=l.height="auto",l.left=l.top="0px",l.visibility="hidden",l.position="absolute",l.whiteSpace="pre",a.isIE<8?l["font-family"]="inherit":l.font="inherit",l.overflow=c?"hidden":"visible"},r.prototype.checkForSizeChanges=function(l){if(l===void 0&&(l=this.$measureSizes()),l&&(this.$characterSize.width!==l.width||this.$characterSize.height!==l.height)){this.$measureNode.style.fontWeight="bold";var c=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=l,this.charSizes=Object.create(null),this.allowBoldFonts=c&&c.width===l.width&&c.height===l.height,this._emit("changeCharacterSize",{data:l})}},r.prototype.$addObserver=function(){var l=this;this.$observer=new window.ResizeObserver(function(c){l.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},r.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var l=this;return this.$pollSizeChangesTimer=s.onIdle(function c(){l.checkForSizeChanges(),s.onIdle(c,500)},500)},r.prototype.setPolling=function(l){l?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},r.prototype.$measureSizes=function(l){var c={height:(l||this.$measureNode).clientHeight,width:(l||this.$measureNode).clientWidth/i};return c.width===0||c.height===0?null:c},r.prototype.$measureCharWidth=function(l){this.$main.textContent=h.stringRepeat(l,i);var c=this.$main.getBoundingClientRect();return c.width/i},r.prototype.getCharacterWidth=function(l){var c=this.charSizes[l];return c===void 0&&(c=this.charSizes[l]=this.$measureCharWidth(l)/this.$characterSize.width),c},r.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},r.prototype.$getZoom=function(l){return!l||!l.parentElement?1:(Number(window.getComputedStyle(l).zoom)||1)*this.$getZoom(l.parentElement)},r.prototype.$initTransformMeasureNodes=function(){var l=function(c,u){return["div",{style:"position: absolute;top:"+c+"px;left:"+u+"px;"}]};this.els=b.buildDom([l(0,0),l(t,0),l(0,t),l(t,t)],this.el)},r.prototype.transformCoordinates=function(l,c){if(l){var u=this.$getZoom(this.el);l=k(1/u,l)}function g(D,O,N){var F=D[1]*O[0]-D[0]*O[1];return[(-O[1]*N[0]+O[0]*N[1])/F,(+D[1]*N[0]-D[0]*N[1])/F]}function p(D,O){return[D[0]-O[0],D[1]-O[1]]}function w(D,O){return[D[0]+O[0],D[1]+O[1]]}function k(D,O){return[D*O[0],D*O[1]]}this.els||this.$initTransformMeasureNodes();function y(D){var O=D.getBoundingClientRect();return[O.left,O.top]}var A=y(this.els[0]),M=y(this.els[1]),E=y(this.els[2]),_=y(this.els[3]),C=g(p(_,M),p(_,E),p(w(M,E),w(_,A))),x=k(1+C[0],p(M,A)),m=k(1+C[1],p(E,A));if(c){var f=c,S=C[0]*f[0]/t+C[1]*f[1]/t+1,L=w(k(f[0],x),k(f[1],m));return w(k(1/S/t,L),A)}var T=p(l,A),I=g(p(x,k(C[0],T)),p(m,k(C[1],T)),T);return k(t,I)},r})();e.prototype.$characterSize={width:0,height:0},$.implement(e.prototype,o),v.FontMetrics=e});ace.define("ace/css/editor-css",["require","exports","module"],function(d,v,R){R.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); forced-color-adjust: none; } .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_invisible { font-variant-ligatures: none; } .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, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_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, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint { 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, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint { 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_security { -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+"); 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_hint { -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg=="); background-color: silver; } .ace_icon_svg.ace_error_fold { -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4="); background-color: crimson; } .ace_icon_svg.ace_security_fold { -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4="); 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; 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(33em, 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, .ace_custom-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; pointer-events: auto; } .ace_custom-widget { background: none; } .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 { position: relative; font-family: arial; transform: scale(0.9); transform-origin: left; white-space: pre; opacity: 0.7; margin: 0 10px; z-index: 1; } .ace_ghost_text { opacity: 0.5; font-style: italic; } .ace_ghost_text_container > div { white-space: pre; } .ghost_text_line_wrapped::after { content: "\u21A9"; position: absolute; } .ace_lineWidgetContainer.ace_ghost_text { margin: 0px 4px } .ace_screenreader-only { position:absolute; left:-10000px; top:auto; width:1px; height:1px; overflow:hidden; } .ace_hidden_token { display: none; }`});ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(d,v,R){"use strict";var $=d("../lib/dom"),b=d("../lib/oop"),h=d("../lib/event_emitter").EventEmitter,s=(function(){function a(o,i){this.renderer=i,this.pixelRatio=1,this.maxHeight=i.layerConfig.maxHeight,this.lineHeight=i.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,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)"},this.setScrollBarV(o)}return a.prototype.$createCanvas=function(){this.canvas=$.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},a.prototype.setScrollBarV=function(o){this.$createCanvas(),this.scrollbarV=o,o.element.appendChild(this.canvas),this.setDimensions()},a.prototype.$updateDecorators=function(o){if(typeof this.canvas.getContext!="function")return;var i=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(o);var n=this.canvas.getContext("2d");function t(x,m){return x.prioritym.priority?1:0}var e=this.renderer.session.$annotations;if(n.clearRect(0,0,this.canvas.width,this.canvas.height),e){var r={info:1,warning:2,error:3};e.forEach(function(x){x.priority=r[x.type]||null}),e=e.sort(t);for(var l=0;lthis.canvasHeight&&(k=this.canvasHeight-y);var A=k-y,M=k+y,E=M-A;n.fillStyle=i[e[l].type]||null,n.fillRect(0,A,Math.round(this.oneZoneWidth-1),E)}}var _=this.renderer.session.selection.getCursor();if(_){var C=Math.round(this.getVerticalOffsetForRow(_.row)*this.heightRatio);n.fillStyle="rgba(0, 0, 0, 0.5)",n.fillRect(0,C,this.canvasWidth,2)}},a.prototype.getVerticalOffsetForRow=function(o){o=o|0;var i=this.renderer.session.documentToScreenRow(o,0)*this.lineHeight;return i},a.prototype.setDimensions=function(o){o=o||this.renderer.layerConfig,this.maxHeight=o.maxHeight,this.lineHeight=o.lineHeight,this.canvasHeight=o.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeightE&&(this.$changedLines.firstRow=E),this.$changedLines.lastRow<_&&(this.$changedLines.lastRow=_)):this.$changedLines={firstRow:E,lastRow:_},this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},M.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},M.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},M.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},M.prototype.updateFull=function(E){E?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},M.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},M.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},M.prototype.onResize=function(E,_,C,x){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=E?1:0;var m=this.container;x||(x=m.clientHeight||m.scrollHeight),!x&&this.$maxLines&&this.lineHeight>1&&(!m.style.height||m.style.height=="0px")&&(m.style.height="1px",x=m.clientHeight||m.scrollHeight),C||(C=m.clientWidth||m.scrollWidth);var f=this.$updateCachedSize(E,_,C,x);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!C&&!x)return this.resizing=0;E&&(this.$gutterLayer.$padding=null),E?this.$renderChanges(f|this.$changes,!0):this.$loop.schedule(f|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},M.prototype.$updateCachedSize=function(E,_,C,x){x-=this.$extraHeight||0;var m=0,f=this.$size,S={width:f.width,height:f.height,scrollerHeight:f.scrollerHeight,scrollerWidth:f.scrollerWidth};if(x&&(E||f.height!=x)&&(f.height=x,m|=this.CHANGE_SIZE,f.scrollerHeight=f.height,this.$horizScroll&&(f.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(f.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",m=m|this.CHANGE_SCROLL),C&&(E||f.width!=C)){m|=this.CHANGE_SIZE,f.width=C,_==null&&(_=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=_,b.setStyle(this.scrollBarH.element.style,"left",_+"px"),b.setStyle(this.scroller.style,"left",_+this.margin.left+"px"),f.scrollerWidth=Math.max(0,C-_-this.scrollBarV.getWidth()-this.margin.h),b.setStyle(this.$gutter.style,"left",this.margin.left+"px");var L=this.scrollBarV.getWidth()+"px";b.setStyle(this.scrollBarH.element.style,"right",L),b.setStyle(this.scroller.style,"right",L),b.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(f.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||E)&&(m|=this.CHANGE_FULL)}return f.$dirty=!C||!x,m&&this._signal("resize",S),m},M.prototype.onGutterResize=function(E){var _=this.$showGutter?E:0;_!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,_,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()},M.prototype.adjustWrapLimit=function(){var E=this.$size.scrollerWidth-this.$padding*2,_=Math.floor(E/this.characterWidth);return this.session.adjustWrapLimit(_,this.$showPrintMargin&&this.$printMarginColumn)},M.prototype.setAnimatedScroll=function(E){this.setOption("animatedScroll",E)},M.prototype.getAnimatedScroll=function(){return this.$animatedScroll},M.prototype.setShowInvisibles=function(E){this.setOption("showInvisibles",E),this.session.$bidiHandler.setShowInvisibles(E)},M.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},M.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},M.prototype.setDisplayIndentGuides=function(E){this.setOption("displayIndentGuides",E)},M.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},M.prototype.setHighlightIndentGuides=function(E){this.setOption("highlightIndentGuides",E)},M.prototype.setShowPrintMargin=function(E){this.setOption("showPrintMargin",E)},M.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},M.prototype.setPrintMarginColumn=function(E){this.setOption("printMarginColumn",E)},M.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},M.prototype.getShowGutter=function(){return this.getOption("showGutter")},M.prototype.setShowGutter=function(E){return this.setOption("showGutter",E)},M.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},M.prototype.setFadeFoldWidgets=function(E){this.setOption("fadeFoldWidgets",E)},M.prototype.setHighlightGutterLine=function(E){this.setOption("highlightGutterLine",E)},M.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},M.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var E=b.createElement("div");E.className="ace_layer ace_print-margin-layer",this.$printMarginEl=b.createElement("div"),this.$printMarginEl.className="ace_print-margin",E.appendChild(this.$printMarginEl),this.content.insertBefore(E,this.content.firstChild)}var _=this.$printMarginEl.style;_.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",_.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},M.prototype.getContainerElement=function(){return this.container},M.prototype.getMouseEventTarget=function(){return this.scroller},M.prototype.getTextAreaContainer=function(){return this.container},M.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var E=this.textarea.style,_=this.$composition;if(!this.$keepTextAreaAtCursor&&!_){b.translate(this.textarea,-100,0);return}var C=this.$cursorLayer.$pixelPos;if(C){_&&_.markerRange&&(C=this.$cursorLayer.getPixelPosition(_.markerRange.start,!0));var x=this.layerConfig,m=C.top,f=C.left;m-=x.offset;var S=_&&_.useTextareaForIME||k.isMobile?this.lineHeight:1;if(m<0||m>x.height-S){b.translate(this.textarea,0,0);return}var L=1,T=this.$size.height-S;if(!_)m+=this.lineHeight;else if(_.useTextareaForIME){var I=this.textarea.value;L=this.characterWidth*this.session.$getStringScreenWidth(I)[0]}else m+=this.lineHeight+2;f-=this.scrollLeft,f>this.$size.scrollerWidth-L&&(f=this.$size.scrollerWidth-L),f+=this.gutterWidth+this.margin.left,b.setStyle(E,"height",S+"px"),b.setStyle(E,"width",L+"px"),b.translate(this.textarea,Math.min(f,this.$size.scrollerWidth-L),Math.min(m,T))}}},M.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},M.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},M.prototype.getLastFullyVisibleRow=function(){var E=this.layerConfig,_=E.lastRow,C=this.session.documentToScreenRow(_,0)*E.lineHeight;return C-this.session.getScrollTop()>E.height-E.lineHeight?_-1:_},M.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},M.prototype.setPadding=function(E){this.$padding=E,this.$textLayer.setPadding(E),this.$cursorLayer.setPadding(E),this.$markerFront.setPadding(E),this.$markerBack.setPadding(E),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},M.prototype.setScrollMargin=function(E,_,C,x){var m=this.scrollMargin;m.top=E|0,m.bottom=_|0,m.right=x|0,m.left=C|0,m.v=m.top+m.bottom,m.h=m.left+m.right,m.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-m.top),this.updateFull()},M.prototype.setMargin=function(E,_,C,x){var m=this.margin;m.top=E|0,m.bottom=_|0,m.right=x|0,m.left=C|0,m.v=m.top+m.bottom,m.h=m.left+m.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},M.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},M.prototype.setHScrollBarAlwaysVisible=function(E){this.setOption("hScrollBarAlwaysVisible",E)},M.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},M.prototype.setVScrollBarAlwaysVisible=function(E){this.setOption("vScrollBarAlwaysVisible",E)},M.prototype.$updateScrollBarV=function(){var E=this.layerConfig.maxHeight,_=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(E-=(_-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>E-_&&(E=this.scrollTop+_,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(E+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},M.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},M.prototype.freeze=function(){this.$frozen=!0},M.prototype.unfreeze=function(){this.$frozen=!1},M.prototype.$renderChanges=function(E,_){if(this.$changes&&(E|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!E&&!_){this.$changes|=E;return}if(this.$size.$dirty)return this.$changes|=E,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",E),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var C=this.layerConfig;if(E&this.CHANGE_FULL||E&this.CHANGE_SIZE||E&this.CHANGE_TEXT||E&this.CHANGE_LINES||E&this.CHANGE_SCROLL||E&this.CHANGE_H_SCROLL){if(E|=this.$computeLayerConfig()|this.$loop.clear(),C.firstRow!=this.layerConfig.firstRow&&C.firstRowScreen==this.layerConfig.firstRowScreen){var x=this.scrollTop+(C.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;x>0&&(this.scrollTop=x,E=E|this.CHANGE_SCROLL,E|=this.$computeLayerConfig()|this.$loop.clear())}C=this.layerConfig,this.$updateScrollBarV(),E&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),b.translate(this.content,-this.scrollLeft,-C.offset);var m=C.width+2*this.$padding+"px",f=C.minHeight+"px";b.setStyle(this.content.style,"width",m),b.setStyle(this.content.style,"height",f)}if(E&this.CHANGE_H_SCROLL&&(b.translate(this.content,-this.scrollLeft,-C.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),E&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(C),this.$showGutter&&this.$gutterLayer.update(C),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(C),this.$markerBack.update(C),this.$markerFront.update(C),this.$cursorLayer.update(C),this.$moveTextAreaToCursor(),this._signal("afterRender",E);return}if(E&this.CHANGE_SCROLL){this.$changedLines=null,E&this.CHANGE_TEXT||E&this.CHANGE_LINES?this.$textLayer.update(C):this.$textLayer.scrollLines(C),this.$showGutter&&(E&this.CHANGE_GUTTER||E&this.CHANGE_LINES?this.$gutterLayer.update(C):this.$gutterLayer.scrollLines(C)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(C),this.$markerBack.update(C),this.$markerFront.update(C),this.$cursorLayer.update(C),this.$moveTextAreaToCursor(),this._signal("afterRender",E);return}E&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(C),this.$showGutter&&this.$gutterLayer.update(C),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(C)):E&this.CHANGE_LINES?((this.$updateLines()||E&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(C),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(C)):E&this.CHANGE_TEXT||E&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(C),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(C)):E&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(C),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(C)),E&this.CHANGE_CURSOR&&(this.$cursorLayer.update(C),this.$moveTextAreaToCursor()),E&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(C),E&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(C),this._signal("afterRender",E)},M.prototype.$autosize=function(){var E=this.session.getScreenLength()*this.lineHeight,_=this.$maxLines*this.lineHeight,C=Math.min(_,Math.max((this.$minLines||1)*this.lineHeight,E))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(C+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&C>this.$maxPixelHeight&&(C=this.$maxPixelHeight);var x=C<=2*this.lineHeight,m=!x&&E>_;if(C!=this.desiredHeight||this.$size.height!=this.desiredHeight||m!=this.$vScroll){m!=this.$vScroll&&(this.$vScroll=m,this.scrollBarV.setVisible(m));var f=this.container.clientWidth;this.container.style.height=C+"px",this.$updateCachedSize(!0,this.$gutterWidth,f,C),this.desiredHeight=C,this._signal("autosize")}},M.prototype.$computeLayerConfig=function(){var E=this.session,_=this.$size,C=_.height<=2*this.lineHeight,x=this.session.getScreenLength(),m=x*this.lineHeight,f=this.$getLongestLine(),S=!C&&(this.$hScrollBarAlwaysVisible||_.scrollerWidth-f-2*this.$padding<0),L=this.$horizScroll!==S;L&&(this.$horizScroll=S,this.scrollBarH.setVisible(S));var T=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),C=_.height<=2*this.lineHeight);var I=_.scrollerHeight+this.lineHeight,D=!this.$maxLines&&this.$scrollPastEnd?(_.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;m+=D;var O=this.scrollMargin;this.session.setScrollTop(Math.max(-O.top,Math.min(this.scrollTop,m-_.scrollerHeight+O.bottom))),this.session.setScrollLeft(Math.max(-O.left,Math.min(this.scrollLeft,f+2*this.$padding-_.scrollerWidth+O.right)));var N=!C&&(this.$vScrollBarAlwaysVisible||_.scrollerHeight-m+D<0||this.scrollTop>O.top),F=T!==N;F&&(this.$vScroll=N,this.scrollBarV.setVisible(N));var B=this.scrollTop%this.lineHeight,W=Math.ceil(I/this.lineHeight)-1,H=Math.max(0,Math.round((this.scrollTop-B)/this.lineHeight)),z=H+W,U,j,P=this.lineHeight;H=E.screenToDocumentRow(H,0);var G=E.getFoldLine(H);G&&(H=G.start.row),U=E.documentToScreenRow(H,0),j=E.getRowLength(H)*P,z=Math.min(E.screenToDocumentRow(z,0),E.getLength()-1),I=_.scrollerHeight+E.getRowLength(z)*P+j,B=this.scrollTop-U*P,B<0&&U>0&&(U=Math.max(0,U+Math.floor(B/P)),B=this.scrollTop-U*P);var V=0;return(this.layerConfig.width!=f||L)&&(V=this.CHANGE_H_SCROLL),(L||F)&&(V|=this.$updateCachedSize(!0,this.gutterWidth,_.width,_.height),this._signal("scrollbarVisibilityChanged"),F&&(f=this.$getLongestLine())),this.layerConfig={width:f,padding:this.$padding,firstRow:H,firstRowScreen:U,lastRow:z,lineHeight:P,characterWidth:this.characterWidth,minHeight:I,maxHeight:m,offset:B,gutterOffset:P?Math.max(0,Math.ceil((B+_.height-_.scrollerHeight)/P)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(f-this.$padding),V},M.prototype.$updateLines=function(){if(this.$changedLines){var E=this.$changedLines.firstRow,_=this.$changedLines.lastRow;this.$changedLines=null;var C=this.layerConfig;if(!(E>C.lastRow+1)&&!(_this.$textLayer.MAX_LINE_LENGTH&&(E=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(E*this.characterWidth))},M.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},M.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},M.prototype.addGutterDecoration=function(E,_){this.$gutterLayer.addGutterDecoration(E,_)},M.prototype.removeGutterDecoration=function(E,_){this.$gutterLayer.removeGutterDecoration(E,_)},M.prototype.updateBreakpoints=function(E){this._rows=E,this.$loop.schedule(this.CHANGE_GUTTER)},M.prototype.setAnnotations=function(E){this.$gutterLayer.setAnnotations(E),this.$loop.schedule(this.CHANGE_GUTTER)},M.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},M.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},M.prototype.showCursor=function(){this.$cursorLayer.showCursor()},M.prototype.scrollSelectionIntoView=function(E,_,C){this.scrollCursorIntoView(E,C),this.scrollCursorIntoView(_,C)},M.prototype.scrollCursorIntoView=function(E,_,C){if(this.$size.scrollerHeight!==0){var x=this.$cursorLayer.getPixelPosition(E),m=x.left,f=x.top,S=C&&C.top||0,L=C&&C.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var T=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;T+S>f?(_&&T+S>f+this.lineHeight&&(f-=_*this.$size.scrollerHeight),f===0&&(f=-this.scrollMargin.top),this.session.setScrollTop(f)):T+this.$size.scrollerHeight-L=1-this.scrollMargin.top||_>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||E<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||E>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},M.prototype.pixelToScreenCoordinates=function(E,_){var C;if(this.$hasCssTransforms){C={top:0,left:0};var x=this.$fontMetrics.transformCoordinates([E,_]);E=x[1]-this.gutterWidth-this.margin.left,_=x[0]}else C=this.scroller.getBoundingClientRect();var m=E+this.scrollLeft-C.left-this.$padding,f=m/this.characterWidth,S=Math.floor((_+this.scrollTop-C.top)/this.lineHeight),L=this.$blockCursor?Math.floor(f):Math.round(f);return{row:S,column:L,side:f-L>0?1:-1,offsetX:m}},M.prototype.screenToTextCoordinates=function(E,_){var C;if(this.$hasCssTransforms){C={top:0,left:0};var x=this.$fontMetrics.transformCoordinates([E,_]);E=x[1]-this.gutterWidth-this.margin.left,_=x[0]}else C=this.scroller.getBoundingClientRect();var m=E+this.scrollLeft-C.left-this.$padding,f=m/this.characterWidth,S=this.$blockCursor?Math.floor(f):Math.round(f),L=Math.floor((_+this.scrollTop-C.top)/this.lineHeight);return this.session.screenToDocumentPosition(L,Math.max(S,0),m)},M.prototype.textToScreenCoordinates=function(E,_){var C=this.scroller.getBoundingClientRect(),x=this.session.documentToScreenPosition(E,_),m=this.$padding+(this.session.$bidiHandler.isBidiRow(x.row,E)?this.session.$bidiHandler.getPosLeft(x.column):Math.round(x.column*this.characterWidth)),f=x.row*this.lineHeight;return{pageX:C.left+m-this.scrollLeft,pageY:C.top+f-this.scrollTop}},M.prototype.visualizeFocus=function(){b.addCssClass(this.container,"ace_focus")},M.prototype.visualizeBlur=function(){b.removeCssClass(this.container,"ace_focus")},M.prototype.showComposition=function(E){this.$composition=E,E.cssText||(E.cssText=this.textarea.style.cssText),E.useTextareaForIME==null&&(E.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(b.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):E.markerId=this.session.addMarker(E.markerRange,"ace_composition_marker","text")},M.prototype.setCompositionText=function(E){var _=this.session.selection.cursor;this.addToken(E,"composition_placeholder",_.row,_.column),this.$moveTextAreaToCursor()},M.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),b.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var E=this.session.selection.cursor;this.removeExtraToken(E.row,E.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},M.prototype.setGhostText=function(E,_){var C=this.session.selection.cursor,x=_||{row:C.row,column:C.column};this.removeGhostText();var m=this.$calculateWrappedTextChunks(E,x);this.addToken(m[0].text,"ghost_text",x.row,x.column),this.$ghostText={text:E,position:{row:x.row,column:x.column}};var f=b.createElement("div");if(m.length>1){var S=this.hideTokensAfterPosition(x.row,x.column),L;m.slice(1).forEach(function(F){var B=b.createElement("div"),W=b.createElement("span");W.className="ace_ghost_text",F.wrapped&&(B.className="ghost_text_line_wrapped"),F.text.length===0&&(F.text=" "),W.appendChild(b.createTextNode(F.text)),B.appendChild(W),f.appendChild(B),L=B}),S.forEach(function(F){var B=b.createElement("span");y(F.type)||(B.className="ace_"+F.type.replace(/\./g," ace_")),B.appendChild(b.createTextNode(F.value)),L.appendChild(B)}),this.$ghostTextWidget={el:f,row:x.row,column:x.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var T=this.$cursorLayer.getPixelPosition(x,!0),I=this.container,D=I.getBoundingClientRect().height,O=m.length*this.lineHeight,N=O0){var I=0;T.push(m[S].length);for(var D=0;D1||Math.abs(E.$size.height-x)>1?E.$resizeTimer.delay():E.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},M})();A.prototype.CHANGE_CURSOR=1,A.prototype.CHANGE_MARKER=2,A.prototype.CHANGE_GUTTER=4,A.prototype.CHANGE_SCROLL=8,A.prototype.CHANGE_LINES=16,A.prototype.CHANGE_TEXT=32,A.prototype.CHANGE_SIZE=64,A.prototype.CHANGE_MARKER_BACK=128,A.prototype.CHANGE_MARKER_FRONT=256,A.prototype.CHANGE_FULL=512,A.prototype.CHANGE_H_SCROLL=1024,A.prototype.$changes=0,A.prototype.$padding=null,A.prototype.$frozen=!1,A.prototype.STEPS=8,$.implement(A.prototype,g),s.defineOptions(A.prototype,"renderer",{useResizeObserver:{set:function(M){!M&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):M&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(M){this.$textLayer.setShowInvisibles(M)&&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(M){typeof M=="number"&&(this.$printMarginColumn=M),this.$showPrintMargin=!!M,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(M){this.$gutter.style.display=M?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(M){this.$gutterLayer.$useSvgGutterIcons=M},initialValue:!1},showFoldedAnnotations:{set:function(M){this.$gutterLayer.$showFoldedAnnotations=M},initialValue:!1},fadeFoldWidgets:{set:function(M){b.setCssClass(this.$gutter,"ace_fade-fold-widgets",M)},initialValue:!1},showFoldWidgets:{set:function(M){this.$gutterLayer.setShowFoldWidgets(M),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(M){this.$textLayer.setDisplayIndentGuides(M)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(M){this.$textLayer.setHighlightIndentGuides(M)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(M){this.$gutterLayer.setHighlightGutterLine(M),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(M){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(M){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(M){typeof M=="number"&&(M=M+"px"),this.container.style.fontSize=M,this.updateFontSize()},initialValue:12},fontFamily:{set:function(M){this.container.style.fontFamily=M,this.updateFontSize()}},maxLines:{set:function(M){this.updateFull()}},minLines:{set:function(M){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(M){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(M){M=+M||0,this.$scrollPastEnd!=M&&(this.$scrollPastEnd=M,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(M){this.$gutterLayer.$fixedWidth=!!M,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(M){this.$updateCustomScrollbar(M)},initialValue:!1},theme:{set:function(M){this.setTheme(M)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!k.isMobile&&!k.isIE}}),v.VirtualRenderer=A});ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(d,v,R){"use strict";var $=d("../lib/oop"),b=d("../lib/net"),h=d("../lib/event_emitter").EventEmitter,s=d("../config");function a(t){var e="importScripts('"+b.qualifyURL(t)+"');";try{return new Blob([e],{type:"application/javascript"})}catch{var r=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,l=new r;return l.append(e),l.getBlob("application/javascript")}}function o(t){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(s.get("loadWorkerFromBlob")){var e=a(t),r=window.URL||window.webkitURL,l=r.createObjectURL(e);return new Worker(l)}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(){$.implement(this,h),this.$createWorkerFromOldConfig=function(t,e,r,l,c){if(d.nameToUrl&&!d.toUrl&&(d.toUrl=d.nameToUrl),s.get("packaged")||!d.toUrl)l=l||s.moduleUrl(e,"worker");else{var u=this.$normalizePath;l=l||u(d.toUrl("ace/worker/worker.js",null,"_"));var g={};t.forEach(function(p){g[p]=u(d.toUrl(p,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=o(l),c&&this.send("importScripts",c),this.$worker.postMessage({init:!0,tlns:g,module:e,classname:r}),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 r=this.callbacks[e.id];r&&(r(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 b.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,r){if(r){var l=this.callbackId++;this.callbacks[l]=r,e.push(l)}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(r){console.error(r.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,r){var l=null,c=!1,u=Object.create(h),g=[],p=new i({messageBuffer:g,terminate:function(){},postMessage:function(k){g.push(k),l&&(c?setTimeout(w):w())}});p.setEmitSync=function(k){c=k};var w=function(){var k=g.shift();k.command?l[k.command].apply(l,k.args):k.event&&u._signal(k.event,k.data)};return u.postMessage=function(k){p.onMessage({data:k})},u.callback=function(k,y){this.postMessage({type:"call",id:y,data:k})},u.emit=function(k,y){this.postMessage({type:"event",name:k,data:y})},s.loadModule(["worker",e],function(k){for(l=new k[r](u);g.length;)w()}),p};v.UIWorkerClient=n,v.WorkerClient=i,v.createWorker=o});ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(d,v,R){"use strict";var $=d("./range").Range,b=d("./lib/event_emitter").EventEmitter,h=d("./lib/oop"),s=(function(){function a(o,i,n,t,e,r){var l=this;this.length=i,this.session=o,this.doc=o.getDocument(),this.mainClass=e,this.othersClass=r,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=t,this.$onCursorChange=function(){setTimeout(function(){l.onCursorChange()})},this.$pos=n;var c=o.getUndoManager().$undoStack||o.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=c.length,this.setup(),o.selection.on("changeCursor",this.$onCursorChange)}return a.prototype.setup=function(){var o=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 $(t.row,t.column,t.row,t.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(e){var r=i.createAnchor(e.row,e.column);r.$insertRight=!0,r.detach(),o.others.push(r)}),n.setUndoSelect(!1)},a.prototype.showOtherMarkers=function(){if(!this.othersActive){var o=this.session,i=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=o.addMarker(new $(n.row,n.column,n.row,n.column+i.length),i.othersClass,null,!1)})}},a.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var o=0;o=this.pos.column&&i.start.column<=this.pos.column+this.length+1,e=i.start.column-this.pos.column;if(this.updateAnchors(o),t&&(this.length+=n),t&&!this.session.$fromUndo){if(o.action==="insert")for(var r=this.others.length-1;r>=0;r--){var l=this.others[r],c={row:l.row,column:l.column+e};this.doc.insertMergedLines(c,o.lines)}else if(o.action==="remove")for(var r=this.others.length-1;r>=0;r--){var l=this.others[r],c={row:l.row,column:l.column+e};this.doc.remove(new $(c.row,c.column,c.row,c.column-n))}}this.$updating=!1,this.updateMarkers()}},a.prototype.updateAnchors=function(o){this.pos.onChange(o);for(var i=this.others.length;i--;)this.others[i].onChange(o);this.updateMarkers()},a.prototype.updateMarkers=function(){if(!this.$updating){var o=this,i=this.session,n=function(e,r){i.removeMarker(e.markerId),e.markerId=i.addMarker(new $(e.row,e.column,e.row,e.column+o.length),r,null,!1)};n(this.pos,this.mainClass);for(var t=this.others.length;t--;)n(this.others[t],this.othersClass)}},a.prototype.onCursorChange=function(o){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",o)):(this.hideOtherMarkers(),this._emit("cursorLeave",o))}},a.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},a.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var o=this.session.getUndoManager(),i=(o.$undoStack||o.$undostack).length-this.$undoStackDepth,n=0;n1?b.multiSelect.joinSelections():b.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(b){b.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(b){b.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(b){b.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],v.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(b){b.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(b){return b&&b.inMultiSelectMode}}];var $=d("../keyboard/hash_handler").HashHandler;v.keyboardHandler=new $(v.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(d,v,R){var $=d("./range_list").RangeList,b=d("./range").Range,h=d("./selection").Selection,s=d("./mouse/multi_select_handler").onMouseDown,a=d("./lib/event"),o=d("./lib/lang"),i=d("./commands/multi_select_commands");v.commands=i.defaultCommands.concat(i.multiSelectCommands);var n=d("./search").Search,t=new n;function e(p,w,k){return t.$options.wrap=!0,t.$options.needle=w,t.$options.backwards=k==-1,t.find(p)}var r=d("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(r.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(p,w){if(p){if(!this.inMultiSelectMode&&this.rangeCount===0){var k=this.toOrientedRange();if(this.rangeList.add(k),this.rangeList.add(p),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),w||this.fromOrientedRange(p);this.rangeList.removeAll(),this.rangeList.add(k),this.$onAddRange(k)}p.cursor||(p.cursor=p.end);var y=this.rangeList.add(p);return this.$onAddRange(p),y.length&&this.$onRemoveRange(y),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),w||this.fromOrientedRange(p)}},this.toSingleRange=function(p){p=p||this.ranges[0];var w=this.rangeList.removeAll();w.length&&this.$onRemoveRange(w),p&&this.fromOrientedRange(p)},this.substractPoint=function(p){var w=this.rangeList.substractPoint(p);if(w)return this.$onRemoveRange(w),w[0]},this.mergeOverlappingRanges=function(){var p=this.rangeList.merge();p.length&&this.$onRemoveRange(p)},this.$onAddRange=function(p){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(p),this._signal("addRange",{range:p})},this.$onRemoveRange=function(p){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var w=this.rangeList.ranges.pop();p.push(w),this.rangeCount=0}for(var k=p.length;k--;){var y=this.ranges.indexOf(p[k]);this.ranges.splice(y,1)}this._signal("removeRange",{ranges:p}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),w=w||this.ranges[0],w&&!w.isEqual(this.getRange())&&this.fromOrientedRange(w)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new $,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var p=this.ranges.length?this.ranges:[this.getRange()],w=[],k=0;k1){var p=this.rangeList.ranges,w=p[p.length-1],k=b.fromPoints(p[0].start,w.end);this.toSingleRange(),this.setSelectionRange(k,w.cursor==w.start)}else{var y=this.session.documentToScreenPosition(this.cursor),A=this.session.documentToScreenPosition(this.anchor),M=this.rectangularRangeBlock(y,A);M.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(p,w,k){var y=[],A=p.column0;)I--;if(I>0)for(var D=0;y[D].isEmpty();)D++;for(var O=I;O>=D;O--)y[O].isEmpty()&&y.splice(O,1)}return y}}).call(h.prototype);var l=d("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(p){p.cursor||(p.cursor=p.end);var w=this.getSelectionStyle();return p.marker=this.session.addMarker(p,"ace_selection",w),this.session.$selectionMarkers.push(p),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,p},this.removeSelectionMarker=function(p){if(p.marker){this.session.removeMarker(p.marker);var w=this.session.$selectionMarkers.indexOf(p);w!=-1&&this.session.$selectionMarkers.splice(w,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(p){for(var w=this.session.$selectionMarkers,k=p.length;k--;){var y=p[k];if(y.marker){this.session.removeMarker(y.marker);var A=w.indexOf(y);A!=-1&&w.splice(A,1)}}this.session.selectionMarkerCount=w.length},this.$onAddRange=function(p){this.addSelectionMarker(p.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(p){this.removeSelectionMarkers(p.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(p){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(p){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(p){var w=p.command,k=p.editor;if(k.multiSelect){if(w.multiSelectAction)w.multiSelectAction=="forEach"?y=k.forEachSelection(w,p.args):w.multiSelectAction=="forEachLine"?y=k.forEachSelection(w,p.args,!0):w.multiSelectAction=="single"?(k.exitMultiSelectMode(),y=w.exec(k,p.args||{})):y=w.multiSelectAction(k,p.args||{});else{var y=w.exec(k,p.args||{});k.multiSelect.addRange(k.multiSelect.toOrientedRange()),k.multiSelect.mergeOverlappingRanges()}return y}},this.forEachSelection=function(p,w,k){if(!this.inVirtualSelectionMode){var y=k&&k.keepOrder,A=k==!0||k&&k.$byLines,M=this.session,E=this.selection,_=E.rangeList,C=(y?E:_).ranges,x;if(!C.length)return p.exec?p.exec(this,w||{}):p(this,w||{});var m=E._eventRegistry;E._eventRegistry={};var f=new h(M);this.inVirtualSelectionMode=!0;for(var S=C.length;S--;){if(A)for(;S>0&&C[S].start.row==C[S-1].end.row;)S--;f.fromOrientedRange(C[S]),f.index=S,this.selection=M.selection=f;var L=p.exec?p.exec(this,w||{}):p(this,w||{});!x&&L!==void 0&&(x=L),f.toOrientedRange(C[S])}f.detach(),this.selection=M.selection=E,this.inVirtualSelectionMode=!1,E._eventRegistry=m,E.mergeOverlappingRanges(),E.ranges[0]&&E.fromOrientedRange(E.ranges[0]);var T=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),T&&T.from==T.to&&this.renderer.animateScrolling(T.from),x}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var p="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var w=this.multiSelect.rangeList.ranges,k=[],y=0;y0);E<0&&(E=0),_>=x&&(_=x-1)}var f=this.session.removeFullLines(E,_);f=this.$reAlignText(f,C),this.session.insert({row:E,column:0},f.join(` `)+` `),C||(M.start.column=0,M.end.column=f[f.length-1].length),this.selection.setRange(M)}else{A.forEach(function(I){w.substractPoint(I.cursor)});var S=0,L=1/0,T=k.map(function(I){var D=I.cursor,O=p.getLine(D.row),N=O.substr(D.column).search(/\S/g);return N==-1&&(N=0),D.column>S&&(S=D.column),NF?p.insert(O,o.stringRepeat(" ",N-F)):p.remove(new b(O.row,O.column,O.row,O.column-N+F)),I.start.column=I.end.column=S,I.start.row=I.end.row=O.row,I.cursor=I.end}),w.fromOrientedRange(k[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(p,w){var k=!0,y=!0,A,M,E;return p.map(function(f){var S=f.match(/(\s*)(.*?)(\s*)([=:].*)/);return S?A==null?(A=S[1].length,M=S[2].length,E=S[3].length,S):(A+M+E!=S[1].length+S[2].length+S[3].length&&(y=!1),A!=S[1].length&&(k=!1),A>S[1].length&&(A=S[1].length),MS[3].length&&(E=S[3].length),S):[f]}).map(w?C:k?y?x:C:m);function _(f){return o.stringRepeat(" ",f)}function C(f){return f[2]?_(A)+f[2]+_(M-f[2].length+E)+f[4].replace(/^([=:])\s+/,"$1 "):f[0]}function x(f){return f[2]?_(A+M-f[2].length)+f[2]+_(E)+f[4].replace(/^([=:])\s+/,"$1 "):f[0]}function m(f){return f[2]?_(A)+f[2]+_(E)+f[4].replace(/^([=:])\s+/,"$1 "):f[0]}}}).call(l.prototype);function c(p,w){return p.row==w.row&&p.column==w.column}v.onSessionChange=function(p){var w=p.session;w&&!w.multiSelect&&(w.$selectionMarkers=[],w.selection.$initRangeList(),w.multiSelect=w.selection),this.multiSelect=w&&w.multiSelect;var k=p.oldSession;k&&(k.multiSelect.off("addRange",this.$onAddRange),k.multiSelect.off("removeRange",this.$onRemoveRange),k.multiSelect.off("multiSelect",this.$onMultiSelect),k.multiSelect.off("singleSelect",this.$onSingleSelect),k.multiSelect.lead.off("change",this.$checkMultiselectChange),k.multiSelect.anchor.off("change",this.$checkMultiselectChange)),w&&(w.multiSelect.on("addRange",this.$onAddRange),w.multiSelect.on("removeRange",this.$onRemoveRange),w.multiSelect.on("multiSelect",this.$onMultiSelect),w.multiSelect.on("singleSelect",this.$onSingleSelect),w.multiSelect.lead.on("change",this.$checkMultiselectChange),w.multiSelect.anchor.on("change",this.$checkMultiselectChange)),w&&this.inMultiSelectMode!=w.selection.inMultiSelectMode&&(w.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function u(p){p.$multiselectOnSessionChange||(p.$onAddRange=p.$onAddRange.bind(p),p.$onRemoveRange=p.$onRemoveRange.bind(p),p.$onMultiSelect=p.$onMultiSelect.bind(p),p.$onSingleSelect=p.$onSingleSelect.bind(p),p.$multiselectOnSessionChange=v.onSessionChange.bind(p),p.$checkMultiselectChange=p.$checkMultiselectChange.bind(p),p.$multiselectOnSessionChange(p),p.on("changeSession",p.$multiselectOnSessionChange),p.on("mousedown",s),p.commands.addCommands(i.defaultCommands),g(p))}function g(p){if(!p.textInput)return;var w=p.textInput.getElement(),k=!1;a.addListener(w,"keydown",function(A){var M=A.keyCode==18&&!(A.ctrlKey||A.shiftKey||A.metaKey);p.$blockSelectEnabled&&M?k||(p.renderer.setMouseCursor("crosshair"),k=!0):k&&y()},p),a.addListener(w,"keyup",y,p),a.addListener(w,"blur",y,p);function y(A){k&&(p.renderer.setMouseCursor(""),k=!1)}}v.MultiSelect=u,d("./config").defineOptions(l.prototype,"editor",{enableMultiselect:{set:function(p){u(this),p?this.on("mousedown",s):this.off("mousedown",s)},value:!0},enableBlockSelect:{set:function(p){this.$blockSelectEnabled=p},value:!0}})});ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(d,v,R){"use strict";var $=d("../../range").Range,b=v.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(h,s,a){var o=h.getLine(a);return this.foldingStartMarker.test(o)?"start":s=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(o)?"end":""},this.getFoldWidgetRange=function(h,s,a){return null},this.indentationBlock=function(h,s,a){var o=/\S/,i=h.getLine(s),n=i.search(o);if(n!=-1){for(var t=a||i.length,e=h.getLength(),r=s,l=s;++sr){var g=h.getLine(l).length;return new $(r,t,l,g)}}},this.openingBracketBlock=function(h,s,a,o,i){var n={row:a,column:o+1},t=h.$findClosingBracket(s,n,i);if(t){var e=h.foldWidgets[t.row];return e==null&&(e=h.getFoldWidget(t.row)),e=="start"&&t.row>n.row&&(t.row--,t.column=h.getLine(t.row).length),$.fromPoints(n,t)}},this.closingBracketBlock=function(h,s,a,o,i){var n={row:a,column:o},t=h.$findOpeningBracket(s,n);if(t)return t.column++,n.column--,$.fromPoints(t,n)}}).call(b.prototype)});ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(d,v,R){"use strict";var $=d("../lib/dom"),b=d("../range").Range,h=d("../config").nls;function s(o,i,n){for(var t=0,e=o.length-1;t<=e;){var r=t+e>>1,l=n(i,o[r]);if(l>0)t=r+1;else if(l<0)e=r-1;else return r}return-(t+1)}function a(o,i,n){var t=o.getAnnotations().sort(b.comparePoints);if(t.length){var e=s(t,{row:i,column:-1},b.comparePoints);e<0&&(e=-e-1),e>=t.length?e=n>0?0:t.length-1:e===0&&n<0&&(e=t.length-1);var r=t[e];if(!(!r||!n)){if(r.row===i){do r=t[e+=n];while(r&&r.row===i);if(!r)return t.slice()}var l=[];i=r.row;do l[n<0?"unshift":"push"](r),r=t[e+=n];while(r&&r.row==i);return l.length&&l}}}v.showErrorMarker=function(o,i){var n=o.session,t=o.getCursorPosition(),e=t.row,r=n.widgetManager.getWidgetsAtRow(e).filter(function(A){return A.type=="errorMarker"})[0];r?r.destroy():e-=i;var l=a(n,e,i),c;if(l){var u=l[0];t.column=(u.pos&&typeof u.column!="number"?u.pos.sc:u.column)||0,t.row=u.row,c=o.renderer.$gutterLayer.$annotations[t.row]}else{if(r)return;c={displayText:[h("error-marker.good-state","Looks good!")],className:"ace_ok"}}o.session.unfold(t.row),o.selection.moveToPosition(t);var g={row:t.row,fixedWidth:!0,coverGutter:!0,el:$.createElement("div"),type:"errorMarker"},p=g.el.appendChild($.createElement("div")),w=g.el.appendChild($.createElement("div"));w.className="error_widget_arrow "+c.className;var k=o.renderer.$cursorLayer.getPixelPosition(t).left;w.style.left=k+o.renderer.gutterWidth-5+"px",g.el.className="error_widget_wrapper",p.className="error_widget "+c.className,c.displayText.forEach(function(A,M){p.appendChild($.createTextNode(A)),M{ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(d,v,R){"use strict";var $=d("../lib/oop"),b=d("./text_highlight_rules").TextHighlightRules,h=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},h.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};$.inherits(h,b),h.getTagRule=function(s){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},h.getStartRule=function(s){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:s}},h.getEndRule=function(s){return{token:"comment.doc",regex:"\\*\\/",next:s}},v.JsDocCommentHighlightRules=h});ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(d,v,R){"use strict";var $=d("../lib/oop"),b=d("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,h=d("./text_highlight_rules").TextHighlightRules,s="[a-zA-Z\\$_\xA1-\uFFFF][a-zA-Z\\d\\$_\xA1-\uFFFF]*",a=function(n){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},e=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",l="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",c="(function)(\\s*)(\\*?)",u={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+s+")(\\s*)(\\()"};this.$rules={no_regex:[b.getStartRule("doc-start"),i("no_regex"),u,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(=)(\\s*)"+c+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+s+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(:)(\\s*)"+c+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+c+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:e,regex:s},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:c+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:s},{regex:"",token:"empty",next:"no_regex"}],start:[b.getStartRule("doc-start"),i("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[i("function_arguments"),{token:"variable.parameter",regex:s},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:l},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:l},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!n||!n.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(g,p,w){if(this.next=g=="{"?this.nextState:"",g=="{"&&w.length)w.unshift("start",p);else if(g=="}"&&w.length&&(w.shift(),this.next=w.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return g=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:l},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+s+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!n||n.jsx!=!1)&&o.call(this)),this.embedRules(b,"doc-",[b.getEndRule("no_regex")]),this.normalizeRules()};$.inherits(a,h);function o(){var n=s.replace("\\d","\\d\\-"),t={onMatch:function(r,l,c){var u=r.charAt(1)=="/"?2:1;return u==1?(l!=this.nextState?c.unshift(this.next,this.nextState,0):c.unshift(this.next),c[2]++):u==2&&l==this.nextState&&(c[1]--,(!c[1]||c[1]<0)&&(c.shift(),c.shift())),[{type:"meta.tag.punctuation."+(u==1?"":"end-")+"tag-open.xml",value:r.slice(0,u)},{type:"meta.tag.tag-name.xml",value:r.substr(u)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var e={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[e,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(r,l,c){return l==c[0]&&c.shift(),r.length==2&&(c[0]==this.nextState&&c[1]--,(!c[1]||c[1]<0)&&c.splice(0,2)),this.next=c[0]||"start",[{type:this.token,value:r}]},nextState:"jsx"},e,i("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:n},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function i(n){return[{token:"comment",regex:/\/\*/,next:[b.getTagRule(),{token:"comment",regex:"\\*\\/",next:n||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[b.getTagRule(),{token:"comment",regex:"$|^",next:n||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}v.JavaScriptHighlightRules=a});ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(d,v,R){"use strict";var $=d("../range").Range,b=function(){};(function(){this.checkOutdent=function(h,s){return/^\s+$/.test(h)?/^\s*\}/.test(s):!1},this.autoOutdent=function(h,s){var a=h.getLine(s),o=a.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,n=h.findMatchingBracket({row:s,column:i});if(!n||n.row==s)return 0;var t=this.$getIndent(h.getLine(n.row));h.replace(new $(s,0,s,i-1),t)},this.$getIndent=function(h){return h.match(/^\s*/)[0]}}).call(b.prototype),v.MatchingBraceOutdent=b});ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(d,v,R){"use strict";var $=d("../../lib/oop"),b=d("../behaviour").Behaviour,h=d("../../token_iterator").TokenIterator;function s(o,i){return o&&o.type.lastIndexOf(i+".xml")>-1}var a=function(){this.add("string_dquotes","insertion",function(o,i,n,t,e){if(e=='"'||e=="'"){var r=e,l=t.doc.getTextRange(n.getSelectionRange());if(l!==""&&l!=="'"&&l!='"'&&n.getWrapBehavioursEnabled())return{text:r+l+r,selection:!1};var c=n.getCursorPosition(),u=t.doc.getLine(c.row),g=u.substring(c.column,c.column+1),p=new h(t,c.row,c.column),w=p.getCurrentToken();if(g==r&&(s(w,"attribute-value")||s(w,"string")))return{text:"",selection:[1,1]};if(w||(w=p.stepBackward()),!w)return;for(;s(w,"tag-whitespace")||s(w,"whitespace");)w=p.stepBackward();var k=!g||g.match(/\s/);if(s(w,"attribute-equals")&&(k||g==">")||s(w,"decl-attribute-equals")&&(k||g=="?"))return{text:r+r,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(o,i,n,t,e){var r=t.doc.getTextRange(e);if(!e.isMultiLine()&&(r=='"'||r=="'")){var l=t.doc.getLine(e.start.row),c=l.substring(e.start.column+1,e.start.column+2);if(c==r)return e.end.column++,e}}),this.add("autoclosing","insertion",function(o,i,n,t,e){if(e==">"){var r=n.getSelectionRange().start,l=new h(t,r.row,r.column),c=l.getCurrentToken()||l.stepBackward();if(!c||!(s(c,"tag-name")||s(c,"tag-whitespace")||s(c,"attribute-name")||s(c,"attribute-equals")||s(c,"attribute-value"))||s(c,"reference.attribute-value"))return;if(s(c,"attribute-value")){var u=l.getCurrentTokenColumn()+c.value.length;if(r.column/.test(t.getLine(r.row).slice(r.column)))return;for(;!s(c,"tag-name");)if(c=l.stepBackward(),c.value=="<"){c=l.stepForward();break}var p=l.getCurrentTokenRow(),w=l.getCurrentTokenColumn();if(s(l.stepBackward(),"end-tag-open"))return;var k=c.value;return p==r.row&&(k=k.substring(0,r.column-w)),this.voidElements&&this.voidElements.hasOwnProperty(k.toLowerCase())?void 0:{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(o,i,n,t,e){if(e==` `){var r=n.getCursorPosition(),l=t.getLine(r.row),c=new h(t,r.row,r.column),u=c.getCurrentToken();if(s(u,"")&&u.type.indexOf("tag-close")!==-1){if(u.value=="/>")return;for(;u&&u.type.indexOf("tag-name")===-1;)u=c.stepBackward();if(!u)return;var g=u.value,p=c.getCurrentTokenRow();if(u=c.stepBackward(),!u||u.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[g]||!this.voidElements){var w=t.getTokenAt(r.row,r.column+1),l=t.getLine(p),k=this.$getIndent(l),y=k+t.getTabString();return w&&w.value===""){var l=t.getSelectionRange().start,c=new b(e,l.row,l.column),u=c.getCurrentToken()||c.stepBackward();if(!u)return;if(u.value=="<")return{text:">",selection:[1,1]}}})};$.inherits(a,h),v.JavaScriptBehaviour=a});ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(d,v,R){"use strict";var $=d("../../lib/oop"),b=d("../../range").Range,h=d("./fold_mode").FoldMode,s=v.FoldMode=function(i,n){h.call(this),this.voidElements=i||{},this.optionalEndTags=$.mixin({},this.voidElements),n&&$.mixin(this.optionalEndTags,n)};$.inherits(s,h);var a=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};function o(i,n){return i&&i.type&&i.type.lastIndexOf(n+".xml")>-1}(function(){this.getFoldWidget=function(i,n,t){var e=this._getFirstTagInLine(i,t);return e?e.closing||!e.tagName&&e.selfClosing?n==="markbeginend"?"end":"":!e.tagName||e.selfClosing||this.voidElements.hasOwnProperty(e.tagName.toLowerCase())||this._findEndTagInLine(i,t,e.tagName,e.end.column)?"":"start":this.getCommentFoldWidget(i,t)},this.getCommentFoldWidget=function(i,n){return/comment/.test(i.getState(n))&&/";break}return e}else if(o(l,"tag-close"))return e.selfClosing=l.value=="/>",e;e.start.column+=l.value.length}return null},this._findEndTagInLine=function(i,n,t,e){for(var r=i.getTokens(n),l=0,c=0;cc)break;var u=this.getFoldWidgetRange(a,"all",o);if(u){if(u.start.row<=t)break;if(u.isMultiLine())o=u.end.row;else if(n==c)break}r=o}}return new b(t,e,r,a.getLine(r).length)},this.getCommentRegionBlock=function(a,o,i){for(var n=o.search(/\s*$/),t=a.getLength(),e=i,r=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++ie)return new b(e,n,u,o.length)}}).call(s.prototype)});ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(d,v,R){"use strict";var $=d("../../lib/oop"),b=d("./xml").FoldMode,h=d("./cstyle").FoldMode,s=v.FoldMode=function(a){a&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+a.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+a.end))),this.xmlFoldMode=new b};$.inherits(s,h),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(a,o,i){var n=this.getFoldWidgetBase(a,o,i);return n||this.xmlFoldMode.getFoldWidget(a,o,i)},this.getFoldWidgetRange=function(a,o,i,n){var t=this.getFoldWidgetRangeBase(a,o,i,n);return t||this.xmlFoldMode.getFoldWidgetRange(a,o,i)}}).call(s.prototype)});ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(d,v,R){"use strict";var $=d("../lib/oop"),b=d("./text").Mode,h=d("./javascript_highlight_rules").JavaScriptHighlightRules,s=d("./matching_brace_outdent").MatchingBraceOutdent,a=d("../worker/worker_client").WorkerClient,o=d("./behaviour/javascript").JavaScriptBehaviour,i=d("./folding/javascript").FoldMode,n=function(){this.HighlightRules=h,this.$outdent=new s,this.$behaviour=new o,this.foldingRules=new i};$.inherits(n,b),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(t,e,r){var l=this.$getIndent(e),c=this.getTokenizer().getLineTokens(e,t),u=c.tokens,g=c.state;if(u.length&&u[u.length-1].type=="comment")return l;if(t=="start"||t=="no_regex"){var p=e.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);p&&(l+=r)}else if(t=="doc-start"&&(g=="start"||g=="no_regex"))return"";return l},this.checkOutdent=function(t,e,r){return this.$outdent.checkOutdent(e,r)},this.autoOutdent=function(t,e,r){this.$outdent.autoOutdent(e,r)},this.createWorker=function(t){var e=new a(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return e.attachToDocument(t.getDocument()),e.on("annotate",function(r){t.setAnnotations(r.data)}),e.on("terminate",function(){t.clearAnnotations()}),e},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(n.prototype),v.Mode=n});(function(){ace.require(["ace/mode/javascript"],function(d){typeof me=="object"&&typeof Ke=="object"&&me&&(me.exports=d)})})()});var Qe=re((Ze,ve)=>{ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(d,v,R){"use strict";var $=d("../lib/oop"),b=d("./text_highlight_rules").TextHighlightRules,h=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},h.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};$.inherits(h,b),h.getTagRule=function(s){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},h.getStartRule=function(s){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:s}},h.getEndRule=function(s){return{token:"comment.doc",regex:"\\*\\/",next:s}},v.JsDocCommentHighlightRules=h});ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(d,v,R){"use strict";var $=d("../lib/oop"),b=d("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,h=d("./text_highlight_rules").TextHighlightRules,s="[a-zA-Z\\$_\xA1-\uFFFF][a-zA-Z\\d\\$_\xA1-\uFFFF]*",a=function(n){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},e=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",l="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",c="(function)(\\s*)(\\*?)",u={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+s+")(\\s*)(\\()"};this.$rules={no_regex:[b.getStartRule("doc-start"),i("no_regex"),u,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(=)(\\s*)"+c+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+s+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(:)(\\s*)"+c+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+c+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:e,regex:s},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:c+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:s},{regex:"",token:"empty",next:"no_regex"}],start:[b.getStartRule("doc-start"),i("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[i("function_arguments"),{token:"variable.parameter",regex:s},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:l},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:l},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!n||!n.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(g,p,w){if(this.next=g=="{"?this.nextState:"",g=="{"&&w.length)w.unshift("start",p);else if(g=="}"&&w.length&&(w.shift(),this.next=w.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return g=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:l},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+s+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!n||n.jsx!=!1)&&o.call(this)),this.embedRules(b,"doc-",[b.getEndRule("no_regex")]),this.normalizeRules()};$.inherits(a,h);function o(){var n=s.replace("\\d","\\d\\-"),t={onMatch:function(r,l,c){var u=r.charAt(1)=="/"?2:1;return u==1?(l!=this.nextState?c.unshift(this.next,this.nextState,0):c.unshift(this.next),c[2]++):u==2&&l==this.nextState&&(c[1]--,(!c[1]||c[1]<0)&&(c.shift(),c.shift())),[{type:"meta.tag.punctuation."+(u==1?"":"end-")+"tag-open.xml",value:r.slice(0,u)},{type:"meta.tag.tag-name.xml",value:r.substr(u)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var e={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[e,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(r,l,c){return l==c[0]&&c.shift(),r.length==2&&(c[0]==this.nextState&&c[1]--,(!c[1]||c[1]<0)&&c.splice(0,2)),this.next=c[0]||"start",[{type:this.token,value:r}]},nextState:"jsx"},e,i("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:n},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function i(n){return[{token:"comment",regex:/\/\*/,next:[b.getTagRule(),{token:"comment",regex:"\\*\\/",next:n||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[b.getTagRule(),{token:"comment",regex:"$|^",next:n||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}v.JavaScriptHighlightRules=a});ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(d,v,R){"use strict";var $=d("../range").Range,b=function(){};(function(){this.checkOutdent=function(h,s){return/^\s+$/.test(h)?/^\s*\}/.test(s):!1},this.autoOutdent=function(h,s){var a=h.getLine(s),o=a.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,n=h.findMatchingBracket({row:s,column:i});if(!n||n.row==s)return 0;var t=this.$getIndent(h.getLine(n.row));h.replace(new $(s,0,s,i-1),t)},this.$getIndent=function(h){return h.match(/^\s*/)[0]}}).call(b.prototype),v.MatchingBraceOutdent=b});ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(d,v,R){"use strict";var $=d("../../lib/oop"),b=d("../behaviour").Behaviour,h=d("../../token_iterator").TokenIterator;function s(o,i){return o&&o.type.lastIndexOf(i+".xml")>-1}var a=function(){this.add("string_dquotes","insertion",function(o,i,n,t,e){if(e=='"'||e=="'"){var r=e,l=t.doc.getTextRange(n.getSelectionRange());if(l!==""&&l!=="'"&&l!='"'&&n.getWrapBehavioursEnabled())return{text:r+l+r,selection:!1};var c=n.getCursorPosition(),u=t.doc.getLine(c.row),g=u.substring(c.column,c.column+1),p=new h(t,c.row,c.column),w=p.getCurrentToken();if(g==r&&(s(w,"attribute-value")||s(w,"string")))return{text:"",selection:[1,1]};if(w||(w=p.stepBackward()),!w)return;for(;s(w,"tag-whitespace")||s(w,"whitespace");)w=p.stepBackward();var k=!g||g.match(/\s/);if(s(w,"attribute-equals")&&(k||g==">")||s(w,"decl-attribute-equals")&&(k||g=="?"))return{text:r+r,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(o,i,n,t,e){var r=t.doc.getTextRange(e);if(!e.isMultiLine()&&(r=='"'||r=="'")){var l=t.doc.getLine(e.start.row),c=l.substring(e.start.column+1,e.start.column+2);if(c==r)return e.end.column++,e}}),this.add("autoclosing","insertion",function(o,i,n,t,e){if(e==">"){var r=n.getSelectionRange().start,l=new h(t,r.row,r.column),c=l.getCurrentToken()||l.stepBackward();if(!c||!(s(c,"tag-name")||s(c,"tag-whitespace")||s(c,"attribute-name")||s(c,"attribute-equals")||s(c,"attribute-value"))||s(c,"reference.attribute-value"))return;if(s(c,"attribute-value")){var u=l.getCurrentTokenColumn()+c.value.length;if(r.column/.test(t.getLine(r.row).slice(r.column)))return;for(;!s(c,"tag-name");)if(c=l.stepBackward(),c.value=="<"){c=l.stepForward();break}var p=l.getCurrentTokenRow(),w=l.getCurrentTokenColumn();if(s(l.stepBackward(),"end-tag-open"))return;var k=c.value;return p==r.row&&(k=k.substring(0,r.column-w)),this.voidElements&&this.voidElements.hasOwnProperty(k.toLowerCase())?void 0:{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(o,i,n,t,e){if(e==` `){var r=n.getCursorPosition(),l=t.getLine(r.row),c=new h(t,r.row,r.column),u=c.getCurrentToken();if(s(u,"")&&u.type.indexOf("tag-close")!==-1){if(u.value=="/>")return;for(;u&&u.type.indexOf("tag-name")===-1;)u=c.stepBackward();if(!u)return;var g=u.value,p=c.getCurrentTokenRow();if(u=c.stepBackward(),!u||u.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[g]||!this.voidElements){var w=t.getTokenAt(r.row,r.column+1),l=t.getLine(p),k=this.$getIndent(l),y=k+t.getTabString();return w&&w.value===""){var l=t.getSelectionRange().start,c=new b(e,l.row,l.column),u=c.getCurrentToken()||c.stepBackward();if(!u)return;if(u.value=="<")return{text:">",selection:[1,1]}}})};$.inherits(a,h),v.JavaScriptBehaviour=a});ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(d,v,R){"use strict";var $=d("../../lib/oop"),b=d("../../range").Range,h=d("./fold_mode").FoldMode,s=v.FoldMode=function(i,n){h.call(this),this.voidElements=i||{},this.optionalEndTags=$.mixin({},this.voidElements),n&&$.mixin(this.optionalEndTags,n)};$.inherits(s,h);var a=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};function o(i,n){return i&&i.type&&i.type.lastIndexOf(n+".xml")>-1}(function(){this.getFoldWidget=function(i,n,t){var e=this._getFirstTagInLine(i,t);return e?e.closing||!e.tagName&&e.selfClosing?n==="markbeginend"?"end":"":!e.tagName||e.selfClosing||this.voidElements.hasOwnProperty(e.tagName.toLowerCase())||this._findEndTagInLine(i,t,e.tagName,e.end.column)?"":"start":this.getCommentFoldWidget(i,t)},this.getCommentFoldWidget=function(i,n){return/comment/.test(i.getState(n))&&/";break}return e}else if(o(l,"tag-close"))return e.selfClosing=l.value=="/>",e;e.start.column+=l.value.length}return null},this._findEndTagInLine=function(i,n,t,e){for(var r=i.getTokens(n),l=0,c=0;cc)break;var u=this.getFoldWidgetRange(a,"all",o);if(u){if(u.start.row<=t)break;if(u.isMultiLine())o=u.end.row;else if(n==c)break}r=o}}return new b(t,e,r,a.getLine(r).length)},this.getCommentRegionBlock=function(a,o,i){for(var n=o.search(/\s*$/),t=a.getLength(),e=i,r=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++ie)return new b(e,n,u,o.length)}}).call(s.prototype)});ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(d,v,R){"use strict";var $=d("../../lib/oop"),b=d("./xml").FoldMode,h=d("./cstyle").FoldMode,s=v.FoldMode=function(a){a&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+a.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+a.end))),this.xmlFoldMode=new b};$.inherits(s,h),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(a,o,i){var n=this.getFoldWidgetBase(a,o,i);return n||this.xmlFoldMode.getFoldWidget(a,o,i)},this.getFoldWidgetRange=function(a,o,i,n){var t=this.getFoldWidgetRangeBase(a,o,i,n);return t||this.xmlFoldMode.getFoldWidgetRange(a,o,i)}}).call(s.prototype)});ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(d,v,R){"use strict";var $=d("../lib/oop"),b=d("./text").Mode,h=d("./javascript_highlight_rules").JavaScriptHighlightRules,s=d("./matching_brace_outdent").MatchingBraceOutdent,a=d("../worker/worker_client").WorkerClient,o=d("./behaviour/javascript").JavaScriptBehaviour,i=d("./folding/javascript").FoldMode,n=function(){this.HighlightRules=h,this.$outdent=new s,this.$behaviour=new o,this.foldingRules=new i};$.inherits(n,b),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(t,e,r){var l=this.$getIndent(e),c=this.getTokenizer().getLineTokens(e,t),u=c.tokens,g=c.state;if(u.length&&u[u.length-1].type=="comment")return l;if(t=="start"||t=="no_regex"){var p=e.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);p&&(l+=r)}else if(t=="doc-start"&&(g=="start"||g=="no_regex"))return"";return l},this.checkOutdent=function(t,e,r){return this.$outdent.checkOutdent(e,r)},this.autoOutdent=function(t,e,r){this.$outdent.autoOutdent(e,r)},this.createWorker=function(t){var e=new a(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return e.attachToDocument(t.getDocument()),e.on("annotate",function(r){t.setAnnotations(r.data)}),e.on("terminate",function(){t.clearAnnotations()}),e},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(n.prototype),v.Mode=n});ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(d,v,R){"use strict";var $=d("../lib/oop"),b=d("../lib/lang"),h=d("./text_highlight_rules").TextHighlightRules,s=v.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",a=v.supportFunction="rgb|rgba|url|attr|counter|counters",o=v.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",i=v.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",n=v.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",t=v.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",e=v.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",r=v.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",l=function(){var c=this.createKeywordMapper({"support.function":a,"support.constant":o,"support.type":s,"support.constant.color":i,"support.constant.fonts":n},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:t},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+t+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:t},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:e},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:r},{include:"url"},{token:c,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};$.inherits(l,h),v.CssHighlightRules=l});ace.define("ace/mode/css_completions",["require","exports","module"],function(d,v,R){"use strict";var $={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},b=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var h=document.createElement("c").style;for(var s in h)if(typeof h[s]=="string"){var a=s.replace(/[A-Z]/g,function(o){return"-"+o.toLowerCase()});$.hasOwnProperty(a)||($[a]=1)}}this.completionsDefined=!0},this.getCompletions=function(h,s,a,o){if(this.completionsDefined||this.defineCompletions(),h==="ruleset"||s.$mode.$id=="ace/mode/scss"){var i=s.getLine(a.row).substr(0,a.column),n=/\([^)]*$/.test(i);return n&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(h,s,a,o)):this.getPropertyCompletions(h,s,a,o,n)}return[]},this.getPropertyCompletions=function(h,s,a,o,i){i=i||!1;var n=Object.keys($);return n.map(function(t){return{caption:t,snippet:t+": $0"+(i?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(h,s,a,o){var i=s.getLine(a.row).substr(0,a.column),n=(/([\w\-]+):[^:]*$/.exec(i)||{})[1];if(!n)return[];var t=[];return n in $&&typeof $[n]=="object"&&(t=Object.keys($[n])),t.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(b.prototype),v.CssCompletions=b});ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(d,v,R){"use strict";var $=d("../../lib/oop"),b=d("../behaviour").Behaviour,h=d("./cstyle").CstyleBehaviour,s=d("../../token_iterator").TokenIterator,a=function(){this.inherit(h),this.add("colon","insertion",function(o,i,n,t,e){if(e===":"&&n.selection.isEmpty()){var r=n.getCursorPosition(),l=new s(t,r.row,r.column),c=l.getCurrentToken();if(c&&c.value.match(/\s+/)&&(c=l.stepBackward()),c&&c.type==="support.type"){var u=t.doc.getLine(r.row),g=u.substring(r.column,r.column+1);if(g===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(u.substring(r.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(o,i,n,t,e){var r=t.doc.getTextRange(e);if(!e.isMultiLine()&&r===":"){var l=n.getCursorPosition(),c=new s(t,l.row,l.column),u=c.getCurrentToken();if(u&&u.value.match(/\s+/)&&(u=c.stepBackward()),u&&u.type==="support.type"){var g=t.doc.getLine(e.start.row),p=g.substring(e.end.column,e.end.column+1);if(p===";")return e.end.column++,e}}}),this.add("semicolon","insertion",function(o,i,n,t,e){if(e===";"&&n.selection.isEmpty()){var r=n.getCursorPosition(),l=t.doc.getLine(r.row),c=l.substring(r.column,r.column+1);if(c===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(o,i,n,t,e){if(e==="!"&&n.selection.isEmpty()){var r=n.getCursorPosition(),l=t.doc.getLine(r.row);if(/^\s*(;|}|$)/.test(l.substring(r.column)))return{text:"!important",selection:[10,10]}}})};$.inherits(a,h),v.CssBehaviour=a});ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(d,v,R){"use strict";var $=d("../lib/oop"),b=d("./text").Mode,h=d("./css_highlight_rules").CssHighlightRules,s=d("./matching_brace_outdent").MatchingBraceOutdent,a=d("../worker/worker_client").WorkerClient,o=d("./css_completions").CssCompletions,i=d("./behaviour/css").CssBehaviour,n=d("./folding/cstyle").FoldMode,t=function(){this.HighlightRules=h,this.$outdent=new s,this.$behaviour=new i,this.$completer=new o,this.foldingRules=new n};$.inherits(t,b),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,r,l){var c=this.$getIndent(r),u=this.getTokenizer().getLineTokens(r,e).tokens;if(u.length&&u[u.length-1].type=="comment")return c;var g=r.match(/^.*\{\s*$/);return g&&(c+=l),c},this.checkOutdent=function(e,r,l){return this.$outdent.checkOutdent(r,l)},this.autoOutdent=function(e,r,l){this.$outdent.autoOutdent(r,l)},this.getCompletions=function(e,r,l,c){return this.$completer.getCompletions(e,r,l,c)},this.createWorker=function(e){var r=new a(["ace"],"ace/mode/css_worker","Worker");return r.attachToDocument(e.getDocument()),r.on("annotate",function(l){e.setAnnotations(l.data)}),r.on("terminate",function(){e.clearAnnotations()}),r},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(t.prototype),v.Mode=t});ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(d,v,R){"use strict";var $=d("../lib/oop"),b=d("./text_highlight_rules").TextHighlightRules,h=function(s){var a="[_:a-zA-Z\xC0-\uFFFF][-_:.a-zA-Z0-9\xC0-\uFFFF]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+a+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+a+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:a},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===h&&this.normalizeRules()};(function(){this.embedTagRules=function(s,a,o){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+o+".tag-name.xml"],regex:"(<)("+o+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:a+"start"}]}),this.$rules[o+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(i,n,t){return t.splice(0),this.token}}],this.embedRules(s,a,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+o+".tag-name.xml"],regex:"(|$))",next:o+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(b.prototype),$.inherits(h,b),v.XmlHighlightRules=h});ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(d,v,R){"use strict";var $=d("../lib/oop"),b=d("../lib/lang"),h=d("./css_highlight_rules").CssHighlightRules,s=d("./javascript_highlight_rules").JavaScriptHighlightRules,a=d("./xml_highlight_rules").XmlHighlightRules,o=b.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),i=function(){a.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(n,t){var e=o[t];return["meta.tag.punctuation."+(n=="<"?"":"end-")+"tag-open.xml","meta.tag"+(e?"."+e:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(h,"css-","style"),this.embedTagRules(new s({jsx:!1}).getRules(),"js-","script"),this.constructor===i&&this.normalizeRules()};$.inherits(i,a),v.HtmlHighlightRules=i});ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(d,v,R){"use strict";var $=d("../../lib/oop"),b=d("./fold_mode").FoldMode,h=v.FoldMode=function(s,a){this.defaultMode=s,this.subModes=a};$.inherits(h,b),(function(){this.$getMode=function(s){typeof s!="string"&&(s=s[0]);for(var a in this.subModes)if(s.indexOf(a)===0)return this.subModes[a];return null},this.$tryMode=function(s,a,o,i){var n=this.$getMode(s);return n?n.getFoldWidget(a,o,i):""},this.getFoldWidget=function(s,a,o){return this.$tryMode(s.getState(o-1),s,a,o)||this.$tryMode(s.getState(o),s,a,o)||this.defaultMode.getFoldWidget(s,a,o)},this.getFoldWidgetRange=function(s,a,o){var i=this.$getMode(s.getState(o-1));return(!i||!i.getFoldWidget(s,a,o))&&(i=this.$getMode(s.getState(o))),(!i||!i.getFoldWidget(s,a,o))&&(i=this.defaultMode),i.getFoldWidgetRange(s,a,o)}}).call(h.prototype)});ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(d,v,R){"use strict";var $=d("../../lib/oop"),b=d("./mixed").FoldMode,h=d("./xml").FoldMode,s=d("./cstyle").FoldMode,a=v.FoldMode=function(o,i){b.call(this,new h(o,i),{"js-":new s,"css-":new s})};$.inherits(a,b)});ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(d,v,R){"use strict";var $=d("../token_iterator").TokenIterator,b=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],h=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],s=b.concat(h),a={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,for:1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{for:1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,default:1},section:{},summary:{},u:{},ul:{},var:{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},o=Object.keys(a);function i(r,l){return r.type.lastIndexOf(l+".xml")>-1}function n(r,l){for(var c=new $(r,l.row,l.column),u=c.getCurrentToken();u&&!i(u,"tag-name");)u=c.stepBackward();if(u)return u.value}function t(r,l){for(var c=new $(r,l.row,l.column),u=c.getCurrentToken();u&&!i(u,"attribute-name");)u=c.stepBackward();if(u)return u.value}var e=function(){};(function(){this.getCompletions=function(r,l,c,u){var g=l.getTokenAt(c.row,c.column);if(!g)return[];if(i(g,"tag-name")||i(g,"tag-open")||i(g,"end-tag-open"))return this.getTagCompletions(r,l,c,u);if(i(g,"tag-whitespace")||i(g,"attribute-name"))return this.getAttributeCompletions(r,l,c,u);if(i(g,"attribute-value"))return this.getAttributeValueCompletions(r,l,c,u);var p=l.getLine(c.row).substr(0,c.column);return/&[a-z]*$/i.test(p)?this.getHTMLEntityCompletions(r,l,c,u):[]},this.getTagCompletions=function(r,l,c,u){return o.map(function(g){return{value:g,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(r,l,c,u){var g=n(l,c);if(!g)return[];var p=s;return g in a&&(p=p.concat(Object.keys(a[g]))),p.map(function(w){return{caption:w,snippet:w+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(r,l,c,u){var g=n(l,c),p=t(l,c);if(!g)return[];var w=[];return g in a&&p in a[g]&&typeof a[g][p]=="object"&&(w=Object.keys(a[g][p])),w.map(function(k){return{caption:k,snippet:k,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(r,l,c,u){var g=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return g.map(function(p){return{caption:p,snippet:p,meta:"html entity",score:1e6}})}}).call(e.prototype),v.HtmlCompletions=e});ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(d,v,R){"use strict";var $=d("../lib/oop"),b=d("../lib/lang"),h=d("./text").Mode,s=d("./javascript").Mode,a=d("./css").Mode,o=d("./html_highlight_rules").HtmlHighlightRules,i=d("./behaviour/xml").XmlBehaviour,n=d("./folding/html").FoldMode,t=d("./html_completions").HtmlCompletions,e=d("../worker/worker_client").WorkerClient,r=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],l=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],c=function(u){this.fragmentContext=u&&u.fragmentContext,this.HighlightRules=o,this.$behaviour=new i,this.$completer=new t,this.createModeDelegates({"js-":s,"css-":a}),this.foldingRules=new n(this.voidElements,b.arrayToMap(l))};$.inherits(c,h),(function(){this.blockComment={start:""},this.voidElements=b.arrayToMap(r),this.getNextLineIndent=function(u,g,p){return this.$getIndent(g)},this.checkOutdent=function(u,g,p){return!1},this.getCompletions=function(u,g,p,w){return this.$completer.getCompletions(u,g,p,w)},this.createWorker=function(u){if(this.constructor==c){var g=new e(["ace"],"ace/mode/html_worker","Worker");return g.attachToDocument(u.getDocument()),this.fragmentContext&&g.call("setOptions",[{context:this.fragmentContext}]),g.on("error",function(p){u.setAnnotations(p.data)}),g.on("terminate",function(){u.clearAnnotations()}),g}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(c.prototype),v.Mode=c});(function(){ace.require(["ace/mode/html"],function(d){typeof ve=="object"&&typeof Ze=="object"&&ve&&(ve.exports=d)})})()});var Je=re((Xe,ye)=>{ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(d,v,R){"use strict";var $=d("../lib/oop"),b=d("../lib/lang"),h=d("./text_highlight_rules").TextHighlightRules,s=v.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",a=v.supportFunction="rgb|rgba|url|attr|counter|counters",o=v.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",i=v.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",n=v.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",t=v.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",e=v.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",r=v.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",l=function(){var c=this.createKeywordMapper({"support.function":a,"support.constant":o,"support.type":s,"support.constant.color":i,"support.constant.fonts":n},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:t},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+t+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:t},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:e},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:r},{include:"url"},{token:c,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};$.inherits(l,h),v.CssHighlightRules=l});ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(d,v,R){"use strict";var $=d("../range").Range,b=function(){};(function(){this.checkOutdent=function(h,s){return/^\s+$/.test(h)?/^\s*\}/.test(s):!1},this.autoOutdent=function(h,s){var a=h.getLine(s),o=a.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,n=h.findMatchingBracket({row:s,column:i});if(!n||n.row==s)return 0;var t=this.$getIndent(h.getLine(n.row));h.replace(new $(s,0,s,i-1),t)},this.$getIndent=function(h){return h.match(/^\s*/)[0]}}).call(b.prototype),v.MatchingBraceOutdent=b});ace.define("ace/mode/css_completions",["require","exports","module"],function(d,v,R){"use strict";var $={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},b=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var h=document.createElement("c").style;for(var s in h)if(typeof h[s]=="string"){var a=s.replace(/[A-Z]/g,function(o){return"-"+o.toLowerCase()});$.hasOwnProperty(a)||($[a]=1)}}this.completionsDefined=!0},this.getCompletions=function(h,s,a,o){if(this.completionsDefined||this.defineCompletions(),h==="ruleset"||s.$mode.$id=="ace/mode/scss"){var i=s.getLine(a.row).substr(0,a.column),n=/\([^)]*$/.test(i);return n&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(h,s,a,o)):this.getPropertyCompletions(h,s,a,o,n)}return[]},this.getPropertyCompletions=function(h,s,a,o,i){i=i||!1;var n=Object.keys($);return n.map(function(t){return{caption:t,snippet:t+": $0"+(i?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(h,s,a,o){var i=s.getLine(a.row).substr(0,a.column),n=(/([\w\-]+):[^:]*$/.exec(i)||{})[1];if(!n)return[];var t=[];return n in $&&typeof $[n]=="object"&&(t=Object.keys($[n])),t.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(b.prototype),v.CssCompletions=b});ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(d,v,R){"use strict";var $=d("../../lib/oop"),b=d("../behaviour").Behaviour,h=d("./cstyle").CstyleBehaviour,s=d("../../token_iterator").TokenIterator,a=function(){this.inherit(h),this.add("colon","insertion",function(o,i,n,t,e){if(e===":"&&n.selection.isEmpty()){var r=n.getCursorPosition(),l=new s(t,r.row,r.column),c=l.getCurrentToken();if(c&&c.value.match(/\s+/)&&(c=l.stepBackward()),c&&c.type==="support.type"){var u=t.doc.getLine(r.row),g=u.substring(r.column,r.column+1);if(g===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(u.substring(r.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(o,i,n,t,e){var r=t.doc.getTextRange(e);if(!e.isMultiLine()&&r===":"){var l=n.getCursorPosition(),c=new s(t,l.row,l.column),u=c.getCurrentToken();if(u&&u.value.match(/\s+/)&&(u=c.stepBackward()),u&&u.type==="support.type"){var g=t.doc.getLine(e.start.row),p=g.substring(e.end.column,e.end.column+1);if(p===";")return e.end.column++,e}}}),this.add("semicolon","insertion",function(o,i,n,t,e){if(e===";"&&n.selection.isEmpty()){var r=n.getCursorPosition(),l=t.doc.getLine(r.row),c=l.substring(r.column,r.column+1);if(c===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(o,i,n,t,e){if(e==="!"&&n.selection.isEmpty()){var r=n.getCursorPosition(),l=t.doc.getLine(r.row);if(/^\s*(;|}|$)/.test(l.substring(r.column)))return{text:"!important",selection:[10,10]}}})};$.inherits(a,h),v.CssBehaviour=a});ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(d,v,R){"use strict";var $=d("../../lib/oop"),b=d("../../range").Range,h=d("./fold_mode").FoldMode,s=v.FoldMode=function(a){a&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+a.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+a.end)))};$.inherits(s,h),(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(a,o,i){var n=a.getLine(i);if(this.singleLineBlockCommentRe.test(n)&&!this.startRegionRe.test(n)&&!this.tripleStarBlockCommentRe.test(n))return"";var t=this._getFoldWidgetBase(a,o,i);return!t&&this.startRegionRe.test(n)?"start":t},this.getFoldWidgetRange=function(a,o,i,n){var t=a.getLine(i);if(this.startRegionRe.test(t))return this.getCommentRegionBlock(a,t,i);var l=t.match(this.foldingStartMarker);if(l){var e=l.index;if(l[1])return this.openingBracketBlock(a,l[1],i,e);var r=a.getCommentFoldRange(i,e+l[0].length,1);return r&&!r.isMultiLine()&&(n?r=this.getSectionRange(a,i):o!="all"&&(r=null)),r}if(o!=="markbegin"){var l=t.match(this.foldingStopMarker);if(l){var e=l.index+l[0].length;return l[1]?this.closingBracketBlock(a,l[1],i,e):a.getCommentFoldRange(i,e,-1)}}},this.getSectionRange=function(a,o){var i=a.getLine(o),n=i.search(/\S/),t=o,e=i.length;o=o+1;for(var r=o,l=a.getLength();++oc)break;var u=this.getFoldWidgetRange(a,"all",o);if(u){if(u.start.row<=t)break;if(u.isMultiLine())o=u.end.row;else if(n==c)break}r=o}}return new b(t,e,r,a.getLine(r).length)},this.getCommentRegionBlock=function(a,o,i){for(var n=o.search(/\s*$/),t=a.getLength(),e=i,r=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++ie)return new b(e,n,u,o.length)}}).call(s.prototype)});ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(d,v,R){"use strict";var $=d("../lib/oop"),b=d("./text").Mode,h=d("./css_highlight_rules").CssHighlightRules,s=d("./matching_brace_outdent").MatchingBraceOutdent,a=d("../worker/worker_client").WorkerClient,o=d("./css_completions").CssCompletions,i=d("./behaviour/css").CssBehaviour,n=d("./folding/cstyle").FoldMode,t=function(){this.HighlightRules=h,this.$outdent=new s,this.$behaviour=new i,this.$completer=new o,this.foldingRules=new n};$.inherits(t,b),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,r,l){var c=this.$getIndent(r),u=this.getTokenizer().getLineTokens(r,e).tokens;if(u.length&&u[u.length-1].type=="comment")return c;var g=r.match(/^.*\{\s*$/);return g&&(c+=l),c},this.checkOutdent=function(e,r,l){return this.$outdent.checkOutdent(r,l)},this.autoOutdent=function(e,r,l){this.$outdent.autoOutdent(r,l)},this.getCompletions=function(e,r,l,c){return this.$completer.getCompletions(e,r,l,c)},this.createWorker=function(e){var r=new a(["ace"],"ace/mode/css_worker","Worker");return r.attachToDocument(e.getDocument()),r.on("annotate",function(l){e.setAnnotations(l.data)}),r.on("terminate",function(){e.clearAnnotations()}),r},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(t.prototype),v.Mode=t});(function(){ace.require(["ace/mode/css"],function(d){typeof ye=="object"&&typeof Xe=="object"&&ye&&(ye.exports=d)})})()});var et=re((qe,be)=>{ace.define("ace/mode/yaml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(d,v,R){"use strict";var $=d("../lib/oop"),b=d("./text_highlight_rules").TextHighlightRules,h=function(){this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"list.markup",regex:/^(?:-{3}|\.{3})\s*(?=#|$)/},{token:"list.markup",regex:/^\s*[\-?](?:$|\s)/},{token:"constant",regex:"!![\\w//]+"},{token:"constant.language",regex:"[&\\*][a-zA-Z0-9-_]+"},{token:["meta.tag","keyword"],regex:/^(\s*\w[^\s:]*?)(:(?=\s|$))/},{token:["meta.tag","keyword"],regex:/(\w[^\s:]*?)(\s*:(?=\s|$))/},{token:"keyword.operator",regex:"<<\\w*:\\w*"},{token:"keyword.operator",regex:"-\\s*(?=[{])"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:/[|>][-+\d]*(?:$|\s+(?:$|#))/,onMatch:function(s,a,o,i){i=i.replace(/ #.*/,"");var n=/^ *((:\s*)?-(\s*[^|>])?)?/.exec(i)[0].replace(/\S\s*$/,"").length,t=parseInt(/\d+[\s+-]*$/.exec(i));return t?(n+=t-1,this.next="mlString"):this.next="mlStringPre",o.length?(o[0]=this.next,o[1]=n):(o.push(this.next),o.push(n)),this.token},next:"mlString"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:/(\b|[+\-\.])[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)(?=[^\d-\w]|$)$/},{token:"constant.numeric",regex:/[+\-]?\.inf\b|NaN\b|0x[\dA-Fa-f_]+|0b[10_]+/},{token:"constant.language.boolean",regex:"\\b(?:true|false|TRUE|FALSE|True|False|yes|no)\\b"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:/[^\s,:\[\]\{\}]+/}],mlStringPre:[{token:"indent",regex:/^ *$/},{token:"indent",regex:/^ */,onMatch:function(s,a,o){var i=o[1];return i>=s.length?(this.next="start",o.shift(),o.shift()):(o[1]=s.length-1,this.next=o[0]="mlString"),this.token},next:"mlString"},{defaultToken:"string"}],mlString:[{token:"indent",regex:/^ *$/},{token:"indent",regex:/^ */,onMatch:function(s,a,o){var i=o[1];return i>=s.length?(this.next="start",o.splice(0)):this.next="mlString",this.token},next:"mlString"},{token:"string",regex:".+"}]},this.normalizeRules()};$.inherits(h,b),v.YamlHighlightRules=h});ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(d,v,R){"use strict";var $=d("../range").Range,b=function(){};(function(){this.checkOutdent=function(h,s){return/^\s+$/.test(h)?/^\s*\}/.test(s):!1},this.autoOutdent=function(h,s){var a=h.getLine(s),o=a.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,n=h.findMatchingBracket({row:s,column:i});if(!n||n.row==s)return 0;var t=this.$getIndent(h.getLine(n.row));h.replace(new $(s,0,s,i-1),t)},this.$getIndent=function(h){return h.match(/^\s*/)[0]}}).call(b.prototype),v.MatchingBraceOutdent=b});ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(d,v,R){"use strict";var $=d("../../lib/oop"),b=d("./fold_mode").FoldMode,h=d("../../range").Range,s=v.FoldMode=function(){};$.inherits(s,b),(function(){this.commentBlock=function(a,o){var i=/\S/,n=a.getLine(o),t=n.search(i);if(!(t==-1||n[t]!="#")){for(var e=n.length,r=a.getLength(),l=o,c=o;++ol){var g=a.getLine(c).length;return new h(l,e,c,g)}}},this.getFoldWidgetRange=function(a,o,i){var n=this.indentationBlock(a,i);if(n||(n=this.commentBlock(a,i),n))return n},this.getFoldWidget=function(a,o,i){var n=a.getLine(i),t=n.search(/\S/),e=a.getLine(i+1),r=a.getLine(i-1),l=r.search(/\S/),c=e.search(/\S/);if(t==-1)return a.foldWidgets[i-1]=l!=-1&&lg){var A=a.getLine(p).length;return new h(g,c,p,A)}}},this.getFoldWidget=function(a,o,i){var n=a.getLine(i),t=n.search(/\S/),e=a.getLine(i+1),r=a.getLine(i-1),l=r.search(/\S/),c=e.search(/\S/),u=n[t]==="-";if(t==-1)return a.foldWidgets[i-1]=l!=-1&&l{ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(d,v,R){"use strict";var $=d("../lib/oop"),b=d("./text_highlight_rules").TextHighlightRules,h=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"}]}};$.inherits(h,b),v.JsonHighlightRules=h});ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(d,v,R){"use strict";var $=d("../range").Range,b=function(){};(function(){this.checkOutdent=function(h,s){return/^\s+$/.test(h)?/^\s*\}/.test(s):!1},this.autoOutdent=function(h,s){var a=h.getLine(s),o=a.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,n=h.findMatchingBracket({row:s,column:i});if(!n||n.row==s)return 0;var t=this.$getIndent(h.getLine(n.row));h.replace(new $(s,0,s,i-1),t)},this.$getIndent=function(h){return h.match(/^\s*/)[0]}}).call(b.prototype),v.MatchingBraceOutdent=b});ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(d,v,R){"use strict";var $=d("../../lib/oop"),b=d("../../range").Range,h=d("./fold_mode").FoldMode,s=v.FoldMode=function(a){a&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+a.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+a.end)))};$.inherits(s,h),(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(a,o,i){var n=a.getLine(i);if(this.singleLineBlockCommentRe.test(n)&&!this.startRegionRe.test(n)&&!this.tripleStarBlockCommentRe.test(n))return"";var t=this._getFoldWidgetBase(a,o,i);return!t&&this.startRegionRe.test(n)?"start":t},this.getFoldWidgetRange=function(a,o,i,n){var t=a.getLine(i);if(this.startRegionRe.test(t))return this.getCommentRegionBlock(a,t,i);var l=t.match(this.foldingStartMarker);if(l){var e=l.index;if(l[1])return this.openingBracketBlock(a,l[1],i,e);var r=a.getCommentFoldRange(i,e+l[0].length,1);return r&&!r.isMultiLine()&&(n?r=this.getSectionRange(a,i):o!="all"&&(r=null)),r}if(o!=="markbegin"){var l=t.match(this.foldingStopMarker);if(l){var e=l.index+l[0].length;return l[1]?this.closingBracketBlock(a,l[1],i,e):a.getCommentFoldRange(i,e,-1)}}},this.getSectionRange=function(a,o){var i=a.getLine(o),n=i.search(/\S/),t=o,e=i.length;o=o+1;for(var r=o,l=a.getLength();++oc)break;var u=this.getFoldWidgetRange(a,"all",o);if(u){if(u.start.row<=t)break;if(u.isMultiLine())o=u.end.row;else if(n==c)break}r=o}}return new b(t,e,r,a.getLine(r).length)},this.getCommentRegionBlock=function(a,o,i){for(var n=o.search(/\s*$/),t=a.getLength(),e=i,r=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++ie)return new b(e,n,u,o.length)}}).call(s.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(d,v,R){"use strict";var $=d("../lib/oop"),b=d("./text").Mode,h=d("./json_highlight_rules").JsonHighlightRules,s=d("./matching_brace_outdent").MatchingBraceOutdent,a=d("./folding/cstyle").FoldMode,o=d("../worker/worker_client").WorkerClient,i=function(){this.HighlightRules=h,this.$outdent=new s,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new a};$.inherits(i,b),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(n,t,e){var r=this.$getIndent(t);if(n=="start"){var l=t.match(/^.*[\{\(\[]\s*$/);l&&(r+=e)}return r},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 o(["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),v.Mode=i});(function(){ace.require(["ace/mode/json"],function(d){typeof we=="object"&&typeof tt=="object"&&we&&(we.exports=d)})})()});var rt=re((it,xe)=>{ace.define("ace/theme/monokai-css",["require","exports","module"],function(d,v,R){R.exports=`.ace-monokai .ace_gutter { background: #2F3129; color: #8F908A } .ace-monokai .ace_print-margin { width: 1px; background: #555651 } .ace-monokai { background-color: #272822; color: #F8F8F2 } .ace-monokai .ace_cursor { color: #F8F8F0 } .ace-monokai .ace_marker-layer .ace_selection { background: #49483E } .ace-monokai.ace_multiselect .ace_selection.ace_start { box-shadow: 0 0 3px 0px #272822; } .ace-monokai .ace_marker-layer .ace_step { background: rgb(102, 82, 0) } .ace-monokai .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid #49483E } .ace-monokai .ace_marker-layer .ace_active-line { background: #202020 } .ace-monokai .ace_gutter-active-line { background-color: #272727 } .ace-monokai .ace_marker-layer .ace_selected-word { border: 1px solid #49483E } .ace-monokai .ace_invisible { color: #52524d } .ace-monokai .ace_entity.ace_name.ace_tag, .ace-monokai .ace_keyword, .ace-monokai .ace_meta.ace_tag, .ace-monokai .ace_storage { color: #F92672 } .ace-monokai .ace_punctuation, .ace-monokai .ace_punctuation.ace_tag { color: #fff } .ace-monokai .ace_constant.ace_character, .ace-monokai .ace_constant.ace_language, .ace-monokai .ace_constant.ace_numeric, .ace-monokai .ace_constant.ace_other { color: #AE81FF } .ace-monokai .ace_invalid { color: #F8F8F0; background-color: #F92672 } .ace-monokai .ace_invalid.ace_deprecated { color: #F8F8F0; background-color: #AE81FF } .ace-monokai .ace_support.ace_constant, .ace-monokai .ace_support.ace_function { color: #66D9EF } .ace-monokai .ace_fold { background-color: #A6E22E; border-color: #F8F8F2 } .ace-monokai .ace_storage.ace_type, .ace-monokai .ace_support.ace_class, .ace-monokai .ace_support.ace_type { font-style: italic; color: #66D9EF } .ace-monokai .ace_entity.ace_name.ace_function, .ace-monokai .ace_entity.ace_other, .ace-monokai .ace_entity.ace_other.ace_attribute-name, .ace-monokai .ace_variable { color: #A6E22E } .ace-monokai .ace_variable.ace_parameter { font-style: italic; color: #FD971F } .ace-monokai .ace_string { color: #E6DB74 } .ace-monokai .ace_comment { color: #75715E } .ace-monokai .ace_indent-guide { background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ0FD0ZXBzd/wPAAjVAoxeSgNeAAAAAElFTkSuQmCC) right repeat-y } .ace-monokai .ace_indent-guide-active { background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y; } `});ace.define("ace/theme/monokai",["require","exports","module","ace/theme/monokai-css","ace/lib/dom"],function(d,v,R){v.isDark=!0,v.cssClass="ace-monokai",v.cssText=d("./monokai-css");var $=d("../lib/dom");$.importCssString(v.cssText,v.cssClass,!1)});(function(){ace.require(["ace/theme/monokai"],function(d){typeof xe=="object"&&typeof it=="object"&&xe&&(xe.exports=d)})})()});var Oe=oe(Ge(),1),ci=oe(Ye(),1),ui=oe(Qe(),1),hi=oe(Je(),1),di=oe(et(),1),fi=oe(nt(),1),gi=oe(rt(),1);function ot(){return{contentEditorPanel:document.getElementById("content-editor-panel"),dataEditorPanel:document.getElementById("data-editor-panel"),styleEditorPanel:document.getElementById("style-editor-panel"),scriptEditorPanel:document.getElementById("script-editor-panel"),serverEditorPanel:document.getElementById("server-editor-panel")}}function st(){return{contentTextarea:document.getElementById("content"),dataTextarea:document.getElementById("data"),styleTextarea:document.getElementById("style"),scriptTextarea:document.getElementById("script"),serverTextarea:document.getElementById("server")}}function at(){return{templateSearch:document.getElementById("template-search"),templateDropdown:document.getElementById("template-dropdown")}}function lt(){return{slotSearch:document.getElementById("slot-search"),slotDropdown:document.getElementById("slot-dropdown")}}function ct(){return{statusIndicator:document.getElementById("status-indicator"),statusText:document.getElementById("status-text")}}function ut(){return document.getElementById("preview")}function se(d,v){let R=v.split("."),$=d;for(let b of R){if($==null||typeof $!="object")return;$=$[b]}return $}function ht(d,v,R){let $=v.split("."),b=$.pop();if(!b)return;let h=d;for(let s of $)(h[s]==null||typeof h[s]!="object")&&(h[s]={}),h=h[s];h[b]=R}function ae(d){return typeof structuredClone=="function"?structuredClone(d):JSON.parse(JSON.stringify(d))}function le(d,v){if(d===v)return!0;if(d==null||v==null)return d===v;if(typeof d!="object"||typeof v!="object")return!1;let R=Array.isArray(d),$=Array.isArray(v);if(R!==$)return!1;if(R){let a=d,o=v;if(a.length!==o.length)return!1;for(let i=0;io(s,a,h)),$.get("*")?.forEach(o=>o(s,a,h))}return{get(h){return se(R,h)},getInitial(h){return se(v,h)},set(h,s){let a=se(R,h),o=Array.isArray(a),i=Array.isArray(s);if(o&&i){if(le(a,s))return}else if(!(o||i)){if(a!=null&&typeof a=="object"&&s!=null&&typeof s=="object"){if(le(a,s))return}else if(Object.is(a,s))return}ht(R,h,s),b(h,s,a)},setSilent(h,s){ht(R,h,s)},watch(h,s){let a=Array.isArray(h)?h:[h??"*"],o=[];for(let i of a){let n=i??"*",t=$.get(n)??new Set;t.add(s),$.set(n,t),o.push(()=>t.delete(s))}return()=>o.forEach(i=>i())},isDirty(h){return h?!le(se(v,h),se(R,h)):!le(v,R)},commit(h,{replaceActive:s=!0}={}){let a=ae(R);if(v=ae(h),s){R=ae(h);let o=new Set([...Ne(a),...Ne(R)]);for(let i of o){let n=se(R,i),t=se(a,i);le(n,t)||b(i,n,t)}}},snapshotActive(){return ae(R)},snapshotInitial(){return ae(v)},debounce(h,s){let{delay:a=400,include:o,exclude:i}=h??{},n=null,t=(e,r,l)=>{i&&l&&i.includes(l)||o&&l&&!o.includes(l)||(n&&clearTimeout(n),n=setTimeout(()=>{s(),n=null},a))};return this.watch(o??void 0,t)}}}function Gt(d,{root:v=document,throwOnMissing:R=!0}={}){let $=new Map;function b(e,r){if(s(r))return`${e}::ace::${r.id||Math.random()}`;let l=r;if(l.id)return`${e}::${l.id}`;let c=l.tagName.toLowerCase(),u=l.parentElement;if(u){let p=Array.from(u.children).filter(w=>w.tagName===l.tagName).indexOf(l);return`${e}::${c}::${p}`}return`${e}::${Math.random()}`}function h(e){return typeof e=="string"?v.querySelector(e):e}function s(e){return e!==null&&typeof e=="object"&&"getValue"in e&&typeof e.getValue=="function"&&"setValue"in e&&typeof e.setValue=="function"}function a(e){return s(e)?e.getValue():e.type==="checkbox"?!!e.checked:e.value}function o(e,r){if(s(e)){e.setValue(r??"",-1);return}e.type==="checkbox"?e.checked=!!r:e.value=r??""}function i(e){return s(e)||e.type==="checkbox"?"change":"input"}function n(e,r,l={}){let c=h(r);if(!c){if(R)throw new Error(`bind(): element not found for ${r}`);return null}let{read:u=a,write:g=o,event:p=i(c),onChange:w}=l;g(c,d.get(e));let k=()=>{let C=u(c);d.set(e,C),typeof w=="function"&&w(C,{path:e,el:c})};p&&(s(c)?c.on(p,k):c.addEventListener(p,k));let y=null;if(l?.onClick){let C=x=>{let m=d.get(e);l.onClick(x,m)};s(c)?(c.on("click",C),y=()=>c.off("click",C)):(c.addEventListener("click",x=>C(x)),y=()=>c.removeEventListener("click",C))}let A=null;if(l?.onBlur){let C=()=>{let x=d.get(e);l.onBlur(x,{path:e,el:c})};s(c)?(c.on("blur",C),A=()=>c.off("blur",C)):(c.addEventListener("blur",C),A=()=>c.removeEventListener("blur",C))}let M=l.writeOnStoreChange!==!1?d.watch(e,C=>{g(c,C)}):()=>{},E={path:e,el:c,sync(){g(c,d.get(e))},destroy(){p&&(s(c)?c.off(p,k):c.removeEventListener(p,k)),y&&y(),A&&A(),M()}},_=b(e,c);return $.has(_)&&$.get(_)?.destroy(),$.set(_,E),E}function t(){for(let e of $.values())e.sync()}return{bind:n,syncAll:t}}function ke(d={}){let v=dt(d),R=Gt(v),$=v.commit.bind(v);return v.commit=(b,h)=>{$(b,h),R.syncAll()},{store:v,binder:R}}function ft(){let d=document.body.getAttribute("data-state");if(!d)throw new Error("No state data found on body element");return JSON.parse(d)}function $e(d){let{document:v,render:R,tabs:$,api:b,tabFilenames:h,contentModifiedByServer:s}=d,a=v.draft??!1;return{draft:{title:v.title||"",mime_type:v.mime_type||"text/html; charset=UTF-8",extension:v.extension||".html",template_id:v.template_id||null,slot_id:v.slot_id||null,content:v.content||"",data:v.data||"{}",style:v.style||"",script:v.script||"",server:v.server||""},save:{path:v.path||"",published:v.published||!1},meta:{api:b||[],currentPath:v.path||"",hasDraft:a,saveDisabled:!a,revertDisabled:!a,documentId:v.id||0,disableIfDocumentDoesNotExist:!v.id,redirects:v.redirects||[],uploads:v.uploads||[],html:R.html||"",template:v.template||null,slot:v.slot||null,tabs:$,tabFilenames:h||{content:"content.md",data:"data.json",style:"style.css",script:"script.js",server:"server.js",settings:"settings"},contentModifiedByServer:s||!1}}}function Z(d){return d==null?"":d.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function gt(d,v=90){if(d==null)return"";if(d.length<=v)return d;if(v<=1)return"\u2026";let R=v-1,$=Math.ceil(R/2),b=Math.floor(R/2);return`${d.slice(0,$)}\u2026${d.slice(-b)}`}function te(d){return d==="/"?"/edit":`${d}/edit`}function Kt(d){if(typeof window>"u")return d;let v=new URL(window.location.href);if(!v.search)return d;let R=new URL(d,v.origin);for(let[$,b]of v.searchParams.entries())R.searchParams.has($)||R.searchParams.append($,b);return`${R.pathname}${R.search}`}function Ce(d){return Kt(te(d))}function Se(d,v){let R=d.querySelector(v);R&&R.closest("tr")?.remove()}var Me=class{constructor(v){Ue(this,"opts");this.opts=v}get editUrl(){let v=this.opts.save.store.getInitial("path");return Ce(v)}async handleResponse(v,R){let{updateDraft:$,updateSave:b,replaceActiveDraft:h=!0}=R;if(!v.ok)throw new Error(`Request failed: ${v.status} ${v.statusText}`);let s=await v.json(),a=$e(s),o=a.meta.contentModifiedByServer;$&&(o&&!h?(this.opts.draft.store.commit(a.draft,{replaceActive:!1}),this.opts.draft.store.setSilent("content",a.draft.content),this.opts.draft.binder.syncAll()):this.opts.draft.store.commit(a.draft,{replaceActive:h})),b&&this.opts.save.store.commit(a.save),this.opts.meta.store.commit(a.meta)}async fetch(v){try{this.opts.meta.store.set("status",{message:v.startMessage});let R=await fetch(this.editUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(v.payload)});await this.handleResponse(R,{updateDraft:v.updateDraft,updateSave:v.updateSave,replaceActiveDraft:v.replaceActiveDraft}),this.opts.meta.store.set("status",{message:v.endMessage})}catch(R){this.opts.meta.store.set("toast",{message:"Error",details:R.message})}}async revert(){return this.fetch({payload:{draft:!1},startMessage:"Reverting...",endMessage:"Reverted",updateDraft:!0,updateSave:!0})}async publish(){return this.fetch({payload:{published:!this.opts.save.store.get("published")},startMessage:this.opts.save.store.get("published")?"Unpublishing...":"Publishing...",endMessage:"Done!",updateDraft:!0,updateSave:!0})}async save(){return await this.fetch({payload:{...this.opts.draft.store.snapshotActive(),...this.opts.save.store.snapshotActive(),draft:!1},startMessage:"Saving...",endMessage:"Saved!",updateDraft:!0,updateSave:!0})}async draft(){if(this.opts.draft.store.isDirty())return this.fetch({payload:{path:this.opts.save.store.get("path"),...this.opts.draft.store.snapshotActive(),draft:!0},startMessage:"Saving Draft...",endMessage:"Draft Saved!",updateDraft:!0,replaceActiveDraft:!1})}};function We(d){d.define("ace/theme/monokai_custom",["require","exports","module","ace/lib/dom"],function(v,R){let $=v("ace/lib/dom");R.isDark=!0,R.cssClass="ace-monokai-custom",R.cssText=`/* Custom Monokai w/ Markdown Heading Support */ .ace-monokai-custom .ace_gutter { background: #2F3129; color: #8F908A; } .ace-monokai-custom { background-color: #272822; color: #F8F8F2; font-family: Monaco, Menlo, "SF Mono", Consolas, "Liberation Mono", "Courier New", monospace; } .ace-monokai-custom .ace_cursor { color: #F8F8F0; } .ace-monokai-custom .ace_marker-layer .ace_selection { background: #49483E; } .ace-monokai-custom .ace_marker-layer .ace_active-line { background: #202020; } .ace-monokai-custom .ace_keyword { color: #F92672; } .ace-monokai-custom .ace_constant.ace_language { color: #F92672; font-weight: 600; } .ace-monokai-custom .ace_constant.ace_numeric { color: #AE81FF; } .ace-monokai-custom .ace_string { color: #E6DB74; } .ace-monokai-custom .ace_comment { color: #A6A6A6; } .ace-monokai-custom .ace_entity.ace_name.ace_function, .ace-monokai-custom .ace_support.ace_function, .ace-monokai-custom .ace_storage { color: #66D9EF; } .ace-monokai-custom .ace_markup.ace_heading { color: #F92672; font-weight: 700; } .ace-monokai-custom .ace_markup.ace_list { color: #A6E22E; } .ace-monokai-custom .ace_markup.ace_quote, .ace-monokai-custom .ace_quote { color: #66D9EF; font-style: italic; } .ace-monokai-custom .ace_italic { font-style: italic; color: #F8F8F2; } .ace-monokai-custom .ace_bold { font-weight: 700 !important; color: #F8F8F2; text-shadow: 0 0 0.5px #F8F8F2, 0 0 0.5px #F8F8F2; } .ace-monokai-custom .ace_markup.ace_underline { text-decoration: underline; } .ace-monokai-custom .ace_support.ace_constant { color: #66D9EF; } .ace-monokai-custom .ace_invalid { color: #F8F8F2; background-color: #F92672; } .ace-monokai-custom .ace_markup.ace_link { color: #66D9EF; text-decoration: underline; } .ace-monokai-custom .ace_variable { color: #FD971F; } .ace-monokai-custom .ace_paren.ace_lparen, .ace-monokai-custom .ace_paren.ace_rparen { color: #F8F8F2; } .ace-monokai-custom .ace_meta.ace_tag { color: #F92672; } .ace-monokai-custom .ace_entity.ace_name.ace_tag { color: #A6E22E; font-weight: 600; } .ace-monokai-custom .ace_entity.ace_other.ace_attribute-name { color: #FD971F; } .ace-monokai-custom .ace_string.ace_attribute-value { color: #E6DB74; } .ace-monokai-custom .ace_text { color: #F8F8F2; } .ace-monokai-custom .ace_punctuation.ace_tag-close { color: #F92672; } .ace-monokai-custom .ace_tag-open { color: #F92672; } .ace-monokai-custom .ace_tag-name { color: #A6E22E; font-weight: 600; } .ace-monokai-custom .ace_attribute-name { color: #FD971F; } .ace-monokai-custom .ace_attribute-value { color: #E6DB74; } `,$.importCssString(R.cssText,R.cssClass)})}function pt(d){d.define("ace/mode/markdown_simple",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/html_highlight_rules"],function(v,R){let $=v("ace/lib/oop"),b=v("ace/mode/text").Mode,h=v("ace/mode/text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"support.function",regex:"^```javascript$",next:"codeblock-js"},{token:"support.function",regex:"^```js$",next:"codeblock-js"},{token:"support.function",regex:"^```\\w+$",next:"codeblock"},{token:"support.function",regex:"^```$",next:"codeblock"},{token:"markup.heading",regex:/^#{1,6}\s+.*$/},{token:"constant.language",regex:"<%[\\-=~]?",next:"ejs"},{token:["constant.numeric","markup.bold","constant.numeric"],regex:"(\\*\\*)([^*]+?)(\\*\\*)"},{token:["constant.numeric","markup.bold","constant.numeric"],regex:"(__)([^_]+?)(__)"},{token:["constant.numeric","markup.italic","constant.numeric"],regex:"(\\*)([^*]+?)(\\*)"},{token:["constant.numeric","markup.italic","constant.numeric"],regex:"(_)([^_]+?)(_)"},{token:["constant.numeric","string","constant.numeric","markup.underline.link","constant.numeric"],regex:"(\\!\\[)([^\\]]*)(\\]\\()([^)]+)(\\))"},{token:["constant.numeric","string","constant.numeric","markup.underline.link","constant.numeric"],regex:"(\\[)([^\\]]+)(\\]\\()([^)]+)(\\))"},{token:["constant.numeric","string.quoted","constant.numeric"],regex:"(`)([^`]+)(`)"},{token:"keyword",regex:"^\\s*[\\-\\*]\\s"},{token:"keyword",regex:"^\\s*\\d+\\.\\s"},{token:"markup.quote",regex:"^>.*$"},{token:"constant",regex:"^(\\*\\*\\*|---|___)$"},{token:"meta.tag",regex:/<(?=[a-zA-Z])/,next:"html-tag-open"},{token:"meta.tag",regex:/<\/(?=[a-zA-Z])/,next:"html-tag-close"}],codeblock:[{token:"support.function",regex:"^```$",next:"start"},{token:"string.quoted",regex:".+"},{defaultToken:"string.quoted"}],"codeblock-js":[{token:"support.function",regex:/^```$/,next:"start"},{token:"source.js",regex:/.+/},{defaultToken:"source.js"}],ejs:[{token:"constant.language",regex:/%>/,next:"start"},{token:"comment.line.double-slash",regex:/\/\/.*$/},{token:"comment.start",regex:/\/\*/,next:"ejs_comment"},{token:"string.quoted.single",regex:/'(?:\\.|[^'])*'/},{token:"string.quoted.double",regex:/"(?:\\.|[^"])*"/},{token:"string.quoted.template",regex:/`(?:\\.|[^`])*`/},{token:"constant.numeric",regex:/\b\d+(?:\.\d+)?\b/},{token:"keyword",regex:/\b(?:if|else|for|while|function|return|let|const|var|new|switch|case|break|continue|in|of|try|catch|finally|throw|class|extends|super|import|from|export|default|this|await|async|yield)\b/},{token:"constant.language",regex:/\b(?:true|false|null|undefined)\b/},{token:"keyword.operator",regex:/[+\-*\/%=!<>|&^~]+/},{token:"paren.lparen",regex:/[({\[]/},{token:"paren.rparen",regex:/[)}\]]/},{token:"punctuation.operator",regex:/[;,.:]/},{token:["punctuation.operator","entity.name.function"],regex:/(\.)([A-Za-z_$][A-Za-z0-9_$]*)(?=\s*\()/},{token:"entity.name.function",regex:/\b(?!if|for|while|switch|catch|function|return|class|new|else|try|finally|throw|import|export|default|await|async|super|this)[A-Za-z_$][A-Za-z0-9_$]*(?=\s*\()/},{token:"identifier",regex:/[A-Za-z_$][A-Za-z0-9_$]*/},{token:"text",regex:/\s+/},{defaultToken:"source.js"}],ejs_comment:[{token:"comment.end",regex:/\*\//,next:"ejs"},{token:"comment.block",regex:/.+/},{defaultToken:"comment.block"}],"html-tag-open":[{token:"constant.language",regex:/<%[\-=~]?/,next:"html-tag-ejs"},{token:"entity.name.tag",regex:/[a-zA-Z0-9_\-:]+/,next:"html-tag-attributes"}],"html-tag-close":[{token:"entity.name.tag",regex:/[a-zA-Z0-9_\-:]+/},{token:"meta.tag",regex:/>/,next:"start"}],"html-tag-attributes":[{token:"constant.language",regex:/<%[\-=~]?/,next:"html-tag-ejs"},{token:"meta.tag",regex:/\/?>/,next:"start"},{token:"entity.other.attribute-name",regex:/[a-zA-Z0-9_\-:]+/},{token:"keyword.operator",regex:/=/},{token:"string.quoted.double",regex:/"/,next:"html-attr-value-double"},{token:"string.quoted.single",regex:/'/,next:"html-attr-value-single"},{token:"text",regex:/\s+/}],"html-attr-value-double":[{token:"constant.language",regex:/<%[\-=~]?/,next:"html-attr-value-ejs-double"},{token:"string.quoted.double",regex:/"/,next:"html-tag-attributes"},{token:"string.quoted.double",regex:/[^"<%]+/},{defaultToken:"string.quoted.double"}],"html-attr-value-single":[{token:"constant.language",regex:/<%[\-=~]?/,next:"html-attr-value-ejs-single"},{token:"string.quoted.single",regex:/'/,next:"html-tag-attributes"},{token:"string.quoted.single",regex:/[^'<%]+/},{defaultToken:"string.quoted.single"}],"html-attr-value-ejs-double":[{token:"constant.language",regex:/%>/,next:"html-attr-value-double"},{token:"comment.line.double-slash",regex:/\/\/.*$/},{token:"string.quoted.single",regex:/'(?:\\.|[^'])*'/},{token:"string.quoted.double",regex:/"(?:\\.|[^"])*"/},{token:"constant.numeric",regex:/\b\d+(?:\.\d+)?\b/},{token:"keyword",regex:/\b(?:if|else|for|while|function|return|let|const|var|new|switch|case|break|continue|in|of|try|catch|finally|throw|class|extends|super|import|from|export|default|this|await|async|yield)\b/},{token:"constant.language",regex:/\b(?:true|false|null|undefined)\b/},{token:"keyword.operator",regex:/[+\-*\/%=!<>|&^~]+/},{token:"paren.lparen",regex:/[({\[]/},{token:"paren.rparen",regex:/[)}\]]/},{token:"punctuation.operator",regex:/[;,.:]/},{token:["punctuation.operator","entity.name.function"],regex:/(\.)([A-Za-z_$][A-Za-z0-9_$]*)(?=\s*\()/},{token:"entity.name.function",regex:/\b(?!if|for|while|switch|catch|function|return|class|new|else|try|finally|throw|import|export|default|await|async|super|this)[A-Za-z_$][A-Za-z0-9_$]*(?=\s*\()/},{token:"identifier",regex:/[A-Za-z_$][A-Za-z0-9_$]*/},{token:"text",regex:/\s+/},{defaultToken:"source.js"}],"html-attr-value-ejs-single":[{token:"constant.language",regex:/%>/,next:"html-attr-value-single"},{token:"comment.line.double-slash",regex:/\/\/.*$/},{token:"string.quoted.single",regex:/'(?:\\.|[^'])*'/},{token:"string.quoted.double",regex:/"(?:\\.|[^"])*"/},{token:"constant.numeric",regex:/\b\d+(?:\.\d+)?\b/},{token:"keyword",regex:/\b(?:if|else|for|while|function|return|let|const|var|new|switch|case|break|continue|in|of|try|catch|finally|throw|class|extends|super|import|from|export|default|this|await|async|yield)\b/},{token:"constant.language",regex:/\b(?:true|false|null|undefined)\b/},{token:"keyword.operator",regex:/[+\-*\/%=!<>|&^~]+/},{token:"paren.lparen",regex:/[({\[]/},{token:"paren.rparen",regex:/[)}\]]/},{token:"punctuation.operator",regex:/[;,.:]/},{token:["punctuation.operator","entity.name.function"],regex:/(\.)([A-Za-z_$][A-Za-z0-9_$]*)(?=\s*\()/},{token:"entity.name.function",regex:/\b(?!if|for|while|switch|catch|function|return|class|new|else|try|finally|throw|import|export|default|await|async|super|this)[A-Za-z_$][A-Za-z0-9_$]*(?=\s*\()/},{token:"identifier",regex:/[A-Za-z_$][A-Za-z0-9_$]*/},{token:"text",regex:/\s+/},{defaultToken:"source.js"}],"html-tag-ejs":[{token:"constant.language",regex:/%>/,next:"html-tag-attributes"},{token:"comment.line.double-slash",regex:/\/\/.*$/},{token:"string.quoted.single",regex:/'(?:\\.|[^'])*'/},{token:"string.quoted.double",regex:/"(?:\\.|[^"])*"/},{token:"constant.numeric",regex:/\b\d+(?:\.\d+)?\b/},{token:"keyword",regex:/\b(?:if|else|for|while|function|return|let|const|var|new|switch|case|break|continue|in|of|try|catch|finally|throw|class|extends|super|import|from|export|default|this|await|async|yield)\b/},{token:"constant.language",regex:/\b(?:true|false|null|undefined)\b/},{token:"keyword.operator",regex:/[+\-*\/%=!<>|&^~]+/},{token:"paren.lparen",regex:/[({\[]/},{token:"paren.rparen",regex:/[)}\]]/},{token:"punctuation.operator",regex:/[;,.:]/},{token:["punctuation.operator","entity.name.function"],regex:/(\.)([A-Za-z_$][A-Za-z0-9_$]*)(?=\s*\()/},{token:"entity.name.function",regex:/\b(?!if|for|while|switch|catch|function|return|class|new|else|try|finally|throw|import|export|default|await|async|super|this)[A-Za-z_$][A-Za-z0-9_$]*(?=\s*\()/},{token:"identifier",regex:/[A-Za-z_$][A-Za-z0-9_$]*/},{token:"text",regex:/\s+/},{defaultToken:"source.js"}]}};$.inherits(s,h);let a=function(){this.HighlightRules=s};$.inherits(a,b),(function(){this.$id="ace/mode/markdown_simple"}).call(a.prototype),R.Mode=a})}function Be(d){d.commands.addCommand({name:"indentSelection",bindKey:{win:"Ctrl-]",mac:"Cmd-]"},exec:function(v){v.blockIndent()},readOnly:!1}),d.commands.addCommand({name:"outdentSelection",bindKey:{win:"Ctrl-[",mac:"Cmd-["},exec:function(v){v.blockOutdent()},readOnly:!1})}function vt(d,v){d.commands.addCommand({name:"saveDocument",bindKey:{win:"Ctrl-S",mac:"Cmd-S"},exec:function(){v()},readOnly:!1})}function yt(d){d.on("click",function(v){if(!v.domEvent.metaKey&&!v.domEvent.ctrlKey)return;let R=v.getDocumentPosition(),$=d.session;if(!$.getTokenAt(R.row,R.column))return;let h=$.getLine(R.row),s=mt(h,R.column);s&&(v.stop(),v.preventDefault(),window.open(s,"_blank","noopener,noreferrer"))}),d.on("mousemove",function(v){if(!d.renderer)return;if(!v.domEvent.metaKey&&!v.domEvent.ctrlKey){d.renderer.container.style.cursor="";return}let R=v.getDocumentPosition(),b=d.session.getLine(R.row);mt(b,R.column)?d.renderer.container.style.cursor="pointer":d.renderer.container.style.cursor=""}),d.on("keyup",function(){d.renderer&&(d.renderer.container.style.cursor="")})}function mt(d,v){let R=/!?\[([^\]]*)\]\(([^)]+)\)/g,$;for(;($=R.exec(d))!==null;){let h=$[0].startsWith("!"),s=$[1],a=$[2],o=$.index,i=o+(h?1:0)+1+s.length+2,n=i+a.length;if(v>=i&&v<=n)return a.trim();let t=o+(h?2:1),e=t+s.length;if(v>=t&&v<=e)return a.trim()}let b=/(https?:\/\/[^\s<>"{}|\\^`\[\]]+)/g;for(;($=b.exec(d))!==null;){let h=$.index,s=h+$[0].length;if(v>=h&&v<=s)return $[0]}return null}function Yt(d){let{storePath:v,editor:R,textarea:$,detectMode:b,onChange:h,binder:s}=d;return s.bind(v,R,{read:o=>o.getValue(),writeOnStoreChange:!1,write:(o,i)=>{let n=o,t=i||"";if(n.getValue()===t)return;let r=n.getCursorPosition(),l=n.session.getScrollTop();n.setValue(t,-1),n.moveCursorToPosition(r),n.session.setScrollTop(l),n.clearSelection(),n.renderer&&(n.renderer.updateFull(!0),n.renderer.onResize(!0)),n.resize(!0),$&&($.value=t)},event:"change",onChange:o=>{$&&($.value=o),b&&R.session.setMode(b(o)),h&&h(o)}})}function bt(d){let v=d.trim();return v&&/^[^{["'\n]*:\s*[^"'\n]/m.test(v)&&!v.startsWith("{")&&!v.startsWith("[")?"ace/mode/yaml":"ace/mode/json"}async function Zt(d,v,R={}){let $=await new Promise(a=>{if(typeof window.ace<"u")a(window.ace);else{let o=setInterval(()=>{typeof window.ace<"u"&&(clearInterval(o),a(window.ace))},100)}});We($),pt($);let b=$.edit(d),h=R.theme||"ace/theme/monokai_custom",s=R.mode||"ace/mode/markdown_simple";return b.setTheme(h),b.session.setMode(s),b.setValue(v||"",-1),b.setOptions({wrap:R.wrap!==void 0?R.wrap:!0,fontSize:R.fontSize||14,showPrintMargin:R.showPrintMargin!==void 0?R.showPrintMargin:!1,tabSize:2,useSoftTabs:!0}),yt(b),Be(b),b}function Ae(d,v,R){We(window.ace);let $=window.ace.edit(d);return $.setTheme("ace/theme/monokai_custom"),$.session.setMode(R),$.setValue(v,-1),$.setOptions({wrap:!0,fontSize:14}),Be($),$}async function Qt(d){let{panels:v,textareas:R,draft:$,onSave:b}=d,h=await Zt(v.contentEditorPanel.id||"content-editor-panel",$.store.get("content")||"",{theme:"ace/theme/monokai_custom",mode:"ace/mode/markdown_simple",wrap:!0,fontSize:14,showPrintMargin:!1}),s=Ae(v.dataEditorPanel,$.store.get("data")||"{}",bt($.store.get("data")||"{}")),a=Ae(v.styleEditorPanel,$.store.get("style")||"","ace/mode/css"),o=Ae(v.scriptEditorPanel,$.store.get("script")||"","ace/mode/javascript"),i=Ae(v.serverEditorPanel,$.store.get("server")||"","ace/mode/javascript");return[h,s,a,o,i].forEach(t=>{vt(t,b)}),[{storePath:"content",editor:h,textarea:R.contentTextarea},{storePath:"data",editor:s,textarea:R.dataTextarea,detectMode:bt},{storePath:"style",editor:a,textarea:R.styleTextarea},{storePath:"script",editor:o,textarea:R.scriptTextarea},{storePath:"server",editor:i,textarea:R.serverTextarea}].forEach(t=>{Yt({...t,binder:$.binder,store:$.store})}),{content:h,data:s,style:a,script:o,server:i}}var wt={init:Qt};function xt(d){let v={content:"content",data:"data",style:"style",script:"script",server:"server",settings:"settings"};for(let[R,$]of Object.entries(d)){let b=document.querySelector(`[data-tab="${v[R]}"]`);b&&(b.textContent=$)}}function Xt(d,v){let R=document.querySelector(`[data-tab="${d}"]`);R&&(R.classList.remove("has-draft","is-empty","has-content"),v.hasDraft&&R.classList.add("has-draft"),v.isEmpty?R.classList.add("is-empty"):R.classList.add("has-content"))}function Jt(d,v,R){let $=d[0]?.parentElement;function b(s){let a=s.getAttribute("data-tab");if(d.forEach(i=>{i.classList.remove("active"),i.setAttribute("aria-selected","false"),i.tabIndex=-1}),v.forEach(i=>i.classList.remove("active")),s.classList.add("active"),s.setAttribute("aria-selected","true"),s.tabIndex=0,document.querySelector(`[data-tab-content="${a}"]`)?.classList.add("active"),R&&a&&a in R){let i=R[a];i.renderer&&(i.renderer.updateFull(!0),i.renderer.onResize(!0)),i.resize(!0)}window.location.hash=a||""}d.forEach(s=>{s.addEventListener("click",()=>b(s))}),$&&$.addEventListener("keydown",s=>{let a=s,o=Array.from(d),i=o.indexOf(document.activeElement);if(i===-1)return;let n=null;a.key==="ArrowRight"?n=(i+1)%o.length:a.key==="ArrowLeft"?n=(i-1+o.length)%o.length:a.key==="Home"?n=0:a.key==="End"&&(n=o.length-1),n!==null&&(a.preventDefault(),o[n].focus(),b(o[n]))});let h=window.location.hash.slice(1);if(h&&["content","data","style","script","server","settings"].includes(h)){d.forEach(o=>{o.classList.remove("active"),o.setAttribute("aria-selected","false"),o.tabIndex=-1}),v.forEach(o=>o.classList.remove("active"));let s=document.querySelector(`[data-tab="${h}"]`),a=document.querySelector(`[data-tab-content="${h}"]`);s&&a&&(s.classList.add("active"),s.setAttribute("aria-selected","true"),s.tabIndex=0,a.classList.add("active"))}}function qt(d){let{initialTabs:v,editors:R,filenames:$}=d,b=["content","data","style","script","server"];function h(o){b.forEach(i=>{let n=o[i]||{hasDraft:!1,isEmpty:!0};Xt(i,n)})}h(v),$&&xt($);let s=document.querySelectorAll(".tab-button"),a=document.querySelectorAll(".tab-content");return Jt(s,a,R),{updateState:o=>{h(o)},updateFilenames:o=>{xt(o)}}}var kt={init:qt};var Ee=null;function en(d){let{statusElements:v,message:R,duration:$=2e3}=d;Ee&&clearTimeout(Ee),v.statusText.textContent=R,v.statusIndicator.classList.add("visible"),Ee=setTimeout(()=>{v.statusIndicator.classList.remove("visible"),Ee=null},$)}var $t={update:en};var ue=null;function tn(){return ue||(ue=document.createElement("div"),ue.className="toast-container",document.body.appendChild(ue)),ue}function nn(d,v={}){let{type:R="info",duration:$=5e3}=v,b=tn(),h=document.createElement("div");h.className=`toast toast-${R}`,h.textContent=d,b.appendChild(h),setTimeout(()=>h.classList.add("show"),10),setTimeout(()=>{h.classList.remove("show"),setTimeout(()=>{b.removeChild(h)},300)},$)}function rn(d){let{message:v,details:R}=d,$=R?`${v}: ${R}`:v;nn($,{type:"error",duration:6e3})}var Ct={update:rn};function on(d,v){let R=null;return(...$)=>{R&&clearTimeout(R),R=setTimeout(()=>d(...$),v)}}async function St(d){try{let v=d.trim()?encodeURIComponent(d):"",R=await fetch(`/edit?query=${v}`,{method:"POST"});return R.ok?await R.json():(console.error("Search failed:",R.statusText),[])}catch(v){return console.error("Search error:",v),[]}}function Mt(d,v,R){if(d.innerHTML="",v.length===0){d.innerHTML='',d.style.display="block";return}v.forEach($=>{let b=document.createElement("div");b.className="dropdown-item",b.innerHTML=` `,b.addEventListener("click",()=>{R($),d.style.display="none"}),d.appendChild(b)}),d.style.display="block"}function sn(d){d.style.display="none"}function Le(d,v,R,$,b){let h=on(async s=>{let a=await St(s);Mt(v,a,R)},50);d.addEventListener("input",()=>{let s=d.value;h(s)}),d.addEventListener("focus",async()=>{if(v.children.length>0)v.style.display="block";else if(!d.value.trim()){let s=await St("");Mt(v,s,R)}}),document.addEventListener("click",s=>{let a=s.target;!d.contains(a)&&!v.contains(a)&&sn(v),a.matches(`.clear-selection[data-target="${b}"]`)&&$()})}function Te(d,v,R){let $=document.getElementById(v),b=$?.closest(".form-group");if(!b||!$)return;let h=b.querySelector(".selected-item");if(h&&h.remove(),d){let s=document.createElement("div");s.className="selected-item";let a=`${d.path}/edit`;s.innerHTML=` ${Z(d.title||d.path)} ${Z(d.path)} `,b.insertBefore(s,$),$.style.display="none",$.value=""}else $.style.display="",$.value=""}function an(d){Te(d,"slot-search","slot")}var _e={init:d=>Le(d.slotElements.slotSearch,d.slotElements.slotDropdown,d.onSelect,d.onClear,"slot"),update:d=>an(d.slot)};function ln(d){Te(d,"template-search","template")}var Re={init:d=>Le(d.templateElements.templateSearch,d.templateElements.templateDropdown,d.onSelect,d.onClear,"template"),update:d=>ln(d.template)};function At(d){let v=d.created_at?new Date(d.created_at).toLocaleDateString():new Date().toLocaleDateString();return` ${Z(d.path)} ${v} `}async function cn(d,v){let R=te(d),$=await fetch(`${R}?redirect=${encodeURIComponent(v)}`,{method:"DELETE"});if(!$.ok){let b=await $.text();throw new Error(`Error deleting redirect: ${b}`)}}async function un(d,v){let R=te(d),$=await fetch(`${R}?redirect=true`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({redirect:v})});if(!$.ok){let b=await $.text();throw new Error(`Error adding redirect: ${b}`)}return $.json()}function hn(d){let{documentPath:v}=d,R=document.querySelector(".redirects-table");if(!R)return;let $=document.getElementById("add-redirect-btn"),b=document.getElementById("redirect-path-input");$&&b&&($.addEventListener("click",async()=>{let h=b.value.trim();if(!h){alert("Please enter a path to redirect from");return}if(!h.startsWith("/")){alert("Redirect path must start with /");return}try{let s=await un(v,h),a=R?.querySelector("tbody");if(a){Se(a,".no-redirects");let o=document.createElement("tr");o.innerHTML=At({path:h,id:s.redirect?.id}),a.appendChild(o)}b.value=""}catch(s){console.error("Add redirect error:",s),alert(`Failed to add redirect: ${s instanceof Error?s.message:"Unknown error"}`)}}),b.addEventListener("keydown",h=>{h.key==="Enter"&&(h.preventDefault(),$.click())})),R.addEventListener("click",async h=>{let s=h.target;if(s.classList.contains("delete-redirect-btn")){let a=s.closest("tr");if(!a)return;let o=a.querySelector(".redirect-path");if(!o)return;let i=o.textContent?.trim();if(!i||!confirm(`Are you sure you want to delete the redirect from "${i}"? This action cannot be undone.`))return;try{await cn(v,i),a.remove();let n=R.querySelector("tbody");n&&n.children.length===0&&window.location.reload()}catch(n){alert(n.message),console.error(n)}}})}function dn(d){let{redirects:v}=d,R=document.querySelector(".redirects-table");if(!R)return;let $=R.querySelector("tbody");if($){if($.innerHTML="",v.length===0){$.innerHTML='No redirects yet';return}v.forEach(b=>{let h=document.createElement("tr");h.innerHTML=At(b),$.appendChild(h)})}}var He={init:hn,update:dn};function Lt(d){let v=d.created_at?new Date(d.created_at).toLocaleDateString():new Date().toLocaleDateString(),R=d.hidden||!1;return` ${Z(d.original_filename)} ${v} `}async function fn(d,v){let R=te(d),$=await fetch(`${R}?upload=${encodeURIComponent(v)}`,{method:"DELETE"});if(!$.ok){let b=await $.text();throw new Error(`Error deleting file: ${b}`)}}async function Et(d,v,R){let $=te(d),b=await fetch(`${$}?uploadId=${v}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(R)});if(!b.ok){let h=await b.text();throw new Error(`Error updating file: ${h}`)}return b.json()}function gn(d){let{documentPath:v}=d,R=document.querySelector(".uploads-table");if(!R)return;let $=document.getElementById("upload-file-btn"),b=document.getElementById("file-upload-input");$&&b&&($.addEventListener("click",()=>{b.click()}),b.addEventListener("change",async h=>{let s=h.target.files;if(!s||s.length===0)return;let o=`${te(v)}?upload=true`;for(let i of Array.from(s)){let n=new FormData;n.append("file",i);try{let t=await fetch(o,{method:"POST",body:n});if(t.ok){let e=await t.json(),r=R?.querySelector("tbody");if(r){Se(r,".no-uploads");let l=document.createElement("tr");l.innerHTML=Lt(e),r.appendChild(l)}}else{let e=await t.text();alert(`Upload failed: ${e}`)}}catch(t){console.error("Upload error:",t),alert(`Upload failed: ${t instanceof Error?t.message:"Unknown error"}`)}}b.value=""})),R.addEventListener("click",async h=>{let s=h.target;if(s.classList.contains("delete-upload-btn")){let a=s.dataset.filename;if(!a||!confirm(`Are you sure you want to delete "${a}"? This action cannot be undone.`))return;try{await fn(v,a);let o=s.closest("tr");o&&o.remove();let i=R.querySelector("tbody");i&&i.children.length===0&&window.location.reload()}catch(o){alert(o.message),console.error(o)}}if(s.classList.contains("rename-upload-btn")){let a=s.closest("tr");if(!a)return;let o=a.querySelector(".filename-link"),i=a.querySelector(".filename-input");o&&i&&(o.style.display="none",i.style.display="inline-block",i.focus(),i.select())}}),R.addEventListener("change",async h=>{let s=h.target;if(s.classList.contains("hidden-checkbox")){let a=s,o=a.dataset.uploadId;if(!o)return;let i=a.closest("tr");try{let n=await Et(v,parseInt(o,10),{hidden:a.checked});i&&(n.hidden?i.classList.add("upload-hidden"):i.classList.remove("upload-hidden"));let t=i?.querySelector(".filename-link"),e=i?.querySelector(".filename-input"),r=i?.querySelector(".delete-upload-btn");t&&n.original_filename&&(t.textContent=n.original_filename,t.href=n.url+(n.hidden?"?reveal":"")),e&&n.original_filename&&(e.value=n.original_filename),r&&n.original_filename&&(r.dataset.filename=n.original_filename)}catch(n){a.checked=!a.checked,alert(n.message),console.error(n)}}}),R.addEventListener("blur",async h=>{let s=h.target;if(!s.classList.contains("filename-input"))return;let a=s,o=a.closest("tr"),i=o?.querySelector(".filename-link"),n=a.dataset.uploadId;if(!i||!n){a.style.display="none",i&&(i.style.display="inline");return}let t=i.textContent||"",e=a.value.trim();if(e===t||!e){a.style.display="none",i.style.display="inline",a.value=t;return}try{let r=await Et(v,parseInt(n,10),{original_filename:e});i.textContent=r.original_filename,i.href=r.url+(r.hidden?"?reveal":""),a.value=r.original_filename;let l=o?.querySelector(".delete-upload-btn"),c=o?.querySelector(".rename-upload-btn"),u=o?.querySelector(".hidden-checkbox");l&&(l.dataset.filename=r.original_filename),c&&(c.dataset.filename=r.original_filename),u&&(u.checked=r.hidden),r.hidden?o?.classList.add("upload-hidden"):o?.classList.remove("upload-hidden")}catch(r){alert(r.message),console.error(r),a.value=t}a.style.display="none",i.style.display="inline"},!0),R.addEventListener("keydown",h=>{let s=h.target;if(!s.classList.contains("filename-input"))return;let a=s;if(h.key==="Enter")h.preventDefault(),a.blur();else if(h.key==="Escape"){h.preventDefault();let i=a.closest("tr")?.querySelector(".filename-link");i&&(a.value=i.textContent||"",a.style.display="none",i.style.display="inline")}})}function pn(d){let{uploads:v,documentPath:R}=d,$=document.querySelector(".uploads-table");if(!$)return;let b=$.querySelector("tbody");if(b){if(b.innerHTML="",v.length===0){b.innerHTML='No uploads yet';return}v.forEach(h=>{let s=document.createElement("tr");h.hidden&&s.classList.add("upload-hidden");let a=R==="/"?`/uploads/${encodeURIComponent(h.original_filename)}`:`${R}/uploads/${encodeURIComponent(h.original_filename)}`;s.innerHTML=Lt({...h,url:a}),b.appendChild(s)})}}var ze={init:gn,update:pn};async function mn(d){let{file:v,documentPath:R}=d,$=new FormData;$.append("file",v);let b=await fetch(`${te(R)}?upload=true`,{method:"POST",body:$,credentials:"include"});if(!b.ok)throw new Error("Upload failed: "+await b.text());return(await b.json()).url}function vn(d){return d.type.startsWith("image/")}async function Tt(d,v,R,$){if(d.length===0)return"";let b="";for(let h of d)try{let s=await mn({file:h,documentPath:v}),a=vn(h);b+=yn(s,h.name||"file",$,R,a)}catch(s){console.error("Upload error:",s)}return b}function yn(d,v,R,$,b){switch(R){case"content":return b?$()?`${v} `:`![${v}](${d}) `:$()?`${v} `:`[${v}](${d}) `;case"data":return`${d} `;case"style":return b?`/* image */ url(${d}); `:`/* file */ '${d}'; `;case"script":return`'${d}'; `;default:return`${d} `}}function he(d,v,R,$,b,h){!d||!v||(d.addEventListener("dragover",s=>{s.preventDefault(),d.classList.add("drag-over")},{passive:!1}),d.addEventListener("dragleave",s=>{s.preventDefault(),d.classList.remove("drag-over")},{passive:!1}),d.addEventListener("drop",async s=>{s.preventDefault(),d.classList.remove("drag-over");let a=Array.from(s.dataTransfer?.files||[]),o=await Tt(a,$,b,R);o&&(v.insert(o),h&&h())},{passive:!1}),d.addEventListener("paste",async s=>{let o=Array.from(s.clipboardData?.items||[]).map(n=>n.getAsFile()).filter(n=>n!==null);if(!o.length)return;s.preventDefault();let i=await Tt(o,$,b,R);i&&(v.insert(i),h&&h())},{passive:!1}))}function bn(d){let{panels:v,editors:R,documentPath:$,isHtml:b,onUploadComplete:h}=d;he(v.contentEditorPanel,R.content,"content",$,b,h),he(v.dataEditorPanel,R.data,"data",$,b,h),he(v.styleEditorPanel,R.style,"style",$,b,h),he(v.scriptEditorPanel,R.script,"script",$,b,h),he(v.serverEditorPanel,R.server,"script",$,b,h);let s=document.querySelector(".settings-panel");s&&(s.addEventListener("dragover",a=>{a.preventDefault(),s.classList.add("drag-over")},{passive:!1}),s.addEventListener("dragleave",a=>{a.preventDefault(),s.classList.remove("drag-over")},{passive:!1}),s.addEventListener("drop",async a=>{a.preventDefault(),s.classList.remove("drag-over");let o=Array.from(a.dataTransfer?.files||[]);if(o.length===0)return;let i=document.querySelector(".uploads-table");for(let n of o){let t=new FormData;t.append("file",n);try{let e=await fetch(`${te($)}?upload=true`,{method:"POST",body:t});if(e.ok){let r=await e.json(),l=i?.querySelector("tbody");if(l){let c=l.querySelector(".no-uploads");c&&c.closest("tr")?.remove();let u=document.createElement("tr"),g=new Date().toLocaleDateString();u.innerHTML=` ${Z(r.original_filename)} ${g} \u{1F441}\uFE0F `,l.appendChild(u)}h()}else{let r=await e.text();alert(`Upload failed: ${r}`)}}catch(e){console.error("Upload error:",e),alert(`Upload failed: ${e instanceof Error?e.message:"Unknown error"}`)}}},{passive:!1}))}var _t={init:bn};var It="editor-split-position";function Pe(d,v){d.style.width=`${v}%`}function Rt(d){try{localStorage.setItem(It,d.toString())}catch(v){console.warn("Failed to save split position to localStorage:",v)}}function wn(){try{let d=localStorage.getItem(It);if(d){let v=parseFloat(d);if(!isNaN(v)&&v>=10&&v<=90)return v}}catch(d){console.warn("Failed to load split position from localStorage:",d)}return 50}function xn(){let d=document.getElementById("resizer"),v=document.getElementById("content-editor-panel"),R=document.querySelector(".preview-panel");if(!d||!v||!R)return;let $=wn();Pe(v,$);let b=!1,h=0,s=0,a=null,o=()=>{a=document.createElement("div"),a.style.cssText=` position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 99999; cursor: col-resize; `,document.body.appendChild(a)},i=()=>{a&&a.parentNode&&(a.parentNode.removeChild(a),a=null)},n=u=>{b=!0,h=u.clientX,s=v.offsetWidth,o(),document.body.style.cursor="col-resize",document.body.style.userSelect="none",d.style.background="#4caf50",u.preventDefault(),u.stopPropagation()},t=u=>{if(!b)return;let g=v.parentElement;if(!g)return;let p=g.offsetWidth,w=u.clientX-h,y=(s+w)/p*100,A=Math.max(10,Math.min(90,y));Pe(v,A),u.preventDefault()},e=u=>{if(!b)return;b=!1,i(),document.body.style.cursor="",document.body.style.userSelect="",d.style.background="";let g=v.parentElement;if(g){let p=v.offsetWidth/g.offsetWidth*100;Rt(p)}u.preventDefault()},r=u=>{u.touches.length===1&&(b=!0,h=u.touches[0].clientX,s=v.offsetWidth,document.body.style.userSelect="none",d.style.background="#4caf50",u.preventDefault())},l=u=>{if(!b||u.touches.length!==1)return;let g=v.parentElement;if(!g)return;let p=g.offsetWidth,w=u.touches[0].clientX-h,y=(s+w)/p*100,A=Math.max(10,Math.min(90,y));Pe(v,A),u.preventDefault()},c=()=>{if(!b)return;b=!1,document.body.style.userSelect="",d.style.background="";let u=v.parentElement;if(u){let g=v.offsetWidth/u.offsetWidth*100;Rt(g)}};return d.addEventListener("mousedown",n,!0),document.addEventListener("mousemove",t,!0),document.addEventListener("mouseup",e,!0),d.addEventListener("touchstart",r,{passive:!1}),document.addEventListener("touchmove",l,{passive:!1}),document.addEventListener("touchend",c),()=>{d.removeEventListener("mousedown",n,!0),document.removeEventListener("mousemove",t,!0),document.removeEventListener("mouseup",e,!0),d.removeEventListener("touchstart",r),document.removeEventListener("touchmove",l),document.removeEventListener("touchend",c),i()}}var Dt={init:xn};var kn=typeof navigator<"u"&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),ce=kn?"\u2318":"Ctrl",Ft="skywriter:wordWrap",$n=[{keys:`${ce} + S`,description:"Save draft"},{keys:`${ce} + \\`,description:"Toggle word wrap"},{keys:`${ce} + ]`,description:"Indent selection"},{keys:`${ce} + [`,description:"Outdent selection"},{keys:`${ce} + Click`,description:"Open link in new tab"},{keys:"?",description:"Show keyboard shortcuts"}],de=null,De=!1;function Cn(){try{let d=localStorage.getItem(Ft);return d===null?!0:d==="true"}catch{return!0}}function Sn(d){try{localStorage.setItem(Ft,String(d))}catch{}}function Mn(){let d=document.createElement("div");d.className="shortcuts-overlay",d.setAttribute("role","dialog"),d.setAttribute("aria-label","Keyboard shortcuts");let v=document.createElement("div");v.className="shortcuts-panel";let R=document.createElement("div");R.className="shortcuts-header",R.innerHTML='

Keyboard shortcuts

';let $=document.createElement("div");$.className="shortcuts-list";for(let b of $n){let h=document.createElement("div");h.className="shortcuts-row";let s=document.createElement("span");s.className="shortcuts-desc",s.textContent=b.description;let a=document.createElement("span");a.className="shortcuts-keys";let o=b.keys.split(" + ");a.innerHTML=o.map(i=>`${i}`).join(" + "),h.appendChild(s),h.appendChild(a),$.appendChild(h)}return v.appendChild(R),v.appendChild($),d.appendChild(v),d.addEventListener("click",b=>{b.target===d&&Ie()}),R.querySelector(".shortcuts-close")?.addEventListener("click",()=>Ie()),document.body.appendChild(d),d}function An(){de||(de=Mn()),de.classList.add("visible"),De=!0}function Ie(){de&&de.classList.remove("visible"),De=!1}function En(){De?Ie():An()}function Ot(d,v){for(let $ of d)$.session.setOption("wrap",v);Sn(v);let R=document.getElementById("word-wrap-toggle");R&&(R.checked=v)}function Ln(d){let v=Object.values(d.editors),R=Cn();for(let b of v)b.session.setOption("wrap",R);document.querySelectorAll(".shortcut-mod").forEach(b=>{b.textContent=ce});let $=document.getElementById("word-wrap-toggle");$&&($.checked=R,$.addEventListener("change",()=>{Ot(v,$.checked)})),document.addEventListener("keydown",b=>{if(b.key==="Escape"&&De){Ie();return}if(b.key==="?"){let h=document.activeElement,s=h?.tagName?.toLowerCase();if(s==="input"||s==="textarea"||s==="select"||h?.closest?.(".ace_editor"))return;En()}});for(let b of v)b.commands.addCommand({name:"toggleWordWrap",bindKey:{win:"Ctrl-\\",mac:"Cmd-\\"},exec:function(h){let s=h.session.getUseWrapMode();Ot(v,!s)},readOnly:!0})}var Nt={init:Ln};async function Wt(){let d=ft(),v=ot(),R=st(),$=at(),b=lt(),h=ct(),s=ut(),a=$e(d),o=ke(a.draft),i=ke(a.save),n=ke({...a.meta,status:null,toast:null});n.store.watch("status",p=>{let w=p;w&&($t.update({statusElements:h,message:w.message,duration:w.duration}),setTimeout(()=>n.store.set("status",null),0))}),n.store.watch("toast",p=>{let w=p;w&&(Ct.update({message:w.message,details:w.details}),setTimeout(()=>n.store.set("toast",null),0))});let t=new Me({meta:n,draft:o,save:i});i.binder.bind("path","#slug"),o.binder.bind("title","#title-input"),o.binder.bind("mime_type","#mime-type-input",{onBlur:async()=>{await t.draft()}}),o.binder.bind("extension","#extension-input",{onBlur:async()=>{await t.draft()}}),o.binder.bind("template_id","#template-id"),o.binder.bind("slot_id","#slot-id"),i.binder.bind("published","#publish-btn",{read:p=>p.getAttribute("data-published")==="true",write:(p,w)=>{let k=p;k.textContent=w?"Unpublish":"Publish",k.setAttribute("data-published",String(w)),k.setAttribute("aria-label",w?"Document is public. Click to unpublish":"Document is hidden. Click to publish")},event:"click",onClick:async p=>{p?.preventDefault(),await t.publish()}}),n.binder.bind("saveDisabled","#save-btn",{read:p=>p.disabled,write:(p,w)=>{p.disabled=w},onClick:async(p,w)=>{w||await t.save()}}),n.binder.bind("revertDisabled","#revert-btn",{read:p=>p.disabled,write:(p,w)=>{p.disabled=w},onClick:async(p,w)=>{w||await t.revert()}}),n.binder.bind("disableIfDocumentDoesNotExist","#publish-btn",{read:p=>p.disabled,write:(p,w)=>{p.disabled=w}}),n.binder.bind("disableIfDocumentDoesNotExist",".btn-delete",{read:p=>p.disabled,write:(p,w)=>{p.disabled=w}}),i.store.watch("published",p=>{let w=document.getElementById("view-btn");w&&(w.disabled=!p)}),n.store.watch("currentPath",p=>{let w=window.location.hash;window.history.pushState(null,"",Ce(p)+w)});let e=document.getElementById("view-btn");e&&e.addEventListener("click",()=>{if(!i.store.get("published"))return;let w=i.store.get("path");window.open(w,"_blank")});function r(){let p=o.store.isDirty(),w=i.store.isDirty(),k=n.store.get("hasDraft")??!1;n.store.set("revertDisabled",!(p||k)),n.store.set("saveDisabled",!(w||p||k))}o.store.debounce({exclude:["mime_type","extension"]},async()=>{await t.draft(),r()}),o.store.watch(void 0,r),i.store.watch(void 0,r);let l=await wt.init({panels:v,textareas:R,draft:o,onSave:()=>t.draft()}),c=kt.init({initialTabs:a.meta.tabs||{},editors:l,filenames:a.meta.tabFilenames});n.store.watch("template",p=>{let w=p;Re.update({template:w}),w?o.store.set("template_id",w.id):o.store.set("template_id",null)}),n.store.watch("slot",p=>{let w=p;_e.update({slot:w}),w?o.store.set("slot_id",w.id):o.store.set("slot_id",null)}),n.store.watch("uploads",()=>{let p=n.store.get("uploads")||[],w=i.store.get("path")||"";ze.update({uploads:p,documentPath:w})}),n.store.watch("redirects",()=>{let p=n.store.get("redirects")||[];He.update({redirects:p})}),n.store.watch("api",()=>{let p=n.store.get("api")||[],w=document.querySelector(".api-links-list");w&&(w.innerHTML=p.length?p.map(k=>` `).join(""):'
No API links until doc exists
')}),n.store.watch("tabs",p=>{let w=p;w&&c.updateState(w)}),n.store.watch("tabFilenames",p=>{let w=p;w&&c.updateFilenames(w)});let u=()=>{let p=n.store.get("html");if(s&&p)if((o.store.get("mime_type")||"").startsWith("text/plain")){let k=p.replace(/&/g,"&").replace(//g,">");s.srcdoc=` ${k} `}else s.srcdoc=p};n.store.watch("html",u),o.store.watch("mime_type",u),Re.init({templateElements:$,onSelect:p=>{n.store.set("template",{id:p.id,title:p.title,path:p.path})},onClear:()=>{n.store.set("template",null)}}),_e.init({slotElements:b,onSelect:p=>{n.store.set("slot",{id:p.id,title:p.title,path:p.path})},onClear:()=>{n.store.set("slot",null)}}),Re.update({template:n.store.get("template")}),_e.update({slot:n.store.get("slot")});let g=d.document.path||"/";ze.init({documentPath:g}),He.init({documentPath:g}),_t.init({panels:v,editors:l,documentPath:g,isHtml:()=>n.store.get("content_type")==="html",onUploadComplete:()=>{}}),Dt.init(),Nt.init({editors:l})}Oe.default.config.set("useWorker",!1);Oe.default.config.set("loadWorkerFromBlob",!1);window.ace=Oe.default;document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{Wt()}):Wt();})(); /*! Bundled license information: ace-builds/src-noconflict/ace.js: (* * 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 *) */