@liascript/exporter
Version:
A generic exporter for LiaScript
1 lines • 969 kB
JavaScript
!function(e,t,i,n,o){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof r[n]&&r[n],a=s.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,i){if(!a[t]){if(!e[t]){var o="function"==typeof r[n]&&r[n];if(!i&&o)return o(t,!0);if(s)return s(t,!0);if(l&&"string"==typeof t)return l(t);var h=new Error("Cannot find module '"+t+"'");throw h.code="MODULE_NOT_FOUND",h}d.resolve=function(i){var n=e[t][1][i];return null!=n?n:i},d.cache={};var u=a[t]=new c.Module(t);e[t][0].call(u.exports,d,u,u.exports,this)}return a[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.exports={}},c.modules=e,c.cache=a,c.parent=s,c.register=function(t,i){e[t]=[function(e,t){t.exports=i},{}]},Object.defineProperty(c,"root",{get:function(){return r[n]}}),r[n]=c;for(var h=0;h<t.length;h++)c(t[h]);if(i){var u=c(i);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}}({kYEtV:[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js"),o=e("ace-builds/src-min-noconflict/ace"),r=n.interopDefault(o),s=e("./editor-modes"),a=e("@convergencelabs/ace-collab-ext");e("@convergencelabs/ace-collab-ext/dist/css/ace-collab-ext.min.css");function l(e){return"string"==typeof e&&(e="ace_color_"+e.replace(/ /g,"").replace(/\./g,"").replace(/,/g,"_").replace(/\(/g,"").replace(/\)/g,"")),e}function c(e,t){if(!e)return;const i=l(t||e);if(!document.head.querySelector("style#"+i)){let t=document.createElement("style");t.id=i,t.appendChild(document.createTextNode(`.${i} {\n position:absolute;\n background:${e};\n z-index:20\n }`)),document.getElementsByTagName("head")[0].appendChild(t)}}customElements.define("lia-editor",class extends HTMLElement{_blockUpdate=!1;_blockEvents=!1;_cursors=[];_catchCursorUpdates=!1;_keyBindings={};constructor(){super(),r.default.config.set("basePath","."),this._focus=!1,this._ariaLabel="editor",this._keyBindings={"Ctrl-Enter":{bindKey:{win:"Ctrl-Enter",mac:"Command-Enter"},eventName:"editorCtrlEnter"}},this.model={value:"",theme:"dreamweaver",mode:"text",shared:null,showPrintMargin:!0,highlightActiveLine:!0,firstLineNumber:1,tabSize:4,useSoftTabs:!0,useWrapMode:!1,readOnly:!1,showCursor:!0,showGutter:!0,extensions:[],maxLines:1/0,marker:"",minLines:1,annotations:[],fontSize:"1.5rem",fontFamily:"var(--global-font-mono,)",enableKeyboardAccessibility:!0};let e={error:"rgba(255,0,0,0.3)",warn:"rgba(255,255,102,0.3)",debug:"rgba(100,100,100,0.3)",info:"rgba(0,255,0,0.3)",log:"rgba(0,0,255,0.3)"};try{Object.entries(e).forEach((e=>{const[t,i]=e;c(i,t)}))}catch(e){console.warn("ace.js => ",e)}}connectedCallback(){this.setExtension(),this._editor=r.default.edit(this,{value:this.model.value,theme:"ace/theme/"+this.model.theme,mode:s.getMode(this.model.mode),showPrintMargin:this.model.showPrintMargin,highlightActiveLine:this.model.highlightActiveLine,firstLineNumber:this.model.firstLineNumber,tabSize:this.model.tabSize,useSoftTabs:this.model.useSoftTabs,readOnly:this.model.readOnly,showGutter:this.model.showGutter,minLines:this.model.minLines,maxLines:this.model.maxLines,fontSize:this.model.fontSize,fontFamily:this.model.fontFamily,enableKeyboardAccessibility:this.model.enableKeyboardAccessibility}),this.model.showCursor||(this._editor.renderer.$cursorLayer.element.style.display="none"),this._editor.renderer.setScrollMargin(8,8,0,0),this._editor.getSession().setUseWrapMode(this.model.useWrapMode),this._editor.setAutoScrollEditorIntoView(!0);const e=this._editor.textInput.getElement(),t=function(e,t=500){let i,n=[],o=null;function r(){(n.length>0||i)&&(e(n,i),n=[],i=void 0),o=null}return(e,s)=>{o&&window.clearTimeout(o),null!==e&&n.push(e),s&&(i=s),o=window.setTimeout(r,t)}}(((e,t)=>{e.length>0&&this.dispatchEvent(new CustomEvent("editorUpdateEvent",{detail:e})),t&&this.dispatchEvent(new CustomEvent("editorUpdateCursor",{detail:t}))}));if(e.setAttribute("role","application"),this.model.readOnly)e.setAttribute("aria-label","Code-block in "+this.model.mode+" mode");else{const i=e=>{this._blockEvents||(this.model.value=this._editor.getValue(),this.dispatchEvent(new CustomEvent("editorUpdate",{detail:this.model.value})),this.blockUpdate||t({action:e.action,index:this._editor.getSession().doc.positionToIndex(e.start,0),content:e.lines.join("\n")}))},n=()=>{if(this.catchCursorUpdates&&this._editor){const{start:e,end:i}=this._editor.getSelectionRange(),n=e.row==i.row&&e.column==i.column?[]:[e.row,e.column,i.row,i.column];this.cursorPosition=this._editor.selection.getCursor(),this.cursorPosition&&t(null,{position:this.cursorPosition,selection:n})}};this._editor.on("change",i),this._editor.session.selection.on("changeCursor",n),this.applyKeyBindings(),e.setAttribute("aria-label","Code-editor in "+this.model.mode+" mode")}let i=this;this._editor.on("focus",(function(){i._focus=!0,i.dispatchEvent(new CustomEvent("editorFocus"))})),this._editor.on("blur",(function(){i._focus=!1,i.dispatchEvent(new CustomEvent("editorFocus")),i._editor.clearSelection()})),this.setMarker(),this._focus&&this.setFocus()}disconnectedCallback(){}setOption(e,t){if(this._editor)try{this._editor.setOption(e,t)}catch(i){console.log("Problem Ace: setOption ",e,t," => ",i.toString())}}get annotations(){return this.model.annotations}set annotations(e){if(this.model.annotations!==e&&(this.model.annotations=null==e?[]:e,this._editor))try{this._editor.getSession().setAnnotations(this.model.annotations)}catch(e){console.log("Problem Ace: setAnnotations ",this.model.annotations," => ",e.toString())}}get extensions(){return this.model.extensions}set extensions(e){this.model.extensions!==e&&(this.model.extensions=e,this._editor&&this.setExtension())}setExtension(){for(const e in this.model.extensions)try{r.default.require("ace/ext/"+e)}catch(t){console.log("Problem Ace: require ",e," => ",t.toString())}}get fontSize(){return this.model.fontSize}set fontSize(e){this.model.fontSize!==e&&(this.model.fontSize=e,this.setOption("fontSize",e))}get enableKeyboardAccessibility(){return this.model.enableKeyboardAccessibility}set enableKeyboardAccessibility(e){this.model.enableKeyboardAccessibility!==e&&(this.model.enableKeyboardAccessibility=e,this.setOption("enableKeyboardAccessibility",e))}setMarker(){let e=r.default.require("ace/range").Range,t=this.model.marker.replace("\n","").split(";").filter((e=>""!==e));for(let i=0;i<t.length;i++){let n=t[i].trim().split(" ").map((e=>e.trim())).filter((e=>""!==e));c(n[4]),this._editor.session.addMarker(new e(parseInt(n[0]),parseInt(n[1]),parseInt(n[2]),parseInt(n[3])),l(n[4]),n[5]?n[5]:"fullLine")}}get marker(){return this.model.marker}set marker(e){this.model.marker=e}get firstLineNumber(){return this.model.firstLineNumber}set firstLineNumber(e){this.model.firstLineNumber!==e&&(this.model.firstLineNumber=e,this.setOption("firstLineNumber",e))}get highlightActiveLine(){return this.model.highlightActiveLine}set highlightActiveLine(e){this.model.highlightActiveLine!==e&&(this.model.highlightActiveLine=e,this.setOption("highlightActiveLine",e))}get maxLines(){return this.model.maxLines}set maxLines(e){e=e<0?1/0:e,this.model.maxLines!==e&&(this.model.maxLines=e,this.setOption("maxLines",e))}get minLines(){return this.model.minLines}set minLines(e){e=e<0?1:e,this.model.minLines!==e&&(this.model.minLines=e,this.setOption("minLines",e))}get mode(){return this.model.mode}set mode(e){if(this.model.mode!==e&&(this.model.mode=e,this._editor))try{this._editor.getSession().setMode(s.getMode(e))}catch(t){console.log("Problem Ace: setMode(",e,") => ",t.toString())}}get readOnly(){return this.model.readOnly}set readOnly(e){this.model.readOnly!==e&&(this.model.readOnly=e,this.setOption("readOnly",e))}get showCursor(){return this.model.showCursor}set showCursor(e){this.model.showCursor!==e&&(this.model.showCursor=e,this.setOption("showCursor",e))}get showGutter(){return this.model.showGutter}set showGutter(e){this.model.showGutter!==e&&(this.model.showGutter=e,this.setOption("showGutter",e))}get showPrintMargin(){return this.model.showPrintMargin}set showPrintMargin(e){this.model.showPrintMargin!==e&&(this.model.showPrintMargin=e,this.setOption("showPrintMargin",e))}get tabSize(){return this.model.tabSize}set tabSize(e){this.model.tabSize!==e&&(this.model.tabSize=e,this.setOption("tabSize",e))}get theme(){return this.model.theme}set theme(e){this.model.theme!==e&&""!==e&&(this.model.theme=e,this._editor&&this._editor.setTheme("ace/theme/"+e))}get useSoftTabs(){return this.model.useSoftTabs}set useSoftTabs(e){this.model.useSoftTabs!==e&&(this.model.useSoftTabs=e,this.setOption("useSoftTabs",e))}get useWrapMode(){return this.model.useWrapMode}set useWrapMode(e){this.model.useWrapMode!==e&&(this.model.useWrapMode=e,this.setOption("useWrapMode",e))}get value(){return this.model.value}async setValue(e){const t=await this.getSession();this._blockEvents=!0,this.blockUpdate=!0,this.model.value=e;const i=this._editor.getCursorPosition();t.setValue(e),this._editor.moveCursorToPosition(i),this._blockEvents=!1,this.blockUpdate=!1}set value(e){if("string"==typeof e)this.model.value!==e&&this.setValue(e);else{const[t,i]=e;this.model.value!==t&&this.setValue(t).then((()=>{this._editor.moveCursorToPosition(i)}))}}get blockUpdate(){return this._blockUpdate}set blockUpdate(e){this._blockUpdate=e}get catchCursorUpdates(){return this._catchCursorUpdates}set catchCursorUpdates(e){this._catchCursorUpdates!==e&&(this._catchCursorUpdates=e,this.setCursors())}async getSession(){if(this._editor)return Promise.resolve(this._editor.getSession());const e=this;return new Promise(((t,i)=>{let n=0;const o=setInterval((()=>{n+=100,e._editor?(clearInterval(o),t(e._editor.getSession())):n>=1e3&&(clearInterval(o),i(null))}),100)}))}async setCursors(){if(this._catchCursorUpdates){if(!this.cursorManager){const e=await this.getSession();this.cursorManager=new a.AceMultiCursorManager(e),this.selectManager=new a.AceMultiSelectionManager(e);for(let{id:e,color:t,position:i}of this._cursors)this.cursorManager.addCursor(e,"",t,i)}}else this.cursorManager&&(this.cursorManager.removeAll(),this.selectManager.removeAll(),delete this.cursorManager)}get cursors(){return this._cursors}set cursors(e){if(this.cursorManager)try{for(let t of this._cursors){let i=!0;for(let n of e)if(t.id==n.id){i=!1;break}if(i){this.cursorManager.removeCursor(t.id);try{this.selectManager.clearSelection(t.id)}catch(e){}try{this.selectManager.removeSelection(t.id)}catch(e){}}}for(let t of e){let e=!0;for(let i of this._cursors)if(i.id==t.id){e=!1;break}if(e)this.cursorManager.addCursor(t.id,"",t.color,t.position),this.selectManager.addSelection(t.id,"",t.color,this.toRange(t.selection));else{this.cursorManager.setCursor(t.id,t.position);try{this.selectManager.clearSelection(t.id)}catch(e){}this.selectManager.setSelection(t.id,this.toRange(t.selection))}}}catch(e){console.warn("ace error:",e.message)}this._cursors=e}toRange(e){if(0===e.length)return[];let t=r.default.require("ace/range").Range;const[i,n,o,s]=e;return[new t(i,n,o,s)]}get focusing(){return this._focus}set focusing(e){this._focus=e,e&&this.setFocus()}set addKeyBindingProp(e){this.addKeyBinding(e.name,e.bindKey,e.eventName)}set removeKeyBindingProp(e){this.removeKeyBinding(e)}setFocus(){if(this._editor)try{this._editor.focus()}catch(e){console.log("Problem Ace: focus => ",e.toString())}}get cursorPos(){if(!this._editor)return null;try{return this._editor.getCursorPosition()}catch(e){return null}}set cursorPos(e){if(this._editor&&e){console.log("Moving cursor to:",e);try{try{this._editor.focus()}catch(e){}this._editor.moveCursorToPosition(e);try{this._editor.clearSelection()}catch(e){}}catch(e){}}}applyKeyBindings(){if(!this._editor||this.model.readOnly)return;const e=this;Object.entries(this._keyBindings).forEach((([t,i])=>{this._editor.commands.addCommand({name:t,bindKey:i.bindKey,exec:function(n){e.dispatchEvent(new CustomEvent(i.eventName));let o="";if("string"==typeof i.bindKey?o=i.bindKey:i.bindKey&&(i.bindKey.win||i.bindKey.mac)&&(o=i.bindKey.win||i.bindKey.mac||""),/Enter/i.test(o))try{"Ctrl-Enter"!==t&&n.insert("\n")}catch(e){}else if(/Up/i.test(o))try{const e=n.getCursorPosition(),t=Math.max(0,e.row-1);let i=e.column;try{const e=n.getSession().getLine(t)||"";i=Math.min(i,e.length)}catch(e){}n.moveCursorToPosition({row:t,column:i});try{n.clearSelection()}catch(e){}}catch(e){}else if(/Down/i.test(o))try{const e=n.getCursorPosition(),t=Math.max(0,n.getSession().getLength()-1),i=Math.min(t,e.row+1);let o=e.column;try{const e=n.getSession().getLine(i)||"";o=Math.min(o,e.length)}catch(e){}n.moveCursorToPosition({row:i,column:o});try{n.clearSelection()}catch(e){}}catch(e){}},readOnly:!1})}))}get keyBindings(){return{...this._keyBindings}}set keyBindings(e){this._keyBindings={...e},this._editor&&!this.model.readOnly&&(Object.keys(e).forEach((e=>{try{this._editor.commands.removeCommand(e)}catch(e){}})),this.applyKeyBindings())}addKeyBinding(e,t,i){if(this._keyBindings[e]={bindKey:t,eventName:i},this._editor&&!this.model.readOnly){const n=this;this._editor.commands.addCommand({name:e,bindKey:t,exec:function(e){n.dispatchEvent(new CustomEvent(i));let o="";if("string"==typeof t?o=t:t&&(t.win||t.mac)&&(o=t.win||t.mac||""),/Enter/i.test(o))try{e.insert("\n")}catch(e){}else if(/Up/i.test(o))try{const t=e.getCursorPosition(),i=Math.max(0,t.row-1);let n=t.column;try{const t=e.getSession().getLine(i)||"";n=Math.min(n,t.length)}catch(e){}e.moveCursorToPosition({row:i,column:n});try{e.clearSelection()}catch(e){}}catch(e){}else if(/Down/i.test(o))try{const t=e.getCursorPosition(),i=Math.max(0,e.getSession().getLength()-1),n=Math.min(i,t.row+1);let o=t.column;try{const t=e.getSession().getLine(n)||"";o=Math.min(o,t.length)}catch(e){}e.moveCursorToPosition({row:n,column:o});try{e.clearSelection()}catch(e){}}catch(e){}},readOnly:!1})}}removeKeyBinding(e){if(delete this._keyBindings[e],this._editor)try{this._editor.commands.removeCommand(e)}catch(e){}}})},{"ace-builds/src-min-noconflict/ace":"9IXRD","./editor-modes":"aE57I","@convergencelabs/ace-collab-ext":"jZlVu","@convergencelabs/ace-collab-ext/dist/css/ace-collab-ext.min.css":"kC8DQ","@parcel/transformer-js/src/esmodule-helpers.js":"XTfsy"}],"9IXRD":[function(e,t,i){(function(){var e=function(){return this}();!e&&"undefined"!=typeof window&&(e=window);var t=function(e,i,n){"string"==typeof e?(2==arguments.length&&(n=i),t.modules[e]||(t.payloads[e]=n,t.modules[e]=null)):t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var i=function(e,t,i){if("string"==typeof t){var o=r(e,t);if(null!=o)return i&&i(),o}else if("[object Array]"===Object.prototype.toString.call(t)){for(var s=[],a=0,l=t.length;a<l;++a){var c=r(e,t[a]);if(null==c&&n.original)return;s.push(c)}return i&&i.apply(null,s)||!0}},n=function(e,t){var o=i("",e,t);return null==o&&n.original?n.original.apply(this,arguments):o},o=function(e,t){if(-1!==t.indexOf("!")){var i=t.split("!");return o(e,i[0])+"!"+o(e,i[1])}if("."==t.charAt(0))for(t=e.split("/").slice(0,-1).join("/")+"/"+t;-1!==t.indexOf(".")&&n!=t;){var n=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return t},r=function(e,n){n=o(e,n);var r=t.modules[n];if(!r){if("function"==typeof(r=t.payloads[n])){var s={},a={id:n,uri:"",exports:s,packaged:!0},l=r((function(e,t){return i(n,e,t)}),s,a);s=l||a.exports,t.modules[n]=s,delete t.payloads[n]}r=t.modules[n]=s||r}return r};!function(i){var o=e;i&&(e[i]||(e[i]={}),o=e[i]),o.define&&o.define.packaged||(t.original=o.define,o.define=t,o.define.packaged=!0),o.require&&o.require.packaged||(n.original=o.require,o.require=n,o.require.packaged=!0)}("ace")})(),ace.define("ace/lib/es6-shim",["require","exports","module"],(function(e,t,i){function n(e,t,i){Object.defineProperty(e,t,{value:i,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||n(String.prototype,"startsWith",(function(e,t){return t=t||0,this.lastIndexOf(e,t)===t})),String.prototype.endsWith||n(String.prototype,"endsWith",(function(e,t){var i=this;(void 0===t||t>i.length)&&(t=i.length),t-=e.length;var n=i.indexOf(e,t);return-1!==n&&n===t})),String.prototype.repeat||n(String.prototype,"repeat",(function(e){for(var t="",i=this;e>0;)1&e&&(t+=i),(e>>=1)&&(i+=i);return t})),String.prototype.includes||n(String.prototype,"includes",(function(e,t){return-1!=this.indexOf(e,t)})),Object.assign||(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),i=1;i<arguments.length;i++){var n=arguments[i];null!=n&&Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t}),Object.values||(Object.values=function(e){return Object.keys(e).map((function(t){return e[t]}))}),Array.prototype.find||n(Array.prototype,"find",(function(e){for(var t=this.length,i=arguments[1],n=0;n<t;n++){var o=this[n];if(e.call(i,o,n,this))return o}})),Array.prototype.findIndex||n(Array.prototype,"findIndex",(function(e){for(var t=this.length,i=arguments[1],n=0;n<t;n++){var o=this[n];if(e.call(i,o,n,this))return n}})),Array.prototype.includes||n(Array.prototype,"includes",(function(e,t){return-1!=this.indexOf(e,t)})),Array.prototype.fill||n(Array.prototype,"fill",(function(e){for(var t=this,i=t.length>>>0,n=arguments[1]|0,o=n<0?Math.max(i+n,0):Math.min(n,i),r=arguments[2],s=void 0===r?i:r|0,a=s<0?Math.max(i+s,0):Math.min(s,i);o<a;)t[o]=e,o++;return t})),Array.of||n(Array,"of",(function(){return Array.prototype.slice.call(arguments)}))})),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],(function(e,t,i){"use strict";e("./es6-shim")})),ace.define("ace/lib/deep_copy",["require","exports","module"],(function(e,t,i){t.deepCopy=function e(t){if("object"!=typeof t||!t)return t;var i;if(Array.isArray(t)){i=[];for(var n=0;n<t.length;n++)i[n]=e(t[n]);return i}if("[object Object]"!==Object.prototype.toString.call(t))return t;for(var n in i={},t)i[n]=e(t[n]);return i}})),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],(function(e,t,i){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var i="";t>0;)1&t&&(i+=e),(t>>=1)&&(e+=e);return i};var n=/^\s\s*/,o=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(n,"")},t.stringTrimRight=function(e){return e.replace(o,"")},t.copyObject=function(e){var t={};for(var i in e)t[i]=e[i];return t},t.copyArray=function(e){for(var t=[],i=0,n=e.length;i<n;i++)e[i]&&"object"==typeof e[i]?t[i]=this.copyObject(e[i]):t[i]=e[i];return t},t.deepCopy=e("./deep_copy").deepCopy,t.arrayToMap=function(e){for(var t={},i=0;i<e.length;i++)t[e[i]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var i in e)t[i]=e[i];return t},t.arrayRemove=function(e,t){for(var i=0;i<=e.length;i++)t===e[i]&&e.splice(i,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return(""+e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},t.getMatchOffsets=function(e,t){var i=[];return e.replace(t,(function(e){i.push({offset:arguments[arguments.length-2],length:e.length})})),i},t.deferredCall=function(e){var t=null,i=function(){t=null,e()},n=function(e){return n.cancel(),t=setTimeout(i,e||0),n};return n.schedule=n,n.call=function(){return this.cancel(),e(),n},n.cancel=function(){return clearTimeout(t),t=null,n},n.isPending=function(){return t},n},t.delayedCall=function(e,t){var i=null,n=function(){i=null,e()},o=function(e){null==i&&(i=setTimeout(n,e||t))};return o.delay=function(e){i&&clearTimeout(i),i=setTimeout(n,e||t)},o.schedule=o,o.call=function(){this.cancel(),e()},o.cancel=function(){i&&clearTimeout(i),i=null},o.isPending=function(){return i},o},t.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch(e){return!1}return!0},t.skipEmptyMatch=function(e,t,i){return i&&e.codePointAt(t)>65535?2:1}})),ace.define("ace/lib/useragent",["require","exports","module"],(function(e,t,i){"use strict";t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var n="object"==typeof navigator?navigator:{},o=(/mac|win|linux/i.exec(n.platform)||["other"])[0].toLowerCase(),r=n.userAgent||"",s=n.appName||"";t.isWin="win"==o,t.isMac="mac"==o,t.isLinux="linux"==o,t.isIE="Microsoft Internet Explorer"==s||s.indexOf("MSAppHost")>=0?parseFloat((r.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((r.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=r.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(r.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(r.split(" Chrome/")[1])||void 0,t.isSafari=parseFloat(r.split(" Safari/")[1])&&!t.isChrome||void 0,t.isEdge=parseFloat(r.split(" Edge/")[1])||void 0,t.isAIR=r.indexOf("AdobeAIR")>=0,t.isAndroid=r.indexOf("Android")>=0,t.isChromeOS=r.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(r)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid})),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],(function(e,t,i){"use strict";function n(){var e=a;a=null,e&&e.forEach((function(e){o(e[0],e[1])}))}function o(e,i,o){if("undefined"!=typeof document){if(a)if(o)n();else if(!1===o)return a.push([e,i]);if(!s){var r=o;o&&o.getRootNode&&(r=o.getRootNode())&&r!=o||(r=document);var l=r.ownerDocument||r;if(i&&t.hasCssString(i,r))return null;i&&(e+="\n/*# sourceURL=ace/css/"+i+" */");var c=t.createElement("style");c.appendChild(l.createTextNode(e)),i&&(c.id=i),r==l&&(r=t.getDocumentHead(l)),r.insertBefore(c,r.firstChild)}}}var r=e("./useragent");t.buildDom=function e(t,i,n){if("string"==typeof t&&t){var o=document.createTextNode(t);return i&&i.appendChild(o),o}if(!Array.isArray(t))return t&&t.appendChild&&i&&i.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var r=[],s=0;s<t.length;s++){var a=e(t[s],i,n);a&&r.push(a)}return r}var l=document.createElement(t[0]),c=t[1],h=1;c&&"object"==typeof c&&!Array.isArray(c)&&(h=2);for(s=h;s<t.length;s++)e(t[s],l,n);return 2==h&&Object.keys(c).forEach((function(e){var t=c[e];"class"===e?l.className=Array.isArray(t)?t.join(" "):t:"function"==typeof t||"value"==e||"$"==e[0]?l[e]=t:"ref"===e?n&&(n[t]=l):"style"===e?"string"==typeof t&&(l.style.cssText=t):null!=t&&l.setAttribute(e,t)})),i&&i.appendChild(l),l},t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||"http://www.w3.org/1999/xhtml",e):document.createElement(e)},t.removeChildren=function(e){e.innerHTML=""},t.createTextNode=function(e,t){return(t?t.ownerDocument:document).createTextNode(e)},t.createFragment=function(e){return(e?e.ownerDocument:document).createDocumentFragment()},t.hasCssClass=function(e,t){return-1!==(e.className+"").split(/\s+/g).indexOf(t)},t.addCssClass=function(e,i){t.hasCssClass(e,i)||(e.className+=" "+i)},t.removeCssClass=function(e,t){for(var i=e.className.split(/\s+/g);;){var n=i.indexOf(t);if(-1==n)break;i.splice(n,1)}e.className=i.join(" ")},t.toggleCssClass=function(e,t){for(var i=e.className.split(/\s+/g),n=!0;;){var o=i.indexOf(t);if(-1==o)break;n=!1,i.splice(o,1)}return n&&i.push(t),e.className=i.join(" "),n},t.setCssClass=function(e,i,n){n?t.addCssClass(e,i):t.removeCssClass(e,i)},t.hasCssString=function(e,t){var i,n=0;if(i=(t=t||document).querySelectorAll("style"))for(;n<i.length;)if(i[n++].id===e)return!0},t.removeElementById=function(e,t){(t=t||document).getElementById(e)&&t.getElementById(e).remove()};var s,a=[];if(t.useStrictCSP=function(e){s=e,0==e?n():a||(a=[])},t.importCssString=o,t.importCssStylsheet=function(e,i){t.buildDom(["link",{rel:"stylesheet",href:e}],t.getDocumentHead(i))},t.$fixPositionBug=function(e){var t=e.getBoundingClientRect();if(e.style.left){var i=parseFloat(e.style.left),n=+t.left;Math.abs(i-n)>1&&(e.style.left=2*i-n+"px")}if(e.style.right){i=parseFloat(e.style.right),n=window.innerWidth-t.right;Math.abs(i-n)>1&&(e.style.right=2*i-n+"px")}if(e.style.top){i=parseFloat(e.style.top),n=+t.top;Math.abs(i-n)>1&&(e.style.top=2*i-n+"px")}if(e.style.bottom){i=parseFloat(e.style.bottom),n=window.innerHeight-t.bottom;Math.abs(i-n)>1&&(e.style.bottom=2*i-n+"px")}},t.scrollbarWidth=function(e){var i=t.createElement("ace_inner");i.style.width="100%",i.style.minWidth="0px",i.style.height="200px",i.style.display="block";var n=t.createElement("ace_outer"),o=n.style;o.position="absolute",o.left="-10000px",o.overflow="hidden",o.width="200px",o.minWidth="0px",o.height="150px",o.display="block",n.appendChild(i);var r=e&&e.documentElement||document&&document.documentElement;if(!r)return 0;r.appendChild(n);var s=i.offsetWidth;o.overflow="scroll";var a=i.offsetWidth;return s===a&&(a=n.clientWidth),r.removeChild(n),s-a},t.computedStyle=function(e,t){return window.getComputedStyle(e,"")||{}},t.setStyle=function(e,t,i){e[t]!==i&&(e[t]=i)},t.HAS_CSS_ANIMATION=!1,t.HAS_CSS_TRANSFORMS=!1,t.HI_DPI=!r.isWin||"undefined"!=typeof window&&window.devicePixelRatio>=1.5,r.isChromeOS&&(t.HI_DPI=!1),"undefined"!=typeof document){var l=document.createElement("div");t.HI_DPI&&void 0!==l.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),!r.isEdge&&void 0!==l.style.animationName&&(t.HAS_CSS_ANIMATION=!0),l=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,i){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(i)+"px)"}:t.translate=function(e,t,i){e.style.top=Math.round(i)+"px",e.style.left=Math.round(t)+"px"}})),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],(function(e,t,i){"use strict";var n=e("./dom");t.get=function(e,t){var i=new XMLHttpRequest;i.open("GET",e,!0),i.onreadystatechange=function(){4===i.readyState&&t(i.responseText)},i.send(null)},t.loadScript=function(e,t){var i=n.getDocumentHead(),o=document.createElement("script");o.src=e,i.appendChild(o),o.onload=o.onreadystatechange=function(e,i){!i&&o.readyState&&"loaded"!=o.readyState&&"complete"!=o.readyState||(o=o.onload=o.onreadystatechange=null,i||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}})),ace.define("ace/lib/oop",["require","exports","module"],(function(e,t,i){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var i in t)e[i]=t[i];return e},t.implement=function(e,i){t.mixin(e,i)}})),ace.define("ace/lib/event_emitter",["require","exports","module"],(function(e,t,i){"use strict";var n={},o=function(){this.propagationStopped=!0},r=function(){this.defaultPrevented=!0};n._emit=n._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var i=this._eventRegistry[e]||[],n=this._defaultHandlers[e];if(i.length||n){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=o),t.preventDefault||(t.preventDefault=r),i=i.slice();for(var s=0;s<i.length&&(i[s](t,this),!t.propagationStopped);s++);return n&&!t.defaultPrevented?n(t,this):void 0}},n._signal=function(e,t){var i=(this._eventRegistry||{})[e];if(i){i=i.slice();for(var n=0;n<i.length;n++)i[n](t,this)}},n.once=function(e,t){var i=this;if(this.on(e,(function n(){i.off(e,n),t.apply(null,arguments)})),!t)return new Promise((function(e){t=e}))},n.setDefaultHandler=function(e,t){var i=this._defaultHandlers;if(i||(i=this._defaultHandlers={_disabled_:{}}),i[e]){var n=i[e],o=i._disabled_[e];o||(i._disabled_[e]=o=[]),o.push(n);var r=o.indexOf(t);-1!=r&&o.splice(r,1)}i[e]=t},n.removeDefaultHandler=function(e,t){var i=this._defaultHandlers;if(i){var n=i._disabled_[e];if(i[e]==t)n&&this.setDefaultHandler(e,n.pop());else if(n){var o=n.indexOf(t);-1!=o&&n.splice(o,1)}}},n.on=n.addEventListener=function(e,t,i){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];return n||(n=this._eventRegistry[e]=[]),-1==n.indexOf(t)&&n[i?"unshift":"push"](t),t},n.off=n.removeListener=n.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[e];if(i){var n=i.indexOf(t);-1!==n&&i.splice(n,1)}},n.removeAllListeners=function(e){e||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[e]=void 0),this._defaultHandlers&&(this._defaultHandlers[e]=void 0)},t.EventEmitter=n})),ace.define("ace/lib/report_error",["require","exports","module"],(function(e,t,i){t.reportError=function(e,t){var i=new Error(e);i.data=t,"object"==typeof console&&console.error&&console.error(i),setTimeout((function(){throw i}))}})),ace.define("ace/lib/default_english_messages",["require","exports","module"],(function(e,t,i){t.defaultEnglishMessages={"autocomplete.popup.aria-roledescription":"Autocomplete suggestions","autocomplete.popup.aria-label":"Autocomplete suggestions","autocomplete.popup.item.aria-roledescription":"item","autocomplete.loading":"Loading...","editor.scroller.aria-roledescription":"editor","editor.scroller.aria-label":"Editor content, press Enter to start editing, press Escape to exit","editor.gutter.aria-roledescription":"editor gutter","editor.gutter.aria-label":"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit","error-marker.good-state":"Looks good!","prompt.recently-used":"Recently used","prompt.other-commands":"Other commands","prompt.no-matching-commands":"No matching commands","search-box.find.placeholder":"Search for","search-box.find-all.text":"All","search-box.replace.placeholder":"Replace with","search-box.replace-next.text":"Replace","search-box.replace-all.text":"All","search-box.toggle-replace.title":"Toggle Replace mode","search-box.toggle-regexp.title":"RegExp Search","search-box.toggle-case.title":"CaseSensitive Search","search-box.toggle-whole-word.title":"Whole Word Search","search-box.toggle-in-selection.title":"Search In Selection","search-box.search-counter":"$0 of $1","text-input.aria-roledescription":"editor","text-input.aria-label":"Cursor at row $0","gutter.code-folding.range.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.closed.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.open.aria-label":"Toggle code folding, row $0","gutter.code-folding.closed.title":"Unfold code","gutter.code-folding.open.title":"Fold code","gutter.annotation.aria-label.error":"Error, read annotations row $0","gutter.annotation.aria-label.warning":"Warning, read annotations row $0","gutter.annotation.aria-label.info":"Info, read annotations row $0","inline-fold.closed.title":"Unfold code","gutter-tooltip.aria-label.error.singular":"error","gutter-tooltip.aria-label.error.plural":"errors","gutter-tooltip.aria-label.warning.singular":"warning","gutter-tooltip.aria-label.warning.plural":"warnings","gutter-tooltip.aria-label.info.singular":"information message","gutter-tooltip.aria-label.info.plural":"information messages","gutter.annotation.aria-label.security":"Security finding, read annotations row $0","gutter.annotation.aria-label.hint":"Suggestion, read annotations row $0","gutter-tooltip.aria-label.security.singular":"security finding","gutter-tooltip.aria-label.security.plural":"security findings","gutter-tooltip.aria-label.hint.singular":"suggestion","gutter-tooltip.aria-label.hint.plural":"suggestions","editor.tooltip.disable-editing":"Editing is disabled"}})),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error","ace/lib/default_english_messages"],(function(e,t,i){function n(e){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)}var o,r,s=e("./oop"),a=e("./event_emitter").EventEmitter,l=e("./report_error").reportError,c=e("./default_english_messages").defaultEnglishMessages,h={setOptions:function(e){Object.keys(e).forEach((function(t){this.setOption(t,e[t])}),this)},getOptions:function(e){var t={};if(e)Array.isArray(e)||(e=Object.keys(e));else{var i=this.$options;e=Object.keys(i).filter((function(e){return!i[e].hidden}))}return e.forEach((function(e){t[e]=this.getOption(e)}),this),t},setOption:function(e,t){if(this["$"+e]!==t){var i=this.$options[e];return i?i.forwardTo?this[i.forwardTo]&&this[i.forwardTo].setOption(e,t):(i.handlesSet||(this["$"+e]=t),void(i&&i.set&&i.set.call(this,t))):n('misspelled option "'+e+'"')}},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:n('misspelled option "'+e+'"')}},u=function(){function e(){this.$defaultOptions={},o=c,r="dollarSigns"}return e.prototype.defineOptions=function(e,t,i){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(i).forEach((function(t){var n=i[t];"string"==typeof n&&(n={forwardTo:n}),n.name||(n.name=t),e.$options[n.name]=n,"initialValue"in n&&(e["$"+n.name]=n.initialValue)})),s.implement(e,h),this},e.prototype.resetOptions=function(e){Object.keys(e.$options).forEach((function(t){var i=e.$options[t];"value"in i&&e.setOption(t,i.value)}))},e.prototype.setDefaultValue=function(e,t,i){if(!e){for(e in this.$defaultOptions)if(this.$defaultOptions[e][t])break;if(!this.$defaultOptions[e][t])return!1}var n=this.$defaultOptions[e]||(this.$defaultOptions[e]={});n[t]&&(n.forwardTo?this.setDefaultValue(n.forwardTo,t,i):n[t].value=i)},e.prototype.setDefaultValues=function(e,t){Object.keys(t).forEach((function(i){this.setDefaultValue(e,i,t[i])}),this)},e.prototype.setMessages=function(e,t){o=e,t&&t.placeholders&&(r=t.placeholders)},e.prototype.nls=function(e,t,i){o[e]||(n("No message found for the key '"+e+"' in messages with id "+o.$id+", trying to find a translation for the default string '"+t+"'."),o[t]||n("No message found for the default string '"+t+"' in the provided messages. Falling back to the default English message."));var s=o[e]||o[t]||t;return i&&("dollarSigns"===r&&(s=s.replace(/\$(\$|[\d]+)/g,(function(e,t){return"$"==t?"$":i[t]}))),"curlyBrackets"===r&&(s=s.replace(/\{([^\}]+)\}/g,(function(e,t){return i[t]})))),s},e}();u.prototype.warn=n,u.prototype.reportError=l,s.implement(u.prototype,a),t.AppConfig=u})),ace.define("ace/theme/textmate-css",["require","exports","module"],(function(e,t,i){i.exports='.ace-tm .ace_gutter {\n background: #f0f0f0;\n color: #333;\n}\n\n.ace-tm .ace_print-margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-tm .ace_fold {\n background-color: #6B72E6;\n}\n\n.ace-tm {\n background-color: #FFFFFF;\n color: black;\n}\n\n.ace-tm .ace_cursor {\n color: black;\n}\n \n.ace-tm .ace_invisible {\n color: rgb(191, 191, 191);\n}\n\n.ace-tm .ace_storage,\n.ace-tm .ace_keyword {\n color: blue;\n}\n\n.ace-tm .ace_constant {\n color: rgb(197, 6, 11);\n}\n\n.ace-tm .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-tm .ace_constant.ace_language {\n color: rgb(88, 92, 246);\n}\n\n.ace-tm .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_invalid {\n background-color: rgba(255, 0, 0, 0.1);\n color: red;\n}\n\n.ace-tm .ace_support.ace_function {\n color: rgb(60, 76, 114);\n}\n\n.ace-tm .ace_support.ace_constant {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_support.ace_type,\n.ace-tm .ace_support.ace_class {\n color: rgb(109, 121, 222);\n}\n\n.ace-tm .ace_keyword.ace_operator {\n color: rgb(104, 118, 135);\n}\n\n.ace-tm .ace_string {\n color: rgb(3, 106, 7);\n}\n\n.ace-tm .ace_comment {\n color: rgb(76, 136, 107);\n}\n\n.ace-tm .ace_comment.ace_doc {\n color: rgb(0, 102, 255);\n}\n\n.ace-tm .ace_comment.ace_doc.ace_tag {\n color: rgb(128, 159, 191);\n}\n\n.ace-tm .ace_constant.ace_numeric {\n color: rgb(0, 0, 205);\n}\n\n.ace-tm .ace_variable {\n color: rgb(49, 132, 149);\n}\n\n.ace-tm .ace_xml-pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-tm .ace_entity.ace_name.ace_function {\n color: #0000A2;\n}\n\n\n.ace-tm .ace_heading {\n color: rgb(12, 7, 255);\n}\n\n.ace-tm .ace_list {\n color:rgb(185, 6, 144);\n}\n\n.ace-tm .ace_meta.ace_tag {\n color:rgb(0, 22, 142);\n}\n\n.ace-tm .ace_string.ace_regex {\n color: rgb(255, 0, 0)\n}\n\n.ace-tm .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n.ace-tm.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px white;\n}\n.ace-tm .ace_marker-layer .ace_step {\n background: rgb(252, 255, 0);\n}\n\n.ace-tm .ace_marker-layer .ace_stack {\n background: rgb(164, 229, 101);\n}\n\n.ace-tm .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-tm .ace_marker-layer .ace_active-line {\n background: rgba(0, 0, 0, 0.07);\n}\n\n.ace-tm .ace_gutter-active-line {\n background-color : #dcdcdc;\n}\n\n.ace-tm .ace_marker-layer .ace_selected-word {\n background: rgb(250, 250, 255);\n border: 1px solid rgb(200, 200, 250);\n}\n\n.ace-tm .ace_indent-guide {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;\n}\n\n.ace-tm .ace_indent-guide-active {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;\n}\n'})),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],(function(e,t,i){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText=e("./textmate-css"),t.$id="ace/theme/textmate",e("../lib/dom").importCssString(t.cssText,t.cssClass,!1)})),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],(function(e,t,i){var n=e("./lib/lang"),o=e("./lib/net"),r=e("./lib/dom"),s=e("./lib/app_config").AppConfig;i.exports=t=new s;var a={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};t.get=function(e){if(!a.hasOwnProperty(e))throw new Error("Unknown config key: "+e);return a[e]},t.set=function(e,t){if(a.hasOwnProperty(e))a[e]=t;else if(0==this.setDefaultValue("",e,t))throw new Error("Unknown config key: "+e);"useStrictCSP"==e&&r.useStrictCSP(t)},t.all=function(){return n.copyObject(a)},t.$modes={},t.moduleUrl=function(e,t){if(a.$moduleUrls[e])return a.$moduleUrls[e];var i=e.split("/"),n="snippets"==(t=t||i[i.length-2]||"")?"/":"-",o=i[i.length-1];if("worker"==t&&"-"==n){var r=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g");o=o.replace(r,"")}(!o||o==t)&&i.length>1&&(o=i[i.length-2]);var s=a[t+"Path"];return null==s?s=a.basePath:"/"==n&&(t=n=""),s&&"/"!=s.slice(-1)&&(s+="/"),s+t+n+o+this.get("suffix")},t.setModuleUrl=function(e,t){return a.$moduleUrls[e]=t};var l,c=function(t,i){return"ace/theme/textmate"===t||"./theme/textmate"===t?i(null,e("./theme/textmate")):l?l(t,i):void console.error("loader is not configured")};t.setLoader=function(e){l=e},t.dynamicModules=Object.create(null),t.$loading={},t.$loaded={},t.loadModule=function(e,i){var n;if(Array.isArray(e))var r=e[0],s=e[1];else if("string"==typeof e)s=e;var a=function(e){if(e&&!t.$loading[s])return i&&i(e);if(t.$loading[s]||(t.$loading[s]=[]),t.$loading[s].push(i),!(t.$loading[s].length>1)){var n=function(){c(s,(function(e,i){i&&(t.$loaded[s]=i),t._emit("load.module",{name:s,module:i});var n=t.$loading[s];t.$loading[s]=null,n.forEach((function(e){e&&e(i)}))}))};if(!t.get("packaged"))return n();o.loadScript(t.moduleUrl(s,r),n),h()}};if(t.dynamicModules[s])t.dynamicModules[s]().then((function(e){e.default?a(e.default):a(e)}));else{try{n=this.$require(s)}catch(e){}a(n||t.$loaded[s])}},t.$require=function(e){if("function"==typeof i.require){return i.require(e)}},t.setModuleLoader=function(e,i){t.dynamicModules[e]=i};var h=function(){!a.basePath&&!a.workerPath&&!a.modePath&&!a.themePath&&!Object.keys(a.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),h=function(){})};t.version="1.43.5"})),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],(function(e,t,i){"use strict";function n(t){if(s&&s.document){r.set("packaged",t||e.packaged||i.packaged||s.define&&define.packaged);var n={},a="",l=document.currentScript||document._currentScript,c=l&&l.ownerDocument||document;l&&l.src&&(a=l.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var h=c.getElementsByTagName("script"),u=0;u<h.length;u++){var d=h[u],p=d.src||d.getAttribute("src");if(p){for(var g=d.attributes,f=0,m=g.length;f<m;f++){var y=g[f];0===y.name.indexOf("data-ace-")&&(n[o(y.name.replace(/^data-ace-/,""))]=y.value)}var v=p.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);v&&(a=v[1])}}for(var w in a&&(n.base=n.base||a,n.packaged=!0),n.basePath=n.base,n.workerPath=n.workerPath||n.base,n.modePath=n.modePath||n.base,n.themePath=n.themePath||n.base,delete n.base,n)void 0!==n[w]&&r.set(w,n[w])}}function o(e){return e.replace(/-(.)/g,(function(e,t){return t.toUpperCase()}))}e("./lib/fixoldbrowsers");var r=e("./config");r.setLoader((function(t,i){e([t],(function(e){i(null,e)}))}));var s=function(){return this||"undefined"!=typeof window&&window}();i.exports=function(t){r.init=n,r.$require=e,t.require=e,"function"==typeof define&&(t.define=define)}})),ace.define("ace/range",["require","exports","module"],(function(e,t,i){"use strict";var n=function(){function e(e,t,i,n){this.start={row:e,column:t},this.end={row:i,column:n}}return e.prototype.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},e.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},e.prototype.contains=function(e,t){return 0==this.compare(e,t)},e.prototype.compareRange=function(e){var t,i=e.end,n=e.start;return 1==(t=this.compare(i.row,i.column))?1==(t=this.compare(n.row,n.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(n.row,n.column))?-1:1==t?42:0},e.prototype.comparePoint=function(e){return this.compare(e.row,e.column)},e.prototype.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},e.prototype.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},e.prototype.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},e.prototype.isStart=function(e,t){return this.start.row==e&&this.start.column==t},e.prototype.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},e.prototype.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},e.prototype.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},e.prototype.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},e.prototype.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},e.prototype.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:t<this.start.column?-1:t>this.end.column?1:0},e.prototype.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},e.prototype.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.clipRows=function(t,i){if(this.end.row>i)var n={row:i+1,column:0};else if(this.end.row<t)n={row:t,column:0};if(this.start.row>i)var o={row:i+1,column:0};else if(this.start.row<t)o={row:t,column:0};return e.fromPoints(o||this.start,n||this.end)},e.prototype.extend=function(t,i){var n=this.compare(t,i);if(0==n)return this;if(-1==n)var o={row:t,column:i};else var r={row:t,column:i};return e.fromPoints(o||this.start,r||this.end)},e.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},e.prototype.isMultiLine=function(){return this.start.row!==this.end.row},e.prototype.clone=function(){return e.fromPoints(this.start,this.end)},e.prototype.collapseRows=function(){return 0==this.end.column?new e(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new e(this.start.row,0,this.end.row,0)},e.prototype.toScreenRange=function(t){var i=t.documentToScreenPosition(this.start),n=t.documentToScreenPosition(this.end);return new e(i.row,i.column,n.row,n.column)},e.prototype.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t},e}();n.fromPoints=function(e,t){return new n(e.row,e.column,t.row,t.column)},n.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=n})),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],(function(e,t,i){"use strict";for(var n=e("./oop"),o={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},r={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},s=0;s<10;s++)r["Digit"+s]=48+s,r["Numpad"+s]=96+s,o.PRINTABLE_KEYS[48+s]=""+s,o.FUNCTION_KEYS[96+s]="Numpad"+s;for(s=65;s<91;s++){var a=String.fromCharCode(s+32);r["Key"+a.toUpperCase()]=s,o.PRINTABLE_KEYS[s]=a}for(s=1;s<13;s++)r["F"+s]=111+s,o.FUNCTION_KEYS[111+s]="F"+s;var l={Shift:16,Control:17,Alt:18,Meta:224};for(var c in l)r[c]=r[c+"Left"]=r[c+"Right"]=l[c];for(var h in t.$codeToKeyCode=r,o.PRINTABLE_KEYS[173]="-",o.FUNCTION_KEYS){var u=o.FUNCTION_KEYS[h].toLowerCase();o[u]=parseInt(h,10)}for(var h in o.PRINTABLE_KEYS){u=o.PRINTABLE_KEYS[h].toLowerCase();o[u]=parseInt(h,10)}n.mixin(o,o.MODIFIER_KEYS),n.mixin(o,o.PRINTABLE_KEYS),n.mixin(o,o.FUNCTION_KEYS),o.enter=o.return,o.escape=o.esc,o.del=o.delete,function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)o.KEY_MODS[t]=e.filter((function(e){return t&o.KEY_MODS[e]})).join("-")+"-"}(),o.KEY_MODS[0]="",o.KEY_MODS[-1]="input-",n.mixin(t,o),t.default=t,t.keyCodeToString=function(e){var t=o[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}})),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,i){"use strict";function n(){return null==l&&function(){l=!1;try{document.createComment("").addEventListener("test",(function(){}),{get passive(){return l={passive:!1},!0}})}catch(e){}}(),l}function o(e,t,i){this.elem=e,this.type=t,this.callback=i}function r(e){return(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}function s(e,t,i){var n=r(t);if(!i&&t.code&&(i=c.$codeToKeyCode[t.code]||i),!h.isMac&&u){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(n|=8),u.altGr){if(!(3&~n))return;u.altGr=0}if(18===i||17===i){var o=t.location;if(17===i&&1===o)1==u[i]&&(d=t.timeStamp);else if(18===i&&3===n&&2===o){t.timeStamp-d<50&&(u.altGr=!0)}}}if(i in c.MODIFIER_KEYS&&(i=-1),n||13!==i||3!==t.location||(e(t,n,-i),!t.defaultPrevented)){if(h.isChromeOS&&8&n){if(e(t,n,i),t.defaultPrevented)return;n&=-9}return!!(n||i in c.FUNCTION_KEYS||i in c.PRINTABLE_KEYS)&&e(t,n,i)}}function a(){u=Object.create(null)}var l,c=e("./keys"),h=e("./useragent"),u=null,d=0;o.prototype.destroy=function(){g(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var p=t.addListener=function(e,t,i,r){e.addEventListener(t,i,n()),r&&r.$toDestroy.push(new o(e,t,i))},g=t.removeListener=function(e,t,i){e.removeEventListener(t,i,n())};if(t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation&&e.stopPropagation()},t.preventDefault=function(e){e.preventDefault&&e.preventDefault()},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||h.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.button},t.capture=function(e,t,i){function n(e){t&&t(e),i&&i(e),g(o,"mousemove",t),g(o,"mouseup",n),g(o,"dragstart",n)}var o=e&&e.ownerDocument||document;return p(o,"mousemove",t),p(o,"mouseup",n),p(o,"dragstart",n),n},t.addMouseWheelListener=function(e,t,i){p(e,"wheel",(function(e){var i=e.deltaX||0,n=e.deltaY||0;switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.15*i,e.wheelY=.15*n;bre