import{g as Q}from"./index-15e3682d.js";function q(N,j){for(var _=0;_v[k]})}}}return Object.freeze(Object.defineProperty(N,Symbol.toStringTag,{value:"Module"}))}var W={exports:{}};(function(N,j){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,k){var L=_("./lib/dom"),B=_("./lib/oop"),D=_("./lib/event_emitter").EventEmitter,F=_("./lib/lang"),w=_("./range").Range,E=_("./range_list").RangeList,A=_("./keyboard/hash_handler").HashHandler,H=_("./tokenizer").Tokenizer,P=_("./clipboard"),R={CURRENT_WORD:function(a){return a.session.getTextRange(a.session.getWordRange())},SELECTION:function(a,e,t){var r=a.session.getTextRange();return t?r.replace(/\n\r?([ \t]*\S)/g,` `+t+"$1"):r},CURRENT_LINE:function(a){return a.session.getLine(a.getCursorPosition().row)},PREV_LINE:function(a){return a.session.getLine(a.getCursorPosition().row-1)},LINE_INDEX:function(a){return a.getCursorPosition().row},LINE_NUMBER:function(a){return a.getCursorPosition().row+1},SOFT_TABS:function(a){return a.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(a){return a.session.getTabSize()},CLIPBOARD:function(a){return P.getText&&P.getText()},FILENAME:function(a){return/[^/\\]*$/.exec(this.FILEPATH(a))[0]},FILENAME_BASE:function(a){return/[^/\\]*$/.exec(this.FILEPATH(a))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(a){return this.FILEPATH(a).replace(/[^/\\]*$/,"")},FILEPATH:function(a){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(a){var e=a.session.$mode||{};return e.blockComment&&e.blockComment.start||""},BLOCK_COMMENT_END:function(a){var e=a.session.$mode||{};return e.blockComment&&e.blockComment.end||""},LINE_COMMENT:function(a){var e=a.session.$mode||{};return e.lineCommentStart||""},CURRENT_YEAR:T.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:T.bind(null,{year:"2-digit"}),CURRENT_MONTH:T.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:T.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:T.bind(null,{month:"short"}),CURRENT_DATE:T.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:T.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:T.bind(null,{weekday:"short"}),CURRENT_HOUR:T.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:T.bind(null,{minute:"2-digit"}),CURRENT_SECOND:T.bind(null,{second:"2-digit"})};R.SELECTED_TEXT=R.SELECTION;function T(a){var e=new Date().toLocaleString("en-us",a);return e.length==1?"0"+e:e}var I=function(){function a(){this.snippetMap={},this.snippetNameMap={},this.variables=R}return a.prototype.getTokenizer=function(){return a.$tokenizer||this.createTokenizer()},a.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 r={regex:"/("+t("/")+"+)/",onMatch:function(i,s,c){var n=c[0];return n.fmtString=!0,n.guard=i.slice(1,-1),n.flag="",""},next:"formatString"};return a.$tokenizer=new H({start:[{regex:/\\./,onMatch:function(i,s,c){var n=i[1];return(n=="}"&&c.length||"`$\\".indexOf(n)!=-1)&&(i=n),[i]}},{regex:/}/,onMatch:function(i,s,c){return[c.length?c.shift():i]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(i,s,c){var n=e(i.substr(1));return c.unshift(n[0]),n},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(i,s,c){var n=i.slice(1,-1).replace(/\\[,|\\]|,/g,function(u){return u.length==2?u[1]:"\0"}).split("\0").map(function(u){return{value:u}});return c[0].choices=n,[n[0]]},next:"start"},r,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(i,s,c){return c.length&&c[0].expectElse?(c[0].expectElse=!1,c[0].ifEnd={elseEnd:c[0]},[c[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(i,s,c){var n=i[1];return n=="}"&&c.length||"`$\\".indexOf(n)!=-1?i=n:n=="n"?i=` `:n=="t"?i=" ":"ulULE".indexOf(n)!=-1&&(i={changeCase:n,local:n>"a"}),[i]}},{regex:"/\\w*}",onMatch:function(i,s,c){var n=c.shift();return n&&(n.flag=i.slice(1,-1)),this.next=n&&n.tabstopId?"start":"",[n||i]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(i,s,c){return[{text:i.slice(1)}]}},{regex:/\${\w+/,onMatch:function(i,s,c){var n={text:i.slice(2)};return c.unshift(n),[n]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(i,s,c){var n=c.shift();return this.next=n&&n.tabstopId?"start":"",[n||i]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(i,s,c){var n=c[0];return n.formatFunction=i.slice(2,-1),[c.shift()]},next:"formatString"},r,{regex:/:[\?\-+]?/,onMatch:function(i,s,c){i[1]=="+"&&(c[0].ifEnd=c[0]),i[1]=="?"&&(c[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),a.$tokenizer},a.prototype.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(r){return r.value||r})},a.prototype.getVariableValue=function(e,t,r){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,r)),i??""},a.prototype.tmStrFormat=function(e,t,r){if(!t.fmt)return e;var i=t.flag||"",s=t.guard;s=new RegExp(s,i.replace(/[^gim]/g,""));var c=typeof t.fmt=="string"?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,n=this,u=e.replace(s,function(){var o=n.variables.__;n.variables.__=[].slice.call(arguments);for(var d=n.resolveVariables(c,r),p="E",m=0;m=0&&u.splice(o,1)}}e.content?s(e):Array.isArray(e)&&e.forEach(s)},a.prototype.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t=[],r={},i=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,s;s=i.exec(e);){if(s[1])try{r=JSON.parse(s[1]),t.push(r)}catch{}if(s[4])r.content=s[4].replace(/^\t/gm,""),t.push(r),r={};else{var c=s[2],n=s[3];if(c=="regex"){var u=/\/((?:[^\/\\]|\\.)*)|$/g;r.guard=u.exec(n)[1],r.trigger=u.exec(n)[1],r.endTrigger=u.exec(n)[1],r.endGuard=u.exec(n)[1]}else c=="snippet"?(r.tabTrigger=n.match(/^\S*/)[0],r.name||(r.name=n)):c&&(r[c]=n)}}return t},a.prototype.getSnippetByName=function(e,t){var r=this.snippetNameMap,i;return this.getActiveScopes(t).some(function(s){var c=r[s];return c&&(i=c[e]),!!i},this),i},a}();B.implement(I.prototype,D);var l=function(a,e,t){t===void 0&&(t={});var r=a.getCursorPosition(),i=a.session.getLine(r.row),s=a.session.getTabString(),c=i.match(/^\s*/)[0];r.column1?(U=C[C.length-1].length,K+=C.length-1):U+=b.length,Y+=b}else b&&(b.start?b.end={row:K,column:U}:b.start={row:K,column:U})}),{text:Y,tabstops:u,tokens:n}},f=function(){function a(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=F.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)}return a.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)},a.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},a.prototype.onChange=function(e){for(var t=e.action[0]=="r",r=this.selectedTabstop||{},i=r.parents||{},s=this.tabstops.slice(),c=0;c2&&(this.tabstops.length&&n.push(n.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,n))},a.prototype.addTabstopMarkers=function(e){var t=this.session;e.forEach(function(r){r.markerId||(r.markerId=t.addMarker(r,"ace_snippet-marker","text"))})},a.prototype.removeTabstopMarkers=function(e){var t=this.session;e.forEach(function(r){t.removeMarker(r.markerId),r.markerId=null})},a.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())},a}();f.prototype.keyboardHandler=new A,f.prototype.keyboardHandler.bindKeys({Tab:function(a){v.snippetManager&&v.snippetManager.expandWithTab(a)||(a.tabstopManager.tabNext(1),a.renderer.scrollCursorIntoView())},"Shift-Tab":function(a){a.tabstopManager.tabNext(-1),a.renderer.scrollCursorIntoView()},Esc:function(a){a.tabstopManager.detach()}});var h=function(a,e){a.row==0&&(a.column+=e.column),a.row+=e.row},g=function(a,e){a.row==e.row&&(a.column-=e.column),a.row-=e.row};L.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),v.snippetManager=new I;var M=_("./editor").Editor;(function(){this.insertSnippet=function(a,e){return v.snippetManager.insertSnippet(this,a,e)},this.expandSnippet=function(a){return v.snippetManager.expandWithTab(this,a)}}).call(M.prototype)}),ace.define("ace/ext/emmet",["require","exports","module","ace/keyboard/hash_handler","ace/editor","ace/snippets","ace/range","ace/config","resources","resources","tabStops","resources","utils","actions"],function(_,v,k){var L=_("../keyboard/hash_handler").HashHandler,B=_("../editor").Editor,D=_("../snippets").snippetManager,F=_("../range").Range,w=_("../config"),E,A,H=function(){function l(){}return l.prototype.setupContext=function(f){this.ace=f,this.indentation=f.session.getTabString(),E||(E=window.emmet);var h=E.resources||E.require("resources");h.setVariable("indentation",this.indentation),this.$syntax=null,this.$syntax=this.getSyntax()},l.prototype.getSelectionRange=function(){var f=this.ace.getSelectionRange(),h=this.ace.session.doc;return{start:h.positionToIndex(f.start),end:h.positionToIndex(f.end)}},l.prototype.createSelection=function(f,h){var g=this.ace.session.doc;this.ace.selection.setRange({start:g.indexToPosition(f),end:g.indexToPosition(h)})},l.prototype.getCurrentLineRange=function(){var f=this.ace,h=f.getCursorPosition().row,g=f.session.getLine(h).length,M=f.session.doc.positionToIndex({row:h,column:0});return{start:M,end:M+g}},l.prototype.getCaretPos=function(){var f=this.ace.getCursorPosition();return this.ace.session.doc.positionToIndex(f)},l.prototype.setCaretPos=function(f){var h=this.ace.session.doc.indexToPosition(f);this.ace.selection.moveToPosition(h)},l.prototype.getCurrentLine=function(){var f=this.ace.getCursorPosition().row;return this.ace.session.getLine(f)},l.prototype.replaceContent=function(f,h,g,M){g==null&&(g=h??this.getContent().length),h==null&&(h=0);var a=this.ace,e=a.session.doc,t=F.fromPoints(e.indexToPosition(h),e.indexToPosition(g));a.session.remove(t),t.end=t.start,f=this.$updateTabstops(f),D.insertSnippet(a,f)},l.prototype.getContent=function(){return this.ace.getValue()},l.prototype.getSyntax=function(){if(this.$syntax)return this.$syntax;var f=this.ace.session.$modeId.split("/").pop();if(f=="html"||f=="php"){var h=this.ace.getCursorPosition(),g=this.ace.session.getState(h.row);typeof g!="string"&&(g=g[0]),g&&(g=g.split("-"),g.length>1?f=g[0]:f=="php"&&(f="html"))}return f},l.prototype.getProfileName=function(){var f=E.resources||E.require("resources");switch(this.getSyntax()){case"css":return"css";case"xml":case"xsl":return"xml";case"html":var h=f.getVariable("profile");return h||(h=this.ace.session.getLines(0,2).join("").search(/]+XHTML/i)!=-1?"xhtml":"html"),h;default:var g=this.ace.session.$mode;return g.emmetConfig&&g.emmetConfig.profile||"xhtml"}},l.prototype.prompt=function(f){return prompt(f)},l.prototype.getSelection=function(){return this.ace.session.getTextRange()},l.prototype.getFilePath=function(){return""},l.prototype.$updateTabstops=function(f){var h=1e3,g=0,M=null,a=E.tabStops||E.require("tabStops"),e=E.resources||E.require("resources"),t=e.getVocabulary("user"),r={tabstop:function(s){var c=parseInt(s.group,10),n=c===0;n?c=++g:c+=h;var u=s.placeholder;u&&(u=a.processText(u,r));var o="${"+c+(u?":"+u:"")+"}";return n&&(M=[s.start,o]),o},escape:function(s){return s=="$"?"\\$":s=="\\"?"\\\\":s}};if(f=a.processText(f,r),t.variables.insert_final_tabstop&&!/\$\{0\}$/.test(f))f+="${0}";else if(M){var i=E.utils?E.utils.common:E.require("utils");f=i.replaceSubstring(f,"${0}",M[0],M[1])}return f},l}(),P={expand_abbreviation:{mac:"ctrl+alt+e",win:"alt+e"},match_pair_outward:{mac:"ctrl+d",win:"ctrl+,"},match_pair_inward:{mac:"ctrl+j",win:"ctrl+shift+0"},matching_pair:{mac:"ctrl+alt+j",win:"alt+j"},next_edit_point:"alt+right",prev_edit_point:"alt+left",toggle_comment:{mac:"command+/",win:"ctrl+/"},split_join_tag:{mac:"shift+command+'",win:"shift+ctrl+`"},remove_tag:{mac:"command+'",win:"shift+ctrl+;"},evaluate_math_expression:{mac:"shift+command+y",win:"shift+ctrl+y"},increment_number_by_1:"ctrl+up",decrement_number_by_1:"ctrl+down",increment_number_by_01:"alt+up",decrement_number_by_01:"alt+down",increment_number_by_10:{mac:"alt+command+up",win:"shift+alt+up"},decrement_number_by_10:{mac:"alt+command+down",win:"shift+alt+down"},select_next_item:{mac:"shift+command+.",win:"shift+ctrl+."},select_previous_item:{mac:"shift+command+,",win:"shift+ctrl+,"},reflect_css_value:{mac:"shift+command+r",win:"shift+ctrl+r"},encode_decode_data_url:{mac:"shift+ctrl+d",win:"ctrl+'"},expand_abbreviation_with_tab:"Tab",wrap_with_abbreviation:{mac:"shift+ctrl+a",win:"shift+ctrl+a"}},R=new H;v.commands=new L,v.runEmmetCommand=function l(f){if(this.action=="expand_abbreviation_with_tab"){if(!f.selection.isEmpty())return!1;var h=f.selection.lead,g=f.session.getTokenAt(h.row,h.column);if(g&&/\btag\b/.test(g.type))return!1}try{R.setupContext(f);var M=E.actions||E.require("actions");if(this.action=="wrap_with_abbreviation")return setTimeout(function(){M.run("wrap_with_abbreviation",R)},0);var a=M.run(this.action,R)}catch(t){if(!E){var e=v.load(l.bind(this,f));return this.action=="expand_abbreviation_with_tab"?!1:e}f._signal("changeStatus",typeof t=="string"?t:t.message),w.warn(t),a=!1}return a};for(var T in P)v.commands.addCommand({name:"emmet:"+T,action:T,bindKey:P[T],exec:v.runEmmetCommand,multiSelectAction:"forEach"});v.updateCommands=function(l,f){f?l.keyBinding.addKeyboardHandler(v.commands):l.keyBinding.removeKeyboardHandler(v.commands)},v.isSupportedMode=function(l){if(!l)return!1;if(l.emmetConfig)return!0;var f=l.$id||l;return/css|less|scss|sass|stylus|html|php|twig|ejs|handlebars/.test(f)},v.isAvailable=function(l,f){if(/(evaluate_math_expression|expand_abbreviation)$/.test(f))return!0;var h=l.session.$mode,g=v.isSupportedMode(h);if(g&&h.$modes)try{R.setupContext(l),/js|php/.test(R.getSyntax())&&(g=!1)}catch{}return g};var I=function(l,f){var h=f;if(h){var g=v.isSupportedMode(h.session.$mode);l.enableEmmet===!1&&(g=!1),g&&v.load(),v.updateCommands(h,g)}};v.load=function(l){return typeof A!="string"?(w.warn("script for emmet-core is not loaded"),!1):(w.loadModule(A,function(){A=null,l&&l()}),!0)},v.AceEmmetEditor=H,w.defineOptions(B.prototype,"editor",{enableEmmet:{set:function(l){this[l?"on":"removeListener"]("changeMode",I),I({enableEmmet:!!l},this)},value:!0}}),v.setCore=function(l){typeof l=="string"?A=l:E=l}}),function(){ace.require(["ace/ext/emmet"],function(_){N&&(N.exports=_)})}()})(W);var Z=W.exports;const ee=Q(Z),ne=q({__proto__:null,default:ee},[Z]);export{ne as e};