@castlabs/ui 7.13.0 → 7.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/castlabs-ui-editor.common.js +2 -2
- package/dist/castlabs-ui-editor.common.js.map +1 -1
- package/dist/castlabs-ui-editor.umd.js +2 -2
- package/dist/castlabs-ui-editor.umd.js.map +1 -1
- package/dist/castlabs-ui.common.js +3 -3
- package/dist/castlabs-ui.common.js.map +1 -1
- package/dist/castlabs-ui.core.js +52 -9
- package/dist/castlabs-ui.css +1 -1
- package/dist/castlabs-ui.module.d.ts +1 -0
- package/dist/castlabs-ui.module.js +52 -9
- package/dist/castlabs-ui.umd.js +4 -4
- package/dist/castlabs-ui.umd.js.map +1 -1
- package/package.json +14 -14
- package/src/components/ClList/style.variables.scss +10 -0
- package/src/components/navigation/ClNavSide/ClNavDrawer/style.scss +13 -0
- package/src/components/navigation/ClNavTop/style.scss +2 -1
- package/src/components/section/ClSectionDetails/style.scss +10 -0
- package/src/components/table/ClTableCel/Links/style.scss +5 -5
- package/src/components/table/ClTableCel/style.variables.scss +13 -0
- package/src/components/widget/ClCookieBanner/style.scss +1 -1
- package/src/components/widget/ClPage/style.scss +55 -0
- package/src/styles/abstracts/color.scss +3 -0
- package/src/styles/abstracts/responsive.scss +15 -3
- package/src/styles/abstracts/typography.scss +2 -3
- package/src/styles/assets/logo.scss +0 -6
- package/src/styles/layout/meta.scss +1 -1
- package/src/styles/layout/typography.scss +10 -1
- package/src/styles/ui.scss +1 -0
- package/types/castlabs-ui.module.d.ts +1 -0
- package/types/index.d.ts +43 -6
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
.ace-tm .ace_indent-guide-active {
|
|
158
158
|
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
|
|
159
159
|
}
|
|
160
|
-
`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(k,x,H){x.isDark=!1,x.cssClass="ace-tm",x.cssText=k("./textmate-css"),x.$id="ace/theme/textmate";var E=k("../lib/dom");E.importCssString(x.cssText,x.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(k,x,H){"no use strict";var E=k("./lib/lang"),A=k("./lib/net"),$=k("./lib/dom"),a=k("./lib/app_config").AppConfig;H.exports=x=new a;var l={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};x.get=function(t){if(!l.hasOwnProperty(t))throw new Error("Unknown config key: "+t);return l[t]},x.set=function(t,e){if(l.hasOwnProperty(t))l[t]=e;else if(this.setDefaultValue("",t,e)==!1)throw new Error("Unknown config key: "+t);t=="useStrictCSP"&&$.useStrictCSP(e)},x.all=function(){return E.copyObject(l)},x.$modes={},x.moduleUrl=function(t,e){if(l.$moduleUrls[t])return l.$moduleUrls[t];var i=t.split("/");e=e||i[i.length-2]||"";var s=e=="snippets"?"/":"-",c=i[i.length-1];if(e=="worker"&&s=="-"){var h=new RegExp("^"+e+"[\\-_]|[\\-_]"+e+"$","g");c=c.replace(h,"")}(!c||c==e)&&i.length>1&&(c=i[i.length-2]);var y=l[e+"Path"];return y==null?y=l.basePath:s=="/"&&(e=s=""),y&&y.slice(-1)!="/"&&(y+="/"),y+e+s+c+this.get("suffix")},x.setModuleUrl=function(t,e){return l.$moduleUrls[t]=e};var r=function(t,e){if(t==="ace/theme/textmate"||t==="./theme/textmate")return e(null,k("./theme/textmate"));if(o)return o(t,e);console.error("loader is not configured")},o;x.setLoader=function(t){o=t},x.dynamicModules=Object.create(null),x.$loading={},x.$loaded={},x.loadModule=function(t,e){var i;if(Array.isArray(t))var s=t[0],c=t[1];else if(typeof t=="string")var c=t;var h=function(y){if(y&&!x.$loading[c])return e&&e(y);if(x.$loading[c]||(x.$loading[c]=[]),x.$loading[c].push(e),!(x.$loading[c].length>1)){var m=function(){r(c,function(g,f){f&&(x.$loaded[c]=f),x._emit("load.module",{name:c,module:f});var b=x.$loading[c];x.$loading[c]=null,b.forEach(function(L){L&&L(f)})})};if(!x.get("packaged"))return m();A.loadScript(x.moduleUrl(c,s),m),n()}};if(x.dynamicModules[c])x.dynamicModules[c]().then(function(y){y.default?h(y.default):h(y)});else{try{i=this.$require(c)}catch{}h(i||x.$loaded[c])}},x.$require=function(t){if(typeof H.require=="function"){var e="require";return H[e](t)}},x.setModuleLoader=function(t,e){x.dynamicModules[t]=e};var n=function(){!l.basePath&&!l.workerPath&&!l.modePath&&!l.themePath&&!Object.keys(l.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),n=function(){})};x.version="1.43.4"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(k,x,H){k("./lib/fixoldbrowsers");var E=k("./config");E.setLoader(function(l,r){k([l],function(o){r(null,o)})});var A=(function(){return this||typeof window<"u"&&window})();H.exports=function(l){E.init=$,E.$require=k,l.require=k},$(!0);function $(l){if(!(!A||!A.document)){E.set("packaged",l||k.packaged||H.packaged||A.define&&(void 0).packaged);var r={},o="",n=document.currentScript||document._currentScript,t=n&&n.ownerDocument||document;n&&n.src&&(o=n.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var e=t.getElementsByTagName("script"),i=0;i<e.length;i++){var s=e[i],c=s.src||s.getAttribute("src");if(c){for(var h=s.attributes,y=0,m=h.length;y<m;y++){var g=h[y];g.name.indexOf("data-ace-")===0&&(r[a(g.name.replace(/^data-ace-/,""))]=g.value)}var f=c.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);f&&(o=f[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 b in r)typeof r[b]<"u"&&E.set(b,r[b])}}function a(l){return l.replace(/-(.)/g,function(r,o){return o.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(k,x,H){var E=(function(){function A($,a,l,r){this.start={row:$,column:a},this.end={row:l,column:r}}return A.prototype.isEqual=function($){return this.start.row===$.start.row&&this.end.row===$.end.row&&this.start.column===$.start.column&&this.end.column===$.end.column},A.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},A.prototype.contains=function($,a){return this.compare($,a)==0},A.prototype.compareRange=function($){var a,l=$.end,r=$.start;return a=this.compare(l.row,l.column),a==1?(a=this.compare(r.row,r.column),a==1?2:a==0?1:0):a==-1?-2:(a=this.compare(r.row,r.column),a==-1?-1:a==1?42:0)},A.prototype.comparePoint=function($){return this.compare($.row,$.column)},A.prototype.containsRange=function($){return this.comparePoint($.start)==0&&this.comparePoint($.end)==0},A.prototype.intersects=function($){var a=this.compareRange($);return a==-1||a==0||a==1},A.prototype.isEnd=function($,a){return this.end.row==$&&this.end.column==a},A.prototype.isStart=function($,a){return this.start.row==$&&this.start.column==a},A.prototype.setStart=function($,a){typeof $=="object"?(this.start.column=$.column,this.start.row=$.row):(this.start.row=$,this.start.column=a)},A.prototype.setEnd=function($,a){typeof $=="object"?(this.end.column=$.column,this.end.row=$.row):(this.end.row=$,this.end.column=a)},A.prototype.inside=function($,a){return this.compare($,a)==0?!(this.isEnd($,a)||this.isStart($,a)):!1},A.prototype.insideStart=function($,a){return this.compare($,a)==0?!this.isEnd($,a):!1},A.prototype.insideEnd=function($,a){return this.compare($,a)==0?!this.isStart($,a):!1},A.prototype.compare=function($,a){return!this.isMultiLine()&&$===this.start.row?a<this.start.column?-1:a>this.end.column?1:0:$<this.start.row?-1:$>this.end.row?1:this.start.row===$?a>=this.start.column?0:-1:this.end.row===$?a<=this.end.column?0:1:0},A.prototype.compareStart=function($,a){return this.start.row==$&&this.start.column==a?-1:this.compare($,a)},A.prototype.compareEnd=function($,a){return this.end.row==$&&this.end.column==a?1:this.compare($,a)},A.prototype.compareInside=function($,a){return this.end.row==$&&this.end.column==a?1:this.start.row==$&&this.start.column==a?-1:this.compare($,a)},A.prototype.clipRows=function($,a){if(this.end.row>a)var l={row:a+1,column:0};else if(this.end.row<$)var l={row:$,column:0};if(this.start.row>a)var r={row:a+1,column:0};else if(this.start.row<$)var r={row:$,column:0};return A.fromPoints(r||this.start,l||this.end)},A.prototype.extend=function($,a){var l=this.compare($,a);if(l==0)return this;if(l==-1)var r={row:$,column:a};else var o={row:$,column:a};return A.fromPoints(r||this.start,o||this.end)},A.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},A.prototype.isMultiLine=function(){return this.start.row!==this.end.row},A.prototype.clone=function(){return A.fromPoints(this.start,this.end)},A.prototype.collapseRows=function(){return this.end.column==0?new A(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new A(this.start.row,0,this.end.row,0)},A.prototype.toScreenRange=function($){var a=$.documentToScreenPosition(this.start),l=$.documentToScreenPosition(this.end);return new A(a.row,a.column,l.row,l.column)},A.prototype.moveBy=function($,a){this.start.row+=$,this.start.column+=a,this.end.row+=$,this.end.column+=a},A})();E.fromPoints=function(A,$){return new E(A.row,A.column,$.row,$.column)},E.comparePoints=function(A,$){return A.row-$.row||A.column-$.column},x.Range=E}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(k,x,H){for(var E=k("./oop"),A={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-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:"*"}},$={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},a=0;a<10;a++)$["Digit"+a]=48+a,$["Numpad"+a]=96+a,A.PRINTABLE_KEYS[48+a]=""+a,A.FUNCTION_KEYS[96+a]="Numpad"+a;for(var a=65;a<91;a++){var l=String.fromCharCode(a+32);$["Key"+l.toUpperCase()]=a,A.PRINTABLE_KEYS[a]=l}for(var a=1;a<13;a++)$["F"+a]=111+a,A.FUNCTION_KEYS[111+a]="F"+a;var r={Shift:16,Control:17,Alt:18,Meta:224};for(var o in r)$[o]=$[o+"Left"]=$[o+"Right"]=r[o];x.$codeToKeyCode=$,A.PRINTABLE_KEYS[173]="-";for(var n in A.FUNCTION_KEYS){var t=A.FUNCTION_KEYS[n].toLowerCase();A[t]=parseInt(n,10)}for(var n in A.PRINTABLE_KEYS){var t=A.PRINTABLE_KEYS[n].toLowerCase();A[t]=parseInt(n,10)}E.mixin(A,A.MODIFIER_KEYS),E.mixin(A,A.PRINTABLE_KEYS),E.mixin(A,A.FUNCTION_KEYS),A.enter=A.return,A.escape=A.esc,A.del=A.delete,(function(){for(var e=["cmd","ctrl","alt","shift"],i=Math.pow(2,e.length);i--;)A.KEY_MODS[i]=e.filter(function(s){return i&A.KEY_MODS[s]}).join("-")+"-"})(),A.KEY_MODS[0]="",A.KEY_MODS[-1]="input-",E.mixin(x,A),x.default=x,x.keyCodeToString=function(e){var i=A[e];return typeof i!="string"&&(i=String.fromCharCode(e)),i.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(k,x,H){var E=k("./keys"),A=k("./useragent"),$=null,a=0,l;function r(){l=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return l={passive:!1},!0}})}catch{}}function o(){return l==null&&r(),l}function n(y,m,g){this.elem=y,this.type=m,this.callback=g}n.prototype.destroy=function(){e(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var t=x.addListener=function(y,m,g,f){y.addEventListener(m,g,o()),f&&f.$toDestroy.push(new n(y,m,g))},e=x.removeListener=function(y,m,g){y.removeEventListener(m,g,o())};x.stopEvent=function(y){return x.stopPropagation(y),x.preventDefault(y),!1},x.stopPropagation=function(y){y.stopPropagation&&y.stopPropagation()},x.preventDefault=function(y){y.preventDefault&&y.preventDefault()},x.getButton=function(y){return y.type=="dblclick"?0:y.type=="contextmenu"||A.isMac&&y.ctrlKey&&!y.altKey&&!y.shiftKey?2:y.button},x.capture=function(y,m,g){var f=y&&y.ownerDocument||document;function b(L){m&&m(L),g&&g(L),e(f,"mousemove",m),e(f,"mouseup",b),e(f,"dragstart",b)}return t(f,"mousemove",m),t(f,"mouseup",b),t(f,"dragstart",b),b},x.addMouseWheelListener=function(y,m,g){t(y,"wheel",function(f){var b=.15,L=f.deltaX||0,C=f.deltaY||0;switch(f.deltaMode){case f.DOM_DELTA_PIXEL:f.wheelX=L*b,f.wheelY=C*b;break;case f.DOM_DELTA_LINE:var S=15;f.wheelX=L*S,f.wheelY=C*S;break;case f.DOM_DELTA_PAGE:var R=150;f.wheelX=L*R,f.wheelY=C*R;break}m(f)},g)},x.addMultiMouseDownListener=function(y,m,g,f,b){var L=0,C,S,R,w={2:"dblclick",3:"tripleclick",4:"quadclick"};function v(d){if(x.getButton(d)!==0?L=0:d.detail>1?(L++,L>4&&(L=1)):L=1,A.isIE){var u=Math.abs(d.clientX-C)>5||Math.abs(d.clientY-S)>5;(!R||u)&&(L=1),R&&clearTimeout(R),R=setTimeout(function(){R=null},m[L-1]||600),L==1&&(C=d.clientX,S=d.clientY)}if(d._clicks=L,g[f]("mousedown",d),L>4)L=0;else if(L>1)return g[f](w[L],d)}Array.isArray(y)||(y=[y]),y.forEach(function(d){t(d,"mousedown",v,b)})};function i(y){return 0|(y.ctrlKey?1:0)|(y.altKey?2:0)|(y.shiftKey?4:0)|(y.metaKey?8:0)}x.getModifierString=function(y){return E.KEY_MODS[i(y)]};function s(y,m,g){var f=i(m);if(!g&&m.code&&(g=E.$codeToKeyCode[m.code]||g),!A.isMac&&$){if(m.getModifierState&&(m.getModifierState("OS")||m.getModifierState("Win"))&&(f|=8),$.altGr)if((3&f)!=3)$.altGr=0;else return;if(g===18||g===17){var b=m.location;if(g===17&&b===1)$[g]==1&&(a=m.timeStamp);else if(g===18&&f===3&&b===2){var L=m.timeStamp-a;L<50&&($.altGr=!0)}}}if(g in E.MODIFIER_KEYS&&(g=-1),!(!f&&g===13&&m.location===3&&(y(m,f,-g),m.defaultPrevented))){if(A.isChromeOS&&f&8){if(y(m,f,g),m.defaultPrevented)return;f&=-9}return!f&&!(g in E.FUNCTION_KEYS)&&!(g in E.PRINTABLE_KEYS)?!1:y(m,f,g)}}x.addCommandKeyListener=function(y,m,g){var f=null;t(y,"keydown",function(b){$[b.keyCode]=($[b.keyCode]||0)+1;var L=s(m,b,b.keyCode);return f=b.defaultPrevented,L},g),t(y,"keypress",function(b){f&&(b.ctrlKey||b.altKey||b.shiftKey||b.metaKey)&&(x.stopEvent(b),f=null)},g),t(y,"keyup",function(b){$[b.keyCode]=null},g),$||(c(),t(window,"focus",c))};function c(){$=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!A.isOldIE){var h=1;x.nextTick=function(y,m){m=m||window;var g="zero-timeout-message-"+h++,f=function(b){b.data==g&&(x.stopPropagation(b),e(m,"message",f),y())};t(m,"message",f),m.postMessage(g,"*")}}x.$idleBlocked=!1,x.onIdle=function(y,m){return setTimeout(function g(){x.$idleBlocked?setTimeout(g,100):y()},m)},x.$idleBlockId=null,x.blockIdle=function(y){x.$idleBlockId&&clearTimeout(x.$idleBlockId),x.$idleBlocked=!0,x.$idleBlockId=setTimeout(function(){x.$idleBlocked=!1},y||100)},x.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),x.nextFrame?x.nextFrame=x.nextFrame.bind(window):x.nextFrame=function(y){setTimeout(y,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(k,x,H){var E;H.exports={lineMode:!1,pasteCancelled:function(){return E&&E>Date.now()-50?!0:E=!1},cancel:function(){E=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(k,x,H){var E=k("../lib/event"),A=k("../config").nls,$=k("../lib/useragent"),a=k("../lib/dom"),l=k("../lib/lang"),r=k("../clipboard"),o=$.isChrome<18,n=$.isIE,t=$.isChrome>63,e=400,i=k("../lib/keys"),s=i.KEY_MODS,c=$.isIOS,h=c?/\s/:/\n/,y=$.isMobile,m=(function(){function g(f,b){var L=this;this.host=b,this.text=a.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",f.insertBefore(this.text,f.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",y||(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"}),E.addListener(this.text,"blur",function(C){L.ignoreFocusEvents||(b.onBlur(C),L.$isFocused=!1)},b),E.addListener(this.text,"focus",function(C){if(!L.ignoreFocusEvents){if(L.$isFocused=!0,$.isEdge)try{if(!document.hasFocus())return}catch{}b.onFocus(C),$.isEdge?setTimeout(L.resetSelection.bind(L)):L.resetSelection()}},b),this.$focusScroll=!1,b.on("beforeEndOperation",function(){var C=b.curOp,S=C&&C.command&&C.command.name;if(S!="insertstring"){var R=S&&(C.docChanged||C.selectionChanged);L.inComposition&&R&&(L.lastValue=L.text.value="",L.onCompositionEnd()),L.resetSelection()}}),b.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=c?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&b.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,E.addCommandKeyListener(this.text,function(C,S,R){if(!L.inComposition)return b.onCommandKey(C,S,R)},b),E.addListener(this.text,"select",this.onSelect.bind(this),b),E.addListener(this.text,"input",this.onInput.bind(this),b),E.addListener(this.text,"cut",this.onCut.bind(this),b),E.addListener(this.text,"copy",this.onCopy.bind(this),b),E.addListener(this.text,"paste",this.onPaste.bind(this),b),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&E.addListener(f,"keydown",function(C){if(!($.isMac&&!C.metaKey||!C.ctrlKey))switch(C.keyCode){case 67:L.onCopy(C);break;case 86:L.onPaste(C);break;case 88:L.onCut(C);break}},b),this.syncComposition=l.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),E.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),b),E.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),b),E.addListener(this.text,"keyup",this.onKeyup.bind(this),b),E.addListener(this.text,"keydown",this.syncComposition.bind(this),b),E.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),b),this.closeTimeout,E.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),b),E.addListener(this.text,"mousedown",function(C){C.preventDefault(),L.onContextMenuClose()},b),E.addListener(b.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),b),E.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),b),c&&this.addIosSelectionHandler(f,b,this.text)}return g.prototype.addIosSelectionHandler=function(f,b,L){var C=this,S=null,R=!1;L.addEventListener("keydown",function(v){S&&clearTimeout(S),R=!0},!0),L.addEventListener("keyup",function(v){S=setTimeout(function(){R=!1},100)},!0);var w=function(v){if(document.activeElement===L&&!(R||C.inComposition||b.$mouseHandler.isMousePressed)&&!C.copied){var d=L.selectionStart,u=L.selectionEnd,p=null,M=0;if(d==0?p=i.up:d==1?p=i.home:u>C.lastSelectionEnd&&C.lastValue[u]==`
|
|
160
|
+
`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(k,x,H){x.isDark=!1,x.cssClass="ace-tm",x.cssText=k("./textmate-css"),x.$id="ace/theme/textmate";var E=k("../lib/dom");E.importCssString(x.cssText,x.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(k,x,H){"no use strict";var E=k("./lib/lang"),A=k("./lib/net"),$=k("./lib/dom"),a=k("./lib/app_config").AppConfig;H.exports=x=new a;var l={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};x.get=function(t){if(!l.hasOwnProperty(t))throw new Error("Unknown config key: "+t);return l[t]},x.set=function(t,e){if(l.hasOwnProperty(t))l[t]=e;else if(this.setDefaultValue("",t,e)==!1)throw new Error("Unknown config key: "+t);t=="useStrictCSP"&&$.useStrictCSP(e)},x.all=function(){return E.copyObject(l)},x.$modes={},x.moduleUrl=function(t,e){if(l.$moduleUrls[t])return l.$moduleUrls[t];var i=t.split("/");e=e||i[i.length-2]||"";var s=e=="snippets"?"/":"-",c=i[i.length-1];if(e=="worker"&&s=="-"){var h=new RegExp("^"+e+"[\\-_]|[\\-_]"+e+"$","g");c=c.replace(h,"")}(!c||c==e)&&i.length>1&&(c=i[i.length-2]);var y=l[e+"Path"];return y==null?y=l.basePath:s=="/"&&(e=s=""),y&&y.slice(-1)!="/"&&(y+="/"),y+e+s+c+this.get("suffix")},x.setModuleUrl=function(t,e){return l.$moduleUrls[t]=e};var r=function(t,e){if(t==="ace/theme/textmate"||t==="./theme/textmate")return e(null,k("./theme/textmate"));if(o)return o(t,e);console.error("loader is not configured")},o;x.setLoader=function(t){o=t},x.dynamicModules=Object.create(null),x.$loading={},x.$loaded={},x.loadModule=function(t,e){var i;if(Array.isArray(t))var s=t[0],c=t[1];else if(typeof t=="string")var c=t;var h=function(y){if(y&&!x.$loading[c])return e&&e(y);if(x.$loading[c]||(x.$loading[c]=[]),x.$loading[c].push(e),!(x.$loading[c].length>1)){var m=function(){r(c,function(g,f){f&&(x.$loaded[c]=f),x._emit("load.module",{name:c,module:f});var b=x.$loading[c];x.$loading[c]=null,b.forEach(function(L){L&&L(f)})})};if(!x.get("packaged"))return m();A.loadScript(x.moduleUrl(c,s),m),n()}};if(x.dynamicModules[c])x.dynamicModules[c]().then(function(y){y.default?h(y.default):h(y)});else{try{i=this.$require(c)}catch{}h(i||x.$loaded[c])}},x.$require=function(t){if(typeof H.require=="function"){var e="require";return H[e](t)}},x.setModuleLoader=function(t,e){x.dynamicModules[t]=e};var n=function(){!l.basePath&&!l.workerPath&&!l.modePath&&!l.themePath&&!Object.keys(l.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),n=function(){})};x.version="1.43.6"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(k,x,H){k("./lib/fixoldbrowsers");var E=k("./config");E.setLoader(function(l,r){k([l],function(o){r(null,o)})});var A=(function(){return this||typeof window<"u"&&window})();H.exports=function(l){E.init=$,E.$require=k,l.require=k},$(!0);function $(l){if(!(!A||!A.document)){E.set("packaged",l||k.packaged||H.packaged||A.define&&(void 0).packaged);var r={},o="",n=document.currentScript||document._currentScript,t=n&&n.ownerDocument||document;n&&n.src&&(o=n.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var e=t.getElementsByTagName("script"),i=0;i<e.length;i++){var s=e[i],c=s.src||s.getAttribute("src");if(c){for(var h=s.attributes,y=0,m=h.length;y<m;y++){var g=h[y];g.name.indexOf("data-ace-")===0&&(r[a(g.name.replace(/^data-ace-/,""))]=g.value)}var f=c.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);f&&(o=f[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 b in r)typeof r[b]<"u"&&E.set(b,r[b])}}function a(l){return l.replace(/-(.)/g,function(r,o){return o.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(k,x,H){var E=(function(){function A($,a,l,r){this.start={row:$,column:a},this.end={row:l,column:r}}return A.prototype.isEqual=function($){return this.start.row===$.start.row&&this.end.row===$.end.row&&this.start.column===$.start.column&&this.end.column===$.end.column},A.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},A.prototype.contains=function($,a){return this.compare($,a)==0},A.prototype.compareRange=function($){var a,l=$.end,r=$.start;return a=this.compare(l.row,l.column),a==1?(a=this.compare(r.row,r.column),a==1?2:a==0?1:0):a==-1?-2:(a=this.compare(r.row,r.column),a==-1?-1:a==1?42:0)},A.prototype.comparePoint=function($){return this.compare($.row,$.column)},A.prototype.containsRange=function($){return this.comparePoint($.start)==0&&this.comparePoint($.end)==0},A.prototype.intersects=function($){var a=this.compareRange($);return a==-1||a==0||a==1},A.prototype.isEnd=function($,a){return this.end.row==$&&this.end.column==a},A.prototype.isStart=function($,a){return this.start.row==$&&this.start.column==a},A.prototype.setStart=function($,a){typeof $=="object"?(this.start.column=$.column,this.start.row=$.row):(this.start.row=$,this.start.column=a)},A.prototype.setEnd=function($,a){typeof $=="object"?(this.end.column=$.column,this.end.row=$.row):(this.end.row=$,this.end.column=a)},A.prototype.inside=function($,a){return this.compare($,a)==0?!(this.isEnd($,a)||this.isStart($,a)):!1},A.prototype.insideStart=function($,a){return this.compare($,a)==0?!this.isEnd($,a):!1},A.prototype.insideEnd=function($,a){return this.compare($,a)==0?!this.isStart($,a):!1},A.prototype.compare=function($,a){return!this.isMultiLine()&&$===this.start.row?a<this.start.column?-1:a>this.end.column?1:0:$<this.start.row?-1:$>this.end.row?1:this.start.row===$?a>=this.start.column?0:-1:this.end.row===$?a<=this.end.column?0:1:0},A.prototype.compareStart=function($,a){return this.start.row==$&&this.start.column==a?-1:this.compare($,a)},A.prototype.compareEnd=function($,a){return this.end.row==$&&this.end.column==a?1:this.compare($,a)},A.prototype.compareInside=function($,a){return this.end.row==$&&this.end.column==a?1:this.start.row==$&&this.start.column==a?-1:this.compare($,a)},A.prototype.clipRows=function($,a){if(this.end.row>a)var l={row:a+1,column:0};else if(this.end.row<$)var l={row:$,column:0};if(this.start.row>a)var r={row:a+1,column:0};else if(this.start.row<$)var r={row:$,column:0};return A.fromPoints(r||this.start,l||this.end)},A.prototype.extend=function($,a){var l=this.compare($,a);if(l==0)return this;if(l==-1)var r={row:$,column:a};else var o={row:$,column:a};return A.fromPoints(r||this.start,o||this.end)},A.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},A.prototype.isMultiLine=function(){return this.start.row!==this.end.row},A.prototype.clone=function(){return A.fromPoints(this.start,this.end)},A.prototype.collapseRows=function(){return this.end.column==0?new A(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new A(this.start.row,0,this.end.row,0)},A.prototype.toScreenRange=function($){var a=$.documentToScreenPosition(this.start),l=$.documentToScreenPosition(this.end);return new A(a.row,a.column,l.row,l.column)},A.prototype.moveBy=function($,a){this.start.row+=$,this.start.column+=a,this.end.row+=$,this.end.column+=a},A})();E.fromPoints=function(A,$){return new E(A.row,A.column,$.row,$.column)},E.comparePoints=function(A,$){return A.row-$.row||A.column-$.column},x.Range=E}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(k,x,H){for(var E=k("./oop"),A={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-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:"*"}},$={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},a=0;a<10;a++)$["Digit"+a]=48+a,$["Numpad"+a]=96+a,A.PRINTABLE_KEYS[48+a]=""+a,A.FUNCTION_KEYS[96+a]="Numpad"+a;for(var a=65;a<91;a++){var l=String.fromCharCode(a+32);$["Key"+l.toUpperCase()]=a,A.PRINTABLE_KEYS[a]=l}for(var a=1;a<13;a++)$["F"+a]=111+a,A.FUNCTION_KEYS[111+a]="F"+a;var r={Shift:16,Control:17,Alt:18,Meta:224};for(var o in r)$[o]=$[o+"Left"]=$[o+"Right"]=r[o];x.$codeToKeyCode=$,A.PRINTABLE_KEYS[173]="-";for(var n in A.FUNCTION_KEYS){var t=A.FUNCTION_KEYS[n].toLowerCase();A[t]=parseInt(n,10)}for(var n in A.PRINTABLE_KEYS){var t=A.PRINTABLE_KEYS[n].toLowerCase();A[t]=parseInt(n,10)}E.mixin(A,A.MODIFIER_KEYS),E.mixin(A,A.PRINTABLE_KEYS),E.mixin(A,A.FUNCTION_KEYS),A.enter=A.return,A.escape=A.esc,A.del=A.delete,(function(){for(var e=["cmd","ctrl","alt","shift"],i=Math.pow(2,e.length);i--;)A.KEY_MODS[i]=e.filter(function(s){return i&A.KEY_MODS[s]}).join("-")+"-"})(),A.KEY_MODS[0]="",A.KEY_MODS[-1]="input-",E.mixin(x,A),x.default=x,x.keyCodeToString=function(e){var i=A[e];return typeof i!="string"&&(i=String.fromCharCode(e)),i.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(k,x,H){var E=k("./keys"),A=k("./useragent"),$=null,a=0,l;function r(){l=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return l={passive:!1},!0}})}catch{}}function o(){return l==null&&r(),l}function n(y,m,g){this.elem=y,this.type=m,this.callback=g}n.prototype.destroy=function(){e(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var t=x.addListener=function(y,m,g,f){y.addEventListener(m,g,o()),f&&f.$toDestroy.push(new n(y,m,g))},e=x.removeListener=function(y,m,g){y.removeEventListener(m,g,o())};x.stopEvent=function(y){return x.stopPropagation(y),x.preventDefault(y),!1},x.stopPropagation=function(y){y.stopPropagation&&y.stopPropagation()},x.preventDefault=function(y){y.preventDefault&&y.preventDefault()},x.getButton=function(y){return y.type=="dblclick"?0:y.type=="contextmenu"||A.isMac&&y.ctrlKey&&!y.altKey&&!y.shiftKey?2:y.button},x.capture=function(y,m,g){var f=y&&y.ownerDocument||document;function b(L){m&&m(L),g&&g(L),e(f,"mousemove",m),e(f,"mouseup",b),e(f,"dragstart",b)}return t(f,"mousemove",m),t(f,"mouseup",b),t(f,"dragstart",b),b},x.addMouseWheelListener=function(y,m,g){t(y,"wheel",function(f){var b=.15,L=f.deltaX||0,C=f.deltaY||0;switch(f.deltaMode){case f.DOM_DELTA_PIXEL:f.wheelX=L*b,f.wheelY=C*b;break;case f.DOM_DELTA_LINE:var S=15;f.wheelX=L*S,f.wheelY=C*S;break;case f.DOM_DELTA_PAGE:var R=150;f.wheelX=L*R,f.wheelY=C*R;break}m(f)},g)},x.addMultiMouseDownListener=function(y,m,g,f,b){var L=0,C,S,R,w={2:"dblclick",3:"tripleclick",4:"quadclick"};function v(d){if(x.getButton(d)!==0?L=0:d.detail>1?(L++,L>4&&(L=1)):L=1,A.isIE){var u=Math.abs(d.clientX-C)>5||Math.abs(d.clientY-S)>5;(!R||u)&&(L=1),R&&clearTimeout(R),R=setTimeout(function(){R=null},m[L-1]||600),L==1&&(C=d.clientX,S=d.clientY)}if(d._clicks=L,g[f]("mousedown",d),L>4)L=0;else if(L>1)return g[f](w[L],d)}Array.isArray(y)||(y=[y]),y.forEach(function(d){t(d,"mousedown",v,b)})};function i(y){return 0|(y.ctrlKey?1:0)|(y.altKey?2:0)|(y.shiftKey?4:0)|(y.metaKey?8:0)}x.getModifierString=function(y){return E.KEY_MODS[i(y)]};function s(y,m,g){var f=i(m);if(!g&&m.code&&(g=E.$codeToKeyCode[m.code]||g),!A.isMac&&$){if(m.getModifierState&&(m.getModifierState("OS")||m.getModifierState("Win"))&&(f|=8),$.altGr)if((3&f)!=3)$.altGr=0;else return;if(g===18||g===17){var b=m.location;if(g===17&&b===1)$[g]==1&&(a=m.timeStamp);else if(g===18&&f===3&&b===2){var L=m.timeStamp-a;L<50&&($.altGr=!0)}}}if(g in E.MODIFIER_KEYS&&(g=-1),!(!f&&g===13&&m.location===3&&(y(m,f,-g),m.defaultPrevented))){if(A.isChromeOS&&f&8){if(y(m,f,g),m.defaultPrevented)return;f&=-9}return!f&&!(g in E.FUNCTION_KEYS)&&!(g in E.PRINTABLE_KEYS)?!1:y(m,f,g)}}x.addCommandKeyListener=function(y,m,g){var f=null;t(y,"keydown",function(b){$[b.keyCode]=($[b.keyCode]||0)+1;var L=s(m,b,b.keyCode);return f=b.defaultPrevented,L},g),t(y,"keypress",function(b){f&&(b.ctrlKey||b.altKey||b.shiftKey||b.metaKey)&&(x.stopEvent(b),f=null)},g),t(y,"keyup",function(b){$[b.keyCode]=null},g),$||(c(),t(window,"focus",c))};function c(){$=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!A.isOldIE){var h=1;x.nextTick=function(y,m){m=m||window;var g="zero-timeout-message-"+h++,f=function(b){b.data==g&&(x.stopPropagation(b),e(m,"message",f),y())};t(m,"message",f),m.postMessage(g,"*")}}x.$idleBlocked=!1,x.onIdle=function(y,m){return setTimeout(function g(){x.$idleBlocked?setTimeout(g,100):y()},m)},x.$idleBlockId=null,x.blockIdle=function(y){x.$idleBlockId&&clearTimeout(x.$idleBlockId),x.$idleBlocked=!0,x.$idleBlockId=setTimeout(function(){x.$idleBlocked=!1},y||100)},x.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),x.nextFrame?x.nextFrame=x.nextFrame.bind(window):x.nextFrame=function(y){setTimeout(y,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(k,x,H){var E;H.exports={lineMode:!1,pasteCancelled:function(){return E&&E>Date.now()-50?!0:E=!1},cancel:function(){E=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(k,x,H){var E=k("../lib/event"),A=k("../config").nls,$=k("../lib/useragent"),a=k("../lib/dom"),l=k("../lib/lang"),r=k("../clipboard"),o=$.isChrome<18,n=$.isIE,t=$.isChrome>63,e=400,i=k("../lib/keys"),s=i.KEY_MODS,c=$.isIOS,h=c?/\s/:/\n/,y=$.isMobile,m=(function(){function g(f,b){var L=this;this.host=b,this.text=a.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",f.insertBefore(this.text,f.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",y||(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"}),E.addListener(this.text,"blur",function(C){L.ignoreFocusEvents||(b.onBlur(C),L.$isFocused=!1)},b),E.addListener(this.text,"focus",function(C){if(!L.ignoreFocusEvents){if(L.$isFocused=!0,$.isEdge)try{if(!document.hasFocus())return}catch{}b.onFocus(C),$.isEdge?setTimeout(L.resetSelection.bind(L)):L.resetSelection()}},b),this.$focusScroll=!1,b.on("beforeEndOperation",function(){var C=b.curOp,S=C&&C.command&&C.command.name;if(S!="insertstring"){var R=S&&(C.docChanged||C.selectionChanged);L.inComposition&&R&&(L.lastValue=L.text.value="",L.onCompositionEnd()),L.resetSelection()}}),b.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=c?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&b.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,E.addCommandKeyListener(this.text,function(C,S,R){if(!L.inComposition)return b.onCommandKey(C,S,R)},b),E.addListener(this.text,"select",this.onSelect.bind(this),b),E.addListener(this.text,"input",this.onInput.bind(this),b),E.addListener(this.text,"cut",this.onCut.bind(this),b),E.addListener(this.text,"copy",this.onCopy.bind(this),b),E.addListener(this.text,"paste",this.onPaste.bind(this),b),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&E.addListener(f,"keydown",function(C){if(!($.isMac&&!C.metaKey||!C.ctrlKey))switch(C.keyCode){case 67:L.onCopy(C);break;case 86:L.onPaste(C);break;case 88:L.onCut(C);break}},b),this.syncComposition=l.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),E.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),b),E.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),b),E.addListener(this.text,"keyup",this.onKeyup.bind(this),b),E.addListener(this.text,"keydown",this.syncComposition.bind(this),b),E.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),b),this.closeTimeout,E.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),b),E.addListener(this.text,"mousedown",function(C){C.preventDefault(),L.onContextMenuClose()},b),E.addListener(b.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),b),E.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),b),c&&this.addIosSelectionHandler(f,b,this.text)}return g.prototype.addIosSelectionHandler=function(f,b,L){var C=this,S=null,R=!1;L.addEventListener("keydown",function(v){S&&clearTimeout(S),R=!0},!0),L.addEventListener("keyup",function(v){S=setTimeout(function(){R=!1},100)},!0);var w=function(v){if(document.activeElement===L&&!(R||C.inComposition||b.$mouseHandler.isMousePressed)&&!C.copied){var d=L.selectionStart,u=L.selectionEnd,p=null,M=0;if(d==0?p=i.up:d==1?p=i.home:u>C.lastSelectionEnd&&C.lastValue[u]==`
|
|
161
161
|
`?p=i.end:d<C.lastSelectionStart&&C.lastValue[d-1]==" "?(p=i.left,M=s.option):d<C.lastSelectionStart||d==C.lastSelectionStart&&C.lastSelectionEnd!=C.lastSelectionStart&&d==u?p=i.left:u>C.lastSelectionEnd&&C.lastValue.slice(0,u).split(`
|
|
162
162
|
`).length>2?p=i.down:u>C.lastSelectionEnd&&C.lastValue[u-1]==" "?(p=i.right,M=s.option):(u>C.lastSelectionEnd||u==C.lastSelectionEnd&&C.lastSelectionEnd!=C.lastSelectionStart&&d==u)&&(p=i.right),d!==u&&(M|=s.shift),p){var T=b.onCommandKey({},M,p);if(!T&&b.commands){p=i.keyCodeToString(p);var _=b.commands.findKeyCommand(M,p);_&&b.execCommand(_)}C.lastSelectionStart=d,C.lastSelectionEnd=u,C.resetSelection("")}}};document.addEventListener("selectionchange",w),b.on("destroy",function(){document.removeEventListener("selectionchange",w)})},g.prototype.onContextMenuClose=function(){var f=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){f.tempStyle&&(f.text.style.cssText=f.tempStyle,f.tempStyle=""),f.host.renderer.$isMousePressed=!1,f.host.renderer.$keepTextAreaAtCursor&&f.host.renderer.$moveTextAreaToCursor()},0)},g.prototype.$onContextMenu=function(f){this.host.textInput.onContextMenu(f),this.onContextMenuClose()},g.prototype.onKeyup=function(f){f.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()},g.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},g.prototype.onCompositionStart=function(f){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){f.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var b=this.host.getSelectionRange();b.end.row=b.start.row,b.end.column=b.start.column,this.inComposition.markerRange=b,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()))}},g.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 f=this.text.value;this.sendText(f),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)}}},g.prototype.onCompositionEnd=function(f){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),f&&this.onInput())},g.prototype.onCut=function(f){this.doCopy(f,!0)},g.prototype.onCopy=function(f){this.doCopy(f,!1)},g.prototype.onPaste=function(f){var b=this.handleClipboardData(f);r.pasteCancelled()||(typeof b=="string"?(b&&this.host.onPaste(b,f),$.isIE&&setTimeout(this.resetSelection),E.preventDefault(f)):(this.text.value="",this.pasted=!0))},g.prototype.doCopy=function(f,b){var L=this,C=this.host.getCopyText();if(!C)return E.preventDefault(f);this.handleClipboardData(f,C)?(c&&(this.resetSelection(C),this.copied=C,setTimeout(function(){L.copied=!1},10)),b?this.host.onCut():this.host.onCopy(),E.preventDefault(f)):(this.copied=!0,this.text.value=C,this.text.select(),setTimeout(function(){L.copied=!1,L.resetSelection(),b?L.host.onCut():L.host.onCopy()}))},g.prototype.handleClipboardData=function(f,b,L){var C=f.clipboardData||window.clipboardData;if(!(!C||o)){var S=n||L?"Text":"text/plain";try{return b?C.setData(S,b)!==!1:C.getData(S)}catch(R){if(!L)return this.handleClipboardData(R,b,!0)}}},g.prototype.onInput=function(f){if(this.inComposition)return this.onCompositionUpdate();if(f&&f.inputType){if(f.inputType=="historyUndo")return this.host.execCommand("undo");if(f.inputType=="historyRedo")return this.host.execCommand("redo")}var b=this.text.value,L=this.sendText(b,!0);(b.length>e+100||h.test(L)||y&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},g.prototype.sendText=function(f,b){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),f&&this.host.onPaste(f),this.pasted=!1,"";for(var L=this.text.selectionStart,C=this.text.selectionEnd,S=this.lastSelectionStart,R=this.lastValue.length-this.lastSelectionEnd,w=f,v=f.length-L,d=f.length-C,u=0;S>0&&this.lastValue[u]==f[u];)u++,S--;for(w=w.slice(u),u=1;R>0&&this.lastValue.length-u>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-u]==f[f.length-u];)u++,R--;v-=u-1,d-=u-1;var p=w.length-u+1;if(p<0&&(S=-p,p=0),w=w.slice(0,p),!b&&!w&&!v&&!S&&!R&&!d)return"";this.sendingText=!0;var M=!1;return $.isAndroid&&w==". "&&(w=" ",M=!0),w&&!S&&!R&&!v&&!d||this.commandMode?this.host.onTextInput(w):this.host.onTextInput(w,{extendLeft:S,extendRight:R,restoreStart:v,restoreEnd:d}),this.sendingText=!1,this.lastValue=f,this.lastSelectionStart=L,this.lastSelectionEnd=C,this.lastRestoreEnd=d,M?`
|
|
163
163
|
`:w},g.prototype.onSelect=function(f){var b=this;if(!this.inComposition){var L=function(C){return C.selectionStart===0&&C.selectionEnd>=b.lastValue.length&&C.value===b.lastValue&&b.lastValue&&C.selectionEnd!==b.lastSelectionEnd};this.copied?this.copied=!1:L(this.text)?(this.host.selectAll(),this.resetSelection()):y&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},g.prototype.$resetSelectionIOS=function(f){if(!(!this.$isFocused||this.copied&&!f||this.sendingText)){f||(f="");var b=`
|
|
@@ -206,7 +206,7 @@
|
|
|
206
206
|
`||u==`\r
|
|
207
207
|
`){var F=M.getLine(_.row);if(_.column>F.search(/\S|$/)){var z=F.substr(_.column).search(/\S|$/);M.doc.removeInLine(_.row,_.column,_.column+z)}}this.clearSelection();var O=_.column,N=M.getState(_.row),F=M.getLine(_.row),B=T.checkOutdent(N,F,u);if(M.insert(_,u),I&&I.selection&&(I.selection.length==2?this.selection.setSelectionRange(new s(_.row,O+I.selection[0],_.row,O+I.selection[1])):this.selection.setSelectionRange(new s(_.row+I.selection[0],I.selection[1],_.row+I.selection[2],I.selection[3]))),this.$enableAutoIndent){if(M.getDocument().isNewLine(u)){var P=T.getNextLineIndent(N,F.slice(0,_.column),M.getTabString());M.insert({row:_.row+1,column:0},P)}B&&T.autoOutdent(N,M,_.row)}},d.prototype.autoIndent=function(){for(var u=this.session,p=u.getMode(),M=this.selection.isEmpty()?[new s(0,0,u.doc.getLength()-1,0)]:this.selection.getAllRanges(),T="",_="",I="",D=u.getTabString(),z=0;z<M.length;z++)for(var O=M[z].start.row,N=M[z].end.row,F=O;F<=N;F++){F>0&&(T=u.getState(F-1),_=u.getLine(F-1),I=p.getNextLineIndent(T,_,D));var B=u.getLine(F),P=p.$getIndent(B);if(I!==P){if(P.length>0){var V=new s(F,0,F,P.length);u.remove(V)}I.length>0&&u.insert({row:F,column:0},I)}p.autoOutdent(T,u,F)}},d.prototype.onTextInput=function(u,p){if(!p)return this.keyBinding.onTextInput(u);this.startOperation({command:{name:"insertstring"}});var M=this.applyComposition.bind(this,u,p);this.selection.rangeCount?this.forEachSelection(M):M(),this.endOperation()},d.prototype.applyComposition=function(u,p){if(p.extendLeft||p.extendRight){var M=this.selection.getRange();M.start.column-=p.extendLeft,M.end.column+=p.extendRight,M.start.column<0&&(M.start.row--,M.start.column+=this.session.getLine(M.start.row).length+1),this.selection.setRange(M),!u&&!M.isEmpty()&&this.remove()}if((u||!this.selection.isEmpty())&&this.insert(u,!0),p.restoreStart||p.restoreEnd){var M=this.selection.getRange();M.start.column-=p.restoreStart,M.end.column-=p.restoreEnd,this.selection.setRange(M)}},d.prototype.onCommandKey=function(u,p,M){return this.keyBinding.onCommandKey(u,p,M)},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 p=this.getSelectionRange();if(this.getBehavioursEnabled()){var M=this.session,T=M.getState(p.start.row),_=M.getMode().transformAction(T,"deletion",this,M,p);if(p.end.column===0){var I=M.getTextRange(p);if(I[I.length-1]==`
|
|
208
208
|
`){var D=M.getLine(p.end.row);/^\s+$/.test(D)&&(p.end.column=D.length)}}_&&(p=_)}this.session.remove(p),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(`
|
|
209
|
-
`),this.moveCursorToPosition(u)},d.prototype.setGhostText=function(u,p){this.renderer.setGhostText(u,p)},d.prototype.removeGhostText=function(){this.renderer.removeGhostText()},d.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var u=this.getCursorPosition(),p=u.column;if(p!==0){var M=this.session.getLine(u.row),T,_;p<M.length?(T=M.charAt(p)+M.charAt(p-1),_=new s(u.row,p-1,u.row,p+1)):(T=M.charAt(p-1)+M.charAt(p-2),_=new s(u.row,p-2,u.row,p)),this.session.replace(_,T),this.session.selection.moveToPosition(_.end)}}},d.prototype.toLowerCase=function(){var u=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var p=this.getSelectionRange(),M=this.session.getTextRange(p);this.session.replace(p,M.toLowerCase()),this.selection.setSelectionRange(u)},d.prototype.toUpperCase=function(){var u=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var p=this.getSelectionRange(),M=this.session.getTextRange(p);this.session.replace(p,M.toUpperCase()),this.selection.setSelectionRange(u)},d.prototype.indent=function(){var u=this.session,p=this.getSelectionRange();if(p.start.row<p.end.row){var M=this.$getSelectedRows();u.indentRows(M.first,M.last," ");return}else if(p.start.column<p.end.column){var T=u.getTextRange(p);if(!/^\s+$/.test(T)){var M=this.$getSelectedRows();u.indentRows(M.first,M.last," ");return}}var _=u.getLine(p.start.row),I=p.start,D=u.getTabSize(),z=u.documentToScreenColumn(I.row,I.column);if(this.session.getUseSoftTabs())var O=D-z%D,N=a.stringRepeat(" ",O);else{for(var O=z%D;_[p.start.column-1]==" "&&O;)p.start.column--,O--;this.selection.setSelectionRange(p),N=" "}return this.insert(N)},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(),p=this.session,M=[],T=u.first;T<=u.last;T++)M.push(p.getLine(T));M.sort(function(D,z){return D.toLowerCase()<z.toLowerCase()?-1:D.toLowerCase()>z.toLowerCase()?1:0});for(var _=new s(0,0,0,0),T=u.first;T<=u.last;T++){var I=p.getLine(T);_.start.row=T,_.end.row=T,_.end.column=I.length,p.replace(_,M[T-u.first])}},d.prototype.toggleCommentLines=function(){var u=this.session.getState(this.getCursorPosition().row),p=this.$getSelectedRows();this.session.getMode().toggleCommentLines(u,this.session,p.first,p.last)},d.prototype.toggleBlockComment=function(){var u=this.getCursorPosition(),p=this.session.getState(u.row),M=this.getSelectionRange();this.session.getMode().toggleBlockComment(p,this.session,M,u)},d.prototype.getNumberAt=function(u,p){var M=/[\-]?[0-9]+(?:\.[0-9]+)?/g;M.lastIndex=0;for(var T=this.session.getLine(u);M.lastIndex<p;){var _=M.exec(T);if(_.index<=p&&_.index+_[0].length>=p){var I={value:_[0],start:_.index,end:_.index+_[0].length};return I}}return null},d.prototype.modifyNumber=function(u){var p=this.selection.getCursor().row,M=this.selection.getCursor().column,T=new s(p,M-1,p,M),_=this.session.getTextRange(T);if(!isNaN(parseFloat(_))&&isFinite(_)){var I=this.getNumberAt(p,M);if(I){var D=I.value.indexOf(".")>=0?I.start+I.value.indexOf(".")+1:I.end,z=I.start+I.value.length-D,O=parseFloat(I.value);O*=Math.pow(10,z),D!==I.end&&M<D?u*=Math.pow(10,I.end-M-1):u*=Math.pow(10,I.end-M),O+=u,O/=Math.pow(10,z);var N=O.toFixed(z),F=new s(p,I.start,p,I.end);this.session.replace(F,N),this.moveCursorTo(p,Math.max(I.start+1,M+N.length-I.value.length))}}else this.toggleWord()},d.prototype.toggleWord=function(){var u=this.selection.getCursor().row,p=this.selection.getCursor().column;this.selection.selectWord();var M=this.getSelectedText(),T=this.selection.getWordRange().start.column,_=M.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),I=p-T-1;I<0&&(I=0);var D=0,z=0,O=this;M.match(/[A-Za-z0-9_]+/)&&_.forEach(function(Y,X){z=D+Y.length,I>=D&&I<=z&&(M=Y,O.selection.clearSelection(),O.moveCursorTo(u,D+T),O.selection.selectTo(u,z+T)),D=z});for(var N=this.$toggleWordPairs,F,B=0;B<N.length;B++)for(var P=N[B],V=0;V<=1;V++){var G=+!V,j=M.match(new RegExp("^\\s?_?("+a.escapeRegExp(P[V])+")\\s?$","i"));if(j){var K=M.match(new RegExp("([_]|^|\\s)("+a.escapeRegExp(j[1])+")($|\\s)","g"));K&&(F=M.replace(new RegExp(a.escapeRegExp(P[V]),"i"),function(Y){var X=P[G];return Y.toUpperCase()==Y?X=X.toUpperCase():Y.charAt(0).toUpperCase()==Y.charAt(0)&&(X=X.substr(0,0)+P[G].charAt(0).toUpperCase()+X.substr(1)),X}),this.insert(F),F="")}}},d.prototype.findLinkAt=function(u,p){var M,T,_=this.session.getLine(u),I=_.split(/((?:https?|ftp):\/\/[\S]+)/),D=p;D<0&&(D=0);var z=0,O=0,N;try{for(var F=E(I),B=F.next();!B.done;B=F.next()){var P=B.value;if(O=z+P.length,D>=z&&D<=O&&P.match(/((?:https?|ftp):\/\/[\S]+)/)){N=P.replace(/[\s:.,'";}\]]+$/,"");break}z=O}}catch(V){M={error:V}}finally{try{B&&!B.done&&(T=F.return)&&T.call(F)}finally{if(M)throw M.error}}return N},d.prototype.openLink=function(){var u=this.selection.getCursor(),p=this.findLinkAt(u.row,u.column);return p&&window.open(p,"_blank"),p!=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,p=this.session,M=u.getRange(),T=u.isBackwards();if(M.isEmpty()){var _=M.start.row;p.duplicateLines(_,_)}else{var I=T?M.start:M.end,D=p.insert(I,p.getTextRange(M));M.start=I,M.end=D,u.setSelectionRange(M,T)}},d.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},d.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},d.prototype.moveText=function(u,p,M){return this.session.moveText(u,p,M)},d.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},d.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},d.prototype.$moveLines=function(u,p){var M,T,_=this.selection;if(!_.inMultiSelectMode||this.inVirtualSelectionMode){var I=_.toOrientedRange();M=this.$getSelectedRows(I),T=this.session.$moveLines(M.first,M.last,p?0:u),p&&u==-1&&(T=0),I.moveBy(T,0),_.fromOrientedRange(I)}else{var D=_.rangeList.ranges;_.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var z=0,O=0,N=D.length,F=0;F<N;F++){var B=F;D[F].moveBy(z,0),M=this.$getSelectedRows(D[F]);for(var P=M.first,V=M.last;++F<N;){O&&D[F].moveBy(O,0);var G=this.$getSelectedRows(D[F]);if(p&&G.first!=V)break;if(!p&&G.first>V+1)break;V=G.last}for(F--,z=this.session.$moveLines(P,V,p?0:u),p&&u==-1&&(B=F+1);B<=F;)D[B].moveBy(z,0),B++;p||(z=0),O+=z}_.fromOrientedRange(_.ranges[0]),_.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,p){var M=this.renderer,T=this.renderer.layerConfig,_=u*Math.floor(T.height/T.lineHeight);p===!0?this.selection.$moveSelection(function(){this.moveCursorBy(_,0)}):p===!1&&(this.selection.moveCursorBy(_,0),this.selection.clearSelection());var I=M.scrollTop;M.scrollBy(0,_*T.lineHeight),p!=null&&M.scrollCursorIntoView(null,.5),M.animateScrolling(I)},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,p,M,T){this.renderer.scrollToLine(u,p,M,T)},d.prototype.centerSelection=function(){var u=this.getSelectionRange(),p={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(p,.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,p){this.selection.moveCursorTo(u,p)},d.prototype.moveCursorToPosition=function(u){this.selection.moveCursorToPosition(u)},d.prototype.jumpToMatching=function(u,p){var M=this.getCursorPosition(),T=new g(this.session,M.row,M.column),_=T.getCurrentToken(),I=0;_&&_.type.indexOf("tag-name")!==-1&&(_=T.stepBackward());var D=_||T.stepForward();if(D){var z,O=!1,N={},F=M.column-D.start,B,P={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(D.value.match(/[{}()\[\]]/g)){for(;F<D.value.length&&!O;F++)if(P[D.value[F]])switch(B=P[D.value[F]]+"."+D.type.replace("rparen","lparen"),isNaN(N[B])&&(N[B]=0),D.value[F]){case"(":case"[":case"{":N[B]++;break;case")":case"]":case"}":N[B]--,N[B]===-1&&(z="bracket",O=!0);break}}else D.type.indexOf("tag-name")!==-1&&(isNaN(N[D.value])&&(N[D.value]=0),_.value==="<"&&I>1?N[D.value]++:_.value==="</"&&N[D.value]--,N[D.value]===-1&&(z="tag",O=!0));O||(_=D,I++,D=T.stepForward(),F=0)}while(D&&!O);if(z){var V,G;if(z==="bracket")V=this.session.getBracketRange(M),V||(V=new s(T.getCurrentTokenRow(),T.getCurrentTokenColumn()+F-1,T.getCurrentTokenRow(),T.getCurrentTokenColumn()+F-1),G=V.start,(p||G.row===M.row&&Math.abs(G.column-M.column)<2)&&(V=this.session.getBracketRange(G)));else if(z==="tag"){if(!D||D.type.indexOf("tag-name")===-1)return;if(V=new s(T.getCurrentTokenRow(),T.getCurrentTokenColumn()-2,T.getCurrentTokenRow(),T.getCurrentTokenColumn()-2),V.compare(M.row,M.column)===0){var j=this.session.getMatchingTags(M);j&&(j.openTag.contains(M.row,M.column)?(V=j.closeTag,G=V.start):(V=j.openTag,j.closeTag.start.row===M.row&&j.closeTag.start.column===M.column?G=V.end:G=V.start))}G=G||V.start}G=V&&V.cursor||G,G&&(u?V&&p?this.selection.setRange(V):V&&V.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(G.row,G.column):this.selection.moveTo(G.row,G.column))}}},d.prototype.gotoLine=function(u,p,M){this.selection.clearSelection(),this.session.unfold({row:u-1,column:p||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(u-1,p||0),this.isRowFullyVisible(u-1)||this.scrollToLine(u-1,!0,M)},d.prototype.navigateTo=function(u,p){this.selection.moveTo(u,p)},d.prototype.navigateUp=function(u){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var p=this.selection.anchor.getPosition();return this.moveCursorToPosition(p)}this.selection.clearSelection(),this.selection.moveCursorBy(-u||-1,0)},d.prototype.navigateDown=function(u){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var p=this.selection.anchor.getPosition();return this.moveCursorToPosition(p)}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 p=this.getSelectionRange().start;this.moveCursorToPosition(p)}this.clearSelection()},d.prototype.navigateRight=function(u){if(this.selection.isEmpty())for(u=u||1;u--;)this.selection.moveCursorRight();else{var p=this.getSelectionRange().end;this.moveCursorToPosition(p)}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,p){p&&this.$search.set(p);var M=this.$search.find(this.session),T=0;return M&&(this.$tryReplace(M,u)&&(T=1),this.selection.setSelectionRange(M),this.renderer.scrollSelectionIntoView(M.start,M.end)),T},d.prototype.replaceAll=function(u,p){p&&this.$search.set(p);var M=this.$search.findAll(this.session),T=0;if(!M.length)return T;var _=this.getSelectionRange();this.selection.moveTo(0,0);for(var I=M.length-1;I>=0;--I)this.$tryReplace(M[I],u)&&T++;return this.selection.setSelectionRange(_),T},d.prototype.$tryReplace=function(u,p){var M=this.session.getTextRange(u);return p=this.$search.replace(M,p),p!==null?(u.end=this.session.replace(u,p),u):null},d.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},d.prototype.find=function(u,p,M){p||(p={}),typeof u=="string"||u instanceof RegExp?p.needle=u:typeof u=="object"&&A.mixin(p,u);var T=this.selection.getRange();p.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(p),p.start||this.$search.set({start:T});var _=this.$search.find(this.session);if(p.preventScroll)return _;if(_)return this.revealRange(_,M),_;p.backwards?T.start=T.end:T.end=T.start,this.selection.setRange(T)},d.prototype.findNext=function(u,p){this.find({skipCurrent:!0,backwards:!1},u,p)},d.prototype.findPrevious=function(u,p){this.find(u,{skipCurrent:!0,backwards:!0},p)},d.prototype.revealRange=function(u,p){this.session.unfold(u),this.selection.setSelectionRange(u);var M=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(u.start,u.end,.5),p!==!1&&this.renderer.animateScrolling(M)},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 p,M=this,T=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var _=this.$scrollAnchor;_.style.cssText="position:absolute",this.container.insertBefore(_,this.container.firstChild);var I=this.on("changeSelection",function(){T=!0}),D=this.renderer.on("beforeRender",function(){T&&(p=M.renderer.container.getBoundingClientRect())}),z=this.renderer.on("afterRender",function(){if(T&&p&&(M.isFocused()||M.searchBox&&M.searchBox.isFocused())){var O=M.renderer,N=O.$cursorLayer.$pixelPos,F=O.layerConfig,B=N.top-F.offset;N.top>=0&&B+p.top<0?T=!0:N.top<F.height&&N.top+p.top+F.lineHeight>window.innerHeight?T=!1:T=null,T!=null&&(_.style.top=B+"px",_.style.left=N.left+"px",_.style.height=F.lineHeight+"px",_.scrollIntoView(T)),T=p=null}});this.setAutoScrollEditorIntoView=function(O){O||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",I),this.renderer.off("afterRender",z),this.renderer.off("beforeRender",D))}}},d.prototype.$resetCursorStyle=function(){var u=this.$cursorStyle||"ace",p=this.renderer.$cursorLayer;p&&(p.setSmoothBlinking(/smooth/.test(u)),p.isBlinking=!this.$readOnly&&u!="wide",$.setCssClass(p.element,"ace_slim-cursors",/slim/.test(u)))},d.prototype.prompt=function(u,p,M){var T=this;m.loadModule("ace/ext/prompt",function(_){_.prompt(T,u,p,M)})},d})();w.$uid=0,w.prototype.curOp=null,w.prototype.prevOp={},w.prototype.$mergeableCommands=["backspace","del","insertstring"],w.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"],["&&","||"],["==","!="]],A.implement(w.prototype,c),m.defineOptions(w.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(M){var T=!1;if(M&&M.type=="keydown"){if(M&&M.key&&!M.ctrlKey&&!M.metaKey&&(M.key==" "&&M.preventDefault(),T=M.key.length==1),!T)return}else M&&M.type!=="exec"&&(T=!0);if(T){u.hoverTooltip||(u.hoverTooltip=new R);var _=$.createElement("div");_.textContent=b("editor.tooltip.disable-editing","Editing is disabled"),u.hoverTooltip.isOpen||u.hoverTooltip.showForRange(u,u.getSelectionRange(),_)}else u.hoverTooltip&&u.hoverTooltip.isOpen&&u.hoverTooltip.hide()});var p=this.textInput.getElement();d?(S.addListener(p,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(S.removeListener(p,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback),this.hoverTooltip&&(this.hoverTooltip.destroy(),this.hoverTooltip=null))}},initialValue:!1},copyWithEmptySelection:{set:function(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),$.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),$.addCssClass(this.container,"ace_hasPlaceholder");var p=$.createElement("div");p.className="ace_placeholder",p.textContent=this.$placeholder||"",this.renderer.placeholderNode=p,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},p=function(T){if(T.target==this.renderer.scroller&&T.keyCode===C.enter){T.preventDefault();var _=this.getCursorPosition().row;this.isRowVisible(_)||this.scrollToLine(_,!0,!0),this.focus()}},M;d?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(l.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",b("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",b("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",p.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",b("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",b("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),M||(M=new f(this)),M.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",p.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),M&&M.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?"·":""))+""},getWidth:function(d,u,p){return Math.max(u.toString().length,(p.lastRow+1).toString().length,2)*p.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)}};x.Editor=w}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(k,x,H){var E=k("../lib/dom"),A=(function(){function $(a,l){this.element=a,this.canvasHeight=l||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return $.prototype.moveContainer=function(a){E.translate(this.element,0,-(a.firstRowScreen*a.lineHeight%this.canvasHeight)-a.offset*this.$offsetCoefficient)},$.prototype.pageChanged=function(a,l){return Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)!==Math.floor(l.firstRowScreen*l.lineHeight/this.canvasHeight)},$.prototype.computeLineTop=function(a,l,r){var o=l.firstRowScreen*l.lineHeight,n=Math.floor(o/this.canvasHeight),t=r.documentToScreenRow(a,0)*l.lineHeight;return t-n*this.canvasHeight},$.prototype.computeLineHeight=function(a,l,r){return l.lineHeight*r.getRowLineCount(a)},$.prototype.getLength=function(){return this.cells.length},$.prototype.get=function(a){return this.cells[a]},$.prototype.shift=function(){this.$cacheCell(this.cells.shift())},$.prototype.pop=function(){this.$cacheCell(this.cells.pop())},$.prototype.push=function(a){if(Array.isArray(a)){this.cells.push.apply(this.cells,a);for(var l=E.createFragment(this.element),r=0;r<a.length;r++)l.appendChild(a[r].element);this.element.appendChild(l)}else this.cells.push(a),this.element.appendChild(a.element)},$.prototype.unshift=function(a){if(Array.isArray(a)){this.cells.unshift.apply(this.cells,a);for(var l=E.createFragment(this.element),r=0;r<a.length;r++)l.appendChild(a[r].element);this.element.firstChild?this.element.insertBefore(l,this.element.firstChild):this.element.appendChild(l)}else this.cells.unshift(a),this.element.insertAdjacentElement("afterbegin",a.element)},$.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},$.prototype.$cacheCell=function(a){a&&(a.element.remove(),this.cellCache.push(a))},$.prototype.createCell=function(a,l,r,o){var n=this.cellCache.pop();if(!n){var t=E.createElement("div");o&&o(t),this.element.appendChild(t),n={element:t,text:"",row:a}}return n.row=a,n},$})();x.Lines=A}),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(k,x,H){var E=k("../lib/dom"),A=k("../lib/oop"),$=k("../lib/lang"),a=k("../lib/event_emitter").EventEmitter,l=k("./lines").Lines,r=k("../config").nls,o=(function(){function t(e){this.$showCursorMarker=null,this.element=E.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 l(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,i){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,i)},t.prototype.removeGutterDecoration=function(e,i){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,i)},t.prototype.setAnnotations=function(e){this.$annotations=[];for(var i=0;i<e.length;i++){var s=e[i],c=s.row,h=this.$annotations[c];h||(h=this.$annotations[c]={text:[],type:[],displayText:[]});var y=s.text,m=s.text,g=s.type;y=y?$.escapeHTML(y):s.html||"",m=m||s.html||"",h.text.indexOf(y)===-1&&(h.text.push(y),h.type.push(g),h.displayText.push(m));var f=s.className;f?h.className=f:g==="error"?h.className=" ace_error":g==="security"&&!/\bace_error\b/.test(h.className)?h.className=" ace_security":g==="warning"&&!/\bace_(error|security)\b/.test(h.className)?h.className=" ace_warning":g==="info"&&!h.className?h.className=" ace_info":g==="hint"&&!h.className&&(h.className=" ace_hint")}},t.prototype.$updateAnnotations=function(e){if(this.$annotations.length){var i=e.start.row,s=e.end.row-i;if(s!==0)if(e.action=="remove")this.$annotations.splice(i,s+1,null);else{var c=new Array(s+1);c.unshift(i,1),this.$annotations.splice.apply(this.$annotations,c)}}},t.prototype.update=function(e){this.config=e;var i=this.session,s=e.firstRow,c=Math.min(e.lastRow+e.gutterOffset,i.getLength()-1);this.oldLastRow=c,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var h=i.getNextFoldLine(s),y=h?h.start.row:1/0,m=null,g=-1,f=s;;){if(f>y&&(f=h.end.row+1,h=i.getNextFoldLine(f,h),y=h?h.start.row:1/0),f>c){for(;this.$lines.getLength()>g+1;)this.$lines.pop();break}m=this.$lines.get(++g),m?m.row=f:(m=this.$lines.createCell(f,e,this.session,n),this.$lines.push(m)),this.$renderCell(m,e,h,f),f++}this._signal("afterRender"),this.$updateGutterWidth(e),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},t.prototype.$updateGutterWidth=function(e){var i=this.session,s=i.gutterRenderer||this.$renderer,c=i.$firstLineNumber,h=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||i.$useWrapMode)&&(h=i.getLength()+c-1);var y=s?s.getWidth(i,h,e):h.toString().length*e.characterWidth,m=this.$padding||this.$computePadding();y+=m.left+m.right,y!==this.gutterWidth&&!isNaN(y)&&(this.gutterWidth=y,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",y))},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 i=this.$lines.cells;this.$cursorCell=null;for(var s=0;s<i.length;s++){var c=i[s];if(c.row>=this.$cursorRow){if(c.row>this.$cursorRow){var h=this.session.getFoldLine(this.$cursorRow);if(s>0&&h&&h.start.row==i[s-1].row)c=i[s-1];else break}c.element.className="ace_gutter-active-line "+c.element.className,this.$cursorCell=c;break}}}}},t.prototype.$updateCursorMarker=function(){if(this.session){var e=this.session;this.$highlightElement||(this.$highlightElement=E.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var i=e.selection.cursor,s=this.config,c=this.$lines,h=s.firstRowScreen*s.lineHeight,y=Math.floor(h/c.canvasHeight),m=e.documentToScreenRow(i)*s.lineHeight,g=m-y*c.canvasHeight;E.setStyle(this.$highlightElement.style,"height",s.lineHeight+"px"),E.setStyle(this.$highlightElement.style,"top",g+"px")}},t.prototype.scrollLines=function(e){var i=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(i,e))return this.update(e);this.$lines.moveContainer(e);var s=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),c=this.oldLastRow;if(this.oldLastRow=s,!i||c<e.firstRow)return this.update(e);if(s<i.firstRow)return this.update(e);if(i.firstRow<e.firstRow)for(var h=this.session.getFoldedRowCount(i.firstRow,e.firstRow-1);h>0;h--)this.$lines.shift();if(c>s)for(var h=this.session.getFoldedRowCount(s+1,c);h>0;h--)this.$lines.pop();e.firstRow<i.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,i.firstRow-1)),s>c&&this.$lines.push(this.$renderLines(e,c+1,s)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},t.prototype.$renderLines=function(e,i,s){for(var c=[],h=i,y=this.session.getNextFoldLine(h),m=y?y.start.row:1/0;h>m&&(h=y.end.row+1,y=this.session.getNextFoldLine(h,y),m=y?y.start.row:1/0),!(h>s);){var g=this.$lines.createCell(h,e,this.session,n);this.$renderCell(g,e,y,h),c.push(g),h++}return c},t.prototype.$renderCell=function(e,i,s,c){var h=e.element,y=this.session,m=h.childNodes[0],g=h.childNodes[1],f=h.childNodes[2],b=h.childNodes[3],L=f.firstChild,C=y.$firstLineNumber,S=y.$breakpoints,R=y.$decorations,w=y.gutterRenderer||this.$renderer,v=this.$showFoldWidgets&&y.foldWidgets,d=s?s.start.row:Number.MAX_VALUE,u=i.lineHeight+"px",p=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",M=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",T=(w?w.getText(y,c):c+C).toString();if(this.$highlightGutterLine&&(c==this.$cursorRow||s&&c<this.$cursorRow&&c>=d&&this.$cursorRow<=s.end.row)&&(p+="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)),S[c]&&(p+=S[c]),R[c]&&(p+=R[c]),this.$annotations[c]&&c!==d&&(p+=this.$annotations[c].className),v){var _=v[c];_==null&&(_=v[c]=y.getFoldWidget(c))}if(_){var I="ace_fold-widget ace_"+_,D=_=="start"&&c==d&&c<s.end.row;if(D){I+=" ace_closed";for(var z="",O=!1,N=c+1;N<=s.end.row;N++)if(this.$annotations[N]){if(this.$annotations[N].className===" ace_error"){O=!0,z=" ace_error_fold";break}this.$annotations[N].className===" ace_security"?(O=!0,z=" ace_security_fold"):this.$annotations[N].className===" ace_warning"&&z!==" ace_security_fold"&&(O=!0,z=" ace_warning_fold")}p+=z}else I+=" ace_open";g.className!=I&&(g.className=I),E.setStyle(g.style,"height",u),E.setStyle(g.style,"display","inline-block"),g.setAttribute("role","button"),g.setAttribute("tabindex","-1");var F=y.getFoldWidgetRange(c);F?g.setAttribute("aria-label",r("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[F.start.row+1,F.end.row+1])):s?g.setAttribute("aria-label",r("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[s.start.row+1,s.end.row+1])):g.setAttribute("aria-label",r("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[c+1])),D?(g.setAttribute("aria-expanded","false"),g.setAttribute("title",r("gutter.code-folding.closed.title","Unfold code"))):(g.setAttribute("aria-expanded","true"),g.setAttribute("title",r("gutter.code-folding.open.title","Fold code")))}else g&&(E.setStyle(g.style,"display","none"),g.setAttribute("tabindex","0"),g.removeAttribute("role"),g.removeAttribute("aria-label"));var B=this.session.$gutterCustomWidgets[c];if(B?this.$addCustomWidget(c,B,e):b&&this.$removeCustomWidget(c,e),O&&this.$showFoldedAnnotations){f.className="ace_gutter_annotation",L.className=M,L.className+=z,E.setStyle(L.style,"height",u),E.setStyle(f.style,"display","block"),E.setStyle(f.style,"height",u);var P;switch(z){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}f.setAttribute("aria-label",P),f.setAttribute("tabindex","-1"),f.setAttribute("role","button")}else if(this.$annotations[c]){f.className="ace_gutter_annotation",L.className=M,this.$useSvgGutterIcons?L.className+=this.$annotations[c].className:h.classList.add(this.$annotations[c].className.replace(" ","")),E.setStyle(L.style,"height",u),E.setStyle(f.style,"display","block"),E.setStyle(f.style,"height",u);var P;switch(this.$annotations[c].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}f.setAttribute("aria-label",P),f.setAttribute("tabindex","-1"),f.setAttribute("role","button")}else E.setStyle(f.style,"display","none"),f.removeAttribute("aria-label"),f.removeAttribute("role"),f.setAttribute("tabindex","0");return T!==m.data&&(m.data=T),h.className!=p&&(h.className=p),E.setStyle(e.element.style,"height",this.$lines.computeLineHeight(c,i,y)+"px"),E.setStyle(e.element.style,"top",this.$lines.computeLineTop(c,i,y)+"px"),e.text=T,f.style.display==="none"&&g.style.display==="none"&&!B?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?E.addCssClass(this.element,"ace_folding-enabled"):E.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},t.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},t.prototype.$hideFoldWidget=function(e,i){var s=i||this.$getGutterCell(e);if(s&&s.element){var c=s.element.childNodes[1];c&&E.setStyle(c.style,"display","none")}},t.prototype.$showFoldWidget=function(e,i){var s=i||this.$getGutterCell(e);if(s&&s.element){var c=s.element.childNodes[1];c&&this.session.foldWidgets&&this.session.foldWidgets[s.row]&&E.setStyle(c.style,"display","inline-block")}},t.prototype.$getGutterCell=function(e){var i=this.$lines.cells,s=0,c=i.length-1;if(!(e<i[0].row||e>i[c].row)){for(;s<=c;){var h=Math.floor((s+c)/2),y=i[h];if(y.row>e)c=h-1;else if(y.row<e)s=h+1;else return y}return y}},t.prototype.$addCustomWidget=function(e,i,s){var c=i.className,h=i.label,y=i.title,m=i.callbacks;this.session.$gutterCustomWidgets[e]={className:c,label:h,title:y,callbacks:m},this.$hideFoldWidget(e,s);var g=s||this.$getGutterCell(e);if(g&&g.element){var f=g.element.querySelector(".ace_custom-widget");f&&f.remove(),f=E.createElement("span"),f.className="ace_custom-widget ".concat(c),f.setAttribute("tabindex","-1"),f.setAttribute("role","button"),f.setAttribute("aria-label",h),f.setAttribute("title",y),E.setStyle(f.style,"display","inline-block"),E.setStyle(f.style,"height","inherit"),m&&m.onClick&&f.addEventListener("click",function(b){m.onClick(b,e),b.stopPropagation()}),g.element.appendChild(f)}},t.prototype.$removeCustomWidget=function(e,i){delete this.session.$gutterCustomWidgets[e],this.$showFoldWidget(e,i);var s=i||this.$getGutterCell(e);if(s&&s.element){var c=s.element.querySelector(".ace_custom-widget");c&&s.element.removeChild(c)}},t.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=E.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 i=this.$padding||this.$computePadding(),s=this.element.getBoundingClientRect();if(e.x<i.left+s.left)return"markers";if(this.$showFoldWidgets&&e.x>s.right-i.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,A.implement(o.prototype,a);function n(t){var e=document.createTextNode("");t.appendChild(e);var i=E.createElement("span");t.appendChild(i);var s=E.createElement("span");t.appendChild(s);var c=E.createElement("span");return s.appendChild(c),t}x.Gutter=o}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(k,x,H){var E=k("../range").Range,A=k("../lib/dom"),$=(function(){function l(r){this.element=A.createElement("div"),this.element.className="ace_layer ace_marker-layer",r.appendChild(this.element)}return l.prototype.setPadding=function(r){this.$padding=r},l.prototype.setSession=function(r){this.session=r},l.prototype.setMarkers=function(r){this.markers=r},l.prototype.elt=function(r,o){var n=this.i!=-1&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=o,n.className=r},l.prototype.update=function(r){if(r){this.config=r,this.i=0;var o;for(var n in this.markers){var t=this.markers[n];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 i=this.$getTop(e.start.row,r),s=this.$padding+e.start.column*r.characterWidth;t.renderer(o,e,s,i,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)}},l.prototype.$getTop=function(r,o){return(r-o.firstRowScreen)*o.lineHeight},l.prototype.drawTextMarker=function(r,o,n,t,e){for(var i=this.session,s=o.start.row,c=o.end.row,h=s,y=0,m=0,g=i.getScreenLastRowColumn(h),f=new E(h,o.start.column,h,m);h<=c;h++)f.start.row=f.end.row=h,f.start.column=h==s?o.start.column:i.getRowWrapIndent(h),f.end.column=g,y=m,m=g,g=h+1<c?i.getScreenLastRowColumn(h+1):h==c?0:o.end.column,this.drawSingleLineMarker(r,f,n+(h==s?" ace_start":"")+" ace_br"+a(h==s||h==s+1&&o.start.column,y<m,m>g,h==c),t,h==c?0:1,e)},l.prototype.drawMultiLineMarker=function(r,o,n,t,e){var i=this.$padding,s=t.lineHeight,c=this.$getTop(o.start.row,t),h=i+o.start.column*t.characterWidth;if(e=e||"",this.session.$bidiHandler.isBidiRow(o.start.row)){var y=o.clone();y.end.row=y.start.row,y.end.column=this.session.getLine(y.start.row).length,this.drawBidiSingleLineMarker(r,y,n+" ace_br1 ace_start",t,null,e)}else this.elt(n+" ace_br1 ace_start","height:"+s+"px;right:"+i+"px;top:"+c+"px;left:"+h+"px;"+(e||""));if(this.session.$bidiHandler.isBidiRow(o.end.row)){var y=o.clone();y.start.row=y.end.row,y.start.column=0,this.drawBidiSingleLineMarker(r,y,n+" ace_br12",t,null,e)}else{c=this.$getTop(o.end.row,t);var m=o.end.column*t.characterWidth;this.elt(n+" ace_br12","height:"+s+"px;width:"+m+"px;top:"+c+"px;left:"+i+"px;"+(e||""))}if(s=(o.end.row-o.start.row-1)*t.lineHeight,!(s<=0)){c=this.$getTop(o.start.row+1,t);var g=(o.start.column?1:0)|(o.end.column?0:8);this.elt(n+(g?" ace_br"+g:""),"height:"+s+"px;right:"+i+"px;top:"+c+"px;left:"+i+"px;"+(e||""))}},l.prototype.drawSingleLineMarker=function(r,o,n,t,e,i){if(this.session.$bidiHandler.isBidiRow(o.start.row))return this.drawBidiSingleLineMarker(r,o,n,t,e,i);var s=t.lineHeight,c=(o.end.column+(e||0)-o.start.column)*t.characterWidth,h=this.$getTop(o.start.row,t),y=this.$padding+o.start.column*t.characterWidth;this.elt(n,"height:"+s+"px;width:"+c+"px;top:"+h+"px;left:"+y+"px;"+(i||""))},l.prototype.drawBidiSingleLineMarker=function(r,o,n,t,e,i){var s=t.lineHeight,c=this.$getTop(o.start.row,t),h=this.$padding,y=this.session.$bidiHandler.getSelections(o.start.column,o.end.column);y.forEach(function(m){this.elt(n,"height:"+s+"px;width:"+(m.width+(e||0))+"px;top:"+c+"px;left:"+(h+m.left)+"px;"+(i||""))},this)},l.prototype.drawFullLineMarker=function(r,o,n,t,e){var i=this.$getTop(o.start.row,t),s=t.lineHeight;o.start.row!=o.end.row&&(s+=this.$getTop(o.end.row,t)-i),this.elt(n,"height:"+s+"px;top:"+i+"px;left:0;right:0;"+(e||""))},l.prototype.drawScreenLineMarker=function(r,o,n,t,e){var i=this.$getTop(o.start.row,t),s=t.lineHeight;this.elt(n,"height:"+s+"px;top:"+i+"px;left:0;right:0;"+(e||""))},l})();$.prototype.$padding=0;function a(l,r,o,n){return(l?1:0)|(r?2:0)|(o?4:0)|(n?8:0)}x.Marker=$}),ace.define("ace/layer/text_util",["require","exports","module"],function(k,x,H){var E=new Set(["text","rparen","lparen"]);x.isTextToken=function(A){return E.has(A)}}),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(k,x,H){var E=k("../lib/oop"),A=k("../lib/dom"),$=k("../lib/lang"),a=k("./lines").Lines,l=k("../lib/event_emitter").EventEmitter,r=k("../config").nls,o=k("./text_util").isTextToken,n=(function(){function t(e){this.dom=A,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 a(this.element)}return t.prototype.$updateEolChar=function(){var e=this.session.doc,i=e.getNewLineCharacter()==`
|
|
209
|
+
`),this.moveCursorToPosition(u)},d.prototype.setGhostText=function(u,p){this.renderer.setGhostText(u,p)},d.prototype.removeGhostText=function(){this.renderer.removeGhostText()},d.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var u=this.getCursorPosition(),p=u.column;if(p!==0){var M=this.session.getLine(u.row),T,_;p<M.length?(T=M.charAt(p)+M.charAt(p-1),_=new s(u.row,p-1,u.row,p+1)):(T=M.charAt(p-1)+M.charAt(p-2),_=new s(u.row,p-2,u.row,p)),this.session.replace(_,T),this.session.selection.moveToPosition(_.end)}}},d.prototype.toLowerCase=function(){var u=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var p=this.getSelectionRange(),M=this.session.getTextRange(p);this.session.replace(p,M.toLowerCase()),this.selection.setSelectionRange(u)},d.prototype.toUpperCase=function(){var u=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var p=this.getSelectionRange(),M=this.session.getTextRange(p);this.session.replace(p,M.toUpperCase()),this.selection.setSelectionRange(u)},d.prototype.indent=function(){var u=this.session,p=this.getSelectionRange();if(p.start.row<p.end.row){var M=this.$getSelectedRows();u.indentRows(M.first,M.last," ");return}else if(p.start.column<p.end.column){var T=u.getTextRange(p);if(!/^\s+$/.test(T)){var M=this.$getSelectedRows();u.indentRows(M.first,M.last," ");return}}var _=u.getLine(p.start.row),I=p.start,D=u.getTabSize(),z=u.documentToScreenColumn(I.row,I.column);if(this.session.getUseSoftTabs())var O=D-z%D,N=a.stringRepeat(" ",O);else{for(var O=z%D;_[p.start.column-1]==" "&&O;)p.start.column--,O--;this.selection.setSelectionRange(p),N=" "}return this.insert(N)},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(),p=this.session,M=[],T=u.first;T<=u.last;T++)M.push(p.getLine(T));M.sort(function(D,z){return D.toLowerCase()<z.toLowerCase()?-1:D.toLowerCase()>z.toLowerCase()?1:0});for(var _=new s(0,0,0,0),T=u.first;T<=u.last;T++){var I=p.getLine(T);_.start.row=T,_.end.row=T,_.end.column=I.length,p.replace(_,M[T-u.first])}},d.prototype.toggleCommentLines=function(){var u=this.session.getState(this.getCursorPosition().row),p=this.$getSelectedRows();this.session.getMode().toggleCommentLines(u,this.session,p.first,p.last)},d.prototype.toggleBlockComment=function(){var u=this.getCursorPosition(),p=this.session.getState(u.row),M=this.getSelectionRange();this.session.getMode().toggleBlockComment(p,this.session,M,u)},d.prototype.getNumberAt=function(u,p){var M=/[\-]?[0-9]+(?:\.[0-9]+)?/g;M.lastIndex=0;for(var T=this.session.getLine(u);M.lastIndex<p;){var _=M.exec(T);if(_.index<=p&&_.index+_[0].length>=p){var I={value:_[0],start:_.index,end:_.index+_[0].length};return I}}return null},d.prototype.modifyNumber=function(u){var p=this.selection.getCursor().row,M=this.selection.getCursor().column,T=new s(p,M-1,p,M),_=this.session.getTextRange(T);if(!isNaN(parseFloat(_))&&isFinite(_)){var I=this.getNumberAt(p,M);if(I){var D=I.value.indexOf(".")>=0?I.start+I.value.indexOf(".")+1:I.end,z=I.start+I.value.length-D,O=parseFloat(I.value);O*=Math.pow(10,z),D!==I.end&&M<D?u*=Math.pow(10,I.end-M-1):u*=Math.pow(10,I.end-M),O+=u,O/=Math.pow(10,z);var N=O.toFixed(z),F=new s(p,I.start,p,I.end);this.session.replace(F,N),this.moveCursorTo(p,Math.max(I.start+1,M+N.length-I.value.length))}}else this.toggleWord()},d.prototype.toggleWord=function(){var u=this.selection.getCursor().row,p=this.selection.getCursor().column;this.selection.selectWord();var M=this.getSelectedText(),T=this.selection.getWordRange().start.column,_=M.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),I=p-T-1;I<0&&(I=0);var D=0,z=0,O=this;M.match(/[A-Za-z0-9_]+/)&&_.forEach(function(Y,X){z=D+Y.length,I>=D&&I<=z&&(M=Y,O.selection.clearSelection(),O.moveCursorTo(u,D+T),O.selection.selectTo(u,z+T)),D=z});for(var N=this.$toggleWordPairs,F,B=0;B<N.length;B++)for(var P=N[B],V=0;V<=1;V++){var G=+!V,j=M.match(new RegExp("^\\s?_?("+a.escapeRegExp(P[V])+")\\s?$","i"));if(j){var K=M.match(new RegExp("([_]|^|\\s)("+a.escapeRegExp(j[1])+")($|\\s)","g"));K&&(F=M.replace(new RegExp(a.escapeRegExp(P[V]),"i"),function(Y){var X=P[G];return Y.toUpperCase()==Y?X=X.toUpperCase():Y.charAt(0).toUpperCase()==Y.charAt(0)&&(X=X.substr(0,0)+P[G].charAt(0).toUpperCase()+X.substr(1)),X}),this.insert(F),F="")}}},d.prototype.findLinkAt=function(u,p){var M,T,_=this.session.getLine(u),I=_.split(/((?:https?|ftp):\/\/[\S]+)/),D=p;D<0&&(D=0);var z=0,O=0,N;try{for(var F=E(I),B=F.next();!B.done;B=F.next()){var P=B.value;if(O=z+P.length,D>=z&&D<=O&&P.match(/((?:https?|ftp):\/\/[\S]+)/)){N=P.replace(/[\s:.,'";}\]]+$/,"");break}z=O}}catch(V){M={error:V}}finally{try{B&&!B.done&&(T=F.return)&&T.call(F)}finally{if(M)throw M.error}}return N},d.prototype.openLink=function(){var u=this.selection.getCursor(),p=this.findLinkAt(u.row,u.column);return p&&window.open(p,"_blank"),p!=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,p=this.session,M=u.getRange(),T=u.isBackwards();if(M.isEmpty()){var _=M.start.row;p.duplicateLines(_,_)}else{var I=T?M.start:M.end,D=p.insert(I,p.getTextRange(M));M.start=I,M.end=D,u.setSelectionRange(M,T)}},d.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},d.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},d.prototype.moveText=function(u,p,M){return this.session.moveText(u,p,M)},d.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},d.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},d.prototype.$moveLines=function(u,p){var M,T,_=this.selection;if(!_.inMultiSelectMode||this.inVirtualSelectionMode){var I=_.toOrientedRange();M=this.$getSelectedRows(I),T=this.session.$moveLines(M.first,M.last,p?0:u),p&&u==-1&&(T=0),I.moveBy(T,0),_.fromOrientedRange(I)}else{var D=_.rangeList.ranges;_.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var z=0,O=0,N=D.length,F=0;F<N;F++){var B=F;D[F].moveBy(z,0),M=this.$getSelectedRows(D[F]);for(var P=M.first,V=M.last;++F<N;){O&&D[F].moveBy(O,0);var G=this.$getSelectedRows(D[F]);if(p&&G.first!=V)break;if(!p&&G.first>V+1)break;V=G.last}for(F--,z=this.session.$moveLines(P,V,p?0:u),p&&u==-1&&(B=F+1);B<=F;)D[B].moveBy(z,0),B++;p||(z=0),O+=z}_.fromOrientedRange(_.ranges[0]),_.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,p){var M=this.renderer,T=this.renderer.layerConfig,_=u*Math.floor(T.height/T.lineHeight);p===!0?this.selection.$moveSelection(function(){this.moveCursorBy(_,0)}):p===!1&&(this.selection.moveCursorBy(_,0),this.selection.clearSelection());var I=M.scrollTop;M.scrollBy(0,_*T.lineHeight),p!=null&&M.scrollCursorIntoView(null,.5),M.animateScrolling(I)},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,p,M,T){this.renderer.scrollToLine(u,p,M,T)},d.prototype.centerSelection=function(){var u=this.getSelectionRange(),p={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(p,.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,p){this.selection.moveCursorTo(u,p)},d.prototype.moveCursorToPosition=function(u){this.selection.moveCursorToPosition(u)},d.prototype.jumpToMatching=function(u,p){var M=this.getCursorPosition(),T=new g(this.session,M.row,M.column),_=T.getCurrentToken(),I=0;_&&_.type.indexOf("tag-name")!==-1&&(_=T.stepBackward());var D=_||T.stepForward();if(D){var z,O=!1,N={},F=M.column-D.start,B,P={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(D.value.match(/[{}()\[\]]/g)){for(;F<D.value.length&&!O;F++)if(P[D.value[F]])switch(B=P[D.value[F]]+"."+D.type.replace("rparen","lparen"),isNaN(N[B])&&(N[B]=0),D.value[F]){case"(":case"[":case"{":N[B]++;break;case")":case"]":case"}":N[B]--,N[B]===-1&&(z="bracket",O=!0);break}}else D.type.indexOf("tag-name")!==-1&&(isNaN(N[D.value])&&(N[D.value]=0),_.value==="<"&&I>1?N[D.value]++:_.value==="</"&&N[D.value]--,N[D.value]===-1&&(z="tag",O=!0));O||(_=D,I++,D=T.stepForward(),F=0)}while(D&&!O);if(z){var V,G;if(z==="bracket")V=this.session.getBracketRange(M),V||(V=new s(T.getCurrentTokenRow(),T.getCurrentTokenColumn()+F-1,T.getCurrentTokenRow(),T.getCurrentTokenColumn()+F-1),G=V.start,(p||G.row===M.row&&Math.abs(G.column-M.column)<2)&&(V=this.session.getBracketRange(G)));else if(z==="tag"){if(!D||D.type.indexOf("tag-name")===-1)return;if(V=new s(T.getCurrentTokenRow(),T.getCurrentTokenColumn()-2,T.getCurrentTokenRow(),T.getCurrentTokenColumn()-2),V.compare(M.row,M.column)===0){var j=this.session.getMatchingTags(M);j&&(j.openTag.contains(M.row,M.column)?(V=j.closeTag,G=V.start):(V=j.openTag,j.closeTag.start.row===M.row&&j.closeTag.start.column===M.column?G=V.end:G=V.start))}G=G||V.start}G=V&&V.cursor||G,G&&(u?V&&p?this.selection.setRange(V):V&&V.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(G.row,G.column):this.selection.moveTo(G.row,G.column))}}},d.prototype.gotoLine=function(u,p,M){this.selection.clearSelection(),this.session.unfold({row:u-1,column:p||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(u-1,p||0),this.isRowFullyVisible(u-1)||this.scrollToLine(u-1,!0,M)},d.prototype.navigateTo=function(u,p){this.selection.moveTo(u,p)},d.prototype.navigateUp=function(u){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var p=this.selection.anchor.getPosition();return this.moveCursorToPosition(p)}this.selection.clearSelection(),this.selection.moveCursorBy(-u||-1,0)},d.prototype.navigateDown=function(u){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var p=this.selection.anchor.getPosition();return this.moveCursorToPosition(p)}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 p=this.getSelectionRange().start;this.moveCursorToPosition(p)}this.clearSelection()},d.prototype.navigateRight=function(u){if(this.selection.isEmpty())for(u=u||1;u--;)this.selection.moveCursorRight();else{var p=this.getSelectionRange().end;this.moveCursorToPosition(p)}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,p){p&&this.$search.set(p);var M=this.$search.find(this.session),T=0;return M&&(this.$tryReplace(M,u)&&(T=1),this.selection.setSelectionRange(M),this.renderer.scrollSelectionIntoView(M.start,M.end)),T},d.prototype.replaceAll=function(u,p){p&&this.$search.set(p);var M=this.$search.findAll(this.session),T=0;if(!M.length)return T;var _=this.getSelectionRange();this.selection.moveTo(0,0);for(var I=M.length-1;I>=0;--I)this.$tryReplace(M[I],u)&&T++;return this.selection.setSelectionRange(_),T},d.prototype.$tryReplace=function(u,p){var M=this.session.getTextRange(u);return p=this.$search.replace(M,p),p!==null?(u.end=this.session.replace(u,p),u):null},d.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},d.prototype.find=function(u,p,M){p||(p={}),typeof u=="string"||u instanceof RegExp?p.needle=u:typeof u=="object"&&A.mixin(p,u);var T=this.selection.getRange();p.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(p),p.start||this.$search.set({start:T});var _=this.$search.find(this.session);if(p.preventScroll)return _;if(_)return this.revealRange(_,M),_;p.backwards?T.start=T.end:T.end=T.start,this.selection.setRange(T)},d.prototype.findNext=function(u,p){this.find({skipCurrent:!0,backwards:!1},u,p)},d.prototype.findPrevious=function(u,p){this.find(u,{skipCurrent:!0,backwards:!0},p)},d.prototype.revealRange=function(u,p){this.session.unfold(u),this.selection.setSelectionRange(u);var M=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(u.start,u.end,.5),p!==!1&&this.renderer.animateScrolling(M)},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 p,M=this,T=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var _=this.$scrollAnchor;_.style.cssText="position:absolute",this.container.insertBefore(_,this.container.firstChild);var I=this.on("changeSelection",function(){T=!0}),D=this.renderer.on("beforeRender",function(){T&&(p=M.renderer.container.getBoundingClientRect())}),z=this.renderer.on("afterRender",function(){if(T&&p&&(M.isFocused()||M.searchBox&&M.searchBox.isFocused())){var O=M.renderer,N=O.$cursorLayer.$pixelPos,F=O.layerConfig,B=N.top-F.offset;N.top>=0&&B+p.top<0?T=!0:N.top<F.height&&N.top+p.top+F.lineHeight>window.innerHeight?T=!1:T=null,T!=null&&(_.style.top=B+"px",_.style.left=N.left+"px",_.style.height=F.lineHeight+"px",_.scrollIntoView(T)),T=p=null}});this.setAutoScrollEditorIntoView=function(O){O||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",I),this.renderer.off("afterRender",z),this.renderer.off("beforeRender",D))}}},d.prototype.$resetCursorStyle=function(){var u=this.$cursorStyle||"ace",p=this.renderer.$cursorLayer;p&&(p.setSmoothBlinking(/smooth/.test(u)),p.isBlinking=!this.$readOnly&&u!="wide",$.setCssClass(p.element,"ace_slim-cursors",/slim/.test(u)))},d.prototype.prompt=function(u,p,M){var T=this;m.loadModule("ace/ext/prompt",function(_){_.prompt(T,u,p,M)})},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})();w.$uid=0,w.prototype.curOp=null,w.prototype.prevOp={},w.prototype.$mergeableCommands=["backspace","del","insertstring"],w.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"],["&&","||"],["==","!="]],A.implement(w.prototype,c),m.defineOptions(w.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(M){var T=!1;if(M&&M.type=="keydown"){if(M&&M.key&&!M.ctrlKey&&!M.metaKey&&(M.key==" "&&M.preventDefault(),T=M.key.length==1),!T)return}else M&&M.type!=="exec"&&(T=!0);if(T){var _=$.createElement("div");_.textContent=b("editor.tooltip.disable-editing","Editing is disabled"),u.hoverTooltip.isOpen||u.hoverTooltip.showForRange(u,u.getSelectionRange(),_)}else u.hoverTooltip&&u.hoverTooltip.isOpen&&u.hoverTooltip.hide()});var p=this.textInput.getElement();d?(S.addListener(p,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(S.removeListener(p,"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),$.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),$.addCssClass(this.container,"ace_hasPlaceholder");var p=$.createElement("div");p.className="ace_placeholder",p.textContent=this.$placeholder||"",this.renderer.placeholderNode=p,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},p=function(T){if(T.target==this.renderer.scroller&&T.keyCode===C.enter){T.preventDefault();var _=this.getCursorPosition().row;this.isRowVisible(_)||this.scrollToLine(_,!0,!0),this.focus()}},M;d?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(l.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",b("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",b("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",p.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",b("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",b("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),M||(M=new f(this)),M.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",p.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),M&&M.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?"·":""))+""},getWidth:function(d,u,p){return Math.max(u.toString().length,(p.lastRow+1).toString().length,2)*p.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)}};x.Editor=w}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(k,x,H){var E=k("../lib/dom"),A=(function(){function $(a,l){this.element=a,this.canvasHeight=l||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return $.prototype.moveContainer=function(a){E.translate(this.element,0,-(a.firstRowScreen*a.lineHeight%this.canvasHeight)-a.offset*this.$offsetCoefficient)},$.prototype.pageChanged=function(a,l){return Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)!==Math.floor(l.firstRowScreen*l.lineHeight/this.canvasHeight)},$.prototype.computeLineTop=function(a,l,r){var o=l.firstRowScreen*l.lineHeight,n=Math.floor(o/this.canvasHeight),t=r.documentToScreenRow(a,0)*l.lineHeight;return t-n*this.canvasHeight},$.prototype.computeLineHeight=function(a,l,r){return l.lineHeight*r.getRowLineCount(a)},$.prototype.getLength=function(){return this.cells.length},$.prototype.get=function(a){return this.cells[a]},$.prototype.shift=function(){this.$cacheCell(this.cells.shift())},$.prototype.pop=function(){this.$cacheCell(this.cells.pop())},$.prototype.push=function(a){if(Array.isArray(a)){this.cells.push.apply(this.cells,a);for(var l=E.createFragment(this.element),r=0;r<a.length;r++)l.appendChild(a[r].element);this.element.appendChild(l)}else this.cells.push(a),this.element.appendChild(a.element)},$.prototype.unshift=function(a){if(Array.isArray(a)){this.cells.unshift.apply(this.cells,a);for(var l=E.createFragment(this.element),r=0;r<a.length;r++)l.appendChild(a[r].element);this.element.firstChild?this.element.insertBefore(l,this.element.firstChild):this.element.appendChild(l)}else this.cells.unshift(a),this.element.insertAdjacentElement("afterbegin",a.element)},$.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},$.prototype.$cacheCell=function(a){a&&(a.element.remove(),this.cellCache.push(a))},$.prototype.createCell=function(a,l,r,o){var n=this.cellCache.pop();if(!n){var t=E.createElement("div");o&&o(t),this.element.appendChild(t),n={element:t,text:"",row:a}}return n.row=a,n},$})();x.Lines=A}),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(k,x,H){var E=k("../lib/dom"),A=k("../lib/oop"),$=k("../lib/lang"),a=k("../lib/event_emitter").EventEmitter,l=k("./lines").Lines,r=k("../config").nls,o=(function(){function t(e){this.$showCursorMarker=null,this.element=E.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 l(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,i){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,i)},t.prototype.removeGutterDecoration=function(e,i){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,i)},t.prototype.setAnnotations=function(e){this.$annotations=[];for(var i=0;i<e.length;i++){var s=e[i],c=s.row,h=this.$annotations[c];h||(h=this.$annotations[c]={text:[],type:[],displayText:[]});var y=s.text,m=s.text,g=s.type;y=y?$.escapeHTML(y):s.html||"",m=m||s.html||"",h.text.indexOf(y)===-1&&(h.text.push(y),h.type.push(g),h.displayText.push(m));var f=s.className;f?h.className=f:g==="error"?h.className=" ace_error":g==="security"&&!/\bace_error\b/.test(h.className)?h.className=" ace_security":g==="warning"&&!/\bace_(error|security)\b/.test(h.className)?h.className=" ace_warning":g==="info"&&!h.className?h.className=" ace_info":g==="hint"&&!h.className&&(h.className=" ace_hint")}},t.prototype.$updateAnnotations=function(e){if(this.$annotations.length){var i=e.start.row,s=e.end.row-i;if(s!==0)if(e.action=="remove")this.$annotations.splice(i,s+1,null);else{var c=new Array(s+1);c.unshift(i,1),this.$annotations.splice.apply(this.$annotations,c)}}},t.prototype.update=function(e){this.config=e;var i=this.session,s=e.firstRow,c=Math.min(e.lastRow+e.gutterOffset,i.getLength()-1);this.oldLastRow=c,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var h=i.getNextFoldLine(s),y=h?h.start.row:1/0,m=null,g=-1,f=s;;){if(f>y&&(f=h.end.row+1,h=i.getNextFoldLine(f,h),y=h?h.start.row:1/0),f>c){for(;this.$lines.getLength()>g+1;)this.$lines.pop();break}m=this.$lines.get(++g),m?m.row=f:(m=this.$lines.createCell(f,e,this.session,n),this.$lines.push(m)),this.$renderCell(m,e,h,f),f++}this._signal("afterRender"),this.$updateGutterWidth(e),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},t.prototype.$updateGutterWidth=function(e){var i=this.session,s=i.gutterRenderer||this.$renderer,c=i.$firstLineNumber,h=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||i.$useWrapMode)&&(h=i.getLength()+c-1);var y=s?s.getWidth(i,h,e):h.toString().length*e.characterWidth,m=this.$padding||this.$computePadding();y+=m.left+m.right,y!==this.gutterWidth&&!isNaN(y)&&(this.gutterWidth=y,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",y))},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 i=this.$lines.cells;this.$cursorCell=null;for(var s=0;s<i.length;s++){var c=i[s];if(c.row>=this.$cursorRow){if(c.row>this.$cursorRow){var h=this.session.getFoldLine(this.$cursorRow);if(s>0&&h&&h.start.row==i[s-1].row)c=i[s-1];else break}c.element.className="ace_gutter-active-line "+c.element.className,this.$cursorCell=c;break}}}}},t.prototype.$updateCursorMarker=function(){if(this.session){var e=this.session;this.$highlightElement||(this.$highlightElement=E.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var i=e.selection.cursor,s=this.config,c=this.$lines,h=s.firstRowScreen*s.lineHeight,y=Math.floor(h/c.canvasHeight),m=e.documentToScreenRow(i)*s.lineHeight,g=m-y*c.canvasHeight;E.setStyle(this.$highlightElement.style,"height",s.lineHeight+"px"),E.setStyle(this.$highlightElement.style,"top",g+"px")}},t.prototype.scrollLines=function(e){var i=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(i,e))return this.update(e);this.$lines.moveContainer(e);var s=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),c=this.oldLastRow;if(this.oldLastRow=s,!i||c<e.firstRow)return this.update(e);if(s<i.firstRow)return this.update(e);if(i.firstRow<e.firstRow)for(var h=this.session.getFoldedRowCount(i.firstRow,e.firstRow-1);h>0;h--)this.$lines.shift();if(c>s)for(var h=this.session.getFoldedRowCount(s+1,c);h>0;h--)this.$lines.pop();e.firstRow<i.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,i.firstRow-1)),s>c&&this.$lines.push(this.$renderLines(e,c+1,s)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},t.prototype.$renderLines=function(e,i,s){for(var c=[],h=i,y=this.session.getNextFoldLine(h),m=y?y.start.row:1/0;h>m&&(h=y.end.row+1,y=this.session.getNextFoldLine(h,y),m=y?y.start.row:1/0),!(h>s);){var g=this.$lines.createCell(h,e,this.session,n);this.$renderCell(g,e,y,h),c.push(g),h++}return c},t.prototype.$renderCell=function(e,i,s,c){var h=e.element,y=this.session,m=h.childNodes[0],g=h.childNodes[1],f=h.childNodes[2],b=h.childNodes[3],L=f.firstChild,C=y.$firstLineNumber,S=y.$breakpoints,R=y.$decorations,w=y.gutterRenderer||this.$renderer,v=this.$showFoldWidgets&&y.foldWidgets,d=s?s.start.row:Number.MAX_VALUE,u=i.lineHeight+"px",p=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",M=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",T=(w?w.getText(y,c):c+C).toString();if(this.$highlightGutterLine&&(c==this.$cursorRow||s&&c<this.$cursorRow&&c>=d&&this.$cursorRow<=s.end.row)&&(p+="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)),S[c]&&(p+=S[c]),R[c]&&(p+=R[c]),this.$annotations[c]&&c!==d&&(p+=this.$annotations[c].className),v){var _=v[c];_==null&&(_=v[c]=y.getFoldWidget(c))}if(_){var I="ace_fold-widget ace_"+_,D=_=="start"&&c==d&&c<s.end.row;if(D){I+=" ace_closed";for(var z="",O=!1,N=c+1;N<=s.end.row;N++)if(this.$annotations[N]){if(this.$annotations[N].className===" ace_error"){O=!0,z=" ace_error_fold";break}this.$annotations[N].className===" ace_security"?(O=!0,z=" ace_security_fold"):this.$annotations[N].className===" ace_warning"&&z!==" ace_security_fold"&&(O=!0,z=" ace_warning_fold")}p+=z}else I+=" ace_open";g.className!=I&&(g.className=I),E.setStyle(g.style,"height",u),E.setStyle(g.style,"display","inline-block"),g.setAttribute("role","button"),g.setAttribute("tabindex","-1");var F=y.getFoldWidgetRange(c);F?g.setAttribute("aria-label",r("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[F.start.row+1,F.end.row+1])):s?g.setAttribute("aria-label",r("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[s.start.row+1,s.end.row+1])):g.setAttribute("aria-label",r("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[c+1])),D?(g.setAttribute("aria-expanded","false"),g.setAttribute("title",r("gutter.code-folding.closed.title","Unfold code"))):(g.setAttribute("aria-expanded","true"),g.setAttribute("title",r("gutter.code-folding.open.title","Fold code")))}else g&&(E.setStyle(g.style,"display","none"),g.setAttribute("tabindex","0"),g.removeAttribute("role"),g.removeAttribute("aria-label"));var B=this.session.$gutterCustomWidgets[c];if(B?this.$addCustomWidget(c,B,e):b&&this.$removeCustomWidget(c,e),O&&this.$showFoldedAnnotations){f.className="ace_gutter_annotation",L.className=M,L.className+=z,E.setStyle(L.style,"height",u),E.setStyle(f.style,"display","block"),E.setStyle(f.style,"height",u);var P;switch(z){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}f.setAttribute("aria-label",P),f.setAttribute("tabindex","-1"),f.setAttribute("role","button")}else if(this.$annotations[c]){f.className="ace_gutter_annotation",L.className=M,this.$useSvgGutterIcons?L.className+=this.$annotations[c].className:h.classList.add(this.$annotations[c].className.replace(" ","")),E.setStyle(L.style,"height",u),E.setStyle(f.style,"display","block"),E.setStyle(f.style,"height",u);var P;switch(this.$annotations[c].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}f.setAttribute("aria-label",P),f.setAttribute("tabindex","-1"),f.setAttribute("role","button")}else E.setStyle(f.style,"display","none"),f.removeAttribute("aria-label"),f.removeAttribute("role"),f.setAttribute("tabindex","0");return T!==m.data&&(m.data=T),h.className!=p&&(h.className=p),E.setStyle(e.element.style,"height",this.$lines.computeLineHeight(c,i,y)+"px"),E.setStyle(e.element.style,"top",this.$lines.computeLineTop(c,i,y)+"px"),e.text=T,f.style.display==="none"&&g.style.display==="none"&&!B?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?E.addCssClass(this.element,"ace_folding-enabled"):E.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},t.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},t.prototype.$hideFoldWidget=function(e,i){var s=i||this.$getGutterCell(e);if(s&&s.element){var c=s.element.childNodes[1];c&&E.setStyle(c.style,"display","none")}},t.prototype.$showFoldWidget=function(e,i){var s=i||this.$getGutterCell(e);if(s&&s.element){var c=s.element.childNodes[1];c&&this.session.foldWidgets&&this.session.foldWidgets[s.row]&&E.setStyle(c.style,"display","inline-block")}},t.prototype.$getGutterCell=function(e){var i=this.$lines.cells,s=0,c=i.length-1;if(!(e<i[0].row||e>i[c].row)){for(;s<=c;){var h=Math.floor((s+c)/2),y=i[h];if(y.row>e)c=h-1;else if(y.row<e)s=h+1;else return y}return y}},t.prototype.$addCustomWidget=function(e,i,s){var c=i.className,h=i.label,y=i.title,m=i.callbacks;this.session.$gutterCustomWidgets[e]={className:c,label:h,title:y,callbacks:m},this.$hideFoldWidget(e,s);var g=s||this.$getGutterCell(e);if(g&&g.element){var f=g.element.querySelector(".ace_custom-widget");f&&f.remove(),f=E.createElement("span"),f.className="ace_custom-widget ".concat(c),f.setAttribute("tabindex","-1"),f.setAttribute("role","button"),f.setAttribute("aria-label",h),f.setAttribute("title",y),E.setStyle(f.style,"display","inline-block"),E.setStyle(f.style,"height","inherit"),m&&m.onClick&&f.addEventListener("click",function(b){m.onClick(b,e),b.stopPropagation()}),g.element.appendChild(f)}},t.prototype.$removeCustomWidget=function(e,i){delete this.session.$gutterCustomWidgets[e],this.$showFoldWidget(e,i);var s=i||this.$getGutterCell(e);if(s&&s.element){var c=s.element.querySelector(".ace_custom-widget");c&&s.element.removeChild(c)}},t.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=E.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 i=this.$padding||this.$computePadding(),s=this.element.getBoundingClientRect();if(e.x<i.left+s.left)return"markers";if(this.$showFoldWidgets&&e.x>s.right-i.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,A.implement(o.prototype,a);function n(t){var e=document.createTextNode("");t.appendChild(e);var i=E.createElement("span");t.appendChild(i);var s=E.createElement("span");t.appendChild(s);var c=E.createElement("span");return s.appendChild(c),t}x.Gutter=o}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(k,x,H){var E=k("../range").Range,A=k("../lib/dom"),$=(function(){function l(r){this.element=A.createElement("div"),this.element.className="ace_layer ace_marker-layer",r.appendChild(this.element)}return l.prototype.setPadding=function(r){this.$padding=r},l.prototype.setSession=function(r){this.session=r},l.prototype.setMarkers=function(r){this.markers=r},l.prototype.elt=function(r,o){var n=this.i!=-1&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=o,n.className=r},l.prototype.update=function(r){if(r){this.config=r,this.i=0;var o;for(var n in this.markers){var t=this.markers[n];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 i=this.$getTop(e.start.row,r),s=this.$padding+e.start.column*r.characterWidth;t.renderer(o,e,s,i,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)}},l.prototype.$getTop=function(r,o){return(r-o.firstRowScreen)*o.lineHeight},l.prototype.drawTextMarker=function(r,o,n,t,e){for(var i=this.session,s=o.start.row,c=o.end.row,h=s,y=0,m=0,g=i.getScreenLastRowColumn(h),f=new E(h,o.start.column,h,m);h<=c;h++)f.start.row=f.end.row=h,f.start.column=h==s?o.start.column:i.getRowWrapIndent(h),f.end.column=g,y=m,m=g,g=h+1<c?i.getScreenLastRowColumn(h+1):h==c?0:o.end.column,this.drawSingleLineMarker(r,f,n+(h==s?" ace_start":"")+" ace_br"+a(h==s||h==s+1&&o.start.column,y<m,m>g,h==c),t,h==c?0:1,e)},l.prototype.drawMultiLineMarker=function(r,o,n,t,e){var i=this.$padding,s=t.lineHeight,c=this.$getTop(o.start.row,t),h=i+o.start.column*t.characterWidth;if(e=e||"",this.session.$bidiHandler.isBidiRow(o.start.row)){var y=o.clone();y.end.row=y.start.row,y.end.column=this.session.getLine(y.start.row).length,this.drawBidiSingleLineMarker(r,y,n+" ace_br1 ace_start",t,null,e)}else this.elt(n+" ace_br1 ace_start","height:"+s+"px;right:"+i+"px;top:"+c+"px;left:"+h+"px;"+(e||""));if(this.session.$bidiHandler.isBidiRow(o.end.row)){var y=o.clone();y.start.row=y.end.row,y.start.column=0,this.drawBidiSingleLineMarker(r,y,n+" ace_br12",t,null,e)}else{c=this.$getTop(o.end.row,t);var m=o.end.column*t.characterWidth;this.elt(n+" ace_br12","height:"+s+"px;width:"+m+"px;top:"+c+"px;left:"+i+"px;"+(e||""))}if(s=(o.end.row-o.start.row-1)*t.lineHeight,!(s<=0)){c=this.$getTop(o.start.row+1,t);var g=(o.start.column?1:0)|(o.end.column?0:8);this.elt(n+(g?" ace_br"+g:""),"height:"+s+"px;right:"+i+"px;top:"+c+"px;left:"+i+"px;"+(e||""))}},l.prototype.drawSingleLineMarker=function(r,o,n,t,e,i){if(this.session.$bidiHandler.isBidiRow(o.start.row))return this.drawBidiSingleLineMarker(r,o,n,t,e,i);var s=t.lineHeight,c=(o.end.column+(e||0)-o.start.column)*t.characterWidth,h=this.$getTop(o.start.row,t),y=this.$padding+o.start.column*t.characterWidth;this.elt(n,"height:"+s+"px;width:"+c+"px;top:"+h+"px;left:"+y+"px;"+(i||""))},l.prototype.drawBidiSingleLineMarker=function(r,o,n,t,e,i){var s=t.lineHeight,c=this.$getTop(o.start.row,t),h=this.$padding,y=this.session.$bidiHandler.getSelections(o.start.column,o.end.column);y.forEach(function(m){this.elt(n,"height:"+s+"px;width:"+(m.width+(e||0))+"px;top:"+c+"px;left:"+(h+m.left)+"px;"+(i||""))},this)},l.prototype.drawFullLineMarker=function(r,o,n,t,e){var i=this.$getTop(o.start.row,t),s=t.lineHeight;o.start.row!=o.end.row&&(s+=this.$getTop(o.end.row,t)-i),this.elt(n,"height:"+s+"px;top:"+i+"px;left:0;right:0;"+(e||""))},l.prototype.drawScreenLineMarker=function(r,o,n,t,e){var i=this.$getTop(o.start.row,t),s=t.lineHeight;this.elt(n,"height:"+s+"px;top:"+i+"px;left:0;right:0;"+(e||""))},l})();$.prototype.$padding=0;function a(l,r,o,n){return(l?1:0)|(r?2:0)|(o?4:0)|(n?8:0)}x.Marker=$}),ace.define("ace/layer/text_util",["require","exports","module"],function(k,x,H){var E=new Set(["text","rparen","lparen"]);x.isTextToken=function(A){return E.has(A)}}),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(k,x,H){var E=k("../lib/oop"),A=k("../lib/dom"),$=k("../lib/lang"),a=k("./lines").Lines,l=k("../lib/event_emitter").EventEmitter,r=k("../config").nls,o=k("./text_util").isTextToken,n=(function(){function t(e){this.dom=A,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 a(this.element)}return t.prototype.$updateEolChar=function(){var e=this.session.doc,i=e.getNewLineCharacter()==`
|
|
210
210
|
`&&e.getNewLineMode()!="windows",s=i?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=s)return this.EOL_CHAR=s,!0},t.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},t.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},t.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},t.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",(function(i){this._signal("changeCharacterSize",i)}).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 i=this.$tabStrings=[0],s=1;s<e+1;s++)if(this.showTabs){var c=this.dom.createElement("span");c.className="ace_invisible ace_invisible_tab",c.textContent=$.stringRepeat(this.TAB_CHAR,s),i.push(c)}else i.push(this.dom.createTextNode($.stringRepeat(" ",s),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var h="ace_indent-guide",y=this.showSpaces?" ace_invisible ace_invisible_space":"",m=this.showSpaces?$.stringRepeat(this.SPACE_CHAR,this.tabSize):$.stringRepeat(" ",this.tabSize),g=this.showTabs?" ace_invisible ace_invisible_tab":"",f=this.showTabs?$.stringRepeat(this.TAB_CHAR,this.tabSize):m,c=this.dom.createElement("span");c.className=h+y,c.textContent=m,this.$tabStrings[" "]=c;var c=this.dom.createElement("span");c.className=h+g,c.textContent=f,this.$tabStrings[" "]=c}},t.prototype.updateLines=function(e,i,s){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var c=Math.max(i,e.firstRow),h=Math.min(s,e.lastRow),y=this.element.childNodes,m=0,f=e.firstRow;f<c;f++){var b=this.session.getFoldLine(f);if(b)if(b.containsRow(c)){c=b.start.row;break}else f=b.end.row;m++}for(var g=!1,f=c,b=this.session.getNextFoldLine(f),L=b?b.start.row:1/0;f>L&&(f=b.end.row+1,b=this.session.getNextFoldLine(f,b),L=b?b.start.row:1/0),!(f>h);){var C=y[m++];if(C){this.dom.removeChildren(C),this.$renderLine(C,f,f==L?b:!1),g&&(C.style.top=this.$lines.computeLineTop(f,e,this.session)+"px");var S=e.lineHeight*this.session.getRowLength(f)+"px";C.style.height!=S&&(g=!0,C.style.height=S)}f++}if(g)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 i=this.config;if(this.config=e,this.$lines.pageChanged(i,e))return this.update(e);this.$lines.moveContainer(e);var s=e.lastRow,c=i?i.lastRow:-1;if(!i||c<e.firstRow)return this.update(e);if(s<i.firstRow)return this.update(e);if(!i||i.lastRow<e.firstRow)return this.update(e);if(e.lastRow<i.firstRow)return this.update(e);if(i.firstRow<e.firstRow)for(var h=this.session.getFoldedRowCount(i.firstRow,e.firstRow-1);h>0;h--)this.$lines.shift();if(i.lastRow>e.lastRow)for(var h=this.session.getFoldedRowCount(e.lastRow+1,i.lastRow);h>0;h--)this.$lines.pop();e.firstRow<i.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,i.firstRow-1)),e.lastRow>i.lastRow&&this.$lines.push(this.$renderLinesFragment(e,i.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},t.prototype.$renderLinesFragment=function(e,i,s){for(var c=[],h=i,y=this.session.getNextFoldLine(h),m=y?y.start.row:1/0;h>m&&(h=y.end.row+1,y=this.session.getNextFoldLine(h,y),m=y?y.start.row:1/0),!(h>s);){var g=this.$lines.createCell(h,e,this.session),f=g.element;this.dom.removeChildren(f),A.setStyle(f.style,"height",this.$lines.computeLineHeight(h,e,this.session)+"px"),A.setStyle(f.style,"top",this.$lines.computeLineTop(h,e,this.session)+"px"),this.$renderLine(f,h,h==m?y:!1),this.$useLineGroups()?f.className="ace_line_group":f.className="ace_line",c.push(g),h++}return c},t.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var i=e.firstRow,s=e.lastRow,c=this.$lines;c.getLength();)c.pop();c.push(this.$renderLinesFragment(e,i,s))},t.prototype.$renderToken=function(e,i,s,c){for(var h=this,y=/(\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),g,f=0;g=y.exec(c);){var b=g[1],L=g[2],C=g[3],S=g[4],R=g[5];if(!(!h.showSpaces&&L)){var w=f!=g.index?c.slice(f,g.index):"";if(f=g.index+g[0].length,w&&m.appendChild(this.dom.createTextNode(w,this.element)),b){var v=h.session.getScreenTabSize(i+g.index),d=h.$tabStrings[v].cloneNode(!0);d.charCount=1,m.appendChild(d),i+=v-1}else if(L)if(h.showSpaces){var u=this.dom.createElement("span");u.className="ace_invisible ace_invisible_space",u.textContent=$.stringRepeat(h.SPACE_CHAR,L.length),m.appendChild(u)}else m.appendChild(this.dom.createTextNode(L,this.element));else if(C){var u=this.dom.createElement("span");u.className="ace_invisible ace_invisible_space ace_invalid",u.textContent=$.stringRepeat(h.SPACE_CHAR,C.length),m.appendChild(u)}else if(S){i+=1;var u=this.dom.createElement("span");u.style.width=h.config.characterWidth*2+"px",u.className=h.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",u.textContent=h.showSpaces?h.SPACE_CHAR:S,m.appendChild(u)}else if(R){i+=1;var u=this.dom.createElement("span");u.style.width=h.config.characterWidth*2+"px",u.className="ace_cjk",u.textContent=R,m.appendChild(u)}}}if(m.appendChild(this.dom.createTextNode(f?c.slice(f):c,this.element)),o(s.type))e.appendChild(m);else{var p="ace_"+s.type.replace(/\./g," ace_"),u=this.dom.createElement("span");s.type=="fold"&&(u.style.width=s.value.length*this.config.characterWidth+"px",u.setAttribute("title",r("inline-fold.closed.title","Unfold code"))),u.className=p,u.appendChild(m),e.appendChild(u)}return i+c.length},t.prototype.renderIndentGuide=function(e,i,s){var c=i.search(this.$indentGuideRe);if(c<=0||c>=s)return i;if(i[0]==" "){c-=c%this.tabSize;for(var h=c/this.tabSize,y=0;y<h;y++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),i.substr(c)}else if(i[0]==" "){for(var y=0;y<c;y++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),i.substr(c)}return this.$highlightIndentGuide(),i},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 i=this.session.selection.getCursor(),s=/^\s*/.exec(this.session.doc.getLine(i.row))[0].length,c=Math.floor(s/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:c,start:i.row};var h=this.session.$bracketHighlight;if(h){for(var y=this.session.$bracketHighlight.ranges,m=0;m<y.length;m++)if(i.row!==y[m].start.row){this.$highlightIndentGuideMarker.end=y[m].start.row+1,i.row>y[m].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&e[i.row]!==""&&i.column===e[i.row].length){this.$highlightIndentGuideMarker.dir=1;for(var m=i.row+1;m<e.length;m++){var g=e[m],f=/^\s*/.exec(g)[0].length;if(g!==""&&(this.$highlightIndentGuideMarker.end=m,f<=s))break}}this.$renderHighlightIndentGuide()}}},t.prototype.$clearActiveIndentGuide=function(){for(var e=this.element.querySelectorAll(".ace_indent-guide-active"),i=0;i<e.length;i++)e[i].classList.remove("ace_indent-guide-active")},t.prototype.$setIndentGuideActive=function(e,i){var s=this.session.doc.getLine(e.row);if(s!==""){var c=e.element;if(e.element.classList&&e.element.classList.contains("ace_line_group"))if(e.element.childNodes.length>0)c=e.element.childNodes[0];else return;var h=c.childNodes;if(h){var y=h[i-1];y&&y.classList&&y.classList.contains("ace_indent-guide")&&y.classList.add("ace_indent-guide-active")}}},t.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var i=this.$highlightIndentGuideMarker.indentLevel;if(i!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var s=0;s<e.length;s++){var c=e[s];if(this.$highlightIndentGuideMarker.end&&c.row>=this.$highlightIndentGuideMarker.start+1){if(c.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(c,i)}}else for(var s=e.length-1;s>=0;s--){var c=e[s];if(this.$highlightIndentGuideMarker.end&&c.row<this.$highlightIndentGuideMarker.start){if(c.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(c,i)}}}},t.prototype.$createLineElement=function(e){var i=this.dom.createElement("div");return i.className="ace_line",i.style.height=this.config.lineHeight+"px",i},t.prototype.$renderWrappedLine=function(e,i,s){var c=0,h=0,y=s[0],m=0,g=this.$createLineElement();e.appendChild(g);for(var f=0;f<i.length;f++){var b=i[f],L=b.value;if(f==0&&this.displayIndentGuides){if(c=L.length,L=this.renderIndentGuide(g,L,y),!L)continue;c-=L.length}if(c+L.length<y)m=this.$renderToken(g,m,b,L),c+=L.length;else{for(;c+L.length>=y;){m=this.$renderToken(g,m,b,L.substring(0,y-c)),L=L.substring(y-c),c=y,g=this.$createLineElement(),e.appendChild(g);var C=this.dom.createTextNode($.stringRepeat(" ",s.indent),this.element);C.charCount=0,g.appendChild(C),h++,m=0,y=s[h]||Number.MAX_VALUE}L.length!=0&&(c+=L.length,m=this.$renderToken(g,m,b,L))}}s[s.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(g,m,null,"",!0)},t.prototype.$renderSimpleLine=function(e,i){for(var s=0,c=0;c<i.length;c++){var h=i[c],y=h.value;if(!(c==0&&this.displayIndentGuides&&(y=this.renderIndentGuide(e,y),!y))){if(s+y.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,s,h,y);s=this.$renderToken(e,s,h,y)}}},t.prototype.$renderOverflowMessage=function(e,i,s,c,h){s&&this.$renderToken(e,i,s,c.slice(0,this.MAX_LINE_LENGTH-i));var y=this.dom.createElement("span");y.className="ace_inline_button ace_keyword ace_toggle_wrap",y.textContent=h?"<hide>":"<click to see more...>",e.appendChild(y)},t.prototype.$renderLine=function(e,i,s){if(!s&&s!=!1&&(s=this.session.getFoldLine(i)),s)var c=this.$getFoldLineTokens(i,s);else var c=this.session.getTokens(i);var h=e;if(c.length){var y=this.session.getRowSplitData(i);if(y&&y.length){this.$renderWrappedLine(e,c,y);var h=e.lastChild}else{var h=e;this.$useLineGroups()&&(h=this.$createLineElement(),e.appendChild(h)),this.$renderSimpleLine(h,c)}}else this.$useLineGroups()&&(h=this.$createLineElement(),e.appendChild(h));if(this.showEOL&&h){s&&(i=s.end.row);var m=this.dom.createElement("span");m.className="ace_invisible ace_invisible_eol",m.textContent=i==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,h.appendChild(m)}},t.prototype.$getFoldLineTokens=function(e,i){var s=this.session,c=[];function h(m,g,f){for(var b=0,L=0;L+m[b].value.length<g;)if(L+=m[b].value.length,b++,b==m.length)return;if(L!=g){var C=m[b].value.substring(g-L);C.length>f-g&&(C=C.substring(0,f-g)),c.push({type:m[b].type,value:C}),L=g+C.length,b+=1}for(;L<f&&b<m.length;){var C=m[b].value;C.length+L>f?c.push({type:m[b].type,value:C.substring(0,f-L)}):c.push(m[b]),L+=C.length,b+=1}}var y=s.getTokens(e);return i.walk(function(m,g,f,b,L){m!=null?c.push({type:"fold",value:m}):(L&&(y=s.getTokens(g)),y.length&&h(y,b,f))},i.end.row,this.session.getLine(i.end.row).length),c},t.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},t})();n.prototype.EOF_CHAR="¶",n.prototype.EOL_CHAR_LF="¬",n.prototype.EOL_CHAR_CRLF="¤",n.prototype.EOL_CHAR=n.prototype.EOL_CHAR_LF,n.prototype.TAB_CHAR="—",n.prototype.SPACE_CHAR="·",n.prototype.$padding=0,n.prototype.MAX_LINE_LENGTH=1e4,n.prototype.showInvisibles=!1,n.prototype.showSpaces=!1,n.prototype.showTabs=!1,n.prototype.showEOL=!1,n.prototype.displayIndentGuides=!0,n.prototype.$highlightIndentGuides=!0,n.prototype.$tabStrings=[],n.prototype.destroy={},n.prototype.onChangeTabSize=n.prototype.$computeTabString,E.implement(n.prototype,l),x.Text=n}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(k,x,H){var E=k("../lib/dom"),A=(function(){function $(a){this.element=E.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),E.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return $.prototype.$updateOpacity=function(a){for(var l=this.cursors,r=l.length;r--;)E.setStyle(l[r].style,"opacity",a?"":"0")},$.prototype.$startCssAnimation=function(){for(var a=this.cursors,l=a.length;l--;)a[l].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&E.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},$.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,E.removeCssClass(this.element,"ace_animate-blinking")},$.prototype.setPadding=function(a){this.$padding=a},$.prototype.setSession=function(a){this.session=a},$.prototype.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},$.prototype.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},$.prototype.setSmoothBlinking=function(a){a!=this.smoothBlinking&&(this.smoothBlinking=a,E.setCssClass(this.element,"ace_smooth-blinking",a),this.$updateCursors(!0),this.restartTimer())},$.prototype.addCursor=function(){var a=E.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},$.prototype.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},$.prototype.hideCursor=function(){this.isVisible=!1,E.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},$.prototype.showCursor=function(){this.isVisible=!0,E.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},$.prototype.restartTimer=function(){var a=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,E.removeCssClass(this.element,"ace_smooth-blinking")),a(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&E.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),E.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var l=(function(){this.timeoutId=setTimeout(function(){a(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){a(!0),l()},this.blinkInterval),l()}},$.prototype.getPixelPosition=function(a,l){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var r=this.session.documentToScreenPosition(a),o=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,a.row)?this.session.$bidiHandler.getPosLeft(r.column):r.column*this.config.characterWidth),n=(r.row-(l?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:o,top:n}},$.prototype.isCursorInView=function(a,l){return a.top>=0&&a.top<l.maxHeight},$.prototype.update=function(a){this.config=a;var l=this.session.$selectionMarkers,r=0,o=0;(l===void 0||l.length===0)&&(l=[{cursor:null}]);for(var r=0,n=l.length;r<n;r++){var t=this.getPixelPosition(l[r].cursor,!0);if(!((t.top>a.height+a.offset||t.top<0)&&r>1)){var e=this.cursors[o++]||this.addCursor(),i=e.style;this.drawCursor?this.drawCursor(e,t,a,l[r],this.session):this.isCursorInView(t,a)?(E.setStyle(i,"display","block"),E.translate(e,t.left,t.top),E.setStyle(i,"width",Math.round(a.characterWidth)+"px"),E.setStyle(i,"height",a.lineHeight+"px")):E.setStyle(i,"display","none")}}for(;this.cursors.length>o;)this.removeCursor();var s=this.session.getOverwrite();this.$setOverwrite(s),this.$pixelPos=t,this.restartTimer()},$.prototype.$setOverwrite=function(a){a!=this.overwrite&&(this.overwrite=a,a?E.addCssClass(this.element,"ace_overwrite-cursors"):E.removeCssClass(this.element,"ace_overwrite-cursors"))},$.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},$})();A.prototype.$padding=0,A.prototype.drawCursor=null,x.Cursor=A}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(k,x,H){var E=this&&this.__extends||(function(){var e=function(i,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,h){c.__proto__=h}||function(c,h){for(var y in h)Object.prototype.hasOwnProperty.call(h,y)&&(c[y]=h[y])},e(i,s)};return function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");e(i,s);function c(){this.constructor=i}i.prototype=s===null?Object.create(s):(c.prototype=s.prototype,new c)}})(),A=k("./lib/oop"),$=k("./lib/dom"),a=k("./lib/event"),l=k("./lib/event_emitter").EventEmitter,r=32768,o=(function(){function e(i,s){this.element=$.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+s,this.inner=$.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),i.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addListener(this.element,"scroll",this.onScroll.bind(this)),a.addListener(this.element,"mousedown",a.preventDefault)}return e.prototype.setVisible=function(i){this.element.style.display=i?"":"none",this.isVisible=i,this.coeff=1},e})();A.implement(o.prototype,l);var n=(function(e){E(i,e);function i(s,c){var h=e.call(this,s,"-v")||this;return h.scrollTop=0,h.scrollHeight=0,c.$scrollbarWidth=h.width=$.scrollbarWidth(s.ownerDocument),h.inner.style.width=h.element.style.width=(h.width||15)+5+"px",h.$minWidth=0,h}return i.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var s=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-s)/(this.coeff-s)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},i.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},i.prototype.setHeight=function(s){this.element.style.height=s+"px"},i.prototype.setScrollHeight=function(s){this.scrollHeight=s,s>r?(this.coeff=r/s,s=r):this.coeff!=1&&(this.coeff=1),this.inner.style.height=s+"px"},i.prototype.setScrollTop=function(s){this.scrollTop!=s&&(this.skipEvent=!0,this.scrollTop=s,this.element.scrollTop=s*this.coeff)},i})(o);n.prototype.setInnerHeight=n.prototype.setScrollHeight;var t=(function(e){E(i,e);function i(s,c){var h=e.call(this,s,"-h")||this;return h.scrollLeft=0,h.height=c.$scrollbarWidth,h.inner.style.height=h.element.style.height=(h.height||15)+5+"px",h}return i.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},i.prototype.getHeight=function(){return this.isVisible?this.height:0},i.prototype.setWidth=function(s){this.element.style.width=s+"px"},i.prototype.setInnerWidth=function(s){this.inner.style.width=s+"px"},i.prototype.setScrollWidth=function(s){this.inner.style.width=s+"px"},i.prototype.setScrollLeft=function(s){this.scrollLeft!=s&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=s)},i})(o);x.ScrollBar=n,x.ScrollBarV=n,x.ScrollBarH=t,x.VScrollBar=n,x.HScrollBar=t}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(k,x,H){var E=this&&this.__extends||(function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,c){s.__proto__=c}||function(s,c){for(var h in c)Object.prototype.hasOwnProperty.call(c,h)&&(s[h]=c[h])},t(e,i)};return function(e,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");t(e,i);function s(){this.constructor=e}e.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s)}})(),A=k("./lib/oop"),$=k("./lib/dom"),a=k("./lib/event"),l=k("./lib/event_emitter").EventEmitter;$.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
|
|
211
211
|
position: absolute;
|
|
212
212
|
background: rgba(128, 128, 128, 0.6);
|