(()=>{var ai=Object.create;var je=Object.defineProperty;var li=Object.getOwnPropertyDescriptor;var ci=Object.getOwnPropertyNames;var hi=Object.getPrototypeOf,ui=Object.prototype.hasOwnProperty;var di=(y,c,E)=>c in y?je(y,c,{enumerable:!0,configurable:!0,writable:!0,value:E}):y[c]=E;var ee=(y,c)=>()=>(y&&(c=y(y=0)),c);var se=(y,c)=>()=>(c||y((c={exports:{}}).exports,c),c.exports);var fi=(y,c,E,x)=>{if(c&&typeof c=="object"||typeof c=="function")for(let $ of ci(c))!ui.call(y,$)&&$!==E&&je(y,$,{get:()=>c[$],enumerable:!(x=li(c,$))||x.enumerable});return y};var le=(y,c,E)=>(E=y!=null?ai(hi(y)):{},fi(c||!y||!y.__esModule?je(E,"default",{value:y,enumerable:!0}):E,y));var H=(y,c,E)=>di(y,typeof c!="symbol"?c+"":c,E);var de,Ye=ee(()=>{de={id:"gruvbox-dark-soft",name:"Gruvbox Dark Soft",ansi:["#32302f","#cc241d","#98971a","#d79921","#458588","#b16286","#689d6a","#a89984","#928374","#fb4934","#b8bb26","#fabd2f","#83a598","#d3869b","#8ec07c","#ebdbb2"],defaultFg:"#ebdbb2",defaultBg:"#32302f",cursor:"#ebdbb2",selectionBg:"rgba(80, 73, 69, 0.7)"}});var fe,Ke=ee(()=>{fe={id:"nord",name:"Nord",ansi:["#3b4252","#bf616a","#a3be8c","#ebcb8b","#81a1c1","#b48ead","#88c0d0","#e5e9f0","#4c566a","#bf616a","#a3be8c","#ebcb8b","#81a1c1","#b48ead","#8fbcbb","#eceff4"],defaultFg:"#d8dee9",defaultBg:"#2e3440",cursor:"#d8dee9",selectionBg:"rgba(67, 76, 94, 0.7)"}});var ue,Qe=ee(()=>{ue={id:"solarized-dark",name:"Solarized Dark",ansi:["#073642","#dc322f","#859900","#b58900","#268bd2","#d33682","#2aa198","#eee8d5","#002b36","#cb4b16","#586e75","#657b83","#839496","#6c71c4","#93a1a1","#fdf6e3"],defaultFg:"#839496",defaultBg:"#002b36",cursor:"#93a1a1",selectionBg:"rgba(7, 54, 66, 0.7)"}});var ge,Xe=ee(()=>{ge={id:"solarized-light",name:"Solarized Light",ansi:["#eee8d5","#dc322f","#859900","#b58900","#268bd2","#d33682","#2aa198","#073642","#fdf6e3","#cb4b16","#93a1a1","#839496","#657b83","#6c71c4","#586e75","#002b36"],defaultFg:"#657b83",defaultBg:"#fdf6e3",cursor:"#586e75",selectionBg:"rgba(238, 232, 213, 0.7)"}});var pe,Ze=ee(()=>{pe={id:"tomorrow-night",name:"Tomorrow Night",ansi:["#1d1f21","#cc6666","#b5bd68","#f0c674","#81a2be","#b294bb","#8abeb7","#c5c8c6","#969896","#cc6666","#b5bd68","#f0c674","#81a2be","#b294bb","#8abeb7","#ffffff"],defaultFg:"#c5c8c6",defaultBg:"#1d1f21",cursor:"#c5c8c6",selectionBg:"rgba(55, 59, 65, 0.99)"}});function qe(y){return{foreground:y.defaultFg,background:y.defaultBg,cursor:y.cursor,cursorAccent:y.defaultBg,selectionBackground:y.selectionBg,palette:[...y.ansi]}}function et(y){let c=Je[y];if(!c){let E=Object.keys(Je).join(", ");throw new Error(`Unknown built-in theme id: "${y}". Known ids: ${E}.`)}return c}var Je,gi,tt=ee(()=>{Ye();Ke();Qe();Xe();Ze();Ye();Ke();Qe();Xe();Ze();Je=Object.freeze({[ue.id]:ue,[ge.id]:ge,[pe.id]:pe,[fe.id]:fe,[de.id]:de}),gi=ue.id});function Ce(y){let c=it[y];if(!c){let E=Object.keys(it).join(", ");throw new Error(`Unknown built-in font id: "${y}". Known ids: ${E}.`)}return c}function xe(y){if(typeof document>"u")return;let c="sterk-fonts",E=document.getElementById(c);E||(E=document.createElement("style"),E.id=c,document.head.appendChild(E));let x=`/* sterk-font:${y.id} */`;if(E.textContent?.includes(x))return;let $=`${x}
@font-face {
	font-family: '${y.family}';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('${y.url}') format('woff2');
}
@font-face {
	font-family: '${y.family}';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('${pi}') format('woff2');
	unicode-range: ${mi};
}
`;E.textContent=`${E.textContent??""}${$}`}var pi,mi,nt,it,rt=ee(()=>{pi=new URL("../../assets/fonts/SterkTUISymbols.woff2","http://sterk.invalid/").href,mi="U+2190-21FF, U+2500-257F, U+2580-259F, U+25A0-25FF, U+2700-27BF",nt="jetbrains-mono",it=Object.freeze({"jetbrains-mono":{id:"jetbrains-mono",family:"JetBrains Mono",url:new URL("../../assets/fonts/JetBrainsMono-Regular.woff2","http://sterk.invalid/").href},"ibm-plex-mono":{id:"ibm-plex-mono",family:"IBM Plex Mono",url:new URL("../../assets/fonts/IBMPlexMono-Regular.woff2","http://sterk.invalid/").href},"cascadia-mono":{id:"cascadia-mono",family:"Cascadia Mono",url:new URL("../../assets/fonts/CascadiaMono-Regular.woff2","http://sterk.invalid/").href},"fira-mono":{id:"fira-mono",family:"Fira Mono",url:new URL("../../assets/fonts/FiraMono-Regular.woff2","http://sterk.invalid/").href},"source-code-pro":{id:"source-code-pro",family:"Source Code Pro",url:new URL("../../assets/fonts/SourceCodePro-Regular.woff2","http://sterk.invalid/").href}})});function wt(y){return`#${y.toString(16).padStart(6,"0")}`}function bt(y){let c=y.replace(/^#/,"");return Number.parseInt(c,16)}function Ct(y){if(y<16)return bt(yt[y]??"#000000");if(y<232){let E=y-16,x=Math.floor(E/36),$=Math.floor(E%36/6),w=E%6,s=i=>i===0?0:55+i*40,a=s(x),r=s($),o=s(w);return a<<16|r<<8|o}let c=8+(y-232)*10;return c<<16|c<<8|c}function xt(y){return wt(Ct(y))}function ot(){let y=[];for(let c=0;c<256;c++)y.push(xt(c));return y}function $t(y){let c=y.replace(/^#/,"");if(c.length<6)return 0;let E=a=>Number.parseInt(c.slice(a,a+2),16)/255,x=a=>a<=.03928?a/12.92:((a+.055)/1.055)**2.4,$=x(E(0)),w=x(E(2)),s=x(E(4));return .2126*$+.7152*w+.0722*s}function $e(y){return $t(y)>=At?"#000000":"#ffffff"}var yt,At,st=ee(()=>{yt=["#000000","#cd0000","#00cd00","#cdcd00","#0000ee","#cd00cd","#00cdcd","#e5e5e5","#7f7f7f","#ff0000","#00ff00","#ffff00","#5c5cff","#ff00ff","#00ffff","#ffffff"];At=.4});var me,at=ee(()=>{me=class{constructor(){H(this,"events",{})}on(c,E){return this.events[c]||(this.events[c]=[]),this.events[c]?.push(E),this}off(c,E){let x=this.events[c];if(!x)return this;let $=x.indexOf(E);return $!==-1&&x.splice($,1),x.length===0&&delete this.events[c],this}once(c,E){let x=(...$)=>{this.off(c,x),E(...$)};return this.on(c,x)}emit(c,...E){let x=this.events[c];if(!x||x.length===0)return!1;let $=[...x];for(let w of $)w(...E);return!0}removeAllListeners(c){return c?delete this.events[c]:this.events={},this}listenerCount(c){let E=this.events[c];return E?E.length:0}listeners(c){let E=this.events[c];return E?[...E]:[]}}});function St(y,c){let E=0,x=c.length-1;for(;E<=x;){let $=E+x>>1,w=c[$];if(!w)return!1;let[s,a]=w;if(y<s)x=$-1;else if(y>a)E=$+1;else return!0}return!1}function kt(y){return y===0||y<32||y>=127&&y<160||y>1114111?-1:y<768?1:St(y,vi)?0:St(y,yi)?2:1}var vi,yi,Mt=ee(()=>{vi=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],yi=[[4352,4447],[9001,9002],[11904,12350],[12353,42191],[44032,55203],[63744,64255],[65040,65049],[65072,65135],[65280,65376],[65504,65510],[127744,128591],[128640,128767],[128768,128895],[128896,129023],[129024,129279],[129280,129535],[129536,129647],[129648,129791],[129792,130047],[131072,196605],[196608,262141]]});function Se(){return{chars:" ",code:32,attrs:{...ne}}}function Ae(y){let c=[];for(let E=0;E<y;E++)c.push(Se());return{cells:c,isWrapped:!1}}var ne,ke,lt,Me,_e,Le=ee(()=>{Mt();ne={fgMode:0,fgColor:-1,bgMode:0,bgColor:-1,bold:!1,italic:!1,underline:!1,inverse:!1,dim:!1};ke=class{constructor(c){H(this,"cell");this.cell=c}getChars(){return this.cell.chars}getCode(){return this.cell.code}isFgDefault(){return this.cell.attrs.fgMode===0}isFgPalette(){return this.cell.attrs.fgMode===1}isFgRGB(){return this.cell.attrs.fgMode===2}getFgColor(){return this.cell.attrs.fgColor}getFgColorMode(){return this.cell.attrs.fgMode===0?0:this.cell.attrs.fgMode===1?256:512}isBgDefault(){return this.cell.attrs.bgMode===0}isBgPalette(){return this.cell.attrs.bgMode===1}isBgRGB(){return this.cell.attrs.bgMode===2}getBgColor(){return this.cell.attrs.bgColor}getBgColorMode(){return this.cell.attrs.bgMode===0?0:this.cell.attrs.bgMode===1?256:512}isBold(){return this.cell.attrs.bold}isItalic(){return this.cell.attrs.italic}isUnderline(){return this.cell.attrs.underline}isInverse(){return this.cell.attrs.inverse}isDim(){return this.cell.attrs.dim}},lt=class{constructor(c){H(this,"line");this.line=c}get isWrapped(){return this.line.isWrapped}translateToString(c=!1){let E=this.line.cells.map(x=>x.chars).join("");return c&&(E=E.trim()),E}getCell(c){let E=this.line.cells[c];return E?new ke(E):new ke(Se())}},Me=class{constructor(c,E,x){H(this,"lines",[]);H(this,"maxLines");H(this,"cols");H(this,"rows");H(this,"_baseY",0);H(this,"_viewportY",0);H(this,"_cursorX",0);H(this,"_cursorY",0);this.cols=c,this.rows=E,this.maxLines=E+x;for(let $=0;$<E;$++)this.lines.push(Ae(c))}get length(){return this.lines.length}get cursorX(){return this._cursorX}get cursorY(){return this._cursorY}get baseY(){return this._baseY}get viewportY(){return this._viewportY}get liveTop(){return Math.max(0,this.lines.length-this.rows)}getLine(c){if(c<0||c>=this.lines.length)return null;let E=this.lines[c];return E?new lt(E):null}setCursor(c,E){this._cursorX=Math.max(0,Math.min(c,this.cols-1));let x=Math.max(this.rows-1,this.lines.length-1);this._cursorY=Math.max(0,Math.min(E,x))}setViewportY(c){let E=Math.max(0,this.lines.length-this.rows);this._viewportY=Math.max(0,Math.min(c,E))}scrollViewport(c){this.setViewportY(this._viewportY+c)}scrollToBottom(){let c=Math.max(0,this.lines.length-this.rows);this.setViewportY(c)}insertLine(c=!1){let E=Ae(this.cols);E.isWrapped=c;let x=this._viewportY===Math.max(0,this.lines.length-this.rows);this.lines.length>=this.maxLines&&(this.lines.shift(),this._baseY++),this.lines.push(E),x&&this.scrollToBottom()}writeCell(c,E,x){this.placeCell(c,E,x,!1),this.advanceCursor(1)}printCodePoint(c,E,x){let $=kt(E);if(!($<0)){if($===0){this.appendCombiningMark(c);return}if($===2){this._cursorX>=this.cols-1&&(this._cursorX=0,this._cursorY<this.rows-1&&this._cursorY++),this.placeCell(c,E,x,!1),this.advanceCursor(1),this.placeCell("",0,x,!0),this.advanceCursor(1);return}this.placeCell(c,E,x,!1),this.advanceCursor(1)}}placeCell(c,E,x,$){let w=this._cursorY;for(;this.lines.length<=w;)this.lines.push(Ae(this.cols));let s=this.lines[w];if(!s)return;for(;s.cells.length<=this._cursorX;)s.cells.push(Se());let a=s.cells[this._cursorX];a&&(a.chars=c,a.code=E,a.attrs={...x},$?a.isPlaceholder=!0:a.isPlaceholder=!1)}advanceCursor(c){for(let E=0;E<c;E++)this._cursorX++,this._cursorX>=this.cols&&(this._cursorX=0,this._cursorY=Math.min(this._cursorY+1,this.rows-1))}appendCombiningMark(c){if(this._cursorX===0)return;let E=this.lines[this._cursorY];if(!E)return;let x=this._cursorX-1,$=E.cells[x];$?.isPlaceholder&&x>0&&(x--,$=E.cells[x]),!(!$||$.isPlaceholder)&&($.chars+=c)}clear(){this.lines=[];for(let c=0;c<this.rows;c++)this.lines.push(Ae(this.cols));this._baseY=0,this._viewportY=0,this._cursorX=0,this._cursorY=0}resize(c,E){this.cols=c,this.rows=E;for(let x of this.lines)if(x.cells.length>c)x.cells.length=c;else for(;x.cells.length<c;)x.cells.push(Se());this._cursorX=Math.min(this._cursorX,c-1),this._cursorY=Math.min(this._cursorY,E-1),this.setViewportY(this._viewportY)}_getInternalLine(c){return this.lines[c]}},_e=class{constructor(c,E,x){H(this,"normalBuffer");H(this,"alternateBuffer");H(this,"activeBuffer");H(this,"savedCursor",null);this.normalBuffer=new Me(c,E,x),this.alternateBuffer=new Me(c,E,0),this.activeBuffer=this.normalBuffer}get active(){return this.activeBuffer}get normal(){return this.normalBuffer}get alternate(){return this.alternateBuffer}isAlternate(){return this.activeBuffer===this.alternateBuffer}switchToAlternate(){this.activeBuffer=this.alternateBuffer}switchToNormal(){this.activeBuffer=this.normalBuffer}saveCursor(c){this.savedCursor={cursorX:this.activeBuffer.cursorX,cursorY:this.activeBuffer.cursorY,attrs:{...c}}}restoreCursor(c){this.savedCursor&&(this.activeBuffer.setCursor(this.savedCursor.cursorX,this.savedCursor.cursorY),c.fgMode=this.savedCursor.attrs.fgMode,c.fgColor=this.savedCursor.attrs.fgColor,c.bgMode=this.savedCursor.attrs.bgMode,c.bgColor=this.savedCursor.attrs.bgColor,c.bold=this.savedCursor.attrs.bold,c.italic=this.savedCursor.attrs.italic,c.underline=this.savedCursor.attrs.underline,c.inverse=this.savedCursor.attrs.inverse,c.dim=this.savedCursor.attrs.dim)}_getScrollBuffer(){return this.activeBuffer}resize(c,E){this.normalBuffer.resize(c,E),this.alternateBuffer.resize(c,E)}}});function Et(y,c){if(y.length===0||y[0]?.length===0){_t(c);return}let E=0;for(;E<y.length;){let x=y[E];if(!x||x.length===0){E++;continue}let $=x[0]??0;switch($){case 0:_t(c);break;case 1:c.bold=!0;break;case 2:c.dim=!0;break;case 3:c.italic=!0;break;case 4:c.underline=!0;break;case 5:c.bold=!0;break;case 7:c.inverse=!0;break;case 8:c.dim=!0;break;case 9:c.underline=!0;break;case 22:c.bold=!1,c.dim=!1;break;case 23:c.italic=!1;break;case 24:c.underline=!1;break;case 27:c.inverse=!1;break;case 28:c.dim=!1;break;case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:c.fgMode=1,c.fgColor=$-30;break;case 38:E+=Lt(y,E,c,"fg");break;case 39:c.fgMode=0,c.fgColor=-1;break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:c.bgMode=1,c.bgColor=$-40;break;case 48:E+=Lt(y,E,c,"bg");break;case 49:c.bgMode=0,c.bgColor=-1;break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:c.fgMode=1,c.fgColor=$-90+8;break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:c.bgMode=1,c.bgColor=$-100+8;break;default:break}E++}}function _t(y){y.fgMode=ne.fgMode,y.fgColor=ne.fgColor,y.bgMode=ne.bgMode,y.bgColor=ne.bgColor,y.bold=ne.bold,y.italic=ne.italic,y.underline=ne.underline,y.inverse=ne.inverse,y.dim=ne.dim}function Lt(y,c,E,x){if(c+1>=y.length)return 0;let $=y[c+1];if(!$||$.length===0)return 0;let w=$[0];if(w===5){if(c+2>=y.length)return 1;let s=y[c+2];if(!s||s.length===0)return 2;let a=s[0]??0;return a<0||a>255||(x==="fg"?(E.fgMode=1,E.fgColor=a):(E.bgMode=1,E.bgColor=a)),2}if(w===2){if(c+4>=y.length)return 1;let s=y[c+2],a=y[c+3],r=y[c+4];if(!s||s.length===0||!a||a.length===0||!r||r.length===0)return 4;let o=Math.max(0,Math.min(255,s[0]??0)),i=Math.max(0,Math.min(255,a[0]??0)),t=Math.max(0,Math.min(255,r[0]??0)),e=o<<16|i<<8|t;return x==="fg"?(E.fgMode=2,E.fgColor=e):(E.bgMode=2,E.bgColor=e),4}return 1}var Tt=ee(()=>{Le()});var Q,ct,Ee,Rt=ee(()=>{Le();(function(y){y[y.GROUND=0]="GROUND",y[y.ESCAPE=1]="ESCAPE",y[y.ESCAPE_INTERMEDIATE=2]="ESCAPE_INTERMEDIATE",y[y.CSI_ENTRY=3]="CSI_ENTRY",y[y.CSI_PARAM=4]="CSI_PARAM",y[y.CSI_INTERMEDIATE=5]="CSI_INTERMEDIATE",y[y.CSI_IGNORE=6]="CSI_IGNORE",y[y.OSC_STRING=7]="OSC_STRING",y[y.DCS_ENTRY=8]="DCS_ENTRY",y[y.DCS_PARAM=9]="DCS_PARAM",y[y.DCS_INTERMEDIATE=10]="DCS_INTERMEDIATE",y[y.DCS_PASSTHROUGH=11]="DCS_PASSTHROUGH",y[y.DCS_IGNORE=12]="DCS_IGNORE",y[y.SOS_PM_APC_STRING=13]="SOS_PM_APC_STRING"})(Q||(Q={}));ct=class{constructor(){H(this,"buffer",[]);H(this,"expected",0)}getExpected(){return this.expected}decode(c){if(c<128)return this.buffer.length>0&&(this.buffer=[],this.expected=0),String.fromCharCode(c);if(c>=192&&c<224)return this.buffer=[c],this.expected=2,null;if(c>=224&&c<240)return this.buffer=[c],this.expected=3,null;if(c>=240&&c<248)return this.buffer=[c],this.expected=4,null;if(c>=128&&c<192){if(this.buffer.length===0)return null;if(this.buffer.push(c),this.buffer.length===this.expected){let E=this.decodeCodePoint(this.buffer);if(this.buffer=[],this.expected=0,E!==null)return String.fromCodePoint(E)}return null}return this.buffer=[],this.expected=0,null}decodeCodePoint(c){return c.length===2&&c[0]!==void 0&&c[1]!==void 0?(c[0]&31)<<6|c[1]&63:c.length===3&&c[0]!==void 0&&c[1]!==void 0&&c[2]!==void 0?(c[0]&15)<<12|(c[1]&63)<<6|c[2]&63:c.length===4&&c[0]!==void 0&&c[1]!==void 0&&c[2]!==void 0&&c[3]!==void 0?(c[0]&7)<<18|(c[1]&63)<<12|(c[2]&63)<<6|c[3]&63:null}},Ee=class{constructor(c){H(this,"actions");H(this,"state",Q.GROUND);H(this,"intermediates",[]);H(this,"params",[[]]);H(this,"currentParam",0);H(this,"oscData","");H(this,"utf8Decoder",new ct);H(this,"oscHandlers",new Map);H(this,"oscPendingEscape",!1);H(this,"currentAttrs",{...ne});this.actions=c}registerOscHandler(c,E){return this.oscHandlers.has(c)||this.oscHandlers.set(c,[]),this.oscHandlers.get(c)?.push(E),{dispose:()=>{let $=this.oscHandlers.get(c);if($){let w=$.indexOf(E);w!==-1&&$.splice(w,1),$.length===0&&this.oscHandlers.delete(c)}}}}write(c){if(typeof c=="string"){let x=new TextEncoder().encode(c);for(let $ of x)this.processByte($)}else for(let E of c)this.processByte(E)}processByte(c){if(!this.handleAnywhereTransitions(c))switch(this.state){case Q.GROUND:this.handleGround(c);break;case Q.ESCAPE:this.handleEscape(c);break;case Q.ESCAPE_INTERMEDIATE:this.handleEscapeIntermediate(c);break;case Q.CSI_ENTRY:this.handleCsiEntry(c);break;case Q.CSI_PARAM:this.handleCsiParam(c);break;case Q.CSI_INTERMEDIATE:this.handleCsiIntermediate(c);break;case Q.CSI_IGNORE:this.handleCsiIgnore(c);break;case Q.OSC_STRING:this.handleOscString(c);break;default:break}}handleAnywhereTransitions(c){return c===27&&this.state!==Q.OSC_STRING?(this.transitionTo(Q.ESCAPE),!0):c<32&&!(this.state===Q.OSC_STRING&&(c===7||c===27))?(this.actions.execute(c),!0):c>=128&&c<=159&&this.utf8Decoder.getExpected()===0?c===155?(this.transitionTo(Q.CSI_ENTRY),!0):c===157?(this.transitionTo(Q.OSC_STRING),!0):(this.actions.execute(c),!0):!1}handleGround(c){if(c>=32&&c<=126){this.actions.print(String.fromCharCode(c),c);return}if(c>=128){let E=this.utf8Decoder.decode(c);E&&this.actions.print(E,E.codePointAt(0)??c);return}}handleEscape(c){if(c>=32&&c<=47){this.intermediates.push(c),this.transitionTo(Q.ESCAPE_INTERMEDIATE);return}if(c>=48&&c<=126){if(c===91){this.transitionTo(Q.CSI_ENTRY);return}if(c===93){this.transitionTo(Q.OSC_STRING);return}if(c===80||c===88||c===94||c===95){this.transitionTo(Q.GROUND);return}this.actions.escDispatch(this.intermediates,c),this.transitionTo(Q.GROUND);return}}handleEscapeIntermediate(c){if(c>=32&&c<=47){this.intermediates.push(c);return}if(c>=48&&c<=126){this.actions.escDispatch(this.intermediates,c),this.transitionTo(Q.GROUND);return}}handleCsiEntry(c){if(c>=48&&c<=57||c===59){this.handleCsiParam(c),this.state=Q.CSI_PARAM;return}if(c>=60&&c<=63){this.intermediates.push(c),this.state=Q.CSI_PARAM;return}if(c>=32&&c<=47){this.intermediates.push(c),this.transitionTo(Q.CSI_INTERMEDIATE);return}if(c===58){this.transitionTo(Q.CSI_IGNORE);return}if(c>=64&&c<=126){this.actions.csiDispatch(this.params,this.intermediates,c),this.transitionTo(Q.GROUND);return}}handleCsiParam(c){if(c>=48&&c<=57){let E=c-48,x=this.params[this.currentParam];x?x.length===0?x.push(E):x[0]=(x[0]??0)*10+E:this.params[this.currentParam]=[E];return}if(c===59){this.currentParam++,this.params[this.currentParam]=[];return}if(c===58||c>=60&&c<=63){this.transitionTo(Q.CSI_IGNORE);return}if(c>=32&&c<=47){this.intermediates.push(c),this.transitionTo(Q.CSI_INTERMEDIATE);return}if(c>=64&&c<=126){this.actions.csiDispatch(this.params,this.intermediates,c),this.transitionTo(Q.GROUND);return}}handleCsiIntermediate(c){if(c>=32&&c<=47){this.intermediates.push(c);return}if(c>=48&&c<=63){this.transitionTo(Q.CSI_IGNORE);return}if(c>=64&&c<=126){this.actions.csiDispatch(this.params,this.intermediates,c),this.transitionTo(Q.GROUND);return}}handleCsiIgnore(c){if(c>=64&&c<=126){this.transitionTo(Q.GROUND);return}}handleOscString(c){if(this.oscPendingEscape){if(c===92){this.oscPendingEscape=!1,this.dispatchOsc(),this.transitionTo(Q.GROUND);return}this.oscPendingEscape=!1,this.oscData+="\x1B"}if(c===7){this.dispatchOsc(),this.transitionTo(Q.GROUND);return}if(c===156){this.dispatchOsc(),this.transitionTo(Q.GROUND);return}if(c===27){this.oscPendingEscape=!0;return}if(c>=32&&c<=126){this.oscData+=String.fromCharCode(c);return}}dispatchOsc(){let c=this.oscData.indexOf(";");if(c===-1){let w=Number.parseInt(this.oscData,10);Number.isNaN(w)||this.callOscHandlers(w,"");return}let E=this.oscData.substring(0,c),x=this.oscData.substring(c+1),$=Number.parseInt(E,10);Number.isNaN($)||this.callOscHandlers($,x)}callOscHandlers(c,E){let x=this.oscHandlers.get(c);if(x){for(let $ of x)if($(E)===!0)break}this.actions.oscDispatch(c,E)}transitionTo(c){(c===Q.ESCAPE||c===Q.CSI_ENTRY||c===Q.OSC_STRING)&&(this.actions.clear(),this.intermediates=[],this.params=[[]],this.currentParam=0,this.oscData="",this.oscPendingEscape=!1),this.state=c}}});var Dt=se((It,Te)=>{(function(){var y="ace",c=(function(){return this})();if(!c&&typeof window<"u"&&(c=window),!y&&typeof requirejs<"u")return;var E=function(r,o,i){if(typeof r!="string"){E.original?E.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(i=o),E.modules[r]||(E.payloads[r]=i,E.modules[r]=null)};E.modules={},E.payloads={};var x=function(r,o,i){if(typeof o=="string"){var t=s(r,o);if(t!=null)return i&&i(),t}else if(Object.prototype.toString.call(o)==="[object Array]"){for(var e=[],n=0,l=o.length;n<l;++n){var h=s(r,o[n]);if(h==null&&$.original)return;e.push(h)}return i&&i.apply(null,e)||!0}},$=function(r,o){var i=x("",r,o);return i==null&&$.original?$.original.apply(this,arguments):i},w=function(r,o){if(o.indexOf("!")!==-1){var i=o.split("!");return w(r,i[0])+"!"+w(r,i[1])}if(o.charAt(0)=="."){var t=r.split("/").slice(0,-1).join("/");for(o=t+"/"+o;o.indexOf(".")!==-1&&e!=o;){var e=o;o=o.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return o},s=function(r,o){o=w(r,o);var i=E.modules[o];if(!i){if(i=E.payloads[o],typeof i=="function"){var t={},e={id:o,uri:"",exports:t,packaged:!0},n=function(h,f){return x(o,h,f)},l=i(n,t,e);t=l||e.exports,E.modules[o]=t,delete E.payloads[o]}i=E.modules[o]=t||i}return i};function a(r){var o=c;r&&(c[r]||(c[r]={}),o=c[r]),(!o.define||!o.define.packaged)&&(E.original=o.define,o.define=E,o.define.packaged=!0),(!o.require||!o.require.packaged)&&($.original=o.require,o.require=$,o.require.packaged=!0)}a(y)})();ace.define("ace/lib/es6-shim",["require","exports","module"],function(y,c,E){function x($,w,s){Object.defineProperty($,w,{value:s,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||x(String.prototype,"startsWith",function($,w){return w=w||0,this.lastIndexOf($,w)===w}),String.prototype.endsWith||x(String.prototype,"endsWith",function($,w){var s=this;(w===void 0||w>s.length)&&(w=s.length),w-=$.length;var a=s.indexOf($,w);return a!==-1&&a===w}),String.prototype.repeat||x(String.prototype,"repeat",function($){for(var w="",s=this;$>0;)$&1&&(w+=s),($>>=1)&&(s+=s);return w}),String.prototype.includes||x(String.prototype,"includes",function($,w){return this.indexOf($,w)!=-1}),Object.assign||(Object.assign=function($){if($==null)throw new TypeError("Cannot convert undefined or null to object");for(var w=Object($),s=1;s<arguments.length;s++){var a=arguments[s];a!=null&&Object.keys(a).forEach(function(r){w[r]=a[r]})}return w}),Object.values||(Object.values=function($){return Object.keys($).map(function(w){return $[w]})}),Array.prototype.find||x(Array.prototype,"find",function($){for(var w=this.length,s=arguments[1],a=0;a<w;a++){var r=this[a];if($.call(s,r,a,this))return r}}),Array.prototype.findIndex||x(Array.prototype,"findIndex",function($){for(var w=this.length,s=arguments[1],a=0;a<w;a++){var r=this[a];if($.call(s,r,a,this))return a}}),Array.prototype.includes||x(Array.prototype,"includes",function($,w){return this.indexOf($,w)!=-1}),Array.prototype.fill||x(Array.prototype,"fill",function($){for(var w=this,s=w.length>>>0,a=arguments[1],r=a>>0,o=r<0?Math.max(s+r,0):Math.min(r,s),i=arguments[2],t=i===void 0?s:i>>0,e=t<0?Math.max(s+t,0):Math.min(t,s);o<e;)w[o]=$,o++;return w}),Array.of||x(Array,"of",function(){return Array.prototype.slice.call(arguments)})});ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(y,c,E){"use strict";y("./es6-shim")});ace.define("ace/lib/deep_copy",["require","exports","module"],function(y,c,E){c.deepCopy=function x($){if(typeof $!="object"||!$)return $;var w;if(Array.isArray($)){w=[];for(var s=0;s<$.length;s++)w[s]=x($[s]);return w}if(Object.prototype.toString.call($)!=="[object Object]")return $;w={};for(var s in $)w[s]=x($[s]);return w}});ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(y,c,E){"use strict";c.last=function(w){return w[w.length-1]},c.stringReverse=function(w){return w.split("").reverse().join("")},c.stringRepeat=function(w,s){for(var a="";s>0;)s&1&&(a+=w),(s>>=1)&&(w+=w);return a};var x=/^\s\s*/,$=/\s\s*$/;c.stringTrimLeft=function(w){return w.replace(x,"")},c.stringTrimRight=function(w){return w.replace($,"")},c.copyObject=function(w){var s={};for(var a in w)s[a]=w[a];return s},c.copyArray=function(w){for(var s=[],a=0,r=w.length;a<r;a++)w[a]&&typeof w[a]=="object"?s[a]=this.copyObject(w[a]):s[a]=w[a];return s},c.deepCopy=y("./deep_copy").deepCopy,c.arrayToMap=function(w){for(var s={},a=0;a<w.length;a++)s[w[a]]=1;return s},c.createMap=function(w){var s=Object.create(null);for(var a in w)s[a]=w[a];return s},c.arrayRemove=function(w,s){for(var a=0;a<=w.length;a++)s===w[a]&&w.splice(a,1)},c.escapeRegExp=function(w){return w.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},c.escapeHTML=function(w){return(""+w).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},c.getMatchOffsets=function(w,s){var a=[];return w.replace(s,function(r){a.push({offset:arguments[arguments.length-2],length:r.length})}),a},c.deferredCall=function(w){var s=null,a=function(){s=null,w()},r=function(o){return r.cancel(),s=setTimeout(a,o||0),r};return r.schedule=r,r.call=function(){return this.cancel(),w(),r},r.cancel=function(){return clearTimeout(s),s=null,r},r.isPending=function(){return s},r},c.delayedCall=function(w,s){var a=null,r=function(){a=null,w()},o=function(i){a==null&&(a=setTimeout(r,i||s))};return o.delay=function(i){a&&clearTimeout(a),a=setTimeout(r,i||s)},o.schedule=o,o.call=function(){this.cancel(),w()},o.cancel=function(){a&&clearTimeout(a),a=null},o.isPending=function(){return a},o},c.sleep=function(w){return new Promise(function(s){setTimeout(s,w)})},c.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},c.skipEmptyMatch=function(w,s,a){return a&&w.codePointAt(s)>65535?2:1}});ace.define("ace/lib/useragent",["require","exports","module"],function(y,c,E){"use strict";c.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},c.getOS=function(){return c.isMac?c.OS.MAC:c.isLinux?c.OS.LINUX:c.OS.WINDOWS};var x=typeof navigator=="object"?navigator:{},$=(/mac|win|linux/i.exec(x.platform)||["other"])[0].toLowerCase(),w=x.userAgent||"",s=x.appName||"";c.isWin=$=="win",c.isMac=$=="mac",c.isLinux=$=="linux",c.isIE=s=="Microsoft Internet Explorer"||s.indexOf("MSAppHost")>=0?parseFloat((w.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((w.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),c.isOldIE=c.isIE&&c.isIE<9,c.isGecko=c.isMozilla=w.match(/ Gecko\/\d+/),c.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",c.isWebKit=parseFloat(w.split("WebKit/")[1])||void 0,c.isChrome=parseFloat(w.split(" Chrome/")[1])||void 0,c.isSafari=parseFloat(w.split(" Safari/")[1])&&!c.isChrome||void 0,c.isEdge=parseFloat(w.split(" Edge/")[1])||void 0,c.isAIR=w.indexOf("AdobeAIR")>=0,c.isAndroid=w.indexOf("Android")>=0,c.isChromeOS=w.indexOf(" CrOS ")>=0,c.isIOS=/iPad|iPhone|iPod/.test(w)&&!window.MSStream,c.isIOS&&(c.isMac=!0),c.isMobile=c.isIOS||c.isAndroid});ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(y,c,E){"use strict";var x=y("./useragent"),$="http://www.w3.org/1999/xhtml";c.buildDom=function i(t,e,n){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 h=[],f=0;f<t.length;f++){var p=i(t[f],e,n);p&&h.push(p)}return h}var m=document.createElement(t[0]),S=t[1],C=1;S&&typeof S=="object"&&!Array.isArray(S)&&(C=2);for(var f=C;f<t.length;f++)i(t[f],m,n);return C==2&&Object.keys(S).forEach(function(g){var M=S[g];g==="class"?m.className=Array.isArray(M)?M.join(" "):M:typeof M=="function"||g=="value"||g[0]=="$"?m[g]=M:g==="ref"?n&&(n[M]=m):g==="style"?typeof M=="string"&&(m.style.cssText=M):M!=null&&m.setAttribute(g,M)}),e&&e.appendChild(m),m},c.getDocumentHead=function(i){return i||(i=document),i.head||i.getElementsByTagName("head")[0]||i.documentElement},c.createElement=function(i,t){return document.createElementNS?document.createElementNS(t||$,i):document.createElement(i)},c.removeChildren=function(i){i.innerHTML=""},c.createTextNode=function(i,t){var e=t?t.ownerDocument:document;return e.createTextNode(i)},c.createFragment=function(i){var t=i?i.ownerDocument:document;return t.createDocumentFragment()},c.hasCssClass=function(i,t){var e=(i.className+"").split(/\s+/g);return e.indexOf(t)!==-1},c.addCssClass=function(i,t){c.hasCssClass(i,t)||(i.className+=" "+t)},c.removeCssClass=function(i,t){for(var e=i.className.split(/\s+/g);;){var n=e.indexOf(t);if(n==-1)break;e.splice(n,1)}i.className=e.join(" ")},c.toggleCssClass=function(i,t){for(var e=i.className.split(/\s+/g),n=!0;;){var l=e.indexOf(t);if(l==-1)break;n=!1,e.splice(l,1)}return n&&e.push(t),i.className=e.join(" "),n},c.setCssClass=function(i,t,e){e?c.addCssClass(i,t):c.removeCssClass(i,t)},c.hasCssString=function(i,t){var e=0,n;if(t=t||document,n=t.querySelectorAll("style")){for(;e<n.length;)if(n[e++].id===i)return!0}},c.removeElementById=function(i,t){t=t||document,t.getElementById(i)&&t.getElementById(i).remove()};var w,s=[];c.useStrictCSP=function(i){w=i,i==!1?a():s||(s=[])};function a(){var i=s;s=null,i&&i.forEach(function(t){r(t[0],t[1])})}function r(i,t,e){if(!(typeof document>"u")){if(s){if(e)a();else if(e===!1)return s.push([i,t])}if(!w){var n=e;!e||!e.getRootNode?n=document:(n=e.getRootNode(),(!n||n==e)&&(n=document));var l=n.ownerDocument||n;if(t&&c.hasCssString(t,n))return null;t&&(i+=`
/*# sourceURL=ace/css/`+t+" */");var h=c.createElement("style");h.appendChild(l.createTextNode(i)),t&&(h.id=t),n==l&&(n=c.getDocumentHead(l)),n.insertBefore(h,n.firstChild)}}}if(c.importCssString=r,c.importCssStylsheet=function(i,t){c.buildDom(["link",{rel:"stylesheet",href:i}],c.getDocumentHead(t))},c.$fixPositionBug=function(i){var t=i.getBoundingClientRect();if(i.style.left){var e=parseFloat(i.style.left),n=+t.left;Math.abs(e-n)>1&&(i.style.left=2*e-n+"px")}if(i.style.right){var e=parseFloat(i.style.right),n=window.innerWidth-t.right;Math.abs(e-n)>1&&(i.style.right=2*e-n+"px")}if(i.style.top){var e=parseFloat(i.style.top),n=+t.top;Math.abs(e-n)>1&&(i.style.top=2*e-n+"px")}if(i.style.bottom){var e=parseFloat(i.style.bottom),n=window.innerHeight-t.bottom;Math.abs(e-n)>1&&(i.style.bottom=2*e-n+"px")}},c.scrollbarWidth=function(i){var t=c.createElement("ace_inner");t.style.width="100%",t.style.minWidth="0px",t.style.height="200px",t.style.display="block";var e=c.createElement("ace_outer"),n=e.style;n.position="absolute",n.left="-10000px",n.overflow="hidden",n.width="200px",n.minWidth="0px",n.height="150px",n.display="block",e.appendChild(t);var l=i&&i.documentElement||document&&document.documentElement;if(!l)return 0;l.appendChild(e);var h=t.offsetWidth;n.overflow="scroll";var f=t.offsetWidth;return h===f&&(f=e.clientWidth),l.removeChild(e),h-f},c.computedStyle=function(i,t){return window.getComputedStyle(i,"")||{}},c.setStyle=function(i,t,e){i[t]!==e&&(i[t]=e)},c.HAS_CSS_ANIMATION=!1,c.HAS_CSS_TRANSFORMS=!1,c.HI_DPI=x.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,x.isChromeOS&&(c.HI_DPI=!1),typeof document<"u"){var o=document.createElement("div");c.HI_DPI&&o.style.transform!==void 0&&(c.HAS_CSS_TRANSFORMS=!0),!x.isEdge&&typeof o.style.animationName<"u"&&(c.HAS_CSS_ANIMATION=!0),o=null}c.HAS_CSS_TRANSFORMS?c.translate=function(i,t,e){i.style.transform="translate("+Math.round(t)+"px, "+Math.round(e)+"px)"}:c.translate=function(i,t,e){i.style.top=Math.round(e)+"px",i.style.left=Math.round(t)+"px"}});ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(y,c,E){"use strict";var x=y("./dom");c.get=function($,w){var s=new XMLHttpRequest;s.open("GET",$,!0),s.onreadystatechange=function(){s.readyState===4&&w(s.responseText)},s.send(null)},c.loadScript=function($,w){var s=x.getDocumentHead(),a=document.createElement("script");a.src=$,s.appendChild(a),a.onload=a.onreadystatechange=function(r,o){(o||!a.readyState||a.readyState=="loaded"||a.readyState=="complete")&&(a=a.onload=a.onreadystatechange=null,o||w())}},c.qualifyURL=function($){var w=document.createElement("a");return w.href=$,w.href}});ace.define("ace/lib/oop",["require","exports","module"],function(y,c,E){"use strict";c.inherits=function(x,$){x.super_=$,x.prototype=Object.create($.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}})},c.mixin=function(x,$){for(var w in $)x[w]=$[w];return x},c.implement=function(x,$){c.mixin(x,$)}});ace.define("ace/lib/event_emitter",["require","exports","module"],function(y,c,E){"use strict";var x={},$=function(){this.propagationStopped=!0},w=function(){this.defaultPrevented=!0};x._emit=x._dispatchEvent=function(s,a){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var r=this._eventRegistry[s]||[],o=this._defaultHandlers[s];if(!(!r.length&&!o)){(typeof a!="object"||!a)&&(a={}),a.type||(a.type=s),a.stopPropagation||(a.stopPropagation=$),a.preventDefault||(a.preventDefault=w),r=r.slice();for(var i=0;i<r.length&&(r[i](a,this),!a.propagationStopped);i++);if(o&&!a.defaultPrevented)return o(a,this)}},x._signal=function(s,a){var r=(this._eventRegistry||{})[s];if(r){r=r.slice();for(var o=0;o<r.length;o++)r[o](a,this)}},x.once=function(s,a){var r=this;if(this.on(s,function o(){r.off(s,o),a.apply(null,arguments)}),!a)return new Promise(function(o){a=o})},x.setDefaultHandler=function(s,a){var r=this._defaultHandlers;if(r||(r=this._defaultHandlers={_disabled_:{}}),r[s]){var o=r[s],i=r._disabled_[s];i||(r._disabled_[s]=i=[]),i.push(o);var t=i.indexOf(a);t!=-1&&i.splice(t,1)}r[s]=a},x.removeDefaultHandler=function(s,a){var r=this._defaultHandlers;if(r){var o=r._disabled_[s];if(r[s]==a)o&&this.setDefaultHandler(s,o.pop());else if(o){var i=o.indexOf(a);i!=-1&&o.splice(i,1)}}},x.on=x.addEventListener=function(s,a,r){this._eventRegistry=this._eventRegistry||{};var o=this._eventRegistry[s];return o||(o=this._eventRegistry[s]=[]),o.indexOf(a)==-1&&o[r?"unshift":"push"](a),a},x.off=x.removeListener=x.removeEventListener=function(s,a){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[s];if(r){var o=r.indexOf(a);o!==-1&&r.splice(o,1)}},x.removeAllListeners=function(s){s||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[s]=void 0),this._defaultHandlers&&(this._defaultHandlers[s]=void 0)},c.EventEmitter=x});ace.define("ace/lib/report_error",["require","exports","module"],function(y,c,E){c.reportError=function($,w){var s=new Error($);s.data=w,typeof console=="object"&&console.error&&console.error(s),setTimeout(function(){throw s})}});ace.define("ace/lib/default_english_messages",["require","exports","module"],function(y,c,E){var x={"autocomplete.popup.aria-roledescription":"Autocomplete suggestions","autocomplete.popup.aria-label":"Autocomplete suggestions","autocomplete.popup.item.aria-roledescription":"item","autocomplete.loading":"Loading...","editor.scroller.aria-roledescription":"editor","editor.scroller.aria-label":"Editor content, press Enter to start editing, press Escape to exit","editor.gutter.aria-roledescription":"editor gutter","editor.gutter.aria-label":"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit","error-marker.good-state":"Looks good!","prompt.recently-used":"Recently used","prompt.other-commands":"Other commands","prompt.no-matching-commands":"No matching commands","search-box.find.placeholder":"Search for","search-box.find-all.text":"All","search-box.replace.placeholder":"Replace with","search-box.replace-next.text":"Replace","search-box.replace-all.text":"All","search-box.toggle-replace.title":"Toggle Replace mode","search-box.toggle-regexp.title":"RegExp Search","search-box.toggle-case.title":"CaseSensitive Search","search-box.toggle-whole-word.title":"Whole Word Search","search-box.toggle-in-selection.title":"Search In Selection","search-box.search-counter":"$0 of $1","text-input.aria-roledescription":"editor","text-input.aria-label":"Cursor at row $0","gutter.code-folding.range.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.closed.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.open.aria-label":"Toggle code folding, row $0","gutter.code-folding.closed.title":"Unfold code","gutter.code-folding.open.title":"Fold code","gutter.annotation.aria-label.error":"Error, read annotations row $0","gutter.annotation.aria-label.warning":"Warning, read annotations row $0","gutter.annotation.aria-label.info":"Info, read annotations row $0","inline-fold.closed.title":"Unfold code","gutter-tooltip.aria-label.error.singular":"error","gutter-tooltip.aria-label.error.plural":"errors","gutter-tooltip.aria-label.warning.singular":"warning","gutter-tooltip.aria-label.warning.plural":"warnings","gutter-tooltip.aria-label.info.singular":"information message","gutter-tooltip.aria-label.info.plural":"information messages","gutter.annotation.aria-label.security":"Security finding, read annotations row $0","gutter.annotation.aria-label.hint":"Suggestion, read annotations row $0","gutter-tooltip.aria-label.security.singular":"security finding","gutter-tooltip.aria-label.security.plural":"security findings","gutter-tooltip.aria-label.hint.singular":"suggestion","gutter-tooltip.aria-label.hint.plural":"suggestions","editor.tooltip.disable-editing":"Editing is disabled"};c.defaultEnglishMessages=x});ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error","ace/lib/default_english_messages"],function(y,c,E){"no use strict";var x=y("./oop"),$=y("./event_emitter").EventEmitter,w=y("./report_error").reportError,s=y("./default_english_messages").defaultEnglishMessages,a={setOptions:function(e){Object.keys(e).forEach(function(n){this.setOption(n,e[n])},this)},getOptions:function(e){var n={};if(e)Array.isArray(e)||(e=Object.keys(e));else{var l=this.$options;e=Object.keys(l).filter(function(h){return!l[h].hidden})}return e.forEach(function(h){n[h]=this.getOption(h)},this),n},setOption:function(e,n){if(this["$"+e]!==n){var l=this.$options[e];if(!l)return r('misspelled option "'+e+'"');if(l.forwardTo)return this[l.forwardTo]&&this[l.forwardTo].setOption(e,n);l.handlesSet||(this["$"+e]=n),l&&l.set&&l.set.call(this,n)}},getOption:function(e){var n=this.$options[e];return n?n.forwardTo?this[n.forwardTo]&&this[n.forwardTo].getOption(e):n&&n.get?n.get.call(this):this["$"+e]:r('misspelled option "'+e+'"')}};function r(e){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var o,i,t=(function(){function e(){this.$defaultOptions={},o=s,i="dollarSigns"}return e.prototype.defineOptions=function(n,l,h){return n.$options||(this.$defaultOptions[l]=n.$options={}),Object.keys(h).forEach(function(f){var p=h[f];typeof p=="string"&&(p={forwardTo:p}),p.name||(p.name=f),n.$options[p.name]=p,"initialValue"in p&&(n["$"+p.name]=p.initialValue)}),x.implement(n,a),this},e.prototype.resetOptions=function(n){Object.keys(n.$options).forEach(function(l){var h=n.$options[l];"value"in h&&n.setOption(l,h.value)})},e.prototype.setDefaultValue=function(n,l,h){if(!n){for(n in this.$defaultOptions)if(this.$defaultOptions[n][l])break;if(!this.$defaultOptions[n][l])return!1}var f=this.$defaultOptions[n]||(this.$defaultOptions[n]={});f[l]&&(f.forwardTo?this.setDefaultValue(f.forwardTo,l,h):f[l].value=h)},e.prototype.setDefaultValues=function(n,l){Object.keys(l).forEach(function(h){this.setDefaultValue(n,h,l[h])},this)},e.prototype.setMessages=function(n,l){o=n,l&&l.placeholders&&(i=l.placeholders)},e.prototype.nls=function(n,l,h){o[n]||(r("No message found for the key '"+n+"' in messages with id "+o.$id+", trying to find a translation for the default string '"+l+"'."),o[l]||r("No message found for the default string '"+l+"' in the provided messages. Falling back to the default English message."));var f=o[n]||o[l]||l;return h&&(i==="dollarSigns"&&(f=f.replace(/\$(\$|[\d]+)/g,function(p,m){return m=="$"?"$":h[m]})),i==="curlyBrackets"&&(f=f.replace(/\{([^\}]+)\}/g,function(p,m){return h[m]}))),f},e})();t.prototype.warn=r,t.prototype.reportError=w,x.implement(t.prototype,$),c.AppConfig=t});ace.define("ace/theme/textmate-css",["require","exports","module"],function(y,c,E){E.exports=`.ace-tm .ace_gutter {
  background: #f0f0f0;
  color: #333;
}

.ace-tm .ace_print-margin {
  width: 1px;
  background: #e8e8e8;
}

.ace-tm .ace_fold {
    background-color: #6B72E6;
}

.ace-tm {
  background-color: #FFFFFF;
  color: black;
}

.ace-tm .ace_cursor {
  color: black;
}
        
.ace-tm .ace_invisible {
  color: rgb(191, 191, 191);
}

.ace-tm .ace_storage,
.ace-tm .ace_keyword {
  color: blue;
}

.ace-tm .ace_constant {
  color: rgb(197, 6, 11);
}

.ace-tm .ace_constant.ace_buildin {
  color: rgb(88, 72, 246);
}

.ace-tm .ace_constant.ace_language {
  color: rgb(88, 92, 246);
}

.ace-tm .ace_constant.ace_library {
  color: rgb(6, 150, 14);
}

.ace-tm .ace_invalid {
  background-color: rgba(255, 0, 0, 0.1);
  color: red;
}

.ace-tm .ace_support.ace_function {
  color: rgb(60, 76, 114);
}

.ace-tm .ace_support.ace_constant {
  color: rgb(6, 150, 14);
}

.ace-tm .ace_support.ace_type,
.ace-tm .ace_support.ace_class {
  color: rgb(109, 121, 222);
}

.ace-tm .ace_keyword.ace_operator {
  color: rgb(104, 118, 135);
}

.ace-tm .ace_string {
  color: rgb(3, 106, 7);
}

.ace-tm .ace_comment {
  color: rgb(76, 136, 107);
}

.ace-tm .ace_comment.ace_doc {
  color: rgb(0, 102, 255);
}

.ace-tm .ace_comment.ace_doc.ace_tag {
  color: rgb(128, 159, 191);
}

.ace-tm .ace_constant.ace_numeric {
  color: rgb(0, 0, 205);
}

.ace-tm .ace_variable {
  color: rgb(49, 132, 149);
}

.ace-tm .ace_xml-pe {
  color: rgb(104, 104, 91);
}

.ace-tm .ace_entity.ace_name.ace_function {
  color: #0000A2;
}


.ace-tm .ace_heading {
  color: rgb(12, 7, 255);
}

.ace-tm .ace_list {
  color:rgb(185, 6, 144);
}

.ace-tm .ace_meta.ace_tag {
  color:rgb(0, 22, 142);
}

.ace-tm .ace_string.ace_regex {
  color: rgb(255, 0, 0)
}

.ace-tm .ace_marker-layer .ace_selection {
  background: rgb(181, 213, 255);
}
.ace-tm.ace_multiselect .ace_selection.ace_start {
  box-shadow: 0 0 3px 0px white;
}
.ace-tm .ace_marker-layer .ace_step {
  background: rgb(252, 255, 0);
}

.ace-tm .ace_marker-layer .ace_stack {
  background: rgb(164, 229, 101);
}

.ace-tm .ace_marker-layer .ace_bracket {
  margin: -1px 0 0 -1px;
  border: 1px solid rgb(192, 192, 192);
}

.ace-tm .ace_marker-layer .ace_active-line {
  background: rgba(0, 0, 0, 0.07);
}

.ace-tm .ace_gutter-active-line {
    background-color : #dcdcdc;
}

.ace-tm .ace_marker-layer .ace_selected-word {
  background: rgb(250, 250, 255);
  border: 1px solid rgb(200, 200, 250);
}

.ace-tm .ace_indent-guide {
  background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
}

.ace-tm .ace_indent-guide-active {
  background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
}
`});ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(y,c,E){"use strict";c.isDark=!1,c.cssClass="ace-tm",c.cssText=y("./textmate-css"),c.$id="ace/theme/textmate";var x=y("../lib/dom");x.importCssString(c.cssText,c.cssClass,!1)});ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(y,c,E){"no use strict";var x=y("./lib/lang"),$=y("./lib/net"),w=y("./lib/dom"),s=y("./lib/app_config").AppConfig;E.exports=c=new s;var a={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};c.get=function(t){if(!a.hasOwnProperty(t))throw new Error("Unknown config key: "+t);return a[t]},c.set=function(t,e){if(a.hasOwnProperty(t))a[t]=e;else if(this.setDefaultValue("",t,e)==!1)throw new Error("Unknown config key: "+t);t=="useStrictCSP"&&w.useStrictCSP(e)},c.all=function(){return x.copyObject(a)},c.$modes={},c.moduleUrl=function(t,e){if(a.$moduleUrls[t])return a.$moduleUrls[t];var n=t.split("/");e=e||n[n.length-2]||"";var l=e=="snippets"?"/":"-",h=n[n.length-1];if(e=="worker"&&l=="-"){var f=new RegExp("^"+e+"[\\-_]|[\\-_]"+e+"$","g");h=h.replace(f,"")}(!h||h==e)&&n.length>1&&(h=n[n.length-2]);var p=a[e+"Path"];return p==null?p=a.basePath:l=="/"&&(e=l=""),p&&p.slice(-1)!="/"&&(p+="/"),p+e+l+h+this.get("suffix")},c.setModuleUrl=function(t,e){return a.$moduleUrls[t]=e};var r=function(t,e){if(t==="ace/theme/textmate"||t==="./theme/textmate")return e(null,y("./theme/textmate"));if(o)return o(t,e);console.error("loader is not configured")},o;c.setLoader=function(t){o=t},c.dynamicModules=Object.create(null),c.$loading={},c.$loaded={},c.loadModule=function(t,e){var n;if(Array.isArray(t))var l=t[0],h=t[1];else if(typeof t=="string")var h=t;var f=function(p){if(p&&!c.$loading[h])return e&&e(p);if(c.$loading[h]||(c.$loading[h]=[]),c.$loading[h].push(e),!(c.$loading[h].length>1)){var m=function(){r(h,function(S,C){C&&(c.$loaded[h]=C),c._emit("load.module",{name:h,module:C});var g=c.$loading[h];c.$loading[h]=null,g.forEach(function(M){M&&M(C)})})};if(!c.get("packaged"))return m();$.loadScript(c.moduleUrl(h,l),m),i()}};if(c.dynamicModules[h])c.dynamicModules[h]().then(function(p){p.default?f(p.default):f(p)});else{try{n=this.$require(h)}catch{}f(n||c.$loaded[h])}},c.$require=function(t){if(typeof E.require=="function"){var e="require";return E[e](t)}},c.setModuleLoader=function(t,e){c.dynamicModules[t]=e};var i=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"),i=function(){})};c.version="1.44.0"});ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(y,c,E){"use strict";y("./lib/fixoldbrowsers");var x=y("./config");x.setLoader(function(a,r){y([a],function(o){r(null,o)})});var $=(function(){return this||typeof window<"u"&&window})();E.exports=function(a){x.init=w,x.$require=y,a.require=y,typeof define=="function"&&(a.define=define)},w(!0);function w(a){if(!(!$||!$.document)){x.set("packaged",a||y.packaged||E.packaged||$.define&&define.packaged);var r={},o="",i=document.currentScript||document._currentScript,t=i&&i.ownerDocument||document;i&&i.src&&(o=i.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var e=t.getElementsByTagName("script"),n=0;n<e.length;n++){var l=e[n],h=l.src||l.getAttribute("src");if(h){for(var f=l.attributes,p=0,m=f.length;p<m;p++){var S=f[p];S.name.indexOf("data-ace-")===0&&(r[s(S.name.replace(/^data-ace-/,""))]=S.value)}var C=h.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);C&&(o=C[1])}}o&&(r.base=r.base||o,r.packaged=!0),r.basePath=r.base,r.workerPath=r.workerPath||r.base,r.modePath=r.modePath||r.base,r.themePath=r.themePath||r.base,delete r.base;for(var g in r)typeof r[g]<"u"&&x.set(g,r[g])}}function s(a){return a.replace(/-(.)/g,function(r,o){return o.toUpperCase()})}});ace.define("ace/range",["require","exports","module"],function(y,c,E){"use strict";var x=(function(){function $(w,s,a,r){this.start={row:w,column:s},this.end={row:a,column:r}}return $.prototype.isEqual=function(w){return this.start.row===w.start.row&&this.end.row===w.end.row&&this.start.column===w.start.column&&this.end.column===w.end.column},$.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},$.prototype.contains=function(w,s){return this.compare(w,s)==0},$.prototype.compareRange=function(w){var s,a=w.end,r=w.start;return s=this.compare(a.row,a.column),s==1?(s=this.compare(r.row,r.column),s==1?2:s==0?1:0):s==-1?-2:(s=this.compare(r.row,r.column),s==-1?-1:s==1?42:0)},$.prototype.comparePoint=function(w){return this.compare(w.row,w.column)},$.prototype.containsRange=function(w){return this.comparePoint(w.start)==0&&this.comparePoint(w.end)==0},$.prototype.intersects=function(w){var s=this.compareRange(w);return s==-1||s==0||s==1},$.prototype.isEnd=function(w,s){return this.end.row==w&&this.end.column==s},$.prototype.isStart=function(w,s){return this.start.row==w&&this.start.column==s},$.prototype.setStart=function(w,s){typeof w=="object"?(this.start.column=w.column,this.start.row=w.row):(this.start.row=w,this.start.column=s)},$.prototype.setEnd=function(w,s){typeof w=="object"?(this.end.column=w.column,this.end.row=w.row):(this.end.row=w,this.end.column=s)},$.prototype.inside=function(w,s){return this.compare(w,s)==0?!(this.isEnd(w,s)||this.isStart(w,s)):!1},$.prototype.insideStart=function(w,s){return this.compare(w,s)==0?!this.isEnd(w,s):!1},$.prototype.insideEnd=function(w,s){return this.compare(w,s)==0?!this.isStart(w,s):!1},$.prototype.compare=function(w,s){return!this.isMultiLine()&&w===this.start.row?s<this.start.column?-1:s>this.end.column?1:0:w<this.start.row?-1:w>this.end.row?1:this.start.row===w?s>=this.start.column?0:-1:this.end.row===w?s<=this.end.column?0:1:0},$.prototype.compareStart=function(w,s){return this.start.row==w&&this.start.column==s?-1:this.compare(w,s)},$.prototype.compareEnd=function(w,s){return this.end.row==w&&this.end.column==s?1:this.compare(w,s)},$.prototype.compareInside=function(w,s){return this.end.row==w&&this.end.column==s?1:this.start.row==w&&this.start.column==s?-1:this.compare(w,s)},$.prototype.clipRows=function(w,s){if(this.end.row>s)var a={row:s+1,column:0};else if(this.end.row<w)var a={row:w,column:0};if(this.start.row>s)var r={row:s+1,column:0};else if(this.start.row<w)var r={row:w,column:0};return $.fromPoints(r||this.start,a||this.end)},$.prototype.extend=function(w,s){var a=this.compare(w,s);if(a==0)return this;if(a==-1)var r={row:w,column:s};else var o={row:w,column:s};return $.fromPoints(r||this.start,o||this.end)},$.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},$.prototype.isMultiLine=function(){return this.start.row!==this.end.row},$.prototype.clone=function(){return $.fromPoints(this.start,this.end)},$.prototype.collapseRows=function(){return this.end.column==0?new $(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new $(this.start.row,0,this.end.row,0)},$.prototype.toScreenRange=function(w){var s=w.documentToScreenPosition(this.start),a=w.documentToScreenPosition(this.end);return new $(s.row,s.column,a.row,a.column)},$.prototype.moveBy=function(w,s){this.start.row+=w,this.start.column+=s,this.end.row+=w,this.end.column+=s},$})();x.fromPoints=function($,w){return new x($.row,$.column,w.row,w.column)},x.comparePoints=function($,w){return $.row-w.row||$.column-w.column},c.Range=x});ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(y,c,E){"use strict";for(var x=y("./oop"),$={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},w={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},s=0;s<10;s++)w["Digit"+s]=48+s,w["Numpad"+s]=96+s,$.PRINTABLE_KEYS[48+s]=""+s,$.FUNCTION_KEYS[96+s]="Numpad"+s;for(var s=65;s<91;s++){var a=String.fromCharCode(s+32);w["Key"+a.toUpperCase()]=s,$.PRINTABLE_KEYS[s]=a}for(var s=1;s<13;s++)w["F"+s]=111+s,$.FUNCTION_KEYS[111+s]="F"+s;var r={Shift:16,Control:17,Alt:18,Meta:224};for(var o in r)w[o]=w[o+"Left"]=w[o+"Right"]=r[o];c.$codeToKeyCode=w,$.PRINTABLE_KEYS[173]="-";for(var i in $.FUNCTION_KEYS){var t=$.FUNCTION_KEYS[i].toLowerCase();$[t]=parseInt(i,10)}for(var i in $.PRINTABLE_KEYS){var t=$.PRINTABLE_KEYS[i].toLowerCase();$[t]=parseInt(i,10)}x.mixin($,$.MODIFIER_KEYS),x.mixin($,$.PRINTABLE_KEYS),x.mixin($,$.FUNCTION_KEYS),$.enter=$.return,$.escape=$.esc,$.del=$.delete,(function(){for(var e=["cmd","ctrl","alt","shift"],n=Math.pow(2,e.length);n--;)$.KEY_MODS[n]=e.filter(function(l){return n&$.KEY_MODS[l]}).join("-")+"-"})(),$.KEY_MODS[0]="",$.KEY_MODS[-1]="input-",x.mixin(c,$),c.default=c,c.keyCodeToString=function(e){var n=$[e];return typeof n!="string"&&(n=String.fromCharCode(e)),n.toLowerCase()}});ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(y,c,E){"use strict";var x=y("./keys"),$=y("./useragent"),w=null,s=0,a;function r(){a=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return a={passive:!1},!0}})}catch{}}function o(){return a==null&&r(),a}function i(p,m,S){this.elem=p,this.type=m,this.callback=S}i.prototype.destroy=function(){e(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var t=c.addListener=function(p,m,S,C){p.addEventListener(m,S,o()),C&&C.$toDestroy.push(new i(p,m,S))},e=c.removeListener=function(p,m,S){p.removeEventListener(m,S,o())};c.stopEvent=function(p){return c.stopPropagation(p),c.preventDefault(p),!1},c.stopPropagation=function(p){p.stopPropagation&&p.stopPropagation()},c.preventDefault=function(p){p.preventDefault&&p.preventDefault()},c.getButton=function(p){return p.type=="dblclick"?0:p.type=="contextmenu"||$.isMac&&p.ctrlKey&&!p.altKey&&!p.shiftKey?2:p.button},c.capture=function(p,m,S){var C=p&&p.ownerDocument||document;function g(M){m&&m(M),S&&S(M),e(C,"mousemove",m),e(C,"mouseup",g),e(C,"dragstart",g)}return t(C,"mousemove",m),t(C,"mouseup",g),t(C,"dragstart",g),g},c.addMouseWheelListener=function(p,m,S){t(p,"wheel",function(C){var g=.15,M=C.deltaX||0,k=C.deltaY||0;switch(C.deltaMode){case C.DOM_DELTA_PIXEL:C.wheelX=M*g,C.wheelY=k*g;break;case C.DOM_DELTA_LINE:var _=15;C.wheelX=M*_,C.wheelY=k*_;break;case C.DOM_DELTA_PAGE:var R=150;C.wheelX=M*R,C.wheelY=k*R;break}m(C)},S)},c.addMultiMouseDownListener=function(p,m,S,C,g){var M=0,k,_,R,b={2:"dblclick",3:"tripleclick",4:"quadclick"};function v(d){if(c.getButton(d)!==0?M=0:d.detail>1?(M++,M>4&&(M=1)):M=1,$.isIE){var u=Math.abs(d.clientX-k)>5||Math.abs(d.clientY-_)>5;(!R||u)&&(M=1),R&&clearTimeout(R),R=setTimeout(function(){R=null},m[M-1]||600),M==1&&(k=d.clientX,_=d.clientY)}if(d._clicks=M,S[C]("mousedown",d),M>4)M=0;else if(M>1)return S[C](b[M],d)}Array.isArray(p)||(p=[p]),p.forEach(function(d){t(d,"mousedown",v,g)})};function n(p){return 0|(p.ctrlKey?1:0)|(p.altKey?2:0)|(p.shiftKey?4:0)|(p.metaKey?8:0)}c.getModifierString=function(p){return x.KEY_MODS[n(p)]};function l(p,m,S){var C=n(m);if(!S&&m.code&&(S=x.$codeToKeyCode[m.code]||S),!$.isMac&&w){if(m.getModifierState&&(m.getModifierState("OS")||m.getModifierState("Win"))&&(C|=8),w.altGr)if((3&C)!=3)w.altGr=0;else return;if(S===18||S===17){var g=m.location;if(S===17&&g===1)w[S]==1&&(s=m.timeStamp);else if(S===18&&C===3&&g===2){var M=m.timeStamp-s;M<50&&(w.altGr=!0)}}}if(S in x.MODIFIER_KEYS&&(S=-1),!(!C&&S===13&&m.location===3&&(p(m,C,-S),m.defaultPrevented))){if($.isChromeOS&&C&8){if(p(m,C,S),m.defaultPrevented)return;C&=-9}return!C&&!(S in x.FUNCTION_KEYS)&&!(S in x.PRINTABLE_KEYS)?!1:p(m,C,S)}}c.addCommandKeyListener=function(p,m,S){var C=null;t(p,"keydown",function(g){w[g.keyCode]=(w[g.keyCode]||0)+1;var M=l(m,g,g.keyCode);return C=g.defaultPrevented,M},S),t(p,"keypress",function(g){C&&(g.ctrlKey||g.altKey||g.shiftKey||g.metaKey)&&(c.stopEvent(g),C=null)},S),t(p,"keyup",function(g){w[g.keyCode]=null},S),w||(h(),t(window,"focus",h))};function h(){w=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!$.isOldIE){var f=1;c.nextTick=function(p,m){m=m||window;var S="zero-timeout-message-"+f++,C=function(g){g.data==S&&(c.stopPropagation(g),e(m,"message",C),p())};t(m,"message",C),m.postMessage(S,"*")}}c.$idleBlocked=!1,c.onIdle=function(p,m){return setTimeout(function S(){c.$idleBlocked?setTimeout(S,100):p()},m)},c.$idleBlockId=null,c.blockIdle=function(p){c.$idleBlockId&&clearTimeout(c.$idleBlockId),c.$idleBlocked=!0,c.$idleBlockId=setTimeout(function(){c.$idleBlocked=!1},p||100)},c.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),c.nextFrame?c.nextFrame=c.nextFrame.bind(window):c.nextFrame=function(p){setTimeout(p,17)}});ace.define("ace/clipboard",["require","exports","module"],function(y,c,E){"use strict";var x;E.exports={lineMode:!1,pasteCancelled:function(){return x&&x>Date.now()-50?!0:x=!1},cancel:function(){x=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(y,c,E){"use strict";var x=y("../lib/event"),$=y("../config").nls,w=y("../lib/useragent"),s=y("../lib/dom"),a=y("../lib/lang"),r=y("../clipboard"),o=w.isChrome<18,i=w.isIE,t=w.isChrome>63,e=400,n=y("../lib/keys"),l=n.KEY_MODS,h=w.isIOS,f=h?/\s/:/\n/,p=w.isMobile,m=(function(){function S(C,g){var M=this;this.host=g,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",C.insertBefore(this.text,C.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",p||(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"}),x.addListener(this.text,"blur",function(k){M.ignoreFocusEvents||(g.onBlur(k),M.$isFocused=!1)},g),x.addListener(this.text,"focus",function(k){if(!M.ignoreFocusEvents){if(M.$isFocused=!0,w.isEdge)try{if(!document.hasFocus())return}catch{}g.onFocus(k),w.isEdge?setTimeout(M.resetSelection.bind(M)):M.resetSelection()}},g),this.$focusScroll=!1,g.on("beforeEndOperation",function(){var k=g.curOp,_=k&&k.command&&k.command.name;if(_!="insertstring"){var R=_&&(k.docChanged||k.selectionChanged);M.inComposition&&R&&(M.lastValue=M.text.value="",M.onCompositionEnd()),M.resetSelection()}}),g.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=h?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&g.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,x.addCommandKeyListener(this.text,function(k,_,R){if(!M.inComposition)return g.onCommandKey(k,_,R)},g),x.addListener(this.text,"select",this.onSelect.bind(this),g),x.addListener(this.text,"input",this.onInput.bind(this),g),x.addListener(this.text,"cut",this.onCut.bind(this),g),x.addListener(this.text,"copy",this.onCopy.bind(this),g),x.addListener(this.text,"paste",this.onPaste.bind(this),g),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&x.addListener(C,"keydown",function(k){if(!(w.isMac&&!k.metaKey||!k.ctrlKey))switch(k.keyCode){case 67:M.onCopy(k);break;case 86:M.onPaste(k);break;case 88:M.onCut(k);break}},g),this.syncComposition=a.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),x.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),g),x.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),g),x.addListener(this.text,"keyup",this.onKeyup.bind(this),g),x.addListener(this.text,"keydown",this.syncComposition.bind(this),g),x.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),g),this.closeTimeout,x.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),g),x.addListener(this.text,"mousedown",function(k){k.preventDefault(),M.onContextMenuClose()},g),x.addListener(g.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),g),x.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),g),h&&this.addIosSelectionHandler(C,g,this.text)}return S.prototype.addIosSelectionHandler=function(C,g,M){var k=this,_=null,R=!1;M.addEventListener("keydown",function(v){_&&clearTimeout(_),R=!0},!0),M.addEventListener("keyup",function(v){_=setTimeout(function(){R=!1},100)},!0);var b=function(v){if(document.activeElement===M&&!(R||k.inComposition||g.$mouseHandler.isMousePressed)&&!k.copied){var d=M.selectionStart,u=M.selectionEnd,A=null,L=0;if(d==0?A=n.up:d==1?A=n.home:u>k.lastSelectionEnd&&k.lastValue[u]==`
`?A=n.end:d<k.lastSelectionStart&&k.lastValue[d-1]==" "?(A=n.left,L=l.option):d<k.lastSelectionStart||d==k.lastSelectionStart&&k.lastSelectionEnd!=k.lastSelectionStart&&d==u?A=n.left:u>k.lastSelectionEnd&&k.lastValue.slice(0,u).split(`
`).length>2?A=n.down:u>k.lastSelectionEnd&&k.lastValue[u-1]==" "?(A=n.right,L=l.option):(u>k.lastSelectionEnd||u==k.lastSelectionEnd&&k.lastSelectionEnd!=k.lastSelectionStart&&d==u)&&(A=n.right),d!==u&&(L|=l.shift),A){var T=g.onCommandKey({},L,A);if(!T&&g.commands){A=n.keyCodeToString(A);var I=g.commands.findKeyCommand(L,A);I&&g.execCommand(I)}k.lastSelectionStart=d,k.lastSelectionEnd=u,k.resetSelection("")}}};document.addEventListener("selectionchange",b),g.on("destroy",function(){document.removeEventListener("selectionchange",b)})},S.prototype.onContextMenuClose=function(){var C=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){C.tempStyle&&(C.text.style.cssText=C.tempStyle,C.tempStyle=""),C.host.renderer.$isMousePressed=!1,C.host.renderer.$keepTextAreaAtCursor&&C.host.renderer.$moveTextAreaToCursor()},0)},S.prototype.$onContextMenu=function(C){this.host.textInput.onContextMenu(C),this.onContextMenuClose()},S.prototype.onKeyup=function(C){C.keyCode==27&&this.text.value.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},S.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},S.prototype.onCompositionStart=function(C){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){C.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var g=this.host.getSelectionRange();g.end.row=g.start.row,g.end.column=g.start.column,this.inComposition.markerRange=g,this.inComposition.selectionStart=this.lastSelectionStart,this.host.onCompositionStart(this.inComposition),this.inComposition.useTextareaForIME?(this.lastValue=this.text.value="",this.lastSelectionStart=0,this.lastSelectionEnd=0):(this.text.msGetInputContext&&(this.inComposition.context=this.text.msGetInputContext()),this.text.getInputContext&&(this.inComposition.context=this.text.getInputContext()))}},S.prototype.onCompositionUpdate=function(){if(!(!this.inComposition||!this.host.onCompositionUpdate||this.host.$readOnly)){if(this.commandMode)return this.cancelComposition();if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var C=this.text.value;this.sendText(C),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},S.prototype.onCompositionEnd=function(C){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),C&&this.onInput())},S.prototype.onCut=function(C){this.doCopy(C,!0)},S.prototype.onCopy=function(C){this.doCopy(C,!1)},S.prototype.onPaste=function(C){var g=this.handleClipboardData(C);r.pasteCancelled()||(typeof g=="string"?(g&&this.host.onPaste(g,C),w.isIE&&setTimeout(this.resetSelection),x.preventDefault(C)):(this.text.value="",this.pasted=!0))},S.prototype.doCopy=function(C,g){var M=this,k=this.host.getCopyText();if(!k)return x.preventDefault(C);this.handleClipboardData(C,k)?(h&&(this.resetSelection(k),this.copied=k,setTimeout(function(){M.copied=!1},10)),g?this.host.onCut():this.host.onCopy(),x.preventDefault(C)):(this.copied=!0,this.text.value=k,this.text.select(),setTimeout(function(){M.copied=!1,M.resetSelection(),g?M.host.onCut():M.host.onCopy()}))},S.prototype.handleClipboardData=function(C,g,M){var k=C.clipboardData||window.clipboardData;if(!(!k||o)){var _=i||M?"Text":"text/plain";try{return g?k.setData(_,g)!==!1:k.getData(_)}catch(R){if(!M)return this.handleClipboardData(R,g,!0)}}},S.prototype.onInput=function(C){if(this.inComposition)return this.onCompositionUpdate();if(C&&C.inputType){if(C.inputType=="historyUndo")return this.host.execCommand("undo");if(C.inputType=="historyRedo")return this.host.execCommand("redo")}var g=this.text.value,M=this.sendText(g,!0);(g.length>e+100||f.test(M)||p&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},S.prototype.sendText=function(C,g){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),C&&this.host.onPaste(C),this.pasted=!1,"";for(var M=this.text.selectionStart,k=this.text.selectionEnd,_=this.lastSelectionStart,R=this.lastValue.length-this.lastSelectionEnd,b=C,v=C.length-M,d=C.length-k,u=0;_>0&&this.lastValue[u]==C[u];)u++,_--;for(b=b.slice(u),u=1;R>0&&this.lastValue.length-u>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-u]==C[C.length-u];)u++,R--;v-=u-1,d-=u-1;var A=b.length-u+1;if(A<0&&(_=-A,A=0),b=b.slice(0,A),!g&&!b&&!v&&!_&&!R&&!d)return"";this.sendingText=!0;var L=!1;return w.isAndroid&&b==". "&&(b="  ",L=!0),b&&!_&&!R&&!v&&!d||this.commandMode?this.host.onTextInput(b):this.host.onTextInput(b,{extendLeft:_,extendRight:R,restoreStart:v,restoreEnd:d}),this.sendingText=!1,this.lastValue=C,this.lastSelectionStart=M,this.lastSelectionEnd=k,this.lastRestoreEnd=d,L?`
`:b},S.prototype.onSelect=function(C){var g=this;if(!this.inComposition){var M=function(k){return k.selectionStart===0&&k.selectionEnd>=g.lastValue.length&&k.value===g.lastValue&&g.lastValue&&k.selectionEnd!==g.lastSelectionEnd};this.copied?this.copied=!1:M(this.text)?(this.host.selectAll(),this.resetSelection()):p&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},S.prototype.$resetSelectionIOS=function(C){if(!(!this.$isFocused||this.copied&&!C||this.sendingText)){C||(C="");var g=`
 ab`+C+`cde fg
`;g!=this.text.value&&(this.text.value=this.lastValue=g);var M=4,k=4+(C.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=M||this.lastSelectionEnd!=k)&&this.text.setSelectionRange(M,k),this.lastSelectionStart=M,this.lastSelectionEnd=k}},S.prototype.$resetSelection=function(){var C=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var g=0,M=0,k="",_=function(I,D){for(var O=D,F=1;F<=I-C.rowStart&&F<2*C.numberOfExtraLines+1;F++)O+=C.host.session.getLine(I-F).length+1;return O};if(this.host.session){var R=this.host.selection,b=R.getRange(),v=R.cursor.row;v===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):v===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(v<this.rowStart-1||v>this.rowEnd+1)&&(this.rowStart=v>this.numberOfExtraLines?v-this.numberOfExtraLines:0,this.rowEnd=v>this.numberOfExtraLines?v+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var d=[],u=this.rowStart;u<=this.rowEnd;u++)d.push(this.host.session.getLine(u));if(k=d.join(`
`),g=_(b.start.row,b.start.column),M=_(b.end.row,b.end.column),b.start.row<this.rowStart){var A=this.host.session.getLine(this.rowStart-1);g=b.start.row<this.rowStart-1?0:g,M+=A.length+1,k=A+`
`+k}else if(b.end.row>this.rowEnd){var L=this.host.session.getLine(this.rowEnd+1);M=b.end.row>this.rowEnd+1?L.length:b.end.column,M+=k.length+1,k=k+`
`+L}else p&&v>0&&(k=`
`+k,M+=1,g+=1);k.length>e&&(g<e&&M<e?k=k.slice(0,e):(k=`
`,g==M?g=M=0:(g=0,M=1)));var T=k+`

`;T!=this.lastValue&&(this.text.value=this.lastValue=T,this.lastSelectionStart=this.lastSelectionEnd=T.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=M||this.lastSelectionStart!=g||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(g,M),this.lastSelectionStart=g,this.lastSelectionEnd=M}catch{}this.inComposition=!1}},S.prototype.setHost=function(C){this.host=C},S.prototype.setNumberOfExtraLines=function(C){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,C<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=C},S.prototype.setAriaLabel=function(){var C="";if(this.host.$textInputAriaLabel&&(C+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var g=this.host.session.selection.cursor.row;C+=$("text-input.aria-label","Cursor at row $0",[g+1])}this.text.setAttribute("aria-label",C)},S.prototype.setAriaOptions=function(C){C.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",C.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",C.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),C.role&&this.text.setAttribute("role",C.role),C.setLabel&&(this.text.setAttribute("aria-roledescription",$("text-input.aria-roledescription","editor")),this.setAriaLabel())},S.prototype.focus=function(){var C=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||t||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var g=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var M=this.text.getBoundingClientRect().top!=0}catch{return}var k=[];if(M)for(var _=this.text.parentElement;_&&_.nodeType==1;)k.push(_),_.setAttribute("ace_nocontext","true"),!_.parentElement&&_.getRootNode?_=_.getRootNode().host:_=_.parentElement;this.text.focus({preventScroll:!0}),M&&k.forEach(function(R){R.removeAttribute("ace_nocontext")}),setTimeout(function(){C.text.style.position="",C.text.style.top=="0px"&&(C.text.style.top=g)},0)},S.prototype.blur=function(){this.text.blur()},S.prototype.isFocused=function(){return this.$isFocused},S.prototype.setInputHandler=function(C){this.inputHandler=C},S.prototype.getInputHandler=function(){return this.inputHandler},S.prototype.getElement=function(){return this.text},S.prototype.setCommandMode=function(C){this.commandMode=C,this.text.readOnly=!1},S.prototype.setReadOnly=function(C){this.commandMode||(this.text.readOnly=C)},S.prototype.setCopyWithEmptySelection=function(C){},S.prototype.onContextMenu=function(C){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:C}),this.moveToMouse(C,!0)},S.prototype.moveToMouse=function(C,g){var M=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(g?"z-index:100000;":"")+(w.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var k=this.host.container.getBoundingClientRect(),_=s.computedStyle(this.host.container),R=k.top+(parseInt(_.borderTopWidth)||0),b=k.left+(parseInt(_.borderLeftWidth)||0),v=k.bottom-R-this.text.clientHeight-2,d=function(u){s.translate(M.text,u.clientX-b-2,Math.min(u.clientY-R-2,v))};d(C),C.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),w.isWin&&x.capture(this.host.container,d,this.onContextMenuClose.bind(this)))},S.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},S})();c.TextInput=m,c.$setUserAgentForTests=function(S,C){p=S,h=C}});ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(y,c,E){"use strict";var x=y("../lib/useragent"),$=0,w=550,s=(function(){function o(i){i.$clickSelection=null;var t=i.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(i)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(i)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(i)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(i)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(i));var e=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];e.forEach(function(n){i[n]=this[n]},this),i.selectByLines=this.extendSelectionBy.bind(i,"getLineRange"),i.selectByWords=this.extendSelectionBy.bind(i,"getWordRange")}return o.prototype.onMouseDown=function(i){var t=i.inSelection(),e=i.getDocumentPosition();this.mousedownEvent=i;var n=this.editor,l=i.getButton();if(l!==0){var h=n.getSelectionRange(),f=h.isEmpty();(f||l==1)&&n.selection.moveToPosition(e),l==2&&(n.textInput.onContextMenu(i.domEvent),x.isMozilla||i.preventDefault());return}if(this.mousedownEvent.time=Date.now(),t&&!n.isFocused()&&(n.focus(),this.$focusTimeout&&!this.$clickSelection&&!n.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(i);return}return this.captureMouse(i),this.startSelect(e,i.domEvent._clicks>1),i.preventDefault()},o.prototype.startSelect=function(i,t){i=i||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var e=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?e.selection.selectToPosition(i):t||e.selection.moveToPosition(i),t||this.select(),e.setStyle("ace_selecting"),this.setState("select"))},o.prototype.select=function(){var i,t=this.editor,e=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var n=this.$clickSelection.comparePoint(e);if(n==-1)i=this.$clickSelection.end;else if(n==1)i=this.$clickSelection.start;else{var l=r(this.$clickSelection,e,t.session);e=l.cursor,i=l.anchor}t.selection.setSelectionAnchor(i.row,i.column)}t.selection.selectToPosition(e),t.renderer.scrollCursorIntoView()},o.prototype.extendSelectionBy=function(i){var t,e=this.editor,n=e.renderer.screenToTextCoordinates(this.x,this.y),l=e.selection[i](n.row,n.column);if(this.$clickSelection){var h=this.$clickSelection.comparePoint(l.start),f=this.$clickSelection.comparePoint(l.end);if(h==-1&&f<=0)t=this.$clickSelection.end,(l.end.row!=n.row||l.end.column!=n.column)&&(n=l.start);else if(f==1&&h>=0)t=this.$clickSelection.start,(l.start.row!=n.row||l.start.column!=n.column)&&(n=l.end);else if(h==-1&&f==1)n=l.end,t=l.start;else{var p=r(this.$clickSelection,n,e.session);n=p.cursor,t=p.anchor}e.selection.setSelectionAnchor(t.row,t.column)}e.selection.selectToPosition(n),e.renderer.scrollCursorIntoView()},o.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},o.prototype.focusWait=function(){var i=a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(i>$||t-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},o.prototype.onDoubleClick=function(i){var t=i.getDocumentPosition(),e=this.editor,n=e.session,l=n.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()},o.prototype.onTripleClick=function(i){var t=i.getDocumentPosition(),e=this.editor;this.setState("selectByLines");var n=e.getSelectionRange();n.isMultiLine()&&n.contains(t.row,t.column)?(this.$clickSelection=e.selection.getLineRange(n.start.row),this.$clickSelection.end=e.selection.getLineRange(n.end.row).end):this.$clickSelection=e.selection.getLineRange(t.row),this.select()},o.prototype.onQuadClick=function(i){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},o.prototype.onMouseWheel=function(i){if(!i.getAccelKey()){i.getShiftKey()&&i.wheelY&&!i.wheelX&&(i.wheelX=i.wheelY,i.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var e=this.$lastScroll,n=i.domEvent.timeStamp,l=n-e.t,h=l?i.wheelX/l:e.vx,f=l?i.wheelY/l:e.vy;l<w&&(h=(h+e.vx)/2,f=(f+e.vy)/2);var p=Math.abs(h/f),m=!1;if(p>=1&&t.renderer.isScrollableBy(i.wheelX*i.speed,0)&&(m=!0),p<=1&&t.renderer.isScrollableBy(0,i.wheelY*i.speed)&&(m=!0),m)e.allowed=n;else if(n-e.allowed<w){var S=Math.abs(h)<=1.5*Math.abs(e.vx)&&Math.abs(f)<=1.5*Math.abs(e.vy);S?(m=!0,e.allowed=n):e.allowed=0}if(e.t=n,e.vx=h,e.vy=f,m)return t.renderer.scrollBy(i.wheelX*i.speed,i.wheelY*i.speed),i.stop()}},o})();s.prototype.selectEnd=s.prototype.selectByLinesEnd,s.prototype.selectAllEnd=s.prototype.selectByLinesEnd,s.prototype.selectByWordsEnd=s.prototype.selectByLinesEnd,c.DefaultHandlers=s;function a(o,i,t,e){return Math.sqrt(Math.pow(t-o,2)+Math.pow(e-i,2))}function r(o,i,t){if(o.start.row==o.end.row)var e=2*i.column-o.start.column-o.end.column;else if(o.start.row==o.end.row-1&&!o.start.column&&!o.end.column)var e=3*i.column-2*t.getLine(o.start.row).length;else var e=2*i.row-o.start.row-o.end.row;return e<0?{cursor:o.start,anchor:o.end}:{cursor:o.end,anchor:o.start}}});ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(y,c,E){"use strict";var x=y("../lib/event"),$=y("../lib/useragent"),w=(function(){function s(a,r){this.speed,this.wheelX,this.wheelY,this.domEvent=a,this.editor=r,this.x=this.clientX=a.clientX,this.y=this.clientY=a.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return s.prototype.stopPropagation=function(){x.stopPropagation(this.domEvent),this.propagationStopped=!0},s.prototype.preventDefault=function(){x.preventDefault(this.domEvent),this.defaultPrevented=!0},s.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},s.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},s.prototype.getGutterRow=function(){var a=this.getDocumentPosition().row,r=this.editor.session.documentToScreenRow(a,0),o=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return r-o},s.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var a=this.editor,r=a.getSelectionRange();if(r.isEmpty())this.$inSelection=!1;else{var o=this.getDocumentPosition();this.$inSelection=r.contains(o.row,o.column)}return this.$inSelection},s.prototype.getButton=function(){return x.getButton(this.domEvent)},s.prototype.getShiftKey=function(){return this.domEvent.shiftKey},s.prototype.getAccelKey=function(){return $.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},s})();c.MouseEvent=w});ace.define("ace/lib/scroll",["require","exports","module"],function(y,c,E){c.preventParentScroll=function($){$.stopPropagation();var w=$.currentTarget,s=w.scrollHeight>w.clientHeight;s||$.preventDefault()}});ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(y,c,E){"use strict";var x=this&&this.__extends||(function(){var l=function(h,f){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,m){p.__proto__=m}||function(p,m){for(var S in m)Object.prototype.hasOwnProperty.call(m,S)&&(p[S]=m[S])},l(h,f)};return function(h,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");l(h,f);function p(){this.constructor=h}h.prototype=f===null?Object.create(f):(p.prototype=f.prototype,new p)}})(),$=this&&this.__values||function(l){var h=typeof Symbol=="function"&&Symbol.iterator,f=h&&l[h],p=0;if(f)return f.call(l);if(l&&typeof l.length=="number")return{next:function(){return l&&p>=l.length&&(l=void 0),{value:l&&l[p++],done:!l}}};throw new TypeError(h?"Object is not iterable.":"Symbol.iterator is not defined.")},w=y("./lib/dom"),s=y("./lib/event"),a=y("./range").Range,r=y("./lib/scroll").preventParentScroll,o="ace_tooltip",i=(function(){function l(h){this.isOpen=!1,this.$element=null,this.$parentNode=h}return l.prototype.$init=function(){return this.$element=w.createElement("div"),this.$element.className=o,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(h){this.getElement().textContent=h},l.prototype.setHtml=function(h){this.getElement().innerHTML=h},l.prototype.setPosition=function(h,f){this.getElement().style.left=h+"px",this.getElement().style.top=f+"px"},l.prototype.setClassName=function(h){w.addCssClass(this.getElement(),h)},l.prototype.setTheme=function(h){this.theme&&(this.theme.isDark&&w.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&w.removeCssClass(this.getElement(),this.theme.cssClass)),h.isDark&&w.addCssClass(this.getElement(),"ace_dark"),h.cssClass&&w.addCssClass(this.getElement(),h.cssClass),this.theme={isDark:h.isDark,cssClass:h.cssClass}},l.prototype.show=function(h,f,p){h!=null&&this.setText(h),f!=null&&p!=null&&this.setPosition(f,p),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},l.prototype.hide=function(h){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=o,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(h){this.popups.push(h),this.updatePopups()},l.prototype.removePopup=function(h){var f=this.popups.indexOf(h);f!==-1&&(this.popups.splice(f,1),this.updatePopups())},l.prototype.updatePopups=function(){var h,f,p,m;this.popups.sort(function(v,d){return d.priority-v.priority});var S=[];try{for(var C=$(this.popups),g=C.next();!g.done;g=C.next()){var M=g.value,k=!0;try{for(var _=(p=void 0,$(S)),R=_.next();!R.done;R=_.next()){var b=R.value;if(this.doPopupsOverlap(b,M)){k=!1;break}}}catch(v){p={error:v}}finally{try{R&&!R.done&&(m=_.return)&&m.call(_)}finally{if(p)throw p.error}}k?S.push(M):M.hide()}}catch(v){h={error:v}}finally{try{g&&!g.done&&(f=C.return)&&f.call(C)}finally{if(h)throw h.error}}},l.prototype.doPopupsOverlap=function(h,f){var p=h.getElement().getBoundingClientRect(),m=f.getElement().getBoundingClientRect();return p.left<m.right&&p.right>m.left&&p.top<m.bottom&&p.bottom>m.top},l})(),e=new t;c.popupManager=e,c.Tooltip=i;var n=(function(l){x(h,l);function h(f){f===void 0&&(f=document.body);var p=l.call(this,f)||this;p.timeout=void 0,p.lastT=0,p.idleTime=350,p.lastEvent=void 0,p.onMouseOut=p.onMouseOut.bind(p),p.onMouseMove=p.onMouseMove.bind(p),p.waitForHover=p.waitForHover.bind(p),p.hide=p.hide.bind(p);var m=p.getElement();return m.style.whiteSpace="pre-wrap",m.style.pointerEvents="auto",m.addEventListener("mouseout",p.onMouseOut),m.tabIndex=-1,m.addEventListener("blur",function(){m.contains(document.activeElement)||this.hide()}.bind(p)),m.addEventListener("wheel",r),p}return h.prototype.addToEditor=function(f){f.on("mousemove",this.onMouseMove),f.on("mousedown",this.hide);var p=f.renderer.getMouseEventTarget();p&&typeof p.removeEventListener=="function"&&p.addEventListener("mouseout",this.onMouseOut,!0)},h.prototype.removeFromEditor=function(f){f.off("mousemove",this.onMouseMove),f.off("mousedown",this.hide);var p=f.renderer.getMouseEventTarget();p&&typeof p.removeEventListener=="function"&&p.removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},h.prototype.onMouseMove=function(f,p){this.lastEvent=f,this.lastT=Date.now();var m=p.$mouseHandler.isMousePressed;if(this.isOpen){var S=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(S.row,S.column)||m||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||m||(this.lastEvent=f,this.timeout=setTimeout(this.waitForHover,this.idleTime))},h.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var f=Date.now()-this.lastT;if(this.idleTime-f>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-f);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},h.prototype.isOutsideOfText=function(f){var p=f.editor,m=f.getDocumentPosition(),S=p.session.getLine(m.row);if(m.column==S.length){var C=p.renderer.pixelToScreenCoordinates(f.clientX,f.clientY),g=p.session.documentToScreenPosition(m.row,m.column);if(g.column!=C.column||g.row!=C.row)return!0}return!1},h.prototype.setDataProvider=function(f){this.$gatherData=f},h.prototype.showForRange=function(f,p,m,S){if(!(S&&S!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var C=f.renderer;this.isOpen||(e.addPopup(this),this.$registerCloseEvents(),this.setTheme(C.theme)),this.isOpen=!0,this.range=a.fromPoints(p.start,p.end);var g=C.textToScreenCoordinates(p.start.row,p.start.column),M=C.scroller.getBoundingClientRect();g.pageX<M.left&&(g.pageX=M.left);var k=this.getElement();k.innerHTML="",k.appendChild(m),k.style.maxHeight="",k.style.display="block",this.$setPosition(f,g,!0,p),w.$fixPositionBug(k)}},h.prototype.$setPosition=function(f,p,m,S){var C=10;m&&this.addMarker(S,f.session);var g=f.renderer,M=this.getElement(),k=M.offsetHeight,_=M.offsetWidth,R=p.pageY,b=p.pageX,v=window.innerHeight-R-g.lineHeight,d=this.$shouldPlaceAbove(k,R,v-C);M.style.maxHeight=(d?R:v)-C+"px",M.style.top=d?"":R+g.lineHeight+"px",M.style.bottom=d?window.innerHeight-R+"px":"",M.style.left=Math.min(b,window.innerWidth-_-C)+"px"},h.prototype.$shouldPlaceAbove=function(f,p,m){return!(p-f<0&&p<m)},h.prototype.addMarker=function(f,p){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=p,this.marker=p&&p.addMarker(f,"ace_highlight-marker","text")},h.prototype.hide=function(f){f&&this.$fromKeyboard&&f.type=="keydown"&&f.code=="Escape"||!f&&document.activeElement==this.getElement()||f&&f.target&&(f.type!="keydown"||f.ctrlKey||f.metaKey)&&this.$element.contains(f.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$fromKeyboard=!1,this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,e.removePopup(this)))},h.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},h.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},h.prototype.onMouseOut=function(f){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!f.relatedTarget||this.getElement().contains(f.relatedTarget)||f&&f.currentTarget.contains(f.relatedTarget)||f.relatedTarget.classList.contains("ace_content")||this.hide())},h})(i);c.HoverTooltip=n});ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/mouse/mouse_event","ace/tooltip","ace/config","ace/range"],function(y,c,E){"use strict";var x=this&&this.__extends||(function(){var e=function(n,l){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,f){h.__proto__=f}||function(h,f){for(var p in f)Object.prototype.hasOwnProperty.call(f,p)&&(h[p]=f[p])},e(n,l)};return function(n,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");e(n,l);function h(){this.constructor=n}n.prototype=l===null?Object.create(l):(h.prototype=l.prototype,new h)}})(),$=this&&this.__values||function(e){var n=typeof Symbol=="function"&&Symbol.iterator,l=n&&e[n],h=0;if(l)return l.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&h>=e.length&&(e=void 0),{value:e&&e[h++],done:!e}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},w=y("../lib/dom"),s=y("./mouse_event").MouseEvent,a=y("../tooltip").HoverTooltip,r=y("../config").nls,o=y("../range").Range;function i(e){var n=e.editor,l=n.renderer.$gutterLayer;e.$tooltip=new t(n),e.$tooltip.addToEditor(n),e.$tooltip.setDataProvider(function(h,f){var p=h.getDocumentPosition().row;e.$tooltip.showTooltip(p)}),e.editor.setDefaultHandler("guttermousedown",function(h){if(!(!n.isFocused()||h.getButton()!=0)){var f=l.getRegion(h);if(f!="foldWidgets"){var p=h.getDocumentPosition().row,m=n.session.selection;if(h.getShiftKey())m.selectTo(p,0);else{if(h.domEvent.detail==2)return n.selectAll(),h.preventDefault();e.$clickSelection=n.selection.getLineRange(p)}return e.setState("selectByLines"),e.captureMouse(h),h.preventDefault()}}})}c.GutterHandler=i;var t=(function(e){x(n,e);function n(l){var h=e.call(this,l.container)||this;h.id="gt"+ ++n.$uid,h.editor=l,h.visibleTooltipRow;var f=h.getElement();return f.setAttribute("role","tooltip"),f.setAttribute("id",h.id),f.style.pointerEvents="auto",h.idleTime=50,h.onDomMouseMove=h.onDomMouseMove.bind(h),h.onDomMouseOut=h.onDomMouseOut.bind(h),h.setClassName("ace_gutter-tooltip"),h}return n.prototype.onDomMouseMove=function(l){var h=new s(l,this.editor);this.onMouseMove(h,this.editor)},n.prototype.onDomMouseOut=function(l){var h=new s(l,this.editor);this.onMouseOut(h)},n.prototype.addToEditor=function(l){var h=l.renderer.$gutter;h.addEventListener("mousemove",this.onDomMouseMove),h.addEventListener("mouseout",this.onDomMouseOut),e.prototype.addToEditor.call(this,l)},n.prototype.removeFromEditor=function(l){var h=l.renderer.$gutter;h.removeEventListener("mousemove",this.onDomMouseMove),h.removeEventListener("mouseout",this.onDomMouseOut),e.prototype.removeFromEditor.call(this,l)},n.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),e.prototype.destroy.call(this)},Object.defineProperty(n,"annotationLabels",{get:function(){return{error:{singular:r("gutter-tooltip.aria-label.error.singular","error"),plural:r("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:r("gutter-tooltip.aria-label.security.singular","security finding"),plural:r("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:r("gutter-tooltip.aria-label.warning.singular","warning"),plural:r("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:r("gutter-tooltip.aria-label.info.singular","information message"),plural:r("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:r("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:r("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),n.prototype.showTooltip=function(l){var h,f=this.editor.renderer.$gutterLayer,p=f.$annotations[l],m;p?m={displayText:Array.from(p.displayText),type:Array.from(p.type)}:m={displayText:[],type:[]};var S=f.session.getFoldLine(l);if(S&&f.$showFoldedAnnotations){for(var C={error:[],security:[],warning:[],info:[],hint:[]},g={error:1,security:2,warning:3,info:4,hint:5},M,k=l+1;k<=S.end.row;k++)if(f.$annotations[k])for(var _=0;_<f.$annotations[k].text.length;_++){var R=f.$annotations[k].type[_];C[R].push(f.$annotations[k].text[_]),(!M||g[R]<g[M])&&(M=R)}if(["error","security","warning"].includes(M)){var b="".concat(n.annotationsToSummaryString(C)," in folded code.");m.displayText.push(b),m.type.push(M+"_fold")}}if(m.displayText.length===0)return this.hide();for(var v={error:[],security:[],warning:[],info:[],hint:[]},d=f.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",k=0;k<m.displayText.length;k++){var u=w.createElement("span"),A=w.createElement("span");(h=A.classList).add.apply(h,["ace_".concat(m.type[k]),d]),A.setAttribute("aria-label","".concat(n.annotationLabels[m.type[k].replace("_fold","")].singular)),A.setAttribute("role","img"),A.appendChild(w.createTextNode(" ")),u.appendChild(A),u.appendChild(w.createTextNode(m.displayText[k])),u.appendChild(w.createElement("br")),v[m.type[k].replace("_fold","")].push(u)}var L=w.createElement("span");v.error.forEach(function(D){return L.appendChild(D)}),v.security.forEach(function(D){return L.appendChild(D)}),v.warning.forEach(function(D){return L.appendChild(D)}),v.info.forEach(function(D){return L.appendChild(D)}),v.hint.forEach(function(D){return L.appendChild(D)}),L.setAttribute("aria-live","polite");var T=this.$findLinkedAnnotationNode(l);T&&T.setAttribute("aria-describedby",this.id);var I=o.fromPoints({row:l,column:0},{row:l,column:0});this.showForRange(this.editor,I,L),this.visibleTooltipRow=l,this.editor._signal("showGutterTooltip",this)},n.prototype.$setPosition=function(l,h,f,p){var m=this.$findCellByRow(p.start.row);if(m){var S=m&&m.element,C=S&&S.querySelector(".ace_gutter_annotation");if(C){var g=C.getBoundingClientRect();if(g){var M={pageX:g.right,pageY:g.top};return e.prototype.$setPosition.call(this,l,M,!1,p)}}}},n.prototype.$shouldPlaceAbove=function(l,h,f){return f<l},n.prototype.$findLinkedAnnotationNode=function(l){var h=this.$findCellByRow(l);if(h){var f=h.element;if(f.childNodes.length>2)return f.childNodes[2]}},n.prototype.$findCellByRow=function(l){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(h){return h.row===l})},n.prototype.hide=function(l){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.visibleTooltipRow!=null){var h=this.$findLinkedAnnotationNode(this.visibleTooltipRow);h&&h.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),e.prototype.hide.call(this,l)}},n.annotationsToSummaryString=function(l){var h,f,p=[],m=["error","security","warning","info","hint"];try{for(var S=$(m),C=S.next();!C.done;C=S.next()){var g=C.value;if(l[g].length){var M=l[g].length===1?n.annotationLabels[g].singular:n.annotationLabels[g].plural;p.push("".concat(l[g].length," ").concat(M))}}}catch(k){h={error:k}}finally{try{C&&!C.done&&(f=S.return)&&f.call(S)}finally{if(h)throw h.error}}return p.join(", ")},n.prototype.isOutsideOfText=function(l){var h=l.editor,f=h.renderer.$gutter.getBoundingClientRect();return!(l.clientX>=f.left&&l.clientX<=f.right&&l.clientY>=f.top&&l.clientY<=f.bottom)},n})(a);t.$uid=0,c.GutterTooltip=t});ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(y,c,E){"use strict";var x=y("../lib/dom"),$=y("../lib/event"),w=y("../lib/useragent"),s=200,a=200,r=5;function o(t){var e=t.editor,n=x.createElement("div");n.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",n.textContent="\xA0";var l=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];l.forEach(function(N){t[N]=this[N]},this),e.on("mousedown",this.onMouseDown.bind(t));var h=e.container,f,p,m,S,C,g,M=0,k,_,R,b,v;this.onDragStart=function(N){if(this.cancelDrag||!h.draggable){var W=this;return setTimeout(function(){W.startSelect(),W.captureMouse(N)},0),N.preventDefault()}C=e.getSelectionRange();var B=N.dataTransfer;B.effectAllowed=e.getReadOnly()?"copy":"copyMove",e.container.appendChild(n),B.setDragImage&&B.setDragImage(n,0,0),setTimeout(function(){e.container.removeChild(n)}),B.clearData(),B.setData("Text",e.session.getTextRange()),_=!0,this.setState("drag")},this.onDragEnd=function(N){if(h.draggable=!1,_=!1,this.setState(null),!e.getReadOnly()){var W=N.dataTransfer.dropEffect;!k&&W=="move"&&e.session.remove(e.getSelectionRange()),e.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(N){if(!(e.getReadOnly()||!O(N.dataTransfer)))return p=N.clientX,m=N.clientY,f||L(),M++,N.dataTransfer.dropEffect=k=F(N),$.preventDefault(N)},this.onDragOver=function(N){if(!(e.getReadOnly()||!O(N.dataTransfer)))return p=N.clientX,m=N.clientY,f||(L(),M++),I!==null&&(I=null),N.dataTransfer.dropEffect=k=F(N),$.preventDefault(N)},this.onDragLeave=function(N){if(M--,M<=0&&f)return T(),k=null,$.preventDefault(N)},this.onDrop=function(N){if(g){var W=N.dataTransfer;if(_)switch(k){case"move":C.contains(g.row,g.column)?C={start:g,end:g}:C=e.moveText(C,g);break;case"copy":C=e.moveText(C,g,!0);break}else{var B=W.getData("Text");C={start:g,end:e.session.insert(g,B)},e.focus(),k=null}return T(),$.preventDefault(N)}},$.addListener(h,"dragstart",this.onDragStart.bind(t),e),$.addListener(h,"dragend",this.onDragEnd.bind(t),e),$.addListener(h,"dragenter",this.onDragEnter.bind(t),e),$.addListener(h,"dragover",this.onDragOver.bind(t),e),$.addListener(h,"dragleave",this.onDragLeave.bind(t),e),$.addListener(h,"drop",this.onDrop.bind(t),e);function d(N,W){var B=Date.now(),z=!W||N.row!=W.row,P=!W||N.column!=W.column;if(!b||z||P)e.moveCursorToPosition(N),b=B,v={x:p,y:m};else{var G=i(v.x,v.y,p,m);G>r?b=null:B-b>=a&&(e.renderer.scrollCursorIntoView(),b=null)}}function u(N,W){var B=Date.now(),z=e.renderer.layerConfig.lineHeight,P=e.renderer.layerConfig.characterWidth,G=e.renderer.scroller.getBoundingClientRect(),V={x:{left:p-G.left,right:G.right-p},y:{top:m-G.top,bottom:G.bottom-m}},U=Math.min(V.x.left,V.x.right),Y=Math.min(V.y.top,V.y.bottom),j={row:N.row,column:N.column};U/P<=2&&(j.column+=V.x.left<V.x.right?-3:2),Y/z<=1&&(j.row+=V.y.top<V.y.bottom?-1:1);var X=N.row!=j.row,Z=N.column!=j.column,J=!W||N.row!=W.row;X||Z&&!J?R?B-R>=s&&e.renderer.scrollCursorIntoView(j):R=B:R=null}function A(){var N=g;g=e.renderer.screenToTextCoordinates(p,m),d(g,N),u(g,N)}function L(){C=e.selection.toOrientedRange(),f=e.session.addMarker(C,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval(S),A(),S=setInterval(A,20),M=0,$.addListener(document,"mousemove",D)}function T(){clearInterval(S),e.session.removeMarker(f),f=null,e.selection.fromOrientedRange(C),e.isFocused()&&!_&&e.$resetCursorStyle(),C=null,g=null,M=0,R=null,b=null,$.removeListener(document,"mousemove",D)}var I=null;function D(){I==null&&(I=setTimeout(function(){I!=null&&f&&T()},20))}function O(N){var W=N.types;return!W||Array.prototype.some.call(W,function(B){return B=="text/plain"||B=="Text"})}function F(N){var W=["copy","copymove","all","uninitialized"],B=["move","copymove","linkmove","all","uninitialized"],z=w.isMac?N.altKey:N.ctrlKey,P="uninitialized";try{P=N.dataTransfer.effectAllowed.toLowerCase()}catch{}var G="none";return z&&W.indexOf(P)>=0?G="copy":B.indexOf(P)>=0?G="move":W.indexOf(P)>=0&&(G="copy"),G}}(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 n=w.isWin?"default":"move";t.renderer.setCursorStyle(n),this.setState("dragReady")},this.onMouseDrag=function(t){var e=this.editor.container;if(w.isIE&&this.state=="dragReady"){var n=i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>3&&e.dragDrop()}if(this.state==="dragWait"){var n=i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>0&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(t){if(this.$dragEnabled){this.mousedownEvent=t;var e=this.editor,n=t.inSelection(),l=t.getButton(),h=t.domEvent.detail||1;if(h===1&&l===0&&n){if(t.editor.inMultiSelectMode&&(t.getAccelKey()||t.getShiftKey()))return;this.mousedownEvent.time=Date.now();var f=t.domEvent.target||t.domEvent.srcElement;if("unselectable"in f&&(f.unselectable="on"),e.getDragDelay()){if(w.isWebKit){this.cancelDrag=!0;var p=e.container;p.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(t,this.onMouseDrag.bind(this)),t.defaultPrevented=!0}}}}).call(o.prototype);function i(t,e,n,l){return Math.sqrt(Math.pow(n-t,2)+Math.pow(l-e,2))}c.DragdropHandler=o});ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(y,c,E){"use strict";var x=y("./mouse_event").MouseEvent,$=y("../lib/event"),w=y("../lib/dom");c.addTouchListeners=function(s,a){var r="scroll",o,i,t,e,n,l,h=0,f,p=0,m=0,S=0,C,g;function M(){var d=window.navigator&&window.navigator.clipboard,u=!1,A=function(){var I=a.getCopyText(),D=a.session.getUndoManager().hasUndo();g.replaceChild(w.buildDom(u?["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"],d&&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"]),g.firstChild)},L=function(I){return a.commands.canExecute(I,a)},T=function(I){var D=I.target.getAttribute("action");if(D=="more"||!u)return u=!u,A();D=="paste"?d.readText().then(function(O){a.execCommand(D,O)}):D&&((D=="cut"||D=="copy")&&(d?d.writeText(a.getCopyText()):document.execCommand("copy")),a.execCommand(D)),g.firstChild.style.display="none",u=!1,D!="openCommandPalette"&&a.focus()};g=w.buildDom(["div",{class:"ace_mobile-menu",onclick:T},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],a.container),g.addEventListener("touchstart",function(I){r="menu",I.stopPropagation(),I.preventDefault(),a.textInput.focus()}),g.addEventListener("touchend",function(I){I.stopPropagation(),I.preventDefault(),T(I)})}function k(){if(!a.getOption("enableMobileMenu")){g&&_();return}g||M();var d=a.selection.cursor,u=a.renderer.textToScreenCoordinates(d.row,d.column),A=a.renderer.textToScreenCoordinates(0,0).pageX,L=a.renderer.scrollLeft,T=a.container.getBoundingClientRect();g.style.top=u.pageY-T.top-3+"px",u.pageX-T.left<T.width-70?(g.style.left="",g.style.right="10px"):(g.style.right="",g.style.left=A+L-T.left+"px"),g.style.display="",g.firstChild.style.display="none",a.on("input",_)}function _(d){g&&(g.style.display="none"),a.off("input",_)}function R(){n=null,clearTimeout(n);var d=a.selection.getRange(),u=d.contains(f.row,f.column);(d.isEmpty()||!u)&&(a.selection.moveToPosition(f),a.selection.selectWord()),r="wait",k()}function b(){n=null,clearTimeout(n),a.selection.moveToPosition(f);var d=p>=2?a.selection.getLineRange(f.row):a.session.getBracketRange(f);d&&!d.isEmpty()?a.selection.setRange(d):a.selection.selectWord(),r="wait"}$.addListener(s,"contextmenu",function(d){if(C){var u=a.textInput.getElement();u.focus()}},a),$.addListener(s,"touchstart",function(d){var u=d.touches;if(n||u.length>1){clearTimeout(n),n=null,t=-1,r="zoom";return}C=a.$mouseHandler.isMousePressed=!0;var A=a.renderer.layerConfig.lineHeight,L=a.renderer.layerConfig.lineHeight,T=d.timeStamp;e=T;var I=u[0],D=I.clientX,O=I.clientY;Math.abs(o-D)+Math.abs(i-O)>A&&(t=-1),o=d.clientX=D,i=d.clientY=O,m=S=0;var F=new x(d,a);if(f=F.getDocumentPosition(),T-t<500&&u.length==1&&!h)p++,d.preventDefault(),d.button=0,b();else{p=0;var N=a.selection.cursor,W=a.selection.isEmpty()?N:a.selection.anchor,B=a.renderer.$cursorLayer.getPixelPosition(N,!0),z=a.renderer.$cursorLayer.getPixelPosition(W,!0),P=a.renderer.scroller.getBoundingClientRect(),G=a.renderer.layerConfig.offset,V=a.renderer.scrollLeft,U=function(X,Z){return X=X/L,Z=Z/A-.75,X*X+Z*Z};if(d.clientX<P.left){r="zoom";return}var Y=U(d.clientX-P.left-B.left+V,d.clientY-P.top-B.top+G),j=U(d.clientX-P.left-z.left+V,d.clientY-P.top-z.top+G);Y<3.5&&j<3.5&&(r=Y>j?"cursor":"anchor"),j<3.5?r="anchor":Y<3.5?r="cursor":r="scroll",n=setTimeout(R,450)}t=T},a),$.addListener(s,"touchend",function(d){C=a.$mouseHandler.isMousePressed=!1,l&&clearInterval(l),r=="zoom"?(r="",h=0):n?(a.selection.moveToPosition(f),h=0,k()):r=="scroll"?(v(),_()):k(),clearTimeout(n),n=null},a),$.addListener(s,"touchmove",function(d){n&&(clearTimeout(n),n=null);var u=d.touches;if(!(u.length>1||r=="zoom")){var A=u[0],L=o-A.clientX,T=i-A.clientY;if(r=="wait")if(L*L+T*T>4)r="cursor";else return d.preventDefault();o=A.clientX,i=A.clientY,d.clientX=A.clientX,d.clientY=A.clientY;var I=d.timeStamp,D=I-e;if(e=I,r=="scroll"){var O=new x(d,a);O.speed=1,O.wheelX=L,O.wheelY=T,10*Math.abs(L)<Math.abs(T)&&(L=0),10*Math.abs(T)<Math.abs(L)&&(T=0),D!=0&&(m=L/D,S=T/D),a._emit("mousewheel",O),O.propagationStopped||(m=S=0)}else{var F=new x(d,a),N=F.getDocumentPosition();r=="cursor"?a.selection.moveCursorToPosition(N):r=="anchor"&&a.selection.setSelectionAnchor(N.row,N.column),a.renderer.scrollCursorIntoView(N),d.preventDefault()}}},a);function v(){h+=60,l=setInterval(function(){h--<=0&&(clearInterval(l),l=null),Math.abs(m)<.01&&(m=0),Math.abs(S)<.01&&(S=0),h<20&&(m=.9*m),h<20&&(S=.9*S);var d=a.session.getScrollTop();a.renderer.scrollBy(10*m,10*S),d==a.session.getScrollTop()&&(h=0)},10)}}});ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(y,c,E){"use strict";var x=y("../lib/event"),$=y("../lib/useragent"),w=y("./default_handlers").DefaultHandlers,s=y("./default_gutter_handler").GutterHandler,a=y("./mouse_event").MouseEvent,r=y("./dragdrop_handler").DragdropHandler,o=y("./touch_handler").addTouchListeners,i=y("../config"),t=(function(){function e(n){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var l=this;this.editor=n,new w(this),new s(this),new r(this);var h=function(m){var S=!document.hasFocus||!document.hasFocus()||!n.isFocused()&&document.activeElement==(n.textInput&&n.textInput.getElement());S&&window.focus(),n.focus(),setTimeout(function(){n.isFocused()||n.focus()})},f=n.renderer.getMouseEventTarget();x.addListener(f,"click",this.onMouseEvent.bind(this,"click"),n),x.addListener(f,"mousemove",this.onMouseMove.bind(this,"mousemove"),n),x.addMultiMouseDownListener([f,n.renderer.scrollBarV&&n.renderer.scrollBarV.inner,n.renderer.scrollBarH&&n.renderer.scrollBarH.inner,n.textInput&&n.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",n),x.addMouseWheelListener(n.container,this.onMouseWheel.bind(this,"mousewheel"),n),o(n.container,n);var p=n.renderer.$gutter;x.addListener(p,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),n),x.addListener(p,"click",this.onMouseEvent.bind(this,"gutterclick"),n),x.addListener(p,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),n),x.addListener(p,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),n),x.addListener(f,"mousedown",h,n),x.addListener(p,"mousedown",h,n),$.isIE&&n.renderer.scrollBarV&&(x.addListener(n.renderer.scrollBarV.element,"mousedown",h,n),x.addListener(n.renderer.scrollBarH.element,"mousedown",h,n)),n.on("mousemove",function(m){if(!(l.state||l.$dragDelay||!l.$dragEnabled)){var S=n.renderer.screenToTextCoordinates(m.x,m.y),C=n.session.selection.getRange(),g=n.renderer;!C.isEmpty()&&C.insideStart(S.row,S.column)?g.setCursorStyle("default"):g.setCursorStyle("")}},n)}return e.prototype.onMouseEvent=function(n,l){this.editor.session&&this.editor._emit(n,new a(l,this.editor))},e.prototype.onMouseMove=function(n,l){var h=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!h||!h.length||this.editor._emit(n,new a(l,this.editor))},e.prototype.onMouseWheel=function(n,l){var h=new a(l,this.editor);h.speed=this.$scrollSpeed*2,h.wheelX=l.wheelX,h.wheelY=l.wheelY,this.editor._emit(n,h)},e.prototype.setState=function(n){this.state=n},e.prototype.captureMouse=function(n,l){this.x=n.x,this.y=n.y,this.isMousePressed=!0;var h=this.editor,f=this.editor.renderer;f.$isMousePressed=!0;var p=this,m=!0,S=function(_){if(_){if($.isWebKit&&!_.which&&p.releaseMouse)return p.releaseMouse();p.x=_.clientX,p.y=_.clientY,l&&l(_),p.mouseEvent=new a(_,p.editor),p.$mouseMoved=!0}},C=function(_){h.off("beforeEndOperation",k),m=!1,h.session&&g(),p[p.state+"End"]&&p[p.state+"End"](_),p.state="",p.isMousePressed=f.$isMousePressed=!1,f.$keepTextAreaAtCursor&&f.$moveTextAreaToCursor(),p.$onCaptureMouseMove=p.releaseMouse=null,_&&p.onMouseEvent("mouseup",_),h.endOperation()},g=function(){p[p.state]&&p[p.state](),p.$mouseMoved=!1},M=function(){m&&(g(),x.nextFrame(M))};if($.isOldIE&&n.domEvent.type=="dblclick")return setTimeout(function(){C(n)});var k=function(_){p.releaseMouse&&h.curOp.command.name&&h.curOp.selectionChanged&&(p[p.state+"End"]&&p[p.state+"End"](),p.state="",p.releaseMouse())};h.on("beforeEndOperation",k),h.startOperation({command:{name:"mouse"}}),p.$onCaptureMouseMove=S,p.releaseMouse=x.capture(this.editor.container,S,C),M()},e.prototype.cancelContextMenu=function(){var n=function(l){l&&l.domEvent&&l.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",n),l&&l.domEvent&&x.stopEvent(l.domEvent))}.bind(this);setTimeout(n,10),this.editor.on("nativecontextmenu",n)},e.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse(),this.$tooltip&&this.$tooltip.destroy()},e})();t.prototype.releaseMouse=null,i.defineOptions(t.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:$.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0}}),c.MouseHandler=t});ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(y,c,E){"use strict";var x=y("../lib/dom"),$=(function(){function w(s){s.on("click",function(a){var r=a.getDocumentPosition(),o=s.session,i=o.getFoldAt(r.row,r.column,1);i&&(a.getAccelKey()?o.removeFold(i):o.expandFold(i),a.stop());var t=a.domEvent&&a.domEvent.target;t&&x.hasCssClass(t,"ace_inline_button")&&x.hasCssClass(t,"ace_toggle_wrap")&&(o.setOption("wrap",!o.getUseWrapMode()),s.renderer.scrollCursorIntoView())}),s.on("gutterclick",function(a){var r=s.renderer.$gutterLayer.getRegion(a);if(r=="foldWidgets"){var o=a.getDocumentPosition().row,i=s.session;i.foldWidgets&&i.foldWidgets[o]&&s.session.onFoldWidgetClick(o,a),s.isFocused()||s.focus(),a.stop()}}),s.on("gutterdblclick",function(a){var r=s.renderer.$gutterLayer.getRegion(a);if(r=="foldWidgets"){var o=a.getDocumentPosition().row,i=s.session,t=i.getParentFoldRangeData(o,!0),e=t.range||t.firstRange;if(e){o=e.start.row;var n=i.getFoldAt(o,i.getLine(o).length,1);n?i.removeFold(n):(i.addFold("...",e),s.renderer.scrollCursorIntoView({row:e.start.row,column:0}))}a.stop()}})}return w})();c.FoldHandler=$});ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(y,c,E){"use strict";var x=y("../lib/keys"),$=y("../lib/event"),w=(function(){function s(a){this.$editor=a,this.$data={editor:a},this.$handlers=[],this.setDefaultHandler(a.commands)}return s.prototype.setDefaultHandler=function(a){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=a,this.addKeyboardHandler(a,0)},s.prototype.setKeyboardHandler=function(a){var r=this.$handlers;if(r[r.length-1]!=a){for(;r[r.length-1]&&r[r.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(r[r.length-1]);this.addKeyboardHandler(a,1)}},s.prototype.addKeyboardHandler=function(a,r){if(a){typeof a=="function"&&!a.handleKeyboard&&(a.handleKeyboard=a);var o=this.$handlers.indexOf(a);o!=-1&&this.$handlers.splice(o,1),r==null?this.$handlers.push(a):this.$handlers.splice(r,0,a),o==-1&&a.attach&&a.attach(this.$editor)}},s.prototype.removeKeyboardHandler=function(a){var r=this.$handlers.indexOf(a);return r==-1?!1:(this.$handlers.splice(r,1),a.detach&&a.detach(this.$editor),!0)},s.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},s.prototype.getStatusText=function(){var a=this.$data,r=a.editor;return this.$handlers.map(function(o){return o.getStatusText&&o.getStatusText(r,a)||""}).filter(Boolean).join(" ")},s.prototype.$callKeyboardHandlers=function(a,r,o,i){for(var t,e=!1,n=this.$editor.commands,l=this.$handlers.length;l--&&(t=this.$handlers[l].handleKeyboard(this.$data,a,r,o,i),!(!(!t||!t.command)&&(t.command=="null"?e=!0:e=n.exec(t.command,this.$editor,t.args,i),e&&i&&a!=-1&&t.passEvent!=!0&&t.command.passEvent!=!0&&$.stopEvent(i),e))););return!e&&a==-1&&(t={command:"insertstring"},e=n.exec("insertstring",this.$editor,r)),e&&this.$editor._signal&&this.$editor._signal("keyboardActivity",t),e},s.prototype.onCommandKey=function(a,r,o){var i=x.keyCodeToString(o);return this.$callKeyboardHandlers(r,i,o,a)},s.prototype.onTextInput=function(a){return this.$callKeyboardHandlers(-1,a)},s})();c.KeyBinding=w});ace.define("ace/lib/bidiutil",["require","exports","module"],function(y,c,E){"use strict";var x=["\u0621","\u0641"],$=["\u063A","\u064A"],w=0,s=0,a=!1,r=!1,o=!1,i=!1,t=!1,e=!1,n=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],l=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],h=0,f=1,p=0,m=1,S=2,C=3,g=4,M=5,k=6,_=7,R=8,b=9,v=10,d=11,u=12,A=13,L=14,T=15,I=16,D=17,O=18,F=[O,O,O,O,O,O,O,O,O,k,M,k,R,M,O,O,O,O,O,O,O,O,O,O,O,O,O,O,M,M,M,k,R,g,g,d,d,d,g,g,g,g,g,v,b,v,b,b,S,S,S,S,S,S,S,S,S,S,b,g,g,g,g,g,g,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,g,g,g,g,g,g,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,g,g,g,g,O,O,O,O,O,O,M,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,b,g,d,d,d,d,g,g,g,g,p,g,g,O,g,g,d,d,S,S,g,p,g,g,g,S,p,g,g,g,g,g],N=[R,R,R,R,R,R,R,R,R,R,R,O,O,O,p,m,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,R,M,A,L,T,I,D,b,d,d,d,d,d,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,b,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,R];function W(V,U,Y,j){var X=w?l:n,Z=null,J=null,K=null,q=0,ce=null,we=null,ae=-1,te=null,oe=null,vt=[];if(!j)for(te=0,j=[];te<Y;te++)j[te]=P(V[te]);for(s=w,a=!1,r=!1,o=!1,i=!1,oe=0;oe<Y;oe++){if(Z=q,vt[oe]=J=z(V,j,vt,oe),q=X[Z][J],ce=q&240,q&=15,U[oe]=K=X[q][5],ce>0)if(ce==16){for(te=ae;te<oe;te++)U[te]=1;ae=-1}else ae=-1;if(we=X[q][6],we)ae==-1&&(ae=oe);else if(ae>-1){for(te=ae;te<oe;te++)U[te]=K;ae=-1}j[oe]==M&&(U[oe]=0),s|=K}if(i){for(te=0;te<Y;te++)if(j[te]==k){U[te]=w;for(var be=te-1;be>=0&&j[be]==R;be--)U[be]=w}}}function B(V,U,Y){if(!(s<V)){if(V==1&&w==f&&!o){Y.reverse();return}for(var j=Y.length,X=0,Z,J,K,q;X<j;){if(U[X]>=V){for(Z=X+1;Z<j&&U[Z]>=V;)Z++;for(J=X,K=Z-1;J<K;J++,K--)q=Y[J],Y[J]=Y[K],Y[K]=q;X=Z}X++}}}function z(V,U,Y,j){var X=U[j],Z,J,K,q;switch(X){case p:case m:a=!1;case g:case C:return X;case S:return a?C:S;case _:return a=!0,r=!0,m;case R:return g;case b:return j<1||j+1>=U.length||(Z=Y[j-1])!=S&&Z!=C||(J=U[j+1])!=S&&J!=C?g:(a&&(J=C),J==Z?J:g);case v:return Z=j>0?Y[j-1]:M,Z==S&&j+1<U.length&&U[j+1]==S?S:g;case d:if(j>0&&Y[j-1]==S)return S;if(a)return g;for(q=j+1,K=U.length;q<K&&U[q]==d;)q++;return q<K&&U[q]==S?S:g;case u:for(K=U.length,q=j+1;q<K&&U[q]==u;)q++;if(q<K){var ce=V[j],we=ce>=1425&&ce<=2303||ce==64286;if(Z=U[q],we&&(Z==m||Z==_))return m}return j<1||(Z=U[j-1])==M?g:Y[j-1];case M:return a=!1,o=!0,w;case k:return i=!0,g;case A:case L:case I:case D:case T:a=!1;case O:return g}}function P(V){var U=V.charCodeAt(0),Y=U>>8;return Y==0?U>191?p:F[U]:Y==5?/[\u0591-\u05f4]/.test(V)?m:p:Y==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(V)?u:/[\u0660-\u0669\u066b-\u066c]/.test(V)?C:U==1642?d:/[\u06f0-\u06f9]/.test(V)?S:_:Y==32&&U<=8287?N[U&255]:Y==254&&U>=65136?_:g}function G(V){return V>="\u064B"&&V<="\u0655"}c.L=p,c.R=m,c.EN=S,c.ON_R=3,c.AN=4,c.R_H=5,c.B=6,c.RLE=7,c.DOT="\xB7",c.doBidiReorder=function(V,U,Y){if(V.length<2)return{};var j=V.split(""),X=new Array(j.length),Z=new Array(j.length),J=[];w=Y?f:h,W(j,J,j.length,U);for(var K=0;K<X.length;X[K]=K,K++);B(2,J,X),B(1,J,X);for(var K=0;K<X.length-1;K++)U[K]===C?J[K]=c.AN:J[K]===m&&(U[K]>_&&U[K]<A||U[K]===g||U[K]===O)?J[K]=c.ON_R:K>0&&j[K-1]==="\u0644"&&/\u0622|\u0623|\u0625|\u0627/.test(j[K])&&(J[K-1]=J[K]=c.R_H,K++);j[j.length-1]===c.DOT&&(J[j.length-1]=c.B),j[0]==="\u202B"&&(J[0]=c.RLE);for(var K=0;K<X.length;K++)Z[K]=J[X[K]];return{logicalFromVisual:X,bidiLevels:Z}},c.hasBidiCharacters=function(V,U){for(var Y=!1,j=0;j<V.length;j++)U[j]=P(V.charAt(j)),!Y&&(U[j]==m||U[j]==_||U[j]==C)&&(Y=!0);return Y},c.getVisualFromLogicalIdx=function(V,U){for(var Y=0;Y<U.logicalFromVisual.length;Y++)if(U.logicalFromVisual[Y]==V)return Y;return 0}});ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(y,c,E){"use strict";var x=y("./lib/bidiutil"),$=y("./lib/lang"),w=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,s=(function(){function a(r){this.session=r,this.bidiMap={},this.currentRow=null,this.bidiUtil=x,this.charWidths=[],this.EOL="\xAC",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="\xB6",this.RLE="\u202B",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=w.test(r.getValue())}return a.prototype.isBidiRow=function(r,o,i){return this.seenBidi?(r!==this.currentRow&&(this.currentRow=r,this.updateRowLine(o,i),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},a.prototype.onChange=function(r){this.seenBidi?this.currentRow=null:r.action=="insert"&&w.test(r.lines.join(`
`))&&(this.seenBidi=!0,this.currentRow=null)},a.prototype.getDocumentRow=function(){var r=0,o=this.session.$screenRowCache;if(o.length){var i=this.session.$getRowCacheIndex(o,this.currentRow);i>=0&&(r=this.session.$docRowCache[i])}return r},a.prototype.getSplitIndex=function(){var r=0,o=this.session.$screenRowCache;if(o.length)for(var i,t=this.session.$getRowCacheIndex(o,this.currentRow);this.currentRow-r>0&&(i=this.session.$getRowCacheIndex(o,this.currentRow-r-1),i===t);)t=i,r++;else r=this.currentRow;return r},a.prototype.updateRowLine=function(r,o){r===void 0&&(r=this.getDocumentRow());var i=r===this.session.getLength()-1,t=i?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(r),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var e=this.session.$wrapData[r];e&&(o===void 0&&(o=this.getSplitIndex()),o>0&&e.length?(this.wrapIndent=e.indent,this.wrapOffset=this.wrapIndent*this.charWidths[x.L],this.line=o<e.length?this.line.substring(e[o-1],e[o]):this.line.substring(e[e.length-1])):this.line=this.line.substring(0,e[o]),o==e.length&&(this.line+=this.showInvisibles?t:x.DOT))}else this.line+=this.showInvisibles?t:x.DOT;var n=this.session,l=0,h;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(f,p){return f==="	"||n.isFullWidth(f.charCodeAt(0))?(h=f==="	"?n.getScreenTabSize(p+l):2,l+=h-1,$.stringRepeat(x.DOT,h)):f}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==x.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},a.prototype.updateBidiMap=function(){var r=[];x.hasBidiCharacters(this.line,r)||this.isRtlDir?this.bidiMap=x.doBidiReorder(this.line,r,this.isRtlDir):this.bidiMap={}},a.prototype.markAsDirty=function(){this.currentRow=null},a.prototype.updateCharacterWidths=function(r){if(this.characterWidth!==r.$characterSize.width){this.fontMetrics=r;var o=this.characterWidth=r.$characterSize.width,i=r.$measureCharWidth("\u05D4");this.charWidths[x.L]=this.charWidths[x.EN]=this.charWidths[x.ON_R]=o,this.charWidths[x.R]=this.charWidths[x.AN]=i,this.charWidths[x.R_H]=i*.45,this.charWidths[x.B]=this.charWidths[x.RLE]=0,this.currentRow=null}},a.prototype.setShowInvisibles=function(r){this.showInvisibles=r,this.currentRow=null},a.prototype.setEolChar=function(r){this.EOL=r},a.prototype.setContentWidth=function(r){this.contentWidth=r},a.prototype.isRtlLine=function(r){return this.$isRtl?!0:r!=null?this.session.getLine(r).charAt(0)==this.RLE:this.isRtlDir},a.prototype.setRtlDirection=function(r,o){for(var i=r.getCursorPosition(),t=r.selection.getSelectionAnchor().row;t<=i.row;t++)!o&&r.session.getLine(t).charAt(0)===r.session.$bidiHandler.RLE?r.session.doc.removeInLine(t,0,1):o&&r.session.getLine(t).charAt(0)!==r.session.$bidiHandler.RLE&&r.session.doc.insert({column:0,row:t},r.session.$bidiHandler.RLE)},a.prototype.getPosLeft=function(r){r-=this.wrapIndent;var o=this.line.charAt(0)===this.RLE?1:0,i=r>o?this.session.getOverwrite()?r:r-1:o,t=x.getVisualFromLogicalIdx(i,this.bidiMap),e=this.bidiMap.bidiLevels,n=0;!this.session.getOverwrite()&&r<=o&&e[t]%2!==0&&t++;for(var l=0;l<t;l++)n+=this.charWidths[e[l]];return!this.session.getOverwrite()&&r>o&&e[t]%2===0&&(n+=this.charWidths[e[t]]),this.wrapIndent&&(n+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(n+=this.rtlLineOffset),n},a.prototype.getSelections=function(r,o){var i=this.bidiMap,t=i.bidiLevels,e,n=[],l=0,h=Math.min(r,o)-this.wrapIndent,f=Math.max(r,o)-this.wrapIndent,p=!1,m=!1,S=0;this.wrapIndent&&(l+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var C,g=0;g<t.length;g++)C=i.logicalFromVisual[g],e=t[g],p=C>=h&&C<f,p&&!m?S=l:!p&&m&&n.push({left:S,width:l-S}),l+=this.charWidths[e],m=p;if(p&&g===t.length&&n.push({left:S,width:l-S}),this.isRtlDir)for(var M=0;M<n.length;M++)n[M].left+=this.rtlLineOffset;return n},a.prototype.offsetToCol=function(i){this.isRtlDir&&(i-=this.rtlLineOffset);var o=0,i=Math.max(i,0),t=0,e=0,n=this.bidiMap.bidiLevels,l=this.charWidths[n[e]];for(this.wrapIndent&&(i-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);i>t+l/2;){if(t+=l,e===n.length-1){l=0;break}l=this.charWidths[n[++e]]}return e>0&&n[e-1]%2!==0&&n[e]%2===0?(i<t&&e--,o=this.bidiMap.logicalFromVisual[e]):e>0&&n[e-1]%2===0&&n[e]%2!==0?o=1+(i>t?this.bidiMap.logicalFromVisual[e]:this.bidiMap.logicalFromVisual[e-1]):this.isRtlDir&&e===n.length-1&&l===0&&n[e-1]%2===0||!this.isRtlDir&&e===0&&n[e]%2!==0?o=1+this.bidiMap.logicalFromVisual[e]:(e>0&&n[e-1]%2!==0&&l!==0&&e--,o=this.bidiMap.logicalFromVisual[e]),o===0&&this.isRtlDir&&o++,o+this.wrapIndent},a})();c.BidiHandler=s});ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(y,c,E){"use strict";var x=y("./lib/oop"),$=y("./lib/lang"),w=y("./lib/event_emitter").EventEmitter,s=y("./range").Range,a=(function(){function r(o){this.session=o,this.doc=o.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var i=this;this.cursor.on("change",function(t){i.$cursorChanged=!0,i.$silent||i._emit("changeCursor"),!i.$isEmpty&&!i.$silent&&i._emit("changeSelection"),!i.$keepDesiredColumnOnChange&&t.old.column!=t.value.column&&(i.$desiredColumn=null)}),this.anchor.on("change",function(){i.$anchorChanged=!0,!i.$isEmpty&&!i.$silent&&i._emit("changeSelection")})}return r.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},r.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},r.prototype.getCursor=function(){return this.lead.getPosition()},r.prototype.setAnchor=function(o,i){this.$isEmpty=!1,this.anchor.setPosition(o,i)},r.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},r.prototype.getSelectionLead=function(){return this.lead.getPosition()},r.prototype.isBackwards=function(){var o=this.anchor,i=this.lead;return o.row>i.row||o.row==i.row&&o.column>i.column},r.prototype.getRange=function(){var o=this.anchor,i=this.lead;return this.$isEmpty?s.fromPoints(i,i):this.isBackwards()?s.fromPoints(i,o):s.fromPoints(o,i)},r.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},r.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},r.prototype.setRange=function(o,i){var t=i?o.end:o.start,e=i?o.start:o.end;this.$setSelection(t.row,t.column,e.row,e.column)},r.prototype.$setSelection=function(o,i,t,e){if(!this.$silent){var n=this.$isEmpty,l=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(o,i),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||n!=this.$isEmpty||l)&&this._emit("changeSelection")}},r.prototype.$moveSelection=function(o){var i=this.lead;this.$isEmpty&&this.setSelectionAnchor(i.row,i.column),o.call(this)},r.prototype.selectTo=function(o,i){this.$moveSelection(function(){this.moveCursorTo(o,i)})},r.prototype.selectToPosition=function(o){this.$moveSelection(function(){this.moveCursorToPosition(o)})},r.prototype.moveTo=function(o,i){this.clearSelection(),this.moveCursorTo(o,i)},r.prototype.moveToPosition=function(o){this.clearSelection(),this.moveCursorToPosition(o)},r.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},r.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},r.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},r.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},r.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},r.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},r.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},r.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},r.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},r.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},r.prototype.getWordRange=function(o,i){if(typeof i>"u"){var t=o||this.lead;o=t.row,i=t.column}return this.session.getWordRange(o,i)},r.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},r.prototype.selectAWord=function(){var o=this.getCursor(),i=this.session.getAWordRange(o.row,o.column);this.setSelectionRange(i)},r.prototype.getLineRange=function(o,i){var t=typeof o=="number"?o:this.lead.row,e,n=this.session.getFoldLine(t);return n?(t=n.start.row,e=n.end.row):e=t,i===!0?new s(t,0,e,this.session.getLine(e).length):new s(t,0,e+1,0)},r.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},r.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},r.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},r.prototype.wouldMoveIntoSoftTab=function(o,i,t){var e=o.column,n=o.column+i;return t<0&&(e=o.column-i,n=o.column),this.session.isTabStop(o)&&this.doc.getLine(o.row).slice(e,n).split(" ").length-1==i},r.prototype.moveCursorLeft=function(){var o=this.lead.getPosition(),i;if(i=this.session.getFoldAt(o.row,o.column,-1))this.moveCursorTo(i.start.row,i.start.column);else if(o.column===0)o.row>0&&this.moveCursorTo(o.row-1,this.doc.getLine(o.row-1).length);else{var t=this.session.getTabSize();this.wouldMoveIntoSoftTab(o,t,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-t):this.moveCursorBy(0,-1)}},r.prototype.moveCursorRight=function(){var o=this.lead.getPosition(),i;if(i=this.session.getFoldAt(o.row,o.column,1))this.moveCursorTo(i.end.row,i.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var t=this.session.getTabSize(),o=this.lead;this.wouldMoveIntoSoftTab(o,t,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,t):this.moveCursorBy(0,1)}},r.prototype.moveCursorLineStart=function(){var o=this.lead.row,i=this.lead.column,t=this.session.documentToScreenRow(o,i),e=this.session.screenToDocumentPosition(t,0),n=this.session.getDisplayLine(o,null,e.row,e.column),l=n.match(/^\s*/);l[0].length!=i&&!this.session.$useEmacsStyleLineStart&&(e.column+=l[0].length),this.moveCursorToPosition(e)},r.prototype.moveCursorLineEnd=function(){var o=this.lead,i=this.session.getDocumentLastRowColumnPosition(o.row,o.column);if(this.lead.column==i.column){var t=this.session.getLine(i.row);if(i.column==t.length){var e=t.search(/\s+$/);e>0&&(i.column=e)}}this.moveCursorTo(i.row,i.column)},r.prototype.moveCursorFileEnd=function(){var o=this.doc.getLength()-1,i=this.doc.getLine(o).length;this.moveCursorTo(o,i)},r.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},r.prototype.moveCursorLongWordRight=function(){var o=this.lead.row,i=this.lead.column,t=this.doc.getLine(o),e=t.substring(i);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var n=this.session.getFoldAt(o,i,1);if(n){this.moveCursorTo(n.end.row,n.end.column);return}if(this.session.nonTokenRe.exec(e)&&(i+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,e=t.substring(i)),i>=t.length){this.moveCursorTo(o,t.length),this.moveCursorRight(),o<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(e)&&(i+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(o,i)},r.prototype.moveCursorLongWordLeft=function(){var o=this.lead.row,i=this.lead.column,t;if(t=this.session.getFoldAt(o,i,-1)){this.moveCursorTo(t.start.row,t.start.column);return}var e=this.session.getFoldStringAt(o,i,-1);e==null&&(e=this.doc.getLine(o).substring(0,i));var n=$.stringReverse(e);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(n)&&(i-=this.session.nonTokenRe.lastIndex,n=n.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),i<=0){this.moveCursorTo(o,0),this.moveCursorLeft(),o>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(n)&&(i-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(o,i)},r.prototype.$shortWordEndIndex=function(o){var i=0,t,e=/\s/,n=this.session.tokenRe;if(n.lastIndex=0,this.session.tokenRe.exec(o))i=this.session.tokenRe.lastIndex;else{for(;(t=o[i])&&e.test(t);)i++;if(i<1){for(n.lastIndex=0;(t=o[i])&&!n.test(t);)if(n.lastIndex=0,i++,e.test(t))if(i>2){i--;break}else{for(;(t=o[i])&&e.test(t);)i++;if(i>2)break}}}return n.lastIndex=0,i},r.prototype.moveCursorShortWordRight=function(){var o=this.lead.row,i=this.lead.column,t=this.doc.getLine(o),e=t.substring(i),n=this.session.getFoldAt(o,i,1);if(n)return this.moveCursorTo(n.end.row,n.end.column);if(i==t.length){var l=this.doc.getLength();do o++,e=this.doc.getLine(o);while(o<l&&/^\s*$/.test(e));/^\s+/.test(e)||(e=""),i=0}var h=this.$shortWordEndIndex(e);this.moveCursorTo(o,i+h)},r.prototype.moveCursorShortWordLeft=function(){var o=this.lead.row,i=this.lead.column,t;if(t=this.session.getFoldAt(o,i,-1))return this.moveCursorTo(t.start.row,t.start.column);var e=this.session.getLine(o).substring(0,i);if(i===0){do o--,e=this.doc.getLine(o);while(o>0&&/^\s*$/.test(e));i=e.length,/\s+$/.test(e)||(e="")}var n=$.stringReverse(e),l=this.$shortWordEndIndex(n);return this.moveCursorTo(o,i-l)},r.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},r.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},r.prototype.moveCursorBy=function(o,i){var t=this.session.documentToScreenPosition(this.lead.row,this.lead.column),e;if(i===0&&(o!==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),o!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var n=this.session.lineWidgets[this.lead.row];o<0?o-=n.rowsAbove||0:o>0&&(o+=n.rowCount-(n.rowsAbove||0))}var l=this.session.screenToDocumentPosition(t.row+o,t.column,e);o!==0&&i===0&&l.row===this.lead.row&&(l.column,this.lead.column),this.moveCursorTo(l.row,l.column+i,i===0)},r.prototype.moveCursorToPosition=function(o){this.moveCursorTo(o.row,o.column)},r.prototype.moveCursorTo=function(o,i,t){var e=this.session.getFoldAt(o,i,1);e&&(o=e.start.row,i=e.start.column),this.$keepDesiredColumnOnChange=!0;var n=this.session.getLine(o);/[\uDC00-\uDFFF]/.test(n.charAt(i))&&n.charAt(i-1)&&(this.lead.row==o&&this.lead.column==i+1?i=i-1:i=i+1),this.lead.setPosition(o,i),this.$keepDesiredColumnOnChange=!1,t||(this.$desiredColumn=null)},r.prototype.moveCursorToScreen=function(o,i,t){var e=this.session.screenToDocumentPosition(o,i);this.moveCursorTo(e.row,e.column,t)},r.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},r.prototype.fromOrientedRange=function(o){this.setSelectionRange(o,o.cursor==o.start),this.$desiredColumn=o.desiredColumn||this.$desiredColumn},r.prototype.toOrientedRange=function(o){var i=this.getRange();return o?(o.start.column=i.start.column,o.start.row=i.start.row,o.end.column=i.end.column,o.end.row=i.end.row):o=i,o.cursor=this.isBackwards()?o.start:o.end,o.desiredColumn=this.$desiredColumn,o},r.prototype.getRangeOfMovements=function(o){var i=this.getCursor();try{o(this);var t=this.getCursor();return s.fromPoints(i,t)}catch{return s.fromPoints(i,i)}finally{this.moveCursorToPosition(i)}},r.prototype.toJSON=function(){if(this.rangeCount)var o=this.ranges.map(function(i){var t=i.clone();return t.isBackwards=i.cursor==i.start,t});else{var o=this.getRange();o.isBackwards=this.isBackwards()}return o},r.prototype.fromJSON=function(o){if(o.start==null)if(this.rangeList&&o.length>1){this.toSingleRange(o[0]);for(var i=o.length;i--;){var t=s.fromPoints(o[i].start,o[i].end);o[i].isBackwards&&(t.cursor=t.start),this.addRange(t,!0)}return}else o=o[0];this.rangeList&&this.toSingleRange(o),this.setSelectionRange(o,o.isBackwards)},r.prototype.isEqual=function(o){if((o.length||this.rangeCount)&&o.length!=this.rangeCount)return!1;if(!o.length||!this.ranges)return this.getRange().isEqual(o);for(var i=this.ranges.length;i--;)if(!this.ranges[i].isEqual(o[i]))return!1;return!0},r})();a.prototype.setSelectionAnchor=a.prototype.setAnchor,a.prototype.getSelectionAnchor=a.prototype.getAnchor,a.prototype.setSelectionRange=a.prototype.setRange,x.implement(a.prototype,w),c.Selection=a});ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(y,c,E){"use strict";var x=y("./lib/report_error").reportError,$=2e3,w=(function(){function s(a){this.splitRegex,this.states=a,this.regExps={},this.matchMappings={};for(var r in this.states){for(var o=this.states[r],i=[],t=0,e=this.matchMappings[r]={defaultToken:"text"},n="g",l=[],h=0;h<o.length;h++){var f=o[h];if(f.defaultToken&&(e.defaultToken=f.defaultToken),f.caseInsensitive&&n.indexOf("i")===-1&&(n+="i"),f.unicode&&n.indexOf("u")===-1&&(n+="u"),f.regex!=null){f.regex instanceof RegExp&&(f.regex=f.regex.toString().slice(1,-1));var p=f.regex,m=new RegExp("(?:("+p+")|(.))").exec("a").length-2;Array.isArray(f.token)?f.token.length==1||m==1?f.token=f.token[0]:m-1!=f.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:f,groupCount:m-1}),f.token=f.token[0]):(f.tokenArray=f.token,f.token=null,f.onMatch=this.$arrayTokens):typeof f.token=="function"&&!f.onMatch&&(m>1?f.onMatch=this.$applyToken:f.onMatch=f.token),m>1&&(/\\\d/.test(f.regex)?p=f.regex.replace(/\\([0-9]+)/g,function(S,C){return"\\"+(parseInt(C,10)+t+1)}):(m=1,p=this.removeCapturingGroups(f.regex)),!f.splitRegex&&typeof f.token!="string"&&l.push(f)),e[t]=h,t+=m,i.push(p),f.onMatch||(f.onMatch=null)}}i.length||(e[0]=0,i.push("$")),l.forEach(function(S){S.splitRegex=this.createSplitterRegexp(S.regex,n)},this),this.regExps[r]=new RegExp("("+i.join(")|(")+")|($)",n)}}return s.prototype.$setMaxTokenCount=function(a){$=a|0},s.prototype.$applyToken=function(a){var r=this.splitRegex.exec(a).slice(1),o=this.token.apply(this,r);if(typeof o=="string")return[{type:o,value:a}];for(var i=[],t=0,e=o.length;t<e;t++)r[t]&&(i[i.length]={type:o[t],value:r[t]});return i},s.prototype.$arrayTokens=function(a){if(!a)return[];var r=this.splitRegex.exec(a);if(!r)return"text";for(var o=[],i=this.tokenArray,t=0,e=i.length;t<e;t++)r[t+1]&&(o[o.length]={type:i[t],value:r[t+1]});return o},s.prototype.removeCapturingGroups=function(a){var r=a.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(o,i){return i?"(?:":o});return r},s.prototype.createSplitterRegexp=function(a,r){if(a.indexOf("(?=")!=-1){var o=0,i=!1,t={};a.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,n,l,h,f,p){return i?i=f!="]":f?i=!0:h?(o==t.stack&&(t.end=p+1,t.stack=-1),o--):l&&(o++,l.length!=1&&(t.stack=o,t.start=p)),e}),t.end!=null&&/^\)*$/.test(a.substr(t.end))&&(a=a.substring(0,t.start)+a.substr(t.end))}return a.charAt(0)!="^"&&(a="^"+a),a.charAt(a.length-1)!="$"&&(a+="$"),new RegExp(a,(r||"").replace("g",""))},s.prototype.getLineTokens=function(a,r){if(r&&typeof r!="string"){var o=r.slice(0);r=o[0],r==="#tmp"&&(o.shift(),r=o.shift())}else var o=[];var i=r||"start",t=this.states[i];t||(i="start",t=this.states[i]);var e=this.matchMappings[i],n=this.regExps[i];n.lastIndex=0;for(var l,h=[],f=0,p=0,m={type:null,value:""};l=n.exec(a);){var S=e.defaultToken,C=null,g=l[0],M=n.lastIndex;if(M-g.length>f){var k=a.substring(f,M-g.length);m.type==S?m.value+=k:(m.type&&h.push(m),m={type:S,value:k})}for(var _=0;_<l.length-2;_++)if(l[_+1]!==void 0){C=t[e[_]],C.onMatch?S=C.onMatch(g,i,o,a):S=C.token,C.next&&(typeof C.next=="string"?i=C.next:i=C.next(i,o),t=this.states[i],t||(this.reportError("state doesn't exist",i),i="start",t=this.states[i]),e=this.matchMappings[i],f=M,n=this.regExps[i],n.lastIndex=M),C.consumeLineEnd&&(f=M);break}if(g){if(typeof S=="string")(!C||C.merge!==!1)&&m.type===S?m.value+=g:(m.type&&h.push(m),m={type:S,value:g});else if(S){m.type&&h.push(m),m={type:null,value:""};for(var _=0;_<S.length;_++)h.push(S[_])}}if(f==a.length)break;if(f=M,p++>$){for(p>2*a.length&&this.reportError("infinite loop with in ace tokenizer",{startState:r,line:a});f<a.length;)m.type&&h.push(m),m={value:a.substring(f,f+=500),type:"overflow"};i="start",o=[];break}}return m.type&&h.push(m),o.length>1&&o[0]!==i&&o.unshift("#tmp",i),{tokens:h,state:o.length?o:i}},s})();w.prototype.reportError=x,c.Tokenizer=w});ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(y,c,E){"use strict";var x=y("../lib/deep_copy").deepCopy,$;$=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(a,r){if(!r){for(var o in a)this.$rules[o]=a[o];return}for(var o in a){for(var i=a[o],t=0;t<i.length;t++){var e=i[t];(e.next||e.onMatch)&&(typeof e.next=="string"&&e.next.indexOf(r)!==0&&(e.next=r+e.next),e.nextState&&e.nextState.indexOf(r)!==0&&(e.nextState=r+e.nextState))}this.$rules[r+o]=i}},this.getRules=function(){return this.$rules},this.embedRules=function(a,r,o,i,t){var e=typeof a=="function"?new a().getRules():a;if(i)for(var n=0;n<i.length;n++)i[n]=r+i[n];else{i=[];for(var l in e)i.push(r+l)}if(this.addRules(e,r),o)for(var h=Array.prototype[t?"push":"unshift"],n=0;n<i.length;n++)h.apply(this.$rules[i[n]],x(o));this.$embeds||(this.$embeds=[]),this.$embeds.push(r)},this.getEmbeds=function(){return this.$embeds};var w=function(a,r){return(a!="start"||r.length)&&r.unshift(this.nextState,a),this.nextState},s=function(a,r){return r.shift(),r.shift()||"start"};this.normalizeRules=function(){var a=0,r=this.$rules;function o(i){var t=r[i];t.processed=!0;for(var e=0;e<t.length;e++){var n=t[e],l=null;Array.isArray(n)&&(l=n,n={}),!n.regex&&n.start&&(n.regex=n.start,n.next||(n.next=[]),n.next.push({defaultToken:n.token},{token:n.token+".end",regex:n.end||n.start,next:"pop"}),n.token=n.token+".start",n.push=!0);var h=n.next||n.push;if(h&&Array.isArray(h)){var f=n.stateName;f||(f=n.token,typeof f!="string"&&(f=f[0]||""),r[f]&&(f+=a++)),r[f]=h,n.next=f,o(f)}else h=="pop"&&(n.next=s);if(n.push&&(n.nextState=n.next||n.push,n.next=w,delete n.push),n.rules)for(var p in n.rules)r[p]?r[p].push&&r[p].push.apply(r[p],n.rules[p]):r[p]=n.rules[p];var m=typeof n=="string"?n:n.include;if(m&&(m==="$self"&&(m="start"),Array.isArray(m)?l=m.map(function(C){return r[C]}):l=r[m]),l){var S=[e,1].concat(l);n.noEscape&&(S=S.filter(function(C){return!C.next})),t.splice.apply(t,S),e--}n.keywordMap&&(n.token=this.createKeywordMapper(n.keywordMap,n.defaultToken||"text",n.caseInsensitive),delete n.defaultToken)}}Object.keys(r).forEach(o,this)},this.createKeywordMapper=function(a,r,o,i){var t=Object.create(null);return this.$keywordList=[],Object.keys(a).forEach(function(e){for(var n=a[e],l=n.split(i||"|"),h=l.length;h--;){var f=l[h];this.$keywordList.push(f),o&&(f=f.toLowerCase()),t[f]=e}},this),a=null,o?function(e){return t[e.toLowerCase()]||r}:function(e){return t[e]||r}},this.getKeywords=function(){return this.$keywords}}).call($.prototype),c.TextHighlightRules=$});ace.define("ace/mode/behaviour",["require","exports","module"],function(y,c,E){"use strict";var x;x=function(){this.$behaviours={}},(function(){this.add=function($,w,s){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[$]:this.$behaviours[$]={}}this.$behaviours[$][w]=s},this.addBehaviours=function($){for(var w in $)for(var s in $[w])this.add(w,s,$[w][s])},this.remove=function($){this.$behaviours&&this.$behaviours[$]&&delete this.$behaviours[$]},this.inherit=function($,w){if(typeof $=="function")var s=new $().getBehaviours(w);else var s=$.getBehaviours(w);this.addBehaviours(s)},this.getBehaviours=function($){if($){for(var w={},s=0;s<$.length;s++)this.$behaviours[$[s]]&&(w[$[s]]=this.$behaviours[$[s]]);return w}else return this.$behaviours}}).call(x.prototype),c.Behaviour=x});ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(y,c,E){"use strict";var x=y("./range").Range,$=(function(){function w(s,a,r){this.$session=s,this.$row=a,this.$rowTokens=s.getTokens(a);var o=s.getTokenAt(a,r);this.$tokenIndex=o?o.index:-1}return w.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},w.prototype.stepForward=function(){this.$tokenIndex+=1;for(var s;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,s||(s=this.$session.getLength()),this.$row>=s)return this.$row=s-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},w.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},w.prototype.getCurrentTokenRow=function(){return this.$row},w.prototype.getCurrentTokenColumn=function(){var s=this.$rowTokens,a=this.$tokenIndex,r=s[a].start;if(r!==void 0)return r;for(r=0;a>0;)a-=1,r+=s[a].value.length;return r},w.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},w.prototype.getCurrentTokenRange=function(){var s=this.$rowTokens[this.$tokenIndex],a=this.getCurrentTokenColumn();return new x(this.$row,a,this.$row,a+s.value.length)},w})();c.TokenIterator=$});ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(y,c,E){"use strict";var x=y("../../lib/oop"),$=y("../behaviour").Behaviour,w=y("../../token_iterator").TokenIterator,s=y("../../lib/lang"),a=["text","paren.rparen","rparen","paren","punctuation.operator"],r=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],o,i={},t={'"':'"',"'":"'"},e=function(h){var f=-1;if(h.multiSelect&&(f=h.selection.index,i.rangeCount!=h.multiSelect.rangeCount&&(i={rangeCount:h.multiSelect.rangeCount})),i[f])return o=i[f];o=i[f]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},n=function(h,f,p,m){var S=h.end.row-h.start.row;return{text:p+f+m,selection:[0,h.start.column+1,S,h.end.column+(S?0:1)]}},l;l=function(h){h=h||{},this.add("braces","insertion",function(f,p,m,S,C){var g=m.getCursorPosition(),M=S.doc.getLine(g.row);if(C=="{"){e(m);var k=m.getSelectionRange(),_=S.doc.getTextRange(k),R=S.getTokenAt(g.row,g.column);if(_!==""&&_!=="{"&&m.getWrapBehavioursEnabled())return n(k,_,"{","}");if(R&&/(?:string)\.quasi|\.xml/.test(R.type)){var b=[/tag\-(?:open|name)/,/attribute\-name/];return b.some(function(I){return I.test(R.type)})||/(string)\.quasi/.test(R.type)&&R.value[g.column-R.start-1]!=="$"?void 0:(l.recordAutoInsert(m,S,"}"),{text:"{}",selection:[1,1]})}else if(l.isSaneInsertion(m,S))return/[\]\}\)]/.test(M[g.column])||m.inMultiSelectMode||h.braces?(l.recordAutoInsert(m,S,"}"),{text:"{}",selection:[1,1]}):(l.recordMaybeInsert(m,S,"{"),{text:"{",selection:[1,1]})}else if(C=="}"){e(m);var v=M.substring(g.column,g.column+1);if(v=="}"){var d=S.$findOpeningBracket("}",{column:g.column+1,row:g.row});if(d!==null&&l.isAutoInsertedClosing(g,M,C))return l.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(C==`
`||C==`\r
`){e(m);var u="";l.isMaybeInsertedClosing(g,M)&&(u=s.stringRepeat("}",o.maybeInsertedBrackets),l.clearMaybeInsertedClosing());var v=M.substring(g.column,g.column+1);if(v==="}"){var A=S.findMatchingBracket({row:g.row,column:g.column+1},"}");if(!A)return null;var L=this.$getIndent(S.getLine(A.row))}else if(u)var L=this.$getIndent(M);else{l.clearMaybeInsertedClosing();return}var T=L+S.getTabString();return{text:`
`+T+`
`+L+u,selection:[1,T.length,1,T.length]}}else l.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(f,p,m,S,C){var g=S.doc.getTextRange(C);if(!C.isMultiLine()&&g=="{"){e(m);var M=S.doc.getLine(C.start.row),k=M.substring(C.end.column,C.end.column+1);if(k=="}")return C.end.column++,C;o.maybeInsertedBrackets--}}),this.add("parens","insertion",function(f,p,m,S,C){if(C=="("){e(m);var g=m.getSelectionRange(),M=S.doc.getTextRange(g);if(M!==""&&m.getWrapBehavioursEnabled())return n(g,M,"(",")");if(l.isSaneInsertion(m,S))return l.recordAutoInsert(m,S,")"),{text:"()",selection:[1,1]}}else if(C==")"){e(m);var k=m.getCursorPosition(),_=S.doc.getLine(k.row),R=_.substring(k.column,k.column+1);if(R==")"){var b=S.$findOpeningBracket(")",{column:k.column+1,row:k.row});if(b!==null&&l.isAutoInsertedClosing(k,_,C))return l.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(f,p,m,S,C){var g=S.doc.getTextRange(C);if(!C.isMultiLine()&&g=="("){e(m);var M=S.doc.getLine(C.start.row),k=M.substring(C.start.column+1,C.start.column+2);if(k==")")return C.end.column++,C}}),this.add("brackets","insertion",function(f,p,m,S,C){if(C=="["){e(m);var g=m.getSelectionRange(),M=S.doc.getTextRange(g);if(M!==""&&m.getWrapBehavioursEnabled())return n(g,M,"[","]");if(l.isSaneInsertion(m,S))return l.recordAutoInsert(m,S,"]"),{text:"[]",selection:[1,1]}}else if(C=="]"){e(m);var k=m.getCursorPosition(),_=S.doc.getLine(k.row),R=_.substring(k.column,k.column+1);if(R=="]"){var b=S.$findOpeningBracket("]",{column:k.column+1,row:k.row});if(b!==null&&l.isAutoInsertedClosing(k,_,C))return l.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(f,p,m,S,C){var g=S.doc.getTextRange(C);if(!C.isMultiLine()&&g=="["){e(m);var M=S.doc.getLine(C.start.row),k=M.substring(C.start.column+1,C.start.column+2);if(k=="]")return C.end.column++,C}}),this.add("string_dquotes","insertion",function(f,p,m,S,C){var g=S.$mode.$quotes||t;if(C.length==1&&g[C]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(C)!=-1)return;e(m);var M=C,k=m.getSelectionRange(),_=S.doc.getTextRange(k);if(_!==""&&(_.length!=1||!g[_])&&m.getWrapBehavioursEnabled())return n(k,_,M,M);if(!_){var R=m.getCursorPosition(),b=S.doc.getLine(R.row),v=b.substring(R.column-1,R.column),d=b.substring(R.column,R.column+1),u=S.getTokenAt(R.row,R.column),A=S.getTokenAt(R.row,R.column+1);if(v=="\\"&&u&&/escape/.test(u.type))return null;var L=u&&/string|escape/.test(u.type),T=!A||/string|escape/.test(A.type),I;if(d==M)I=L!==T,I&&/string\.end/.test(A.type)&&(I=!1);else{if(L&&!T||L&&T)return null;var D=S.$mode.tokenRe;D.lastIndex=0;var O=D.test(v);D.lastIndex=0;var F=D.test(d),N=S.$mode.$pairQuotesAfter,W=N&&N[M]&&N[M].test(v);if(!W&&O||F||d&&!/[\s;,.})\]\\]/.test(d))return null;var B=b[R.column-2];if(v==M&&(B==M||D.test(B)))return null;I=!0}return{text:I?M+M:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(f,p,m,S,C){var g=S.$mode.$quotes||t,M=S.doc.getTextRange(C);if(!C.isMultiLine()&&g.hasOwnProperty(M)){e(m);var k=S.doc.getLine(C.start.row),_=k.substring(C.start.column+1,C.start.column+2);if(_==M)return C.end.column++,C}}),h.closeDocComment!==!1&&this.add("doc comment end","insertion",function(f,p,m,S,C){if(f==="doc-start"&&(C===`
`||C===`\r
`)&&m.selection.isEmpty()){var g=m.getCursorPosition();if(g.column===0)return;for(var M=S.doc.getLine(g.row),k=S.doc.getLine(g.row+1),_=S.getTokens(g.row),R=0,b=0;b<_.length;b++){R+=_[b].value.length;var v=_[b];if(R>=g.column){if(R===g.column){if(!/\.doc/.test(v.type))return;if(/\*\//.test(v.value)){var d=_[b+1];if(!d||!/\.doc/.test(d.type))return}}var u=g.column-(R-v.value.length),A=v.value.indexOf("*/"),L=v.value.indexOf("/**",A>-1?A+2:0);if(L!==-1&&u>L&&u<L+3||A!==-1&&L!==-1&&u>=A&&u<=L||!/\.doc/.test(v.type))return;break}}var T=this.$getIndent(M);if(/\s*\*/.test(k))return/^\s*\*/.test(M)?{text:C+T+"* ",selection:[1,2+T.length,1,2+T.length]}:{text:C+T+" * ",selection:[1,3+T.length,1,3+T.length]};if(/\/\*\*/.test(M.substring(0,g.column)))return{text:C+T+" * "+C+" "+T+"*/",selection:[1,4+T.length,1,4+T.length]}}})},l.isSaneInsertion=function(h,f){var p=h.getCursorPosition(),m=new w(f,p.row,p.column);if(!this.$matchTokenType(m.getCurrentToken()||"text",a)){if(/[)}\]]/.test(h.session.getLine(p.row)[p.column]))return!0;var S=new w(f,p.row,p.column+1);if(!this.$matchTokenType(S.getCurrentToken()||"text",a))return!1}return m.stepForward(),m.getCurrentTokenRow()!==p.row||this.$matchTokenType(m.getCurrentToken()||"text",r)},l.$matchTokenType=function(h,f){return f.indexOf(h.type||h)>-1},l.recordAutoInsert=function(h,f,p){var m=h.getCursorPosition(),S=f.doc.getLine(m.row);this.isAutoInsertedClosing(m,S,o.autoInsertedLineEnd[0])||(o.autoInsertedBrackets=0),o.autoInsertedRow=m.row,o.autoInsertedLineEnd=p+S.substr(m.column),o.autoInsertedBrackets++},l.recordMaybeInsert=function(h,f,p){var m=h.getCursorPosition(),S=f.doc.getLine(m.row);this.isMaybeInsertedClosing(m,S)||(o.maybeInsertedBrackets=0),o.maybeInsertedRow=m.row,o.maybeInsertedLineStart=S.substr(0,m.column)+p,o.maybeInsertedLineEnd=S.substr(m.column),o.maybeInsertedBrackets++},l.isAutoInsertedClosing=function(h,f,p){return o.autoInsertedBrackets>0&&h.row===o.autoInsertedRow&&p===o.autoInsertedLineEnd[0]&&f.substr(h.column)===o.autoInsertedLineEnd},l.isMaybeInsertedClosing=function(h,f){return o.maybeInsertedBrackets>0&&h.row===o.maybeInsertedRow&&f.substr(h.column)===o.maybeInsertedLineEnd&&f.substr(0,h.column)==o.maybeInsertedLineStart},l.popAutoInsertedClosing=function(){o.autoInsertedLineEnd=o.autoInsertedLineEnd.substr(1),o.autoInsertedBrackets--},l.clearMaybeInsertedClosing=function(){o&&(o.maybeInsertedBrackets=0,o.maybeInsertedRow=-1)},x.inherits(l,$),c.CstyleBehaviour=l});ace.define("ace/unicode",["require","exports","module"],function(y,c,E){"use strict";for(var x=[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],$=0,w=[],s=0;s<x.length;s+=2)w.push($+=x[s]),x[s+1]&&w.push(45,$+=x[s+1]);c.wordChars=String.fromCharCode.apply(null,w)});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(y,c,E){"use strict";var x=y("../config"),$=y("../tokenizer").Tokenizer,w=y("./text_highlight_rules").TextHighlightRules,s=y("./behaviour/cstyle").CstyleBehaviour,a=y("../unicode"),r=y("../lib/lang"),o=y("../token_iterator").TokenIterator,i=y("../range").Range,t;t=function(){this.HighlightRules=w},(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 $(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,n,l,h){var f=n.doc,p=!0,m=!0,S=1/0,C=n.getTabSize(),g=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var _=this.lineCommentStart.map(r.escapeRegExp).join("|"),M=this.lineCommentStart[0];else var _=r.escapeRegExp(this.lineCommentStart),M=this.lineCommentStart;_=new RegExp("^(\\s*)(?:"+_+") ?"),g=n.getUseSoftTabs();var v=function(F,N){var W=F.match(_);if(W){var B=W[1].length,z=W[0].length;!A(F,B,z)&&W[0][z-1]==" "&&z--,f.removeInLine(N,B,z)}},u=M+" ",b=function(F,N){(!p||/\S/.test(F))&&(A(F,S,S)?f.insertInLine({row:N,column:S},u):f.insertInLine({row:N,column:S},M))},d=function(F,N){return _.test(F)},A=function(F,N,W){for(var B=0;N--&&F.charAt(N)==" ";)B++;if(B%C!=0)return!1;for(var B=0;F.charAt(W++)==" ";)B++;return C>2?B%C!=C-1:B%C==0}}else{if(!this.blockComment)return!1;var M=this.blockComment.start,k=this.blockComment.end,_=new RegExp("^(\\s*)(?:"+r.escapeRegExp(M)+")"),R=new RegExp("(?:"+r.escapeRegExp(k)+")\\s*$"),b=function(I,D){d(I,D)||(!p||/\S/.test(I))&&(f.insertInLine({row:D,column:I.length},k),f.insertInLine({row:D,column:S},M))},v=function(I,D){var O;(O=I.match(R))&&f.removeInLine(D,I.length-O[0].length,I.length),(O=I.match(_))&&f.removeInLine(D,O[1].length,O[0].length)},d=function(I,D){if(_.test(I))return!0;for(var O=n.getTokens(D),F=0;F<O.length;F++)if(O[F].type==="comment")return!0}}function L(I){for(var D=l;D<=h;D++)I(f.getLine(D),D)}var T=1/0;L(function(I,D){var O=I.search(/\S/);O!==-1?(O<S&&(S=O),m&&!d(I,D)&&(m=!1)):T>I.length&&(T=I.length)}),S==1/0&&(S=T,p=!1,m=!1),g&&S%C!=0&&(S=Math.floor(S/C)*C),L(m?v:b)},this.toggleBlockComment=function(e,n,l,h){var f=this.blockComment;if(f){!f.start&&f[0]&&(f=f[0]);var p=new o(n,h.row,h.column),m=p.getCurrentToken(),S=n.selection,C=n.selection.toOrientedRange(),g,M;if(m&&/comment/.test(m.type)){for(var k,_;m&&/comment/.test(m.type);){var R=m.value.indexOf(f.start);if(R!=-1){var b=p.getCurrentTokenRow(),v=p.getCurrentTokenColumn()+R;k=new i(b,v,b,v+f.start.length);break}m=p.stepBackward()}for(var p=new o(n,h.row,h.column),m=p.getCurrentToken();m&&/comment/.test(m.type);){var R=m.value.indexOf(f.end);if(R!=-1){var b=p.getCurrentTokenRow(),v=p.getCurrentTokenColumn()+R;_=new i(b,v,b,v+f.end.length);break}m=p.stepForward()}_&&n.remove(_),k&&(n.remove(k),g=k.start.row,M=-f.start.length)}else M=f.start.length,g=l.start.row,n.insert(l.end,f.end),n.insert(l.start,f.start);C.start.row==g&&(C.start.column+=M),C.end.row==g&&(C.end.column+=M),n.selection.fromOrientedRange(C)}},this.getNextLineIndent=function(e,n,l){return this.$getIndent(n)},this.checkOutdent=function(e,n,l){return!1},this.autoOutdent=function(e,n,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 n in e)if(e[n]){var l=e[n],h=l.prototype.$id,f=x.$modes[h];f||(x.$modes[h]=f=new l),x.$modes[n]||(x.$modes[n]=f),this.$embeds.push(n),this.$modes[n]=f}for(var p=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],m=function(C){(function(g){var M=p[C],k=g[M];g[p[C]]=function(){return this.$delegator(M,arguments,k)}})(S)},S=this,n=0;n<p.length;n++)m(n)},this.$delegator=function(e,n,l){var h=n[0]||"start";if(typeof h!="string"){if(Array.isArray(h[2])){var f=h[2][h[2].length-1],p=this.$modes[f];if(p)return p[e].apply(p,[h[1]].concat([].slice.call(n,1)))}h=h[0]||"start"}for(var m=0;m<this.$embeds.length;m++)if(this.$modes[this.$embeds[m]]){var S=h.split(this.$embeds[m]);if(!S[0]&&S[1]){n[0]=S[1];var p=this.$modes[this.$embeds[m]];return p[e].apply(p,n)}}var C=l.apply(this,n);return l?C:void 0},this.transformAction=function(e,n,l,h,f){if(this.$behaviour){var p=this.$behaviour.getBehaviours();for(var m in p)if(p[m][n]){var S=p[m][n].apply(this,arguments);if(S)return S}}},this.getKeywords=function(e){if(!this.completionKeywords){var n=this.$tokenizer.rules,l=[];for(var h in n)for(var f=n[h],p=0,m=f.length;p<m;p++)if(typeof f[p].token=="string")/keyword|support|storage/.test(f[p].token)&&l.push(f[p].regex);else if(typeof f[p].token=="object"){for(var S=0,C=f[p].token.length;S<C;S++)if(/keyword|support|storage/.test(f[p].token[S])){var h=f[p].regex.match(/\(.+?\)/g)[S];l.push(h.substr(1,h.length-2))}}this.completionKeywords=l}return e?l.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,n,l,h){var f=this.$keywordList||this.$createKeywordList();return f.map(function(p){return{name:p,value:p,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(t.prototype),c.Mode=t});ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(y,c,E){"use strict";var x=y("./lib/dom"),$=(function(){function w(s){this.session=s,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return w.prototype.getRowLength=function(s){var a;return this.lineWidgets?a=this.lineWidgets[s]&&this.lineWidgets[s].rowCount||0:a=0,!this.$useWrapMode||!this.$wrapData[s]?1+a:this.$wrapData[s].length+1+a},w.prototype.$getWidgetScreenLength=function(){var s=0;return this.lineWidgets.forEach(function(a){a&&a.rowCount&&!a.hidden&&(s+=a.rowCount)}),s},w.prototype.$onChangeEditor=function(s){this.attach(s.editor)},w.prototype.attach=function(s){s&&s.widgetManager&&s.widgetManager!=this&&s.widgetManager.detach(),this.editor!=s&&(this.detach(),this.editor=s,s&&(s.widgetManager=this,s.renderer.on("beforeRender",this.measureWidgets),s.renderer.on("afterRender",this.renderWidgets)))},w.prototype.detach=function(s){var a=this.editor;if(a){this.editor=null,a.widgetManager=null,a.renderer.off("beforeRender",this.measureWidgets),a.renderer.off("afterRender",this.renderWidgets);var r=this.session.lineWidgets;r&&r.forEach(function(o){o&&o.el&&o.el.parentNode&&(o._inDocument=!1,o.el.parentNode.removeChild(o.el))})}},w.prototype.updateOnFold=function(s,a){var r=a.lineWidgets;if(!(!r||!s.action)){for(var o=s.data,i=o.start.row,t=o.end.row,e=s.action=="add",n=i+1;n<t;n++)r[n]&&(r[n].hidden=e);r[t]&&(e?r[i]?r[t].hidden=e:r[i]=r[t]:(r[i]==r[t]&&(r[i]=void 0),r[t].hidden=e))}},w.prototype.updateOnChange=function(s){var a=this.session.lineWidgets;if(a){var r=s.start.row,o=s.end.row-r;if(o!==0)if(s.action=="remove"){var i=a.splice(r+1,o);!a[r]&&i[i.length-1]&&(a[r]=i.pop()),i.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var t=new Array(o);a[r]&&a[r].column!=null&&s.start.column>a[r].column&&r++,t.unshift(r,0),a.splice.apply(a,t),this.$updateRows()}}},w.prototype.$updateRows=function(){var s=this.session.lineWidgets;if(s){var a=!0;s.forEach(function(r,o){if(r)for(a=!1,r.row=o;r.$oldWidget;)r.$oldWidget.row=o,r=r.$oldWidget}),a&&(this.session.lineWidgets=null)}},w.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},w.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=x.createElement("div"),s.el.innerHTML=s.html),s.text&&!s.el&&(s.el=x.createElement("div"),s.el.textContent=s.text),s.el&&(x.addCssClass(s.el,"ace_lineWidgetContainer"),s.className&&x.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 r=this.session.getFoldAt(s.row,0);if(s.$fold=r,r){var o=this.session.lineWidgets;s.row==r.end.row&&!o[r.start.row]?o[r.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},w.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()},w.prototype.getWidgetsAtRow=function(s){for(var a=this.session.lineWidgets,r=a&&a[s],o=[];r;)o.push(r),r=r.$oldWidget;return o},w.prototype.onWidgetChanged=function(s){this.session._changedWidgets.push(s),this.editor&&this.editor.renderer.updateFull()},w.prototype.measureWidgets=function(s,a){var r=this.session._changedWidgets,o=a.layerConfig;if(!(!r||!r.length)){for(var i=1/0,t=0;t<r.length;t++){var e=r[t];if(!(!e||!e.el)&&e.session==this.session){if(!e._inDocument){if(this.session.lineWidgets[e.row]!=e)continue;e._inDocument=!0,a.container.appendChild(e.el)}e.h=e.el.offsetHeight,e.fixedWidth||(e.w=e.el.offsetWidth,e.screenWidth=Math.ceil(e.w/o.characterWidth));var n=e.h/o.lineHeight;e.coverLine&&(n-=this.session.getRowLineCount(e.row),n<0&&(n=0)),e.rowCount!=n&&(e.rowCount=n,e.row<i&&(i=e.row))}}i!=1/0&&(this.session._emit("changeFold",{data:{start:{row:i}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},w.prototype.renderWidgets=function(s,a){var r=a.layerConfig,o=this.session.lineWidgets;if(o){for(var i=Math.min(this.firstRow,r.firstRow),t=Math.max(this.lastRow,r.lastRow,o.length);i>0&&!o[i];)i--;this.firstRow=r.firstRow,this.lastRow=r.lastRow,a.$cursorLayer.config=r;for(var e=i;e<=t;e++){var n=o[e];if(!(!n||!n.el)){if(n.hidden){n.el.style.top=-100-(n.pixelHeight||0)+"px";continue}n._inDocument||(n._inDocument=!0,a.container.appendChild(n.el));var l=a.$cursorLayer.getPixelPosition({row:e,column:0},!0).top;n.coverLine||(l+=r.lineHeight*this.session.getRowLineCount(n.row)),n.el.style.top=l-r.offset+"px";var h=n.coverGutter?0:a.gutterWidth;n.fixedWidth||(h-=a.scrollLeft),n.el.style.left=h+"px",n.fullWidth&&n.screenWidth&&(n.el.style.minWidth=r.width+2*r.padding+"px"),n.fixedWidth?n.el.style.right=a.scrollBar.getWidth()+"px":n.el.style.right=""}}}},w})();c.LineWidgets=$});ace.define("ace/apply_delta",["require","exports","module"],function(y,c,E){"use strict";function x(s,a){throw console.log("Invalid Delta:",s),"Invalid Delta: "+a}function $(s,a){return a.row>=0&&a.row<s.length&&a.column>=0&&a.column<=s[a.row].length}function w(s,a){a.action!="insert"&&a.action!="remove"&&x(a,"delta.action must be 'insert' or 'remove'"),a.lines instanceof Array||x(a,"delta.lines must be an Array"),(!a.start||!a.end)&&x(a,"delta.start/end must be an present");var r=a.start;$(s,a.start)||x(a,"delta.start must be contained in document");var o=a.end;a.action=="remove"&&!$(s,o)&&x(a,"delta.end must contained in document for 'remove' actions");var i=o.row-r.row,t=o.column-(i==0?r.column:0);(i!=a.lines.length-1||a.lines[i].length!=t)&&x(a,"delta.range must match delta lines")}c.applyDelta=function(s,a,r){var o=a.start.row,i=a.start.column,t=s[o]||"";switch(a.action){case"insert":var e=a.lines;if(e.length===1)s[o]=t.substring(0,i)+a.lines[0]+t.substring(i);else{var n=[o,1].concat(a.lines);s.splice.apply(s,n),s[o]=t.substring(0,i)+s[o],s[o+a.lines.length-1]+=t.substring(i)}break;case"remove":var l=a.end.column,h=a.end.row;o===h?s[o]=t.substring(0,i)+t.substring(l):s.splice(o,h-o+1,t.substring(0,i)+s[h].substring(l));break}}});ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(y,c,E){"use strict";var x=y("./lib/oop"),$=y("./lib/event_emitter").EventEmitter,w=(function(){function r(o,i,t){this.$onChange=this.onChange.bind(this),this.attach(o),typeof i!="number"?this.setPosition(i.row,i.column):this.setPosition(i,t)}return r.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},r.prototype.getDocument=function(){return this.document},r.prototype.onChange=function(o){if(!(o.start.row==o.end.row&&o.start.row!=this.row)&&!(o.start.row>this.row)){var i=a(o,{row:this.row,column:this.column},this.$insertRight);this.setPosition(i.row,i.column,!0)}},r.prototype.setPosition=function(o,i,t){var e;if(t?e={row:o,column:i}:e=this.$clipPositionToDocument(o,i),!(this.row==e.row&&this.column==e.column)){var n={row:this.row,column:this.column};this.row=e.row,this.column=e.column,this._signal("change",{old:n,value:e})}},r.prototype.detach=function(){this.document.off("change",this.$onChange)},r.prototype.attach=function(o){this.document=o||this.document,this.document.on("change",this.$onChange)},r.prototype.$clipPositionToDocument=function(o,i){var t={};return o>=this.document.getLength()?(t.row=Math.max(0,this.document.getLength()-1),t.column=this.document.getLine(t.row).length):o<0?(t.row=0,t.column=0):(t.row=o,t.column=Math.min(this.document.getLine(t.row).length,Math.max(0,i))),i<0&&(t.column=0),t},r})();w.prototype.$insertRight=!1,x.implement(w.prototype,$);function s(r,o,i){var t=i?r.column<=o.column:r.column<o.column;return r.row<o.row||r.row==o.row&&t}function a(r,o,i){var t=r.action=="insert",e=(t?1:-1)*(r.end.row-r.start.row),n=(t?1:-1)*(r.end.column-r.start.column),l=r.start,h=t?l:r.end;return s(o,l,i)?{row:o.row,column:o.column}:s(h,o,!i)?{row:o.row+e,column:o.column+(o.row==h.row?n:0)}:{row:l.row,column:l.column}}c.Anchor=w});ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(y,c,E){"use strict";var x=y("./lib/oop"),$=y("./apply_delta").applyDelta,w=y("./lib/event_emitter").EventEmitter,s=y("./range").Range,a=y("./anchor").Anchor,r=(function(){function o(i){this.$lines=[""],i.length===0?this.$lines=[""]:Array.isArray(i)?this.insertMergedLines({row:0,column:0},i):this.insert({row:0,column:0},i)}return o.prototype.setValue=function(i){var t=this.getLength()-1;this.remove(new s(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},i||"")},o.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},o.prototype.createAnchor=function(i,t){return new a(this,i,t)},o.prototype.$detectNewLine=function(i){var t=i.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:`
`,this._signal("changeNewLineMode")},o.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
`;case"unix":return`
`;default:return this.$autoNewLine||`
`}},o.prototype.setNewLineMode=function(i){this.$newLineMode!==i&&(this.$newLineMode=i,this._signal("changeNewLineMode"))},o.prototype.getNewLineMode=function(){return this.$newLineMode},o.prototype.isNewLine=function(i){return i==`\r
`||i=="\r"||i==`
`},o.prototype.getLine=function(i){return this.$lines[i]||""},o.prototype.getLines=function(i,t){return this.$lines.slice(i,t+1)},o.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},o.prototype.getLength=function(){return this.$lines.length},o.prototype.getTextRange=function(i){return this.getLinesForRange(i).join(this.getNewLineCharacter())},o.prototype.getLinesForRange=function(i){var t;if(i.start.row===i.end.row)t=[this.getLine(i.start.row).substring(i.start.column,i.end.column)];else{t=this.getLines(i.start.row,i.end.row),t[0]=(t[0]||"").substring(i.start.column);var e=t.length-1;i.end.row-i.start.row==e&&(t[e]=t[e].substring(0,i.end.column))}return t},o.prototype.insertLines=function(i,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(i,t)},o.prototype.removeLines=function(i,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(i,t)},o.prototype.insertNewLine=function(i){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(i,["",""])},o.prototype.insert=function(i,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(i,this.$split(t))},o.prototype.insertInLine=function(i,t){var e=this.clippedPos(i.row,i.column),n=this.pos(i.row,i.column+t.length);return this.applyDelta({start:e,end:n,action:"insert",lines:[t]},!0),this.clonePos(n)},o.prototype.clippedPos=function(i,t){var e=this.getLength();i===void 0?i=e:i<0?i=0:i>=e&&(i=e-1,t=void 0);var n=this.getLine(i);return t==null&&(t=n.length),t=Math.min(Math.max(t,0),n.length),{row:i,column:t}},o.prototype.clonePos=function(i){return{row:i.row,column:i.column}},o.prototype.pos=function(i,t){return{row:i,column:t}},o.prototype.$clipPosition=function(i){var t=this.getLength();return i.row>=t?(i.row=Math.max(0,t-1),i.column=this.getLine(t-1).length):(i.row=Math.max(0,i.row),i.column=Math.min(Math.max(i.column,0),this.getLine(i.row).length)),i},o.prototype.insertFullLines=function(i,t){i=Math.min(Math.max(i,0),this.getLength());var e=0;i<this.getLength()?(t=t.concat([""]),e=0):(t=[""].concat(t),i--,e=this.$lines[i].length),this.insertMergedLines({row:i,column:e},t)},o.prototype.insertMergedLines=function(i,t){var e=this.clippedPos(i.row,i.column),n={row:e.row+t.length-1,column:(t.length==1?e.column:0)+t[t.length-1].length};return this.applyDelta({start:e,end:n,action:"insert",lines:t}),this.clonePos(n)},o.prototype.remove=function(i){var t=this.clippedPos(i.start.row,i.start.column),e=this.clippedPos(i.end.row,i.end.column);return this.applyDelta({start:t,end:e,action:"remove",lines:this.getLinesForRange({start:t,end:e})}),this.clonePos(t)},o.prototype.removeInLine=function(i,t,e){var n=this.clippedPos(i,t),l=this.clippedPos(i,e);return this.applyDelta({start:n,end:l,action:"remove",lines:this.getLinesForRange({start:n,end:l})},!0),this.clonePos(n)},o.prototype.removeFullLines=function(i,t){i=Math.min(Math.max(0,i),this.getLength()-1),t=Math.min(Math.max(0,t),this.getLength()-1);var e=t==this.getLength()-1&&i>0,n=t<this.getLength()-1,l=e?i-1:i,h=e?this.getLine(l).length:0,f=n?t+1:t,p=n?0:this.getLine(f).length,m=new s(l,h,f,p),S=this.$lines.slice(i,t+1);return this.applyDelta({start:m.start,end:m.end,action:"remove",lines:this.getLinesForRange(m)}),S},o.prototype.removeNewLine=function(i){i<this.getLength()-1&&i>=0&&this.applyDelta({start:this.pos(i,this.getLine(i).length),end:this.pos(i+1,0),action:"remove",lines:["",""]})},o.prototype.replace=function(i,t){if(i instanceof s||(i=s.fromPoints(i.start,i.end)),t.length===0&&i.isEmpty())return i.start;if(t==this.getTextRange(i))return i.end;this.remove(i);var e;return t?e=this.insert(i.start,t):e=i.start,e},o.prototype.applyDeltas=function(i){for(var t=0;t<i.length;t++)this.applyDelta(i[t])},o.prototype.revertDeltas=function(i){for(var t=i.length-1;t>=0;t--)this.revertDelta(i[t])},o.prototype.applyDelta=function(i,t){var e=i.action=="insert";(e?i.lines.length<=1&&!i.lines[0]:!s.comparePoints(i.start,i.end))||(e&&i.lines.length>2e4?this.$splitAndapplyLargeDelta(i,2e4):($(this.$lines,i,t),this._signal("change",i)))},o.prototype.$safeApplyDelta=function(i){var t=this.$lines.length;(i.action=="remove"&&i.start.row<t&&i.end.row<t||i.action=="insert"&&i.start.row<=t)&&this.applyDelta(i)},o.prototype.$splitAndapplyLargeDelta=function(i,t){for(var e=i.lines,n=e.length-t+1,l=i.start.row,h=i.start.column,f=0,p=0;f<n;f=p){p+=t-1;var m=e.slice(f,p);m.push(""),this.applyDelta({start:this.pos(l+f,h),end:this.pos(l+p,h=0),action:i.action,lines:m},!0)}i.lines=e.slice(f),i.start.row=l+f,i.start.column=h,this.applyDelta(i,!0)},o.prototype.revertDelta=function(i){this.$safeApplyDelta({start:this.clonePos(i.start),end:this.clonePos(i.end),action:i.action=="insert"?"remove":"insert",lines:i.lines.slice()})},o.prototype.indexToPosition=function(i,t){for(var e=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,l=t||0,h=e.length;l<h;l++)if(i-=e[l].length+n,i<0)return{row:l,column:i+e[l].length+n};return{row:h-1,column:i+e[h-1].length+n}},o.prototype.positionToIndex=function(i,t){for(var e=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,l=0,h=Math.min(i.row,e.length),f=t||0;f<h;++f)l+=e[f].length+n;return l+i.column},o.prototype.$split=function(i){return i.split(/\r\n|\r|\n/)},o})();r.prototype.$autoNewLine="",r.prototype.$newLineMode="auto",x.implement(r.prototype,w),c.Document=r});ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(y,c,E){"use strict";var x=y("./lib/oop"),$=y("./lib/event_emitter").EventEmitter,w=(function(){function s(a,r){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=a;var o=this;this.$worker=function(){if(o.running){for(var i=new Date,t=o.currentLine,e=-1,n=o.doc,l=t;o.lines[t];)t++;var h=n.getLength(),f=0;for(o.running=!1;t<h;){o.$tokenizeRow(t),e=t;do t++;while(o.lines[t]);if(f++,f%5===0&&new Date-i>20){o.running=setTimeout(o.$worker,20);break}}o.currentLine=t,e==-1&&(e=t),l<=e&&o.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,r){var o={first:a,last:r};this._signal("update",{data:o})},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 r=a.start.row,o=a.end.row-r;if(o===0)this.lines[r]=null;else if(a.action=="remove")this.lines.splice(r,o+1,null),this.states.splice(r,o+1,null);else{var i=Array(o+1);i.unshift(r,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(r,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 r=this.doc.getLine(a),o=this.states[a-1],i=this.tokenizer.getLineTokens(r,o,a);return this.states[a]+""!=i.state+""?(this.states[a]=i.state,this.lines[a+1]=null,this.currentLine>a+1&&(this.currentLine=a+1)):this.currentLine==a&&(this.currentLine=a+1),this.lines[a]=i.tokens},s.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},s})();x.implement(w.prototype,$),c.BackgroundTokenizer=w});ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(y,c,E){"use strict";var x=y("./lib/lang"),$=y("./range").Range,w=(function(){function s(a,r,o){o===void 0&&(o="text"),this.setRegexp(a),this.clazz=r,this.type=o,this.docLen=0}return s.prototype.setRegexp=function(a){this.regExp+""!=a+""&&(this.regExp=a,this.cache=[])},s.prototype.update=function(a,r,o,i){if(this.regExp){for(var t=i.firstRow,e=i.lastRow,n={},l=o.$editor&&o.$editor.$search,h=l&&l.$isMultilineSearch(o.$editor.getLastSearchOptions()),f=t;f<=e;f++){var p=this.cache[f];if(p==null||o.getValue().length!=this.docLen){if(h){p=[];var m=l.$multiLineForward(o,this.regExp,f,e);if(m){var S=m.endRow<=e?m.endRow-1:e;S>f&&(f=S),p.push(new $(m.startRow,m.startCol,m.endRow,m.endCol))}p.length>this.MAX_RANGES&&(p=p.slice(0,this.MAX_RANGES))}else p=x.getMatchOffsets(o.getLine(f),this.regExp),p.length>this.MAX_RANGES&&(p=p.slice(0,this.MAX_RANGES)),p=p.map(function(k){return new $(f,k.offset,f,k.offset+k.length)});this.cache[f]=p.length?p:""}if(p.length!==0)for(var C=p.length;C--;){var g=p[C].toScreenRange(o),M=g.toString();n[M]||(n[M]=!0,r.drawSingleLineMarker(a,g,this.clazz,i))}}this.docLen=o.getValue().length}},s})();w.prototype.MAX_RANGES=500,c.SearchHighlight=w});ace.define("ace/undomanager",["require","exports","module","ace/range"],function(y,c,E){"use strict";var x=(function(){function g(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return g.prototype.addSession=function(M){this.$session=M},g.prototype.add=function(M,k,_){if(!this.$fromUndo&&M!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),k===!1||!this.lastDeltas){this.lastDeltas=[];var R=this.$undoStack.length;R>this.$undoDepth-1&&this.$undoStack.splice(0,R-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),M.id=this.$rev=++this.$maxRev}(M.action=="remove"||M.action=="insert")&&(this.$lastDelta=M),this.lastDeltas.push(M)}},g.prototype.addSelection=function(M,k){this.selections.push({value:M,rev:k||this.$rev})},g.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},g.prototype.markIgnored=function(M,k){k==null&&(k=this.$rev+1);for(var _=this.$undoStack,R=_.length;R--;){var b=_[R][0];if(b.id<=M)break;b.id<k&&(b.ignore=!0)}this.lastDeltas=null},g.prototype.getSelection=function(M,k){for(var _=this.selections,R=_.length;R--;){var b=_[R];if(b.rev<M)return k&&(b=_[R+1]),b}},g.prototype.getRevision=function(){return this.$rev},g.prototype.getDeltas=function(M,k){k==null&&(k=this.$rev+1);for(var _=this.$undoStack,R=null,b=0,v=_.length;v--;){var d=_[v][0];if(d.id<k&&!R&&(R=v+1),d.id<=M){b=v+1;break}}return _.slice(b,R)},g.prototype.getChangedRanges=function(M,k){k==null&&(k=this.$rev+1)},g.prototype.getChangedLines=function(M,k){k==null&&(k=this.$rev+1)},g.prototype.undo=function(M,k){this.lastDeltas=null;var _=this.$undoStack;if($(_,_.length)){M||(M=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var R=_.pop(),b=null;return R&&(b=M.undoChanges(R,k),this.$redoStack.push(R),this.$syncRev()),this.$fromUndo=!1,b}},g.prototype.redo=function(M,k){if(this.lastDeltas=null,M||(M=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var _=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);C(this.$redoStack,_),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(v){v[0].id=++this.$maxRev},this)}var R=this.$redoStack.pop(),b=null;return R&&(b=M.redoChanges(R,k),this.$undoStack.push(R),this.$syncRev()),this.$fromUndo=!1,b},g.prototype.$syncRev=function(){var M=this.$undoStack,k=M[M.length-1],_=k&&k[0].id||0;this.$redoStackBaseRev=_,this.$rev=_},g.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},g.prototype.canUndo=function(){return this.$undoStack.length>0},g.prototype.canRedo=function(){return this.$redoStack.length>0},g.prototype.bookmark=function(M){M==null&&(M=this.$rev),this.mark=M},g.prototype.isAtBookmark=function(){return this.$rev===this.mark},g.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},g.prototype.fromJSON=function(M){this.reset(),this.$undoStack=M.$undoStack,this.$redoStack=M.$redoStack},g.prototype.$prettyPrint=function(M){return M?t(M):t(this.$undoStack)+`
---
`+t(this.$redoStack)},g})();x.prototype.hasUndo=x.prototype.canUndo,x.prototype.hasRedo=x.prototype.canRedo,x.prototype.isClean=x.prototype.isAtBookmark,x.prototype.markClean=x.prototype.bookmark;function $(g,M){for(var k=M;k--;){var _=g[k];if(_&&!_[0].ignore){for(;k<M-1;){var R=l(g[k],g[k+1]);g[k]=R[0],g[k+1]=R[1],k++}return!0}}}var w=y("./range").Range,s=w.comparePoints,a=w.comparePoints;function r(g){var M=g.action=="insert",k=g.start,_=g.end,R=(_.row-k.row)*(M?1:-1),b=(_.column-k.column)*(M?1:-1);M&&(_=k);for(var v in this.marks){var d=this.marks[v],u=a(d,k);if(!(u<0)){if(u===0&&M)if(d.bias==1)u=1;else{d.bias==-1;continue}var A=M?u:a(d,_);if(A>0){d.row+=R,d.column+=d.row==_.row?b:0;continue}!M&&A<=0&&(d.row=k.row,d.column=k.column,A===0&&(d.bias=1))}}}function o(g){return{row:g.row,column:g.column}}function i(g){return{start:o(g.start),end:o(g.end),action:g.action,lines:g.lines.slice()}}function t(g){if(g=g||this,Array.isArray(g))return g.map(t).join(`
`);var M="";return g.action?(M=g.action=="insert"?"+":"-",M+="["+g.lines+"]"):g.value&&(Array.isArray(g.value)?M=g.value.map(e).join(`
`):M=e(g.value)),g.start&&(M+=e(g)),(g.id||g.rev)&&(M+="	("+(g.id||g.rev)+")"),M}function e(g){return g.start.row+":"+g.start.column+"=>"+g.end.row+":"+g.end.column}function n(g,M){var k=g.action=="insert",_=M.action=="insert";if(k&&_)if(s(M.start,g.end)>=0)f(M,g,-1);else if(s(M.start,g.start)<=0)f(g,M,1);else return null;else if(k&&!_)if(s(M.start,g.end)>=0)f(M,g,-1);else if(s(M.end,g.start)<=0)f(g,M,-1);else return null;else if(!k&&_)if(s(M.start,g.start)>=0)f(M,g,1);else if(s(M.start,g.start)<=0)f(g,M,1);else return null;else if(!k&&!_)if(s(M.start,g.start)>=0)f(M,g,1);else if(s(M.end,g.start)<=0)f(g,M,-1);else return null;return[M,g]}function l(g,M){for(var k=g.length;k--;)for(var _=0;_<M.length;_++)if(!n(g[k],M[_])){for(;k<g.length;){for(;_--;)n(M[_],g[k]);_=M.length,k++}return[g,M]}return g.selectionBefore=M.selectionBefore=g.selectionAfter=M.selectionAfter=null,[M,g]}function h(g,M){var k=g.action=="insert",_=M.action=="insert";if(k&&_)s(g.start,M.start)<0?f(M,g,1):f(g,M,1);else if(k&&!_)s(g.start,M.end)>=0?f(g,M,-1):(s(g.start,M.start)<=0||f(g,w.fromPoints(M.start,g.start),-1),f(M,g,1));else if(!k&&_)s(M.start,g.end)>=0?f(M,g,-1):(s(M.start,g.start)<=0||f(M,w.fromPoints(g.start,M.start),-1),f(g,M,1));else if(!k&&!_)if(s(M.start,g.end)>=0)f(M,g,-1);else if(s(M.end,g.start)<=0)f(g,M,-1);else{var R,b;return s(g.start,M.start)<0&&(R=g,g=m(g,M.start)),s(g.end,M.end)>0&&(b=m(g,M.end)),p(M.end,g.start,g.end,-1),b&&!R&&(g.lines=b.lines,g.start=b.start,g.end=b.end,b=g),[M,R,b].filter(Boolean)}return[M,g]}function f(g,M,k){p(g.start,M.start,M.end,k),p(g.end,M.start,M.end,k)}function p(g,M,k,_){g.row==(_==1?M:k).row&&(g.column+=_*(k.column-M.column)),g.row+=_*(k.row-M.row)}function m(g,M){var k=g.lines,_=g.end;g.end=o(M);var R=g.end.row-g.start.row,b=k.splice(R,k.length),v=R?M.column:M.column-g.start.column;k.push(b[0].substring(0,v)),b[0]=b[0].substr(v);var d={start:o(M),end:_,lines:b,action:g.action};return d}function S(g,M){M=i(M);for(var k=g.length;k--;){for(var _=g[k],R=0;R<_.length;R++){var b=_[R],v=h(b,M);M=v[0],v.length!=2&&(v[2]?(_.splice(R+1,1,v[1],v[2]),R++):v[1]||(_.splice(R,1),R--))}_.length||g.splice(k,1)}return g}function C(g,M){for(var k=0;k<M.length;k++)for(var _=M[k],R=0;R<_.length;R++)S(g,_[R])}c.UndoManager=x});ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(y,c,E){"use strict";var x=y("../range").Range,$=(function(){function w(s,a){this.foldData=s,Array.isArray(a)?this.folds=a:a=this.folds=[a];var r=a[a.length-1];this.range=new x(a[0].start.row,a[0].start.column,r.end.row,r.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(o){o.setFoldLine(this)},this)}return w.prototype.shiftRow=function(s){this.start.row+=s,this.end.row+=s,this.folds.forEach(function(a){a.start.row+=s,a.end.row+=s})},w.prototype.addFold=function(s){if(s.sameRow){if(s.start.row<this.startRow||s.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(s),this.folds.sort(function(a,r){return-a.range.compareEnd(r.start.row,r.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},w.prototype.containsRow=function(s){return s>=this.start.row&&s<=this.end.row},w.prototype.walk=function(s,a,r){var o=0,i=this.folds,t,e,n,l=!0;a==null&&(a=this.end.row,r=this.end.column);for(var h=0;h<i.length;h++){if(t=i[h],e=t.range.compareStart(a,r),e==-1){s(null,a,r,o,l);return}if(n=s(null,t.start.row,t.start.column,o,l),n=!n&&s(t.placeholder,t.start.row,t.start.column,o),n||e===0)return;l=!t.sameRow,o=t.end.column}s(null,a,r,o,l)},w.prototype.getNextFoldTo=function(s,a){for(var r,o,i=0;i<this.folds.length;i++){if(r=this.folds[i],o=r.range.compareEnd(s,a),o==-1)return{fold:r,kind:"after"};if(o===0)return{fold:r,kind:"inside"}}return null},w.prototype.addRemoveChars=function(s,a,r){var o=this.getNextFoldTo(s,a),i,t;if(o){if(i=o.fold,o.kind=="inside"&&i.start.column!=a&&i.start.row!=s)window.console&&window.console.log(s,a,i);else if(i.start.row==s){t=this.folds;var e=t.indexOf(i);for(e===0&&(this.start.column+=r),e;e<t.length;e++){if(i=t[e],i.start.column+=r,!i.sameRow)return;i.end.column+=r}this.end.column+=r}}},w.prototype.split=function(s,a){var r=this.getNextFoldTo(s,a);if(!r||r.kind=="inside")return null;var o=r.fold,i=this.folds,t=this.foldData,e=i.indexOf(o),n=i[e-1];this.end.row=n.end.row,this.end.column=n.end.column,i=i.splice(e,i.length-e);var l=new w(t,i);return t.splice(t.indexOf(this)+1,0,l),l},w.prototype.merge=function(s){for(var a=s.folds,r=0;r<a.length;r++)this.addFold(a[r]);var o=this.foldData;o.splice(o.indexOf(s),1)},w.prototype.toString=function(){var s=[this.range.toString()+": ["];return this.folds.forEach(function(a){s.push("  "+a.toString())}),s.push("]"),s.join(`
`)},w.prototype.idxToPosition=function(s){for(var a=0,r=0;r<this.folds.length;r++){var o=this.folds[r];if(s-=o.start.column-a,s<0)return{row:o.start.row,column:o.start.column+s};if(s-=o.placeholder.length,s<0)return o.start;a=o.end.column}return{row:this.end.row,column:this.end.column+s}},w})();c.FoldLine=$});ace.define("ace/range_list",["require","exports","module","ace/range"],function(y,c,E){"use strict";var x=y("./range").Range,$=x.comparePoints,w=(function(){function s(){this.ranges=[],this.$bias=1}return s.prototype.pointIndex=function(a,r,o){for(var i=this.ranges,t=o||0;t<i.length;t++){var e=i[t],n=$(a,e.end);if(!(n>0)){var l=$(a,e.start);return n===0?r&&l!==0?-t-2:t:l>0||l===0&&!r?t:-t-1}}return-t-1},s.prototype.add=function(a){var r=!a.isEmpty(),o=this.pointIndex(a.start,r);o<0&&(o=-o-1);var i=this.pointIndex(a.end,r,o);return i<0?i=-i-1:i++,this.ranges.splice(o,i-o,a)},s.prototype.addList=function(a){for(var r=[],o=a.length;o--;)r.push.apply(r,this.add(a[o]));return r},s.prototype.substractPoint=function(a){var r=this.pointIndex(a);if(r>=0)return this.ranges.splice(r,1)},s.prototype.merge=function(){var a=[],r=this.ranges;r=r.sort(function(n,l){return $(n.start,l.start)});for(var o=r[0],i,t=1;t<r.length;t++){i=o,o=r[t];var e=$(i.end,o.start);e<0||e==0&&!i.isEmpty()&&!o.isEmpty()||($(i.end,o.end)<0&&(i.end.row=o.end.row,i.end.column=o.end.column),r.splice(t,1),a.push(o),o=i,t--)}return this.ranges=r,a},s.prototype.contains=function(a,r){return this.pointIndex({row:a,column:r})>=0},s.prototype.containsPoint=function(a){return this.pointIndex(a)>=0},s.prototype.rangeAtPoint=function(a){var r=this.pointIndex(a);if(r>=0)return this.ranges[r]},s.prototype.clipRows=function(a,r){var o=this.ranges;if(o[0].start.row>r||o[o.length-1].start.row<a)return[];var i=this.pointIndex({row:a,column:0});i<0&&(i=-i-1);var t=this.pointIndex({row:r,column:0},i);t<0&&(t=-t-1);for(var e=[],n=i;n<t;n++)e.push(o[n]);return e},s.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},s.prototype.attach=function(a){this.session&&this.detach(),this.session=a,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},s.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},s.prototype.$onChange=function(a){for(var r=a.start,o=a.end,i=r.row,t=o.row,e=this.ranges,n=0,l=e.length;n<l;n++){var h=e[n];if(h.end.row>=i)break}if(a.action=="insert")for(var f=t-i,p=-r.column+o.column;n<l;n++){var h=e[n];if(h.start.row>i)break;if(h.start.row==i&&h.start.column>=r.column&&(h.start.column==r.column&&this.$bias<=0||(h.start.column+=p,h.start.row+=f)),h.end.row==i&&h.end.column>=r.column){if(h.end.column==r.column&&this.$bias<0)continue;h.end.column==r.column&&p>0&&n<l-1&&h.end.column>h.start.column&&h.end.column==e[n+1].start.column&&(h.end.column-=p),h.end.column+=p,h.end.row+=f}}else for(var f=i-t,p=r.column-o.column;n<l;n++){var h=e[n];if(h.start.row>t)break;h.end.row<t&&(i<h.end.row||i==h.end.row&&r.column<h.end.column)?(h.end.row=i,h.end.column=r.column):h.end.row==t?h.end.column<=o.column?(f||h.end.column>r.column)&&(h.end.column=r.column,h.end.row=r.row):(h.end.column+=p,h.end.row+=f):h.end.row>t&&(h.end.row+=f),h.start.row<t&&(i<h.start.row||i==h.start.row&&r.column<h.start.column)?(h.start.row=i,h.start.column=r.column):h.start.row==t?h.start.column<=o.column?(f||h.start.column>r.column)&&(h.start.column=r.column,h.start.row=r.row):(h.start.column+=p,h.start.row+=f):h.start.row>t&&(h.start.row+=f)}if(f!=0&&n<l)for(;n<l;n++){var h=e[n];h.start.row+=f,h.end.row+=f}},s})();w.prototype.comparePoints=$,c.RangeList=w});ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(y,c,E){"use strict";var x=this&&this.__extends||(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,l){n.__proto__=l}||function(n,l){for(var h in l)Object.prototype.hasOwnProperty.call(l,h)&&(n[h]=l[h])},i(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");i(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}})(),$=y("../range_list").RangeList,w=(function(i){x(t,i);function t(e,n){var l=i.call(this)||this;return l.foldLine=null,l.placeholder=n,l.range=e,l.start=e.start,l.end=e.end,l.sameRow=e.start.row==e.end.row,l.subFolds=l.ranges=[],l}return t.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},t.prototype.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(n){n.setFoldLine(e)})},t.prototype.clone=function(){var e=this.range.clone(),n=new t(e,this.placeholder);return this.subFolds.forEach(function(l){n.subFolds.push(l.clone())}),n.collapseChildren=this.collapseChildren,n},t.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){a(e,this.start);for(var p=e.start.row,m=e.start.column,n=0,l=-1;n<this.subFolds.length&&(l=this.subFolds[n].range.compare(p,m),l==1);n++);var h=this.subFolds[n],f=0;if(l==0){if(h.range.containsRange(e))return h.addSubFold(e);f=1}for(var p=e.range.end.row,m=e.range.end.column,S=n,l=-1;S<this.subFolds.length&&(l=this.subFolds[S].range.compare(p,m),l==1);S++);l==0&&S++;for(var C=this.subFolds.splice(n,S-n,e),g=l==0?C.length-1:C.length,M=f;M<g;M++)e.addSubFold(C[M]);return e.setFoldLine(this.foldLine),e}},t.prototype.restoreRange=function(e){return o(e,this.start)},t})($);function s(i,t){i.row-=t.row,i.row==0&&(i.column-=t.column)}function a(i,t){s(i.start,t),s(i.end,t)}function r(i,t){i.row==0&&(i.column+=t.column),i.row+=t.row}function o(i,t){r(i.start,t),r(i.end,t)}c.Fold=w});ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(y,c,E){"use strict";var x=y("../range").Range,$=y("./fold_line").FoldLine,w=y("./fold").Fold,s=y("../token_iterator").TokenIterator,a=y("../mouse/mouse_event").MouseEvent;function r(){this.getFoldAt=function(o,i,t){var e=this.getFoldLine(o);if(!e)return null;for(var n=e.folds,l=0;l<n.length;l++){var h=n[l].range;if(h.contains(o,i)){if(t==1&&h.isEnd(o,i)&&!h.isEmpty())continue;if(t==-1&&h.isStart(o,i)&&!h.isEmpty())continue;return n[l]}}},this.getFoldsInRange=function(o){var i=o.start,t=o.end,e=this.$foldData,n=[];i.column+=1,t.column-=1;for(var l=0;l<e.length;l++){var h=e[l].range.compareRange(o);if(h!=2){if(h==-2)break;for(var f=e[l].folds,p=0;p<f.length;p++){var m=f[p];if(h=m.range.compareRange(o),h==-2)break;if(h==2)continue;if(h==42)break;n.push(m)}}}return i.column-=1,t.column+=1,n},this.getFoldsInRangeList=function(o){if(Array.isArray(o)){var i=[];o.forEach(function(t){i=i.concat(this.getFoldsInRange(t))},this)}else var i=this.getFoldsInRange(o);return i},this.getAllFolds=function(){for(var o=[],i=this.$foldData,t=0;t<i.length;t++)for(var e=0;e<i[t].folds.length;e++)o.push(i[t].folds[e]);return o},this.getFoldStringAt=function(o,i,t,e){if(e=e||this.getFoldLine(o),!e)return null;for(var n={end:{column:0}},l,h,f=0;f<e.folds.length;f++){h=e.folds[f];var p=h.range.compareEnd(o,i);if(p==-1){l=this.getLine(h.start.row).substring(n.end.column,h.start.column);break}else if(p===0)return null;n=h}return l||(l=this.getLine(h.start.row).substring(n.end.column)),t==-1?l.substring(0,i-n.end.column):t==1?l.substring(i-n.end.column):l},this.getFoldLine=function(o,i){var t=this.$foldData,e=0;for(i&&(e=t.indexOf(i)),e==-1&&(e=0),e;e<t.length;e++){var n=t[e];if(n.start.row<=o&&n.end.row>=o)return n;if(n.end.row>o)return null}return null},this.getNextFoldLine=function(o,i){var t=this.$foldData,e=0;for(i&&(e=t.indexOf(i)),e==-1&&(e=0),e;e<t.length;e++){var n=t[e];if(n.end.row>=o)return n}return null},this.getFoldedRowCount=function(o,i){for(var t=this.$foldData,e=i-o+1,n=0;n<t.length;n++){var l=t[n],h=l.end.row,f=l.start.row;if(h>=i){f<i&&(f>=o?e-=i-f:e=0);break}else h>=o&&(f>=o?e-=h-f:e-=h-o+1)}return e},this.$addFoldLine=function(o){return this.$foldData.push(o),this.$foldData.sort(function(i,t){return i.start.row-t.start.row}),o},this.addFold=function(o,i){var t=this.$foldData,e=!1,n;o instanceof w?n=o:(n=new w(i,o),n.collapseChildren=i.collapseChildren),this.$clipRangeToDocument(n.range);var l=n.start.row,h=n.start.column,f=n.end.row,p=n.end.column,m=this.getFoldAt(l,h,1),S=this.getFoldAt(f,p,-1);if(m&&S==m)return m.addSubFold(n);m&&!m.range.isStart(l,h)&&this.removeFold(m),S&&!S.range.isEnd(f,p)&&this.removeFold(S);var C=this.getFoldsInRange(n.range);C.length>0&&(this.removeFolds(C),n.collapseChildren||C.forEach(function(_){n.addSubFold(_)}));for(var g=0;g<t.length;g++){var M=t[g];if(f==M.start.row){M.addFold(n),e=!0;break}else if(l==M.end.row){if(M.addFold(n),e=!0,!n.sameRow){var k=t[g+1];if(k&&k.start.row==f){M.merge(k);break}}break}else if(f<=M.start.row)break}return e||(M=this.$addFoldLine(new $(this.$foldData,n))),this.$useWrapMode?this.$updateWrapData(M.start.row,M.start.row):this.$updateRowLengthCache(M.start.row,M.start.row),this.$modified=!0,this._signal("changeFold",{data:n,action:"add"}),n},this.addFolds=function(o){o.forEach(function(i){this.addFold(i)},this)},this.removeFold=function(o){var i=o.foldLine,t=i.start.row,e=i.end.row,n=this.$foldData,l=i.folds;if(l.length==1)n.splice(n.indexOf(i),1);else if(i.range.isEnd(o.end.row,o.end.column))l.pop(),i.end.row=l[l.length-1].end.row,i.end.column=l[l.length-1].end.column;else if(i.range.isStart(o.start.row,o.start.column))l.shift(),i.start.row=l[0].start.row,i.start.column=l[0].start.column;else if(o.sameRow)l.splice(l.indexOf(o),1);else{var h=i.split(o.start.row,o.start.column);l=h.folds,l.shift(),h.start.row=l[0].start.row,h.start.column=l[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(t,e):this.$updateRowLengthCache(t,e)),this.$modified=!0,this._signal("changeFold",{data:o,action:"remove"})},this.removeFolds=function(o){for(var i=[],t=0;t<o.length;t++)i.push(o[t]);i.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(o){this.removeFold(o),o.subFolds.forEach(function(i){o.restoreRange(i),this.addFold(i)},this),o.collapseChildren>0&&this.foldAll(o.start.row+1,o.end.row,o.collapseChildren-1),o.subFolds=[]},this.expandFolds=function(o){o.forEach(function(i){this.expandFold(i)},this)},this.unfold=function(o,i){var t,e;if(o==null)t=new x(0,0,this.getLength(),0),i==null&&(i=!0);else if(typeof o=="number")t=new x(o,0,o,this.getLine(o).length);else if("row"in o)t=x.fromPoints(o,o);else{if(Array.isArray(o))return e=[],o.forEach(function(l){e=e.concat(this.unfold(l))},this),e;t=o}e=this.getFoldsInRangeList(t);for(var n=e;e.length==1&&x.comparePoints(e[0].start,t.start)<0&&x.comparePoints(e[0].end,t.end)>0;)this.expandFolds(e),e=this.getFoldsInRangeList(t);if(i!=!1?this.removeFolds(e):this.expandFolds(e),n.length)return n},this.isRowFolded=function(o,i){return!!this.getFoldLine(o,i)},this.getRowFoldEnd=function(o,i){var t=this.getFoldLine(o,i);return t?t.end.row:o},this.getRowFoldStart=function(o,i){var t=this.getFoldLine(o,i);return t?t.start.row:o},this.getFoldDisplayLine=function(o,i,t,e,n){e==null&&(e=o.start.row),n==null&&(n=0),i==null&&(i=o.end.row),t==null&&(t=this.getLine(i).length);var l=this.doc,h="";return o.walk(function(f,p,m,S){if(!(p<e)){if(p==e){if(m<n)return;S=Math.max(n,S)}f!=null?h+=f:h+=l.getLine(p).substring(S,m)}},i,t),h},this.getDisplayLine=function(o,i,t,e){var n=this.getFoldLine(o);if(n)return this.getFoldDisplayLine(n,o,i,t,e);var l;return l=this.doc.getLine(o),l.substring(e||0,i||l.length)},this.$cloneFoldData=function(){var o=[];return o=this.$foldData.map(function(i){var t=i.folds.map(function(e){return e.clone()});return new $(o,t)}),o},this.toggleFold=function(o){var i=this.selection,t=i.getRange(),e,n;if(t.isEmpty()){var l=t.start;if(e=this.getFoldAt(l.row,l.column),e){this.expandFold(e);return}else if(o){var h=this.getFoldLine(l.row);h&&this.expandFolds(h.folds);return}else(n=this.findMatchingBracket(l))?t.comparePoint(n)==1?t.end=n:(t.start=n,t.start.column++,t.end.column--):(n=this.findMatchingBracket({row:l.row,column:l.column+1}))?(t.comparePoint(n)==1?t.end=n:t.start=n,t.start.column++):t=this.getCommentFoldRange(l.row,l.column)||t}else{var f=this.getFoldsInRange(t);if(o&&f.length){this.expandFolds(f);return}else f.length==1&&(e=f[0])}if(e||(e=this.getFoldAt(t.start.row,t.start.column)),e&&e.range.toString()==t.toString()){this.expandFold(e);return}var p="...";if(!t.isMultiLine()){if(p=this.getTextRange(t),p.length<4)return;p=p.trim().substring(0,2)+".."}this.addFold(p,t)},this.getCommentFoldRange=function(o,i,t){var e=new s(this,o,i),n=e.getCurrentToken(),l=n&&n.type;if(n&&/^comment|string/.test(l)){l=l.match(/comment|string/)[0],l=="comment"&&(l+="|doc-start|\\.doc");var h=new RegExp(l),f=new x;if(t!=1){do n=e.stepBackward();while(n&&h.test(n.type));n=e.stepForward()}f.start.row=e.getCurrentTokenRow(),f.start.column=e.getCurrentTokenColumn()+n.value.length,e=new s(this,o,i);var p=this.getState(e.$row);if(t!=-1){var m=-1;do if(n=e.stepForward(),m==-1){var S=this.getState(e.$row);p.toString()!==S.toString()&&(m=e.$row)}else if(e.$row>m)break;while(n&&h.test(n.type));n=e.stepBackward()}else n=e.getCurrentToken();return f.end.row=e.getCurrentTokenRow(),f.end.column=e.getCurrentTokenColumn(),f.start.row==f.end.row&&f.start.column>f.end.column?void 0:f}},this.foldAll=function(o,i,t,e){t==null&&(t=1e5);var n=this.foldWidgets;if(n){i=i||this.getLength(),o=o||0;for(var l=o;l<i;l++)if(n[l]==null&&(n[l]=this.getFoldWidget(l)),n[l]=="start"&&!(e&&!e(l))){var h=this.getFoldWidgetRange(l);h&&h.isMultiLine()&&h.end.row<=i&&h.start.row>=o&&(l=h.end.row,h.collapseChildren=t,this.addFold("...",h))}}},this.foldToLevel=function(o){for(this.foldAll();o-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var o=this;this.foldAll(null,null,null,function(i){for(var t=o.getTokens(i),e=0;e<t.length;e++){var n=t[e];if(!(n.type=="text"&&/^\s+$/.test(n.value)))return!!/comment/.test(n.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(o){if(!this.$foldStyles[o])throw new Error("invalid fold style: "+o+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=o){this.$foldStyle=o,o=="manual"&&this.unfold();var i=this.$foldMode;this.$setFolding(null),this.$setFolding(i)}},this.$setFolding=function(o){if(this.$foldMode!=o){if(this.$foldMode=o,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!o||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=o.getFoldWidget.bind(o,this,this.$foldStyle),this.getFoldWidgetRange=o.getFoldWidgetRange.bind(o,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(o,i){var t=this.foldWidgets;if(!t||i&&t[o])return{};for(var e=o-1,n;e>=0;){var l=t[e];if(l==null&&(l=t[e]=this.getFoldWidget(e)),l=="start"){var h=this.getFoldWidgetRange(e);if(n||(n=h),h&&h.end.row>=o)break}e--}return{range:e!==-1&&h,firstRange:n}},this.onFoldWidgetClick=function(o,i){i instanceof a&&(i=i.domEvent);var t={children:i.shiftKey,all:i.ctrlKey||i.metaKey,siblings:i.altKey},e=this.$toggleFoldWidget(o,t);if(!e){var n=i.target||i.srcElement;n&&/ace_fold-widget/.test(n.className)&&(n.className+=" ace_invalid")}},this.$toggleFoldWidget=function(o,i){if(this.getFoldWidget){var t=this.getFoldWidget(o),e=this.getLine(o),n=t==="end"?-1:1,l=this.getFoldAt(o,n===-1?0:e.length,n);if(l)return i.children||i.all?this.removeFold(l):this.expandFold(l),l;var h=this.getFoldWidgetRange(o,!0);if(h&&!h.isMultiLine()&&(l=this.getFoldAt(h.start.row,h.start.column,1),l&&h.isEqual(l.range)))return this.removeFold(l),l;if(i.siblings){var f=this.getParentFoldRangeData(o);if(f.range)var p=f.range.start.row+1,m=f.range.end.row;this.foldAll(p,m,i.all?1e4:0)}else i.children?(m=h?h.end.row:this.getLength(),this.foldAll(o+1,m,i.all?1e4:0)):h&&(i.all&&(h.collapseChildren=1e4),this.addFold("...",h));return h}},this.toggleFoldWidget=function(o){var i=this.selection.getCursor().row;i=this.getRowFoldStart(i);var t=this.$toggleFoldWidget(i,{});if(!t){var e=this.getParentFoldRangeData(i,!0);if(t=e.range||e.firstRange,t){i=t.start.row;var n=this.getFoldAt(i,this.getLine(i).length,1);n?this.removeFold(n):this.addFold("...",t)}}},this.updateFoldWidgets=function(o){var i=o.start.row,t=o.end.row-i;if(t===0)this.foldWidgets[i]=null;else if(o.action=="remove")this.foldWidgets.splice(i,t+1,null);else{var e=Array(t+1);e.unshift(i,1),this.foldWidgets.splice.apply(this.foldWidgets,e)}},this.tokenizerUpdateFoldWidgets=function(o){var i=o.data;i.first!=i.last&&this.foldWidgets.length>i.first&&this.foldWidgets.splice(i.first,this.foldWidgets.length)}}c.Folding=r});ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(y,c,E){"use strict";var x=y("../token_iterator").TokenIterator,$=y("../range").Range;function w(){this.findMatchingBracket=function(s,a){if(s.column==0)return null;var r=a||this.getLine(s.row).charAt(s.column-1);if(r=="")return null;var o=r.match(/([\(\[\{])|([\)\]\}])/);return o?o[1]?this.$findClosingBracket(o[1],s):this.$findOpeningBracket(o[2],s):null},this.getBracketRange=function(s){var a=this.getLine(s.row),r=!0,o,i=a.charAt(s.column-1),t=i&&i.match(/([\(\[\{])|([\)\]\}])/);if(t||(i=a.charAt(s.column),s={row:s.row,column:s.column+1},t=i&&i.match(/([\(\[\{])|([\)\]\}])/),r=!1),!t)return null;if(t[1]){var e=this.$findClosingBracket(t[1],s);if(!e)return null;o=$.fromPoints(s,e),r||(o.end.column++,o.start.column--),o.cursor=o.end}else{var e=this.$findOpeningBracket(t[2],s);if(!e)return null;o=$.fromPoints(e,s),r||(o.start.column++,o.end.column--),o.cursor=o.start}return o},this.getMatchingBracketRanges=function(s,a){var r=this.getLine(s.row),o=/([\(\[\{])|([\)\]\}])/,i=!a&&r.charAt(s.column-1),t=i&&i.match(o);if(t||(i=(a===void 0||a)&&r.charAt(s.column),s={row:s.row,column:s.column+1},t=i&&i.match(o)),!t)return null;var e=new $(s.row,s.column-1,s.row,s.column),n=t[1]?this.$findClosingBracket(t[1],s):this.$findOpeningBracket(t[2],s);if(!n)return[e];var l=new $(n.row,n.column,n.row,n.column+1);return[e,l]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(s,a,r){var o=this.$brackets[s],i=1,t=new x(this,a.row,a.column),e=t.getCurrentToken();if(e||(e=t.stepForward()),!!e){r||(r=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var n=a.column-t.getCurrentTokenColumn()-2,l=e.value;;){for(;n>=0;){var h=l.charAt(n);if(h==o){if(i-=1,i==0)return{row:t.getCurrentTokenRow(),column:n+t.getCurrentTokenColumn()}}else h==s&&(i+=1);n-=1}do e=t.stepBackward();while(e&&!r.test(e.type));if(e==null)break;l=e.value,n=l.length-1}return null}},this.$findClosingBracket=function(s,a,r){var o=this.$brackets[s],i=1,t=new x(this,a.row,a.column),e=t.getCurrentToken();if(e||(e=t.stepForward()),!!e){r||(r=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var n=a.column-t.getCurrentTokenColumn();;){for(var l=e.value,h=l.length;n<h;){var f=l.charAt(n);if(f==o){if(i-=1,i==0)return{row:t.getCurrentTokenRow(),column:n+t.getCurrentTokenColumn()}}else f==s&&(i+=1);n+=1}do e=t.stepForward();while(e&&!r.test(e.type));if(e==null)break;n=0}return null}},this.getMatchingTags=function(s){var a=new x(this,s.row,s.column),r=this.$findTagName(a);if(r){var o=a.stepBackward();return o.value==="<"?this.$findClosingTag(a,r):this.$findOpeningTag(a,r)}},this.$findTagName=function(s){var a=s.getCurrentToken(),r=!1,o=!1;if(a&&a.type.indexOf("tag-name")===-1)do o?a=s.stepBackward():a=s.stepForward(),a&&(a.value==="/>"?o=!0:a.type.indexOf("tag-name")!==-1&&(r=!0));while(a&&!r);return a},this.$findClosingTag=function(s,a){var r,o=a.value,i=a.value,t=0,e=new $(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);a=s.stepForward();var n=new $(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+a.value.length),l=!1;do{if(r=a,r.type.indexOf("tag-close")!==-1&&!l){var h=new $(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);l=!0}if(a=s.stepForward(),a){if(a.value===">"&&!l){var h=new $(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);l=!0}if(a.type.indexOf("tag-name")!==-1){if(o=a.value,i===o){if(r.value==="<")t++;else if(r.value==="</"&&(t--,t<0)){s.stepBackward();var f=new $(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+2);a=s.stepForward();var p=new $(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 m=new $(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);else return}}}else if(i===o&&a.value==="/>"&&(t--,t<0))var f=new $(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+2),p=f,m=p,h=new $(n.end.row,n.end.column,n.end.row,n.end.column+1)}}while(a&&t>=0);if(e&&h&&f&&m&&n&&p)return{openTag:new $(e.start.row,e.start.column,h.end.row,h.end.column),closeTag:new $(f.start.row,f.start.column,m.end.row,m.end.column),openTagName:n,closeTagName:p}},this.$findOpeningTag=function(s,a){var r=s.getCurrentToken(),o=a.value,i=0,t=s.getCurrentTokenRow(),e=s.getCurrentTokenColumn(),n=e+2,l=new $(t,e,t,n);s.stepForward();var h=new $(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 f=new $(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);s.stepBackward(),s.stepBackward();do if(a=r,t=s.getCurrentTokenRow(),e=s.getCurrentTokenColumn(),n=e+a.value.length,r=s.stepBackward(),a){if(a.type.indexOf("tag-name")!==-1){if(o===a.value)if(r.value==="<"){if(i++,i>0){var p=new $(t,e,t,n),m=new $(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);do a=s.stepForward();while(a&&a.value!==">");var S=new $(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1)}}else r.value==="</"&&i--}else if(a.value==="/>"){for(var C=0,g=r;g;){if(g.type.indexOf("tag-name")!==-1&&g.value===o){i--;break}else if(g.value==="<")break;g=s.stepBackward(),C++}for(var M=0;M<C;M++)s.stepForward()}}while(r&&i<=0);if(m&&S&&l&&f&&p&&h)return{openTag:new $(m.start.row,m.start.column,S.end.row,S.end.column),closeTag:new $(l.start.row,l.start.column,f.end.row,f.end.column),openTagName:p,closeTagName:h}}}}c.BracketMatch=w});ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/line_widgets","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(y,c,E){"use strict";var x=y("./lib/oop"),$=y("./lib/lang"),w=y("./bidihandler").BidiHandler,s=y("./config"),a=y("./lib/event_emitter").EventEmitter,r=y("./selection").Selection,o=y("./mode/text").Mode,i=y("./range").Range,t=y("./line_widgets").LineWidgets,e=y("./document").Document,n=y("./background_tokenizer").BackgroundTokenizer,l=y("./search_highlight").SearchHighlight,h=y("./undomanager").UndoManager,f=(function(){function b(v,d){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$editor=null,this.prevOp={},this.$foldData=[],this.id="session"+ ++b.$uid,this.$foldData.toString=function(){return this.join(`
`)},this.$gutterCustomWidgets={},this.bgTokenizer=new n(new o().getTokenizer(),this);var u=this;this.bgTokenizer.on("update",function(A){u._signal("tokenizerUpdate",A)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof v!="object"||!v.getLine)&&(v=new e(v)),this.setDocument(v),this.selection=new r(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new w(this),s.resetOptions(this),this.setMode(d),s._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return b.prototype.$initOperationListeners=function(){var v=this;this.curOp=null,this.on("change",function(){v.curOp||(v.startOperation(),v.curOp.selectionBefore=v.$lastSel),v.curOp.docChanged=!0},!0),this.on("changeSelection",function(){v.curOp||(v.startOperation(),v.curOp.selectionBefore=v.$lastSel),v.curOp.selectionChanged=!0},!0),this.$operationResetTimer=$.delayedCall(this.endOperation.bind(this,!0))},b.prototype.startOperation=function(v){if(this.curOp){if(!v||this.curOp.command)return;this.prevOp=this.curOp}v||(v={}),this.$operationResetTimer.schedule(),this.curOp={command:v.command||{},args:v.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",v)},b.prototype.endOperation=function(v){if(this.curOp){if(v&&v.returnValue===!1){this.curOp=null,this._signal("endOperation",v);return}if(v==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var d=this.selection.toJSON();this.curOp.selectionAfter=d,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(d),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",v)}},b.prototype.setDocument=function(v){this.doc&&this.doc.off("change",this.$onChange),this.doc=v,v.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},b.prototype.getDocument=function(){return this.doc},Object.defineProperty(b.prototype,"widgetManager",{get:function(){var v=new t(this);return this.widgetManager=v,this.$editor&&v.attach(this.$editor),v},set:function(v){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:v})},enumerable:!1,configurable:!0}),b.prototype.$resetRowCache=function(v){if(!v){this.$docRowCache=[],this.$screenRowCache=[];return}var d=this.$docRowCache.length,u=this.$getRowCacheIndex(this.$docRowCache,v)+1;d>u&&(this.$docRowCache.splice(u,d),this.$screenRowCache.splice(u,d))},b.prototype.$getRowCacheIndex=function(v,d){for(var u=0,A=v.length-1;u<=A;){var L=u+A>>1,T=v[L];if(d>T)u=L+1;else if(d<T)A=L-1;else return L}return u-1},b.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},b.prototype.onChangeFold=function(v){var d=v.data;this.$resetRowCache(d.start.row)},b.prototype.onChange=function(v){this.$modified=!0,this.$bidiHandler.onChange(v),this.$resetRowCache(v.start.row);var d=this.$updateInternalDataOnChange(v);!this.$fromUndo&&this.$undoManager&&(d&&d.length&&(this.$undoManager.add({action:"removeFolds",folds:d},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(v,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(v),this._signal("change",v)},b.prototype.onSelectionChange=function(){this._signal("changeSelection")},b.prototype.setValue=function(v){this.doc.setValue(v),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},b.fromJSON=function(v){typeof v=="string"&&(v=JSON.parse(v));var d=new h;d.$undoStack=v.history.$undoStack,d.$redoStack=v.history.$redoStack,d.mark=v.history.mark,d.$rev=v.history.rev;var u=new b(v.value);return v.folds.forEach(function(A){u.addFold("...",i.fromPoints(A.start,A.end))}),u.setAnnotations(v.annotations),u.setBreakpoints(v.breakpoints),u.setMode(v.mode),u.setScrollLeft(v.scrollLeft),u.setScrollTop(v.scrollTop),u.setUndoManager(d),u.selection.fromJSON(v.selection),u},b.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(v){return v.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},b.prototype.toString=function(){return this.doc.getValue()},b.prototype.getSelection=function(){return this.selection},b.prototype.getState=function(v){return this.bgTokenizer.getState(v)},b.prototype.getTokens=function(v){return this.bgTokenizer.getTokens(v)},b.prototype.getTokenAt=function(v,d){var u=this.bgTokenizer.getTokens(v),A,L=0;if(d==null){var T=u.length-1;L=this.getLine(v).length}else for(var T=0;T<u.length&&(L+=u[T].value.length,!(L>=d));T++);return A=u[T],A?(A.index=T,A.start=L-A.value.length,A):null},b.prototype.setUndoManager=function(v){if(this.$undoManager=v,this.$informUndoManager&&this.$informUndoManager.cancel(),v){var d=this;v.addSession(this),this.$syncInformUndoManager=function(){d.$informUndoManager.cancel(),d.mergeUndoDeltas=!1},this.$informUndoManager=$.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},b.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},b.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},b.prototype.getTabString=function(){return this.getUseSoftTabs()?$.stringRepeat(" ",this.getTabSize()):"	"},b.prototype.setUseSoftTabs=function(v){this.setOption("useSoftTabs",v)},b.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},b.prototype.setTabSize=function(v){this.setOption("tabSize",v)},b.prototype.getTabSize=function(){return this.$tabSize},b.prototype.isTabStop=function(v){return this.$useSoftTabs&&v.column%this.$tabSize===0},b.prototype.setNavigateWithinSoftTabs=function(v){this.setOption("navigateWithinSoftTabs",v)},b.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},b.prototype.setOverwrite=function(v){this.setOption("overwrite",v)},b.prototype.getOverwrite=function(){return this.$overwrite},b.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},b.prototype.addGutterDecoration=function(v,d){this.$decorations[v]||(this.$decorations[v]=""),this.$decorations[v]+=" "+d,this._signal("changeBreakpoint",{})},b.prototype.removeGutterCustomWidget=function(v){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(v)},b.prototype.addGutterCustomWidget=function(v,d){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(v,d)},b.prototype.removeGutterDecoration=function(v,d){this.$decorations[v]=(this.$decorations[v]||"").replace(" "+d,""),this._signal("changeBreakpoint",{})},b.prototype.getBreakpoints=function(){return this.$breakpoints},b.prototype.setBreakpoints=function(v){this.$breakpoints=[];for(var d=0;d<v.length;d++)this.$breakpoints[v[d]]="ace_breakpoint";this._signal("changeBreakpoint",{})},b.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},b.prototype.setBreakpoint=function(v,d){d===void 0&&(d="ace_breakpoint"),d?this.$breakpoints[v]=d:delete this.$breakpoints[v],this._signal("changeBreakpoint",{})},b.prototype.clearBreakpoint=function(v){delete this.$breakpoints[v],this._signal("changeBreakpoint",{})},b.prototype.addMarker=function(v,d,u,A){var L=this.$markerId++,T={range:v,type:u||"line",renderer:typeof u=="function"?u:null,clazz:d,inFront:!!A,id:L};return A?(this.$frontMarkers[L]=T,this._signal("changeFrontMarker")):(this.$backMarkers[L]=T,this._signal("changeBackMarker")),L},b.prototype.addDynamicMarker=function(v,d){if(v.update){var u=this.$markerId++;return v.id=u,v.inFront=!!d,d?(this.$frontMarkers[u]=v,this._signal("changeFrontMarker")):(this.$backMarkers[u]=v,this._signal("changeBackMarker")),v}},b.prototype.removeMarker=function(v){var d=this.$frontMarkers[v]||this.$backMarkers[v];if(d){var u=d.inFront?this.$frontMarkers:this.$backMarkers;delete u[v],this._signal(d.inFront?"changeFrontMarker":"changeBackMarker")}},b.prototype.getMarkers=function(v){return v?this.$frontMarkers:this.$backMarkers},b.prototype.highlight=function(v){if(!this.$searchHighlight){var d=new l(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(d)}this.$searchHighlight.setRegexp(v)},b.prototype.highlightLines=function(v,d,u,A){typeof d!="number"&&(u=d,d=v),u||(u="ace_step");var L=new i(v,0,d,1/0);return L.id=this.addMarker(L,u,"fullLine",A),L},b.prototype.setAnnotations=function(v){this.$annotations=v,this._signal("changeAnnotation",{})},b.prototype.getAnnotations=function(){return this.$annotations||[]},b.prototype.clearAnnotations=function(){this.setAnnotations([])},b.prototype.$detectNewLine=function(v){var d=v.match(/^.*?(\r?\n)/m);d?this.$autoNewLine=d[1]:this.$autoNewLine=`
`},b.prototype.getWordRange=function(v,d){var u=this.getLine(v),A=!1;if(d>0&&(A=!!u.charAt(d-1).match(this.tokenRe)),A||(A=!!u.charAt(d).match(this.tokenRe)),A)var L=this.tokenRe;else if(/^\s+$/.test(u.slice(d-1,d+1)))var L=/\s/;else var L=this.nonTokenRe;var T=d;if(T>0){do T--;while(T>=0&&u.charAt(T).match(L));T++}for(var I=d;I<u.length&&u.charAt(I).match(L);)I++;return new i(v,T,v,I)},b.prototype.getAWordRange=function(v,d){for(var u=this.getWordRange(v,d),A=this.getLine(u.end.row);A.charAt(u.end.column).match(/[ \t]/);)u.end.column+=1;return u},b.prototype.setNewLineMode=function(v){this.doc.setNewLineMode(v)},b.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},b.prototype.setUseWorker=function(v){this.setOption("useWorker",v)},b.prototype.getUseWorker=function(){return this.$useWorker},b.prototype.onReloadTokenizer=function(v){var d=v.data;this.bgTokenizer.start(d.first),this._signal("tokenizerUpdate",v)},b.prototype.setMode=function(v,d){if(v&&typeof v=="object"){if(v.getTokenizer)return this.$onChangeMode(v);var u=v,A=u.path}else A=v||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new o),this.$modes[A]&&!u){this.$onChangeMode(this.$modes[A]),d&&d();return}this.$modeId=A,s.loadModule(["mode",A],function(L){if(!this.destroyed){if(this.$modeId!==A)return d&&d();this.$modes[A]&&!u?this.$onChangeMode(this.$modes[A]):L&&L.Mode&&(L=new L.Mode(u),u||(this.$modes[A]=L,L.$id=A),this.$onChangeMode(L)),d&&d()}}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},b.prototype.$onChangeMode=function(v,d){if(d||(this.$modeId=v.$id),this.$mode!==v){var u=this.$mode;this.$mode=v,this.$stopWorker(),this.$useWorker&&this.$startWorker();var A=v.getTokenizer();if(A.on!==void 0){var L=this.onReloadTokenizer.bind(this);A.on("update",L)}this.bgTokenizer.setTokenizer(A),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=v.tokenRe,this.nonTokenRe=v.nonTokenRe,d||(v.attachToSession&&v.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(v.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:u,mode:v}))}},b.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},b.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(v){s.warn("Could not load worker",v),this.$worker=null}},b.prototype.getMode=function(){return this.$mode},b.prototype.setScrollTop=function(v){this.$scrollTop===v||isNaN(v)||(this.$scrollTop=v,this._signal("changeScrollTop",v))},b.prototype.getScrollTop=function(){return this.$scrollTop},b.prototype.setScrollLeft=function(v){this.$scrollLeft===v||isNaN(v)||(this.$scrollLeft=v,this._signal("changeScrollLeft",v))},b.prototype.getScrollLeft=function(){return this.$scrollLeft},b.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},b.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var v=0;return this.lineWidgets.forEach(function(d){d&&d.screenWidth>v&&(v=d.screenWidth)}),this.lineWidgetWidth=v},b.prototype.$computeWidth=function(v){if(this.$modified||v){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var d=this.doc.getAllLines(),u=this.$rowLengthCache,A=0,L=0,T=this.$foldData[L],I=T?T.start.row:1/0,D=d.length,O=0;O<D;O++){if(O>I){if(O=T.end.row+1,O>=D)break;T=this.$foldData[L++],I=T?T.start.row:1/0}u[O]==null&&(u[O]=this.$getStringScreenWidth(d[O])[0]),u[O]>A&&(A=u[O])}this.screenWidth=A}},b.prototype.getLine=function(v){return this.doc.getLine(v)},b.prototype.getLines=function(v,d){return this.doc.getLines(v,d)},b.prototype.getLength=function(){return this.doc.getLength()},b.prototype.getTextRange=function(v){return this.doc.getTextRange(v||this.selection.getRange())},b.prototype.insert=function(v,d){return this.doc.insert(v,d)},b.prototype.remove=function(v){return this.doc.remove(v)},b.prototype.removeFullLines=function(v,d){return this.doc.removeFullLines(v,d)},b.prototype.undoChanges=function(v,d){if(v.length){this.$fromUndo=!0;for(var u=v.length-1;u!=-1;u--){var A=v[u];A.action=="insert"||A.action=="remove"?this.doc.revertDelta(A):A.folds&&this.addFolds(A.folds)}!d&&this.$undoSelect&&(v.selectionBefore?this.selection.fromJSON(v.selectionBefore):this.selection.setRange(this.$getUndoSelection(v,!0))),this.$fromUndo=!1}},b.prototype.redoChanges=function(v,d){if(v.length){this.$fromUndo=!0;for(var u=0;u<v.length;u++){var A=v[u];(A.action=="insert"||A.action=="remove")&&this.doc.$safeApplyDelta(A)}!d&&this.$undoSelect&&(v.selectionAfter?this.selection.fromJSON(v.selectionAfter):this.selection.setRange(this.$getUndoSelection(v,!1))),this.$fromUndo=!1}},b.prototype.setUndoSelect=function(v){this.$undoSelect=v},b.prototype.$getUndoSelection=function(v,d){function u(D){return d?D.action!=="insert":D.action==="insert"}for(var A,L,T=0;T<v.length;T++){var I=v[T];if(I.start){if(!A){u(I)?A=i.fromPoints(I.start,I.end):A=i.fromPoints(I.start,I.start);continue}u(I)?(L=I.start,A.compare(L.row,L.column)==-1&&A.setStart(L),L=I.end,A.compare(L.row,L.column)==1&&A.setEnd(L)):(L=I.start,A.compare(L.row,L.column)==-1&&(A=i.fromPoints(I.start,I.start)))}}return A},b.prototype.replace=function(v,d){return this.doc.replace(v,d)},b.prototype.moveText=function(v,d,u){var A=this.getTextRange(v),L=this.getFoldsInRange(v),T=i.fromPoints(d,d);if(!u){this.remove(v);var I=v.start.row-v.end.row,D=I?-v.end.column:v.start.column-v.end.column;D&&(T.start.row==v.end.row&&T.start.column>v.end.column&&(T.start.column+=D),T.end.row==v.end.row&&T.end.column>v.end.column&&(T.end.column+=D)),I&&T.start.row>=v.end.row&&(T.start.row+=I,T.end.row+=I)}if(T.end=this.insert(T.start,A),L.length){var O=v.start,F=T.start,I=F.row-O.row,D=F.column-O.column;this.addFolds(L.map(function(B){return B=B.clone(),B.start.row==O.row&&(B.start.column+=D),B.end.row==O.row&&(B.end.column+=D),B.start.row+=I,B.end.row+=I,B}))}return T},b.prototype.indentRows=function(v,d,u){u=u.replace(/\t/g,this.getTabString());for(var A=v;A<=d;A++)this.doc.insertInLine({row:A,column:0},u)},b.prototype.outdentRows=function(v){for(var d=v.collapseRows(),u=new i(0,0,0,0),A=this.getTabSize(),L=d.start.row;L<=d.end.row;++L){var T=this.getLine(L);u.start.row=L,u.end.row=L;for(var I=0;I<A&&T.charAt(I)==" ";++I);I<A&&T.charAt(I)=="	"?(u.start.column=I,u.end.column=I+1):(u.start.column=0,u.end.column=I),this.remove(u)}},b.prototype.$moveLines=function(v,d,u){if(v=this.getRowFoldStart(v),d=this.getRowFoldEnd(d),u<0){var A=this.getRowFoldStart(v+u);if(A<0)return 0;var L=A-v}else if(u>0){var A=this.getRowFoldEnd(d+u);if(A>this.doc.getLength()-1)return 0;var L=A-d}else{v=this.$clipRowToDocument(v),d=this.$clipRowToDocument(d);var L=d-v+1}var T=new i(v,0,d,Number.MAX_VALUE),I=this.getFoldsInRange(T).map(function(O){return O=O.clone(),O.start.row+=L,O.end.row+=L,O}),D=u==0?this.doc.getLines(v,d):this.doc.removeFullLines(v,d);return this.doc.insertFullLines(v+L,D),I.length&&this.addFolds(I),L},b.prototype.moveLinesUp=function(v,d){return this.$moveLines(v,d,-1)},b.prototype.moveLinesDown=function(v,d){return this.$moveLines(v,d,1)},b.prototype.duplicateLines=function(v,d){return this.$moveLines(v,d,0)},b.prototype.$clipRowToDocument=function(v){return Math.max(0,Math.min(v,this.doc.getLength()-1))},b.prototype.$clipColumnToRow=function(v,d){return d<0?0:Math.min(this.doc.getLine(v).length,d)},b.prototype.$clipPositionToDocument=function(v,d){if(d=Math.max(0,d),v<0)v=0,d=0;else{var u=this.doc.getLength();v>=u?(v=u-1,d=this.doc.getLine(u-1).length):d=Math.min(this.doc.getLine(v).length,d)}return{row:v,column:d}},b.prototype.$clipRangeToDocument=function(v){v.start.row<0?(v.start.row=0,v.start.column=0):v.start.column=this.$clipColumnToRow(v.start.row,v.start.column);var d=this.doc.getLength()-1;return v.end.row>d?(v.end.row=d,v.end.column=this.doc.getLine(d).length):v.end.column=this.$clipColumnToRow(v.end.row,v.end.column),v},b.prototype.setUseWrapMode=function(v){if(v!=this.$useWrapMode){if(this.$useWrapMode=v,this.$modified=!0,this.$resetRowCache(0),v){var d=this.getLength();this.$wrapData=Array(d),this.$updateWrapData(0,d-1)}this._signal("changeWrapMode")}},b.prototype.getUseWrapMode=function(){return this.$useWrapMode},b.prototype.setWrapLimitRange=function(v,d){(this.$wrapLimitRange.min!==v||this.$wrapLimitRange.max!==d)&&(this.$wrapLimitRange={min:v,max:d},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},b.prototype.adjustWrapLimit=function(v,d){var u=this.$wrapLimitRange;u.max<0&&(u={min:d,max:d});var A=this.$constrainWrapLimit(v,u.min,u.max);return A!=this.$wrapLimit&&A>1?(this.$wrapLimit=A,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},b.prototype.$constrainWrapLimit=function(v,d,u){return d&&(v=Math.max(d,v)),u&&(v=Math.min(u,v)),v},b.prototype.getWrapLimit=function(){return this.$wrapLimit},b.prototype.setWrapLimit=function(v){this.setWrapLimitRange(v,v)},b.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},b.prototype.$updateInternalDataOnChange=function(v){var d=this.$useWrapMode,u=v.action,A=v.start,L=v.end,T=A.row,I=L.row,D=I-T,O=null;if(this.$updating=!0,D!=0)if(u==="remove"){this[d?"$wrapData":"$rowLengthCache"].splice(T,D);var F=this.$foldData;O=this.getFoldsInRange(v),this.removeFolds(O);var N=this.getFoldLine(L.row),W=0;if(N){N.addRemoveChars(L.row,L.column,A.column-L.column),N.shiftRow(-D);var B=this.getFoldLine(T);B&&B!==N&&(B.merge(N),N=B),W=F.indexOf(N)+1}for(W;W<F.length;W++){var N=F[W];N.start.row>=L.row&&N.shiftRow(-D)}I=T}else{var z=Array(D);z.unshift(T,0);var P=d?this.$wrapData:this.$rowLengthCache;P.splice.apply(P,z);var F=this.$foldData,N=this.getFoldLine(T),W=0;if(N){var G=N.range.compareInside(A.row,A.column);G==0?(N=N.split(A.row,A.column),N&&(N.shiftRow(D),N.addRemoveChars(I,0,L.column-A.column))):G==-1&&(N.addRemoveChars(T,0,L.column-A.column),N.shiftRow(D)),W=F.indexOf(N)+1}for(W;W<F.length;W++){var N=F[W];N.start.row>=T&&N.shiftRow(D)}}else{D=Math.abs(v.start.column-v.end.column),u==="remove"&&(O=this.getFoldsInRange(v),this.removeFolds(O),D=-D);var N=this.getFoldLine(T);N&&N.addRemoveChars(T,A.column,D)}return d&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,d?this.$updateWrapData(T,I):this.$updateRowLengthCache(T,I),O},b.prototype.$updateRowLengthCache=function(v,d){this.$rowLengthCache[v]=null,this.$rowLengthCache[d]=null},b.prototype.$updateWrapData=function(v,d){var u=this.doc.getAllLines(),A=this.getTabSize(),L=this.$wrapData,T=this.$wrapLimit,I,D,O=v;for(d=Math.min(d,u.length-1);O<=d;)D=this.getFoldLine(O,D),D?(I=[],D.walk(function(F,N,W,B){var z;if(F!=null){z=this.$getDisplayTokens(F,I.length),z[0]=S;for(var P=1;P<z.length;P++)z[P]=C}else z=this.$getDisplayTokens(u[N].substring(B,W),I.length);I=I.concat(z)}.bind(this),D.end.row,u[D.end.row].length+1),L[D.start.row]=this.$computeWrapSplits(I,T,A),O=D.end.row+1):(I=this.$getDisplayTokens(u[O]),L[O]=this.$computeWrapSplits(I,T,A),O++)},b.prototype.$computeWrapSplits=function(v,d,u){if(v.length==0)return[];var A=[],L=v.length,T=0,I=0,D=this.$wrapAsCode,O=this.$indentedSoftWrap,F=d<=Math.max(2*u,8)||O===!1?0:Math.floor(d/2);function N(){var G=0;if(F===0)return G;if(O)for(var V=0;V<v.length;V++){var U=v[V];if(U==M)G+=1;else if(U==k)G+=u;else{if(U==_)continue;break}}return D&&O!==!1&&(G+=u),Math.min(G,F)}function W(G){for(var V=G-T,U=T;U<G;U++){var Y=v[U];(Y===12||Y===2)&&(V-=1)}A.length||(B=N(),A.indent=B),I+=V,A.push(I),T=G}for(var B=0;L-T>d-B;){var z=T+d-B;if(v[z-1]>=M&&v[z]>=M){W(z);continue}if(v[z]==S||v[z]==C){for(z;z!=T-1&&v[z]!=S;z--);if(z>T){W(z);continue}for(z=T+d,z;z<v.length&&v[z]==C;z++);if(z==v.length)break;W(z);continue}for(var P=Math.max(z-(d-(d>>2)),T-1);z>P&&v[z]<S;)z--;if(D){for(;z>P&&v[z]<S;)z--;for(;z>P&&v[z]==g;)z--}else for(;z>P&&v[z]<M;)z--;if(z>P){W(++z);continue}z=T+d,v[z]==m&&z--,W(z-B)}return A},b.prototype.$getDisplayTokens=function(v,d){var u=[],A;d=d||0;for(var L=0;L<v.length;L++){var T=v.charCodeAt(L);if(T==9){A=this.getScreenTabSize(u.length+d),u.push(k);for(var I=1;I<A;I++)u.push(_)}else T==32?u.push(M):T>39&&T<48||T>57&&T<64?u.push(g):T>=4352&&R(T)?u.push(p,m):u.push(p)}return u},b.prototype.$getStringScreenWidth=function(v,d,u){if(d==0)return[0,0];d==null&&(d=1/0),u=u||0;var A,L;for(L=0;L<v.length&&(A=v.charCodeAt(L),A==9?u+=this.getScreenTabSize(u):A>=4352&&R(A)?u+=2:u+=1,!(u>d));L++);return[u,L]},b.prototype.getRowLength=function(v){var d=1;return this.lineWidgets&&(d+=this.lineWidgets[v]&&this.lineWidgets[v].rowCount||0),!this.$useWrapMode||!this.$wrapData[v]?d:this.$wrapData[v].length+d},b.prototype.getRowLineCount=function(v){return!this.$useWrapMode||!this.$wrapData[v]?1:this.$wrapData[v].length+1},b.prototype.getRowWrapIndent=function(v){if(this.$useWrapMode){var d=this.screenToDocumentPosition(v,Number.MAX_VALUE),u=this.$wrapData[d.row];return u.length&&u[0]<d.column?u.indent:0}else return 0},b.prototype.getScreenLastRowColumn=function(v){var d=this.screenToDocumentPosition(v,Number.MAX_VALUE);return this.documentToScreenColumn(d.row,d.column)},b.prototype.getDocumentLastRowColumn=function(v,d){var u=this.documentToScreenRow(v,d);return this.getScreenLastRowColumn(u)},b.prototype.getDocumentLastRowColumnPosition=function(v,d){var u=this.documentToScreenRow(v,d);return this.screenToDocumentPosition(u,Number.MAX_VALUE/10)},b.prototype.getRowSplitData=function(v){if(this.$useWrapMode)return this.$wrapData[v]},b.prototype.getScreenTabSize=function(v){return this.$tabSize-(v%this.$tabSize|0)},b.prototype.screenToDocumentRow=function(v,d){return this.screenToDocumentPosition(v,d).row},b.prototype.screenToDocumentColumn=function(v,d){return this.screenToDocumentPosition(v,d).column},b.prototype.screenToDocumentPosition=function(v,d,u){if(v<0)return{row:0,column:0};var A,L=0,T=0,I,D=0,O=0,F=this.$screenRowCache,N=this.$getRowCacheIndex(F,v),W=F.length;if(W&&N>=0)var D=F[N],L=this.$docRowCache[N],B=v>F[W-1];else var B=!W;for(var z=this.getLength()-1,P=this.getNextFoldLine(L),G=P?P.start.row:1/0;D<=v&&(O=this.getRowLength(L),!(D+O>v||L>=z));)D+=O,L++,L>G&&(L=P.end.row+1,P=this.getNextFoldLine(L,P),G=P?P.start.row:1/0),B&&(this.$docRowCache.push(L),this.$screenRowCache.push(D));if(P&&P.start.row<=L)A=this.getFoldDisplayLine(P),L=P.start.row;else{if(D+O<=v||L>z)return{row:z,column:this.getLine(z).length};A=this.getLine(L),P=null}var V=0,U=Math.floor(v-D);if(this.$useWrapMode){var Y=this.$wrapData[L];Y&&(I=Y[U],U>0&&Y.length&&(V=Y.indent,T=Y[U-1]||Y[Y.length-1],A=A.substring(T)))}return u!==void 0&&this.$bidiHandler.isBidiRow(D+U,L,U)&&(d=this.$bidiHandler.offsetToCol(u)),T+=this.$getStringScreenWidth(A,d-V)[1],this.$useWrapMode&&T>=I&&(T=I-1),P?P.idxToPosition(T):{row:L,column:T}},b.prototype.documentToScreenPosition=function(v,d){if(typeof d>"u")var u=this.$clipPositionToDocument(v.row,v.column);else u=this.$clipPositionToDocument(v,d);v=u.row,d=u.column;var A=0,L=null,T=null;T=this.getFoldAt(v,d,1),T&&(v=T.start.row,d=T.start.column);var I,D=0,O=this.$docRowCache,F=this.$getRowCacheIndex(O,v),N=O.length;if(N&&F>=0)var D=O[F],A=this.$screenRowCache[F],W=v>O[N-1];else var W=!N;for(var B=this.getNextFoldLine(D),z=B?B.start.row:1/0;D<v;){if(D>=z){if(I=B.end.row+1,I>v)break;B=this.getNextFoldLine(I,B),z=B?B.start.row:1/0}else I=D+1;A+=this.getRowLength(D),D=I,W&&(this.$docRowCache.push(D),this.$screenRowCache.push(A))}var P="";B&&D>=z?(P=this.getFoldDisplayLine(B,v,d),L=B.start.row):(P=this.getLine(v).substring(0,d),L=v);var G=0;if(this.$useWrapMode){var V=this.$wrapData[L];if(V){for(var U=0;P.length>=V[U];)A++,U++;P=P.substring(V[U-1]||0,P.length),G=U>0?V.indent:0}}return this.lineWidgets&&this.lineWidgets[D]&&this.lineWidgets[D].rowsAbove&&(A+=this.lineWidgets[D].rowsAbove),{row:A,column:G+this.$getStringScreenWidth(P)[0]}},b.prototype.documentToScreenColumn=function(v,d){return this.documentToScreenPosition(v,d).column},b.prototype.documentToScreenRow=function(v,d){return this.documentToScreenPosition(v,d).row},b.prototype.getScreenLength=function(){var v=0,d=null;if(this.$useWrapMode)for(var L=this.$wrapData.length,T=0,A=0,d=this.$foldData[A++],I=d?d.start.row:1/0;T<L;){var D=this.$wrapData[T];v+=D?D.length+1:1,T++,T>I&&(T=d.end.row+1,d=this.$foldData[A++],I=d?d.start.row:1/0)}else{v=this.getLength();for(var u=this.$foldData,A=0;A<u.length;A++)d=u[A],v-=d.end.row-d.start.row}return this.lineWidgets&&(v+=this.$getWidgetScreenLength()),v},b.prototype.$setFontMetrics=function(v){this.$enableVarChar&&(this.$getStringScreenWidth=function(d,u,A){if(u===0)return[0,0];u||(u=1/0),A=A||0;var L,T;for(T=0;T<d.length&&(L=d.charAt(T),L==="	"?A+=this.getScreenTabSize(A):A+=v.getCharacterWidth(L),!(A>u));T++);return[A,T]})},b.prototype.getPrecedingCharacter=function(){var v=this.selection.getCursor();if(v.column===0)return v.row===0?"":this.doc.getNewLineCharacter();var d=this.getLine(v.row);return d[v.column-1]},b.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()},b})();f.$uid=0,f.prototype.$modes=s.$modes,f.prototype.getValue=f.prototype.toString,f.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},f.prototype.$overwrite=!1,f.prototype.$mode=null,f.prototype.$modeId=null,f.prototype.$scrollTop=0,f.prototype.$scrollLeft=0,f.prototype.$wrapLimit=80,f.prototype.$useWrapMode=!1,f.prototype.$wrapLimitRange={min:null,max:null},f.prototype.lineWidgets=null,f.prototype.isFullWidth=R,x.implement(f.prototype,a);var p=1,m=2,S=3,C=4,g=9,M=10,k=11,_=12;function R(b){return b<4352?!1:b>=4352&&b<=4447||b>=4515&&b<=4519||b>=4602&&b<=4607||b>=9001&&b<=9002||b>=11904&&b<=11929||b>=11931&&b<=12019||b>=12032&&b<=12245||b>=12272&&b<=12283||b>=12288&&b<=12350||b>=12353&&b<=12438||b>=12441&&b<=12543||b>=12549&&b<=12589||b>=12593&&b<=12686||b>=12688&&b<=12730||b>=12736&&b<=12771||b>=12784&&b<=12830||b>=12832&&b<=12871||b>=12880&&b<=13054||b>=13056&&b<=19903||b>=19968&&b<=42124||b>=42128&&b<=42182||b>=43360&&b<=43388||b>=44032&&b<=55203||b>=55216&&b<=55238||b>=55243&&b<=55291||b>=63744&&b<=64255||b>=65040&&b<=65049||b>=65072&&b<=65106||b>=65108&&b<=65126||b>=65128&&b<=65131||b>=65281&&b<=65376||b>=65504&&b<=65510}y("./edit_session/folding").Folding.call(f.prototype),y("./edit_session/bracket_match").BracketMatch.call(f.prototype),s.defineOptions(f.prototype,"session",{wrap:{set:function(b){if(!b||b=="off"?b=!1:b=="free"?b=!0:b=="printMargin"?b=-1:typeof b=="string"&&(b=parseInt(b,10)||!1),this.$wrap!=b)if(this.$wrap=b,!b)this.setUseWrapMode(!1);else{var v=typeof b=="number"?b:null;this.setWrapLimitRange(v,v),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(b){b=b=="auto"?this.$mode.type!="text":b!="text",b!=this.$wrapAsCode&&(this.$wrapAsCode=b,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(b){this.$useWorker=b,this.$stopWorker(),b&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(b){b=parseInt(b),b>0&&this.$tabSize!==b&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=b,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(b){this.setFoldStyle(b)},handlesSet:!0},overwrite:{set:function(b){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(b){this.doc.setNewLineMode(b)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(b){this.setMode(b)},get:function(){return this.$modeId},handlesSet:!0}}),c.EditSession=f});ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(y,c,E){"use strict";var x=y("./lib/lang"),$=y("./lib/oop"),w=y("./range").Range,s=(function(){function i(){this.$options={}}return i.prototype.set=function(t){return $.mixin(this.$options,t),this},i.prototype.getOptions=function(){return x.copyObject(this.$options)},i.prototype.setOptions=function(t){this.$options=t},i.prototype.find=function(t){var e=this.$options,n=this.$matchIterator(t,e);if(!n)return!1;var l=null;return n.forEach(function(h,f,p,m){return l=new w(h,f,p,m),f==m&&e.start&&e.start.start&&e.skipCurrent!=!1&&l.isEqual(e.start)?(l=null,!1):!0}),l},i.prototype.findAll=function(t){var e=this.$options;if(!e.needle)return[];this.$assembleRegExp(e);var n=e.range,l=n?t.getLines(n.start.row,n.end.row):t.doc.getAllLines(),h=[],f=e.re;if(e.$isMultiLine){var p=f.length,m=l.length-p,S;e:for(var C=f.offset||0;C<=m;C++){for(var g=0;g<p;g++)if(l[C+g].search(f[g])==-1)continue e;var M=l[C],k=l[C+p-1],_=M.length-M.match(f[0])[0].length,R=k.match(f[p-1])[0].length;S&&S.end.row===C&&S.end.column>_||(h.push(S=new w(C,_,C+p-1,R)),p>2&&(C=C+p-2))}}else for(var b,v=0;v<l.length;v++)if(this.$isMultilineSearch(e)){var d=l.length-1;if(b=this.$multiLineForward(t,f,v,d),b){var u=b.endRow<=d?b.endRow-1:d;u>v&&(v=u),h.push(new w(b.startRow,b.startCol,b.endRow,b.endCol))}}else{b=x.getMatchOffsets(l[v],f);for(var g=0;g<b.length;g++){var A=b[g];h.push(new w(v,A.offset,v,A.offset+A.length))}}if(n){for(var L=n.start.column,T=n.end.column,v=0,g=h.length-1;v<g&&h[v].start.column<L&&h[v].start.row==0;)v++;for(var I=n.end.row-n.start.row;v<g&&h[g].end.column>T&&h[g].end.row==I;)g--;for(h=h.slice(v,g+1),v=0,g=h.length;v<g;v++)h[v].start.row+=n.start.row,h[v].end.row+=n.start.row}return h},i.prototype.parseReplaceString=function(t){for(var e={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},n="",l=0,h=t.length;l<h;l++){var f=t.charCodeAt(l);if(f===e.Backslash){if(l++,l>=h){n+="\\";break}var p=t.charCodeAt(l);switch(p){case e.Backslash:n+="\\";break;case e.n:n+=`
`;break;case e.t:n+="	";break}continue}if(f===e.DollarSign){if(l++,l>=h){n+="$";break}var m=t.charCodeAt(l);if(m===e.DollarSign){n+="$$";continue}if(m===e.Digit0||m===e.Ampersand){n+="$&";continue}if(e.Digit1<=m&&m<=e.Digit9){n+="$"+t[l];continue}}n+=t[l]}return n||t},i.prototype.replace=function(t,e){var n=this.$options,l=this.$assembleRegExp(n);if(n.$isMultiLine)return e;if(l){var h=this.$isMultilineSearch(n);h&&(t=t.replace(/\r\n|\r|\n/g,`
`));var f=l.exec(t);if(!f||!h&&f[0].length!=t.length)return null;if(e=n.regExp?this.parseReplaceString(e):e.replace(/\$/g,"$$$$"),e=t.replace(l,e),n.preserveCase){e=e.split("");for(var p=Math.min(t.length,t.length);p--;){var m=t[p];m&&m.toLowerCase()!=m?e[p]=e[p].toUpperCase():e[p]=e[p].toLowerCase()}e=e.join("")}return e}},i.prototype.$assembleRegExp=function(t,e){if(t.needle instanceof RegExp)return t.re=t.needle;var n=t.needle;if(!t.needle)return t.re=!1;t.regExp||(n=x.escapeRegExp(n));var l=t.caseSensitive?"gm":"gmi";try{new RegExp(n,"u"),t.$supportsUnicodeFlag=!0,l+="u"}catch{t.$supportsUnicodeFlag=!1}if(t.wholeWord&&(n=a(n,t)),t.$isMultiLine=!e&&/[\n\r]/.test(n),t.$isMultiLine)return t.re=this.$assembleMultilineRegExp(n,l);try{var h=new RegExp(n,l)}catch{h=!1}return t.re=h},i.prototype.$assembleMultilineRegExp=function(t,e){for(var n=t.replace(/\r\n|\r|\n/g,`$
^`).split(`
`),l=[],h=0;h<n.length;h++)try{l.push(new RegExp(n[h],e))}catch{return!1}return l},i.prototype.$isMultilineSearch=function(t){return t.re&&/\\r\\n|\\r|\\n/.test(t.re.source)&&t.regExp&&!t.$isMultiLine},i.prototype.$multiLineForward=function(t,e,n,l){for(var h,f=o(t,n),p=n;p<=l;){for(var m=0;m<f&&!(p>l);m++){var S=t.getLine(p++);h=h==null?S:h+`
`+S}var C=e.exec(h);if(e.lastIndex=0,C){var g=h.slice(0,C.index).split(`
`),M=C[0].split(`
`),k=n+g.length-1,_=g[g.length-1].length,R=k+M.length-1,b=M.length==1?_+M[0].length:M[M.length-1].length;return{startRow:k,startCol:_,endRow:R,endCol:b}}}return null},i.prototype.$multiLineBackward=function(t,e,n,l,h){for(var f,p=o(t,l),m=t.getLine(l).length-n,S=l;S>=h;){for(var C=0;C<p&&S>=h;C++){var g=t.getLine(S--);f=f==null?g:g+`
`+f}var M=r(f,e,m);if(M){var k=f.slice(0,M.index).split(`
`),_=M[0].split(`
`),R=S+k.length,b=k[k.length-1].length,v=R+_.length-1,d=_.length==1?b+_[0].length:_[_.length-1].length;return{startRow:R,startCol:b,endRow:v,endCol:d}}}return null},i.prototype.$matchIterator=function(t,e){var n=this.$assembleRegExp(e);if(!n)return!1;var l=this.$isMultilineSearch(e),h=this.$multiLineForward,f=this.$multiLineBackward,p=e.backwards==!0,m=e.skipCurrent!=!1,S=n.unicode,C=e.range,g=e.start;g||(g=C?C[p?"end":"start"]:t.selection.getRange()),g.start&&(g=g[m!=p?"end":"start"]);var M=C?C.start.row:0,k=C?C.end.row:t.getLength()-1;if(p)var _=function(v){var d=g.row;if(!b(d,g.column,v)){for(d--;d>=M;d--)if(b(d,Number.MAX_VALUE,v))return;if(e.wrap!=!1){for(d=k,M=g.row;d>=M;d--)if(b(d,Number.MAX_VALUE,v))return}}};else var _=function(d){var u=g.row;if(!b(u,g.column,d)){for(u=u+1;u<=k;u++)if(b(u,0,d))return;if(e.wrap!=!1){for(u=M,k=g.row;u<=k;u++)if(b(u,0,d))return}}};if(e.$isMultiLine)var R=n.length,b=function(v,d,u){var A=p?v-R+1:v;if(!(A<0||A+R>t.getLength())){var L=t.getLine(A),T=L.search(n[0]);if(!(!p&&T<d||T===-1)){for(var I=1;I<R;I++)if(L=t.getLine(A+I),L.search(n[I])==-1)return;var D=L.match(n[R-1])[0].length;if(!(p&&D>d)&&u(A,T,A+R-1,D))return!0}}};else if(p)var b=function(d,u,A){if(l){var L=f(t,n,u,d,M);if(!L)return!1;if(A(L.startRow,L.startCol,L.endRow,L.endCol))return!0}else{var T=t.getLine(d),I=[],D,O=0;for(n.lastIndex=0;D=n.exec(T);){var F=D[0].length;if(O=D.index,!F){if(O>=T.length)break;n.lastIndex=O+=x.skipEmptyMatch(T,O,S)}if(D.index+F>u)break;I.push(D.index,F)}for(var N=I.length-1;N>=0;N-=2){var W=I[N-1],F=I[N];if(A(d,W,d,W+F))return!0}}};else var b=function(d,u,A){if(n.lastIndex=u,l){var L=h(t,n,d,k);if(L){var T=L.endRow<=k?L.endRow-1:k;T>d&&(d=T)}if(!L)return!1;if(A(L.startRow,L.startCol,L.endRow,L.endCol))return!0}else for(var I=t.getLine(d),D,O;O=n.exec(I);){var F=O[0].length;if(D=O.index,A(d,D,d,D+F))return!0;if(!F&&(n.lastIndex=D+=x.skipEmptyMatch(I,D,S),D>=I.length))return!1}};return{forEach:_}},i})();function a(i,t){var e=x.supportsLookbehind();function n(p,m){m===void 0&&(m=!0);var S=e&&t.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return S.test(p)||t.regExp?e&&t.$supportsUnicodeFlag?m?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var l=Array.from(i),h=l[0],f=l[l.length-1];return n(h)+i+n(f,!1)}function r(i,t,e){for(var n=null,l=0;l<=i.length;){t.lastIndex=l;var h=t.exec(i);if(!h)break;var f=h.index+h[0].length;if(f>i.length-e)break;(!n||f>n.index+n[0].length)&&(n=h),l=h.index+1}return n}function o(i,t){var e=5e3,n={row:t,column:0},l=i.doc.positionToIndex(n),h=l+e,f=i.doc.indexToPosition(h),p=f.row;return p+1}c.Search=s});ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(y,c,E){"use strict";var x=this&&this.__extends||(function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,l){n.__proto__=l}||function(n,l){for(var h in l)Object.prototype.hasOwnProperty.call(l,h)&&(n[h]=l[h])},i(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");i(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}})(),$=y("../lib/keys"),w=y("../lib/useragent"),s=$.KEY_MODS,a=(function(){function i(t,e){this.$init(t,e,!1)}return i.prototype.$init=function(t,e,n){this.platform=e||(w.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(t),this.$singleCommand=n},i.prototype.addCommand=function(t){this.commands[t.name]&&this.removeCommand(t),this.commands[t.name]=t,t.bindKey&&this._buildKeyHash(t)},i.prototype.removeCommand=function(t,e){var n=t&&(typeof t=="string"?t:t.name);t=this.commands[n],e||delete this.commands[n];var l=this.commandKeyBinding;for(var h in l){var f=l[h];if(f==t)delete l[h];else if(Array.isArray(f)){var p=f.indexOf(t);p!=-1&&(f.splice(p,1),f.length==1&&(l[h]=f[0]))}}},i.prototype.bindKey=function(t,e,n){if(typeof t=="object"&&t&&(n==null&&(n=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 h="";if(l.indexOf(" ")!=-1){var f=l.split(/\s+/);l=f.pop(),f.forEach(function(S){var C=this.parseKeys(S),g=s[C.hashId]+C.key;h+=(h?" ":"")+g,this._addCommandToBinding(h,"chainKeys")},this),h+=" "}var p=this.parseKeys(l),m=s[p.hashId]+p.key;this._addCommandToBinding(h+m,e,n)},this)}},i.prototype._addCommandToBinding=function(t,e,n){var l=this.commandKeyBinding,h;if(!e)delete l[t];else if(!l[t]||this.$singleCommand)l[t]=e;else{Array.isArray(l[t])?(h=l[t].indexOf(e))!=-1&&l[t].splice(h,1):l[t]=[l[t]],typeof n!="number"&&(n=r(e));var f=l[t];for(h=0;h<f.length;h++){var p=f[h],m=r(p);if(m>n)break}f.splice(h,0,e)}},i.prototype.addCommands=function(t){t&&Object.keys(t).forEach(function(e){var n=t[e];if(n){if(typeof n=="string")return this.bindKey(n,e);typeof n=="function"&&(n={exec:n}),typeof n=="object"&&(n.name||(n.name=e),this.addCommand(n))}},this)},i.prototype.removeCommands=function(t){Object.keys(t).forEach(function(e){this.removeCommand(t[e])},this)},i.prototype.bindKeys=function(t){Object.keys(t).forEach(function(e){this.bindKey(e,t[e])},this)},i.prototype._buildKeyHash=function(t){this.bindKey(t.bindKey,t)},i.prototype.parseKeys=function(t){var e=t.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(m){return m}),n=e.pop(),l=$[n];if($.FUNCTION_KEYS[l])n=$.FUNCTION_KEYS[l].toLowerCase();else if(e.length){if(e.length==1&&e[0]=="shift")return{key:n.toUpperCase(),hashId:-1}}else return{key:n,hashId:-1};for(var h=0,f=e.length;f--;){var p=$.KEY_MODS[e[f]];if(p==null)return typeof console<"u"&&console.error("invalid modifier "+e[f]+" in "+t),!1;h|=p}return{key:n,hashId:h}},i.prototype.findKeyCommand=function(t,e){var n=s[t]+e;return this.commandKeyBinding[n]},i.prototype.handleKeyboard=function(t,e,n,l){if(!(l<0)){var h=s[e]+n,f=this.commandKeyBinding[h];return t.$keyChain&&(t.$keyChain+=" "+h,f=this.commandKeyBinding[t.$keyChain]||f),f&&(f=="chainKeys"||f[f.length-1]=="chainKeys")?(t.$keyChain=t.$keyChain||h,{command:"null"}):(t.$keyChain&&((!e||e==4)&&n.length==1?t.$keyChain=t.$keyChain.slice(0,-h.length-1):(e==-1||l>0)&&(t.$keyChain="")),{command:f})}},i.prototype.getStatusText=function(t,e){return e.$keyChain||""},i})();function r(i){return typeof i=="object"&&i.bindKey&&i.bindKey.position||(i.isDefault?-100:0)}var o=(function(i){x(t,i);function t(e,n){var l=i.call(this,e,n)||this;return l.$singleCommand=!0,l}return t})(a);o.call=function(i,t,e){a.prototype.$init.call(i,t,e,!0)},a.call=function(i,t,e){a.prototype.$init.call(i,t,e,!1)},c.HashHandler=o,c.MultiHashHandler=a});ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(y,c,E){"use strict";var x=this&&this.__extends||(function(){var r=function(o,i){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(o,i)};return function(o,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");r(o,i);function t(){this.constructor=o}o.prototype=i===null?Object.create(i):(t.prototype=i.prototype,new t)}})(),$=y("../lib/oop"),w=y("../keyboard/hash_handler").MultiHashHandler,s=y("../lib/event_emitter").EventEmitter,a=(function(r){x(o,r);function o(i,t){var e=r.call(this,t,i)||this;return e.byName=e.commands,e.setDefaultHandler("exec",function(n){return n.args?n.command.exec(n.editor,n.args,n.event,!1):n.command.exec(n.editor,{},n.event,!0)}),e}return o.prototype.exec=function(i,t,e){if(Array.isArray(i)){for(var n=i.length;n--;)if(this.exec(i[n],t,e))return!0;return!1}typeof i=="string"&&(i=this.commands[i]);var l={editor:t,command:i,args:e};return this.canExecute(i,t)?(l.returnValue=this._emit("exec",l),this._signal("afterExec",l),l.returnValue!==!1):(this._signal("commandUnavailable",l),!1)},o.prototype.canExecute=function(i,t){return typeof i=="string"&&(i=this.commands[i]),!(!i||t&&t.$readOnly&&!i.readOnly||this.$checkCommandState!=!1&&i.isAvailable&&!i.isAvailable(t))},o.prototype.toggleRecording=function(i){if(!this.$inReplay)return i&&i._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(t){this.macro.push([t.command,t.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},o.prototype.replay=function(i){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(i);try{this.$inReplay=!0,this.macro.forEach(function(t){typeof t=="string"?this.exec(t,i):this.exec(t[0],i,t[1])},this)}finally{this.$inReplay=!1}}},o.prototype.trimMacro=function(i){return i.map(function(t){return typeof t[0]!="string"&&(t[0]=t[0].name),t[1]||(t=t[0]),t})},o})(w);$.implement(a.prototype,s),c.CommandManager=a});ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(y,c,E){"use strict";var x=y("../lib/lang"),$=y("../config"),w=y("../range").Range;function s(r,o){return{win:r,mac:o}}c.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:s("Ctrl-,","Command-,"),exec:function(r){$.loadModule("ace/ext/settings_menu",function(o){o.init(r),r.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:s("Alt-E","F4"),exec:function(r){$.loadModule("ace/ext/error_marker",function(o){o.showErrorMarker(r,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:s("Alt-Shift-E","Shift-F4"),exec:function(r){$.loadModule("ace/ext/error_marker",function(o){o.showErrorMarker(r,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:s("Ctrl-A","Command-A"),exec:function(r){r.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:s(null,"Ctrl-L"),exec:function(r){r.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:s("Ctrl-L","Command-L"),exec:function(r,o){typeof o=="number"&&!isNaN(o)&&r.gotoLine(o),r.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:s("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(r){r.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:s("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(r){r.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:s("F2","F2"),exec:function(r){r.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:s("Alt-F2","Alt-F2"),exec:function(r){r.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(r){r.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(r){r.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:s("Alt-0","Command-Option-0"),exec:function(r){r.session.foldAll(),r.session.unfold(r.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(r){r.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:s("Ctrl-K","Command-G"),exec:function(r){r.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:s("Ctrl-Shift-K","Command-Shift-G"),exec:function(r){r.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:s("Alt-K","Ctrl-G"),exec:function(r){r.selection.isEmpty()?r.selection.selectWord():r.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:s("Alt-Shift-K","Ctrl-Shift-G"),exec:function(r){r.selection.isEmpty()?r.selection.selectWord():r.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:s("Ctrl-F","Command-F"),exec:function(r){$.loadModule("ace/ext/searchbox",function(o){o.Search(r)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(r){r.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:s("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(r){r.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:s("Ctrl-Home","Command-Home|Command-Up"),exec:function(r){r.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:s("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(r){r.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:s("Up","Up|Ctrl-P"),exec:function(r,o){r.navigateUp(o.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(r){r.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(r){r.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(r){r.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:s("Down","Down|Ctrl-N"),exec:function(r,o){r.navigateDown(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:s("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(r){r.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:s("Ctrl-Left","Option-Left"),exec:function(r){r.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(r){r.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(r){r.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:s("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(r){r.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:s("Left","Left|Ctrl-B"),exec:function(r,o){r.navigateLeft(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:s("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(r){r.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:s("Ctrl-Right","Option-Right"),exec:function(r){r.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(r){r.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(r){r.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:s("Shift-Right","Shift-Right"),exec:function(r){r.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:s("Right","Right|Ctrl-F"),exec:function(r,o){r.navigateRight(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(r){r.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:s(null,"Option-PageDown"),exec:function(r){r.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:s("PageDown","PageDown|Ctrl-V"),exec:function(r){r.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(r){r.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:s(null,"Option-PageUp"),exec:function(r){r.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(r){r.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:s("Ctrl-Up",null),exec:function(r){r.renderer.scrollBy(0,-2*r.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:s("Ctrl-Down",null),exec:function(r){r.renderer.scrollBy(0,2*r.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(r){r.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(r){r.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:s("Ctrl-Alt-E","Command-Option-E"),exec:function(r){r.commands.toggleRecording(r)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(r){r.commands.replay(r)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:s("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(r){r.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:s("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(r){r.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:s("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(r){r.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:s(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(r){},readOnly:!0},{name:"cut",description:"Cut",exec:function(r){var o=r.$copyWithEmptySelection&&r.selection.isEmpty(),i=o?r.selection.getLineRange():r.selection.getRange();r._emit("cut",i),i.isEmpty()||r.session.remove(i),r.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(r,o){r.$handlePaste(o)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:s("Ctrl-D","Command-D"),exec:function(r){r.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(r){r.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(r){r.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:s("Ctrl-/","Command-/"),exec:function(r){r.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(r){r.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(r){r.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(r){r.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(r){$.loadModule("ace/ext/searchbox",function(o){o.Search(r,!0)})}},{name:"undo",description:"Undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(r){r.undo()}},{name:"redo",description:"Redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(r){r.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(r){r.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:s("Alt-Up","Option-Up"),exec:function(r){r.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(r){r.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:s("Alt-Down","Option-Down"),exec:function(r){r.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(r){r.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:s("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(r){r.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:s("Shift-Delete",null),exec:function(r){if(r.selection.isEmpty())r.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:s("Alt-Backspace","Command-Backspace"),exec:function(r){r.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:s("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(r){r.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:s("Ctrl-Shift-Backspace",null),exec:function(r){var o=r.selection.getRange();o.start.column=0,r.session.remove(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:s("Ctrl-Shift-Delete",null),exec:function(r){var o=r.selection.getRange();o.end.column=Number.MAX_VALUE,r.session.remove(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(r){r.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(r){r.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(r){r.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:s("Tab","Tab"),exec:function(r){r.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(r){r.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:s("Ctrl-]","Ctrl-]"),exec:function(r){r.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(r,o){r.insert(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(r,o){r.insert(x.stringRepeat(o.text||"",o.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:s(null,"Ctrl-O"),exec:function(r){r.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:s("Alt-Shift-X","Ctrl-T"),exec:function(r){r.transposeLetters()},multiSelectAction:function(r){r.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(r){r.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(r){r.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:s(null,null),exec:function(r){r.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:s("Ctrl-Shift-L","Command-Shift-L"),exec:function(r){var o=r.selection.getRange();o.start.column=o.end.column=0,o.end.row++,r.selection.setRange(o,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:s("Ctrl+F3","F3"),exec:function(r){r.openLink()}},{name:"joinlines",description:"Join lines",bindKey:s(null,null),exec:function(r){for(var o=r.selection.isBackwards(),i=o?r.selection.getSelectionLead():r.selection.getSelectionAnchor(),t=o?r.selection.getSelectionAnchor():r.selection.getSelectionLead(),e=r.session.doc.getLine(i.row).length,n=r.session.doc.getTextRange(r.selection.getRange()),l=n.replace(/\n\s*/," ").length,h=r.session.doc.getLine(i.row),f=i.row+1;f<=t.row+1;f++){var p=x.stringTrimLeft(x.stringTrimRight(r.session.doc.getLine(f)));p.length!==0&&(p=" "+p),h+=p}t.row+1<r.session.doc.getLength()-1&&(h+=r.session.doc.getNewLineCharacter()),r.clearSelection(),r.session.doc.replace(new w(i.row,0,t.row+2,0),h),l>0?(r.selection.moveCursorTo(i.row,i.column),r.selection.selectTo(i.row,i.column+l)):(e=r.session.doc.getLine(i.row).length>e?e+1:e,r.selection.moveCursorTo(i.row,e))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:s(null,null),exec:function(r){var o=r.session.doc.getLength()-1,i=r.session.doc.getLine(o).length,t=r.selection.rangeList.ranges,e=[];t.length<1&&(t=[r.selection.getRange()]);for(var n=0;n<t.length;n++)n==t.length-1&&(t[n].end.row===o&&t[n].end.column===i||e.push(new w(t[n].end.row,t[n].end.column,o,i))),n===0?t[n].start.row===0&&t[n].start.column===0||e.push(new w(0,0,t[n].start.row,t[n].start.column)):e.push(new w(t[n-1].end.row,t[n-1].end.column,t[n].start.row,t[n].start.column));r.exitMultiSelectMode(),r.clearSelection();for(var n=0;n<e.length;n++)r.selection.addRange(e[n],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(r){r.selection.clearSelection(),r.navigateLineEnd(),r.insert(`
`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(r){r.selection.clearSelection();var o=r.getCursorPosition();r.selection.moveTo(o.row-1,Number.MAX_VALUE),r.insert(`
`),o.row===0&&r.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(r){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),r.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:s("F1","F1"),exec:function(r){r.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:s(null,null),exec:function(r){r.prompt({$type:"modes"})},readOnly:!0}];for(var a=1;a<9;a++)c.commands.push({name:"foldToLevel"+a,description:"Fold To Level "+a,level:a,exec:function(r){r.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})});ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys"],function(y,c,E){"use strict";var x=y("../lib/keys"),$=(function(){function s(a){this.editor=a,this.gutterLayer=a.renderer.$gutterLayer,this.element=a.renderer.$gutter,this.lines=a.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=this.editor.$mouseHandler.$tooltip}return s.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},s.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},s.prototype.$onGutterKeyDown=function(a){if(this.annotationTooltip.isOpen){a.preventDefault(),a.keyCode===x.escape&&this.annotationTooltip.hide();return}if(a.target===this.element){if(a.keyCode!=x.enter)return;a.preventDefault();var r=this.editor.getCursorPosition().row;this.editor.isRowVisible(r)||this.editor.scrollToLine(r,!0,!0),setTimeout(function(){var o=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),i=this.$findNearestFoldLaneWidget(o),t=this.$findNearestAnnotation(o);if(!(i===null&&t===null)){var e=this.$findClosestNumber(i,t,o);if(e===i)if(this.activeLane="fold",this.activeRowIndex=i,this.$isCustomWidgetVisible(i)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=t,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}.bind(this),10);return}this.$handleGutterKeyboardInteraction(a),setTimeout(function(){this.editor._signal("gutterkeydown",new w(a,this))}.bind(this),10)},s.prototype.$handleGutterKeyboardInteraction=function(a){if(a.keyCode===x.tab){a.preventDefault();return}if(a.keyCode===x.escape){a.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(a.keyCode===x.up){switch(a.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(a.keyCode===x.down){switch(a.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(a.keyCode===x.left){a.preventDefault(),this.$switchLane("annotation");return}if(a.keyCode===x.right){a.preventDefault(),this.$switchLane("fold");return}if(a.keyCode===x.enter||a.keyCode===x.space){switch(a.preventDefault(),this.activeLane){case"fold":var r=this.$rowIndexToRow(this.activeRowIndex),o=this.editor.session.$gutterCustomWidgets[r];if(o)o.callbacks&&o.callbacks.onClick&&o.callbacks.onClick(a,r);else if(this.gutterLayer.session.foldWidgets[r]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),a),setTimeout(function(){this.$rowIndexToRow(this.activeRowIndex)!==r&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(r),this.$focusFoldWidget(this.activeRowIndex))}.bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex)),this.annotationTooltip.$fromKeyboard=!0;break}return}},s.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hide()},s.prototype.$isFoldWidgetVisible=function(a){var r=this.editor.isRowFullyVisible(this.$rowIndexToRow(a)),o=this.$getFoldWidget(a).style.display!=="none";return r&&o},s.prototype.$isCustomWidgetVisible=function(a){var r=this.editor.isRowFullyVisible(this.$rowIndexToRow(a)),o=!!this.$getCustomWidget(a);return r&&o},s.prototype.$isAnnotationVisible=function(a){var r=this.editor.isRowFullyVisible(this.$rowIndexToRow(a)),o=this.$getAnnotation(a).style.display!=="none";return r&&o},s.prototype.$getFoldWidget=function(a){var r=this.lines.get(a),o=r.element;return o.childNodes[1]},s.prototype.$getCustomWidget=function(a){var r=this.lines.get(a),o=r.element;return o.childNodes[3]},s.prototype.$getAnnotation=function(a){var r=this.lines.get(a),o=r.element;return o.childNodes[2]},s.prototype.$findNearestFoldLaneWidget=function(a){if(this.$isCustomWidgetVisible(a)||this.$isFoldWidgetVisible(a))return a;for(var r=0;a-r>0||a+r<this.lines.getLength()-1;){if(r++,a-r>=0&&this.$isCustomWidgetVisible(a-r))return a-r;if(a+r<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(a+r))return a+r;if(a-r>=0&&this.$isFoldWidgetVisible(a-r))return a-r;if(a+r<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(a+r))return a+r}return null},s.prototype.$findNearestAnnotation=function(a){if(this.$isAnnotationVisible(a))return a;for(var r=0;a-r>0||a+r<this.lines.getLength()-1;){if(r++,a-r>=0&&this.$isAnnotationVisible(a-r))return a-r;if(a+r<=this.lines.getLength()-1&&this.$isAnnotationVisible(a+r))return a+r}return null},s.prototype.$focusFoldWidget=function(a){if(a!=null){var r=this.$getFoldWidget(a);r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus()}},s.prototype.$focusCustomWidget=function(a){if(a!=null){var r=this.$getCustomWidget(a);r&&(r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus())}},s.prototype.$focusAnnotation=function(a){if(a!=null){var r=this.$getAnnotation(a);r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus()}},s.prototype.$blurFoldWidget=function(a){var r=this.$getFoldWidget(a);r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.blur()},s.prototype.$blurCustomWidget=function(a){var r=this.$getCustomWidget(a);r&&(r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.blur())},s.prototype.$blurAnnotation=function(a){var r=this.$getAnnotation(a);r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.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;a<this.lines.getLength()-1;)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.$moveAnnotationUp=function(){for(var a=this.activeRowIndex;a>0;)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<this.lines.getLength()-1;)if(a++,this.$isAnnotationVisible(a)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=a,this.$focusAnnotation(this.activeRowIndex);return}},s.prototype.$findClosestNumber=function(a,r,o){return a===null?r:r===null||Math.abs(o-a)<=Math.abs(o-r)?a:r},s.prototype.$switchLane=function(a){switch(a){case"annotation":if(this.activeLane==="annotation")break;var r=this.$findNearestAnnotation(this.activeRowIndex);if(r==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=r,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var o=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(o===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=o,this.$isCustomWidgetVisible(o)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},s.prototype.$rowIndexToRow=function(a){var r=this.lines.get(a);return r?r.row:null},s.prototype.$rowToRowIndex=function(a){for(var r=0;r<this.lines.getLength();r++){var o=this.lines.get(r);if(o.row==a)return r}return null},s})();c.GutterKeyboardHandler=$;var w=(function(){function s(a,r){this.gutterKeyboardHandler=r,this.domEvent=a}return s.prototype.getKey=function(){return x.keyCodeToString(this.domEvent.keyCode)},s.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},s.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},s.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},s})();c.GutterKeyboardEvent=w});ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys","ace/lib/event","ace/tooltip"],function(y,c,E){"use strict";var x=this&&this.__values||function(d){var u=typeof Symbol=="function"&&Symbol.iterator,A=u&&d[u],L=0;if(A)return A.call(d);if(d&&typeof d.length=="number")return{next:function(){return d&&L>=d.length&&(d=void 0),{value:d&&d[L++],done:!d}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")},$=y("./lib/oop"),w=y("./lib/dom"),s=y("./lib/lang"),a=y("./lib/useragent"),r=y("./keyboard/textinput").TextInput,o=y("./mouse/mouse_handler").MouseHandler,i=y("./mouse/fold_handler").FoldHandler,t=y("./keyboard/keybinding").KeyBinding,e=y("./edit_session").EditSession,n=y("./search").Search,l=y("./range").Range,h=y("./lib/event_emitter").EventEmitter,f=y("./commands/command_manager").CommandManager,p=y("./commands/default_commands").commands,m=y("./config"),S=y("./token_iterator").TokenIterator,C=y("./keyboard/gutter_handler").GutterKeyboardHandler,g=y("./config").nls,M=y("./clipboard"),k=y("./lib/keys"),_=y("./lib/event"),R=y("./tooltip").HoverTooltip,b=(function(){function d(u,A,L){this.id="editor"+ ++d.$uid,this.session,this.$toDestroy=[];var T=u.getContainerElement();this.container=T,this.renderer=u,this.commands=new f(a.isMac?"mac":"win",p),typeof document=="object"&&(this.textInput=new r(u.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new o(this),new i(this)),this.keyBinding=new t(this),this.$search=new n().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(A||L&&L.session||new e("")),m.resetOptions(this),L&&this.setOptions(L),m._signal("editor",this)}return d.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},d.prototype.startOperation=function(u){this.session.startOperation(u)},d.prototype.endOperation=function(u){this.session.endOperation(u)},d.prototype.onStartOperation=function(u){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,u||(this.previousCommand=null)},d.prototype.onEndOperation=function(u){if(this.curOp&&this.session){if(u&&u.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var A=this.curOp.command,L=A&&A.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}},d.prototype.$historyTracker=function(u){if(this.$mergeUndoDeltas){var A=this.prevOp,L=this.$mergeableCommands,T=A.command&&u.command.name==A.command.name;if(u.command.name=="insertstring"){var I=u.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),T=T&&this.mergeNextCommand&&(!/\s/.test(I)||/\s/.test(A.args)),this.mergeNextCommand=!0}else T=T&&L.indexOf(u.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(T=!1),T?this.session.mergeUndoDeltas=!0:L.indexOf(u.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},d.prototype.setKeyboardHandler=function(u,A){if(u&&typeof u=="string"&&u!="ace"){this.$keybindingId=u;var L=this;m.loadModule(["keybinding",u],function(T){L.$keybindingId==u&&L.keyBinding.setKeyboardHandler(T&&T.handler),A&&A()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(u),A&&A()},d.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},d.prototype.setSession=function(u){if(this.session!=u){this.curOp&&this.endOperation(),this.curOp={};var A=this.session;if(A){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=u,u?(this.$onDocumentChange=this.onDocumentChange.bind(this),u.on("change",this.$onDocumentChange),this.renderer.setSession(u),this.$onChangeMode=this.onChangeMode.bind(this),u.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),u.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),u.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),u.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),u.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),u.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=u.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$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(u)),this._signal("changeSession",{session:u,oldSession:A}),this.curOp=null,A&&A._signal("changeEditor",{oldEditor:this}),A&&(A.$editor=null),u&&u._signal("changeEditor",{editor:this}),u&&(u.$editor=this),u&&!u.destroyed&&u.bgTokenizer.scheduleStart()}},d.prototype.getSession=function(){return this.session},d.prototype.setValue=function(u,A){return this.session.doc.setValue(u),A?A==1?this.navigateFileEnd():A==-1&&this.navigateFileStart():this.selectAll(),u},d.prototype.getValue=function(){return this.session.getValue()},d.prototype.getSelection=function(){return this.selection},d.prototype.resize=function(u){this.renderer.onResize(u)},d.prototype.setTheme=function(u,A){this.renderer.setTheme(u,A)},d.prototype.getTheme=function(){return this.renderer.getTheme()},d.prototype.setStyle=function(u,A){this.renderer.setStyle(u,A)},d.prototype.unsetStyle=function(u){this.renderer.unsetStyle(u)},d.prototype.getFontSize=function(){return this.getOption("fontSize")||w.computedStyle(this.container).fontSize},d.prototype.setFontSize=function(u){this.setOption("fontSize",u)},d.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var u=this;this.$highlightPending=!0,setTimeout(function(){u.$highlightPending=!1;var A=u.session;if(!(!A||A.destroyed)){A.$bracketHighlight&&(A.$bracketHighlight.markerIds.forEach(function(B){A.removeMarker(B)}),A.$bracketHighlight=null);var L=u.getCursorPosition(),T=u.getKeyboardHandler(),I=T&&T.$getDirectionForHighlight&&T.$getDirectionForHighlight(u),D=A.getMatchingBracketRanges(L,I);if(!D){var O=new S(A,L.row,L.column),F=O.getCurrentToken();if(F&&/\b(?:tag-open|tag-name)/.test(F.type)){var N=A.getMatchingTags(L);N&&(D=[N.openTagName.isEmpty()?N.openTag:N.openTagName,N.closeTagName.isEmpty()?N.closeTag:N.closeTagName])}}if(!D&&A.$mode.getMatching&&(D=A.$mode.getMatching(u.session)),!D){u.getHighlightIndentGuides()&&u.renderer.$textLayer.$highlightIndentGuide();return}var W="ace_bracket";Array.isArray(D)?D.length==1&&(W="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)])),A.$bracketHighlight={ranges:D,markerIds:D.map(function(B){return A.addMarker(B,W,"text")})},u.getHighlightIndentGuides()&&u.renderer.$textLayer.$highlightIndentGuide()}},50)}},d.prototype.focus=function(){this.textInput.focus()},d.prototype.isFocused=function(){return this.textInput.isFocused()},d.prototype.blur=function(){this.textInput.blur()},d.prototype.onFocus=function(u){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",u))},d.prototype.onBlur=function(u){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",u))},d.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},d.prototype.onDocumentChange=function(u){var A=this.session.$useWrapMode,L=u.start.row==u.end.row?u.end.row:1/0;this.renderer.updateLines(u.start.row,L,A),this._signal("change",u),this.$cursorChange()},d.prototype.onTokenizerUpdate=function(u){var A=u.data;this.renderer.updateLines(A.first,A.last)},d.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},d.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},d.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},d.prototype.$updateHighlightActiveLine=function(){var u=this.getSession(),A;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(A=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(A=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(A=!1)),u.$highlightLineMarker&&!A)u.removeMarker(u.$highlightLineMarker.id),u.$highlightLineMarker=null;else if(!u.$highlightLineMarker&&A){var L=new l(A.row,A.column,A.row,1/0);L.id=u.addMarker(L,"ace_active-line","screenLine"),u.$highlightLineMarker=L}else A&&(u.$highlightLineMarker.start.row=A.row,u.$highlightLineMarker.end.row=A.row,u.$highlightLineMarker.start.column=A.column,u._signal("changeBackMarker"))},d.prototype.onSelectionChange=function(u){var A=this.session;if(A.$selectionMarker&&A.removeMarker(A.$selectionMarker),A.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var L=this.selection.getRange(),T=this.getSelectionStyle();A.$selectionMarker=A.addMarker(L,"ace_selection",T)}var I=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(I),this._signal("changeSelection")},d.prototype.$getSelectionHighLightRegexp=function(){var u=this.session,A=this.getSelectionRange();if(!(A.isEmpty()||A.isMultiLine())){var L=A.start.column,T=A.end.column,I=u.getLine(A.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}),F=I.substring(L-1,T+1);if(O.test(F))return O}}},d.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},d.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},d.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},d.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},d.prototype.onChangeMode=function(u){this.renderer.updateText(),this._emit("changeMode",u)},d.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},d.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},d.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},d.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},d.prototype.getCopyText=function(){var u=this.getSelectedText(),A=this.session.doc.getNewLineCharacter(),L=!1;if(!u&&this.$copyWithEmptySelection){L=!0;for(var T=this.selection.getAllRanges(),I=0;I<T.length;I++){var D=T[I];I&&T[I-1].start.row==D.start.row||(u+=this.session.getLine(D.start.row)+A)}}var O={text:u};return this._signal("copy",O),M.lineMode=L?O.text:!1,O.text},d.prototype.onCopy=function(){this.commands.exec("copy",this)},d.prototype.onCut=function(){this.commands.exec("cut",this)},d.prototype.onPaste=function(u,A){var L={text:u,event:A};this.commands.exec("paste",this,L)},d.prototype.$handlePaste=function(u){typeof u=="string"&&(u={text:u}),this._signal("paste",u);var A=u.text,L=A===M.lineMode,T=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)L?T.insert({row:this.selection.lead.row,column:0},A):this.insert(A);else if(L)this.selection.rangeList.ranges.forEach(function(W){T.insert({row:W.start.row,column:0},A)});else{var I=A.split(/\r\n|\r|\n/),D=this.selection.rangeList.ranges,O=I.length==2&&(!I[0]||!I[1]);if(I.length!=D.length||O)return this.commands.exec("insertstring",this,A);for(var F=D.length;F--;){var N=D[F];N.isEmpty()||T.remove(N),T.insert(N.start,I[F])}}},d.prototype.execCommand=function(u,A){return this.commands.exec(u,this,A)},d.prototype.insert=function(u,A){var L=this.session,T=L.getMode(),I=this.getCursorPosition();if(this.getBehavioursEnabled()&&!A){var D=T.transformAction(L.getState(I.row),"insertion",this,L,u);D&&(u!==D.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),u=D.text)}if(u=="	"&&(u=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&u.indexOf(`
`)==-1){var O=l.fromPoints(I,I);O.end.column+=u.length,this.session.remove(O)}}else{var O=this.getSelectionRange();I=this.session.remove(O),this.clearSelection()}if(u==`
`||u==`\r
`){var B=L.getLine(I.row);if(I.column>B.search(/\S|$/)){var F=B.substr(I.column).search(/\S|$/);L.doc.removeInLine(I.row,I.column,I.column+F)}}this.clearSelection();var N=I.column,W=L.getState(I.row),B=L.getLine(I.row),z=T.checkOutdent(W,B,u);if(L.insert(I,u),D&&D.selection&&(D.selection.length==2?this.selection.setSelectionRange(new l(I.row,N+D.selection[0],I.row,N+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(u)){var P=T.getNextLineIndent(W,B.slice(0,I.column),L.getTabString());L.insert({row:I.row+1,column:0},P)}z&&T.autoOutdent(W,L,I.row)}},d.prototype.autoIndent=function(){for(var u=this.session,A=u.getMode(),L=this.selection.isEmpty()?[new l(0,0,u.doc.getLength()-1,0)]:this.selection.getAllRanges(),T="",I="",D="",O=u.getTabString(),F=0;F<L.length;F++)for(var N=L[F].start.row,W=L[F].end.row,B=N;B<=W;B++){B>0&&(T=u.getState(B-1),I=u.getLine(B-1),D=A.getNextLineIndent(T,I,O));var z=u.getLine(B),P=A.$getIndent(z);if(D!==P){if(P.length>0){var G=new l(B,0,B,P.length);u.remove(G)}D.length>0&&u.insert({row:B,column:0},D)}A.autoOutdent(T,u,B)}},d.prototype.onTextInput=function(u,A){if(!A)return this.keyBinding.onTextInput(u);this.startOperation({command:{name:"insertstring"}});var L=this.applyComposition.bind(this,u,A);this.selection.rangeCount?this.forEachSelection(L):L(),this.endOperation()},d.prototype.applyComposition=function(u,A){if(A.extendLeft||A.extendRight){var L=this.selection.getRange();L.start.column-=A.extendLeft,L.end.column+=A.extendRight,L.start.column<0&&(L.start.row--,L.start.column+=this.session.getLine(L.start.row).length+1),this.selection.setRange(L),!u&&!L.isEmpty()&&this.remove()}if((u||!this.selection.isEmpty())&&this.insert(u,!0),A.restoreStart||A.restoreEnd){var L=this.selection.getRange();L.start.column-=A.restoreStart,L.end.column-=A.restoreEnd,this.selection.setRange(L)}},d.prototype.onCommandKey=function(u,A,L){return this.keyBinding.onCommandKey(u,A,L)},d.prototype.setOverwrite=function(u){this.session.setOverwrite(u)},d.prototype.getOverwrite=function(){return this.session.getOverwrite()},d.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},d.prototype.setScrollSpeed=function(u){this.setOption("scrollSpeed",u)},d.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},d.prototype.setDragDelay=function(u){this.setOption("dragDelay",u)},d.prototype.getDragDelay=function(){return this.getOption("dragDelay")},d.prototype.setSelectionStyle=function(u){this.setOption("selectionStyle",u)},d.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},d.prototype.setHighlightActiveLine=function(u){this.setOption("highlightActiveLine",u)},d.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},d.prototype.setHighlightGutterLine=function(u){this.setOption("highlightGutterLine",u)},d.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},d.prototype.setHighlightSelectedWord=function(u){this.setOption("highlightSelectedWord",u)},d.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},d.prototype.setAnimatedScroll=function(u){this.renderer.setAnimatedScroll(u)},d.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},d.prototype.setShowInvisibles=function(u){this.renderer.setShowInvisibles(u)},d.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},d.prototype.setDisplayIndentGuides=function(u){this.renderer.setDisplayIndentGuides(u)},d.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},d.prototype.setHighlightIndentGuides=function(u){this.renderer.setHighlightIndentGuides(u)},d.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},d.prototype.setShowPrintMargin=function(u){this.renderer.setShowPrintMargin(u)},d.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},d.prototype.setPrintMarginColumn=function(u){this.renderer.setPrintMarginColumn(u)},d.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},d.prototype.setReadOnly=function(u){this.setOption("readOnly",u)},d.prototype.getReadOnly=function(){return this.getOption("readOnly")},d.prototype.setBehavioursEnabled=function(u){this.setOption("behavioursEnabled",u)},d.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},d.prototype.setWrapBehavioursEnabled=function(u){this.setOption("wrapBehavioursEnabled",u)},d.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},d.prototype.setShowFoldWidgets=function(u){this.setOption("showFoldWidgets",u)},d.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},d.prototype.setFadeFoldWidgets=function(u){this.setOption("fadeFoldWidgets",u)},d.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},d.prototype.remove=function(u){this.selection.isEmpty()&&(u=="left"?this.selection.selectLeft():this.selection.selectRight());var A=this.getSelectionRange();if(this.getBehavioursEnabled()){var L=this.session,T=L.getState(A.start.row),I=L.getMode().transformAction(T,"deletion",this,L,A);if(A.end.column===0){var D=L.getTextRange(A);if(D[D.length-1]==`
`){var O=L.getLine(A.end.row);/^\s+$/.test(O)&&(A.end.column=O.length)}}I&&(A=I)}this.session.remove(A),this.clearSelection()},d.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},d.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},d.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},d.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var u=this.getSelectionRange();u.start.column==u.end.column&&u.start.row==u.end.row&&(u.end.column=0,u.end.row++),this.session.remove(u),this.clearSelection()},d.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var u=this.getCursorPosition();this.insert(`
`),this.moveCursorToPosition(u)},d.prototype.setGhostText=function(u,A){this.renderer.setGhostText(u,A)},d.prototype.removeGhostText=function(){this.renderer.removeGhostText()},d.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var u=this.getCursorPosition(),A=u.column;if(A!==0){var L=this.session.getLine(u.row),T,I;A<L.length?(T=L.charAt(A)+L.charAt(A-1),I=new l(u.row,A-1,u.row,A+1)):(T=L.charAt(A-1)+L.charAt(A-2),I=new l(u.row,A-2,u.row,A)),this.session.replace(I,T),this.session.selection.moveToPosition(I.end)}}},d.prototype.toLowerCase=function(){var u=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var A=this.getSelectionRange(),L=this.session.getTextRange(A);this.session.replace(A,L.toLowerCase()),this.selection.setSelectionRange(u)},d.prototype.toUpperCase=function(){var u=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var A=this.getSelectionRange(),L=this.session.getTextRange(A);this.session.replace(A,L.toUpperCase()),this.selection.setSelectionRange(u)},d.prototype.indent=function(){var u=this.session,A=this.getSelectionRange();if(A.start.row<A.end.row){var L=this.$getSelectedRows();u.indentRows(L.first,L.last,"	");return}else if(A.start.column<A.end.column){var T=u.getTextRange(A);if(!/^\s+$/.test(T)){var L=this.$getSelectedRows();u.indentRows(L.first,L.last,"	");return}}var I=u.getLine(A.start.row),D=A.start,O=u.getTabSize(),F=u.documentToScreenColumn(D.row,D.column);if(this.session.getUseSoftTabs())var N=O-F%O,W=s.stringRepeat(" ",N);else{for(var N=F%O;I[A.start.column-1]==" "&&N;)A.start.column--,N--;this.selection.setSelectionRange(A),W="	"}return this.insert(W)},d.prototype.blockIndent=function(){var u=this.$getSelectedRows();this.session.indentRows(u.first,u.last,"	")},d.prototype.blockOutdent=function(){var u=this.session.getSelection();this.session.outdentRows(u.getRange())},d.prototype.sortLines=function(){for(var u=this.$getSelectedRows(),A=this.session,L=[],T=u.first;T<=u.last;T++)L.push(A.getLine(T));L.sort(function(O,F){return O.toLowerCase()<F.toLowerCase()?-1:O.toLowerCase()>F.toLowerCase()?1:0});for(var I=new l(0,0,0,0),T=u.first;T<=u.last;T++){var D=A.getLine(T);I.start.row=T,I.end.row=T,I.end.column=D.length,A.replace(I,L[T-u.first])}},d.prototype.toggleCommentLines=function(){var u=this.session.getState(this.getCursorPosition().row),A=this.$getSelectedRows();this.session.getMode().toggleCommentLines(u,this.session,A.first,A.last)},d.prototype.toggleBlockComment=function(){var u=this.getCursorPosition(),A=this.session.getState(u.row),L=this.getSelectionRange();this.session.getMode().toggleBlockComment(A,this.session,L,u)},d.prototype.getNumberAt=function(u,A){var L=/[\-]?[0-9]+(?:\.[0-9]+)?/g;L.lastIndex=0;for(var T=this.session.getLine(u);L.lastIndex<A;){var I=L.exec(T);if(I.index<=A&&I.index+I[0].length>=A){var D={value:I[0],start:I.index,end:I.index+I[0].length};return D}}return null},d.prototype.modifyNumber=function(u){var A=this.selection.getCursor().row,L=this.selection.getCursor().column,T=new l(A,L-1,A,L),I=this.session.getTextRange(T);if(!isNaN(parseFloat(I))&&isFinite(I)){var D=this.getNumberAt(A,L);if(D){var O=D.value.indexOf(".")>=0?D.start+D.value.indexOf(".")+1:D.end,F=D.start+D.value.length-O,N=parseFloat(D.value);N*=Math.pow(10,F),O!==D.end&&L<O?u*=Math.pow(10,D.end-L-1):u*=Math.pow(10,D.end-L),N+=u,N/=Math.pow(10,F);var W=N.toFixed(F),B=new l(A,D.start,A,D.end);this.session.replace(B,W),this.moveCursorTo(A,Math.max(D.start+1,L+W.length-D.value.length))}}else this.toggleWord()},d.prototype.toggleWord=function(){var u=this.selection.getCursor().row,A=this.selection.getCursor().column;this.selection.selectWord();var L=this.getSelectedText(),T=this.selection.getWordRange().start.column,I=L.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),D=A-T-1;D<0&&(D=0);var O=0,F=0,N=this;L.match(/[A-Za-z0-9_]+/)&&I.forEach(function(j,X){F=O+j.length,D>=O&&D<=F&&(L=j,N.selection.clearSelection(),N.moveCursorTo(u,O+T),N.selection.selectTo(u,F+T)),O=F});for(var W=this.$toggleWordPairs,B,z=0;z<W.length;z++)for(var P=W[z],G=0;G<=1;G++){var V=+!G,U=L.match(new RegExp("^\\s?_?("+s.escapeRegExp(P[G])+")\\s?$","i"));if(U){var Y=L.match(new RegExp("([_]|^|\\s)("+s.escapeRegExp(U[1])+")($|\\s)","g"));Y&&(B=L.replace(new RegExp(s.escapeRegExp(P[G]),"i"),function(j){var X=P[V];return j.toUpperCase()==j?X=X.toUpperCase():j.charAt(0).toUpperCase()==j.charAt(0)&&(X=X.substr(0,0)+P[V].charAt(0).toUpperCase()+X.substr(1)),X}),this.insert(B),B="")}}},d.prototype.findLinkAt=function(u,A){var L,T,I=this.session.getLine(u),D=I.split(/((?:https?|ftp):\/\/[\S]+)/),O=A;O<0&&(O=0);var F=0,N=0,W;try{for(var B=x(D),z=B.next();!z.done;z=B.next()){var P=z.value;if(N=F+P.length,O>=F&&O<=N&&P.match(/((?:https?|ftp):\/\/[\S]+)/)){W=P.replace(/[\s:.,'";}\]]+$/,"");break}F=N}}catch(G){L={error:G}}finally{try{z&&!z.done&&(T=B.return)&&T.call(B)}finally{if(L)throw L.error}}return W},d.prototype.openLink=function(){var u=this.selection.getCursor(),A=this.findLinkAt(u.row,u.column);return A&&window.open(A,"_blank"),A!=null},d.prototype.removeLines=function(){var u=this.$getSelectedRows();this.session.removeFullLines(u.first,u.last),this.clearSelection()},d.prototype.duplicateSelection=function(){var u=this.selection,A=this.session,L=u.getRange(),T=u.isBackwards();if(L.isEmpty()){var I=L.start.row;A.duplicateLines(I,I)}else{var D=T?L.start:L.end,O=A.insert(D,A.getTextRange(L));L.start=D,L.end=O,u.setSelectionRange(L,T)}},d.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},d.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},d.prototype.moveText=function(u,A,L){return this.session.moveText(u,A,L)},d.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},d.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},d.prototype.$moveLines=function(u,A){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,A?0:u),A&&u==-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 F=0,N=0,W=O.length,B=0;B<W;B++){var z=B;O[B].moveBy(F,0),L=this.$getSelectedRows(O[B]);for(var P=L.first,G=L.last;++B<W;){N&&O[B].moveBy(N,0);var V=this.$getSelectedRows(O[B]);if(A&&V.first!=G)break;if(!A&&V.first>G+1)break;G=V.last}for(B--,F=this.session.$moveLines(P,G,A?0:u),A&&u==-1&&(z=B+1);z<=B;)O[z].moveBy(F,0),z++;A||(F=0),N+=F}I.fromOrientedRange(I.ranges[0]),I.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},d.prototype.$getSelectedRows=function(u){return u=(u||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(u.start.row),last:this.session.getRowFoldEnd(u.end.row)}},d.prototype.onCompositionStart=function(u){this.renderer.showComposition(u)},d.prototype.onCompositionUpdate=function(u){this.renderer.setCompositionText(u)},d.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},d.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},d.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},d.prototype.isRowVisible=function(u){return u>=this.getFirstVisibleRow()&&u<=this.getLastVisibleRow()},d.prototype.isRowFullyVisible=function(u){return u>=this.renderer.getFirstFullyVisibleRow()&&u<=this.renderer.getLastFullyVisibleRow()},d.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},d.prototype.$moveByPage=function(u,A){var L=this.renderer,T=this.renderer.layerConfig,I=u*Math.floor(T.height/T.lineHeight);A===!0?this.selection.$moveSelection(function(){this.moveCursorBy(I,0)}):A===!1&&(this.selection.moveCursorBy(I,0),this.selection.clearSelection());var D=L.scrollTop;L.scrollBy(0,I*T.lineHeight),A!=null&&L.scrollCursorIntoView(null,.5),L.animateScrolling(D)},d.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},d.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},d.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},d.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},d.prototype.scrollPageDown=function(){this.$moveByPage(1)},d.prototype.scrollPageUp=function(){this.$moveByPage(-1)},d.prototype.scrollToRow=function(u){this.renderer.scrollToRow(u)},d.prototype.scrollToLine=function(u,A,L,T){this.renderer.scrollToLine(u,A,L,T)},d.prototype.centerSelection=function(){var u=this.getSelectionRange(),A={row:Math.floor(u.start.row+(u.end.row-u.start.row)/2),column:Math.floor(u.start.column+(u.end.column-u.start.column)/2)};this.renderer.alignCursor(A,.5)},d.prototype.getCursorPosition=function(){return this.selection.getCursor()},d.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},d.prototype.getSelectionRange=function(){return this.selection.getRange()},d.prototype.selectAll=function(){this.selection.selectAll()},d.prototype.clearSelection=function(){this.selection.clearSelection()},d.prototype.moveCursorTo=function(u,A){this.selection.moveCursorTo(u,A)},d.prototype.moveCursorToPosition=function(u){this.selection.moveCursorToPosition(u)},d.prototype.jumpToMatching=function(u,A){var L=this.getCursorPosition(),T=new S(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 F,N=!1,W={},B=L.column-O.start,z,P={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(O.value.match(/[{}()\[\]]/g)){for(;B<O.value.length&&!N;B++)if(P[O.value[B]])switch(z=P[O.value[B]]+"."+O.type.replace("rparen","lparen"),isNaN(W[z])&&(W[z]=0),O.value[B]){case"(":case"[":case"{":W[z]++;break;case")":case"]":case"}":W[z]--,W[z]===-1&&(F="bracket",N=!0);break}}else O.type.indexOf("tag-name")!==-1&&(isNaN(W[O.value])&&(W[O.value]=0),I.value==="<"&&D>1?W[O.value]++:I.value==="</"&&W[O.value]--,W[O.value]===-1&&(F="tag",N=!0));N||(I=O,D++,O=T.stepForward(),B=0)}while(O&&!N);if(F){var G,V;if(F==="bracket")G=this.session.getBracketRange(L),G||(G=new l(T.getCurrentTokenRow(),T.getCurrentTokenColumn()+B-1,T.getCurrentTokenRow(),T.getCurrentTokenColumn()+B-1),V=G.start,(A||V.row===L.row&&Math.abs(V.column-L.column)<2)&&(G=this.session.getBracketRange(V)));else if(F==="tag"){if(!O||O.type.indexOf("tag-name")===-1)return;if(G=new l(T.getCurrentTokenRow(),T.getCurrentTokenColumn()-2,T.getCurrentTokenRow(),T.getCurrentTokenColumn()-2),G.compare(L.row,L.column)===0){var U=this.session.getMatchingTags(L);U&&(U.openTag.contains(L.row,L.column)?(G=U.closeTag,V=G.start):(G=U.openTag,U.closeTag.start.row===L.row&&U.closeTag.start.column===L.column?V=G.end:V=G.start))}V=V||G.start}V=G&&G.cursor||V,V&&(u?G&&A?this.selection.setRange(G):G&&G.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(V.row,V.column):this.selection.moveTo(V.row,V.column))}}},d.prototype.gotoLine=function(u,A,L){this.selection.clearSelection(),this.session.unfold({row:u-1,column:A||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(u-1,A||0),this.isRowFullyVisible(u-1)||this.scrollToLine(u-1,!0,L)},d.prototype.navigateTo=function(u,A){this.selection.moveTo(u,A)},d.prototype.navigateUp=function(u){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var A=this.selection.anchor.getPosition();return this.moveCursorToPosition(A)}this.selection.clearSelection(),this.selection.moveCursorBy(-u||-1,0)},d.prototype.navigateDown=function(u){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var A=this.selection.anchor.getPosition();return this.moveCursorToPosition(A)}this.selection.clearSelection(),this.selection.moveCursorBy(u||1,0)},d.prototype.navigateLeft=function(u){if(this.selection.isEmpty())for(u=u||1;u--;)this.selection.moveCursorLeft();else{var A=this.getSelectionRange().start;this.moveCursorToPosition(A)}this.clearSelection()},d.prototype.navigateRight=function(u){if(this.selection.isEmpty())for(u=u||1;u--;)this.selection.moveCursorRight();else{var A=this.getSelectionRange().end;this.moveCursorToPosition(A)}this.clearSelection()},d.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},d.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},d.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},d.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},d.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},d.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},d.prototype.replace=function(u,A){A&&this.$search.set(A);var L=this.$search.find(this.session),T=0;return L&&(this.$tryReplace(L,u)&&(T=1),this.selection.setSelectionRange(L),this.renderer.scrollSelectionIntoView(L.start,L.end)),T},d.prototype.replaceAll=function(u,A){A&&this.$search.set(A);var L=this.$search.findAll(this.session),T=0;if(!L.length)return T;var I=this.getSelectionRange();this.selection.moveTo(0,0);for(var D=L.length-1;D>=0;--D)this.$tryReplace(L[D],u)&&T++;return this.selection.setSelectionRange(I),T},d.prototype.$tryReplace=function(u,A){var L=this.session.getTextRange(u);return A=this.$search.replace(L,A),A!==null?(u.end=this.session.replace(u,A),u):null},d.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},d.prototype.find=function(u,A,L){A||(A={}),typeof u=="string"||u instanceof RegExp?A.needle=u:typeof u=="object"&&$.mixin(A,u);var T=this.selection.getRange();A.needle==null&&(u=this.session.getTextRange(T)||this.$search.$options.needle,u||(T=this.session.getWordRange(T.start.row,T.start.column),u=this.session.getTextRange(T)),this.$search.set({needle:u})),this.$search.set(A),A.start||this.$search.set({start:T});var I=this.$search.find(this.session);if(A.preventScroll)return I;if(I)return this.revealRange(I,L),I;A.backwards?T.start=T.end:T.end=T.start,this.selection.setRange(T)},d.prototype.findNext=function(u,A){this.find({skipCurrent:!0,backwards:!1},u,A)},d.prototype.findPrevious=function(u,A){this.find(u,{skipCurrent:!0,backwards:!0},A)},d.prototype.revealRange=function(u,A){this.session.unfold(u),this.selection.setSelectionRange(u);var L=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(u.start,u.end,.5),A!==!1&&this.renderer.animateScrolling(L)},d.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},d.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},d.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(u){u.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()},d.prototype.setAutoScrollEditorIntoView=function(u){if(u){var A,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&&(A=L.renderer.container.getBoundingClientRect())}),F=this.renderer.on("afterRender",function(){if(T&&A&&(L.isFocused()||L.searchBox&&L.searchBox.isFocused())){var N=L.renderer,W=N.$cursorLayer.$pixelPos,B=N.layerConfig,z=W.top-B.offset;W.top>=0&&z+A.top<0?T=!0:W.top<B.height&&W.top+A.top+B.lineHeight>window.innerHeight?T=!1:T=null,T!=null&&(I.style.top=z+"px",I.style.left=W.left+"px",I.style.height=B.lineHeight+"px",I.scrollIntoView(T)),T=A=null}});this.setAutoScrollEditorIntoView=function(N){N||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",D),this.renderer.off("afterRender",F),this.renderer.off("beforeRender",O))}}},d.prototype.$resetCursorStyle=function(){var u=this.$cursorStyle||"ace",A=this.renderer.$cursorLayer;A&&(A.setSmoothBlinking(/smooth/.test(u)),A.isBlinking=!this.$readOnly&&u!="wide",w.setCssClass(A.element,"ace_slim-cursors",/slim/.test(u)))},d.prototype.prompt=function(u,A,L){var T=this;m.loadModule("ace/ext/prompt",function(I){I.prompt(T,u,A,L)})},Object.defineProperty(d.prototype,"hoverTooltip",{get:function(){return this.$hoverTooltip||(this.$hoverTooltip=new R(this.container))},set:function(u){this.$hoverTooltip&&this.$hoverTooltip.destroy(),this.$hoverTooltip=u},enumerable:!1,configurable:!0}),d})();b.$uid=0,b.prototype.curOp=null,b.prototype.prevOp={},b.prototype.$mergeableCommands=["backspace","del","insertstring"],b.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"],["&&","||"],["==","!="]],$.implement(b.prototype,h),m.defineOptions(b.prototype,"editor",{selectionStyle:{set:function(d){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:d})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(d){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(d){var u=this;if(this.textInput.setReadOnly(d),!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){var I=w.createElement("div");I.textContent=g("editor.tooltip.disable-editing","Editing is disabled"),u.hoverTooltip.isOpen||u.hoverTooltip.showForRange(u,u.getSelectionRange(),I)}else u.hoverTooltip&&u.hoverTooltip.isOpen&&u.hoverTooltip.hide()});var A=this.textInput.getElement();d?(_.addListener(A,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(_.removeListener(A,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback))}},initialValue:!1},copyWithEmptySelection:{set:function(d){this.textInput.setCopyWithEmptySelection(d)},initialValue:!1},cursorStyle:{set:function(d){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(d){this.setAutoScrollEditorIntoView(d)}},keyboardHandler:{set:function(d){this.setKeyboardHandler(d)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(d){this.session.setValue(d)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(d){this.setSession(d)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(d){this.renderer.$gutterLayer.setShowLineNumbers(d),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),d&&this.$relativeLineNumbers?v.attach(this):v.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(d){this.$showLineNumbers&&d?v.attach(this):v.detach(this)}},placeholder:{set:function(d){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var u=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(u&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),w.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!u&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),w.addCssClass(this.container,"ace_hasPlaceholder");var A=w.createElement("div");A.className="ace_placeholder",A.textContent=this.$placeholder||"",this.renderer.placeholderNode=A,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!u&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(d){var u={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(T){T.blur(),T.renderer.scroller.focus()},readOnly:!0},A=function(T){if(T.target==this.renderer.scroller&&T.keyCode===k.enter){T.preventDefault();var I=this.getCursorPosition().row;this.isRowVisible(I)||this.scrollToLine(I,!0,!0),this.focus()}},L;d?(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",g("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",g("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",A.bind(this)),this.commands.addCommand(u),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",g("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",g("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 C(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",A.bind(this)),this.commands.removeCommand(u),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),L&&L.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(d){this.$textInputAriaLabel=d},initialValue:""},enableMobileMenu:{set:function(d){this.$enableMobileMenu=d},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 v={getText:function(d,u){return(Math.abs(d.selection.lead.row-u)||u+1+(u<9?"\xB7":""))+""},getWidth:function(d,u,A){return Math.max(u.toString().length,(A.lastRow+1).toString().length,2)*A.characterWidth},update:function(d,u){u.renderer.$loop.schedule(u.renderer.CHANGE_GUTTER)},attach:function(d){d.renderer.$gutterLayer.$renderer=this,d.on("changeSelection",this.update),this.update(null,d)},detach:function(d){d.renderer.$gutterLayer.$renderer==this&&(d.renderer.$gutterLayer.$renderer=null),d.off("changeSelection",this.update),this.update(null,d)}};c.Editor=b});ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(y,c,E){"use strict";var x=y("../lib/dom"),$=(function(){function w(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 w.prototype.moveContainer=function(s){x.translate(this.element,0,-(s.firstRowScreen*s.lineHeight%this.canvasHeight)-s.offset*this.$offsetCoefficient)},w.prototype.pageChanged=function(s,a){return Math.floor(s.firstRowScreen*s.lineHeight/this.canvasHeight)!==Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)},w.prototype.computeLineTop=function(s,a,r){var o=a.firstRowScreen*a.lineHeight,i=Math.floor(o/this.canvasHeight),t=r.documentToScreenRow(s,0)*a.lineHeight;return t-i*this.canvasHeight},w.prototype.computeLineHeight=function(s,a,r){return a.lineHeight*r.getRowLineCount(s)},w.prototype.getLength=function(){return this.cells.length},w.prototype.get=function(s){return this.cells[s]},w.prototype.shift=function(){this.$cacheCell(this.cells.shift())},w.prototype.pop=function(){this.$cacheCell(this.cells.pop())},w.prototype.push=function(s){if(Array.isArray(s)){this.cells.push.apply(this.cells,s);for(var a=x.createFragment(this.element),r=0;r<s.length;r++)a.appendChild(s[r].element);this.element.appendChild(a)}else this.cells.push(s),this.element.appendChild(s.element)},w.prototype.unshift=function(s){if(Array.isArray(s)){this.cells.unshift.apply(this.cells,s);for(var a=x.createFragment(this.element),r=0;r<s.length;r++)a.appendChild(s[r].element);this.element.firstChild?this.element.insertBefore(a,this.element.firstChild):this.element.appendChild(a)}else this.cells.unshift(s),this.element.insertAdjacentElement("afterbegin",s.element)},w.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},w.prototype.$cacheCell=function(s){s&&(s.element.remove(),this.cellCache.push(s))},w.prototype.createCell=function(s,a,r,o){var i=this.cellCache.pop();if(!i){var t=x.createElement("div");o&&o(t),this.element.appendChild(t),i={element:t,text:"",row:s}}return i.row=s,i},w})();c.Lines=$});ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(y,c,E){"use strict";var x=y("../lib/dom"),$=y("../lib/oop"),w=y("../lib/lang"),s=y("../lib/event_emitter").EventEmitter,a=y("./lines").Lines,r=y("../config").nls,o=(function(){function t(e){this.$showCursorMarker=null,this.element=x.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new a(this.element),this.$lines.$offsetCoefficient=1}return t.prototype.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},t.prototype.addGutterDecoration=function(e,n){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,n)},t.prototype.removeGutterDecoration=function(e,n){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,n)},t.prototype.setAnnotations=function(e){this.$annotations=[];for(var n=0;n<e.length;n++){var l=e[n],h=l.row,f=this.$annotations[h];f||(f=this.$annotations[h]={text:[],type:[],displayText:[]});var p=l.text,m=l.text,S=l.type;p=p?w.escapeHTML(p):l.html||"",m=m||l.html||"",f.text.indexOf(p)===-1&&(f.text.push(p),f.type.push(S),f.displayText.push(m));var C=l.className;C?f.className=C:S==="error"?f.className=" ace_error":S==="security"&&!/\bace_error\b/.test(f.className)?f.className=" ace_security":S==="warning"&&!/\bace_(error|security)\b/.test(f.className)?f.className=" ace_warning":S==="info"&&!f.className?f.className=" ace_info":S==="hint"&&!f.className&&(f.className=" ace_hint")}},t.prototype.$updateAnnotations=function(e){if(this.$annotations.length){var n=e.start.row,l=e.end.row-n;if(l!==0)if(e.action=="remove")this.$annotations.splice(n,l+1,null);else{var h=new Array(l+1);h.unshift(n,1),this.$annotations.splice.apply(this.$annotations,h)}}},t.prototype.update=function(e){this.config=e;var n=this.session,l=e.firstRow,h=Math.min(e.lastRow+e.gutterOffset,n.getLength()-1);this.oldLastRow=h,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var f=n.getNextFoldLine(l),p=f?f.start.row:1/0,m=null,S=-1,C=l;;){if(C>p&&(C=f.end.row+1,f=n.getNextFoldLine(C,f),p=f?f.start.row:1/0),C>h){for(;this.$lines.getLength()>S+1;)this.$lines.pop();break}m=this.$lines.get(++S),m?m.row=C:(m=this.$lines.createCell(C,e,this.session,i),this.$lines.push(m)),this.$renderCell(m,e,f,C),C++}this._signal("afterRender"),this.$updateGutterWidth(e),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},t.prototype.$updateGutterWidth=function(e){var n=this.session,l=n.gutterRenderer||this.$renderer,h=n.$firstLineNumber,f=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||n.$useWrapMode)&&(f=n.getLength()+h-1);var p=l?l.getWidth(n,f,e):f.toString().length*e.characterWidth,m=this.$padding||this.$computePadding();p+=m.left+m.right,p!==this.gutterWidth&&!isNaN(p)&&(this.gutterWidth=p,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",p))},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 n=this.$lines.cells;this.$cursorCell=null;for(var l=0;l<n.length;l++){var h=n[l];if(h.row>=this.$cursorRow){if(h.row>this.$cursorRow){var f=this.session.getFoldLine(this.$cursorRow);if(l>0&&f&&f.start.row==n[l-1].row)h=n[l-1];else break}h.element.className="ace_gutter-active-line "+h.element.className,this.$cursorCell=h;break}}}}},t.prototype.$updateCursorMarker=function(){if(this.session){var e=this.session;this.$highlightElement||(this.$highlightElement=x.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var n=e.selection.cursor,l=this.config,h=this.$lines,f=l.firstRowScreen*l.lineHeight,p=Math.floor(f/h.canvasHeight),m=e.documentToScreenRow(n)*l.lineHeight,S=m-p*h.canvasHeight;x.setStyle(this.$highlightElement.style,"height",l.lineHeight+"px"),x.setStyle(this.$highlightElement.style,"top",S+"px")}},t.prototype.scrollLines=function(e){var n=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(n,e))return this.update(e);this.$lines.moveContainer(e);var l=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),h=this.oldLastRow;if(this.oldLastRow=l,!n||h<e.firstRow)return this.update(e);if(l<n.firstRow)return this.update(e);if(n.firstRow<e.firstRow)for(var f=this.session.getFoldedRowCount(n.firstRow,e.firstRow-1);f>0;f--)this.$lines.shift();if(h>l)for(var f=this.session.getFoldedRowCount(l+1,h);f>0;f--)this.$lines.pop();e.firstRow<n.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,n.firstRow-1)),l>h&&this.$lines.push(this.$renderLines(e,h+1,l)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},t.prototype.$renderLines=function(e,n,l){for(var h=[],f=n,p=this.session.getNextFoldLine(f),m=p?p.start.row:1/0;f>m&&(f=p.end.row+1,p=this.session.getNextFoldLine(f,p),m=p?p.start.row:1/0),!(f>l);){var S=this.$lines.createCell(f,e,this.session,i);this.$renderCell(S,e,p,f),h.push(S),f++}return h},t.prototype.$renderCell=function(e,n,l,h){var f=e.element,p=this.session,m=f.childNodes[0],S=f.childNodes[1],C=f.childNodes[2],g=f.childNodes[3],M=C.firstChild,k=p.$firstLineNumber,_=p.$breakpoints,R=p.$decorations,b=p.gutterRenderer||this.$renderer,v=this.$showFoldWidgets&&p.foldWidgets,d=l?l.start.row:Number.MAX_VALUE,u=n.lineHeight+"px",A=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",L=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",T=(b?b.getText(p,h):h+k).toString();if(this.$highlightGutterLine&&(h==this.$cursorRow||l&&h<this.$cursorRow&&h>=d&&this.$cursorRow<=l.end.row)&&(A+="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)),_[h]&&(A+=_[h]),R[h]&&(A+=R[h]),this.$annotations[h]&&h!==d&&(A+=this.$annotations[h].className),v){var I=v[h];I==null&&(I=v[h]=p.getFoldWidget(h))}if(I){var D="ace_fold-widget ace_"+I,O=I=="start"&&h==d&&h<l.end.row;if(O){D+=" ace_closed";for(var F="",N=!1,W=h+1;W<=l.end.row;W++)if(this.$annotations[W]){if(this.$annotations[W].className===" ace_error"){N=!0,F=" ace_error_fold";break}this.$annotations[W].className===" ace_security"?(N=!0,F=" ace_security_fold"):this.$annotations[W].className===" ace_warning"&&F!==" ace_security_fold"&&(N=!0,F=" ace_warning_fold")}A+=F}else D+=" ace_open";S.className!=D&&(S.className=D),x.setStyle(S.style,"height",u),x.setStyle(S.style,"display","inline-block"),S.setAttribute("role","button"),S.setAttribute("tabindex","-1");var B=p.getFoldWidgetRange(h);B?S.setAttribute("aria-label",r("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[B.start.row+1,B.end.row+1])):l?S.setAttribute("aria-label",r("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[l.start.row+1,l.end.row+1])):S.setAttribute("aria-label",r("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[h+1])),O?(S.setAttribute("aria-expanded","false"),S.setAttribute("title",r("gutter.code-folding.closed.title","Unfold code"))):(S.setAttribute("aria-expanded","true"),S.setAttribute("title",r("gutter.code-folding.open.title","Fold code")))}else S&&(x.setStyle(S.style,"display","none"),S.setAttribute("tabindex","0"),S.removeAttribute("role"),S.removeAttribute("aria-label"));var z=this.session.$gutterCustomWidgets[h];if(z?this.$addCustomWidget(h,z,e):g&&this.$removeCustomWidget(h,e),N&&this.$showFoldedAnnotations){C.className="ace_gutter_annotation",M.className=L,M.className+=F,x.setStyle(M.style,"height",u),x.setStyle(C.style,"display","block"),x.setStyle(C.style,"height",u);var P;switch(F){case" ace_error_fold":P=r("gutter.annotation.aria-label.error","Error, read annotations row $0",[T]);break;case" ace_security_fold":P=r("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[T]);break;case" ace_warning_fold":P=r("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[T]);break}C.setAttribute("aria-label",P),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else if(this.$annotations[h]){C.className="ace_gutter_annotation",M.className=L,this.$useSvgGutterIcons?M.className+=this.$annotations[h].className:f.classList.add(this.$annotations[h].className.replace(" ","")),x.setStyle(M.style,"height",u),x.setStyle(C.style,"display","block"),x.setStyle(C.style,"height",u);var P;switch(this.$annotations[h].className){case" ace_error":P=r("gutter.annotation.aria-label.error","Error, read annotations row $0",[T]);break;case" ace_security":P=r("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[T]);break;case" ace_warning":P=r("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[T]);break;case" ace_info":P=r("gutter.annotation.aria-label.info","Info, read annotations row $0",[T]);break;case" ace_hint":P=r("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[T]);break}C.setAttribute("aria-label",P),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else x.setStyle(C.style,"display","none"),C.removeAttribute("aria-label"),C.removeAttribute("role"),C.setAttribute("tabindex","0");return T!==m.data&&(m.data=T),f.className!=A&&(f.className=A),x.setStyle(e.element.style,"height",this.$lines.computeLineHeight(h,n,p)+"px"),x.setStyle(e.element.style,"top",this.$lines.computeLineTop(h,n,p)+"px"),e.text=T,C.style.display==="none"&&S.style.display==="none"&&!z?e.element.setAttribute("aria-hidden",!0):e.element.setAttribute("aria-hidden",!1),e},t.prototype.setHighlightGutterLine=function(e){this.$highlightGutterLine=e,!e&&this.$highlightElement&&(this.$highlightElement.remove(),this.$highlightElement=null)},t.prototype.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},t.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},t.prototype.setShowFoldWidgets=function(e){e?x.addCssClass(this.element,"ace_folding-enabled"):x.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},t.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},t.prototype.$hideFoldWidget=function(e,n){var l=n||this.$getGutterCell(e);if(l&&l.element){var h=l.element.childNodes[1];h&&x.setStyle(h.style,"display","none")}},t.prototype.$showFoldWidget=function(e,n){var l=n||this.$getGutterCell(e);if(l&&l.element){var h=l.element.childNodes[1];h&&this.session.foldWidgets&&this.session.foldWidgets[l.row]&&x.setStyle(h.style,"display","inline-block")}},t.prototype.$getGutterCell=function(e){var n=this.$lines.cells,l=0,h=n.length-1;if(!(e<n[0].row||e>n[h].row)){for(;l<=h;){var f=Math.floor((l+h)/2),p=n[f];if(p.row>e)h=f-1;else if(p.row<e)l=f+1;else return p}return p}},t.prototype.$addCustomWidget=function(e,n,l){var h=n.className,f=n.label,p=n.title,m=n.callbacks;this.session.$gutterCustomWidgets[e]={className:h,label:f,title:p,callbacks:m},this.$hideFoldWidget(e,l);var S=l||this.$getGutterCell(e);if(S&&S.element){var C=S.element.querySelector(".ace_custom-widget");C&&C.remove(),C=x.createElement("span"),C.className="ace_custom-widget ".concat(h),C.setAttribute("tabindex","-1"),C.setAttribute("role","button"),C.setAttribute("aria-label",f),C.setAttribute("title",p),x.setStyle(C.style,"display","inline-block"),x.setStyle(C.style,"height","inherit"),m&&m.onClick&&C.addEventListener("click",function(g){m.onClick(g,e),g.stopPropagation()}),S.element.appendChild(C)}},t.prototype.$removeCustomWidget=function(e,n){delete this.session.$gutterCustomWidgets[e],this.$showFoldWidget(e,n);var l=n||this.$getGutterCell(e);if(l&&l.element){var h=l.element.querySelector(".ace_custom-widget");h&&l.element.removeChild(h)}},t.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=x.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(e.borderLeftWidth)||0)+(parseInt(e.paddingLeft)||0)+1,this.$padding.right=(parseInt(e.borderRightWidth)||0)+(parseInt(e.paddingRight)||0),this.$padding},t.prototype.getRegion=function(e){var n=this.$padding||this.$computePadding(),l=this.element.getBoundingClientRect();if(e.x<n.left+l.left)return"markers";if(this.$showFoldWidgets&&e.x>l.right-n.right)return"foldWidgets"},t})();o.prototype.$fixedWidth=!1,o.prototype.$highlightGutterLine=!0,o.prototype.$renderer=void 0,o.prototype.$showLineNumbers=!0,o.prototype.$showFoldWidgets=!0,$.implement(o.prototype,s);function i(t){var e=document.createTextNode("");t.appendChild(e);var n=x.createElement("span");t.appendChild(n);var l=x.createElement("span");t.appendChild(l);var h=x.createElement("span");return l.appendChild(h),t}c.Gutter=o});ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(y,c,E){"use strict";var x=y("../range").Range,$=y("../lib/dom"),w=(function(){function a(r){this.element=$.createElement("div"),this.element.className="ace_layer ace_marker-layer",r.appendChild(this.element)}return a.prototype.setPadding=function(r){this.$padding=r},a.prototype.setSession=function(r){this.session=r},a.prototype.setMarkers=function(r){this.markers=r},a.prototype.elt=function(r,o){var i=this.i!=-1&&this.element.childNodes[this.i];i?this.i++:(i=document.createElement("div"),this.element.appendChild(i),this.i=-1),i.style.cssText=o,i.className=r},a.prototype.update=function(r){if(r){this.config=r,this.i=0;var o;for(var i in this.markers){var t=this.markers[i];if(!t.range){t.update(o,this,this.session,r);continue}var e=t.range.clipRows(r.firstRow,r.lastRow);if(!e.isEmpty())if(e=e.toScreenRange(this.session),t.renderer){var n=this.$getTop(e.start.row,r),l=this.$padding+e.start.column*r.characterWidth;t.renderer(o,e,l,n,r)}else t.type=="fullLine"?this.drawFullLineMarker(o,e,t.clazz,r):t.type=="screenLine"?this.drawScreenLineMarker(o,e,t.clazz,r):e.isMultiLine()?t.type=="text"?this.drawTextMarker(o,e,t.clazz,r):this.drawMultiLineMarker(o,e,t.clazz,r):this.drawSingleLineMarker(o,e,t.clazz+" ace_start ace_br15",r)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},a.prototype.$getTop=function(r,o){return(r-o.firstRowScreen)*o.lineHeight},a.prototype.drawTextMarker=function(r,o,i,t,e){for(var n=this.session,l=o.start.row,h=o.end.row,f=l,p=0,m=0,S=n.getScreenLastRowColumn(f),C=new x(f,o.start.column,f,m);f<=h;f++)C.start.row=C.end.row=f,C.start.column=f==l?o.start.column:n.getRowWrapIndent(f),C.end.column=S,p=m,m=S,S=f+1<h?n.getScreenLastRowColumn(f+1):f==h?0:o.end.column,this.drawSingleLineMarker(r,C,i+(f==l?" ace_start":"")+" ace_br"+s(f==l||f==l+1&&o.start.column,p<m,m>S,f==h),t,f==h?0:1,e)},a.prototype.drawMultiLineMarker=function(r,o,i,t,e){var n=this.$padding,l=t.lineHeight,h=this.$getTop(o.start.row,t),f=n+o.start.column*t.characterWidth;if(e=e||"",this.session.$bidiHandler.isBidiRow(o.start.row)){var p=o.clone();p.end.row=p.start.row,p.end.column=this.session.getLine(p.start.row).length,this.drawBidiSingleLineMarker(r,p,i+" ace_br1 ace_start",t,null,e)}else this.elt(i+" ace_br1 ace_start","height:"+l+"px;right:"+n+"px;top:"+h+"px;left:"+f+"px;"+(e||""));if(this.session.$bidiHandler.isBidiRow(o.end.row)){var p=o.clone();p.start.row=p.end.row,p.start.column=0,this.drawBidiSingleLineMarker(r,p,i+" ace_br12",t,null,e)}else{h=this.$getTop(o.end.row,t);var m=o.end.column*t.characterWidth;this.elt(i+" ace_br12","height:"+l+"px;width:"+m+"px;top:"+h+"px;left:"+n+"px;"+(e||""))}if(l=(o.end.row-o.start.row-1)*t.lineHeight,!(l<=0)){h=this.$getTop(o.start.row+1,t);var S=(o.start.column?1:0)|(o.end.column?0:8);this.elt(i+(S?" ace_br"+S:""),"height:"+l+"px;right:"+n+"px;top:"+h+"px;left:"+n+"px;"+(e||""))}},a.prototype.drawSingleLineMarker=function(r,o,i,t,e,n){if(this.session.$bidiHandler.isBidiRow(o.start.row))return this.drawBidiSingleLineMarker(r,o,i,t,e,n);var l=t.lineHeight,h=(o.end.column+(e||0)-o.start.column)*t.characterWidth,f=this.$getTop(o.start.row,t),p=this.$padding+o.start.column*t.characterWidth;this.elt(i,"height:"+l+"px;width:"+h+"px;top:"+f+"px;left:"+p+"px;"+(n||""))},a.prototype.drawBidiSingleLineMarker=function(r,o,i,t,e,n){var l=t.lineHeight,h=this.$getTop(o.start.row,t),f=this.$padding,p=this.session.$bidiHandler.getSelections(o.start.column,o.end.column);p.forEach(function(m){this.elt(i,"height:"+l+"px;width:"+(m.width+(e||0))+"px;top:"+h+"px;left:"+(f+m.left)+"px;"+(n||""))},this)},a.prototype.drawFullLineMarker=function(r,o,i,t,e){var n=this.$getTop(o.start.row,t),l=t.lineHeight;o.start.row!=o.end.row&&(l+=this.$getTop(o.end.row,t)-n),this.elt(i,"height:"+l+"px;top:"+n+"px;left:0;right:0;"+(e||""))},a.prototype.drawScreenLineMarker=function(r,o,i,t,e){var n=this.$getTop(o.start.row,t),l=t.lineHeight;this.elt(i,"height:"+l+"px;top:"+n+"px;left:0;right:0;"+(e||""))},a})();w.prototype.$padding=0;function s(a,r,o,i){return(a?1:0)|(r?2:0)|(o?4:0)|(i?8:0)}c.Marker=w});ace.define("ace/layer/text_util",["require","exports","module"],function(y,c,E){var x=new Set(["text","rparen","lparen"]);c.isTextToken=function($){return x.has($)}});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(y,c,E){"use strict";var x=y("../lib/oop"),$=y("../lib/dom"),w=y("../lib/lang"),s=y("./lines").Lines,a=y("../lib/event_emitter").EventEmitter,r=y("../config").nls,o=y("./text_util").isTextToken,i=(function(){function t(e){this.dom=$,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,n=e.getNewLineCharacter()==`
`&&e.getNewLineMode()!="windows",l=n?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(n){this._signal("changeCharacterSize",n)}.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 n=this.$tabStrings=[0],l=1;l<e+1;l++)if(this.showTabs){var h=this.dom.createElement("span");h.className="ace_invisible ace_invisible_tab",h.textContent=w.stringRepeat(this.TAB_CHAR,l),n.push(h)}else n.push(this.dom.createTextNode(w.stringRepeat(" ",l),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var f="ace_indent-guide",p=this.showSpaces?" ace_invisible ace_invisible_space":"",m=this.showSpaces?w.stringRepeat(this.SPACE_CHAR,this.tabSize):w.stringRepeat(" ",this.tabSize),S=this.showTabs?" ace_invisible ace_invisible_tab":"",C=this.showTabs?w.stringRepeat(this.TAB_CHAR,this.tabSize):m,h=this.dom.createElement("span");h.className=f+p,h.textContent=m,this.$tabStrings[" "]=h;var h=this.dom.createElement("span");h.className=f+S,h.textContent=C,this.$tabStrings["	"]=h}},t.prototype.updateLines=function(e,n,l){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var h=Math.max(n,e.firstRow),f=Math.min(l,e.lastRow),p=this.element.childNodes,m=0,C=e.firstRow;C<h;C++){var g=this.session.getFoldLine(C);if(g)if(g.containsRow(h)){h=g.start.row;break}else C=g.end.row;m++}for(var S=!1,C=h,g=this.session.getNextFoldLine(C),M=g?g.start.row:1/0;C>M&&(C=g.end.row+1,g=this.session.getNextFoldLine(C,g),M=g?g.start.row:1/0),!(C>f);){var k=p[m++];if(k){this.dom.removeChildren(k),this.$renderLine(k,C,C==M?g:!1),S&&(k.style.top=this.$lines.computeLineTop(C,e,this.session)+"px");var _=e.lineHeight*this.session.getRowLength(C)+"px";k.style.height!=_&&(S=!0,k.style.height=_)}C++}if(S)for(;m<this.$lines.cells.length;){var R=this.$lines.cells[m++];R.element.style.top=this.$lines.computeLineTop(R.row,e,this.session)+"px"}},t.prototype.scrollLines=function(e){var n=this.config;if(this.config=e,this.$lines.pageChanged(n,e))return this.update(e);this.$lines.moveContainer(e);var l=e.lastRow,h=n?n.lastRow:-1;if(!n||h<e.firstRow)return this.update(e);if(l<n.firstRow)return this.update(e);if(!n||n.lastRow<e.firstRow)return this.update(e);if(e.lastRow<n.firstRow)return this.update(e);if(n.firstRow<e.firstRow)for(var f=this.session.getFoldedRowCount(n.firstRow,e.firstRow-1);f>0;f--)this.$lines.shift();if(n.lastRow>e.lastRow)for(var f=this.session.getFoldedRowCount(e.lastRow+1,n.lastRow);f>0;f--)this.$lines.pop();e.firstRow<n.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,n.firstRow-1)),e.lastRow>n.lastRow&&this.$lines.push(this.$renderLinesFragment(e,n.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},t.prototype.$renderLinesFragment=function(e,n,l){for(var h=[],f=n,p=this.session.getNextFoldLine(f),m=p?p.start.row:1/0;f>m&&(f=p.end.row+1,p=this.session.getNextFoldLine(f,p),m=p?p.start.row:1/0),!(f>l);){var S=this.$lines.createCell(f,e,this.session),C=S.element;this.dom.removeChildren(C),$.setStyle(C.style,"height",this.$lines.computeLineHeight(f,e,this.session)+"px"),$.setStyle(C.style,"top",this.$lines.computeLineTop(f,e,this.session)+"px"),this.$renderLine(C,f,f==m?p:!1),this.$useLineGroups()?C.className="ace_line_group":C.className="ace_line",h.push(S),f++}return h},t.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var n=e.firstRow,l=e.lastRow,h=this.$lines;h.getLength();)h.pop();h.push(this.$renderLinesFragment(e,n,l))},t.prototype.$renderToken=function(e,n,l,h){for(var f=this,p=/(\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,m=this.dom.createFragment(this.element),S,C=0;S=p.exec(h);){var g=S[1],M=S[2],k=S[3],_=S[4],R=S[5];if(!(!f.showSpaces&&M)){var b=C!=S.index?h.slice(C,S.index):"";if(C=S.index+S[0].length,b&&m.appendChild(this.dom.createTextNode(b,this.element)),g){var v=f.session.getScreenTabSize(n+S.index),d=f.$tabStrings[v].cloneNode(!0);d.charCount=1,m.appendChild(d),n+=v-1}else if(M)if(f.showSpaces){var u=this.dom.createElement("span");u.className="ace_invisible ace_invisible_space",u.textContent=w.stringRepeat(f.SPACE_CHAR,M.length),m.appendChild(u)}else m.appendChild(this.dom.createTextNode(M,this.element));else if(k){var u=this.dom.createElement("span");u.className="ace_invisible ace_invisible_space ace_invalid",u.textContent=w.stringRepeat(f.SPACE_CHAR,k.length),m.appendChild(u)}else if(_){n+=1;var u=this.dom.createElement("span");u.style.width=f.config.characterWidth*2+"px",u.className=f.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",u.textContent=f.showSpaces?f.SPACE_CHAR:_,m.appendChild(u)}else if(R){n+=1;var u=this.dom.createElement("span");u.style.width=f.config.characterWidth*2+"px",u.className="ace_cjk",u.textContent=R,m.appendChild(u)}}}if(m.appendChild(this.dom.createTextNode(C?h.slice(C):h,this.element)),o(l.type))e.appendChild(m);else{var A="ace_"+l.type.replace(/\./g," ace_"),u=this.dom.createElement("span");l.type=="fold"&&(u.style.width=l.value.length*this.config.characterWidth+"px",u.setAttribute("title",r("inline-fold.closed.title","Unfold code"))),u.className=A,u.appendChild(m),e.appendChild(u)}return n+h.length},t.prototype.renderIndentGuide=function(e,n,l){var h=n.search(this.$indentGuideRe);if(h<=0||h>=l)return n;if(n[0]==" "){h-=h%this.tabSize;for(var f=h/this.tabSize,p=0;p<f;p++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),n.substr(h)}else if(n[0]=="	"){for(var p=0;p<h;p++){var m=this.$tabStrings["	"].cloneNode(!0);m.charCount=1,e.appendChild(m)}return this.$highlightIndentGuide(),n.substr(h)}return this.$highlightIndentGuide(),n},t.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var e=this.session.doc.$lines;if(e){var n=this.session.selection.getCursor(),l=/^\s*/.exec(this.session.doc.getLine(n.row))[0].length,h=Math.floor(l/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:h,start:n.row};var f=this.session.$bracketHighlight;if(f){for(var p=this.session.$bracketHighlight.ranges,m=0;m<p.length;m++)if(n.row!==p[m].start.row){this.$highlightIndentGuideMarker.end=p[m].start.row+1,n.row>p[m].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&e[n.row]!==""&&n.column===e[n.row].length){this.$highlightIndentGuideMarker.dir=1;for(var m=n.row+1;m<e.length;m++){var S=e[m],C=/^\s*/.exec(S)[0].length;if(S!==""&&(this.$highlightIndentGuideMarker.end=m,C<=l))break}}this.$renderHighlightIndentGuide()}}},t.prototype.$clearActiveIndentGuide=function(){for(var e=this.element.querySelectorAll(".ace_indent-guide-active"),n=0;n<e.length;n++)e[n].classList.remove("ace_indent-guide-active")},t.prototype.$setIndentGuideActive=function(e,n){var l=this.session.doc.getLine(e.row);if(l!==""){var h=e.element;if(e.element.classList&&e.element.classList.contains("ace_line_group"))if(e.element.childNodes.length>0)h=e.element.childNodes[0];else return;var f=h.childNodes;if(f){var p=f[n-1];p&&p.classList&&p.classList.contains("ace_indent-guide")&&p.classList.add("ace_indent-guide-active")}}},t.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var n=this.$highlightIndentGuideMarker.indentLevel;if(n!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var l=0;l<e.length;l++){var h=e[l];if(this.$highlightIndentGuideMarker.end&&h.row>=this.$highlightIndentGuideMarker.start+1){if(h.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(h,n)}}else for(var l=e.length-1;l>=0;l--){var h=e[l];if(this.$highlightIndentGuideMarker.end&&h.row<this.$highlightIndentGuideMarker.start){if(h.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(h,n)}}}},t.prototype.$createLineElement=function(e){var n=this.dom.createElement("div");return n.className="ace_line",n.style.height=this.config.lineHeight+"px",n},t.prototype.$renderWrappedLine=function(e,n,l){var h=0,f=0,p=l[0],m=0,S=this.$createLineElement();e.appendChild(S);for(var C=0;C<n.length;C++){var g=n[C],M=g.value;if(C==0&&this.displayIndentGuides){if(h=M.length,M=this.renderIndentGuide(S,M,p),!M)continue;h-=M.length}if(h+M.length<p)m=this.$renderToken(S,m,g,M),h+=M.length;else{for(;h+M.length>=p;){m=this.$renderToken(S,m,g,M.substring(0,p-h)),M=M.substring(p-h),h=p,S=this.$createLineElement(),e.appendChild(S);var k=this.dom.createTextNode(w.stringRepeat("\xA0",l.indent),this.element);k.charCount=0,S.appendChild(k),f++,m=0,p=l[f]||Number.MAX_VALUE}M.length!=0&&(h+=M.length,m=this.$renderToken(S,m,g,M))}}l[l.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(S,m,null,"",!0)},t.prototype.$renderSimpleLine=function(e,n){for(var l=0,h=0;h<n.length;h++){var f=n[h],p=f.value;if(!(h==0&&this.displayIndentGuides&&(p=this.renderIndentGuide(e,p),!p))){if(l+p.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,l,f,p);l=this.$renderToken(e,l,f,p)}}},t.prototype.$renderOverflowMessage=function(e,n,l,h,f){l&&this.$renderToken(e,n,l,h.slice(0,this.MAX_LINE_LENGTH-n));var p=this.dom.createElement("span");p.className="ace_inline_button ace_keyword ace_toggle_wrap",p.textContent=f?"<hide>":"<click to see more...>",e.appendChild(p)},t.prototype.$renderLine=function(e,n,l){if(!l&&l!=!1&&(l=this.session.getFoldLine(n)),l)var h=this.$getFoldLineTokens(n,l);else var h=this.session.getTokens(n);var f=e;if(h.length){var p=this.session.getRowSplitData(n);if(p&&p.length){this.$renderWrappedLine(e,h,p);var f=e.lastChild}else{var f=e;this.$useLineGroups()&&(f=this.$createLineElement(),e.appendChild(f)),this.$renderSimpleLine(f,h)}}else this.$useLineGroups()&&(f=this.$createLineElement(),e.appendChild(f));if(this.showEOL&&f){l&&(n=l.end.row);var m=this.dom.createElement("span");m.className="ace_invisible ace_invisible_eol",m.textContent=n==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,f.appendChild(m)}},t.prototype.$getFoldLineTokens=function(e,n){var l=this.session,h=[];function f(m,S,C){for(var g=0,M=0;M+m[g].value.length<S;)if(M+=m[g].value.length,g++,g==m.length)return;if(M!=S){var k=m[g].value.substring(S-M);k.length>C-S&&(k=k.substring(0,C-S)),h.push({type:m[g].type,value:k}),M=S+k.length,g+=1}for(;M<C&&g<m.length;){var k=m[g].value;k.length+M>C?h.push({type:m[g].type,value:k.substring(0,C-M)}):h.push(m[g]),M+=k.length,g+=1}}var p=l.getTokens(e);return n.walk(function(m,S,C,g,M){m!=null?h.push({type:"fold",value:m}):(M&&(p=l.getTokens(S)),p.length&&f(p,g,C))},n.end.row,this.session.getLine(n.end.row).length),h},t.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},t})();i.prototype.EOF_CHAR="\xB6",i.prototype.EOL_CHAR_LF="\xAC",i.prototype.EOL_CHAR_CRLF="\xA4",i.prototype.EOL_CHAR=i.prototype.EOL_CHAR_LF,i.prototype.TAB_CHAR="\u2014",i.prototype.SPACE_CHAR="\xB7",i.prototype.$padding=0,i.prototype.MAX_LINE_LENGTH=1e4,i.prototype.showInvisibles=!1,i.prototype.showSpaces=!1,i.prototype.showTabs=!1,i.prototype.showEOL=!1,i.prototype.displayIndentGuides=!0,i.prototype.$highlightIndentGuides=!0,i.prototype.$tabStrings=[],i.prototype.destroy={},i.prototype.onChangeTabSize=i.prototype.$computeTabString,x.implement(i.prototype,a),c.Text=i});ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(y,c,E){"use strict";var x=y("../lib/dom"),$=(function(){function w(s){this.element=x.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(),x.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return w.prototype.$updateOpacity=function(s){for(var a=this.cursors,r=a.length;r--;)x.setStyle(a[r].style,"opacity",s?"":"0")},w.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&&x.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},w.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,x.removeCssClass(this.element,"ace_animate-blinking")},w.prototype.setPadding=function(s){this.$padding=s},w.prototype.setSession=function(s){this.session=s},w.prototype.setBlinking=function(s){s!=this.isBlinking&&(this.isBlinking=s,this.restartTimer())},w.prototype.setBlinkInterval=function(s){s!=this.blinkInterval&&(this.blinkInterval=s,this.restartTimer())},w.prototype.setSmoothBlinking=function(s){s!=this.smoothBlinking&&(this.smoothBlinking=s,x.setCssClass(this.element,"ace_smooth-blinking",s),this.$updateCursors(!0),this.restartTimer())},w.prototype.addCursor=function(){var s=x.createElement("div");return s.className="ace_cursor",this.element.appendChild(s),this.cursors.push(s),s},w.prototype.removeCursor=function(){if(this.cursors.length>1){var s=this.cursors.pop();return s.parentNode.removeChild(s),s}},w.prototype.hideCursor=function(){this.isVisible=!1,x.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},w.prototype.showCursor=function(){this.isVisible=!0,x.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},w.prototype.restartTimer=function(){var s=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,x.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&&x.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),x.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()}},w.prototype.getPixelPosition=function(s,a){if(!this.config||!this.session)return{left:0,top:0};s||(s=this.session.selection.getCursor());var r=this.session.documentToScreenPosition(s),o=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,s.row)?this.session.$bidiHandler.getPosLeft(r.column):r.column*this.config.characterWidth),i=(r.row-(a?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:o,top:i}},w.prototype.isCursorInView=function(s,a){return s.top>=0&&s.top<a.maxHeight},w.prototype.update=function(s){this.config=s;var a=this.session.$selectionMarkers,r=0,o=0;(a===void 0||a.length===0)&&(a=[{cursor:null}]);for(var r=0,i=a.length;r<i;r++){var t=this.getPixelPosition(a[r].cursor,!0);if(!((t.top>s.height+s.offset||t.top<0)&&r>1)){var e=this.cursors[o++]||this.addCursor(),n=e.style;this.drawCursor?this.drawCursor(e,t,s,a[r],this.session):this.isCursorInView(t,s)?(x.setStyle(n,"display","block"),x.translate(e,t.left,t.top),x.setStyle(n,"width",Math.round(s.characterWidth)+"px"),x.setStyle(n,"height",s.lineHeight+"px")):x.setStyle(n,"display","none")}}for(;this.cursors.length>o;)this.removeCursor();var l=this.session.getOverwrite();this.$setOverwrite(l),this.$pixelPos=t,this.restartTimer()},w.prototype.$setOverwrite=function(s){s!=this.overwrite&&(this.overwrite=s,s?x.addCssClass(this.element,"ace_overwrite-cursors"):x.removeCssClass(this.element,"ace_overwrite-cursors"))},w.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},w})();$.prototype.$padding=0,$.prototype.drawCursor=null,c.Cursor=$});ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(y,c,E){"use strict";var x=this&&this.__extends||(function(){var e=function(n,l){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,f){h.__proto__=f}||function(h,f){for(var p in f)Object.prototype.hasOwnProperty.call(f,p)&&(h[p]=f[p])},e(n,l)};return function(n,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");e(n,l);function h(){this.constructor=n}n.prototype=l===null?Object.create(l):(h.prototype=l.prototype,new h)}})(),$=y("./lib/oop"),w=y("./lib/dom"),s=y("./lib/event"),a=y("./lib/event_emitter").EventEmitter,r=32768,o=(function(){function e(n,l){this.element=w.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+l,this.element.tabIndex=-1,this.inner=w.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xA0",this.element.appendChild(this.inner),n.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(n){this.element.style.display=n?"":"none",this.isVisible=n,this.coeff=1},e})();$.implement(o.prototype,a);var i=(function(e){x(n,e);function n(l,h){var f=e.call(this,l,"-v")||this;return f.scrollTop=0,f.scrollHeight=0,h.$scrollbarWidth=f.width=w.scrollbarWidth(l.ownerDocument),f.inner.style.width=f.element.style.width=(f.width||15)+5+"px",f.$minWidth=0,f}return n.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},n.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},n.prototype.setHeight=function(l){this.element.style.height=l+"px"},n.prototype.setScrollHeight=function(l){this.scrollHeight=l,l>r?(this.coeff=r/l,l=r):this.coeff!=1&&(this.coeff=1),this.inner.style.height=l+"px"},n.prototype.setScrollTop=function(l){this.scrollTop!=l&&(this.skipEvent=!0,this.scrollTop=l,this.element.scrollTop=l*this.coeff)},n})(o);i.prototype.setInnerHeight=i.prototype.setScrollHeight;var t=(function(e){x(n,e);function n(l,h){var f=e.call(this,l,"-h")||this;return f.scrollLeft=0,f.height=h.$scrollbarWidth,f.inner.style.height=f.element.style.height=(f.height||15)+5+"px",f}return n.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},n.prototype.getHeight=function(){return this.isVisible?this.height:0},n.prototype.setWidth=function(l){this.element.style.width=l+"px"},n.prototype.setInnerWidth=function(l){this.inner.style.width=l+"px"},n.prototype.setScrollWidth=function(l){this.inner.style.width=l+"px"},n.prototype.setScrollLeft=function(l){this.scrollLeft!=l&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=l)},n})(o);c.ScrollBar=i,c.ScrollBarV=i,c.ScrollBarH=t,c.VScrollBar=i,c.HScrollBar=t});ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(y,c,E){"use strict";var x=this&&this.__extends||(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,h){l.__proto__=h}||function(l,h){for(var f in h)Object.prototype.hasOwnProperty.call(h,f)&&(l[f]=h[f])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function l(){this.constructor=e}e.prototype=n===null?Object.create(n):(l.prototype=n.prototype,new l)}})(),$=y("./lib/oop"),w=y("./lib/dom"),s=y("./lib/event"),a=y("./lib/event_emitter").EventEmitter;w.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
  position: absolute;
  background: rgba(128, 128, 128, 0.6);
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  border: 1px solid #bbb;
  border-radius: 2px;
  z-index: 8;
}
.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
  position: absolute;
  z-index: 6;
  background: none;
  overflow: hidden!important;
}
.ace_editor>.ace_sb-v {
  z-index: 6;
  right: 0;
  top: 0;
  width: 12px;
}
.ace_editor>.ace_sb-v div {
  z-index: 8;
  right: 0;
  width: 100%;
}
.ace_editor>.ace_sb-h {
  bottom: 0;
  left: 0;
  height: 12px;
}
.ace_editor>.ace_sb-h div {
  bottom: 0;
  height: 100%;
}
.ace_editor>.ace_sb_grabbed {
  z-index: 8;
  background: #000;
}`,"ace_scrollbar.css",!1);var r=(function(){function t(e,n){this.element=w.createElement("div"),this.element.className="ace_sb"+n,this.inner=w.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})();$.implement(r.prototype,a);var o=(function(t){x(e,t);function e(n,l){var h=t.call(this,n,"-v")||this;return h.scrollTop=0,h.scrollHeight=0,h.parent=n,h.width=h.VScrollWidth,h.renderer=l,h.inner.style.width=h.element.style.width=(h.width||15)+"px",h.$minWidth=0,h}return e.prototype.onMouseDown=function(n,l){if(n==="mousedown"&&!(s.getButton(l)!==0||l.detail===2)){if(l.target===this.inner){var h=this,f=l.clientY,p=function(_){f=_.clientY},m=function(){clearInterval(M)},S=l.clientY,C=this.thumbTop,g=function(){if(f!==void 0){var _=h.scrollTopFromThumbTop(C+f-S);_!==h.scrollTop&&h._emit("scroll",{data:_})}};s.capture(this.inner,p,m);var M=setInterval(g,20);return s.preventDefault(l)}var k=l.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(k)}),s.preventDefault(l)}},e.prototype.getHeight=function(){return this.height},e.prototype.scrollTopFromThumbTop=function(n){var l=n*(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(n){this.height=Math.max(0,n),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},e.prototype.setScrollHeight=function(n,l){this.pageHeight===n&&!l||(this.pageHeight=n,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(n){this.scrollTop=n,n<0&&(n=0),this.thumbTop=n*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},e})(r);o.prototype.setInnerHeight=o.prototype.setScrollHeight;var i=(function(t){x(e,t);function e(n,l){var h=t.call(this,n,"-h")||this;return h.scrollLeft=0,h.scrollWidth=0,h.height=h.HScrollHeight,h.inner.style.height=h.element.style.height=(h.height||12)+"px",h.renderer=l,h}return e.prototype.onMouseDown=function(n,l){if(n==="mousedown"&&!(s.getButton(l)!==0||l.detail===2)){if(l.target===this.inner){var h=this,f=l.clientX,p=function(_){f=_.clientX},m=function(){clearInterval(M)},S=l.clientX,C=this.thumbLeft,g=function(){if(f!==void 0){var _=h.scrollLeftFromThumbLeft(C+f-S);_!==h.scrollLeft&&h._emit("scroll",{data:_})}};s.capture(this.inner,p,m);var M=setInterval(g,20);return s.preventDefault(l)}var k=l.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(k)}),s.preventDefault(l)}},e.prototype.getHeight=function(){return this.isVisible?this.height:0},e.prototype.scrollLeftFromThumbLeft=function(n){var l=n*(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(n){this.width=Math.max(0,n),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},e.prototype.setScrollWidth=function(n,l){this.pageWidth===n&&!l||(this.pageWidth=n,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(n){this.scrollLeft=n,n<0&&(n=0),this.thumbLeft=n*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},e})(r);i.prototype.setInnerWidth=i.prototype.setScrollWidth,c.ScrollBar=o,c.ScrollBarV=o,c.ScrollBarH=i,c.VScrollBar=o,c.HScrollBar=i});ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(y,c,E){"use strict";var x=y("./lib/event"),$=(function(){function w(s,a){this.onRender=s,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=a||window;var r=this;this._flush=function(o){r.pending=!1;var i=r.changes;if(i&&(x.blockIdle(100),r.changes=0,r.onRender(i)),r.changes){if(r.$recursionLimit--<0)return;r.schedule()}else r.$recursionLimit=2}}return w.prototype.schedule=function(s){this.changes=this.changes|s,this.changes&&!this.pending&&(x.nextFrame(this._flush),this.pending=!0)},w.prototype.clear=function(s){var a=this.changes;return this.changes=0,a},w})();c.RenderLoop=$});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(y,c,E){var x=y("../lib/oop"),$=y("../lib/dom"),w=y("../lib/lang"),s=y("../lib/event"),a=y("../lib/useragent"),r=y("../lib/event_emitter").EventEmitter,o=512,i=typeof ResizeObserver=="function",t=200,e=(function(){function n(l){this.el=$.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=$.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=$.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),l.appendChild(this.el),this.$measureNode.textContent=w.stringRepeat("X",o),this.$characterSize={width:0,height:0},i?this.$addObserver():this.checkForSizeChanges()}return n.prototype.$setMeasureNodeStyles=function(l,h){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=h?"hidden":"visible"},n.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 h=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=l,this.charSizes=Object.create(null),this.allowBoldFonts=h&&h.width===l.width&&h.height===l.height,this._emit("changeCharacterSize",{data:l})}},n.prototype.$addObserver=function(){var l=this;this.$observer=new window.ResizeObserver(function(h){l.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},n.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var l=this;return this.$pollSizeChangesTimer=s.onIdle(function h(){l.checkForSizeChanges(),s.onIdle(h,500)},500)},n.prototype.setPolling=function(l){l?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},n.prototype.$measureSizes=function(l){var h={height:(l||this.$measureNode).clientHeight,width:(l||this.$measureNode).clientWidth/o};return h.width===0||h.height===0?null:h},n.prototype.$measureCharWidth=function(l){this.$main.textContent=w.stringRepeat(l,o);var h=this.$main.getBoundingClientRect();return h.width/o},n.prototype.getCharacterWidth=function(l){var h=this.charSizes[l];return h===void 0&&(h=this.charSizes[l]=this.$measureCharWidth(l)/this.$characterSize.width),h},n.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},n.prototype.$getZoom=function(l){return!l||!l.parentElement?1:(Number(window.getComputedStyle(l).zoom)||1)*this.$getZoom(l.parentElement)},n.prototype.$initTransformMeasureNodes=function(){var l=function(h,f){return["div",{style:"position: absolute;top:"+h+"px;left:"+f+"px;"}]};this.els=$.buildDom([l(0,0),l(t,0),l(0,t),l(t,t)],this.el)},n.prototype.transformCoordinates=function(l,h){if(l){var f=this.$getZoom(this.el);l=C(1/f,l)}function p(D,O,F){var N=D[1]*O[0]-D[0]*O[1];return[(-O[1]*F[0]+O[0]*F[1])/N,(+D[1]*F[0]-D[0]*F[1])/N]}function m(D,O){return[D[0]-O[0],D[1]-O[1]]}function S(D,O){return[D[0]+O[0],D[1]+O[1]]}function C(D,O){return[D*O[0],D*O[1]]}this.els||this.$initTransformMeasureNodes();function g(D){var O=D.getBoundingClientRect();return[O.left,O.top]}var M=g(this.els[0]),k=g(this.els[1]),_=g(this.els[2]),R=g(this.els[3]),b=p(m(R,k),m(R,_),m(S(k,_),S(R,M))),v=C(1+b[0],m(k,M)),d=C(1+b[1],m(_,M));if(h){var u=h,A=b[0]*u[0]/t+b[1]*u[1]/t+1,L=S(C(u[0],v),C(u[1],d));return S(C(1/A/t,L),M)}var T=m(l,M),I=p(m(v,C(b[0],T)),m(d,C(b[1],T)),T);return C(t,I)},n})();e.prototype.$characterSize={width:0,height:0},x.implement(e.prototype,r),c.FontMetrics=e});ace.define("ace/css/editor-css",["require","exports","module"],function(y,c,E){E.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 &nbsp; instead of space*/
    white-space: pre!important;
}
.ace_text-input.ace_composition {
    background: transparent;
    color: inherit;
    z-index: 1000;
    opacity: 1;
}
.ace_composition_placeholder { color: transparent }
.ace_composition_marker { 
    border-bottom: 1px solid;
    position: absolute;
    border-radius: 0;
    margin-top: 1px;
}

[ace_nocontext=true] {
    transform: none!important;
    filter: none!important;
    clip-path: none!important;
    mask : none!important;
    contain: none!important;
    perspective: none!important;
    mix-blend-mode: initial!important;
    z-index: auto;
}

.ace_layer {
    z-index: 1;
    position: absolute;
    overflow: hidden;
    /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
    word-wrap: normal;
    white-space: pre;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    /* setting pointer-events: auto; on node under the mouse, which changes
        during scroll, will break mouse wheel scrolling in Safari */
    pointer-events: none;
}

.ace_gutter-layer {
    position: relative;
    width: auto;
    text-align: right;
    pointer-events: auto;
    height: 1000000px;
    contain: style size layout;
}

.ace_text-layer {
    font: inherit !important;
    position: absolute;
    height: 1000000px;
    width: 1000000px;
    contain: style size layout;
}

.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
    contain: style size layout;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.ace_hidpi .ace_text-layer,
.ace_hidpi .ace_gutter-layer,
.ace_hidpi .ace_content,
.ace_hidpi .ace_gutter {
    contain: strict;
}
.ace_hidpi .ace_text-layer > .ace_line, 
.ace_hidpi .ace_text-layer > .ace_line_group {
    contain: strict;
}

.ace_cjk {
    display: inline-block;
    text-align: center;
}

.ace_cursor-layer {
    z-index: 4;
}

.ace_cursor {
    z-index: 4;
    position: absolute;
    box-sizing: border-box;
    border-left: 2px solid;
    /* workaround for smooth cursor repaintng whole screen in chrome */
    transform: translatez(0);
}

.ace_multiselect .ace_cursor {
    border-left-width: 1px;
}

.ace_slim-cursors .ace_cursor {
    border-left-width: 1px;
}

.ace_overwrite-cursors .ace_cursor {
    border-left-width: 0;
    border-bottom: 1px solid;
}

.ace_hidden-cursors .ace_cursor {
    opacity: 0.2;
}

.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
    opacity: 0;
}

.ace_smooth-blinking .ace_cursor {
    transition: opacity 0.18s;
}

.ace_animate-blinking .ace_cursor {
    animation-duration: 1000ms;
    animation-timing-function: step-end;
    animation-name: blink-ace-animate;
    animation-iteration-count: infinite;
}

.ace_animate-blinking.ace_smooth-blinking .ace_cursor {
    animation-duration: 1000ms;
    animation-timing-function: ease-in-out;
    animation-name: blink-ace-animate-smooth;
}
    
@keyframes blink-ace-animate {
    from, to { opacity: 1; }
    60% { opacity: 0; }
}

@keyframes blink-ace-animate-smooth {
    from, to { opacity: 1; }
    45% { opacity: 1; }
    60% { opacity: 0; }
    85% { opacity: 0; }
}

.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
    position: absolute;
    z-index: 3;
}

.ace_marker-layer .ace_selection {
    position: absolute;
    z-index: 5;
}

.ace_marker-layer .ace_bracket {
    position: absolute;
    z-index: 6;
}

.ace_marker-layer .ace_error_bracket {
    position: absolute;
    border-bottom: 1px solid #DE5555;
    border-radius: 0;
}

.ace_marker-layer .ace_active-line {
    position: absolute;
    z-index: 2;
}

.ace_marker-layer .ace_selected-word {
    position: absolute;
    z-index: 4;
    box-sizing: border-box;
}

.ace_line .ace_fold {
    box-sizing: border-box;

    display: inline-block;
    height: 11px;
    margin-top: -2px;
    vertical-align: middle;

    background-image:
        url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
        url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
    background-repeat: no-repeat, repeat-x;
    background-position: center center, top left;
    color: transparent;

    border: 1px solid black;
    border-radius: 2px;

    cursor: pointer;
    pointer-events: auto;
}

.ace_dark .ace_fold {
}

.ace_fold:hover{
    background-image:
        url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
        url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
}

.ace_tooltip {
    background-color: #f5f5f5;
    border: 1px solid gray;
    border-radius: 1px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    color: black;
    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(y,c,E){"use strict";var x=y("../lib/dom"),$=y("../lib/oop"),w=y("../lib/event_emitter").EventEmitter,s=(function(){function a(r,o){this.renderer=o,this.pixelRatio=1,this.maxHeight=o.layerConfig.maxHeight,this.lineHeight=o.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(r)}return a.prototype.$createCanvas=function(){this.canvas=x.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(r){this.$createCanvas(),this.scrollbarV=r,r.element.appendChild(this.canvas),this.setDimensions()},a.prototype.$updateDecorators=function(r){if(typeof this.canvas.getContext!="function")return;var o=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(r);var i=this.canvas.getContext("2d");function t(v,d){return v.priority<d.priority?-1:v.priority>d.priority?1:0}var e=this.renderer.session.$annotations;if(i.clearRect(0,0,this.canvas.width,this.canvas.height),e){var n={info:1,warning:2,error:3};e.forEach(function(v){v.priority=n[v.type]||null}),e=e.sort(t);for(var l=0;l<e.length;l++){var h=e[l].row,f=this.getVerticalOffsetForRow(h),p=f+this.lineHeight,m=Math.round(this.heightRatio*f),S=Math.round(this.heightRatio*p),C=Math.round((m+S)/2),g=S-C;g<this.halfMinDecorationHeight&&(g=this.halfMinDecorationHeight),C-g<0&&(C=g),C+g>this.canvasHeight&&(C=this.canvasHeight-g);var M=C-g,k=C+g,_=k-M;i.fillStyle=o[e[l].type]||null,i.fillRect(0,M,Math.round(this.oneZoneWidth-1),_)}}var R=this.renderer.session.selection.getCursor();if(R){var b=Math.round(this.getVerticalOffsetForRow(R.row)*this.heightRatio);i.fillStyle="rgba(0, 0, 0, 0.5)",i.fillRect(0,b,this.canvasWidth,2)}},a.prototype.getVerticalOffsetForRow=function(r){r=r|0;var o=this.renderer.session.documentToScreenRow(r,0)*this.lineHeight;return o},a.prototype.setDimensions=function(r){r=r||this.renderer.layerConfig,this.maxHeight=r.maxHeight,this.lineHeight=r.lineHeight,this.canvasHeight=r.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight},a.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},a.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},a})();$.implement(s.prototype,w),c.Decorator=s});ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(y,c,E){"use strict";var x=y("./lib/oop"),$=y("./lib/dom"),w=y("./lib/lang"),s=y("./config"),a=y("./layer/gutter").Gutter,r=y("./layer/marker").Marker,o=y("./layer/text").Text,i=y("./layer/cursor").Cursor,t=y("./scrollbar").HScrollBar,e=y("./scrollbar").VScrollBar,n=y("./scrollbar_custom").HScrollBar,l=y("./scrollbar_custom").VScrollBar,h=y("./renderloop").RenderLoop,f=y("./layer/font_metrics").FontMetrics,p=y("./lib/event_emitter").EventEmitter,m=y("./css/editor-css"),S=y("./layer/decorators").Decorator,C=y("./lib/useragent"),g=y("./layer/text_util").isTextToken;$.importCssString(m,"ace_editor.css",!1);var M=(function(){function k(_,R){var b=this;this.container=_||$.createElement("div"),$.addCssClass(this.container,"ace_editor"),$.HI_DPI&&$.addCssClass(this.container,"ace_hidpi"),this.setTheme(R),s.get("useStrictCSP")==null&&s.set("useStrictCSP",!1),this.$gutter=$.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=$.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=$.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new a(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new r(this.content);var v=this.$textLayer=new o(this.content);this.canvas=v.element,this.$markerFront=new r(this.content),this.$cursorLayer=new i(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new e(this.container,this),this.scrollBarH=new t(this.container,this),this.scrollBarV.on("scroll",function(d){b.$scrollAnimation||b.session.setScrollTop(d.data-b.scrollMargin.top)}),this.scrollBarH.on("scroll",function(d){b.$scrollAnimation||b.session.setScrollLeft(d.data-b.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new f(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(d){b.updateCharacterSize(),b.onResize(!0,b.gutterWidth,b.$size.width,b.$size.height),b._signal("changeCharacterSize",d)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!C.isIOS,this.$loop=new h(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),s.resetOptions(this),s._signal("renderer",this)}return k.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),$.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},k.prototype.setSession=function(_){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=_,_&&this.scrollMargin.top&&_.getScrollTop()<=0&&_.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(_),this.$markerBack.setSession(_),this.$markerFront.setSession(_),this.$gutterLayer.setSession(_),this.$textLayer.setSession(_),_&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},k.prototype.updateLines=function(_,R,b){if(R===void 0&&(R=1/0),this.$changedLines?(this.$changedLines.firstRow>_&&(this.$changedLines.firstRow=_),this.$changedLines.lastRow<R&&(this.$changedLines.lastRow=R)):this.$changedLines={firstRow:_,lastRow:R},this.$changedLines.lastRow<this.layerConfig.firstRow)if(b)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},k.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},k.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},k.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},k.prototype.updateFull=function(_){_?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},k.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},k.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},k.prototype.onResize=function(_,R,b,v){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=_?1:0;var d=this.container;v||(v=d.clientHeight||d.scrollHeight),!v&&this.$maxLines&&this.lineHeight>1&&(!d.style.height||d.style.height=="0px")&&(d.style.height="1px",v=d.clientHeight||d.scrollHeight),b||(b=d.clientWidth||d.scrollWidth);var u=this.$updateCachedSize(_,R,b,v);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!b&&!v)return this.resizing=0;_&&(this.$gutterLayer.$padding=null),_?this.$renderChanges(u|this.$changes,!0):this.$loop.schedule(u|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},k.prototype.$updateCachedSize=function(_,R,b,v){v-=this.$extraHeight||0;var d=0,u=this.$size,A={width:u.width,height:u.height,scrollerHeight:u.scrollerHeight,scrollerWidth:u.scrollerWidth};if(v&&(_||u.height!=v)&&(u.height=v,d|=this.CHANGE_SIZE,u.scrollerHeight=u.height,this.$horizScroll&&(u.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(u.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",d=d|this.CHANGE_SCROLL),b&&(_||u.width!=b)){d|=this.CHANGE_SIZE,u.width=b,R==null&&(R=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=R,$.setStyle(this.scrollBarH.element.style,"left",R+"px"),$.setStyle(this.scroller.style,"left",R+this.margin.left+"px"),u.scrollerWidth=Math.max(0,b-R-this.scrollBarV.getWidth()-this.margin.h),$.setStyle(this.$gutter.style,"left",this.margin.left+"px");var L=this.scrollBarV.getWidth()+"px";$.setStyle(this.scrollBarH.element.style,"right",L),$.setStyle(this.scroller.style,"right",L),$.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(u.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||_)&&(d|=this.CHANGE_FULL)}return u.$dirty=!b||!v,d&&this._signal("resize",A),d},k.prototype.onGutterResize=function(_){var R=this.$showGutter?_:0;R!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,R,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()},k.prototype.adjustWrapLimit=function(){var _=this.$size.scrollerWidth-this.$padding*2,R=Math.floor(_/this.characterWidth);return this.session.adjustWrapLimit(R,this.$showPrintMargin&&this.$printMarginColumn)},k.prototype.setAnimatedScroll=function(_){this.setOption("animatedScroll",_)},k.prototype.getAnimatedScroll=function(){return this.$animatedScroll},k.prototype.setShowInvisibles=function(_){this.setOption("showInvisibles",_),this.session.$bidiHandler.setShowInvisibles(_)},k.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},k.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},k.prototype.setDisplayIndentGuides=function(_){this.setOption("displayIndentGuides",_)},k.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},k.prototype.setHighlightIndentGuides=function(_){this.setOption("highlightIndentGuides",_)},k.prototype.setShowPrintMargin=function(_){this.setOption("showPrintMargin",_)},k.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},k.prototype.setPrintMarginColumn=function(_){this.setOption("printMarginColumn",_)},k.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},k.prototype.getShowGutter=function(){return this.getOption("showGutter")},k.prototype.setShowGutter=function(_){return this.setOption("showGutter",_)},k.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},k.prototype.setFadeFoldWidgets=function(_){this.setOption("fadeFoldWidgets",_)},k.prototype.setHighlightGutterLine=function(_){this.setOption("highlightGutterLine",_)},k.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},k.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var _=$.createElement("div");_.className="ace_layer ace_print-margin-layer",this.$printMarginEl=$.createElement("div"),this.$printMarginEl.className="ace_print-margin",_.appendChild(this.$printMarginEl),this.content.insertBefore(_,this.content.firstChild)}var R=this.$printMarginEl.style;R.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",R.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},k.prototype.getContainerElement=function(){return this.container},k.prototype.getMouseEventTarget=function(){return this.scroller},k.prototype.getTextAreaContainer=function(){return this.container},k.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var _=this.textarea.style,R=this.$composition;if(!this.$keepTextAreaAtCursor&&!R){$.translate(this.textarea,-100,0);return}var b=this.$cursorLayer.$pixelPos;if(b){R&&R.markerRange&&(b=this.$cursorLayer.getPixelPosition(R.markerRange.start,!0));var v=this.layerConfig,d=b.top,u=b.left;d-=v.offset;var A=R&&R.useTextareaForIME||C.isMobile?this.lineHeight:1;if(d<0||d>v.height-A){$.translate(this.textarea,0,0);return}var L=1,T=this.$size.height-A;if(!R)d+=this.lineHeight;else if(R.useTextareaForIME){var I=this.textarea.value;L=this.characterWidth*this.session.$getStringScreenWidth(I)[0]}else d+=this.lineHeight+2;u-=this.scrollLeft,u>this.$size.scrollerWidth-L&&(u=this.$size.scrollerWidth-L),u+=this.gutterWidth+this.margin.left,$.setStyle(_,"height",A+"px"),$.setStyle(_,"width",L+"px"),$.translate(this.textarea,Math.min(u,this.$size.scrollerWidth-L),Math.min(d,T))}}},k.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},k.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},k.prototype.getLastFullyVisibleRow=function(){var _=this.layerConfig,R=_.lastRow,b=this.session.documentToScreenRow(R,0)*_.lineHeight;return b-this.session.getScrollTop()>_.height-_.lineHeight?R-1:R},k.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},k.prototype.setPadding=function(_){this.$padding=_,this.$textLayer.setPadding(_),this.$cursorLayer.setPadding(_),this.$markerFront.setPadding(_),this.$markerBack.setPadding(_),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},k.prototype.setScrollMargin=function(_,R,b,v){var d=this.scrollMargin;d.top=_|0,d.bottom=R|0,d.right=v|0,d.left=b|0,d.v=d.top+d.bottom,d.h=d.left+d.right,d.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-d.top),this.updateFull()},k.prototype.setMargin=function(_,R,b,v){var d=this.margin;d.top=_|0,d.bottom=R|0,d.right=v|0,d.left=b|0,d.v=d.top+d.bottom,d.h=d.left+d.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},k.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},k.prototype.setHScrollBarAlwaysVisible=function(_){this.setOption("hScrollBarAlwaysVisible",_)},k.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},k.prototype.setVScrollBarAlwaysVisible=function(_){this.setOption("vScrollBarAlwaysVisible",_)},k.prototype.$updateScrollBarV=function(){var _=this.layerConfig.maxHeight,R=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(_-=(R-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>_-R&&(_=this.scrollTop+R,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(_+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},k.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},k.prototype.freeze=function(){this.$frozen=!0},k.prototype.unfreeze=function(){this.$frozen=!1},k.prototype.$renderChanges=function(_,R){if(this.$changes&&(_|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!_&&!R){this.$changes|=_;return}if(this.$size.$dirty)return this.$changes|=_,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",_),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var b=this.layerConfig;if(_&this.CHANGE_FULL||_&this.CHANGE_SIZE||_&this.CHANGE_TEXT||_&this.CHANGE_LINES||_&this.CHANGE_SCROLL||_&this.CHANGE_H_SCROLL){if(_|=this.$computeLayerConfig()|this.$loop.clear(),b.firstRow!=this.layerConfig.firstRow&&b.firstRowScreen==this.layerConfig.firstRowScreen){var v=this.scrollTop+(b.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;v>0&&(this.scrollTop=v,_=_|this.CHANGE_SCROLL,_|=this.$computeLayerConfig()|this.$loop.clear())}b=this.layerConfig,this.$updateScrollBarV(),_&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),$.translate(this.content,-this.scrollLeft,-b.offset);var d=b.width+2*this.$padding+"px",u=b.minHeight+"px";$.setStyle(this.content.style,"width",d),$.setStyle(this.content.style,"height",u)}if(_&this.CHANGE_H_SCROLL&&($.translate(this.content,-this.scrollLeft,-b.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),_&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(b),this.$showGutter&&this.$gutterLayer.update(b),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(b),this.$markerBack.update(b),this.$markerFront.update(b),this.$cursorLayer.update(b),this.$moveTextAreaToCursor(),this._signal("afterRender",_);return}if(_&this.CHANGE_SCROLL){this.$changedLines=null,_&this.CHANGE_TEXT||_&this.CHANGE_LINES?this.$textLayer.update(b):this.$textLayer.scrollLines(b),this.$showGutter&&(_&this.CHANGE_GUTTER||_&this.CHANGE_LINES?this.$gutterLayer.update(b):this.$gutterLayer.scrollLines(b)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(b),this.$markerBack.update(b),this.$markerFront.update(b),this.$cursorLayer.update(b),this.$moveTextAreaToCursor(),this._signal("afterRender",_);return}_&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(b),this.$showGutter&&this.$gutterLayer.update(b),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(b)):_&this.CHANGE_LINES?((this.$updateLines()||_&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(b),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(b)):_&this.CHANGE_TEXT||_&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(b),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(b)):_&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(b),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(b)),_&this.CHANGE_CURSOR&&(this.$cursorLayer.update(b),this.$moveTextAreaToCursor()),_&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(b),_&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(b),this._signal("afterRender",_)},k.prototype.$autosize=function(){var _=this.session.getScreenLength()*this.lineHeight,R=this.$maxLines*this.lineHeight,b=Math.min(R,Math.max((this.$minLines||1)*this.lineHeight,_))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(b+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&b>this.$maxPixelHeight&&(b=this.$maxPixelHeight);var v=b<=2*this.lineHeight,d=!v&&_>R;if(b!=this.desiredHeight||this.$size.height!=this.desiredHeight||d!=this.$vScroll){d!=this.$vScroll&&(this.$vScroll=d,this.scrollBarV.setVisible(d));var u=this.container.clientWidth;this.container.style.height=b+"px",this.$updateCachedSize(!0,this.$gutterWidth,u,b),this.desiredHeight=b,this._signal("autosize")}},k.prototype.$computeLayerConfig=function(){var _=this.session,R=this.$size,b=R.height<=2*this.lineHeight,v=this.session.getScreenLength(),d=v*this.lineHeight,u=this.$getLongestLine(),A=!b&&(this.$hScrollBarAlwaysVisible||R.scrollerWidth-u-2*this.$padding<0),L=this.$horizScroll!==A;L&&(this.$horizScroll=A,this.scrollBarH.setVisible(A));var T=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),b=R.height<=2*this.lineHeight);var I=R.scrollerHeight+this.lineHeight,D=!this.$maxLines&&this.$scrollPastEnd?(R.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;d+=D;var O=this.scrollMargin;this.session.setScrollTop(Math.max(-O.top,Math.min(this.scrollTop,d-R.scrollerHeight+O.bottom))),this.session.setScrollLeft(Math.max(-O.left,Math.min(this.scrollLeft,u+2*this.$padding-R.scrollerWidth+O.right)));var F=!b&&(this.$vScrollBarAlwaysVisible||R.scrollerHeight-d+D<0||this.scrollTop>O.top),N=T!==F;N&&(this.$vScroll=F,this.scrollBarV.setVisible(F));var W=this.scrollTop%this.lineHeight,B=Math.ceil(I/this.lineHeight)-1,z=Math.max(0,Math.round((this.scrollTop-W)/this.lineHeight)),P=z+B,G,V,U=this.lineHeight;z=_.screenToDocumentRow(z,0);var Y=_.getFoldLine(z);Y&&(z=Y.start.row),G=_.documentToScreenRow(z,0),V=_.getRowLength(z)*U,P=Math.min(_.screenToDocumentRow(P,0),_.getLength()-1),I=R.scrollerHeight+_.getRowLength(P)*U+V,W=this.scrollTop-G*U,W<0&&G>0&&(G=Math.max(0,G+Math.floor(W/U)),W=this.scrollTop-G*U);var j=0;return(this.layerConfig.width!=u||L)&&(j=this.CHANGE_H_SCROLL),(L||N)&&(j|=this.$updateCachedSize(!0,this.gutterWidth,R.width,R.height),this._signal("scrollbarVisibilityChanged"),N&&(u=this.$getLongestLine())),this.layerConfig={width:u,padding:this.$padding,firstRow:z,firstRowScreen:G,lastRow:P,lineHeight:U,characterWidth:this.characterWidth,minHeight:I,maxHeight:d,offset:W,gutterOffset:U?Math.max(0,Math.ceil((W+R.height-R.scrollerHeight)/U)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(u-this.$padding),j},k.prototype.$updateLines=function(){if(this.$changedLines){var _=this.$changedLines.firstRow,R=this.$changedLines.lastRow;this.$changedLines=null;var b=this.layerConfig;if(!(_>b.lastRow+1)&&!(R<b.firstRow)){if(R===1/0){this.$showGutter&&this.$gutterLayer.update(b),this.$textLayer.update(b);return}return this.$textLayer.updateLines(b,_,R),!0}}},k.prototype.$getLongestLine=function(){var _=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(_+=1),this.$textLayer&&_>this.$textLayer.MAX_LINE_LENGTH&&(_=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(_*this.characterWidth))},k.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},k.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},k.prototype.addGutterDecoration=function(_,R){this.$gutterLayer.addGutterDecoration(_,R)},k.prototype.removeGutterDecoration=function(_,R){this.$gutterLayer.removeGutterDecoration(_,R)},k.prototype.updateBreakpoints=function(_){this._rows=_,this.$loop.schedule(this.CHANGE_GUTTER)},k.prototype.setAnnotations=function(_){this.$gutterLayer.setAnnotations(_),this.$loop.schedule(this.CHANGE_GUTTER)},k.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},k.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},k.prototype.showCursor=function(){this.$cursorLayer.showCursor()},k.prototype.scrollSelectionIntoView=function(_,R,b){this.scrollCursorIntoView(_,b),this.scrollCursorIntoView(R,b)},k.prototype.scrollCursorIntoView=function(_,R,b){if(this.$size.scrollerHeight!==0){var v=this.$cursorLayer.getPixelPosition(_),d=v.left,u=v.top,A=b&&b.top||0,L=b&&b.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var T=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;T+A>u?(R&&T+A>u+this.lineHeight&&(u-=R*this.$size.scrollerHeight),u===0&&(u=-this.scrollMargin.top),this.session.setScrollTop(u)):T+this.$size.scrollerHeight-L<u+this.lineHeight&&(R&&T+this.$size.scrollerHeight-L<u-this.lineHeight&&(u+=R*this.$size.scrollerHeight),this.session.setScrollTop(u+this.lineHeight+L-this.$size.scrollerHeight));var I=this.scrollLeft,D=2*this.layerConfig.characterWidth;d-D<I?(d-=D,d<this.$padding+D&&(d=-this.scrollMargin.left),this.session.setScrollLeft(d)):(d+=D,I+this.$size.scrollerWidth<d+this.characterWidth?this.session.setScrollLeft(Math.round(d+this.characterWidth-this.$size.scrollerWidth)):I<=this.$padding&&d-I<this.characterWidth&&this.session.setScrollLeft(0))}},k.prototype.getScrollTop=function(){return this.session.getScrollTop()},k.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},k.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},k.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},k.prototype.scrollToRow=function(_){this.session.setScrollTop(_*this.lineHeight)},k.prototype.alignCursor=function(_,R){typeof _=="number"&&(_={row:_,column:0});var b=this.$cursorLayer.getPixelPosition(_),v=this.$size.scrollerHeight-this.lineHeight,d=b.top-v*(R||0);return this.session.setScrollTop(d),d},k.prototype.$calcSteps=function(_,R){var b=0,v=this.STEPS,d=[],u=function(A,L,T){return T*(Math.pow(A-1,3)+1)+L};for(b=0;b<v;++b)d.push(u(b/this.STEPS,_,R-_));return d},k.prototype.scrollToLine=function(_,R,b,v){var d=this.$cursorLayer.getPixelPosition({row:_,column:0}),u=d.top;R&&(u-=this.$size.scrollerHeight/2);var A=this.scrollTop;this.session.setScrollTop(u),b!==!1&&this.animateScrolling(A,v)},k.prototype.animateScrolling=function(_,R){var b=this.scrollTop;if(!this.$animatedScroll)return;var v=this;if(_==b)return;if(this.$scrollAnimation){var d=this.$scrollAnimation.steps;if(d.length&&(_=d[0],_==b))return}var u=v.$calcSteps(_,b);this.$scrollAnimation={from:_,to:b,steps:u},clearInterval(this.$timer),v.session.setScrollTop(u.shift()),v.session.$scrollTop=b;function A(){v.$timer=clearInterval(v.$timer),v.$scrollAnimation=null,v.$stopAnimation=!1,R&&R()}this.$timer=setInterval(function(){if(v.$stopAnimation){A();return}if(!v.session)return clearInterval(v.$timer);u.length?(v.session.setScrollTop(u.shift()),v.session.$scrollTop=b):b!=null?(v.session.$scrollTop=-1,v.session.setScrollTop(b),b=null):A()},10)},k.prototype.scrollToY=function(_){this.scrollTop!==_&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=_)},k.prototype.scrollToX=function(_){this.scrollLeft!==_&&(this.scrollLeft=_),this.$loop.schedule(this.CHANGE_H_SCROLL)},k.prototype.scrollTo=function(_,R){this.session.setScrollTop(R),this.session.setScrollLeft(_)},k.prototype.scrollBy=function(_,R){R&&this.session.setScrollTop(this.session.getScrollTop()+R),_&&this.session.setScrollLeft(this.session.getScrollLeft()+_)},k.prototype.isScrollableBy=function(_,R){if(R<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||R>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||_<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||_>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},k.prototype.pixelToScreenCoordinates=function(_,R){var b;if(this.$hasCssTransforms){b={top:0,left:0};var v=this.$fontMetrics.transformCoordinates([_,R]);_=v[1]-this.gutterWidth-this.margin.left,R=v[0]}else b=this.scroller.getBoundingClientRect();var d=_+this.scrollLeft-b.left-this.$padding,u=d/this.characterWidth,A=Math.floor((R+this.scrollTop-b.top)/this.lineHeight),L=this.$blockCursor?Math.floor(u):Math.round(u);return{row:A,column:L,side:u-L>0?1:-1,offsetX:d}},k.prototype.screenToTextCoordinates=function(_,R){var b;if(this.$hasCssTransforms){b={top:0,left:0};var v=this.$fontMetrics.transformCoordinates([_,R]);_=v[1]-this.gutterWidth-this.margin.left,R=v[0]}else b=this.scroller.getBoundingClientRect();var d=_+this.scrollLeft-b.left-this.$padding,u=d/this.characterWidth,A=this.$blockCursor?Math.floor(u):Math.round(u),L=(R+this.scrollTop-b.top)/this.lineHeight;return this.session.screenToDocumentPosition(L,Math.max(A,0),d)},k.prototype.textToScreenCoordinates=function(_,R){var b=this.scroller.getBoundingClientRect(),v=this.session.documentToScreenPosition(_,R),d=this.$padding+(this.session.$bidiHandler.isBidiRow(v.row,_)?this.session.$bidiHandler.getPosLeft(v.column):Math.round(v.column*this.characterWidth)),u=v.row*this.lineHeight;return{pageX:b.left+d-this.scrollLeft,pageY:b.top+u-this.scrollTop}},k.prototype.visualizeFocus=function(){$.addCssClass(this.container,"ace_focus")},k.prototype.visualizeBlur=function(){$.removeCssClass(this.container,"ace_focus")},k.prototype.showComposition=function(_){this.$composition=_,_.cssText||(_.cssText=this.textarea.style.cssText),_.useTextareaForIME==null&&(_.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?($.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):_.markerId=this.session.addMarker(_.markerRange,"ace_composition_marker","text")},k.prototype.setCompositionText=function(_){var R=this.session.selection.cursor;this.addToken(_,"composition_placeholder",R.row,R.column),this.$moveTextAreaToCursor()},k.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),$.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var _=this.session.selection.cursor;this.removeExtraToken(_.row,_.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},k.prototype.setGhostText=function(_,R){var b=this.session.selection.cursor,v=R||{row:b.row,column:b.column};this.removeGhostText();var d=this.$calculateWrappedTextChunks(_,v);this.addToken(d[0].text,"ghost_text",v.row,v.column),this.$ghostText={text:_,position:{row:v.row,column:v.column}};var u=$.createElement("div");if(d.length>1){var A=this.hideTokensAfterPosition(v.row,v.column),L;d.slice(1).forEach(function(N){var W=$.createElement("div"),B=$.createElement("span");B.className="ace_ghost_text",N.wrapped&&(W.className="ghost_text_line_wrapped"),N.text.length===0&&(N.text=" "),B.appendChild($.createTextNode(N.text)),W.appendChild(B),u.appendChild(W),L=W}),A.forEach(function(N){var W=$.createElement("span");g(N.type)||(W.className="ace_"+N.type.replace(/\./g," ace_")),W.appendChild($.createTextNode(N.value)),L.appendChild(W)}),this.$ghostTextWidget={el:u,row:v.row,column:v.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var T=this.$cursorLayer.getPixelPosition(v,!0),I=this.container,D=I.getBoundingClientRect().height,O=d.length*this.lineHeight,F=O<D-T.top;if(F)return;O<D?this.scrollBy(0,(d.length-1)*this.lineHeight):this.scrollToRow(v.row)}},k.prototype.$calculateWrappedTextChunks=function(_,R){var b=this.$size.scrollerWidth-this.$padding*2,v=Math.floor(b/this.characterWidth)-2;v=v<=0?60:v;for(var d=_.split(/\r?\n/),u=[],A=0;A<d.length;A++){var L=this.session.$getDisplayTokens(d[A],R.column),T=this.session.$computeWrapSplits(L,v,this.session.$tabSize);if(T.length>0){var I=0;T.push(d[A].length);for(var D=0;D<T.length;D++){var O=d[A].slice(I,T[D]);u.push({text:O,wrapped:!0}),I=T[D]}}else u.push({text:d[A],wrapped:!1})}return u},k.prototype.removeGhostText=function(){if(this.$ghostText){var _=this.$ghostText.position;this.removeExtraToken(_.row,_.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},k.prototype.addToken=function(_,R,b,v){var d=this.session;d.bgTokenizer.lines[b]=null;var u={type:R,value:_},A=d.getTokens(b);if(v==null||!A.length)A.push(u);else for(var L=0,T=0;T<A.length;T++){var I=A[T];if(L+=I.value.length,v<=L){var D=I.value.length-(L-v),O=I.value.slice(0,D),F=I.value.slice(D);A.splice(T,1,{type:I.type,value:O},u,{type:I.type,value:F});break}}this.updateLines(b,b)},k.prototype.hideTokensAfterPosition=function(_,R){for(var b=this.session.getTokens(_),v=0,d=!1,u=[],A=0;A<b.length;A++){var L=b[A];if(v+=L.value.length,L.type!=="ghost_text"){if(d){u.push({type:L.type,value:L.value}),L.type="hidden_token";continue}v===R&&(d=!0)}}return this.updateLines(_,_),u},k.prototype.removeExtraToken=function(_,R){this.session.bgTokenizer.lines[_]=null,this.updateLines(_,_)},k.prototype.setTheme=function(_,R){var b=this;if(this.$themeId=_,b._dispatchEvent("themeChange",{theme:_}),!_||typeof _=="string"){var v=_||this.$options.theme.initialValue;s.loadModule(["theme",v],d)}else d(_);function d(u){if(b.$themeId!=_)return R&&R();if(!u||!u.cssClass)throw new Error("couldn't load module "+_+" or it didn't call define");u.$id&&(b.$themeId=u.$id),$.importCssString(u.cssText,u.cssClass,b.container),b.theme&&$.removeCssClass(b.container,b.theme.cssClass);var A="padding"in u?u.padding:"padding"in(b.theme||{})?4:b.$padding;if(b.$padding&&A!=b.$padding&&b.setPadding(A),b.$gutterLayer){var L=u.$showGutterCursorMarker;L&&!b.$gutterLayer.$showCursorMarker?b.$gutterLayer.$showCursorMarker="theme":!L&&b.$gutterLayer.$showCursorMarker=="theme"&&(b.$gutterLayer.$showCursorMarker=null)}b.$theme=u.cssClass,b.theme=u,$.addCssClass(b.container,u.cssClass),$.setCssClass(b.container,"ace_dark",u.isDark),b.$size&&(b.$size.width=0,b.$updateSizeAsync()),b._dispatchEvent("themeLoaded",{theme:u}),R&&R(),C.isSafari&&b.scroller&&(b.scroller.style.background="red",b.scroller.style.background="")}},k.prototype.getTheme=function(){return this.$themeId},k.prototype.setStyle=function(_,R){$.setCssClass(this.container,_,R!==!1)},k.prototype.unsetStyle=function(_){$.removeCssClass(this.container,_)},k.prototype.setCursorStyle=function(_){$.setStyle(this.scroller.style,"cursor",_)},k.prototype.setMouseCursor=function(_){$.setStyle(this.scroller.style,"cursor",_)},k.prototype.attachToShadowRoot=function(){$.importCssString(m,"ace_editor.css",this.container)},k.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},k.prototype.$updateCustomScrollbar=function(_){var R=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),_===!0?(this.scrollBarV=new l(this.container,this),this.scrollBarH=new n(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(b){R.$scrollAnimation||R.session.setScrollTop(b.data-R.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(b){R.$scrollAnimation||R.session.setScrollLeft(b.data-R.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new S(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new e(this.container,this),this.scrollBarH=new t(this.container,this),this.scrollBarV.addEventListener("scroll",function(b){R.$scrollAnimation||R.session.setScrollTop(b.data-R.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(b){R.$scrollAnimation||R.session.setScrollLeft(b.data-R.scrollMargin.left)}))},k.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var _=this;this.$resizeTimer=w.delayedCall(function(){_.destroyed||_.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(R){var b=R[0].contentRect.width,v=R[0].contentRect.height;Math.abs(_.$size.width-b)>1||Math.abs(_.$size.height-v)>1?_.$resizeTimer.delay():_.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},k})();M.prototype.CHANGE_CURSOR=1,M.prototype.CHANGE_MARKER=2,M.prototype.CHANGE_GUTTER=4,M.prototype.CHANGE_SCROLL=8,M.prototype.CHANGE_LINES=16,M.prototype.CHANGE_TEXT=32,M.prototype.CHANGE_SIZE=64,M.prototype.CHANGE_MARKER_BACK=128,M.prototype.CHANGE_MARKER_FRONT=256,M.prototype.CHANGE_FULL=512,M.prototype.CHANGE_H_SCROLL=1024,M.prototype.$changes=0,M.prototype.$padding=null,M.prototype.$frozen=!1,M.prototype.STEPS=8,x.implement(M.prototype,p),s.defineOptions(M.prototype,"renderer",{useResizeObserver:{set:function(k){!k&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):k&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(k){this.$textLayer.setShowInvisibles(k)&&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(k){typeof k=="number"&&(this.$printMarginColumn=k),this.$showPrintMargin=!!k,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(k){this.$gutter.style.display=k?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(k){this.$gutterLayer.$useSvgGutterIcons=k},initialValue:!1},showFoldedAnnotations:{set:function(k){this.$gutterLayer.$showFoldedAnnotations=k},initialValue:!1},fadeFoldWidgets:{set:function(k){$.setCssClass(this.$gutter,"ace_fade-fold-widgets",k)},initialValue:!1},showFoldWidgets:{set:function(k){this.$gutterLayer.setShowFoldWidgets(k),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(k){this.$textLayer.setDisplayIndentGuides(k)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(k){this.$textLayer.setHighlightIndentGuides(k)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(k){this.$gutterLayer.setHighlightGutterLine(k),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(k){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(k){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(k){typeof k=="number"&&(k=k+"px"),this.container.style.fontSize=k,this.updateFontSize()},initialValue:12},fontFamily:{set:function(k){this.container.style.fontFamily=k,this.updateFontSize()}},maxLines:{set:function(k){this.updateFull()}},minLines:{set:function(k){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(k){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(k){k=+k||0,this.$scrollPastEnd!=k&&(this.$scrollPastEnd=k,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(k){this.$gutterLayer.$fixedWidth=!!k,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(k){this.$updateCustomScrollbar(k)},initialValue:!1},theme:{set:function(k){this.setTheme(k)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!C.isMobile&&!C.isIE}}),c.VirtualRenderer=M});ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(y,c,E){"use strict";var x=y("../lib/oop"),$=y("../lib/net"),w=y("../lib/event_emitter").EventEmitter,s=y("../config");function a(t){var e="importScripts('"+$.qualifyURL(t)+"');";try{return new Blob([e],{type:"application/javascript"})}catch{var n=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,l=new n;return l.append(e),l.getBlob("application/javascript")}}function r(t){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(s.get("loadWorkerFromBlob")){var e=a(t),n=window.URL||window.webkitURL,l=n.createObjectURL(e);return new Worker(l)}return new Worker(t)}var o=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(){x.implement(this,w),this.$createWorkerFromOldConfig=function(t,e,n,l,h){if(y.nameToUrl&&!y.toUrl&&(y.toUrl=y.nameToUrl),s.get("packaged")||!y.toUrl)l=l||s.moduleUrl(e,"worker");else{var f=this.$normalizePath;l=l||f(y.toUrl("ace/worker/worker.js",null,"_"));var p={};t.forEach(function(m){p[m]=f(y.toUrl(m,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=r(l),h&&this.send("importScripts",h),this.$worker.postMessage({init:!0,tlns:p,module:e,classname:n}),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 n=this.callbacks[e.id];n&&(n(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 $.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,n){if(n){var l=this.callbackId++;this.callbacks[l]=n,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(n){console.error(n.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(o.prototype);var i=function(t,e,n){var l=null,h=!1,f=Object.create(w),p=[],m=new o({messageBuffer:p,terminate:function(){},postMessage:function(C){p.push(C),l&&(h?setTimeout(S):S())}});m.setEmitSync=function(C){h=C};var S=function(){var C=p.shift();C.command?l[C.command].apply(l,C.args):C.event&&f._signal(C.event,C.data)};return f.postMessage=function(C){m.onMessage({data:C})},f.callback=function(C,g){this.postMessage({type:"call",id:g,data:C})},f.emit=function(C,g){this.postMessage({type:"event",name:C,data:g})},s.loadModule(["worker",e],function(C){for(l=new C[n](f);p.length;)S()}),m};c.UIWorkerClient=i,c.WorkerClient=o,c.createWorker=r});ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(y,c,E){"use strict";var x=y("./range").Range,$=y("./lib/event_emitter").EventEmitter,w=y("./lib/oop"),s=(function(){function a(r,o,i,t,e,n){var l=this;this.length=o,this.session=r,this.doc=r.getDocument(),this.mainClass=e,this.othersClass=n,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=i;var h=r.getUndoManager().$undoStack||r.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=h.length,this.setup(),r.selection.on("changeCursor",this.$onCursorChange)}return a.prototype.setup=function(){var r=this,o=this.doc,i=this.session;this.selectionBefore=i.selection.toJSON(),i.selection.inMultiSelectMode&&i.selection.toSingleRange(),this.pos=o.createAnchor(this.$pos.row,this.$pos.column);var t=this.pos;t.$insertRight=!0,t.detach(),t.markerId=i.addMarker(new x(t.row,t.column,t.row,t.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(e){var n=o.createAnchor(e.row,e.column);n.$insertRight=!0,n.detach(),r.others.push(n)}),i.setUndoSelect(!1)},a.prototype.showOtherMarkers=function(){if(!this.othersActive){var r=this.session,o=this;this.othersActive=!0,this.others.forEach(function(i){i.markerId=r.addMarker(new x(i.row,i.column,i.row,i.column+o.length),o.othersClass,null,!1)})}},a.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var r=0;r<this.others.length;r++)this.session.removeMarker(this.others[r].markerId)}},a.prototype.onUpdate=function(r){if(this.$updating)return this.updateAnchors(r);var o=r;if(o.start.row===o.end.row&&o.start.row===this.pos.row){this.$updating=!0;var i=r.action==="insert"?o.end.column-o.start.column:o.start.column-o.end.column,t=o.start.column>=this.pos.column&&o.start.column<=this.pos.column+this.length+1,e=o.start.column-this.pos.column;if(this.updateAnchors(r),t&&(this.length+=i),t&&!this.session.$fromUndo){if(r.action==="insert")for(var n=this.others.length-1;n>=0;n--){var l=this.others[n],h={row:l.row,column:l.column+e};this.doc.insertMergedLines(h,r.lines)}else if(r.action==="remove")for(var n=this.others.length-1;n>=0;n--){var l=this.others[n],h={row:l.row,column:l.column+e};this.doc.remove(new x(h.row,h.column,h.row,h.column-i))}}this.$updating=!1,this.updateMarkers()}},a.prototype.updateAnchors=function(r){this.pos.onChange(r);for(var o=this.others.length;o--;)this.others[o].onChange(r);this.updateMarkers()},a.prototype.updateMarkers=function(){if(!this.$updating){var r=this,o=this.session,i=function(e,n){o.removeMarker(e.markerId),e.markerId=o.addMarker(new x(e.row,e.column,e.row,e.column+r.length),n,null,!1)};i(this.pos,this.mainClass);for(var t=this.others.length;t--;)i(this.others[t],this.othersClass)}},a.prototype.onCursorChange=function(r){if(!(this.$updating||!this.session)){var o=this.session.selection.getCursor();o.row===this.pos.row&&o.column>=this.pos.column&&o.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",r)):(this.hideOtherMarkers(),this._emit("cursorLeave",r))}},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 r=this.session.getUndoManager(),o=(r.$undoStack||r.$undostack).length-this.$undoStackDepth,i=0;i<o;i++)r.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},a})();w.implement(s.prototype,$),c.PlaceHolder=s});ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(y,c,E){var x=y("../lib/event"),$=y("../lib/useragent");function w(a,r){return a.row==r.row&&a.column==r.column}function s(a){var r=a.domEvent,o=r.altKey,i=r.shiftKey,t=r.ctrlKey,e=a.getAccelKey(),n=a.getButton();if(t&&$.isMac&&(n=r.button),a.editor.inMultiSelectMode&&n==2){a.editor.textInput.onContextMenu(a.domEvent);return}if(!t&&!o&&!e){n===0&&a.editor.inMultiSelectMode&&a.editor.exitMultiSelectMode();return}if(n===0){var l=a.editor,h=l.selection,f=l.inMultiSelectMode,p=a.getDocumentPosition(),m=h.getCursor(),S=a.inSelection()||h.isEmpty()&&w(p,m),C=a.x,g=a.y,M=function(O){C=O.clientX,g=O.clientY},k=l.session,_=l.renderer.pixelToScreenCoordinates(C,g),R=_,b;if(l.$mouseHandler.$enableJumpToDef)t&&o||e&&o?b=i?"block":"add":o&&l.$blockSelectEnabled&&(b="block");else if(e&&!o){if(b="add",!f&&i)return}else o&&l.$blockSelectEnabled&&(b="block");if(b&&$.isMac&&r.ctrlKey&&l.$mouseHandler.cancelContextMenu(),b=="add"){if(!f&&S)return;if(!f){var v=h.toOrientedRange();l.addSelectionMarker(v)}var d=h.rangeList.rangeAtPoint(p);l.inVirtualSelectionMode=!0,i&&(d=null,v=h.ranges[0]||v,l.removeSelectionMarker(v)),l.once("mouseup",function(){var O=h.toOrientedRange();d&&O.isEmpty()&&w(d.cursor,O.cursor)?h.substractPoint(O.cursor):(i?h.substractPoint(v.cursor):v&&(l.removeSelectionMarker(v),h.addRange(v)),h.addRange(O)),l.inVirtualSelectionMode=!1})}else if(b=="block"){a.stop(),l.inVirtualSelectionMode=!0;var u,A=[],L=function(){var O=l.renderer.pixelToScreenCoordinates(C,g),F=k.screenToDocumentPosition(O.row,O.column,O.offsetX);w(R,O)&&w(F,h.lead)||(R=O,l.selection.moveToPosition(F),l.renderer.scrollCursorIntoView(),l.removeSelectionMarkers(A),A=h.rectangularRangeBlock(R,_),l.$mouseHandler.$clickSelection&&A.length==1&&A[0].isEmpty()&&(A[0]=l.$mouseHandler.$clickSelection.clone()),A.forEach(l.addSelectionMarker,l),l.updateSelectionMarkers())};f&&!e?h.toSingleRange():!f&&e&&(u=h.toOrientedRange(),l.addSelectionMarker(u)),i?_=k.documentToScreenPosition(h.lead):h.moveToPosition(p),R={row:-1,column:-1};var T=function(O){L(),clearInterval(D),l.removeSelectionMarkers(A),A.length||(A=[h.toOrientedRange()]),u&&(l.removeSelectionMarker(u),h.toSingleRange(u));for(var F=0;F<A.length;F++)h.addRange(A[F]);l.inVirtualSelectionMode=!1,l.$mouseHandler.$clickSelection=null},I=L;x.capture(l.container,M,T);var D=setInterval(function(){I()},20);return a.preventDefault()}}}c.onMouseDown=s});ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(y,c,E){c.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function($){$.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function($){$.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function($){$.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function($){$.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function($){$.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function($){$.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function($){$.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function($){$.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function($){$.multiSelect.rangeCount>1?$.multiSelect.joinSelections():$.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function($){$.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function($){$.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function($){$.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],c.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function($){$.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function($){return $&&$.inMultiSelectMode}}];var x=y("../keyboard/hash_handler").HashHandler;c.keyboardHandler=new x(c.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(y,c,E){var x=y("./range_list").RangeList,$=y("./range").Range,w=y("./selection").Selection,s=y("./mouse/multi_select_handler").onMouseDown,a=y("./lib/event"),r=y("./lib/lang"),o=y("./commands/multi_select_commands");c.commands=o.defaultCommands.concat(o.multiSelectCommands);var i=y("./search").Search,t=new i;function e(m,S,C){return t.$options.wrap=!0,t.$options.needle=S,t.$options.backwards=C==-1,t.find(m)}var n=y("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(n.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(m,S){if(m){if(!this.inMultiSelectMode&&this.rangeCount===0){var C=this.toOrientedRange();if(this.rangeList.add(C),this.rangeList.add(m),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),S||this.fromOrientedRange(m);this.rangeList.removeAll(),this.rangeList.add(C),this.$onAddRange(C)}m.cursor||(m.cursor=m.end);var g=this.rangeList.add(m);return this.$onAddRange(m),g.length&&this.$onRemoveRange(g),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),S||this.fromOrientedRange(m)}},this.toSingleRange=function(m){m=m||this.ranges[0];var S=this.rangeList.removeAll();S.length&&this.$onRemoveRange(S),m&&this.fromOrientedRange(m)},this.substractPoint=function(m){var S=this.rangeList.substractPoint(m);if(S)return this.$onRemoveRange(S),S[0]},this.mergeOverlappingRanges=function(){var m=this.rangeList.merge();m.length&&this.$onRemoveRange(m)},this.$onAddRange=function(m){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(m),this._signal("addRange",{range:m})},this.$onRemoveRange=function(m){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var S=this.rangeList.ranges.pop();m.push(S),this.rangeCount=0}for(var C=m.length;C--;){var g=this.ranges.indexOf(m[C]);this.ranges.splice(g,1)}this._signal("removeRange",{ranges:m}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),S=S||this.ranges[0],S&&!S.isEqual(this.getRange())&&this.fromOrientedRange(S)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new x,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var m=this.ranges.length?this.ranges:[this.getRange()],S=[],C=0;C<m.length;C++){var g=m[C],M=g.start.row,k=g.end.row;if(M===k)S.push(g.clone());else{for(S.push(new $(M,g.start.column,M,this.session.getLine(M).length));++M<k;)S.push(this.getLineRange(M,!0));S.push(new $(k,0,k,g.end.column))}C==0&&!this.isBackwards()&&(S=S.reverse())}this.toSingleRange();for(var C=S.length;C--;)this.addRange(S[C])},this.joinSelections=function(){var m=this.rangeList.ranges,S=m[m.length-1],C=$.fromPoints(m[0].start,S.end);this.toSingleRange(),this.setSelectionRange(C,S.cursor==S.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var m=this.rangeList.ranges,S=m[m.length-1],C=$.fromPoints(m[0].start,S.end);this.toSingleRange(),this.setSelectionRange(C,S.cursor==S.start)}else{var g=this.session.documentToScreenPosition(this.cursor),M=this.session.documentToScreenPosition(this.anchor),k=this.rectangularRangeBlock(g,M);k.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(m,S,C){var g=[],M=m.column<S.column;if(M)var k=m.column,_=S.column,R=m.offsetX,b=S.offsetX;else var k=S.column,_=m.column,R=S.offsetX,b=m.offsetX;var v=m.row<S.row;if(v)var d=m.row,u=S.row;else var d=S.row,u=m.row;k<0&&(k=0),d<0&&(d=0),d==u&&(C=!0);for(var A,L=d;L<=u;L++){var T=$.fromPoints(this.session.screenToDocumentPosition(L,k,R),this.session.screenToDocumentPosition(L,_,b));if(T.isEmpty()){if(A&&h(T.end,A))break;A=T.end}T.cursor=M?T.start:T.end,g.push(T)}if(v&&g.reverse(),!C){for(var I=g.length-1;g[I].isEmpty()&&I>0;)I--;if(I>0)for(var D=0;g[D].isEmpty();)D++;for(var O=I;O>=D;O--)g[O].isEmpty()&&g.splice(O,1)}return g}}).call(w.prototype);var l=y("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(m){m.cursor||(m.cursor=m.end);var S=this.getSelectionStyle();return m.marker=this.session.addMarker(m,"ace_selection",S),this.session.$selectionMarkers.push(m),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,m},this.removeSelectionMarker=function(m){if(m.marker){this.session.removeMarker(m.marker);var S=this.session.$selectionMarkers.indexOf(m);S!=-1&&this.session.$selectionMarkers.splice(S,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(m){for(var S=this.session.$selectionMarkers,C=m.length;C--;){var g=m[C];if(g.marker){this.session.removeMarker(g.marker);var M=S.indexOf(g);M!=-1&&S.splice(M,1)}}this.session.selectionMarkerCount=S.length},this.$onAddRange=function(m){this.addSelectionMarker(m.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(m){this.removeSelectionMarkers(m.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(m){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(o.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(m){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(o.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(m){var S=m.command,C=m.editor;if(C.multiSelect){if(S.multiSelectAction)S.multiSelectAction=="forEach"?g=C.forEachSelection(S,m.args):S.multiSelectAction=="forEachLine"?g=C.forEachSelection(S,m.args,!0):S.multiSelectAction=="single"?(C.exitMultiSelectMode(),g=S.exec(C,m.args||{})):g=S.multiSelectAction(C,m.args||{});else{var g=S.exec(C,m.args||{});C.multiSelect.addRange(C.multiSelect.toOrientedRange()),C.multiSelect.mergeOverlappingRanges()}return g}},this.forEachSelection=function(m,S,C){if(!this.inVirtualSelectionMode){var g=C&&C.keepOrder,M=C==!0||C&&C.$byLines,k=this.session,_=this.selection,R=_.rangeList,b=(g?_:R).ranges,v;if(!b.length)return m.exec?m.exec(this,S||{}):m(this,S||{});var d=_._eventRegistry;_._eventRegistry={};var u=new w(k);this.inVirtualSelectionMode=!0;for(var A=b.length;A--;){if(M)for(;A>0&&b[A].start.row==b[A-1].end.row;)A--;u.fromOrientedRange(b[A]),u.index=A,this.selection=k.selection=u;var L=m.exec?m.exec(this,S||{}):m(this,S||{});!v&&L!==void 0&&(v=L),u.toOrientedRange(b[A])}u.detach(),this.selection=k.selection=_,this.inVirtualSelectionMode=!1,_._eventRegistry=d,_.mergeOverlappingRanges(),_.ranges[0]&&_.fromOrientedRange(_.ranges[0]);var T=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),T&&T.from==T.to&&this.renderer.animateScrolling(T.from),v}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var m="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var S=this.multiSelect.rangeList.ranges,C=[],g=0;g<S.length;g++)C.push(this.session.getTextRange(S[g]));var M=this.session.getDocument().getNewLineCharacter();m=C.join(M),m.length==(C.length-1)*M.length&&(m="")}else this.selection.isEmpty()||(m=this.session.getTextRange(this.getSelectionRange()));return m},this.$checkMultiselectChange=function(m,S){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var C=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&S==this.multiSelect.anchor)return;var g=S==this.multiSelect.anchor?C.cursor==C.start?C.end:C.start:C.cursor;g.row!=S.row||this.session.$clipPositionToDocument(g.row,g.column).column!=S.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(m,S,C){if(S=S||{},S.needle=m||S.needle,S.needle==null){var g=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();S.needle=this.session.getTextRange(g)}this.$search.set(S);var M=this.$search.findAll(this.session);if(!M.length)return 0;var k=this.multiSelect;C||k.toSingleRange(M[0]);for(var _=M.length;_--;)k.addRange(M[_],!0);return g&&k.rangeList.rangeAtPoint(g.start)&&k.addRange(g,!0),M.length},this.selectMoreLines=function(m,S){var C=this.selection.toOrientedRange(),g=C.cursor==C.end,M=this.session.documentToScreenPosition(C.cursor);this.selection.$desiredColumn&&(M.column=this.selection.$desiredColumn);var k=this.session.screenToDocumentPosition(M.row+m,M.column);if(C.isEmpty())var R=k;else var _=this.session.documentToScreenPosition(g?C.end:C.start),R=this.session.screenToDocumentPosition(_.row+m,_.column);if(g){var b=$.fromPoints(k,R);b.cursor=b.start}else{var b=$.fromPoints(R,k);b.cursor=b.end}if(b.desiredColumn=M.column,!this.selection.inMultiSelectMode)this.selection.addRange(C);else if(S)var v=C.cursor;this.selection.addRange(b),v&&this.selection.substractPoint(v)},this.transposeSelections=function(m){for(var S=this.session,C=S.multiSelect,g=C.ranges,M=g.length;M--;){var k=g[M];if(k.isEmpty()){var _=S.getWordRange(k.start.row,k.start.column);k.start.row=_.start.row,k.start.column=_.start.column,k.end.row=_.end.row,k.end.column=_.end.column}}C.mergeOverlappingRanges();for(var R=[],M=g.length;M--;){var k=g[M];R.unshift(S.getTextRange(k))}m<0?R.unshift(R.pop()):R.push(R.shift());for(var M=g.length;M--;){var k=g[M],b=k.clone();S.replace(k,R[M]),k.start.row=b.start.row,k.start.column=b.start.column}C.fromOrientedRange(C.ranges[0])},this.selectMore=function(m,S,C){var g=this.session,M=g.multiSelect,k=M.toOrientedRange();if(!(k.isEmpty()&&(k=g.getWordRange(k.start.row,k.start.column),k.cursor=m==-1?k.start:k.end,this.multiSelect.addRange(k),C))){var _=g.getTextRange(k),R=e(g,_,m);R&&(R.cursor=m==-1?R.start:R.end,this.session.unfold(R),this.multiSelect.addRange(R),this.renderer.scrollCursorIntoView(null,.5)),S&&this.multiSelect.substractPoint(k.cursor)}},this.alignCursors=function(){var m=this.session,S=m.multiSelect,C=S.ranges,g=-1,M=C.filter(function(I){if(I.cursor.row==g)return!0;g=I.cursor.row});if(!C.length||M.length==C.length-1){var k=this.selection.getRange(),_=k.start.row,R=k.end.row,b=_==R;if(b){var v=this.session.getLength(),d;do d=this.session.getLine(R);while(/[=:]/.test(d)&&++R<v);do d=this.session.getLine(_);while(/[=:]/.test(d)&&--_>0);_<0&&(_=0),R>=v&&(R=v-1)}var u=this.session.removeFullLines(_,R);u=this.$reAlignText(u,b),this.session.insert({row:_,column:0},u.join(`
`)+`
`),b||(k.start.column=0,k.end.column=u[u.length-1].length),this.selection.setRange(k)}else{M.forEach(function(I){S.substractPoint(I.cursor)});var A=0,L=1/0,T=C.map(function(I){var D=I.cursor,O=m.getLine(D.row),F=O.substr(D.column).search(/\S/g);return F==-1&&(F=0),D.column>A&&(A=D.column),F<L&&(L=F),F});C.forEach(function(I,D){var O=I.cursor,F=A-O.column,N=T[D]-L;F>N?m.insert(O,r.stringRepeat(" ",F-N)):m.remove(new $(O.row,O.column,O.row,O.column-F+N)),I.start.column=I.end.column=A,I.start.row=I.end.row=O.row,I.cursor=I.end}),S.fromOrientedRange(C[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(m,S){var C=!0,g=!0,M,k,_;return m.map(function(u){var A=u.match(/(\s*)(.*?)(\s*)([=:].*)/);return A?M==null?(M=A[1].length,k=A[2].length,_=A[3].length,A):(M+k+_!=A[1].length+A[2].length+A[3].length&&(g=!1),M!=A[1].length&&(C=!1),M>A[1].length&&(M=A[1].length),k<A[2].length&&(k=A[2].length),_>A[3].length&&(_=A[3].length),A):[u]}).map(S?b:C?g?v:b:d);function R(u){return r.stringRepeat(" ",u)}function b(u){return u[2]?R(M)+u[2]+R(k-u[2].length+_)+u[4].replace(/^([=:])\s+/,"$1 "):u[0]}function v(u){return u[2]?R(M+k-u[2].length)+u[2]+R(_)+u[4].replace(/^([=:])\s+/,"$1 "):u[0]}function d(u){return u[2]?R(M)+u[2]+R(_)+u[4].replace(/^([=:])\s+/,"$1 "):u[0]}}}).call(l.prototype);function h(m,S){return m.row==S.row&&m.column==S.column}c.onSessionChange=function(m){var S=m.session;S&&!S.multiSelect&&(S.$selectionMarkers=[],S.selection.$initRangeList(),S.multiSelect=S.selection),this.multiSelect=S&&S.multiSelect;var C=m.oldSession;C&&(C.multiSelect.off("addRange",this.$onAddRange),C.multiSelect.off("removeRange",this.$onRemoveRange),C.multiSelect.off("multiSelect",this.$onMultiSelect),C.multiSelect.off("singleSelect",this.$onSingleSelect),C.multiSelect.lead.off("change",this.$checkMultiselectChange),C.multiSelect.anchor.off("change",this.$checkMultiselectChange)),S&&(S.multiSelect.on("addRange",this.$onAddRange),S.multiSelect.on("removeRange",this.$onRemoveRange),S.multiSelect.on("multiSelect",this.$onMultiSelect),S.multiSelect.on("singleSelect",this.$onSingleSelect),S.multiSelect.lead.on("change",this.$checkMultiselectChange),S.multiSelect.anchor.on("change",this.$checkMultiselectChange)),S&&this.inMultiSelectMode!=S.selection.inMultiSelectMode&&(S.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function f(m){m.$multiselectOnSessionChange||(m.$onAddRange=m.$onAddRange.bind(m),m.$onRemoveRange=m.$onRemoveRange.bind(m),m.$onMultiSelect=m.$onMultiSelect.bind(m),m.$onSingleSelect=m.$onSingleSelect.bind(m),m.$multiselectOnSessionChange=c.onSessionChange.bind(m),m.$checkMultiselectChange=m.$checkMultiselectChange.bind(m),m.$multiselectOnSessionChange(m),m.on("changeSession",m.$multiselectOnSessionChange),m.on("mousedown",s),m.commands.addCommands(o.defaultCommands),p(m))}function p(m){if(!m.textInput)return;var S=m.textInput.getElement(),C=!1;a.addListener(S,"keydown",function(M){var k=M.keyCode==18&&!(M.ctrlKey||M.shiftKey||M.metaKey);m.$blockSelectEnabled&&k?C||(m.renderer.setMouseCursor("crosshair"),C=!0):C&&g()},m),a.addListener(S,"keyup",g,m),a.addListener(S,"blur",g,m);function g(M){C&&(m.renderer.setMouseCursor(""),C=!1)}}c.MultiSelect=f,y("./config").defineOptions(l.prototype,"editor",{enableMultiselect:{set:function(m){f(this),m?this.on("mousedown",s):this.off("mousedown",s)},value:!0},enableBlockSelect:{set:function(m){this.$blockSelectEnabled=m},value:!0}})});ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(y,c,E){"use strict";var x=y("../../range").Range,$=c.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(w,s,a){var r=w.getLine(a);return this.foldingStartMarker.test(r)?"start":s=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(w,s,a){return null},this.indentationBlock=function(w,s,a){var r=/\S/,o=w.getLine(s),i=o.search(r);if(i!=-1){for(var t=a||o.length,e=w.getLength(),n=s,l=s;++s<e;){var h=w.getLine(s).search(r);if(h!=-1){if(h<=i){var f=w.getTokenAt(s,0);if(!f||f.type!=="string")break}l=s}}if(l>n){var p=w.getLine(l).length;return new x(n,t,l,p)}}},this.openingBracketBlock=function(w,s,a,r,o){var i={row:a,column:r+1},t=w.$findClosingBracket(s,i,o);if(t){var e=w.foldWidgets[t.row];return e==null&&(e=w.getFoldWidget(t.row)),e=="start"&&t.row>i.row&&(t.row--,t.column=w.getLine(t.row).length),x.fromPoints(i,t)}},this.closingBracketBlock=function(w,s,a,r,o){var i={row:a,column:r},t=w.$findOpeningBracket(s,i);if(t)return t.column++,i.column--,x.fromPoints(t,i)}}).call($.prototype)});ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(y,c,E){"use strict";var x=y("../lib/dom"),$=y("../range").Range,w=y("../config").nls;function s(r,o,i){for(var t=0,e=r.length-1;t<=e;){var n=t+e>>1,l=i(o,r[n]);if(l>0)t=n+1;else if(l<0)e=n-1;else return n}return-(t+1)}function a(r,o,i){var t=r.getAnnotations().sort($.comparePoints);if(t.length){var e=s(t,{row:o,column:-1},$.comparePoints);e<0&&(e=-e-1),e>=t.length?e=i>0?0:t.length-1:e===0&&i<0&&(e=t.length-1);var n=t[e];if(!(!n||!i)){if(n.row===o){do n=t[e+=i];while(n&&n.row===o);if(!n)return t.slice()}var l=[];o=n.row;do l[i<0?"unshift":"push"](n),n=t[e+=i];while(n&&n.row==o);return l.length&&l}}}c.showErrorMarker=function(r,o){var i=r.session,t=r.getCursorPosition(),e=t.row,n=i.widgetManager.getWidgetsAtRow(e).filter(function(M){return M.type=="errorMarker"})[0];n?n.destroy():e-=o;var l=a(i,e,o),h;if(l){var f=l[0];t.column=(f.pos&&typeof f.column!="number"?f.pos.sc:f.column)||0,t.row=f.row,h=r.renderer.$gutterLayer.$annotations[t.row]}else{if(n)return;h={displayText:[w("error-marker.good-state","Looks good!")],className:"ace_ok"}}r.session.unfold(t.row),r.selection.moveToPosition(t);var p={row:t.row,fixedWidth:!0,coverGutter:!0,el:x.createElement("div"),type:"errorMarker"},m=p.el.appendChild(x.createElement("div")),S=p.el.appendChild(x.createElement("div"));S.className="error_widget_arrow "+h.className;var C=r.renderer.$cursorLayer.getPixelPosition(t).left;S.style.left=C+r.renderer.gutterWidth-5+"px",p.el.className="error_widget_wrapper",m.className="error_widget "+h.className,h.displayText.forEach(function(M,k){m.appendChild(x.createTextNode(M)),k<h.displayText.length-1&&m.appendChild(x.createElement("br"))}),m.appendChild(x.createElement("div"));var g=function(M,k,_){if(k===0&&(_==="esc"||_==="return"))return p.destroy(),{command:"null"}};p.destroy=function(){r.$mouseHandler.isMousePressed||(r.keyBinding.removeKeyboardHandler(g),i.widgetManager.removeLineWidget(p),r.off("changeSelection",p.destroy),r.off("changeSession",p.destroy),r.off("mouseup",p.destroy),r.off("change",p.destroy))},r.keyBinding.addKeyboardHandler(g),r.on("changeSelection",p.destroy),r.on("changeSession",p.destroy),r.on("mouseup",p.destroy),r.on("change",p.destroy),r.session.widgetManager.addLineWidget(p),p.el.onmousedown=r.focus.bind(r),r.renderer.scrollCursorIntoView(null,.5,{bottom:p.el.offsetHeight})},x.importCssString(`
    .error_widget_wrapper {
        background: inherit;
        color: inherit;
        border:none
    }
    .error_widget {
        border-top: solid 2px;
        border-bottom: solid 2px;
        margin: 5px 0;
        padding: 10px 40px;
        white-space: pre-wrap;
    }
    .error_widget.ace_error, .error_widget_arrow.ace_error{
        border-color: #ff5a5a
    }
    .error_widget.ace_warning, .error_widget_arrow.ace_warning{
        border-color: #F1D817
    }
    .error_widget.ace_info, .error_widget_arrow.ace_info{
        border-color: #5a5a5a
    }
    .error_widget.ace_ok, .error_widget_arrow.ace_ok{
        border-color: #5aaa5a
    }
    .error_widget_arrow {
        position: absolute;
        border: solid 5px;
        border-top-color: transparent!important;
        border-right-color: transparent!important;
        border-left-color: transparent!important;
        top: -5px;
    }
`,"error_marker.css",!1)});ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(y,c,E){"use strict";y("./loader_build")(c);var x=y("./lib/dom"),$=y("./range").Range,w=y("./editor").Editor,s=y("./edit_session").EditSession,a=y("./undomanager").UndoManager,r=y("./virtual_renderer").VirtualRenderer;y("./worker/worker_client"),y("./keyboard/hash_handler"),y("./placeholder"),y("./multi_select"),y("./mode/folding/fold_mode"),y("./theme/textmate"),y("./ext/error_marker"),c.config=y("./config"),c.edit=function(i,t){if(typeof i=="string"){var e=i;if(i=document.getElementById(e),!i)throw new Error("ace.edit can't find div #"+e)}if(i&&i.env&&i.env.editor instanceof w)return i.env.editor;var n="";if(i&&/input|textarea/i.test(i.tagName)){var l=i;n=l.value,i=x.createElement("pre"),l.parentNode.replaceChild(i,l)}else i&&(n=i.textContent,i.innerHTML="");var h=c.createEditSession(n),f=new w(new r(i),h,t),p={document:h,editor:f,onResize:f.resize.bind(f,null)};return l&&(p.textarea=l),f.on("destroy",function(){p.editor.container.env=null}),f.container.env=f.env=p,f},c.createEditSession=function(i,t){var e=new s(i,t);return e.setUndoManager(new a),e},c.Range=$,c.Editor=w,c.EditSession=s,c.UndoManager=a,c.VirtualRenderer=r;var o=c.config.version;c.version=o});(function(){ace.require(["ace/ace"],function(y){y&&(y.config.init(!0),y.define=ace.define);var c=(function(){return this})();!c&&typeof window<"u"&&(c=window),!c&&typeof self<"u"&&(c=self),c.ace||(c.ace=y);for(var E in y)y.hasOwnProperty(E)&&(c.ace[E]=y[E]);c.ace.default=c.ace,typeof Te=="object"&&typeof It=="object"&&Te&&(Te.exports=c.ace)})})()});function wi(y={}){let c=y.foreground??ve.foreground,E=y.background??ve.background,x=y.cursor??ve.cursor,$=y.cursorAccent??ve.cursorAccent,w=y.selectionBackground??ve.selectionBackground,s=ot();if(y.palette)for(let e=0;e<Math.min(y.palette.length,16);e++){let n=y.palette[e];n&&(s[e]=n)}let a={};y.black&&(a[0]=y.black),y.red&&(a[1]=y.red),y.green&&(a[2]=y.green),y.yellow&&(a[3]=y.yellow),y.blue&&(a[4]=y.blue),y.magenta&&(a[5]=y.magenta),y.cyan&&(a[6]=y.cyan),y.white&&(a[7]=y.white),y.brightBlack&&(a[8]=y.brightBlack),y.brightRed&&(a[9]=y.brightRed),y.brightGreen&&(a[10]=y.brightGreen),y.brightYellow&&(a[11]=y.brightYellow),y.brightBlue&&(a[12]=y.brightBlue),y.brightMagenta&&(a[13]=y.brightMagenta),y.brightCyan&&(a[14]=y.brightCyan),y.brightWhite&&(a[15]=y.brightWhite);for(let[e,n]of Object.entries(a))s[Number(e)]=n;let r=s.map((e,n)=>`  --sterk-palette-${n}: ${e};`).join(`
`),o=s.map((e,n)=>`.ace_editor .ace_sterk-fg-${n} { color: ${e} !important; }`).join(`
`),i=s.map((e,n)=>`.ace_editor .ace_sterk-bg-${n} { background-color: ${e} !important; }`).join(`
`),t=s.map((e,n)=>`.ace_editor .ace_sterk-bg-${n}.ace_sterk-fg-default { color: ${$e(e)} !important; }`).join(`
`);return`
.sterk {
  --sterk-fg: ${c};
  --sterk-bg: ${E};
  --sterk-cursor: ${x};
  --sterk-cursor-accent: ${$};
  --sterk-selection: ${w};
${r}
}

.ace_editor {
  background-color: var(--sterk-bg);
  color: var(--sterk-fg);
}

.ace_cursor {
  border-left-color: var(--sterk-cursor);
  background-color: var(--sterk-cursor);
  color: var(--sterk-cursor-accent);
}

.ace_selection {
  background-color: var(--sterk-selection);
}

.ace_marker-layer .ace_selection {
  background-color: var(--sterk-selection);
}

/* SGR foreground palette colors (0-255) */
${o}

/* SGR background palette colors (0-255) */
${i}

/* Luminance-contrast fallback: default fg on explicit palette bg (A3) */
${t}

/* SGR text attributes (note '.ace_' prefix \u2014 see fgPaletteRules above). */
.ace_editor .ace_sterk-bold {
  font-weight: bold !important;
}

.ace_editor .ace_sterk-italic {
  font-style: italic !important;
}

.ace_editor .ace_sterk-underline {
  text-decoration: underline !important;
}

.ace_editor .ace_sterk-dim {
  opacity: 0.5 !important;
}

/* Truecolor support: classes are injected dynamically per color */
`.trim()}function bi(y,c="sterk-theme"){let E=document.getElementById(c);E&&E.remove();let x=document.createElement("style");x.id=c,x.textContent=y,document.head.appendChild(x)}function ut(y){let c=wi(y);bi(c)}function Ot(){if(ht.clear(),typeof document>"u")return;let y=document.getElementById("sterk-truecolor");y&&y.remove()}function dt(y,c){let E=y.toString(16).padStart(6,"0"),x=`ace_sterk-${c}-rgb-${E}`;if(ht.has(x))return;ht.add(x);let $=`#${E}`,w=c==="fg"?`.ace_editor .${x} { color: ${$} !important; }`:`.ace_editor .${x} { background-color: ${$} !important; }`,s=c==="bg"?`${w}
.ace_editor .${x}.ace_sterk-fg-default { color: ${$e($)} !important; }`:w,a=document.getElementById("sterk-truecolor");a||(a=document.createElement("style"),a.id="sterk-truecolor",document.head.appendChild(a)),a.textContent+=`
${s}`}var ve,ht,ft=ee(()=>{st();ve={foreground:"#f0f0f0",background:"#1e1e1e",cursor:"#f0f0f0",cursorAccent:"#1e1e1e",selectionBackground:"rgba(58, 117, 175, 0.3)"};ht=new Set});function Ci(y){let c=[],E=-1,x=0,$=-1,w=0;return y.isInverse()?(E=y.getBgColor(),x=y.isBgDefault()?0:y.isBgPalette()?1:2,$=y.getFgColor(),w=y.isFgDefault()?0:y.isFgPalette()?1:2):(E=y.getFgColor(),x=y.isFgDefault()?0:y.isFgPalette()?1:2,$=y.getBgColor(),w=y.isBgDefault()?0:y.isBgPalette()?1:2),x===1?c.push(`sterk-fg-${E}`):x===2&&c.push(`sterk-fg-rgb-${E.toString(16).padStart(6,"0")}`),w===1?c.push(`sterk-bg-${$}`):w===2&&c.push(`sterk-bg-rgb-${$.toString(16).padStart(6,"0")}`),x===0&&w!==0&&c.push("sterk-fg-default"),y.isBold()&&c.push("sterk-bold"),y.isItalic()&&c.push("sterk-italic"),y.isUnderline()&&c.push("sterk-underline"),y.isDim()&&c.push("sterk-dim"),c.join(".")}var Re,Nt=ee(()=>{Re=class{constructor(c){H(this,"bufferNamespace");this.bufferNamespace=c}getMode(){let c=this.bufferNamespace;return{createWorker:()=>null,getTokenizer:()=>({getLineTokens:(E,x,$)=>{let w=[],s=c._getScrollBuffer().getLine($);if(!s)return{tokens:[{type:"",value:E}],state:"start"};let a=null,r=c._getScrollBuffer().cols;for(let o=0;o<r;o++){let i=s.getCell(o),t=i.getChars();if(t.length===0)continue;let e=Ci(i);a&&a.type===e?a.value+=t:(a&&w.push(a),a={type:e,value:t})}return a&&w.push(a),{tokens:w.length>0?w:[{type:"",value:E}],state:"start"}}})}}}});var Ft,Ie,Bt=ee(()=>{Ft=le(Dt(),1);ft();Nt();Ie=class{constructor(c,E,x,$="monospace"){H(this,"container");H(this,"bufferNamespace");H(this,"editor");H(this,"session");H(this,"viewportDiv");H(this,"wrapper");H(this,"updatePromise",null);H(this,"updateResolve",null);H(this,"disposed",!1);H(this,"resizeObserver",null);H(this,"resizeFrameHandle",null);H(this,"lastObservedSize",null);this.container=c,this.bufferNamespace=E,this.wrapper=document.createElement("div"),this.wrapper.classList.add("sterk"),c.appendChild(this.wrapper),this.viewportDiv=document.createElement("div"),this.viewportDiv.classList.add("sterk-viewport"),this.wrapper.appendChild(this.viewportDiv),this.editor=Ft.default.edit(this.viewportDiv),this.session=this.editor.getSession(),this.editor.setOptions({fontSize:x,fontFamily:$,showPrintMargin:!1,showGutter:!1,highlightActiveLine:!1,highlightGutterLine:!1,displayIndentGuides:!1}),this.editor.renderer.setPadding(0),this.injectScrollbarHideCss(),this.editor.setReadOnly(!0),this.session.setUseWrapMode(!1),this.session.setUseSoftTabs(!1);let w=new Re(this.bufferNamespace);this.session.setMode(w.getMode()),this.editor.resize(!0),this.syncBufferToDocument(),this.installResizeObserver()}get buffer(){return this.bufferNamespace._getScrollBuffer()}installResizeObserver(){if(typeof ResizeObserver>"u")return;let c=this.container.getBoundingClientRect();this.lastObservedSize={width:c.width,height:c.height},this.resizeObserver=new ResizeObserver(E=>{let x=E[E.length-1];if(!x)return;let{width:$,height:w}=x.contentRect;if(this.lastObservedSize&&this.lastObservedSize.width===$&&this.lastObservedSize.height===w||(this.lastObservedSize={width:$,height:w},this.resizeFrameHandle!==null))return;let s=typeof requestAnimationFrame=="function"?requestAnimationFrame:a=>setTimeout(()=>a(performance.now()),16);this.resizeFrameHandle=s(()=>{this.resizeFrameHandle=null,this.editor.resize(!0)})}),this.resizeObserver.observe(this.container)}getEditor(){return this.editor}getCellMetrics(){let c=this.editor.renderer,E=c.lineHeight,x=c.characterWidth;return E>0&&x>0?{width:x,height:E}:null}getViewportCellCount(){this.editor.resize(!0);let c=this.editor.renderer,E=this.getCellMetrics();if(!E)return null;let x=c.$size,$=typeof c.$padding=="number"?c.$padding:0,w=x?.scrollerWidth??0,s=x?.scrollerHeight??0;if(w<=0||s<=0)return null;let a=Math.max(0,w-2*$),r=Math.max(1,Math.floor(a/E.width)),o=Math.max(1,Math.floor(s/E.height));return{cols:r,rows:o}}injectScrollbarHideCss(){let c="sterk-scrollbar-hide";if(typeof document>"u"||document.getElementById(c))return;let E=document.createElement("style");E.id=c,E.textContent=`
.sterk .ace_scrollbar-v { display: none !important; }
.sterk .ace_scrollbar-h { display: none !important; }
`.trim(),document.head.appendChild(E)}setFontSize(c){this.editor.setFontSize(c)}setFontFamily(c){this.editor.setOption("fontFamily",c)}getElement(){return this.editor.container}onBufferSwitch(){this.scheduleUpdate()}scheduleUpdate(){if(this.updatePromise)return this.updatePromise;this.updatePromise=new Promise(E=>{this.updateResolve=E});let c=this.updatePromise;return requestAnimationFrame(()=>{let E=this.updateResolve;if(this.updatePromise=null,this.updateResolve=null,this.disposed){E?.();return}this.syncBufferToDocument(),this.updateCursor(),this.updateScroll(),E?.()}),c}forceRepaint(){this.disposed||this.editor.renderer.updateFull(!0)}syncBufferToDocument(){let c=this.session.getDocument(),E=this.buffer,x=c.getLength(),$=E.length;if(this.injectTruecolorStyles(),x<$){let w=[];for(let s=x;s<$;s++)w.push("");w.length>0&&c.insert({row:x,column:0},`${w.join(`
`)}
`)}else x>$&&c.removeLines($,x-1);for(let w=0;w<$;w++){let s=E.getLine(w);if(!s)continue;let a=this.renderLine(s),r=c.getLine(w)??"";a!==r&&(c.removeInLine(w,0,r.length),c.insertInLine({row:w,column:0},a))}}renderLine(c){return c?c.translateToString(!1):""}injectTruecolorStyles(){let c=this.buffer,E=c.cols;for(let x=0;x<c.length;x++){let $=c.getLine(x);if($)for(let w=0;w<E;w++){let s=$.getCell(w);if(s.isFgRGB()){let a=s.getFgColor();dt(a,"fg")}if(s.isBgRGB()){let a=s.getBgColor();dt(a,"bg")}}}}updateCursor(){let c=this.buffer,E=c.baseY+c.cursorY,x=c.cursorX,$=Math.max(0,Math.min(E,c.length-1)),w=Math.max(0,x);this.editor.moveCursorTo($,w)}updateScroll(){let c=this.buffer.viewportY,E=this.editor.renderer.lineHeight;E>0?this.session.setScrollTop(c*E):this.editor.scrollToLine(c,!1,!1,()=>{})}scrollLines(c){this.buffer.scrollViewport(c),this.updateScroll()}scrollToBottom(){this.buffer.scrollToBottom(),this.updateScroll()}resize(c,E){this.buffer.resize(c,E),this.scheduleUpdate()}dispose(){this.disposed=!0,this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.resizeFrameHandle!==null&&typeof cancelAnimationFrame=="function"&&(cancelAnimationFrame(this.resizeFrameHandle),this.resizeFrameHandle=null),this.lastObservedSize=null;let c=this.updateResolve;this.updateResolve=null,this.updatePromise=null,c?.(),this.editor.destroy(),this.viewportDiv.parentNode&&this.viewportDiv.parentNode.removeChild(this.viewportDiv),this.wrapper.parentNode&&this.wrapper.parentNode.removeChild(this.wrapper)}}});function xi(y){if(y.isComposing)return null;let{key:c,ctrlKey:E,altKey:x,metaKey:$,shiftKey:w}=y;if(E&&!x&&!$){if(c==="c"||c==="C")return"";if(c==="d"||c==="D")return"";if(c==="z"||c==="Z")return"";if(c==="\\")return"";if(c.length===1){let a=c.toLowerCase();if(a>="a"&&a<="z"){let r=a.charCodeAt(0)-96;return String.fromCharCode(r)}}}if(x&&!E&&!$){if(c.length===1)return`\x1B${c}`;let a=Wt[c];if(a)return`\x1B${a}`}let s=Wt[c];return s?c==="Tab"&&w?"\x1B[Z":s:c.length===1&&!E&&!$?c:null}var Wt,De,zt=ee(()=>{Wt={ArrowUp:"\x1B[A",ArrowDown:"\x1B[B",ArrowRight:"\x1B[C",ArrowLeft:"\x1B[D",Home:"\x1B[H",End:"\x1B[F",PageUp:"\x1B[5~",PageDown:"\x1B[6~",Insert:"\x1B[2~",Delete:"\x1B[3~",F1:"\x1BOP",F2:"\x1BOQ",F3:"\x1BOR",F4:"\x1BOS",F5:"\x1B[15~",F6:"\x1B[17~",F7:"\x1B[18~",F8:"\x1B[19~",F9:"\x1B[20~",F10:"\x1B[21~",F11:"\x1B[23~",F12:"\x1B[24~",Tab:"	",Enter:"\r",Backspace:"\x7F",Escape:"\x1B"};De=class{constructor(c){H(this,"element");H(this,"onDataCallback",null);H(this,"compositionData","");H(this,"handleKeyDown",c=>{let E=xi(c);E&&this.onDataCallback&&(c.preventDefault(),this.onDataCallback(E))});H(this,"handleKeyPress",c=>{});H(this,"handleCompositionStart",()=>{this.compositionData=""});H(this,"handleCompositionUpdate",c=>{this.compositionData=c.data});H(this,"handleCompositionEnd",c=>{let E=c.data||this.compositionData;E&&this.onDataCallback&&this.onDataCallback(E),this.compositionData=""});this.element=c,c.addEventListener("keydown",this.handleKeyDown),c.addEventListener("keypress",this.handleKeyPress),c.addEventListener("compositionstart",this.handleCompositionStart),c.addEventListener("compositionupdate",this.handleCompositionUpdate),c.addEventListener("compositionend",this.handleCompositionEnd),c.addEventListener("keydown",E=>{let x=E;(x.key==="Tab"||x.ctrlKey&&["c","v","a"].includes(x.key))&&x.preventDefault()})}onData(c){this.onDataCallback=c}dispose(){this.element.removeEventListener("keydown",this.handleKeyDown),this.element.removeEventListener("keypress",this.handleKeyPress),this.element.removeEventListener("compositionstart",this.handleCompositionStart),this.element.removeEventListener("compositionupdate",this.handleCompositionUpdate),this.element.removeEventListener("compositionend",this.handleCompositionEnd),this.onDataCallback=null}}});function $i(y,c){let E=[];gt.lastIndex=0;let x=gt.exec(y);for(;x!==null;)E.push({type:"url",text:x[0],row:c,startCol:x.index,endCol:x.index+x[0].length}),x=gt.exec(y);for(pt.lastIndex=0,x=pt.exec(y);x!==null;)!E.some(w=>w.row===c&&x&&x.index<w.endCol&&x.index+x[0].length>w.startCol)&&x&&E.push({type:"file",text:x[0],row:c,startCol:x.index,endCol:x.index+x[0].length}),x=pt.exec(y);return E}function Ai(y,c,E){let x=[];for(let $=c;$<=E;$++){let w=y.getLine($);if(!w)continue;let s=w.translateToString(!0),a=$i(s,$);x.push(...a)}return x}var gt,pt,Oe,Ht=ee(()=>{gt=/https?:\/\/[^\s<>"{}|\\^`[\]]+/gi,pt=/(?:\/[a-zA-Z0-9_.-]+)+/g;Oe=class{constructor(c,E,x){H(this,"element");H(this,"buffer");H(this,"getCellMetrics");H(this,"links",[]);H(this,"hoveredLink",null);H(this,"onHoverCallback",null);H(this,"onClickCallback",null);H(this,"handleMouseMove",c=>{let E=this.getCellMetrics();if(!E)return;let x=this.element.getBoundingClientRect(),$=c.clientX-x.left,w=c.clientY-x.top,s=Math.floor($/E.width),a=Math.floor(w/E.height)+this.buffer().viewportY,r=this.links.find(o=>o.row===a&&s>=o.startCol&&s<o.endCol);r!==this.hoveredLink&&(this.hoveredLink=r??null,this.onHoverCallback&&this.onHoverCallback(this.hoveredLink),this.element.style.cursor=r?"pointer":"text")});H(this,"handleClick",()=>{this.hoveredLink&&this.onClickCallback&&this.onClickCallback(this.hoveredLink)});this.element=c,this.buffer=E,this.getCellMetrics=x,c.addEventListener("mousemove",this.handleMouseMove),c.addEventListener("click",this.handleClick)}onHover(c){this.onHoverCallback=c}onClick(c){this.onClickCallback=c}updateLinks(c,E){this.links=Ai(this.buffer(),c,E)}dispose(){this.element.removeEventListener("mousemove",this.handleMouseMove),this.element.removeEventListener("click",this.handleClick),this.onHoverCallback=null,this.onClickCallback=null}}});function Si(y,c,E,x,$){let w=y.clientX-x,s=y.clientY-$,a=Math.floor(w/c),r=Math.floor(s/E);return{col:Math.max(0,a),row:Math.max(0,r)}}function ki(y,c,E,x){let $=32+y+x,w=33+c,s=33+E;return`\x1B[M${String.fromCharCode($)}${String.fromCharCode(w)}${String.fromCharCode(s)}`}function Pt(y,c,E,x,$){let w=y+x,s=$?"M":"m";return`\x1B[<${w};${c+1};${E+1}${s}`}function Ne(y){let c=0;return y.shiftKey&&(c+=4),(y.altKey||y.metaKey)&&(c+=8),y.ctrlKey&&(c+=16),c}var he,ie,re,ye,Fe,Ut=ee(()=>{(function(y){y[y.Left=0]="Left",y[y.Middle=1]="Middle",y[y.Right=2]="Right",y[y.Release=3]="Release"})(he||(he={}));(function(y){y[y.Off=0]="Off",y[y.VT200=1e3]="VT200",y[y.CellMotion=1002]="CellMotion",y[y.AllMotion=1003]="AllMotion"})(ie||(ie={}));(function(y){y[y.Default=0]="Default",y[y.SGR=1006]="SGR"})(re||(re={}));(function(y){y[y.Off=0]="Off",y[y.X10=1]="X10",y[y.SGR1006=2]="SGR1006"})(ye||(ye={}));Fe=class{constructor(c,E){H(this,"element");H(this,"getCellMetrics");H(this,"tracking",ie.Off);H(this,"encoding",re.Default);H(this,"onDataCallback",null);H(this,"onScrollCallback",null);H(this,"lastButton",null);H(this,"handleMouseDown",c=>{if(this.tracking===ie.Off)return;let E=this.cellFor(c);if(!E)return;let x;if(c.button===0)x=he.Left;else if(c.button===1)x=he.Middle;else if(c.button===2)x=he.Right;else return;this.lastButton=x,this.emitEvent(x,E.col,E.row,Ne(c),!0),c.preventDefault()});H(this,"handleMouseUp",c=>{if(this.tracking===ie.Off||this.lastButton===null)return;let E=this.cellFor(c);E&&(this.emitEvent(this.lastButton,E.col,E.row,Ne(c),!1),this.lastButton=null,c.preventDefault())});H(this,"handleMouseMove",c=>{if(this.tracking===ie.Off||this.tracking===ie.VT200||this.tracking===ie.CellMotion&&this.lastButton===null)return;let E=this.cellFor(c);if(!E)return;let x=this.lastButton??he.Release,$=Ne(c)+32;this.emitEvent(x,E.col,E.row,$,!0)});H(this,"handleWheel",c=>{if(c.preventDefault(),this.tracking===ie.Off){let w=Math.sign(c.deltaY)*3;this.onScrollCallback&&this.onScrollCallback(w);return}let E=this.cellFor(c);if(!E)return;let x=c.deltaY>0?65:64,$=Ne(c);if(this.encoding===re.SGR){let w=Pt(x,E.col,E.row,$,!0);this.onDataCallback&&this.onDataCallback(w)}});H(this,"touchStartY",0);H(this,"touchLastY",0);H(this,"handleTouchStart",c=>{let E=c.touches[0];E&&(this.touchStartY=E.clientY,this.touchLastY=E.clientY)});H(this,"handleTouchMove",c=>{if(this.tracking!==ie.Off){c.preventDefault();return}let E=c.touches[0];if(E){let x=this.touchLastY-E.clientY;if(this.touchLastY=E.clientY,Math.abs(x)>10){let $=Math.sign(x)*1;this.onScrollCallback&&this.onScrollCallback($),c.preventDefault()}}});H(this,"handleTouchEnd",()=>{this.touchStartY=0,this.touchLastY=0});this.element=c,this.getCellMetrics=E,c.addEventListener("mousedown",this.handleMouseDown),c.addEventListener("mouseup",this.handleMouseUp),c.addEventListener("mousemove",this.handleMouseMove),c.addEventListener("wheel",this.handleWheel,{passive:!1}),c.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),c.addEventListener("touchmove",this.handleTouchMove,{passive:!1}),c.addEventListener("touchend",this.handleTouchEnd,{passive:!0})}setTrackingMode(c){this.tracking=c}getTrackingMode(){return this.tracking}setEncoding(c){this.encoding=c}getEncoding(){return this.encoding}setMode(c){switch(c){case ye.Off:this.tracking=ie.Off,this.encoding=re.Default;break;case ye.X10:this.tracking=ie.VT200,this.encoding=re.Default;break;case ye.SGR1006:this.tracking=ie.VT200,this.encoding=re.SGR;break}}onData(c){this.onDataCallback=c}onScroll(c){this.onScrollCallback=c}emitEvent(c,E,x,$,w){if(this.onDataCallback)if(this.encoding===re.SGR)this.onDataCallback(Pt(c,E,x,$,w));else{let s=w?c:he.Release;this.onDataCallback(ki(s,E,x,$))}}cellFor(c){let E=this.getCellMetrics();if(!E)return null;let x=this.element.getBoundingClientRect();return Si(c,E.width,E.height,x.left,x.top)}dispose(){this.element.removeEventListener("mousedown",this.handleMouseDown),this.element.removeEventListener("mouseup",this.handleMouseUp),this.element.removeEventListener("mousemove",this.handleMouseMove),this.element.removeEventListener("wheel",this.handleWheel),this.element.removeEventListener("touchstart",this.handleTouchStart),this.element.removeEventListener("touchmove",this.handleTouchMove),this.element.removeEventListener("touchend",this.handleTouchEnd),this.onDataCallback=null,this.onScrollCallback=null}}});var mt,Be,Vt=ee(()=>{Le();rt();Tt();Rt();Bt();zt();Ht();Ut();ft();tt();at();mt=class{constructor(c){H(this,"vtParser");this.vtParser=c}registerOscHandler(c,E){return this.vtParser.registerOscHandler(c,E)}},Be=class{constructor(c){H(this,"bufferNamespace");H(this,"vtParser");H(this,"parserImpl");H(this,"emitter",new me);H(this,"_options");H(this,"aceRenderer",null);H(this,"inputHandler",null);H(this,"mouseHandler",null);H(this,"linkDetector",null);H(this,"pendingMouseTracking",ie.Off);H(this,"pendingMouseEncoding",re.Default);let E=c?.font===void 0?nt:c.font===""?void 0:c.font,x=c?.fontFamily??"monospace";if(E!==void 0){let $=Ce(E);xe($),x=`'${$.family}', monospace`}this._options={cols:c?.cols??80,rows:c?.rows??24,scrollback:c?.scrollback??1e3,theme:c?.theme??{},fontFamily:x,font:E??"",fontSize:c?.fontSize??13,allowSelection:c?.allowSelection??!0},this.bufferNamespace=new _e(this._options.cols,this._options.rows,this._options.scrollback),this.vtParser=new Ee({print:($,w)=>this.handlePrint($,w),execute:$=>this.handleExecute($),escDispatch:($,w)=>this.handleEscDispatch($,w),csiDispatch:($,w,s)=>this.handleCsiDispatch($,w,s),oscDispatch:($,w)=>this.handleOscDispatch($,w),put:$=>{},collect:$=>{},param:$=>{},clear:()=>{}}),this.parserImpl=new mt(this.vtParser)}get cols(){return this._options.cols}get rows(){return this._options.rows}get options(){return this._options}get parser(){return this.parserImpl}get buffer(){return this.bufferNamespace}get scrollBuffer(){return this.bufferNamespace._getScrollBuffer()}write(c,E){this.vtParser.write(c),this.aceRenderer&&this.aceRenderer.scheduleUpdate(),this.emitter.emit("write-parsed"),E&&E()}resize(c,E){this._options.cols=c,this._options.rows=E,this.scrollBuffer.resize(c,E),this.aceRenderer&&this.aceRenderer.resize(c,E)}clear(){this.scrollBuffer.clear(),this.vtParser.currentAttrs={...ne}}scrollLines(c){this.scrollBuffer.scrollViewport(c),this.aceRenderer&&this.aceRenderer.scheduleUpdate()}scrollToBottom(){this.scrollBuffer.scrollToBottom(),this.aceRenderer&&this.aceRenderer.scheduleUpdate()}async refresh(){this.aceRenderer&&(await this.aceRenderer.scheduleUpdate(),this.aceRenderer?.forceRepaint())}onWriteParsed(c){return this.emitter.on("write-parsed",c),{dispose:()=>{this.emitter.off("write-parsed",c)}}}onData(c){let E=x=>{typeof x=="string"&&c(x)};return this.emitter.on("data",E),{dispose:()=>{this.emitter.off("data",E)}}}send(c){let E=typeof c=="string"?c:new TextDecoder().decode(c);this.emitter.emit("data",E)}open(c){if(this.aceRenderer)throw new Error("Terminal is already opened");this.aceRenderer=new Ie(c,this.bufferNamespace,this._options.fontSize,this._options.fontFamily),ut(this._options.theme);let E=this.aceRenderer.getElement();this.inputHandler=new De(E),this.inputHandler.onData(x=>{this.emitter.emit("data",x)}),this.mouseHandler=new Fe(E,()=>this.getCellMetrics()),this.mouseHandler.onData(x=>{this.emitter.emit("data",x)}),this.mouseHandler.onScroll(x=>{this.scrollLines(x)}),this.mouseHandler.setTrackingMode(this.pendingMouseTracking),this.mouseHandler.setEncoding(this.pendingMouseEncoding),this.linkDetector=new Oe(E,()=>this.buffer.active,()=>this.getCellMetrics()),this.linkDetector.onHover(x=>{this.emitter.emit("link-hover",x)}),this.linkDetector.onClick(x=>{this.emitter.emit("link-click",x)}),this.aceRenderer.scheduleUpdate()}get renderer(){return this.aceRenderer??void 0}getCellMetrics(){return this.aceRenderer?this.aceRenderer.getCellMetrics():null}getViewportCellCount(){return this.aceRenderer?this.aceRenderer.getViewportCellCount():null}setTheme(c){let E=et(c),x=qe(E);this._options.theme=x,ut(x),Ot(),this.aceRenderer&&this.aceRenderer.scheduleUpdate()}setFont(c){let E=Ce(c);xe(E);let x=`'${E.family}', monospace`;this._options.font=E.id,this._options.fontFamily=x,this.aceRenderer&&(this.aceRenderer.setFontFamily(x),this.aceRenderer.scheduleUpdate())}dispose(){this.aceRenderer&&(this.aceRenderer.dispose(),this.aceRenderer=null),this.inputHandler&&(this.inputHandler.dispose(),this.inputHandler=null),this.mouseHandler&&(this.mouseHandler.dispose(),this.mouseHandler=null),this.linkDetector&&(this.linkDetector.dispose(),this.linkDetector=null),this.emitter.removeAllListeners()}handlePrint(c,E){this.scrollBuffer.printCodePoint(c,E,this.vtParser.currentAttrs)}handleExecute(c){switch(c){case 7:this.emitter.emit("bell");break;case 8:{let E=this.scrollBuffer.cursorX;E>0&&this.scrollBuffer.setCursor(E-1,this.scrollBuffer.cursorY)}break;case 9:{let E=this.scrollBuffer.cursorX,x=Math.floor((E+8)/8)*8;this.scrollBuffer.setCursor(Math.min(x,this.cols-1),this.scrollBuffer.cursorY)}break;case 10:case 11:case 12:{let E=this.scrollBuffer.cursorY;if(E>=this.rows-1){this.scrollBuffer.insertLine();let x=this.scrollBuffer.length-1;this.scrollBuffer.setCursor(0,x)}else this.scrollBuffer.setCursor(0,E+1)}break;case 13:this.scrollBuffer.setCursor(0,this.scrollBuffer.cursorY);break;default:break}}handleEscDispatch(c,E){if(c.length===0)switch(E){case 55:this.bufferNamespace.saveCursor(this.vtParser.currentAttrs);break;case 56:this.bufferNamespace.restoreCursor(this.vtParser.currentAttrs);break;default:break}}handleCsiDispatch(c,E,x){let $=c[0]?.[0]??1,w=c[1]?.[0]??1;switch(x){case 65:{let s=Math.max(1,$),a=this.scrollBuffer.cursorY;this.scrollBuffer.setCursor(this.scrollBuffer.cursorX,Math.max(0,a-s))}break;case 66:{let s=Math.max(1,$),a=this.scrollBuffer.cursorY;this.scrollBuffer.setCursor(this.scrollBuffer.cursorX,Math.min(this.rows-1,a+s))}break;case 67:{let s=Math.max(1,$),a=this.scrollBuffer.cursorX;this.scrollBuffer.setCursor(Math.min(this.cols-1,a+s),this.scrollBuffer.cursorY)}break;case 68:{let s=Math.max(1,$),a=this.scrollBuffer.cursorX;this.scrollBuffer.setCursor(Math.max(0,a-s),this.scrollBuffer.cursorY)}break;case 72:case 102:{let s=$-1,a=w-1,r=this.scrollBuffer.liveTop+s;this.scrollBuffer.setCursor(Math.max(0,Math.min(a,this.cols-1)),Math.max(this.scrollBuffer.liveTop,Math.min(r,this.scrollBuffer.liveTop+this.rows-1)))}break;case 74:this.eraseInDisplay(c[0]?.[0]??0);break;case 75:this.eraseInLine(c[0]?.[0]??0);break;case 104:case 108:E.length===1&&E[0]===63&&this.handleDecPrivateMode(c,x===104);break;case 115:this.bufferNamespace.saveCursor(this.vtParser.currentAttrs);break;case 117:this.bufferNamespace.restoreCursor(this.vtParser.currentAttrs);break;case 109:Et(c,this.vtParser.currentAttrs);break;default:break}}handleOscDispatch(c,E){}eraseInDisplay(c){let E={...ne};switch(c){case 0:{this.eraseInLine(0);let x=this.scrollBuffer.cursorY+1;for(let $=x;$<this.rows;$++)for(let w=0;w<this.cols;w++){let s={x:this.scrollBuffer.cursorX,y:this.scrollBuffer.cursorY};this.scrollBuffer.setCursor(w,$),this.scrollBuffer.writeCell(" ",32,E),this.scrollBuffer.setCursor(s.x,s.y)}}break;case 1:{let x=this.scrollBuffer.cursorY;for(let $=0;$<x;$++)for(let w=0;w<this.cols;w++){let s={x:this.scrollBuffer.cursorX,y:this.scrollBuffer.cursorY};this.scrollBuffer.setCursor(w,$),this.scrollBuffer.writeCell(" ",32,E),this.scrollBuffer.setCursor(s.x,s.y)}this.eraseInLine(1)}break;case 2:case 3:this.clear();break;default:break}}eraseInLine(c){let E={...ne},x=this.scrollBuffer.cursorY,$=this.scrollBuffer.cursorX;switch(c){case 0:for(let w=$;w<this.cols;w++){let s={x:this.scrollBuffer.cursorX,y:this.scrollBuffer.cursorY};this.scrollBuffer.setCursor(w,x),this.scrollBuffer.writeCell(" ",32,E),this.scrollBuffer.setCursor(s.x,s.y)}break;case 1:for(let w=0;w<=$;w++){let s={x:this.scrollBuffer.cursorX,y:this.scrollBuffer.cursorY};this.scrollBuffer.setCursor(w,x),this.scrollBuffer.writeCell(" ",32,E),this.scrollBuffer.setCursor(s.x,s.y)}break;case 2:for(let w=0;w<this.cols;w++){let s={x:this.scrollBuffer.cursorX,y:this.scrollBuffer.cursorY};this.scrollBuffer.setCursor(w,x),this.scrollBuffer.writeCell(" ",32,E),this.scrollBuffer.setCursor(s.x,s.y)}break;default:break}}handleDecPrivateMode(c,E){for(let x of c){if(!x||x.length===0)continue;let $=x[0];if($!==void 0)switch($){case 1047:E?(this.bufferNamespace.switchToAlternate(),this.aceRenderer&&this.aceRenderer.onBufferSwitch()):(this.bufferNamespace.switchToNormal(),this.aceRenderer&&this.aceRenderer.onBufferSwitch());break;case 1048:E?this.bufferNamespace.saveCursor(this.vtParser.currentAttrs):this.bufferNamespace.restoreCursor(this.vtParser.currentAttrs);break;case 1049:E?(this.bufferNamespace.saveCursor(this.vtParser.currentAttrs),this.bufferNamespace.switchToAlternate(),this.scrollBuffer.clear(),this.aceRenderer&&this.aceRenderer.onBufferSwitch()):(this.scrollBuffer.clear(),this.bufferNamespace.switchToNormal(),this.bufferNamespace.restoreCursor(this.vtParser.currentAttrs),this.aceRenderer&&this.aceRenderer.onBufferSwitch());break;case 1e3:this.applyMouseTracking(ie.VT200,E);break;case 1002:this.applyMouseTracking(ie.CellMotion,E);break;case 1003:this.applyMouseTracking(ie.AllMotion,E);break;case 1006:this.applyMouseEncoding(E?re.SGR:re.Default);break;default:break}}}applyMouseTracking(c,E){if(E)this.pendingMouseTracking=c;else if(this.pendingMouseTracking===c)this.pendingMouseTracking=ie.Off;else return;this.mouseHandler?.setTrackingMode(this.pendingMouseTracking)}applyMouseEncoding(c){this.pendingMouseEncoding=c,this.mouseHandler?.setEncoding(c)}}});function Gt(y){return new Be(y)}var jt=ee(()=>{tt();rt();st();at();Vt()});var Kt=se((Yt,We)=>{ace.define("ace/theme/tomorrow_night-css",["require","exports","module"],function(y,c,E){E.exports=`.ace-tomorrow-night .ace_gutter {
  background: #25282c;
  color: #C5C8C6
}

.ace-tomorrow-night .ace_print-margin {
  width: 1px;
  background: #25282c
}

.ace-tomorrow-night {
  background-color: #1D1F21;
  color: #C5C8C6
}

.ace-tomorrow-night .ace_cursor {
  color: #AEAFAD
}

.ace-tomorrow-night .ace_marker-layer .ace_selection {
  background: #373B41
}

.ace-tomorrow-night.ace_multiselect .ace_selection.ace_start {
  box-shadow: 0 0 3px 0px #1D1F21;
}

.ace-tomorrow-night .ace_marker-layer .ace_step {
  background: rgb(102, 82, 0)
}

.ace-tomorrow-night .ace_marker-layer .ace_bracket {
  margin: -1px 0 0 -1px;
  border: 1px solid #4B4E55
}

.ace-tomorrow-night .ace_marker-layer .ace_active-line {
  background: #282A2E
}

.ace-tomorrow-night .ace_gutter-active-line {
  background-color: #282A2E
}

.ace-tomorrow-night .ace_marker-layer .ace_selected-word {
  border: 1px solid #373B41
}

.ace-tomorrow-night .ace_invisible {
  color: #4B4E55
}

.ace-tomorrow-night .ace_keyword,
.ace-tomorrow-night .ace_meta,
.ace-tomorrow-night .ace_storage,
.ace-tomorrow-night .ace_storage.ace_type,
.ace-tomorrow-night .ace_support.ace_type {
  color: #B294BB
}

.ace-tomorrow-night .ace_keyword.ace_operator {
  color: #8ABEB7
}

.ace-tomorrow-night .ace_constant.ace_character,
.ace-tomorrow-night .ace_constant.ace_language,
.ace-tomorrow-night .ace_constant.ace_numeric,
.ace-tomorrow-night .ace_keyword.ace_other.ace_unit,
.ace-tomorrow-night .ace_support.ace_constant,
.ace-tomorrow-night .ace_variable.ace_parameter {
  color: #DE935F
}

.ace-tomorrow-night .ace_constant.ace_other {
  color: #CED1CF
}

.ace-tomorrow-night .ace_invalid {
  color: #CED2CF;
  background-color: #DF5F5F
}

.ace-tomorrow-night .ace_invalid.ace_deprecated {
  color: #CED2CF;
  background-color: #B798BF
}

.ace-tomorrow-night .ace_fold {
  background-color: #81A2BE;
  border-color: #C5C8C6
}

.ace-tomorrow-night .ace_entity.ace_name.ace_function,
.ace-tomorrow-night .ace_support.ace_function,
.ace-tomorrow-night .ace_variable {
  color: #81A2BE
}

.ace-tomorrow-night .ace_support.ace_class,
.ace-tomorrow-night .ace_support.ace_type {
  color: #F0C674
}

.ace-tomorrow-night .ace_heading,
.ace-tomorrow-night .ace_markup.ace_heading,
.ace-tomorrow-night .ace_string {
  color: #B5BD68
}

.ace-tomorrow-night .ace_entity.ace_name.ace_tag,
.ace-tomorrow-night .ace_entity.ace_other.ace_attribute-name,
.ace-tomorrow-night .ace_meta.ace_tag,
.ace-tomorrow-night .ace_string.ace_regexp,
.ace-tomorrow-night .ace_variable {
  color: #CC6666
}

.ace-tomorrow-night .ace_comment {
  color: #969896
}

.ace-tomorrow-night .ace_indent-guide {
  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y
}

.ace-tomorrow-night .ace_indent-guide-active {
  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
}
`});ace.define("ace/theme/tomorrow_night",["require","exports","module","ace/theme/tomorrow_night-css","ace/lib/dom"],function(y,c,E){c.isDark=!0,c.cssClass="ace-tomorrow-night",c.cssText=y("./tomorrow_night-css");var x=y("../lib/dom");x.importCssString(c.cssText,c.cssClass,!1)});(function(){ace.require(["ace/theme/tomorrow_night"],function(y){typeof We=="object"&&typeof Yt=="object"&&We&&(We.exports=y)})})()});var Xt=se((Qt,ze)=>{ace.define("ace/theme/gruvbox-css",["require","exports","module"],function(y,c,E){E.exports=`.ace-gruvbox .ace_gutter-active-line {
  background-color: #3C3836;
}

.ace-gruvbox {
  color: #EBDAB4;
  background-color: #1D2021;
}

.ace-gruvbox .ace_invisible {
  color: #504945;
}

.ace-gruvbox .ace_marker-layer .ace_selection {
  background: rgba(179, 101, 57, 0.75)
}

.ace-gruvbox.ace_multiselect .ace_selection.ace_start {
  box-shadow: 0 0 3px 0px #002240;
}

.ace-gruvbox .ace_keyword {
  color: #8ec07c;
}

.ace-gruvbox .ace_comment {
  font-style: italic;
  color: #928375;
}

.ace-gruvbox .ace-statement {
  color: red;
}

.ace-gruvbox .ace_variable {
  color: #84A598;
}

.ace-gruvbox .ace_variable.ace_language {
  color: #D2879B;
}

.ace-gruvbox .ace_constant {
  color: #C2859A;
}

.ace-gruvbox .ace_constant.ace_language {
  color: #C2859A;
}

.ace-gruvbox .ace_constant.ace_numeric {
  color: #C2859A;
}

.ace-gruvbox .ace_string {
  color: #B8BA37;
}

.ace-gruvbox .ace_support {
  color: #F9BC41;
}

.ace-gruvbox .ace_support.ace_function {
  color: #F84B3C;
}

.ace-gruvbox .ace_storage {
  color: #8FBF7F;
}

.ace-gruvbox .ace_keyword.ace_operator {
  color: #EBDAB4;
}

.ace-gruvbox .ace_punctuation.ace_operator {
  color: yellow;
}

.ace-gruvbox .ace_marker-layer .ace_active-line {
  background: #3C3836;
}

.ace-gruvbox .ace_marker-layer .ace_selected-word {
  border-radius: 4px;
  border: 8px solid #3f475d;
}

.ace-gruvbox .ace_print-margin {
  width: 5px;
  background: #3C3836;
}

.ace-gruvbox .ace_indent-guide {
  background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQUFD4z6Crq/sfAAuYAuYl+7lfAAAAAElFTkSuQmCC") right repeat-y;
}

.ace-gruvbox .ace_indent-guide-active {
  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
}
`});ace.define("ace/theme/gruvbox",["require","exports","module","ace/theme/gruvbox-css","ace/lib/dom"],function(y,c,E){c.isDark=!0,c.cssClass="ace-gruvbox",c.cssText=y("./gruvbox-css");var x=y("../lib/dom");x.importCssString(c.cssText,c.cssClass,!1)});(function(){ace.require(["ace/theme/gruvbox"],function(y){typeof ze=="object"&&typeof Qt=="object"&&ze&&(ze.exports=y)})})()});var Jt=se((Zt,He)=>{ace.define("ace/theme/nord_dark-css",["require","exports","module"],function(y,c,E){E.exports=`.ace-nord-dark .ace_gutter {
  color: #616e88;
}

.ace-nord-dark .ace_print-margin {
  width: 1px;
  background: #4c566a;
}

.ace-nord-dark {
  background-color: #2e3440;
  color: #d8dee9;
}

.ace-nord-dark .ace_entity.ace_other.ace_attribute-name,
.ace-nord-dark .ace_storage {
  color: #d8dee9;
}

.ace-nord-dark .ace_cursor {
  color: #d8dee9;
}

.ace-nord-dark .ace_string.ace_regexp {
  color: #bf616a;
}

.ace-nord-dark .ace_marker-layer .ace_active-line {
  background: #434c5ecc;
}
.ace-nord-dark .ace_marker-layer .ace_selection {
  background: #434c5ecc;
}

.ace-nord-dark.ace_multiselect .ace_selection.ace_start {
  box-shadow: 0 0 3px 0px #2e3440;
}

.ace-nord-dark .ace_marker-layer .ace_step {
  background: #ebcb8b;
}

.ace-nord-dark .ace_marker-layer .ace_bracket {
  margin: -1px 0 0 -1px;
  border: 1px solid #88c0d066;
}

.ace-nord-dark .ace_gutter-active-line {
  background-color: #434c5ecc;
}

.ace-nord-dark .ace_marker-layer .ace_selected-word {
  border: 1px solid #88c0d066;
}

.ace-nord-dark .ace_invisible {
  color: #4c566a;
}

.ace-nord-dark .ace_keyword,
.ace-nord-dark .ace_meta,
.ace-nord-dark .ace_support.ace_class,
.ace-nord-dark .ace_support.ace_type {
  color: #81a1c1;
}

.ace-nord-dark .ace_constant.ace_character,
.ace-nord-dark .ace_constant.ace_other {
  color: #d8dee9;
}

.ace-nord-dark .ace_constant.ace_language {
  color: #5e81ac;
}

.ace-nord-dark .ace_constant.ace_escape {
  color: #ebcB8b;
}

.ace-nord-dark .ace_constant.ace_numeric {
  color: #b48ead;
}

.ace-nord-dark .ace_fold {
  background-color: #4c566a;
  border-color: #d8dee9;
}

.ace-nord-dark .ace_entity.ace_name.ace_function,
.ace-nord-dark .ace_entity.ace_name.ace_tag,
.ace-nord-dark .ace_support.ace_function,
.ace-nord-dark .ace_variable,
.ace-nord-dark .ace_variable.ace_language {
  color: #8fbcbb;
}

.ace-nord-dark .ace_string {
  color: #a3be8c;
}

.ace-nord-dark .ace_comment {
  color: #616e88;
}

.ace-nord-dark .ace_indent-guide {
  box-shadow: inset -1px 0 0 0 #434c5eb3;
}

.ace-nord-dark .ace_indent-guide-active {
  box-shadow: inset -1px 0 0 0 #8395b8b3;
}
`});ace.define("ace/theme/nord_dark",["require","exports","module","ace/theme/nord_dark-css","ace/lib/dom"],function(y,c,E){c.isDark=!0,c.cssClass="ace-nord-dark",c.cssText=y("./nord_dark-css"),c.$selectionColorConflict=!0;var x=y("../lib/dom");x.importCssString(c.cssText,c.cssClass,!1)});(function(){ace.require(["ace/theme/nord_dark"],function(y){typeof He=="object"&&typeof Zt=="object"&&He&&(He.exports=y)})})()});var ei=se((qt,Pe)=>{ace.define("ace/theme/solarized_dark-css",["require","exports","module"],function(y,c,E){E.exports=`.ace-solarized-dark .ace_gutter {
  background: #01313f;
  color: #d0edf7
}

.ace-solarized-dark .ace_print-margin {
  width: 1px;
  background: #33555E
}

.ace-solarized-dark {
  background-color: #002B36;
  color: #839496
}

.ace-solarized-dark .ace_entity.ace_other.ace_attribute-name,
.ace-solarized-dark .ace_storage {
  color: #839496
}

.ace-solarized-dark .ace_cursor,
.ace-solarized-dark .ace_string.ace_regexp {
  color: #D30102
}

.ace-solarized-dark .ace_marker-layer .ace_active-line,
.ace-solarized-dark .ace_marker-layer .ace_selection {
  background: rgba(255, 255, 255, 0.1)
}

.ace-solarized-dark.ace_multiselect .ace_selection.ace_start {
  box-shadow: 0 0 3px 0px #002B36;
}

.ace-solarized-dark .ace_marker-layer .ace_step {
  background: rgb(102, 82, 0)
}

.ace-solarized-dark .ace_marker-layer .ace_bracket {
  margin: -1px 0 0 -1px;
  border: 1px solid rgba(147, 161, 161, 0.50)
}

.ace-solarized-dark .ace_gutter-active-line {
  background-color: #0d3440
}

.ace-solarized-dark .ace_marker-layer .ace_selected-word {
  border: 1px solid #073642
}

.ace-solarized-dark .ace_invisible {
  color: rgba(147, 161, 161, 0.50)
}

.ace-solarized-dark .ace_keyword,
.ace-solarized-dark .ace_meta,
.ace-solarized-dark .ace_support.ace_class,
.ace-solarized-dark .ace_support.ace_type {
  color: #859900
}

.ace-solarized-dark .ace_constant.ace_character,
.ace-solarized-dark .ace_constant.ace_other {
  color: #CB4B16
}

.ace-solarized-dark .ace_constant.ace_language {
  color: #B58900
}

.ace-solarized-dark .ace_constant.ace_numeric {
  color: #D33682
}

.ace-solarized-dark .ace_fold {
  background-color: #268BD2;
  border-color: #93A1A1
}

.ace-solarized-dark .ace_entity.ace_name.ace_function,
.ace-solarized-dark .ace_entity.ace_name.ace_tag,
.ace-solarized-dark .ace_support.ace_function,
.ace-solarized-dark .ace_variable,
.ace-solarized-dark .ace_variable.ace_language {
  color: #268BD2
}

.ace-solarized-dark .ace_string {
  color: #2AA198
}

.ace-solarized-dark .ace_comment {
  font-style: italic;
  color: #657B83
}

.ace-solarized-dark .ace_indent-guide {
  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNg0Db1ZVCxc/sPAAd4AlUHlLenAAAAAElFTkSuQmCC) right repeat-y
}

.ace-solarized-dark .ace_indent-guide-active {
  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
}
`});ace.define("ace/theme/solarized_dark",["require","exports","module","ace/theme/solarized_dark-css","ace/lib/dom"],function(y,c,E){c.isDark=!0,c.cssClass="ace-solarized-dark",c.cssText=y("./solarized_dark-css");var x=y("../lib/dom");x.importCssString(c.cssText,c.cssClass,!1)});(function(){ace.require(["ace/theme/solarized_dark"],function(y){typeof Pe=="object"&&typeof qt=="object"&&Pe&&(Pe.exports=y)})})()});var ii=se((ti,Ue)=>{ace.define("ace/theme/solarized_light-css",["require","exports","module"],function(y,c,E){E.exports=`.ace-solarized-light .ace_gutter {
  background: #fbf1d3;
  color: #333
}

.ace-solarized-light .ace_print-margin {
  width: 1px;
  background: #e8e8e8
}

.ace-solarized-light {
  background-color: #FDF6E3;
  color: #586E75
}

.ace-solarized-light .ace_cursor {
  color: #000000
}

.ace-solarized-light .ace_marker-layer .ace_selection {
  background: rgba(7, 54, 67, 0.09)
}

.ace-solarized-light.ace_multiselect .ace_selection.ace_start {
  box-shadow: 0 0 3px 0px #FDF6E3;
}

.ace-solarized-light .ace_marker-layer .ace_step {
  background: rgb(255, 255, 0)
}

.ace-solarized-light .ace_marker-layer .ace_bracket {
  margin: -1px 0 0 -1px;
  border: 1px solid rgba(147, 161, 161, 0.50)
}

.ace-solarized-light .ace_marker-layer .ace_active-line {
  background: #EEE8D5
}

.ace-solarized-light .ace_gutter-active-line {
  background-color : #EDE5C1
}

.ace-solarized-light .ace_marker-layer .ace_selected-word {
  border: 1px solid #7f9390
}

.ace-solarized-light .ace_invisible {
  color: rgba(147, 161, 161, 0.50)
}

.ace-solarized-light .ace_keyword,
.ace-solarized-light .ace_meta,
.ace-solarized-light .ace_support.ace_class,
.ace-solarized-light .ace_support.ace_type {
  color: #859900
}

.ace-solarized-light .ace_constant.ace_character,
.ace-solarized-light .ace_constant.ace_other {
  color: #CB4B16
}

.ace-solarized-light .ace_constant.ace_language {
  color: #B58900
}

.ace-solarized-light .ace_constant.ace_numeric {
  color: #D33682
}

.ace-solarized-light .ace_fold {
  background-color: #268BD2;
  border-color: #586E75
}

.ace-solarized-light .ace_entity.ace_name.ace_function,
.ace-solarized-light .ace_entity.ace_name.ace_tag,
.ace-solarized-light .ace_support.ace_function,
.ace-solarized-light .ace_variable,
.ace-solarized-light .ace_variable.ace_language {
  color: #268BD2
}

.ace-solarized-light .ace_storage {
  color: #073642
}

.ace-solarized-light .ace_string {
  color: #2AA198
}

.ace-solarized-light .ace_string.ace_regexp {
  color: #D30102
}

.ace-solarized-light .ace_comment,
.ace-solarized-light .ace_entity.ace_other.ace_attribute-name {
  color: #93A1A1
}

.ace-solarized-light .ace_indent-guide {
  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHjy8NJ/AAjgA5fzQUmBAAAAAElFTkSuQmCC) right repeat-y
}

.ace-solarized-light .ace_indent-guide-active {
  background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
} 
`});ace.define("ace/theme/solarized_light",["require","exports","module","ace/theme/solarized_light-css","ace/lib/dom"],function(y,c,E){c.isDark=!1,c.cssClass="ace-solarized-light",c.cssText=y("./solarized_light-css");var x=y("../lib/dom");x.importCssString(c.cssText,c.cssClass,!1)});(function(){ace.require(["ace/theme/solarized_light"],function(y){typeof Ue=="object"&&typeof ti=="object"&&Ue&&(Ue.exports=y)})})()});var ri=se((ni,Ve)=>{ace.define("ace/theme/gruvbox_light_hard-css",["require","exports","module"],function(y,c,E){E.exports=`.ace-gruvbox-light-hard .ace_gutter {
  background: #f9f5d7;
  color: rgb(155,151,135)
}

.ace-gruvbox-light-hard .ace_print-margin {
  width: 1px;
  background: #e8e8e8
}

.ace-gruvbox-light-hard {
  background-color: #f9f5d7;
  color: rgba(60, 56, 54, 0.50)
}

.ace-gruvbox-light-hard .ace_cursor {
  color: #7c6f64
}

.ace-gruvbox-light-hard .ace_marker-layer .ace_selection {
  background: #ebdbb2
}

.ace-gruvbox-light-hard.ace_multiselect .ace_selection.ace_start {
  box-shadow: 0 0 3px 0px #f9f5d7;
  border-radius: 2px
}

.ace-gruvbox-light-hard .ace_marker-layer .ace_step {
  background: rgb(198, 219, 174)
}

.ace-gruvbox-light-hard .ace_marker-layer .ace_bracket {
  margin: -1px 0 0 -1px;
  border: 1px solid rgba(60, 56, 54, 0.15)
}

.ace-gruvbox-light-hard .ace_marker-layer .ace_active-line {
  background: #ebdbb2
}

.ace-gruvbox-light-hard .ace_gutter-active-line {
  background-color: #ebdbb2
}

.ace-gruvbox-light-hard .ace_marker-layer .ace_selected-word {
  border: 1px solid #ebdbb2
}

.ace-gruvbox-light-hard .ace_fold {
  background-color: #79740e;
  border-color: rgba(60, 56, 54, 0.50)
}

.ace-gruvbox-light-hard .ace_keyword {
  color: #9d0006
}

.ace-gruvbox-light-hard .ace_keyword.ace_operator {
  color: #427b58
}

.ace-gruvbox-light-hard .ace_keyword.ace_other.ace_unit {
  color: #b16286
}

.ace-gruvbox-light-hard .ace_constant {
  color: #8f3f71
}

.ace-gruvbox-light-hard .ace_constant.ace_numeric {
  color: #8f3f71
}

.ace-gruvbox-light-hard .ace_constant.ace_character.ace_escape {
  color: #9d0006
}

.ace-gruvbox-light-hard .ace_constant.ace_other {
  color: #8f3f71
}

.ace-gruvbox-light-hard .ace_support.ace_function {
  color: #427b58
}

.ace-gruvbox-light-hard .ace_support.ace_constant {
  color: #8f3f71
}

.ace-gruvbox-light-hard .ace_support.ace_constant.ace_property-value {
  color: #1d2021
}

.ace-gruvbox-light-hard .ace_support.ace_class {
  color: #b57614
}

.ace-gruvbox-light-hard .ace_support.ace_type {
  color: #b57614
}

.ace-gruvbox-light-hard .ace_storage {
  color: #9d0006
}

.ace-gruvbox-light-hard .ace_invalid {
  color: #1d2021;
  background-color: #9d0006
}

.ace-gruvbox-light-hard .ace_string {
  color: #79740e
}

.ace-gruvbox-light-hard .ace_string.ace_regexp {
  color: #79740e
}

.ace-gruvbox-light-hard .ace_comment {
  font-style: italic;
  color: #928374
}

.ace-gruvbox-light-hard .ace_variable {
  color: #076678
}

.ace-gruvbox-light-hard .ace_variable.ace_language {
  color: #8f3f71
}

.ace-gruvbox-light-hard .ace_variable.ace_parameter {
  color: #1d2021
}

.ace-gruvbox-light-hard .ace_meta.ace_tag {
  color: #1d2021
}

.ace-gruvbox-light-hard .ace_entity.ace_other.ace_attribute-name {
  color: #b57614
}

.ace-gruvbox-light-hard .ace_entity.ace_name.ace_function {
  color: #79740e
}

.ace-gruvbox-light-hard .ace_entity.ace_name.ace_tag {
  color: #076678
}

.ace-gruvbox-light-hard .ace_markup.ace_heading {
  color: #79740e
}

.ace-gruvbox-light-hard .ace_markup.ace_list {
  color: #076678
}

.ace-gruvbox-light-hard .ace_indent-guide {
    background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
}

.ace-gruvbox-light-hard .ace_indent-guide-active {
  background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
} 
`});ace.define("ace/theme/gruvbox_light_hard",["require","exports","module","ace/theme/gruvbox_light_hard-css","ace/lib/dom"],function(y,c,E){c.isDark=!1,c.cssClass="ace-gruvbox-light-hard",c.cssText=y("./gruvbox_light_hard-css");var x=y("../lib/dom");x.importCssString(c.cssText,c.cssClass,!1)});(function(){ace.require(["ace/theme/gruvbox_light_hard"],function(y){typeof Ve=="object"&&typeof ni=="object"&&Ve&&(Ve.exports=y)})})()});var si=se((oi,Ge)=>{ace.define("ace/theme/github_light_default-css",["require","exports","module"],function(y,c,E){E.exports=`.ace-github-light-default .ace_gutter {
    background: #ffffff;
    color: rgba(27, 31, 35, 0.3);
}

.ace-github-light-default .ace_print-margin {
    width: 1px;
    background: #e8e8e8;
}

.ace-github-light-default {
    background-color: #FFFFFF;
    color: #24292E;
}

.ace-github-light-default .ace_cursor {
    color: #044289;
    background: none;
}

.ace-github-light-default .ace_marker-layer .ace_selection {
    background: rgba(3, 102, 214, 0.14);
}

.ace-github-light-default.ace_multiselect .ace_selection.ace_start {
    box-shadow: 0 0 3px 0px #FFFFFF;
    border-radius: 2px;
}

.ace-github-light-default .ace_marker-layer .ace_step {
    background: rgb(198, 219, 174);
}

.ace-github-light-default .ace_marker-layer .ace_bracket {
    margin: -1px 0 0 -1px;
    border: 1px solid rgba(52, 208, 88, 0);
    background: rgba(52, 208, 88, 0.25);
}

.ace-github-light-default .ace_marker-layer .ace_active-line {
    background: #f6f8fa;
    border: 2px solid #eeeeee;
}

.ace-github-light-default .ace_gutter-active-line {
    background-color: #f6f8fa;
    color: #24292e
}

.ace-github-light-default .ace_marker-layer .ace_selected-word {
    border: 1px solid rgba(3, 102, 214, 0.14);
}

.ace-github-light-default .ace_fold {
    background-color: #D73A49;
    border-color: #24292E;
}

.ace_tooltip.ace-github-light-default {
    background-color: #f6f8fa !important;
    color: #444d56 !important;
    border: 1px solid #444d56
}

.ace-github-light-default .language_highlight_error {
    border-bottom: dotted 1px #cb2431;
    background: none;
}

.ace-github-light-default .language_highlight_warning {
    border-bottom: solid 1px #f9c513;
    background: none;
}

.ace-github-light-default .language_highlight_info {
    border-bottom: dotted 1px #1a85ff;
    background: none;
}

.ace-github-light-default .ace_keyword {
    color: #D73A49;
}

.ace-github-light-default .ace_constant {
    color: #005CC5;
}

.ace-github-light-default .ace_support {
    color: #005CC5;
}

.ace-github-light-default .ace_support.ace_constant {
    color: #005CC5;
}

.ace-github-light-default .ace_support.ace_type {
    color: #D73A49;
}

.ace-github-light-default .ace_storage {
    color: #D73A49;
}

.ace-github-light-default .ace_storage.ace_type {
    color: #D73A49;
}

.ace-github-light-default .ace_invalid.ace_illegal {
    font-style: italic;
    color: #B31D28;
}

.ace-github-light-default .ace_invalid.ace_deprecated {
    font-style: italic;
    color: #B31D28;
}

.ace-github-light-default .ace_string {
    color: #032F62;
}

.ace-github-light-default .ace_string.ace_regexp {
    color: #032F62;
}

.ace-github-light-default .ace_comment {
    color: #6A737D;
}

.ace-github-light-default .ace_variable {
    color: #E36209;
}

.ace-github-light-default .ace_variable.ace_language {
    color: #005CC5;
}

.ace-github-light-default .ace_entity.ace_name {
    color: #6F42C1;
}

.ace-github-light-default .ace_entity {
    color: #6F42C1;
}

.ace-github-light-default .ace_entity.ace_name.ace_tag {
    color: #22863A;
}

.ace-github-light-default .ace_meta.ace_tag {
    color: #22863A;
}

.ace-github-light-default .ace_markup.ace_heading {
    color: #005CC5;
}

.ace-github-light-default .ace_indent-guide {
  background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
}

.ace-github-light-default .ace_indent-guide-active {
  background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
}
`});ace.define("ace/theme/github_light_default",["require","exports","module","ace/theme/github_light_default-css","ace/lib/dom"],function(y,c,E){c.isDark=!1,c.cssClass="ace-github-light-default",c.cssText=y("./github_light_default-css");var x=y("../lib/dom");x.importCssString(c.cssText,c.cssClass,!1)});(function(){ace.require(["ace/theme/github_light_default"],function(y){typeof Ge=="object"&&typeof oi=="object"&&Ge&&(Ge.exports=y)})})()});var Mi=se(()=>{jt();var Hn=le(Kt()),Pn=le(Xt()),Un=le(Jt()),Vn=le(ei()),Gn=le(ii()),jn=le(ri()),Yn=le(si());window.Sterk={createTerminal:Gt}});Mi();})();
/*! 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
  *)
*/
//# sourceMappingURL=sterk.bundle.js.map
