web-interface.assets.3a63e353521a34152fc2861ce1368f58.js Maven / Gradle / Ivy
(()=>{var Q=(v,M)=>()=>(M||v((M={exports:{}}).exports,M),M.exports);var Y=Q((W,G)=>{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(v,M,H){"use strict";var A=v("../virtual_renderer").VirtualRenderer,k=v("../editor").Editor,L=v("../range").Range,S=v("../lib/event"),C=v("../lib/lang"),y=v("../lib/dom"),T=v("../config").nls,P=function(R){return"suggest-aria-id:".concat(R)},N=function(R){var x=new A(R);x.$maxLines=4;var b=new k(x);return b.setHighlightActiveLine(!1),b.setShowPrintMargin(!1),b.renderer.setShowGutter(!1),b.renderer.setHighlightGutterLine(!1),b.$mouseHandler.$focusTimeout=0,b.$highlightTagPending=!0,b},O=function(){function R(x){var b=y.createElement("div"),h=new N(b);x&&x.appendChild(b),b.style.display="none",h.renderer.content.style.cursor="default",h.renderer.setStyle("ace_autocomplete"),h.renderer.$textLayer.element.setAttribute("role","listbox"),h.renderer.$textLayer.element.setAttribute("aria-label",T("Autocomplete suggestions")),h.renderer.textarea.setAttribute("aria-hidden","true"),h.setOption("displayIndentGuides",!1),h.setOption("dragDelay",150);var u=function(){};h.focus=u,h.$isFocused=!0,h.renderer.$cursorLayer.restartTimer=u,h.renderer.$cursorLayer.element.style.opacity=0,h.renderer.$maxLines=8,h.renderer.$keepTextAreaAtCursor=!1,h.setHighlightActiveLine(!1),h.session.highlight(""),h.session.$searchHighlight.clazz="ace_highlight-marker",h.on("mousedown",function(i){var r=i.getDocumentPosition();h.selection.moveToPosition(r),n.start.row=n.end.row=r.row,i.stop()});var s,c=new L(-1,0,-1,1/0),n=new L(-1,0,-1,1/0);n.id=h.session.addMarker(n,"ace_active-line","fullLine"),h.setSelectOnHover=function(i){i?c.id&&(h.session.removeMarker(c.id),c.id=null):c.id=h.session.addMarker(c,"ace_line-hover","fullLine")},h.setSelectOnHover(!1),h.on("mousemove",function(i){if(!s){s=i;return}if(!(s.x==i.x&&s.y==i.y)){s=i,s.scrollTop=h.renderer.scrollTop,h.isMouseOver=!0;var r=s.getDocumentPosition().row;c.start.row!=r&&(c.id||h.setRow(r),t(r))}}),h.renderer.on("beforeRender",function(){if(s&&c.start.row!=-1){s.$pos=null;var i=s.getDocumentPosition().row;c.id||h.setRow(i),t(i,!0)}}),h.renderer.on("afterRender",function(){var i=h.getRow(),r=h.renderer.$textLayer,l=r.element.childNodes[i-r.config.firstRow],a=document.activeElement;if(l!==r.selectedNode&&r.selectedNode&&(y.removeCssClass(r.selectedNode,"ace_selected"),a.removeAttribute("aria-activedescendant"),r.selectedNode.removeAttribute("id")),r.selectedNode=l,l){y.addCssClass(l,"ace_selected");var f=P(i);l.id=f,r.element.setAttribute("aria-activedescendant",f),a.setAttribute("aria-activedescendant",f),l.setAttribute("role","option"),l.setAttribute("aria-label",h.getData(i).value),l.setAttribute("aria-setsize",h.data.length),l.setAttribute("aria-posinset",i+1),l.setAttribute("aria-describedby","doc-tooltip")}});var e=function(){t(-1)},t=function(i,r){i!==c.start.row&&(c.start.row=c.end.row=i,r||h.session._emit("changeBackMarker"),h._emit("changeHoverMarker"))};h.getHoveredRow=function(){return c.start.row},S.addListener(h.container,"mouseout",function(){h.isMouseOver=!1,e()}),h.on("hide",e),h.on("changeSelection",e),h.session.doc.getLength=function(){return h.data.length},h.session.doc.getLine=function(i){var r=h.data[i];return typeof r=="string"?r:r&&r.value||""};var o=h.session.bgTokenizer;return o.$tokenizeRow=function(i){var r=h.data[i],l=[];if(!r)return l;typeof r=="string"&&(r={value:r});var a=r.caption||r.value||r.name;function f(I,z){I&&l.push({type:(r.className||"")+(z||""),value:I})}for(var p=a.toLowerCase(),g=(h.filterText||"").toLowerCase(),d=0,m=0,w=0;w<=g.length;w++)if(w!=m&&(r.matchMask&1<=m?l="bottom":l="top"),l==="top"?(w.bottom=i.top-this.$borderSize,w.top=w.bottom-m):l==="bottom"&&(w.top=i.top+r+this.$borderSize,w.bottom=w.top+m);var I=w.top>=0&&w.bottom<=p;if(!a&&!I)return!1;I?d.$maxPixelHeight=null:l==="top"?d.$maxPixelHeight=F:d.$maxPixelHeight=_,l==="top"?(f.style.top="",f.style.bottom=p-w.bottom+"px",h.isTopdown=!1):(f.style.top=w.top+"px",f.style.bottom="",h.isTopdown=!0),f.style.display="";var z=i.left;return z+f.offsetWidth>g&&(z=g-f.offsetWidth),f.style.left=z+"px",f.style.right="",h.isOpen||(h.isOpen=!0,this._signal("show"),s=null),h.anchorPos=i,h.anchor=l,!0},h.show=function(i,r,l){this.tryShow(i,r,l?"bottom":void 0,!0)},h.goTo=function(i){var r=this.getRow(),l=this.session.getLength()-1;switch(i){case"up":r=r<=0?l:r-1;break;case"down":r=r>=l?-1:r+1;break;case"start":r=0;break;case"end":r=l;break}this.setRow(r)},h.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},h.$imageSize=0,h.$borderSize=1,h}return R}();y.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),M.AcePopup=O,M.$singleLineEditor=N,M.getAriaId=P});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(v,M,H){"use strict";var A=v("./lib/dom"),k=v("./lib/oop"),L=v("./lib/event_emitter").EventEmitter,S=v("./lib/lang"),C=v("./range").Range,y=v("./range_list").RangeList,T=v("./keyboard/hash_handler").HashHandler,P=v("./tokenizer").Tokenizer,N=v("./clipboard"),O={CURRENT_WORD:function(n){return n.session.getTextRange(n.session.getWordRange())},SELECTION:function(n,e,t){var o=n.session.getTextRange();return t?o.replace(/\n\r?([ \t]*\S)/g,`
`+t+"$1"):o},CURRENT_LINE:function(n){return n.session.getLine(n.getCursorPosition().row)},PREV_LINE:function(n){return n.session.getLine(n.getCursorPosition().row-1)},LINE_INDEX:function(n){return n.getCursorPosition().row},LINE_NUMBER:function(n){return n.getCursorPosition().row+1},SOFT_TABS:function(n){return n.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(n){return n.session.getTabSize()},CLIPBOARD:function(n){return N.getText&&N.getText()},FILENAME:function(n){return/[^/\\]*$/.exec(this.FILEPATH(n))[0]},FILENAME_BASE:function(n){return/[^/\\]*$/.exec(this.FILEPATH(n))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(n){return this.FILEPATH(n).replace(/[^/\\]*$/,"")},FILEPATH:function(n){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(n){var e=n.session.$mode||{};return e.blockComment&&e.blockComment.start||""},BLOCK_COMMENT_END:function(n){var e=n.session.$mode||{};return e.blockComment&&e.blockComment.end||""},LINE_COMMENT:function(n){var e=n.session.$mode||{};return e.lineCommentStart||""},CURRENT_YEAR:R.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:R.bind(null,{year:"2-digit"}),CURRENT_MONTH:R.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:R.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:R.bind(null,{month:"short"}),CURRENT_DATE:R.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:R.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:R.bind(null,{weekday:"short"}),CURRENT_HOUR:R.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:R.bind(null,{minute:"2-digit"}),CURRENT_SECOND:R.bind(null,{second:"2-digit"})};O.SELECTED_TEXT=O.SELECTION;function R(n){var e=new Date().toLocaleString("en-us",n);return e.length==1?"0"+e:e}var x=function(){function n(){this.snippetMap={},this.snippetNameMap={},this.variables=O}return n.prototype.getTokenizer=function(){return n.$tokenizer||this.createTokenizer()},n.prototype.createTokenizer=function(){function e(i){return i=i.substr(1),/^\d+$/.test(i)?[{tabstopId:parseInt(i,10)}]:[{text:i}]}function t(i){return"(?:[^\\\\"+i+"]|\\\\.)"}var o={regex:"/("+t("/")+"+)/",onMatch:function(i,r,l){var a=l[0];return a.fmtString=!0,a.guard=i.slice(1,-1),a.flag="",""},next:"formatString"};return n.$tokenizer=new P({start:[{regex:/\\./,onMatch:function(i,r,l){var a=i[1];return(a=="}"&&l.length||"`$\\".indexOf(a)!=-1)&&(i=a),[i]}},{regex:/}/,onMatch:function(i,r,l){return[l.length?l.shift():i]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(i,r,l){var a=e(i.substr(1));return l.unshift(a[0]),a},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(i,r,l){var a=i.slice(1,-1).replace(/\\[,|\\]|,/g,function(f){return f.length==2?f[1]:"\0"}).split("\0").map(function(f){return{value:f}});return l[0].choices=a,[a[0]]},next:"start"},o,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(i,r,l){return l.length&&l[0].expectElse?(l[0].expectElse=!1,l[0].ifEnd={elseEnd:l[0]},[l[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(i,r,l){var a=i[1];return a=="}"&&l.length||"`$\\".indexOf(a)!=-1?i=a:a=="n"?i=`
`:a=="t"?i=" ":"ulULE".indexOf(a)!=-1&&(i={changeCase:a,local:a>"a"}),[i]}},{regex:"/\\w*}",onMatch:function(i,r,l){var a=l.shift();return a&&(a.flag=i.slice(1,-1)),this.next=a&&a.tabstopId?"start":"",[a||i]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(i,r,l){return[{text:i.slice(1)}]}},{regex:/\${\w+/,onMatch:function(i,r,l){var a={text:i.slice(2)};return l.unshift(a),[a]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(i,r,l){var a=l.shift();return this.next=a&&a.tabstopId?"start":"",[a||i]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(i,r,l){var a=l[0];return a.formatFunction=i.slice(2,-1),[l.shift()]},next:"formatString"},o,{regex:/:[\?\-+]?/,onMatch:function(i,r,l){i[1]=="+"&&(l[0].ifEnd=l[0]),i[1]=="?"&&(l[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),n.$tokenizer},n.prototype.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(o){return o.value||o})},n.prototype.getVariableValue=function(e,t,o){if(/^\d+$/.test(t))return(this.variables.__||{})[t]||"";if(/^[A-Z]\d+$/.test(t))return(this.variables[t[0]+"__"]||{})[t.substr(1)]||"";if(t=t.replace(/^TM_/,""),!this.variables.hasOwnProperty(t))return"";var i=this.variables[t];return typeof i=="function"&&(i=this.variables[t](e,t,o)),i==null?"":i},n.prototype.tmStrFormat=function(e,t,o){if(!t.fmt)return e;var i=t.flag||"",r=t.guard;r=new RegExp(r,i.replace(/[^gim]/g,""));var l=typeof t.fmt=="string"?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,a=this,f=e.replace(r,function(){var p=a.variables.__;a.variables.__=[].slice.call(arguments);for(var g=a.resolveVariables(l,o),d="E",m=0;m=0&&f.splice(p,1)}}e.content?r(e):Array.isArray(e)&&e.forEach(r)},n.prototype.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t=[],o={},i=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,r;r=i.exec(e);){if(r[1])try{o=JSON.parse(r[1]),t.push(o)}catch{}if(r[4])o.content=r[4].replace(/^\t/gm,""),t.push(o),o={};else{var l=r[2],a=r[3];if(l=="regex"){var f=/\/((?:[^\/\\]|\\.)*)|$/g;o.guard=f.exec(a)[1],o.trigger=f.exec(a)[1],o.endTrigger=f.exec(a)[1],o.endGuard=f.exec(a)[1]}else l=="snippet"?(o.tabTrigger=a.match(/^\S*/)[0],o.name||(o.name=a)):l&&(o[l]=a)}}return t},n.prototype.getSnippetByName=function(e,t){var o=this.snippetNameMap,i;return this.getActiveScopes(t).some(function(r){var l=o[r];return l&&(i=l[e]),!!i},this),i},n}();k.implement(x.prototype,L);var b=function(n,e,t){t===void 0&&(t={});var o=n.getCursorPosition(),i=n.session.getLine(o.row),r=n.session.getTabString(),l=i.match(/^\s*/)[0];o.column1?(U=D[D.length-1].length,z+=D.length-1):U+=E.length,J+=E}else E&&(E.start?E.end={row:z,column:U}:E.start={row:z,column:U})}),{text:J,tabstops:f,tokens:a}},h=function(){function n(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=S.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)}return n.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)},n.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},n.prototype.onChange=function(e){for(var t=e.action[0]=="r",o=this.selectedTabstop||{},i=o.parents||{},r=this.tabstops.slice(),l=0;l2&&(this.tabstops.length&&a.push(a.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,a))},n.prototype.addTabstopMarkers=function(e){var t=this.session;e.forEach(function(o){o.markerId||(o.markerId=t.addMarker(o,"ace_snippet-marker","text"))})},n.prototype.removeTabstopMarkers=function(e){var t=this.session;e.forEach(function(o){t.removeMarker(o.markerId),o.markerId=null})},n.prototype.removeRange=function(e){var t=e.tabstop.indexOf(e);t!=-1&&e.tabstop.splice(t,1),t=this.ranges.indexOf(e),t!=-1&&this.ranges.splice(t,1),t=e.tabstop.rangeList.ranges.indexOf(e),t!=-1&&e.tabstop.splice(t,1),this.session.removeMarker(e.markerId),e.tabstop.length||(t=this.tabstops.indexOf(e.tabstop),t!=-1&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},n}();h.prototype.keyboardHandler=new T,h.prototype.keyboardHandler.bindKeys({Tab:function(n){M.snippetManager&&M.snippetManager.expandWithTab(n)||(n.tabstopManager.tabNext(1),n.renderer.scrollCursorIntoView())},"Shift-Tab":function(n){n.tabstopManager.tabNext(-1),n.renderer.scrollCursorIntoView()},Esc:function(n){n.tabstopManager.detach()}});var u=function(n,e){n.row==0&&(n.column+=e.column),n.row+=e.row},s=function(n,e){n.row==e.row&&(n.column-=e.column),n.row-=e.row};A.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),M.snippetManager=new x;var c=v("./editor").Editor;(function(){this.insertSnippet=function(n,e){return M.snippetManager.insertSnippet(this,n,e)},this.expandSnippet=function(n){return M.snippetManager.expandWithTab(this,n)}}).call(c.prototype)});ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(v,M,H){"use strict";var A=function(){function k(L){this.editor=L,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return k.prototype.setScreenReaderContent=function(L){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",(function(){var C=this.popup.getRow(),y=this.popup.renderer.$textLayer,T=y.element.childNodes[C-y.config.firstRow];if(T){for(var P="doc-tooltip ",N=0;N=0&&S.test(k[y]);y--)C.push(k[y]);return C.reverse().join("")},M.retrieveFollowingIdentifier=function(k,L,S){S=S||A;for(var C=[],y=L;y=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},u.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,c=[];s;)c.push(s),s.addEventListener("scroll",this.onLayoutChange,{passive:!0}),s=s.parentNode;this.$elements=c}},u.prototype.unObserveLayoutChanges=function(){var s=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(c){c.removeEventListener("scroll",s.onLayoutChange,{passive:!0})}),this.$elements=null},u.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},u.prototype.$updatePopupPosition=function(){var s=this.editor,c=s.renderer,n=c.layerConfig.lineHeight,e=c.$cursorLayer.getPixelPosition(this.base,!0);e.left-=this.popup.getTextLeftOffset();var t=s.container.getBoundingClientRect();e.top+=t.top-c.layerConfig.offset,e.left+=t.left-s.renderer.scrollLeft,e.left+=c.gutterWidth;var o={top:e.top,left:e.left};c.$ghostText&&c.$ghostTextWidget&&this.base.row===c.$ghostText.position.row&&(o.top+=c.$ghostTextWidget.el.offsetHeight),!this.popup.tryShow(o,n,"bottom")&&(this.popup.tryShow(e,n,"top")||this.popup.show(e,n))},u.prototype.openPopup=function(s,c,n){this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var e=this.popup.data[this.popup.getRow()];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:S(this.popup.getRow()),inline:this.inlineEnabled}),s.keyBinding.addKeyboardHandler(this.keyboardHandler);var t=this.popup.data.indexOf(e);t&&this.stickySelection?this.popup.setRow(this.autoSelect?t:-1):this.popup.setRow(this.autoSelect?0:-1),n?n&&!c&&this.detach():(this.popup.setTheme(s.getTheme()),this.popup.setFontSize(s.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},u.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()},u.prototype.changeListener=function(s){var c=this.editor.selection.lead;(c.row!=this.base.row||c.columnthis.filterText&&s.lastIndexOf(this.filterText,0)===0)var c=this.filtered;else var c=this.all;this.filterText=s,c=this.filterCompletions(c,this.filterText),c=c.sort(function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)});var n=null;c=c.filter(function(e){var t=e.snippet||e.caption||e.value;return t===n?!1:(n=t,!0)}),this.filtered=c},u.prototype.filterCompletions=function(s,c){var n=[],e=c.toUpperCase(),t=c.toLowerCase();e:for(var o=0,i;i=s[o];o++){var r=!this.ignoreCaption&&i.caption||i.value||i.snippet;if(r){var l=-1,a=0,f=0,p,g;if(this.exactMatch){if(c!==r.substr(0,c.length))continue e}else{var d=r.toLowerCase().indexOf(t);if(d>-1)f=d;else for(var m=0;m=0&&(_<0||w<_)?w:_,p<0)continue e;g=p-l-1,g>0&&(l===-1&&(f+=10),f+=g,a=a|1<0?d=g():d=n.getValue();var m=o?o.getData(o.getRow()):d;m&&!m.error&&(f(),u.onAccept&&u.onAccept({value:d,item:m},n))}var a={Enter:l,"Esc|Shift-Esc":function(){u.onCancel&&u.onCancel(n.getValue(),n),f()}};o&&Object.assign(a,{Up:function(d){o.goTo("up"),g()},Down:function(d){o.goTo("down"),g()},"Ctrl-Up|Ctrl-Home":function(d){o.goTo("start"),g()},"Ctrl-Down|Ctrl-End":function(d){o.goTo("end"),g()},Tab:function(d){o.goTo("down"),g()},PageUp:function(d){o.gotoPageUp(),g()},PageDown:function(d){o.gotoPageDown(),g()}}),n.commands.bindKeys(a);function f(){t.close(),s&&s(),R=null}n.on("input",function(){u.onInput&&u.onInput(),p()});function p(){if(u.getCompletions){var d;u.getPrefix&&(d=u.getPrefix(n));var m=u.getCompletions(n);o.setData(m,d),o.resize(!0)}}function g(){var d=o.getData(o.getRow());if(d&&!d.error)return d.value||d.caption||d}n.resize(!0),o&&o.resize(!0),n.focus(),R={close:f,name:u.name,editor:b}}x.gotoLine=function(b,h){function u(s){return Array.isArray(s)||(s=[s]),s.map(function(c){var n=c.isBackwards?c.start:c.end,e=c.isBackwards?c.end:c.start,t=e.row,o=t+1+":"+e.column;return e.row==n.row?e.column!=n.column&&(o+=">:"+n.column):o+=">"+(n.row+1)+":"+n.column,o}).reverse().join(", ")}x(b,":"+u(b.selection.toJSON()),{name:"gotoLine",selection:[1,Number.MAX_VALUE],onAccept:function(s){var c=s.value,n=x.gotoLine._history;n||(x.gotoLine._history=n=[]),n.indexOf(c)!=-1&&n.splice(n.indexOf(c),1),n.unshift(c),n.length>20&&(n.length=20);var e=b.getCursorPosition(),t=[];c.replace(/^:/,"").split(/,/).map(function(i){var r=i.split(/([<>:+-]|c?\d+)|[^c\d<>:+-]+/).filter(Boolean),l=0;function a(){var p=r[l++];if(p){if(p[0]=="c"){var g=parseInt(p.slice(1))||0;return b.session.doc.indexToPosition(g)}var d=e.row,m=0;return/\d/.test(p)&&(d=parseInt(p)-1,p=r[l++]),p==":"&&(p=r[l++],/\d/.test(p)&&(m=parseInt(p)||0)),{row:d,column:m}}}e=a();var f=k.fromPoints(e,e);r[l]==">"?(l++,f.end=a()):r[l]=="<"&&(l++,f.start=a()),t.unshift(f)}),b.selection.fromJSON(t);var o=b.renderer.scrollTop;b.renderer.scrollSelectionIntoView(b.selection.anchor,b.selection.cursor,.5),b.renderer.animateScrolling(o)},history:function(){return x.gotoLine._history?x.gotoLine._history:[]},getCompletions:function(s){var c=s.getValue(),n=c.replace(/^:/,"").split(":"),e=Math.min(parseInt(n[0])||1,b.session.getLength())-1,t=b.session.getLine(e),o=c+" "+t;return[o].concat(this.history())},$rules:{start:[{regex:/\d+/,token:"string"},{regex:/[:,><+\-c]/,token:"keyword"}]}})},x.commands=function(b,h){function u(e){return(e||"").replace(/^./,function(t){return t.toUpperCase(t)}).replace(/[a-z][A-Z]/g,function(t){return t[0]+" "+t[1].toLowerCase(t)})}function s(e){var t=[],o={};return b.keyBinding.$handlers.forEach(function(i){var r=i.platform,l=i.byName;for(var a in l){var f=l[a].bindKey;typeof f!="string"&&(f=f&&f[r]||"");var p=l[a],g=p.description||u(p.name);Array.isArray(p)||(p=[p]),p.forEach(function(d){typeof d!="string"&&(d=d.name);var m=e.find(function(w){return w===d});m||(o[d]?o[d].key+="|"+f:(o[d]={key:f,command:d,description:g},t.push(o[d])))})}}),t}var c=["insertstring","inserttext","setIndentation","paste"],n=s(c);n=n.map(function(e){return{value:e.description,meta:e.key,command:e.command}}),x(b,"",{name:"commands",selection:[0,Number.MAX_VALUE],maxHistoryCount:5,onAccept:function(e){if(e.item){var t=e.item.command;this.addToHistory(e.item),b.execCommand(t)}},addToHistory:function(e){var t=this.history();t.unshift(e),delete e.message;for(var o=1;o0&&t.length>this.maxHistoryCount&&t.splice(t.length-1,1),x.commands.history=t},history:function(){return x.commands.history||[]},getPrefix:function(e){var t=e.getCursorPosition(),o=e.getValue();return o.substring(0,t.column)},getCompletions:function(e){function t(f,p){var g=JSON.parse(JSON.stringify(f)),d=new S(g);return d.filterCompletions(g,p)}function o(f,p){if(!p||!p.length)return f;var g=[];p.forEach(function(m){g.push(m.command)});var d=[];return f.forEach(function(m){g.indexOf(m.command)===-1&&d.push(m)}),d}var i=this.getPrefix(e),r=t(this.history(),i),l=o(n,r);l=t(l,i),r.length&&l.length&&(r[0].message=A("Recently used"),l[0].message=A("Other commands"));var a=r.concat(l);return a.length>0?a:[{value:A("No matching commands"),error:1}]}})},x.modes=function(b,h){var u=O.modes;u=u.map(function(s){return{value:s.caption,mode:s.name}}),x(b,"",{name:"modes",selection:[0,Number.MAX_VALUE],onAccept:function(s){if(s.item){var c="ace/mode/"+s.item.mode;b.session.setMode(c)}},getPrefix:function(s){var c=s.getCursorPosition(),n=s.getValue();return n.substring(0,c.column)},getCompletions:function(s){function c(t,o){var i=JSON.parse(JSON.stringify(t)),r=new S(i);return r.filterCompletions(i,o)}var n=this.getPrefix(s),e=c(u,n);return e.length>0?e:[{caption:"No mode matching",value:"No mode matching",error:1}]}})},L.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),M.prompt=x});(function(){ace.require(["ace/ext/prompt"],function(v){typeof G=="object"&&typeof W=="object"&&G&&(G.exports=v)})})()});Y();})();
//# sourceMappingURL=3a63e353521a34152fc2861ce1368f58.js.map
© 2015 - 2024 Weber Informatics LLC | Privacy Policy