123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- import{g as Z}from"./index-b2e76ed2.js";function q(U,J){for(var b=0;b<J.length;b++){const _=J[b];if(typeof _!="string"&&!Array.isArray(_)){for(const $ in _)if($!=="default"&&!($ in U)){const P=Object.getOwnPropertyDescriptor(_,$);P&&Object.defineProperty(U,$,P.get?P:{enumerable:!0,get:()=>_[$]})}}}return Object.freeze(Object.defineProperty(U,Symbol.toStringTag,{value:"Module"}))}var K={exports:{}};(function(U,J){ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config"],function(b,_,$){var P=b("../virtual_renderer").VirtualRenderer,M=b("../editor").Editor,k=b("../range").Range,y=b("../lib/event"),C=b("../lib/lang"),w=b("../lib/dom"),S=b("../config").nls,H=function(L){return"suggest-aria-id:".concat(L)},O=function(L){var T=new P(L);T.$maxLines=4;var v=new M(T);return v.setHighlightActiveLine(!1),v.setShowPrintMargin(!1),v.renderer.setShowGutter(!1),v.renderer.setHighlightGutterLine(!1),v.$mouseHandler.$focusTimeout=0,v.$highlightTagPending=!0,v},N=function(){function L(T){var v=w.createElement("div"),o=new O(v);T&&T.appendChild(v),v.style.display="none",o.renderer.content.style.cursor="default",o.renderer.setStyle("ace_autocomplete"),o.renderer.container.setAttribute("role","listbox"),o.renderer.container.setAttribute("aria-label",S("Autocomplete suggestions")),o.setOption("displayIndentGuides",!1),o.setOption("dragDelay",150);var s=function(){};o.focus=s,o.$isFocused=!0,o.renderer.$cursorLayer.restartTimer=s,o.renderer.$cursorLayer.element.style.opacity=0,o.renderer.$maxLines=8,o.renderer.$keepTextAreaAtCursor=!1,o.setHighlightActiveLine(!1),o.session.highlight(""),o.session.$searchHighlight.clazz="ace_highlight-marker",o.on("mousedown",function(r){var a=r.getDocumentPosition();o.selection.moveToPosition(a),t.start.row=t.end.row=a.row,r.stop()});var p,h=new k(-1,0,-1,1/0),t=new k(-1,0,-1,1/0);t.id=o.session.addMarker(t,"ace_active-line","fullLine"),o.setSelectOnHover=function(r){r?h.id&&(o.session.removeMarker(h.id),h.id=null):h.id=o.session.addMarker(h,"ace_line-hover","fullLine")},o.setSelectOnHover(!1),o.on("mousemove",function(r){if(!p){p=r;return}if(!(p.x==r.x&&p.y==r.y)){p=r,p.scrollTop=o.renderer.scrollTop;var a=p.getDocumentPosition().row;h.start.row!=a&&(h.id||o.setRow(a),n(a))}}),o.renderer.on("beforeRender",function(){if(p&&h.start.row!=-1){p.$pos=null;var r=p.getDocumentPosition().row;h.id||o.setRow(r),n(r,!0)}}),o.renderer.on("afterRender",function(){var r=o.getRow(),a=o.renderer.$textLayer,c=a.element.childNodes[r-a.config.firstRow],l=document.activeElement;if(c!==a.selectedNode&&a.selectedNode&&(w.removeCssClass(a.selectedNode,"ace_selected"),l.removeAttribute("aria-activedescendant"),a.selectedNode.removeAttribute("id")),a.selectedNode=c,c){w.addCssClass(c,"ace_selected");var d=H(r);c.id=d,o.renderer.container.setAttribute("aria-activedescendant",d),l.setAttribute("aria-activedescendant",d),c.setAttribute("role","option"),c.setAttribute("aria-label",o.getData(r).value),c.setAttribute("aria-setsize",o.data.length),c.setAttribute("aria-posinset",r),c.setAttribute("aria-describedby","doc-tooltip")}});var e=function(){n(-1)},n=function(r,a){r!==h.start.row&&(h.start.row=h.end.row=r,a||o.session._emit("changeBackMarker"),o._emit("changeHoverMarker"))};o.getHoveredRow=function(){return h.start.row},y.addListener(o.container,"mouseout",e),o.on("hide",e),o.on("changeSelection",e),o.session.doc.getLength=function(){return o.data.length},o.session.doc.getLine=function(r){var a=o.data[r];return typeof a=="string"?a:a&&a.value||""};var i=o.session.bgTokenizer;return i.$tokenizeRow=function(r){var a=o.data[r],c=[];if(!a)return c;typeof a=="string"&&(a={value:a});var l=a.caption||a.value||a.name;function d(I,z){I&&c.push({type:(a.className||"")+(z||""),value:I})}for(var u=l.toLowerCase(),g=(o.filterText||"").toLowerCase(),f=0,m=0,x=0;x<=g.length;x++)if(x!=m&&(a.matchMask&1<<x||x==g.length)){var E=g.slice(m,x);m=x;var F=u.indexOf(E,f);if(F==-1)continue;d(l.slice(f,F),""),f=F+E.length,d(l.slice(F,f),"completion-highlight")}return d(l.slice(f,l.length),""),c.push({type:"completion-spacer",value:" "}),a.meta&&c.push({type:"completion-meta",value:a.meta}),a.message&&c.push({type:"completion-message",value:a.message}),c},i.$updateOnChange=s,i.start=s,o.session.$computeWidth=function(){return this.screenWidth=0},o.isOpen=!1,o.isTopdown=!1,o.autoSelect=!0,o.filterText="",o.data=[],o.setData=function(r,a){o.filterText=a||"",o.setValue(C.stringRepeat(`
- `,r.length),-1),o.data=r||[],o.setRow(0)},o.getData=function(r){return o.data[r]},o.getRow=function(){return t.start.row},o.setRow=function(r){r=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,r)),t.start.row!=r&&(o.selection.clearSelection(),t.start.row=t.end.row=r||0,o.session._emit("changeBackMarker"),o.moveCursorTo(r||0,0),o.isOpen&&o._signal("select"))},o.on("changeSelection",function(){o.isOpen&&o.setRow(o.selection.lead.row),o.renderer.scrollCursorIntoView()}),o.hide=function(){this.container.style.display="none",o.anchorPos=null,o.anchor=null,o.isOpen&&(o.isOpen=!1,this._signal("hide"))},o.tryShow=function(r,a,c,l){if(!l&&o.isOpen&&o.anchorPos&&o.anchor&&o.anchorPos.top===r.top&&o.anchorPos.left===r.left&&o.anchor===c)return!0;var d=this.container,u=window.innerHeight,g=window.innerWidth,f=this.renderer,m=f.$maxLines*a*1.4,x={top:0,bottom:0,left:0},E=u-r.top-3*this.$borderSize-a,F=r.top-3*this.$borderSize;c||(F<=E||E>=m?c="bottom":c="top"),c==="top"?(x.bottom=r.top-this.$borderSize,x.top=x.bottom-m):c==="bottom"&&(x.top=r.top+a+this.$borderSize,x.bottom=x.top+m);var I=x.top>=0&&x.bottom<=u;if(!l&&!I)return!1;I?f.$maxPixelHeight=null:c==="top"?f.$maxPixelHeight=F:f.$maxPixelHeight=E,c==="top"?(d.style.top="",d.style.bottom=u-x.bottom+"px",o.isTopdown=!1):(d.style.top=x.top+"px",d.style.bottom="",o.isTopdown=!0),d.style.display="";var z=r.left;return z+d.offsetWidth>g&&(z=g-d.offsetWidth),d.style.left=z+"px",d.style.right="",o.isOpen||(o.isOpen=!0,this._signal("show"),p=null),o.anchorPos=r,o.anchor=c,!0},o.show=function(r,a,c){this.tryShow(r,a,c?"bottom":void 0,!0)},o.goTo=function(r){var a=this.getRow(),c=this.session.getLength()-1;switch(r){case"up":a=a<=0?c:a-1;break;case"down":a=a>=c?-1:a+1;break;case"start":a=0;break;case"end":a=c;break}this.setRow(a)},o.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},o.$imageSize=0,o.$borderSize=1,o}return L}();w.importCssString(`
- .ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
- background-color: #CAD6FA;
- z-index: 1;
- }
- .ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
- background-color: #3a674e;
- }
- .ace_editor.ace_autocomplete .ace_line-hover {
- border: 1px solid #abbffe;
- margin-top: -1px;
- background: rgba(233,233,253,0.4);
- position: absolute;
- z-index: 2;
- }
- .ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
- border: 1px solid rgba(109, 150, 13, 0.8);
- background: rgba(58, 103, 78, 0.62);
- }
- .ace_completion-meta {
- opacity: 0.5;
- margin-left: 0.9em;
- }
- .ace_completion-message {
- color: blue;
- }
- .ace_editor.ace_autocomplete .ace_completion-highlight{
- color: #2d69c7;
- }
- .ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
- color: #93ca12;
- }
- .ace_editor.ace_autocomplete {
- width: 300px;
- z-index: 200000;
- border: 1px lightgray solid;
- position: fixed;
- box-shadow: 2px 3px 5px rgba(0,0,0,.2);
- line-height: 1.4;
- background: #fefefe;
- color: #111;
- }
- .ace_dark.ace_editor.ace_autocomplete {
- border: 1px #484747 solid;
- box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
- line-height: 1.4;
- background: #25282c;
- color: #c1c1c1;
- }
- .ace_autocomplete .ace_text-layer {
- width: calc(100% - 8px);
- }
- .ace_autocomplete .ace_line {
- display: flex;
- align-items: center;
- }
- .ace_autocomplete .ace_line > * {
- min-width: 0;
- flex: 0 0 auto;
- }
- .ace_autocomplete .ace_line .ace_ {
- flex: 0 1 auto;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- .ace_autocomplete .ace_completion-spacer {
- flex: 1;
- }
- `,"autocompletion.css",!1),_.AcePopup=N,_.$singleLineEditor=O,_.getAriaId=H}),ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(b,_,$){var P=b("./lib/dom"),M=b("./lib/oop"),k=b("./lib/event_emitter").EventEmitter,y=b("./lib/lang"),C=b("./range").Range,w=b("./range_list").RangeList,S=b("./keyboard/hash_handler").HashHandler,H=b("./tokenizer").Tokenizer,O=b("./clipboard"),N={CURRENT_WORD:function(t){return t.session.getTextRange(t.session.getWordRange())},SELECTION:function(t,e,n){var i=t.session.getTextRange();return n?i.replace(/\n\r?([ \t]*\S)/g,`
- `+n+"$1"):i},CURRENT_LINE:function(t){return t.session.getLine(t.getCursorPosition().row)},PREV_LINE:function(t){return t.session.getLine(t.getCursorPosition().row-1)},LINE_INDEX:function(t){return t.getCursorPosition().row},LINE_NUMBER:function(t){return t.getCursorPosition().row+1},SOFT_TABS:function(t){return t.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(t){return t.session.getTabSize()},CLIPBOARD:function(t){return O.getText&&O.getText()},FILENAME:function(t){return/[^/\\]*$/.exec(this.FILEPATH(t))[0]},FILENAME_BASE:function(t){return/[^/\\]*$/.exec(this.FILEPATH(t))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(t){return this.FILEPATH(t).replace(/[^/\\]*$/,"")},FILEPATH:function(t){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(t){var e=t.session.$mode||{};return e.blockComment&&e.blockComment.start||""},BLOCK_COMMENT_END:function(t){var e=t.session.$mode||{};return e.blockComment&&e.blockComment.end||""},LINE_COMMENT:function(t){var e=t.session.$mode||{};return e.lineCommentStart||""},CURRENT_YEAR:L.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:L.bind(null,{year:"2-digit"}),CURRENT_MONTH:L.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:L.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:L.bind(null,{month:"short"}),CURRENT_DATE:L.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:L.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:L.bind(null,{weekday:"short"}),CURRENT_HOUR:L.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:L.bind(null,{minute:"2-digit"}),CURRENT_SECOND:L.bind(null,{second:"2-digit"})};N.SELECTED_TEXT=N.SELECTION;function L(t){var e=new Date().toLocaleString("en-us",t);return e.length==1?"0"+e:e}var T=function(){function t(){this.snippetMap={},this.snippetNameMap={},this.variables=N}return t.prototype.getTokenizer=function(){return t.$tokenizer||this.createTokenizer()},t.prototype.createTokenizer=function(){function e(r){return r=r.substr(1),/^\d+$/.test(r)?[{tabstopId:parseInt(r,10)}]:[{text:r}]}function n(r){return"(?:[^\\\\"+r+"]|\\\\.)"}var i={regex:"/("+n("/")+"+)/",onMatch:function(r,a,c){var l=c[0];return l.fmtString=!0,l.guard=r.slice(1,-1),l.flag="",""},next:"formatString"};return t.$tokenizer=new H({start:[{regex:/\\./,onMatch:function(r,a,c){var l=r[1];return(l=="}"&&c.length||"`$\\".indexOf(l)!=-1)&&(r=l),[r]}},{regex:/}/,onMatch:function(r,a,c){return[c.length?c.shift():r]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(r,a,c){var l=e(r.substr(1));return c.unshift(l[0]),l},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+n("\\|")+"*\\|",onMatch:function(r,a,c){var l=r.slice(1,-1).replace(/\\[,|\\]|,/g,function(d){return d.length==2?d[1]:"\0"}).split("\0").map(function(d){return{value:d}});return c[0].choices=l,[l[0]]},next:"start"},i,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(r,a,c){return c.length&&c[0].expectElse?(c[0].expectElse=!1,c[0].ifEnd={elseEnd:c[0]},[c[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(r,a,c){var l=r[1];return l=="}"&&c.length||"`$\\".indexOf(l)!=-1?r=l:l=="n"?r=`
- `:l=="t"?r=" ":"ulULE".indexOf(l)!=-1&&(r={changeCase:l,local:l>"a"}),[r]}},{regex:"/\\w*}",onMatch:function(r,a,c){var l=c.shift();return l&&(l.flag=r.slice(1,-1)),this.next=l&&l.tabstopId?"start":"",[l||r]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(r,a,c){return[{text:r.slice(1)}]}},{regex:/\${\w+/,onMatch:function(r,a,c){var l={text:r.slice(2)};return c.unshift(l),[l]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(r,a,c){var l=c.shift();return this.next=l&&l.tabstopId?"start":"",[l||r]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(r,a,c){var l=c[0];return l.formatFunction=r.slice(2,-1),[c.shift()]},next:"formatString"},i,{regex:/:[\?\-+]?/,onMatch:function(r,a,c){r[1]=="+"&&(c[0].ifEnd=c[0]),r[1]=="?"&&(c[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),t.$tokenizer},t.prototype.tokenizeTmSnippet=function(e,n){return this.getTokenizer().getLineTokens(e,n).tokens.map(function(i){return i.value||i})},t.prototype.getVariableValue=function(e,n,i){if(/^\d+$/.test(n))return(this.variables.__||{})[n]||"";if(/^[A-Z]\d+$/.test(n))return(this.variables[n[0]+"__"]||{})[n.substr(1)]||"";if(n=n.replace(/^TM_/,""),!this.variables.hasOwnProperty(n))return"";var r=this.variables[n];return typeof r=="function"&&(r=this.variables[n](e,n,i)),r??""},t.prototype.tmStrFormat=function(e,n,i){if(!n.fmt)return e;var r=n.flag||"",a=n.guard;a=new RegExp(a,r.replace(/[^gim]/g,""));var c=typeof n.fmt=="string"?this.tokenizeTmSnippet(n.fmt,"formatString"):n.fmt,l=this,d=e.replace(a,function(){var u=l.variables.__;l.variables.__=[].slice.call(arguments);for(var g=l.resolveVariables(c,i),f="E",m=0;m<g.length;m++){var x=g[m];if(typeof x=="object")if(g[m]="",x.changeCase&&x.local){var E=g[m+1];E&&typeof E=="string"&&(x.changeCase=="u"?g[m]=E[0].toUpperCase():g[m]=E[0].toLowerCase(),g[m+1]=E.substr(1))}else x.changeCase&&(f=x.changeCase);else f=="U"?g[m]=x.toUpperCase():f=="L"&&(g[m]=x.toLowerCase())}return l.variables.__=u,g.join("")});return d},t.prototype.tmFormatFunction=function(e,n,i){return n.formatFunction=="upcase"?e.toUpperCase():n.formatFunction=="downcase"?e.toLowerCase():e},t.prototype.resolveVariables=function(e,n){for(var i=[],r="",a=!0,c=0;c<e.length;c++){var l=e[c];if(typeof l=="string"){i.push(l),l==`
- `?(a=!0,r=""):a&&(r=/^\t*/.exec(l)[0],a=/\S/.test(l));continue}if(l){if(a=!1,l.fmtString){var d=e.indexOf(l,c+1);d==-1&&(d=e.length),l.fmt=e.slice(c+1,d),c=d}if(l.text){var u=this.getVariableValue(n,l.text,r)+"";l.fmtString&&(u=this.tmStrFormat(u,l,n)),l.formatFunction&&(u=this.tmFormatFunction(u,l,n)),u&&!l.ifEnd?(i.push(u),g(l)):!u&&l.ifEnd&&g(l.ifEnd)}else l.elseEnd?g(l.elseEnd):(l.tabstopId!=null||l.changeCase!=null)&&i.push(l)}}function g(f){var m=e.indexOf(f,c+1);m!=-1&&(c=m)}return i},t.prototype.getDisplayTextForSnippet=function(e,n){var i=v.call(this,e,n);return i.text},t.prototype.insertSnippetForSelection=function(e,n,i){i===void 0&&(i={});var r=v.call(this,e,n,i),a=e.getSelectionRange();i.range&&i.range.compareRange(a)===0&&(a=i.range);var c=e.session.replace(a,r.text),l=new o(e),d=e.inVirtualSelectionMode&&e.selection.index;l.addTabstops(r.tabstops,a.start,c,d)},t.prototype.insertSnippet=function(e,n,i){i===void 0&&(i={});var r=this;if(i.range&&!(i.range instanceof C)&&(i.range=C.fromPoints(i.range.start,i.range.end)),e.inVirtualSelectionMode)return r.insertSnippetForSelection(e,n,i);e.forEachSelection(function(){r.insertSnippetForSelection(e,n,i)},null,{keepOrder:!0}),e.tabstopManager&&e.tabstopManager.tabNext()},t.prototype.$getScope=function(e){var n=e.session.$mode.$id||"";if(n=n.split("/").pop(),n==="html"||n==="php"){n==="php"&&!e.session.$mode.inlinePhp&&(n="html");var i=e.getCursorPosition(),r=e.session.getState(i.row);typeof r=="object"&&(r=r[0]),r.substring&&(r.substring(0,3)=="js-"?n="javascript":r.substring(0,4)=="css-"?n="css":r.substring(0,4)=="php-"&&(n="php"))}return n},t.prototype.getActiveScopes=function(e){var n=this.$getScope(e),i=[n],r=this.snippetMap;return r[n]&&r[n].includeScopes&&i.push.apply(i,r[n].includeScopes),i.push("_"),i},t.prototype.expandWithTab=function(e,n){var i=this,r=e.forEachSelection(function(){return i.expandSnippetForSelection(e,n)},null,{keepOrder:!0});return r&&e.tabstopManager&&e.tabstopManager.tabNext(),r},t.prototype.expandSnippetForSelection=function(e,n){var i=e.getCursorPosition(),r=e.session.getLine(i.row),a=r.substring(0,i.column),c=r.substr(i.column),l=this.snippetMap,d;return this.getActiveScopes(e).some(function(u){var g=l[u];return g&&(d=this.findMatchingSnippet(g,a,c)),!!d},this),d?(n&&n.dryRun||(e.session.doc.removeInLine(i.row,i.column-d.replaceBefore.length,i.column+d.replaceAfter.length),this.variables.M__=d.matchBefore,this.variables.T__=d.matchAfter,this.insertSnippetForSelection(e,d.content),this.variables.M__=this.variables.T__=null),!0):!1},t.prototype.findMatchingSnippet=function(e,n,i){for(var r=e.length;r--;){var a=e[r];if(!(a.startRe&&!a.startRe.test(n))&&!(a.endRe&&!a.endRe.test(i))&&!(!a.startRe&&!a.endRe))return a.matchBefore=a.startRe?a.startRe.exec(n):[""],a.matchAfter=a.endRe?a.endRe.exec(i):[""],a.replaceBefore=a.triggerRe?a.triggerRe.exec(n)[0]:"",a.replaceAfter=a.endTriggerRe?a.endTriggerRe.exec(i)[0]:"",a}},t.prototype.register=function(e,n){var i=this.snippetMap,r=this.snippetNameMap,a=this;e||(e=[]);function c(u){return u&&!/^\^?\(.*\)\$?$|^\\b$/.test(u)&&(u="(?:"+u+")"),u||""}function l(u,g,f){return u=c(u),g=c(g),f?(u=g+u,u&&u[u.length-1]!="$"&&(u=u+"$")):(u=u+g,u&&u[0]!="^"&&(u="^"+u)),new RegExp(u)}function d(u){u.scope||(u.scope=n||"_"),n=u.scope,i[n]||(i[n]=[],r[n]={});var g=r[n];if(u.name){var f=g[u.name];f&&a.unregister(f),g[u.name]=u}i[n].push(u),u.prefix&&(u.tabTrigger=u.prefix),!u.content&&u.body&&(u.content=Array.isArray(u.body)?u.body.join(`
- `):u.body),u.tabTrigger&&!u.trigger&&(!u.guard&&/^\w/.test(u.tabTrigger)&&(u.guard="\\b"),u.trigger=y.escapeRegExp(u.tabTrigger)),!(!u.trigger&&!u.guard&&!u.endTrigger&&!u.endGuard)&&(u.startRe=l(u.trigger,u.guard,!0),u.triggerRe=new RegExp(u.trigger),u.endRe=l(u.endTrigger,u.endGuard,!0),u.endTriggerRe=new RegExp(u.endTrigger))}Array.isArray(e)?e.forEach(d):Object.keys(e).forEach(function(u){d(e[u])}),this._signal("registerSnippets",{scope:n})},t.prototype.unregister=function(e,n){var i=this.snippetMap,r=this.snippetNameMap;function a(c){var l=r[c.scope||n];if(l&&l[c.name]){delete l[c.name];var d=i[c.scope||n],u=d&&d.indexOf(c);u>=0&&d.splice(u,1)}}e.content?a(e):Array.isArray(e)&&e.forEach(a)},t.prototype.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var n=[],i={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,a;a=r.exec(e);){if(a[1])try{i=JSON.parse(a[1]),n.push(i)}catch{}if(a[4])i.content=a[4].replace(/^\t/gm,""),n.push(i),i={};else{var c=a[2],l=a[3];if(c=="regex"){var d=/\/((?:[^\/\\]|\\.)*)|$/g;i.guard=d.exec(l)[1],i.trigger=d.exec(l)[1],i.endTrigger=d.exec(l)[1],i.endGuard=d.exec(l)[1]}else c=="snippet"?(i.tabTrigger=l.match(/^\S*/)[0],i.name||(i.name=l)):c&&(i[c]=l)}}return n},t.prototype.getSnippetByName=function(e,n){var i=this.snippetNameMap,r;return this.getActiveScopes(n).some(function(a){var c=i[a];return c&&(r=c[e]),!!r},this),r},t}();M.implement(T.prototype,k);var v=function(t,e,n){n===void 0&&(n={});var i=t.getCursorPosition(),r=t.session.getLine(i.row),a=t.session.getTabString(),c=r.match(/^\s*/)[0];i.column<c.length&&(c=c.slice(0,i.column)),e=e.replace(/\r/g,"");var l=this.tokenizeTmSnippet(e);l=this.resolveVariables(l,t),l=l.map(function(R){return R==`
- `&&!n.excludeExtraIndent?R+c:typeof R=="string"?R.replace(/\t/g,a):R});var d=[];l.forEach(function(R,D){if(typeof R=="object"){var j=R.tabstopId,A=d[j];if(A||(A=d[j]=[],A.index=j,A.value="",A.parents={}),A.indexOf(R)===-1){R.choices&&!A.choices&&(A.choices=R.choices),A.push(R);var B=l.indexOf(R,D+1);if(B!==-1){var G=l.slice(D+1,B),Q=G.some(function(Y){return typeof Y=="object"});Q&&!A.value?A.value=G:G.length&&(!A.value||typeof A.value!="string")&&(A.value=G.join(""))}}}}),d.forEach(function(R){R.length=0});var u={};function g(R){for(var D=[],j=0;j<R.length;j++){var A=R[j];if(typeof A=="object"){if(u[A.tabstopId])continue;var B=R.lastIndexOf(A,j-1);A=D[B]||{tabstopId:A.tabstopId}}D[j]=A}return D}for(var f=0;f<l.length;f++){var m=l[f];if(typeof m=="object"){var x=m.tabstopId,E=d[x],F=l.indexOf(m,f+1);if(u[x]){u[x]===m&&(delete u[x],Object.keys(u).forEach(function(R){E.parents[R]=!0}));continue}u[x]=m;var I=E.value;typeof I!="string"?I=g(I):m.fmt&&(I=this.tmStrFormat(I,m,t)),l.splice.apply(l,[f+1,Math.max(0,F-f)].concat(I,m)),E.indexOf(m)===-1&&E.push(m)}}var z=0,V=0,W="";return l.forEach(function(R){if(typeof R=="string"){var D=R.split(`
- `);D.length>1?(V=D[D.length-1].length,z+=D.length-1):V+=R.length,W+=R}else R&&(R.start?R.end={row:z,column:V}:R.start={row:z,column:V})}),{text:W,tabstops:d,tokens:l}},o=function(){function t(e){if(this.index=0,this.ranges=[],this.tabstops=[],e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=y.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)}return t.prototype.attach=function(e){this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.session=e.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},t.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},t.prototype.onChange=function(e){for(var n=e.action[0]=="r",i=this.selectedTabstop||{},r=i.parents||{},a=this.tabstops.slice(),c=0;c<a.length;c++){var l=a[c],d=l==i||r[l.index];if(l.rangeList.$bias=d?0:1,e.action=="remove"&&l!==i){var u=l.parents&&l.parents[i.index],g=l.rangeList.pointIndex(e.start,u);g=g<0?-g-1:g+1;var f=l.rangeList.pointIndex(e.end,u);f=f<0?-f-1:f-1;for(var m=l.rangeList.ranges.slice(g,f),x=0;x<m.length;x++)this.removeRange(m[x])}l.rangeList.$onChange(e)}var E=this.session;!this.$inChange&&n&&E.getLength()==1&&!E.getValue()&&this.detach()},t.prototype.updateLinkedFields=function(){var e=this.selectedTabstop;if(!(!e||!e.hasLinkedRanges||!e.firstNonLinked)){this.$inChange=!0;for(var n=this.session,i=n.getTextRange(e.firstNonLinked),r=0;r<e.length;r++){var a=e[r];if(a.linked){var c=a.original,l=_.snippetManager.tmStrFormat(i,c,this.editor);n.replace(a,l)}}this.$inChange=!1}},t.prototype.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},t.prototype.onChangeSelection=function(){if(this.editor){for(var e=this.editor.selection.lead,n=this.editor.selection.anchor,i=this.editor.selection.isEmpty(),r=0;r<this.ranges.length;r++)if(!this.ranges[r].linked){var a=this.ranges[r].contains(e.row,e.column),c=i||this.ranges[r].contains(n.row,n.column);if(a&&c)return}this.detach()}},t.prototype.onChangeSession=function(){this.detach()},t.prototype.tabNext=function(e){var n=this.tabstops.length,i=this.index+(e||1);i=Math.min(Math.max(i,1),n),i==n&&(i=0),this.selectTabstop(i),i===0&&this.detach()},t.prototype.selectTabstop=function(e){this.$openTabstops=null;var n=this.tabstops[this.index];if(n&&this.addTabstopMarkers(n),this.index=e,n=this.tabstops[this.index],!(!n||!n.length)){this.selectedTabstop=n;var i=n.firstNonLinked||n;if(n.choices&&(i.cursor=i.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(i);else{var r=this.editor.multiSelect;r.toSingleRange(i);for(var a=0;a<n.length;a++)n.hasLinkedRanges&&n[a].linked||r.addRange(n[a].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},t.prototype.addTabstops=function(e,n,i){var r=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!e[0]){var a=C.fromPoints(i,i);p(a.start,n),p(a.end,n),e[0]=[a],e[0].index=0}var c=this.index,l=[c+1,0],d=this.ranges;e.forEach(function(u,g){for(var f=this.$openTabstops[g]||u,m=0;m<u.length;m++){var x=u[m],E=C.fromPoints(x.start,x.end||x.start);s(E.start,n),s(E.end,n),E.original=x,E.tabstop=f,d.push(E),f!=u?f.unshift(E):f[m]=E,x.fmtString||f.firstNonLinked&&r?(E.linked=!0,f.hasLinkedRanges=!0):f.firstNonLinked||(f.firstNonLinked=E)}f.firstNonLinked||(f.hasLinkedRanges=!1),f===u&&(l.push(f),this.$openTabstops[g]=f),this.addTabstopMarkers(f),f.rangeList=f.rangeList||new w,f.rangeList.$bias=0,f.rangeList.addList(f)},this),l.length>2&&(this.tabstops.length&&l.push(l.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,l))},t.prototype.addTabstopMarkers=function(e){var n=this.session;e.forEach(function(i){i.markerId||(i.markerId=n.addMarker(i,"ace_snippet-marker","text"))})},t.prototype.removeTabstopMarkers=function(e){var n=this.session;e.forEach(function(i){n.removeMarker(i.markerId),i.markerId=null})},t.prototype.removeRange=function(e){var n=e.tabstop.indexOf(e);n!=-1&&e.tabstop.splice(n,1),n=this.ranges.indexOf(e),n!=-1&&this.ranges.splice(n,1),n=e.tabstop.rangeList.ranges.indexOf(e),n!=-1&&e.tabstop.splice(n,1),this.session.removeMarker(e.markerId),e.tabstop.length||(n=this.tabstops.indexOf(e.tabstop),n!=-1&&this.tabstops.splice(n,1),this.tabstops.length||this.detach())},t}();o.prototype.keyboardHandler=new S,o.prototype.keyboardHandler.bindKeys({Tab:function(t){_.snippetManager&&_.snippetManager.expandWithTab(t)||(t.tabstopManager.tabNext(1),t.renderer.scrollCursorIntoView())},"Shift-Tab":function(t){t.tabstopManager.tabNext(-1),t.renderer.scrollCursorIntoView()},Esc:function(t){t.tabstopManager.detach()}});var s=function(t,e){t.row==0&&(t.column+=e.column),t.row+=e.row},p=function(t,e){t.row==e.row&&(t.column-=e.column),t.row-=e.row};P.importCssString(`
- .ace_snippet-marker {
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- background: rgba(194, 193, 208, 0.09);
- border: 1px dotted rgba(211, 208, 235, 0.62);
- position: absolute;
- }`,"snippets.css",!1),_.snippetManager=new T;var h=b("./editor").Editor;(function(){this.insertSnippet=function(t,e){return _.snippetManager.insertSnippet(this,t,e)},this.expandSnippet=function(t){return _.snippetManager.expandWithTab(this,t)}}).call(h.prototype)}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets"],function(b,_,$){var P=b("../snippets").snippetManager,M=function(){function k(){this.editor=null}return k.prototype.show=function(y,C,w){if(w=w||"",y&&this.editor&&this.editor!==y&&(this.hide(),this.editor=null),!y||!C)return!1;var S=C.snippet?P.getDisplayTextForSnippet(y,C.snippet):C.value;return!S||!S.startsWith(w)?!1:(this.editor=y,S=S.slice(w.length),S===""?y.removeGhostText():y.setGhostText(S),!0)},k.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},k.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},k.prototype.destroy=function(){this.hide(),this.editor=null},k}();_.AceInline=M}),ace.define("ace/autocomplete/util",["require","exports","module"],function(b,_,$){_.parForEach=function(M,k,y){var C=0,w=M.length;w===0&&y();for(var S=0;S<w;S++)k(M[S],function(H,O){C++,C===w&&y(H,O)})};var P=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;_.retrievePrecedingIdentifier=function(M,k,y){y=y||P;for(var C=[],w=k-1;w>=0&&y.test(M[w]);w--)C.push(M[w]);return C.reverse().join("")},_.retrieveFollowingIdentifier=function(M,k,y){y=y||P;for(var C=[],w=k;w<M.length&&y.test(M[w]);w++)C.push(M[w]);return C},_.getCompletionPrefix=function(M){var k=M.getCursorPosition(),y=M.session.getLine(k.row),C;return M.completers.forEach(function(w){w.identifierRegexps&&w.identifierRegexps.forEach(function(S){!C&&S&&(C=this.retrievePrecedingIdentifier(y,k.column,S))}.bind(this))}.bind(this)),C||this.retrievePrecedingIdentifier(y,k.column)},_.triggerAutocomplete=function(M){var k=M.getCursorPosition(),y=M.session.getLine(k.row),C=k.column===0?0:k.column-1,w=y[C];return M.completers.some(function(S){if(S.triggerCharacters&&Array.isArray(S.triggerCharacters))return S.triggerCharacters.includes(w)})}}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config"],function(b,_,$){var P=b("./keyboard/hash_handler").HashHandler,M=b("./autocomplete/popup").AcePopup,k=b("./autocomplete/inline").AceInline,y=b("./autocomplete/popup").getAriaId,C=b("./autocomplete/util"),w=b("./lib/lang"),S=b("./lib/dom"),H=b("./snippets").snippetManager,O=b("./config"),N=function(o,s){s.completer&&s.completer.destroy()},L=function(){function o(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new P,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=w.delayedCall(function(){this.updateCompletions(!0)}.bind(this)),this.tooltipTimer=w.delayedCall(this.updateDocTooltip.bind(this),50)}return o.prototype.$init=function(){return this.popup=new M(this.parentNode||document.body||document.documentElement),this.popup.on("click",function(s){this.insertMatch(),s.stop()}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupChange.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup},o.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new k,this.inlineRenderer},o.prototype.getPopup=function(){return this.popup||this.$init()},o.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip()},o.prototype.$onPopupChange=function(s){if(this.inlineRenderer&&this.inlineEnabled){var p=s?null:this.popup.getData(this.popup.getRow()),h=C.getCompletionPrefix(this.editor);this.inlineRenderer.show(this.editor,p,h)||this.inlineRenderer.hide(),this.$updatePopupPosition()}this.tooltipTimer.call(null,null)},o.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var s=this.editor.container.parentNode,p=[];s;)p.push(s),s.addEventListener("scroll",this.onLayoutChange,{passive:!0}),s=s.parentNode;this.$elements=p}},o.prototype.unObserveLayoutChanges=function(){var s=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(p){p.removeEventListener("scroll",s.onLayoutChange,{passive:!0})}),this.$elements=null},o.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},o.prototype.$updatePopupPosition=function(){var s=this.editor,p=s.renderer,h=p.layerConfig.lineHeight,t=p.$cursorLayer.getPixelPosition(this.base,!0);t.left-=this.popup.getTextLeftOffset();var e=s.container.getBoundingClientRect();t.top+=e.top-p.layerConfig.offset,t.left+=e.left-s.renderer.scrollLeft,t.left+=p.gutterWidth;var n={top:t.top,left:t.left};p.$ghostText&&p.$ghostTextWidget&&this.base.row===p.$ghostText.position.row&&(n.top+=p.$ghostTextWidget.el.offsetHeight),!this.popup.tryShow(n,h,"bottom")&&(this.popup.tryShow(t,h,"top")||this.popup.show(t,h))},o.prototype.openPopup=function(s,p,h){this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:y(this.popup.getRow()),inline:this.inlineEnabled}),s.keyBinding.addKeyboardHandler(this.keyboardHandler),this.popup.setRow(this.autoSelect?0:-1),h?h&&!p&&this.detach():(this.popup.setTheme(s.getTheme()),this.popup.setFontSize(s.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},o.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},o.prototype.changeListener=function(s){var p=this.editor.selection.lead;(p.row!=this.base.row||p.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},o.prototype.blurListener=function(s){var p=document.activeElement,h=this.editor.textInput.getElement(),t=s.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(s.relatedTarget),e=this.popup&&this.popup.container;p!=h&&p.parentNode!=e&&!t&&p!=this.tooltipNode&&s.relatedTarget!=h&&this.detach()},o.prototype.mousedownListener=function(s){this.detach()},o.prototype.mousewheelListener=function(s){this.detach()},o.prototype.goTo=function(s){this.popup.goTo(s)},o.prototype.insertMatch=function(s,p){if(s||(s=this.popup.getData(this.popup.getRow())),!s)return!1;if(s.value==="")return this.detach();var h=this.completions,t=this.getCompletionProvider().insertMatch(this.editor,s,h.filterText,p);return this.completions==h&&this.detach(),t},o.prototype.showPopup=function(s,p){this.editor&&this.detach(),this.activated=!0,this.editor=s,s.completer!=this&&(s.completer&&s.completer.detach(),s.completer=this),s.on("changeSelection",this.changeListener),s.on("blur",this.blurListener),s.on("mousedown",this.mousedownListener),s.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,p)},o.prototype.getCompletionProvider=function(){return this.completionProvider||(this.completionProvider=new T),this.completionProvider},o.prototype.gatherCompletions=function(s,p){return this.getCompletionProvider().gatherCompletions(s,p)},o.prototype.updateCompletions=function(s,p){if(s&&this.base&&this.completions){var t=this.editor.getCursorPosition(),e=this.editor.session.getTextRange({start:this.base,end:t});if(e==this.completions.filterText)return;if(this.completions.setFilter(e),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==e&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,e,s);return}if(p&&p.matches){var t=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(t.row,t.column),this.base.$insertRight=!0,this.completions=new v(p.matches),this.openPopup(this.editor,"",s)}var h=this.editor.getSession(),t=this.editor.getCursorPosition(),e=C.getCompletionPrefix(this.editor);this.base=h.doc.createAnchor(t.row,t.column-e.length),this.base.$insertRight=!0;var n={exactMatch:this.exactMatch};this.getCompletionProvider().provideCompletions(this.editor,n,function(i,r,a){var c=r.filtered,l=C.getCompletionPrefix(this.editor);if(a){if(!c.length){var d=!this.autoShown&&this.emptyMessage;if(typeof d=="function"&&(d=this.emptyMessage(l)),d){var u=[{caption:this.emptyMessage(l),value:""}];this.completions=new v(u),this.openPopup(this.editor,l,s);return}return this.detach()}if(c.length==1&&c[0].value==l&&!c[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&c.length==1)return this.insertMatch(c[0])}this.completions=r,this.openPopup(this.editor,l,s)}.bind(this))},o.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},o.prototype.updateDocTooltip=function(){var s=this.popup,p=s.data,h=p&&(p[s.getHoveredRow()]||p[s.getRow()]),t=null;if(!h||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var e=this.editor.completers.length,n=0;n<e;n++){var i=this.editor.completers[n];if(i.getDocTooltip&&h.completerId===i.id){t=i.getDocTooltip(h);break}}if(!t&&typeof h!="string"&&(t=h),typeof t=="string"&&(t={docText:t}),!t||!(t.docHTML||t.docText))return this.hideDocTooltip();this.showDocTooltip(t)},o.prototype.showDocTooltip=function(s){this.tooltipNode||(this.tooltipNode=S.createElement("div"),this.tooltipNode.style.margin=0,this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"));var p=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(p.isDark?"ace_dark ":"")+(p.cssClass||"");var h=this.tooltipNode;s.docHTML?h.innerHTML=s.docHTML:s.docText&&(h.textContent=s.docText),h.parentNode||this.popup.container.appendChild(this.tooltipNode);var t=this.popup,e=t.container.getBoundingClientRect();h.style.top=t.container.style.top,h.style.bottom=t.container.style.bottom,h.style.display="block",window.innerWidth-e.right<320?e.left<320?t.isTopdown?(h.style.top=e.bottom+"px",h.style.left=e.left+"px",h.style.right="",h.style.bottom=""):(h.style.top=t.container.offsetTop-h.offsetHeight+"px",h.style.left=e.left+"px",h.style.right="",h.style.bottom=""):(h.style.right=window.innerWidth-e.left+"px",h.style.left=""):(h.style.left=e.right+1+"px",h.style.right="")},o.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var s=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==s&&this.editor.focus(),this.tooltipNode=null,s.parentNode&&s.parentNode.removeChild(s)}},o.prototype.onTooltipClick=function(s){for(var p=s.target;p&&p!=this.tooltipNode;){if(p.nodeName=="A"&&p.href){p.rel="noreferrer",p.target="_blank";break}p=p.parentNode}},o.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var s=this.popup.container;s&&s.parentNode&&s.parentNode.removeChild(s)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",N),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},o}();L.prototype.commands={Up:function(o){o.completer.goTo("up")},Down:function(o){o.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(o){o.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(o){o.completer.goTo("end")},Esc:function(o){o.completer.detach()},Return:function(o){return o.completer.insertMatch()},"Shift-Return":function(o){o.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(o){var s=o.completer.insertMatch();if(!s&&!o.tabstopManager)o.completer.goTo("down");else return s},PageUp:function(o){o.completer.popup.gotoPageUp()},PageDown:function(o){o.completer.popup.gotoPageDown()}},L.for=function(o){return o.completer instanceof L||(o.completer&&(o.completer.destroy(),o.completer=null),O.get("sharedPopups")?(L.$sharedInstance||(L.$sharedInstance=new L),o.completer=L.$sharedInstance):(o.completer=new L,o.once("destroy",N))),o.completer},L.startCommand={name:"startAutocomplete",exec:function(o,s){var p=L.for(o);p.autoInsert=!1,p.autoSelect=!0,p.autoShown=!1,p.showPopup(o,s),p.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var T=function(){function o(){this.active=!0}return o.prototype.insertByIndex=function(s,p,h){return!this.completions||!this.completions.filtered?!1:this.insertMatch(s,this.completions.filtered[p],h)},o.prototype.insertMatch=function(s,p,h){if(!p)return!1;if(s.startOperation({command:{name:"insertMatch"}}),p.completer&&p.completer.insertMatch)p.completer.insertMatch(s,p);else{if(!this.completions)return!1;if(this.completions.filterText){var t;s.selection.getAllRanges?t=s.selection.getAllRanges():t=[s.getSelectionRange()];for(var e=0,n;n=t[e];e++)n.start.column-=this.completions.filterText.length,s.session.remove(n)}p.snippet?H.insertSnippet(s,p.snippet,{range:p.range}):this.$insertString(s,p),p.command&&p.command==="startAutocomplete"&&s.execCommand(p.command)}return s.endOperation(),!0},o.prototype.$insertString=function(s,p){var h=p.value||p;if(p.range){if(s.inVirtualSelectionMode)return s.session.replace(p.range,h);s.forEachSelection(function(){var t=s.getSelectionRange();p.range.compareRange(t)===0?s.session.replace(p.range,h):s.insert(h)},null,{keepOrder:!0})}else s.execCommand("insertstring",h)},o.prototype.gatherCompletions=function(s,p){var h=s.getSession(),t=s.getCursorPosition(),e=C.getCompletionPrefix(s),n=[];this.completers=s.completers;var i=s.completers.length;return s.completers.forEach(function(r,a){r.getCompletions(s,h,t,e,function(c,l){!c&&l&&(n=n.concat(l)),p(null,{prefix:C.getCompletionPrefix(s),matches:n,finished:--i===0})})}),!0},o.prototype.provideCompletions=function(s,p,h){var t=function(r){var a=r.prefix,c=r.matches;this.completions=new v(c),p.exactMatch&&(this.completions.exactMatch=!0),p.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(a),(r.finished||this.completions.filtered.length)&&h(null,this.completions,r.finished)}.bind(this),e=!0,n=null;if(this.gatherCompletions(s,function(r,a){if(this.active){r&&(h(r,[],!0),this.detach());var c=a.prefix;if(c.indexOf(a.prefix)===0){if(e){n=a;return}t(a)}}}.bind(this)),e=!1,n){var i=n;n=null,t(i)}},o.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(s){typeof s.cancel=="function"&&s.cancel()})},o}(),v=function(){function o(s,p){this.all=s,this.filtered=s,this.filterText=p||"",this.exactMatch=!1,this.ignoreCaption=!1}return o.prototype.setFilter=function(s){if(s.length>this.filterText&&s.lastIndexOf(this.filterText,0)===0)var p=this.filtered;else var p=this.all;this.filterText=s,p=this.filterCompletions(p,this.filterText),p=p.sort(function(t,e){return e.exactMatch-t.exactMatch||e.$score-t.$score||(t.caption||t.value).localeCompare(e.caption||e.value)});var h=null;p=p.filter(function(t){var e=t.snippet||t.caption||t.value;return e===h?!1:(h=e,!0)}),this.filtered=p},o.prototype.filterCompletions=function(s,p){var h=[],t=p.toUpperCase(),e=p.toLowerCase();e:for(var n=0,i;i=s[n];n++){var r=!this.ignoreCaption&&i.caption||i.value||i.snippet;if(r){var a=-1,c=0,l=0,d,u;if(this.exactMatch){if(p!==r.substr(0,p.length))continue e}else{var g=r.toLowerCase().indexOf(e);if(g>-1)l=g;else for(var f=0;f<p.length;f++){var m=r.indexOf(e[f],a+1),x=r.indexOf(t[f],a+1);if(d=m>=0&&(x<0||m<x)?m:x,d<0)continue e;u=d-a-1,u>0&&(a===-1&&(l+=10),l+=u,c=c|1<<f),a=d}}i.matchMask=c,i.exactMatch=l?0:1,i.$score=(i.score||0)-l,h.push(i)}}return h},o}();_.Autocomplete=L,_.CompletionProvider=T,_.FilteredList=v}),ace.define("ace/ext/menu_tools/settings_menu.css",["require","exports","module"],function(b,_,$){$.exports=`#ace_settingsmenu, #kbshortcutmenu {
- background-color: #F7F7F7;
- color: black;
- box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);
- padding: 1em 0.5em 2em 1em;
- overflow: auto;
- position: absolute;
- margin: 0;
- bottom: 0;
- right: 0;
- top: 0;
- z-index: 9991;
- cursor: default;
- }
- .ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {
- box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);
- background-color: rgba(255, 255, 255, 0.6);
- color: black;
- }
- .ace_optionsMenuEntry:hover {
- background-color: rgba(100, 100, 100, 0.1);
- transition: all 0.3s
- }
- .ace_closeButton {
- background: rgba(245, 146, 146, 0.5);
- border: 1px solid #F48A8A;
- border-radius: 50%;
- padding: 7px;
- position: absolute;
- right: -8px;
- top: -8px;
- z-index: 100000;
- }
- .ace_closeButton{
- background: rgba(245, 146, 146, 0.9);
- }
- .ace_optionsMenuKey {
- color: darkslateblue;
- font-weight: bold;
- }
- .ace_optionsMenuCommand {
- color: darkcyan;
- font-weight: normal;
- }
- .ace_optionsMenuEntry input, .ace_optionsMenuEntry button {
- vertical-align: middle;
- }
- .ace_optionsMenuEntry button[ace_selected_button=true] {
- background: #e7e7e7;
- box-shadow: 1px 0px 2px 0px #adadad inset;
- border-color: #adadad;
- }
- .ace_optionsMenuEntry button {
- background: white;
- border: 1px solid lightgray;
- margin: 0px;
- }
- .ace_optionsMenuEntry button:hover{
- background: #f0f0f0;
- }`}),ace.define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom","ace/ext/menu_tools/settings_menu.css"],function(b,_,$){var P=b("../../lib/dom"),M=b("./settings_menu.css");P.importCssString(M,"settings_menu.css",!1),$.exports.overlayPage=function(y,C,w){var S=document.createElement("div"),H=!1;function O(T){T.keyCode===27&&N()}function N(){S&&(document.removeEventListener("keydown",O),S.parentNode.removeChild(S),y&&y.focus(),S=null,w&&w())}function L(T){H=T,T&&(S.style.pointerEvents="none",C.style.pointerEvents="auto")}return S.style.cssText="margin: 0; padding: 0; position: fixed; top:0; bottom:0; left:0; right:0;z-index: 9990; "+(y?"background-color: rgba(0, 0, 0, 0.3);":""),S.addEventListener("click",function(T){H||N()}),document.addEventListener("keydown",O),C.addEventListener("click",function(T){T.stopPropagation()}),S.appendChild(C),document.body.appendChild(S),y&&y.blur(),{close:N,setIgnoreFocusOut:L}}}),ace.define("ace/ext/modelist",["require","exports","module"],function(b,_,$){var P=[];function M(T){for(var v=w.text,o=T.split(/[\/\\]/).pop(),s=0;s<P.length;s++)if(P[s].supportsFile(o)){v=P[s];break}return v}var k=function(){function T(v,o,s){this.name=v,this.caption=o,this.mode="ace/mode/"+v,this.extensions=s;var p;/\^/.test(s)?p=s.replace(/\|(\^)?/g,function(h,t){return"$|"+(t?"^":"^.*\\.")})+"$":p="^.*\\.("+s+")$",this.extRe=new RegExp(p,"gi")}return T.prototype.supportsFile=function(v){return v.match(this.extRe)},T}(),y={ABAP:["abap"],ABC:["abc"],ActionScript:["as"],ADA:["ada|adb"],Alda:["alda"],Apache_Conf:["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],Apex:["apex|cls|trigger|tgr"],AQL:["aql"],AsciiDoc:["asciidoc|adoc"],ASL:["dsl|asl|asl.json"],Assembly_x86:["asm|a"],AutoHotKey:["ahk"],BatchFile:["bat|cmd"],BibTeX:["bib"],C_Cpp:["cpp|c|cc|cxx|h|hh|hpp|ino"],C9Search:["c9search_results"],Cirru:["cirru|cr"],Clojure:["clj|cljs"],Cobol:["CBL|COB"],coffee:["coffee|cf|cson|^Cakefile"],ColdFusion:["cfm|cfc"],Crystal:["cr"],CSharp:["cs"],Csound_Document:["csd"],Csound_Orchestra:["orc"],Csound_Score:["sco"],CSS:["css"],Curly:["curly"],D:["d|di"],Dart:["dart"],Diff:["diff|patch"],Dockerfile:["^Dockerfile"],Dot:["dot"],Drools:["drl"],Edifact:["edi"],Eiffel:["e|ge"],EJS:["ejs"],Elixir:["ex|exs"],Elm:["elm"],Erlang:["erl|hrl"],Forth:["frt|fs|ldr|fth|4th"],Fortran:["f|f90"],FSharp:["fsi|fs|ml|mli|fsx|fsscript"],FSL:["fsl"],FTL:["ftl"],Gcode:["gcode"],Gherkin:["feature"],Gitignore:["^.gitignore"],Glsl:["glsl|frag|vert"],Gobstones:["gbs"],golang:["go"],GraphQLSchema:["gql"],Groovy:["groovy"],HAML:["haml"],Handlebars:["hbs|handlebars|tpl|mustache"],Haskell:["hs"],Haskell_Cabal:["cabal"],haXe:["hx"],Hjson:["hjson"],HTML:["html|htm|xhtml|vue|we|wpy"],HTML_Elixir:["eex|html.eex"],HTML_Ruby:["erb|rhtml|html.erb"],INI:["ini|conf|cfg|prefs"],Io:["io"],Ion:["ion"],Jack:["jack"],Jade:["jade|pug"],Java:["java"],JavaScript:["js|jsm|jsx|cjs|mjs"],JEXL:["jexl"],JSON:["json"],JSON5:["json5"],JSONiq:["jq"],JSP:["jsp"],JSSM:["jssm|jssm_state"],JSX:["jsx"],Julia:["jl"],Kotlin:["kt|kts"],LaTeX:["tex|latex|ltx|bib"],Latte:["latte"],LESS:["less"],Liquid:["liquid"],Lisp:["lisp"],LiveScript:["ls"],Log:["log"],LogiQL:["logic|lql"],Logtalk:["lgt"],LSL:["lsl"],Lua:["lua"],LuaPage:["lp"],Lucene:["lucene"],Makefile:["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],Markdown:["md|markdown"],Mask:["mask"],MATLAB:["matlab"],Maze:["mz"],MediaWiki:["wiki|mediawiki"],MEL:["mel"],MIPS:["s|asm"],MIXAL:["mixal"],MUSHCode:["mc|mush"],MySQL:["mysql"],Nginx:["nginx|conf"],Nim:["nim"],Nix:["nix"],NSIS:["nsi|nsh"],Nunjucks:["nunjucks|nunjs|nj|njk"],ObjectiveC:["m|mm"],OCaml:["ml|mli"],Odin:["odin"],PartiQL:["partiql|pql"],Pascal:["pas|p"],Perl:["pl|pm"],pgSQL:["pgsql"],PHP:["php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],PHP_Laravel_blade:["blade.php"],Pig:["pig"],PLSQL:["plsql"],Powershell:["ps1"],Praat:["praat|praatscript|psc|proc"],Prisma:["prisma"],Prolog:["plg|prolog"],Properties:["properties"],Protobuf:["proto"],Puppet:["epp|pp"],Python:["py"],QML:["qml"],R:["r"],Raku:["raku|rakumod|rakutest|p6|pl6|pm6"],Razor:["cshtml|asp"],RDoc:["Rd"],Red:["red|reds"],RHTML:["Rhtml"],Robot:["robot|resource"],RST:["rst"],Ruby:["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],Rust:["rs"],SaC:["sac"],SASS:["sass"],SCAD:["scad"],Scala:["scala|sbt"],Scheme:["scm|sm|rkt|oak|scheme"],Scrypt:["scrypt"],SCSS:["scss"],SH:["sh|bash|^.bashrc"],SJS:["sjs"],Slim:["slim|skim"],Smarty:["smarty|tpl"],Smithy:["smithy"],snippets:["snippets"],Soy_Template:["soy"],Space:["space"],SPARQL:["rq"],SQL:["sql"],SQLServer:["sqlserver"],Stylus:["styl|stylus"],SVG:["svg"],Swift:["swift"],Tcl:["tcl"],Terraform:["tf","tfvars","terragrunt"],Tex:["tex"],Text:["txt"],Textile:["textile"],Toml:["toml"],TSX:["tsx"],Turtle:["ttl"],Twig:["twig|swig"],Typescript:["ts|typescript|str"],Vala:["vala"],VBScript:["vbs|vb"],Velocity:["vm"],Verilog:["v|vh|sv|svh"],VHDL:["vhd|vhdl"],Visualforce:["vfp|component|page"],Wollok:["wlk|wpgm|wtest"],XML:["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"],XQuery:["xq"],YAML:["yaml|yml"],Zeek:["zeek|bro"],Django:["html"]},C={ObjectiveC:"Objective-C",CSharp:"C#",golang:"Go",C_Cpp:"C and C++",Csound_Document:"Csound Document",Csound_Orchestra:"Csound",Csound_Score:"Csound Score",coffee:"CoffeeScript",HTML_Ruby:"HTML (Ruby)",HTML_Elixir:"HTML (Elixir)",FTL:"FreeMarker",PHP_Laravel_blade:"PHP (Blade Template)",Perl6:"Perl 6",AutoHotKey:"AutoHotkey / AutoIt"},w={};for(var S in y){var H=y[S],O=(C[S]||S).replace(/_/g," "),N=S.toLowerCase(),L=new k(N,O,H[0]);w[N]=L,P.push(L)}$.exports={getModeForPath:M,modes:P,modesByName:w}}),ace.define("ace/ext/prompt",["require","exports","module","ace/config","ace/range","ace/lib/dom","ace/autocomplete","ace/autocomplete/popup","ace/autocomplete/popup","ace/undomanager","ace/tokenizer","ace/ext/menu_tools/overlay_page","ace/ext/modelist"],function(b,_,$){var P=b("../config").nls,M=b("../range").Range,k=b("../lib/dom"),y=b("../autocomplete").FilteredList,C=b("../autocomplete/popup").AcePopup,w=b("../autocomplete/popup").$singleLineEditor,S=b("../undomanager").UndoManager,H=b("../tokenizer").Tokenizer,O=b("./menu_tools/overlay_page").overlayPage,N=b("./modelist"),L;function T(v,o,s,p){if(typeof o=="object")return T(v,"",o,s);if(L){var h=L;if(v=h.editor,h.close(),h.name&&h.name==s.name)return}if(s.$type)return T[s.$type](v,p);var t=w();t.session.setUndoManager(new S);var e=k.buildDom(["div",{class:"ace_prompt_container"+(s.hasDescription?" input-box-with-description":"")}]),n=O(v,e,d);if(e.appendChild(t.container),v&&(v.cmdLine=t,t.setOption("fontSize",v.getOption("fontSize"))),o&&t.setValue(o,1),s.selection&&t.selection.setRange({start:t.session.doc.indexToPosition(s.selection[0]),end:t.session.doc.indexToPosition(s.selection[1])}),s.getCompletions){var i=new C;i.renderer.setStyle("ace_autocomplete_inline"),i.container.style.display="block",i.container.style.maxWidth="600px",i.container.style.width="100%",i.container.style.marginTop="3px",i.renderer.setScrollMargin(2,2,0,0),i.autoSelect=!1,i.renderer.$maxLines=15,i.setRow(-1),i.on("click",function(f){var m=i.getData(i.getRow());m.error||(t.setValue(m.value||m.name||m),c(),f.stop())}),e.appendChild(i.container),u()}if(s.$rules){var r=new H(s.$rules);t.session.bgTokenizer.setTokenizer(r)}if(s.placeholder&&t.setOption("placeholder",s.placeholder),s.hasDescription){var a=k.buildDom(["div",{class:"ace_prompt_text_container"}]);k.buildDom(s.prompt||"Press 'Enter' to confirm or 'Escape' to cancel",a),e.appendChild(a)}n.setIgnoreFocusOut(s.ignoreFocusOut);function c(){var f;i&&i.getCursorPosition().row>0?f=g():f=t.getValue();var m=i?i.getData(i.getRow()):f;m&&!m.error&&(d(),s.onAccept&&s.onAccept({value:f,item:m},t))}var l={Enter:c,"Esc|Shift-Esc":function(){s.onCancel&&s.onCancel(t.getValue(),t),d()}};i&&Object.assign(l,{Up:function(f){i.goTo("up"),g()},Down:function(f){i.goTo("down"),g()},"Ctrl-Up|Ctrl-Home":function(f){i.goTo("start"),g()},"Ctrl-Down|Ctrl-End":function(f){i.goTo("end"),g()},Tab:function(f){i.goTo("down"),g()},PageUp:function(f){i.gotoPageUp(),g()},PageDown:function(f){i.gotoPageDown(),g()}}),t.commands.bindKeys(l);function d(){n.close(),p&&p(),L=null}t.on("input",function(){s.onInput&&s.onInput(),u()});function u(){if(s.getCompletions){var f;s.getPrefix&&(f=s.getPrefix(t));var m=s.getCompletions(t);i.setData(m,f),i.resize(!0)}}function g(){var f=i.getData(i.getRow());if(f&&!f.error)return f.value||f.caption||f}t.resize(!0),i&&i.resize(!0),t.focus(),L={close:d,name:s.name,editor:v}}T.gotoLine=function(v,o){function s(p){return Array.isArray(p)||(p=[p]),p.map(function(h){var t=h.isBackwards?h.start:h.end,e=h.isBackwards?h.end:h.start,n=e.row,i=n+1+":"+e.column;return e.row==t.row?e.column!=t.column&&(i+=">:"+t.column):i+=">"+(t.row+1)+":"+t.column,i}).reverse().join(", ")}T(v,":"+s(v.selection.toJSON()),{name:"gotoLine",selection:[1,Number.MAX_VALUE],onAccept:function(p){var h=p.value,t=T.gotoLine._history;t||(T.gotoLine._history=t=[]),t.indexOf(h)!=-1&&t.splice(t.indexOf(h),1),t.unshift(h),t.length>20&&(t.length=20);var e=v.getCursorPosition(),n=[];h.replace(/^:/,"").split(/,/).map(function(r){var a=r.split(/([<>:+-]|c?\d+)|[^c\d<>:+-]+/).filter(Boolean),c=0;function l(){var u=a[c++];if(u){if(u[0]=="c"){var g=parseInt(u.slice(1))||0;return v.session.doc.indexToPosition(g)}var f=e.row,m=0;return/\d/.test(u)&&(f=parseInt(u)-1,u=a[c++]),u==":"&&(u=a[c++],/\d/.test(u)&&(m=parseInt(u)||0)),{row:f,column:m}}}e=l();var d=M.fromPoints(e,e);a[c]==">"?(c++,d.end=l()):a[c]=="<"&&(c++,d.start=l()),n.unshift(d)}),v.selection.fromJSON(n);var i=v.renderer.scrollTop;v.renderer.scrollSelectionIntoView(v.selection.anchor,v.selection.cursor,.5),v.renderer.animateScrolling(i)},history:function(){return T.gotoLine._history?T.gotoLine._history:[]},getCompletions:function(p){var h=p.getValue(),t=h.replace(/^:/,"").split(":"),e=Math.min(parseInt(t[0])||1,v.session.getLength())-1,n=v.session.getLine(e),i=h+" "+n;return[i].concat(this.history())},$rules:{start:[{regex:/\d+/,token:"string"},{regex:/[:,><+\-c]/,token:"keyword"}]}})},T.commands=function(v,o){function s(e){return(e||"").replace(/^./,function(n){return n.toUpperCase(n)}).replace(/[a-z][A-Z]/g,function(n){return n[0]+" "+n[1].toLowerCase(n)})}function p(e){var n=[],i={};return v.keyBinding.$handlers.forEach(function(r){var a=r.platform,c=r.byName;for(var l in c){var d=c[l].bindKey;typeof d!="string"&&(d=d&&d[a]||"");var u=c[l],g=u.description||s(u.name);Array.isArray(u)||(u=[u]),u.forEach(function(f){typeof f!="string"&&(f=f.name);var m=e.find(function(x){return x===f});m||(i[f]?i[f].key+="|"+d:(i[f]={key:d,command:f,description:g},n.push(i[f])))})}}),n}var h=["insertstring","inserttext","setIndentation","paste"],t=p(h);t=t.map(function(e){return{value:e.description,meta:e.key,command:e.command}}),T(v,"",{name:"commands",selection:[0,Number.MAX_VALUE],maxHistoryCount:5,onAccept:function(e){if(e.item){var n=e.item.command;this.addToHistory(e.item),v.execCommand(n)}},addToHistory:function(e){var n=this.history();n.unshift(e),delete e.message;for(var i=1;i<n.length;i++)if(n[i].command==e.command){n.splice(i,1);break}this.maxHistoryCount>0&&n.length>this.maxHistoryCount&&n.splice(n.length-1,1),T.commands.history=n},history:function(){return T.commands.history||[]},getPrefix:function(e){var n=e.getCursorPosition(),i=e.getValue();return i.substring(0,n.column)},getCompletions:function(e){function n(d,u){var g=JSON.parse(JSON.stringify(d)),f=new y(g);return f.filterCompletions(g,u)}function i(d,u){if(!u||!u.length)return d;var g=[];u.forEach(function(m){g.push(m.command)});var f=[];return d.forEach(function(m){g.indexOf(m.command)===-1&&f.push(m)}),f}var r=this.getPrefix(e),a=n(this.history(),r),c=i(t,a);c=n(c,r),a.length&&c.length&&(a[0].message=P("Recently used"),c[0].message=P("Other commands"));var l=a.concat(c);return l.length>0?l:[{value:P("No matching commands"),error:1}]}})},T.modes=function(v,o){var s=N.modes;s=s.map(function(p){return{value:p.caption,mode:p.name}}),T(v,"",{name:"modes",selection:[0,Number.MAX_VALUE],onAccept:function(p){if(p.item){var h="ace/mode/"+p.item.mode;v.session.setMode(h)}},getPrefix:function(p){var h=p.getCursorPosition(),t=p.getValue();return t.substring(0,h.column)},getCompletions:function(p){function h(n,i){var r=JSON.parse(JSON.stringify(n)),a=new y(r);return a.filterCompletions(r,i)}var t=this.getPrefix(p),e=h(s,t);return e.length>0?e:[{caption:"No mode matching",value:"No mode matching",error:1}]}})},k.importCssString(`.ace_prompt_container {
- max-width: 603px;
- width: 100%;
- margin: 20px auto;
- padding: 3px;
- background: white;
- border-radius: 2px;
- box-shadow: 0px 2px 3px 0px #555;
- }`,"promtp.css",!1),_.prompt=T}),function(){ace.require(["ace/ext/prompt"],function(b){U&&(U.exports=b)})}()})(K);var X=K.exports;const ee=Z(X),ne=q({__proto__:null,default:ee},[X]);export{ne as e};
|