openc3-cosmos-tool-cmdsender 6.8.0 → 6.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/tools/cmdsender/{ArrayWidget-j3ncPuPx-f939b74328291df8a5de.js → ArrayWidget-FGjLmPfG-a26209e28741f763faa5.js} +2 -2
- data/tools/cmdsender/{ArrayplotWidget-DuLaiGa9-4e423aca38f960d26373.js → ArrayplotWidget-Cfo18TYm-613f3edd4aa48316c79a.js} +1 -1
- data/tools/cmdsender/{BarColumn-BWJ0Dd4O-4c5640abb9625004d209.js → BarColumn-BuJ6MTYG-373c5f802e5ec4419727.js} +1 -1
- data/tools/cmdsender/{BlockWidget-Bf5Dd6Cr-ef35d651764a1f1ded69.js → BlockWidget-B_JwY8-N-a8ec011aeb29e2ae0ba4.js} +2 -2
- data/tools/cmdsender/{ButtonWidget-bl_mGFYh-bd3a80c50b3d01aaaff5.js → ButtonWidget-Cd4M3aBD-cad8dbaee877b4275247.js} +2 -2
- data/tools/cmdsender/{CanvasWidget-boDemgx1-c68ac68b01e5a84f0579.js → CanvasWidget-CpKdOgTG-9e24486cc85f5da68ca7.js} +1 -1
- data/tools/cmdsender/CanvasdotWidget-zYbI5LAw-e8255a5b7ff402c51f21.js +1 -0
- data/tools/cmdsender/{CanvasimageWidget-6ywvT5jd-b960807789b9dcbcc50d.js → CanvasimageWidget--ORQEPj6-da7d37d54a8a3fabdd82.js} +1 -1
- data/tools/cmdsender/{CanvasimagevalueWidget-DjWrA3gX-4074ee5ef0a41f17fddd.js → CanvasimagevalueWidget-CtAtYHRm-359647d367b80e96dd83.js} +1 -1
- data/tools/cmdsender/CanvaslabelWidget-DWoROb6o-cbe7a534dc456c2d0f6e.js +1 -0
- data/tools/cmdsender/{CanvaslabelvalueWidget-C8oNcFLi-828de5416d4d6f2f1b68.js → CanvaslabelvalueWidget-A4UbtwEc-ed7ee6ebc416b4e28f8b.js} +1 -1
- data/tools/cmdsender/{CanvaslineWidget-nvbL2GoL-c71cc643a6024963a623.js → CanvaslineWidget-BBGi0nrb-6be772d2bbad55dbc740.js} +1 -1
- data/tools/cmdsender/{CanvaslinevalueWidget-ZACQedKx-6223a4707f27190d998d.js → CanvaslinevalueWidget-C_9OkL7f-2ac62f1b894bf11c8eee.js} +1 -1
- data/tools/cmdsender/{CheckbuttonWidget-B82UE8AB-8935020f16d81e86bd39.js → CheckbuttonWidget-CTJg8Ypg-5f4720985ba080fb3aa1.js} +1 -1
- data/tools/cmdsender/ComboboxWidget-DWiMZZk8-3c96c5bca2eb8cafa301.js +1 -0
- data/tools/cmdsender/CommandSender-d1d0cedb57feb5bc3f6c.js +1127 -0
- data/tools/cmdsender/{CriticalCmdDialog-FhXDdBn4-5e2871bb9b2ad6ada180.js → CriticalCmdDialog-CD72VN-P-34da7ac5ed139afda344.js} +1 -1
- data/tools/cmdsender/{DateWidget-BmwtdirF-c478451d8a9912180a30.js → DateWidget-C7GSh68_-60d2b892bcd8351bdd37.js} +1 -1
- data/tools/cmdsender/{DynamicWidget-CfMtj7H8-3b839f85b196e9521a5d.js → DynamicWidget-CfMtj7H8-51d942800385786285c7.js} +1 -1
- data/tools/cmdsender/FormatvalueWidget-CZJdsUAq-6a3986a533add61a1117.js +1 -0
- data/tools/cmdsender/{GraphWidget-CvzxZYVx-c753dae2d338f42d662c.js → GraphWidget-CHm4bhMI-fbfc7aa80a5f57bfb85b.js} +1 -1
- data/tools/cmdsender/{HorizontalWidget-Ck151zVw-5a9b2cfd6856a7e967b5.js → HorizontalWidget-B2skpV1m-9cde2dec3fb1cd824605.js} +1 -1
- data/tools/cmdsender/HorizontalboxWidget-BI0WZP5M-ad9eb352d0390ae63420.js +1 -0
- data/tools/cmdsender/HorizontallineWidget-AmxVeXcU-73d3792218f0acabb6ed.js +1 -0
- data/tools/cmdsender/{IframeWidget-BgJCgues-8d275c3925dcaef036ce.js → IframeWidget-DcqRMhyW-19a3c92aaf01ee827795.js} +1 -1
- data/tools/cmdsender/{ImageLoader-CWn-PLOk-4303aade4f81fd3dfaff.js → ImageLoader-ly4zoGpO-a170646ad28baf2b1214.js} +1 -1
- data/tools/cmdsender/ImageviewerWidget-cmDHcmW4-8bfe74d8954ac79316a4.js +1 -0
- data/tools/cmdsender/{LabelWidget-Cwosk4x2-e46f4721f9bfa9b4c642.js → LabelWidget-Bemw8Erq-b0534675ff28dcf6da3d.js} +1 -1
- data/tools/cmdsender/LabelledWidget-Cb7EvtUG-e3a1c6e46d118db2686f.js +1 -0
- data/tools/cmdsender/LabelprogressbarWidget-qYgrGqLY-295b13d17640cdb157d1.js +1 -0
- data/tools/cmdsender/LabelsparklineWidget-CMklq9-f-fd8b55850b8e2b7df3a2.js +1 -0
- data/tools/cmdsender/LabelvalueWidget-NjCMgiYL-14ab7a0491ee4511394c.js +1 -0
- data/tools/cmdsender/{LabelvaluedescWidget-Dwwlnd1g-f01d9e2309195df7c3d0.js → LabelvaluedescWidget-Dflulqm7-4ffd94a2d526f6ae6861.js} +1 -1
- data/tools/cmdsender/LabelvaluelimitsbarWidget-M34NDk2S-d5e49ed26136dfd60963.js +1 -0
- data/tools/cmdsender/LabelvaluelimitscolumnWidget-Cchaw_-k-9eaef13b18a0aa478643.js +1 -0
- data/tools/cmdsender/{LabelvaluerangebarWidget-B3MKT-3Y-a0b64358b0a0958b27fa.js → LabelvaluerangebarWidget-7pEykAm3-1e9be26e046e42970f7b.js} +1 -1
- data/tools/cmdsender/Layout-BNvQKlyy-a2a0a359d56234a9666d.js +1 -0
- data/tools/cmdsender/{LedWidget-DOuDD8LI-6667a8c3e33737fc95ba.js → LedWidget-_EA7ZKM8-1e9f499e28292c8f1b14.js} +1 -1
- data/tools/cmdsender/{LimitsbarWidget-D1U6SvVL-296c2641a79d9f3cfdbc.js → LimitsbarWidget-DdoQf46y-deb13af25c87cc12f6cc.js} +1 -1
- data/tools/cmdsender/{LimitscolorWidget-iSMGusqt-864314d19d55c8c4b11a.js → LimitscolorWidget-Cv0umnVo-8ce7951eebc29b9b34fe.js} +1 -1
- data/tools/cmdsender/{LimitscolumnWidget-DjxZTt_r-375bbc8160586a53a650.js → LimitscolumnWidget-CnCQtxim-9eb5e18d359ffe29166e.js} +1 -1
- data/tools/cmdsender/{LinegraphWidget-BHKU6zlT-f5a67e90280ecd56e5ff.js → LinegraphWidget-ekyQoR7x-9ec6eb77554e3726eede.js} +1 -1
- data/tools/cmdsender/MatrixbycolumnsWidget-IBUcGNF7-dcf4c31d15305ae2a2aa.js +1 -0
- data/tools/cmdsender/{ProgressbarWidget-fbr2qu_N-c63c1c8aad560c8fe9f0.js → ProgressbarWidget-CnveFZVh-cc045ea96f4a91fe5093.js} +1 -1
- data/tools/cmdsender/{RadiobuttonWidget-DL08zcQT-9a53a941e6fe248a6a8b.js → RadiobuttonWidget-hWLrCb8W-776e6cbf7b9b84588965.js} +1 -1
- data/tools/cmdsender/{RadiogroupWidget-DW9Xpj3c-734245b32d66bdcb0e2a.js → RadiogroupWidget-DK1fphkh-e1c4b4aab5a4c9063e44.js} +1 -1
- data/tools/cmdsender/{RangebarWidget-o9q55kjc-b7b0a515ecb909587048.js → RangebarWidget-vspY8CGV-e515e8e90ad5e1f797c3.js} +1 -1
- data/tools/cmdsender/{RollupWidget-BHnjj-DF-d5e7f79088ae2defdd32.js → RollupWidget-07pNcXQV-e833c323bde6e857a69d.js} +1 -1
- data/tools/cmdsender/{ScrollwindowWidget-D-QVwztC-296dc5d83bd09c2f7e9b.js → ScrollwindowWidget-BcbyrYUo-17d4df31399a700e5c7e.js} +1 -1
- data/tools/cmdsender/{SignalWidget-CsWuufdx-fcd5aa4329eda73bbc19.js → SignalWidget-BDp5sUHj-632e425d37b027384587.js} +1 -1
- data/tools/cmdsender/{SpacerWidget-Di9-qunj-434c8dec966d53c43547.js → SpacerWidget-DcOnQ1yI-bdfa377f3f54ad8b2f77.js} +1 -1
- data/tools/cmdsender/{SparklineWidget-B6-zhdPW-f70171404709364118de.js → SparklineWidget-CVglnlAm-187fe646206b28f45515.js} +1 -1
- data/tools/cmdsender/TabbookWidget-p51Oa7Ru-443ded4f460fc07dde43.js +1 -0
- data/tools/cmdsender/{TextboxWidget-CBVEXPw_-4ccfa794fc27e17c41e9.js → TextboxWidget-DM-XX97e-42079377172081fb2061.js} +1 -1
- data/tools/cmdsender/TextfieldWidget-7cYHAgH8-751de3cdc33ccd70f1c5.js +1 -0
- data/tools/cmdsender/{TimeWidget-K4MNmJ7J-4ac9a34c4cb89a628f1e.js → TimeWidget-EvQJyu6x-876a93f1fbbae0356cea.js} +1 -1
- data/tools/cmdsender/TitleWidget-6ddfJuqd-808b71e38a1c8097601d.js +1 -0
- data/tools/cmdsender/{VWidget-CoIgX3hM-2a96bb926a22082ef66f.js → VWidget-P-X9ffkl-a37dd4fa20f19c9a490d.js} +1 -1
- data/tools/cmdsender/{ValueWidget-BvT1ASar-569bf4ee3a869b3a983c.js → ValueWidget-DAUGuQ9f-19c2cbfe8eb607782930.js} +1 -1
- data/tools/cmdsender/ValuelimitsbarWidget-DmLUXw0I-df772c050e7d25cfc5f8.js +1 -0
- data/tools/cmdsender/{ValuelimitscolumnWidget-DHYI0WBL-9bdaf843078c6c366a0a.js → ValuelimitscolumnWidget-DDmo8wHJ-39983eff154e959e2f46.js} +1 -1
- data/tools/cmdsender/ValuerangebarWidget-CbzWSWq3-5ff33695a335eedb854b.js +1 -0
- data/tools/cmdsender/VerticalWidget-BuKinn_c-261b4d15f28f07879b7a.js +1 -0
- data/tools/cmdsender/VerticalboxWidget-C0zD5h0O-68660abf9edd2b413217.js +1 -0
- data/tools/cmdsender/{Widget-B8t93Oid-343384cb6cc88aad60ee.js → Widget-BIXl-Pk5-aaa3e928e178cb9c9587.js} +1 -1
- data/tools/cmdsender/main-aaff9e1d57bc1d9634ff.js +1504 -0
- data/tools/cmdsender/main.js +1 -1
- metadata +67 -67
- data/tools/cmdsender/CanvasdotWidget-BZBbJcER-f8666166dd26f9b4d0c2.js +0 -1
- data/tools/cmdsender/CanvaslabelWidget-Bq4V2BQh-78092fbf686162916c1c.js +0 -1
- data/tools/cmdsender/ComboboxWidget-4OFiSkI6-f0b1e8f3e0b734cb6ad2.js +0 -1
- data/tools/cmdsender/CommandSender-c37075627710fdc475ce.js +0 -1127
- data/tools/cmdsender/FormatvalueWidget-C8exC3bj-6fc3fa6fb5d3bdeed5f4.js +0 -1
- data/tools/cmdsender/HorizontalboxWidget-D3P-cl9V-a538d5bea21494d86a8c.js +0 -1
- data/tools/cmdsender/HorizontallineWidget-BE1TjPU8-60179ab7246a142d636c.js +0 -1
- data/tools/cmdsender/ImageviewerWidget-BlhFZD2f-2f0d71645905d2247b85.js +0 -1
- data/tools/cmdsender/LabelledWidget-Dl6rAFTQ-326ebac7e9b44c786d55.js +0 -1
- data/tools/cmdsender/LabelprogressbarWidget-MuAKesOz-153e98b717f1bb0940e1.js +0 -1
- data/tools/cmdsender/LabelsparklineWidget-6LA6Ox3d-126f70696b7ab46a0ca2.js +0 -1
- data/tools/cmdsender/LabelvalueWidget-BxAXx-Tf-d87d776b4ee0a755f336.js +0 -1
- data/tools/cmdsender/LabelvaluelimitsbarWidget-Dv8Qk8kK-5fd8eb8da41cf4aa3a95.js +0 -1
- data/tools/cmdsender/LabelvaluelimitscolumnWidget-D-_gl6fq-fcc6b42a9b4c29e45e73.js +0 -1
- data/tools/cmdsender/Layout-Bkb6VP3e-ebc8fdb14d3b2a3b8fbb.js +0 -1
- data/tools/cmdsender/MatrixbycolumnsWidget-BKO-A2QD-c0d993dadda5d555c9d5.js +0 -1
- data/tools/cmdsender/TabbookWidget-B1E1_mzA-d5c8d4af992caa015879.js +0 -1
- data/tools/cmdsender/TextfieldWidget-DZMHrtQa-cdcf0c0cd90b83a89cd4.js +0 -1
- data/tools/cmdsender/TitleWidget-8IcwweFE-2d09ac632c6319281e1e.js +0 -1
- data/tools/cmdsender/ValuelimitsbarWidget-C5lBnUmB-a57a4387edcb9e00239f.js +0 -1
- data/tools/cmdsender/ValuerangebarWidget-BSszZhlE-9720c31cb31b04465293.js +0 -1
- data/tools/cmdsender/VerticalWidget-1GhgYrC3-2861b7292deac636c9ce.js +0 -1
- data/tools/cmdsender/VerticalboxWidget-DYHJqEzd-fbaceb71491dd8a6da8e.js +0 -1
- data/tools/cmdsender/main-fa50ec9d093e7c784e06.js +0 -1504
@@ -0,0 +1,1127 @@
|
|
1
|
+
System.register(["./main-aaff9e1d57bc1d9634ff.js","vue","./CriticalCmdDialog-CD72VN-P-34da7ac5ed139afda344.js","vue-router","single-spa","vuex","vuetify"],(function(exports,module){"use strict";var d,zA,NA,WA,PA,Rk,wA,_export_sfc,s,Pe$1,resolveComponent,createBlock,openBlock,Teleport,createVNode,withCtx,createElementVNode,toDisplayString,createElementBlock,Fragment,renderList,createTextVNode,mergeProps,createSlots,createCommentVNode,normalizeStyle,withDirectives,vShow,normalizeProps,guardReactiveProps,withModifiers,N$1;return{setters:[u=>{d=u.d,zA=u.z,NA=u.N,WA=u.W,PA=u.P,Rk=u.R,wA=u.w,_export_sfc=u._,s=u.s,Pe$1=u.a},u=>{resolveComponent=u.resolveComponent,createBlock=u.createBlock,openBlock=u.openBlock,Teleport=u.Teleport,createVNode=u.createVNode,withCtx=u.withCtx,createElementVNode=u.createElementVNode,toDisplayString=u.toDisplayString,createElementBlock=u.createElementBlock,Fragment=u.Fragment,renderList=u.renderList,createTextVNode=u.createTextVNode,mergeProps=u.mergeProps,createSlots=u.createSlots,createCommentVNode=u.createCommentVNode,normalizeStyle=u.normalizeStyle,withDirectives=u.withDirectives,vShow=u.vShow,normalizeProps=u.normalizeProps,guardReactiveProps=u.guardReactiveProps,withModifiers=u.withModifiers},u=>{N$1=u.N},null,null,null,null],execute:(function(){var __vite_style__=document.createElement("style");__vite_style__.textContent=`.editor[data-v-6abd961f]{margin-left:30px;height:50px;width:95%;position:relative;font-size:16px}
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(__vite_style__);const I$1="openc3-ace-vim-mode-enabled",M="ace/keyboard/vim",X={isVimModeEnabled(){return localStorage.getItem(I$1)==="true"},setVimMode(u){localStorage.setItem(I$1,JSON.stringify(!!u))},toggleVimMode(u){this.isVimModeEnabled()?(u.setKeyboardHandler(null),this.setVimMode(!1)):(u.setKeyboardHandler(M),this.setVimMode(!0)),u.focus()},applyVimModeIfEnabled(u,{saveFn:m}={}){this.isVimModeEnabled()?(u.setKeyboardHandler(M),ace.config.loadModule(M,f=>{f.CodeMirror.Vim.defineEx("write","w",g=>{typeof m=="function"?m():g.ace.execCommand("save")})})):u.setKeyboardHandler(null)}},Y$1={props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(u){return u.replaceAll(" ","-").toLowerCase()},subMenuClick(u){u.command(u),this.$refs.topmenu[0].isActive=!1}},mounted(){document.title=this.title}},z$1={class:"app-title mr-2"};function J$1(u,m,f,g,j,k){const x=resolveComponent("v-col"),_=resolveComponent("v-row"),c=resolveComponent("v-icon"),h=resolveComponent("v-btn"),t=resolveComponent("v-divider"),o=resolveComponent("v-list-item-title"),r=resolveComponent("v-list-item"),i=resolveComponent("v-list"),e=resolveComponent("v-menu"),n=resolveComponent("v-radio"),a=resolveComponent("v-list-item-action"),p=resolveComponent("v-radio-group"),v=resolveComponent("v-checkbox");return openBlock(),createBlock(Teleport,{to:"#openc3-menu"},[createVNode(_,{"no-gutters":""},{default:withCtx(()=>[createVNode(x,{"align-self":"end"},{default:withCtx(()=>[createElementVNode("span",z$1,toDisplayString(f.title),1)]),_:1})]),_:1}),createVNode(_,{dense:"",class:"flex-nowrap"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(f.menus,(A,E)=>(openBlock(),createBlock(e,{ref_for:!0,ref:"topmenu",key:E},{activator:withCtx(({props:S})=>[createVNode(h,mergeProps({ref_for:!0},S,{variant:"outlined",class:"mx-1 menu-button",text:A.label,"data-test":k.formatDT(`${f.title} ${A.label}`)}),{append:withCtx(()=>[createVNode(c,{class:"menu-button-icon"},{default:withCtx(()=>[...m[0]||(m[0]=[createTextVNode(" mdi-menu-down ",-1)])]),_:1})]),_:1},16,["text","data-test"])]),default:withCtx(()=>[createVNode(i,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(A.items,(S,C)=>(openBlock(),createElementBlock(Fragment,null,[S.divider?(openBlock(),createBlock(t,{key:C+"-divider"})):S.subMenu&&S.subMenu.length>0?(openBlock(),createElementBlock("div",{key:C+"-submenu"},[(openBlock(),createBlock(e,{"open-on-hover":"",location:"right",key:C},{activator:withCtx(({props:H})=>[(openBlock(),createBlock(r,mergeProps({ref_for:!0},H,{disabled:S.disabled,key:C}),createSlots({append:withCtx(()=>[createVNode(c,null,{default:withCtx(()=>[...m[1]||(m[1]=[createTextVNode(" mdi-chevron-right ",-1)])]),_:1})]),default:withCtx(()=>[!S.radio&&!S.checkbox?(openBlock(),createBlock(o,{key:0,style:normalizeStyle("cursor: pointer;"+(S.disabled?"opacity: 0.2":""))},{default:withCtx(()=>[createTextVNode(toDisplayString(S.label),1)]),_:2},1032,["style"])):createCommentVNode("",!0)]),_:2},[S.icon?{name:"prepend",fn:withCtx(()=>[createVNode(c,{disabled:S.disabled},{default:withCtx(()=>[createTextVNode(toDisplayString(S.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:withCtx(()=>[createVNode(i,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(S.subMenu,(H,U)=>(openBlock(),createBlock(r,{key:U,"prepend-icon":H.icon,onClick:V=>k.subMenuClick(H)},{default:withCtx(()=>[createVNode(o,null,{default:withCtx(()=>[createTextVNode(toDisplayString(H.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):S.radioGroup?(openBlock(),createBlock(p,{"model-value":S.value,"onUpdate:modelValue":S.command,key:C+"-radio-group","hide-details":"",density:"compact",class:"ma-0 pa-0"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(S.choices,(H,U)=>(openBlock(),createBlock(r,{key:U+"-choice"},{default:withCtx(()=>[createVNode(a,{class:"list-action"},{default:withCtx(()=>[createVNode(n,{color:"secondary",label:H.label,value:H.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(openBlock(),createBlock(r,{onClick:H=>S.command(S),disabled:S.disabled,"data-test":k.formatDT(`${f.title} ${A.label} ${S.label}`),key:C+"-list"},createSlots({default:withCtx(()=>[S.checkbox?(openBlock(),createBlock(a,{key:0,class:"list-action"},{default:withCtx(()=>[createVNode(v,{modelValue:S.checked,"onUpdate:modelValue":H=>S.checked=H,label:S.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):createCommentVNode("",!0),!S.radio&&!S.checkbox?(openBlock(),createBlock(o,{key:1,style:normalizeStyle("cursor: pointer;"+(S.disabled?"opacity: 0.2":""))},{default:withCtx(()=>[createTextVNode(toDisplayString(S.label),1)]),_:2},1032,["style"])):createCommentVNode("",!0)]),_:2},[S.icon?{name:"prepend",fn:withCtx(()=>[createVNode(c,{icon:S.icon,disabled:S.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["onClick","disabled","data-test"]))],64))),256))]),_:2},1024)]),_:2},1024))),128))]),_:1})])}const Z=d(Y$1,[["render",J$1],["__scopeId","data-v-4d454b93"]]);class Q{constructor(){NA.get("/openc3-api/autocomplete/data/screen").then(m=>{this.autocompleteData=m.data}),this.api=new WA}async getCompletions(m,f,g,j,k){let x=f.getLine(g.row).slice(0,g.column).trimStart().split(/ (?![^<]*>)/),_=this.autocompleteData;x.length>1&&(_=_.find(t=>t.caption===x[0]));let c={},h=!0;if(_&&_.params){_.params.length==x.length-1&&(h=!1);let t=_.params[x.length-2];if(t["Target name"])_=(await this.api.get_target_names()).reduce((o,r)=>(o[r]=1,o),{});else if(t["Packet name"]){let o=x[x.length-2];_=(await this.api.get_all_tlm(o)).reduce((r,i)=>(r[i.packet_name]=i.description,r),{})}else if(t["Item name"]){let o=x[x.length-3],r=x[x.length-2];_=(await this.api.get_tlm(o,r)).items.reduce((i,e)=>(i[e.name]=e.description,i),{})}else _=t;c=Object.keys(_||{}).map(o=>{let r={value:o+(h?" ":""),command:h&&"startAutocomplete"};return typeof _[o]=="string"&&(r.meta=_[o]),r})}else c=_;k(null,c)}}const ee$1={props:{modelValue:Boolean,target:{type:String,default:""},screen:{type:String,default:""},definition:{type:String,default:""},keywords:{type:Array,default:()=>[]},errors:{type:Array,default:()=>[]}},emits:["cancel","delete","save","update:modelValue"],data(){return{file:null,docsKeyword:"",contextMenu:!1,menuX:0,menuY:0}},computed:{editErrors:function(){if(this.definition===""&&!this.file)return["Input can not be blank."];if(this.errors.length!==0){let u=new Set,m=[];const f=this.errors.toSorted((g,j)=>g.lineNumber-j.lineNumber);for(const g of f){let j=`At ${g.lineNumber}: (${g.line}) ${g.message}.`;g.usage&&(j+=` Usage: ${g.usage}`),m.push(j),u.add(g.message)}return m}return[]},show:{get(){return this.modelValue},set(u){this.$emit("update:modelValue",u)}}},mounted:function(){this.editor=wA.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight");const u=this.buildScreenMode();this.editor.session.setMode(new u),this.editor.session.setTabSize(2),this.editor.session.setUseWrapMode(!0),this.editor.$blockScrolling=1/0,this.editor.setOption("enableBasicAutocompletion",!0),this.editor.setOption("enableLiveAutocompletion",!0),this.editor.completers=[new Q],this.editor.setHighlightActiveLine(!1),this.editor.setValue(this.definition),this.editor.clearSelection(),X.applyVimModeIfEnabled(this.editor),this.editor.focus()},beforeUnmount(){this.editor.destroy(),this.editor.container.remove()},methods:{toggleVimMode:function(){X.toggleVimMode(this.editor)},showContextMenu:function(u){this.menuX=u.pageX,this.menuY=u.pageY;let m=this.editor.getCursorPosition(),f=this.editor.session.getTokenAt(m.row,m.column);if(f){let g=f.value.trim();g.includes(" ")?this.docsKeyword=g.split(" ")[0]:this.docsKeyword=g,this.contextMenu=!0}},openDocumentation(){window.open(`${window.location.origin}/tools/staticdocs/docs/configuration/telemetry-screens#${this.docsKeyword.toLowerCase()}`,"_blank")},buildScreenMode(){let u=wA.require("ace/lib/oop"),m=wA.require("ace/mode/text_highlight_rules").TextHighlightRules,f=this.keywords.join("|"),g=function(){this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"\\b\\d+(?:\\.\\d+)?\\b"},{token:"keyword",regex:new RegExp(`^\\s*(${f})\\b`)}]},this.normalizeRules()};u.inherits(g,m);let j=function(){this.HighlightRules=g},k=wA.require("ace/mode/text").Mode;return u.inherits(j,k),(function(){this.$id="ace/mode/openc3"}).call(j.prototype),j},downloadScreen:function(){const u=new Blob([this.editor.getValue()],{type:"text/plain"}),m=document.createElement("a");m.href=URL.createObjectURL(u),m.setAttribute("download",`${this.screen.toLowerCase()}.txt`),m.click()},loadFile:function(){const u=new FileReader;u.readAsText(this.file);const m=this;u.onload=function(){m.editor.setValue(u.result),m.file=null}},deleteScreen:function(){this.$dialog.confirm("Are you sure you want to delete this screen?!",{okText:"Delete",cancelText:"Cancel"}).then(u=>{this.$emit("delete")})}}},te$1=["textContent"];function ne$1(u,m,f,g,j,k){const x=resolveComponent("v-btn"),_=resolveComponent("v-spacer"),c=resolveComponent("v-toolbar"),h=resolveComponent("v-row"),t=resolveComponent("v-file-input"),o=resolveComponent("v-list-item-title"),r=resolveComponent("v-list-item"),i=resolveComponent("v-divider"),e=resolveComponent("v-list"),n=resolveComponent("v-menu"),a=resolveComponent("v-card-text"),p=resolveComponent("v-card"),v=resolveComponent("v-dialog");return openBlock(),createBlock(v,{modelValue:k.show,"onUpdate:modelValue":m[5]||(m[5]=A=>k.show=A),persistent:"",width:"75vw"},{default:withCtx(()=>[createVNode(p,null,{default:withCtx(()=>[createVNode(c,{height:"24"},{default:withCtx(()=>[createVNode(x,{class:"mx-2",icon:"mdi-delete",variant:"text",density:"compact","data-test":"delete-screen-icon",onClick:k.deleteScreen},null,8,["onClick"]),createVNode(_),createElementVNode("span",null," Edit Screen: "+toDisplayString(f.target)+" "+toDisplayString(f.screen),1),createVNode(_),createVNode(x,{class:"mx-2",icon:"mdi-download",variant:"text",density:"compact","data-test":"download-screen-icon",onClick:k.downloadScreen},null,8,["onClick"])]),_:1}),createVNode(a,{style:{"max-height":"90vh"}},{default:withCtx(()=>[createVNode(h,{class:"mt-3"},{default:withCtx(()=>[...m[6]||(m[6]=[createTextVNode(" Upload a screen file. ",-1)])]),_:1}),createVNode(h,{"no-gutters":"",align:"center"},{default:withCtx(()=>[createVNode(x,{disabled:!j.file,color:"primary",class:"mr-3","data-test":"edit-screen-load",onClick:k.loadFile},{default:withCtx(()=>[...m[7]||(m[7]=[createTextVNode(" Load ",-1)])]),_:1},8,["disabled","onClick"]),createVNode(t,{modelValue:j.file,"onUpdate:modelValue":m[0]||(m[0]=A=>j.file=A),"truncate-length":"15",accept:".txt",label:"Click to select .txt screen file."},null,8,["modelValue"])]),_:1}),createVNode(h,{class:"mb-2"},{default:withCtx(()=>[...m[8]||(m[8]=[createTextVNode(" Edit the screen definition. ",-1)])]),_:1}),createVNode(h,{class:"mb-2"},{default:withCtx(()=>[createElementVNode("pre",{ref:"editor",class:"editor",onContextmenu:m[1]||(m[1]=withModifiers((...A)=>k.showContextMenu&&k.showContextMenu(...A),["prevent"]))},null,544),createVNode(n,{modelValue:j.contextMenu,"onUpdate:modelValue":m[2]||(m[2]=A=>j.contextMenu=A),target:[j.menuX,j.menuY]},{default:withCtx(()=>[createVNode(e,null,{default:withCtx(()=>[createVNode(r,{link:""},{default:withCtx(()=>[createVNode(o,{onClick:k.openDocumentation},{default:withCtx(()=>[createTextVNode(toDisplayString(j.docsKeyword)+" documentation ",1)]),_:1},8,["onClick"])]),_:1}),createVNode(i),createVNode(r,{title:"Toggle Vim mode","prepend-icon":"extras:vim",onClick:k.toggleVimMode},null,8,["onClick"])]),_:1})]),_:1},8,["modelValue","target"])]),_:1}),createVNode(h,{style:{"max-height":"120px","overflow-y":"auto"}},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(k.editErrors,(A,E)=>(openBlock(),createElementBlock("div",{key:E},[createElementVNode("span",{class:"text-red",textContent:toDisplayString(A)},null,8,te$1)]))),128))]),_:1}),createVNode(h,{class:"mt-5"},{default:withCtx(()=>[m[11]||(m[11]=createElementVNode("span",null," Ctrl-space brings up autocomplete. Right click keywords for documentation. ",-1)),createVNode(_),createVNode(x,{class:"mx-2",variant:"outlined","data-test":"edit-screen-cancel",onClick:m[3]||(m[3]=A=>u.$emit("cancel"))},{default:withCtx(()=>[...m[9]||(m[9]=[createTextVNode(" Cancel ",-1)])]),_:1}),createVNode(x,{class:"mx-2",color:"primary","data-test":"edit-screen-save",onClick:m[4]||(m[4]=A=>u.$emit("save",u.editor.getValue()))},{default:withCtx(()=>[...m[10]||(m[10]=[createTextVNode(" Save ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const ie$1=d(ee$1,[["render",ne$1],["__scopeId","data-v-65b25a74"]]),W$1=20,ye$1={components:{EditScreenDialog:ie$1},mixins:[zA],props:{target:{type:String,default:""},screen:{type:String,default:""},definition:{type:String,default:""},keywords:{type:Array,default:()=>[]},initialFloated:{type:Boolean,default:!1},initialTop:{type:Number,default:0},initialLeft:{type:Number,default:0},initialZ:{type:Number,default:0},minZ:{type:Number,default:0},fixFloated:{type:Boolean,default:!1},count:{type:Number,default:0},showClose:{type:Boolean,default:!0},timeZone:{type:String,default:"local"},inline:{type:Boolean,default:!1},playbackMode:{type:String,default:"realtime"},playbackDateTime:{type:Date,default:null}},emits:["close-screen","delete-screen","drag-screen","edit-screen","float-screen","min-max-screen","unfloat-screen"],data(){return{api:null,backup:"",currentDefinition:this.definition,editDialog:!1,expand:!0,configParser:null,currentLayout:null,layoutStack:[],namedWidgets:{},dynamicWidgets:[],width:null,height:null,staleTime:30,cacheTimeout:.1,globalSettings:[],substitute:!1,original_target_name:null,force_substitute:!1,pollingPeriod:1,errors:[],errorDialog:!1,screenKey:null,dragX:0,dragY:0,floated:this.initialFloated,top:this.initialTop,left:this.initialLeft,zIndex:this.initialZ,changeCounter:0,screenItems:[],actualScreenItems:[],screenValues:{},updateCounter:0,updater:null,screenId:Rk.uniqueId("openc3-screen_"),tlmAvailableTimeout:null}},computed:{error:function(){if(this.errorDialog&&this.errors.length>0){let u=new Set,m="";for(const f of this.errors){if(u.has(f.message))continue;let g=`${f.time}: (${f.type}) ${f.message}
|
3
|
+
`;m+=g,u.add(f.message)}return m}return null},computedStyle(){var u;let m={};const f=this.width||((u=this.$refs.bar)==null?void 0:u.clientWidth);return this.floated&&(m.position="absolute",m.top=this.top+"px",m.left=this.left+"px",m.width=f+"px"),m}},watch:{count:{handler(u,m){this.currentDefinition=this.definition,this.rerender()}},playbackDateTime:{handler(u,m){this.playbackMode==="playback"&&u&&this.update()}},playbackMode:{handler(u,m){u==="realtime"?this.updateRefreshInterval():(clearInterval(this.updater),this.updater=null)}}},errorCaptured(u,m,f){return this.errors.length<W$1&&(u.usage?this.errors.push({type:"usage",message:u.message,usage:u.usage,line:u.line,lineNumber:u.lineNumber,time:new Date().getTime()}):this.errors.push({type:"error",message:u,time:new Date().getTime()})),!1},created(){this.api=new WA,this.configParser=new PA,this.parseDefinition(),this.screenKey=Math.floor(Math.random()*1e6)},mounted(){this.playbackMode==="realtime"&&this.updateRefreshInterval(),this.floated&&(this.$refs.bar.onmousedown=this.dragMouseDown,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex)},unmounted(){this.updater!=null&&(clearInterval(this.updater),this.updater=null),this.tlmAvailableTimeout!=null&&(clearTimeout(this.tlmAvailableTimeout),this.tlmAvailableTimeout=null)},methods:{open(u,m){this.$parent.showScreen(u,m)},close(u,m){this.$parent.closeScreenByName(u,m)},closeAll(){this.$parent.closeAll()},clearErrors:function(){this.errors=[]},updateRefreshInterval:function(){let u=this.pollingPeriod*1e3;this.updater&&clearInterval(this.updater),this.updater=setInterval(()=>{this.update()},u)},parseDefinition:function(){if(this.clearErrors(),this.screenItems=[],this.namedWidgets={},this.layoutStack=[],this.dynamicWidgets=[],this.layoutStack.push({type:"VerticalWidget",parameters:[],widgets:[]}),this.currentLayout=this.layoutStack[this.layoutStack.length-1],this.configParser.parse_string(this.currentDefinition,"",!1,!0,(u,m,f,g)=>{if(u)switch(u){case"SCREEN":this.configParser.verify_num_parameters(3,4,`${u} <Width or AUTO> <Height or AUTO> <Polling Period>`),this.width=parseInt(m[0]),this.height=parseInt(m[1]),this.pollingPeriod=parseFloat(m[2]);break;case"END":this.configParser.verify_num_parameters(0,0,`${u}`),this.layoutStack.pop(),this.currentLayout=this.layoutStack[this.layoutStack.length-1];break;case"STALE_TIME":this.configParser.verify_num_parameters(1,1,`${u} <Time (s)>`),this.staleTime=parseInt(m[0]);break;case"SUBSETTING":this.configParser.verify_num_parameters(3,null,`${u} <Index> <Widget Type> <Widget Settings...>`),m[1]==="RAW"&&(m[1]="RAW__"+m[2].toLowerCase());case"SETTING":this.configParser.verify_num_parameters(2,null,`${u} <Widget Type> <Widget Settings...>`),m[0]==="RAW"&&(m[0]="RAW__"+m[1].toLowerCase()),(this.currentLayout.widgets[this.currentLayout.widgets.length-1]??this.currentLayout).settings.push(m);break;case"GLOBAL_SUBSETTING":this.configParser.verify_num_parameters(3,null,`${u} <Index> <Widget Type> <Widget Settings...>`),m[2]==="RAW"&&(m[2]="RAW__"+m[3].toLowerCase());case"GLOBAL_SETTING":this.configParser.verify_num_parameters(2,null,`${u} <Widget Type> <Widget Settings...>`),m[1]==="RAW"&&(m[1]="RAW__"+m[2].toLowerCase()),this.globalSettings.push(m);break;default:this.processWidget(u,m,f,g);break}}),typeof this.layoutStack[0]>"u"){let u=[],m=[];for(const f of this.dynamicWidgets)u.push(f.name),m.push(f.lineNumber);this.errors.length<W$1&&this.errors.push({type:"usage",message:`Unknown widget! Are these widgets: ${u.join(",")}?`,lineNumber:m.join(","),time:new Date().getTime()}),this.layoutStack[0]={type:"VerticalWidget",parameters:[],widgets:[]}}else this.applyGlobalSettings(this.layoutStack[0].widgets)},openEdit:function(){this.backup=this.currentDefinition.repeat(1),this.editDialog=!0},upScreen:function(){this.zIndex+=1,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex,this.$emit("drag-screen",[this.floated,this.top,this.left,this.zIndex])},downScreen:function(){this.zIndex>this.minZ&&(this.zIndex-=1,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex,this.$emit("drag-screen",[this.floated,this.top,this.left,this.zIndex]))},floatScreen:function(){if(this.floated)this.$refs.bar.onmousedown=null,this.$refs.bar.parentElement.parentElement.style="z-index: 0",this.floated=!1,this.$emit("unfloat-screen",[this.floated,this.top,this.left,this.zIndex]);else{let u=this.$refs.bar.parentElement.parentElement.parentElement.getBoundingClientRect(),m=this.$refs.bar.getBoundingClientRect();this.top=m.top-u.top-5,this.left=m.left-u.left-5,this.$refs.bar.onmousedown=this.dragMouseDown,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex,this.floated=!0,this.$emit("float-screen",[this.floated,this.top,this.left,this.zIndex])}},dragMouseDown:function(u){u=u||window.event,u.preventDefault(),this.dragX=u.clientX,this.dragY=u.clientY,document.onmouseup=this.closeDragElement,document.onmousemove=this.elementDrag},elementDrag:function(u){u=u||window.event,u.preventDefault();let m=this.dragX-u.clientX,f=this.dragY-u.clientY;this.dragX=u.clientX,this.dragY=u.clientY,this.top=this.$refs.bar.offsetTop-f,this.left=this.$refs.bar.offsetLeft-m,this.$emit("drag-screen",[this.floated,this.top,this.left,this.zIndex])},closeDragElement:function(){document.onmouseup=null,document.onmousemove=null},rerender:function(){this.parseDefinition(),this.updateRefreshInterval(),this.screenKey=Math.floor(Math.random()*1e6),this.$nextTick(function(){this.clearErrors(),this.$emit("edit-screen")})},cancelEdit:function(){this.file=null,this.editDialog=!1,this.currentDefinition=this.backup,this.rerender()},saveEdit:function(u){this.editDialog=!1,this.currentDefinition=u,this.rerender(),this.$nextTick(function(){NA.post("/openc3-api/screen/",{data:{scope:window.openc3Scope,target:this.target,screen:this.screen,text:this.currentDefinition}},0)})},deleteScreen:function(){this.editDialog=!1,NA.delete(`/openc3-api/screen/${this.target}/${this.screen}`).then(u=>{this.$emit("delete-screen")})},minMaxTransition:function(){this.expand=!this.expand,this.$emit("min-max-screen")},processWidget:function(u,m,f,g){let j=null;u==="NAMED_WIDGET"&&(this.configParser.verify_num_parameters(2,null,`${u} <Widget Name> <Widget Type> <Widget Settings... (optional)>`),j=m[0].toUpperCase(),u=m[1].toUpperCase(),m=m.slice(2,m.length));const k=u.charAt(0).toUpperCase()+u.slice(1).toLowerCase()+"Widget";let x=[];if(x.push(["__SCREEN_ID__",this.screenId]),j!==null&&x.push(["NAMED_WIDGET",j]),u==="VERTICAL"||u==="VERTICALBOX"||u==="HORIZONTAL"||u==="HORIZONTALBOX"||u==="MATRIXBYCOLUMNS"||u==="TABBOOK"||u==="TABITEM"||u==="CANVAS"||u==="RADIOGROUP"||u==="SCROLLWINDOW"){const _={type:k,parameters:m,settings:x,screenValues:this.screenValues,screenTimeZone:this.timeZone,widgets:[]};this.layoutStack.push(_),this.currentLayout.widgets.push(_),this.currentLayout=_}else if(this.$options.components[k])this.currentLayout.widgets.push({type:k,target:this.target,parameters:m,settings:x,screenValues:this.screenValues,screenTimeZone:this.timeZone,line:f,lineNumber:g});else{let _={type:"DynamicWidget",target:this.target,parameters:m,settings:x,screenValues:this.screenValues,screenTimeZone:this.timeZone,name:k,line:f,lineNumber:g};this.currentLayout.widgets.push(_),this.dynamicWidgets.push(_)}},applyGlobalSettings:function(u){u.forEach(m=>{this.globalSettings.forEach(f=>{m.type.toLowerCase()===f[0].toLowerCase()+"widget"&&(m.settings.find(g=>g[0]===f[1])||m.settings.push(f.slice(1)))}),m.widgets&&this.applyGlobalSettings(m.widgets)})},update:function(){let u=this.playbackMode==="playback"?this.playbackDateTime:null;this.actualScreenItems.length!==0&&this.api.get_tlm_values(this.actualScreenItems,this.staleTime,this.cacheTimeout,u).then(m=>{m&&m.length>0&&this.updateValues(m)}).catch(m=>{let f=JSON.stringify(m,null,2);this.errors.find(g=>g.message===f)||this.errors.length<W$1&&this.errors.push({type:"error",message:f,time:new Date().getTime()})})},updateValues:function(u){if(this.updateCounter+=1,u.length!=this.screenItems.length||u.length!=this.actualScreenItems.length)console.log(`get_tlm_values mismatch: data.length: ${u.length}, screenItems.length: ${this.screenItems.length}, actualScreenItems.length: ${this.actualScreenItems.length}`,JSON.stringify(u),JSON.stringify(this.screenItems),JSON.stringify(this.actualScreenItems));else for(let m=0;m<u.length;m++)u[m].push(this.updateCounter),this.screenValues[this.screenItems[m]]=u[m]},debouncedUpdateTlmAvailable:function(){this.tlmAvailableTimeout!=null&&clearTimeout(this.tlmAvailableTimeout),this.tlmAvailableTimeout=setTimeout(()=>{this.api.get_tlm_available(this.screenItems).then(u=>{if(this.actualScreenItems=u,this.screenItems.length!=u.length)console.log("Error getting tlm available",this.screenItems,this.actualScreenItems);else for(let m=0;m<this.actualScreenItems.length;m++)if(this.actualScreenItems[m]===null){const f=this.screenItems[m].split("__"),g=this.currentDefinition.split(`
|
4
|
+
`),j=g.findIndex(k=>k.includes(f[0])&&k.includes(f[1])&&k.includes(f[2]))+1;j>0?this.errors.push({type:"usage",message:`Null for ${f.join(" ")}! Does it exist?`,line:g[j-1],lineNumber:j,time:new Date().getTime()}):this.errors.push({type:"error",message:`Null for ${f.join(" ")}! Does it exist?`,time:new Date().getTime()})}}).catch(u=>{console.log("Error getting tlm available",u),this.actualScreenItems=this.screenItems}),this.tlmAvailableTimeout=null},100)},addItem:function(u){this.screenItems.push(u),this.screenValues[u]=[null,null,0],this.debouncedUpdateTlmAvailable()},deleteItem:function(u){let m=this.screenItems.indexOf(u);this.screenItems.splice(m,1),this.debouncedUpdateTlmAvailable()}}},_e$1={ref:"screen",class:"pa-1",style:{position:"relative"}},be$1={key:1,class:"pa-1",style:{position:"relative"}};function xe$1(u,m,f,g,j,k){const x=resolveComponent("v-btn"),_=resolveComponent("v-tooltip"),c=resolveComponent("v-spacer"),h=resolveComponent("v-toolbar"),t=resolveComponent("v-overlay"),o=resolveComponent("vertical-widget"),r=resolveComponent("v-expand-transition"),i=resolveComponent("v-card"),e=resolveComponent("edit-screen-dialog"),n=resolveComponent("v-textarea"),a=resolveComponent("v-card-actions"),p=resolveComponent("v-dialog");return openBlock(),createElementBlock("div",{ref:"bar",style:normalizeStyle(k.computedStyle)},[f.inline?createCommentVNode("",!0):(openBlock(),createBlock(i,{key:0,"min-height":j.height,"min-width":j.width,style:{cursor:"default"}},{default:withCtx(()=>[createVNode(h,{height:"24"},{default:withCtx(()=>[withDirectives(createVNode(x,{icon:"mdi-alert",variant:"text",density:"compact","data-test":"error-graph-icon","aria-label":"Show Errors",onClick:m[0]||(m[0]=()=>{j.errorDialog=!0})},null,512),[[vShow,j.errors.length!==0]]),createVNode(x,{icon:"mdi-pencil",variant:"text",density:"compact","data-test":"edit-screen-icon","aria-label":"Edit Screen",onClick:k.openEdit},null,8,["onClick"]),f.fixFloated?createCommentVNode("",!0):(openBlock(),createBlock(_,{key:0,"open-delay":600,location:"top"},{activator:withCtx(({props:v})=>[createElementVNode("div",normalizeProps(guardReactiveProps(v)),[createVNode(x,{icon:j.floated?"mdi-balloon":"mdi-view-grid-outline",variant:"text",density:"compact","data-test":"float-screen-icon","aria-label":j.floated?"Unfloat Screen":"Float Screen",onClick:k.floatScreen},null,8,["icon","aria-label","onClick"])],16)]),default:withCtx(()=>[createElementVNode("span",null,toDisplayString(j.floated?"Unfloat Screen":"Float Screen"),1)]),_:1})),j.floated?(openBlock(),createBlock(_,{key:1,"open-delay":600,location:"top"},{activator:withCtx(({props:v})=>[createElementVNode("div",normalizeProps(guardReactiveProps(v)),[createVNode(x,{icon:"mdi-arrow-up",variant:"text",density:"compact","data-test":"up-screen-icon","aria-label":"Move Screen Up",onClick:k.upScreen},null,8,["onClick"])],16)]),default:withCtx(()=>[m[6]||(m[6]=createElementVNode("span",null," Move Screen Up ",-1))]),_:1})):createCommentVNode("",!0),j.floated&&j.zIndex>f.minZ?(openBlock(),createBlock(_,{key:2,"open-delay":600,location:"top"},{activator:withCtx(({props:v})=>[createElementVNode("div",normalizeProps(guardReactiveProps(v)),[createVNode(x,{icon:"mdi-arrow-down",variant:"text",density:"compact","data-test":"down-screen-icon","aria-label":"Move Screen Down",onClick:k.downScreen},null,8,["onClick"])],16)]),default:withCtx(()=>[m[7]||(m[7]=createElementVNode("span",null," Move Screen Down ",-1))]),_:1})):createCommentVNode("",!0),createVNode(c),createElementVNode("span",null,toDisplayString(f.target)+" "+toDisplayString(f.screen),1),createVNode(c),j.expand?(openBlock(),createBlock(x,{key:3,icon:"mdi-window-minimize",variant:"text",density:"compact","data-test":"minimize-screen-icon","aria-label":"Minimize Screen",onClick:k.minMaxTransition},null,8,["onClick"])):(openBlock(),createBlock(x,{key:4,icon:"mdi-window-maximize",variant:"text",density:"compact","data-test":"maximize-screen-icon","aria-label":"Maximize Screen",onClick:k.minMaxTransition},null,8,["onClick"])),f.showClose?(openBlock(),createBlock(x,{key:5,icon:"mdi-close-box",variant:"text",density:"compact","data-test":"close-screen-icon","aria-label":"Close Screen",onClick:m[1]||(m[1]=v=>u.$emit("close-screen"))})):createCommentVNode("",!0)]),_:1}),j.editDialog?createCommentVNode("",!0):(openBlock(),createBlock(r,{key:0},{default:withCtx(()=>[withDirectives(createElementVNode("div",_e$1,[createVNode(t,{style:{"pointer-events":"none"},"model-value":j.errors.length!==0,opacity:"0.8",absolute:"",attach:"","scroll-strategy":"none"},null,8,["model-value"]),(openBlock(),createBlock(o,{key:j.screenKey,widgets:j.layoutStack[0].widgets,"screen-values":j.screenValues,"screen-time-zone":f.timeZone,onAddItem:k.addItem,onDeleteItem:k.deleteItem,onOpen:k.open,onClose:k.close,onCloseAll:k.closeAll},null,8,["widgets","screen-values","screen-time-zone","onAddItem","onDeleteItem","onOpen","onClose","onCloseAll"]))],512),[[vShow,j.expand]])]),_:1}))]),_:1},8,["min-height","min-width"])),f.inline?(openBlock(),createElementBlock("div",be$1,[createVNode(t,{style:{"pointer-events":"none"},"model-value":j.errors.length!==0,opacity:"0.8",absolute:"",attach:"","scroll-strategy":"none"},null,8,["model-value"]),withDirectives(createVNode(x,{icon:"mdi-alert",variant:"text",density:"compact","data-test":"error-graph-icon","aria-label":"Show Errors",onClick:m[2]||(m[2]=()=>{j.errorDialog=!0})},null,512),[[vShow,j.errors.length!==0]]),(openBlock(),createBlock(o,{key:j.screenKey,widgets:j.layoutStack[0].widgets,"screen-values":j.screenValues,"screen-time-zone":f.timeZone,onAddItem:k.addItem,onDeleteItem:k.deleteItem,onOpen:k.open,onClose:k.close,onCloseAll:k.closeAll},null,8,["widgets","screen-values","screen-time-zone","onAddItem","onDeleteItem","onOpen","onClose","onCloseAll"]))])):createCommentVNode("",!0),j.editDialog?(openBlock(),createBlock(e,{key:2,modelValue:j.editDialog,"onUpdate:modelValue":m[3]||(m[3]=v=>j.editDialog=v),target:f.target,screen:f.screen,definition:j.currentDefinition,keywords:f.keywords,errors:j.errors,onSave:k.saveEdit,onCancel:k.cancelEdit,onDelete:k.deleteScreen},null,8,["modelValue","target","screen","definition","keywords","errors","onSave","onCancel","onDelete"])):createCommentVNode("",!0),createVNode(p,{modelValue:j.errorDialog,"onUpdate:modelValue":m[5]||(m[5]=v=>j.errorDialog=v),width:"60vw"},{default:withCtx(()=>[createVNode(h,{height:"24"},{default:withCtx(()=>[createVNode(c),createElementVNode("span",null," Screen: "+toDisplayString(f.target)+" "+toDisplayString(f.screen)+" Errors ",1),createVNode(c)]),_:1}),createVNode(i,null,{default:withCtx(()=>[createVNode(n,{class:"errors",readonly:"",rows:"13","model-value":k.error},null,8,["model-value"]),createVNode(a,{class:"pb-5"},{default:withCtx(()=>[createVNode(c),createVNode(x,{variant:"outlined",class:"mr-2",onClick:k.clearErrors},{default:withCtx(()=>[...m[8]||(m[8]=[createTextVNode(" Clear Errors ",-1)])]),_:1},8,["onClick"]),createVNode(x,{variant:"flat",class:"mr-2",onClick:m[4]||(m[4]=v=>j.errorDialog=!1)},{default:withCtx(()=>[...m[9]||(m[9]=[createTextVNode(" Close ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])],4)}const Ee$1=d(ye$1,[["render",xe$1],["__scopeId","data-v-95e4a143"]]);var ace$1={exports:{}},hasRequiredAce;function requireAce(){return hasRequiredAce||(hasRequiredAce=1,(function(u,m){(function(){var f="ace",g=(function(){return this})();!g&&typeof window<"u"&&(g=window);var j=function(t,o,r){if(typeof t!="string"){j.original?j.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(r=o),j.modules[t]||(j.payloads[t]=r,j.modules[t]=null)};j.modules={},j.payloads={};var k=function(t,o,r){if(typeof o=="string"){var i=c(t,o);if(i!=null)return r&&r(),i}else if(Object.prototype.toString.call(o)==="[object Array]"){for(var e=[],n=0,a=o.length;n<a;++n){var p=c(t,o[n]);if(p==null&&x.original)return;e.push(p)}return r&&r.apply(null,e)||!0}},x=function(t,o){var r=k("",t,o);return r==null&&x.original?x.original.apply(this,arguments):r},_=function(t,o){if(o.indexOf("!")!==-1){var r=o.split("!");return _(t,r[0])+"!"+_(t,r[1])}if(o.charAt(0)=="."){var i=t.split("/").slice(0,-1).join("/");for(o=i+"/"+o;o.indexOf(".")!==-1&&e!=o;){var e=o;o=o.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return o},c=function(t,o){o=_(t,o);var r=j.modules[o];if(!r){if(r=j.payloads[o],typeof r=="function"){var i={},e={id:o,uri:"",exports:i,packaged:!0},n=function(p,v){return k(o,p,v)},a=r(n,i,e);i=a||e.exports,j.modules[o]=i,delete j.payloads[o]}r=j.modules[o]=i||r}return r};function h(t){var o=g;g[t]||(g[t]={}),o=g[t],(!o.define||!o.define.packaged)&&(j.original=o.define,o.define=j,o.define.packaged=!0),(!o.require||!o.require.packaged)&&(x.original=o.require,o.require=x,o.require.packaged=!0)}h(f)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(f,g,j){function k(x,_,c){Object.defineProperty(x,_,{value:c,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||k(String.prototype,"startsWith",function(x,_){return _=_||0,this.lastIndexOf(x,_)===_}),String.prototype.endsWith||k(String.prototype,"endsWith",function(x,_){var c=this;(_===void 0||_>c.length)&&(_=c.length),_-=x.length;var h=c.indexOf(x,_);return h!==-1&&h===_}),String.prototype.repeat||k(String.prototype,"repeat",function(x){for(var _="",c=this;x>0;)x&1&&(_+=c),(x>>=1)&&(c+=c);return _}),String.prototype.includes||k(String.prototype,"includes",function(x,_){return this.indexOf(x,_)!=-1}),Object.assign||(Object.assign=function(x){if(x==null)throw new TypeError("Cannot convert undefined or null to object");for(var _=Object(x),c=1;c<arguments.length;c++){var h=arguments[c];h!=null&&Object.keys(h).forEach(function(t){_[t]=h[t]})}return _}),Object.values||(Object.values=function(x){return Object.keys(x).map(function(_){return x[_]})}),Array.prototype.find||k(Array.prototype,"find",function(x){for(var _=this.length,c=arguments[1],h=0;h<_;h++){var t=this[h];if(x.call(c,t,h,this))return t}}),Array.prototype.findIndex||k(Array.prototype,"findIndex",function(x){for(var _=this.length,c=arguments[1],h=0;h<_;h++){var t=this[h];if(x.call(c,t,h,this))return h}}),Array.prototype.includes||k(Array.prototype,"includes",function(x,_){return this.indexOf(x,_)!=-1}),Array.prototype.fill||k(Array.prototype,"fill",function(x){for(var _=this,c=_.length>>>0,h=arguments[1],t=h>>0,o=t<0?Math.max(c+t,0):Math.min(t,c),r=arguments[2],i=r===void 0?c:r>>0,e=i<0?Math.max(c+i,0):Math.min(i,c);o<e;)_[o]=x,o++;return _}),Array.of||k(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(f,g,j){f("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(f,g,j){g.deepCopy=function k(x){if(typeof x!="object"||!x)return x;var _;if(Array.isArray(x)){_=[];for(var c=0;c<x.length;c++)_[c]=k(x[c]);return _}if(Object.prototype.toString.call(x)!=="[object Object]")return x;_={};for(var c in x)_[c]=k(x[c]);return _}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(f,g,j){g.last=function(_){return _[_.length-1]},g.stringReverse=function(_){return _.split("").reverse().join("")},g.stringRepeat=function(_,c){for(var h="";c>0;)c&1&&(h+=_),(c>>=1)&&(_+=_);return h};var k=/^\s\s*/,x=/\s\s*$/;g.stringTrimLeft=function(_){return _.replace(k,"")},g.stringTrimRight=function(_){return _.replace(x,"")},g.copyObject=function(_){var c={};for(var h in _)c[h]=_[h];return c},g.copyArray=function(_){for(var c=[],h=0,t=_.length;h<t;h++)_[h]&&typeof _[h]=="object"?c[h]=this.copyObject(_[h]):c[h]=_[h];return c},g.deepCopy=f("./deep_copy").deepCopy,g.arrayToMap=function(_){for(var c={},h=0;h<_.length;h++)c[_[h]]=1;return c},g.createMap=function(_){var c=Object.create(null);for(var h in _)c[h]=_[h];return c},g.arrayRemove=function(_,c){for(var h=0;h<=_.length;h++)c===_[h]&&_.splice(h,1)},g.escapeRegExp=function(_){return _.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},g.escapeHTML=function(_){return(""+_).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},g.getMatchOffsets=function(_,c){var h=[];return _.replace(c,function(t){h.push({offset:arguments[arguments.length-2],length:t.length})}),h},g.deferredCall=function(_){var c=null,h=function(){c=null,_()},t=function(o){return t.cancel(),c=setTimeout(h,o||0),t};return t.schedule=t,t.call=function(){return this.cancel(),_(),t},t.cancel=function(){return clearTimeout(c),c=null,t},t.isPending=function(){return c},t},g.delayedCall=function(_,c){var h=null,t=function(){h=null,_()},o=function(r){h==null&&(h=setTimeout(t,r||c))};return o.delay=function(r){h&&clearTimeout(h),h=setTimeout(t,r||c)},o.schedule=o,o.call=function(){this.cancel(),_()},o.cancel=function(){h&&clearTimeout(h),h=null},o.isPending=function(){return h},o},g.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},g.skipEmptyMatch=function(_,c,h){return h&&_.codePointAt(c)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(f,g,j){g.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},g.getOS=function(){return g.isMac?g.OS.MAC:g.isLinux?g.OS.LINUX:g.OS.WINDOWS};var k=typeof navigator=="object"?navigator:{},x=(/mac|win|linux/i.exec(k.platform)||["other"])[0].toLowerCase(),_=k.userAgent||"",c=k.appName||"";g.isWin=x=="win",g.isMac=x=="mac",g.isLinux=x=="linux",g.isIE=c=="Microsoft Internet Explorer"||c.indexOf("MSAppHost")>=0?parseFloat((_.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((_.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),g.isOldIE=g.isIE&&g.isIE<9,g.isGecko=g.isMozilla=_.match(/ Gecko\/\d+/),g.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",g.isWebKit=parseFloat(_.split("WebKit/")[1])||void 0,g.isChrome=parseFloat(_.split(" Chrome/")[1])||void 0,g.isSafari=parseFloat(_.split(" Safari/")[1])&&!g.isChrome||void 0,g.isEdge=parseFloat(_.split(" Edge/")[1])||void 0,g.isAIR=_.indexOf("AdobeAIR")>=0,g.isAndroid=_.indexOf("Android")>=0,g.isChromeOS=_.indexOf(" CrOS ")>=0,g.isIOS=/iPad|iPhone|iPod/.test(_)&&!window.MSStream,g.isIOS&&(g.isMac=!0),g.isMobile=g.isIOS||g.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(f,g,j){var k=f("./useragent"),x="http://www.w3.org/1999/xhtml";g.buildDom=function r(i,e,n){if(typeof i=="string"&&i){var a=document.createTextNode(i);return e&&e.appendChild(a),a}if(!Array.isArray(i))return i&&i.appendChild&&e&&e.appendChild(i),i;if(typeof i[0]!="string"||!i[0]){for(var p=[],v=0;v<i.length;v++){var A=r(i[v],e,n);A&&p.push(A)}return p}var E=document.createElement(i[0]),S=i[1],C=1;S&&typeof S=="object"&&!Array.isArray(S)&&(C=2);for(var v=C;v<i.length;v++)r(i[v],E,n);return C==2&&Object.keys(S).forEach(function(H){var U=S[H];H==="class"?E.className=Array.isArray(U)?U.join(" "):U:typeof U=="function"||H=="value"||H[0]=="$"?E[H]=U:H==="ref"?n&&(n[U]=E):H==="style"?typeof U=="string"&&(E.style.cssText=U):U!=null&&E.setAttribute(H,U)}),e&&e.appendChild(E),E},g.getDocumentHead=function(r){return r||(r=document),r.head||r.getElementsByTagName("head")[0]||r.documentElement},g.createElement=function(r,i){return document.createElementNS?document.createElementNS(i||x,r):document.createElement(r)},g.removeChildren=function(r){r.innerHTML=""},g.createTextNode=function(r,i){var e=i?i.ownerDocument:document;return e.createTextNode(r)},g.createFragment=function(r){var i=r?r.ownerDocument:document;return i.createDocumentFragment()},g.hasCssClass=function(r,i){var e=(r.className+"").split(/\s+/g);return e.indexOf(i)!==-1},g.addCssClass=function(r,i){g.hasCssClass(r,i)||(r.className+=" "+i)},g.removeCssClass=function(r,i){for(var e=r.className.split(/\s+/g);;){var n=e.indexOf(i);if(n==-1)break;e.splice(n,1)}r.className=e.join(" ")},g.toggleCssClass=function(r,i){for(var e=r.className.split(/\s+/g),n=!0;;){var a=e.indexOf(i);if(a==-1)break;n=!1,e.splice(a,1)}return n&&e.push(i),r.className=e.join(" "),n},g.setCssClass=function(r,i,e){e?g.addCssClass(r,i):g.removeCssClass(r,i)},g.hasCssString=function(r,i){var e=0,n;if(i=i||document,n=i.querySelectorAll("style")){for(;e<n.length;)if(n[e++].id===r)return!0}},g.removeElementById=function(r,i){i=i||document,i.getElementById(r)&&i.getElementById(r).remove()};var _,c=[];g.useStrictCSP=function(r){_=r,r==!1?h():c||(c=[])};function h(){var r=c;c=null,r&&r.forEach(function(i){t(i[0],i[1])})}function t(r,i,e){if(!(typeof document>"u")){if(c){if(e)h();else if(e===!1)return c.push([r,i])}if(!_){var n=e;!e||!e.getRootNode?n=document:(n=e.getRootNode(),(!n||n==e)&&(n=document));var a=n.ownerDocument||n;if(i&&g.hasCssString(i,n))return null;i&&(r+=`
|
5
|
+
/*# sourceURL=ace/css/`+i+" */");var p=g.createElement("style");p.appendChild(a.createTextNode(r)),i&&(p.id=i),n==a&&(n=g.getDocumentHead(a)),n.insertBefore(p,n.firstChild)}}}if(g.importCssString=t,g.importCssStylsheet=function(r,i){g.buildDom(["link",{rel:"stylesheet",href:r}],g.getDocumentHead(i))},g.scrollbarWidth=function(r){var i=g.createElement("ace_inner");i.style.width="100%",i.style.minWidth="0px",i.style.height="200px",i.style.display="block";var e=g.createElement("ace_outer"),n=e.style;n.position="absolute",n.left="-10000px",n.overflow="hidden",n.width="200px",n.minWidth="0px",n.height="150px",n.display="block",e.appendChild(i);var a=r&&r.documentElement||document&&document.documentElement;if(!a)return 0;a.appendChild(e);var p=i.offsetWidth;n.overflow="scroll";var v=i.offsetWidth;return p===v&&(v=e.clientWidth),a.removeChild(e),p-v},g.computedStyle=function(r,i){return window.getComputedStyle(r,"")||{}},g.setStyle=function(r,i,e){r[i]!==e&&(r[i]=e)},g.HAS_CSS_ANIMATION=!1,g.HAS_CSS_TRANSFORMS=!1,g.HI_DPI=k.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,k.isChromeOS&&(g.HI_DPI=!1),typeof document<"u"){var o=document.createElement("div");g.HI_DPI&&o.style.transform!==void 0&&(g.HAS_CSS_TRANSFORMS=!0),!k.isEdge&&typeof o.style.animationName<"u"&&(g.HAS_CSS_ANIMATION=!0),o=null}g.HAS_CSS_TRANSFORMS?g.translate=function(r,i,e){r.style.transform="translate("+Math.round(i)+"px, "+Math.round(e)+"px)"}:g.translate=function(r,i,e){r.style.top=Math.round(e)+"px",r.style.left=Math.round(i)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(f,g,j){/*
|
6
|
+
* based on code from:
|
7
|
+
*
|
8
|
+
* @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
|
9
|
+
* Available via the MIT or new BSD license.
|
10
|
+
* see: http://github.com/jrburke/requirejs for details
|
11
|
+
*/var k=f("./dom");g.get=function(x,_){var c=new XMLHttpRequest;c.open("GET",x,!0),c.onreadystatechange=function(){c.readyState===4&&_(c.responseText)},c.send(null)},g.loadScript=function(x,_){var c=k.getDocumentHead(),h=document.createElement("script");h.src=x,c.appendChild(h),h.onload=h.onreadystatechange=function(t,o){(o||!h.readyState||h.readyState=="loaded"||h.readyState=="complete")&&(h=h.onload=h.onreadystatechange=null,o||_())}},g.qualifyURL=function(x){var _=document.createElement("a");return _.href=x,_.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(f,g,j){g.inherits=function(k,x){k.super_=x,k.prototype=Object.create(x.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}})},g.mixin=function(k,x){for(var _ in x)k[_]=x[_];return k},g.implement=function(k,x){g.mixin(k,x)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(f,g,j){var k={},x=function(){this.propagationStopped=!0},_=function(){this.defaultPrevented=!0};k._emit=k._dispatchEvent=function(c,h){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var t=this._eventRegistry[c]||[],o=this._defaultHandlers[c];if(!(!t.length&&!o)){(typeof h!="object"||!h)&&(h={}),h.type||(h.type=c),h.stopPropagation||(h.stopPropagation=x),h.preventDefault||(h.preventDefault=_),t=t.slice();for(var r=0;r<t.length&&(t[r](h,this),!h.propagationStopped);r++);if(o&&!h.defaultPrevented)return o(h,this)}},k._signal=function(c,h){var t=(this._eventRegistry||{})[c];if(t){t=t.slice();for(var o=0;o<t.length;o++)t[o](h,this)}},k.once=function(c,h){var t=this;if(this.on(c,function o(){t.off(c,o),h.apply(null,arguments)}),!h)return new Promise(function(o){h=o})},k.setDefaultHandler=function(c,h){var t=this._defaultHandlers;if(t||(t=this._defaultHandlers={_disabled_:{}}),t[c]){var o=t[c],r=t._disabled_[c];r||(t._disabled_[c]=r=[]),r.push(o);var i=r.indexOf(h);i!=-1&&r.splice(i,1)}t[c]=h},k.removeDefaultHandler=function(c,h){var t=this._defaultHandlers;if(t){var o=t._disabled_[c];if(t[c]==h)o&&this.setDefaultHandler(c,o.pop());else if(o){var r=o.indexOf(h);r!=-1&&o.splice(r,1)}}},k.on=k.addEventListener=function(c,h,t){this._eventRegistry=this._eventRegistry||{};var o=this._eventRegistry[c];return o||(o=this._eventRegistry[c]=[]),o.indexOf(h)==-1&&o[t?"unshift":"push"](h),h},k.off=k.removeListener=k.removeEventListener=function(c,h){this._eventRegistry=this._eventRegistry||{};var t=this._eventRegistry[c];if(t){var o=t.indexOf(h);o!==-1&&t.splice(o,1)}},k.removeAllListeners=function(c){c||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[c]=void 0),this._defaultHandlers&&(this._defaultHandlers[c]=void 0)},g.EventEmitter=k}),ace.define("ace/lib/report_error",["require","exports","module"],function(f,g,j){g.reportError=function(x,_){var c=new Error(x);c.data=_,typeof console=="object"&&console.error&&console.error(c),setTimeout(function(){throw c})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(f,g,j){var k={"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"};g.defaultEnglishMessages=k}),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(f,g,j){"no use strict";var k=f("./oop"),x=f("./event_emitter").EventEmitter,_=f("./report_error").reportError,c=f("./default_english_messages").defaultEnglishMessages,h={setOptions:function(e){Object.keys(e).forEach(function(n){this.setOption(n,e[n])},this)},getOptions:function(e){var n={};if(e)Array.isArray(e)||(e=Object.keys(e));else{var a=this.$options;e=Object.keys(a).filter(function(p){return!a[p].hidden})}return e.forEach(function(p){n[p]=this.getOption(p)},this),n},setOption:function(e,n){if(this["$"+e]!==n){var a=this.$options[e];if(!a)return t('misspelled option "'+e+'"');if(a.forwardTo)return this[a.forwardTo]&&this[a.forwardTo].setOption(e,n);a.handlesSet||(this["$"+e]=n),a&&a.set&&a.set.call(this,n)}},getOption:function(e){var n=this.$options[e];return n?n.forwardTo?this[n.forwardTo]&&this[n.forwardTo].getOption(e):n&&n.get?n.get.call(this):this["$"+e]:t('misspelled option "'+e+'"')}};function t(e){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var o,r,i=(function(){function e(){this.$defaultOptions={},o=c,r="dollarSigns"}return e.prototype.defineOptions=function(n,a,p){return n.$options||(this.$defaultOptions[a]=n.$options={}),Object.keys(p).forEach(function(v){var A=p[v];typeof A=="string"&&(A={forwardTo:A}),A.name||(A.name=v),n.$options[A.name]=A,"initialValue"in A&&(n["$"+A.name]=A.initialValue)}),k.implement(n,h),this},e.prototype.resetOptions=function(n){Object.keys(n.$options).forEach(function(a){var p=n.$options[a];"value"in p&&n.setOption(a,p.value)})},e.prototype.setDefaultValue=function(n,a,p){if(!n){for(n in this.$defaultOptions)if(this.$defaultOptions[n][a])break;if(!this.$defaultOptions[n][a])return!1}var v=this.$defaultOptions[n]||(this.$defaultOptions[n]={});v[a]&&(v.forwardTo?this.setDefaultValue(v.forwardTo,a,p):v[a].value=p)},e.prototype.setDefaultValues=function(n,a){Object.keys(a).forEach(function(p){this.setDefaultValue(n,p,a[p])},this)},e.prototype.setMessages=function(n,a){o=n,a&&a.placeholders&&(r=a.placeholders)},e.prototype.nls=function(n,a,p){o[n]||(t("No message found for the key '"+n+"' in messages with id "+o.$id+", trying to find a translation for the default string '"+a+"'."),o[a]||t("No message found for the default string '"+a+"' in the provided messages. Falling back to the default English message."));var v=o[n]||o[a]||a;return p&&(r==="dollarSigns"&&(v=v.replace(/\$(\$|[\d]+)/g,function(A,E){return E=="$"?"$":p[E]})),r==="curlyBrackets"&&(v=v.replace(/\{([^\}]+)\}/g,function(A,E){return p[E]}))),v},e})();i.prototype.warn=t,i.prototype.reportError=_,k.implement(i.prototype,x),g.AppConfig=i}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(f,g,j){j.exports=`.ace-tm .ace_gutter {
|
12
|
+
background: #f0f0f0;
|
13
|
+
color: #333;
|
14
|
+
}
|
15
|
+
|
16
|
+
.ace-tm .ace_print-margin {
|
17
|
+
width: 1px;
|
18
|
+
background: #e8e8e8;
|
19
|
+
}
|
20
|
+
|
21
|
+
.ace-tm .ace_fold {
|
22
|
+
background-color: #6B72E6;
|
23
|
+
}
|
24
|
+
|
25
|
+
.ace-tm {
|
26
|
+
background-color: #FFFFFF;
|
27
|
+
color: black;
|
28
|
+
}
|
29
|
+
|
30
|
+
.ace-tm .ace_cursor {
|
31
|
+
color: black;
|
32
|
+
}
|
33
|
+
|
34
|
+
.ace-tm .ace_invisible {
|
35
|
+
color: rgb(191, 191, 191);
|
36
|
+
}
|
37
|
+
|
38
|
+
.ace-tm .ace_storage,
|
39
|
+
.ace-tm .ace_keyword {
|
40
|
+
color: blue;
|
41
|
+
}
|
42
|
+
|
43
|
+
.ace-tm .ace_constant {
|
44
|
+
color: rgb(197, 6, 11);
|
45
|
+
}
|
46
|
+
|
47
|
+
.ace-tm .ace_constant.ace_buildin {
|
48
|
+
color: rgb(88, 72, 246);
|
49
|
+
}
|
50
|
+
|
51
|
+
.ace-tm .ace_constant.ace_language {
|
52
|
+
color: rgb(88, 92, 246);
|
53
|
+
}
|
54
|
+
|
55
|
+
.ace-tm .ace_constant.ace_library {
|
56
|
+
color: rgb(6, 150, 14);
|
57
|
+
}
|
58
|
+
|
59
|
+
.ace-tm .ace_invalid {
|
60
|
+
background-color: rgba(255, 0, 0, 0.1);
|
61
|
+
color: red;
|
62
|
+
}
|
63
|
+
|
64
|
+
.ace-tm .ace_support.ace_function {
|
65
|
+
color: rgb(60, 76, 114);
|
66
|
+
}
|
67
|
+
|
68
|
+
.ace-tm .ace_support.ace_constant {
|
69
|
+
color: rgb(6, 150, 14);
|
70
|
+
}
|
71
|
+
|
72
|
+
.ace-tm .ace_support.ace_type,
|
73
|
+
.ace-tm .ace_support.ace_class {
|
74
|
+
color: rgb(109, 121, 222);
|
75
|
+
}
|
76
|
+
|
77
|
+
.ace-tm .ace_keyword.ace_operator {
|
78
|
+
color: rgb(104, 118, 135);
|
79
|
+
}
|
80
|
+
|
81
|
+
.ace-tm .ace_string {
|
82
|
+
color: rgb(3, 106, 7);
|
83
|
+
}
|
84
|
+
|
85
|
+
.ace-tm .ace_comment {
|
86
|
+
color: rgb(76, 136, 107);
|
87
|
+
}
|
88
|
+
|
89
|
+
.ace-tm .ace_comment.ace_doc {
|
90
|
+
color: rgb(0, 102, 255);
|
91
|
+
}
|
92
|
+
|
93
|
+
.ace-tm .ace_comment.ace_doc.ace_tag {
|
94
|
+
color: rgb(128, 159, 191);
|
95
|
+
}
|
96
|
+
|
97
|
+
.ace-tm .ace_constant.ace_numeric {
|
98
|
+
color: rgb(0, 0, 205);
|
99
|
+
}
|
100
|
+
|
101
|
+
.ace-tm .ace_variable {
|
102
|
+
color: rgb(49, 132, 149);
|
103
|
+
}
|
104
|
+
|
105
|
+
.ace-tm .ace_xml-pe {
|
106
|
+
color: rgb(104, 104, 91);
|
107
|
+
}
|
108
|
+
|
109
|
+
.ace-tm .ace_entity.ace_name.ace_function {
|
110
|
+
color: #0000A2;
|
111
|
+
}
|
112
|
+
|
113
|
+
|
114
|
+
.ace-tm .ace_heading {
|
115
|
+
color: rgb(12, 7, 255);
|
116
|
+
}
|
117
|
+
|
118
|
+
.ace-tm .ace_list {
|
119
|
+
color:rgb(185, 6, 144);
|
120
|
+
}
|
121
|
+
|
122
|
+
.ace-tm .ace_meta.ace_tag {
|
123
|
+
color:rgb(0, 22, 142);
|
124
|
+
}
|
125
|
+
|
126
|
+
.ace-tm .ace_string.ace_regex {
|
127
|
+
color: rgb(255, 0, 0)
|
128
|
+
}
|
129
|
+
|
130
|
+
.ace-tm .ace_marker-layer .ace_selection {
|
131
|
+
background: rgb(181, 213, 255);
|
132
|
+
}
|
133
|
+
.ace-tm.ace_multiselect .ace_selection.ace_start {
|
134
|
+
box-shadow: 0 0 3px 0px white;
|
135
|
+
}
|
136
|
+
.ace-tm .ace_marker-layer .ace_step {
|
137
|
+
background: rgb(252, 255, 0);
|
138
|
+
}
|
139
|
+
|
140
|
+
.ace-tm .ace_marker-layer .ace_stack {
|
141
|
+
background: rgb(164, 229, 101);
|
142
|
+
}
|
143
|
+
|
144
|
+
.ace-tm .ace_marker-layer .ace_bracket {
|
145
|
+
margin: -1px 0 0 -1px;
|
146
|
+
border: 1px solid rgb(192, 192, 192);
|
147
|
+
}
|
148
|
+
|
149
|
+
.ace-tm .ace_marker-layer .ace_active-line {
|
150
|
+
background: rgba(0, 0, 0, 0.07);
|
151
|
+
}
|
152
|
+
|
153
|
+
.ace-tm .ace_gutter-active-line {
|
154
|
+
background-color : #dcdcdc;
|
155
|
+
}
|
156
|
+
|
157
|
+
.ace-tm .ace_marker-layer .ace_selected-word {
|
158
|
+
background: rgb(250, 250, 255);
|
159
|
+
border: 1px solid rgb(200, 200, 250);
|
160
|
+
}
|
161
|
+
|
162
|
+
.ace-tm .ace_indent-guide {
|
163
|
+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
|
164
|
+
}
|
165
|
+
|
166
|
+
.ace-tm .ace_indent-guide-active {
|
167
|
+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
|
168
|
+
}
|
169
|
+
`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(f,g,j){g.isDark=!1,g.cssClass="ace-tm",g.cssText=f("./textmate-css"),g.$id="ace/theme/textmate";var k=f("../lib/dom");k.importCssString(g.cssText,g.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(f,g,j){"no use strict";var k=f("./lib/lang"),x=f("./lib/net"),_=f("./lib/dom"),c=f("./lib/app_config").AppConfig;j.exports=g=new c;var h={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};g.get=function(i){if(!h.hasOwnProperty(i))throw new Error("Unknown config key: "+i);return h[i]},g.set=function(i,e){if(h.hasOwnProperty(i))h[i]=e;else if(this.setDefaultValue("",i,e)==!1)throw new Error("Unknown config key: "+i);i=="useStrictCSP"&&_.useStrictCSP(e)},g.all=function(){return k.copyObject(h)},g.$modes={},g.moduleUrl=function(i,e){if(h.$moduleUrls[i])return h.$moduleUrls[i];var n=i.split("/");e=e||n[n.length-2]||"";var a=e=="snippets"?"/":"-",p=n[n.length-1];if(e=="worker"&&a=="-"){var v=new RegExp("^"+e+"[\\-_]|[\\-_]"+e+"$","g");p=p.replace(v,"")}(!p||p==e)&&n.length>1&&(p=n[n.length-2]);var A=h[e+"Path"];return A==null?A=h.basePath:a=="/"&&(e=a=""),A&&A.slice(-1)!="/"&&(A+="/"),A+e+a+p+this.get("suffix")},g.setModuleUrl=function(i,e){return h.$moduleUrls[i]=e};var t=function(i,e){if(i==="ace/theme/textmate"||i==="./theme/textmate")return e(null,f("./theme/textmate"));if(o)return o(i,e);console.error("loader is not configured")},o;g.setLoader=function(i){o=i},g.dynamicModules=Object.create(null),g.$loading={},g.$loaded={},g.loadModule=function(i,e){var n;if(Array.isArray(i))var a=i[0],p=i[1];else if(typeof i=="string")var p=i;var v=function(A){if(A&&!g.$loading[p])return e&&e(A);if(g.$loading[p]||(g.$loading[p]=[]),g.$loading[p].push(e),!(g.$loading[p].length>1)){var E=function(){t(p,function(S,C){C&&(g.$loaded[p]=C),g._emit("load.module",{name:p,module:C});var H=g.$loading[p];g.$loading[p]=null,H.forEach(function(U){U&&U(C)})})};if(!g.get("packaged"))return E();x.loadScript(g.moduleUrl(p,a),E),r()}};if(g.dynamicModules[p])g.dynamicModules[p]().then(function(A){A.default?v(A.default):v(A)});else{try{n=this.$require(p)}catch{}v(n||g.$loaded[p])}},g.$require=function(i){if(typeof j.require=="function"){var e="require";return j[e](i)}},g.setModuleLoader=function(i,e){g.dynamicModules[i]=e};var r=function(){!h.basePath&&!h.workerPath&&!h.modePath&&!h.themePath&&!Object.keys(h.$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"),r=function(){})};g.version="1.43.3"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(f,g,j){f("./lib/fixoldbrowsers");var k=f("./config");k.setLoader(function(h,t){f([h],function(o){t(null,o)})});var x=(function(){return this||typeof window<"u"&&window})();j.exports=function(h){k.init=_,k.$require=f,h.require=f},_(!0);function _(h){if(!(!x||!x.document)){k.set("packaged",h||f.packaged||j.packaged||x.define&&(void 0).packaged);var t={},o="",r=document.currentScript||document._currentScript,i=r&&r.ownerDocument||document;r&&r.src&&(o=r.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var e=i.getElementsByTagName("script"),n=0;n<e.length;n++){var a=e[n],p=a.src||a.getAttribute("src");if(p){for(var v=a.attributes,A=0,E=v.length;A<E;A++){var S=v[A];S.name.indexOf("data-ace-")===0&&(t[c(S.name.replace(/^data-ace-/,""))]=S.value)}var C=p.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);C&&(o=C[1])}}o&&(t.base=t.base||o,t.packaged=!0),t.basePath=t.base,t.workerPath=t.workerPath||t.base,t.modePath=t.modePath||t.base,t.themePath=t.themePath||t.base,delete t.base;for(var H in t)typeof t[H]<"u"&&k.set(H,t[H])}}function c(h){return h.replace(/-(.)/g,function(t,o){return o.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(f,g,j){var k=(function(){function x(_,c,h,t){this.start={row:_,column:c},this.end={row:h,column:t}}return x.prototype.isEqual=function(_){return this.start.row===_.start.row&&this.end.row===_.end.row&&this.start.column===_.start.column&&this.end.column===_.end.column},x.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},x.prototype.contains=function(_,c){return this.compare(_,c)==0},x.prototype.compareRange=function(_){var c,h=_.end,t=_.start;return c=this.compare(h.row,h.column),c==1?(c=this.compare(t.row,t.column),c==1?2:c==0?1:0):c==-1?-2:(c=this.compare(t.row,t.column),c==-1?-1:c==1?42:0)},x.prototype.comparePoint=function(_){return this.compare(_.row,_.column)},x.prototype.containsRange=function(_){return this.comparePoint(_.start)==0&&this.comparePoint(_.end)==0},x.prototype.intersects=function(_){var c=this.compareRange(_);return c==-1||c==0||c==1},x.prototype.isEnd=function(_,c){return this.end.row==_&&this.end.column==c},x.prototype.isStart=function(_,c){return this.start.row==_&&this.start.column==c},x.prototype.setStart=function(_,c){typeof _=="object"?(this.start.column=_.column,this.start.row=_.row):(this.start.row=_,this.start.column=c)},x.prototype.setEnd=function(_,c){typeof _=="object"?(this.end.column=_.column,this.end.row=_.row):(this.end.row=_,this.end.column=c)},x.prototype.inside=function(_,c){return this.compare(_,c)==0?!(this.isEnd(_,c)||this.isStart(_,c)):!1},x.prototype.insideStart=function(_,c){return this.compare(_,c)==0?!this.isEnd(_,c):!1},x.prototype.insideEnd=function(_,c){return this.compare(_,c)==0?!this.isStart(_,c):!1},x.prototype.compare=function(_,c){return!this.isMultiLine()&&_===this.start.row?c<this.start.column?-1:c>this.end.column?1:0:_<this.start.row?-1:_>this.end.row?1:this.start.row===_?c>=this.start.column?0:-1:this.end.row===_?c<=this.end.column?0:1:0},x.prototype.compareStart=function(_,c){return this.start.row==_&&this.start.column==c?-1:this.compare(_,c)},x.prototype.compareEnd=function(_,c){return this.end.row==_&&this.end.column==c?1:this.compare(_,c)},x.prototype.compareInside=function(_,c){return this.end.row==_&&this.end.column==c?1:this.start.row==_&&this.start.column==c?-1:this.compare(_,c)},x.prototype.clipRows=function(_,c){if(this.end.row>c)var h={row:c+1,column:0};else if(this.end.row<_)var h={row:_,column:0};if(this.start.row>c)var t={row:c+1,column:0};else if(this.start.row<_)var t={row:_,column:0};return x.fromPoints(t||this.start,h||this.end)},x.prototype.extend=function(_,c){var h=this.compare(_,c);if(h==0)return this;if(h==-1)var t={row:_,column:c};else var o={row:_,column:c};return x.fromPoints(t||this.start,o||this.end)},x.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},x.prototype.isMultiLine=function(){return this.start.row!==this.end.row},x.prototype.clone=function(){return x.fromPoints(this.start,this.end)},x.prototype.collapseRows=function(){return this.end.column==0?new x(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new x(this.start.row,0,this.end.row,0)},x.prototype.toScreenRange=function(_){var c=_.documentToScreenPosition(this.start),h=_.documentToScreenPosition(this.end);return new x(c.row,c.column,h.row,h.column)},x.prototype.moveBy=function(_,c){this.start.row+=_,this.start.column+=c,this.end.row+=_,this.end.column+=c},x})();k.fromPoints=function(x,_){return new k(x.row,x.column,_.row,_.column)},k.comparePoints=function(x,_){return x.row-_.row||x.column-_.column},g.Range=k}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(f,g,j){for(var k=f("./oop"),x={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:"*"}},_={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},c=0;c<10;c++)_["Digit"+c]=48+c,_["Numpad"+c]=96+c,x.PRINTABLE_KEYS[48+c]=""+c,x.FUNCTION_KEYS[96+c]="Numpad"+c;for(var c=65;c<91;c++){var h=String.fromCharCode(c+32);_["Key"+h.toUpperCase()]=c,x.PRINTABLE_KEYS[c]=h}for(var c=1;c<13;c++)_["F"+c]=111+c,x.FUNCTION_KEYS[111+c]="F"+c;var t={Shift:16,Control:17,Alt:18,Meta:224};for(var o in t)_[o]=_[o+"Left"]=_[o+"Right"]=t[o];g.$codeToKeyCode=_,x.PRINTABLE_KEYS[173]="-";for(var r in x.FUNCTION_KEYS){var i=x.FUNCTION_KEYS[r].toLowerCase();x[i]=parseInt(r,10)}for(var r in x.PRINTABLE_KEYS){var i=x.PRINTABLE_KEYS[r].toLowerCase();x[i]=parseInt(r,10)}k.mixin(x,x.MODIFIER_KEYS),k.mixin(x,x.PRINTABLE_KEYS),k.mixin(x,x.FUNCTION_KEYS),x.enter=x.return,x.escape=x.esc,x.del=x.delete,(function(){for(var e=["cmd","ctrl","alt","shift"],n=Math.pow(2,e.length);n--;)x.KEY_MODS[n]=e.filter(function(a){return n&x.KEY_MODS[a]}).join("-")+"-"})(),x.KEY_MODS[0]="",x.KEY_MODS[-1]="input-",k.mixin(g,x),g.default=g,g.keyCodeToString=function(e){var n=x[e];return typeof n!="string"&&(n=String.fromCharCode(e)),n.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(f,g,j){var k=f("./keys"),x=f("./useragent"),_=null,c=0,h;function t(){h=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return h={passive:!1},!0}})}catch{}}function o(){return h==null&&t(),h}function r(A,E,S){this.elem=A,this.type=E,this.callback=S}r.prototype.destroy=function(){e(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var i=g.addListener=function(A,E,S,C){A.addEventListener(E,S,o()),C&&C.$toDestroy.push(new r(A,E,S))},e=g.removeListener=function(A,E,S){A.removeEventListener(E,S,o())};g.stopEvent=function(A){return g.stopPropagation(A),g.preventDefault(A),!1},g.stopPropagation=function(A){A.stopPropagation&&A.stopPropagation()},g.preventDefault=function(A){A.preventDefault&&A.preventDefault()},g.getButton=function(A){return A.type=="dblclick"?0:A.type=="contextmenu"||x.isMac&&A.ctrlKey&&!A.altKey&&!A.shiftKey?2:A.button},g.capture=function(A,E,S){var C=A&&A.ownerDocument||document;function H(U){E&&E(U),S&&S(U),e(C,"mousemove",E),e(C,"mouseup",H),e(C,"dragstart",H)}return i(C,"mousemove",E),i(C,"mouseup",H),i(C,"dragstart",H),H},g.addMouseWheelListener=function(A,E,S){i(A,"wheel",function(C){var H=.15,U=C.deltaX||0,V=C.deltaY||0;switch(C.deltaMode){case C.DOM_DELTA_PIXEL:C.wheelX=U*H,C.wheelY=V*H;break;case C.DOM_DELTA_LINE:var F=15;C.wheelX=U*F,C.wheelY=V*F;break;case C.DOM_DELTA_PAGE:var he=150;C.wheelX=U*he,C.wheelY=V*he;break}E(C)},S)},g.addMultiMouseDownListener=function(A,E,S,C,H){var U=0,V,F,he,P={2:"dblclick",3:"tripleclick",4:"quadclick"};function O(b){if(g.getButton(b)!==0?U=0:b.detail>1?(U++,U>4&&(U=1)):U=1,x.isIE){var y=Math.abs(b.clientX-V)>5||Math.abs(b.clientY-F)>5;(!he||y)&&(U=1),he&&clearTimeout(he),he=setTimeout(function(){he=null},E[U-1]||600),U==1&&(V=b.clientX,F=b.clientY)}if(b._clicks=U,S[C]("mousedown",b),U>4)U=0;else if(U>1)return S[C](P[U],b)}Array.isArray(A)||(A=[A]),A.forEach(function(b){i(b,"mousedown",O,H)})};function n(A){return 0|(A.ctrlKey?1:0)|(A.altKey?2:0)|(A.shiftKey?4:0)|(A.metaKey?8:0)}g.getModifierString=function(A){return k.KEY_MODS[n(A)]};function a(A,E,S){var C=n(E);if(!S&&E.code&&(S=k.$codeToKeyCode[E.code]||S),!x.isMac&&_){if(E.getModifierState&&(E.getModifierState("OS")||E.getModifierState("Win"))&&(C|=8),_.altGr)if((3&C)!=3)_.altGr=0;else return;if(S===18||S===17){var H=E.location;if(S===17&&H===1)_[S]==1&&(c=E.timeStamp);else if(S===18&&C===3&&H===2){var U=E.timeStamp-c;U<50&&(_.altGr=!0)}}}if(S in k.MODIFIER_KEYS&&(S=-1),!(!C&&S===13&&E.location===3&&(A(E,C,-S),E.defaultPrevented))){if(x.isChromeOS&&C&8){if(A(E,C,S),E.defaultPrevented)return;C&=-9}return!C&&!(S in k.FUNCTION_KEYS)&&!(S in k.PRINTABLE_KEYS)?!1:A(E,C,S)}}g.addCommandKeyListener=function(A,E,S){var C=null;i(A,"keydown",function(H){_[H.keyCode]=(_[H.keyCode]||0)+1;var U=a(E,H,H.keyCode);return C=H.defaultPrevented,U},S),i(A,"keypress",function(H){C&&(H.ctrlKey||H.altKey||H.shiftKey||H.metaKey)&&(g.stopEvent(H),C=null)},S),i(A,"keyup",function(H){_[H.keyCode]=null},S),_||(p(),i(window,"focus",p))};function p(){_=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!x.isOldIE){var v=1;g.nextTick=function(A,E){E=E||window;var S="zero-timeout-message-"+v++,C=function(H){H.data==S&&(g.stopPropagation(H),e(E,"message",C),A())};i(E,"message",C),E.postMessage(S,"*")}}g.$idleBlocked=!1,g.onIdle=function(A,E){return setTimeout(function S(){g.$idleBlocked?setTimeout(S,100):A()},E)},g.$idleBlockId=null,g.blockIdle=function(A){g.$idleBlockId&&clearTimeout(g.$idleBlockId),g.$idleBlocked=!0,g.$idleBlockId=setTimeout(function(){g.$idleBlocked=!1},A||100)},g.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),g.nextFrame?g.nextFrame=g.nextFrame.bind(window):g.nextFrame=function(A){setTimeout(A,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(f,g,j){var k;j.exports={lineMode:!1,pasteCancelled:function(){return k&&k>Date.now()-50?!0:k=!1},cancel:function(){k=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(f,g,j){var k=f("../lib/event"),x=f("../config").nls,_=f("../lib/useragent"),c=f("../lib/dom"),h=f("../lib/lang"),t=f("../clipboard"),o=_.isChrome<18,r=_.isIE,i=_.isChrome>63,e=400,n=f("../lib/keys"),a=n.KEY_MODS,p=_.isIOS,v=p?/\s/:/\n/,A=_.isMobile,E=(function(){function S(C,H){var U=this;this.host=H,this.text=c.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","off"),this.text.setAttribute("autocomplete","off"),this.text.setAttribute("autocorrect","off"),this.text.setAttribute("autocapitalize","off"),this.text.setAttribute("spellcheck","false"),this.text.style.opacity="0",C.insertBefore(this.text,C.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",A||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch{}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),k.addListener(this.text,"blur",function(V){U.ignoreFocusEvents||(H.onBlur(V),U.$isFocused=!1)},H),k.addListener(this.text,"focus",function(V){if(!U.ignoreFocusEvents){if(U.$isFocused=!0,_.isEdge)try{if(!document.hasFocus())return}catch{}H.onFocus(V),_.isEdge?setTimeout(U.resetSelection.bind(U)):U.resetSelection()}},H),this.$focusScroll=!1,H.on("beforeEndOperation",function(){var V=H.curOp,F=V&&V.command&&V.command.name;if(F!="insertstring"){var he=F&&(V.docChanged||V.selectionChanged);U.inComposition&&he&&(U.lastValue=U.text.value="",U.onCompositionEnd()),U.resetSelection()}}),H.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=p?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&H.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,k.addCommandKeyListener(this.text,function(V,F,he){if(!U.inComposition)return H.onCommandKey(V,F,he)},H),k.addListener(this.text,"select",this.onSelect.bind(this),H),k.addListener(this.text,"input",this.onInput.bind(this),H),k.addListener(this.text,"cut",this.onCut.bind(this),H),k.addListener(this.text,"copy",this.onCopy.bind(this),H),k.addListener(this.text,"paste",this.onPaste.bind(this),H),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&k.addListener(C,"keydown",function(V){if(!(_.isMac&&!V.metaKey||!V.ctrlKey))switch(V.keyCode){case 67:U.onCopy(V);break;case 86:U.onPaste(V);break;case 88:U.onCut(V);break}},H),this.syncComposition=h.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),k.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),H),k.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),H),k.addListener(this.text,"keyup",this.onKeyup.bind(this),H),k.addListener(this.text,"keydown",this.syncComposition.bind(this),H),k.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),H),this.closeTimeout,k.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),H),k.addListener(this.text,"mousedown",function(V){V.preventDefault(),U.onContextMenuClose()},H),k.addListener(H.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),H),k.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),H),p&&this.addIosSelectionHandler(C,H,this.text)}return S.prototype.addIosSelectionHandler=function(C,H,U){var V=this,F=null,he=!1;U.addEventListener("keydown",function(O){F&&clearTimeout(F),he=!0},!0),U.addEventListener("keyup",function(O){F=setTimeout(function(){he=!1},100)},!0);var P=function(O){if(document.activeElement===U&&!(he||V.inComposition||H.$mouseHandler.isMousePressed)&&!V.copied){var b=U.selectionStart,y=U.selectionEnd,T=null,G=0;if(b==0?T=n.up:b==1?T=n.home:y>V.lastSelectionEnd&&V.lastValue[y]==`
|
170
|
+
`?T=n.end:b<V.lastSelectionStart&&V.lastValue[b-1]==" "?(T=n.left,G=a.option):b<V.lastSelectionStart||b==V.lastSelectionStart&&V.lastSelectionEnd!=V.lastSelectionStart&&b==y?T=n.left:y>V.lastSelectionEnd&&V.lastValue.slice(0,y).split(`
|
171
|
+
`).length>2?T=n.down:y>V.lastSelectionEnd&&V.lastValue[y-1]==" "?(T=n.right,G=a.option):(y>V.lastSelectionEnd||y==V.lastSelectionEnd&&V.lastSelectionEnd!=V.lastSelectionStart&&b==y)&&(T=n.right),b!==y&&(G|=a.shift),T){var q=H.onCommandKey({},G,T);if(!q&&H.commands){T=n.keyCodeToString(T);var ue=H.commands.findKeyCommand(G,T);ue&&H.execCommand(ue)}V.lastSelectionStart=b,V.lastSelectionEnd=y,V.resetSelection("")}}};document.addEventListener("selectionchange",P),H.on("destroy",function(){document.removeEventListener("selectionchange",P)})},S.prototype.onContextMenuClose=function(){var C=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){C.tempStyle&&(C.text.style.cssText=C.tempStyle,C.tempStyle=""),C.host.renderer.$isMousePressed=!1,C.host.renderer.$keepTextAreaAtCursor&&C.host.renderer.$moveTextAreaToCursor()},0)},S.prototype.$onContextMenu=function(C){this.host.textInput.onContextMenu(C),this.onContextMenuClose()},S.prototype.onKeyup=function(C){C.keyCode==27&&this.text.value.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},S.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},S.prototype.onCompositionStart=function(C){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){C.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var H=this.host.getSelectionRange();H.end.row=H.start.row,H.end.column=H.start.column,this.inComposition.markerRange=H,this.inComposition.selectionStart=this.lastSelectionStart,this.host.onCompositionStart(this.inComposition),this.inComposition.useTextareaForIME?(this.lastValue=this.text.value="",this.lastSelectionStart=0,this.lastSelectionEnd=0):(this.text.msGetInputContext&&(this.inComposition.context=this.text.msGetInputContext()),this.text.getInputContext&&(this.inComposition.context=this.text.getInputContext()))}},S.prototype.onCompositionUpdate=function(){if(!(!this.inComposition||!this.host.onCompositionUpdate||this.host.$readOnly)){if(this.commandMode)return this.cancelComposition();if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var C=this.text.value;this.sendText(C),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},S.prototype.onCompositionEnd=function(C){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),C&&this.onInput())},S.prototype.onCut=function(C){this.doCopy(C,!0)},S.prototype.onCopy=function(C){this.doCopy(C,!1)},S.prototype.onPaste=function(C){var H=this.handleClipboardData(C);t.pasteCancelled()||(typeof H=="string"?(H&&this.host.onPaste(H,C),_.isIE&&setTimeout(this.resetSelection),k.preventDefault(C)):(this.text.value="",this.pasted=!0))},S.prototype.doCopy=function(C,H){var U=this,V=this.host.getCopyText();if(!V)return k.preventDefault(C);this.handleClipboardData(C,V)?(p&&(this.resetSelection(V),this.copied=V,setTimeout(function(){U.copied=!1},10)),H?this.host.onCut():this.host.onCopy(),k.preventDefault(C)):(this.copied=!0,this.text.value=V,this.text.select(),setTimeout(function(){U.copied=!1,U.resetSelection(),H?U.host.onCut():U.host.onCopy()}))},S.prototype.handleClipboardData=function(C,H,U){var V=C.clipboardData||window.clipboardData;if(!(!V||o)){var F=r||U?"Text":"text/plain";try{return H?V.setData(F,H)!==!1:V.getData(F)}catch(he){if(!U)return this.handleClipboardData(he,H,!0)}}},S.prototype.onInput=function(C){if(this.inComposition)return this.onCompositionUpdate();if(C&&C.inputType){if(C.inputType=="historyUndo")return this.host.execCommand("undo");if(C.inputType=="historyRedo")return this.host.execCommand("redo")}var H=this.text.value,U=this.sendText(H,!0);(H.length>e+100||v.test(U)||A&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},S.prototype.sendText=function(C,H){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),C&&this.host.onPaste(C),this.pasted=!1,"";for(var U=this.text.selectionStart,V=this.text.selectionEnd,F=this.lastSelectionStart,he=this.lastValue.length-this.lastSelectionEnd,P=C,O=C.length-U,b=C.length-V,y=0;F>0&&this.lastValue[y]==C[y];)y++,F--;for(P=P.slice(y),y=1;he>0&&this.lastValue.length-y>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-y]==C[C.length-y];)y++,he--;O-=y-1,b-=y-1;var T=P.length-y+1;if(T<0&&(F=-T,T=0),P=P.slice(0,T),!H&&!P&&!O&&!F&&!he&&!b)return"";this.sendingText=!0;var G=!1;return _.isAndroid&&P==". "&&(P=" ",G=!0),P&&!F&&!he&&!O&&!b||this.commandMode?this.host.onTextInput(P):this.host.onTextInput(P,{extendLeft:F,extendRight:he,restoreStart:O,restoreEnd:b}),this.sendingText=!1,this.lastValue=C,this.lastSelectionStart=U,this.lastSelectionEnd=V,this.lastRestoreEnd=b,G?`
|
172
|
+
`:P},S.prototype.onSelect=function(C){var H=this;if(!this.inComposition){var U=function(V){return V.selectionStart===0&&V.selectionEnd>=H.lastValue.length&&V.value===H.lastValue&&H.lastValue&&V.selectionEnd!==H.lastSelectionEnd};this.copied?this.copied=!1:U(this.text)?(this.host.selectAll(),this.resetSelection()):A&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},S.prototype.$resetSelectionIOS=function(C){if(!(!this.$isFocused||this.copied&&!C||this.sendingText)){C||(C="");var H=`
|
173
|
+
ab`+C+`cde fg
|
174
|
+
`;H!=this.text.value&&(this.text.value=this.lastValue=H);var U=4,V=4+(C.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=U||this.lastSelectionEnd!=V)&&this.text.setSelectionRange(U,V),this.lastSelectionStart=U,this.lastSelectionEnd=V}},S.prototype.$resetSelection=function(){var C=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var H=0,U=0,V="",F=function(ue,Ce){for(var Oe=Ce,gt=1;gt<=ue-C.rowStart&><2*C.numberOfExtraLines+1;gt++)Oe+=C.host.session.getLine(ue-gt).length+1;return Oe};if(this.host.session){var he=this.host.selection,P=he.getRange(),O=he.cursor.row;O===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):O===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(O<this.rowStart-1||O>this.rowEnd+1)&&(this.rowStart=O>this.numberOfExtraLines?O-this.numberOfExtraLines:0,this.rowEnd=O>this.numberOfExtraLines?O+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var b=[],y=this.rowStart;y<=this.rowEnd;y++)b.push(this.host.session.getLine(y));if(V=b.join(`
|
175
|
+
`),H=F(P.start.row,P.start.column),U=F(P.end.row,P.end.column),P.start.row<this.rowStart){var T=this.host.session.getLine(this.rowStart-1);H=P.start.row<this.rowStart-1?0:H,U+=T.length+1,V=T+`
|
176
|
+
`+V}else if(P.end.row>this.rowEnd){var G=this.host.session.getLine(this.rowEnd+1);U=P.end.row>this.rowEnd+1?G.length:P.end.column,U+=V.length+1,V=V+`
|
177
|
+
`+G}else A&&O>0&&(V=`
|
178
|
+
`+V,U+=1,H+=1);V.length>e&&(H<e&&U<e?V=V.slice(0,e):(V=`
|
179
|
+
`,H==U?H=U=0:(H=0,U=1)));var q=V+`
|
180
|
+
|
181
|
+
`;q!=this.lastValue&&(this.text.value=this.lastValue=q,this.lastSelectionStart=this.lastSelectionEnd=q.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=U||this.lastSelectionStart!=H||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(H,U),this.lastSelectionStart=H,this.lastSelectionEnd=U}catch{}this.inComposition=!1}},S.prototype.setHost=function(C){this.host=C},S.prototype.setNumberOfExtraLines=function(C){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,C<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=C},S.prototype.setAriaLabel=function(){var C="";if(this.host.$textInputAriaLabel&&(C+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var H=this.host.session.selection.cursor.row;C+=x("text-input.aria-label","Cursor at row $0",[H+1])}this.text.setAttribute("aria-label",C)},S.prototype.setAriaOptions=function(C){C.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",C.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",C.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),C.role&&this.text.setAttribute("role",C.role),C.setLabel&&(this.text.setAttribute("aria-roledescription",x("text-input.aria-roledescription","editor")),this.setAriaLabel())},S.prototype.focus=function(){var C=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||i||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var H=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var U=this.text.getBoundingClientRect().top!=0}catch{return}var V=[];if(U)for(var F=this.text.parentElement;F&&F.nodeType==1;)V.push(F),F.setAttribute("ace_nocontext","true"),!F.parentElement&&F.getRootNode?F=F.getRootNode().host:F=F.parentElement;this.text.focus({preventScroll:!0}),U&&V.forEach(function(he){he.removeAttribute("ace_nocontext")}),setTimeout(function(){C.text.style.position="",C.text.style.top=="0px"&&(C.text.style.top=H)},0)},S.prototype.blur=function(){this.text.blur()},S.prototype.isFocused=function(){return this.$isFocused},S.prototype.setInputHandler=function(C){this.inputHandler=C},S.prototype.getInputHandler=function(){return this.inputHandler},S.prototype.getElement=function(){return this.text},S.prototype.setCommandMode=function(C){this.commandMode=C,this.text.readOnly=!1},S.prototype.setReadOnly=function(C){this.commandMode||(this.text.readOnly=C)},S.prototype.setCopyWithEmptySelection=function(C){},S.prototype.onContextMenu=function(C){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:C}),this.moveToMouse(C,!0)},S.prototype.moveToMouse=function(C,H){var U=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(H?"z-index:100000;":"")+(_.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var V=this.host.container.getBoundingClientRect(),F=c.computedStyle(this.host.container),he=V.top+(parseInt(F.borderTopWidth)||0),P=V.left+(parseInt(F.borderLeftWidth)||0),O=V.bottom-he-this.text.clientHeight-2,b=function(y){c.translate(U.text,y.clientX-P-2,Math.min(y.clientY-he-2,O))};b(C),C.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),_.isWin&&k.capture(this.host.container,b,this.onContextMenuClose.bind(this)))},S.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},S})();g.TextInput=E,g.$setUserAgentForTests=function(S,C){A=S,p=C}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(f,g,j){var k=f("../lib/useragent"),x=0,_=550,c=(function(){function o(r){r.$clickSelection=null;var i=r.editor;i.setDefaultHandler("mousedown",this.onMouseDown.bind(r)),i.setDefaultHandler("dblclick",this.onDoubleClick.bind(r)),i.setDefaultHandler("tripleclick",this.onTripleClick.bind(r)),i.setDefaultHandler("quadclick",this.onQuadClick.bind(r)),i.setDefaultHandler("mousewheel",this.onMouseWheel.bind(r));var e=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];e.forEach(function(n){r[n]=this[n]},this),r.selectByLines=this.extendSelectionBy.bind(r,"getLineRange"),r.selectByWords=this.extendSelectionBy.bind(r,"getWordRange")}return o.prototype.onMouseDown=function(r){var i=r.inSelection(),e=r.getDocumentPosition();this.mousedownEvent=r;var n=this.editor,a=r.getButton();if(a!==0){var p=n.getSelectionRange(),v=p.isEmpty();(v||a==1)&&n.selection.moveToPosition(e),a==2&&(n.textInput.onContextMenu(r.domEvent),k.isMozilla||r.preventDefault());return}if(this.mousedownEvent.time=Date.now(),i&&!n.isFocused()&&(n.focus(),this.$focusTimeout&&!this.$clickSelection&&!n.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(r);return}return this.captureMouse(r),this.startSelect(e,r.domEvent._clicks>1),r.preventDefault()},o.prototype.startSelect=function(r,i){r=r||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var e=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?e.selection.selectToPosition(r):i||e.selection.moveToPosition(r),i||this.select(),e.setStyle("ace_selecting"),this.setState("select"))},o.prototype.select=function(){var r,i=this.editor,e=i.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var n=this.$clickSelection.comparePoint(e);if(n==-1)r=this.$clickSelection.end;else if(n==1)r=this.$clickSelection.start;else{var a=t(this.$clickSelection,e);e=a.cursor,r=a.anchor}i.selection.setSelectionAnchor(r.row,r.column)}i.selection.selectToPosition(e),i.renderer.scrollCursorIntoView()},o.prototype.extendSelectionBy=function(r){var i,e=this.editor,n=e.renderer.screenToTextCoordinates(this.x,this.y),a=e.selection[r](n.row,n.column);if(this.$clickSelection){var p=this.$clickSelection.comparePoint(a.start),v=this.$clickSelection.comparePoint(a.end);if(p==-1&&v<=0)i=this.$clickSelection.end,(a.end.row!=n.row||a.end.column!=n.column)&&(n=a.start);else if(v==1&&p>=0)i=this.$clickSelection.start,(a.start.row!=n.row||a.start.column!=n.column)&&(n=a.end);else if(p==-1&&v==1)n=a.end,i=a.start;else{var A=t(this.$clickSelection,n);n=A.cursor,i=A.anchor}e.selection.setSelectionAnchor(i.row,i.column)}e.selection.selectToPosition(n),e.renderer.scrollCursorIntoView()},o.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},o.prototype.focusWait=function(){var r=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),i=Date.now();(r>x||i-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},o.prototype.onDoubleClick=function(r){var i=r.getDocumentPosition(),e=this.editor,n=e.session,a=n.getBracketRange(i);a?(a.isEmpty()&&(a.start.column--,a.end.column++),this.setState("select")):(a=e.selection.getWordRange(i.row,i.column),this.setState("selectByWords")),this.$clickSelection=a,this.select()},o.prototype.onTripleClick=function(r){var i=r.getDocumentPosition(),e=this.editor;this.setState("selectByLines");var n=e.getSelectionRange();n.isMultiLine()&&n.contains(i.row,i.column)?(this.$clickSelection=e.selection.getLineRange(n.start.row),this.$clickSelection.end=e.selection.getLineRange(n.end.row).end):this.$clickSelection=e.selection.getLineRange(i.row),this.select()},o.prototype.onQuadClick=function(r){var i=this.editor;i.selectAll(),this.$clickSelection=i.getSelectionRange(),this.setState("selectAll")},o.prototype.onMouseWheel=function(r){if(!r.getAccelKey()){r.getShiftKey()&&r.wheelY&&!r.wheelX&&(r.wheelX=r.wheelY,r.wheelY=0);var i=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var e=this.$lastScroll,n=r.domEvent.timeStamp,a=n-e.t,p=a?r.wheelX/a:e.vx,v=a?r.wheelY/a:e.vy;a<_&&(p=(p+e.vx)/2,v=(v+e.vy)/2);var A=Math.abs(p/v),E=!1;if(A>=1&&i.renderer.isScrollableBy(r.wheelX*r.speed,0)&&(E=!0),A<=1&&i.renderer.isScrollableBy(0,r.wheelY*r.speed)&&(E=!0),E)e.allowed=n;else if(n-e.allowed<_){var S=Math.abs(p)<=1.5*Math.abs(e.vx)&&Math.abs(v)<=1.5*Math.abs(e.vy);S?(E=!0,e.allowed=n):e.allowed=0}if(e.t=n,e.vx=p,e.vy=v,E)return i.renderer.scrollBy(r.wheelX*r.speed,r.wheelY*r.speed),r.stop()}},o})();c.prototype.selectEnd=c.prototype.selectByLinesEnd,c.prototype.selectAllEnd=c.prototype.selectByLinesEnd,c.prototype.selectByWordsEnd=c.prototype.selectByLinesEnd,g.DefaultHandlers=c;function h(o,r,i,e){return Math.sqrt(Math.pow(i-o,2)+Math.pow(e-r,2))}function t(o,r){if(o.start.row==o.end.row)var i=2*r.column-o.start.column-o.end.column;else if(o.start.row==o.end.row-1&&!o.start.column&&!o.end.column)var i=r.column-4;else var i=2*r.row-o.start.row-o.end.row;return i<0?{cursor:o.start,anchor:o.end}:{cursor:o.end,anchor:o.start}}}),ace.define("ace/lib/scroll",["require","exports","module"],function(f,g,j){g.preventParentScroll=function(x){x.stopPropagation();var _=x.currentTarget,c=_.scrollHeight>_.clientHeight;c||x.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(f,g,j){var k=this&&this.__extends||(function(){var n=function(a,p){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,A){v.__proto__=A}||function(v,A){for(var E in A)Object.prototype.hasOwnProperty.call(A,E)&&(v[E]=A[E])},n(a,p)};return function(a,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");n(a,p);function v(){this.constructor=a}a.prototype=p===null?Object.create(p):(v.prototype=p.prototype,new v)}})(),x=this&&this.__values||function(n){var a=typeof Symbol=="function"&&Symbol.iterator,p=a&&n[a],v=0;if(p)return p.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&v>=n.length&&(n=void 0),{value:n&&n[v++],done:!n}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")},_=f("./lib/dom");f("./lib/event");var c=f("./range").Range,h=f("./lib/scroll").preventParentScroll,t="ace_tooltip",o=(function(){function n(a){this.isOpen=!1,this.$element=null,this.$parentNode=a}return n.prototype.$init=function(){return this.$element=_.createElement("div"),this.$element.className=t,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},n.prototype.getElement=function(){return this.$element||this.$init()},n.prototype.setText=function(a){this.getElement().textContent=a},n.prototype.setHtml=function(a){this.getElement().innerHTML=a},n.prototype.setPosition=function(a,p){var v=this.getElement(),A=v.offsetParent&&v.offsetParent.getBoundingClientRect();v.style.left=a-(A?A.left:0)+"px",v.style.top=p-(A?A.top:0)+"px"},n.prototype.setClassName=function(a){_.addCssClass(this.getElement(),a)},n.prototype.setTheme=function(a){this.$element.className=t+" "+(a.isDark?"ace_dark ":"")+(a.cssClass||"")},n.prototype.show=function(a,p,v){a!=null&&this.setText(a),p!=null&&v!=null&&this.setPosition(p,v),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},n.prototype.hide=function(a){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=t,this.isOpen=!1)},n.prototype.getHeight=function(){return this.getElement().offsetHeight},n.prototype.getWidth=function(){return this.getElement().offsetWidth},n.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},n})(),r=(function(){function n(){this.popups=[]}return n.prototype.addPopup=function(a){this.popups.push(a),this.updatePopups()},n.prototype.removePopup=function(a){var p=this.popups.indexOf(a);p!==-1&&(this.popups.splice(p,1),this.updatePopups())},n.prototype.updatePopups=function(){var a,p,v,A;this.popups.sort(function(P,O){return O.priority-P.priority});var E=[];try{for(var S=x(this.popups),C=S.next();!C.done;C=S.next()){var H=C.value,U=!0;try{for(var V=(v=void 0,x(E)),F=V.next();!F.done;F=V.next()){var he=F.value;if(this.doPopupsOverlap(he,H)){U=!1;break}}}catch(P){v={error:P}}finally{try{F&&!F.done&&(A=V.return)&&A.call(V)}finally{if(v)throw v.error}}U?E.push(H):H.hide()}}catch(P){a={error:P}}finally{try{C&&!C.done&&(p=S.return)&&p.call(S)}finally{if(a)throw a.error}}},n.prototype.doPopupsOverlap=function(a,p){var v=a.getElement().getBoundingClientRect(),A=p.getElement().getBoundingClientRect();return v.left<A.right&&v.right>A.left&&v.top<A.bottom&&v.bottom>A.top},n})(),i=new r;g.popupManager=i,g.Tooltip=o;var e=(function(n){k(a,n);function a(p){p===void 0&&(p=document.body);var v=n.call(this,p)||this;v.timeout=void 0,v.lastT=0,v.idleTime=350,v.lastEvent=void 0,v.onMouseOut=v.onMouseOut.bind(v),v.onMouseMove=v.onMouseMove.bind(v),v.waitForHover=v.waitForHover.bind(v),v.hide=v.hide.bind(v);var A=v.getElement();return A.style.whiteSpace="pre-wrap",A.style.pointerEvents="auto",A.addEventListener("mouseout",v.onMouseOut),A.tabIndex=-1,A.addEventListener("blur",(function(){A.contains(document.activeElement)||this.hide()}).bind(v)),A.addEventListener("wheel",h),v}return a.prototype.addToEditor=function(p){p.on("mousemove",this.onMouseMove),p.on("mousedown",this.hide),p.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},a.prototype.removeFromEditor=function(p){p.off("mousemove",this.onMouseMove),p.off("mousedown",this.hide),p.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},a.prototype.onMouseMove=function(p,v){this.lastEvent=p,this.lastT=Date.now();var A=v.$mouseHandler.isMousePressed;if(this.isOpen){var E=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(E.row,E.column)||A||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||A||(this.lastEvent=p,this.timeout=setTimeout(this.waitForHover,this.idleTime))},a.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var p=Date.now()-this.lastT;if(this.idleTime-p>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-p);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},a.prototype.isOutsideOfText=function(p){var v=p.editor,A=p.getDocumentPosition(),E=v.session.getLine(A.row);if(A.column==E.length){var S=v.renderer.pixelToScreenCoordinates(p.clientX,p.clientY),C=v.session.documentToScreenPosition(A.row,A.column);if(C.column!=S.column||C.row!=S.row)return!0}return!1},a.prototype.setDataProvider=function(p){this.$gatherData=p},a.prototype.showForRange=function(p,v,A,E){var S=10;if(!(E&&E!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var C=p.renderer;this.isOpen||(i.addPopup(this),this.$registerCloseEvents(),this.setTheme(C.theme)),this.isOpen=!0,this.addMarker(v,p.session),this.range=c.fromPoints(v.start,v.end);var H=C.textToScreenCoordinates(v.start.row,v.start.column),U=C.scroller.getBoundingClientRect();H.pageX<U.left&&(H.pageX=U.left);var V=this.getElement();V.innerHTML="",V.appendChild(A),V.style.maxHeight="",V.style.display="block";var F=V.clientHeight,he=V.clientWidth,P=window.innerHeight-H.pageY-C.lineHeight,O=!0;H.pageY-F<0&&H.pageY<P&&(O=!1),V.style.maxHeight=(O?H.pageY:P)-S+"px",V.style.top=O?"":H.pageY+C.lineHeight+"px",V.style.bottom=O?window.innerHeight-H.pageY+"px":"",V.style.left=Math.min(H.pageX,window.innerWidth-he-S)+"px"}},a.prototype.addMarker=function(p,v){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=v,this.marker=v&&v.addMarker(p,"ace_highlight-marker","text")},a.prototype.hide=function(p){!p&&document.activeElement==this.getElement()||p&&p.target&&(p.type!="keydown"||p.ctrlKey||p.metaKey)&&this.$element.contains(p.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,i.removePopup(this)))},a.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},a.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},a.prototype.onMouseOut=function(p){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!p.relatedTarget||this.getElement().contains(p.relatedTarget)||p&&p.currentTarget.contains(p.relatedTarget)||p.relatedTarget.classList.contains("ace_content")||this.hide())},a})(o);g.HoverTooltip=e}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(f,g,j){var k=this&&this.__extends||(function(){var n=function(a,p){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,A){v.__proto__=A}||function(v,A){for(var E in A)Object.prototype.hasOwnProperty.call(A,E)&&(v[E]=A[E])},n(a,p)};return function(a,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");n(a,p);function v(){this.constructor=a}a.prototype=p===null?Object.create(p):(v.prototype=p.prototype,new v)}})(),x=this&&this.__values||function(n){var a=typeof Symbol=="function"&&Symbol.iterator,p=a&&n[a],v=0;if(p)return p.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&v>=n.length&&(n=void 0),{value:n&&n[v++],done:!n}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")},_=f("../lib/dom"),c=f("../lib/event"),h=f("../tooltip").Tooltip,t=f("../config").nls,o=5,r=3;g.GUTTER_TOOLTIP_LEFT_OFFSET=o,g.GUTTER_TOOLTIP_TOP_OFFSET=r;function i(n){var a=n.editor,p=a.renderer.$gutterLayer,v=new e(a,!0);n.editor.setDefaultHandler("guttermousedown",function(U){if(!(!a.isFocused()||U.getButton()!=0)){var V=p.getRegion(U);if(V!="foldWidgets"){var F=U.getDocumentPosition().row,he=a.session.selection;if(U.getShiftKey())he.selectTo(F,0);else{if(U.domEvent.detail==2)return a.selectAll(),U.preventDefault();n.$clickSelection=a.selection.getLineRange(F)}return n.setState("selectByLines"),n.captureMouse(U),U.preventDefault()}}});var A,E;function S(){var U=E.getDocumentPosition().row,V=a.session.getLength();if(U==V){var F=a.renderer.pixelToScreenCoordinates(0,E.y).row,he=E.$pos;if(F>a.session.documentToScreenRow(he.row,he.column))return C()}if(v.showTooltip(U),!!v.isOpen)if(a.on("mousewheel",C),a.on("changeSession",C),window.addEventListener("keydown",C,!0),n.$tooltipFollowsMouse)H(E);else{var P=E.getGutterRow(),O=p.$lines.get(P);if(O){var b=O.element.querySelector(".ace_gutter_annotation"),y=b.getBoundingClientRect(),T=v.getElement().style;T.left=y.right-o+"px",T.top=y.bottom-r+"px"}else H(E)}}function C(U){U&&U.type==="keydown"&&(U.ctrlKey||U.metaKey)||U&&U.type==="mouseout"&&(!U.relatedTarget||v.getElement().contains(U.relatedTarget))||(A&&(A=clearTimeout(A)),v.isOpen&&(v.hideTooltip(),a.off("mousewheel",C),a.off("changeSession",C),window.removeEventListener("keydown",C,!0)))}function H(U){v.setPosition(U.x,U.y)}n.editor.setDefaultHandler("guttermousemove",function(U){var V=U.domEvent.target||U.domEvent.srcElement;if(_.hasCssClass(V,"ace_fold-widget")||_.hasCssClass(V,"ace_custom-widget"))return C();v.isOpen&&n.$tooltipFollowsMouse&&H(U),E=U,!A&&(A=setTimeout(function(){A=null,E&&!n.isMousePressed&&S()},50))}),c.addListener(a.renderer.$gutter,"mouseout",function(U){E=null,v.isOpen&&(A=setTimeout(function(){A=null,C(U)},50))},a)}g.GutterHandler=i;var e=(function(n){k(a,n);function a(p,v){v===void 0&&(v=!1);var A=n.call(this,p.container)||this;A.id="gt"+ ++a.$uid,A.editor=p,A.visibleTooltipRow;var E=A.getElement();return E.setAttribute("role","tooltip"),E.setAttribute("id",A.id),E.style.pointerEvents="auto",v&&(A.onMouseOut=A.onMouseOut.bind(A),E.addEventListener("mouseout",A.onMouseOut)),A}return a.prototype.onMouseOut=function(p){this.isOpen&&(!p.relatedTarget||this.getElement().contains(p.relatedTarget)||p&&p.currentTarget.contains(p.relatedTarget)||this.hideTooltip())},a.prototype.setPosition=function(p,v){var A=window.innerWidth||document.documentElement.clientWidth,E=window.innerHeight||document.documentElement.clientHeight,S=this.getWidth(),C=this.getHeight();p+=15,v+=15,p+S>A&&(p-=p+S-A),v+C>E&&(v-=20+C),h.prototype.setPosition.call(this,p,v)},Object.defineProperty(a,"annotationLabels",{get:function(){return{error:{singular:t("gutter-tooltip.aria-label.error.singular","error"),plural:t("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:t("gutter-tooltip.aria-label.security.singular","security finding"),plural:t("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:t("gutter-tooltip.aria-label.warning.singular","warning"),plural:t("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:t("gutter-tooltip.aria-label.info.singular","information message"),plural:t("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:t("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:t("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),a.prototype.showTooltip=function(p){var v,A=this.editor.renderer.$gutterLayer,E=A.$annotations[p],S;E?S={displayText:Array.from(E.displayText),type:Array.from(E.type)}:S={displayText:[],type:[]};var C=A.session.getFoldLine(p);if(C&&A.$showFoldedAnnotations){for(var H={error:[],security:[],warning:[],info:[],hint:[]},U={error:1,security:2,warning:3,info:4,hint:5},V,F=p+1;F<=C.end.row;F++)if(A.$annotations[F])for(var he=0;he<A.$annotations[F].text.length;he++){var P=A.$annotations[F].type[he];H[P].push(A.$annotations[F].text[he]),(!V||U[P]<U[V])&&(V=P)}if(["error","security","warning"].includes(V)){var O="".concat(a.annotationsToSummaryString(H)," in folded code.");S.displayText.push(O),S.type.push(V+"_fold")}}if(S.displayText.length===0)return this.hideTooltip();for(var b={error:[],security:[],warning:[],info:[],hint:[]},y=A.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",F=0;F<S.displayText.length;F++){var T=_.createElement("span"),G=_.createElement("span");(v=G.classList).add.apply(v,["ace_".concat(S.type[F]),y]),G.setAttribute("aria-label","".concat(a.annotationLabels[S.type[F].replace("_fold","")].singular)),G.setAttribute("role","img"),G.appendChild(_.createTextNode(" ")),T.appendChild(G),T.appendChild(_.createTextNode(S.displayText[F])),T.appendChild(_.createElement("br")),b[S.type[F].replace("_fold","")].push(T)}var q=this.getElement();_.removeChildren(q),b.error.forEach(function(Ce){return q.appendChild(Ce)}),b.security.forEach(function(Ce){return q.appendChild(Ce)}),b.warning.forEach(function(Ce){return q.appendChild(Ce)}),b.info.forEach(function(Ce){return q.appendChild(Ce)}),b.hint.forEach(function(Ce){return q.appendChild(Ce)}),q.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip"));var ue=this.$findLinkedAnnotationNode(p);ue&&ue.setAttribute("aria-describedby",this.id),this.show(),this.visibleTooltipRow=p,this.editor._signal("showGutterTooltip",this)},a.prototype.$findLinkedAnnotationNode=function(p){var v=this.$findCellByRow(p);if(v){var A=v.element;if(A.childNodes.length>2)return A.childNodes[2]}},a.prototype.$findCellByRow=function(p){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(v){return v.row===p})},a.prototype.hideTooltip=function(){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.hide(),this.visibleTooltipRow!=null){var p=this.$findLinkedAnnotationNode(this.visibleTooltipRow);p&&p.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this)}},a.annotationsToSummaryString=function(p){var v,A,E=[],S=["error","security","warning","info","hint"];try{for(var C=x(S),H=C.next();!H.done;H=C.next()){var U=H.value;if(p[U].length){var V=p[U].length===1?a.annotationLabels[U].singular:a.annotationLabels[U].plural;E.push("".concat(p[U].length," ").concat(V))}}}catch(F){v={error:F}}finally{try{H&&!H.done&&(A=C.return)&&A.call(C)}finally{if(v)throw v.error}}return E.join(", ")},a})(h);e.$uid=0,g.GutterTooltip=e}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(f,g,j){var k=f("../lib/event"),x=f("../lib/useragent"),_=(function(){function c(h,t){this.speed,this.wheelX,this.wheelY,this.domEvent=h,this.editor=t,this.x=this.clientX=h.clientX,this.y=this.clientY=h.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return c.prototype.stopPropagation=function(){k.stopPropagation(this.domEvent),this.propagationStopped=!0},c.prototype.preventDefault=function(){k.preventDefault(this.domEvent),this.defaultPrevented=!0},c.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},c.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},c.prototype.getGutterRow=function(){var h=this.getDocumentPosition().row,t=this.editor.session.documentToScreenRow(h,0),o=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return t-o},c.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var h=this.editor,t=h.getSelectionRange();if(t.isEmpty())this.$inSelection=!1;else{var o=this.getDocumentPosition();this.$inSelection=t.contains(o.row,o.column)}return this.$inSelection},c.prototype.getButton=function(){return k.getButton(this.domEvent)},c.prototype.getShiftKey=function(){return this.domEvent.shiftKey},c.prototype.getAccelKey=function(){return x.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},c})();g.MouseEvent=_}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(f,g,j){var k=f("../lib/dom"),x=f("../lib/event"),_=f("../lib/useragent"),c=200,h=200,t=5;function o(i){var e=i.editor,n=k.createElement("div");n.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",n.textContent=" ";var a=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];a.forEach(function(ze){i[ze]=this[ze]},this),e.on("mousedown",this.onMouseDown.bind(i));var p=e.container,v,A,E,S,C,H,U=0,V,F,he,P,O;this.onDragStart=function(ze){if(this.cancelDrag||!p.draggable){var Xe=this;return setTimeout(function(){Xe.startSelect(),Xe.captureMouse(ze)},0),ze.preventDefault()}C=e.getSelectionRange();var ft=ze.dataTransfer;ft.effectAllowed=e.getReadOnly()?"copy":"copyMove",e.container.appendChild(n),ft.setDragImage&&ft.setDragImage(n,0,0),setTimeout(function(){e.container.removeChild(n)}),ft.clearData(),ft.setData("Text",e.session.getTextRange()),F=!0,this.setState("drag")},this.onDragEnd=function(ze){if(p.draggable=!1,F=!1,this.setState(null),!e.getReadOnly()){var Xe=ze.dataTransfer.dropEffect;!V&&Xe=="move"&&e.session.remove(e.getSelectionRange()),e.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(ze){if(!(e.getReadOnly()||!Oe(ze.dataTransfer)))return A=ze.clientX,E=ze.clientY,v||G(),U++,ze.dataTransfer.dropEffect=V=gt(ze),x.preventDefault(ze)},this.onDragOver=function(ze){if(!(e.getReadOnly()||!Oe(ze.dataTransfer)))return A=ze.clientX,E=ze.clientY,v||(G(),U++),ue!==null&&(ue=null),ze.dataTransfer.dropEffect=V=gt(ze),x.preventDefault(ze)},this.onDragLeave=function(ze){if(U--,U<=0&&v)return q(),V=null,x.preventDefault(ze)},this.onDrop=function(ze){if(H){var Xe=ze.dataTransfer;if(F)switch(V){case"move":C.contains(H.row,H.column)?C={start:H,end:H}:C=e.moveText(C,H);break;case"copy":C=e.moveText(C,H,!0);break}else{var ft=Xe.getData("Text");C={start:H,end:e.session.insert(H,ft)},e.focus(),V=null}return q(),x.preventDefault(ze)}},x.addListener(p,"dragstart",this.onDragStart.bind(i),e),x.addListener(p,"dragend",this.onDragEnd.bind(i),e),x.addListener(p,"dragenter",this.onDragEnter.bind(i),e),x.addListener(p,"dragover",this.onDragOver.bind(i),e),x.addListener(p,"dragleave",this.onDragLeave.bind(i),e),x.addListener(p,"drop",this.onDrop.bind(i),e);function b(ze,Xe){var ft=Date.now(),pt=!Xe||ze.row!=Xe.row,mt=!Xe||ze.column!=Xe.column;if(!P||pt||mt)e.moveCursorToPosition(ze),P=ft,O={x:A,y:E};else{var Vt=r(O.x,O.y,A,E);Vt>t?P=null:ft-P>=h&&(e.renderer.scrollCursorIntoView(),P=null)}}function y(ze,Xe){var ft=Date.now(),pt=e.renderer.layerConfig.lineHeight,mt=e.renderer.layerConfig.characterWidth,Vt=e.renderer.scroller.getBoundingClientRect(),Yt={x:{left:A-Vt.left,right:Vt.right-A},y:{top:E-Vt.top,bottom:Vt.bottom-E}},Gt=Math.min(Yt.x.left,Yt.x.right),Qt=Math.min(Yt.y.top,Yt.y.bottom),Zt={row:ze.row,column:ze.column};Gt/mt<=2&&(Zt.column+=Yt.x.left<Yt.x.right?-3:2),Qt/pt<=1&&(Zt.row+=Yt.y.top<Yt.y.bottom?-1:1);var di=ze.row!=Zt.row,fi=ze.column!=Zt.column,Xt=!Xe||ze.row!=Xe.row;di||fi&&!Xt?he?ft-he>=c&&e.renderer.scrollCursorIntoView(Zt):he=ft:he=null}function T(){var ze=H;H=e.renderer.screenToTextCoordinates(A,E),b(H,ze),y(H,ze)}function G(){C=e.selection.toOrientedRange(),v=e.session.addMarker(C,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval(S),T(),S=setInterval(T,20),U=0,x.addListener(document,"mousemove",Ce)}function q(){clearInterval(S),e.session.removeMarker(v),v=null,e.selection.fromOrientedRange(C),e.isFocused()&&!F&&e.$resetCursorStyle(),C=null,H=null,U=0,he=null,P=null,x.removeListener(document,"mousemove",Ce)}var ue=null;function Ce(){ue==null&&(ue=setTimeout(function(){ue!=null&&v&&q()},20))}function Oe(ze){var Xe=ze.types;return!Xe||Array.prototype.some.call(Xe,function(ft){return ft=="text/plain"||ft=="Text"})}function gt(ze){var Xe=["copy","copymove","all","uninitialized"],ft=["move","copymove","linkmove","all","uninitialized"],pt=_.isMac?ze.altKey:ze.ctrlKey,mt="uninitialized";try{mt=ze.dataTransfer.effectAllowed.toLowerCase()}catch{}var Vt="none";return pt&&Xe.indexOf(mt)>=0?Vt="copy":ft.indexOf(mt)>=0?Vt="move":Xe.indexOf(mt)>=0&&(Vt="copy"),Vt}}(function(){this.dragWait=function(){var i=Date.now()-this.mousedownEvent.time;i>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var i=this.editor.container;i.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(i){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var i=this.editor,e=i.container;e.draggable=!0,i.renderer.$cursorLayer.setBlinking(!1),i.setStyle("ace_dragging");var n=_.isWin?"default":"move";i.renderer.setCursorStyle(n),this.setState("dragReady")},this.onMouseDrag=function(i){var e=this.editor.container;if(_.isIE&&this.state=="dragReady"){var n=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>3&&e.dragDrop()}if(this.state==="dragWait"){var n=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>0&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(i){if(this.$dragEnabled){this.mousedownEvent=i;var e=this.editor,n=i.inSelection(),a=i.getButton(),p=i.domEvent.detail||1;if(p===1&&a===0&&n){if(i.editor.inMultiSelectMode&&(i.getAccelKey()||i.getShiftKey()))return;this.mousedownEvent.time=Date.now();var v=i.domEvent.target||i.domEvent.srcElement;if("unselectable"in v&&(v.unselectable="on"),e.getDragDelay()){if(_.isWebKit){this.cancelDrag=!0;var A=e.container;A.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(i,this.onMouseDrag.bind(this)),i.defaultPrevented=!0}}}}).call(o.prototype);function r(i,e,n,a){return Math.sqrt(Math.pow(n-i,2)+Math.pow(a-e,2))}g.DragdropHandler=o}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(f,g,j){var k=f("./mouse_event").MouseEvent,x=f("../lib/event"),_=f("../lib/dom");g.addTouchListeners=function(c,h){var t="scroll",o,r,i,e,n,a,p=0,v,A=0,E=0,S=0,C,H;function U(){var b=window.navigator&&window.navigator.clipboard,y=!1,T=function(){var ue=h.getCopyText(),Ce=h.session.getUndoManager().hasUndo();H.replaceChild(_.buildDom(y?["span",!ue&&G("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],ue&&G("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],ue&&G("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],b&&G("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],Ce&&G("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],G("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],G("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),H.firstChild)},G=function(ue){return h.commands.canExecute(ue,h)},q=function(ue){var Ce=ue.target.getAttribute("action");if(Ce=="more"||!y)return y=!y,T();Ce=="paste"?b.readText().then(function(Oe){h.execCommand(Ce,Oe)}):Ce&&((Ce=="cut"||Ce=="copy")&&(b?b.writeText(h.getCopyText()):document.execCommand("copy")),h.execCommand(Ce)),H.firstChild.style.display="none",y=!1,Ce!="openCommandPalette"&&h.focus()};H=_.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(ue){t="menu",ue.stopPropagation(),ue.preventDefault(),h.textInput.focus()},ontouchend:function(ue){ue.stopPropagation(),ue.preventDefault(),q(ue)},onclick:q},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],h.container)}function V(){if(!h.getOption("enableMobileMenu")){H&&F();return}H||U();var b=h.selection.cursor,y=h.renderer.textToScreenCoordinates(b.row,b.column),T=h.renderer.textToScreenCoordinates(0,0).pageX,G=h.renderer.scrollLeft,q=h.container.getBoundingClientRect();H.style.top=y.pageY-q.top-3+"px",y.pageX-q.left<q.width-70?(H.style.left="",H.style.right="10px"):(H.style.right="",H.style.left=T+G-q.left+"px"),H.style.display="",H.firstChild.style.display="none",h.on("input",F)}function F(b){H&&(H.style.display="none"),h.off("input",F)}function he(){n=null,clearTimeout(n);var b=h.selection.getRange(),y=b.contains(v.row,v.column);(b.isEmpty()||!y)&&(h.selection.moveToPosition(v),h.selection.selectWord()),t="wait",V()}function P(){n=null,clearTimeout(n),h.selection.moveToPosition(v);var b=A>=2?h.selection.getLineRange(v.row):h.session.getBracketRange(v);b&&!b.isEmpty()?h.selection.setRange(b):h.selection.selectWord(),t="wait"}x.addListener(c,"contextmenu",function(b){if(C){var y=h.textInput.getElement();y.focus()}},h),x.addListener(c,"touchstart",function(b){var y=b.touches;if(n||y.length>1){clearTimeout(n),n=null,i=-1,t="zoom";return}C=h.$mouseHandler.isMousePressed=!0;var T=h.renderer.layerConfig.lineHeight,G=h.renderer.layerConfig.lineHeight,q=b.timeStamp;e=q;var ue=y[0],Ce=ue.clientX,Oe=ue.clientY;Math.abs(o-Ce)+Math.abs(r-Oe)>T&&(i=-1),o=b.clientX=Ce,r=b.clientY=Oe,E=S=0;var gt=new k(b,h);if(v=gt.getDocumentPosition(),q-i<500&&y.length==1&&!p)A++,b.preventDefault(),b.button=0,P();else{A=0;var ze=h.selection.cursor,Xe=h.selection.isEmpty()?ze:h.selection.anchor,ft=h.renderer.$cursorLayer.getPixelPosition(ze,!0),pt=h.renderer.$cursorLayer.getPixelPosition(Xe,!0),mt=h.renderer.scroller.getBoundingClientRect(),Vt=h.renderer.layerConfig.offset,Yt=h.renderer.scrollLeft,Gt=function(di,fi){return di=di/G,fi=fi/T-.75,di*di+fi*fi};if(b.clientX<mt.left){t="zoom";return}var Qt=Gt(b.clientX-mt.left-ft.left+Yt,b.clientY-mt.top-ft.top+Vt),Zt=Gt(b.clientX-mt.left-pt.left+Yt,b.clientY-mt.top-pt.top+Vt);Qt<3.5&&Zt<3.5&&(t=Qt>Zt?"cursor":"anchor"),Zt<3.5?t="anchor":Qt<3.5?t="cursor":t="scroll",n=setTimeout(he,450)}i=q},h),x.addListener(c,"touchend",function(b){C=h.$mouseHandler.isMousePressed=!1,a&&clearInterval(a),t=="zoom"?(t="",p=0):n?(h.selection.moveToPosition(v),p=0,V()):t=="scroll"?(O(),F()):V(),clearTimeout(n),n=null},h),x.addListener(c,"touchmove",function(b){n&&(clearTimeout(n),n=null);var y=b.touches;if(!(y.length>1||t=="zoom")){var T=y[0],G=o-T.clientX,q=r-T.clientY;if(t=="wait")if(G*G+q*q>4)t="cursor";else return b.preventDefault();o=T.clientX,r=T.clientY,b.clientX=T.clientX,b.clientY=T.clientY;var ue=b.timeStamp,Ce=ue-e;if(e=ue,t=="scroll"){var Oe=new k(b,h);Oe.speed=1,Oe.wheelX=G,Oe.wheelY=q,10*Math.abs(G)<Math.abs(q)&&(G=0),10*Math.abs(q)<Math.abs(G)&&(q=0),Ce!=0&&(E=G/Ce,S=q/Ce),h._emit("mousewheel",Oe),Oe.propagationStopped||(E=S=0)}else{var gt=new k(b,h),ze=gt.getDocumentPosition();t=="cursor"?h.selection.moveCursorToPosition(ze):t=="anchor"&&h.selection.setSelectionAnchor(ze.row,ze.column),h.renderer.scrollCursorIntoView(ze),b.preventDefault()}}},h);function O(){p+=60,a=setInterval(function(){p--<=0&&(clearInterval(a),a=null),Math.abs(E)<.01&&(E=0),Math.abs(S)<.01&&(S=0),p<20&&(E=.9*E),p<20&&(S=.9*S);var b=h.session.getScrollTop();h.renderer.scrollBy(10*E,10*S),b==h.session.getScrollTop()&&(p=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(f,g,j){var k=f("../lib/event"),x=f("../lib/useragent"),_=f("./default_handlers").DefaultHandlers,c=f("./default_gutter_handler").GutterHandler,h=f("./mouse_event").MouseEvent,t=f("./dragdrop_handler").DragdropHandler,o=f("./touch_handler").addTouchListeners,r=f("../config"),i=(function(){function e(n){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var a=this;this.editor=n,new _(this),new c(this),new t(this);var p=function(E){var S=!document.hasFocus||!document.hasFocus()||!n.isFocused()&&document.activeElement==(n.textInput&&n.textInput.getElement());S&&window.focus(),n.focus(),setTimeout(function(){n.isFocused()||n.focus()})},v=n.renderer.getMouseEventTarget();k.addListener(v,"click",this.onMouseEvent.bind(this,"click"),n),k.addListener(v,"mousemove",this.onMouseMove.bind(this,"mousemove"),n),k.addMultiMouseDownListener([v,n.renderer.scrollBarV&&n.renderer.scrollBarV.inner,n.renderer.scrollBarH&&n.renderer.scrollBarH.inner,n.textInput&&n.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",n),k.addMouseWheelListener(n.container,this.onMouseWheel.bind(this,"mousewheel"),n),o(n.container,n);var A=n.renderer.$gutter;k.addListener(A,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),n),k.addListener(A,"click",this.onMouseEvent.bind(this,"gutterclick"),n),k.addListener(A,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),n),k.addListener(A,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),n),k.addListener(v,"mousedown",p,n),k.addListener(A,"mousedown",p,n),x.isIE&&n.renderer.scrollBarV&&(k.addListener(n.renderer.scrollBarV.element,"mousedown",p,n),k.addListener(n.renderer.scrollBarH.element,"mousedown",p,n)),n.on("mousemove",function(E){if(!(a.state||a.$dragDelay||!a.$dragEnabled)){var S=n.renderer.screenToTextCoordinates(E.x,E.y),C=n.session.selection.getRange(),H=n.renderer;!C.isEmpty()&&C.insideStart(S.row,S.column)?H.setCursorStyle("default"):H.setCursorStyle("")}},n)}return e.prototype.onMouseEvent=function(n,a){this.editor.session&&this.editor._emit(n,new h(a,this.editor))},e.prototype.onMouseMove=function(n,a){var p=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!p||!p.length||this.editor._emit(n,new h(a,this.editor))},e.prototype.onMouseWheel=function(n,a){var p=new h(a,this.editor);p.speed=this.$scrollSpeed*2,p.wheelX=a.wheelX,p.wheelY=a.wheelY,this.editor._emit(n,p)},e.prototype.setState=function(n){this.state=n},e.prototype.captureMouse=function(n,a){this.x=n.x,this.y=n.y,this.isMousePressed=!0;var p=this.editor,v=this.editor.renderer;v.$isMousePressed=!0;var A=this,E=!0,S=function(F){if(F){if(x.isWebKit&&!F.which&&A.releaseMouse)return A.releaseMouse();A.x=F.clientX,A.y=F.clientY,a&&a(F),A.mouseEvent=new h(F,A.editor),A.$mouseMoved=!0}},C=function(F){p.off("beforeEndOperation",V),E=!1,p.session&&H(),A[A.state+"End"]&&A[A.state+"End"](F),A.state="",A.isMousePressed=v.$isMousePressed=!1,v.$keepTextAreaAtCursor&&v.$moveTextAreaToCursor(),A.$onCaptureMouseMove=A.releaseMouse=null,F&&A.onMouseEvent("mouseup",F),p.endOperation()},H=function(){A[A.state]&&A[A.state](),A.$mouseMoved=!1},U=function(){E&&(H(),k.nextFrame(U))};if(x.isOldIE&&n.domEvent.type=="dblclick")return setTimeout(function(){C(n)});var V=function(F){A.releaseMouse&&p.curOp.command.name&&p.curOp.selectionChanged&&(A[A.state+"End"]&&A[A.state+"End"](),A.state="",A.releaseMouse())};p.on("beforeEndOperation",V),p.startOperation({command:{name:"mouse"}}),A.$onCaptureMouseMove=S,A.releaseMouse=k.capture(this.editor.container,S,C),U()},e.prototype.cancelContextMenu=function(){var n=(function(a){a&&a.domEvent&&a.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",n),a&&a.domEvent&&k.stopEvent(a.domEvent))}).bind(this);setTimeout(n,10),this.editor.on("nativecontextmenu",n)},e.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},e})();i.prototype.releaseMouse=null,r.defineOptions(i.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:x.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),g.MouseHandler=i}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(f,g,j){var k=f("../lib/dom"),x=(function(){function _(c){c.on("click",function(h){var t=h.getDocumentPosition(),o=c.session,r=o.getFoldAt(t.row,t.column,1);r&&(h.getAccelKey()?o.removeFold(r):o.expandFold(r),h.stop());var i=h.domEvent&&h.domEvent.target;i&&k.hasCssClass(i,"ace_inline_button")&&k.hasCssClass(i,"ace_toggle_wrap")&&(o.setOption("wrap",!o.getUseWrapMode()),c.renderer.scrollCursorIntoView())}),c.on("gutterclick",function(h){var t=c.renderer.$gutterLayer.getRegion(h);if(t=="foldWidgets"){var o=h.getDocumentPosition().row,r=c.session;r.foldWidgets&&r.foldWidgets[o]&&c.session.onFoldWidgetClick(o,h),c.isFocused()||c.focus(),h.stop()}}),c.on("gutterdblclick",function(h){var t=c.renderer.$gutterLayer.getRegion(h);if(t=="foldWidgets"){var o=h.getDocumentPosition().row,r=c.session,i=r.getParentFoldRangeData(o,!0),e=i.range||i.firstRange;if(e){o=e.start.row;var n=r.getFoldAt(o,r.getLine(o).length,1);n?r.removeFold(n):(r.addFold("...",e),c.renderer.scrollCursorIntoView({row:e.start.row,column:0}))}h.stop()}})}return _})();g.FoldHandler=x}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(f,g,j){var k=f("../lib/keys"),x=f("../lib/event"),_=(function(){function c(h){this.$editor=h,this.$data={editor:h},this.$handlers=[],this.setDefaultHandler(h.commands)}return c.prototype.setDefaultHandler=function(h){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=h,this.addKeyboardHandler(h,0)},c.prototype.setKeyboardHandler=function(h){var t=this.$handlers;if(t[t.length-1]!=h){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(h,1)}},c.prototype.addKeyboardHandler=function(h,t){if(h){typeof h=="function"&&!h.handleKeyboard&&(h.handleKeyboard=h);var o=this.$handlers.indexOf(h);o!=-1&&this.$handlers.splice(o,1),t==null?this.$handlers.push(h):this.$handlers.splice(t,0,h),o==-1&&h.attach&&h.attach(this.$editor)}},c.prototype.removeKeyboardHandler=function(h){var t=this.$handlers.indexOf(h);return t==-1?!1:(this.$handlers.splice(t,1),h.detach&&h.detach(this.$editor),!0)},c.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},c.prototype.getStatusText=function(){var h=this.$data,t=h.editor;return this.$handlers.map(function(o){return o.getStatusText&&o.getStatusText(t,h)||""}).filter(Boolean).join(" ")},c.prototype.$callKeyboardHandlers=function(h,t,o,r){for(var i,e=!1,n=this.$editor.commands,a=this.$handlers.length;a--&&(i=this.$handlers[a].handleKeyboard(this.$data,h,t,o,r),!(!(!i||!i.command)&&(i.command=="null"?e=!0:e=n.exec(i.command,this.$editor,i.args,r),e&&r&&h!=-1&&i.passEvent!=!0&&i.command.passEvent!=!0&&x.stopEvent(r),e))););return!e&&h==-1&&(i={command:"insertstring"},e=n.exec("insertstring",this.$editor,t)),e&&this.$editor._signal&&this.$editor._signal("keyboardActivity",i),e},c.prototype.onCommandKey=function(h,t,o){var r=k.keyCodeToString(o);return this.$callKeyboardHandlers(t,r,o,h)},c.prototype.onTextInput=function(h){return this.$callKeyboardHandlers(-1,h)},c})();g.KeyBinding=_}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(f,g,j){var k=0,x=0,_=!1,c=!1,h=!1,t=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],o=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],r=0,i=1,e=0,n=1,a=2,p=3,v=4,A=5,E=6,S=7,C=8,H=9,U=10,V=11,F=12,he=13,P=14,O=15,b=16,y=17,T=18,G=[T,T,T,T,T,T,T,T,T,E,A,E,C,A,T,T,T,T,T,T,T,T,T,T,T,T,T,T,A,A,A,E,C,v,v,V,V,V,v,v,v,v,v,U,H,U,H,H,a,a,a,a,a,a,a,a,a,a,H,v,v,v,v,v,v,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,v,v,v,v,v,v,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,v,v,v,v,T,T,T,T,T,T,A,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,H,v,V,V,V,V,v,v,v,v,e,v,v,T,v,v,V,V,a,a,v,e,v,v,v,a,e,v,v,v,v,v],q=[C,C,C,C,C,C,C,C,C,C,C,T,T,T,e,n,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,C,A,he,P,O,b,y,H,V,V,V,V,V,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,H,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,C];function ue(ze,Xe,ft,pt){var mt=k?o:t,Vt=null,Yt=null,Gt=null,Qt=0,Zt=null,di=null,fi=-1,Xt=null,pi=null,vi=[];if(!pt)for(Xt=0,pt=[];Xt<ft;Xt++)pt[Xt]=gt(ze[Xt]);for(x=k,_=!1,c=!1,h=!1,pi=0;pi<ft;pi++){if(Vt=Qt,vi[pi]=Yt=Oe(ze,pt,vi,pi),Qt=mt[Vt][Yt],Zt=Qt&240,Qt&=15,Xe[pi]=Gt=mt[Qt][5],Zt>0)if(Zt==16){for(Xt=fi;Xt<pi;Xt++)Xe[Xt]=1;fi=-1}else fi=-1;if(di=mt[Qt][6],di)fi==-1&&(fi=pi);else if(fi>-1){for(Xt=fi;Xt<pi;Xt++)Xe[Xt]=Gt;fi=-1}pt[pi]==A&&(Xe[pi]=0),x|=Gt}if(h){for(Xt=0;Xt<ft;Xt++)if(pt[Xt]==E){Xe[Xt]=k;for(var mi=Xt-1;mi>=0&&pt[mi]==C;mi--)Xe[mi]=k}}}function Ce(ze,Xe,ft){if(!(x<ze)){if(ze==1&&k==i&&!c){ft.reverse();return}for(var pt=ft.length,mt=0,Vt,Yt,Gt,Qt;mt<pt;){if(Xe[mt]>=ze){for(Vt=mt+1;Vt<pt&&Xe[Vt]>=ze;)Vt++;for(Yt=mt,Gt=Vt-1;Yt<Gt;Yt++,Gt--)Qt=ft[Yt],ft[Yt]=ft[Gt],ft[Gt]=Qt;mt=Vt}mt++}}}function Oe(ze,Xe,ft,pt){var mt=Xe[pt],Vt,Yt,Gt,Qt;switch(mt){case e:case n:_=!1;case v:case p:return mt;case a:return _?p:a;case S:return _=!0,n;case C:return v;case H:return pt<1||pt+1>=Xe.length||(Vt=ft[pt-1])!=a&&Vt!=p||(Yt=Xe[pt+1])!=a&&Yt!=p?v:(_&&(Yt=p),Yt==Vt?Yt:v);case U:return Vt=pt>0?ft[pt-1]:A,Vt==a&&pt+1<Xe.length&&Xe[pt+1]==a?a:v;case V:if(pt>0&&ft[pt-1]==a)return a;if(_)return v;for(Qt=pt+1,Gt=Xe.length;Qt<Gt&&Xe[Qt]==V;)Qt++;return Qt<Gt&&Xe[Qt]==a?a:v;case F:for(Gt=Xe.length,Qt=pt+1;Qt<Gt&&Xe[Qt]==F;)Qt++;if(Qt<Gt){var Zt=ze[pt],di=Zt>=1425&&Zt<=2303||Zt==64286;if(Vt=Xe[Qt],di&&(Vt==n||Vt==S))return n}return pt<1||(Vt=Xe[pt-1])==A?v:ft[pt-1];case A:return _=!1,c=!0,k;case E:return h=!0,v;case he:case P:case b:case y:case O:_=!1;case T:return v}}function gt(ze){var Xe=ze.charCodeAt(0),ft=Xe>>8;return ft==0?Xe>191?e:G[Xe]:ft==5?/[\u0591-\u05f4]/.test(ze)?n:e:ft==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ze)?F:/[\u0660-\u0669\u066b-\u066c]/.test(ze)?p:Xe==1642?V:/[\u06f0-\u06f9]/.test(ze)?a:S:ft==32&&Xe<=8287?q[Xe&255]:ft==254&&Xe>=65136?S:v}g.L=e,g.R=n,g.EN=a,g.ON_R=3,g.AN=4,g.R_H=5,g.B=6,g.RLE=7,g.DOT="·",g.doBidiReorder=function(ze,Xe,ft){if(ze.length<2)return{};var pt=ze.split(""),mt=new Array(pt.length),Vt=new Array(pt.length),Yt=[];k=ft?i:r,ue(pt,Yt,pt.length,Xe);for(var Gt=0;Gt<mt.length;mt[Gt]=Gt,Gt++);Ce(2,Yt,mt),Ce(1,Yt,mt);for(var Gt=0;Gt<mt.length-1;Gt++)Xe[Gt]===p?Yt[Gt]=g.AN:Yt[Gt]===n&&(Xe[Gt]>S&&Xe[Gt]<he||Xe[Gt]===v||Xe[Gt]===T)?Yt[Gt]=g.ON_R:Gt>0&&pt[Gt-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(pt[Gt])&&(Yt[Gt-1]=Yt[Gt]=g.R_H,Gt++);pt[pt.length-1]===g.DOT&&(Yt[pt.length-1]=g.B),pt[0]===""&&(Yt[0]=g.RLE);for(var Gt=0;Gt<mt.length;Gt++)Vt[Gt]=Yt[mt[Gt]];return{logicalFromVisual:mt,bidiLevels:Vt}},g.hasBidiCharacters=function(ze,Xe){for(var ft=!1,pt=0;pt<ze.length;pt++)Xe[pt]=gt(ze.charAt(pt)),!ft&&(Xe[pt]==n||Xe[pt]==S||Xe[pt]==p)&&(ft=!0);return ft},g.getVisualFromLogicalIdx=function(ze,Xe){for(var ft=0;ft<Xe.logicalFromVisual.length;ft++)if(Xe.logicalFromVisual[ft]==ze)return ft;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(f,g,j){var k=f("./lib/bidiutil"),x=f("./lib/lang"),_=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,c=(function(){function h(t){this.session=t,this.bidiMap={},this.currentRow=null,this.bidiUtil=k,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=_.test(t.getValue())}return h.prototype.isBidiRow=function(t,o,r){return this.seenBidi?(t!==this.currentRow&&(this.currentRow=t,this.updateRowLine(o,r),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},h.prototype.onChange=function(t){this.seenBidi?this.currentRow=null:t.action=="insert"&&_.test(t.lines.join(`
|
182
|
+
`))&&(this.seenBidi=!0,this.currentRow=null)},h.prototype.getDocumentRow=function(){var t=0,o=this.session.$screenRowCache;if(o.length){var r=this.session.$getRowCacheIndex(o,this.currentRow);r>=0&&(t=this.session.$docRowCache[r])}return t},h.prototype.getSplitIndex=function(){var t=0,o=this.session.$screenRowCache;if(o.length)for(var r,i=this.session.$getRowCacheIndex(o,this.currentRow);this.currentRow-t>0&&(r=this.session.$getRowCacheIndex(o,this.currentRow-t-1),r===i);)i=r,t++;else t=this.currentRow;return t},h.prototype.updateRowLine=function(t,o){t===void 0&&(t=this.getDocumentRow());var r=t===this.session.getLength()-1,i=r?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(t),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var e=this.session.$wrapData[t];e&&(o===void 0&&(o=this.getSplitIndex()),o>0&&e.length?(this.wrapIndent=e.indent,this.wrapOffset=this.wrapIndent*this.charWidths[k.L],this.line=o<e.length?this.line.substring(e[o-1],e[o]):this.line.substring(e[e.length-1])):this.line=this.line.substring(0,e[o]),o==e.length&&(this.line+=this.showInvisibles?i:k.DOT))}else this.line+=this.showInvisibles?i:k.DOT;var n=this.session,a=0,p;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(v,A){return v===" "||n.isFullWidth(v.charCodeAt(0))?(p=v===" "?n.getScreenTabSize(A+a):2,a+=p-1,x.stringRepeat(k.DOT,p)):v}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==k.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},h.prototype.updateBidiMap=function(){var t=[];k.hasBidiCharacters(this.line,t)||this.isRtlDir?this.bidiMap=k.doBidiReorder(this.line,t,this.isRtlDir):this.bidiMap={}},h.prototype.markAsDirty=function(){this.currentRow=null},h.prototype.updateCharacterWidths=function(t){if(this.characterWidth!==t.$characterSize.width){this.fontMetrics=t;var o=this.characterWidth=t.$characterSize.width,r=t.$measureCharWidth("ה");this.charWidths[k.L]=this.charWidths[k.EN]=this.charWidths[k.ON_R]=o,this.charWidths[k.R]=this.charWidths[k.AN]=r,this.charWidths[k.R_H]=r*.45,this.charWidths[k.B]=this.charWidths[k.RLE]=0,this.currentRow=null}},h.prototype.setShowInvisibles=function(t){this.showInvisibles=t,this.currentRow=null},h.prototype.setEolChar=function(t){this.EOL=t},h.prototype.setContentWidth=function(t){this.contentWidth=t},h.prototype.isRtlLine=function(t){return this.$isRtl?!0:t!=null?this.session.getLine(t).charAt(0)==this.RLE:this.isRtlDir},h.prototype.setRtlDirection=function(t,o){for(var r=t.getCursorPosition(),i=t.selection.getSelectionAnchor().row;i<=r.row;i++)!o&&t.session.getLine(i).charAt(0)===t.session.$bidiHandler.RLE?t.session.doc.removeInLine(i,0,1):o&&t.session.getLine(i).charAt(0)!==t.session.$bidiHandler.RLE&&t.session.doc.insert({column:0,row:i},t.session.$bidiHandler.RLE)},h.prototype.getPosLeft=function(t){t-=this.wrapIndent;var o=this.line.charAt(0)===this.RLE?1:0,r=t>o?this.session.getOverwrite()?t:t-1:o,i=k.getVisualFromLogicalIdx(r,this.bidiMap),e=this.bidiMap.bidiLevels,n=0;!this.session.getOverwrite()&&t<=o&&e[i]%2!==0&&i++;for(var a=0;a<i;a++)n+=this.charWidths[e[a]];return!this.session.getOverwrite()&&t>o&&e[i]%2===0&&(n+=this.charWidths[e[i]]),this.wrapIndent&&(n+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(n+=this.rtlLineOffset),n},h.prototype.getSelections=function(t,o){var r=this.bidiMap,i=r.bidiLevels,e,n=[],a=0,p=Math.min(t,o)-this.wrapIndent,v=Math.max(t,o)-this.wrapIndent,A=!1,E=!1,S=0;this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var C,H=0;H<i.length;H++)C=r.logicalFromVisual[H],e=i[H],A=C>=p&&C<v,A&&!E?S=a:!A&&E&&n.push({left:S,width:a-S}),a+=this.charWidths[e],E=A;if(A&&H===i.length&&n.push({left:S,width:a-S}),this.isRtlDir)for(var U=0;U<n.length;U++)n[U].left+=this.rtlLineOffset;return n},h.prototype.offsetToCol=function(r){this.isRtlDir&&(r-=this.rtlLineOffset);var o=0,r=Math.max(r,0),i=0,e=0,n=this.bidiMap.bidiLevels,a=this.charWidths[n[e]];for(this.wrapIndent&&(r-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);r>i+a/2;){if(i+=a,e===n.length-1){a=0;break}a=this.charWidths[n[++e]]}return e>0&&n[e-1]%2!==0&&n[e]%2===0?(r<i&&e--,o=this.bidiMap.logicalFromVisual[e]):e>0&&n[e-1]%2===0&&n[e]%2!==0?o=1+(r>i?this.bidiMap.logicalFromVisual[e]:this.bidiMap.logicalFromVisual[e-1]):this.isRtlDir&&e===n.length-1&&a===0&&n[e-1]%2===0||!this.isRtlDir&&e===0&&n[e]%2!==0?o=1+this.bidiMap.logicalFromVisual[e]:(e>0&&n[e-1]%2!==0&&a!==0&&e--,o=this.bidiMap.logicalFromVisual[e]),o===0&&this.isRtlDir&&o++,o+this.wrapIndent},h})();g.BidiHandler=c}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(f,g,j){var k=f("./lib/oop"),x=f("./lib/lang"),_=f("./lib/event_emitter").EventEmitter,c=f("./range").Range,h=(function(){function t(o){this.session=o,this.doc=o.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var r=this;this.cursor.on("change",function(i){r.$cursorChanged=!0,r.$silent||r._emit("changeCursor"),!r.$isEmpty&&!r.$silent&&r._emit("changeSelection"),!r.$keepDesiredColumnOnChange&&i.old.column!=i.value.column&&(r.$desiredColumn=null)}),this.anchor.on("change",function(){r.$anchorChanged=!0,!r.$isEmpty&&!r.$silent&&r._emit("changeSelection")})}return t.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},t.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},t.prototype.getCursor=function(){return this.lead.getPosition()},t.prototype.setAnchor=function(o,r){this.$isEmpty=!1,this.anchor.setPosition(o,r)},t.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},t.prototype.getSelectionLead=function(){return this.lead.getPosition()},t.prototype.isBackwards=function(){var o=this.anchor,r=this.lead;return o.row>r.row||o.row==r.row&&o.column>r.column},t.prototype.getRange=function(){var o=this.anchor,r=this.lead;return this.$isEmpty?c.fromPoints(r,r):this.isBackwards()?c.fromPoints(r,o):c.fromPoints(o,r)},t.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},t.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},t.prototype.setRange=function(o,r){var i=r?o.end:o.start,e=r?o.start:o.end;this.$setSelection(i.row,i.column,e.row,e.column)},t.prototype.$setSelection=function(o,r,i,e){if(!this.$silent){var n=this.$isEmpty,a=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(o,r),this.cursor.setPosition(i,e),this.$isEmpty=!c.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||n!=this.$isEmpty||a)&&this._emit("changeSelection")}},t.prototype.$moveSelection=function(o){var r=this.lead;this.$isEmpty&&this.setSelectionAnchor(r.row,r.column),o.call(this)},t.prototype.selectTo=function(o,r){this.$moveSelection(function(){this.moveCursorTo(o,r)})},t.prototype.selectToPosition=function(o){this.$moveSelection(function(){this.moveCursorToPosition(o)})},t.prototype.moveTo=function(o,r){this.clearSelection(),this.moveCursorTo(o,r)},t.prototype.moveToPosition=function(o){this.clearSelection(),this.moveCursorToPosition(o)},t.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},t.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},t.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},t.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},t.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},t.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},t.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},t.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},t.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},t.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},t.prototype.getWordRange=function(o,r){if(typeof r>"u"){var i=o||this.lead;o=i.row,r=i.column}return this.session.getWordRange(o,r)},t.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},t.prototype.selectAWord=function(){var o=this.getCursor(),r=this.session.getAWordRange(o.row,o.column);this.setSelectionRange(r)},t.prototype.getLineRange=function(o,r){var i=typeof o=="number"?o:this.lead.row,e,n=this.session.getFoldLine(i);return n?(i=n.start.row,e=n.end.row):e=i,r===!0?new c(i,0,e,this.session.getLine(e).length):new c(i,0,e+1,0)},t.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},t.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},t.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},t.prototype.wouldMoveIntoSoftTab=function(o,r,i){var e=o.column,n=o.column+r;return i<0&&(e=o.column-r,n=o.column),this.session.isTabStop(o)&&this.doc.getLine(o.row).slice(e,n).split(" ").length-1==r},t.prototype.moveCursorLeft=function(){var o=this.lead.getPosition(),r;if(r=this.session.getFoldAt(o.row,o.column,-1))this.moveCursorTo(r.start.row,r.start.column);else if(o.column===0)o.row>0&&this.moveCursorTo(o.row-1,this.doc.getLine(o.row-1).length);else{var i=this.session.getTabSize();this.wouldMoveIntoSoftTab(o,i,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-i):this.moveCursorBy(0,-1)}},t.prototype.moveCursorRight=function(){var o=this.lead.getPosition(),r;if(r=this.session.getFoldAt(o.row,o.column,1))this.moveCursorTo(r.end.row,r.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var i=this.session.getTabSize(),o=this.lead;this.wouldMoveIntoSoftTab(o,i,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,i):this.moveCursorBy(0,1)}},t.prototype.moveCursorLineStart=function(){var o=this.lead.row,r=this.lead.column,i=this.session.documentToScreenRow(o,r),e=this.session.screenToDocumentPosition(i,0),n=this.session.getDisplayLine(o,null,e.row,e.column),a=n.match(/^\s*/);a[0].length!=r&&!this.session.$useEmacsStyleLineStart&&(e.column+=a[0].length),this.moveCursorToPosition(e)},t.prototype.moveCursorLineEnd=function(){var o=this.lead,r=this.session.getDocumentLastRowColumnPosition(o.row,o.column);if(this.lead.column==r.column){var i=this.session.getLine(r.row);if(r.column==i.length){var e=i.search(/\s+$/);e>0&&(r.column=e)}}this.moveCursorTo(r.row,r.column)},t.prototype.moveCursorFileEnd=function(){var o=this.doc.getLength()-1,r=this.doc.getLine(o).length;this.moveCursorTo(o,r)},t.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},t.prototype.moveCursorLongWordRight=function(){var o=this.lead.row,r=this.lead.column,i=this.doc.getLine(o),e=i.substring(r);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var n=this.session.getFoldAt(o,r,1);if(n){this.moveCursorTo(n.end.row,n.end.column);return}if(this.session.nonTokenRe.exec(e)&&(r+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,e=i.substring(r)),r>=i.length){this.moveCursorTo(o,i.length),this.moveCursorRight(),o<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(e)&&(r+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(o,r)},t.prototype.moveCursorLongWordLeft=function(){var o=this.lead.row,r=this.lead.column,i;if(i=this.session.getFoldAt(o,r,-1)){this.moveCursorTo(i.start.row,i.start.column);return}var e=this.session.getFoldStringAt(o,r,-1);e==null&&(e=this.doc.getLine(o).substring(0,r));var n=x.stringReverse(e);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(n)&&(r-=this.session.nonTokenRe.lastIndex,n=n.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),r<=0){this.moveCursorTo(o,0),this.moveCursorLeft(),o>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(n)&&(r-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(o,r)},t.prototype.$shortWordEndIndex=function(o){var r=0,i,e=/\s/,n=this.session.tokenRe;if(n.lastIndex=0,this.session.tokenRe.exec(o))r=this.session.tokenRe.lastIndex;else{for(;(i=o[r])&&e.test(i);)r++;if(r<1){for(n.lastIndex=0;(i=o[r])&&!n.test(i);)if(n.lastIndex=0,r++,e.test(i))if(r>2){r--;break}else{for(;(i=o[r])&&e.test(i);)r++;if(r>2)break}}}return n.lastIndex=0,r},t.prototype.moveCursorShortWordRight=function(){var o=this.lead.row,r=this.lead.column,i=this.doc.getLine(o),e=i.substring(r),n=this.session.getFoldAt(o,r,1);if(n)return this.moveCursorTo(n.end.row,n.end.column);if(r==i.length){var a=this.doc.getLength();do o++,e=this.doc.getLine(o);while(o<a&&/^\s*$/.test(e));/^\s+/.test(e)||(e=""),r=0}var p=this.$shortWordEndIndex(e);this.moveCursorTo(o,r+p)},t.prototype.moveCursorShortWordLeft=function(){var o=this.lead.row,r=this.lead.column,i;if(i=this.session.getFoldAt(o,r,-1))return this.moveCursorTo(i.start.row,i.start.column);var e=this.session.getLine(o).substring(0,r);if(r===0){do o--,e=this.doc.getLine(o);while(o>0&&/^\s*$/.test(e));r=e.length,/\s+$/.test(e)||(e="")}var n=x.stringReverse(e),a=this.$shortWordEndIndex(n);return this.moveCursorTo(o,r-a)},t.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},t.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},t.prototype.moveCursorBy=function(o,r){var i=this.session.documentToScreenPosition(this.lead.row,this.lead.column),e;if(r===0&&(o!==0&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(e=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(e/this.session.$bidiHandler.charWidths[0])):e=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column),o!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var n=this.session.lineWidgets[this.lead.row];o<0?o-=n.rowsAbove||0:o>0&&(o+=n.rowCount-(n.rowsAbove||0))}var a=this.session.screenToDocumentPosition(i.row+o,i.column,e);o!==0&&r===0&&a.row===this.lead.row&&(a.column,this.lead.column),this.moveCursorTo(a.row,a.column+r,r===0)},t.prototype.moveCursorToPosition=function(o){this.moveCursorTo(o.row,o.column)},t.prototype.moveCursorTo=function(o,r,i){var e=this.session.getFoldAt(o,r,1);e&&(o=e.start.row,r=e.start.column),this.$keepDesiredColumnOnChange=!0;var n=this.session.getLine(o);/[\uDC00-\uDFFF]/.test(n.charAt(r))&&n.charAt(r-1)&&(this.lead.row==o&&this.lead.column==r+1?r=r-1:r=r+1),this.lead.setPosition(o,r),this.$keepDesiredColumnOnChange=!1,i||(this.$desiredColumn=null)},t.prototype.moveCursorToScreen=function(o,r,i){var e=this.session.screenToDocumentPosition(o,r);this.moveCursorTo(e.row,e.column,i)},t.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},t.prototype.fromOrientedRange=function(o){this.setSelectionRange(o,o.cursor==o.start),this.$desiredColumn=o.desiredColumn||this.$desiredColumn},t.prototype.toOrientedRange=function(o){var r=this.getRange();return o?(o.start.column=r.start.column,o.start.row=r.start.row,o.end.column=r.end.column,o.end.row=r.end.row):o=r,o.cursor=this.isBackwards()?o.start:o.end,o.desiredColumn=this.$desiredColumn,o},t.prototype.getRangeOfMovements=function(o){var r=this.getCursor();try{o(this);var i=this.getCursor();return c.fromPoints(r,i)}catch{return c.fromPoints(r,r)}finally{this.moveCursorToPosition(r)}},t.prototype.toJSON=function(){if(this.rangeCount)var o=this.ranges.map(function(r){var i=r.clone();return i.isBackwards=r.cursor==r.start,i});else{var o=this.getRange();o.isBackwards=this.isBackwards()}return o},t.prototype.fromJSON=function(o){if(o.start==null)if(this.rangeList&&o.length>1){this.toSingleRange(o[0]);for(var r=o.length;r--;){var i=c.fromPoints(o[r].start,o[r].end);o[r].isBackwards&&(i.cursor=i.start),this.addRange(i,!0)}return}else o=o[0];this.rangeList&&this.toSingleRange(o),this.setSelectionRange(o,o.isBackwards)},t.prototype.isEqual=function(o){if((o.length||this.rangeCount)&&o.length!=this.rangeCount)return!1;if(!o.length||!this.ranges)return this.getRange().isEqual(o);for(var r=this.ranges.length;r--;)if(!this.ranges[r].isEqual(o[r]))return!1;return!0},t})();h.prototype.setSelectionAnchor=h.prototype.setAnchor,h.prototype.getSelectionAnchor=h.prototype.getAnchor,h.prototype.setSelectionRange=h.prototype.setRange,k.implement(h.prototype,_),g.Selection=h}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(f,g,j){var k=f("./lib/report_error").reportError,x=2e3,_=(function(){function c(h){this.splitRegex,this.states=h,this.regExps={},this.matchMappings={};for(var t in this.states){for(var o=this.states[t],r=[],i=0,e=this.matchMappings[t]={defaultToken:"text"},n="g",a=[],p=0;p<o.length;p++){var v=o[p];if(v.defaultToken&&(e.defaultToken=v.defaultToken),v.caseInsensitive&&n.indexOf("i")===-1&&(n+="i"),v.unicode&&n.indexOf("u")===-1&&(n+="u"),v.regex!=null){v.regex instanceof RegExp&&(v.regex=v.regex.toString().slice(1,-1));var A=v.regex,E=new RegExp("(?:("+A+")|(.))").exec("a").length-2;Array.isArray(v.token)?v.token.length==1||E==1?v.token=v.token[0]:E-1!=v.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:v,groupCount:E-1}),v.token=v.token[0]):(v.tokenArray=v.token,v.token=null,v.onMatch=this.$arrayTokens):typeof v.token=="function"&&!v.onMatch&&(E>1?v.onMatch=this.$applyToken:v.onMatch=v.token),E>1&&(/\\\d/.test(v.regex)?A=v.regex.replace(/\\([0-9]+)/g,function(S,C){return"\\"+(parseInt(C,10)+i+1)}):(E=1,A=this.removeCapturingGroups(v.regex)),!v.splitRegex&&typeof v.token!="string"&&a.push(v)),e[i]=p,i+=E,r.push(A),v.onMatch||(v.onMatch=null)}}r.length||(e[0]=0,r.push("$")),a.forEach(function(S){S.splitRegex=this.createSplitterRegexp(S.regex,n)},this),this.regExps[t]=new RegExp("("+r.join(")|(")+")|($)",n)}}return c.prototype.$setMaxTokenCount=function(h){x=h|0},c.prototype.$applyToken=function(h){var t=this.splitRegex.exec(h).slice(1),o=this.token.apply(this,t);if(typeof o=="string")return[{type:o,value:h}];for(var r=[],i=0,e=o.length;i<e;i++)t[i]&&(r[r.length]={type:o[i],value:t[i]});return r},c.prototype.$arrayTokens=function(h){if(!h)return[];var t=this.splitRegex.exec(h);if(!t)return"text";for(var o=[],r=this.tokenArray,i=0,e=r.length;i<e;i++)t[i+1]&&(o[o.length]={type:r[i],value:t[i+1]});return o},c.prototype.removeCapturingGroups=function(h){var t=h.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(o,r){return r?"(?:":o});return t},c.prototype.createSplitterRegexp=function(h,t){if(h.indexOf("(?=")!=-1){var o=0,r=!1,i={};h.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,n,a,p,v,A){return r?r=v!="]":v?r=!0:p?(o==i.stack&&(i.end=A+1,i.stack=-1),o--):a&&(o++,a.length!=1&&(i.stack=o,i.start=A)),e}),i.end!=null&&/^\)*$/.test(h.substr(i.end))&&(h=h.substring(0,i.start)+h.substr(i.end))}return h.charAt(0)!="^"&&(h="^"+h),h.charAt(h.length-1)!="$"&&(h+="$"),new RegExp(h,(t||"").replace("g",""))},c.prototype.getLineTokens=function(h,t){if(t&&typeof t!="string"){var o=t.slice(0);t=o[0],t==="#tmp"&&(o.shift(),t=o.shift())}else var o=[];var r=t||"start",i=this.states[r];i||(r="start",i=this.states[r]);var e=this.matchMappings[r],n=this.regExps[r];n.lastIndex=0;for(var a,p=[],v=0,A=0,E={type:null,value:""};a=n.exec(h);){var S=e.defaultToken,C=null,H=a[0],U=n.lastIndex;if(U-H.length>v){var V=h.substring(v,U-H.length);E.type==S?E.value+=V:(E.type&&p.push(E),E={type:S,value:V})}for(var F=0;F<a.length-2;F++)if(a[F+1]!==void 0){C=i[e[F]],C.onMatch?S=C.onMatch(H,r,o,h):S=C.token,C.next&&(typeof C.next=="string"?r=C.next:r=C.next(r,o),i=this.states[r],i||(this.reportError("state doesn't exist",r),r="start",i=this.states[r]),e=this.matchMappings[r],v=U,n=this.regExps[r],n.lastIndex=U),C.consumeLineEnd&&(v=U);break}if(H){if(typeof S=="string")(!C||C.merge!==!1)&&E.type===S?E.value+=H:(E.type&&p.push(E),E={type:S,value:H});else if(S){E.type&&p.push(E),E={type:null,value:""};for(var F=0;F<S.length;F++)p.push(S[F])}}if(v==h.length)break;if(v=U,A++>x){for(A>2*h.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:h});v<h.length;)E.type&&p.push(E),E={value:h.substring(v,v+=500),type:"overflow"};r="start",o=[];break}}return E.type&&p.push(E),o.length>1&&o[0]!==r&&o.unshift("#tmp",r),{tokens:p,state:o.length?o:r}},c})();_.prototype.reportError=k,g.Tokenizer=_}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(f,g,j){var k=f("../lib/deep_copy").deepCopy,x;x=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(h,t){if(!t){for(var o in h)this.$rules[o]=h[o];return}for(var o in h){for(var r=h[o],i=0;i<r.length;i++){var e=r[i];(e.next||e.onMatch)&&(typeof e.next=="string"&&e.next.indexOf(t)!==0&&(e.next=t+e.next),e.nextState&&e.nextState.indexOf(t)!==0&&(e.nextState=t+e.nextState))}this.$rules[t+o]=r}},this.getRules=function(){return this.$rules},this.embedRules=function(h,t,o,r,i){var e=typeof h=="function"?new h().getRules():h;if(r)for(var n=0;n<r.length;n++)r[n]=t+r[n];else{r=[];for(var a in e)r.push(t+a)}if(this.addRules(e,t),o)for(var p=Array.prototype[i?"push":"unshift"],n=0;n<r.length;n++)p.apply(this.$rules[r[n]],k(o));this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};var _=function(h,t){return(h!="start"||t.length)&&t.unshift(this.nextState,h),this.nextState},c=function(h,t){return t.shift(),t.shift()||"start"};this.normalizeRules=function(){var h=0,t=this.$rules;function o(r){var i=t[r];i.processed=!0;for(var e=0;e<i.length;e++){var n=i[e],a=null;Array.isArray(n)&&(a=n,n={}),!n.regex&&n.start&&(n.regex=n.start,n.next||(n.next=[]),n.next.push({defaultToken:n.token},{token:n.token+".end",regex:n.end||n.start,next:"pop"}),n.token=n.token+".start",n.push=!0);var p=n.next||n.push;if(p&&Array.isArray(p)){var v=n.stateName;v||(v=n.token,typeof v!="string"&&(v=v[0]||""),t[v]&&(v+=h++)),t[v]=p,n.next=v,o(v)}else p=="pop"&&(n.next=c);if(n.push&&(n.nextState=n.next||n.push,n.next=_,delete n.push),n.rules)for(var A in n.rules)t[A]?t[A].push&&t[A].push.apply(t[A],n.rules[A]):t[A]=n.rules[A];var E=typeof n=="string"?n:n.include;if(E&&(E==="$self"&&(E="start"),Array.isArray(E)?a=E.map(function(C){return t[C]}):a=t[E]),a){var S=[e,1].concat(a);n.noEscape&&(S=S.filter(function(C){return!C.next})),i.splice.apply(i,S),e--}n.keywordMap&&(n.token=this.createKeywordMapper(n.keywordMap,n.defaultToken||"text",n.caseInsensitive),delete n.defaultToken)}}Object.keys(t).forEach(o,this)},this.createKeywordMapper=function(h,t,o,r){var i=Object.create(null);return this.$keywordList=[],Object.keys(h).forEach(function(e){for(var n=h[e],a=n.split(r||"|"),p=a.length;p--;){var v=a[p];this.$keywordList.push(v),o&&(v=v.toLowerCase()),i[v]=e}},this),h=null,o?function(e){return i[e.toLowerCase()]||t}:function(e){return i[e]||t}},this.getKeywords=function(){return this.$keywords}}).call(x.prototype),g.TextHighlightRules=x}),ace.define("ace/mode/behaviour",["require","exports","module"],function(f,g,j){var k;k=function(){this.$behaviours={}},(function(){this.add=function(x,_,c){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[x]:this.$behaviours[x]={}}this.$behaviours[x][_]=c},this.addBehaviours=function(x){for(var _ in x)for(var c in x[_])this.add(_,c,x[_][c])},this.remove=function(x){this.$behaviours&&this.$behaviours[x]&&delete this.$behaviours[x]},this.inherit=function(x,_){if(typeof x=="function")var c=new x().getBehaviours(_);else var c=x.getBehaviours(_);this.addBehaviours(c)},this.getBehaviours=function(x){if(x){for(var _={},c=0;c<x.length;c++)this.$behaviours[x[c]]&&(_[x[c]]=this.$behaviours[x[c]]);return _}else return this.$behaviours}}).call(k.prototype),g.Behaviour=k}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(f,g,j){var k=f("./range").Range,x=(function(){function _(c,h,t){this.$session=c,this.$row=h,this.$rowTokens=c.getTokens(h);var o=c.getTokenAt(h,t);this.$tokenIndex=o?o.index:-1}return _.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},_.prototype.stepForward=function(){this.$tokenIndex+=1;for(var c;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,c||(c=this.$session.getLength()),this.$row>=c)return this.$row=c-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},_.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},_.prototype.getCurrentTokenRow=function(){return this.$row},_.prototype.getCurrentTokenColumn=function(){var c=this.$rowTokens,h=this.$tokenIndex,t=c[h].start;if(t!==void 0)return t;for(t=0;h>0;)h-=1,t+=c[h].value.length;return t},_.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},_.prototype.getCurrentTokenRange=function(){var c=this.$rowTokens[this.$tokenIndex],h=this.getCurrentTokenColumn();return new k(this.$row,h,this.$row,h+c.value.length)},_})();g.TokenIterator=x}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(f,g,j){var k=f("../../lib/oop"),x=f("../behaviour").Behaviour,_=f("../../token_iterator").TokenIterator,c=f("../../lib/lang"),h=["text","paren.rparen","rparen","paren","punctuation.operator"],t=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],o,r={},i={'"':'"',"'":"'"},e=function(p){var v=-1;if(p.multiSelect&&(v=p.selection.index,r.rangeCount!=p.multiSelect.rangeCount&&(r={rangeCount:p.multiSelect.rangeCount})),r[v])return o=r[v];o=r[v]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},n=function(p,v,A,E){var S=p.end.row-p.start.row;return{text:A+v+E,selection:[0,p.start.column+1,S,p.end.column+(S?0:1)]}},a;a=function(p){p=p||{},this.add("braces","insertion",function(v,A,E,S,C){var H=E.getCursorPosition(),U=S.doc.getLine(H.row);if(C=="{"){e(E);var V=E.getSelectionRange(),F=S.doc.getTextRange(V),he=S.getTokenAt(H.row,H.column);if(F!==""&&F!=="{"&&E.getWrapBehavioursEnabled())return n(V,F,"{","}");if(he&&/(?:string)\.quasi|\.xml/.test(he.type)){var P=[/tag\-(?:open|name)/,/attribute\-name/];return P.some(function(ue){return ue.test(he.type)})||/(string)\.quasi/.test(he.type)&&he.value[H.column-he.start-1]!=="$"?void 0:(a.recordAutoInsert(E,S,"}"),{text:"{}",selection:[1,1]})}else if(a.isSaneInsertion(E,S))return/[\]\}\)]/.test(U[H.column])||E.inMultiSelectMode||p.braces?(a.recordAutoInsert(E,S,"}"),{text:"{}",selection:[1,1]}):(a.recordMaybeInsert(E,S,"{"),{text:"{",selection:[1,1]})}else if(C=="}"){e(E);var O=U.substring(H.column,H.column+1);if(O=="}"){var b=S.$findOpeningBracket("}",{column:H.column+1,row:H.row});if(b!==null&&a.isAutoInsertedClosing(H,U,C))return a.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(C==`
|
183
|
+
`||C==`\r
|
184
|
+
`){e(E);var y="";a.isMaybeInsertedClosing(H,U)&&(y=c.stringRepeat("}",o.maybeInsertedBrackets),a.clearMaybeInsertedClosing());var O=U.substring(H.column,H.column+1);if(O==="}"){var T=S.findMatchingBracket({row:H.row,column:H.column+1},"}");if(!T)return null;var G=this.$getIndent(S.getLine(T.row))}else if(y)var G=this.$getIndent(U);else{a.clearMaybeInsertedClosing();return}var q=G+S.getTabString();return{text:`
|
185
|
+
`+q+`
|
186
|
+
`+G+y,selection:[1,q.length,1,q.length]}}else a.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(v,A,E,S,C){var H=S.doc.getTextRange(C);if(!C.isMultiLine()&&H=="{"){e(E);var U=S.doc.getLine(C.start.row),V=U.substring(C.end.column,C.end.column+1);if(V=="}")return C.end.column++,C;o.maybeInsertedBrackets--}}),this.add("parens","insertion",function(v,A,E,S,C){if(C=="("){e(E);var H=E.getSelectionRange(),U=S.doc.getTextRange(H);if(U!==""&&E.getWrapBehavioursEnabled())return n(H,U,"(",")");if(a.isSaneInsertion(E,S))return a.recordAutoInsert(E,S,")"),{text:"()",selection:[1,1]}}else if(C==")"){e(E);var V=E.getCursorPosition(),F=S.doc.getLine(V.row),he=F.substring(V.column,V.column+1);if(he==")"){var P=S.$findOpeningBracket(")",{column:V.column+1,row:V.row});if(P!==null&&a.isAutoInsertedClosing(V,F,C))return a.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(v,A,E,S,C){var H=S.doc.getTextRange(C);if(!C.isMultiLine()&&H=="("){e(E);var U=S.doc.getLine(C.start.row),V=U.substring(C.start.column+1,C.start.column+2);if(V==")")return C.end.column++,C}}),this.add("brackets","insertion",function(v,A,E,S,C){if(C=="["){e(E);var H=E.getSelectionRange(),U=S.doc.getTextRange(H);if(U!==""&&E.getWrapBehavioursEnabled())return n(H,U,"[","]");if(a.isSaneInsertion(E,S))return a.recordAutoInsert(E,S,"]"),{text:"[]",selection:[1,1]}}else if(C=="]"){e(E);var V=E.getCursorPosition(),F=S.doc.getLine(V.row),he=F.substring(V.column,V.column+1);if(he=="]"){var P=S.$findOpeningBracket("]",{column:V.column+1,row:V.row});if(P!==null&&a.isAutoInsertedClosing(V,F,C))return a.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(v,A,E,S,C){var H=S.doc.getTextRange(C);if(!C.isMultiLine()&&H=="["){e(E);var U=S.doc.getLine(C.start.row),V=U.substring(C.start.column+1,C.start.column+2);if(V=="]")return C.end.column++,C}}),this.add("string_dquotes","insertion",function(v,A,E,S,C){var H=S.$mode.$quotes||i;if(C.length==1&&H[C]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(C)!=-1)return;e(E);var U=C,V=E.getSelectionRange(),F=S.doc.getTextRange(V);if(F!==""&&(F.length!=1||!H[F])&&E.getWrapBehavioursEnabled())return n(V,F,U,U);if(!F){var he=E.getCursorPosition(),P=S.doc.getLine(he.row),O=P.substring(he.column-1,he.column),b=P.substring(he.column,he.column+1),y=S.getTokenAt(he.row,he.column),T=S.getTokenAt(he.row,he.column+1);if(O=="\\"&&y&&/escape/.test(y.type))return null;var G=y&&/string|escape/.test(y.type),q=!T||/string|escape/.test(T.type),ue;if(b==U)ue=G!==q,ue&&/string\.end/.test(T.type)&&(ue=!1);else{if(G&&!q||G&&q)return null;var Ce=S.$mode.tokenRe;Ce.lastIndex=0;var Oe=Ce.test(O);Ce.lastIndex=0;var gt=Ce.test(b),ze=S.$mode.$pairQuotesAfter,Xe=ze&&ze[U]&&ze[U].test(O);if(!Xe&&Oe||gt||b&&!/[\s;,.})\]\\]/.test(b))return null;var ft=P[he.column-2];if(O==U&&(ft==U||Ce.test(ft)))return null;ue=!0}return{text:ue?U+U:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(v,A,E,S,C){var H=S.$mode.$quotes||i,U=S.doc.getTextRange(C);if(!C.isMultiLine()&&H.hasOwnProperty(U)){e(E);var V=S.doc.getLine(C.start.row),F=V.substring(C.start.column+1,C.start.column+2);if(F==U)return C.end.column++,C}}),p.closeDocComment!==!1&&this.add("doc comment end","insertion",function(v,A,E,S,C){if(v==="doc-start"&&(C===`
|
187
|
+
`||C===`\r
|
188
|
+
`)&&E.selection.isEmpty()){var H=E.getCursorPosition();if(H.column===0)return;for(var U=S.doc.getLine(H.row),V=S.doc.getLine(H.row+1),F=S.getTokens(H.row),he=0,P=0;P<F.length;P++){he+=F[P].value.length;var O=F[P];if(he>=H.column){if(he===H.column){if(!/\.doc/.test(O.type))return;if(/\*\//.test(O.value)){var b=F[P+1];if(!b||!/\.doc/.test(b.type))return}}var y=H.column-(he-O.value.length),T=O.value.indexOf("*/"),G=O.value.indexOf("/**",T>-1?T+2:0);if(G!==-1&&y>G&&y<G+3||T!==-1&&G!==-1&&y>=T&&y<=G||!/\.doc/.test(O.type))return;break}}var q=this.$getIndent(U);if(/\s*\*/.test(V))return/^\s*\*/.test(U)?{text:C+q+"* ",selection:[1,2+q.length,1,2+q.length]}:{text:C+q+" * ",selection:[1,3+q.length,1,3+q.length]};if(/\/\*\*/.test(U.substring(0,H.column)))return{text:C+q+" * "+C+" "+q+"*/",selection:[1,4+q.length,1,4+q.length]}}})},a.isSaneInsertion=function(p,v){var A=p.getCursorPosition(),E=new _(v,A.row,A.column);if(!this.$matchTokenType(E.getCurrentToken()||"text",h)){if(/[)}\]]/.test(p.session.getLine(A.row)[A.column]))return!0;var S=new _(v,A.row,A.column+1);if(!this.$matchTokenType(S.getCurrentToken()||"text",h))return!1}return E.stepForward(),E.getCurrentTokenRow()!==A.row||this.$matchTokenType(E.getCurrentToken()||"text",t)},a.$matchTokenType=function(p,v){return v.indexOf(p.type||p)>-1},a.recordAutoInsert=function(p,v,A){var E=p.getCursorPosition(),S=v.doc.getLine(E.row);this.isAutoInsertedClosing(E,S,o.autoInsertedLineEnd[0])||(o.autoInsertedBrackets=0),o.autoInsertedRow=E.row,o.autoInsertedLineEnd=A+S.substr(E.column),o.autoInsertedBrackets++},a.recordMaybeInsert=function(p,v,A){var E=p.getCursorPosition(),S=v.doc.getLine(E.row);this.isMaybeInsertedClosing(E,S)||(o.maybeInsertedBrackets=0),o.maybeInsertedRow=E.row,o.maybeInsertedLineStart=S.substr(0,E.column)+A,o.maybeInsertedLineEnd=S.substr(E.column),o.maybeInsertedBrackets++},a.isAutoInsertedClosing=function(p,v,A){return o.autoInsertedBrackets>0&&p.row===o.autoInsertedRow&&A===o.autoInsertedLineEnd[0]&&v.substr(p.column)===o.autoInsertedLineEnd},a.isMaybeInsertedClosing=function(p,v){return o.maybeInsertedBrackets>0&&p.row===o.maybeInsertedRow&&v.substr(p.column)===o.maybeInsertedLineEnd&&v.substr(0,p.column)==o.maybeInsertedLineStart},a.popAutoInsertedClosing=function(){o.autoInsertedLineEnd=o.autoInsertedLineEnd.substr(1),o.autoInsertedBrackets--},a.clearMaybeInsertedClosing=function(){o&&(o.maybeInsertedBrackets=0,o.maybeInsertedRow=-1)},k.inherits(a,x),g.CstyleBehaviour=a}),ace.define("ace/unicode",["require","exports","module"],function(f,g,j){for(var k=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],x=0,_=[],c=0;c<k.length;c+=2)_.push(x+=k[c]),k[c+1]&&_.push(45,x+=k[c+1]);g.wordChars=String.fromCharCode.apply(null,_)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(f,g,j){var k=f("../config"),x=f("../tokenizer").Tokenizer,_=f("./text_highlight_rules").TextHighlightRules,c=f("./behaviour/cstyle").CstyleBehaviour,h=f("../unicode"),t=f("../lib/lang"),o=f("../token_iterator").TokenIterator,r=f("../range").Range,i;i=function(){this.HighlightRules=_},(function(){this.$defaultBehaviour=new c,this.tokenRe=new RegExp("^["+h.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+h.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new x(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,n,a,p){var v=n.doc,A=!0,E=!0,S=1/0,C=n.getTabSize(),H=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var F=this.lineCommentStart.map(t.escapeRegExp).join("|"),U=this.lineCommentStart[0];else var F=t.escapeRegExp(this.lineCommentStart),U=this.lineCommentStart;F=new RegExp("^(\\s*)(?:"+F+") ?"),H=n.getUseSoftTabs();var O=function(gt,ze){var Xe=gt.match(F);if(Xe){var ft=Xe[1].length,pt=Xe[0].length;!T(gt,ft,pt)&&Xe[0][pt-1]==" "&&pt--,v.removeInLine(ze,ft,pt)}},y=U+" ",P=function(gt,ze){(!A||/\S/.test(gt))&&(T(gt,S,S)?v.insertInLine({row:ze,column:S},y):v.insertInLine({row:ze,column:S},U))},b=function(gt,ze){return F.test(gt)},T=function(gt,ze,Xe){for(var ft=0;ze--&>.charAt(ze)==" ";)ft++;if(ft%C!=0)return!1;for(var ft=0;gt.charAt(Xe++)==" ";)ft++;return C>2?ft%C!=C-1:ft%C==0}}else{if(!this.blockComment)return!1;var U=this.blockComment.start,V=this.blockComment.end,F=new RegExp("^(\\s*)(?:"+t.escapeRegExp(U)+")"),he=new RegExp("(?:"+t.escapeRegExp(V)+")\\s*$"),P=function(ue,Ce){b(ue,Ce)||(!A||/\S/.test(ue))&&(v.insertInLine({row:Ce,column:ue.length},V),v.insertInLine({row:Ce,column:S},U))},O=function(ue,Ce){var Oe;(Oe=ue.match(he))&&v.removeInLine(Ce,ue.length-Oe[0].length,ue.length),(Oe=ue.match(F))&&v.removeInLine(Ce,Oe[1].length,Oe[0].length)},b=function(ue,Ce){if(F.test(ue))return!0;for(var Oe=n.getTokens(Ce),gt=0;gt<Oe.length;gt++)if(Oe[gt].type==="comment")return!0}}function G(ue){for(var Ce=a;Ce<=p;Ce++)ue(v.getLine(Ce),Ce)}var q=1/0;G(function(ue,Ce){var Oe=ue.search(/\S/);Oe!==-1?(Oe<S&&(S=Oe),E&&!b(ue,Ce)&&(E=!1)):q>ue.length&&(q=ue.length)}),S==1/0&&(S=q,A=!1,E=!1),H&&S%C!=0&&(S=Math.floor(S/C)*C),G(E?O:P)},this.toggleBlockComment=function(e,n,a,p){var v=this.blockComment;if(v){!v.start&&v[0]&&(v=v[0]);var A=new o(n,p.row,p.column),E=A.getCurrentToken();n.selection;var S=n.selection.toOrientedRange(),C,H;if(E&&/comment/.test(E.type)){for(var U,V;E&&/comment/.test(E.type);){var F=E.value.indexOf(v.start);if(F!=-1){var he=A.getCurrentTokenRow(),P=A.getCurrentTokenColumn()+F;U=new r(he,P,he,P+v.start.length);break}E=A.stepBackward()}for(var A=new o(n,p.row,p.column),E=A.getCurrentToken();E&&/comment/.test(E.type);){var F=E.value.indexOf(v.end);if(F!=-1){var he=A.getCurrentTokenRow(),P=A.getCurrentTokenColumn()+F;V=new r(he,P,he,P+v.end.length);break}E=A.stepForward()}V&&n.remove(V),U&&(n.remove(U),C=U.start.row,H=-v.start.length)}else H=v.start.length,C=a.start.row,n.insert(a.end,v.end),n.insert(a.start,v.start);S.start.row==C&&(S.start.column+=H),S.end.row==C&&(S.end.column+=H),n.selection.fromOrientedRange(S)}},this.getNextLineIndent=function(e,n,a){return this.$getIndent(n)},this.checkOutdent=function(e,n,a){return!1},this.autoOutdent=function(e,n,a){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){this.$embeds=[],this.$modes={};for(var n in e)if(e[n]){var a=e[n],p=a.prototype.$id,v=k.$modes[p];v||(k.$modes[p]=v=new a),k.$modes[n]||(k.$modes[n]=v),this.$embeds.push(n),this.$modes[n]=v}for(var A=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],E=function(C){(function(H){var U=A[C],V=H[U];H[A[C]]=function(){return this.$delegator(U,arguments,V)}})(S)},S=this,n=0;n<A.length;n++)E(n)},this.$delegator=function(e,n,a){var p=n[0]||"start";if(typeof p!="string"){if(Array.isArray(p[2])){var v=p[2][p[2].length-1],A=this.$modes[v];if(A)return A[e].apply(A,[p[1]].concat([].slice.call(n,1)))}p=p[0]||"start"}for(var E=0;E<this.$embeds.length;E++)if(this.$modes[this.$embeds[E]]){var S=p.split(this.$embeds[E]);if(!S[0]&&S[1]){n[0]=S[1];var A=this.$modes[this.$embeds[E]];return A[e].apply(A,n)}}var C=a.apply(this,n);return a?C:void 0},this.transformAction=function(e,n,a,p,v){if(this.$behaviour){var A=this.$behaviour.getBehaviours();for(var E in A)if(A[E][n]){var S=A[E][n].apply(this,arguments);if(S)return S}}},this.getKeywords=function(e){if(!this.completionKeywords){var n=this.$tokenizer.rules,a=[];for(var p in n)for(var v=n[p],A=0,E=v.length;A<E;A++)if(typeof v[A].token=="string")/keyword|support|storage/.test(v[A].token)&&a.push(v[A].regex);else if(typeof v[A].token=="object"){for(var S=0,C=v[A].token.length;S<C;S++)if(/keyword|support|storage/.test(v[A].token[S])){var p=v[A].regex.match(/\(.+?\)/g)[S];a.push(p.substr(1,p.length-2))}}this.completionKeywords=a}return e?a.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,n,a,p){var v=this.$keywordList||this.$createKeywordList();return v.map(function(A){return{name:A,value:A,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(i.prototype),g.Mode=i}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(f,g,j){var k=f("./lib/dom"),x=(function(){function _(c){this.session=c,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return _.prototype.getRowLength=function(c){var h;return this.lineWidgets?h=this.lineWidgets[c]&&this.lineWidgets[c].rowCount||0:h=0,!this.$useWrapMode||!this.$wrapData[c]?1+h:this.$wrapData[c].length+1+h},_.prototype.$getWidgetScreenLength=function(){var c=0;return this.lineWidgets.forEach(function(h){h&&h.rowCount&&!h.hidden&&(c+=h.rowCount)}),c},_.prototype.$onChangeEditor=function(c){this.attach(c.editor)},_.prototype.attach=function(c){c&&c.widgetManager&&c.widgetManager!=this&&c.widgetManager.detach(),this.editor!=c&&(this.detach(),this.editor=c,c&&(c.widgetManager=this,c.renderer.on("beforeRender",this.measureWidgets),c.renderer.on("afterRender",this.renderWidgets)))},_.prototype.detach=function(c){var h=this.editor;if(h){this.editor=null,h.widgetManager=null,h.renderer.off("beforeRender",this.measureWidgets),h.renderer.off("afterRender",this.renderWidgets);var t=this.session.lineWidgets;t&&t.forEach(function(o){o&&o.el&&o.el.parentNode&&(o._inDocument=!1,o.el.parentNode.removeChild(o.el))})}},_.prototype.updateOnFold=function(c,h){var t=h.lineWidgets;if(!(!t||!c.action)){for(var o=c.data,r=o.start.row,i=o.end.row,e=c.action=="add",n=r+1;n<i;n++)t[n]&&(t[n].hidden=e);t[i]&&(e?t[r]?t[i].hidden=e:t[r]=t[i]:(t[r]==t[i]&&(t[r]=void 0),t[i].hidden=e))}},_.prototype.updateOnChange=function(c){var h=this.session.lineWidgets;if(h){var t=c.start.row,o=c.end.row-t;if(o!==0)if(c.action=="remove"){var r=h.splice(t+1,o);!h[t]&&r[r.length-1]&&(h[t]=r.pop()),r.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var i=new Array(o);h[t]&&h[t].column!=null&&c.start.column>h[t].column&&t++,i.unshift(t,0),h.splice.apply(h,i),this.$updateRows()}}},_.prototype.$updateRows=function(){var c=this.session.lineWidgets;if(c){var h=!0;c.forEach(function(t,o){if(t)for(h=!1,t.row=o;t.$oldWidget;)t.$oldWidget.row=o,t=t.$oldWidget}),h&&(this.session.lineWidgets=null)}},_.prototype.$registerLineWidget=function(c){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var h=this.session.lineWidgets[c.row];return h&&(c.$oldWidget=h,h.el&&h.el.parentNode&&(h.el.parentNode.removeChild(h.el),h._inDocument=!1)),this.session.lineWidgets[c.row]=c,c},_.prototype.addLineWidget=function(c){if(this.$registerLineWidget(c),c.session=this.session,!this.editor)return c;var h=this.editor.renderer;c.html&&!c.el&&(c.el=k.createElement("div"),c.el.innerHTML=c.html),c.text&&!c.el&&(c.el=k.createElement("div"),c.el.textContent=c.text),c.el&&(k.addCssClass(c.el,"ace_lineWidgetContainer"),c.className&&k.addCssClass(c.el,c.className),c.el.style.position="absolute",c.el.style.zIndex="5",h.container.appendChild(c.el),c._inDocument=!0,c.coverGutter||(c.el.style.zIndex="3"),c.pixelHeight==null&&(c.pixelHeight=c.el.offsetHeight)),c.rowCount==null&&(c.rowCount=c.pixelHeight/h.layerConfig.lineHeight);var t=this.session.getFoldAt(c.row,0);if(c.$fold=t,t){var o=this.session.lineWidgets;c.row==t.end.row&&!o[t.start.row]?o[t.start.row]=c:c.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:c.row}}}),this.$updateRows(),this.renderWidgets(null,h),this.onWidgetChanged(c),c},_.prototype.removeLineWidget=function(c){if(c._inDocument=!1,c.session=null,c.el&&c.el.parentNode&&c.el.parentNode.removeChild(c.el),c.editor&&c.editor.destroy)try{c.editor.destroy()}catch{}if(this.session.lineWidgets){var h=this.session.lineWidgets[c.row];if(h==c)this.session.lineWidgets[c.row]=c.$oldWidget,c.$oldWidget&&this.onWidgetChanged(c.$oldWidget);else for(;h;){if(h.$oldWidget==c){h.$oldWidget=c.$oldWidget;break}h=h.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:c.row}}}),this.$updateRows()},_.prototype.getWidgetsAtRow=function(c){for(var h=this.session.lineWidgets,t=h&&h[c],o=[];t;)o.push(t),t=t.$oldWidget;return o},_.prototype.onWidgetChanged=function(c){this.session._changedWidgets.push(c),this.editor&&this.editor.renderer.updateFull()},_.prototype.measureWidgets=function(c,h){var t=this.session._changedWidgets,o=h.layerConfig;if(!(!t||!t.length)){for(var r=1/0,i=0;i<t.length;i++){var e=t[i];if(!(!e||!e.el)&&e.session==this.session){if(!e._inDocument){if(this.session.lineWidgets[e.row]!=e)continue;e._inDocument=!0,h.container.appendChild(e.el)}e.h=e.el.offsetHeight,e.fixedWidth||(e.w=e.el.offsetWidth,e.screenWidth=Math.ceil(e.w/o.characterWidth));var n=e.h/o.lineHeight;e.coverLine&&(n-=this.session.getRowLineCount(e.row),n<0&&(n=0)),e.rowCount!=n&&(e.rowCount=n,e.row<r&&(r=e.row))}}r!=1/0&&(this.session._emit("changeFold",{data:{start:{row:r}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},_.prototype.renderWidgets=function(c,h){var t=h.layerConfig,o=this.session.lineWidgets;if(o){for(var r=Math.min(this.firstRow,t.firstRow),i=Math.max(this.lastRow,t.lastRow,o.length);r>0&&!o[r];)r--;this.firstRow=t.firstRow,this.lastRow=t.lastRow,h.$cursorLayer.config=t;for(var e=r;e<=i;e++){var n=o[e];if(!(!n||!n.el)){if(n.hidden){n.el.style.top=-100-(n.pixelHeight||0)+"px";continue}n._inDocument||(n._inDocument=!0,h.container.appendChild(n.el));var a=h.$cursorLayer.getPixelPosition({row:e,column:0},!0).top;n.coverLine||(a+=t.lineHeight*this.session.getRowLineCount(n.row)),n.el.style.top=a-t.offset+"px";var p=n.coverGutter?0:h.gutterWidth;n.fixedWidth||(p-=h.scrollLeft),n.el.style.left=p+"px",n.fullWidth&&n.screenWidth&&(n.el.style.minWidth=t.width+2*t.padding+"px"),n.fixedWidth?n.el.style.right=h.scrollBar.getWidth()+"px":n.el.style.right=""}}}},_})();g.LineWidgets=x}),ace.define("ace/apply_delta",["require","exports","module"],function(f,g,j){g.applyDelta=function(k,x,_){var c=x.start.row,h=x.start.column,t=k[c]||"";switch(x.action){case"insert":var o=x.lines;if(o.length===1)k[c]=t.substring(0,h)+x.lines[0]+t.substring(h);else{var r=[c,1].concat(x.lines);k.splice.apply(k,r),k[c]=t.substring(0,h)+k[c],k[c+x.lines.length-1]+=t.substring(h)}break;case"remove":var i=x.end.column,e=x.end.row;c===e?k[c]=t.substring(0,h)+t.substring(i):k.splice(c,e-c+1,t.substring(0,h)+k[e].substring(i));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(f,g,j){var k=f("./lib/oop"),x=f("./lib/event_emitter").EventEmitter,_=(function(){function t(o,r,i){this.$onChange=this.onChange.bind(this),this.attach(o),typeof r!="number"?this.setPosition(r.row,r.column):this.setPosition(r,i)}return t.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},t.prototype.getDocument=function(){return this.document},t.prototype.onChange=function(o){if(!(o.start.row==o.end.row&&o.start.row!=this.row)&&!(o.start.row>this.row)){var r=h(o,{row:this.row,column:this.column},this.$insertRight);this.setPosition(r.row,r.column,!0)}},t.prototype.setPosition=function(o,r,i){var e;if(i?e={row:o,column:r}:e=this.$clipPositionToDocument(o,r),!(this.row==e.row&&this.column==e.column)){var n={row:this.row,column:this.column};this.row=e.row,this.column=e.column,this._signal("change",{old:n,value:e})}},t.prototype.detach=function(){this.document.off("change",this.$onChange)},t.prototype.attach=function(o){this.document=o||this.document,this.document.on("change",this.$onChange)},t.prototype.$clipPositionToDocument=function(o,r){var i={};return o>=this.document.getLength()?(i.row=Math.max(0,this.document.getLength()-1),i.column=this.document.getLine(i.row).length):o<0?(i.row=0,i.column=0):(i.row=o,i.column=Math.min(this.document.getLine(i.row).length,Math.max(0,r))),r<0&&(i.column=0),i},t})();_.prototype.$insertRight=!1,k.implement(_.prototype,x);function c(t,o,r){var i=r?t.column<=o.column:t.column<o.column;return t.row<o.row||t.row==o.row&&i}function h(t,o,r){var i=t.action=="insert",e=(i?1:-1)*(t.end.row-t.start.row),n=(i?1:-1)*(t.end.column-t.start.column),a=t.start,p=i?a:t.end;return c(o,a,r)?{row:o.row,column:o.column}:c(p,o,!r)?{row:o.row+e,column:o.column+(o.row==p.row?n:0)}:{row:a.row,column:a.column}}g.Anchor=_}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(f,g,j){var k=f("./lib/oop"),x=f("./apply_delta").applyDelta,_=f("./lib/event_emitter").EventEmitter,c=f("./range").Range,h=f("./anchor").Anchor,t=(function(){function o(r){this.$lines=[""],r.length===0?this.$lines=[""]:Array.isArray(r)?this.insertMergedLines({row:0,column:0},r):this.insert({row:0,column:0},r)}return o.prototype.setValue=function(r){var i=this.getLength()-1;this.remove(new c(0,0,i,this.getLine(i).length)),this.insert({row:0,column:0},r||"")},o.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},o.prototype.createAnchor=function(r,i){return new h(this,r,i)},o.prototype.$detectNewLine=function(r){var i=r.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=i?i[1]:`
|
189
|
+
`,this._signal("changeNewLineMode")},o.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
|
190
|
+
`;case"unix":return`
|
191
|
+
`;default:return this.$autoNewLine||`
|
192
|
+
`}},o.prototype.setNewLineMode=function(r){this.$newLineMode!==r&&(this.$newLineMode=r,this._signal("changeNewLineMode"))},o.prototype.getNewLineMode=function(){return this.$newLineMode},o.prototype.isNewLine=function(r){return r==`\r
|
193
|
+
`||r=="\r"||r==`
|
194
|
+
`},o.prototype.getLine=function(r){return this.$lines[r]||""},o.prototype.getLines=function(r,i){return this.$lines.slice(r,i+1)},o.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},o.prototype.getLength=function(){return this.$lines.length},o.prototype.getTextRange=function(r){return this.getLinesForRange(r).join(this.getNewLineCharacter())},o.prototype.getLinesForRange=function(r){var i;if(r.start.row===r.end.row)i=[this.getLine(r.start.row).substring(r.start.column,r.end.column)];else{i=this.getLines(r.start.row,r.end.row),i[0]=(i[0]||"").substring(r.start.column);var e=i.length-1;r.end.row-r.start.row==e&&(i[e]=i[e].substring(0,r.end.column))}return i},o.prototype.insertLines=function(r,i){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(r,i)},o.prototype.removeLines=function(r,i){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(r,i)},o.prototype.insertNewLine=function(r){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(r,["",""])},o.prototype.insert=function(r,i){return this.getLength()<=1&&this.$detectNewLine(i),this.insertMergedLines(r,this.$split(i))},o.prototype.insertInLine=function(r,i){var e=this.clippedPos(r.row,r.column),n=this.pos(r.row,r.column+i.length);return this.applyDelta({start:e,end:n,action:"insert",lines:[i]},!0),this.clonePos(n)},o.prototype.clippedPos=function(r,i){var e=this.getLength();r===void 0?r=e:r<0?r=0:r>=e&&(r=e-1,i=void 0);var n=this.getLine(r);return i==null&&(i=n.length),i=Math.min(Math.max(i,0),n.length),{row:r,column:i}},o.prototype.clonePos=function(r){return{row:r.row,column:r.column}},o.prototype.pos=function(r,i){return{row:r,column:i}},o.prototype.$clipPosition=function(r){var i=this.getLength();return r.row>=i?(r.row=Math.max(0,i-1),r.column=this.getLine(i-1).length):(r.row=Math.max(0,r.row),r.column=Math.min(Math.max(r.column,0),this.getLine(r.row).length)),r},o.prototype.insertFullLines=function(r,i){r=Math.min(Math.max(r,0),this.getLength());var e=0;r<this.getLength()?(i=i.concat([""]),e=0):(i=[""].concat(i),r--,e=this.$lines[r].length),this.insertMergedLines({row:r,column:e},i)},o.prototype.insertMergedLines=function(r,i){var e=this.clippedPos(r.row,r.column),n={row:e.row+i.length-1,column:(i.length==1?e.column:0)+i[i.length-1].length};return this.applyDelta({start:e,end:n,action:"insert",lines:i}),this.clonePos(n)},o.prototype.remove=function(r){var i=this.clippedPos(r.start.row,r.start.column),e=this.clippedPos(r.end.row,r.end.column);return this.applyDelta({start:i,end:e,action:"remove",lines:this.getLinesForRange({start:i,end:e})}),this.clonePos(i)},o.prototype.removeInLine=function(r,i,e){var n=this.clippedPos(r,i),a=this.clippedPos(r,e);return this.applyDelta({start:n,end:a,action:"remove",lines:this.getLinesForRange({start:n,end:a})},!0),this.clonePos(n)},o.prototype.removeFullLines=function(r,i){r=Math.min(Math.max(0,r),this.getLength()-1),i=Math.min(Math.max(0,i),this.getLength()-1);var e=i==this.getLength()-1&&r>0,n=i<this.getLength()-1,a=e?r-1:r,p=e?this.getLine(a).length:0,v=n?i+1:i,A=n?0:this.getLine(v).length,E=new c(a,p,v,A),S=this.$lines.slice(r,i+1);return this.applyDelta({start:E.start,end:E.end,action:"remove",lines:this.getLinesForRange(E)}),S},o.prototype.removeNewLine=function(r){r<this.getLength()-1&&r>=0&&this.applyDelta({start:this.pos(r,this.getLine(r).length),end:this.pos(r+1,0),action:"remove",lines:["",""]})},o.prototype.replace=function(r,i){if(r instanceof c||(r=c.fromPoints(r.start,r.end)),i.length===0&&r.isEmpty())return r.start;if(i==this.getTextRange(r))return r.end;this.remove(r);var e;return i?e=this.insert(r.start,i):e=r.start,e},o.prototype.applyDeltas=function(r){for(var i=0;i<r.length;i++)this.applyDelta(r[i])},o.prototype.revertDeltas=function(r){for(var i=r.length-1;i>=0;i--)this.revertDelta(r[i])},o.prototype.applyDelta=function(r,i){var e=r.action=="insert";(e?r.lines.length<=1&&!r.lines[0]:!c.comparePoints(r.start,r.end))||(e&&r.lines.length>2e4?this.$splitAndapplyLargeDelta(r,2e4):(x(this.$lines,r,i),this._signal("change",r)))},o.prototype.$safeApplyDelta=function(r){var i=this.$lines.length;(r.action=="remove"&&r.start.row<i&&r.end.row<i||r.action=="insert"&&r.start.row<=i)&&this.applyDelta(r)},o.prototype.$splitAndapplyLargeDelta=function(r,i){for(var e=r.lines,n=e.length-i+1,a=r.start.row,p=r.start.column,v=0,A=0;v<n;v=A){A+=i-1;var E=e.slice(v,A);E.push(""),this.applyDelta({start:this.pos(a+v,p),end:this.pos(a+A,p=0),action:r.action,lines:E},!0)}r.lines=e.slice(v),r.start.row=a+v,r.start.column=p,this.applyDelta(r,!0)},o.prototype.revertDelta=function(r){this.$safeApplyDelta({start:this.clonePos(r.start),end:this.clonePos(r.end),action:r.action=="insert"?"remove":"insert",lines:r.lines.slice()})},o.prototype.indexToPosition=function(r,i){for(var e=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,a=i||0,p=e.length;a<p;a++)if(r-=e[a].length+n,r<0)return{row:a,column:r+e[a].length+n};return{row:p-1,column:r+e[p-1].length+n}},o.prototype.positionToIndex=function(r,i){for(var e=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,a=0,p=Math.min(r.row,e.length),v=i||0;v<p;++v)a+=e[v].length+n;return a+r.column},o.prototype.$split=function(r){return r.split(/\r\n|\r|\n/)},o})();t.prototype.$autoNewLine="",t.prototype.$newLineMode="auto",k.implement(t.prototype,_),g.Document=t}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(f,g,j){var k=f("./lib/oop"),x=f("./lib/event_emitter").EventEmitter,_=(function(){function c(h,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=h;var o=this;this.$worker=function(){if(o.running){for(var r=new Date,i=o.currentLine,e=-1,n=o.doc,a=i;o.lines[i];)i++;var p=n.getLength(),v=0;for(o.running=!1;i<p;){o.$tokenizeRow(i),e=i;do i++;while(o.lines[i]);if(v++,v%5===0&&new Date-r>20){o.running=setTimeout(o.$worker,20);break}}o.currentLine=i,e==-1&&(e=i),a<=e&&o.fireUpdateEvent(a,e)}}}return c.prototype.setTokenizer=function(h){this.tokenizer=h,this.lines=[],this.states=[],this.start(0)},c.prototype.setDocument=function(h){this.doc=h,this.lines=[],this.states=[],this.stop()},c.prototype.fireUpdateEvent=function(h,t){var o={first:h,last:t};this._signal("update",{data:o})},c.prototype.start=function(h){this.currentLine=Math.min(h||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},c.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},c.prototype.$updateOnChange=function(h){var t=h.start.row,o=h.end.row-t;if(o===0)this.lines[t]=null;else if(h.action=="remove")this.lines.splice(t,o+1,null),this.states.splice(t,o+1,null);else{var r=Array(o+1);r.unshift(t,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},c.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},c.prototype.getTokens=function(h){return this.lines[h]||this.$tokenizeRow(h)},c.prototype.getState=function(h){return this.currentLine==h&&this.$tokenizeRow(h),this.states[h]||"start"},c.prototype.$tokenizeRow=function(h){var t=this.doc.getLine(h),o=this.states[h-1],r=this.tokenizer.getLineTokens(t,o,h);return this.states[h]+""!=r.state+""?(this.states[h]=r.state,this.lines[h+1]=null,this.currentLine>h+1&&(this.currentLine=h+1)):this.currentLine==h&&(this.currentLine=h+1),this.lines[h]=r.tokens},c.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},c})();k.implement(_.prototype,x),g.BackgroundTokenizer=_}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(f,g,j){var k=f("./lib/lang"),x=f("./range").Range,_=(function(){function c(h,t,o){o===void 0&&(o="text"),this.setRegexp(h),this.clazz=t,this.type=o,this.docLen=0}return c.prototype.setRegexp=function(h){this.regExp+""!=h+""&&(this.regExp=h,this.cache=[])},c.prototype.update=function(h,t,o,r){if(this.regExp){for(var i=r.firstRow,e=r.lastRow,n={},a=o.$editor&&o.$editor.$search,p=a&&a.$isMultilineSearch(o.$editor.getLastSearchOptions()),v=i;v<=e;v++){var A=this.cache[v];if(A==null||o.getValue().length!=this.docLen){if(p){A=[];var E=a.$multiLineForward(o,this.regExp,v,e);if(E){var S=E.endRow<=e?E.endRow-1:e;S>v&&(v=S),A.push(new x(E.startRow,E.startCol,E.endRow,E.endCol))}A.length>this.MAX_RANGES&&(A=A.slice(0,this.MAX_RANGES))}else A=k.getMatchOffsets(o.getLine(v),this.regExp),A.length>this.MAX_RANGES&&(A=A.slice(0,this.MAX_RANGES)),A=A.map(function(V){return new x(v,V.offset,v,V.offset+V.length)});this.cache[v]=A.length?A:""}if(A.length!==0)for(var C=A.length;C--;){var H=A[C].toScreenRange(o),U=H.toString();n[U]||(n[U]=!0,t.drawSingleLineMarker(h,H,this.clazz,r))}}this.docLen=o.getValue().length}},c})();_.prototype.MAX_RANGES=500,g.SearchHighlight=_}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(f,g,j){var k=(function(){function S(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return S.prototype.addSession=function(C){this.$session=C},S.prototype.add=function(C,H,U){if(!this.$fromUndo&&C!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),H===!1||!this.lastDeltas){this.lastDeltas=[];var V=this.$undoStack.length;V>this.$undoDepth-1&&this.$undoStack.splice(0,V-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),C.id=this.$rev=++this.$maxRev}(C.action=="remove"||C.action=="insert")&&(this.$lastDelta=C),this.lastDeltas.push(C)}},S.prototype.addSelection=function(C,H){this.selections.push({value:C,rev:H||this.$rev})},S.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},S.prototype.markIgnored=function(C,H){H==null&&(H=this.$rev+1);for(var U=this.$undoStack,V=U.length;V--;){var F=U[V][0];if(F.id<=C)break;F.id<H&&(F.ignore=!0)}this.lastDeltas=null},S.prototype.getSelection=function(C,H){for(var U=this.selections,V=U.length;V--;){var F=U[V];if(F.rev<C)return H&&(F=U[V+1]),F}},S.prototype.getRevision=function(){return this.$rev},S.prototype.getDeltas=function(C,H){H==null&&(H=this.$rev+1);for(var U=this.$undoStack,V=null,F=0,he=U.length;he--;){var P=U[he][0];if(P.id<H&&!V&&(V=he+1),P.id<=C){F=he+1;break}}return U.slice(F,V)},S.prototype.getChangedRanges=function(C,H){H==null&&(H=this.$rev+1)},S.prototype.getChangedLines=function(C,H){H==null&&(H=this.$rev+1)},S.prototype.undo=function(C,H){this.lastDeltas=null;var U=this.$undoStack;if(x(U,U.length)){C||(C=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var V=U.pop(),F=null;return V&&(F=C.undoChanges(V,H),this.$redoStack.push(V),this.$syncRev()),this.$fromUndo=!1,F}},S.prototype.redo=function(C,H){if(this.lastDeltas=null,C||(C=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var U=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);E(this.$redoStack,U),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(he){he[0].id=++this.$maxRev},this)}var V=this.$redoStack.pop(),F=null;return V&&(F=C.redoChanges(V,H),this.$undoStack.push(V),this.$syncRev()),this.$fromUndo=!1,F},S.prototype.$syncRev=function(){var C=this.$undoStack,H=C[C.length-1],U=H&&H[0].id||0;this.$redoStackBaseRev=U,this.$rev=U},S.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},S.prototype.canUndo=function(){return this.$undoStack.length>0},S.prototype.canRedo=function(){return this.$redoStack.length>0},S.prototype.bookmark=function(C){C==null&&(C=this.$rev),this.mark=C},S.prototype.isAtBookmark=function(){return this.$rev===this.mark},S.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},S.prototype.fromJSON=function(C){this.reset(),this.$undoStack=C.$undoStack,this.$redoStack=C.$redoStack},S.prototype.$prettyPrint=function(C){return C?o(C):o(this.$undoStack)+`
|
195
|
+
---
|
196
|
+
`+o(this.$redoStack)},S})();k.prototype.hasUndo=k.prototype.canUndo,k.prototype.hasRedo=k.prototype.canRedo,k.prototype.isClean=k.prototype.isAtBookmark,k.prototype.markClean=k.prototype.bookmark;function x(S,C){for(var H=C;H--;){var U=S[H];if(U&&!U[0].ignore){for(;H<C-1;){var V=e(S[H],S[H+1]);S[H]=V[0],S[H+1]=V[1],H++}return!0}}}var _=f("./range").Range,c=_.comparePoints;_.comparePoints;function h(S){return{row:S.row,column:S.column}}function t(S){return{start:h(S.start),end:h(S.end),action:S.action,lines:S.lines.slice()}}function o(S){if(S=S||this,Array.isArray(S))return S.map(o).join(`
|
197
|
+
`);var C="";return S.action?(C=S.action=="insert"?"+":"-",C+="["+S.lines+"]"):S.value&&(Array.isArray(S.value)?C=S.value.map(r).join(`
|
198
|
+
`):C=r(S.value)),S.start&&(C+=r(S)),(S.id||S.rev)&&(C+=" ("+(S.id||S.rev)+")"),C}function r(S){return S.start.row+":"+S.start.column+"=>"+S.end.row+":"+S.end.column}function i(S,C){var H=S.action=="insert",U=C.action=="insert";if(H&&U)if(c(C.start,S.end)>=0)a(C,S,-1);else if(c(C.start,S.start)<=0)a(S,C,1);else return null;else if(H&&!U)if(c(C.start,S.end)>=0)a(C,S,-1);else if(c(C.end,S.start)<=0)a(S,C,-1);else return null;else if(!H&&U)if(c(C.start,S.start)>=0)a(C,S,1);else if(c(C.start,S.start)<=0)a(S,C,1);else return null;else if(!H&&!U)if(c(C.start,S.start)>=0)a(C,S,1);else if(c(C.end,S.start)<=0)a(S,C,-1);else return null;return[C,S]}function e(S,C){for(var H=S.length;H--;)for(var U=0;U<C.length;U++)if(!i(S[H],C[U])){for(;H<S.length;){for(;U--;)i(C[U],S[H]);U=C.length,H++}return[S,C]}return S.selectionBefore=C.selectionBefore=S.selectionAfter=C.selectionAfter=null,[C,S]}function n(S,C){var H=S.action=="insert",U=C.action=="insert";if(H&&U)c(S.start,C.start)<0?a(C,S,1):a(S,C,1);else if(H&&!U)c(S.start,C.end)>=0?a(S,C,-1):(c(S.start,C.start)<=0||a(S,_.fromPoints(C.start,S.start),-1),a(C,S,1));else if(!H&&U)c(C.start,S.end)>=0?a(C,S,-1):(c(C.start,S.start)<=0||a(C,_.fromPoints(S.start,C.start),-1),a(S,C,1));else if(!H&&!U)if(c(C.start,S.end)>=0)a(C,S,-1);else if(c(C.end,S.start)<=0)a(S,C,-1);else{var V,F;return c(S.start,C.start)<0&&(V=S,S=v(S,C.start)),c(S.end,C.end)>0&&(F=v(S,C.end)),p(C.end,S.start,S.end,-1),F&&!V&&(S.lines=F.lines,S.start=F.start,S.end=F.end,F=S),[C,V,F].filter(Boolean)}return[C,S]}function a(S,C,H){p(S.start,C.start,C.end,H),p(S.end,C.start,C.end,H)}function p(S,C,H,U){S.row==(U==1?C:H).row&&(S.column+=U*(H.column-C.column)),S.row+=U*(H.row-C.row)}function v(S,C){var H=S.lines,U=S.end;S.end=h(C);var V=S.end.row-S.start.row,F=H.splice(V,H.length),he=V?C.column:C.column-S.start.column;H.push(F[0].substring(0,he)),F[0]=F[0].substr(he);var P={start:h(C),end:U,lines:F,action:S.action};return P}function A(S,C){C=t(C);for(var H=S.length;H--;){for(var U=S[H],V=0;V<U.length;V++){var F=U[V],he=n(F,C);C=he[0],he.length!=2&&(he[2]?(U.splice(V+1,1,he[1],he[2]),V++):he[1]||(U.splice(V,1),V--))}U.length||S.splice(H,1)}return S}function E(S,C){for(var H=0;H<C.length;H++)for(var U=C[H],V=0;V<U.length;V++)A(S,U[V])}g.UndoManager=k}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(f,g,j){var k=f("../range").Range,x=(function(){function _(c,h){this.foldData=c,Array.isArray(h)?this.folds=h:h=this.folds=[h];var t=h[h.length-1];this.range=new k(h[0].start.row,h[0].start.column,t.end.row,t.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(o){o.setFoldLine(this)},this)}return _.prototype.shiftRow=function(c){this.start.row+=c,this.end.row+=c,this.folds.forEach(function(h){h.start.row+=c,h.end.row+=c})},_.prototype.addFold=function(c){if(c.sameRow){if(c.start.row<this.startRow||c.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(c),this.folds.sort(function(h,t){return-h.range.compareEnd(t.start.row,t.start.column)}),this.range.compareEnd(c.start.row,c.start.column)>0?(this.end.row=c.end.row,this.end.column=c.end.column):this.range.compareStart(c.end.row,c.end.column)<0&&(this.start.row=c.start.row,this.start.column=c.start.column)}else if(c.start.row==this.end.row)this.folds.push(c),this.end.row=c.end.row,this.end.column=c.end.column;else if(c.end.row==this.start.row)this.folds.unshift(c),this.start.row=c.start.row,this.start.column=c.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");c.foldLine=this},_.prototype.containsRow=function(c){return c>=this.start.row&&c<=this.end.row},_.prototype.walk=function(c,h,t){var o=0,r=this.folds,i,e,n,a=!0;h==null&&(h=this.end.row,t=this.end.column);for(var p=0;p<r.length;p++){if(i=r[p],e=i.range.compareStart(h,t),e==-1){c(null,h,t,o,a);return}if(n=c(null,i.start.row,i.start.column,o,a),n=!n&&c(i.placeholder,i.start.row,i.start.column,o),n||e===0)return;a=!i.sameRow,o=i.end.column}c(null,h,t,o,a)},_.prototype.getNextFoldTo=function(c,h){for(var t,o,r=0;r<this.folds.length;r++){if(t=this.folds[r],o=t.range.compareEnd(c,h),o==-1)return{fold:t,kind:"after"};if(o===0)return{fold:t,kind:"inside"}}return null},_.prototype.addRemoveChars=function(c,h,t){var o=this.getNextFoldTo(c,h),r,i;if(o){if(r=o.fold,o.kind=="inside"&&r.start.column!=h&&r.start.row!=c)window.console&&window.console.log(c,h,r);else if(r.start.row==c){i=this.folds;var e=i.indexOf(r);for(e===0&&(this.start.column+=t),e;e<i.length;e++){if(r=i[e],r.start.column+=t,!r.sameRow)return;r.end.column+=t}this.end.column+=t}}},_.prototype.split=function(c,h){var t=this.getNextFoldTo(c,h);if(!t||t.kind=="inside")return null;var o=t.fold,r=this.folds,i=this.foldData,e=r.indexOf(o),n=r[e-1];this.end.row=n.end.row,this.end.column=n.end.column,r=r.splice(e,r.length-e);var a=new _(i,r);return i.splice(i.indexOf(this)+1,0,a),a},_.prototype.merge=function(c){for(var h=c.folds,t=0;t<h.length;t++)this.addFold(h[t]);var o=this.foldData;o.splice(o.indexOf(c),1)},_.prototype.toString=function(){var c=[this.range.toString()+": ["];return this.folds.forEach(function(h){c.push(" "+h.toString())}),c.push("]"),c.join(`
|
199
|
+
`)},_.prototype.idxToPosition=function(c){for(var h=0,t=0;t<this.folds.length;t++){var o=this.folds[t];if(c-=o.start.column-h,c<0)return{row:o.start.row,column:o.start.column+c};if(c-=o.placeholder.length,c<0)return o.start;h=o.end.column}return{row:this.end.row,column:this.end.column+c}},_})();g.FoldLine=x}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(f,g,j){var k=f("./range").Range,x=k.comparePoints,_=(function(){function c(){this.ranges=[],this.$bias=1}return c.prototype.pointIndex=function(h,t,o){for(var r=this.ranges,i=o||0;i<r.length;i++){var e=r[i],n=x(h,e.end);if(!(n>0)){var a=x(h,e.start);return n===0?t&&a!==0?-i-2:i:a>0||a===0&&!t?i:-i-1}}return-i-1},c.prototype.add=function(h){var t=!h.isEmpty(),o=this.pointIndex(h.start,t);o<0&&(o=-o-1);var r=this.pointIndex(h.end,t,o);return r<0?r=-r-1:r++,this.ranges.splice(o,r-o,h)},c.prototype.addList=function(h){for(var t=[],o=h.length;o--;)t.push.apply(t,this.add(h[o]));return t},c.prototype.substractPoint=function(h){var t=this.pointIndex(h);if(t>=0)return this.ranges.splice(t,1)},c.prototype.merge=function(){var h=[],t=this.ranges;t=t.sort(function(n,a){return x(n.start,a.start)});for(var o=t[0],r,i=1;i<t.length;i++){r=o,o=t[i];var e=x(r.end,o.start);e<0||e==0&&!r.isEmpty()&&!o.isEmpty()||(x(r.end,o.end)<0&&(r.end.row=o.end.row,r.end.column=o.end.column),t.splice(i,1),h.push(o),o=r,i--)}return this.ranges=t,h},c.prototype.contains=function(h,t){return this.pointIndex({row:h,column:t})>=0},c.prototype.containsPoint=function(h){return this.pointIndex(h)>=0},c.prototype.rangeAtPoint=function(h){var t=this.pointIndex(h);if(t>=0)return this.ranges[t]},c.prototype.clipRows=function(h,t){var o=this.ranges;if(o[0].start.row>t||o[o.length-1].start.row<h)return[];var r=this.pointIndex({row:h,column:0});r<0&&(r=-r-1);var i=this.pointIndex({row:t,column:0},r);i<0&&(i=-i-1);for(var e=[],n=r;n<i;n++)e.push(o[n]);return e},c.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},c.prototype.attach=function(h){this.session&&this.detach(),this.session=h,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},c.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},c.prototype.$onChange=function(h){for(var t=h.start,o=h.end,r=t.row,i=o.row,e=this.ranges,n=0,a=e.length;n<a;n++){var p=e[n];if(p.end.row>=r)break}if(h.action=="insert")for(var v=i-r,A=-t.column+o.column;n<a;n++){var p=e[n];if(p.start.row>r)break;if(p.start.row==r&&p.start.column>=t.column&&(p.start.column==t.column&&this.$bias<=0||(p.start.column+=A,p.start.row+=v)),p.end.row==r&&p.end.column>=t.column){if(p.end.column==t.column&&this.$bias<0)continue;p.end.column==t.column&&A>0&&n<a-1&&p.end.column>p.start.column&&p.end.column==e[n+1].start.column&&(p.end.column-=A),p.end.column+=A,p.end.row+=v}}else for(var v=r-i,A=t.column-o.column;n<a;n++){var p=e[n];if(p.start.row>i)break;p.end.row<i&&(r<p.end.row||r==p.end.row&&t.column<p.end.column)?(p.end.row=r,p.end.column=t.column):p.end.row==i?p.end.column<=o.column?(v||p.end.column>t.column)&&(p.end.column=t.column,p.end.row=t.row):(p.end.column+=A,p.end.row+=v):p.end.row>i&&(p.end.row+=v),p.start.row<i&&(r<p.start.row||r==p.start.row&&t.column<p.start.column)?(p.start.row=r,p.start.column=t.column):p.start.row==i?p.start.column<=o.column?(v||p.start.column>t.column)&&(p.start.column=t.column,p.start.row=t.row):(p.start.column+=A,p.start.row+=v):p.start.row>i&&(p.start.row+=v)}if(v!=0&&n<a)for(;n<a;n++){var p=e[n];p.start.row+=v,p.end.row+=v}},c})();_.prototype.comparePoints=x,g.RangeList=_}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(f,g,j){var k=this&&this.__extends||(function(){var r=function(i,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var p in a)Object.prototype.hasOwnProperty.call(a,p)&&(n[p]=a[p])},r(i,e)};return function(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(i,e);function n(){this.constructor=i}i.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}})(),x=f("../range_list").RangeList,_=(function(r){k(i,r);function i(e,n){var a=r.call(this)||this;return a.foldLine=null,a.placeholder=n,a.range=e,a.start=e.start,a.end=e.end,a.sameRow=e.start.row==e.end.row,a.subFolds=a.ranges=[],a}return i.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},i.prototype.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(n){n.setFoldLine(e)})},i.prototype.clone=function(){var e=this.range.clone(),n=new i(e,this.placeholder);return this.subFolds.forEach(function(a){n.subFolds.push(a.clone())}),n.collapseChildren=this.collapseChildren,n},i.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){h(e,this.start);for(var A=e.start.row,E=e.start.column,n=0,a=-1;n<this.subFolds.length&&(a=this.subFolds[n].range.compare(A,E),a==1);n++);var p=this.subFolds[n],v=0;if(a==0){if(p.range.containsRange(e))return p.addSubFold(e);v=1}for(var A=e.range.end.row,E=e.range.end.column,S=n,a=-1;S<this.subFolds.length&&(a=this.subFolds[S].range.compare(A,E),a==1);S++);a==0&&S++;for(var C=this.subFolds.splice(n,S-n,e),H=a==0?C.length-1:C.length,U=v;U<H;U++)e.addSubFold(C[U]);return e.setFoldLine(this.foldLine),e}},i.prototype.restoreRange=function(e){return o(e,this.start)},i})(x);function c(r,i){r.row-=i.row,r.row==0&&(r.column-=i.column)}function h(r,i){c(r.start,i),c(r.end,i)}function t(r,i){r.row==0&&(r.column+=i.column),r.row+=i.row}function o(r,i){t(r.start,i),t(r.end,i)}g.Fold=_}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(f,g,j){var k=f("../range").Range,x=f("./fold_line").FoldLine,_=f("./fold").Fold,c=f("../token_iterator").TokenIterator,h=f("../mouse/mouse_event").MouseEvent;function t(){this.getFoldAt=function(o,r,i){var e=this.getFoldLine(o);if(!e)return null;for(var n=e.folds,a=0;a<n.length;a++){var p=n[a].range;if(p.contains(o,r)){if(i==1&&p.isEnd(o,r)&&!p.isEmpty())continue;if(i==-1&&p.isStart(o,r)&&!p.isEmpty())continue;return n[a]}}},this.getFoldsInRange=function(o){var r=o.start,i=o.end,e=this.$foldData,n=[];r.column+=1,i.column-=1;for(var a=0;a<e.length;a++){var p=e[a].range.compareRange(o);if(p!=2){if(p==-2)break;for(var v=e[a].folds,A=0;A<v.length;A++){var E=v[A];if(p=E.range.compareRange(o),p==-2)break;if(p==2)continue;if(p==42)break;n.push(E)}}}return r.column-=1,i.column+=1,n},this.getFoldsInRangeList=function(o){if(Array.isArray(o)){var r=[];o.forEach(function(i){r=r.concat(this.getFoldsInRange(i))},this)}else var r=this.getFoldsInRange(o);return r},this.getAllFolds=function(){for(var o=[],r=this.$foldData,i=0;i<r.length;i++)for(var e=0;e<r[i].folds.length;e++)o.push(r[i].folds[e]);return o},this.getFoldStringAt=function(o,r,i,e){if(e=e||this.getFoldLine(o),!e)return null;for(var n={end:{column:0}},a,p,v=0;v<e.folds.length;v++){p=e.folds[v];var A=p.range.compareEnd(o,r);if(A==-1){a=this.getLine(p.start.row).substring(n.end.column,p.start.column);break}else if(A===0)return null;n=p}return a||(a=this.getLine(p.start.row).substring(n.end.column)),i==-1?a.substring(0,r-n.end.column):i==1?a.substring(r-n.end.column):a},this.getFoldLine=function(o,r){var i=this.$foldData,e=0;for(r&&(e=i.indexOf(r)),e==-1&&(e=0),e;e<i.length;e++){var n=i[e];if(n.start.row<=o&&n.end.row>=o)return n;if(n.end.row>o)return null}return null},this.getNextFoldLine=function(o,r){var i=this.$foldData,e=0;for(r&&(e=i.indexOf(r)),e==-1&&(e=0),e;e<i.length;e++){var n=i[e];if(n.end.row>=o)return n}return null},this.getFoldedRowCount=function(o,r){for(var i=this.$foldData,e=r-o+1,n=0;n<i.length;n++){var a=i[n],p=a.end.row,v=a.start.row;if(p>=r){v<r&&(v>=o?e-=r-v:e=0);break}else p>=o&&(v>=o?e-=p-v:e-=p-o+1)}return e},this.$addFoldLine=function(o){return this.$foldData.push(o),this.$foldData.sort(function(r,i){return r.start.row-i.start.row}),o},this.addFold=function(o,r){var i=this.$foldData,e=!1,n;o instanceof _?n=o:(n=new _(r,o),n.collapseChildren=r.collapseChildren),this.$clipRangeToDocument(n.range);var a=n.start.row,p=n.start.column,v=n.end.row,A=n.end.column,E=this.getFoldAt(a,p,1),S=this.getFoldAt(v,A,-1);if(E&&S==E)return E.addSubFold(n);E&&!E.range.isStart(a,p)&&this.removeFold(E),S&&!S.range.isEnd(v,A)&&this.removeFold(S);var C=this.getFoldsInRange(n.range);C.length>0&&(this.removeFolds(C),n.collapseChildren||C.forEach(function(F){n.addSubFold(F)}));for(var H=0;H<i.length;H++){var U=i[H];if(v==U.start.row){U.addFold(n),e=!0;break}else if(a==U.end.row){if(U.addFold(n),e=!0,!n.sameRow){var V=i[H+1];if(V&&V.start.row==v){U.merge(V);break}}break}else if(v<=U.start.row)break}return e||(U=this.$addFoldLine(new x(this.$foldData,n))),this.$useWrapMode?this.$updateWrapData(U.start.row,U.start.row):this.$updateRowLengthCache(U.start.row,U.start.row),this.$modified=!0,this._signal("changeFold",{data:n,action:"add"}),n},this.addFolds=function(o){o.forEach(function(r){this.addFold(r)},this)},this.removeFold=function(o){var r=o.foldLine,i=r.start.row,e=r.end.row,n=this.$foldData,a=r.folds;if(a.length==1)n.splice(n.indexOf(r),1);else if(r.range.isEnd(o.end.row,o.end.column))a.pop(),r.end.row=a[a.length-1].end.row,r.end.column=a[a.length-1].end.column;else if(r.range.isStart(o.start.row,o.start.column))a.shift(),r.start.row=a[0].start.row,r.start.column=a[0].start.column;else if(o.sameRow)a.splice(a.indexOf(o),1);else{var p=r.split(o.start.row,o.start.column);a=p.folds,a.shift(),p.start.row=a[0].start.row,p.start.column=a[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(i,e):this.$updateRowLengthCache(i,e)),this.$modified=!0,this._signal("changeFold",{data:o,action:"remove"})},this.removeFolds=function(o){for(var r=[],i=0;i<o.length;i++)r.push(o[i]);r.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(o){this.removeFold(o),o.subFolds.forEach(function(r){o.restoreRange(r),this.addFold(r)},this),o.collapseChildren>0&&this.foldAll(o.start.row+1,o.end.row,o.collapseChildren-1),o.subFolds=[]},this.expandFolds=function(o){o.forEach(function(r){this.expandFold(r)},this)},this.unfold=function(o,r){var i,e;if(o==null)i=new k(0,0,this.getLength(),0),r==null&&(r=!0);else if(typeof o=="number")i=new k(o,0,o,this.getLine(o).length);else if("row"in o)i=k.fromPoints(o,o);else{if(Array.isArray(o))return e=[],o.forEach(function(a){e=e.concat(this.unfold(a))},this),e;i=o}e=this.getFoldsInRangeList(i);for(var n=e;e.length==1&&k.comparePoints(e[0].start,i.start)<0&&k.comparePoints(e[0].end,i.end)>0;)this.expandFolds(e),e=this.getFoldsInRangeList(i);if(r!=!1?this.removeFolds(e):this.expandFolds(e),n.length)return n},this.isRowFolded=function(o,r){return!!this.getFoldLine(o,r)},this.getRowFoldEnd=function(o,r){var i=this.getFoldLine(o,r);return i?i.end.row:o},this.getRowFoldStart=function(o,r){var i=this.getFoldLine(o,r);return i?i.start.row:o},this.getFoldDisplayLine=function(o,r,i,e,n){e==null&&(e=o.start.row),n==null&&(n=0),r==null&&(r=o.end.row),i==null&&(i=this.getLine(r).length);var a=this.doc,p="";return o.walk(function(v,A,E,S){if(!(A<e)){if(A==e){if(E<n)return;S=Math.max(n,S)}v!=null?p+=v:p+=a.getLine(A).substring(S,E)}},r,i),p},this.getDisplayLine=function(o,r,i,e){var n=this.getFoldLine(o);if(n)return this.getFoldDisplayLine(n,o,r,i,e);var a;return a=this.doc.getLine(o),a.substring(e||0,r||a.length)},this.$cloneFoldData=function(){var o=[];return o=this.$foldData.map(function(r){var i=r.folds.map(function(e){return e.clone()});return new x(o,i)}),o},this.toggleFold=function(o){var r=this.selection,i=r.getRange(),e,n;if(i.isEmpty()){var a=i.start;if(e=this.getFoldAt(a.row,a.column),e){this.expandFold(e);return}else if(o){var p=this.getFoldLine(a.row);p&&this.expandFolds(p.folds);return}else(n=this.findMatchingBracket(a))?i.comparePoint(n)==1?i.end=n:(i.start=n,i.start.column++,i.end.column--):(n=this.findMatchingBracket({row:a.row,column:a.column+1}))?(i.comparePoint(n)==1?i.end=n:i.start=n,i.start.column++):i=this.getCommentFoldRange(a.row,a.column)||i}else{var v=this.getFoldsInRange(i);if(o&&v.length){this.expandFolds(v);return}else v.length==1&&(e=v[0])}if(e||(e=this.getFoldAt(i.start.row,i.start.column)),e&&e.range.toString()==i.toString()){this.expandFold(e);return}var A="...";if(!i.isMultiLine()){if(A=this.getTextRange(i),A.length<4)return;A=A.trim().substring(0,2)+".."}this.addFold(A,i)},this.getCommentFoldRange=function(o,r,i){var e=new c(this,o,r),n=e.getCurrentToken(),a=n&&n.type;if(n&&/^comment|string/.test(a)){a=a.match(/comment|string/)[0],a=="comment"&&(a+="|doc-start|\\.doc");var p=new RegExp(a),v=new k;if(i!=1){do n=e.stepBackward();while(n&&p.test(n.type));n=e.stepForward()}v.start.row=e.getCurrentTokenRow(),v.start.column=e.getCurrentTokenColumn()+n.value.length,e=new c(this,o,r);var A=this.getState(e.$row);if(i!=-1){var E=-1;do if(n=e.stepForward(),E==-1){var S=this.getState(e.$row);A.toString()!==S.toString()&&(E=e.$row)}else if(e.$row>E)break;while(n&&p.test(n.type));n=e.stepBackward()}else n=e.getCurrentToken();return v.end.row=e.getCurrentTokenRow(),v.end.column=e.getCurrentTokenColumn(),v.start.row==v.end.row&&v.start.column>v.end.column?void 0:v}},this.foldAll=function(o,r,i,e){i==null&&(i=1e5);var n=this.foldWidgets;if(n){r=r||this.getLength(),o=o||0;for(var a=o;a<r;a++)if(n[a]==null&&(n[a]=this.getFoldWidget(a)),n[a]=="start"&&!(e&&!e(a))){var p=this.getFoldWidgetRange(a);p&&p.isMultiLine()&&p.end.row<=r&&p.start.row>=o&&(a=p.end.row,p.collapseChildren=i,this.addFold("...",p))}}},this.foldToLevel=function(o){for(this.foldAll();o-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var o=this;this.foldAll(null,null,null,function(r){for(var i=o.getTokens(r),e=0;e<i.length;e++){var n=i[e];if(!(n.type=="text"&&/^\s+$/.test(n.value)))return!!/comment/.test(n.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(o){if(!this.$foldStyles[o])throw new Error("invalid fold style: "+o+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=o){this.$foldStyle=o,o=="manual"&&this.unfold();var r=this.$foldMode;this.$setFolding(null),this.$setFolding(r)}},this.$setFolding=function(o){if(this.$foldMode!=o){if(this.$foldMode=o,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!o||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=o.getFoldWidget.bind(o,this,this.$foldStyle),this.getFoldWidgetRange=o.getFoldWidgetRange.bind(o,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(o,r){var i=this.foldWidgets;if(!i||r&&i[o])return{};for(var e=o-1,n;e>=0;){var a=i[e];if(a==null&&(a=i[e]=this.getFoldWidget(e)),a=="start"){var p=this.getFoldWidgetRange(e);if(n||(n=p),p&&p.end.row>=o)break}e--}return{range:e!==-1&&p,firstRange:n}},this.onFoldWidgetClick=function(o,r){r instanceof h&&(r=r.domEvent);var i={children:r.shiftKey,all:r.ctrlKey||r.metaKey,siblings:r.altKey},e=this.$toggleFoldWidget(o,i);if(!e){var n=r.target||r.srcElement;n&&/ace_fold-widget/.test(n.className)&&(n.className+=" ace_invalid")}},this.$toggleFoldWidget=function(o,r){if(this.getFoldWidget){var i=this.getFoldWidget(o),e=this.getLine(o),n=i==="end"?-1:1,a=this.getFoldAt(o,n===-1?0:e.length,n);if(a)return r.children||r.all?this.removeFold(a):this.expandFold(a),a;var p=this.getFoldWidgetRange(o,!0);if(p&&!p.isMultiLine()&&(a=this.getFoldAt(p.start.row,p.start.column,1),a&&p.isEqual(a.range)))return this.removeFold(a),a;if(r.siblings){var v=this.getParentFoldRangeData(o);if(v.range)var A=v.range.start.row+1,E=v.range.end.row;this.foldAll(A,E,r.all?1e4:0)}else r.children?(E=p?p.end.row:this.getLength(),this.foldAll(o+1,E,r.all?1e4:0)):p&&(r.all&&(p.collapseChildren=1e4),this.addFold("...",p));return p}},this.toggleFoldWidget=function(o){var r=this.selection.getCursor().row;r=this.getRowFoldStart(r);var i=this.$toggleFoldWidget(r,{});if(!i){var e=this.getParentFoldRangeData(r,!0);if(i=e.range||e.firstRange,i){r=i.start.row;var n=this.getFoldAt(r,this.getLine(r).length,1);n?this.removeFold(n):this.addFold("...",i)}}},this.updateFoldWidgets=function(o){var r=o.start.row,i=o.end.row-r;if(i===0)this.foldWidgets[r]=null;else if(o.action=="remove")this.foldWidgets.splice(r,i+1,null);else{var e=Array(i+1);e.unshift(r,1),this.foldWidgets.splice.apply(this.foldWidgets,e)}},this.tokenizerUpdateFoldWidgets=function(o){var r=o.data;r.first!=r.last&&this.foldWidgets.length>r.first&&this.foldWidgets.splice(r.first,this.foldWidgets.length)}}g.Folding=t}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(f,g,j){var k=f("../token_iterator").TokenIterator,x=f("../range").Range;function _(){this.findMatchingBracket=function(c,h){if(c.column==0)return null;var t=h||this.getLine(c.row).charAt(c.column-1);if(t=="")return null;var o=t.match(/([\(\[\{])|([\)\]\}])/);return o?o[1]?this.$findClosingBracket(o[1],c):this.$findOpeningBracket(o[2],c):null},this.getBracketRange=function(c){var h=this.getLine(c.row),t=!0,o,r=h.charAt(c.column-1),i=r&&r.match(/([\(\[\{])|([\)\]\}])/);if(i||(r=h.charAt(c.column),c={row:c.row,column:c.column+1},i=r&&r.match(/([\(\[\{])|([\)\]\}])/),t=!1),!i)return null;if(i[1]){var e=this.$findClosingBracket(i[1],c);if(!e)return null;o=x.fromPoints(c,e),t||(o.end.column++,o.start.column--),o.cursor=o.end}else{var e=this.$findOpeningBracket(i[2],c);if(!e)return null;o=x.fromPoints(e,c),t||(o.start.column++,o.end.column--),o.cursor=o.start}return o},this.getMatchingBracketRanges=function(c,h){var t=this.getLine(c.row),o=/([\(\[\{])|([\)\]\}])/,r=!h&&t.charAt(c.column-1),i=r&&r.match(o);if(i||(r=(h===void 0||h)&&t.charAt(c.column),c={row:c.row,column:c.column+1},i=r&&r.match(o)),!i)return null;var e=new x(c.row,c.column-1,c.row,c.column),n=i[1]?this.$findClosingBracket(i[1],c):this.$findOpeningBracket(i[2],c);if(!n)return[e];var a=new x(n.row,n.column,n.row,n.column+1);return[e,a]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(c,h,t){var o=this.$brackets[c],r=1,i=new k(this,h.row,h.column),e=i.getCurrentToken();if(e||(e=i.stepForward()),!!e){t||(t=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var n=h.column-i.getCurrentTokenColumn()-2,a=e.value;;){for(;n>=0;){var p=a.charAt(n);if(p==o){if(r-=1,r==0)return{row:i.getCurrentTokenRow(),column:n+i.getCurrentTokenColumn()}}else p==c&&(r+=1);n-=1}do e=i.stepBackward();while(e&&!t.test(e.type));if(e==null)break;a=e.value,n=a.length-1}return null}},this.$findClosingBracket=function(c,h,t){var o=this.$brackets[c],r=1,i=new k(this,h.row,h.column),e=i.getCurrentToken();if(e||(e=i.stepForward()),!!e){t||(t=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var n=h.column-i.getCurrentTokenColumn();;){for(var a=e.value,p=a.length;n<p;){var v=a.charAt(n);if(v==o){if(r-=1,r==0)return{row:i.getCurrentTokenRow(),column:n+i.getCurrentTokenColumn()}}else v==c&&(r+=1);n+=1}do e=i.stepForward();while(e&&!t.test(e.type));if(e==null)break;n=0}return null}},this.getMatchingTags=function(c){var h=new k(this,c.row,c.column),t=this.$findTagName(h);if(t){var o=h.stepBackward();return o.value==="<"?this.$findClosingTag(h,t):this.$findOpeningTag(h,t)}},this.$findTagName=function(c){var h=c.getCurrentToken(),t=!1,o=!1;if(h&&h.type.indexOf("tag-name")===-1)do o?h=c.stepBackward():h=c.stepForward(),h&&(h.value==="/>"?o=!0:h.type.indexOf("tag-name")!==-1&&(t=!0));while(h&&!t);return h},this.$findClosingTag=function(c,h){var t,o=h.value,r=h.value,i=0,e=new x(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);h=c.stepForward();var n=new x(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+h.value.length),a=!1;do{if(t=h,t.type.indexOf("tag-close")!==-1&&!a){var p=new x(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);a=!0}if(h=c.stepForward(),h){if(h.value===">"&&!a){var p=new x(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);a=!0}if(h.type.indexOf("tag-name")!==-1){if(o=h.value,r===o){if(t.value==="<")i++;else if(t.value==="</"&&(i--,i<0)){c.stepBackward();var v=new x(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+2);h=c.stepForward();var A=new x(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+h.value.length);if(h.type.indexOf("tag-close")===-1&&(h=c.stepForward()),h&&h.value===">")var E=new x(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);else return}}}else if(r===o&&h.value==="/>"&&(i--,i<0))var v=new x(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+2),A=v,E=A,p=new x(n.end.row,n.end.column,n.end.row,n.end.column+1)}}while(h&&i>=0);if(e&&p&&v&&E&&n&&A)return{openTag:new x(e.start.row,e.start.column,p.end.row,p.end.column),closeTag:new x(v.start.row,v.start.column,E.end.row,E.end.column),openTagName:n,closeTagName:A}},this.$findOpeningTag=function(c,h){var t=c.getCurrentToken(),o=h.value,r=0,i=c.getCurrentTokenRow(),e=c.getCurrentTokenColumn(),n=e+2,a=new x(i,e,i,n);c.stepForward();var p=new x(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+h.value.length);if(h.type.indexOf("tag-close")===-1&&(h=c.stepForward()),!(!h||h.value!==">")){var v=new x(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);c.stepBackward(),c.stepBackward();do if(h=t,i=c.getCurrentTokenRow(),e=c.getCurrentTokenColumn(),n=e+h.value.length,t=c.stepBackward(),h){if(h.type.indexOf("tag-name")!==-1){if(o===h.value)if(t.value==="<"){if(r++,r>0){var A=new x(i,e,i,n),E=new x(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);do h=c.stepForward();while(h&&h.value!==">");var S=new x(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1)}}else t.value==="</"&&r--}else if(h.value==="/>"){for(var C=0,H=t;H;){if(H.type.indexOf("tag-name")!==-1&&H.value===o){r--;break}else if(H.value==="<")break;H=c.stepBackward(),C++}for(var U=0;U<C;U++)c.stepForward()}}while(t&&r<=0);if(E&&S&&a&&v&&A&&p)return{openTag:new x(E.start.row,E.start.column,S.end.row,S.end.column),closeTag:new x(a.start.row,a.start.column,v.end.row,v.end.column),openTagName:A,closeTagName:p}}}}g.BracketMatch=_}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/line_widgets","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(f,g,j){var k=f("./lib/oop"),x=f("./lib/lang"),_=f("./bidihandler").BidiHandler,c=f("./config"),h=f("./lib/event_emitter").EventEmitter,t=f("./selection").Selection,o=f("./mode/text").Mode,r=f("./range").Range,i=f("./line_widgets").LineWidgets,e=f("./document").Document,n=f("./background_tokenizer").BackgroundTokenizer,a=f("./search_highlight").SearchHighlight,p=f("./undomanager").UndoManager,v=(function(){function P(O,b){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$editor=null,this.prevOp={},this.$foldData=[],this.id="session"+ ++P.$uid,this.$foldData.toString=function(){return this.join(`
|
200
|
+
`)},this.$gutterCustomWidgets={},this.bgTokenizer=new n(new o().getTokenizer(),this);var y=this;this.bgTokenizer.on("update",function(T){y._signal("tokenizerUpdate",T)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof O!="object"||!O.getLine)&&(O=new e(O)),this.setDocument(O),this.selection=new t(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new _(this),c.resetOptions(this),this.setMode(b),c._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return P.prototype.$initOperationListeners=function(){var O=this;this.curOp=null,this.on("change",function(){O.curOp||(O.startOperation(),O.curOp.selectionBefore=O.$lastSel),O.curOp.docChanged=!0},!0),this.on("changeSelection",function(){O.curOp||(O.startOperation(),O.curOp.selectionBefore=O.$lastSel),O.curOp.selectionChanged=!0},!0),this.$operationResetTimer=x.delayedCall(this.endOperation.bind(this,!0))},P.prototype.startOperation=function(O){if(this.curOp){if(!O||this.curOp.command)return;this.prevOp=this.curOp}O||(O={}),this.$operationResetTimer.schedule(),this.curOp={command:O.command||{},args:O.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",O)},P.prototype.endOperation=function(O){if(this.curOp){if(O&&O.returnValue===!1){this.curOp=null,this._signal("endOperation",O);return}if(O==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var b=this.selection.toJSON();this.curOp.selectionAfter=b,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(b),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",O)}},P.prototype.setDocument=function(O){this.doc&&this.doc.off("change",this.$onChange),this.doc=O,O.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},P.prototype.getDocument=function(){return this.doc},Object.defineProperty(P.prototype,"widgetManager",{get:function(){var O=new i(this);return this.widgetManager=O,this.$editor&&O.attach(this.$editor),O},set:function(O){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:O})},enumerable:!1,configurable:!0}),P.prototype.$resetRowCache=function(O){if(!O){this.$docRowCache=[],this.$screenRowCache=[];return}var b=this.$docRowCache.length,y=this.$getRowCacheIndex(this.$docRowCache,O)+1;b>y&&(this.$docRowCache.splice(y,b),this.$screenRowCache.splice(y,b))},P.prototype.$getRowCacheIndex=function(O,b){for(var y=0,T=O.length-1;y<=T;){var G=y+T>>1,q=O[G];if(b>q)y=G+1;else if(b<q)T=G-1;else return G}return y-1},P.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},P.prototype.onChangeFold=function(O){var b=O.data;this.$resetRowCache(b.start.row)},P.prototype.onChange=function(O){this.$modified=!0,this.$bidiHandler.onChange(O),this.$resetRowCache(O.start.row);var b=this.$updateInternalDataOnChange(O);!this.$fromUndo&&this.$undoManager&&(b&&b.length&&(this.$undoManager.add({action:"removeFolds",folds:b},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(O,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(O),this._signal("change",O)},P.prototype.onSelectionChange=function(){this._signal("changeSelection")},P.prototype.setValue=function(O){this.doc.setValue(O),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},P.fromJSON=function(O){typeof O=="string"&&(O=JSON.parse(O));var b=new p;b.$undoStack=O.history.undo,b.$redoStack=O.history.redo,b.mark=O.history.mark,b.$rev=O.history.rev;var y=new P(O.value);return O.folds.forEach(function(T){y.addFold("...",r.fromPoints(T.start,T.end))}),y.setAnnotations(O.annotations),y.setBreakpoints(O.breakpoints),y.setMode(O.mode),y.setScrollLeft(O.scrollLeft),y.setScrollTop(O.scrollTop),y.setUndoManager(b),y.selection.fromJSON(O.selection),y},P.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(O){return O.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},P.prototype.toString=function(){return this.doc.getValue()},P.prototype.getSelection=function(){return this.selection},P.prototype.getState=function(O){return this.bgTokenizer.getState(O)},P.prototype.getTokens=function(O){return this.bgTokenizer.getTokens(O)},P.prototype.getTokenAt=function(O,b){var y=this.bgTokenizer.getTokens(O),T,G=0;if(b==null){var q=y.length-1;G=this.getLine(O).length}else for(var q=0;q<y.length&&(G+=y[q].value.length,!(G>=b));q++);return T=y[q],T?(T.index=q,T.start=G-T.value.length,T):null},P.prototype.setUndoManager=function(O){if(this.$undoManager=O,this.$informUndoManager&&this.$informUndoManager.cancel(),O){var b=this;O.addSession(this),this.$syncInformUndoManager=function(){b.$informUndoManager.cancel(),b.mergeUndoDeltas=!1},this.$informUndoManager=x.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},P.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},P.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},P.prototype.getTabString=function(){return this.getUseSoftTabs()?x.stringRepeat(" ",this.getTabSize()):" "},P.prototype.setUseSoftTabs=function(O){this.setOption("useSoftTabs",O)},P.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},P.prototype.setTabSize=function(O){this.setOption("tabSize",O)},P.prototype.getTabSize=function(){return this.$tabSize},P.prototype.isTabStop=function(O){return this.$useSoftTabs&&O.column%this.$tabSize===0},P.prototype.setNavigateWithinSoftTabs=function(O){this.setOption("navigateWithinSoftTabs",O)},P.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},P.prototype.setOverwrite=function(O){this.setOption("overwrite",O)},P.prototype.getOverwrite=function(){return this.$overwrite},P.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},P.prototype.addGutterDecoration=function(O,b){this.$decorations[O]||(this.$decorations[O]=""),this.$decorations[O]+=" "+b,this._signal("changeBreakpoint",{})},P.prototype.removeGutterCustomWidget=function(O){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(O)},P.prototype.addGutterCustomWidget=function(O,b){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(O,b)},P.prototype.removeGutterDecoration=function(O,b){this.$decorations[O]=(this.$decorations[O]||"").replace(" "+b,""),this._signal("changeBreakpoint",{})},P.prototype.getBreakpoints=function(){return this.$breakpoints},P.prototype.setBreakpoints=function(O){this.$breakpoints=[];for(var b=0;b<O.length;b++)this.$breakpoints[O[b]]="ace_breakpoint";this._signal("changeBreakpoint",{})},P.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},P.prototype.setBreakpoint=function(O,b){b===void 0&&(b="ace_breakpoint"),b?this.$breakpoints[O]=b:delete this.$breakpoints[O],this._signal("changeBreakpoint",{})},P.prototype.clearBreakpoint=function(O){delete this.$breakpoints[O],this._signal("changeBreakpoint",{})},P.prototype.addMarker=function(O,b,y,T){var G=this.$markerId++,q={range:O,type:y||"line",renderer:typeof y=="function"?y:null,clazz:b,inFront:!!T,id:G};return T?(this.$frontMarkers[G]=q,this._signal("changeFrontMarker")):(this.$backMarkers[G]=q,this._signal("changeBackMarker")),G},P.prototype.addDynamicMarker=function(O,b){if(O.update){var y=this.$markerId++;return O.id=y,O.inFront=!!b,b?(this.$frontMarkers[y]=O,this._signal("changeFrontMarker")):(this.$backMarkers[y]=O,this._signal("changeBackMarker")),O}},P.prototype.removeMarker=function(O){var b=this.$frontMarkers[O]||this.$backMarkers[O];if(b){var y=b.inFront?this.$frontMarkers:this.$backMarkers;delete y[O],this._signal(b.inFront?"changeFrontMarker":"changeBackMarker")}},P.prototype.getMarkers=function(O){return O?this.$frontMarkers:this.$backMarkers},P.prototype.highlight=function(O){if(!this.$searchHighlight){var b=new a(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(b)}this.$searchHighlight.setRegexp(O)},P.prototype.highlightLines=function(O,b,y,T){typeof b!="number"&&(y=b,b=O),y||(y="ace_step");var G=new r(O,0,b,1/0);return G.id=this.addMarker(G,y,"fullLine",T),G},P.prototype.setAnnotations=function(O){this.$annotations=O,this._signal("changeAnnotation",{})},P.prototype.getAnnotations=function(){return this.$annotations||[]},P.prototype.clearAnnotations=function(){this.setAnnotations([])},P.prototype.$detectNewLine=function(O){var b=O.match(/^.*?(\r?\n)/m);b?this.$autoNewLine=b[1]:this.$autoNewLine=`
|
201
|
+
`},P.prototype.getWordRange=function(O,b){var y=this.getLine(O),T=!1;if(b>0&&(T=!!y.charAt(b-1).match(this.tokenRe)),T||(T=!!y.charAt(b).match(this.tokenRe)),T)var G=this.tokenRe;else if(/^\s+$/.test(y.slice(b-1,b+1)))var G=/\s/;else var G=this.nonTokenRe;var q=b;if(q>0){do q--;while(q>=0&&y.charAt(q).match(G));q++}for(var ue=b;ue<y.length&&y.charAt(ue).match(G);)ue++;return new r(O,q,O,ue)},P.prototype.getAWordRange=function(O,b){for(var y=this.getWordRange(O,b),T=this.getLine(y.end.row);T.charAt(y.end.column).match(/[ \t]/);)y.end.column+=1;return y},P.prototype.setNewLineMode=function(O){this.doc.setNewLineMode(O)},P.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},P.prototype.setUseWorker=function(O){this.setOption("useWorker",O)},P.prototype.getUseWorker=function(){return this.$useWorker},P.prototype.onReloadTokenizer=function(O){var b=O.data;this.bgTokenizer.start(b.first),this._signal("tokenizerUpdate",O)},P.prototype.setMode=function(O,b){if(O&&typeof O=="object"){if(O.getTokenizer)return this.$onChangeMode(O);var y=O,T=y.path}else T=O||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new o),this.$modes[T]&&!y){this.$onChangeMode(this.$modes[T]),b&&b();return}this.$modeId=T,c.loadModule(["mode",T],(function(G){if(!this.destroyed){if(this.$modeId!==T)return b&&b();this.$modes[T]&&!y?this.$onChangeMode(this.$modes[T]):G&&G.Mode&&(G=new G.Mode(y),y||(this.$modes[T]=G,G.$id=T),this.$onChangeMode(G)),b&&b()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},P.prototype.$onChangeMode=function(O,b){if(b||(this.$modeId=O.$id),this.$mode!==O){var y=this.$mode;this.$mode=O,this.$stopWorker(),this.$useWorker&&this.$startWorker();var T=O.getTokenizer();if(T.on!==void 0){var G=this.onReloadTokenizer.bind(this);T.on("update",G)}this.bgTokenizer.setTokenizer(T),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=O.tokenRe,this.nonTokenRe=O.nonTokenRe,b||(O.attachToSession&&O.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(O.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:y,mode:O}))}},P.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},P.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(O){c.warn("Could not load worker",O),this.$worker=null}},P.prototype.getMode=function(){return this.$mode},P.prototype.setScrollTop=function(O){this.$scrollTop===O||isNaN(O)||(this.$scrollTop=O,this._signal("changeScrollTop",O))},P.prototype.getScrollTop=function(){return this.$scrollTop},P.prototype.setScrollLeft=function(O){this.$scrollLeft===O||isNaN(O)||(this.$scrollLeft=O,this._signal("changeScrollLeft",O))},P.prototype.getScrollLeft=function(){return this.$scrollLeft},P.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},P.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var O=0;return this.lineWidgets.forEach(function(b){b&&b.screenWidth>O&&(O=b.screenWidth)}),this.lineWidgetWidth=O},P.prototype.$computeWidth=function(O){if(this.$modified||O){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var b=this.doc.getAllLines(),y=this.$rowLengthCache,T=0,G=0,q=this.$foldData[G],ue=q?q.start.row:1/0,Ce=b.length,Oe=0;Oe<Ce;Oe++){if(Oe>ue){if(Oe=q.end.row+1,Oe>=Ce)break;q=this.$foldData[G++],ue=q?q.start.row:1/0}y[Oe]==null&&(y[Oe]=this.$getStringScreenWidth(b[Oe])[0]),y[Oe]>T&&(T=y[Oe])}this.screenWidth=T}},P.prototype.getLine=function(O){return this.doc.getLine(O)},P.prototype.getLines=function(O,b){return this.doc.getLines(O,b)},P.prototype.getLength=function(){return this.doc.getLength()},P.prototype.getTextRange=function(O){return this.doc.getTextRange(O||this.selection.getRange())},P.prototype.insert=function(O,b){return this.doc.insert(O,b)},P.prototype.remove=function(O){return this.doc.remove(O)},P.prototype.removeFullLines=function(O,b){return this.doc.removeFullLines(O,b)},P.prototype.undoChanges=function(O,b){if(O.length){this.$fromUndo=!0;for(var y=O.length-1;y!=-1;y--){var T=O[y];T.action=="insert"||T.action=="remove"?this.doc.revertDelta(T):T.folds&&this.addFolds(T.folds)}!b&&this.$undoSelect&&(O.selectionBefore?this.selection.fromJSON(O.selectionBefore):this.selection.setRange(this.$getUndoSelection(O,!0))),this.$fromUndo=!1}},P.prototype.redoChanges=function(O,b){if(O.length){this.$fromUndo=!0;for(var y=0;y<O.length;y++){var T=O[y];(T.action=="insert"||T.action=="remove")&&this.doc.$safeApplyDelta(T)}!b&&this.$undoSelect&&(O.selectionAfter?this.selection.fromJSON(O.selectionAfter):this.selection.setRange(this.$getUndoSelection(O,!1))),this.$fromUndo=!1}},P.prototype.setUndoSelect=function(O){this.$undoSelect=O},P.prototype.$getUndoSelection=function(O,b){function y(Ce){return b?Ce.action!=="insert":Ce.action==="insert"}for(var T,G,q=0;q<O.length;q++){var ue=O[q];if(ue.start){if(!T){y(ue)?T=r.fromPoints(ue.start,ue.end):T=r.fromPoints(ue.start,ue.start);continue}y(ue)?(G=ue.start,T.compare(G.row,G.column)==-1&&T.setStart(G),G=ue.end,T.compare(G.row,G.column)==1&&T.setEnd(G)):(G=ue.start,T.compare(G.row,G.column)==-1&&(T=r.fromPoints(ue.start,ue.start)))}}return T},P.prototype.replace=function(O,b){return this.doc.replace(O,b)},P.prototype.moveText=function(O,b,y){var T=this.getTextRange(O),G=this.getFoldsInRange(O),q=r.fromPoints(b,b);if(!y){this.remove(O);var ue=O.start.row-O.end.row,Ce=ue?-O.end.column:O.start.column-O.end.column;Ce&&(q.start.row==O.end.row&&q.start.column>O.end.column&&(q.start.column+=Ce),q.end.row==O.end.row&&q.end.column>O.end.column&&(q.end.column+=Ce)),ue&&q.start.row>=O.end.row&&(q.start.row+=ue,q.end.row+=ue)}if(q.end=this.insert(q.start,T),G.length){var Oe=O.start,gt=q.start,ue=gt.row-Oe.row,Ce=gt.column-Oe.column;this.addFolds(G.map(function(ft){return ft=ft.clone(),ft.start.row==Oe.row&&(ft.start.column+=Ce),ft.end.row==Oe.row&&(ft.end.column+=Ce),ft.start.row+=ue,ft.end.row+=ue,ft}))}return q},P.prototype.indentRows=function(O,b,y){y=y.replace(/\t/g,this.getTabString());for(var T=O;T<=b;T++)this.doc.insertInLine({row:T,column:0},y)},P.prototype.outdentRows=function(O){for(var b=O.collapseRows(),y=new r(0,0,0,0),T=this.getTabSize(),G=b.start.row;G<=b.end.row;++G){var q=this.getLine(G);y.start.row=G,y.end.row=G;for(var ue=0;ue<T&&q.charAt(ue)==" ";++ue);ue<T&&q.charAt(ue)==" "?(y.start.column=ue,y.end.column=ue+1):(y.start.column=0,y.end.column=ue),this.remove(y)}},P.prototype.$moveLines=function(O,b,y){if(O=this.getRowFoldStart(O),b=this.getRowFoldEnd(b),y<0){var T=this.getRowFoldStart(O+y);if(T<0)return 0;var G=T-O}else if(y>0){var T=this.getRowFoldEnd(b+y);if(T>this.doc.getLength()-1)return 0;var G=T-b}else{O=this.$clipRowToDocument(O),b=this.$clipRowToDocument(b);var G=b-O+1}var q=new r(O,0,b,Number.MAX_VALUE),ue=this.getFoldsInRange(q).map(function(Oe){return Oe=Oe.clone(),Oe.start.row+=G,Oe.end.row+=G,Oe}),Ce=y==0?this.doc.getLines(O,b):this.doc.removeFullLines(O,b);return this.doc.insertFullLines(O+G,Ce),ue.length&&this.addFolds(ue),G},P.prototype.moveLinesUp=function(O,b){return this.$moveLines(O,b,-1)},P.prototype.moveLinesDown=function(O,b){return this.$moveLines(O,b,1)},P.prototype.duplicateLines=function(O,b){return this.$moveLines(O,b,0)},P.prototype.$clipRowToDocument=function(O){return Math.max(0,Math.min(O,this.doc.getLength()-1))},P.prototype.$clipColumnToRow=function(O,b){return b<0?0:Math.min(this.doc.getLine(O).length,b)},P.prototype.$clipPositionToDocument=function(O,b){if(b=Math.max(0,b),O<0)O=0,b=0;else{var y=this.doc.getLength();O>=y?(O=y-1,b=this.doc.getLine(y-1).length):b=Math.min(this.doc.getLine(O).length,b)}return{row:O,column:b}},P.prototype.$clipRangeToDocument=function(O){O.start.row<0?(O.start.row=0,O.start.column=0):O.start.column=this.$clipColumnToRow(O.start.row,O.start.column);var b=this.doc.getLength()-1;return O.end.row>b?(O.end.row=b,O.end.column=this.doc.getLine(b).length):O.end.column=this.$clipColumnToRow(O.end.row,O.end.column),O},P.prototype.setUseWrapMode=function(O){if(O!=this.$useWrapMode){if(this.$useWrapMode=O,this.$modified=!0,this.$resetRowCache(0),O){var b=this.getLength();this.$wrapData=Array(b),this.$updateWrapData(0,b-1)}this._signal("changeWrapMode")}},P.prototype.getUseWrapMode=function(){return this.$useWrapMode},P.prototype.setWrapLimitRange=function(O,b){(this.$wrapLimitRange.min!==O||this.$wrapLimitRange.max!==b)&&(this.$wrapLimitRange={min:O,max:b},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},P.prototype.adjustWrapLimit=function(O,b){var y=this.$wrapLimitRange;y.max<0&&(y={min:b,max:b});var T=this.$constrainWrapLimit(O,y.min,y.max);return T!=this.$wrapLimit&&T>1?(this.$wrapLimit=T,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},P.prototype.$constrainWrapLimit=function(O,b,y){return b&&(O=Math.max(b,O)),y&&(O=Math.min(y,O)),O},P.prototype.getWrapLimit=function(){return this.$wrapLimit},P.prototype.setWrapLimit=function(O){this.setWrapLimitRange(O,O)},P.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},P.prototype.$updateInternalDataOnChange=function(O){var b=this.$useWrapMode,y=O.action,T=O.start,G=O.end,q=T.row,ue=G.row,Ce=ue-q,Oe=null;if(this.$updating=!0,Ce!=0)if(y==="remove"){this[b?"$wrapData":"$rowLengthCache"].splice(q,Ce);var gt=this.$foldData;Oe=this.getFoldsInRange(O),this.removeFolds(Oe);var ze=this.getFoldLine(G.row),Xe=0;if(ze){ze.addRemoveChars(G.row,G.column,T.column-G.column),ze.shiftRow(-Ce);var ft=this.getFoldLine(q);ft&&ft!==ze&&(ft.merge(ze),ze=ft),Xe=gt.indexOf(ze)+1}for(Xe;Xe<gt.length;Xe++){var ze=gt[Xe];ze.start.row>=G.row&&ze.shiftRow(-Ce)}ue=q}else{var pt=Array(Ce);pt.unshift(q,0);var mt=b?this.$wrapData:this.$rowLengthCache;mt.splice.apply(mt,pt);var gt=this.$foldData,ze=this.getFoldLine(q),Xe=0;if(ze){var Vt=ze.range.compareInside(T.row,T.column);Vt==0?(ze=ze.split(T.row,T.column),ze&&(ze.shiftRow(Ce),ze.addRemoveChars(ue,0,G.column-T.column))):Vt==-1&&(ze.addRemoveChars(q,0,G.column-T.column),ze.shiftRow(Ce)),Xe=gt.indexOf(ze)+1}for(Xe;Xe<gt.length;Xe++){var ze=gt[Xe];ze.start.row>=q&&ze.shiftRow(Ce)}}else{Ce=Math.abs(O.start.column-O.end.column),y==="remove"&&(Oe=this.getFoldsInRange(O),this.removeFolds(Oe),Ce=-Ce);var ze=this.getFoldLine(q);ze&&ze.addRemoveChars(q,T.column,Ce)}return b&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,b?this.$updateWrapData(q,ue):this.$updateRowLengthCache(q,ue),Oe},P.prototype.$updateRowLengthCache=function(O,b){this.$rowLengthCache[O]=null,this.$rowLengthCache[b]=null},P.prototype.$updateWrapData=function(O,b){var y=this.doc.getAllLines(),T=this.getTabSize(),G=this.$wrapData,q=this.$wrapLimit,ue,Ce,Oe=O;for(b=Math.min(b,y.length-1);Oe<=b;)Ce=this.getFoldLine(Oe,Ce),Ce?(ue=[],Ce.walk((function(gt,ze,Xe,ft){var pt;if(gt!=null){pt=this.$getDisplayTokens(gt,ue.length),pt[0]=S;for(var mt=1;mt<pt.length;mt++)pt[mt]=C}else pt=this.$getDisplayTokens(y[ze].substring(ft,Xe),ue.length);ue=ue.concat(pt)}).bind(this),Ce.end.row,y[Ce.end.row].length+1),G[Ce.start.row]=this.$computeWrapSplits(ue,q,T),Oe=Ce.end.row+1):(ue=this.$getDisplayTokens(y[Oe]),G[Oe]=this.$computeWrapSplits(ue,q,T),Oe++)},P.prototype.$computeWrapSplits=function(O,b,y){if(O.length==0)return[];var T=[],G=O.length,q=0,ue=0,Ce=this.$wrapAsCode,Oe=this.$indentedSoftWrap,gt=b<=Math.max(2*y,8)||Oe===!1?0:Math.floor(b/2);function ze(){var Vt=0;if(gt===0)return Vt;if(Oe)for(var Yt=0;Yt<O.length;Yt++){var Gt=O[Yt];if(Gt==U)Vt+=1;else if(Gt==V)Vt+=y;else{if(Gt==F)continue;break}}return Ce&&Oe!==!1&&(Vt+=y),Math.min(Vt,gt)}function Xe(Vt){for(var Yt=Vt-q,Gt=q;Gt<Vt;Gt++){var Qt=O[Gt];(Qt===12||Qt===2)&&(Yt-=1)}T.length||(ft=ze(),T.indent=ft),ue+=Yt,T.push(ue),q=Vt}for(var ft=0;G-q>b-ft;){var pt=q+b-ft;if(O[pt-1]>=U&&O[pt]>=U){Xe(pt);continue}if(O[pt]==S||O[pt]==C){for(pt;pt!=q-1&&O[pt]!=S;pt--);if(pt>q){Xe(pt);continue}for(pt=q+b,pt;pt<O.length&&O[pt]==C;pt++);if(pt==O.length)break;Xe(pt);continue}for(var mt=Math.max(pt-(b-(b>>2)),q-1);pt>mt&&O[pt]<S;)pt--;if(Ce){for(;pt>mt&&O[pt]<S;)pt--;for(;pt>mt&&O[pt]==H;)pt--}else for(;pt>mt&&O[pt]<U;)pt--;if(pt>mt){Xe(++pt);continue}pt=q+b,O[pt]==E&&pt--,Xe(pt-ft)}return T},P.prototype.$getDisplayTokens=function(O,b){var y=[],T;b=b||0;for(var G=0;G<O.length;G++){var q=O.charCodeAt(G);if(q==9){T=this.getScreenTabSize(y.length+b),y.push(V);for(var ue=1;ue<T;ue++)y.push(F)}else q==32?y.push(U):q>39&&q<48||q>57&&q<64?y.push(H):q>=4352&&he(q)?y.push(A,E):y.push(A)}return y},P.prototype.$getStringScreenWidth=function(O,b,y){if(b==0)return[0,0];b==null&&(b=1/0),y=y||0;var T,G;for(G=0;G<O.length&&(T=O.charCodeAt(G),T==9?y+=this.getScreenTabSize(y):T>=4352&&he(T)?y+=2:y+=1,!(y>b));G++);return[y,G]},P.prototype.getRowLength=function(O){var b=1;return this.lineWidgets&&(b+=this.lineWidgets[O]&&this.lineWidgets[O].rowCount||0),!this.$useWrapMode||!this.$wrapData[O]?b:this.$wrapData[O].length+b},P.prototype.getRowLineCount=function(O){return!this.$useWrapMode||!this.$wrapData[O]?1:this.$wrapData[O].length+1},P.prototype.getRowWrapIndent=function(O){if(this.$useWrapMode){var b=this.screenToDocumentPosition(O,Number.MAX_VALUE),y=this.$wrapData[b.row];return y.length&&y[0]<b.column?y.indent:0}else return 0},P.prototype.getScreenLastRowColumn=function(O){var b=this.screenToDocumentPosition(O,Number.MAX_VALUE);return this.documentToScreenColumn(b.row,b.column)},P.prototype.getDocumentLastRowColumn=function(O,b){var y=this.documentToScreenRow(O,b);return this.getScreenLastRowColumn(y)},P.prototype.getDocumentLastRowColumnPosition=function(O,b){var y=this.documentToScreenRow(O,b);return this.screenToDocumentPosition(y,Number.MAX_VALUE/10)},P.prototype.getRowSplitData=function(O){if(this.$useWrapMode)return this.$wrapData[O]},P.prototype.getScreenTabSize=function(O){return this.$tabSize-(O%this.$tabSize|0)},P.prototype.screenToDocumentRow=function(O,b){return this.screenToDocumentPosition(O,b).row},P.prototype.screenToDocumentColumn=function(O,b){return this.screenToDocumentPosition(O,b).column},P.prototype.screenToDocumentPosition=function(O,b,y){if(O<0)return{row:0,column:0};var T,G=0,q=0,ue,Ce=0,Oe=0,gt=this.$screenRowCache,ze=this.$getRowCacheIndex(gt,O),Xe=gt.length;if(Xe&&ze>=0)var Ce=gt[ze],G=this.$docRowCache[ze],ft=O>gt[Xe-1];else var ft=!Xe;for(var pt=this.getLength()-1,mt=this.getNextFoldLine(G),Vt=mt?mt.start.row:1/0;Ce<=O&&(Oe=this.getRowLength(G),!(Ce+Oe>O||G>=pt));)Ce+=Oe,G++,G>Vt&&(G=mt.end.row+1,mt=this.getNextFoldLine(G,mt),Vt=mt?mt.start.row:1/0),ft&&(this.$docRowCache.push(G),this.$screenRowCache.push(Ce));if(mt&&mt.start.row<=G)T=this.getFoldDisplayLine(mt),G=mt.start.row;else{if(Ce+Oe<=O||G>pt)return{row:pt,column:this.getLine(pt).length};T=this.getLine(G),mt=null}var Yt=0,Gt=Math.floor(O-Ce);if(this.$useWrapMode){var Qt=this.$wrapData[G];Qt&&(ue=Qt[Gt],Gt>0&&Qt.length&&(Yt=Qt.indent,q=Qt[Gt-1]||Qt[Qt.length-1],T=T.substring(q)))}return y!==void 0&&this.$bidiHandler.isBidiRow(Ce+Gt,G,Gt)&&(b=this.$bidiHandler.offsetToCol(y)),q+=this.$getStringScreenWidth(T,b-Yt)[1],this.$useWrapMode&&q>=ue&&(q=ue-1),mt?mt.idxToPosition(q):{row:G,column:q}},P.prototype.documentToScreenPosition=function(O,b){if(typeof b>"u")var y=this.$clipPositionToDocument(O.row,O.column);else y=this.$clipPositionToDocument(O,b);O=y.row,b=y.column;var T=0,G=null,q=null;q=this.getFoldAt(O,b,1),q&&(O=q.start.row,b=q.start.column);var ue,Ce=0,Oe=this.$docRowCache,gt=this.$getRowCacheIndex(Oe,O),ze=Oe.length;if(ze&>>=0)var Ce=Oe[gt],T=this.$screenRowCache[gt],Xe=O>Oe[ze-1];else var Xe=!ze;for(var ft=this.getNextFoldLine(Ce),pt=ft?ft.start.row:1/0;Ce<O;){if(Ce>=pt){if(ue=ft.end.row+1,ue>O)break;ft=this.getNextFoldLine(ue,ft),pt=ft?ft.start.row:1/0}else ue=Ce+1;T+=this.getRowLength(Ce),Ce=ue,Xe&&(this.$docRowCache.push(Ce),this.$screenRowCache.push(T))}var mt="";ft&&Ce>=pt?(mt=this.getFoldDisplayLine(ft,O,b),G=ft.start.row):(mt=this.getLine(O).substring(0,b),G=O);var Vt=0;if(this.$useWrapMode){var Yt=this.$wrapData[G];if(Yt){for(var Gt=0;mt.length>=Yt[Gt];)T++,Gt++;mt=mt.substring(Yt[Gt-1]||0,mt.length),Vt=Gt>0?Yt.indent:0}}return this.lineWidgets&&this.lineWidgets[Ce]&&this.lineWidgets[Ce].rowsAbove&&(T+=this.lineWidgets[Ce].rowsAbove),{row:T,column:Vt+this.$getStringScreenWidth(mt)[0]}},P.prototype.documentToScreenColumn=function(O,b){return this.documentToScreenPosition(O,b).column},P.prototype.documentToScreenRow=function(O,b){return this.documentToScreenPosition(O,b).row},P.prototype.getScreenLength=function(){var O=0,b=null;if(this.$useWrapMode)for(var G=this.$wrapData.length,q=0,T=0,b=this.$foldData[T++],ue=b?b.start.row:1/0;q<G;){var Ce=this.$wrapData[q];O+=Ce?Ce.length+1:1,q++,q>ue&&(q=b.end.row+1,b=this.$foldData[T++],ue=b?b.start.row:1/0)}else{O=this.getLength();for(var y=this.$foldData,T=0;T<y.length;T++)b=y[T],O-=b.end.row-b.start.row}return this.lineWidgets&&(O+=this.$getWidgetScreenLength()),O},P.prototype.$setFontMetrics=function(O){this.$enableVarChar&&(this.$getStringScreenWidth=function(b,y,T){if(y===0)return[0,0];y||(y=1/0),T=T||0;var G,q;for(q=0;q<b.length&&(G=b.charAt(q),G===" "?T+=this.getScreenTabSize(T):T+=O.getCharacterWidth(G),!(T>y));q++);return[T,q]})},P.prototype.getPrecedingCharacter=function(){var O=this.selection.getCursor();if(O.column===0)return O.row===0?"":this.doc.getNewLineCharacter();var b=this.getLine(O.row);return b[O.column-1]},P.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},P})();v.$uid=0,v.prototype.$modes=c.$modes,v.prototype.getValue=v.prototype.toString,v.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},v.prototype.$overwrite=!1,v.prototype.$mode=null,v.prototype.$modeId=null,v.prototype.$scrollTop=0,v.prototype.$scrollLeft=0,v.prototype.$wrapLimit=80,v.prototype.$useWrapMode=!1,v.prototype.$wrapLimitRange={min:null,max:null},v.prototype.lineWidgets=null,v.prototype.isFullWidth=he,k.implement(v.prototype,h);var A=1,E=2,S=3,C=4,H=9,U=10,V=11,F=12;function he(P){return P<4352?!1:P>=4352&&P<=4447||P>=4515&&P<=4519||P>=4602&&P<=4607||P>=9001&&P<=9002||P>=11904&&P<=11929||P>=11931&&P<=12019||P>=12032&&P<=12245||P>=12272&&P<=12283||P>=12288&&P<=12350||P>=12353&&P<=12438||P>=12441&&P<=12543||P>=12549&&P<=12589||P>=12593&&P<=12686||P>=12688&&P<=12730||P>=12736&&P<=12771||P>=12784&&P<=12830||P>=12832&&P<=12871||P>=12880&&P<=13054||P>=13056&&P<=19903||P>=19968&&P<=42124||P>=42128&&P<=42182||P>=43360&&P<=43388||P>=44032&&P<=55203||P>=55216&&P<=55238||P>=55243&&P<=55291||P>=63744&&P<=64255||P>=65040&&P<=65049||P>=65072&&P<=65106||P>=65108&&P<=65126||P>=65128&&P<=65131||P>=65281&&P<=65376||P>=65504&&P<=65510}f("./edit_session/folding").Folding.call(v.prototype),f("./edit_session/bracket_match").BracketMatch.call(v.prototype),c.defineOptions(v.prototype,"session",{wrap:{set:function(P){if(!P||P=="off"?P=!1:P=="free"?P=!0:P=="printMargin"?P=-1:typeof P=="string"&&(P=parseInt(P,10)||!1),this.$wrap!=P)if(this.$wrap=P,!P)this.setUseWrapMode(!1);else{var O=typeof P=="number"?P:null;this.setWrapLimitRange(O,O),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(P){P=P=="auto"?this.$mode.type!="text":P!="text",P!=this.$wrapAsCode&&(this.$wrapAsCode=P,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(P){this.$useWorker=P,this.$stopWorker(),P&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(P){P=parseInt(P),P>0&&this.$tabSize!==P&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=P,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(P){this.setFoldStyle(P)},handlesSet:!0},overwrite:{set:function(P){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(P){this.doc.setNewLineMode(P)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(P){this.setMode(P)},get:function(){return this.$modeId},handlesSet:!0}}),g.EditSession=v}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(f,g,j){var k=f("./lib/lang"),x=f("./lib/oop"),_=f("./range").Range,c=(function(){function r(){this.$options={}}return r.prototype.set=function(i){return x.mixin(this.$options,i),this},r.prototype.getOptions=function(){return k.copyObject(this.$options)},r.prototype.setOptions=function(i){this.$options=i},r.prototype.find=function(i){var e=this.$options,n=this.$matchIterator(i,e);if(!n)return!1;var a=null;return n.forEach(function(p,v,A,E){return a=new _(p,v,A,E),v==E&&e.start&&e.start.start&&e.skipCurrent!=!1&&a.isEqual(e.start)?(a=null,!1):!0}),a},r.prototype.findAll=function(i){var e=this.$options;if(!e.needle)return[];this.$assembleRegExp(e);var n=e.range,a=n?i.getLines(n.start.row,n.end.row):i.doc.getAllLines(),p=[],v=e.re;if(e.$isMultiLine){var A=v.length,E=a.length-A,S;e:for(var C=v.offset||0;C<=E;C++){for(var H=0;H<A;H++)if(a[C+H].search(v[H])==-1)continue e;var U=a[C],V=a[C+A-1],F=U.length-U.match(v[0])[0].length,he=V.match(v[A-1])[0].length;S&&S.end.row===C&&S.end.column>F||(p.push(S=new _(C,F,C+A-1,he)),A>2&&(C=C+A-2))}}else for(var P,O=0;O<a.length;O++)if(this.$isMultilineSearch(e)){var b=a.length-1;if(P=this.$multiLineForward(i,v,O,b),P){var y=P.endRow<=b?P.endRow-1:b;y>O&&(O=y),p.push(new _(P.startRow,P.startCol,P.endRow,P.endCol))}}else{P=k.getMatchOffsets(a[O],v);for(var H=0;H<P.length;H++){var T=P[H];p.push(new _(O,T.offset,O,T.offset+T.length))}}if(n){for(var G=n.start.column,q=n.end.column,O=0,H=p.length-1;O<H&&p[O].start.column<G&&p[O].start.row==0;)O++;for(var ue=n.end.row-n.start.row;O<H&&p[H].end.column>q&&p[H].end.row==ue;)H--;for(p=p.slice(O,H+1),O=0,H=p.length;O<H;O++)p[O].start.row+=n.start.row,p[O].end.row+=n.start.row}return p},r.prototype.parseReplaceString=function(i){for(var e={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},n="",a=0,p=i.length;a<p;a++){var v=i.charCodeAt(a);if(v===e.Backslash){if(a++,a>=p){n+="\\";break}var A=i.charCodeAt(a);switch(A){case e.Backslash:n+="\\";break;case e.n:n+=`
|
202
|
+
`;break;case e.t:n+=" ";break}continue}if(v===e.DollarSign){if(a++,a>=p){n+="$";break}var E=i.charCodeAt(a);if(E===e.DollarSign){n+="$$";continue}if(E===e.Digit0||E===e.Ampersand){n+="$&";continue}if(e.Digit1<=E&&E<=e.Digit9){n+="$"+i[a];continue}}n+=i[a]}return n||i},r.prototype.replace=function(i,e){var n=this.$options,a=this.$assembleRegExp(n);if(n.$isMultiLine)return e;if(a){var p=this.$isMultilineSearch(n);p&&(i=i.replace(/\r\n|\r|\n/g,`
|
203
|
+
`));var v=a.exec(i);if(!v||!p&&v[0].length!=i.length)return null;if(e=n.regExp?this.parseReplaceString(e):e.replace(/\$/g,"$$$$"),e=i.replace(a,e),n.preserveCase){e=e.split("");for(var A=Math.min(i.length,i.length);A--;){var E=i[A];E&&E.toLowerCase()!=E?e[A]=e[A].toUpperCase():e[A]=e[A].toLowerCase()}e=e.join("")}return e}},r.prototype.$assembleRegExp=function(i,e){if(i.needle instanceof RegExp)return i.re=i.needle;var n=i.needle;if(!i.needle)return i.re=!1;i.regExp||(n=k.escapeRegExp(n));var a=i.caseSensitive?"gm":"gmi";try{new RegExp(n,"u"),i.$supportsUnicodeFlag=!0,a+="u"}catch{i.$supportsUnicodeFlag=!1}if(i.wholeWord&&(n=h(n,i)),i.$isMultiLine=!e&&/[\n\r]/.test(n),i.$isMultiLine)return i.re=this.$assembleMultilineRegExp(n,a);try{var p=new RegExp(n,a)}catch{p=!1}return i.re=p},r.prototype.$assembleMultilineRegExp=function(i,e){for(var n=i.replace(/\r\n|\r|\n/g,`$
|
204
|
+
^`).split(`
|
205
|
+
`),a=[],p=0;p<n.length;p++)try{a.push(new RegExp(n[p],e))}catch{return!1}return a},r.prototype.$isMultilineSearch=function(i){return i.re&&/\\r\\n|\\r|\\n/.test(i.re.source)&&i.regExp&&!i.$isMultiLine},r.prototype.$multiLineForward=function(i,e,n,a){for(var p,v=o(i,n),A=n;A<=a;){for(var E=0;E<v&&!(A>a);E++){var S=i.getLine(A++);p=p==null?S:p+`
|
206
|
+
`+S}var C=e.exec(p);if(e.lastIndex=0,C){var H=p.slice(0,C.index).split(`
|
207
|
+
`),U=C[0].split(`
|
208
|
+
`),V=n+H.length-1,F=H[H.length-1].length,he=V+U.length-1,P=U.length==1?F+U[0].length:U[U.length-1].length;return{startRow:V,startCol:F,endRow:he,endCol:P}}}return null},r.prototype.$multiLineBackward=function(i,e,n,a,p){for(var v,A=o(i,a),E=i.getLine(a).length-n,S=a;S>=p;){for(var C=0;C<A&&S>=p;C++){var H=i.getLine(S--);v=v==null?H:H+`
|
209
|
+
`+v}var U=t(v,e,E);if(U){var V=v.slice(0,U.index).split(`
|
210
|
+
`),F=U[0].split(`
|
211
|
+
`),he=S+V.length,P=V[V.length-1].length,O=he+F.length-1,b=F.length==1?P+F[0].length:F[F.length-1].length;return{startRow:he,startCol:P,endRow:O,endCol:b}}}return null},r.prototype.$matchIterator=function(i,e){var n=this.$assembleRegExp(e);if(!n)return!1;var a=this.$isMultilineSearch(e),p=this.$multiLineForward,v=this.$multiLineBackward,A=e.backwards==!0,E=e.skipCurrent!=!1,S=n.unicode,C=e.range,H=e.start;H||(H=C?C[A?"end":"start"]:i.selection.getRange()),H.start&&(H=H[E!=A?"end":"start"]);var U=C?C.start.row:0,V=C?C.end.row:i.getLength()-1;if(A)var F=function(O){var b=H.row;if(!P(b,H.column,O)){for(b--;b>=U;b--)if(P(b,Number.MAX_VALUE,O))return;if(e.wrap!=!1){for(b=V,U=H.row;b>=U;b--)if(P(b,Number.MAX_VALUE,O))return}}};else var F=function(b){var y=H.row;if(!P(y,H.column,b)){for(y=y+1;y<=V;y++)if(P(y,0,b))return;if(e.wrap!=!1){for(y=U,V=H.row;y<=V;y++)if(P(y,0,b))return}}};if(e.$isMultiLine)var he=n.length,P=function(O,b,y){var T=A?O-he+1:O;if(!(T<0||T+he>i.getLength())){var G=i.getLine(T),q=G.search(n[0]);if(!(!A&&q<b||q===-1)){for(var ue=1;ue<he;ue++)if(G=i.getLine(T+ue),G.search(n[ue])==-1)return;var Ce=G.match(n[he-1])[0].length;if(!(A&&Ce>b)&&y(T,q,T+he-1,Ce))return!0}}};else if(A)var P=function(b,y,T){if(a){var G=v(i,n,y,b,U);if(!G)return!1;if(T(G.startRow,G.startCol,G.endRow,G.endCol))return!0}else{var q=i.getLine(b),ue=[],Ce,Oe=0;for(n.lastIndex=0;Ce=n.exec(q);){var gt=Ce[0].length;if(Oe=Ce.index,!gt){if(Oe>=q.length)break;n.lastIndex=Oe+=k.skipEmptyMatch(q,Oe,S)}if(Ce.index+gt>y)break;ue.push(Ce.index,gt)}for(var ze=ue.length-1;ze>=0;ze-=2){var Xe=ue[ze-1],gt=ue[ze];if(T(b,Xe,b,Xe+gt))return!0}}};else var P=function(b,y,T){if(n.lastIndex=y,a){var G=p(i,n,b,V);if(G){var q=G.endRow<=V?G.endRow-1:V;q>b&&(b=q)}if(!G)return!1;if(T(G.startRow,G.startCol,G.endRow,G.endCol))return!0}else for(var ue=i.getLine(b),Ce,Oe;Oe=n.exec(ue);){var gt=Oe[0].length;if(Ce=Oe.index,T(b,Ce,b,Ce+gt))return!0;if(!gt&&(n.lastIndex=Ce+=k.skipEmptyMatch(ue,Ce,S),Ce>=ue.length))return!1}};return{forEach:F}},r})();function h(r,i){var e=k.supportsLookbehind();function n(A,E){E===void 0&&(E=!0);var S=e&&i.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return S.test(A)||i.regExp?e&&i.$supportsUnicodeFlag?E?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var a=Array.from(r),p=a[0],v=a[a.length-1];return n(p)+r+n(v,!1)}function t(r,i,e){for(var n=null,a=0;a<=r.length;){i.lastIndex=a;var p=i.exec(r);if(!p)break;var v=p.index+p[0].length;if(v>r.length-e)break;(!n||v>n.index+n[0].length)&&(n=p),a=p.index+1}return n}function o(r,i){var e=5e3,n={row:i,column:0},a=r.doc.positionToIndex(n),p=a+e,v=r.doc.indexToPosition(p),A=v.row;return A+1}g.Search=c}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(f,g,j){var k=this&&this.__extends||(function(){var r=function(i,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var p in a)Object.prototype.hasOwnProperty.call(a,p)&&(n[p]=a[p])},r(i,e)};return function(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(i,e);function n(){this.constructor=i}i.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}})(),x=f("../lib/keys"),_=f("../lib/useragent"),c=x.KEY_MODS,h=(function(){function r(i,e){this.$init(i,e,!1)}return r.prototype.$init=function(i,e,n){this.platform=e||(_.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(i),this.$singleCommand=n},r.prototype.addCommand=function(i){this.commands[i.name]&&this.removeCommand(i),this.commands[i.name]=i,i.bindKey&&this._buildKeyHash(i)},r.prototype.removeCommand=function(i,e){var n=i&&(typeof i=="string"?i:i.name);i=this.commands[n],e||delete this.commands[n];var a=this.commandKeyBinding;for(var p in a){var v=a[p];if(v==i)delete a[p];else if(Array.isArray(v)){var A=v.indexOf(i);A!=-1&&(v.splice(A,1),v.length==1&&(a[p]=v[0]))}}},r.prototype.bindKey=function(i,e,n){if(typeof i=="object"&&i&&(n==null&&(n=i.position),i=i[this.platform]),!!i){if(typeof e=="function")return this.addCommand({exec:e,bindKey:i,name:e.name||i});i.split("|").forEach(function(a){var p="";if(a.indexOf(" ")!=-1){var v=a.split(/\s+/);a=v.pop(),v.forEach(function(S){var C=this.parseKeys(S),H=c[C.hashId]+C.key;p+=(p?" ":"")+H,this._addCommandToBinding(p,"chainKeys")},this),p+=" "}var A=this.parseKeys(a),E=c[A.hashId]+A.key;this._addCommandToBinding(p+E,e,n)},this)}},r.prototype._addCommandToBinding=function(i,e,n){var a=this.commandKeyBinding,p;if(!e)delete a[i];else if(!a[i]||this.$singleCommand)a[i]=e;else{Array.isArray(a[i])?(p=a[i].indexOf(e))!=-1&&a[i].splice(p,1):a[i]=[a[i]],typeof n!="number"&&(n=t(e));var v=a[i];for(p=0;p<v.length;p++){var A=v[p],E=t(A);if(E>n)break}v.splice(p,0,e)}},r.prototype.addCommands=function(i){i&&Object.keys(i).forEach(function(e){var n=i[e];if(n){if(typeof n=="string")return this.bindKey(n,e);typeof n=="function"&&(n={exec:n}),typeof n=="object"&&(n.name||(n.name=e),this.addCommand(n))}},this)},r.prototype.removeCommands=function(i){Object.keys(i).forEach(function(e){this.removeCommand(i[e])},this)},r.prototype.bindKeys=function(i){Object.keys(i).forEach(function(e){this.bindKey(e,i[e])},this)},r.prototype._buildKeyHash=function(i){this.bindKey(i.bindKey,i)},r.prototype.parseKeys=function(i){var e=i.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(E){return E}),n=e.pop(),a=x[n];if(x.FUNCTION_KEYS[a])n=x.FUNCTION_KEYS[a].toLowerCase();else if(e.length){if(e.length==1&&e[0]=="shift")return{key:n.toUpperCase(),hashId:-1}}else return{key:n,hashId:-1};for(var p=0,v=e.length;v--;){var A=x.KEY_MODS[e[v]];if(A==null)return typeof console<"u"&&console.error("invalid modifier "+e[v]+" in "+i),!1;p|=A}return{key:n,hashId:p}},r.prototype.findKeyCommand=function(i,e){var n=c[i]+e;return this.commandKeyBinding[n]},r.prototype.handleKeyboard=function(i,e,n,a){if(!(a<0)){var p=c[e]+n,v=this.commandKeyBinding[p];return i.$keyChain&&(i.$keyChain+=" "+p,v=this.commandKeyBinding[i.$keyChain]||v),v&&(v=="chainKeys"||v[v.length-1]=="chainKeys")?(i.$keyChain=i.$keyChain||p,{command:"null"}):(i.$keyChain&&((!e||e==4)&&n.length==1?i.$keyChain=i.$keyChain.slice(0,-p.length-1):(e==-1||a>0)&&(i.$keyChain="")),{command:v})}},r.prototype.getStatusText=function(i,e){return e.$keyChain||""},r})();function t(r){return typeof r=="object"&&r.bindKey&&r.bindKey.position||(r.isDefault?-100:0)}var o=(function(r){k(i,r);function i(e,n){var a=r.call(this,e,n)||this;return a.$singleCommand=!0,a}return i})(h);o.call=function(r,i,e){h.prototype.$init.call(r,i,e,!0)},h.call=function(r,i,e){h.prototype.$init.call(r,i,e,!1)},g.HashHandler=o,g.MultiHashHandler=h}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(f,g,j){var k=this&&this.__extends||(function(){var t=function(o,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,e){i.__proto__=e}||function(i,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(i[n]=e[n])},t(o,r)};return function(o,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(o,r);function i(){this.constructor=o}o.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}})(),x=f("../lib/oop"),_=f("../keyboard/hash_handler").MultiHashHandler,c=f("../lib/event_emitter").EventEmitter,h=(function(t){k(o,t);function o(r,i){var e=t.call(this,i,r)||this;return e.byName=e.commands,e.setDefaultHandler("exec",function(n){return n.args?n.command.exec(n.editor,n.args,n.event,!1):n.command.exec(n.editor,{},n.event,!0)}),e}return o.prototype.exec=function(r,i,e){if(Array.isArray(r)){for(var n=r.length;n--;)if(this.exec(r[n],i,e))return!0;return!1}typeof r=="string"&&(r=this.commands[r]);var a={editor:i,command:r,args:e};return this.canExecute(r,i)?(a.returnValue=this._emit("exec",a),this._signal("afterExec",a),a.returnValue!==!1):(this._signal("commandUnavailable",a),!1)},o.prototype.canExecute=function(r,i){return typeof r=="string"&&(r=this.commands[r]),!(!r||i&&i.$readOnly&&!r.readOnly||this.$checkCommandState!=!1&&r.isAvailable&&!r.isAvailable(i))},o.prototype.toggleRecording=function(r){if(!this.$inReplay)return r&&r._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(i){this.macro.push([i.command,i.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},o.prototype.replay=function(r){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(r);try{this.$inReplay=!0,this.macro.forEach(function(i){typeof i=="string"?this.exec(i,r):this.exec(i[0],r,i[1])},this)}finally{this.$inReplay=!1}}},o.prototype.trimMacro=function(r){return r.map(function(i){return typeof i[0]!="string"&&(i[0]=i[0].name),i[1]||(i=i[0]),i})},o})(_);x.implement(h.prototype,c),g.CommandManager=h}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(f,g,j){var k=f("../lib/lang"),x=f("../config"),_=f("../range").Range;function c(t,o){return{win:t,mac:o}}g.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:c("Ctrl-,","Command-,"),exec:function(t){x.loadModule("ace/ext/settings_menu",function(o){o.init(t),t.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:c("Alt-E","F4"),exec:function(t){x.loadModule("ace/ext/error_marker",function(o){o.showErrorMarker(t,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:c("Alt-Shift-E","Shift-F4"),exec:function(t){x.loadModule("ace/ext/error_marker",function(o){o.showErrorMarker(t,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:c("Ctrl-A","Command-A"),exec:function(t){t.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:c(null,"Ctrl-L"),exec:function(t){t.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:c("Ctrl-L","Command-L"),exec:function(t,o){typeof o=="number"&&!isNaN(o)&&t.gotoLine(o),t.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:c("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(t){t.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:c("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(t){t.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:c("F2","F2"),exec:function(t){t.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:c("Alt-F2","Alt-F2"),exec:function(t){t.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:c(null,"Ctrl-Command-Option-0"),exec:function(t){t.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:c(null,"Ctrl-Command-Option-0"),exec:function(t){t.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:c("Alt-0","Command-Option-0"),exec:function(t){t.session.foldAll(),t.session.unfold(t.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:c("Alt-Shift-0","Command-Option-Shift-0"),exec:function(t){t.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:c("Ctrl-K","Command-G"),exec:function(t){t.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:c("Ctrl-Shift-K","Command-Shift-G"),exec:function(t){t.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:c("Alt-K","Ctrl-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:c("Alt-Shift-K","Ctrl-Shift-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:c("Ctrl-F","Command-F"),exec:function(t){x.loadModule("ace/ext/searchbox",function(o){o.Search(t)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(t){t.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:c("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(t){t.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:c("Ctrl-Home","Command-Home|Command-Up"),exec:function(t){t.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:c("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(t){t.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:c("Up","Up|Ctrl-P"),exec:function(t,o){t.navigateUp(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:c("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(t){t.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:c("Ctrl-End","Command-End|Command-Down"),exec:function(t){t.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:c("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(t){t.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:c("Down","Down|Ctrl-N"),exec:function(t,o){t.navigateDown(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:c("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(t){t.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:c("Ctrl-Left","Option-Left"),exec:function(t){t.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:c("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:c("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(t){t.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:c("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(t){t.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:c("Left","Left|Ctrl-B"),exec:function(t,o){t.navigateLeft(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:c("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(t){t.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:c("Ctrl-Right","Option-Right"),exec:function(t){t.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:c("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:c("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(t){t.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:c("Shift-Right","Shift-Right"),exec:function(t){t.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:c("Right","Right|Ctrl-F"),exec:function(t,o){t.navigateRight(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(t){t.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:c(null,"Option-PageDown"),exec:function(t){t.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:c("PageDown","PageDown|Ctrl-V"),exec:function(t){t.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(t){t.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:c(null,"Option-PageUp"),exec:function(t){t.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(t){t.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:c("Ctrl-Up",null),exec:function(t){t.renderer.scrollBy(0,-2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:c("Ctrl-Down",null),exec:function(t){t.renderer.scrollBy(0,2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:c("Ctrl-Alt-E","Command-Option-E"),exec:function(t){t.commands.toggleRecording(t)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:c("Ctrl-Shift-E","Command-Shift-E"),exec:function(t){t.commands.replay(t)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:c("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(t){t.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:c("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(t){t.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:c("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(t){t.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:c(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(t){},readOnly:!0},{name:"cut",description:"Cut",exec:function(t){var o=t.$copyWithEmptySelection&&t.selection.isEmpty(),r=o?t.selection.getLineRange():t.selection.getRange();t._emit("cut",r),r.isEmpty()||t.session.remove(r),t.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(t,o){t.$handlePaste(o)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:c("Ctrl-D","Command-D"),exec:function(t){t.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:c("Ctrl-Shift-D","Command-Shift-D"),exec:function(t){t.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:c("Ctrl-Alt-S","Command-Alt-S"),exec:function(t){t.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:c("Ctrl-/","Command-/"),exec:function(t){t.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:c("Ctrl-Shift-/","Command-Shift-/"),exec:function(t){t.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:c("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(t){t.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:c("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(t){t.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:c("Ctrl-H","Command-Option-F"),exec:function(t){x.loadModule("ace/ext/searchbox",function(o){o.Search(t,!0)})}},{name:"undo",description:"Undo",bindKey:c("Ctrl-Z","Command-Z"),exec:function(t){t.undo()}},{name:"redo",description:"Redo",bindKey:c("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(t){t.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:c("Alt-Shift-Up","Command-Option-Up"),exec:function(t){t.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:c("Alt-Up","Option-Up"),exec:function(t){t.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:c("Alt-Shift-Down","Command-Option-Down"),exec:function(t){t.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:c("Alt-Down","Option-Down"),exec:function(t){t.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:c("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(t){t.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:c("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(t){t.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:c("Shift-Delete",null),exec:function(t){if(t.selection.isEmpty())t.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:c("Alt-Backspace","Command-Backspace"),exec:function(t){t.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:c("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(t){t.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:c("Ctrl-Shift-Backspace",null),exec:function(t){var o=t.selection.getRange();o.start.column=0,t.session.remove(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:c("Ctrl-Shift-Delete",null),exec:function(t){var o=t.selection.getRange();o.end.column=Number.MAX_VALUE,t.session.remove(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:c("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(t){t.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:c("Ctrl-Delete","Alt-Delete"),exec:function(t){t.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:c("Shift-Tab","Shift-Tab"),exec:function(t){t.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:c("Tab","Tab"),exec:function(t){t.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:c("Ctrl-[","Ctrl-["),exec:function(t){t.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:c("Ctrl-]","Ctrl-]"),exec:function(t){t.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(t,o){t.insert(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(t,o){t.insert(k.stringRepeat(o.text||"",o.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:c(null,"Ctrl-O"),exec:function(t){t.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:c("Alt-Shift-X","Ctrl-T"),exec:function(t){t.transposeLetters()},multiSelectAction:function(t){t.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:c("Ctrl-U","Ctrl-U"),exec:function(t){t.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:c("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(t){t.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:c(null,null),exec:function(t){t.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:c("Ctrl-Shift-L","Command-Shift-L"),exec:function(t){var o=t.selection.getRange();o.start.column=o.end.column=0,o.end.row++,t.selection.setRange(o,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:c("Ctrl+F3","F3"),exec:function(t){t.openLink()}},{name:"joinlines",description:"Join lines",bindKey:c(null,null),exec:function(t){for(var o=t.selection.isBackwards(),r=o?t.selection.getSelectionLead():t.selection.getSelectionAnchor(),i=o?t.selection.getSelectionAnchor():t.selection.getSelectionLead(),e=t.session.doc.getLine(r.row).length,n=t.session.doc.getTextRange(t.selection.getRange()),a=n.replace(/\n\s*/," ").length,p=t.session.doc.getLine(r.row),v=r.row+1;v<=i.row+1;v++){var A=k.stringTrimLeft(k.stringTrimRight(t.session.doc.getLine(v)));A.length!==0&&(A=" "+A),p+=A}i.row+1<t.session.doc.getLength()-1&&(p+=t.session.doc.getNewLineCharacter()),t.clearSelection(),t.session.doc.replace(new _(r.row,0,i.row+2,0),p),a>0?(t.selection.moveCursorTo(r.row,r.column),t.selection.selectTo(r.row,r.column+a)):(e=t.session.doc.getLine(r.row).length>e?e+1:e,t.selection.moveCursorTo(r.row,e))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:c(null,null),exec:function(t){var o=t.session.doc.getLength()-1,r=t.session.doc.getLine(o).length,i=t.selection.rangeList.ranges,e=[];i.length<1&&(i=[t.selection.getRange()]);for(var n=0;n<i.length;n++)n==i.length-1&&(i[n].end.row===o&&i[n].end.column===r||e.push(new _(i[n].end.row,i[n].end.column,o,r))),n===0?i[n].start.row===0&&i[n].start.column===0||e.push(new _(0,0,i[n].start.row,i[n].start.column)):e.push(new _(i[n-1].end.row,i[n-1].end.column,i[n].start.row,i[n].start.column));t.exitMultiSelectMode(),t.clearSelection();for(var n=0;n<e.length;n++)t.selection.addRange(e[n],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(t){t.selection.clearSelection(),t.navigateLineEnd(),t.insert(`
|
212
|
+
`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(t){t.selection.clearSelection();var o=t.getCursorPosition();t.selection.moveTo(o.row-1,Number.MAX_VALUE),t.insert(`
|
213
|
+
`),o.row===0&&t.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(t){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),t.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:c("F1","F1"),exec:function(t){t.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:c(null,null),exec:function(t){t.prompt({$type:"modes"})},readOnly:!0}];for(var h=1;h<9;h++)g.commands.push({name:"foldToLevel"+h,description:"Fold To Level "+h,level:h,exec:function(t){t.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(f,g,j){var k=f("../lib/keys"),x=f("../mouse/default_gutter_handler").GutterTooltip,_=(function(){function h(t){this.editor=t,this.gutterLayer=t.renderer.$gutterLayer,this.element=t.renderer.$gutter,this.lines=t.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new x(this.editor)}return h.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},h.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},h.prototype.$onGutterKeyDown=function(t){if(this.annotationTooltip.isOpen){t.preventDefault(),t.keyCode===k.escape&&this.annotationTooltip.hideTooltip();return}if(t.target===this.element){if(t.keyCode!=k.enter)return;t.preventDefault();var o=this.editor.getCursorPosition().row;this.editor.isRowVisible(o)||this.editor.scrollToLine(o,!0,!0),setTimeout((function(){var r=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),i=this.$findNearestFoldLaneWidget(r),e=this.$findNearestAnnotation(r);if(!(i===null&&e===null)){var n=this.$findClosestNumber(i,e,r);if(n===i)if(this.activeLane="fold",this.activeRowIndex=i,this.$isCustomWidgetVisible(i)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=e,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(t),setTimeout((function(){this.editor._signal("gutterkeydown",new c(t,this))}).bind(this),10)},h.prototype.$handleGutterKeyboardInteraction=function(t){if(t.keyCode===k.tab){t.preventDefault();return}if(t.keyCode===k.escape){t.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(t.keyCode===k.up){switch(t.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(t.keyCode===k.down){switch(t.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(t.keyCode===k.left){t.preventDefault(),this.$switchLane("annotation");return}if(t.keyCode===k.right){t.preventDefault(),this.$switchLane("fold");return}if(t.keyCode===k.enter||t.keyCode===k.space){switch(t.preventDefault(),this.activeLane){case"fold":var o=this.$rowIndexToRow(this.activeRowIndex),r=this.editor.session.$gutterCustomWidgets[o];if(r)r.callbacks&&r.callbacks.onClick&&r.callbacks.onClick(t,o);else if(this.gutterLayer.session.foldWidgets[o]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),t),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==o&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(o),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var i=this.lines.cells[this.activeRowIndex].element.childNodes[2],e=i.getBoundingClientRect(),n=this.annotationTooltip.getElement().style;n.left=e.right+"px",n.top=e.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},h.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},h.prototype.$isFoldWidgetVisible=function(t){var o=this.editor.isRowFullyVisible(this.$rowIndexToRow(t)),r=this.$getFoldWidget(t).style.display!=="none";return o&&r},h.prototype.$isCustomWidgetVisible=function(t){var o=this.editor.isRowFullyVisible(this.$rowIndexToRow(t)),r=!!this.$getCustomWidget(t);return o&&r},h.prototype.$isAnnotationVisible=function(t){var o=this.editor.isRowFullyVisible(this.$rowIndexToRow(t)),r=this.$getAnnotation(t).style.display!=="none";return o&&r},h.prototype.$getFoldWidget=function(t){var o=this.lines.get(t),r=o.element;return r.childNodes[1]},h.prototype.$getCustomWidget=function(t){var o=this.lines.get(t),r=o.element;return r.childNodes[3]},h.prototype.$getAnnotation=function(t){var o=this.lines.get(t),r=o.element;return r.childNodes[2]},h.prototype.$findNearestFoldLaneWidget=function(t){if(this.$isCustomWidgetVisible(t)||this.$isFoldWidgetVisible(t))return t;for(var o=0;t-o>0||t+o<this.lines.getLength()-1;){if(o++,t-o>=0&&this.$isCustomWidgetVisible(t-o))return t-o;if(t+o<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(t+o))return t+o;if(t-o>=0&&this.$isFoldWidgetVisible(t-o))return t-o;if(t+o<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(t+o))return t+o}return null},h.prototype.$findNearestAnnotation=function(t){if(this.$isAnnotationVisible(t))return t;for(var o=0;t-o>0||t+o<this.lines.getLength()-1;){if(o++,t-o>=0&&this.$isAnnotationVisible(t-o))return t-o;if(t+o<=this.lines.getLength()-1&&this.$isAnnotationVisible(t+o))return t+o}return null},h.prototype.$focusFoldWidget=function(t){if(t!=null){var o=this.$getFoldWidget(t);o.classList.add(this.editor.renderer.keyboardFocusClassName),o.focus()}},h.prototype.$focusCustomWidget=function(t){if(t!=null){var o=this.$getCustomWidget(t);o&&(o.classList.add(this.editor.renderer.keyboardFocusClassName),o.focus())}},h.prototype.$focusAnnotation=function(t){if(t!=null){var o=this.$getAnnotation(t);o.classList.add(this.editor.renderer.keyboardFocusClassName),o.focus()}},h.prototype.$blurFoldWidget=function(t){var o=this.$getFoldWidget(t);o.classList.remove(this.editor.renderer.keyboardFocusClassName),o.blur()},h.prototype.$blurCustomWidget=function(t){var o=this.$getCustomWidget(t);o&&(o.classList.remove(this.editor.renderer.keyboardFocusClassName),o.blur())},h.prototype.$blurAnnotation=function(t){var o=this.$getAnnotation(t);o.classList.remove(this.editor.renderer.keyboardFocusClassName),o.blur()},h.prototype.$moveFoldWidgetUp=function(){for(var t=this.activeRowIndex;t>0;)if(t--,this.$isFoldWidgetVisible(t)||this.$isCustomWidgetVisible(t)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=t,this.$isFoldWidgetVisible(t)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},h.prototype.$moveFoldWidgetDown=function(){for(var t=this.activeRowIndex;t<this.lines.getLength()-1;)if(t++,this.$isFoldWidgetVisible(t)||this.$isCustomWidgetVisible(t)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=t,this.$isFoldWidgetVisible(t)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},h.prototype.$moveAnnotationUp=function(){for(var t=this.activeRowIndex;t>0;)if(t--,this.$isAnnotationVisible(t)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=t,this.$focusAnnotation(this.activeRowIndex);return}},h.prototype.$moveAnnotationDown=function(){for(var t=this.activeRowIndex;t<this.lines.getLength()-1;)if(t++,this.$isAnnotationVisible(t)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=t,this.$focusAnnotation(this.activeRowIndex);return}},h.prototype.$findClosestNumber=function(t,o,r){return t===null?o:o===null||Math.abs(r-t)<=Math.abs(r-o)?t:o},h.prototype.$switchLane=function(t){switch(t){case"annotation":if(this.activeLane==="annotation")break;var o=this.$findNearestAnnotation(this.activeRowIndex);if(o==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=o,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var r=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(r===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=r,this.$isCustomWidgetVisible(r)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},h.prototype.$rowIndexToRow=function(t){var o=this.lines.get(t);return o?o.row:null},h.prototype.$rowToRowIndex=function(t){for(var o=0;o<this.lines.getLength();o++){var r=this.lines.get(o);if(r.row==t)return o}return null},h})();g.GutterKeyboardHandler=_;var c=(function(){function h(t,o){this.gutterKeyboardHandler=o,this.domEvent=t}return h.prototype.getKey=function(){return k.keyCodeToString(this.domEvent.keyCode)},h.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},h.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},h.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},h})();g.GutterKeyboardEvent=c}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys","ace/lib/event","ace/tooltip"],function(f,g,j){var k=this&&this.__values||function(b){var y=typeof Symbol=="function"&&Symbol.iterator,T=y&&b[y],G=0;if(T)return T.call(b);if(b&&typeof b.length=="number")return{next:function(){return b&&G>=b.length&&(b=void 0),{value:b&&b[G++],done:!b}}};throw new TypeError(y?"Object is not iterable.":"Symbol.iterator is not defined.")},x=f("./lib/oop"),_=f("./lib/dom"),c=f("./lib/lang"),h=f("./lib/useragent"),t=f("./keyboard/textinput").TextInput,o=f("./mouse/mouse_handler").MouseHandler,r=f("./mouse/fold_handler").FoldHandler,i=f("./keyboard/keybinding").KeyBinding,e=f("./edit_session").EditSession,n=f("./search").Search,a=f("./range").Range,p=f("./lib/event_emitter").EventEmitter,v=f("./commands/command_manager").CommandManager,A=f("./commands/default_commands").commands,E=f("./config"),S=f("./token_iterator").TokenIterator,C=f("./keyboard/gutter_handler").GutterKeyboardHandler,H=f("./config").nls,U=f("./clipboard"),V=f("./lib/keys"),F=f("./lib/event"),he=f("./tooltip").HoverTooltip,P=(function(){function b(y,T,G){this.id="editor"+ ++b.$uid,this.session,this.$toDestroy=[];var q=y.getContainerElement();this.container=q,this.renderer=y,this.commands=new v(h.isMac?"mac":"win",A),typeof document=="object"&&(this.textInput=new t(y.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new o(this),new r(this)),this.keyBinding=new i(this),this.$search=new n().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=c.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(ue,Ce){Ce._$emitInputEvent.schedule(31)}),this.setSession(T||G&&G.session||new e("")),E.resetOptions(this),G&&this.setOptions(G),E._signal("editor",this)}return b.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},b.prototype.startOperation=function(y){this.session.startOperation(y)},b.prototype.endOperation=function(y){this.session.endOperation(y)},b.prototype.onStartOperation=function(y){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,y||(this.previousCommand=null)},b.prototype.onEndOperation=function(y){if(this.curOp&&this.session){if(y&&y.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var T=this.curOp.command,G=T&&T.scrollIntoView;if(G){switch(G){case"center-animate":G="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var q=this.selection.getRange(),ue=this.renderer.layerConfig;(q.start.row>=ue.lastRow||q.end.row<=ue.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}G=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},b.prototype.$historyTracker=function(y){if(this.$mergeUndoDeltas){var T=this.prevOp,G=this.$mergeableCommands,q=T.command&&y.command.name==T.command.name;if(y.command.name=="insertstring"){var ue=y.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),q=q&&this.mergeNextCommand&&(!/\s/.test(ue)||/\s/.test(T.args)),this.mergeNextCommand=!0}else q=q&&G.indexOf(y.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(q=!1),q?this.session.mergeUndoDeltas=!0:G.indexOf(y.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},b.prototype.setKeyboardHandler=function(y,T){if(y&&typeof y=="string"&&y!="ace"){this.$keybindingId=y;var G=this;E.loadModule(["keybinding",y],function(q){G.$keybindingId==y&&G.keyBinding.setKeyboardHandler(q&&q.handler),T&&T()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(y),T&&T()},b.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},b.prototype.setSession=function(y){if(this.session!=y){this.curOp&&this.endOperation(),this.curOp={};var T=this.session;if(T){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var G=this.session.getSelection();G.off("changeCursor",this.$onCursorChange),G.off("changeSelection",this.$onSelectionChange)}this.session=y,y?(this.$onDocumentChange=this.onDocumentChange.bind(this),y.on("change",this.$onDocumentChange),this.renderer.setSession(y),this.$onChangeMode=this.onChangeMode.bind(this),y.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),y.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),y.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),y.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),y.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),y.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=y.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(y)),this._signal("changeSession",{session:y,oldSession:T}),this.curOp=null,T&&T._signal("changeEditor",{oldEditor:this}),T&&(T.$editor=null),y&&y._signal("changeEditor",{editor:this}),y&&(y.$editor=this),y&&!y.destroyed&&y.bgTokenizer.scheduleStart()}},b.prototype.getSession=function(){return this.session},b.prototype.setValue=function(y,T){return this.session.doc.setValue(y),T?T==1?this.navigateFileEnd():T==-1&&this.navigateFileStart():this.selectAll(),y},b.prototype.getValue=function(){return this.session.getValue()},b.prototype.getSelection=function(){return this.selection},b.prototype.resize=function(y){this.renderer.onResize(y)},b.prototype.setTheme=function(y,T){this.renderer.setTheme(y,T)},b.prototype.getTheme=function(){return this.renderer.getTheme()},b.prototype.setStyle=function(y,T){this.renderer.setStyle(y,T)},b.prototype.unsetStyle=function(y){this.renderer.unsetStyle(y)},b.prototype.getFontSize=function(){return this.getOption("fontSize")||_.computedStyle(this.container).fontSize},b.prototype.setFontSize=function(y){this.setOption("fontSize",y)},b.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var y=this;this.$highlightPending=!0,setTimeout(function(){y.$highlightPending=!1;var T=y.session;if(!(!T||T.destroyed)){T.$bracketHighlight&&(T.$bracketHighlight.markerIds.forEach(function(ft){T.removeMarker(ft)}),T.$bracketHighlight=null);var G=y.getCursorPosition(),q=y.getKeyboardHandler(),ue=q&&q.$getDirectionForHighlight&&q.$getDirectionForHighlight(y),Ce=T.getMatchingBracketRanges(G,ue);if(!Ce){var Oe=new S(T,G.row,G.column),gt=Oe.getCurrentToken();if(gt&&/\b(?:tag-open|tag-name)/.test(gt.type)){var ze=T.getMatchingTags(G);ze&&(Ce=[ze.openTagName.isEmpty()?ze.openTag:ze.openTagName,ze.closeTagName.isEmpty()?ze.closeTag:ze.closeTagName])}}if(!Ce&&T.$mode.getMatching&&(Ce=T.$mode.getMatching(y.session)),!Ce){y.getHighlightIndentGuides()&&y.renderer.$textLayer.$highlightIndentGuide();return}var Xe="ace_bracket";Array.isArray(Ce)?Ce.length==1&&(Xe="ace_error_bracket"):Ce=[Ce],Ce.length==2&&(a.comparePoints(Ce[0].end,Ce[1].start)==0?Ce=[a.fromPoints(Ce[0].start,Ce[1].end)]:a.comparePoints(Ce[0].start,Ce[1].end)==0&&(Ce=[a.fromPoints(Ce[1].start,Ce[0].end)])),T.$bracketHighlight={ranges:Ce,markerIds:Ce.map(function(ft){return T.addMarker(ft,Xe,"text")})},y.getHighlightIndentGuides()&&y.renderer.$textLayer.$highlightIndentGuide()}},50)}},b.prototype.focus=function(){this.textInput.focus()},b.prototype.isFocused=function(){return this.textInput.isFocused()},b.prototype.blur=function(){this.textInput.blur()},b.prototype.onFocus=function(y){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",y))},b.prototype.onBlur=function(y){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",y))},b.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},b.prototype.onDocumentChange=function(y){var T=this.session.$useWrapMode,G=y.start.row==y.end.row?y.end.row:1/0;this.renderer.updateLines(y.start.row,G,T),this._signal("change",y),this.$cursorChange()},b.prototype.onTokenizerUpdate=function(y){var T=y.data;this.renderer.updateLines(T.first,T.last)},b.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},b.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},b.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},b.prototype.$updateHighlightActiveLine=function(){var y=this.getSession(),T;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(T=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(T=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(T=!1)),y.$highlightLineMarker&&!T)y.removeMarker(y.$highlightLineMarker.id),y.$highlightLineMarker=null;else if(!y.$highlightLineMarker&&T){var G=new a(T.row,T.column,T.row,1/0);G.id=y.addMarker(G,"ace_active-line","screenLine"),y.$highlightLineMarker=G}else T&&(y.$highlightLineMarker.start.row=T.row,y.$highlightLineMarker.end.row=T.row,y.$highlightLineMarker.start.column=T.column,y._signal("changeBackMarker"))},b.prototype.onSelectionChange=function(y){var T=this.session;if(T.$selectionMarker&&T.removeMarker(T.$selectionMarker),T.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var G=this.selection.getRange(),q=this.getSelectionStyle();T.$selectionMarker=T.addMarker(G,"ace_selection",q)}var ue=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(ue),this._signal("changeSelection")},b.prototype.$getSelectionHighLightRegexp=function(){var y=this.session,T=this.getSelectionRange();if(!(T.isEmpty()||T.isMultiLine())){var G=T.start.column,q=T.end.column,ue=y.getLine(T.start.row),Ce=ue.substring(G,q);if(!(Ce.length>5e3||!/[\w\d]/.test(Ce))){var Oe=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:Ce}),gt=ue.substring(G-1,q+1);if(Oe.test(gt))return Oe}}},b.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},b.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},b.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},b.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},b.prototype.onChangeMode=function(y){this.renderer.updateText(),this._emit("changeMode",y)},b.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},b.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},b.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},b.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},b.prototype.getCopyText=function(){var y=this.getSelectedText(),T=this.session.doc.getNewLineCharacter(),G=!1;if(!y&&this.$copyWithEmptySelection){G=!0;for(var q=this.selection.getAllRanges(),ue=0;ue<q.length;ue++){var Ce=q[ue];ue&&q[ue-1].start.row==Ce.start.row||(y+=this.session.getLine(Ce.start.row)+T)}}var Oe={text:y};return this._signal("copy",Oe),U.lineMode=G?Oe.text:!1,Oe.text},b.prototype.onCopy=function(){this.commands.exec("copy",this)},b.prototype.onCut=function(){this.commands.exec("cut",this)},b.prototype.onPaste=function(y,T){var G={text:y,event:T};this.commands.exec("paste",this,G)},b.prototype.$handlePaste=function(y){typeof y=="string"&&(y={text:y}),this._signal("paste",y);var T=y.text,G=T===U.lineMode,q=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)G?q.insert({row:this.selection.lead.row,column:0},T):this.insert(T);else if(G)this.selection.rangeList.ranges.forEach(function(Xe){q.insert({row:Xe.start.row,column:0},T)});else{var ue=T.split(/\r\n|\r|\n/),Ce=this.selection.rangeList.ranges,Oe=ue.length==2&&(!ue[0]||!ue[1]);if(ue.length!=Ce.length||Oe)return this.commands.exec("insertstring",this,T);for(var gt=Ce.length;gt--;){var ze=Ce[gt];ze.isEmpty()||q.remove(ze),q.insert(ze.start,ue[gt])}}},b.prototype.execCommand=function(y,T){return this.commands.exec(y,this,T)},b.prototype.insert=function(y,T){var G=this.session,q=G.getMode(),ue=this.getCursorPosition();if(this.getBehavioursEnabled()&&!T){var Ce=q.transformAction(G.getState(ue.row),"insertion",this,G,y);Ce&&(y!==Ce.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),y=Ce.text)}if(y==" "&&(y=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&y.indexOf(`
|
214
|
+
`)==-1){var Oe=a.fromPoints(ue,ue);Oe.end.column+=y.length,this.session.remove(Oe)}}else{var Oe=this.getSelectionRange();ue=this.session.remove(Oe),this.clearSelection()}if(y==`
|
215
|
+
`||y==`\r
|
216
|
+
`){var ft=G.getLine(ue.row);if(ue.column>ft.search(/\S|$/)){var gt=ft.substr(ue.column).search(/\S|$/);G.doc.removeInLine(ue.row,ue.column,ue.column+gt)}}this.clearSelection();var ze=ue.column,Xe=G.getState(ue.row),ft=G.getLine(ue.row),pt=q.checkOutdent(Xe,ft,y);if(G.insert(ue,y),Ce&&Ce.selection&&(Ce.selection.length==2?this.selection.setSelectionRange(new a(ue.row,ze+Ce.selection[0],ue.row,ze+Ce.selection[1])):this.selection.setSelectionRange(new a(ue.row+Ce.selection[0],Ce.selection[1],ue.row+Ce.selection[2],Ce.selection[3]))),this.$enableAutoIndent){if(G.getDocument().isNewLine(y)){var mt=q.getNextLineIndent(Xe,ft.slice(0,ue.column),G.getTabString());G.insert({row:ue.row+1,column:0},mt)}pt&&q.autoOutdent(Xe,G,ue.row)}},b.prototype.autoIndent=function(){for(var y=this.session,T=y.getMode(),G=this.selection.isEmpty()?[new a(0,0,y.doc.getLength()-1,0)]:this.selection.getAllRanges(),q="",ue="",Ce="",Oe=y.getTabString(),gt=0;gt<G.length;gt++)for(var ze=G[gt].start.row,Xe=G[gt].end.row,ft=ze;ft<=Xe;ft++){ft>0&&(q=y.getState(ft-1),ue=y.getLine(ft-1),Ce=T.getNextLineIndent(q,ue,Oe));var pt=y.getLine(ft),mt=T.$getIndent(pt);if(Ce!==mt){if(mt.length>0){var Vt=new a(ft,0,ft,mt.length);y.remove(Vt)}Ce.length>0&&y.insert({row:ft,column:0},Ce)}T.autoOutdent(q,y,ft)}},b.prototype.onTextInput=function(y,T){if(!T)return this.keyBinding.onTextInput(y);this.startOperation({command:{name:"insertstring"}});var G=this.applyComposition.bind(this,y,T);this.selection.rangeCount?this.forEachSelection(G):G(),this.endOperation()},b.prototype.applyComposition=function(y,T){if(T.extendLeft||T.extendRight){var G=this.selection.getRange();G.start.column-=T.extendLeft,G.end.column+=T.extendRight,G.start.column<0&&(G.start.row--,G.start.column+=this.session.getLine(G.start.row).length+1),this.selection.setRange(G),!y&&!G.isEmpty()&&this.remove()}if((y||!this.selection.isEmpty())&&this.insert(y,!0),T.restoreStart||T.restoreEnd){var G=this.selection.getRange();G.start.column-=T.restoreStart,G.end.column-=T.restoreEnd,this.selection.setRange(G)}},b.prototype.onCommandKey=function(y,T,G){return this.keyBinding.onCommandKey(y,T,G)},b.prototype.setOverwrite=function(y){this.session.setOverwrite(y)},b.prototype.getOverwrite=function(){return this.session.getOverwrite()},b.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},b.prototype.setScrollSpeed=function(y){this.setOption("scrollSpeed",y)},b.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},b.prototype.setDragDelay=function(y){this.setOption("dragDelay",y)},b.prototype.getDragDelay=function(){return this.getOption("dragDelay")},b.prototype.setSelectionStyle=function(y){this.setOption("selectionStyle",y)},b.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},b.prototype.setHighlightActiveLine=function(y){this.setOption("highlightActiveLine",y)},b.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},b.prototype.setHighlightGutterLine=function(y){this.setOption("highlightGutterLine",y)},b.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},b.prototype.setHighlightSelectedWord=function(y){this.setOption("highlightSelectedWord",y)},b.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},b.prototype.setAnimatedScroll=function(y){this.renderer.setAnimatedScroll(y)},b.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},b.prototype.setShowInvisibles=function(y){this.renderer.setShowInvisibles(y)},b.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},b.prototype.setDisplayIndentGuides=function(y){this.renderer.setDisplayIndentGuides(y)},b.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},b.prototype.setHighlightIndentGuides=function(y){this.renderer.setHighlightIndentGuides(y)},b.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},b.prototype.setShowPrintMargin=function(y){this.renderer.setShowPrintMargin(y)},b.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},b.prototype.setPrintMarginColumn=function(y){this.renderer.setPrintMarginColumn(y)},b.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},b.prototype.setReadOnly=function(y){this.setOption("readOnly",y)},b.prototype.getReadOnly=function(){return this.getOption("readOnly")},b.prototype.setBehavioursEnabled=function(y){this.setOption("behavioursEnabled",y)},b.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},b.prototype.setWrapBehavioursEnabled=function(y){this.setOption("wrapBehavioursEnabled",y)},b.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},b.prototype.setShowFoldWidgets=function(y){this.setOption("showFoldWidgets",y)},b.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},b.prototype.setFadeFoldWidgets=function(y){this.setOption("fadeFoldWidgets",y)},b.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},b.prototype.remove=function(y){this.selection.isEmpty()&&(y=="left"?this.selection.selectLeft():this.selection.selectRight());var T=this.getSelectionRange();if(this.getBehavioursEnabled()){var G=this.session,q=G.getState(T.start.row),ue=G.getMode().transformAction(q,"deletion",this,G,T);if(T.end.column===0){var Ce=G.getTextRange(T);if(Ce[Ce.length-1]==`
|
217
|
+
`){var Oe=G.getLine(T.end.row);/^\s+$/.test(Oe)&&(T.end.column=Oe.length)}}ue&&(T=ue)}this.session.remove(T),this.clearSelection()},b.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},b.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},b.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},b.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var y=this.getSelectionRange();y.start.column==y.end.column&&y.start.row==y.end.row&&(y.end.column=0,y.end.row++),this.session.remove(y),this.clearSelection()},b.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var y=this.getCursorPosition();this.insert(`
|
218
|
+
`),this.moveCursorToPosition(y)},b.prototype.setGhostText=function(y,T){this.renderer.setGhostText(y,T)},b.prototype.removeGhostText=function(){this.renderer.removeGhostText()},b.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var y=this.getCursorPosition(),T=y.column;if(T!==0){var G=this.session.getLine(y.row),q,ue;T<G.length?(q=G.charAt(T)+G.charAt(T-1),ue=new a(y.row,T-1,y.row,T+1)):(q=G.charAt(T-1)+G.charAt(T-2),ue=new a(y.row,T-2,y.row,T)),this.session.replace(ue,q),this.session.selection.moveToPosition(ue.end)}}},b.prototype.toLowerCase=function(){var y=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var T=this.getSelectionRange(),G=this.session.getTextRange(T);this.session.replace(T,G.toLowerCase()),this.selection.setSelectionRange(y)},b.prototype.toUpperCase=function(){var y=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var T=this.getSelectionRange(),G=this.session.getTextRange(T);this.session.replace(T,G.toUpperCase()),this.selection.setSelectionRange(y)},b.prototype.indent=function(){var y=this.session,T=this.getSelectionRange();if(T.start.row<T.end.row){var G=this.$getSelectedRows();y.indentRows(G.first,G.last," ");return}else if(T.start.column<T.end.column){var q=y.getTextRange(T);if(!/^\s+$/.test(q)){var G=this.$getSelectedRows();y.indentRows(G.first,G.last," ");return}}var ue=y.getLine(T.start.row),Ce=T.start,Oe=y.getTabSize(),gt=y.documentToScreenColumn(Ce.row,Ce.column);if(this.session.getUseSoftTabs())var ze=Oe-gt%Oe,Xe=c.stringRepeat(" ",ze);else{for(var ze=gt%Oe;ue[T.start.column-1]==" "&&ze;)T.start.column--,ze--;this.selection.setSelectionRange(T),Xe=" "}return this.insert(Xe)},b.prototype.blockIndent=function(){var y=this.$getSelectedRows();this.session.indentRows(y.first,y.last," ")},b.prototype.blockOutdent=function(){var y=this.session.getSelection();this.session.outdentRows(y.getRange())},b.prototype.sortLines=function(){for(var y=this.$getSelectedRows(),T=this.session,G=[],q=y.first;q<=y.last;q++)G.push(T.getLine(q));G.sort(function(Oe,gt){return Oe.toLowerCase()<gt.toLowerCase()?-1:Oe.toLowerCase()>gt.toLowerCase()?1:0});for(var ue=new a(0,0,0,0),q=y.first;q<=y.last;q++){var Ce=T.getLine(q);ue.start.row=q,ue.end.row=q,ue.end.column=Ce.length,T.replace(ue,G[q-y.first])}},b.prototype.toggleCommentLines=function(){var y=this.session.getState(this.getCursorPosition().row),T=this.$getSelectedRows();this.session.getMode().toggleCommentLines(y,this.session,T.first,T.last)},b.prototype.toggleBlockComment=function(){var y=this.getCursorPosition(),T=this.session.getState(y.row),G=this.getSelectionRange();this.session.getMode().toggleBlockComment(T,this.session,G,y)},b.prototype.getNumberAt=function(y,T){var G=/[\-]?[0-9]+(?:\.[0-9]+)?/g;G.lastIndex=0;for(var q=this.session.getLine(y);G.lastIndex<T;){var ue=G.exec(q);if(ue.index<=T&&ue.index+ue[0].length>=T){var Ce={value:ue[0],start:ue.index,end:ue.index+ue[0].length};return Ce}}return null},b.prototype.modifyNumber=function(y){var T=this.selection.getCursor().row,G=this.selection.getCursor().column,q=new a(T,G-1,T,G),ue=this.session.getTextRange(q);if(!isNaN(parseFloat(ue))&&isFinite(ue)){var Ce=this.getNumberAt(T,G);if(Ce){var Oe=Ce.value.indexOf(".")>=0?Ce.start+Ce.value.indexOf(".")+1:Ce.end,gt=Ce.start+Ce.value.length-Oe,ze=parseFloat(Ce.value);ze*=Math.pow(10,gt),Oe!==Ce.end&&G<Oe?y*=Math.pow(10,Ce.end-G-1):y*=Math.pow(10,Ce.end-G),ze+=y,ze/=Math.pow(10,gt);var Xe=ze.toFixed(gt),ft=new a(T,Ce.start,T,Ce.end);this.session.replace(ft,Xe),this.moveCursorTo(T,Math.max(Ce.start+1,G+Xe.length-Ce.value.length))}}else this.toggleWord()},b.prototype.toggleWord=function(){var y=this.selection.getCursor().row,T=this.selection.getCursor().column;this.selection.selectWord();var G=this.getSelectedText(),q=this.selection.getWordRange().start.column,ue=G.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),Ce=T-q-1;Ce<0&&(Ce=0);var Oe=0,gt=0,ze=this;G.match(/[A-Za-z0-9_]+/)&&ue.forEach(function(Zt,di){gt=Oe+Zt.length,Ce>=Oe&&Ce<=gt&&(G=Zt,ze.selection.clearSelection(),ze.moveCursorTo(y,Oe+q),ze.selection.selectTo(y,gt+q)),Oe=gt});for(var Xe=this.$toggleWordPairs,ft,pt=0;pt<Xe.length;pt++)for(var mt=Xe[pt],Vt=0;Vt<=1;Vt++){var Yt=+!Vt,Gt=G.match(new RegExp("^\\s?_?("+c.escapeRegExp(mt[Vt])+")\\s?$","i"));if(Gt){var Qt=G.match(new RegExp("([_]|^|\\s)("+c.escapeRegExp(Gt[1])+")($|\\s)","g"));Qt&&(ft=G.replace(new RegExp(c.escapeRegExp(mt[Vt]),"i"),function(Zt){var di=mt[Yt];return Zt.toUpperCase()==Zt?di=di.toUpperCase():Zt.charAt(0).toUpperCase()==Zt.charAt(0)&&(di=di.substr(0,0)+mt[Yt].charAt(0).toUpperCase()+di.substr(1)),di}),this.insert(ft),ft="")}}},b.prototype.findLinkAt=function(y,T){var G,q,ue=this.session.getLine(y),Ce=ue.split(/((?:https?|ftp):\/\/[\S]+)/),Oe=T;Oe<0&&(Oe=0);var gt=0,ze=0,Xe;try{for(var ft=k(Ce),pt=ft.next();!pt.done;pt=ft.next()){var mt=pt.value;if(ze=gt+mt.length,Oe>=gt&&Oe<=ze&&mt.match(/((?:https?|ftp):\/\/[\S]+)/)){Xe=mt.replace(/[\s:.,'";}\]]+$/,"");break}gt=ze}}catch(Vt){G={error:Vt}}finally{try{pt&&!pt.done&&(q=ft.return)&&q.call(ft)}finally{if(G)throw G.error}}return Xe},b.prototype.openLink=function(){var y=this.selection.getCursor(),T=this.findLinkAt(y.row,y.column);return T&&window.open(T,"_blank"),T!=null},b.prototype.removeLines=function(){var y=this.$getSelectedRows();this.session.removeFullLines(y.first,y.last),this.clearSelection()},b.prototype.duplicateSelection=function(){var y=this.selection,T=this.session,G=y.getRange(),q=y.isBackwards();if(G.isEmpty()){var ue=G.start.row;T.duplicateLines(ue,ue)}else{var Ce=q?G.start:G.end,Oe=T.insert(Ce,T.getTextRange(G));G.start=Ce,G.end=Oe,y.setSelectionRange(G,q)}},b.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},b.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},b.prototype.moveText=function(y,T,G){return this.session.moveText(y,T,G)},b.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},b.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},b.prototype.$moveLines=function(y,T){var G,q,ue=this.selection;if(!ue.inMultiSelectMode||this.inVirtualSelectionMode){var Ce=ue.toOrientedRange();G=this.$getSelectedRows(Ce),q=this.session.$moveLines(G.first,G.last,T?0:y),T&&y==-1&&(q=0),Ce.moveBy(q,0),ue.fromOrientedRange(Ce)}else{var Oe=ue.rangeList.ranges;ue.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var gt=0,ze=0,Xe=Oe.length,ft=0;ft<Xe;ft++){var pt=ft;Oe[ft].moveBy(gt,0),G=this.$getSelectedRows(Oe[ft]);for(var mt=G.first,Vt=G.last;++ft<Xe;){ze&&Oe[ft].moveBy(ze,0);var Yt=this.$getSelectedRows(Oe[ft]);if(T&&Yt.first!=Vt)break;if(!T&&Yt.first>Vt+1)break;Vt=Yt.last}for(ft--,gt=this.session.$moveLines(mt,Vt,T?0:y),T&&y==-1&&(pt=ft+1);pt<=ft;)Oe[pt].moveBy(gt,0),pt++;T||(gt=0),ze+=gt}ue.fromOrientedRange(ue.ranges[0]),ue.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},b.prototype.$getSelectedRows=function(y){return y=(y||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(y.start.row),last:this.session.getRowFoldEnd(y.end.row)}},b.prototype.onCompositionStart=function(y){this.renderer.showComposition(y)},b.prototype.onCompositionUpdate=function(y){this.renderer.setCompositionText(y)},b.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},b.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},b.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},b.prototype.isRowVisible=function(y){return y>=this.getFirstVisibleRow()&&y<=this.getLastVisibleRow()},b.prototype.isRowFullyVisible=function(y){return y>=this.renderer.getFirstFullyVisibleRow()&&y<=this.renderer.getLastFullyVisibleRow()},b.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},b.prototype.$moveByPage=function(y,T){var G=this.renderer,q=this.renderer.layerConfig,ue=y*Math.floor(q.height/q.lineHeight);T===!0?this.selection.$moveSelection(function(){this.moveCursorBy(ue,0)}):T===!1&&(this.selection.moveCursorBy(ue,0),this.selection.clearSelection());var Ce=G.scrollTop;G.scrollBy(0,ue*q.lineHeight),T!=null&&G.scrollCursorIntoView(null,.5),G.animateScrolling(Ce)},b.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},b.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},b.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},b.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},b.prototype.scrollPageDown=function(){this.$moveByPage(1)},b.prototype.scrollPageUp=function(){this.$moveByPage(-1)},b.prototype.scrollToRow=function(y){this.renderer.scrollToRow(y)},b.prototype.scrollToLine=function(y,T,G,q){this.renderer.scrollToLine(y,T,G,q)},b.prototype.centerSelection=function(){var y=this.getSelectionRange(),T={row:Math.floor(y.start.row+(y.end.row-y.start.row)/2),column:Math.floor(y.start.column+(y.end.column-y.start.column)/2)};this.renderer.alignCursor(T,.5)},b.prototype.getCursorPosition=function(){return this.selection.getCursor()},b.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},b.prototype.getSelectionRange=function(){return this.selection.getRange()},b.prototype.selectAll=function(){this.selection.selectAll()},b.prototype.clearSelection=function(){this.selection.clearSelection()},b.prototype.moveCursorTo=function(y,T){this.selection.moveCursorTo(y,T)},b.prototype.moveCursorToPosition=function(y){this.selection.moveCursorToPosition(y)},b.prototype.jumpToMatching=function(y,T){var G=this.getCursorPosition(),q=new S(this.session,G.row,G.column),ue=q.getCurrentToken(),Ce=0;ue&&ue.type.indexOf("tag-name")!==-1&&(ue=q.stepBackward());var Oe=ue||q.stepForward();if(Oe){var gt,ze=!1,Xe={},ft=G.column-Oe.start,pt,mt={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(Oe.value.match(/[{}()\[\]]/g)){for(;ft<Oe.value.length&&!ze;ft++)if(mt[Oe.value[ft]])switch(pt=mt[Oe.value[ft]]+"."+Oe.type.replace("rparen","lparen"),isNaN(Xe[pt])&&(Xe[pt]=0),Oe.value[ft]){case"(":case"[":case"{":Xe[pt]++;break;case")":case"]":case"}":Xe[pt]--,Xe[pt]===-1&&(gt="bracket",ze=!0);break}}else Oe.type.indexOf("tag-name")!==-1&&(isNaN(Xe[Oe.value])&&(Xe[Oe.value]=0),ue.value==="<"&&Ce>1?Xe[Oe.value]++:ue.value==="</"&&Xe[Oe.value]--,Xe[Oe.value]===-1&&(gt="tag",ze=!0));ze||(ue=Oe,Ce++,Oe=q.stepForward(),ft=0)}while(Oe&&!ze);if(gt){var Vt,Yt;if(gt==="bracket")Vt=this.session.getBracketRange(G),Vt||(Vt=new a(q.getCurrentTokenRow(),q.getCurrentTokenColumn()+ft-1,q.getCurrentTokenRow(),q.getCurrentTokenColumn()+ft-1),Yt=Vt.start,(T||Yt.row===G.row&&Math.abs(Yt.column-G.column)<2)&&(Vt=this.session.getBracketRange(Yt)));else if(gt==="tag"){if(!Oe||Oe.type.indexOf("tag-name")===-1)return;if(Vt=new a(q.getCurrentTokenRow(),q.getCurrentTokenColumn()-2,q.getCurrentTokenRow(),q.getCurrentTokenColumn()-2),Vt.compare(G.row,G.column)===0){var Gt=this.session.getMatchingTags(G);Gt&&(Gt.openTag.contains(G.row,G.column)?(Vt=Gt.closeTag,Yt=Vt.start):(Vt=Gt.openTag,Gt.closeTag.start.row===G.row&&Gt.closeTag.start.column===G.column?Yt=Vt.end:Yt=Vt.start))}Yt=Yt||Vt.start}Yt=Vt&&Vt.cursor||Yt,Yt&&(y?Vt&&T?this.selection.setRange(Vt):Vt&&Vt.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(Yt.row,Yt.column):this.selection.moveTo(Yt.row,Yt.column))}}},b.prototype.gotoLine=function(y,T,G){this.selection.clearSelection(),this.session.unfold({row:y-1,column:T||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(y-1,T||0),this.isRowFullyVisible(y-1)||this.scrollToLine(y-1,!0,G)},b.prototype.navigateTo=function(y,T){this.selection.moveTo(y,T)},b.prototype.navigateUp=function(y){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var T=this.selection.anchor.getPosition();return this.moveCursorToPosition(T)}this.selection.clearSelection(),this.selection.moveCursorBy(-y||-1,0)},b.prototype.navigateDown=function(y){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var T=this.selection.anchor.getPosition();return this.moveCursorToPosition(T)}this.selection.clearSelection(),this.selection.moveCursorBy(y||1,0)},b.prototype.navigateLeft=function(y){if(this.selection.isEmpty())for(y=y||1;y--;)this.selection.moveCursorLeft();else{var T=this.getSelectionRange().start;this.moveCursorToPosition(T)}this.clearSelection()},b.prototype.navigateRight=function(y){if(this.selection.isEmpty())for(y=y||1;y--;)this.selection.moveCursorRight();else{var T=this.getSelectionRange().end;this.moveCursorToPosition(T)}this.clearSelection()},b.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},b.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},b.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},b.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},b.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},b.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},b.prototype.replace=function(y,T){T&&this.$search.set(T);var G=this.$search.find(this.session),q=0;return G&&(this.$tryReplace(G,y)&&(q=1),this.selection.setSelectionRange(G),this.renderer.scrollSelectionIntoView(G.start,G.end)),q},b.prototype.replaceAll=function(y,T){T&&this.$search.set(T);var G=this.$search.findAll(this.session),q=0;if(!G.length)return q;var ue=this.getSelectionRange();this.selection.moveTo(0,0);for(var Ce=G.length-1;Ce>=0;--Ce)this.$tryReplace(G[Ce],y)&&q++;return this.selection.setSelectionRange(ue),q},b.prototype.$tryReplace=function(y,T){var G=this.session.getTextRange(y);return T=this.$search.replace(G,T),T!==null?(y.end=this.session.replace(y,T),y):null},b.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},b.prototype.find=function(y,T,G){T||(T={}),typeof y=="string"||y instanceof RegExp?T.needle=y:typeof y=="object"&&x.mixin(T,y);var q=this.selection.getRange();T.needle==null&&(y=this.session.getTextRange(q)||this.$search.$options.needle,y||(q=this.session.getWordRange(q.start.row,q.start.column),y=this.session.getTextRange(q)),this.$search.set({needle:y})),this.$search.set(T),T.start||this.$search.set({start:q});var ue=this.$search.find(this.session);if(T.preventScroll)return ue;if(ue)return this.revealRange(ue,G),ue;T.backwards?q.start=q.end:q.end=q.start,this.selection.setRange(q)},b.prototype.findNext=function(y,T){this.find({skipCurrent:!0,backwards:!1},y,T)},b.prototype.findPrevious=function(y,T){this.find(y,{skipCurrent:!0,backwards:!0},T)},b.prototype.revealRange=function(y,T){this.session.unfold(y),this.selection.setSelectionRange(y);var G=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(y.start,y.end,.5),T!==!1&&this.renderer.animateScrolling(G)},b.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},b.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},b.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(y){y.destroy()}),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},b.prototype.setAutoScrollEditorIntoView=function(y){if(y){var T,G=this,q=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var ue=this.$scrollAnchor;ue.style.cssText="position:absolute",this.container.insertBefore(ue,this.container.firstChild);var Ce=this.on("changeSelection",function(){q=!0}),Oe=this.renderer.on("beforeRender",function(){q&&(T=G.renderer.container.getBoundingClientRect())}),gt=this.renderer.on("afterRender",function(){if(q&&T&&(G.isFocused()||G.searchBox&&G.searchBox.isFocused())){var ze=G.renderer,Xe=ze.$cursorLayer.$pixelPos,ft=ze.layerConfig,pt=Xe.top-ft.offset;Xe.top>=0&&pt+T.top<0?q=!0:Xe.top<ft.height&&Xe.top+T.top+ft.lineHeight>window.innerHeight?q=!1:q=null,q!=null&&(ue.style.top=pt+"px",ue.style.left=Xe.left+"px",ue.style.height=ft.lineHeight+"px",ue.scrollIntoView(q)),q=T=null}});this.setAutoScrollEditorIntoView=function(ze){ze||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",Ce),this.renderer.off("afterRender",gt),this.renderer.off("beforeRender",Oe))}}},b.prototype.$resetCursorStyle=function(){var y=this.$cursorStyle||"ace",T=this.renderer.$cursorLayer;T&&(T.setSmoothBlinking(/smooth/.test(y)),T.isBlinking=!this.$readOnly&&y!="wide",_.setCssClass(T.element,"ace_slim-cursors",/slim/.test(y)))},b.prototype.prompt=function(y,T,G){var q=this;E.loadModule("ace/ext/prompt",function(ue){ue.prompt(q,y,T,G)})},b})();P.$uid=0,P.prototype.curOp=null,P.prototype.prevOp={},P.prototype.$mergeableCommands=["backspace","del","insertstring"],P.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],x.implement(P.prototype,p),E.defineOptions(P.prototype,"editor",{selectionStyle:{set:function(b){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:b})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(b){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(b){var y=this;if(this.textInput.setReadOnly(b),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(G){var q=!1;if(G&&G.type=="keydown"){if(G&&G.key&&!G.ctrlKey&&!G.metaKey&&(G.key==" "&&G.preventDefault(),q=G.key.length==1),!q)return}else G&&G.type!=="exec"&&(q=!0);if(q){y.hoverTooltip||(y.hoverTooltip=new he);var ue=_.createElement("div");ue.textContent=H("editor.tooltip.disable-editing","Editing is disabled"),y.hoverTooltip.isOpen||y.hoverTooltip.showForRange(y,y.getSelectionRange(),ue)}else y.hoverTooltip&&y.hoverTooltip.isOpen&&y.hoverTooltip.hide()});var T=this.textInput.getElement();b?(F.addListener(T,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(F.removeListener(T,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback),this.hoverTooltip&&(this.hoverTooltip.destroy(),this.hoverTooltip=null))}},initialValue:!1},copyWithEmptySelection:{set:function(b){this.textInput.setCopyWithEmptySelection(b)},initialValue:!1},cursorStyle:{set:function(b){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(b){this.setAutoScrollEditorIntoView(b)}},keyboardHandler:{set:function(b){this.setKeyboardHandler(b)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(b){this.session.setValue(b)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(b){this.setSession(b)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(b){this.renderer.$gutterLayer.setShowLineNumbers(b),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),b&&this.$relativeLineNumbers?O.attach(this):O.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(b){this.$showLineNumbers&&b?O.attach(this):O.detach(this)}},placeholder:{set:function(b){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var y=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(y&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),_.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!y&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),_.addCssClass(this.container,"ace_hasPlaceholder");var T=_.createElement("div");T.className="ace_placeholder",T.textContent=this.$placeholder||"",this.renderer.placeholderNode=T,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!y&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(b){var y={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(q){q.blur(),q.renderer.scroller.focus()},readOnly:!0},T=function(q){if(q.target==this.renderer.scroller&&q.keyCode===V.enter){q.preventDefault();var ue=this.getCursorPosition().row;this.isRowVisible(ue)||this.scrollToLine(ue,!0,!0),this.focus()}},G;b?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(h.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",H("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",H("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",T.bind(this)),this.commands.addCommand(y),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",H("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",H("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),G||(G=new C(this)),G.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",T.bind(this)),this.commands.removeCommand(y),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),G&&G.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(b){this.$textInputAriaLabel=b},initialValue:""},enableMobileMenu:{set:function(b){this.$enableMobileMenu=b},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var O={getText:function(b,y){return(Math.abs(b.selection.lead.row-y)||y+1+(y<9?"·":""))+""},getWidth:function(b,y,T){return Math.max(y.toString().length,(T.lastRow+1).toString().length,2)*T.characterWidth},update:function(b,y){y.renderer.$loop.schedule(y.renderer.CHANGE_GUTTER)},attach:function(b){b.renderer.$gutterLayer.$renderer=this,b.on("changeSelection",this.update),this.update(null,b)},detach:function(b){b.renderer.$gutterLayer.$renderer==this&&(b.renderer.$gutterLayer.$renderer=null),b.off("changeSelection",this.update),this.update(null,b)}};g.Editor=P}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(f,g,j){var k=f("../lib/dom"),x=(function(){function _(c,h){this.element=c,this.canvasHeight=h||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return _.prototype.moveContainer=function(c){k.translate(this.element,0,-(c.firstRowScreen*c.lineHeight%this.canvasHeight)-c.offset*this.$offsetCoefficient)},_.prototype.pageChanged=function(c,h){return Math.floor(c.firstRowScreen*c.lineHeight/this.canvasHeight)!==Math.floor(h.firstRowScreen*h.lineHeight/this.canvasHeight)},_.prototype.computeLineTop=function(c,h,t){var o=h.firstRowScreen*h.lineHeight,r=Math.floor(o/this.canvasHeight),i=t.documentToScreenRow(c,0)*h.lineHeight;return i-r*this.canvasHeight},_.prototype.computeLineHeight=function(c,h,t){return h.lineHeight*t.getRowLineCount(c)},_.prototype.getLength=function(){return this.cells.length},_.prototype.get=function(c){return this.cells[c]},_.prototype.shift=function(){this.$cacheCell(this.cells.shift())},_.prototype.pop=function(){this.$cacheCell(this.cells.pop())},_.prototype.push=function(c){if(Array.isArray(c)){this.cells.push.apply(this.cells,c);for(var h=k.createFragment(this.element),t=0;t<c.length;t++)h.appendChild(c[t].element);this.element.appendChild(h)}else this.cells.push(c),this.element.appendChild(c.element)},_.prototype.unshift=function(c){if(Array.isArray(c)){this.cells.unshift.apply(this.cells,c);for(var h=k.createFragment(this.element),t=0;t<c.length;t++)h.appendChild(c[t].element);this.element.firstChild?this.element.insertBefore(h,this.element.firstChild):this.element.appendChild(h)}else this.cells.unshift(c),this.element.insertAdjacentElement("afterbegin",c.element)},_.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},_.prototype.$cacheCell=function(c){c&&(c.element.remove(),this.cellCache.push(c))},_.prototype.createCell=function(c,h,t,o){var r=this.cellCache.pop();if(!r){var i=k.createElement("div");o&&o(i),this.element.appendChild(i),r={element:i,text:"",row:c}}return r.row=c,r},_})();g.Lines=x}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(f,g,j){var k=f("../lib/dom"),x=f("../lib/oop"),_=f("../lib/lang"),c=f("../lib/event_emitter").EventEmitter,h=f("./lines").Lines,t=f("../config").nls,o=(function(){function i(e){this.element=k.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new h(this.element),this.$lines.$offsetCoefficient=1}return i.prototype.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},i.prototype.addGutterDecoration=function(e,n){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,n)},i.prototype.removeGutterDecoration=function(e,n){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,n)},i.prototype.setAnnotations=function(e){this.$annotations=[];for(var n=0;n<e.length;n++){var a=e[n],p=a.row,v=this.$annotations[p];v||(v=this.$annotations[p]={text:[],type:[],displayText:[]});var A=a.text,E=a.text,S=a.type;A=A?_.escapeHTML(A):a.html||"",E=E||a.html||"",v.text.indexOf(A)===-1&&(v.text.push(A),v.type.push(S),v.displayText.push(E));var C=a.className;C?v.className=C:S==="error"?v.className=" ace_error":S==="security"&&!/\bace_error\b/.test(v.className)?v.className=" ace_security":S==="warning"&&!/\bace_(error|security)\b/.test(v.className)?v.className=" ace_warning":S==="info"&&!v.className?v.className=" ace_info":S==="hint"&&!v.className&&(v.className=" ace_hint")}},i.prototype.$updateAnnotations=function(e){if(this.$annotations.length){var n=e.start.row,a=e.end.row-n;if(a!==0)if(e.action=="remove")this.$annotations.splice(n,a+1,null);else{var p=new Array(a+1);p.unshift(n,1),this.$annotations.splice.apply(this.$annotations,p)}}},i.prototype.update=function(e){this.config=e;var n=this.session,a=e.firstRow,p=Math.min(e.lastRow+e.gutterOffset,n.getLength()-1);this.oldLastRow=p,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var v=n.getNextFoldLine(a),A=v?v.start.row:1/0,E=null,S=-1,C=a;;){if(C>A&&(C=v.end.row+1,v=n.getNextFoldLine(C,v),A=v?v.start.row:1/0),C>p){for(;this.$lines.getLength()>S+1;)this.$lines.pop();break}E=this.$lines.get(++S),E?E.row=C:(E=this.$lines.createCell(C,e,this.session,r),this.$lines.push(E)),this.$renderCell(E,e,v,C),C++}this._signal("afterRender"),this.$updateGutterWidth(e)},i.prototype.$updateGutterWidth=function(e){var n=this.session,a=n.gutterRenderer||this.$renderer,p=n.$firstLineNumber,v=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||n.$useWrapMode)&&(v=n.getLength()+p-1);var A=a?a.getWidth(n,v,e):v.toString().length*e.characterWidth,E=this.$padding||this.$computePadding();A+=E.left+E.right,A!==this.gutterWidth&&!isNaN(A)&&(this.gutterWidth=A,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",A))},i.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},i.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!(this.$cursorCell&&this.$cursorCell.row==e)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var n=this.$lines.cells;this.$cursorCell=null;for(var a=0;a<n.length;a++){var p=n[a];if(p.row>=this.$cursorRow){if(p.row>this.$cursorRow){var v=this.session.getFoldLine(this.$cursorRow);if(a>0&&v&&v.start.row==n[a-1].row)p=n[a-1];else break}p.element.className="ace_gutter-active-line "+p.element.className,this.$cursorCell=p;break}}}}},i.prototype.scrollLines=function(e){var n=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(n,e))return this.update(e);this.$lines.moveContainer(e);var a=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),p=this.oldLastRow;if(this.oldLastRow=a,!n||p<e.firstRow)return this.update(e);if(a<n.firstRow)return this.update(e);if(n.firstRow<e.firstRow)for(var v=this.session.getFoldedRowCount(n.firstRow,e.firstRow-1);v>0;v--)this.$lines.shift();if(p>a)for(var v=this.session.getFoldedRowCount(a+1,p);v>0;v--)this.$lines.pop();e.firstRow<n.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,n.firstRow-1)),a>p&&this.$lines.push(this.$renderLines(e,p+1,a)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},i.prototype.$renderLines=function(e,n,a){for(var p=[],v=n,A=this.session.getNextFoldLine(v),E=A?A.start.row:1/0;v>E&&(v=A.end.row+1,A=this.session.getNextFoldLine(v,A),E=A?A.start.row:1/0),!(v>a);){var S=this.$lines.createCell(v,e,this.session,r);this.$renderCell(S,e,A,v),p.push(S),v++}return p},i.prototype.$renderCell=function(e,n,a,p){var v=e.element,A=this.session,E=v.childNodes[0],S=v.childNodes[1],C=v.childNodes[2],H=v.childNodes[3],U=C.firstChild,V=A.$firstLineNumber,F=A.$breakpoints,he=A.$decorations,P=A.gutterRenderer||this.$renderer,O=this.$showFoldWidgets&&A.foldWidgets,b=a?a.start.row:Number.MAX_VALUE,y=n.lineHeight+"px",T=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",G=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",q=(P?P.getText(A,p):p+V).toString();if(this.$highlightGutterLine&&(p==this.$cursorRow||a&&p<this.$cursorRow&&p>=b&&this.$cursorRow<=a.end.row)&&(T+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),F[p]&&(T+=F[p]),he[p]&&(T+=he[p]),this.$annotations[p]&&p!==b&&(T+=this.$annotations[p].className),O){var ue=O[p];ue==null&&(ue=O[p]=A.getFoldWidget(p))}if(ue){var Ce="ace_fold-widget ace_"+ue,Oe=ue=="start"&&p==b&&p<a.end.row;if(Oe){Ce+=" ace_closed";for(var gt="",ze=!1,Xe=p+1;Xe<=a.end.row;Xe++)if(this.$annotations[Xe]){if(this.$annotations[Xe].className===" ace_error"){ze=!0,gt=" ace_error_fold";break}this.$annotations[Xe].className===" ace_security"?(ze=!0,gt=" ace_security_fold"):this.$annotations[Xe].className===" ace_warning"&>!==" ace_security_fold"&&(ze=!0,gt=" ace_warning_fold")}T+=gt}else Ce+=" ace_open";S.className!=Ce&&(S.className=Ce),k.setStyle(S.style,"height",y),k.setStyle(S.style,"display","inline-block"),S.setAttribute("role","button"),S.setAttribute("tabindex","-1");var ft=A.getFoldWidgetRange(p);ft?S.setAttribute("aria-label",t("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[ft.start.row+1,ft.end.row+1])):a?S.setAttribute("aria-label",t("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[a.start.row+1,a.end.row+1])):S.setAttribute("aria-label",t("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[p+1])),Oe?(S.setAttribute("aria-expanded","false"),S.setAttribute("title",t("gutter.code-folding.closed.title","Unfold code"))):(S.setAttribute("aria-expanded","true"),S.setAttribute("title",t("gutter.code-folding.open.title","Fold code")))}else S&&(k.setStyle(S.style,"display","none"),S.setAttribute("tabindex","0"),S.removeAttribute("role"),S.removeAttribute("aria-label"));var pt=this.session.$gutterCustomWidgets[p];if(pt?this.$addCustomWidget(p,pt,e):H&&this.$removeCustomWidget(p,e),ze&&this.$showFoldedAnnotations){C.className="ace_gutter_annotation",U.className=G,U.className+=gt,k.setStyle(U.style,"height",y),k.setStyle(C.style,"display","block"),k.setStyle(C.style,"height",y);var mt;switch(gt){case" ace_error_fold":mt=t("gutter.annotation.aria-label.error","Error, read annotations row $0",[q]);break;case" ace_security_fold":mt=t("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[q]);break;case" ace_warning_fold":mt=t("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[q]);break}C.setAttribute("aria-label",mt),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else if(this.$annotations[p]){C.className="ace_gutter_annotation",U.className=G,this.$useSvgGutterIcons?U.className+=this.$annotations[p].className:v.classList.add(this.$annotations[p].className.replace(" ","")),k.setStyle(U.style,"height",y),k.setStyle(C.style,"display","block"),k.setStyle(C.style,"height",y);var mt;switch(this.$annotations[p].className){case" ace_error":mt=t("gutter.annotation.aria-label.error","Error, read annotations row $0",[q]);break;case" ace_security":mt=t("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[q]);break;case" ace_warning":mt=t("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[q]);break;case" ace_info":mt=t("gutter.annotation.aria-label.info","Info, read annotations row $0",[q]);break;case" ace_hint":mt=t("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[q]);break}C.setAttribute("aria-label",mt),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else k.setStyle(C.style,"display","none"),C.removeAttribute("aria-label"),C.removeAttribute("role"),C.setAttribute("tabindex","0");return q!==E.data&&(E.data=q),v.className!=T&&(v.className=T),k.setStyle(e.element.style,"height",this.$lines.computeLineHeight(p,n,A)+"px"),k.setStyle(e.element.style,"top",this.$lines.computeLineTop(p,n,A)+"px"),e.text=q,C.style.display==="none"&&S.style.display==="none"&&!pt?e.element.setAttribute("aria-hidden",!0):e.element.setAttribute("aria-hidden",!1),e},i.prototype.setHighlightGutterLine=function(e){this.$highlightGutterLine=e},i.prototype.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},i.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},i.prototype.setShowFoldWidgets=function(e){e?k.addCssClass(this.element,"ace_folding-enabled"):k.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},i.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},i.prototype.$hideFoldWidget=function(e,n){var a=n||this.$getGutterCell(e);if(a&&a.element){var p=a.element.childNodes[1];p&&k.setStyle(p.style,"display","none")}},i.prototype.$showFoldWidget=function(e,n){var a=n||this.$getGutterCell(e);if(a&&a.element){var p=a.element.childNodes[1];p&&this.session.foldWidgets&&this.session.foldWidgets[a.row]&&k.setStyle(p.style,"display","inline-block")}},i.prototype.$getGutterCell=function(e){var n=this.$lines.cells,a=this.session.documentToScreenRow(e,0);return n[e-this.config.firstRowScreen-(e-a)]},i.prototype.$addCustomWidget=function(e,n,a){var p=n.className,v=n.label,A=n.title,E=n.callbacks;this.session.$gutterCustomWidgets[e]={className:p,label:v,title:A,callbacks:E},this.$hideFoldWidget(e,a);var S=a||this.$getGutterCell(e);if(S&&S.element){var C=S.element.querySelector(".ace_custom-widget");C&&C.remove(),C=k.createElement("span"),C.className="ace_custom-widget ".concat(p),C.setAttribute("tabindex","-1"),C.setAttribute("role","button"),C.setAttribute("aria-label",v),C.setAttribute("title",A),k.setStyle(C.style,"display","inline-block"),k.setStyle(C.style,"height","inherit"),E&&E.onClick&&C.addEventListener("click",function(H){E.onClick(H,e),H.stopPropagation()}),S.element.appendChild(C)}},i.prototype.$removeCustomWidget=function(e,n){delete this.session.$gutterCustomWidgets[e],this.$showFoldWidget(e,n);var a=n||this.$getGutterCell(e);if(a&&a.element){var p=a.element.querySelector(".ace_custom-widget");p&&a.element.removeChild(p)}},i.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=k.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(e.borderLeftWidth)||0)+(parseInt(e.paddingLeft)||0)+1,this.$padding.right=(parseInt(e.borderRightWidth)||0)+(parseInt(e.paddingRight)||0),this.$padding},i.prototype.getRegion=function(e){var n=this.$padding||this.$computePadding(),a=this.element.getBoundingClientRect();if(e.x<n.left+a.left)return"markers";if(this.$showFoldWidgets&&e.x>a.right-n.right)return"foldWidgets"},i})();o.prototype.$fixedWidth=!1,o.prototype.$highlightGutterLine=!0,o.prototype.$renderer="",o.prototype.$showLineNumbers=!0,o.prototype.$showFoldWidgets=!0,x.implement(o.prototype,c);function r(i){var e=document.createTextNode("");i.appendChild(e);var n=k.createElement("span");i.appendChild(n);var a=k.createElement("span");i.appendChild(a);var p=k.createElement("span");return a.appendChild(p),i}g.Gutter=o}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(f,g,j){var k=f("../range").Range,x=f("../lib/dom"),_=(function(){function h(t){this.element=x.createElement("div"),this.element.className="ace_layer ace_marker-layer",t.appendChild(this.element)}return h.prototype.setPadding=function(t){this.$padding=t},h.prototype.setSession=function(t){this.session=t},h.prototype.setMarkers=function(t){this.markers=t},h.prototype.elt=function(t,o){var r=this.i!=-1&&this.element.childNodes[this.i];r?this.i++:(r=document.createElement("div"),this.element.appendChild(r),this.i=-1),r.style.cssText=o,r.className=t},h.prototype.update=function(t){if(t){this.config=t,this.i=0;var o;for(var r in this.markers){var i=this.markers[r];if(!i.range){i.update(o,this,this.session,t);continue}var e=i.range.clipRows(t.firstRow,t.lastRow);if(!e.isEmpty())if(e=e.toScreenRange(this.session),i.renderer){var n=this.$getTop(e.start.row,t),a=this.$padding+e.start.column*t.characterWidth;i.renderer(o,e,a,n,t)}else i.type=="fullLine"?this.drawFullLineMarker(o,e,i.clazz,t):i.type=="screenLine"?this.drawScreenLineMarker(o,e,i.clazz,t):e.isMultiLine()?i.type=="text"?this.drawTextMarker(o,e,i.clazz,t):this.drawMultiLineMarker(o,e,i.clazz,t):this.drawSingleLineMarker(o,e,i.clazz+" ace_start ace_br15",t)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},h.prototype.$getTop=function(t,o){return(t-o.firstRowScreen)*o.lineHeight},h.prototype.drawTextMarker=function(t,o,r,i,e){for(var n=this.session,a=o.start.row,p=o.end.row,v=a,A=0,E=0,S=n.getScreenLastRowColumn(v),C=new k(v,o.start.column,v,E);v<=p;v++)C.start.row=C.end.row=v,C.start.column=v==a?o.start.column:n.getRowWrapIndent(v),C.end.column=S,A=E,E=S,S=v+1<p?n.getScreenLastRowColumn(v+1):v==p?0:o.end.column,this.drawSingleLineMarker(t,C,r+(v==a?" ace_start":"")+" ace_br"+c(v==a||v==a+1&&o.start.column,A<E,E>S,v==p),i,v==p?0:1,e)},h.prototype.drawMultiLineMarker=function(t,o,r,i,e){var n=this.$padding,a=i.lineHeight,p=this.$getTop(o.start.row,i),v=n+o.start.column*i.characterWidth;if(e=e||"",this.session.$bidiHandler.isBidiRow(o.start.row)){var A=o.clone();A.end.row=A.start.row,A.end.column=this.session.getLine(A.start.row).length,this.drawBidiSingleLineMarker(t,A,r+" ace_br1 ace_start",i,null,e)}else this.elt(r+" ace_br1 ace_start","height:"+a+"px;right:"+n+"px;top:"+p+"px;left:"+v+"px;"+(e||""));if(this.session.$bidiHandler.isBidiRow(o.end.row)){var A=o.clone();A.start.row=A.end.row,A.start.column=0,this.drawBidiSingleLineMarker(t,A,r+" ace_br12",i,null,e)}else{p=this.$getTop(o.end.row,i);var E=o.end.column*i.characterWidth;this.elt(r+" ace_br12","height:"+a+"px;width:"+E+"px;top:"+p+"px;left:"+n+"px;"+(e||""))}if(a=(o.end.row-o.start.row-1)*i.lineHeight,!(a<=0)){p=this.$getTop(o.start.row+1,i);var S=(o.start.column?1:0)|(o.end.column?0:8);this.elt(r+(S?" ace_br"+S:""),"height:"+a+"px;right:"+n+"px;top:"+p+"px;left:"+n+"px;"+(e||""))}},h.prototype.drawSingleLineMarker=function(t,o,r,i,e,n){if(this.session.$bidiHandler.isBidiRow(o.start.row))return this.drawBidiSingleLineMarker(t,o,r,i,e,n);var a=i.lineHeight,p=(o.end.column+(e||0)-o.start.column)*i.characterWidth,v=this.$getTop(o.start.row,i),A=this.$padding+o.start.column*i.characterWidth;this.elt(r,"height:"+a+"px;width:"+p+"px;top:"+v+"px;left:"+A+"px;"+(n||""))},h.prototype.drawBidiSingleLineMarker=function(t,o,r,i,e,n){var a=i.lineHeight,p=this.$getTop(o.start.row,i),v=this.$padding,A=this.session.$bidiHandler.getSelections(o.start.column,o.end.column);A.forEach(function(E){this.elt(r,"height:"+a+"px;width:"+(E.width+(e||0))+"px;top:"+p+"px;left:"+(v+E.left)+"px;"+(n||""))},this)},h.prototype.drawFullLineMarker=function(t,o,r,i,e){var n=this.$getTop(o.start.row,i),a=i.lineHeight;o.start.row!=o.end.row&&(a+=this.$getTop(o.end.row,i)-n),this.elt(r,"height:"+a+"px;top:"+n+"px;left:0;right:0;"+(e||""))},h.prototype.drawScreenLineMarker=function(t,o,r,i,e){var n=this.$getTop(o.start.row,i),a=i.lineHeight;this.elt(r,"height:"+a+"px;top:"+n+"px;left:0;right:0;"+(e||""))},h})();_.prototype.$padding=0;function c(h,t,o,r){return(h?1:0)|(t?2:0)|(o?4:0)|(r?8:0)}g.Marker=_}),ace.define("ace/layer/text_util",["require","exports","module"],function(f,g,j){var k=new Set(["text","rparen","lparen"]);g.isTextToken=function(x){return k.has(x)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(f,g,j){var k=f("../lib/oop"),x=f("../lib/dom"),_=f("../lib/lang"),c=f("./lines").Lines,h=f("../lib/event_emitter").EventEmitter,t=f("../config").nls,o=f("./text_util").isTextToken,r=(function(){function i(e){this.dom=x,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new c(this.element)}return i.prototype.$updateEolChar=function(){var e=this.session.doc,n=e.getNewLineCharacter()==`
|
219
|
+
`&&e.getNewLineMode()!="windows",a=n?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=a)return this.EOL_CHAR=a,!0},i.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},i.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},i.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},i.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",(function(n){this._signal("changeCharacterSize",n)}).bind(this)),this.$pollSizeChanges()},i.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},i.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},i.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString()},i.prototype.setShowInvisibles=function(e){return this.showInvisibles==e?!1:(this.showInvisibles=e,typeof e=="string"?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},i.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},i.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides===e?!1:(this.$highlightIndentGuides=e,e)},i.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var n=this.$tabStrings=[0],a=1;a<e+1;a++)if(this.showTabs){var p=this.dom.createElement("span");p.className="ace_invisible ace_invisible_tab",p.textContent=_.stringRepeat(this.TAB_CHAR,a),n.push(p)}else n.push(this.dom.createTextNode(_.stringRepeat(" ",a),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var v="ace_indent-guide",A=this.showSpaces?" ace_invisible ace_invisible_space":"",E=this.showSpaces?_.stringRepeat(this.SPACE_CHAR,this.tabSize):_.stringRepeat(" ",this.tabSize),S=this.showTabs?" ace_invisible ace_invisible_tab":"",C=this.showTabs?_.stringRepeat(this.TAB_CHAR,this.tabSize):E,p=this.dom.createElement("span");p.className=v+A,p.textContent=E,this.$tabStrings[" "]=p;var p=this.dom.createElement("span");p.className=v+S,p.textContent=C,this.$tabStrings[" "]=p}},i.prototype.updateLines=function(e,n,a){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var p=Math.max(n,e.firstRow),v=Math.min(a,e.lastRow),A=this.element.childNodes,E=0,C=e.firstRow;C<p;C++){var H=this.session.getFoldLine(C);if(H)if(H.containsRow(p)){p=H.start.row;break}else C=H.end.row;E++}for(var S=!1,C=p,H=this.session.getNextFoldLine(C),U=H?H.start.row:1/0;C>U&&(C=H.end.row+1,H=this.session.getNextFoldLine(C,H),U=H?H.start.row:1/0),!(C>v);){var V=A[E++];if(V){this.dom.removeChildren(V),this.$renderLine(V,C,C==U?H:!1),S&&(V.style.top=this.$lines.computeLineTop(C,e,this.session)+"px");var F=e.lineHeight*this.session.getRowLength(C)+"px";V.style.height!=F&&(S=!0,V.style.height=F)}C++}if(S)for(;E<this.$lines.cells.length;){var he=this.$lines.cells[E++];he.element.style.top=this.$lines.computeLineTop(he.row,e,this.session)+"px"}},i.prototype.scrollLines=function(e){var n=this.config;if(this.config=e,this.$lines.pageChanged(n,e))return this.update(e);this.$lines.moveContainer(e);var a=e.lastRow,p=n?n.lastRow:-1;if(!n||p<e.firstRow)return this.update(e);if(a<n.firstRow)return this.update(e);if(!n||n.lastRow<e.firstRow)return this.update(e);if(e.lastRow<n.firstRow)return this.update(e);if(n.firstRow<e.firstRow)for(var v=this.session.getFoldedRowCount(n.firstRow,e.firstRow-1);v>0;v--)this.$lines.shift();if(n.lastRow>e.lastRow)for(var v=this.session.getFoldedRowCount(e.lastRow+1,n.lastRow);v>0;v--)this.$lines.pop();e.firstRow<n.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,n.firstRow-1)),e.lastRow>n.lastRow&&this.$lines.push(this.$renderLinesFragment(e,n.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},i.prototype.$renderLinesFragment=function(e,n,a){for(var p=[],v=n,A=this.session.getNextFoldLine(v),E=A?A.start.row:1/0;v>E&&(v=A.end.row+1,A=this.session.getNextFoldLine(v,A),E=A?A.start.row:1/0),!(v>a);){var S=this.$lines.createCell(v,e,this.session),C=S.element;this.dom.removeChildren(C),x.setStyle(C.style,"height",this.$lines.computeLineHeight(v,e,this.session)+"px"),x.setStyle(C.style,"top",this.$lines.computeLineTop(v,e,this.session)+"px"),this.$renderLine(C,v,v==E?A:!1),this.$useLineGroups()?C.className="ace_line_group":C.className="ace_line",p.push(S),v++}return p},i.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var n=e.firstRow,a=e.lastRow,p=this.$lines;p.getLength();)p.pop();p.push(this.$renderLinesFragment(e,n,a))},i.prototype.$renderToken=function(e,n,a,p){for(var v=this,A=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,E=this.dom.createFragment(this.element),S,C=0;S=A.exec(p);){var H=S[1],U=S[2],V=S[3],F=S[4],he=S[5];if(!(!v.showSpaces&&U)){var P=C!=S.index?p.slice(C,S.index):"";if(C=S.index+S[0].length,P&&E.appendChild(this.dom.createTextNode(P,this.element)),H){var O=v.session.getScreenTabSize(n+S.index),b=v.$tabStrings[O].cloneNode(!0);b.charCount=1,E.appendChild(b),n+=O-1}else if(U)if(v.showSpaces){var y=this.dom.createElement("span");y.className="ace_invisible ace_invisible_space",y.textContent=_.stringRepeat(v.SPACE_CHAR,U.length),E.appendChild(y)}else E.appendChild(this.dom.createTextNode(U,this.element));else if(V){var y=this.dom.createElement("span");y.className="ace_invisible ace_invisible_space ace_invalid",y.textContent=_.stringRepeat(v.SPACE_CHAR,V.length),E.appendChild(y)}else if(F){n+=1;var y=this.dom.createElement("span");y.style.width=v.config.characterWidth*2+"px",y.className=v.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",y.textContent=v.showSpaces?v.SPACE_CHAR:F,E.appendChild(y)}else if(he){n+=1;var y=this.dom.createElement("span");y.style.width=v.config.characterWidth*2+"px",y.className="ace_cjk",y.textContent=he,E.appendChild(y)}}}if(E.appendChild(this.dom.createTextNode(C?p.slice(C):p,this.element)),o(a.type))e.appendChild(E);else{var T="ace_"+a.type.replace(/\./g," ace_"),y=this.dom.createElement("span");a.type=="fold"&&(y.style.width=a.value.length*this.config.characterWidth+"px",y.setAttribute("title",t("inline-fold.closed.title","Unfold code"))),y.className=T,y.appendChild(E),e.appendChild(y)}return n+p.length},i.prototype.renderIndentGuide=function(e,n,a){var p=n.search(this.$indentGuideRe);if(p<=0||p>=a)return n;if(n[0]==" "){p-=p%this.tabSize;for(var v=p/this.tabSize,A=0;A<v;A++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),n.substr(p)}else if(n[0]==" "){for(var A=0;A<p;A++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),n.substr(p)}return this.$highlightIndentGuide(),n},i.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var e=this.session.doc.$lines;if(e){var n=this.session.selection.getCursor(),a=/^\s*/.exec(this.session.doc.getLine(n.row))[0].length,p=Math.floor(a/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:p,start:n.row};var v=this.session.$bracketHighlight;if(v){for(var A=this.session.$bracketHighlight.ranges,E=0;E<A.length;E++)if(n.row!==A[E].start.row){this.$highlightIndentGuideMarker.end=A[E].start.row+1,n.row>A[E].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&e[n.row]!==""&&n.column===e[n.row].length){this.$highlightIndentGuideMarker.dir=1;for(var E=n.row+1;E<e.length;E++){var S=e[E],C=/^\s*/.exec(S)[0].length;if(S!==""&&(this.$highlightIndentGuideMarker.end=E,C<=a))break}}this.$renderHighlightIndentGuide()}}},i.prototype.$clearActiveIndentGuide=function(){for(var e=this.element.querySelectorAll(".ace_indent-guide-active"),n=0;n<e.length;n++)e[n].classList.remove("ace_indent-guide-active")},i.prototype.$setIndentGuideActive=function(e,n){var a=this.session.doc.getLine(e.row);if(a!==""){var p=e.element;if(e.element.classList&&e.element.classList.contains("ace_line_group"))if(e.element.childNodes.length>0)p=e.element.childNodes[0];else return;var v=p.childNodes;if(v){var A=v[n-1];A&&A.classList&&A.classList.contains("ace_indent-guide")&&A.classList.add("ace_indent-guide-active")}}},i.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var n=this.$highlightIndentGuideMarker.indentLevel;if(n!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var a=0;a<e.length;a++){var p=e[a];if(this.$highlightIndentGuideMarker.end&&p.row>=this.$highlightIndentGuideMarker.start+1){if(p.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(p,n)}}else for(var a=e.length-1;a>=0;a--){var p=e[a];if(this.$highlightIndentGuideMarker.end&&p.row<this.$highlightIndentGuideMarker.start){if(p.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(p,n)}}}},i.prototype.$createLineElement=function(e){var n=this.dom.createElement("div");return n.className="ace_line",n.style.height=this.config.lineHeight+"px",n},i.prototype.$renderWrappedLine=function(e,n,a){var p=0,v=0,A=a[0],E=0,S=this.$createLineElement();e.appendChild(S);for(var C=0;C<n.length;C++){var H=n[C],U=H.value;if(C==0&&this.displayIndentGuides){if(p=U.length,U=this.renderIndentGuide(S,U,A),!U)continue;p-=U.length}if(p+U.length<A)E=this.$renderToken(S,E,H,U),p+=U.length;else{for(;p+U.length>=A;){E=this.$renderToken(S,E,H,U.substring(0,A-p)),U=U.substring(A-p),p=A,S=this.$createLineElement(),e.appendChild(S);var V=this.dom.createTextNode(_.stringRepeat(" ",a.indent),this.element);V.charCount=0,S.appendChild(V),v++,E=0,A=a[v]||Number.MAX_VALUE}U.length!=0&&(p+=U.length,E=this.$renderToken(S,E,H,U))}}a[a.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(S,E,null,"",!0)},i.prototype.$renderSimpleLine=function(e,n){for(var a=0,p=0;p<n.length;p++){var v=n[p],A=v.value;if(!(p==0&&this.displayIndentGuides&&(A=this.renderIndentGuide(e,A),!A))){if(a+A.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,a,v,A);a=this.$renderToken(e,a,v,A)}}},i.prototype.$renderOverflowMessage=function(e,n,a,p,v){a&&this.$renderToken(e,n,a,p.slice(0,this.MAX_LINE_LENGTH-n));var A=this.dom.createElement("span");A.className="ace_inline_button ace_keyword ace_toggle_wrap",A.textContent=v?"<hide>":"<click to see more...>",e.appendChild(A)},i.prototype.$renderLine=function(e,n,a){if(!a&&a!=!1&&(a=this.session.getFoldLine(n)),a)var p=this.$getFoldLineTokens(n,a);else var p=this.session.getTokens(n);var v=e;if(p.length){var A=this.session.getRowSplitData(n);if(A&&A.length){this.$renderWrappedLine(e,p,A);var v=e.lastChild}else{var v=e;this.$useLineGroups()&&(v=this.$createLineElement(),e.appendChild(v)),this.$renderSimpleLine(v,p)}}else this.$useLineGroups()&&(v=this.$createLineElement(),e.appendChild(v));if(this.showEOL&&v){a&&(n=a.end.row);var E=this.dom.createElement("span");E.className="ace_invisible ace_invisible_eol",E.textContent=n==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,v.appendChild(E)}},i.prototype.$getFoldLineTokens=function(e,n){var a=this.session,p=[];function v(E,S,C){for(var H=0,U=0;U+E[H].value.length<S;)if(U+=E[H].value.length,H++,H==E.length)return;if(U!=S){var V=E[H].value.substring(S-U);V.length>C-S&&(V=V.substring(0,C-S)),p.push({type:E[H].type,value:V}),U=S+V.length,H+=1}for(;U<C&&H<E.length;){var V=E[H].value;V.length+U>C?p.push({type:E[H].type,value:V.substring(0,C-U)}):p.push(E[H]),U+=V.length,H+=1}}var A=a.getTokens(e);return n.walk(function(E,S,C,H,U){E!=null?p.push({type:"fold",value:E}):(U&&(A=a.getTokens(S)),A.length&&v(A,H,C))},n.end.row,this.session.getLine(n.end.row).length),p},i.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},i})();r.prototype.EOF_CHAR="¶",r.prototype.EOL_CHAR_LF="¬",r.prototype.EOL_CHAR_CRLF="¤",r.prototype.EOL_CHAR=r.prototype.EOL_CHAR_LF,r.prototype.TAB_CHAR="—",r.prototype.SPACE_CHAR="·",r.prototype.$padding=0,r.prototype.MAX_LINE_LENGTH=1e4,r.prototype.showInvisibles=!1,r.prototype.showSpaces=!1,r.prototype.showTabs=!1,r.prototype.showEOL=!1,r.prototype.displayIndentGuides=!0,r.prototype.$highlightIndentGuides=!0,r.prototype.$tabStrings=[],r.prototype.destroy={},r.prototype.onChangeTabSize=r.prototype.$computeTabString,k.implement(r.prototype,h),g.Text=r}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(f,g,j){var k=f("../lib/dom"),x=(function(){function _(c){this.element=k.createElement("div"),this.element.className="ace_layer ace_cursor-layer",c.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),k.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return _.prototype.$updateOpacity=function(c){for(var h=this.cursors,t=h.length;t--;)k.setStyle(h[t].style,"opacity",c?"":"0")},_.prototype.$startCssAnimation=function(){for(var c=this.cursors,h=c.length;h--;)c[h].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&k.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},_.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,k.removeCssClass(this.element,"ace_animate-blinking")},_.prototype.setPadding=function(c){this.$padding=c},_.prototype.setSession=function(c){this.session=c},_.prototype.setBlinking=function(c){c!=this.isBlinking&&(this.isBlinking=c,this.restartTimer())},_.prototype.setBlinkInterval=function(c){c!=this.blinkInterval&&(this.blinkInterval=c,this.restartTimer())},_.prototype.setSmoothBlinking=function(c){c!=this.smoothBlinking&&(this.smoothBlinking=c,k.setCssClass(this.element,"ace_smooth-blinking",c),this.$updateCursors(!0),this.restartTimer())},_.prototype.addCursor=function(){var c=k.createElement("div");return c.className="ace_cursor",this.element.appendChild(c),this.cursors.push(c),c},_.prototype.removeCursor=function(){if(this.cursors.length>1){var c=this.cursors.pop();return c.parentNode.removeChild(c),c}},_.prototype.hideCursor=function(){this.isVisible=!1,k.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},_.prototype.showCursor=function(){this.isVisible=!0,k.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},_.prototype.restartTimer=function(){var c=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,k.removeCssClass(this.element,"ace_smooth-blinking")),c(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&k.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),k.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var h=(function(){this.timeoutId=setTimeout(function(){c(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){c(!0),h()},this.blinkInterval),h()}},_.prototype.getPixelPosition=function(c,h){if(!this.config||!this.session)return{left:0,top:0};c||(c=this.session.selection.getCursor());var t=this.session.documentToScreenPosition(c),o=this.$padding+(this.session.$bidiHandler.isBidiRow(t.row,c.row)?this.session.$bidiHandler.getPosLeft(t.column):t.column*this.config.characterWidth),r=(t.row-(h?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:o,top:r}},_.prototype.isCursorInView=function(c,h){return c.top>=0&&c.top<h.maxHeight},_.prototype.update=function(c){this.config=c;var h=this.session.$selectionMarkers,t=0,o=0;(h===void 0||h.length===0)&&(h=[{cursor:null}]);for(var t=0,r=h.length;t<r;t++){var i=this.getPixelPosition(h[t].cursor,!0);if(!((i.top>c.height+c.offset||i.top<0)&&t>1)){var e=this.cursors[o++]||this.addCursor(),n=e.style;this.drawCursor?this.drawCursor(e,i,c,h[t],this.session):this.isCursorInView(i,c)?(k.setStyle(n,"display","block"),k.translate(e,i.left,i.top),k.setStyle(n,"width",Math.round(c.characterWidth)+"px"),k.setStyle(n,"height",c.lineHeight+"px")):k.setStyle(n,"display","none")}}for(;this.cursors.length>o;)this.removeCursor();var a=this.session.getOverwrite();this.$setOverwrite(a),this.$pixelPos=i,this.restartTimer()},_.prototype.$setOverwrite=function(c){c!=this.overwrite&&(this.overwrite=c,c?k.addCssClass(this.element,"ace_overwrite-cursors"):k.removeCssClass(this.element,"ace_overwrite-cursors"))},_.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},_})();x.prototype.$padding=0,x.prototype.drawCursor=null,g.Cursor=x}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(f,g,j){var k=this&&this.__extends||(function(){var e=function(n,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,v){p.__proto__=v}||function(p,v){for(var A in v)Object.prototype.hasOwnProperty.call(v,A)&&(p[A]=v[A])},e(n,a)};return function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");e(n,a);function p(){this.constructor=n}n.prototype=a===null?Object.create(a):(p.prototype=a.prototype,new p)}})(),x=f("./lib/oop"),_=f("./lib/dom"),c=f("./lib/event"),h=f("./lib/event_emitter").EventEmitter,t=32768,o=(function(){function e(n,a){this.element=_.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+a,this.inner=_.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),n.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,c.addListener(this.element,"scroll",this.onScroll.bind(this)),c.addListener(this.element,"mousedown",c.preventDefault)}return e.prototype.setVisible=function(n){this.element.style.display=n?"":"none",this.isVisible=n,this.coeff=1},e})();x.implement(o.prototype,h);var r=(function(e){k(n,e);function n(a,p){var v=e.call(this,a,"-v")||this;return v.scrollTop=0,v.scrollHeight=0,p.$scrollbarWidth=v.width=_.scrollbarWidth(a.ownerDocument),v.inner.style.width=v.element.style.width=(v.width||15)+5+"px",v.$minWidth=0,v}return n.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var a=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-a)/(this.coeff-a)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},n.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},n.prototype.setHeight=function(a){this.element.style.height=a+"px"},n.prototype.setScrollHeight=function(a){this.scrollHeight=a,a>t?(this.coeff=t/a,a=t):this.coeff!=1&&(this.coeff=1),this.inner.style.height=a+"px"},n.prototype.setScrollTop=function(a){this.scrollTop!=a&&(this.skipEvent=!0,this.scrollTop=a,this.element.scrollTop=a*this.coeff)},n})(o);r.prototype.setInnerHeight=r.prototype.setScrollHeight;var i=(function(e){k(n,e);function n(a,p){var v=e.call(this,a,"-h")||this;return v.scrollLeft=0,v.height=p.$scrollbarWidth,v.inner.style.height=v.element.style.height=(v.height||15)+5+"px",v}return n.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},n.prototype.getHeight=function(){return this.isVisible?this.height:0},n.prototype.setWidth=function(a){this.element.style.width=a+"px"},n.prototype.setInnerWidth=function(a){this.inner.style.width=a+"px"},n.prototype.setScrollWidth=function(a){this.inner.style.width=a+"px"},n.prototype.setScrollLeft=function(a){this.scrollLeft!=a&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=a)},n})(o);g.ScrollBar=r,g.ScrollBarV=r,g.ScrollBarH=i,g.VScrollBar=r,g.HScrollBar=i}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(f,g,j){var k=this&&this.__extends||(function(){var i=function(e,n){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,p){a.__proto__=p}||function(a,p){for(var v in p)Object.prototype.hasOwnProperty.call(p,v)&&(a[v]=p[v])},i(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");i(e,n);function a(){this.constructor=e}e.prototype=n===null?Object.create(n):(a.prototype=n.prototype,new a)}})(),x=f("./lib/oop"),_=f("./lib/dom"),c=f("./lib/event"),h=f("./lib/event_emitter").EventEmitter;_.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
|
220
|
+
position: absolute;
|
221
|
+
background: rgba(128, 128, 128, 0.6);
|
222
|
+
-moz-box-sizing: border-box;
|
223
|
+
box-sizing: border-box;
|
224
|
+
border: 1px solid #bbb;
|
225
|
+
border-radius: 2px;
|
226
|
+
z-index: 8;
|
227
|
+
}
|
228
|
+
.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
|
229
|
+
position: absolute;
|
230
|
+
z-index: 6;
|
231
|
+
background: none;
|
232
|
+
overflow: hidden!important;
|
233
|
+
}
|
234
|
+
.ace_editor>.ace_sb-v {
|
235
|
+
z-index: 6;
|
236
|
+
right: 0;
|
237
|
+
top: 0;
|
238
|
+
width: 12px;
|
239
|
+
}
|
240
|
+
.ace_editor>.ace_sb-v div {
|
241
|
+
z-index: 8;
|
242
|
+
right: 0;
|
243
|
+
width: 100%;
|
244
|
+
}
|
245
|
+
.ace_editor>.ace_sb-h {
|
246
|
+
bottom: 0;
|
247
|
+
left: 0;
|
248
|
+
height: 12px;
|
249
|
+
}
|
250
|
+
.ace_editor>.ace_sb-h div {
|
251
|
+
bottom: 0;
|
252
|
+
height: 100%;
|
253
|
+
}
|
254
|
+
.ace_editor>.ace_sb_grabbed {
|
255
|
+
z-index: 8;
|
256
|
+
background: #000;
|
257
|
+
}`,"ace_scrollbar.css",!1);var t=(function(){function i(e,n){this.element=_.createElement("div"),this.element.className="ace_sb"+n,this.inner=_.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,c.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return i.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},i})();x.implement(t.prototype,h);var o=(function(i){k(e,i);function e(n,a){var p=i.call(this,n,"-v")||this;return p.scrollTop=0,p.scrollHeight=0,p.parent=n,p.width=p.VScrollWidth,p.renderer=a,p.inner.style.width=p.element.style.width=(p.width||15)+"px",p.$minWidth=0,p}return e.prototype.onMouseDown=function(n,a){if(n==="mousedown"&&!(c.getButton(a)!==0||a.detail===2)){if(a.target===this.inner){var p=this,v=a.clientY,A=function(F){v=F.clientY},E=function(){clearInterval(U)},S=a.clientY,C=this.thumbTop,H=function(){if(v!==void 0){var F=p.scrollTopFromThumbTop(C+v-S);F!==p.scrollTop&&p._emit("scroll",{data:F})}};c.capture(this.inner,A,E);var U=setInterval(H,20);return c.preventDefault(a)}var V=a.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(V)}),c.preventDefault(a)}},e.prototype.getHeight=function(){return this.height},e.prototype.scrollTopFromThumbTop=function(n){var a=n*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return a=a>>0,a<0?a=0:a>this.pageHeight-this.viewHeight&&(a=this.pageHeight-this.viewHeight),a},e.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},e.prototype.setHeight=function(n){this.height=Math.max(0,n),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},e.prototype.setScrollHeight=function(n,a){this.pageHeight===n&&!a||(this.pageHeight=n,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},e.prototype.setScrollTop=function(n){this.scrollTop=n,n<0&&(n=0),this.thumbTop=n*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},e})(t);o.prototype.setInnerHeight=o.prototype.setScrollHeight;var r=(function(i){k(e,i);function e(n,a){var p=i.call(this,n,"-h")||this;return p.scrollLeft=0,p.scrollWidth=0,p.height=p.HScrollHeight,p.inner.style.height=p.element.style.height=(p.height||12)+"px",p.renderer=a,p}return e.prototype.onMouseDown=function(n,a){if(n==="mousedown"&&!(c.getButton(a)!==0||a.detail===2)){if(a.target===this.inner){var p=this,v=a.clientX,A=function(F){v=F.clientX},E=function(){clearInterval(U)},S=a.clientX,C=this.thumbLeft,H=function(){if(v!==void 0){var F=p.scrollLeftFromThumbLeft(C+v-S);F!==p.scrollLeft&&p._emit("scroll",{data:F})}};c.capture(this.inner,A,E);var U=setInterval(H,20);return c.preventDefault(a)}var V=a.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(V)}),c.preventDefault(a)}},e.prototype.getHeight=function(){return this.isVisible?this.height:0},e.prototype.scrollLeftFromThumbLeft=function(n){var a=n*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return a=a>>0,a<0?a=0:a>this.pageWidth-this.viewWidth&&(a=this.pageWidth-this.viewWidth),a},e.prototype.setWidth=function(n){this.width=Math.max(0,n),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},e.prototype.setScrollWidth=function(n,a){this.pageWidth===n&&!a||(this.pageWidth=n,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},e.prototype.setScrollLeft=function(n){this.scrollLeft=n,n<0&&(n=0),this.thumbLeft=n*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},e})(t);r.prototype.setInnerWidth=r.prototype.setScrollWidth,g.ScrollBar=o,g.ScrollBarV=o,g.ScrollBarH=r,g.VScrollBar=o,g.HScrollBar=r}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(f,g,j){var k=f("./lib/event"),x=(function(){function _(c,h){this.onRender=c,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=h||window;var t=this;this._flush=function(o){t.pending=!1;var r=t.changes;if(r&&(k.blockIdle(100),t.changes=0,t.onRender(r)),t.changes){if(t.$recursionLimit--<0)return;t.schedule()}else t.$recursionLimit=2}}return _.prototype.schedule=function(c){this.changes=this.changes|c,this.changes&&!this.pending&&(k.nextFrame(this._flush),this.pending=!0)},_.prototype.clear=function(c){var h=this.changes;return this.changes=0,h},_})();g.RenderLoop=x}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(f,g,j){var k=f("../lib/oop"),x=f("../lib/dom"),_=f("../lib/lang"),c=f("../lib/event"),h=f("../lib/useragent"),t=f("../lib/event_emitter").EventEmitter,o=512,r=typeof ResizeObserver=="function",i=200,e=(function(){function n(a){this.el=x.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=x.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=x.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),a.appendChild(this.el),this.$measureNode.textContent=_.stringRepeat("X",o),this.$characterSize={width:0,height:0},r?this.$addObserver():this.checkForSizeChanges()}return n.prototype.$setMeasureNodeStyles=function(a,p){a.width=a.height="auto",a.left=a.top="0px",a.visibility="hidden",a.position="absolute",a.whiteSpace="pre",h.isIE<8?a["font-family"]="inherit":a.font="inherit",a.overflow=p?"hidden":"visible"},n.prototype.checkForSizeChanges=function(a){if(a===void 0&&(a=this.$measureSizes()),a&&(this.$characterSize.width!==a.width||this.$characterSize.height!==a.height)){this.$measureNode.style.fontWeight="bold";var p=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=a,this.charSizes=Object.create(null),this.allowBoldFonts=p&&p.width===a.width&&p.height===a.height,this._emit("changeCharacterSize",{data:a})}},n.prototype.$addObserver=function(){var a=this;this.$observer=new window.ResizeObserver(function(p){a.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},n.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var a=this;return this.$pollSizeChangesTimer=c.onIdle(function p(){a.checkForSizeChanges(),c.onIdle(p,500)},500)},n.prototype.setPolling=function(a){a?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},n.prototype.$measureSizes=function(a){var p={height:(a||this.$measureNode).clientHeight,width:(a||this.$measureNode).clientWidth/o};return p.width===0||p.height===0?null:p},n.prototype.$measureCharWidth=function(a){this.$main.textContent=_.stringRepeat(a,o);var p=this.$main.getBoundingClientRect();return p.width/o},n.prototype.getCharacterWidth=function(a){var p=this.charSizes[a];return p===void 0&&(p=this.charSizes[a]=this.$measureCharWidth(a)/this.$characterSize.width),p},n.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},n.prototype.$getZoom=function(a){return!a||!a.parentElement?1:(Number(window.getComputedStyle(a).zoom)||1)*this.$getZoom(a.parentElement)},n.prototype.$initTransformMeasureNodes=function(){var a=function(p,v){return["div",{style:"position: absolute;top:"+p+"px;left:"+v+"px;"}]};this.els=x.buildDom([a(0,0),a(i,0),a(0,i),a(i,i)],this.el)},n.prototype.transformCoordinates=function(a,p){if(a){var v=this.$getZoom(this.el);a=C(1/v,a)}function A(Ce,Oe,gt){var ze=Ce[1]*Oe[0]-Ce[0]*Oe[1];return[(-Oe[1]*gt[0]+Oe[0]*gt[1])/ze,(+Ce[1]*gt[0]-Ce[0]*gt[1])/ze]}function E(Ce,Oe){return[Ce[0]-Oe[0],Ce[1]-Oe[1]]}function S(Ce,Oe){return[Ce[0]+Oe[0],Ce[1]+Oe[1]]}function C(Ce,Oe){return[Ce*Oe[0],Ce*Oe[1]]}this.els||this.$initTransformMeasureNodes();function H(Ce){var Oe=Ce.getBoundingClientRect();return[Oe.left,Oe.top]}var U=H(this.els[0]),V=H(this.els[1]),F=H(this.els[2]),he=H(this.els[3]),P=A(E(he,V),E(he,F),E(S(V,F),S(he,U))),O=C(1+P[0],E(V,U)),b=C(1+P[1],E(F,U));if(p){var y=p,T=P[0]*y[0]/i+P[1]*y[1]/i+1,G=S(C(y[0],O),C(y[1],b));return S(C(1/T/i,G),U)}var q=E(a,U),ue=A(E(O,C(P[0],q)),E(b,C(P[1],q)),q);return C(i,ue)},n})();e.prototype.$characterSize={width:0,height:0},k.implement(e.prototype,t),g.FontMetrics=e}),ace.define("ace/css/editor-css",["require","exports","module"],function(f,g,j){j.exports=`
|
258
|
+
.ace_br1 {border-top-left-radius : 3px;}
|
259
|
+
.ace_br2 {border-top-right-radius : 3px;}
|
260
|
+
.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
|
261
|
+
.ace_br4 {border-bottom-right-radius: 3px;}
|
262
|
+
.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
|
263
|
+
.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
|
264
|
+
.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
|
265
|
+
.ace_br8 {border-bottom-left-radius : 3px;}
|
266
|
+
.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
|
267
|
+
.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
|
268
|
+
.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
|
269
|
+
.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
270
|
+
.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
271
|
+
.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
272
|
+
.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
273
|
+
|
274
|
+
|
275
|
+
.ace_editor {
|
276
|
+
position: relative;
|
277
|
+
overflow: hidden;
|
278
|
+
padding: 0;
|
279
|
+
font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
|
280
|
+
direction: ltr;
|
281
|
+
text-align: left;
|
282
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
283
|
+
forced-color-adjust: none;
|
284
|
+
}
|
285
|
+
|
286
|
+
.ace_scroller {
|
287
|
+
position: absolute;
|
288
|
+
overflow: hidden;
|
289
|
+
top: 0;
|
290
|
+
bottom: 0;
|
291
|
+
background-color: inherit;
|
292
|
+
-ms-user-select: none;
|
293
|
+
-moz-user-select: none;
|
294
|
+
-webkit-user-select: none;
|
295
|
+
user-select: none;
|
296
|
+
cursor: text;
|
297
|
+
}
|
298
|
+
|
299
|
+
.ace_content {
|
300
|
+
position: absolute;
|
301
|
+
box-sizing: border-box;
|
302
|
+
min-width: 100%;
|
303
|
+
contain: style size layout;
|
304
|
+
font-variant-ligatures: no-common-ligatures;
|
305
|
+
}
|
306
|
+
.ace_invisible {
|
307
|
+
font-variant-ligatures: none;
|
308
|
+
}
|
309
|
+
|
310
|
+
.ace_keyboard-focus:focus {
|
311
|
+
box-shadow: inset 0 0 0 2px #5E9ED6;
|
312
|
+
outline: none;
|
313
|
+
}
|
314
|
+
|
315
|
+
.ace_dragging .ace_scroller:before{
|
316
|
+
position: absolute;
|
317
|
+
top: 0;
|
318
|
+
left: 0;
|
319
|
+
right: 0;
|
320
|
+
bottom: 0;
|
321
|
+
content: '';
|
322
|
+
background: rgba(250, 250, 250, 0.01);
|
323
|
+
z-index: 1000;
|
324
|
+
}
|
325
|
+
.ace_dragging.ace_dark .ace_scroller:before{
|
326
|
+
background: rgba(0, 0, 0, 0.01);
|
327
|
+
}
|
328
|
+
|
329
|
+
.ace_gutter {
|
330
|
+
position: absolute;
|
331
|
+
overflow : hidden;
|
332
|
+
width: auto;
|
333
|
+
top: 0;
|
334
|
+
bottom: 0;
|
335
|
+
left: 0;
|
336
|
+
cursor: default;
|
337
|
+
z-index: 4;
|
338
|
+
-ms-user-select: none;
|
339
|
+
-moz-user-select: none;
|
340
|
+
-webkit-user-select: none;
|
341
|
+
user-select: none;
|
342
|
+
contain: style size layout;
|
343
|
+
}
|
344
|
+
|
345
|
+
.ace_gutter-active-line {
|
346
|
+
position: absolute;
|
347
|
+
left: 0;
|
348
|
+
right: 0;
|
349
|
+
}
|
350
|
+
|
351
|
+
.ace_scroller.ace_scroll-left:after {
|
352
|
+
content: "";
|
353
|
+
position: absolute;
|
354
|
+
top: 0;
|
355
|
+
right: 0;
|
356
|
+
bottom: 0;
|
357
|
+
left: 0;
|
358
|
+
box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
|
359
|
+
pointer-events: none;
|
360
|
+
}
|
361
|
+
|
362
|
+
.ace_gutter-cell, .ace_gutter-cell_svg-icons {
|
363
|
+
position: absolute;
|
364
|
+
top: 0;
|
365
|
+
left: 0;
|
366
|
+
right: 0;
|
367
|
+
padding-left: 19px;
|
368
|
+
padding-right: 6px;
|
369
|
+
background-repeat: no-repeat;
|
370
|
+
}
|
371
|
+
|
372
|
+
.ace_gutter-cell_svg-icons .ace_gutter_annotation {
|
373
|
+
margin-left: -14px;
|
374
|
+
float: left;
|
375
|
+
}
|
376
|
+
|
377
|
+
.ace_gutter-cell .ace_gutter_annotation {
|
378
|
+
margin-left: -19px;
|
379
|
+
float: left;
|
380
|
+
}
|
381
|
+
|
382
|
+
.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {
|
383
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");
|
384
|
+
background-repeat: no-repeat;
|
385
|
+
background-position: 2px center;
|
386
|
+
}
|
387
|
+
|
388
|
+
.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
|
389
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");
|
390
|
+
background-repeat: no-repeat;
|
391
|
+
background-position: 2px center;
|
392
|
+
}
|
393
|
+
|
394
|
+
.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
|
395
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
|
396
|
+
background-repeat: no-repeat;
|
397
|
+
background-position: 2px center;
|
398
|
+
}
|
399
|
+
|
400
|
+
.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {
|
401
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
|
402
|
+
}
|
403
|
+
|
404
|
+
.ace_icon_svg.ace_error {
|
405
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
|
406
|
+
background-color: crimson;
|
407
|
+
}
|
408
|
+
.ace_icon_svg.ace_security {
|
409
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
|
410
|
+
background-color: crimson;
|
411
|
+
}
|
412
|
+
.ace_icon_svg.ace_warning {
|
413
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
|
414
|
+
background-color: darkorange;
|
415
|
+
}
|
416
|
+
.ace_icon_svg.ace_info {
|
417
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
|
418
|
+
background-color: royalblue;
|
419
|
+
}
|
420
|
+
.ace_icon_svg.ace_hint {
|
421
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
|
422
|
+
background-color: silver;
|
423
|
+
}
|
424
|
+
|
425
|
+
.ace_icon_svg.ace_error_fold {
|
426
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
|
427
|
+
background-color: crimson;
|
428
|
+
}
|
429
|
+
.ace_icon_svg.ace_security_fold {
|
430
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
|
431
|
+
background-color: crimson;
|
432
|
+
}
|
433
|
+
.ace_icon_svg.ace_warning_fold {
|
434
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
|
435
|
+
background-color: darkorange;
|
436
|
+
}
|
437
|
+
|
438
|
+
.ace_scrollbar {
|
439
|
+
contain: strict;
|
440
|
+
position: absolute;
|
441
|
+
right: 0;
|
442
|
+
bottom: 0;
|
443
|
+
z-index: 6;
|
444
|
+
}
|
445
|
+
|
446
|
+
.ace_scrollbar-inner {
|
447
|
+
position: absolute;
|
448
|
+
cursor: text;
|
449
|
+
left: 0;
|
450
|
+
top: 0;
|
451
|
+
}
|
452
|
+
|
453
|
+
.ace_scrollbar-v{
|
454
|
+
overflow-x: hidden;
|
455
|
+
overflow-y: scroll;
|
456
|
+
top: 0;
|
457
|
+
}
|
458
|
+
|
459
|
+
.ace_scrollbar-h {
|
460
|
+
overflow-x: scroll;
|
461
|
+
overflow-y: hidden;
|
462
|
+
left: 0;
|
463
|
+
}
|
464
|
+
|
465
|
+
.ace_print-margin {
|
466
|
+
position: absolute;
|
467
|
+
height: 100%;
|
468
|
+
}
|
469
|
+
|
470
|
+
.ace_text-input {
|
471
|
+
position: absolute;
|
472
|
+
z-index: 0;
|
473
|
+
width: 0.5em;
|
474
|
+
height: 1em;
|
475
|
+
opacity: 0;
|
476
|
+
background: transparent;
|
477
|
+
-moz-appearance: none;
|
478
|
+
appearance: none;
|
479
|
+
border: none;
|
480
|
+
resize: none;
|
481
|
+
outline: none;
|
482
|
+
overflow: hidden;
|
483
|
+
font: inherit;
|
484
|
+
padding: 0 1px;
|
485
|
+
margin: 0 -1px;
|
486
|
+
contain: strict;
|
487
|
+
-ms-user-select: text;
|
488
|
+
-moz-user-select: text;
|
489
|
+
-webkit-user-select: text;
|
490
|
+
user-select: text;
|
491
|
+
/*with \`pre-line\` chrome inserts instead of space*/
|
492
|
+
white-space: pre!important;
|
493
|
+
}
|
494
|
+
.ace_text-input.ace_composition {
|
495
|
+
background: transparent;
|
496
|
+
color: inherit;
|
497
|
+
z-index: 1000;
|
498
|
+
opacity: 1;
|
499
|
+
}
|
500
|
+
.ace_composition_placeholder { color: transparent }
|
501
|
+
.ace_composition_marker {
|
502
|
+
border-bottom: 1px solid;
|
503
|
+
position: absolute;
|
504
|
+
border-radius: 0;
|
505
|
+
margin-top: 1px;
|
506
|
+
}
|
507
|
+
|
508
|
+
[ace_nocontext=true] {
|
509
|
+
transform: none!important;
|
510
|
+
filter: none!important;
|
511
|
+
clip-path: none!important;
|
512
|
+
mask : none!important;
|
513
|
+
contain: none!important;
|
514
|
+
perspective: none!important;
|
515
|
+
mix-blend-mode: initial!important;
|
516
|
+
z-index: auto;
|
517
|
+
}
|
518
|
+
|
519
|
+
.ace_layer {
|
520
|
+
z-index: 1;
|
521
|
+
position: absolute;
|
522
|
+
overflow: hidden;
|
523
|
+
/* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
|
524
|
+
word-wrap: normal;
|
525
|
+
white-space: pre;
|
526
|
+
height: 100%;
|
527
|
+
width: 100%;
|
528
|
+
box-sizing: border-box;
|
529
|
+
/* setting pointer-events: auto; on node under the mouse, which changes
|
530
|
+
during scroll, will break mouse wheel scrolling in Safari */
|
531
|
+
pointer-events: none;
|
532
|
+
}
|
533
|
+
|
534
|
+
.ace_gutter-layer {
|
535
|
+
position: relative;
|
536
|
+
width: auto;
|
537
|
+
text-align: right;
|
538
|
+
pointer-events: auto;
|
539
|
+
height: 1000000px;
|
540
|
+
contain: style size layout;
|
541
|
+
}
|
542
|
+
|
543
|
+
.ace_text-layer {
|
544
|
+
font: inherit !important;
|
545
|
+
position: absolute;
|
546
|
+
height: 1000000px;
|
547
|
+
width: 1000000px;
|
548
|
+
contain: style size layout;
|
549
|
+
}
|
550
|
+
|
551
|
+
.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
|
552
|
+
contain: style size layout;
|
553
|
+
position: absolute;
|
554
|
+
top: 0;
|
555
|
+
left: 0;
|
556
|
+
right: 0;
|
557
|
+
}
|
558
|
+
|
559
|
+
.ace_hidpi .ace_text-layer,
|
560
|
+
.ace_hidpi .ace_gutter-layer,
|
561
|
+
.ace_hidpi .ace_content,
|
562
|
+
.ace_hidpi .ace_gutter {
|
563
|
+
contain: strict;
|
564
|
+
}
|
565
|
+
.ace_hidpi .ace_text-layer > .ace_line,
|
566
|
+
.ace_hidpi .ace_text-layer > .ace_line_group {
|
567
|
+
contain: strict;
|
568
|
+
}
|
569
|
+
|
570
|
+
.ace_cjk {
|
571
|
+
display: inline-block;
|
572
|
+
text-align: center;
|
573
|
+
}
|
574
|
+
|
575
|
+
.ace_cursor-layer {
|
576
|
+
z-index: 4;
|
577
|
+
}
|
578
|
+
|
579
|
+
.ace_cursor {
|
580
|
+
z-index: 4;
|
581
|
+
position: absolute;
|
582
|
+
box-sizing: border-box;
|
583
|
+
border-left: 2px solid;
|
584
|
+
/* workaround for smooth cursor repaintng whole screen in chrome */
|
585
|
+
transform: translatez(0);
|
586
|
+
}
|
587
|
+
|
588
|
+
.ace_multiselect .ace_cursor {
|
589
|
+
border-left-width: 1px;
|
590
|
+
}
|
591
|
+
|
592
|
+
.ace_slim-cursors .ace_cursor {
|
593
|
+
border-left-width: 1px;
|
594
|
+
}
|
595
|
+
|
596
|
+
.ace_overwrite-cursors .ace_cursor {
|
597
|
+
border-left-width: 0;
|
598
|
+
border-bottom: 1px solid;
|
599
|
+
}
|
600
|
+
|
601
|
+
.ace_hidden-cursors .ace_cursor {
|
602
|
+
opacity: 0.2;
|
603
|
+
}
|
604
|
+
|
605
|
+
.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
|
606
|
+
opacity: 0;
|
607
|
+
}
|
608
|
+
|
609
|
+
.ace_smooth-blinking .ace_cursor {
|
610
|
+
transition: opacity 0.18s;
|
611
|
+
}
|
612
|
+
|
613
|
+
.ace_animate-blinking .ace_cursor {
|
614
|
+
animation-duration: 1000ms;
|
615
|
+
animation-timing-function: step-end;
|
616
|
+
animation-name: blink-ace-animate;
|
617
|
+
animation-iteration-count: infinite;
|
618
|
+
}
|
619
|
+
|
620
|
+
.ace_animate-blinking.ace_smooth-blinking .ace_cursor {
|
621
|
+
animation-duration: 1000ms;
|
622
|
+
animation-timing-function: ease-in-out;
|
623
|
+
animation-name: blink-ace-animate-smooth;
|
624
|
+
}
|
625
|
+
|
626
|
+
@keyframes blink-ace-animate {
|
627
|
+
from, to { opacity: 1; }
|
628
|
+
60% { opacity: 0; }
|
629
|
+
}
|
630
|
+
|
631
|
+
@keyframes blink-ace-animate-smooth {
|
632
|
+
from, to { opacity: 1; }
|
633
|
+
45% { opacity: 1; }
|
634
|
+
60% { opacity: 0; }
|
635
|
+
85% { opacity: 0; }
|
636
|
+
}
|
637
|
+
|
638
|
+
.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
|
639
|
+
position: absolute;
|
640
|
+
z-index: 3;
|
641
|
+
}
|
642
|
+
|
643
|
+
.ace_marker-layer .ace_selection {
|
644
|
+
position: absolute;
|
645
|
+
z-index: 5;
|
646
|
+
}
|
647
|
+
|
648
|
+
.ace_marker-layer .ace_bracket {
|
649
|
+
position: absolute;
|
650
|
+
z-index: 6;
|
651
|
+
}
|
652
|
+
|
653
|
+
.ace_marker-layer .ace_error_bracket {
|
654
|
+
position: absolute;
|
655
|
+
border-bottom: 1px solid #DE5555;
|
656
|
+
border-radius: 0;
|
657
|
+
}
|
658
|
+
|
659
|
+
.ace_marker-layer .ace_active-line {
|
660
|
+
position: absolute;
|
661
|
+
z-index: 2;
|
662
|
+
}
|
663
|
+
|
664
|
+
.ace_marker-layer .ace_selected-word {
|
665
|
+
position: absolute;
|
666
|
+
z-index: 4;
|
667
|
+
box-sizing: border-box;
|
668
|
+
}
|
669
|
+
|
670
|
+
.ace_line .ace_fold {
|
671
|
+
box-sizing: border-box;
|
672
|
+
|
673
|
+
display: inline-block;
|
674
|
+
height: 11px;
|
675
|
+
margin-top: -2px;
|
676
|
+
vertical-align: middle;
|
677
|
+
|
678
|
+
background-image:
|
679
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
680
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
|
681
|
+
background-repeat: no-repeat, repeat-x;
|
682
|
+
background-position: center center, top left;
|
683
|
+
color: transparent;
|
684
|
+
|
685
|
+
border: 1px solid black;
|
686
|
+
border-radius: 2px;
|
687
|
+
|
688
|
+
cursor: pointer;
|
689
|
+
pointer-events: auto;
|
690
|
+
}
|
691
|
+
|
692
|
+
.ace_dark .ace_fold {
|
693
|
+
}
|
694
|
+
|
695
|
+
.ace_fold:hover{
|
696
|
+
background-image:
|
697
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
698
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
|
699
|
+
}
|
700
|
+
|
701
|
+
.ace_tooltip {
|
702
|
+
background-color: #f5f5f5;
|
703
|
+
border: 1px solid gray;
|
704
|
+
border-radius: 1px;
|
705
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
|
706
|
+
color: black;
|
707
|
+
padding: 3px 4px;
|
708
|
+
position: absolute;
|
709
|
+
z-index: 999999;
|
710
|
+
box-sizing: border-box;
|
711
|
+
cursor: default;
|
712
|
+
white-space: pre-wrap;
|
713
|
+
word-wrap: break-word;
|
714
|
+
line-height: normal;
|
715
|
+
font-style: normal;
|
716
|
+
font-weight: normal;
|
717
|
+
letter-spacing: normal;
|
718
|
+
pointer-events: none;
|
719
|
+
overflow: auto;
|
720
|
+
max-width: min(33em, 66vw);
|
721
|
+
overscroll-behavior: contain;
|
722
|
+
}
|
723
|
+
.ace_tooltip pre {
|
724
|
+
white-space: pre-wrap;
|
725
|
+
}
|
726
|
+
|
727
|
+
.ace_tooltip.ace_dark {
|
728
|
+
background-color: #636363;
|
729
|
+
color: #fff;
|
730
|
+
}
|
731
|
+
|
732
|
+
.ace_tooltip:focus {
|
733
|
+
outline: 1px solid #5E9ED6;
|
734
|
+
}
|
735
|
+
|
736
|
+
.ace_icon {
|
737
|
+
display: inline-block;
|
738
|
+
width: 18px;
|
739
|
+
vertical-align: top;
|
740
|
+
}
|
741
|
+
|
742
|
+
.ace_icon_svg {
|
743
|
+
display: inline-block;
|
744
|
+
width: 12px;
|
745
|
+
vertical-align: top;
|
746
|
+
-webkit-mask-repeat: no-repeat;
|
747
|
+
-webkit-mask-size: 12px;
|
748
|
+
-webkit-mask-position: center;
|
749
|
+
}
|
750
|
+
|
751
|
+
.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
|
752
|
+
padding-right: 13px;
|
753
|
+
}
|
754
|
+
|
755
|
+
.ace_fold-widget, .ace_custom-widget {
|
756
|
+
box-sizing: border-box;
|
757
|
+
|
758
|
+
margin: 0 -12px 0 1px;
|
759
|
+
display: none;
|
760
|
+
width: 11px;
|
761
|
+
vertical-align: top;
|
762
|
+
|
763
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
|
764
|
+
background-repeat: no-repeat;
|
765
|
+
background-position: center;
|
766
|
+
|
767
|
+
border-radius: 3px;
|
768
|
+
|
769
|
+
border: 1px solid transparent;
|
770
|
+
cursor: pointer;
|
771
|
+
pointer-events: auto;
|
772
|
+
}
|
773
|
+
|
774
|
+
.ace_custom-widget {
|
775
|
+
background: none;
|
776
|
+
}
|
777
|
+
|
778
|
+
.ace_folding-enabled .ace_fold-widget {
|
779
|
+
display: inline-block;
|
780
|
+
}
|
781
|
+
|
782
|
+
.ace_fold-widget.ace_end {
|
783
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
|
784
|
+
}
|
785
|
+
|
786
|
+
.ace_fold-widget.ace_closed {
|
787
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
|
788
|
+
}
|
789
|
+
|
790
|
+
.ace_fold-widget:hover {
|
791
|
+
border: 1px solid rgba(0, 0, 0, 0.3);
|
792
|
+
background-color: rgba(255, 255, 255, 0.2);
|
793
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
|
794
|
+
}
|
795
|
+
|
796
|
+
.ace_fold-widget:active {
|
797
|
+
border: 1px solid rgba(0, 0, 0, 0.4);
|
798
|
+
background-color: rgba(0, 0, 0, 0.05);
|
799
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
|
800
|
+
}
|
801
|
+
/**
|
802
|
+
* Dark version for fold widgets
|
803
|
+
*/
|
804
|
+
.ace_dark .ace_fold-widget {
|
805
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
|
806
|
+
}
|
807
|
+
.ace_dark .ace_fold-widget.ace_end {
|
808
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
|
809
|
+
}
|
810
|
+
.ace_dark .ace_fold-widget.ace_closed {
|
811
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
|
812
|
+
}
|
813
|
+
.ace_dark .ace_fold-widget:hover {
|
814
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
815
|
+
background-color: rgba(255, 255, 255, 0.1);
|
816
|
+
}
|
817
|
+
.ace_dark .ace_fold-widget:active {
|
818
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
819
|
+
}
|
820
|
+
|
821
|
+
.ace_inline_button {
|
822
|
+
border: 1px solid lightgray;
|
823
|
+
display: inline-block;
|
824
|
+
margin: -1px 8px;
|
825
|
+
padding: 0 5px;
|
826
|
+
pointer-events: auto;
|
827
|
+
cursor: pointer;
|
828
|
+
}
|
829
|
+
.ace_inline_button:hover {
|
830
|
+
border-color: gray;
|
831
|
+
background: rgba(200,200,200,0.2);
|
832
|
+
display: inline-block;
|
833
|
+
pointer-events: auto;
|
834
|
+
}
|
835
|
+
|
836
|
+
.ace_fold-widget.ace_invalid {
|
837
|
+
background-color: #FFB4B4;
|
838
|
+
border-color: #DE5555;
|
839
|
+
}
|
840
|
+
|
841
|
+
.ace_fade-fold-widgets .ace_fold-widget {
|
842
|
+
transition: opacity 0.4s ease 0.05s;
|
843
|
+
opacity: 0;
|
844
|
+
}
|
845
|
+
|
846
|
+
.ace_fade-fold-widgets:hover .ace_fold-widget {
|
847
|
+
transition: opacity 0.05s ease 0.05s;
|
848
|
+
opacity:1;
|
849
|
+
}
|
850
|
+
|
851
|
+
.ace_underline {
|
852
|
+
text-decoration: underline;
|
853
|
+
}
|
854
|
+
|
855
|
+
.ace_bold {
|
856
|
+
font-weight: bold;
|
857
|
+
}
|
858
|
+
|
859
|
+
.ace_nobold .ace_bold {
|
860
|
+
font-weight: normal;
|
861
|
+
}
|
862
|
+
|
863
|
+
.ace_italic {
|
864
|
+
font-style: italic;
|
865
|
+
}
|
866
|
+
|
867
|
+
|
868
|
+
.ace_error-marker {
|
869
|
+
background-color: rgba(255, 0, 0,0.2);
|
870
|
+
position: absolute;
|
871
|
+
z-index: 9;
|
872
|
+
}
|
873
|
+
|
874
|
+
.ace_highlight-marker {
|
875
|
+
background-color: rgba(255, 255, 0,0.2);
|
876
|
+
position: absolute;
|
877
|
+
z-index: 8;
|
878
|
+
}
|
879
|
+
|
880
|
+
.ace_mobile-menu {
|
881
|
+
position: absolute;
|
882
|
+
line-height: 1.5;
|
883
|
+
border-radius: 4px;
|
884
|
+
-ms-user-select: none;
|
885
|
+
-moz-user-select: none;
|
886
|
+
-webkit-user-select: none;
|
887
|
+
user-select: none;
|
888
|
+
background: white;
|
889
|
+
box-shadow: 1px 3px 2px grey;
|
890
|
+
border: 1px solid #dcdcdc;
|
891
|
+
color: black;
|
892
|
+
}
|
893
|
+
.ace_dark > .ace_mobile-menu {
|
894
|
+
background: #333;
|
895
|
+
color: #ccc;
|
896
|
+
box-shadow: 1px 3px 2px grey;
|
897
|
+
border: 1px solid #444;
|
898
|
+
|
899
|
+
}
|
900
|
+
.ace_mobile-button {
|
901
|
+
padding: 2px;
|
902
|
+
cursor: pointer;
|
903
|
+
overflow: hidden;
|
904
|
+
}
|
905
|
+
.ace_mobile-button:hover {
|
906
|
+
background-color: #eee;
|
907
|
+
opacity:1;
|
908
|
+
}
|
909
|
+
.ace_mobile-button:active {
|
910
|
+
background-color: #ddd;
|
911
|
+
}
|
912
|
+
|
913
|
+
.ace_placeholder {
|
914
|
+
position: relative;
|
915
|
+
font-family: arial;
|
916
|
+
transform: scale(0.9);
|
917
|
+
transform-origin: left;
|
918
|
+
white-space: pre;
|
919
|
+
opacity: 0.7;
|
920
|
+
margin: 0 10px;
|
921
|
+
z-index: 1;
|
922
|
+
}
|
923
|
+
|
924
|
+
.ace_ghost_text {
|
925
|
+
opacity: 0.5;
|
926
|
+
font-style: italic;
|
927
|
+
}
|
928
|
+
|
929
|
+
.ace_ghost_text_container > div {
|
930
|
+
white-space: pre;
|
931
|
+
}
|
932
|
+
|
933
|
+
.ghost_text_line_wrapped::after {
|
934
|
+
content: "↩";
|
935
|
+
position: absolute;
|
936
|
+
}
|
937
|
+
|
938
|
+
.ace_lineWidgetContainer.ace_ghost_text {
|
939
|
+
margin: 0px 4px
|
940
|
+
}
|
941
|
+
|
942
|
+
.ace_screenreader-only {
|
943
|
+
position:absolute;
|
944
|
+
left:-10000px;
|
945
|
+
top:auto;
|
946
|
+
width:1px;
|
947
|
+
height:1px;
|
948
|
+
overflow:hidden;
|
949
|
+
}
|
950
|
+
|
951
|
+
.ace_hidden_token {
|
952
|
+
display: none;
|
953
|
+
}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(f,g,j){var k=f("../lib/dom"),x=f("../lib/oop"),_=f("../lib/event_emitter").EventEmitter,c=(function(){function h(t,o){this.renderer=o,this.pixelRatio=1,this.maxHeight=o.layerConfig.maxHeight,this.lineHeight=o.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},this.setScrollBarV(t)}return h.prototype.$createCanvas=function(){this.canvas=k.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},h.prototype.setScrollBarV=function(t){this.$createCanvas(),this.scrollbarV=t,t.element.appendChild(this.canvas),this.setDimensions()},h.prototype.$updateDecorators=function(t){if(typeof this.canvas.getContext!="function")return;var o=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(t);var r=this.canvas.getContext("2d");function i(O,b){return O.priority<b.priority?-1:O.priority>b.priority?1:0}var e=this.renderer.session.$annotations;if(r.clearRect(0,0,this.canvas.width,this.canvas.height),e){var n={info:1,warning:2,error:3};e.forEach(function(O){O.priority=n[O.type]||null}),e=e.sort(i);for(var a=0;a<e.length;a++){var p=e[a].row,v=this.getVerticalOffsetForRow(p),A=v+this.lineHeight,E=Math.round(this.heightRatio*v),S=Math.round(this.heightRatio*A),C=Math.round((E+S)/2),H=S-C;H<this.halfMinDecorationHeight&&(H=this.halfMinDecorationHeight),C-H<0&&(C=H),C+H>this.canvasHeight&&(C=this.canvasHeight-H);var U=C-H,V=C+H,F=V-U;r.fillStyle=o[e[a].type]||null,r.fillRect(0,U,Math.round(this.oneZoneWidth-1),F)}}var he=this.renderer.session.selection.getCursor();if(he){var P=Math.round(this.getVerticalOffsetForRow(he.row)*this.heightRatio);r.fillStyle="rgba(0, 0, 0, 0.5)",r.fillRect(0,P,this.canvasWidth,2)}},h.prototype.getVerticalOffsetForRow=function(t){t=t|0;var o=this.renderer.session.documentToScreenRow(t,0)*this.lineHeight;return o},h.prototype.setDimensions=function(t){t=t||this.renderer.layerConfig,this.maxHeight=t.maxHeight,this.lineHeight=t.lineHeight,this.canvasHeight=t.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight},h.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},h.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},h})();x.implement(c.prototype,_),g.Decorator=c}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(f,g,j){var k=f("./lib/oop"),x=f("./lib/dom"),_=f("./lib/lang"),c=f("./config"),h=f("./layer/gutter").Gutter,t=f("./layer/marker").Marker,o=f("./layer/text").Text,r=f("./layer/cursor").Cursor,i=f("./scrollbar").HScrollBar,e=f("./scrollbar").VScrollBar,n=f("./scrollbar_custom").HScrollBar,a=f("./scrollbar_custom").VScrollBar,p=f("./renderloop").RenderLoop,v=f("./layer/font_metrics").FontMetrics,A=f("./lib/event_emitter").EventEmitter,E=f("./css/editor-css"),S=f("./layer/decorators").Decorator,C=f("./lib/useragent"),H=f("./layer/text_util").isTextToken;x.importCssString(E,"ace_editor.css",!1);var U=(function(){function V(F,he){var P=this;this.container=F||x.createElement("div"),x.addCssClass(this.container,"ace_editor"),x.HI_DPI&&x.addCssClass(this.container,"ace_hidpi"),this.setTheme(he),c.get("useStrictCSP")==null&&c.set("useStrictCSP",!1),this.$gutter=x.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=x.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=x.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new h(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new t(this.content);var O=this.$textLayer=new o(this.content);this.canvas=O.element,this.$markerFront=new t(this.content),this.$cursorLayer=new r(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new e(this.container,this),this.scrollBarH=new i(this.container,this),this.scrollBarV.on("scroll",function(b){P.$scrollAnimation||P.session.setScrollTop(b.data-P.scrollMargin.top)}),this.scrollBarH.on("scroll",function(b){P.$scrollAnimation||P.session.setScrollLeft(b.data-P.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new v(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(b){P.updateCharacterSize(),P.onResize(!0,P.gutterWidth,P.$size.width,P.$size.height),P._signal("changeCharacterSize",b)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!C.isIOS,this.$loop=new p(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),c.resetOptions(this),c._signal("renderer",this)}return V.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),x.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},V.prototype.setSession=function(F){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=F,F&&this.scrollMargin.top&&F.getScrollTop()<=0&&F.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(F),this.$markerBack.setSession(F),this.$markerFront.setSession(F),this.$gutterLayer.setSession(F),this.$textLayer.setSession(F),F&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},V.prototype.updateLines=function(F,he,P){if(he===void 0&&(he=1/0),this.$changedLines?(this.$changedLines.firstRow>F&&(this.$changedLines.firstRow=F),this.$changedLines.lastRow<he&&(this.$changedLines.lastRow=he)):this.$changedLines={firstRow:F,lastRow:he},this.$changedLines.lastRow<this.layerConfig.firstRow)if(P)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},V.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},V.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},V.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},V.prototype.updateFull=function(F){F?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},V.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},V.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},V.prototype.onResize=function(F,he,P,O){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=F?1:0;var b=this.container;O||(O=b.clientHeight||b.scrollHeight),!O&&this.$maxLines&&this.lineHeight>1&&(!b.style.height||b.style.height=="0px")&&(b.style.height="1px",O=b.clientHeight||b.scrollHeight),P||(P=b.clientWidth||b.scrollWidth);var y=this.$updateCachedSize(F,he,P,O);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!P&&!O)return this.resizing=0;F&&(this.$gutterLayer.$padding=null),F?this.$renderChanges(y|this.$changes,!0):this.$loop.schedule(y|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},V.prototype.$updateCachedSize=function(F,he,P,O){O-=this.$extraHeight||0;var b=0,y=this.$size,T={width:y.width,height:y.height,scrollerHeight:y.scrollerHeight,scrollerWidth:y.scrollerWidth};if(O&&(F||y.height!=O)&&(y.height=O,b|=this.CHANGE_SIZE,y.scrollerHeight=y.height,this.$horizScroll&&(y.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(y.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",b=b|this.CHANGE_SCROLL),P&&(F||y.width!=P)){b|=this.CHANGE_SIZE,y.width=P,he==null&&(he=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=he,x.setStyle(this.scrollBarH.element.style,"left",he+"px"),x.setStyle(this.scroller.style,"left",he+this.margin.left+"px"),y.scrollerWidth=Math.max(0,P-he-this.scrollBarV.getWidth()-this.margin.h),x.setStyle(this.$gutter.style,"left",this.margin.left+"px");var G=this.scrollBarV.getWidth()+"px";x.setStyle(this.scrollBarH.element.style,"right",G),x.setStyle(this.scroller.style,"right",G),x.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(y.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||F)&&(b|=this.CHANGE_FULL)}return y.$dirty=!P||!O,b&&this._signal("resize",T),b},V.prototype.onGutterResize=function(F){var he=this.$showGutter?F:0;he!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,he,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},V.prototype.adjustWrapLimit=function(){var F=this.$size.scrollerWidth-this.$padding*2,he=Math.floor(F/this.characterWidth);return this.session.adjustWrapLimit(he,this.$showPrintMargin&&this.$printMarginColumn)},V.prototype.setAnimatedScroll=function(F){this.setOption("animatedScroll",F)},V.prototype.getAnimatedScroll=function(){return this.$animatedScroll},V.prototype.setShowInvisibles=function(F){this.setOption("showInvisibles",F),this.session.$bidiHandler.setShowInvisibles(F)},V.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},V.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},V.prototype.setDisplayIndentGuides=function(F){this.setOption("displayIndentGuides",F)},V.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},V.prototype.setHighlightIndentGuides=function(F){this.setOption("highlightIndentGuides",F)},V.prototype.setShowPrintMargin=function(F){this.setOption("showPrintMargin",F)},V.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},V.prototype.setPrintMarginColumn=function(F){this.setOption("printMarginColumn",F)},V.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},V.prototype.getShowGutter=function(){return this.getOption("showGutter")},V.prototype.setShowGutter=function(F){return this.setOption("showGutter",F)},V.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},V.prototype.setFadeFoldWidgets=function(F){this.setOption("fadeFoldWidgets",F)},V.prototype.setHighlightGutterLine=function(F){this.setOption("highlightGutterLine",F)},V.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},V.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var F=x.createElement("div");F.className="ace_layer ace_print-margin-layer",this.$printMarginEl=x.createElement("div"),this.$printMarginEl.className="ace_print-margin",F.appendChild(this.$printMarginEl),this.content.insertBefore(F,this.content.firstChild)}var he=this.$printMarginEl.style;he.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",he.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},V.prototype.getContainerElement=function(){return this.container},V.prototype.getMouseEventTarget=function(){return this.scroller},V.prototype.getTextAreaContainer=function(){return this.container},V.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var F=this.textarea.style,he=this.$composition;if(!this.$keepTextAreaAtCursor&&!he){x.translate(this.textarea,-100,0);return}var P=this.$cursorLayer.$pixelPos;if(P){he&&he.markerRange&&(P=this.$cursorLayer.getPixelPosition(he.markerRange.start,!0));var O=this.layerConfig,b=P.top,y=P.left;b-=O.offset;var T=he&&he.useTextareaForIME||C.isMobile?this.lineHeight:1;if(b<0||b>O.height-T){x.translate(this.textarea,0,0);return}var G=1,q=this.$size.height-T;if(!he)b+=this.lineHeight;else if(he.useTextareaForIME){var ue=this.textarea.value;G=this.characterWidth*this.session.$getStringScreenWidth(ue)[0]}else b+=this.lineHeight+2;y-=this.scrollLeft,y>this.$size.scrollerWidth-G&&(y=this.$size.scrollerWidth-G),y+=this.gutterWidth+this.margin.left,x.setStyle(F,"height",T+"px"),x.setStyle(F,"width",G+"px"),x.translate(this.textarea,Math.min(y,this.$size.scrollerWidth-G),Math.min(b,q))}}},V.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},V.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},V.prototype.getLastFullyVisibleRow=function(){var F=this.layerConfig,he=F.lastRow,P=this.session.documentToScreenRow(he,0)*F.lineHeight;return P-this.session.getScrollTop()>F.height-F.lineHeight?he-1:he},V.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},V.prototype.setPadding=function(F){this.$padding=F,this.$textLayer.setPadding(F),this.$cursorLayer.setPadding(F),this.$markerFront.setPadding(F),this.$markerBack.setPadding(F),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},V.prototype.setScrollMargin=function(F,he,P,O){var b=this.scrollMargin;b.top=F|0,b.bottom=he|0,b.right=O|0,b.left=P|0,b.v=b.top+b.bottom,b.h=b.left+b.right,b.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-b.top),this.updateFull()},V.prototype.setMargin=function(F,he,P,O){var b=this.margin;b.top=F|0,b.bottom=he|0,b.right=O|0,b.left=P|0,b.v=b.top+b.bottom,b.h=b.left+b.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},V.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},V.prototype.setHScrollBarAlwaysVisible=function(F){this.setOption("hScrollBarAlwaysVisible",F)},V.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},V.prototype.setVScrollBarAlwaysVisible=function(F){this.setOption("vScrollBarAlwaysVisible",F)},V.prototype.$updateScrollBarV=function(){var F=this.layerConfig.maxHeight,he=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(F-=(he-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>F-he&&(F=this.scrollTop+he,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(F+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},V.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},V.prototype.freeze=function(){this.$frozen=!0},V.prototype.unfreeze=function(){this.$frozen=!1},V.prototype.$renderChanges=function(F,he){if(this.$changes&&(F|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!F&&!he){this.$changes|=F;return}if(this.$size.$dirty)return this.$changes|=F,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",F),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var P=this.layerConfig;if(F&this.CHANGE_FULL||F&this.CHANGE_SIZE||F&this.CHANGE_TEXT||F&this.CHANGE_LINES||F&this.CHANGE_SCROLL||F&this.CHANGE_H_SCROLL){if(F|=this.$computeLayerConfig()|this.$loop.clear(),P.firstRow!=this.layerConfig.firstRow&&P.firstRowScreen==this.layerConfig.firstRowScreen){var O=this.scrollTop+(P.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;O>0&&(this.scrollTop=O,F=F|this.CHANGE_SCROLL,F|=this.$computeLayerConfig()|this.$loop.clear())}P=this.layerConfig,this.$updateScrollBarV(),F&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),x.translate(this.content,-this.scrollLeft,-P.offset);var b=P.width+2*this.$padding+"px",y=P.minHeight+"px";x.setStyle(this.content.style,"width",b),x.setStyle(this.content.style,"height",y)}if(F&this.CHANGE_H_SCROLL&&(x.translate(this.content,-this.scrollLeft,-P.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),F&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(P),this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P),this.$markerBack.update(P),this.$markerFront.update(P),this.$cursorLayer.update(P),this.$moveTextAreaToCursor(),this._signal("afterRender",F);return}if(F&this.CHANGE_SCROLL){this.$changedLines=null,F&this.CHANGE_TEXT||F&this.CHANGE_LINES?this.$textLayer.update(P):this.$textLayer.scrollLines(P),this.$showGutter&&(F&this.CHANGE_GUTTER||F&this.CHANGE_LINES?this.$gutterLayer.update(P):this.$gutterLayer.scrollLines(P)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P),this.$markerBack.update(P),this.$markerFront.update(P),this.$cursorLayer.update(P),this.$moveTextAreaToCursor(),this._signal("afterRender",F);return}F&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(P),this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):F&this.CHANGE_LINES?((this.$updateLines()||F&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):F&this.CHANGE_TEXT||F&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):F&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)),F&this.CHANGE_CURSOR&&(this.$cursorLayer.update(P),this.$moveTextAreaToCursor()),F&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(P),F&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(P),this._signal("afterRender",F)},V.prototype.$autosize=function(){var F=this.session.getScreenLength()*this.lineHeight,he=this.$maxLines*this.lineHeight,P=Math.min(he,Math.max((this.$minLines||1)*this.lineHeight,F))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(P+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&P>this.$maxPixelHeight&&(P=this.$maxPixelHeight);var O=P<=2*this.lineHeight,b=!O&&F>he;if(P!=this.desiredHeight||this.$size.height!=this.desiredHeight||b!=this.$vScroll){b!=this.$vScroll&&(this.$vScroll=b,this.scrollBarV.setVisible(b));var y=this.container.clientWidth;this.container.style.height=P+"px",this.$updateCachedSize(!0,this.$gutterWidth,y,P),this.desiredHeight=P,this._signal("autosize")}},V.prototype.$computeLayerConfig=function(){var F=this.session,he=this.$size,P=he.height<=2*this.lineHeight,O=this.session.getScreenLength(),b=O*this.lineHeight,y=this.$getLongestLine(),T=!P&&(this.$hScrollBarAlwaysVisible||he.scrollerWidth-y-2*this.$padding<0),G=this.$horizScroll!==T;G&&(this.$horizScroll=T,this.scrollBarH.setVisible(T));var q=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),P=he.height<=2*this.lineHeight);var ue=he.scrollerHeight+this.lineHeight,Ce=!this.$maxLines&&this.$scrollPastEnd?(he.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;b+=Ce;var Oe=this.scrollMargin;this.session.setScrollTop(Math.max(-Oe.top,Math.min(this.scrollTop,b-he.scrollerHeight+Oe.bottom))),this.session.setScrollLeft(Math.max(-Oe.left,Math.min(this.scrollLeft,y+2*this.$padding-he.scrollerWidth+Oe.right)));var gt=!P&&(this.$vScrollBarAlwaysVisible||he.scrollerHeight-b+Ce<0||this.scrollTop>Oe.top),ze=q!==gt;ze&&(this.$vScroll=gt,this.scrollBarV.setVisible(gt));var Xe=this.scrollTop%this.lineHeight,ft=Math.ceil(ue/this.lineHeight)-1,pt=Math.max(0,Math.round((this.scrollTop-Xe)/this.lineHeight)),mt=pt+ft,Vt,Yt,Gt=this.lineHeight;pt=F.screenToDocumentRow(pt,0);var Qt=F.getFoldLine(pt);Qt&&(pt=Qt.start.row),Vt=F.documentToScreenRow(pt,0),Yt=F.getRowLength(pt)*Gt,mt=Math.min(F.screenToDocumentRow(mt,0),F.getLength()-1),ue=he.scrollerHeight+F.getRowLength(mt)*Gt+Yt,Xe=this.scrollTop-Vt*Gt,Xe<0&&Vt>0&&(Vt=Math.max(0,Vt+Math.floor(Xe/Gt)),Xe=this.scrollTop-Vt*Gt);var Zt=0;return(this.layerConfig.width!=y||G)&&(Zt=this.CHANGE_H_SCROLL),(G||ze)&&(Zt|=this.$updateCachedSize(!0,this.gutterWidth,he.width,he.height),this._signal("scrollbarVisibilityChanged"),ze&&(y=this.$getLongestLine())),this.layerConfig={width:y,padding:this.$padding,firstRow:pt,firstRowScreen:Vt,lastRow:mt,lineHeight:Gt,characterWidth:this.characterWidth,minHeight:ue,maxHeight:b,offset:Xe,gutterOffset:Gt?Math.max(0,Math.ceil((Xe+he.height-he.scrollerHeight)/Gt)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(y-this.$padding),Zt},V.prototype.$updateLines=function(){if(this.$changedLines){var F=this.$changedLines.firstRow,he=this.$changedLines.lastRow;this.$changedLines=null;var P=this.layerConfig;if(!(F>P.lastRow+1)&&!(he<P.firstRow)){if(he===1/0){this.$showGutter&&this.$gutterLayer.update(P),this.$textLayer.update(P);return}return this.$textLayer.updateLines(P,F,he),!0}}},V.prototype.$getLongestLine=function(){var F=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(F+=1),this.$textLayer&&F>this.$textLayer.MAX_LINE_LENGTH&&(F=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(F*this.characterWidth))},V.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},V.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},V.prototype.addGutterDecoration=function(F,he){this.$gutterLayer.addGutterDecoration(F,he)},V.prototype.removeGutterDecoration=function(F,he){this.$gutterLayer.removeGutterDecoration(F,he)},V.prototype.updateBreakpoints=function(F){this._rows=F,this.$loop.schedule(this.CHANGE_GUTTER)},V.prototype.setAnnotations=function(F){this.$gutterLayer.setAnnotations(F),this.$loop.schedule(this.CHANGE_GUTTER)},V.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},V.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},V.prototype.showCursor=function(){this.$cursorLayer.showCursor()},V.prototype.scrollSelectionIntoView=function(F,he,P){this.scrollCursorIntoView(F,P),this.scrollCursorIntoView(he,P)},V.prototype.scrollCursorIntoView=function(F,he,P){if(this.$size.scrollerHeight!==0){var O=this.$cursorLayer.getPixelPosition(F),b=O.left,y=O.top,T=P&&P.top||0,G=P&&P.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var q=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;q+T>y?(he&&q+T>y+this.lineHeight&&(y-=he*this.$size.scrollerHeight),y===0&&(y=-this.scrollMargin.top),this.session.setScrollTop(y)):q+this.$size.scrollerHeight-G<y+this.lineHeight&&(he&&q+this.$size.scrollerHeight-G<y-this.lineHeight&&(y+=he*this.$size.scrollerHeight),this.session.setScrollTop(y+this.lineHeight+G-this.$size.scrollerHeight));var ue=this.scrollLeft,Ce=2*this.layerConfig.characterWidth;b-Ce<ue?(b-=Ce,b<this.$padding+Ce&&(b=-this.scrollMargin.left),this.session.setScrollLeft(b)):(b+=Ce,ue+this.$size.scrollerWidth<b+this.characterWidth?this.session.setScrollLeft(Math.round(b+this.characterWidth-this.$size.scrollerWidth)):ue<=this.$padding&&b-ue<this.characterWidth&&this.session.setScrollLeft(0))}},V.prototype.getScrollTop=function(){return this.session.getScrollTop()},V.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},V.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},V.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},V.prototype.scrollToRow=function(F){this.session.setScrollTop(F*this.lineHeight)},V.prototype.alignCursor=function(F,he){typeof F=="number"&&(F={row:F,column:0});var P=this.$cursorLayer.getPixelPosition(F),O=this.$size.scrollerHeight-this.lineHeight,b=P.top-O*(he||0);return this.session.setScrollTop(b),b},V.prototype.$calcSteps=function(F,he){var P=0,O=this.STEPS,b=[],y=function(T,G,q){return q*(Math.pow(T-1,3)+1)+G};for(P=0;P<O;++P)b.push(y(P/this.STEPS,F,he-F));return b},V.prototype.scrollToLine=function(F,he,P,O){var b=this.$cursorLayer.getPixelPosition({row:F,column:0}),y=b.top;he&&(y-=this.$size.scrollerHeight/2);var T=this.scrollTop;this.session.setScrollTop(y),P!==!1&&this.animateScrolling(T,O)},V.prototype.animateScrolling=function(F,he){var P=this.scrollTop;if(!this.$animatedScroll)return;var O=this;if(F==P)return;if(this.$scrollAnimation){var b=this.$scrollAnimation.steps;if(b.length&&(F=b[0],F==P))return}var y=O.$calcSteps(F,P);this.$scrollAnimation={from:F,to:P,steps:y},clearInterval(this.$timer),O.session.setScrollTop(y.shift()),O.session.$scrollTop=P;function T(){O.$timer=clearInterval(O.$timer),O.$scrollAnimation=null,O.$stopAnimation=!1,he&&he()}this.$timer=setInterval(function(){if(O.$stopAnimation){T();return}if(!O.session)return clearInterval(O.$timer);y.length?(O.session.setScrollTop(y.shift()),O.session.$scrollTop=P):P!=null?(O.session.$scrollTop=-1,O.session.setScrollTop(P),P=null):T()},10)},V.prototype.scrollToY=function(F){this.scrollTop!==F&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=F)},V.prototype.scrollToX=function(F){this.scrollLeft!==F&&(this.scrollLeft=F),this.$loop.schedule(this.CHANGE_H_SCROLL)},V.prototype.scrollTo=function(F,he){this.session.setScrollTop(he),this.session.setScrollLeft(F)},V.prototype.scrollBy=function(F,he){he&&this.session.setScrollTop(this.session.getScrollTop()+he),F&&this.session.setScrollLeft(this.session.getScrollLeft()+F)},V.prototype.isScrollableBy=function(F,he){if(he<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||he>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||F<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||F>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},V.prototype.pixelToScreenCoordinates=function(F,he){var P;if(this.$hasCssTransforms){P={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([F,he]);F=O[1]-this.gutterWidth-this.margin.left,he=O[0]}else P=this.scroller.getBoundingClientRect();var b=F+this.scrollLeft-P.left-this.$padding,y=b/this.characterWidth,T=Math.floor((he+this.scrollTop-P.top)/this.lineHeight),G=this.$blockCursor?Math.floor(y):Math.round(y);return{row:T,column:G,side:y-G>0?1:-1,offsetX:b}},V.prototype.screenToTextCoordinates=function(F,he){var P;if(this.$hasCssTransforms){P={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([F,he]);F=O[1]-this.gutterWidth-this.margin.left,he=O[0]}else P=this.scroller.getBoundingClientRect();var b=F+this.scrollLeft-P.left-this.$padding,y=b/this.characterWidth,T=this.$blockCursor?Math.floor(y):Math.round(y),G=Math.floor((he+this.scrollTop-P.top)/this.lineHeight);return this.session.screenToDocumentPosition(G,Math.max(T,0),b)},V.prototype.textToScreenCoordinates=function(F,he){var P=this.scroller.getBoundingClientRect(),O=this.session.documentToScreenPosition(F,he),b=this.$padding+(this.session.$bidiHandler.isBidiRow(O.row,F)?this.session.$bidiHandler.getPosLeft(O.column):Math.round(O.column*this.characterWidth)),y=O.row*this.lineHeight;return{pageX:P.left+b-this.scrollLeft,pageY:P.top+y-this.scrollTop}},V.prototype.visualizeFocus=function(){x.addCssClass(this.container,"ace_focus")},V.prototype.visualizeBlur=function(){x.removeCssClass(this.container,"ace_focus")},V.prototype.showComposition=function(F){this.$composition=F,F.cssText||(F.cssText=this.textarea.style.cssText),F.useTextareaForIME==null&&(F.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(x.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):F.markerId=this.session.addMarker(F.markerRange,"ace_composition_marker","text")},V.prototype.setCompositionText=function(F){var he=this.session.selection.cursor;this.addToken(F,"composition_placeholder",he.row,he.column),this.$moveTextAreaToCursor()},V.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),x.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var F=this.session.selection.cursor;this.removeExtraToken(F.row,F.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},V.prototype.setGhostText=function(F,he){var P=this.session.selection.cursor,O=he||{row:P.row,column:P.column};this.removeGhostText();var b=this.$calculateWrappedTextChunks(F,O);this.addToken(b[0].text,"ghost_text",O.row,O.column),this.$ghostText={text:F,position:{row:O.row,column:O.column}};var y=x.createElement("div");if(b.length>1){var T=this.hideTokensAfterPosition(O.row,O.column),G;b.slice(1).forEach(function(ze){var Xe=x.createElement("div"),ft=x.createElement("span");ft.className="ace_ghost_text",ze.wrapped&&(Xe.className="ghost_text_line_wrapped"),ze.text.length===0&&(ze.text=" "),ft.appendChild(x.createTextNode(ze.text)),Xe.appendChild(ft),y.appendChild(Xe),G=Xe}),T.forEach(function(ze){var Xe=x.createElement("span");H(ze.type)||(Xe.className="ace_"+ze.type.replace(/\./g," ace_")),Xe.appendChild(x.createTextNode(ze.value)),G.appendChild(Xe)}),this.$ghostTextWidget={el:y,row:O.row,column:O.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var q=this.$cursorLayer.getPixelPosition(O,!0),ue=this.container,Ce=ue.getBoundingClientRect().height,Oe=b.length*this.lineHeight,gt=Oe<Ce-q.top;if(gt)return;Oe<Ce?this.scrollBy(0,(b.length-1)*this.lineHeight):this.scrollToRow(O.row)}},V.prototype.$calculateWrappedTextChunks=function(F,he){var P=this.$size.scrollerWidth-this.$padding*2,O=Math.floor(P/this.characterWidth)-2;O=O<=0?60:O;for(var b=F.split(/\r?\n/),y=[],T=0;T<b.length;T++){var G=this.session.$getDisplayTokens(b[T],he.column),q=this.session.$computeWrapSplits(G,O,this.session.$tabSize);if(q.length>0){var ue=0;q.push(b[T].length);for(var Ce=0;Ce<q.length;Ce++){var Oe=b[T].slice(ue,q[Ce]);y.push({text:Oe,wrapped:!0}),ue=q[Ce]}}else y.push({text:b[T],wrapped:!1})}return y},V.prototype.removeGhostText=function(){if(this.$ghostText){var F=this.$ghostText.position;this.removeExtraToken(F.row,F.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},V.prototype.addToken=function(F,he,P,O){var b=this.session;b.bgTokenizer.lines[P]=null;var y={type:he,value:F},T=b.getTokens(P);if(O==null||!T.length)T.push(y);else for(var G=0,q=0;q<T.length;q++){var ue=T[q];if(G+=ue.value.length,O<=G){var Ce=ue.value.length-(G-O),Oe=ue.value.slice(0,Ce),gt=ue.value.slice(Ce);T.splice(q,1,{type:ue.type,value:Oe},y,{type:ue.type,value:gt});break}}this.updateLines(P,P)},V.prototype.hideTokensAfterPosition=function(F,he){for(var P=this.session.getTokens(F),O=0,b=!1,y=[],T=0;T<P.length;T++){var G=P[T];if(O+=G.value.length,G.type!=="ghost_text"){if(b){y.push({type:G.type,value:G.value}),G.type="hidden_token";continue}O===he&&(b=!0)}}return this.updateLines(F,F),y},V.prototype.removeExtraToken=function(F,he){this.session.bgTokenizer.lines[F]=null,this.updateLines(F,F)},V.prototype.setTheme=function(F,he){var P=this;if(this.$themeId=F,P._dispatchEvent("themeChange",{theme:F}),!F||typeof F=="string"){var O=F||this.$options.theme.initialValue;c.loadModule(["theme",O],b)}else b(F);function b(y){if(P.$themeId!=F)return he&&he();if(!y||!y.cssClass)throw new Error("couldn't load module "+F+" or it didn't call define");y.$id&&(P.$themeId=y.$id),x.importCssString(y.cssText,y.cssClass,P.container),P.theme&&x.removeCssClass(P.container,P.theme.cssClass);var T="padding"in y?y.padding:"padding"in(P.theme||{})?4:P.$padding;P.$padding&&T!=P.$padding&&P.setPadding(T),P.$theme=y.cssClass,P.theme=y,x.addCssClass(P.container,y.cssClass),x.setCssClass(P.container,"ace_dark",y.isDark),P.$size&&(P.$size.width=0,P.$updateSizeAsync()),P._dispatchEvent("themeLoaded",{theme:y}),he&&he(),C.isSafari&&P.scroller&&(P.scroller.style.background="red",P.scroller.style.background="")}},V.prototype.getTheme=function(){return this.$themeId},V.prototype.setStyle=function(F,he){x.setCssClass(this.container,F,he!==!1)},V.prototype.unsetStyle=function(F){x.removeCssClass(this.container,F)},V.prototype.setCursorStyle=function(F){x.setStyle(this.scroller.style,"cursor",F)},V.prototype.setMouseCursor=function(F){x.setStyle(this.scroller.style,"cursor",F)},V.prototype.attachToShadowRoot=function(){x.importCssString(E,"ace_editor.css",this.container)},V.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},V.prototype.$updateCustomScrollbar=function(F){var he=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),F===!0?(this.scrollBarV=new a(this.container,this),this.scrollBarH=new n(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(P){he.$scrollAnimation||he.session.setScrollTop(P.data-he.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(P){he.$scrollAnimation||he.session.setScrollLeft(P.data-he.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new S(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new e(this.container,this),this.scrollBarH=new i(this.container,this),this.scrollBarV.addEventListener("scroll",function(P){he.$scrollAnimation||he.session.setScrollTop(P.data-he.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(P){he.$scrollAnimation||he.session.setScrollLeft(P.data-he.scrollMargin.left)}))},V.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var F=this;this.$resizeTimer=_.delayedCall(function(){F.destroyed||F.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(he){var P=he[0].contentRect.width,O=he[0].contentRect.height;Math.abs(F.$size.width-P)>1||Math.abs(F.$size.height-O)>1?F.$resizeTimer.delay():F.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},V})();U.prototype.CHANGE_CURSOR=1,U.prototype.CHANGE_MARKER=2,U.prototype.CHANGE_GUTTER=4,U.prototype.CHANGE_SCROLL=8,U.prototype.CHANGE_LINES=16,U.prototype.CHANGE_TEXT=32,U.prototype.CHANGE_SIZE=64,U.prototype.CHANGE_MARKER_BACK=128,U.prototype.CHANGE_MARKER_FRONT=256,U.prototype.CHANGE_FULL=512,U.prototype.CHANGE_H_SCROLL=1024,U.prototype.$changes=0,U.prototype.$padding=null,U.prototype.$frozen=!1,U.prototype.STEPS=8,k.implement(U.prototype,A),c.defineOptions(U.prototype,"renderer",{useResizeObserver:{set:function(V){!V&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):V&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(V){this.$textLayer.setShowInvisibles(V)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(V){typeof V=="number"&&(this.$printMarginColumn=V),this.$showPrintMargin=!!V,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(V){this.$gutter.style.display=V?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(V){this.$gutterLayer.$useSvgGutterIcons=V},initialValue:!1},showFoldedAnnotations:{set:function(V){this.$gutterLayer.$showFoldedAnnotations=V},initialValue:!1},fadeFoldWidgets:{set:function(V){x.setCssClass(this.$gutter,"ace_fade-fold-widgets",V)},initialValue:!1},showFoldWidgets:{set:function(V){this.$gutterLayer.setShowFoldWidgets(V),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(V){this.$textLayer.setDisplayIndentGuides(V)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(V){this.$textLayer.setHighlightIndentGuides(V)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(V){this.$gutterLayer.setHighlightGutterLine(V),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(V){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(V){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(V){typeof V=="number"&&(V=V+"px"),this.container.style.fontSize=V,this.updateFontSize()},initialValue:12},fontFamily:{set:function(V){this.container.style.fontFamily=V,this.updateFontSize()}},maxLines:{set:function(V){this.updateFull()}},minLines:{set:function(V){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(V){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(V){V=+V||0,this.$scrollPastEnd!=V&&(this.$scrollPastEnd=V,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(V){this.$gutterLayer.$fixedWidth=!!V,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(V){this.$updateCustomScrollbar(V)},initialValue:!1},theme:{set:function(V){this.setTheme(V)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!C.isMobile&&!C.isIE}}),g.VirtualRenderer=U}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(f,g,j){var k=f("../lib/oop"),x=f("../lib/net"),_=f("../lib/event_emitter").EventEmitter,c=f("../config");function h(i){var e="importScripts('"+x.qualifyURL(i)+"');";try{return new Blob([e],{type:"application/javascript"})}catch{var n=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,a=new n;return a.append(e),a.getBlob("application/javascript")}}function t(i){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(c.get("loadWorkerFromBlob")){var e=h(i),n=window.URL||window.webkitURL,a=n.createObjectURL(e);return new Worker(a)}return new Worker(i)}var o=function(i){i.postMessage||(i=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=i,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){k.implement(this,_),this.$createWorkerFromOldConfig=function(i,e,n,a,p){if(f.nameToUrl&&!f.toUrl&&(f.toUrl=f.nameToUrl),c.get("packaged")||!f.toUrl)a=a||c.moduleUrl(e,"worker");else{var v=this.$normalizePath;a=a||v(f.toUrl("ace/worker/worker.js",null,"_"));var A={};i.forEach(function(E){A[E]=v(f.toUrl(E,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=t(a),p&&this.send("importScripts",p),this.$worker.postMessage({init:!0,tlns:A,module:e,classname:n}),this.$worker},this.onMessage=function(i){var e=i.data;switch(e.type){case"event":this._signal(e.name,{data:e.data});break;case"call":var n=this.callbacks[e.id];n&&(n(e.data),delete this.callbacks[e.id]);break;case"error":this.reportError(e.data);break;case"log":window.console&&console.log&&console.log.apply(console,e.data);break}},this.reportError=function(i){window.console&&console.error&&console.error(i)},this.$normalizePath=function(i){return x.qualifyURL(i)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(i){i.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(i,e){this.$worker.postMessage({command:i,args:e})},this.call=function(i,e,n){if(n){var a=this.callbackId++;this.callbacks[a]=n,e.push(a)}this.send(i,e)},this.emit=function(i,e){try{e.data&&e.data.err&&(e.data.err={message:e.data.err.message,stack:e.data.err.stack,code:e.data.err.code}),this.$worker&&this.$worker.postMessage({event:i,data:{data:e.data}})}catch(n){console.error(n.stack)}},this.attachToDocument=function(i){this.$doc&&this.terminate(),this.$doc=i,this.call("setValue",[i.getValue()]),i.on("change",this.changeListener,!0)},this.changeListener=function(i){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),i.action=="insert"?this.deltaQueue.push(i.start,i.lines):this.deltaQueue.push(i.start,i.end)},this.$sendDeltaQueue=function(){var i=this.deltaQueue;i&&(this.deltaQueue=null,i.length>50&&i.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:i}))}}).call(o.prototype);var r=function(i,e,n){var a=null,p=!1,v=Object.create(_),A=[],E=new o({messageBuffer:A,terminate:function(){},postMessage:function(C){A.push(C),a&&(p?setTimeout(S):S())}});E.setEmitSync=function(C){p=C};var S=function(){var C=A.shift();C.command?a[C.command].apply(a,C.args):C.event&&v._signal(C.event,C.data)};return v.postMessage=function(C){E.onMessage({data:C})},v.callback=function(C,H){this.postMessage({type:"call",id:H,data:C})},v.emit=function(C,H){this.postMessage({type:"event",name:C,data:H})},c.loadModule(["worker",e],function(C){for(a=new C[n](v);A.length;)S()}),E};g.UIWorkerClient=r,g.WorkerClient=o,g.createWorker=t}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(f,g,j){var k=f("./range").Range,x=f("./lib/event_emitter").EventEmitter,_=f("./lib/oop"),c=(function(){function h(t,o,r,i,e,n){var a=this;this.length=o,this.session=t,this.doc=t.getDocument(),this.mainClass=e,this.othersClass=n,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=i,this.$onCursorChange=function(){setTimeout(function(){a.onCursorChange()})},this.$pos=r;var p=t.getUndoManager().$undoStack||t.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=p.length,this.setup(),t.selection.on("changeCursor",this.$onCursorChange)}return h.prototype.setup=function(){var t=this,o=this.doc,r=this.session;this.selectionBefore=r.selection.toJSON(),r.selection.inMultiSelectMode&&r.selection.toSingleRange(),this.pos=o.createAnchor(this.$pos.row,this.$pos.column);var i=this.pos;i.$insertRight=!0,i.detach(),i.markerId=r.addMarker(new k(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(e){var n=o.createAnchor(e.row,e.column);n.$insertRight=!0,n.detach(),t.others.push(n)}),r.setUndoSelect(!1)},h.prototype.showOtherMarkers=function(){if(!this.othersActive){var t=this.session,o=this;this.othersActive=!0,this.others.forEach(function(r){r.markerId=t.addMarker(new k(r.row,r.column,r.row,r.column+o.length),o.othersClass,null,!1)})}},h.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var t=0;t<this.others.length;t++)this.session.removeMarker(this.others[t].markerId)}},h.prototype.onUpdate=function(t){if(this.$updating)return this.updateAnchors(t);var o=t;if(o.start.row===o.end.row&&o.start.row===this.pos.row){this.$updating=!0;var r=t.action==="insert"?o.end.column-o.start.column:o.start.column-o.end.column,i=o.start.column>=this.pos.column&&o.start.column<=this.pos.column+this.length+1,e=o.start.column-this.pos.column;if(this.updateAnchors(t),i&&(this.length+=r),i&&!this.session.$fromUndo){if(t.action==="insert")for(var n=this.others.length-1;n>=0;n--){var a=this.others[n],p={row:a.row,column:a.column+e};this.doc.insertMergedLines(p,t.lines)}else if(t.action==="remove")for(var n=this.others.length-1;n>=0;n--){var a=this.others[n],p={row:a.row,column:a.column+e};this.doc.remove(new k(p.row,p.column,p.row,p.column-r))}}this.$updating=!1,this.updateMarkers()}},h.prototype.updateAnchors=function(t){this.pos.onChange(t);for(var o=this.others.length;o--;)this.others[o].onChange(t);this.updateMarkers()},h.prototype.updateMarkers=function(){if(!this.$updating){var t=this,o=this.session,r=function(e,n){o.removeMarker(e.markerId),e.markerId=o.addMarker(new k(e.row,e.column,e.row,e.column+t.length),n,null,!1)};r(this.pos,this.mainClass);for(var i=this.others.length;i--;)r(this.others[i],this.othersClass)}},h.prototype.onCursorChange=function(t){if(!(this.$updating||!this.session)){var o=this.session.selection.getCursor();o.row===this.pos.row&&o.column>=this.pos.column&&o.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",t)):(this.hideOtherMarkers(),this._emit("cursorLeave",t))}},h.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},h.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var t=this.session.getUndoManager(),o=(t.$undoStack||t.$undostack).length-this.$undoStackDepth,r=0;r<o;r++)t.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},h})();_.implement(c.prototype,x),g.PlaceHolder=c}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(f,g,j){var k=f("../lib/event"),x=f("../lib/useragent");function _(h,t){return h.row==t.row&&h.column==t.column}function c(h){var t=h.domEvent,o=t.altKey,r=t.shiftKey,i=t.ctrlKey,e=h.getAccelKey(),n=h.getButton();if(i&&x.isMac&&(n=t.button),h.editor.inMultiSelectMode&&n==2){h.editor.textInput.onContextMenu(h.domEvent);return}if(!i&&!o&&!e){n===0&&h.editor.inMultiSelectMode&&h.editor.exitMultiSelectMode();return}if(n===0){var a=h.editor,p=a.selection,v=a.inMultiSelectMode,A=h.getDocumentPosition(),E=p.getCursor(),S=h.inSelection()||p.isEmpty()&&_(A,E),C=h.x,H=h.y,U=function(Oe){C=Oe.clientX,H=Oe.clientY},V=a.session,F=a.renderer.pixelToScreenCoordinates(C,H),he=F,P;if(a.$mouseHandler.$enableJumpToDef)i&&o||e&&o?P=r?"block":"add":o&&a.$blockSelectEnabled&&(P="block");else if(e&&!o){if(P="add",!v&&r)return}else o&&a.$blockSelectEnabled&&(P="block");if(P&&x.isMac&&t.ctrlKey&&a.$mouseHandler.cancelContextMenu(),P=="add"){if(!v&&S)return;if(!v){var O=p.toOrientedRange();a.addSelectionMarker(O)}var b=p.rangeList.rangeAtPoint(A);a.inVirtualSelectionMode=!0,r&&(b=null,O=p.ranges[0]||O,a.removeSelectionMarker(O)),a.once("mouseup",function(){var Oe=p.toOrientedRange();b&&Oe.isEmpty()&&_(b.cursor,Oe.cursor)?p.substractPoint(Oe.cursor):(r?p.substractPoint(O.cursor):O&&(a.removeSelectionMarker(O),p.addRange(O)),p.addRange(Oe)),a.inVirtualSelectionMode=!1})}else if(P=="block"){h.stop(),a.inVirtualSelectionMode=!0;var y,T=[],G=function(){var Oe=a.renderer.pixelToScreenCoordinates(C,H),gt=V.screenToDocumentPosition(Oe.row,Oe.column,Oe.offsetX);_(he,Oe)&&_(gt,p.lead)||(he=Oe,a.selection.moveToPosition(gt),a.renderer.scrollCursorIntoView(),a.removeSelectionMarkers(T),T=p.rectangularRangeBlock(he,F),a.$mouseHandler.$clickSelection&&T.length==1&&T[0].isEmpty()&&(T[0]=a.$mouseHandler.$clickSelection.clone()),T.forEach(a.addSelectionMarker,a),a.updateSelectionMarkers())};v&&!e?p.toSingleRange():!v&&e&&(y=p.toOrientedRange(),a.addSelectionMarker(y)),r?F=V.documentToScreenPosition(p.lead):p.moveToPosition(A),he={row:-1,column:-1};var q=function(Oe){G(),clearInterval(Ce),a.removeSelectionMarkers(T),T.length||(T=[p.toOrientedRange()]),y&&(a.removeSelectionMarker(y),p.toSingleRange(y));for(var gt=0;gt<T.length;gt++)p.addRange(T[gt]);a.inVirtualSelectionMode=!1,a.$mouseHandler.$clickSelection=null},ue=G;k.capture(a.container,U,q);var Ce=setInterval(function(){ue()},20);return h.preventDefault()}}}g.onMouseDown=c}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(f,g,j){g.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(x){x.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(x){x.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(x){x.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(x){x.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(x){x.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(x){x.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(x){x.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(x){x.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(x){x.multiSelect.rangeCount>1?x.multiSelect.joinSelections():x.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(x){x.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(x){x.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(x){x.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],g.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(x){x.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(x){return x&&x.inMultiSelectMode}}];var k=f("../keyboard/hash_handler").HashHandler;g.keyboardHandler=new k(g.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(f,g,j){var k=f("./range_list").RangeList,x=f("./range").Range,_=f("./selection").Selection,c=f("./mouse/multi_select_handler").onMouseDown,h=f("./lib/event"),t=f("./lib/lang"),o=f("./commands/multi_select_commands");g.commands=o.defaultCommands.concat(o.multiSelectCommands);var r=f("./search").Search,i=new r;function e(E,S,C){return i.$options.wrap=!0,i.$options.needle=S,i.$options.backwards=C==-1,i.find(E)}var n=f("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(n.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(E,S){if(E){if(!this.inMultiSelectMode&&this.rangeCount===0){var C=this.toOrientedRange();if(this.rangeList.add(C),this.rangeList.add(E),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),S||this.fromOrientedRange(E);this.rangeList.removeAll(),this.rangeList.add(C),this.$onAddRange(C)}E.cursor||(E.cursor=E.end);var H=this.rangeList.add(E);return this.$onAddRange(E),H.length&&this.$onRemoveRange(H),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),S||this.fromOrientedRange(E)}},this.toSingleRange=function(E){E=E||this.ranges[0];var S=this.rangeList.removeAll();S.length&&this.$onRemoveRange(S),E&&this.fromOrientedRange(E)},this.substractPoint=function(E){var S=this.rangeList.substractPoint(E);if(S)return this.$onRemoveRange(S),S[0]},this.mergeOverlappingRanges=function(){var E=this.rangeList.merge();E.length&&this.$onRemoveRange(E)},this.$onAddRange=function(E){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(E),this._signal("addRange",{range:E})},this.$onRemoveRange=function(E){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var S=this.rangeList.ranges.pop();E.push(S),this.rangeCount=0}for(var C=E.length;C--;){var H=this.ranges.indexOf(E[C]);this.ranges.splice(H,1)}this._signal("removeRange",{ranges:E}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),S=S||this.ranges[0],S&&!S.isEqual(this.getRange())&&this.fromOrientedRange(S)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new k,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var E=this.ranges.length?this.ranges:[this.getRange()],S=[],C=0;C<E.length;C++){var H=E[C],U=H.start.row,V=H.end.row;if(U===V)S.push(H.clone());else{for(S.push(new x(U,H.start.column,U,this.session.getLine(U).length));++U<V;)S.push(this.getLineRange(U,!0));S.push(new x(V,0,V,H.end.column))}C==0&&!this.isBackwards()&&(S=S.reverse())}this.toSingleRange();for(var C=S.length;C--;)this.addRange(S[C])},this.joinSelections=function(){var E=this.rangeList.ranges,S=E[E.length-1],C=x.fromPoints(E[0].start,S.end);this.toSingleRange(),this.setSelectionRange(C,S.cursor==S.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var E=this.rangeList.ranges,S=E[E.length-1],C=x.fromPoints(E[0].start,S.end);this.toSingleRange(),this.setSelectionRange(C,S.cursor==S.start)}else{var H=this.session.documentToScreenPosition(this.cursor),U=this.session.documentToScreenPosition(this.anchor),V=this.rectangularRangeBlock(H,U);V.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(E,S,C){var H=[],U=E.column<S.column;if(U)var V=E.column,F=S.column,he=E.offsetX,P=S.offsetX;else var V=S.column,F=E.column,he=S.offsetX,P=E.offsetX;var O=E.row<S.row;if(O)var b=E.row,y=S.row;else var b=S.row,y=E.row;V<0&&(V=0),b<0&&(b=0),b==y&&(C=!0);for(var T,G=b;G<=y;G++){var q=x.fromPoints(this.session.screenToDocumentPosition(G,V,he),this.session.screenToDocumentPosition(G,F,P));if(q.isEmpty()){if(T&&p(q.end,T))break;T=q.end}q.cursor=U?q.start:q.end,H.push(q)}if(O&&H.reverse(),!C){for(var ue=H.length-1;H[ue].isEmpty()&&ue>0;)ue--;if(ue>0)for(var Ce=0;H[Ce].isEmpty();)Ce++;for(var Oe=ue;Oe>=Ce;Oe--)H[Oe].isEmpty()&&H.splice(Oe,1)}return H}}).call(_.prototype);var a=f("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(E){E.cursor||(E.cursor=E.end);var S=this.getSelectionStyle();return E.marker=this.session.addMarker(E,"ace_selection",S),this.session.$selectionMarkers.push(E),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,E},this.removeSelectionMarker=function(E){if(E.marker){this.session.removeMarker(E.marker);var S=this.session.$selectionMarkers.indexOf(E);S!=-1&&this.session.$selectionMarkers.splice(S,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(E){for(var S=this.session.$selectionMarkers,C=E.length;C--;){var H=E[C];if(H.marker){this.session.removeMarker(H.marker);var U=S.indexOf(H);U!=-1&&S.splice(U,1)}}this.session.selectionMarkerCount=S.length},this.$onAddRange=function(E){this.addSelectionMarker(E.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(E){this.removeSelectionMarkers(E.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(E){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(o.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(E){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(o.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(E){var S=E.command,C=E.editor;if(C.multiSelect){if(S.multiSelectAction)S.multiSelectAction=="forEach"?H=C.forEachSelection(S,E.args):S.multiSelectAction=="forEachLine"?H=C.forEachSelection(S,E.args,!0):S.multiSelectAction=="single"?(C.exitMultiSelectMode(),H=S.exec(C,E.args||{})):H=S.multiSelectAction(C,E.args||{});else{var H=S.exec(C,E.args||{});C.multiSelect.addRange(C.multiSelect.toOrientedRange()),C.multiSelect.mergeOverlappingRanges()}return H}},this.forEachSelection=function(E,S,C){if(!this.inVirtualSelectionMode){var H=C&&C.keepOrder,U=C==!0||C&&C.$byLines,V=this.session,F=this.selection,he=F.rangeList,P=(H?F:he).ranges,O;if(!P.length)return E.exec?E.exec(this,S||{}):E(this,S||{});var b=F._eventRegistry;F._eventRegistry={};var y=new _(V);this.inVirtualSelectionMode=!0;for(var T=P.length;T--;){if(U)for(;T>0&&P[T].start.row==P[T-1].end.row;)T--;y.fromOrientedRange(P[T]),y.index=T,this.selection=V.selection=y;var G=E.exec?E.exec(this,S||{}):E(this,S||{});!O&&G!==void 0&&(O=G),y.toOrientedRange(P[T])}y.detach(),this.selection=V.selection=F,this.inVirtualSelectionMode=!1,F._eventRegistry=b,F.mergeOverlappingRanges(),F.ranges[0]&&F.fromOrientedRange(F.ranges[0]);var q=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),q&&q.from==q.to&&this.renderer.animateScrolling(q.from),O}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var E="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var S=this.multiSelect.rangeList.ranges,C=[],H=0;H<S.length;H++)C.push(this.session.getTextRange(S[H]));var U=this.session.getDocument().getNewLineCharacter();E=C.join(U),E.length==(C.length-1)*U.length&&(E="")}else this.selection.isEmpty()||(E=this.session.getTextRange(this.getSelectionRange()));return E},this.$checkMultiselectChange=function(E,S){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var C=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&S==this.multiSelect.anchor)return;var H=S==this.multiSelect.anchor?C.cursor==C.start?C.end:C.start:C.cursor;H.row!=S.row||this.session.$clipPositionToDocument(H.row,H.column).column!=S.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(E,S,C){if(S=S||{},S.needle=E||S.needle,S.needle==null){var H=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();S.needle=this.session.getTextRange(H)}this.$search.set(S);var U=this.$search.findAll(this.session);if(!U.length)return 0;var V=this.multiSelect;C||V.toSingleRange(U[0]);for(var F=U.length;F--;)V.addRange(U[F],!0);return H&&V.rangeList.rangeAtPoint(H.start)&&V.addRange(H,!0),U.length},this.selectMoreLines=function(E,S){var C=this.selection.toOrientedRange(),H=C.cursor==C.end,U=this.session.documentToScreenPosition(C.cursor);this.selection.$desiredColumn&&(U.column=this.selection.$desiredColumn);var V=this.session.screenToDocumentPosition(U.row+E,U.column);if(C.isEmpty())var he=V;else var F=this.session.documentToScreenPosition(H?C.end:C.start),he=this.session.screenToDocumentPosition(F.row+E,F.column);if(H){var P=x.fromPoints(V,he);P.cursor=P.start}else{var P=x.fromPoints(he,V);P.cursor=P.end}if(P.desiredColumn=U.column,!this.selection.inMultiSelectMode)this.selection.addRange(C);else if(S)var O=C.cursor;this.selection.addRange(P),O&&this.selection.substractPoint(O)},this.transposeSelections=function(E){for(var S=this.session,C=S.multiSelect,H=C.ranges,U=H.length;U--;){var V=H[U];if(V.isEmpty()){var F=S.getWordRange(V.start.row,V.start.column);V.start.row=F.start.row,V.start.column=F.start.column,V.end.row=F.end.row,V.end.column=F.end.column}}C.mergeOverlappingRanges();for(var he=[],U=H.length;U--;){var V=H[U];he.unshift(S.getTextRange(V))}E<0?he.unshift(he.pop()):he.push(he.shift());for(var U=H.length;U--;){var V=H[U],P=V.clone();S.replace(V,he[U]),V.start.row=P.start.row,V.start.column=P.start.column}C.fromOrientedRange(C.ranges[0])},this.selectMore=function(E,S,C){var H=this.session,U=H.multiSelect,V=U.toOrientedRange();if(!(V.isEmpty()&&(V=H.getWordRange(V.start.row,V.start.column),V.cursor=E==-1?V.start:V.end,this.multiSelect.addRange(V),C))){var F=H.getTextRange(V),he=e(H,F,E);he&&(he.cursor=E==-1?he.start:he.end,this.session.unfold(he),this.multiSelect.addRange(he),this.renderer.scrollCursorIntoView(null,.5)),S&&this.multiSelect.substractPoint(V.cursor)}},this.alignCursors=function(){var E=this.session,S=E.multiSelect,C=S.ranges,H=-1,U=C.filter(function(ue){if(ue.cursor.row==H)return!0;H=ue.cursor.row});if(!C.length||U.length==C.length-1){var V=this.selection.getRange(),F=V.start.row,he=V.end.row,P=F==he;if(P){var O=this.session.getLength(),b;do b=this.session.getLine(he);while(/[=:]/.test(b)&&++he<O);do b=this.session.getLine(F);while(/[=:]/.test(b)&&--F>0);F<0&&(F=0),he>=O&&(he=O-1)}var y=this.session.removeFullLines(F,he);y=this.$reAlignText(y,P),this.session.insert({row:F,column:0},y.join(`
|
954
|
+
`)+`
|
955
|
+
`),P||(V.start.column=0,V.end.column=y[y.length-1].length),this.selection.setRange(V)}else{U.forEach(function(ue){S.substractPoint(ue.cursor)});var T=0,G=1/0,q=C.map(function(ue){var Ce=ue.cursor,Oe=E.getLine(Ce.row),gt=Oe.substr(Ce.column).search(/\S/g);return gt==-1&&(gt=0),Ce.column>T&&(T=Ce.column),gt<G&&(G=gt),gt});C.forEach(function(ue,Ce){var Oe=ue.cursor,gt=T-Oe.column,ze=q[Ce]-G;gt>ze?E.insert(Oe,t.stringRepeat(" ",gt-ze)):E.remove(new x(Oe.row,Oe.column,Oe.row,Oe.column-gt+ze)),ue.start.column=ue.end.column=T,ue.start.row=ue.end.row=Oe.row,ue.cursor=ue.end}),S.fromOrientedRange(C[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(E,S){var C=!0,H=!0,U,V,F;return E.map(function(y){var T=y.match(/(\s*)(.*?)(\s*)([=:].*)/);return T?U==null?(U=T[1].length,V=T[2].length,F=T[3].length,T):(U+V+F!=T[1].length+T[2].length+T[3].length&&(H=!1),U!=T[1].length&&(C=!1),U>T[1].length&&(U=T[1].length),V<T[2].length&&(V=T[2].length),F>T[3].length&&(F=T[3].length),T):[y]}).map(S?P:C?H?O:P:b);function he(y){return t.stringRepeat(" ",y)}function P(y){return y[2]?he(U)+y[2]+he(V-y[2].length+F)+y[4].replace(/^([=:])\s+/,"$1 "):y[0]}function O(y){return y[2]?he(U+V-y[2].length)+y[2]+he(F)+y[4].replace(/^([=:])\s+/,"$1 "):y[0]}function b(y){return y[2]?he(U)+y[2]+he(F)+y[4].replace(/^([=:])\s+/,"$1 "):y[0]}}}).call(a.prototype);function p(E,S){return E.row==S.row&&E.column==S.column}g.onSessionChange=function(E){var S=E.session;S&&!S.multiSelect&&(S.$selectionMarkers=[],S.selection.$initRangeList(),S.multiSelect=S.selection),this.multiSelect=S&&S.multiSelect;var C=E.oldSession;C&&(C.multiSelect.off("addRange",this.$onAddRange),C.multiSelect.off("removeRange",this.$onRemoveRange),C.multiSelect.off("multiSelect",this.$onMultiSelect),C.multiSelect.off("singleSelect",this.$onSingleSelect),C.multiSelect.lead.off("change",this.$checkMultiselectChange),C.multiSelect.anchor.off("change",this.$checkMultiselectChange)),S&&(S.multiSelect.on("addRange",this.$onAddRange),S.multiSelect.on("removeRange",this.$onRemoveRange),S.multiSelect.on("multiSelect",this.$onMultiSelect),S.multiSelect.on("singleSelect",this.$onSingleSelect),S.multiSelect.lead.on("change",this.$checkMultiselectChange),S.multiSelect.anchor.on("change",this.$checkMultiselectChange)),S&&this.inMultiSelectMode!=S.selection.inMultiSelectMode&&(S.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function v(E){E.$multiselectOnSessionChange||(E.$onAddRange=E.$onAddRange.bind(E),E.$onRemoveRange=E.$onRemoveRange.bind(E),E.$onMultiSelect=E.$onMultiSelect.bind(E),E.$onSingleSelect=E.$onSingleSelect.bind(E),E.$multiselectOnSessionChange=g.onSessionChange.bind(E),E.$checkMultiselectChange=E.$checkMultiselectChange.bind(E),E.$multiselectOnSessionChange(E),E.on("changeSession",E.$multiselectOnSessionChange),E.on("mousedown",c),E.commands.addCommands(o.defaultCommands),A(E))}function A(E){if(!E.textInput)return;var S=E.textInput.getElement(),C=!1;h.addListener(S,"keydown",function(U){var V=U.keyCode==18&&!(U.ctrlKey||U.shiftKey||U.metaKey);E.$blockSelectEnabled&&V?C||(E.renderer.setMouseCursor("crosshair"),C=!0):C&&H()},E),h.addListener(S,"keyup",H,E),h.addListener(S,"blur",H,E);function H(U){C&&(E.renderer.setMouseCursor(""),C=!1)}}g.MultiSelect=v,f("./config").defineOptions(a.prototype,"editor",{enableMultiselect:{set:function(E){v(this),E?this.on("mousedown",c):this.off("mousedown",c)},value:!0},enableBlockSelect:{set:function(E){this.$blockSelectEnabled=E},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(f,g,j){var k=f("../../range").Range,x=g.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(_,c,h){var t=_.getLine(h);return this.foldingStartMarker.test(t)?"start":c=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(t)?"end":""},this.getFoldWidgetRange=function(_,c,h){return null},this.indentationBlock=function(_,c,h){var t=/\S/,o=_.getLine(c),r=o.search(t);if(r!=-1){for(var i=h||o.length,e=_.getLength(),n=c,a=c;++c<e;){var p=_.getLine(c).search(t);if(p!=-1){if(p<=r){var v=_.getTokenAt(c,0);if(!v||v.type!=="string")break}a=c}}if(a>n){var A=_.getLine(a).length;return new k(n,i,a,A)}}},this.openingBracketBlock=function(_,c,h,t,o){var r={row:h,column:t+1},i=_.$findClosingBracket(c,r,o);if(i){var e=_.foldWidgets[i.row];return e==null&&(e=_.getFoldWidget(i.row)),e=="start"&&i.row>r.row&&(i.row--,i.column=_.getLine(i.row).length),k.fromPoints(r,i)}},this.closingBracketBlock=function(_,c,h,t,o){var r={row:h,column:t},i=_.$findOpeningBracket(c,r);if(i)return i.column++,r.column--,k.fromPoints(i,r)}}).call(x.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(f,g,j){var k=f("../lib/dom"),x=f("../range").Range,_=f("../config").nls;function c(t,o,r){for(var i=0,e=t.length-1;i<=e;){var n=i+e>>1,a=r(o,t[n]);if(a>0)i=n+1;else if(a<0)e=n-1;else return n}return-(i+1)}function h(t,o,r){var i=t.getAnnotations().sort(x.comparePoints);if(i.length){var e=c(i,{row:o,column:-1},x.comparePoints);e<0&&(e=-e-1),e>=i.length?e=r>0?0:i.length-1:e===0&&r<0&&(e=i.length-1);var n=i[e];if(!(!n||!r)){if(n.row===o){do n=i[e+=r];while(n&&n.row===o);if(!n)return i.slice()}var a=[];o=n.row;do a[r<0?"unshift":"push"](n),n=i[e+=r];while(n&&n.row==o);return a.length&&a}}}g.showErrorMarker=function(t,o){var r=t.session,i=t.getCursorPosition(),e=i.row,n=r.widgetManager.getWidgetsAtRow(e).filter(function(U){return U.type=="errorMarker"})[0];n?n.destroy():e-=o;var a=h(r,e,o),p;if(a){var v=a[0];i.column=(v.pos&&typeof v.column!="number"?v.pos.sc:v.column)||0,i.row=v.row,p=t.renderer.$gutterLayer.$annotations[i.row]}else{if(n)return;p={displayText:[_("error-marker.good-state","Looks good!")],className:"ace_ok"}}t.session.unfold(i.row),t.selection.moveToPosition(i);var A={row:i.row,fixedWidth:!0,coverGutter:!0,el:k.createElement("div"),type:"errorMarker"},E=A.el.appendChild(k.createElement("div")),S=A.el.appendChild(k.createElement("div"));S.className="error_widget_arrow "+p.className;var C=t.renderer.$cursorLayer.getPixelPosition(i).left;S.style.left=C+t.renderer.gutterWidth-5+"px",A.el.className="error_widget_wrapper",E.className="error_widget "+p.className,p.displayText.forEach(function(U,V){E.appendChild(k.createTextNode(U)),V<p.displayText.length-1&&E.appendChild(k.createElement("br"))}),E.appendChild(k.createElement("div"));var H=function(U,V,F){if(V===0&&(F==="esc"||F==="return"))return A.destroy(),{command:"null"}};A.destroy=function(){t.$mouseHandler.isMousePressed||(t.keyBinding.removeKeyboardHandler(H),r.widgetManager.removeLineWidget(A),t.off("changeSelection",A.destroy),t.off("changeSession",A.destroy),t.off("mouseup",A.destroy),t.off("change",A.destroy))},t.keyBinding.addKeyboardHandler(H),t.on("changeSelection",A.destroy),t.on("changeSession",A.destroy),t.on("mouseup",A.destroy),t.on("change",A.destroy),t.session.widgetManager.addLineWidget(A),A.el.onmousedown=t.focus.bind(t),t.renderer.scrollCursorIntoView(null,.5,{bottom:A.el.offsetHeight})},k.importCssString(`
|
956
|
+
.error_widget_wrapper {
|
957
|
+
background: inherit;
|
958
|
+
color: inherit;
|
959
|
+
border:none
|
960
|
+
}
|
961
|
+
.error_widget {
|
962
|
+
border-top: solid 2px;
|
963
|
+
border-bottom: solid 2px;
|
964
|
+
margin: 5px 0;
|
965
|
+
padding: 10px 40px;
|
966
|
+
white-space: pre-wrap;
|
967
|
+
}
|
968
|
+
.error_widget.ace_error, .error_widget_arrow.ace_error{
|
969
|
+
border-color: #ff5a5a
|
970
|
+
}
|
971
|
+
.error_widget.ace_warning, .error_widget_arrow.ace_warning{
|
972
|
+
border-color: #F1D817
|
973
|
+
}
|
974
|
+
.error_widget.ace_info, .error_widget_arrow.ace_info{
|
975
|
+
border-color: #5a5a5a
|
976
|
+
}
|
977
|
+
.error_widget.ace_ok, .error_widget_arrow.ace_ok{
|
978
|
+
border-color: #5aaa5a
|
979
|
+
}
|
980
|
+
.error_widget_arrow {
|
981
|
+
position: absolute;
|
982
|
+
border: solid 5px;
|
983
|
+
border-top-color: transparent!important;
|
984
|
+
border-right-color: transparent!important;
|
985
|
+
border-left-color: transparent!important;
|
986
|
+
top: -5px;
|
987
|
+
}
|
988
|
+
`,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(f,g,j){f("./loader_build")(g);var k=f("./lib/dom"),x=f("./range").Range,_=f("./editor").Editor,c=f("./edit_session").EditSession,h=f("./undomanager").UndoManager,t=f("./virtual_renderer").VirtualRenderer;f("./worker/worker_client"),f("./keyboard/hash_handler"),f("./placeholder"),f("./multi_select"),f("./mode/folding/fold_mode"),f("./theme/textmate"),f("./ext/error_marker"),g.config=f("./config"),g.edit=function(r,i){if(typeof r=="string"){var e=r;if(r=document.getElementById(e),!r)throw new Error("ace.edit can't find div #"+e)}if(r&&r.env&&r.env.editor instanceof _)return r.env.editor;var n="";if(r&&/input|textarea/i.test(r.tagName)){var a=r;n=a.value,r=k.createElement("pre"),a.parentNode.replaceChild(r,a)}else r&&(n=r.textContent,r.innerHTML="");var p=g.createEditSession(n),v=new _(new t(r),p,i),A={document:p,editor:v,onResize:v.resize.bind(v,null)};return a&&(A.textarea=a),v.on("destroy",function(){A.editor.container.env=null}),v.container.env=v.env=A,v},g.createEditSession=function(r,i){var e=new c(r,i);return e.setUndoManager(new h),e},g.Range=x,g.Editor=_,g.EditSession=c,g.UndoManager=h,g.VirtualRenderer=t;var o=g.config.version;g.version=o}),(function(){ace.require(["ace/ace"],function(f){f&&(f.config.init(!0),f.define=ace.define);var g=(function(){return this})();!g&&typeof window<"u"&&(g=window),!g&&typeof self<"u"&&(g=self),g.ace||(g.ace=f);for(var j in f)f.hasOwnProperty(j)&&(g.ace[j]=f[j]);g.ace.default=g.ace,u&&(u.exports=g.ace)})})()})(ace$1)),ace$1.exports}var aceExports=requireAce(),modeRuby={exports:{}},hasRequiredModeRuby;function requireModeRuby(){return hasRequiredModeRuby||(hasRequiredModeRuby=1,(function(u,m){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(f,g,j){var k=f("../lib/oop"),x=f("./text_highlight_rules").TextHighlightRules,_=g.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};g.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},g.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},g.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var c=g.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},h=g.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},t=g.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},o=g.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},r=g.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},i=g.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},e=g.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},n=g.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},a=function(){var p="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|private_class_method|remove_method|undef_method",v="alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|__ENCODING__|prepend",A="true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION",E="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",S=this.$keywords=this.createKeywordMapper({keyword:v,"constant.language":A,"variable.language":E,"support.function":p,"invalid.deprecated":"debugger"},"identifier"),C=`\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})`,H={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment.multiline",regex:"^=begin(?=$|\\s.*$)",next:"comment"},{token:"string.regexp",regex:/[/](?=.*\/)/,next:"regex"},[{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(")/,push:[{token:"constant.language.escape",regex:C},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:C},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/`/,next:"pop"},{defaultToken:"string"}]},{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(')/,push:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string.end",regex:/'/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/%[qwx]([(\[<{^|%])/,onMatch:function(U,V,F){F.length&&(F=[]);var he=U[U.length-1];return F.unshift(he,V),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(U,V,F){F.length&&(F=[]);var he=U[U.length-1];return F.unshift(he,V),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(U,V,F){F.length&&(F=[]);var he=U[U.length-1];return F.unshift(he,V),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(U,V,F){F.length&&(F=[]);var he=U[U.length-1];return F.unshift(he,V),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(U,V,F){F.length&&(F=[]);var he=U[U.length-1];return F.unshift(he,V),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},n,{token:"variable.global",regex:"[$][a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]*"},{token:["punctuation.operator","support.function"],regex:/(\.)([a-zA-Z_\d]+)(?=\()/},{token:["punctuation.operator","identifier"],regex:/(\.)([a-zA-Z_][a-zA-Z_\d]*)/},{token:"string.character",regex:"\\B\\?(?:"+C+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},r,i,_,c,e,h,t,o,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:S,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(U,V,F){var he=U[2]=="-"||U[2]=="~"?"indentedHeredoc":"heredoc",P=U.split(this.splitRegex);return F.push(he,P[3]),[{type:"constant",value:P[1]},{type:"string",value:P[2]},{type:"support.class",value:P[3]},{type:"string",value:P[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(U,V,F){return U===F[1]?(F.shift(),F.shift(),this.next=F[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(U,V,F){return U===F[1]?(F.shift(),F.shift(),this.next=F[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(U,V){return V[0]==="heredoc"||V[0]==="indentedHeredoc"?V[0]:U}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(U,V,F){return this.next="",U=="}"&&F.length>1&&F[1]!="start"&&(F.shift(),this.next=F.shift()),this.token}},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:/[?:,;.]/}],comment:[{token:"comment.multiline",regex:"^=end(?=$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}],qStateWithInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(U,V,F){return F.length&&U===F[0]?(F.unshift(U,V),this.token):"string"}},{token:"constant.language.escape",regex:C},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(U,V,F){return F.length&&U===H[F[0]]?(F.shift(),this.next=F.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(U,V,F){return F.length&&U===F[0]?(F.unshift(U,V),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(U,V,F){return F.length&&U===H[F[0]]?(F.shift(),this.next=F.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(U,V,F){return F.length&&U===F[0]?(F.unshift(U,V),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(U,V,F){return F.length&&U===H[F[0]]?(F.shift(),this.next=F.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(U,V,F){return F.length&&U===F[0]?(F.unshift(U,V),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:C},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(U,V,F){return F.length&&U===H[F[0]]?(F.shift(),this.next=F.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(U,V,F){return F.length&&U===F[0]?(F.unshift(U,V),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(U,V,F){return F.length&&U[0]===H[F[0]]?(F.shift(),this.next=F.shift(),this.token):(this.next="","constant.language.escape")}},{include:"regex"},{defaultToken:"string.regexp"}],regex:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"constant.language.escape",regex:/\\[AGbBzZ]/},{token:"constant.language.escape",regex:/\\g<[a-zA-Z0-9]*>/},{token:["constant.language.escape","regexp.keyword","constant.language.escape"],regex:/(\\p{\^?)(Alnum|Alpha|Blank|Cntrl|Digit|Graph|Lower|Print|Punct|Space|Upper|XDigit|Word|ASCII|Any|Assigned|Arabic|Armenian|Balinese|Bengali|Bopomofo|Braille|Buginese|Buhid|Canadian_Aboriginal|Carian|Cham|Cherokee|Common|Coptic|Cuneiform|Cypriot|Cyrillic|Deseret|Devanagari|Ethiopic|Georgian|Glagolitic|Gothic|Greek|Gujarati|Gurmukhi|Han|Hangul|Hanunoo|Hebrew|Hiragana|Inherited|Kannada|Katakana|Kayah_Li|Kharoshthi|Khmer|Lao|Latin|Lepcha|Limbu|Linear_B|Lycian|Lydian|Malayalam|Mongolian|Myanmar|New_Tai_Lue|Nko|Ogham|Ol_Chiki|Old_Italic|Old_Persian|Oriya|Osmanya|Phags_Pa|Phoenician|Rejang|Runic|Saurashtra|Shavian|Sinhala|Sundanese|Syloti_Nagri|Syriac|Tagalog|Tagbanwa|Tai_Le|Tamil|Telugu|Thaana|Thai|Tibetan|Tifinagh|Ugaritic|Vai|Yi|Ll|Lm|Lt|Lu|Lo|Mn|Mc|Me|Nd|Nl|Pc|Pd|Ps|Pe|Pi|Pf|Po|No|Sm|Sc|Sk|So|Zs|Zl|Zp|Cc|Cf|Cn|Co|Cs|N|L|M|P|S|Z|C)(})/},{token:["constant.language.escape","invalid","constant.language.escape"],regex:/(\\p{\^?)([^/]*)(})/},{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:/[/][imxouesn]*/,next:"start"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?(?:[:=!>]|<'?[a-zA-Z]*'?>|<[=!])|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"regexp.keyword",regex:/\[\[:(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit|word|ascii):\]\]/},{token:"constant.language.escape",regex:/\[\^?/,push:"regex_character_class"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:/&?&?\[\^?/,push:"regex_character_class"},{token:"constant.language.escape",regex:"]",next:"pop"},{token:"constant.language.escape",regex:"-"},{defaultToken:"string.regexp.characterclass"}]},this.normalizeRules()};k.inherits(a,x),g.RubyHighlightRules=a}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(f,g,j){var k=f("../range").Range,x=function(){};(function(){this.checkOutdent=function(_,c){return/^\s+$/.test(_)?/^\s*\}/.test(c):!1},this.autoOutdent=function(_,c){var h=_.getLine(c),t=h.match(/^(\s*\})/);if(!t)return 0;var o=t[1].length,r=_.findMatchingBracket({row:c,column:o});if(!r||r.row==c)return 0;var i=this.$getIndent(_.getLine(r.row));_.replace(new k(c,0,c,o-1),i)},this.$getIndent=function(_){return _.match(/^\s*/)[0]}}).call(x.prototype),g.MatchingBraceOutdent=x}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(f,g,j){var k=f("../../lib/oop"),x=f("./fold_mode").FoldMode,_=f("../../range").Range,c=f("../../token_iterator").TokenIterator,h=g.FoldMode=function(){};k.inherits(h,x),(function(){this.indentKeywords={class:1,def:1,module:1,do:1,unless:1,if:1,while:1,for:1,until:1,begin:1,else:0,elsif:0,rescue:0,ensure:0,when:0,end:-1,case:1,"=begin":1,"=end":-1},this.foldingStartMarker=/(?:\s|^)(def|do|while|class|unless|module|if|for|until|begin|else|elsif|case|rescue|ensure|when)\b|({\s*$)|(=begin)/,this.foldingStopMarker=/(=end(?=$|\s.*$))|(^\s*})|\b(end)\b/,this.getFoldWidget=function(t,o,r){var i=t.getLine(r),e=this.foldingStartMarker.test(i),n=this.foldingStopMarker.test(i);if(e&&!n){var a=i.match(this.foldingStartMarker);if(a[1]){if((a[1]=="if"||a[1]=="else"||a[1]=="while"||a[1]=="until"||a[1]=="unless")&&(a[1]=="else"&&/^\s*else\s*$/.test(i)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(i)===!1)||a[1]=="when"&&/\sthen\s/.test(i)===!0)return;if(t.getTokenAt(r,a.index+2).type==="keyword")return"start"}else if(!a[3]||t.getTokenAt(r,a.index+1).type==="comment.multiline")return"start"}if(o!="markbeginend"||!n||e&&n)return"";var a=i.match(this.foldingStopMarker);if(a[3]==="end"){if(t.getTokenAt(r,a.index+1).type==="keyword")return"end"}else if(!a[1]||t.getTokenAt(r,a.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(t,o,r){var i=t.doc.getLine(r),e=this.foldingStartMarker.exec(i);if(e)return e[1]||e[3]?this.rubyBlock(t,r,e.index+2):this.openingBracketBlock(t,"{",r,e.index);var e=this.foldingStopMarker.exec(i);if(e)return e[3]==="end"&&t.getTokenAt(r,e.index+1).type==="keyword"?this.rubyBlock(t,r,e.index+1):e[1]==="=end"&&t.getTokenAt(r,e.index+1).type==="comment.multiline"?this.rubyBlock(t,r,e.index+1):this.closingBracketBlock(t,"}",r,e.index+e[0].length)},this.rubyBlock=function(t,P,r,i){var e=new c(t,P,r),n=e.getCurrentToken();if(!(!n||n.type!="keyword"&&n.type!="comment.multiline")){var a=n.value,p=t.getLine(P);switch(n.value){case"if":case"unless":case"while":case"until":var v=new RegExp("^\\s*"+n.value);if(!v.test(p))return;var A=this.indentKeywords[a];break;case"when":if(/\sthen\s/.test(p))return;case"elsif":case"rescue":case"ensure":var A=1;break;case"else":var v=new RegExp("^\\s*"+n.value+"\\s*$");if(!v.test(p))return;var A=1;break;default:var A=this.indentKeywords[a]}var E=[a];if(A){var S=A===-1?t.getLine(P-1).length:t.getLine(P).length,C=P,H=[];if(H.push(e.getCurrentTokenRange()),e.step=A===-1?e.stepBackward:e.stepForward,n.type=="comment.multiline"){for(;n=e.step();)if(n.type==="comment.multiline"){if(A==1){if(S=6,n.value=="=end")break}else if(n.value=="=begin")break}}else for(;n=e.step();){var U=!1;if(n.type==="keyword"){var V=A*this.indentKeywords[n.value];switch(p=t.getLine(e.getCurrentTokenRow()),n.value){case"do":for(var F=e.$tokenIndex-1;F>=0;F--){var he=e.$rowTokens[F];if(he&&(he.value=="while"||he.value=="until"||he.value=="for")){V=0;break}}break;case"else":var v=new RegExp("^\\s*"+n.value+"\\s*$");(!v.test(p)||a=="case")&&(V=0,U=!0);break;case"if":case"unless":case"while":case"until":var v=new RegExp("^\\s*"+n.value);v.test(p)||(V=0,U=!0);break;case"when":(/\sthen\s/.test(p)||a=="case")&&(V=0,U=!0)}if(V>0)E.unshift(n.value);else if(V<=0&&U===!1){if(E.shift(),!E.length&&((a=="while"||a=="until"||a=="for")&&n.value!="do"||n.value=="do"&&A==-1&&V!=0||n.value!="do"))break;V===0&&E.unshift(n.value)}}}if(!n)return null;if(i)return H.push(e.getCurrentTokenRange()),H;var P=e.getCurrentTokenRow();if(A===-1){if(n.type==="comment.multiline")var O=6;else var O=t.getLine(P).length;return new _(P,O,C-1,S)}return new _(C,S,P-1,t.getLine(P-1).length)}}}}).call(h.prototype)}),ace.define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/ruby"],function(f,g,j){var k=f("../lib/oop"),x=f("./text").Mode,_=f("./ruby_highlight_rules").RubyHighlightRules,c=f("./matching_brace_outdent").MatchingBraceOutdent,h=f("../range").Range,t=f("./folding/ruby").FoldMode,o=function(){this.HighlightRules=_,this.$outdent=new c,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new t,this.indentKeywords=this.foldingRules.indentKeywords};k.inherits(o,x),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(r,i,e){var n=this.$getIndent(i),a=this.getTokenizer().getLineTokens(i,r),p=a.tokens;if(p.length&&p[p.length-1].type=="comment")return n;if(r=="start"){var v=i.match(/^.*[\{\(\[]\s*$/),A=i.match(/^\s*(class|def|module)\s.*$/),E=i.match(/.*do(\s*|\s+\|.*\|\s*)$/),S=i.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(v||A||E||S)&&(n+=e)}return n},this.checkOutdent=function(r,i,e){return/^\s+(end|else|rescue|ensure)$/.test(i+e)||this.$outdent.checkOutdent(i,e)},this.autoOutdent=function(r,i,e){var n=i.getLine(e);if(/}/.test(n))return this.$outdent.autoOutdent(i,e);var a=this.$getIndent(n),p=i.getLine(e-1),v=this.$getIndent(p),A=i.getTabString();v.length<=a.length&&a.slice(-A.length)==A&&i.remove(new h(e,a.length-A.length,e,a.length))},this.getMatching=function(r,i,e){if(i==null){var n=r.selection.lead;e=n.column,i=n.row}var a=r.getTokenAt(i,e);if(a&&a.value in this.indentKeywords)return this.foldingRules.rubyBlock(r,i,e,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(o.prototype),g.Mode=o}),(function(){ace.require(["ace/mode/ruby"],function(f){u&&(u.exports=f)})})()})(modeRuby)),modeRuby.exports}requireModeRuby();var themeTwilight={exports:{}},hasRequiredThemeTwilight;function requireThemeTwilight(){return hasRequiredThemeTwilight||(hasRequiredThemeTwilight=1,(function(u,m){ace.define("ace/theme/twilight-css",["require","exports","module"],function(f,g,j){j.exports=`.ace-twilight .ace_gutter {
|
989
|
+
background: #232323;
|
990
|
+
color: #E2E2E2
|
991
|
+
}
|
992
|
+
|
993
|
+
.ace-twilight .ace_print-margin {
|
994
|
+
width: 1px;
|
995
|
+
background: #232323
|
996
|
+
}
|
997
|
+
|
998
|
+
.ace-twilight {
|
999
|
+
background-color: #141414;
|
1000
|
+
color: #F8F8F8
|
1001
|
+
}
|
1002
|
+
|
1003
|
+
.ace-twilight .ace_cursor {
|
1004
|
+
color: #A7A7A7
|
1005
|
+
}
|
1006
|
+
|
1007
|
+
.ace-twilight .ace_marker-layer .ace_selection {
|
1008
|
+
background: rgba(221, 240, 255, 0.20)
|
1009
|
+
}
|
1010
|
+
|
1011
|
+
.ace-twilight.ace_multiselect .ace_selection.ace_start {
|
1012
|
+
box-shadow: 0 0 3px 0px #141414;
|
1013
|
+
}
|
1014
|
+
|
1015
|
+
.ace-twilight .ace_marker-layer .ace_step {
|
1016
|
+
background: rgb(102, 82, 0)
|
1017
|
+
}
|
1018
|
+
|
1019
|
+
.ace-twilight .ace_marker-layer .ace_bracket {
|
1020
|
+
margin: -1px 0 0 -1px;
|
1021
|
+
border: 1px solid rgba(255, 255, 255, 0.25)
|
1022
|
+
}
|
1023
|
+
|
1024
|
+
.ace-twilight .ace_marker-layer .ace_active-line {
|
1025
|
+
background: rgba(255, 255, 255, 0.031)
|
1026
|
+
}
|
1027
|
+
|
1028
|
+
.ace-twilight .ace_gutter-active-line {
|
1029
|
+
background-color: rgba(255, 255, 255, 0.031)
|
1030
|
+
}
|
1031
|
+
|
1032
|
+
.ace-twilight .ace_marker-layer .ace_selected-word {
|
1033
|
+
border: 1px solid rgba(221, 240, 255, 0.20)
|
1034
|
+
}
|
1035
|
+
|
1036
|
+
.ace-twilight .ace_invisible {
|
1037
|
+
color: rgba(255, 255, 255, 0.25)
|
1038
|
+
}
|
1039
|
+
|
1040
|
+
.ace-twilight .ace_keyword,
|
1041
|
+
.ace-twilight .ace_meta {
|
1042
|
+
color: #CDA869
|
1043
|
+
}
|
1044
|
+
|
1045
|
+
.ace-twilight .ace_constant,
|
1046
|
+
.ace-twilight .ace_constant.ace_character,
|
1047
|
+
.ace-twilight .ace_constant.ace_character.ace_escape,
|
1048
|
+
.ace-twilight .ace_constant.ace_other,
|
1049
|
+
.ace-twilight .ace_heading,
|
1050
|
+
.ace-twilight .ace_markup.ace_heading,
|
1051
|
+
.ace-twilight .ace_support.ace_constant {
|
1052
|
+
color: #CF6A4C
|
1053
|
+
}
|
1054
|
+
|
1055
|
+
.ace-twilight .ace_invalid.ace_illegal {
|
1056
|
+
color: #F8F8F8;
|
1057
|
+
background-color: rgba(86, 45, 86, 0.75)
|
1058
|
+
}
|
1059
|
+
|
1060
|
+
.ace-twilight .ace_invalid.ace_deprecated {
|
1061
|
+
text-decoration: underline;
|
1062
|
+
font-style: italic;
|
1063
|
+
color: #D2A8A1
|
1064
|
+
}
|
1065
|
+
|
1066
|
+
.ace-twilight .ace_support {
|
1067
|
+
color: #9B859D
|
1068
|
+
}
|
1069
|
+
|
1070
|
+
.ace-twilight .ace_fold {
|
1071
|
+
background-color: #AC885B;
|
1072
|
+
border-color: #F8F8F8
|
1073
|
+
}
|
1074
|
+
|
1075
|
+
.ace-twilight .ace_support.ace_function {
|
1076
|
+
color: #DAD085
|
1077
|
+
}
|
1078
|
+
|
1079
|
+
.ace-twilight .ace_list,
|
1080
|
+
.ace-twilight .ace_markup.ace_list,
|
1081
|
+
.ace-twilight .ace_storage {
|
1082
|
+
color: #F9EE98
|
1083
|
+
}
|
1084
|
+
|
1085
|
+
.ace-twilight .ace_entity.ace_name.ace_function,
|
1086
|
+
.ace-twilight .ace_meta.ace_tag {
|
1087
|
+
color: #AC885B
|
1088
|
+
}
|
1089
|
+
|
1090
|
+
.ace-twilight .ace_string {
|
1091
|
+
color: #8F9D6A
|
1092
|
+
}
|
1093
|
+
|
1094
|
+
.ace-twilight .ace_string.ace_regexp {
|
1095
|
+
color: #E9C062
|
1096
|
+
}
|
1097
|
+
|
1098
|
+
.ace-twilight .ace_comment {
|
1099
|
+
font-style: italic;
|
1100
|
+
color: #5F5A60
|
1101
|
+
}
|
1102
|
+
|
1103
|
+
.ace-twilight .ace_variable {
|
1104
|
+
color: #7587A6
|
1105
|
+
}
|
1106
|
+
|
1107
|
+
.ace-twilight .ace_xml-pe {
|
1108
|
+
color: #494949
|
1109
|
+
}
|
1110
|
+
|
1111
|
+
.ace-twilight .ace_indent-guide {
|
1112
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y
|
1113
|
+
}
|
1114
|
+
|
1115
|
+
.ace-twilight .ace_indent-guide-active {
|
1116
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
|
1117
|
+
}
|
1118
|
+
`}),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],function(f,g,j){g.isDark=!0,g.cssClass="ace-twilight",g.cssText=f("./twilight-css");var k=f("../lib/dom");k.importCssString(g.cssText,g.cssClass,!1)}),(function(){ace.require(["ace/theme/twilight"],function(f){u&&(u.exports=f)})})()})(themeTwilight)),themeTwilight.exports}requireThemeTwilight();var rn=Object.defineProperty,on=(u,m,f)=>m in u?rn(u,m,{enumerable:!0,configurable:!0,writable:!0,value:f}):u[m]=f,$=(u,m,f)=>on(u,typeof m!="symbol"?m+"":m,f);function St(u,m){return function(){return u.apply(m,arguments)}}const{toString:cn}=Object.prototype,{getPrototypeOf:qe}=Object,{iterator:_e,toStringTag:xt}=Symbol,Ee=(u=>m=>{const f=cn.call(m);return u[f]||(u[f]=f.slice(8,-1).toLowerCase())})(Object.create(null)),D=u=>(u=u.toLowerCase(),m=>Ee(m)===u),Se=u=>m=>typeof m===u,{isArray:ee}=Array,Y=Se("undefined");function ie(u){return u!==null&&!Y(u)&&u.constructor!==null&&!Y(u.constructor)&&I(u.constructor.isBuffer)&&u.constructor.isBuffer(u)}const At=D("ArrayBuffer");function an(u){let m;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?m=ArrayBuffer.isView(u):m=u&&u.buffer&&At(u.buffer),m}const ln=Se("string"),I=Se("function"),Rt=Se("number"),oe=u=>u!==null&&typeof u=="object",un=u=>u===!0||u===!1,ge=u=>{if(Ee(u)!=="object")return!1;const m=qe(u);return(m===null||m===Object.prototype||Object.getPrototypeOf(m)===null)&&!(xt in u)&&!(_e in u)},hn=u=>{if(!oe(u)||ie(u))return!1;try{return Object.keys(u).length===0&&Object.getPrototypeOf(u)===Object.prototype}catch{return!1}},dn=D("Date"),fn=D("File"),pn=D("Blob"),mn=D("FileList"),gn=u=>oe(u)&&I(u.pipe),bn=u=>{let m;return u&&(typeof FormData=="function"&&u instanceof FormData||I(u.append)&&((m=Ee(u))==="formdata"||m==="object"&&I(u.toString)&&u.toString()==="[object FormData]"))},yn=D("URLSearchParams"),[wn,_n,En,Sn]=["ReadableStream","Request","Response","Headers"].map(D),xn=u=>u.trim?u.trim():u.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ce(u,m,{allOwnKeys:f=!1}={}){if(u===null||typeof u>"u")return;let g,j;if(typeof u!="object"&&(u=[u]),ee(u))for(g=0,j=u.length;g<j;g++)m.call(null,u[g],g,u);else{if(ie(u))return;const k=f?Object.getOwnPropertyNames(u):Object.keys(u),x=k.length;let _;for(g=0;g<x;g++)_=k[g],m.call(null,u[_],_,u)}}function Ot(u,m){if(ie(u))return null;m=m.toLowerCase();const f=Object.keys(u);let g=f.length,j;for(;g-- >0;)if(j=f[g],m===j.toLowerCase())return j;return null}const J=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ct=u=>!Y(u)&&u!==J;function Ie(){const{caseless:u,skipUndefined:m}=Ct(this)&&this||{},f={},g=(j,k)=>{const x=u&&Ot(f,k)||k;ge(f[x])&&ge(j)?f[x]=Ie(f[x],j):ge(j)?f[x]=Ie({},j):ee(j)?f[x]=j.slice():(!m||!Y(j))&&(f[x]=j)};for(let j=0,k=arguments.length;j<k;j++)arguments[j]&&ce(arguments[j],g);return f}const An=(u,m,f,{allOwnKeys:g}={})=>(ce(m,(j,k)=>{f&&I(j)?u[k]=St(j,f):u[k]=j},{allOwnKeys:g}),u),Rn=u=>(u.charCodeAt(0)===65279&&(u=u.slice(1)),u),On=(u,m,f,g)=>{u.prototype=Object.create(m.prototype,g),u.prototype.constructor=u,Object.defineProperty(u,"super",{value:m.prototype}),f&&Object.assign(u.prototype,f)},Cn=(u,m,f,g)=>{let j,k,x;const _={};if(m=m||{},u==null)return m;do{for(j=Object.getOwnPropertyNames(u),k=j.length;k-- >0;)x=j[k],(!g||g(x,u,m))&&!_[x]&&(m[x]=u[x],_[x]=!0);u=f!==!1&&qe(u)}while(u&&(!f||f(u,m))&&u!==Object.prototype);return m},Tn=(u,m,f)=>{u=String(u),(f===void 0||f>u.length)&&(f=u.length),f-=m.length;const g=u.indexOf(m,f);return g!==-1&&g===f},kn=u=>{if(!u)return null;if(ee(u))return u;let m=u.length;if(!Rt(m))return null;const f=new Array(m);for(;m-- >0;)f[m]=u[m];return f},Nn=(u=>m=>u&&m instanceof u)(typeof Uint8Array<"u"&&qe(Uint8Array)),Pn=(u,m)=>{const f=(u&&u[_e]).call(u);let g;for(;(g=f.next())&&!g.done;){const j=g.value;m.call(u,j[0],j[1])}},In=(u,m)=>{let f;const g=[];for(;(f=u.exec(m))!==null;)g.push(f);return g},Ln=D("HTMLFormElement"),jn=u=>u.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(m,f,g){return f.toUpperCase()+g}),Ge=(({hasOwnProperty:u})=>(m,f)=>u.call(m,f))(Object.prototype),Fn=D("RegExp"),Tt=(u,m)=>{const f=Object.getOwnPropertyDescriptors(u),g={};ce(f,(j,k)=>{let x;(x=m(j,k,u))!==!1&&(g[k]=x||j)}),Object.defineProperties(u,g)},vn=u=>{Tt(u,(m,f)=>{if(I(u)&&["arguments","caller","callee"].indexOf(f)!==-1)return!1;const g=u[f];if(I(g)){if(m.enumerable=!1,"writable"in m){m.writable=!1;return}m.set||(m.set=()=>{throw Error("Can not rewrite read-only method '"+f+"'")})}})},$n=(u,m)=>{const f={},g=j=>{j.forEach(k=>{f[k]=!0})};return ee(u)?g(u):g(String(u).split(m)),f},Un=()=>{},Dn=(u,m)=>u!=null&&Number.isFinite(u=+u)?u:m;function qn(u){return!!(u&&I(u.append)&&u[xt]==="FormData"&&u[_e])}const Bn=u=>{const m=new Array(10),f=(g,j)=>{if(oe(g)){if(m.indexOf(g)>=0)return;if(ie(g))return g;if(!("toJSON"in g)){m[j]=g;const k=ee(g)?[]:{};return ce(g,(x,_)=>{const c=f(x,j+1);!Y(c)&&(k[_]=c)}),m[j]=void 0,k}}return g};return f(u,0)},Mn=D("AsyncFunction"),Hn=u=>u&&(oe(u)||I(u))&&I(u.then)&&I(u.catch),kt=((u,m)=>u?setImmediate:m?((f,g)=>(J.addEventListener("message",({source:j,data:k})=>{j===J&&k===f&&g.length&&g.shift()()},!1),j=>{g.push(j),J.postMessage(f,"*")}))(`axios@${Math.random()}`,[]):f=>setTimeout(f))(typeof setImmediate=="function",I(J.postMessage)),zn=typeof queueMicrotask<"u"?queueMicrotask.bind(J):typeof process<"u"&&process.nextTick||kt,Vn=u=>u!=null&&I(u[_e]),l={isArray:ee,isArrayBuffer:At,isBuffer:ie,isFormData:bn,isArrayBufferView:an,isString:ln,isNumber:Rt,isBoolean:un,isObject:oe,isPlainObject:ge,isEmptyObject:hn,isReadableStream:wn,isRequest:_n,isResponse:En,isHeaders:Sn,isUndefined:Y,isDate:dn,isFile:fn,isBlob:pn,isRegExp:Fn,isFunction:I,isStream:gn,isURLSearchParams:yn,isTypedArray:Nn,isFileList:mn,forEach:ce,merge:Ie,extend:An,trim:xn,stripBOM:Rn,inherits:On,toFlatObject:Cn,kindOf:Ee,kindOfTest:D,endsWith:Tn,toArray:kn,forEachEntry:Pn,matchAll:In,isHTMLForm:Ln,hasOwnProperty:Ge,hasOwnProp:Ge,reduceDescriptors:Tt,freezeMethods:vn,toObjectSet:$n,toCamelCase:jn,noop:Un,toFiniteNumber:Dn,findKey:Ot,global:J,isContextDefined:Ct,isSpecCompliantForm:qn,toJSONObject:Bn,isAsyncFn:Mn,isThenable:Hn,setImmediate:kt,asap:zn,isIterable:Vn};function w(u,m,f,g,j){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=u,this.name="AxiosError",m&&(this.code=m),f&&(this.config=f),g&&(this.request=g),j&&(this.response=j,this.status=j.status?j.status:null)}l.inherits(w,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:l.toJSONObject(this.config),code:this.code,status:this.status}}});const Nt=w.prototype,Pt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(u=>{Pt[u]={value:u}}),Object.defineProperties(w,Pt),Object.defineProperty(Nt,"isAxiosError",{value:!0}),w.from=(u,m,f,g,j,k)=>{const x=Object.create(Nt);l.toFlatObject(u,x,function(h){return h!==Error.prototype},h=>h!=="isAxiosError");const _=u&&u.message?u.message:"Error",c=m==null&&u?u.code:m;return w.call(x,_,c,f,g,j),u&&x.cause==null&&Object.defineProperty(x,"cause",{value:u,configurable:!0}),x.name=u&&u.name||"Error",k&&Object.assign(x,k),x};const Jn=null;function Le(u){return l.isPlainObject(u)||l.isArray(u)}function It(u){return l.endsWith(u,"[]")?u.slice(0,-2):u}function Qe(u,m,f){return u?u.concat(m).map(function(g,j){return g=It(g),!f&&j?"["+g+"]":g}).join(f?".":""):m}function Wn(u){return l.isArray(u)&&!u.some(Le)}const Kn=l.toFlatObject(l,{},null,function(u){return/^is[A-Z]/.test(u)});function xe(u,m,f){if(!l.isObject(u))throw new TypeError("target must be an object");m=m||new FormData,f=l.toFlatObject(f,{metaTokens:!0,dots:!1,indexes:!1},!1,function(i,e){return!l.isUndefined(e[i])});const g=f.metaTokens,j=f.visitor||h,k=f.dots,x=f.indexes,_=(f.Blob||typeof Blob<"u"&&Blob)&&l.isSpecCompliantForm(m);if(!l.isFunction(j))throw new TypeError("visitor must be a function");function c(i){if(i===null)return"";if(l.isDate(i))return i.toISOString();if(l.isBoolean(i))return i.toString();if(!_&&l.isBlob(i))throw new w("Blob is not supported. Use a Buffer instead.");return l.isArrayBuffer(i)||l.isTypedArray(i)?_&&typeof Blob=="function"?new Blob([i]):Buffer.from(i):i}function h(i,e,n){let a=i;if(i&&!n&&typeof i=="object"){if(l.endsWith(e,"{}"))e=g?e:e.slice(0,-2),i=JSON.stringify(i);else if(l.isArray(i)&&Wn(i)||(l.isFileList(i)||l.endsWith(e,"[]"))&&(a=l.toArray(i)))return e=It(e),a.forEach(function(p,v){!(l.isUndefined(p)||p===null)&&m.append(x===!0?Qe([e],v,k):x===null?e:e+"[]",c(p))}),!1}return Le(i)?!0:(m.append(Qe(n,e,k),c(i)),!1)}const t=[],o=Object.assign(Kn,{defaultVisitor:h,convertValue:c,isVisitable:Le});function r(i,e){if(!l.isUndefined(i)){if(t.indexOf(i)!==-1)throw Error("Circular reference detected in "+e.join("."));t.push(i),l.forEach(i,function(n,a){(!(l.isUndefined(n)||n===null)&&j.call(m,n,l.isString(a)?a.trim():a,e,o))===!0&&r(n,e?e.concat(a):[a])}),t.pop()}}if(!l.isObject(u))throw new TypeError("data must be an object");return r(u),m}function Ze(u){const m={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(u).replace(/[!'()~]|%20|%00/g,function(f){return m[f]})}function Be(u,m){this._pairs=[],u&&xe(u,this,m)}const Lt=Be.prototype;Lt.append=function(u,m){this._pairs.push([u,m])},Lt.toString=function(u){const m=u?function(f){return u.call(this,f,Ze)}:Ze;return this._pairs.map(function(f){return m(f[0])+"="+m(f[1])},"").join("&")};function Xn(u){return encodeURIComponent(u).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function jt(u,m,f){if(!m)return u;const g=f&&f.encode||Xn;l.isFunction(f)&&(f={serialize:f});const j=f&&f.serialize;let k;if(j?k=j(m,f):k=l.isURLSearchParams(m)?m.toString():new Be(m,f).toString(g),k){const x=u.indexOf("#");x!==-1&&(u=u.slice(0,x)),u+=(u.indexOf("?")===-1?"?":"&")+k}return u}class Ye{constructor(){this.handlers=[]}use(m,f,g){return this.handlers.push({fulfilled:m,rejected:f,synchronous:g?g.synchronous:!1,runWhen:g?g.runWhen:null}),this.handlers.length-1}eject(m){this.handlers[m]&&(this.handlers[m]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(m){l.forEach(this.handlers,function(f){f!==null&&m(f)})}}const Ft={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Gn=typeof URLSearchParams<"u"?URLSearchParams:Be,Qn=typeof FormData<"u"?FormData:null,Zn=typeof Blob<"u"?Blob:null,Yn={isBrowser:!0,classes:{URLSearchParams:Gn,FormData:Qn,Blob:Zn},protocols:["http","https","file","blob","url","data"]},Me=typeof window<"u"&&typeof document<"u",je=typeof navigator=="object"&&navigator||void 0,es=Me&&(!je||["ReactNative","NativeScript","NS"].indexOf(je.product)<0),ts=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ns=Me&&window.location.href||"http://localhost",ss=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Me,hasStandardBrowserEnv:es,hasStandardBrowserWebWorkerEnv:ts,navigator:je,origin:ns},Symbol.toStringTag,{value:"Module"})),N={...ss,...Yn};function rs(u,m){return xe(u,new N.classes.URLSearchParams,{visitor:function(f,g,j,k){return N.isNode&&l.isBuffer(f)?(this.append(g,f.toString("base64")),!1):k.defaultVisitor.apply(this,arguments)},...m})}function is(u){return l.matchAll(/\w+|\[(\w*)]/g,u).map(m=>m[0]==="[]"?"":m[1]||m[0])}function os(u){const m={},f=Object.keys(u);let g;const j=f.length;let k;for(g=0;g<j;g++)k=f[g],m[k]=u[k];return m}function vt(u){function m(f,g,j,k){let x=f[k++];if(x==="__proto__")return!0;const _=Number.isFinite(+x),c=k>=f.length;return x=!x&&l.isArray(j)?j.length:x,c?(l.hasOwnProp(j,x)?j[x]=[j[x],g]:j[x]=g,!_):((!j[x]||!l.isObject(j[x]))&&(j[x]=[]),m(f,g,j[x],k)&&l.isArray(j[x])&&(j[x]=os(j[x])),!_)}if(l.isFormData(u)&&l.isFunction(u.entries)){const f={};return l.forEachEntry(u,(g,j)=>{m(is(g),j,f,0)}),f}return null}function cs(u,m,f){if(l.isString(u))try{return(m||JSON.parse)(u),l.trim(u)}catch(g){if(g.name!=="SyntaxError")throw g}return(f||JSON.stringify)(u)}const ae={transitional:Ft,adapter:["xhr","http","fetch"],transformRequest:[function(u,m){const f=m.getContentType()||"",g=f.indexOf("application/json")>-1,j=l.isObject(u);if(j&&l.isHTMLForm(u)&&(u=new FormData(u)),l.isFormData(u))return g?JSON.stringify(vt(u)):u;if(l.isArrayBuffer(u)||l.isBuffer(u)||l.isStream(u)||l.isFile(u)||l.isBlob(u)||l.isReadableStream(u))return u;if(l.isArrayBufferView(u))return u.buffer;if(l.isURLSearchParams(u))return m.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),u.toString();let k;if(j){if(f.indexOf("application/x-www-form-urlencoded")>-1)return rs(u,this.formSerializer).toString();if((k=l.isFileList(u))||f.indexOf("multipart/form-data")>-1){const x=this.env&&this.env.FormData;return xe(k?{"files[]":u}:u,x&&new x,this.formSerializer)}}return j||g?(m.setContentType("application/json",!1),cs(u)):u}],transformResponse:[function(u){const m=this.transitional||ae.transitional,f=m&&m.forcedJSONParsing,g=this.responseType==="json";if(l.isResponse(u)||l.isReadableStream(u))return u;if(u&&l.isString(u)&&(f&&!this.responseType||g)){const j=!(m&&m.silentJSONParsing)&&g;try{return JSON.parse(u,this.parseReviver)}catch(k){if(j)throw k.name==="SyntaxError"?w.from(k,w.ERR_BAD_RESPONSE,this,null,this.response):k}}return u}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:N.classes.FormData,Blob:N.classes.Blob},validateStatus:function(u){return u>=200&&u<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};l.forEach(["delete","get","head","post","put","patch"],u=>{ae.headers[u]={}});const as=l.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ls=u=>{const m={};let f,g,j;return u&&u.split(`
|
1119
|
+
`).forEach(function(k){j=k.indexOf(":"),f=k.substring(0,j).trim().toLowerCase(),g=k.substring(j+1).trim(),!(!f||m[f]&&as[f])&&(f==="set-cookie"?m[f]?m[f].push(g):m[f]=[g]:m[f]=m[f]?m[f]+", "+g:g)}),m},et=Symbol("internals");function ne(u){return u&&String(u).trim().toLowerCase()}function be(u){return u===!1||u==null?u:l.isArray(u)?u.map(be):String(u)}function us(u){const m=Object.create(null),f=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let g;for(;g=f.exec(u);)m[g[1]]=g[2];return m}const hs=u=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(u.trim());function Te(u,m,f,g,j){if(l.isFunction(g))return g.call(this,m,f);if(j&&(m=f),!!l.isString(m)){if(l.isString(g))return m.indexOf(g)!==-1;if(l.isRegExp(g))return g.test(m)}}function ds(u){return u.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(m,f,g)=>f.toUpperCase()+g)}function fs(u,m){const f=l.toCamelCase(" "+m);["get","set","has"].forEach(g=>{Object.defineProperty(u,g+f,{value:function(j,k,x){return this[g].call(this,m,j,k,x)},configurable:!0})})}let L=class{constructor(u){u&&this.set(u)}set(u,m,f){const g=this;function j(x,_,c){const h=ne(_);if(!h)throw new Error("header name must be a non-empty string");const t=l.findKey(g,h);(!t||g[t]===void 0||c===!0||c===void 0&&g[t]!==!1)&&(g[t||_]=be(x))}const k=(x,_)=>l.forEach(x,(c,h)=>j(c,h,_));if(l.isPlainObject(u)||u instanceof this.constructor)k(u,m);else if(l.isString(u)&&(u=u.trim())&&!hs(u))k(ls(u),m);else if(l.isObject(u)&&l.isIterable(u)){let x={},_,c;for(const h of u){if(!l.isArray(h))throw TypeError("Object iterator must return a key-value pair");x[c=h[0]]=(_=x[c])?l.isArray(_)?[..._,h[1]]:[_,h[1]]:h[1]}k(x,m)}else u!=null&&j(m,u,f);return this}get(u,m){if(u=ne(u),u){const f=l.findKey(this,u);if(f){const g=this[f];if(!m)return g;if(m===!0)return us(g);if(l.isFunction(m))return m.call(this,g,f);if(l.isRegExp(m))return m.exec(g);throw new TypeError("parser must be boolean|regexp|function")}}}has(u,m){if(u=ne(u),u){const f=l.findKey(this,u);return!!(f&&this[f]!==void 0&&(!m||Te(this,this[f],f,m)))}return!1}delete(u,m){const f=this;let g=!1;function j(k){if(k=ne(k),k){const x=l.findKey(f,k);x&&(!m||Te(f,f[x],x,m))&&(delete f[x],g=!0)}}return l.isArray(u)?u.forEach(j):j(u),g}clear(u){const m=Object.keys(this);let f=m.length,g=!1;for(;f--;){const j=m[f];(!u||Te(this,this[j],j,u,!0))&&(delete this[j],g=!0)}return g}normalize(u){const m=this,f={};return l.forEach(this,(g,j)=>{const k=l.findKey(f,j);if(k){m[k]=be(g),delete m[j];return}const x=u?ds(j):String(j).trim();x!==j&&delete m[j],m[x]=be(g),f[x]=!0}),this}concat(...u){return this.constructor.concat(this,...u)}toJSON(u){const m=Object.create(null);return l.forEach(this,(f,g)=>{f!=null&&f!==!1&&(m[g]=u&&l.isArray(f)?f.join(", "):f)}),m}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([u,m])=>u+": "+m).join(`
|
1120
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(u){return u instanceof this?u:new this(u)}static concat(u,...m){const f=new this(u);return m.forEach(g=>f.set(g)),f}static accessor(u){const m=(this[et]=this[et]={accessors:{}}).accessors,f=this.prototype;function g(j){const k=ne(j);m[k]||(fs(f,j),m[k]=!0)}return l.isArray(u)?u.forEach(g):g(u),this}};L.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),l.reduceDescriptors(L.prototype,({value:u},m)=>{let f=m[0].toUpperCase()+m.slice(1);return{get:()=>u,set(g){this[f]=g}}}),l.freezeMethods(L);function ke(u,m){const f=this||ae,g=m||f,j=L.from(g.headers);let k=g.data;return l.forEach(u,function(x){k=x.call(f,k,j.normalize(),m?m.status:void 0)}),j.normalize(),k}function $t(u){return!!(u&&u.__CANCEL__)}function te(u,m,f){w.call(this,u??"canceled",w.ERR_CANCELED,m,f),this.name="CanceledError"}l.inherits(te,w,{__CANCEL__:!0});function Ut(u,m,f){const g=f.config.validateStatus;!f.status||!g||g(f.status)?u(f):m(new w("Request failed with status code "+f.status,[w.ERR_BAD_REQUEST,w.ERR_BAD_RESPONSE][Math.floor(f.status/100)-4],f.config,f.request,f))}function ps(u){const m=/^([-+\w]{1,25})(:?\/\/|:)/.exec(u);return m&&m[1]||""}function ms(u,m){u=u||10;const f=new Array(u),g=new Array(u);let j=0,k=0,x;return m=m!==void 0?m:1e3,function(_){const c=Date.now(),h=g[k];x||(x=c),f[j]=_,g[j]=c;let t=k,o=0;for(;t!==j;)o+=f[t++],t=t%u;if(j=(j+1)%u,j===k&&(k=(k+1)%u),c-x<m)return;const r=h&&c-h;return r?Math.round(o*1e3/r):void 0}}function gs(u,m){let f=0,g=1e3/m,j,k;const x=(_,c=Date.now())=>{f=c,j=null,k&&(clearTimeout(k),k=null),u(..._)};return[(..._)=>{const c=Date.now(),h=c-f;h>=g?x(_,c):(j=_,k||(k=setTimeout(()=>{k=null,x(j)},g-h)))},()=>j&&x(j)]}const we=(u,m,f=3)=>{let g=0;const j=ms(50,250);return gs(k=>{const x=k.loaded,_=k.lengthComputable?k.total:void 0,c=x-g,h=j(c),t=x<=_;g=x;const o={loaded:x,total:_,progress:_?x/_:void 0,bytes:c,rate:h||void 0,estimated:h&&_&&t?(_-x)/h:void 0,event:k,lengthComputable:_!=null,[m?"download":"upload"]:!0};u(o)},f)},tt=(u,m)=>{const f=u!=null;return[g=>m[0]({lengthComputable:f,total:u,loaded:g}),m[1]]},nt=u=>(...m)=>l.asap(()=>u(...m)),bs=N.hasStandardBrowserEnv?((u,m)=>f=>(f=new URL(f,N.origin),u.protocol===f.protocol&&u.host===f.host&&(m||u.port===f.port)))(new URL(N.origin),N.navigator&&/(msie|trident)/i.test(N.navigator.userAgent)):()=>!0,ys=N.hasStandardBrowserEnv?{write(u,m,f,g,j,k){const x=[u+"="+encodeURIComponent(m)];l.isNumber(f)&&x.push("expires="+new Date(f).toGMTString()),l.isString(g)&&x.push("path="+g),l.isString(j)&&x.push("domain="+j),k===!0&&x.push("secure"),document.cookie=x.join("; ")},read(u){const m=document.cookie.match(new RegExp("(^|;\\s*)("+u+")=([^;]*)"));return m?decodeURIComponent(m[3]):null},remove(u){this.write(u,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function ws(u){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(u)}function _s(u,m){return m?u.replace(/\/?\/$/,"")+"/"+m.replace(/^\/+/,""):u}function Dt(u,m,f){let g=!ws(m);return u&&(g||f==!1)?_s(u,m):m}const st=u=>u instanceof L?{...u}:u;function K(u,m){m=m||{};const f={};function g(h,t,o,r){return l.isPlainObject(h)&&l.isPlainObject(t)?l.merge.call({caseless:r},h,t):l.isPlainObject(t)?l.merge({},t):l.isArray(t)?t.slice():t}function j(h,t,o,r){if(l.isUndefined(t)){if(!l.isUndefined(h))return g(void 0,h,o,r)}else return g(h,t,o,r)}function k(h,t){if(!l.isUndefined(t))return g(void 0,t)}function x(h,t){if(l.isUndefined(t)){if(!l.isUndefined(h))return g(void 0,h)}else return g(void 0,t)}function _(h,t,o){if(o in m)return g(h,t);if(o in u)return g(void 0,h)}const c={url:k,method:k,data:k,baseURL:x,transformRequest:x,transformResponse:x,paramsSerializer:x,timeout:x,timeoutMessage:x,withCredentials:x,withXSRFToken:x,adapter:x,responseType:x,xsrfCookieName:x,xsrfHeaderName:x,onUploadProgress:x,onDownloadProgress:x,decompress:x,maxContentLength:x,maxBodyLength:x,beforeRedirect:x,transport:x,httpAgent:x,httpsAgent:x,cancelToken:x,socketPath:x,responseEncoding:x,validateStatus:_,headers:(h,t,o)=>j(st(h),st(t),o,!0)};return l.forEach(Object.keys({...u,...m}),function(h){const t=c[h]||j,o=t(u[h],m[h],h);l.isUndefined(o)&&t!==_||(f[h]=o)}),f}const qt=u=>{const m=K({},u);let{data:f,withXSRFToken:g,xsrfHeaderName:j,xsrfCookieName:k,headers:x,auth:_}=m;if(m.headers=x=L.from(x),m.url=jt(Dt(m.baseURL,m.url,m.allowAbsoluteUrls),u.params,u.paramsSerializer),_&&x.set("Authorization","Basic "+btoa((_.username||"")+":"+(_.password?unescape(encodeURIComponent(_.password)):""))),l.isFormData(f)){if(N.hasStandardBrowserEnv||N.hasStandardBrowserWebWorkerEnv)x.setContentType(void 0);else if(l.isFunction(f.getHeaders)){const c=f.getHeaders(),h=["content-type","content-length"];Object.entries(c).forEach(([t,o])=>{h.includes(t.toLowerCase())&&x.set(t,o)})}}if(N.hasStandardBrowserEnv&&(g&&l.isFunction(g)&&(g=g(m)),g||g!==!1&&bs(m.url))){const c=j&&k&&ys.read(k);c&&x.set(j,c)}return m},Es=typeof XMLHttpRequest<"u",Ss=Es&&function(u){return new Promise(function(m,f){const g=qt(u);let j=g.data;const k=L.from(g.headers).normalize();let{responseType:x,onUploadProgress:_,onDownloadProgress:c}=g,h,t,o,r,i;function e(){r&&r(),i&&i(),g.cancelToken&&g.cancelToken.unsubscribe(h),g.signal&&g.signal.removeEventListener("abort",h)}let n=new XMLHttpRequest;n.open(g.method.toUpperCase(),g.url,!0),n.timeout=g.timeout;function a(){if(!n)return;const v=L.from("getAllResponseHeaders"in n&&n.getAllResponseHeaders()),A={data:!x||x==="text"||x==="json"?n.responseText:n.response,status:n.status,statusText:n.statusText,headers:v,config:u,request:n};Ut(function(E){m(E),e()},function(E){f(E),e()},A),n=null}"onloadend"in n?n.onloadend=a:n.onreadystatechange=function(){!n||n.readyState!==4||n.status===0&&!(n.responseURL&&n.responseURL.indexOf("file:")===0)||setTimeout(a)},n.onabort=function(){n&&(f(new w("Request aborted",w.ECONNABORTED,u,n)),n=null)},n.onerror=function(v){const A=v&&v.message?v.message:"Network Error",E=new w(A,w.ERR_NETWORK,u,n);E.event=v||null,f(E),n=null},n.ontimeout=function(){let v=g.timeout?"timeout of "+g.timeout+"ms exceeded":"timeout exceeded";const A=g.transitional||Ft;g.timeoutErrorMessage&&(v=g.timeoutErrorMessage),f(new w(v,A.clarifyTimeoutError?w.ETIMEDOUT:w.ECONNABORTED,u,n)),n=null},j===void 0&&k.setContentType(null),"setRequestHeader"in n&&l.forEach(k.toJSON(),function(v,A){n.setRequestHeader(A,v)}),l.isUndefined(g.withCredentials)||(n.withCredentials=!!g.withCredentials),x&&x!=="json"&&(n.responseType=g.responseType),c&&([o,i]=we(c,!0),n.addEventListener("progress",o)),_&&n.upload&&([t,r]=we(_),n.upload.addEventListener("progress",t),n.upload.addEventListener("loadend",r)),(g.cancelToken||g.signal)&&(h=v=>{n&&(f(!v||v.type?new te(null,u,n):v),n.abort(),n=null)},g.cancelToken&&g.cancelToken.subscribe(h),g.signal&&(g.signal.aborted?h():g.signal.addEventListener("abort",h)));const p=ps(g.url);if(p&&N.protocols.indexOf(p)===-1){f(new w("Unsupported protocol "+p+":",w.ERR_BAD_REQUEST,u));return}n.send(j||null)})},xs=(u,m)=>{const{length:f}=u=u?u.filter(Boolean):[];if(m||f){let g=new AbortController,j;const k=function(h){if(!j){j=!0,_();const t=h instanceof Error?h:this.reason;g.abort(t instanceof w?t:new te(t instanceof Error?t.message:t))}};let x=m&&setTimeout(()=>{x=null,k(new w(`timeout ${m} of ms exceeded`,w.ETIMEDOUT))},m);const _=()=>{u&&(x&&clearTimeout(x),x=null,u.forEach(h=>{h.unsubscribe?h.unsubscribe(k):h.removeEventListener("abort",k)}),u=null)};u.forEach(h=>h.addEventListener("abort",k));const{signal:c}=g;return c.unsubscribe=()=>l.asap(_),c}},As=function*(u,m){let f=u.byteLength;if(f<m){yield u;return}let g=0,j;for(;g<f;)j=g+m,yield u.slice(g,j),g=j},Rs=async function*(u,m){for await(const f of Os(u))yield*As(f,m)},Os=async function*(u){if(u[Symbol.asyncIterator]){yield*u;return}const m=u.getReader();try{for(;;){const{done:f,value:g}=await m.read();if(f)break;yield g}}finally{await m.cancel()}},rt=(u,m,f,g)=>{const j=Rs(u,m);let k=0,x,_=c=>{x||(x=!0,g&&g(c))};return new ReadableStream({async pull(c){try{const{done:h,value:t}=await j.next();if(h){_(),c.close();return}let o=t.byteLength;if(f){let r=k+=o;f(r)}c.enqueue(new Uint8Array(t))}catch(h){throw _(h),h}},cancel(c){return _(c),j.return()}},{highWaterMark:2})},it=64*1024,{isFunction:de}=l,Bt=(({fetch:u,Request:m,Response:f})=>({fetch:u,Request:m,Response:f}))(l.global),{ReadableStream:ot,TextEncoder:ct}=l.global,at=(u,...m)=>{try{return!!u(...m)}catch{return!1}},Cs=u=>{const{fetch:m,Request:f,Response:g}=Object.assign({},Bt,u),j=de(m),k=de(f),x=de(g);if(!j)return!1;const _=j&&de(ot),c=j&&(typeof ct=="function"?(e=>n=>e.encode(n))(new ct):async e=>new Uint8Array(await new f(e).arrayBuffer())),h=k&&_&&at(()=>{let e=!1;const n=new f(N.origin,{body:new ot,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!n}),t=x&&_&&at(()=>l.isReadableStream(new g("").body)),o={stream:t&&(e=>e.body)};j&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!o[e]&&(o[e]=(n,a)=>{let p=n&&n[e];if(p)return p.call(n);throw new w(`Response type '${e}' is not supported`,w.ERR_NOT_SUPPORT,a)})});const r=async e=>{if(e==null)return 0;if(l.isBlob(e))return e.size;if(l.isSpecCompliantForm(e))return(await new f(N.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(l.isArrayBufferView(e)||l.isArrayBuffer(e))return e.byteLength;if(l.isURLSearchParams(e)&&(e=e+""),l.isString(e))return(await c(e)).byteLength},i=async(e,n)=>l.toFiniteNumber(e.getContentLength())??r(n);return async e=>{let{url:n,method:a,data:p,signal:v,cancelToken:A,timeout:E,onDownloadProgress:S,onUploadProgress:C,responseType:H,headers:U,withCredentials:V="same-origin",fetchOptions:F}=qt(e);H=H?(H+"").toLowerCase():"text";let he=xs([v,A&&A.toAbortSignal()],E),P=null;const O=he&&he.unsubscribe&&(()=>{he.unsubscribe()});let b;try{if(C&&h&&a!=="get"&&a!=="head"&&(b=await i(U,p))!==0){let Ce=new f(n,{method:"POST",body:p,duplex:"half"}),Oe;if(l.isFormData(p)&&(Oe=Ce.headers.get("content-type"))&&U.setContentType(Oe),Ce.body){const[gt,ze]=tt(b,we(nt(C)));p=rt(Ce.body,it,gt,ze)}}l.isString(V)||(V=V?"include":"omit");const y=k&&"credentials"in f.prototype,T={...F,signal:he,method:a.toUpperCase(),headers:U.normalize().toJSON(),body:p,duplex:"half",credentials:y?V:void 0};P=k&&new f(n,T);let G=await(k?m(P,F):m(n,T));const q=t&&(H==="stream"||H==="response");if(t&&(S||q&&O)){const Ce={};["status","statusText","headers"].forEach(Xe=>{Ce[Xe]=G[Xe]});const Oe=l.toFiniteNumber(G.headers.get("content-length")),[gt,ze]=S&&tt(Oe,we(nt(S),!0))||[];G=new g(rt(G.body,it,gt,()=>{ze&&ze(),O&&O()}),Ce)}H=H||"text";let ue=await o[l.findKey(o,H)||"text"](G,e);return!q&&O&&O(),await new Promise((Ce,Oe)=>{Ut(Ce,Oe,{data:ue,headers:L.from(G.headers),status:G.status,statusText:G.statusText,config:e,request:P})})}catch(y){throw O&&O(),y&&y.name==="TypeError"&&/Load failed|fetch/i.test(y.message)?Object.assign(new w("Network Error",w.ERR_NETWORK,e,P),{cause:y.cause||y}):w.from(y,y&&y.code,e,P)}}},Ts=new Map,Mt=u=>{let m=l.merge.call({skipUndefined:!0},Bt,u?u.env:null);const{fetch:f,Request:g,Response:j}=m,k=[g,j,f];let x=k.length,_=x,c,h,t=Ts;for(;_--;)c=k[_],h=t.get(c),h===void 0&&t.set(c,h=_?new Map:Cs(m)),t=h;return h};Mt();const Fe={http:Jn,xhr:Ss,fetch:{get:Mt}};l.forEach(Fe,(u,m)=>{if(u){try{Object.defineProperty(u,"name",{value:m})}catch{}Object.defineProperty(u,"adapterName",{value:m})}});const lt=u=>`- ${u}`,ks=u=>l.isFunction(u)||u===null||u===!1,Ht={getAdapter:(u,m)=>{u=l.isArray(u)?u:[u];const{length:f}=u;let g,j;const k={};for(let x=0;x<f;x++){g=u[x];let _;if(j=g,!ks(g)&&(j=Fe[(_=String(g)).toLowerCase()],j===void 0))throw new w(`Unknown adapter '${_}'`);if(j&&(l.isFunction(j)||(j=j.get(m))))break;k[_||"#"+x]=j}if(!j){const x=Object.entries(k).map(([c,h])=>`adapter ${c} `+(h===!1?"is not supported by the environment":"is not available in the build"));let _=f?x.length>1?`since :
|
1121
|
+
`+x.map(lt).join(`
|
1122
|
+
`):" "+lt(x[0]):"as no adapter specified";throw new w("There is no suitable adapter to dispatch the request "+_,"ERR_NOT_SUPPORT")}return j},adapters:Fe};function Ne(u){if(u.cancelToken&&u.cancelToken.throwIfRequested(),u.signal&&u.signal.aborted)throw new te(null,u)}function ut(u){return Ne(u),u.headers=L.from(u.headers),u.data=ke.call(u,u.transformRequest),["post","put","patch"].indexOf(u.method)!==-1&&u.headers.setContentType("application/x-www-form-urlencoded",!1),Ht.getAdapter(u.adapter||ae.adapter,u)(u).then(function(m){return Ne(u),m.data=ke.call(u,u.transformResponse,m),m.headers=L.from(m.headers),m},function(m){return $t(m)||(Ne(u),m&&m.response&&(m.response.data=ke.call(u,u.transformResponse,m.response),m.response.headers=L.from(m.response.headers))),Promise.reject(m)})}const zt="1.12.0",Ae={};["object","boolean","number","function","string","symbol"].forEach((u,m)=>{Ae[u]=function(f){return typeof f===u||"a"+(m<1?"n ":" ")+u}});const ht={};Ae.transitional=function(u,m,f){function g(j,k){return"[Axios v"+zt+"] Transitional option '"+j+"'"+k+(f?". "+f:"")}return(j,k,x)=>{if(u===!1)throw new w(g(k," has been removed"+(m?" in "+m:"")),w.ERR_DEPRECATED);return m&&!ht[k]&&(ht[k]=!0,console.warn(g(k," has been deprecated since v"+m+" and will be removed in the near future"))),u?u(j,k,x):!0}},Ae.spelling=function(u){return(m,f)=>(console.warn(`${f} is likely a misspelling of ${u}`),!0)};function Ns(u,m,f){if(typeof u!="object")throw new w("options must be an object",w.ERR_BAD_OPTION_VALUE);const g=Object.keys(u);let j=g.length;for(;j-- >0;){const k=g[j],x=m[k];if(x){const _=u[k],c=_===void 0||x(_,k,u);if(c!==!0)throw new w("option "+k+" must be "+c,w.ERR_BAD_OPTION_VALUE);continue}if(f!==!0)throw new w("Unknown option "+k,w.ERR_BAD_OPTION)}}const ye={assertOptions:Ns,validators:Ae},B=ye.validators;let W=class{constructor(u){this.defaults=u||{},this.interceptors={request:new Ye,response:new Ye}}async request(u,m){try{return await this._request(u,m)}catch(f){if(f instanceof Error){let g={};Error.captureStackTrace?Error.captureStackTrace(g):g=new Error;const j=g.stack?g.stack.replace(/^.+\n/,""):"";try{f.stack?j&&!String(f.stack).endsWith(j.replace(/^.+\n.+\n/,""))&&(f.stack+=`
|
1123
|
+
`+j):f.stack=j}catch{}}throw f}}_request(u,m){typeof u=="string"?(m=m||{},m.url=u):m=u||{},m=K(this.defaults,m);const{transitional:f,paramsSerializer:g,headers:j}=m;f!==void 0&&ye.assertOptions(f,{silentJSONParsing:B.transitional(B.boolean),forcedJSONParsing:B.transitional(B.boolean),clarifyTimeoutError:B.transitional(B.boolean)},!1),g!=null&&(l.isFunction(g)?m.paramsSerializer={serialize:g}:ye.assertOptions(g,{encode:B.function,serialize:B.function},!0)),m.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?m.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:m.allowAbsoluteUrls=!0),ye.assertOptions(m,{baseUrl:B.spelling("baseURL"),withXsrfToken:B.spelling("withXSRFToken")},!0),m.method=(m.method||this.defaults.method||"get").toLowerCase();let k=j&&l.merge(j.common,j[m.method]);j&&l.forEach(["delete","get","head","post","put","patch","common"],i=>{delete j[i]}),m.headers=L.concat(k,j);const x=[];let _=!0;this.interceptors.request.forEach(function(i){typeof i.runWhen=="function"&&i.runWhen(m)===!1||(_=_&&i.synchronous,x.unshift(i.fulfilled,i.rejected))});const c=[];this.interceptors.response.forEach(function(i){c.push(i.fulfilled,i.rejected)});let h,t=0,o;if(!_){const i=[ut.bind(this),void 0];for(i.unshift(...x),i.push(...c),o=i.length,h=Promise.resolve(m);t<o;)h=h.then(i[t++],i[t++]);return h}o=x.length;let r=m;for(t=0;t<o;){const i=x[t++],e=x[t++];try{r=i(r)}catch(n){e.call(this,n);break}}try{h=ut.call(this,r)}catch(i){return Promise.reject(i)}for(t=0,o=c.length;t<o;)h=h.then(c[t++],c[t++]);return h}getUri(u){u=K(this.defaults,u);const m=Dt(u.baseURL,u.url,u.allowAbsoluteUrls);return jt(m,u.params,u.paramsSerializer)}};l.forEach(["delete","get","head","options"],function(u){W.prototype[u]=function(m,f){return this.request(K(f||{},{method:u,url:m,data:(f||{}).data}))}}),l.forEach(["post","put","patch"],function(u){function m(f){return function(g,j,k){return this.request(K(k||{},{method:u,headers:f?{"Content-Type":"multipart/form-data"}:{},url:g,data:j}))}}W.prototype[u]=m(),W.prototype[u+"Form"]=m(!0)});let Ps=class yi{constructor(m){if(typeof m!="function")throw new TypeError("executor must be a function.");let f;this.promise=new Promise(function(j){f=j});const g=this;this.promise.then(j=>{if(!g._listeners)return;let k=g._listeners.length;for(;k-- >0;)g._listeners[k](j);g._listeners=null}),this.promise.then=j=>{let k;const x=new Promise(_=>{g.subscribe(_),k=_}).then(j);return x.cancel=function(){g.unsubscribe(k)},x},m(function(j,k,x){g.reason||(g.reason=new te(j,k,x),f(g.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(m){if(this.reason){m(this.reason);return}this._listeners?this._listeners.push(m):this._listeners=[m]}unsubscribe(m){if(!this._listeners)return;const f=this._listeners.indexOf(m);f!==-1&&this._listeners.splice(f,1)}toAbortSignal(){const m=new AbortController,f=g=>{m.abort(g)};return this.subscribe(f),m.signal.unsubscribe=()=>this.unsubscribe(f),m.signal}static source(){let m;return{token:new yi(function(f){m=f}),cancel:m}}};function Is(u){return function(m){return u.apply(null,m)}}function Ls(u){return l.isObject(u)&&u.isAxiosError===!0}const ve={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ve).forEach(([u,m])=>{ve[m]=u});function Jt(u){const m=new W(u),f=St(W.prototype.request,m);return l.extend(f,W.prototype,m,{allOwnKeys:!0}),l.extend(f,m,null,{allOwnKeys:!0}),f.create=function(g){return Jt(K(u,g))},f}const R=Jt(ae);R.Axios=W,R.CanceledError=te,R.CancelToken=Ps,R.isCancel=$t,R.VERSION=zt,R.toFormData=xe,R.AxiosError=w,R.Cancel=R.CanceledError,R.all=function(u){return Promise.all(u)},R.spread=Is,R.isAxiosError=Ls,R.mergeConfig=K,R.AxiosHeaders=L,R.formToJSON=u=>vt(l.isHTMLForm(u)?new FormData(u):u),R.getAdapter=Ht.getAdapter,R.HttpStatusCode=ve,R.default=R;const{Axios:Xr,AxiosError:Gr,CanceledError:Qr,isCancel:Zr,CancelToken:Yr,VERSION:ei,all:ti,Cancel:ni,isAxiosError:si,spread:ri,toFormData:ii,AxiosHeaders:oi,HttpStatusCode:ci,formToJSON:ai,getAdapter:li,mergeConfig:ui}=R,He=R.create({baseURL:location.origin,timeout:6e4,params:{}});He.interceptors.response.use(u=>u,u=>{var m,f,g,j,k,x,_,c,h,t,o;if(u.response){if(u.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(e){e&&OpenC3Auth.setTokens()}),u.response.config.headers["Ignore-Errors"]&&u.response.config.headers["Ignore-Errors"].includes(u.response.status.toString()))return Promise.reject(u);let r=`HTTP ${u.response.status} - `;(m=u.response)!=null&&m.statusText&&(r+=`${u.response.statusText} `),(g=(f=u.response)==null?void 0:f.config)!=null&&g.data&&(r+=`${u.response.config.data} `),(k=(j=u.response)==null?void 0:j.data)!=null&&k.message?r+=`${u.response.data.message}`:(_=(x=u.response)==null?void 0:x.data)!=null&&_.exception?r+=`${u.response.data.exception}`:(t=(h=(c=u.response)==null?void 0:c.data)==null?void 0:h.error)!=null&&t.message?(u.response.data.error.class&&(r+=`${u.response.data.error.class} `),r+=`${u.response.data.error.message}`):r+=`${(o=u.response)==null?void 0:o.data}`;const{$cosmosNotify:i}=window;throw i&&i.serious({title:"Network error",body:r}),u}else throw u});const fe=async function(u,m,{data:f,params:g={},headers:j,noAuth:k=!1,noScope:x=!1,onUploadProgress:_=!1}={}){if(!k){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}j.Authorization=localStorage.openc3Token}return j.manual=!0,!x&&!g.scope&&(g.scope=window.openc3Scope),He({method:u,url:m,data:f,params:g,headers:j,onUploadProgress:_})},$e={Accept:"application/json"},dt={...$e,"Content-Type":"application/json"},hi={get:function(u,{params:m,headers:f=$e,noScope:g,noAuth:j,onUploadProgress:k}={}){return fe("get",u,{params:m,headers:f,noScope:g,noAuth:j,onUploadProgress:k})},put:function(u,{data:m,params:f,headers:g=dt,noScope:j,noAuth:k,onUploadProgress:x}={}){return fe("put",u,{data:m,params:f,headers:g,noScope:j,noAuth:k,onUploadProgress:x})},post:function(u,{data:m,params:f,headers:g=dt,noScope:j,noAuth:k,onUploadProgress:x}={}){return fe("post",u,{data:m,params:f,headers:g,noScope:j,noAuth:k,onUploadProgress:x})},delete:function(u,{params:m,headers:f=$e,noScope:g,noAuth:j,onUploadProgress:k}={}){return fe("delete",u,{params:m,headers:f,noScope:g,noAuth:j,onUploadProgress:k})}};let Re=()=>({emit(u,...m){for(let f=this.events[u]||[],g=0,j=f.length;g<j;g++)f[g](...m)},events:{},on(u,m){var f;return((f=this.events)[u]||(f[u]=[])).push(m),()=>{var g;this.events[u]=(g=this.events[u])==null?void 0:g.filter(j=>m!==j)}}});class le extends Error{constructor(m,f){m instanceof Error?(super(m.message),this.cause=m):super(m),this.reason=f,this.name="ReasonError"}}function Wt(u){return u?`{${Object.keys(u).sort().filter(m=>u[m]!==void 0).map(m=>{let f=JSON.stringify(u[m]);return`${JSON.stringify(m)}:${f}`}).join(",")}}`:""}class vs{constructor(m){this.channel=m,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",m=>{if(m.type==="info"){this._state||(this._state=this.stateFromInfo(m));return}this._state&&(m.type==="join"?this._state[m.id]=m.info:m.type==="leave"&&delete this._state[m.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(m=>m()),this.listeners.length=0}async join(m,f){if(!this._info)return this._info={id:m,info:f},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let m=await this.channel.perform("$presence:leave");return delete this._info,m}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let m=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(m),this._state}finally{delete this._promise}}stateFromInfo(m){return m.records.reduce((f,{id:g,info:j})=>(f[g]=j,f),{})}}const z=Symbol("state");class Kt{constructor(m={}){this.emitter=Re(),this.params=Object.freeze(m),this.presence=new vs(this),this.initialConnect=!0,this[z]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Wt({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[z]}attached(m){if(this.receiver){if(this.receiver!==m)throw Error("Already connected to a different receiver");return!1}return this.receiver=m,!0}connecting(){this[z]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[z]="connected";let m=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:m})):this.emit("connect",{reconnect:!0,restored:m})}restored(){if(this.state==="connected")throw Error("Already connected");this[z]="connected";let m=!0,f=!0;this.initialConnect=!1,this.emit("connect",{reconnect:f,restored:m})}disconnected(m){this.state==="disconnected"||this.state==="closed"||(this[z]="disconnected",this.presence.reset(),this.emit("disconnect",m))}closed(m){this.state!=="closed"&&(this[z]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",m))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(m,f){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,m,f)}async send(m){return this.perform(void 0,m)}async whisper(m){try{await this.perform("$whisper",m)}catch(f){let g=this.receiver?this.receiver.logger:null;g&&g.warn("whisper failed: ",f)}}receive(m,f){this.emit("message",m,f)}on(m,f){return this.emitter.on(m,f)}once(m,f){let g=this.emitter.on(m,(...j)=>{g(),f(...j)});return g}emit(m,...f){return this.emitter.emit(m,...f)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((m,f)=>{let g=[()=>delete this._pendingSubscribe];g.push(this.on("connect",()=>{g.forEach(j=>j()),m()})),g.push(this.on("close",j=>{g.forEach(k=>k()),f(j||new le("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class Ve extends Kt{constructor(m,f){super(f),this.channelId=m}set channelId(m){this._channelId=m}get channelId(){return this._channelId}}$(Ve,"identifier","__ghost__");const Vs="$pubsub";class Ue extends Kt{async perform(m,f){if(m.startsWith("$"))return super.perform(m,f);throw Error("not implemented")}}$(Ue,"identifier",Vs);function re(u){return dr.test(u)}const dr=/^-?[0-9]+$/;function en(u){return fr.test(u)}const fr=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function tn(u,m){if(re(u))return Number.isSafeInteger(Number.parseInt(u,10));const f=Number.parseFloat(u),g=String(f);if(u===g)return!0;const j=bt(u),k=bt(g);return!!(j===k||(m==null?void 0:m.approx)===!0&&!re(u)&&k.length>=14&&j.startsWith(k.substring(0,14)))}let se=(function(u){return u.underflow="underflow",u.overflow="overflow",u.truncate_integer="truncate_integer",u.truncate_float="truncate_float",u})({});function pr(u){if(tn(u,{approx:!1}))return;if(re(u))return se.truncate_integer;const m=Number.parseFloat(u);return Number.isFinite(m)?m===0?se.underflow:se.truncate_float:se.overflow}function bt(u){const{start:m,end:f}=mr(u),g=u.substring(m,f),j=g.indexOf(".");return j===-1?g:g.substring(0,j)+g.substring(j+1)}function mr(u){let m=0;for(u[0]==="-"&&m++;u[m]==="0"||u[m]===".";)m++;let f=u.lastIndexOf("e");for(f===-1&&(f=u.lastIndexOf("E")),f===-1&&(f=u.length);(u[f-1]==="0"||u[f-1]===".")&&f>m;)f--;return{start:m,end:f}}class gr{constructor(m){if($(this,"isLosslessNumber",!0),!en(m))throw new Error(`Invalid number (value: "${m}")`);this.value=m}valueOf(){const m=pr(this.value);if(m===void 0||m===se.truncate_float)return Number.parseFloat(this.value);if(re(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${m} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function br(u){return u&&typeof u=="object"&&u.isLosslessNumber||!1}function yr(u){return new gr(u)}function wr(u,m){return Je({"":u},"",u,m)}function Je(u,m,f,g){return Array.isArray(f)?g.call(u,m,Er(f,g)):f&&typeof f=="object"&&!br(f)?g.call(u,m,_r(f,g)):g.call(u,m,f)}function _r(u,m){for(const f of Object.keys(u)){const g=Je(u,f,u[f],m);g!==void 0?u[f]=g:delete u[f]}return u}function Er(u,m){for(let f=0;f<u.length;f++)u[f]=Je(u,String(f),u[f],m);return u}function Sr(u,m){let f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:yr,g=0;const j=_();return e(j),a(),m?wr(j,m):j;function k(){if(u.charCodeAt(g)===Tr){g++,h();const b={};let y=!0;for(;g<u.length&&u.charCodeAt(g)!==wt;){y?y=!1:(r(),h());const T=g,G=t();if(G===void 0){A();return}h(),i();const q=_();if(q===void 0){V();return}Object.prototype.hasOwnProperty.call(b,G)&&!De(q,b[G])&&E(G,T+1),b[G]=q}return u.charCodeAt(g)!==wt&&S(),g++,b}}function x(){if(u.charCodeAt(g)===kr){g++,h();const b=[];let y=!0;for(;g<u.length&&u.charCodeAt(g)!==_t;){y?y=!1:r();const T=_();n(T),b.push(T)}return u.charCodeAt(g)!==_t&&C(),g++,b}}function _(){h();const b=t()??o()??k()??x()??c("true",!0)??c("false",!1)??c("null",null);return h(),b}function c(b,y){if(u.slice(g,g+b.length)===b)return g+=b.length,y}function h(){for(;xr(u.charCodeAt(g));)g++}function t(){if(u.charCodeAt(g)===Pe){g++;let b="";for(;g<u.length&&u.charCodeAt(g)!==Pe;){if(u.charCodeAt(g)===Cr){const y=u[g+1],T=Or[y];T!==void 0?(b+=T,g++):y==="u"?pe(u.charCodeAt(g+2))&&pe(u.charCodeAt(g+3))&&pe(u.charCodeAt(g+4))&&pe(u.charCodeAt(g+5))?(b+=String.fromCharCode(Number.parseInt(u.slice(g+2,g+6),16)),g+=5):F(g):U(g)}else Rr(u.charCodeAt(g))?b+=u[g]:H(u[g]);g++}return v(),g++,b}}function o(){const b=g;if(u.charCodeAt(g)===Et&&(g++,p(b)),u.charCodeAt(g)===We)g++;else if(Ar(u.charCodeAt(g)))for(g++;me(u.charCodeAt(g));)g++;if(u.charCodeAt(g)===$r)for(g++,p(b);me(u.charCodeAt(g));)g++;if(u.charCodeAt(g)===Mr||u.charCodeAt(g)===Br)for(g++,(u.charCodeAt(g)===Et||u.charCodeAt(g)===jr)&&g++,p(b);me(u.charCodeAt(g));)g++;if(g>b)return f(u.slice(b,g))}function r(){if(u.charCodeAt(g)!==vr)throw new SyntaxError(`Comma ',' expected after value ${O()}`);g++}function i(){if(u.charCodeAt(g)!==Ur)throw new SyntaxError(`Colon ':' expected after property name ${O()}`);g++}function e(b){if(b===void 0)throw new SyntaxError(`JSON value expected ${O()}`)}function n(b){if(b===void 0)throw new SyntaxError(`Array item expected ${O()}`)}function a(){if(g<u.length)throw new SyntaxError(`Expected end of input ${O()}`)}function p(b){if(!me(u.charCodeAt(g))){const y=u.slice(b,g);throw new SyntaxError(`Invalid number '${y}', expecting a digit ${O()}`)}}function v(){if(u.charCodeAt(g)!==Pe)throw new SyntaxError(`End of string '"' expected ${O()}`)}function A(){throw new SyntaxError(`Quoted object key expected ${O()}`)}function E(b,y){throw new SyntaxError(`Duplicate key '${b}' encountered at position ${y}`)}function S(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${O()}`)}function C(){throw new SyntaxError(`Array item or end of array ']' expected ${O()}`)}function H(b){throw new SyntaxError(`Invalid character '${b}' ${he()}`)}function U(b){const y=u.slice(b,b+2);throw new SyntaxError(`Invalid escape character '${y}' ${he()}`)}function V(){throw new SyntaxError(`Object value expected after ':' ${he()}`)}function F(b){const y=u.slice(b,b+6);throw new SyntaxError(`Invalid unicode character '${y}' ${he()}`)}function he(){return`at position ${g}`}function P(){return g<u.length?`but got '${u[g]}'`:"but reached end of input"}function O(){return`${P()} ${he()}`}}function xr(u){return u===Nr||u===Pr||u===Ir||u===Lr}function pe(u){return u>=We&&u<=Ke||u>=Dr&&u<=Hr||u>=qr&&u<=zr}function me(u){return u>=We&&u<=Ke}function Ar(u){return u>=Fr&&u<=Ke}function Rr(u){return u>=32&&u<=1114111}function De(u,m){return u===m?!0:Array.isArray(u)&&Array.isArray(m)?u.length===m.length&&u.every((f,g)=>De(f,m[g])):yt(u)&&yt(m)?[...new Set([...Object.keys(u),...Object.keys(m)])].every(f=>De(u[f],m[f])):!1}function yt(u){return typeof u=="object"&&u!==null}const Or={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
1124
|
+
`,r:"\r",t:" "},Cr=92,Tr=123,wt=125,kr=91,_t=93,Nr=32,Pr=10,Ir=9,Lr=13,Pe=34,jr=43,Et=45,We=48,Fr=49,Ke=57,vr=44,$r=46,Ur=58,Dr=65,qr=97,Br=69,Mr=101,Hr=70,zr=102;function nn(u,m,f,g){return j(u);function j(c,h){if(Array.isArray(g)){const t=g.find(o=>o.test(c));if(t){const o=t.stringify(c);if(typeof o!="string"||!en(o))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${o})`);return o}}if(typeof c=="boolean"||typeof c=="number"||typeof c=="string"||c===null||c instanceof Date||c instanceof Boolean||c instanceof Number||c instanceof String)return JSON.stringify(c);if(c!=null&&c.isLosslessNumber||typeof c=="bigint")return c.toString();if(Array.isArray(c))return k(c);if(c&&typeof c=="object")return x(c)}function k(c,h){if(c.length===0)return"[]";let t="[";for(let o=0;o<c.length;o++){const r=c[o];typeof r<"u"&&typeof r!="function"?t+=j(r):t+="null",o<c.length-1&&(t+=",")}return t+="]",t}function x(c,h){if(typeof c.toJSON=="function")return nn(c.toJSON(),m,f,void 0);const t=Array.isArray(m)?m.map(String):Object.keys(c);if(t.length===0)return"{}";let o=!0,r="{";for(const i of t){const e=c[i];if(_(i,e)){o?o=!1:r+=",";const n=JSON.stringify(i);r+=`${n}:`,r+=j(e)}}return r+="}",r}function _(c,h){return typeof h<"u"&&typeof h!="function"&&typeof h!="symbol"}}function Vr(u){return re(u)&&!tn(u)?BigInt(u):parseFloat(u)}class gi{constructor(){$(this,"id",1)}async exec(m,f,g={},j={},k=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return g.scope=window.openc3Scope,j.manual=!0,(await He.post("/openc3-api/api",{jsonrpc:"2.0",method:m,params:f,id:this.id,keyword_params:g},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...j},timeout:k,transformRequest:[(x,_)=>nn(x)],transformResponse:[x=>Sr(x,void 0,Vr)]})).data.result}catch(x){let _=new Error;throw x.response?(_.name=x.response.data.error.data.class,_.message=x.response.data.error.data.message,_.object=x.response.data.error):x.request?(_.name="Request error",_.message="Request error, no response received"):_=x,_}}decode_openc3_type(m){if(m!==null&&typeof m=="object"&&m.json_class=="Float"&&m.raw){if(m.raw=="NaN")return NaN;if(m.raw=="Infinity")return 1/0;if(m.raw=="-Infinity")return-1/0}return null}encode_openc3_type(m){return Number.isNaN(m)?{json_class:"Float",raw:"NaN"}:m==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:m==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(m=>{m&&(localStorage.openc3OfflineToken?this.set_offline_access(localStorage.openc3OfflineToken).then(()=>{delete localStorage.openc3OfflineToken}):OpenC3Auth.getOfflineAccess())})}offline_access_needed(){return this.exec("offline_access_needed",[])}set_offline_access(m){return this.exec("set_offline_access",[m])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(m,f){return this.exec("map_target_to_interface",[m,f])}connect_interface(m,...f){return f.length>0?this.exec("connect_interface",[m,...f]):this.exec("connect_interface",[m])}disconnect_interface(m){return this.exec("disconnect_interface",[m])}interface_cmd(m,f,...g){return this.exec("interface_cmd",[m,f,...g])}get_all_router_info(){return this.exec("get_all_router_info",[])}connect_router(m){return this.exec("connect_router",[m])}disconnect_router(m){return this.exec("disconnect_router",[m])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(m){return this.exec("get_tlm_cnts",[m])}get_item(m,f,g){return this.exec("get_item",[m,f,g])}get_param(m,f,g){return this.exec("get_param",[m,f,g])}get_parameter(m,f,g){return this.exec("get_param",[m,f,g])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(m){return this.exec("set_limits_set",[m])}get_target(m){return this.exec("get_target",[m])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(m,f){return this.exec("get_tlm",[m,f])}get_telemetry(m,f){return this.exec("get_tlm",[m,f])}get_all_tlm(m){return this.exec("get_all_tlm",[m])}get_all_telemetry(m){return this.exec("get_all_tlm",[m])}get_all_tlm_names(m,f=!1){return this.exec("get_all_tlm_names",[m],{hidden:f})}get_all_telemetry_names(m){return this.exec("get_all_tlm_names",[m])}get_all_tlm_item_names(m){return this.exec("get_all_tlm_item_names",[m])}async get_tlm_packet(m,f,g,j=30){const k=await this.exec("get_tlm_packet",[m,f],{type:g,stale_time:j});if(k!=null){let x=k.length,_=null;for(let c=0;c<x;c++)_=this.decode_openc3_type(k[c][1]),_!==null&&(k[c][1]=_)}return k}get_packet_derived_items(m,f){return this.exec("get_packet_derived_items",[m,f])}get_tlm_buffer(m,f){return this.exec("get_tlm_buffer",[m,f])}get_tlm_available(m){return this.exec("get_tlm_available",[m])}async get_tlm_values(m,f=30,g=null,j=null,k=null){let x={stale_time:f};g!==null&&(x.cache_timeout=g),j!==null&&(x.start_time=j.toISOString()),k!==null&&(x.end_time=k.toISOString());const _=await this.exec("get_tlm_values",[m],x,{},1e4);if(_&&_.length>0){let c=_[0].length,h=null;for(let t=0;t<c;t++)h=this.decode_openc3_type(_[0][t]),h!==null&&(_[0][t]=h)}return _}get_limits(m,f,g){return this.exec("get_limits",[m,f,g])}async tlm(m,f,g,j="CONVERTED"){let k=null;if(f===void 0)k=await this.exec("tlm",[m]);else if(g===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(f))k=await this.exec("tlm",[m],{type:f});else{let _=new Error;throw _.name="TypeError",_.message=`Invalid data type ${f}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,_}else k=await this.exec("tlm",[m,f,g],{type:j});let x=this.decode_openc3_type(k);return x!==null&&(k=x),k}async inject_tlm(m,f,g=null,j="CONVERTED"){await this.exec("inject_tlm",[m,f,g],{type:j})}set_tlm(m,f,g,j){return this.exec("set_tlm",[m,f,g],{type:j})}override_tlm(m,f,g,j){return this.exec("override_tlm",[m,f,g],{type:j})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(m,f,g,j){return this.exec("normalize_tlm",[m,f,g],{type:j})}get_all_cmds(m){return this.exec("get_all_cmds",[m])}get_all_commands(m){return this.exec("get_all_cmds",[m])}get_all_cmd_names(m,f=!1){return this.exec("get_all_cmd_names",[m],{hidden:f})}get_all_command_names(m){return this.exec("get_all_cmd_names",[m])}get_cmd(m,f){return this.exec("get_cmd",[m,f])}get_command(m,f){return this.exec("get_cmd",[m,f])}get_cmd_cnts(m){return this.exec("get_cmd_cnts",[m])}get_cmd_value(m,f,g,j="CONVERTED"){return this.exec("get_cmd_value",[m,f,g,j])}get_cmd_buffer(m,f){return this.exec("get_cmd_buffer",[m,f])}_cmd(m,f,g,j,k,x={}){let _=null;for(let c in j)Object.prototype.hasOwnProperty.call(j,c)&&(_=this.encode_openc3_type(j[c]),_!==null&&(j[c]=_));return this.exec(m,[f,g,j],x,k)}get_cmd_hazardous(m,f,g,j={}){return f===void 0?this.exec("get_cmd_hazardous",m,{},j):this._cmd("get_cmd_hazardous",m,f,g,j)}cmd(m,f,g,j={},k={}){return f===void 0?this.exec("cmd",m,{},j):this._cmd("cmd",m,f,g,j,k)}cmd_no_range_check(m,f,g,j={},k={}){return f===void 0?this.exec("cmd_no_range_check",m,{},j,k):this._cmd("cmd_no_range_check",m,f,g,j,k)}cmd_raw(m,f,g,j={},k={}){return f===void 0?this.exec("cmd_raw",m,{},j,k):this._cmd("cmd_raw",m,f,g,j,k)}cmd_raw_no_range_check(m,f,g,j={},k={}){return f===void 0?this.exec("cmd_raw_no_range_check",m,{},j,k):this._cmd("cmd_raw_no_range_check",m,f,g,j,k)}cmd_no_hazardous_check(m,f,g,j={},k={}){return f===void 0?this.exec("cmd_no_hazardous_check",m,{},j,k):this._cmd("cmd_no_hazardous_check",m,f,g,j,k)}cmd_no_checks(m,f,g,j={},k={}){return f===void 0?this.exec("cmd_no_checks",m,{},j,k):this._cmd("cmd_no_checks",m,f,g,j,k)}cmd_raw_no_hazardous_check(m,f,g,j={},k={}){return f===void 0?this.exec("cmd_raw_no_hazardous_check",m,{},j,k):this._cmd("cmd_raw_no_hazardous_check",m,f,g,j,k)}cmd_raw_no_checks(m,f,g,j={},k={}){return f===void 0?this.exec("cmd_raw_no_checks",m,{},j,k):this._cmd("cmd_raw_no_checks",m,f,g,j,k)}build_cmd(m,f,g,j={},k={}){return f===void 0?this.exec("build_cmd",m):this._cmd("build_cmd",m,f,g,j,k)}build_command(m,f,g,j={},k={}){return f===void 0?this.exec("build_cmd",m):this._cmd("build_cmd",m,f,g,j,k)}get_interface_names(){return this.exec("get_interface_names",[])}send_raw(m,f){return this.exec("send_raw",[m,f])}list_configs(m){return this.exec("list_configs",[m])}load_config(m,f){return this.exec("load_config",[m,f])}save_config(m,f,g){return this.exec("save_config",[m,f,g])}delete_config(m,f){return this.exec("delete_config",[m,f])}enable_limits(m,f,g){return this.exec("enable_limits",[m,f,g])}disable_limits(m,f,g){return this.exec("disable_limits",[m,f,g])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(m){return this.exec("get_overall_limits_state",[m])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(m,f){return this.exec("get_setting",[m],f)}get_settings(m,f){return this.exec("get_settings",m,f)}set_setting(m,f){return this.exec("set_setting",[m,f])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(m,f){return this.exec("set_setting",[m,f])}get_metrics(){return this.exec("get_metrics",[])}async hashString(m){if(window.isSecureContext){const f=new TextEncoder().encode(m),g=await crypto.subtle.digest("SHA-256",f),j=new Uint8Array(g);return Array.from(j).map(k=>k.toString(16).padStart(2,"0")).join("")}}}const _sfc_main={components:{CriticalCmdDialog:N$1,CommandEditor:Pe$1,TopBar:Z,Openc3Screen:Ee$1},mixins:[s],data(){return{title:"Command Sender",editor:null,targetName:"",commandName:"",commandDescription:"",paramList:"",lastTargetName:"",lastCommandName:"",lastParamList:"",ignoreRangeChecks:!1,statesInHex:!1,showIgnoredParams:!1,cmdRaw:!1,disableCommandValidation:!1,interfaces:[],selectedInterface:"",rawCmdFile:null,status:"",history:"",hazardousCommand:"",displaySendHazardous:!1,displayErrorDialog:!1,displaySendRaw:!1,displayCriticalCmd:!1,criticalCmdUuid:null,criticalCmdString:null,criticalCmdUser:null,sendDisabled:!1,api:null,keywords:[],screenTarget:null,screenName:null,screenDefinition:null,screenCount:0}},computed:{menus:function(){return[{label:"Mode",items:[{label:"Ignore Range Checks",checkbox:!0,checked:this.ignoreRangeChecks,command:()=>{this.ignoreRangeChecks=!this.ignoreRangeChecks}},{label:"Display State Values in Hex",checkbox:!0,checked:this.statesInHex,command:()=>{this.statesInHex=!this.statesInHex}},{label:"Show Ignored Parameters",checkbox:!0,checked:this.showIgnoredParams,command:()=>{this.showIgnoredParams=!this.showIgnoredParams,this.$refs.commandEditor.triggerUpdateCmdParams()}},{label:"Disable Parameter Conversions",checkbox:!0,checked:this.cmdRaw,command:()=>{this.cmdRaw=!this.cmdRaw.checked}},{label:"Disable Command Validation",checkbox:!0,checked:this.disableCommandValidation,command:()=>{this.disableCommandValidation=!this.disableCommandValidation}}]}]}},created(){this.api=new gi,this.$route.params.target&&this.$route.params.packet&&this.commandChanged({targetName:this.$route.params.target.toUpperCase(),packetName:this.$route.params.packet.toUpperCase()}),hi.get("/openc3-api/autocomplete/keywords/screen").then(u=>{this.keywords=u.data})},mounted(){this.editor=aceExports.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight"),this.editor.session.setMode("ace/mode/ruby"),this.editor.session.setTabSize(2),this.editor.session.setUseWrapMode(!0),this.editor.setHighlightActiveLine(!1),this.editor.setValue(localStorage.command_sender__history),this.history=this.editor.getValue().trim(),this.editor.clearSelection(),this.editor.focus(),this.editor.setAutoScrollEditorIntoView(!0),this.editor.setOption("maxLines",30),this.editor.setOption("minLines",1),this.editor.container.addEventListener("keydown",u=>{if(u.key==="Enter"){u.preventDefault();let m=this.editor.session.getLine(this.editor.getCursorPosition().row);if(m==="")return;let f=m.indexOf('"'),g=m.lastIndexOf('"');m=m.substr(f+1,g-f-1),this.sendCmd(m)}})},beforeUnmount(){this.editor.destroy(),this.editor.container.remove()},methods:{convertToValue(param){if(param.val!==void 0&¶m.states&&!this.cmdRaw)return Object.keys(param.states).find(u=>param.states[u].value===param.val);if(typeof param.val!="string")return param.val;let str=param.val,quotesRemoved=this.removeQuotes(str);if(str===quotesRemoved){let upcaseStr=str.toUpperCase();if((param.type==="STRING"||param.type==="BLOCK")&&upcaseStr.startsWith("0X")){let u=upcaseStr.slice(2);u.length%2!==0&&(u="0"+u);let m={json_class:"String",raw:[]};for(let f=0;f<u.length;f+=2){let g=u.charAt(f)+u.charAt(f+1);m.raw.push(parseInt(g,16))}return m}else return upcaseStr==="INFINITY"?1/0:upcaseStr==="-INFINITY"?-1/0:upcaseStr==="NAN"?NaN:this.isFloat(str)?parseFloat(str):this.isInt(str)?Number.isSafeInteger(Number(str))?parseInt(str):BigInt(str):this.isArray(str)?eval(str):str}else return quotesRemoved},commandChanged(u){(this.targetName!==u.targetName||this.commandName!==u.packetName)&&(this.targetName=u.targetName,this.commandName=u.packetName,this.updateScreenInfo(),this.targetName&&this.commandName?this.$router.replace({name:"CommandSender",params:{target:this.targetName,packet:this.commandName}}).catch(m=>{}):this.$router.replace({name:"CommandSender"}).catch(m=>{}))},updateScreenInfo(){this.targetName&&this.commandName?this.api.get_cmd(this.targetName,this.commandName).then(u=>{if(u.screen)this.loadScreen(u.screen[0],u.screen[1]).then(m=>{this.screenTarget=u.screen[0],this.screenName=u.screen[1],this.screenDefinition=m.data,this.screenCount+=1});else{if(u.related_items){this.screenTarget="LOCAL",this.screenName="CMDSENDER";let m=`SCREEN AUTO AUTO 1.0
|
1125
|
+
`;for(const f of u.related_items)m+=`LABELVALUE '${f[0]}' '${f[1]}' '${f[2]}' WITH_UNITS 20
|
1126
|
+
`;this.screenDefinition=m}else this.screenTarget=null,this.screenName=null,this.screenDefinition=null;this.screenCount+=1}},u=>{this.displayError("getting command for screen info",u)}):(this.screenTarget=null,this.screenName=null,this.screenDefinition=null,this.screenCount+=1)},createParamList(){let u={};for(const m of this.$refs.commandEditor.getRows())u[m.parameter_name]=this.convertToValue(m);return u},buildCmd(){this.sendCmd(this.targetName,this.commandName,this.createParamList())},sendCmd(u,m,f){this.lastTargetName=u,this.lastCommandName=m,this.lastParamList=f,this.sendDisabled=!0;let g=!1,j="";this.api.get_cmd_hazardous(u,m,f).then(k=>{if(g=k,g)m===void 0?this.hazardousCommand=u.split(" ").slice(0,2).join(" "):this.hazardousCommand=`${u} ${m}`,this.displaySendHazardous=!0;else{let x,_=this.disableCommandValidation?{validate:!1}:{};this.cmdRaw?this.ignoreRangeChecks?(j="cmd_raw_no_range_check",x=this.api.cmd_raw_no_range_check(u,m,f,{"Ignore-Errors":"428"},_)):(j="cmd_raw",x=this.api.cmd_raw(u,m,f,{"Ignore-Errors":"428 500"},_)):this.ignoreRangeChecks?(j="cmd_no_range_check",x=this.api.cmd_no_range_check(u,m,f,{"Ignore-Errors":"428"},_)):(j="cmd",x=this.api.cmd(u,m,f,{"Ignore-Errors":"428 500"},_)),x.then(c=>{this.processCmdResponse(!0,u,m,j,c)},c=>{this.processCmdResponse(!1,u,m,j,c)})}},k=>{this.processCmdResponse(!1,u,m,j,k)})},sendHazardousCmd(){this.displaySendHazardous=!1;let u="",m="",f=this.disableCommandValidation?{validate:!1}:{};this.cmdRaw?this.ignoreRangeChecks?(m="cmd_raw_no_range_check",u=this.api.cmd_raw_no_checks(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428"},f)):(m="cmd_raw",u=this.api.cmd_raw_no_hazardous_check(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428 500"},f)):this.ignoreRangeChecks?(m="cmd_no_range_check",u=this.api.cmd_no_checks(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428"},f)):(m="cmd",u=this.api.cmd_no_hazardous_check(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428 500"},f)),u.then(g=>{this.processCmdResponse(!0,this.lastTargetName,this.lastCommandName,m,g)},g=>{this.processCmdResponse(!1,this.lastTargetName,this.lastCommandName,m,g)})},cancelHazardousCmd(){this.displaySendHazardous=!1,this.status="Hazardous command not sent",this.sendDisabled=!1},processCmdResponse(u,m,f,g,j){f===void 0&&([m,f]=m.split(" ").slice(0,2));let k="";if(u){k=`${g}("${j.target_name} ${j.cmd_name}`;let x=Object.keys(j.cmd_params);if(x.length>0){k+=" with ";for(let _=0;_<x.length;_++){let c=x[_],h="";j.obfuscated_items.includes(c)?h="*****":h=this.convertToString(j.cmd_params[c]),typeof j.cmd_params[c]=="string"&&h.charAt(0)!=="'"&&h.charAt(0)!=='"'&&(h=`'${h}'`),k+=c+" "+h,_<x.length-1&&(k+=", ")}}if(this.disableCommandValidation?k+='", validate: false)':k+='")',!this.history.includes(k)){let _=k;this.history.length!==0&&(_+=`
|
1127
|
+
${this.history}`),this.editor.setValue(_),this.editor.moveCursorTo(0,0)}if(k+=" sent.",this.status.includes(k)){let _=this.status.split("sent.");if(_[1].includes("(")){let c=parseInt(_[1].substr(2,_[1].indexOf(")")-2));k=_[0]+"sent. ("+(c+1)+")"}else k+=" (2)"}this.status=k}else{let x="sending "+m+" "+f;this.displayError(x,j,!0)}this.history=this.editor.getValue(),localStorage.command_sender__history=this.editor.getValue(),this.sendDisabled=!1},clearHistory(){this.editor.setValue(""),this.history="",localStorage.removeItem("command_sender__history")},displayError(u,m,f=!1){this.status=`Error ${u} due to ${m.name}`,m.message&&m.message!==""&&(this.status+=": ",this.status+=m.message),this.status.includes("CriticalCmdError")&&(this.status="Critical Command Queued For Approval"),f&&(m.message.includes("CriticalCmdError")?(this.criticalCmdUuid=m.object.data.instance_variables["@uuid"],this.criticalCmdString=m.object.data.instance_variables["@command"].cmd_string,this.criticalCmdUser=m.object.data.instance_variables["@command"].username,this.displayCriticalCmd=!0):this.displayErrorDialog=!0)},loadScreen(u,m){return hi.get("/openc3-api/screen/"+u+"/"+m,{headers:{Accept:"text/plain"}})}}},_hoisted_1={ref:"editor",class:"editor","data-test":"sender-history"},_hoisted_2={class:"mx-1"},_hoisted_3=["textContent"],_hoisted_4={class:"openc3-yellow"},_hoisted_5={class:"mx-1"};function _sfc_render(u,m,f,g,j,k){const x=resolveComponent("top-bar"),_=resolveComponent("command-editor"),c=resolveComponent("v-card"),h=resolveComponent("v-col"),t=resolveComponent("v-btn"),o=resolveComponent("v-tooltip"),r=resolveComponent("v-row"),i=resolveComponent("v-card-subtitle"),e=resolveComponent("openc3-screen"),n=resolveComponent("critical-cmd-dialog"),a=resolveComponent("v-spacer"),p=resolveComponent("v-toolbar"),v=resolveComponent("v-card-text"),A=resolveComponent("v-dialog"),E=resolveComponent("v-card-actions"),S=resolveComponent("v-select");return openBlock(),createElementBlock("div",null,[createVNode(x,{menus:k.menus,title:j.title},null,8,["menus","title"]),createVNode(_,{ref:"commandEditor","initial-target-name":u.$route.params.target,"initial-packet-name":u.$route.params.packet,"send-disabled":j.sendDisabled,"states-in-hex":j.statesInHex,"show-ignored-params":j.showIgnoredParams,"cmd-raw":j.cmdRaw,onCommandChanged:m[0]||(m[0]=C=>k.commandChanged(C)),onBuildCmd:m[1]||(m[1]=C=>k.buildCmd(C))},null,8,["initial-target-name","initial-packet-name","send-disabled","states-in-hex","show-ignored-params","cmd-raw"]),createVNode(c,{class:"pa-3"},{default:withCtx(()=>[createTextVNode("Status: "+toDisplayString(j.status),1)]),_:1}),m[22]||(m[22]=createElementVNode("div",{style:{height:"15px"}},null,-1)),createVNode(r,{"no-gutters":""},{default:withCtx(()=>[createVNode(h,{class:"pr-4"},{default:withCtx(()=>[createVNode(c,{class:"pb-2"},{default:withCtx(()=>[createVNode(i,null,{default:withCtx(()=>[createVNode(r,null,{default:withCtx(()=>[createVNode(h,{class:"pt-6"},{default:withCtx(()=>[...m[9]||(m[9]=[createTextVNode(" Editable Command History: (Pressing Enter on the line re-executes the command) ",-1)])]),_:1}),createVNode(h,null,{default:withCtx(()=>[createVNode(o,{"open-delay":600,location:"top"},{activator:withCtx(({props:C})=>[createElementVNode("div",mergeProps(C,{class:"float-right"}),[createVNode(t,{icon:"mdi-delete-sweep",variant:"text","data-test":"clear-history",onClick:k.clearHistory},null,8,["onClick"])],16)]),default:withCtx(()=>[m[10]||(m[10]=createElementVNode("span",null," Clear History ",-1))]),_:1})]),_:1})]),_:1})]),_:1}),createVNode(r,{"no-gutters":"",class:"mt-2 mb-2"},{default:withCtx(()=>[createVNode(h,null,{default:withCtx(()=>[createElementVNode("pre",_hoisted_1,null,512)]),_:1})]),_:1})]),_:1})]),_:1}),j.screenDefinition?(openBlock(),createBlock(h,{key:0,md:"auto"},{default:withCtx(()=>[createVNode(e,{target:j.screenTarget,screen:j.screenName,definition:j.screenDefinition,keywords:j.keywords,count:j.screenCount,"show-close":!1},null,8,["target","screen","definition","keywords","count"])]),_:1})):createCommentVNode("",!0)]),_:1}),m[23]||(m[23]=createElementVNode("div",{style:{height:"15px"}},null,-1)),createVNode(n,{modelValue:j.displayCriticalCmd,"onUpdate:modelValue":m[2]||(m[2]=C=>j.displayCriticalCmd=C),uuid:j.criticalCmdUuid,"cmd-string":j.criticalCmdString,"cmd-user":j.criticalCmdUser},null,8,["modelValue","uuid","cmd-string","cmd-user"]),createVNode(A,{modelValue:j.displayErrorDialog,"onUpdate:modelValue":m[4]||(m[4]=C=>j.displayErrorDialog=C),"max-width":"600"},{default:withCtx(()=>[createVNode(c,null,{default:withCtx(()=>[createVNode(p,{height:"24"},{default:withCtx(()=>[createVNode(a),m[11]||(m[11]=createElementVNode("span",null," Error ",-1)),createVNode(a)]),_:1}),createVNode(v,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_2,[createVNode(r,{class:"my-2"},{default:withCtx(()=>[createVNode(v,null,{default:withCtx(()=>[createElementVNode("span",{textContent:toDisplayString(j.status)},null,8,_hoisted_3)]),_:1})]),_:1}),createVNode(r,null,{default:withCtx(()=>[createVNode(a),createVNode(t,{color:"primary","data-test":"error-dialog-ok",onClick:m[3]||(m[3]=C=>j.displayErrorDialog=!1)},{default:withCtx(()=>[...m[12]||(m[12]=[createTextVNode(" Ok ",-1)])]),_:1})]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"]),createVNode(A,{modelValue:j.displaySendHazardous,"onUpdate:modelValue":m[5]||(m[5]=C=>j.displaySendHazardous=C),"max-width":"600"},{default:withCtx(()=>[createVNode(c,null,{default:withCtx(()=>[createVNode(p,{height:"24"},{default:withCtx(()=>[createVNode(a),m[13]||(m[13]=createElementVNode("span",null," Hazardous Warning ",-1)),createVNode(a)]),_:1}),createVNode(v,{class:"mt-6"},{default:withCtx(()=>[createTextVNode(" Warning: Command "+toDisplayString(j.hazardousCommand)+" is Hazardous. Send? ",1),m[14]||(m[14]=createElementVNode("br",null,null,-1)),createElementVNode("span",_hoisted_4," Description: "+toDisplayString(j.commandDescription),1)]),_:1}),createVNode(E,{class:"px-2"},{default:withCtx(()=>[createVNode(a),createVNode(t,{variant:"outlined",onClick:k.cancelHazardousCmd},{default:withCtx(()=>[...m[15]||(m[15]=[createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),createVNode(t,{variant:"flat",onClick:k.sendHazardousCmd},{default:withCtx(()=>[...m[16]||(m[16]=[createTextVNode(" Send ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),createVNode(A,{modelValue:j.displaySendRaw,"onUpdate:modelValue":m[8]||(m[8]=C=>j.displaySendRaw=C),"max-width":"600"},{default:withCtx(()=>[createVNode(c,null,{default:withCtx(()=>[createVNode(p,{height:"24"},{default:withCtx(()=>[createVNode(a),m[17]||(m[17]=createElementVNode("span",null," Send Raw ",-1)),createVNode(a)]),_:1}),createVNode(v,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_5,[createVNode(r,{class:"my-2"},{default:withCtx(()=>[createVNode(h,null,{default:withCtx(()=>[...m[18]||(m[18]=[createTextVNode("Interface:",-1)])]),_:1}),createVNode(h,null,{default:withCtx(()=>[createVNode(S,{modelValue:j.selectedInterface,"onUpdate:modelValue":m[6]||(m[6]=C=>j.selectedInterface=C),variant:"solo","hide-details":"",density:"compact",items:j.interfaces,"item-title":"label","item-value":"value"},null,8,["modelValue","items"])]),_:1})]),_:1}),createVNode(r,{"no-gutters":""},{default:withCtx(()=>[createVNode(h,null,{default:withCtx(()=>[...m[19]||(m[19]=[createTextVNode("Filename:",-1)])]),_:1}),createVNode(h,null,{default:withCtx(()=>[createElementVNode("input",{type:"file",onChange:m[7]||(m[7]=C=>u.selectRawCmdFile(C))},null,32)]),_:1})]),_:1}),createVNode(r,null,{default:withCtx(()=>[createVNode(a),createVNode(t,{variant:"outlined","data-test":"raw-cancel",onClick:u.cancelRawCmd},{default:withCtx(()=>[...m[20]||(m[20]=[createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),createVNode(t,{class:"bg-primary","data-test":"raw-ok",onClick:u.sendRawCmd},{default:withCtx(()=>[...m[21]||(m[21]=[createTextVNode(" Ok ",-1)])]),_:1},8,["onClick"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"])])}const CommandSender=exports("default",_export_sfc(_sfc_main,[["render",_sfc_render],["__scopeId","data-v-6abd961f"]]))})}}));
|