All Downloads are FREE. Search and download functionalities are using the official Maven repository.

web-interface.assets.b17c9c857280ad767bbcaf6728eb4fb1.js Maven / Gradle / Ivy

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

//# sourceMappingURL=b17c9c857280ad767bbcaf6728eb4fb1.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy