openc3-cosmos-tool-cmdsender 6.6.0 → 6.7.0
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-Ck6pzAyW-e6f2bc78591871d4c021.js → ArrayWidget-BSG8KEtf-f5716b314ff2285af060.js} +2 -2
- data/tools/cmdsender/ArrayplotWidget-WVu76Kqn-5f98ec792c50b2b41ea7.js +1 -0
- data/tools/cmdsender/{BarColumn-Bgz2YJ59-85182280463f9f317a0e.js → BarColumn-Cflh9pUz-7788c7f7e0644d46b426.js} +1 -1
- data/tools/cmdsender/BlockWidget-B7ryWGCq-02b43aba032193d1be9d.js +2 -0
- data/tools/cmdsender/{ButtonWidget-D_tupiPB-c36933dafd7fe4511f97.js → ButtonWidget-BKih3ix9-767791e4d307daa28807.js} +2 -2
- data/tools/cmdsender/CanvasWidget-DT9xMSfb-e62cba70058f0d5ce3d4.js +1 -0
- data/tools/cmdsender/CanvasdotWidget-7H5Hvcn--c5662b01556b06b72db3.js +1 -0
- data/tools/cmdsender/{CanvasimageWidget-CNJlzLqo-ea39154a49478f39b1c9.js → CanvasimageWidget-BbWYx6Gj-e4ca4989e866fb906c42.js} +1 -1
- data/tools/cmdsender/{CanvasimagevalueWidget-DudwwOD6-c2977839b1b5beb747ac.js → CanvasimagevalueWidget-Blvoe2X4-d0390279a8721e54d9b8.js} +1 -1
- data/tools/cmdsender/{CanvaslabelWidget-BZQp16dH-4e0a2e1d4ad8ffdbc00f.js → CanvaslabelWidget-BPx_Rm4o-159bd63528310a68b52e.js} +1 -1
- data/tools/cmdsender/{CanvaslabelvalueWidget-CHS36Te9-1326b196ef519b64ef4e.js → CanvaslabelvalueWidget-DzdWvL0W-1cc43178183da759ac1a.js} +1 -1
- data/tools/cmdsender/{CanvaslineWidget-nhKEAGhs-b26186dde4dbe9720fe2.js → CanvaslineWidget-CqskilGk-e39386395cabd69ac8bc.js} +1 -1
- data/tools/cmdsender/{CanvaslinevalueWidget-DsyIDkJy-7dd806a4251982359fc8.js → CanvaslinevalueWidget-C0JIKdvZ-61a79f1b5689d88e3436.js} +1 -1
- data/tools/cmdsender/{CheckbuttonWidget-DCam7Jd0-b0bd5e20f41eb64a2e4c.js → CheckbuttonWidget-C9FbJx2v-9a845bcbe11738910558.js} +1 -1
- data/tools/cmdsender/{ComboboxWidget-ZX-k-_aK-de6ae885887baed6f869.js → ComboboxWidget-BbNKT0s8-2def332c18c3cc0577cc.js} +1 -1
- data/tools/cmdsender/CommandSender-a91f98a0962ad2c89a26.js +1127 -0
- data/tools/cmdsender/{CriticalCmdDialog-Dylpoz_4-de39c72a2e7f30c62c5f.js → CriticalCmdDialog-CF7Sqjdm-e39ce82d0ab50016472c.js} +1 -1
- data/tools/cmdsender/{DateWidget-DuJ5uC2t-61ac3a5607ac69bf1946.js → DateWidget-CBMsdRUE-e4ae31e0c8185fa9fbb2.js} +1 -1
- data/tools/cmdsender/DetailsDialog-DRVahE5z-dc3b18b6ba9850a484fa.js +1 -0
- data/tools/cmdsender/{DynamicWidget-CfMtj7H8-e763433cb1f126a56a85.js → DynamicWidget-CfMtj7H8-be022a3a1d90698a529b.js} +1 -1
- data/tools/cmdsender/{FormatvalueWidget-DYICPNcx-369b3503763d617b1704.js → FormatvalueWidget-BLWsqhIZ-80d226337b9c2de53a50.js} +1 -1
- data/tools/cmdsender/Graph-BiU56Qj2-a284b4f678d66753fd0e.js +1 -0
- data/tools/cmdsender/GraphWidget-Ga0AEfrJ-ce6e4b309a849ea0ed4a.js +1 -0
- data/tools/cmdsender/HorizontalWidget-CsVhLwZO-ca3af70b4b19f74cb0a4.js +1 -0
- data/tools/cmdsender/HorizontalboxWidget-xC6PADl3-6ce2636246986d8fa3f7.js +1 -0
- data/tools/cmdsender/{HorizontallineWidget-DEODVJCk-6c4cfe764738b3dce8ed.js → HorizontallineWidget-NZIxmRVN-b150487f3cbf2362bf68.js} +1 -1
- data/tools/cmdsender/{IframeWidget-n8lNXrpt-248b557a9ca7861fa205.js → IframeWidget-BgzjSfag-578d3a74d4076814071b.js} +1 -1
- data/tools/cmdsender/{ImageLoader-CfcErydq-a423f9782e23274ea1de.js → ImageLoader-DbFVK1Ui-3674872801f063f48641.js} +1 -1
- data/tools/cmdsender/{ImageviewerWidget-DE8fj06Z-4229c338f78b0b61fbe4.js → ImageviewerWidget-BnT5m-nw-1fdbc768c6e6fd5b5d52.js} +1 -1
- data/tools/cmdsender/{LabelWidget-iUIJLhdA-3a3a035aa7e3f324f4e3.js → LabelWidget-DSDYmz6X-c9d416a8dd38f3827bca.js} +1 -1
- data/tools/cmdsender/LabelledWidget-DMb-myxs-5d2f9214c23d7414d3b7.js +1 -0
- data/tools/cmdsender/LabelprogressbarWidget-CkjDJBao-8a21fac489ba058aced8.js +1 -0
- data/tools/cmdsender/LabelsparklineWidget-DBYPFz3Y-8c0d3fd6ccfe02a35306.js +1 -0
- data/tools/cmdsender/{LabelvalueWidget-oiW-JDw6-1570e7ad78320dd7165f.js → LabelvalueWidget-DlTkJC4i-9573d23279a9873ce449.js} +1 -1
- data/tools/cmdsender/{LabelvaluedescWidget-Ck0AJ9g0-7df34a2f89be8fb9f8f7.js → LabelvaluedescWidget-dRqnGZub-ea523e6a2fb9fe5220c8.js} +1 -1
- data/tools/cmdsender/LabelvaluelimitsbarWidget-CS4NAPJ1-50d977b2328b9b73f324.js +1 -0
- data/tools/cmdsender/LabelvaluelimitscolumnWidget-D9x4Ppv8-81e9ccfff9071bd1ca4b.js +1 -0
- data/tools/cmdsender/{LabelvaluerangebarWidget-Bs9locqu-be67e66661e173c12a74.js → LabelvaluerangebarWidget-Dhyng4-n-cfbbdbdec6021a9f58a9.js} +1 -1
- data/tools/cmdsender/{Layout-1z8iJV5--980eb034a25f5f420214.js → Layout-mWR35VAD-337b92b031ded68b4430.js} +1 -1
- data/tools/cmdsender/LedWidget-D8cq4pUv-3b791ea261660eb39537.js +1 -0
- data/tools/cmdsender/{LimitsbarWidget-BxxoKTjp-550654baa6dbb8de5c82.js → LimitsbarWidget-VGJnDuVM-27b70ffb9f72106b1c68.js} +1 -1
- data/tools/cmdsender/{LimitscolorWidget-DFDwf4In-c2da3a66e07c0f0b827a.js → LimitscolorWidget-CG6Pqi12-fa81e3f14bf84fd1ef22.js} +1 -1
- data/tools/cmdsender/{LimitscolumnWidget-CdBh2mJu-b320b478205b2745236a.js → LimitscolumnWidget-DjovQdiT-43dfa2d1a68e6857de4b.js} +1 -1
- data/tools/cmdsender/LinegraphWidget-DSWAhXgZ-5355ceee7f649555d563.js +1 -0
- data/tools/cmdsender/MatrixbycolumnsWidget-C3cuhRxz-511493ebfd33c6c8dc43.js +1 -0
- data/tools/cmdsender/{ProgressbarWidget-Cdu5nJC3-e1b358898e99ab5c366a.js → ProgressbarWidget-oCgAEFBO-e07df4b0e9856376caeb.js} +1 -1
- data/tools/cmdsender/{RadiobuttonWidget-CZZGbvdG-7dd02b64c7451adbee41.js → RadiobuttonWidget-D4Dak3lc-cb94e5415b577181f7f1.js} +1 -1
- data/tools/cmdsender/{RadiogroupWidget-CQN3v8Ip-9c60d5d6fc0dd4a6fc45.js → RadiogroupWidget-Dbe9T4fp-6e317ccdf46838243d61.js} +1 -1
- data/tools/cmdsender/{RangebarWidget-dZN9WjoZ-ad740b52951c88159b7d.js → RangebarWidget-CIVrgqrW-e5fc47c6787081c5dd87.js} +1 -1
- data/tools/cmdsender/{RollupWidget-i9DnNJl6-3e63539ecdaa49f8d78a.js → RollupWidget-CH1-XNLV-9416de4624fc829e9d49.js} +1 -1
- data/tools/cmdsender/ScrollwindowWidget-BwFG6Wn8-30cf5fc45c1ffec91b3f.js +1 -0
- data/tools/cmdsender/{SignalWidget-B_kA9eCJ-f9ea606e8558a158f002.js → SignalWidget-Gz2gHrUm-93df5ad57168bfa31ef7.js} +1 -1
- data/tools/cmdsender/SpacerWidget-Bg7VDB0k-f8425e8411f97c8e15f3.js +1 -0
- data/tools/cmdsender/{SparklineWidget-DQNsvEj9-1e65a82bdcc1920569b8.js → SparklineWidget-D_b5rfJv-5491dab446230bed00d1.js} +1 -1
- data/tools/cmdsender/TabbookWidget-C30f9B6z-cd3537dbe3554ed082a2.js +1 -0
- data/tools/cmdsender/TextboxWidget-CDqxsgys-ac9798bcb0d3df7d0a21.js +1 -0
- data/tools/cmdsender/{TextfieldWidget-BXr9MkVW-5f200ba6cb8dd008c3db.js → TextfieldWidget-CAyjKJs6-dee1670b6cfd1bbec675.js} +1 -1
- data/tools/cmdsender/{TimeWidget-C67uwMGH-c979573d24a98c50b30e.js → TimeWidget-BQsP0G2X-22a17d8f10074012ee92.js} +1 -1
- data/tools/cmdsender/{TitleWidget-t_YLgUMB-3d5ac03e484ee87c85cb.js → TitleWidget-DXVba53S-8651bb0b0ad064ce1120.js} +1 -1
- data/tools/cmdsender/{VWidget-j2GIGGSX-a35a776160f2d34d22a7.js → VWidget-CFTCukCL-5072285a7803916e09d9.js} +1 -1
- data/tools/cmdsender/ValueWidget-B-TWLPdM-3fa9ad5b0ef2a581360b.js +1 -0
- data/tools/cmdsender/ValuelimitsbarWidget-jsDXdPdC-d813c2d9afd6857d9b7e.js +1 -0
- data/tools/cmdsender/{ValuelimitscolumnWidget-HR1TNHwQ-7790fc72265737c05bd0.js → ValuelimitscolumnWidget-I-uwnXM2-e32c5260e3fc93648549.js} +1 -1
- data/tools/cmdsender/ValuerangebarWidget-OyhSTScu-a78b35b6ce7837164002.js +1 -0
- data/tools/cmdsender/VerticalWidget-CkFbX1Gq-629e285b12eeeb517730.js +1 -0
- data/tools/cmdsender/VerticalboxWidget-FEQgPM9r-31d7f1754d32d7a2bd40.js +1 -0
- data/tools/cmdsender/{Widget-Bn_S-zBo-efae4c00380b9d00ac88.js → Widget-C3-TBgP7-d1e6ca083010a5e1eb6a.js} +1 -1
- data/tools/cmdsender/main-120a57eb754380e5c1f0.js +1504 -0
- data/tools/cmdsender/main.js +1 -1
- metadata +70 -70
- data/tools/cmdsender/ArrayplotWidget-ntRLh6-B-5b25846e1160edc5860d.js +0 -1
- data/tools/cmdsender/BlockWidget-DGH3Zz5p-a7218379f30e4e7499d2.js +0 -2
- data/tools/cmdsender/CanvasWidget-CzG2jYQb-74abcd98bde7f4b06931.js +0 -1
- data/tools/cmdsender/CanvasdotWidget-0FAaw4G2-a7d15bcf24dcc3c99a16.js +0 -1
- data/tools/cmdsender/CommandSender-8ccdeb4eec8da196a156.js +0 -1125
- data/tools/cmdsender/DetailsDialog-BQE0TraI-14e31b27a906a6493bc2.js +0 -1
- data/tools/cmdsender/Graph-DCihpnT0-012785e59cef2f7ba8d0.js +0 -1
- data/tools/cmdsender/GraphWidget-cTVq29cY-3a1d000b923aab692dc1.js +0 -1
- data/tools/cmdsender/HorizontalWidget-v1pfd94Z-bd4117a1b457f7b747b8.js +0 -1
- data/tools/cmdsender/HorizontalboxWidget-B06-c_n4-df67026ca3aa367e15cd.js +0 -1
- data/tools/cmdsender/LabelledWidget-KI6fMlsr-bb052d44ac77b2e324ee.js +0 -1
- data/tools/cmdsender/LabelprogressbarWidget-C2lzmqBH-fe6335931e28c4cdfb6e.js +0 -1
- data/tools/cmdsender/LabelsparklineWidget-Ci6GGm29-dee496933e008db9d034.js +0 -1
- data/tools/cmdsender/LabelvaluelimitsbarWidget-aaVLaejn-90cba58de18421f43e81.js +0 -1
- data/tools/cmdsender/LabelvaluelimitscolumnWidget-Uur6aqOg-1eb20d5d4e420cdc8dcf.js +0 -1
- data/tools/cmdsender/LedWidget-BN8IgAxJ-9302562e072e102c9bb6.js +0 -1
- data/tools/cmdsender/LinegraphWidget-jXksfbPb-8fade2012cc2b61f1d8b.js +0 -1
- data/tools/cmdsender/MatrixbycolumnsWidget-DCwxPjwS-900c11b179ef5d285cce.js +0 -1
- data/tools/cmdsender/ScrollwindowWidget-54GU96Ve-d671eec7dfe14acd41b6.js +0 -1
- data/tools/cmdsender/SpacerWidget-XoMPHak8-89101d45ce49761853c3.js +0 -1
- data/tools/cmdsender/TabbookWidget-_HVA72t5-b9753d8d524da2c7dabe.js +0 -1
- data/tools/cmdsender/TextboxWidget-0JXn4bMH-a2ff21565b7bf6e69bfb.js +0 -1
- data/tools/cmdsender/ValueWidget-3jNtnh5i-3fb26681ba0b3eea2fce.js +0 -1
- data/tools/cmdsender/ValuelimitsbarWidget-JSceOzGS-165ff396b7b32b637e38.js +0 -1
- data/tools/cmdsender/ValuerangebarWidget-DnZrho8S-906c7c04bc84fef194be.js +0 -1
- data/tools/cmdsender/VerticalWidget-DJvoxqLE-7193eb2ad090444f41cc.js +0 -1
- data/tools/cmdsender/VerticalboxWidget-CYYyLBoO-ae1b0e994ee90609f26e.js +0 -1
- data/tools/cmdsender/main-2ac97b3f21af7820f325.js +0 -1503
@@ -0,0 +1,1127 @@
|
|
1
|
+
System.register(["./main-120a57eb754380e5c1f0.js","vue","./CriticalCmdDialog-CF7Sqjdm-e39ce82d0ab50016472c.js","./DetailsDialog-DRVahE5z-dc3b18b6ba9850a484fa.js","./Graph-BiU56Qj2-a284b4f678d66753fd0e.js","single-spa","vue-router","vuex","vuetify"],function(exports,module){"use strict";var d,HA,DA,PA,FA,Ek,yA,_export_sfc,resolveComponent,createBlock,openBlock,Teleport,createVNode,withCtx,createElementVNode,toDisplayString,createElementBlock,Fragment,renderList,createTextVNode,mergeProps,createSlots,createCommentVNode,normalizeStyle,withDirectives,vShow,normalizeProps,guardReactiveProps,withModifiers,normalizeClass,N,P,re$1;return{setters:[c=>{d=c.d,HA=c.H,DA=c.D,PA=c.P,FA=c.F,Ek=c.E,yA=c.y,_export_sfc=c._},c=>{resolveComponent=c.resolveComponent,createBlock=c.createBlock,openBlock=c.openBlock,Teleport=c.Teleport,createVNode=c.createVNode,withCtx=c.withCtx,createElementVNode=c.createElementVNode,toDisplayString=c.toDisplayString,createElementBlock=c.createElementBlock,Fragment=c.Fragment,renderList=c.renderList,createTextVNode=c.createTextVNode,mergeProps=c.mergeProps,createSlots=c.createSlots,createCommentVNode=c.createCommentVNode,normalizeStyle=c.normalizeStyle,withDirectives=c.withDirectives,vShow=c.vShow,normalizeProps=c.normalizeProps,guardReactiveProps=c.guardReactiveProps,withModifiers=c.withModifiers,normalizeClass=c.normalizeClass},c=>{N=c.N},c=>{P=c.P},c=>{re$1=c.r},null,null,null,null],execute:function(){var __vite_style__=document.createElement("style");__vite_style__.textContent=`.container[data-v-b19a55d5] .v-select__selections{width:auto}.v-overflow-btn[data-v-b19a55d5]{margin-top:0}.container[data-v-b19a55d5]{padding:0}.hazardous[data-v-b19a55d5] .v-select__selection-text{color:#ffdc00!important}.editor[data-v-07bbe0f0]{margin-left:30px;height:50px;width:95%;position:relative;font-size:16px}
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(__vite_style__);const I="openc3-ace-vim-mode-enabled",M="ace/keyboard/vim",X$1={isVimModeEnabled(){return localStorage.getItem(I)==="true"},setVimMode(c){localStorage.setItem(I,JSON.stringify(!!c))},toggleVimMode(c){this.isVimModeEnabled()?(c.setKeyboardHandler(null),this.setVimMode(!1)):(c.setKeyboardHandler(M),this.setVimMode(!0)),c.focus()},applyVimModeIfEnabled(c,{saveFn:h}={}){this.isVimModeEnabled()?(c.setKeyboardHandler(M),ace.config.loadModule(M,f=>{f.CodeMirror.Vim.defineEx("write","w",g=>{typeof h=="function"?h():g.ace.execCommand("save")})})):c.setKeyboardHandler(null)}},Y$1={props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(c){return c.replaceAll(" ","-").toLowerCase()},subMenuClick(c){c.command(c),this.$refs.topmenu[0].isActive=!1}},mounted(){document.title=this.title}},z$1={class:"app-title mr-2"};function J(c,h,f,g,at,E){const S=resolveComponent("v-col"),x=resolveComponent("v-row"),a=resolveComponent("v-icon"),u=resolveComponent("v-btn"),n=resolveComponent("v-divider"),o=resolveComponent("v-list-item-title"),r=resolveComponent("v-list-item"),t=resolveComponent("v-list"),e=resolveComponent("v-menu"),i=resolveComponent("v-radio"),s=resolveComponent("v-list-item-action"),p=resolveComponent("v-radio-group"),m=resolveComponent("v-checkbox");return openBlock(),createBlock(Teleport,{to:"#openc3-menu"},[createVNode(x,{"no-gutters":""},{default:withCtx(()=>[createVNode(S,{"align-self":"end"},{default:withCtx(()=>[createElementVNode("span",z$1,toDisplayString(f.title),1)]),_:1})]),_:1}),createVNode(x,{dense:"",class:"flex-nowrap"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(f.menus,(_,A)=>(openBlock(),createBlock(e,{ref_for:!0,ref:"topmenu",key:A},{activator:withCtx(({props:C})=>[createVNode(u,mergeProps({ref_for:!0},C,{variant:"outlined",class:"mx-1 menu-button",text:_.label,"data-test":E.formatDT(`${f.title} ${_.label}`)}),{append:withCtx(()=>[createVNode(a,{class:"menu-button-icon"},{default:withCtx(()=>h[0]||(h[0]=[createTextVNode(" mdi-menu-down ",-1)])),_:1,__:[0]})]),_:2},1040,["text","data-test"])]),default:withCtx(()=>[createVNode(t,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(_.items,(C,b)=>(openBlock(),createElementBlock(Fragment,null,[C.divider?(openBlock(),createBlock(n,{key:b+"-divider"})):C.subMenu&&C.subMenu.length>0?(openBlock(),createElementBlock("div",{key:b+"-submenu"},[(openBlock(),createBlock(e,{"open-on-hover":"",location:"right",key:b},{activator:withCtx(({props:Me})=>[(openBlock(),createBlock(r,mergeProps({ref_for:!0},Me,{disabled:C.disabled,key:b}),createSlots({append:withCtx(()=>[createVNode(a,null,{default:withCtx(()=>h[1]||(h[1]=[createTextVNode(" mdi-chevron-right ",-1)])),_:1,__:[1]})]),default:withCtx(()=>[!C.radio&&!C.checkbox?(openBlock(),createBlock(o,{key:0,style:normalizeStyle("cursor: pointer;"+(C.disabled?"opacity: 0.2":""))},{default:withCtx(()=>[createTextVNode(toDisplayString(C.label),1)]),_:2},1032,["style"])):createCommentVNode("",!0)]),_:2},[C.icon?{name:"prepend",fn:withCtx(()=>[createVNode(a,{disabled:C.disabled},{default:withCtx(()=>[createTextVNode(toDisplayString(C.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:withCtx(()=>[createVNode(t,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(C.subMenu,(Me,Re)=>(openBlock(),createBlock(r,{key:Re,"prepend-icon":Me.icon,onClick:q=>E.subMenuClick(Me)},{default:withCtx(()=>[createVNode(o,null,{default:withCtx(()=>[createTextVNode(toDisplayString(Me.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):C.radioGroup?(openBlock(),createBlock(p,{"model-value":C.value,"onUpdate:modelValue":C.command,key:b+"-radio-group","hide-details":"",density:"compact",class:"ma-0 pa-0"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(C.choices,(Me,Re)=>(openBlock(),createBlock(r,{key:Re+"-choice"},{default:withCtx(()=>[createVNode(s,{class:"list-action"},{default:withCtx(()=>[createVNode(i,{color:"secondary",label:Me.label,value:Me.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(openBlock(),createBlock(r,{onClick:Me=>C.command(C),disabled:C.disabled,"data-test":E.formatDT(`${f.title} ${_.label} ${C.label}`),key:b+"-list"},createSlots({default:withCtx(()=>[C.checkbox?(openBlock(),createBlock(s,{key:0,class:"list-action"},{default:withCtx(()=>[createVNode(m,{modelValue:C.checked,"onUpdate:modelValue":Me=>C.checked=Me,label:C.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):createCommentVNode("",!0),!C.radio&&!C.checkbox?(openBlock(),createBlock(o,{key:1,style:normalizeStyle("cursor: pointer;"+(C.disabled?"opacity: 0.2":""))},{default:withCtx(()=>[createTextVNode(toDisplayString(C.label),1)]),_:2},1032,["style"])):createCommentVNode("",!0)]),_:2},[C.icon?{name:"prepend",fn:withCtx(()=>[createVNode(a,{icon:C.icon,disabled:C.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["onClick","disabled","data-test"]))],64))),256))]),_:2},1024)]),_:2},1024))),128))]),_:1})])}const Z$1=d(Y$1,[["render",J],["__scopeId","data-v-4d454b93"]]);let Q$1=class{constructor(){DA.get("/openc3-api/autocomplete/data/screen").then(h=>{this.autocompleteData=h.data}),this.api=new PA}async getCompletions(h,f,g,at,E){let S=f.getLine(g.row).slice(0,g.column).trimStart().split(/ (?![^<]*>)/),x=this.autocompleteData;S.length>1&&(x=x.find(n=>n.caption===S[0]));let a={},u=!0;if(x&&x.params){x.params.length==S.length-1&&(u=!1);let n=x.params[S.length-2];if(n["Target name"])x=(await this.api.get_target_names()).reduce((o,r)=>(o[r]=1,o),{});else if(n["Packet name"]){let o=S[S.length-2];x=(await this.api.get_all_tlm(o)).reduce((r,t)=>(r[t.packet_name]=t.description,r),{})}else if(n["Item name"]){let o=S[S.length-3],r=S[S.length-2];x=(await this.api.get_tlm(o,r)).items.reduce((t,e)=>(t[e.name]=e.description,t),{})}else x=n;a=Object.keys(x||{}).map(o=>{let r={value:o+(u?" ":""),command:u&&"startAutocomplete"};return typeof x[o]=="string"&&(r.meta=x[o]),r})}else a=x;E(null,a)}};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 c=new Set,h=[];const f=this.errors.toSorted((g,at)=>g.lineNumber-at.lineNumber);for(const g of f){let at=`At ${g.lineNumber}: (${g.line}) ${g.message}.`;g.usage&&(at+=` Usage: ${g.usage}`),h.push(at),c.add(g.message)}return h}return[]},show:{get(){return this.modelValue},set(c){this.$emit("update:modelValue",c)}}},mounted:function(){this.editor=yA.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight");const c=this.buildScreenMode();this.editor.session.setMode(new c),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$1],this.editor.setHighlightActiveLine(!1),this.editor.setValue(this.definition),this.editor.clearSelection(),X$1.applyVimModeIfEnabled(this.editor),this.editor.focus()},beforeUnmount(){this.editor.destroy(),this.editor.container.remove()},methods:{toggleVimMode:function(){X$1.toggleVimMode(this.editor)},showContextMenu:function(c){this.menuX=c.pageX,this.menuY=c.pageY;let h=this.editor.getCursorPosition(),f=this.editor.session.getTokenAt(h.row,h.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 c=yA.require("ace/lib/oop"),h=yA.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()};c.inherits(g,h);let at=function(){this.HighlightRules=g},E=yA.require("ace/mode/text").Mode;return c.inherits(at,E),(function(){this.$id="ace/mode/openc3"}).call(at.prototype),at},downloadScreen:function(){const c=new Blob([this.editor.getValue()],{type:"text/plain"}),h=document.createElement("a");h.href=URL.createObjectURL(c),h.setAttribute("download",`${this.screen.toLowerCase()}.txt`),h.click()},loadFile:function(){const c=new FileReader;c.readAsText(this.file);const h=this;c.onload=function(){h.editor.setValue(c.result),h.file=null}},deleteScreen:function(){this.$dialog.confirm("Are you sure you want to delete this screen?!",{okText:"Delete",cancelText:"Cancel"}).then(c=>{this.$emit("delete")})}}},te$1=["textContent"];function ne$1(c,h,f,g,at,E){const S=resolveComponent("v-btn"),x=resolveComponent("v-spacer"),a=resolveComponent("v-toolbar"),u=resolveComponent("v-row"),n=resolveComponent("v-file-input"),o=resolveComponent("v-list-item-title"),r=resolveComponent("v-list-item"),t=resolveComponent("v-divider"),e=resolveComponent("v-list"),i=resolveComponent("v-menu"),s=resolveComponent("v-card-text"),p=resolveComponent("v-card"),m=resolveComponent("v-dialog");return openBlock(),createBlock(m,{modelValue:E.show,"onUpdate:modelValue":h[5]||(h[5]=_=>E.show=_),persistent:"",width:"75vw"},{default:withCtx(()=>[createVNode(p,null,{default:withCtx(()=>[createVNode(a,{height:"24"},{default:withCtx(()=>[createVNode(S,{class:"mx-2",icon:"mdi-delete",variant:"text",density:"compact","data-test":"delete-screen-icon",onClick:E.deleteScreen},null,8,["onClick"]),createVNode(x),createElementVNode("span",null," Edit Screen: "+toDisplayString(f.target)+" "+toDisplayString(f.screen),1),createVNode(x),createVNode(S,{class:"mx-2",icon:"mdi-download",variant:"text",density:"compact","data-test":"download-screen-icon",onClick:E.downloadScreen},null,8,["onClick"])]),_:1}),createVNode(s,{style:{"max-height":"90vh"}},{default:withCtx(()=>[createVNode(u,{class:"mt-3"},{default:withCtx(()=>h[6]||(h[6]=[createTextVNode(" Upload a screen file. ",-1)])),_:1,__:[6]}),createVNode(u,{"no-gutters":"",align:"center"},{default:withCtx(()=>[createVNode(S,{disabled:!at.file,color:"primary",class:"mr-3","data-test":"edit-screen-load",onClick:E.loadFile},{default:withCtx(()=>h[7]||(h[7]=[createTextVNode(" Load ",-1)])),_:1,__:[7]},8,["disabled","onClick"]),createVNode(n,{modelValue:at.file,"onUpdate:modelValue":h[0]||(h[0]=_=>at.file=_),"truncate-length":"15",accept:".txt",label:"Click to select .txt screen file."},null,8,["modelValue"])]),_:1}),createVNode(u,{class:"mb-2"},{default:withCtx(()=>h[8]||(h[8]=[createTextVNode(" Edit the screen definition. ",-1)])),_:1,__:[8]}),createVNode(u,{class:"mb-2"},{default:withCtx(()=>[createElementVNode("pre",{ref:"editor",class:"editor",onContextmenu:h[1]||(h[1]=withModifiers((..._)=>E.showContextMenu&&E.showContextMenu(..._),["prevent"]))},null,544),createVNode(i,{modelValue:at.contextMenu,"onUpdate:modelValue":h[2]||(h[2]=_=>at.contextMenu=_),target:[at.menuX,at.menuY]},{default:withCtx(()=>[createVNode(e,null,{default:withCtx(()=>[createVNode(r,{link:""},{default:withCtx(()=>[createVNode(o,{onClick:E.openDocumentation},{default:withCtx(()=>[createTextVNode(toDisplayString(at.docsKeyword)+" documentation ",1)]),_:1},8,["onClick"])]),_:1}),createVNode(t),createVNode(r,{title:"Toggle Vim mode","prepend-icon":"extras:vim",onClick:E.toggleVimMode},null,8,["onClick"])]),_:1})]),_:1},8,["modelValue","target"])]),_:1}),createVNode(u,{style:{"max-height":"120px","overflow-y":"auto"}},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(E.editErrors,(_,A)=>(openBlock(),createElementBlock("div",{key:A},[createElementVNode("span",{class:"text-red",textContent:toDisplayString(_)},null,8,te$1)]))),128))]),_:1}),createVNode(u,{class:"mt-5"},{default:withCtx(()=>[h[11]||(h[11]=createElementVNode("span",null," Ctrl-space brings up autocomplete. Right click keywords for documentation. ",-1)),createVNode(x),createVNode(S,{class:"mx-2",variant:"outlined","data-test":"edit-screen-cancel",onClick:h[3]||(h[3]=_=>c.$emit("cancel"))},{default:withCtx(()=>h[9]||(h[9]=[createTextVNode(" Cancel ",-1)])),_:1,__:[9]}),createVNode(S,{class:"mx-2",color:"primary","data-test":"edit-screen-save",onClick:h[4]||(h[4]=_=>c.$emit("save",c.editor.getValue()))},{default:withCtx(()=>h[10]||(h[10]=[createTextVNode(" Save ",-1)])),_:1,__:[10]})]),_:1,__:[11]})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const ie=d(ee$1,[["render",ne$1],["__scopeId","data-v-65b25a74"]]),U=20,_e$1={components:{EditScreenDialog:ie},mixins:[HA],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:Ek.uniqueId("openc3-screen_"),tlmAvailableTimeout:null}},computed:{error:function(){if(this.errorDialog&&this.errors.length>0){let c=new Set,h="";for(const f of this.errors){if(c.has(f.message))continue;let g=`${f.time}: (${f.type}) ${f.message}
|
3
|
+
`;h+=g,c.add(f.message)}return h}return null},computedStyle(){var c;let h={};const f=this.width||((c=this.$refs.bar)==null?void 0:c.clientWidth);return this.floated&&(h.position="absolute",h.top=this.top+"px",h.left=this.left+"px",h.width=f+"px"),h}},watch:{count:{handler(c,h){this.currentDefinition=this.definition,this.rerender()}},playbackDateTime:{handler(c,h){this.playbackMode==="playback"&&c&&this.update()}},playbackMode:{handler(c,h){c==="realtime"?this.updateRefreshInterval():(clearInterval(this.updater),this.updater=null)}}},errorCaptured(c,h,f){return this.errors.length<U&&(c.usage?this.errors.push({type:"usage",message:c.message,usage:c.usage,line:c.line,lineNumber:c.lineNumber,time:new Date().getTime()}):this.errors.push({type:"error",message:c,time:new Date().getTime()})),!1},created(){this.api=new PA,this.configParser=new FA,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(c,h){this.$parent.showScreen(c,h)},close(c,h){this.$parent.closeScreenByName(c,h)},closeAll(){this.$parent.closeAll()},clearErrors:function(){this.errors=[]},updateRefreshInterval:function(){let c=this.pollingPeriod*1e3;this.updater&&clearInterval(this.updater),this.updater=setInterval(()=>{this.update()},c)},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,(c,h,f,g)=>{if(c)switch(c){case"SCREEN":this.configParser.verify_num_parameters(3,4,`${c} <Width or AUTO> <Height or AUTO> <Polling Period>`),this.width=parseInt(h[0]),this.height=parseInt(h[1]),this.pollingPeriod=parseFloat(h[2]);break;case"END":this.configParser.verify_num_parameters(0,0,`${c}`),this.layoutStack.pop(),this.currentLayout=this.layoutStack[this.layoutStack.length-1];break;case"STALE_TIME":this.configParser.verify_num_parameters(1,1,`${c} <Time (s)>`),this.staleTime=parseInt(h[0]);break;case"SUBSETTING":this.configParser.verify_num_parameters(3,null,`${c} <Index> <Widget Type> <Widget Settings...>`),h[1]==="RAW"&&(h[1]="RAW__"+h[2].toLowerCase());case"SETTING":this.configParser.verify_num_parameters(2,null,`${c} <Widget Type> <Widget Settings...>`),h[0]==="RAW"&&(h[0]="RAW__"+h[1].toLowerCase()),(this.currentLayout.widgets[this.currentLayout.widgets.length-1]??this.currentLayout).settings.push(h);break;case"GLOBAL_SUBSETTING":this.configParser.verify_num_parameters(3,null,`${c} <Index> <Widget Type> <Widget Settings...>`),h[2]==="RAW"&&(h[2]="RAW__"+h[3].toLowerCase());case"GLOBAL_SETTING":this.configParser.verify_num_parameters(2,null,`${c} <Widget Type> <Widget Settings...>`),h[1]==="RAW"&&(h[1]="RAW__"+h[2].toLowerCase()),this.globalSettings.push(h);break;default:this.processWidget(c,h,f,g);break}}),typeof this.layoutStack[0]>"u"){let c=[],h=[];for(const f of this.dynamicWidgets)c.push(f.name),h.push(f.lineNumber);this.errors.length<U&&this.errors.push({type:"usage",message:`Unknown widget! Are these widgets: ${c.join(",")}?`,lineNumber:h.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 c=this.$refs.bar.parentElement.parentElement.parentElement.getBoundingClientRect(),h=this.$refs.bar.getBoundingClientRect();this.top=h.top-c.top-5,this.left=h.left-c.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(c){c=c||window.event,c.preventDefault(),this.dragX=c.clientX,this.dragY=c.clientY,document.onmouseup=this.closeDragElement,document.onmousemove=this.elementDrag},elementDrag:function(c){c=c||window.event,c.preventDefault();let h=this.dragX-c.clientX,f=this.dragY-c.clientY;this.dragX=c.clientX,this.dragY=c.clientY,this.top=this.$refs.bar.offsetTop-f,this.left=this.$refs.bar.offsetLeft-h,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(c){this.editDialog=!1,this.currentDefinition=c,this.rerender(),this.$nextTick(function(){DA.post("/openc3-api/screen/",{data:{scope:window.openc3Scope,target:this.target,screen:this.screen,text:this.currentDefinition}},0)})},deleteScreen:function(){this.editDialog=!1,DA.delete(`/openc3-api/screen/${this.target}/${this.screen}`).then(c=>{this.$emit("delete-screen")})},minMaxTransition:function(){this.expand=!this.expand,this.$emit("min-max-screen")},processWidget:function(c,h,f,g){let at=null;c==="NAMED_WIDGET"&&(this.configParser.verify_num_parameters(2,null,`${c} <Widget Name> <Widget Type> <Widget Settings... (optional)>`),at=h[0].toUpperCase(),c=h[1].toUpperCase(),h=h.slice(2,h.length));const E=c.charAt(0).toUpperCase()+c.slice(1).toLowerCase()+"Widget";let S=[];if(S.push(["__SCREEN_ID__",this.screenId]),at!==null&&S.push(["NAMED_WIDGET",at]),c==="VERTICAL"||c==="VERTICALBOX"||c==="HORIZONTAL"||c==="HORIZONTALBOX"||c==="MATRIXBYCOLUMNS"||c==="TABBOOK"||c==="TABITEM"||c==="CANVAS"||c==="RADIOGROUP"||c==="SCROLLWINDOW"){const x={type:E,parameters:h,settings:S,screenValues:this.screenValues,screenTimeZone:this.timeZone,widgets:[]};this.layoutStack.push(x),this.currentLayout.widgets.push(x),this.currentLayout=x}else if(this.$options.components[E])this.currentLayout.widgets.push({type:E,target:this.target,parameters:h,settings:S,screenValues:this.screenValues,screenTimeZone:this.timeZone,line:f,lineNumber:g});else{let x={type:"DynamicWidget",target:this.target,parameters:h,settings:S,screenValues:this.screenValues,screenTimeZone:this.timeZone,name:E,line:f,lineNumber:g};this.currentLayout.widgets.push(x),this.dynamicWidgets.push(x)}},applyGlobalSettings:function(c){c.forEach(h=>{this.globalSettings.forEach(f=>{h.type.toLowerCase()===f[0].toLowerCase()+"widget"&&(h.settings.find(g=>g[0]===f[1])||h.settings.push(f.slice(1)))}),h.widgets&&this.applyGlobalSettings(h.widgets)})},update:function(){let c=this.playbackMode==="playback"?this.playbackDateTime:null;this.actualScreenItems.length!==0&&this.api.get_tlm_values(this.actualScreenItems,this.staleTime,this.cacheTimeout,c).then(h=>{h&&h.length>0&&this.updateValues(h)}).catch(h=>{let f=JSON.stringify(h,null,2);this.errors.find(g=>g.message===f)||this.errors.length<U&&this.errors.push({type:"error",message:f,time:new Date().getTime()})})},updateValues:function(c){if(this.updateCounter+=1,c.length!=this.screenItems.length||c.length!=this.actualScreenItems.length)console.log(`get_tlm_values mismatch: data.length: ${c.length}, screenItems.length: ${this.screenItems.length}, actualScreenItems.length: ${this.actualScreenItems.length}`,JSON.stringify(c),JSON.stringify(this.screenItems),JSON.stringify(this.actualScreenItems));else for(let h=0;h<c.length;h++)c[h].push(this.updateCounter),this.screenValues[this.screenItems[h]]=c[h]},debouncedUpdateTlmAvailable:function(){this.tlmAvailableTimeout!=null&&clearTimeout(this.tlmAvailableTimeout),this.tlmAvailableTimeout=setTimeout(()=>{this.api.get_tlm_available(this.screenItems).then(c=>{if(this.actualScreenItems=c,this.screenItems.length!=c.length)console.log("Error getting tlm available",this.screenItems,this.actualScreenItems);else for(let h=0;h<this.actualScreenItems.length;h++)if(this.actualScreenItems[h]===null){const f=this.screenItems[h].split("__"),g=this.currentDefinition.split(`
|
4
|
+
`),at=g.findIndex(E=>E.includes(f[0])&&E.includes(f[1])&&E.includes(f[2]))+1;at>0?this.errors.push({type:"usage",message:`Null for ${f.join(" ")}! Does it exist?`,line:g[at-1],lineNumber:at,time:new Date().getTime()}):this.errors.push({type:"error",message:`Null for ${f.join(" ")}! Does it exist?`,time:new Date().getTime()})}}).catch(c=>{console.log("Error getting tlm available",c),this.actualScreenItems=this.screenItems}),this.tlmAvailableTimeout=null},100)},addItem:function(c){this.screenItems.push(c),this.screenValues[c]=[null,null,0],this.debouncedUpdateTlmAvailable()},deleteItem:function(c){let h=this.screenItems.indexOf(c);this.screenItems.splice(h,1),this.debouncedUpdateTlmAvailable()}}},ye$1={ref:"screen",class:"pa-1",style:{position:"relative"}},be$1={key:1,class:"pa-1",style:{position:"relative"}};function xe(c,h,f,g,at,E){const S=resolveComponent("v-btn"),x=resolveComponent("v-tooltip"),a=resolveComponent("v-spacer"),u=resolveComponent("v-toolbar"),n=resolveComponent("v-overlay"),o=resolveComponent("vertical-widget"),r=resolveComponent("v-expand-transition"),t=resolveComponent("v-card"),e=resolveComponent("edit-screen-dialog"),i=resolveComponent("v-textarea"),s=resolveComponent("v-card-actions"),p=resolveComponent("v-dialog");return openBlock(),createElementBlock("div",{ref:"bar",style:normalizeStyle(E.computedStyle)},[f.inline?createCommentVNode("",!0):(openBlock(),createBlock(t,{key:0,"min-height":at.height,"min-width":at.width,style:{cursor:"default"}},{default:withCtx(()=>[createVNode(u,{height:"24"},{default:withCtx(()=>[withDirectives(createVNode(S,{icon:"mdi-alert",variant:"text",density:"compact","data-test":"error-graph-icon","aria-label":"Show Errors",onClick:h[0]||(h[0]=()=>{at.errorDialog=!0})},null,512),[[vShow,at.errors.length!==0]]),createVNode(S,{icon:"mdi-pencil",variant:"text",density:"compact","data-test":"edit-screen-icon","aria-label":"Edit Screen",onClick:E.openEdit},null,8,["onClick"]),f.fixFloated?createCommentVNode("",!0):(openBlock(),createBlock(x,{key:0,"open-delay":600,location:"top"},{activator:withCtx(({props:m})=>[createElementVNode("div",normalizeProps(guardReactiveProps(m)),[createVNode(S,{icon:at.floated?"mdi-balloon":"mdi-view-grid-outline",variant:"text",density:"compact","data-test":"float-screen-icon","aria-label":at.floated?"Unfloat Screen":"Float Screen",onClick:E.floatScreen},null,8,["icon","aria-label","onClick"])],16)]),default:withCtx(()=>[createElementVNode("span",null,toDisplayString(at.floated?"Unfloat Screen":"Float Screen"),1)]),_:1})),at.floated?(openBlock(),createBlock(x,{key:1,"open-delay":600,location:"top"},{activator:withCtx(({props:m})=>[createElementVNode("div",normalizeProps(guardReactiveProps(m)),[createVNode(S,{icon:"mdi-arrow-up",variant:"text",density:"compact","data-test":"up-screen-icon","aria-label":"Move Screen Up",onClick:E.upScreen},null,8,["onClick"])],16)]),default:withCtx(()=>[h[6]||(h[6]=createElementVNode("span",null," Move Screen Up ",-1))]),_:1,__:[6]})):createCommentVNode("",!0),at.floated&&at.zIndex>f.minZ?(openBlock(),createBlock(x,{key:2,"open-delay":600,location:"top"},{activator:withCtx(({props:m})=>[createElementVNode("div",normalizeProps(guardReactiveProps(m)),[createVNode(S,{icon:"mdi-arrow-down",variant:"text",density:"compact","data-test":"down-screen-icon","aria-label":"Move Screen Down",onClick:E.downScreen},null,8,["onClick"])],16)]),default:withCtx(()=>[h[7]||(h[7]=createElementVNode("span",null," Move Screen Down ",-1))]),_:1,__:[7]})):createCommentVNode("",!0),createVNode(a),createElementVNode("span",null,toDisplayString(f.target)+" "+toDisplayString(f.screen),1),createVNode(a),at.expand?(openBlock(),createBlock(S,{key:3,icon:"mdi-window-minimize",variant:"text",density:"compact","data-test":"minimize-screen-icon","aria-label":"Minimize Screen",onClick:E.minMaxTransition},null,8,["onClick"])):(openBlock(),createBlock(S,{key:4,icon:"mdi-window-maximize",variant:"text",density:"compact","data-test":"maximize-screen-icon","aria-label":"Maximize Screen",onClick:E.minMaxTransition},null,8,["onClick"])),f.showClose?(openBlock(),createBlock(S,{key:5,icon:"mdi-close-box",variant:"text",density:"compact","data-test":"close-screen-icon","aria-label":"Close Screen",onClick:h[1]||(h[1]=m=>c.$emit("close-screen"))})):createCommentVNode("",!0)]),_:1}),at.editDialog?createCommentVNode("",!0):(openBlock(),createBlock(r,{key:0},{default:withCtx(()=>[withDirectives(createElementVNode("div",ye$1,[createVNode(n,{style:{"pointer-events":"none"},"model-value":at.errors.length!==0,opacity:"0.8",absolute:"",attach:"","scroll-strategy":"none"},null,8,["model-value"]),(openBlock(),createBlock(o,{key:at.screenKey,widgets:at.layoutStack[0].widgets,"screen-values":at.screenValues,"screen-time-zone":f.timeZone,onAddItem:E.addItem,onDeleteItem:E.deleteItem,onOpen:E.open,onClose:E.close,onCloseAll:E.closeAll},null,8,["widgets","screen-values","screen-time-zone","onAddItem","onDeleteItem","onOpen","onClose","onCloseAll"]))],512),[[vShow,at.expand]])]),_:1}))]),_:1},8,["min-height","min-width"])),f.inline?(openBlock(),createElementBlock("div",be$1,[createVNode(n,{style:{"pointer-events":"none"},"model-value":at.errors.length!==0,opacity:"0.8",absolute:"",attach:"","scroll-strategy":"none"},null,8,["model-value"]),withDirectives(createVNode(S,{icon:"mdi-alert",variant:"text",density:"compact","data-test":"error-graph-icon","aria-label":"Show Errors",onClick:h[2]||(h[2]=()=>{at.errorDialog=!0})},null,512),[[vShow,at.errors.length!==0]]),(openBlock(),createBlock(o,{key:at.screenKey,widgets:at.layoutStack[0].widgets,"screen-values":at.screenValues,"screen-time-zone":f.timeZone,onAddItem:E.addItem,onDeleteItem:E.deleteItem,onOpen:E.open,onClose:E.close,onCloseAll:E.closeAll},null,8,["widgets","screen-values","screen-time-zone","onAddItem","onDeleteItem","onOpen","onClose","onCloseAll"]))])):createCommentVNode("",!0),at.editDialog?(openBlock(),createBlock(e,{key:2,modelValue:at.editDialog,"onUpdate:modelValue":h[3]||(h[3]=m=>at.editDialog=m),target:f.target,screen:f.screen,definition:at.currentDefinition,keywords:f.keywords,errors:at.errors,onSave:E.saveEdit,onCancel:E.cancelEdit,onDelete:E.deleteScreen},null,8,["modelValue","target","screen","definition","keywords","errors","onSave","onCancel","onDelete"])):createCommentVNode("",!0),createVNode(p,{modelValue:at.errorDialog,"onUpdate:modelValue":h[5]||(h[5]=m=>at.errorDialog=m),width:"60vw"},{default:withCtx(()=>[createVNode(u,{height:"24"},{default:withCtx(()=>[createVNode(a),createElementVNode("span",null," Screen: "+toDisplayString(f.target)+" "+toDisplayString(f.screen)+" Errors ",1),createVNode(a)]),_:1}),createVNode(t,null,{default:withCtx(()=>[createVNode(i,{class:"errors",readonly:"",rows:"13","model-value":E.error},null,8,["model-value"]),createVNode(s,{class:"pb-5"},{default:withCtx(()=>[createVNode(a),createVNode(S,{variant:"outlined",class:"mr-2",onClick:E.clearErrors},{default:withCtx(()=>h[8]||(h[8]=[createTextVNode(" Clear Errors ",-1)])),_:1,__:[8]},8,["onClick"]),createVNode(S,{variant:"flat",class:"mr-2",onClick:h[4]||(h[4]=m=>at.errorDialog=!1)},{default:withCtx(()=>h[9]||(h[9]=[createTextVNode(" Close ",-1)])),_:1,__:[9]})]),_:1})]),_:1})]),_:1},8,["modelValue"])],4)}const Ee=d(_e$1,[["render",xe],["__scopeId","data-v-95e4a143"]]);var sprintf$1={},hasRequiredSprintf;function requireSprintf(){return hasRequiredSprintf||(hasRequiredSprintf=1,function(c){(function(){var h={not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function f(x){return at(S(x),arguments)}function g(x,a){return f.apply(null,[x].concat(a||[]))}function at(x,a){var u=1,n=x.length,o,r="",t,e,i,s,p,m,_,A;for(t=0;t<n;t++)if(typeof x[t]=="string")r+=x[t];else if(typeof x[t]=="object"){if(i=x[t],i.keys)for(o=a[u],e=0;e<i.keys.length;e++){if(o==null)throw new Error(f('[sprintf] Cannot access property "%s" of undefined value "%s"',i.keys[e],i.keys[e-1]));o=o[i.keys[e]]}else i.param_no?o=a[i.param_no]:o=a[u++];if(h.not_type.test(i.type)&&h.not_primitive.test(i.type)&&o instanceof Function&&(o=o()),h.numeric_arg.test(i.type)&&typeof o!="number"&&isNaN(o))throw new TypeError(f("[sprintf] expecting number but found %T",o));switch(h.number.test(i.type)&&(_=o>=0),i.type){case"b":o=parseInt(o,10).toString(2);break;case"c":o=String.fromCharCode(parseInt(o,10));break;case"d":case"i":o=parseInt(o,10);break;case"j":o=JSON.stringify(o,null,i.width?parseInt(i.width):0);break;case"e":o=i.precision?parseFloat(o).toExponential(i.precision):parseFloat(o).toExponential();break;case"f":o=i.precision?parseFloat(o).toFixed(i.precision):parseFloat(o);break;case"g":o=i.precision?String(Number(o.toPrecision(i.precision))):parseFloat(o);break;case"o":o=(parseInt(o,10)>>>0).toString(8);break;case"s":o=String(o),o=i.precision?o.substring(0,i.precision):o;break;case"t":o=String(!!o),o=i.precision?o.substring(0,i.precision):o;break;case"T":o=Object.prototype.toString.call(o).slice(8,-1).toLowerCase(),o=i.precision?o.substring(0,i.precision):o;break;case"u":o=parseInt(o,10)>>>0;break;case"v":o=o.valueOf(),o=i.precision?o.substring(0,i.precision):o;break;case"x":o=(parseInt(o,10)>>>0).toString(16);break;case"X":o=(parseInt(o,10)>>>0).toString(16).toUpperCase();break}h.json.test(i.type)?r+=o:(h.number.test(i.type)&&(!_||i.sign)?(A=_?"+":"-",o=o.toString().replace(h.sign,"")):A="",p=i.pad_char?i.pad_char==="0"?"0":i.pad_char.charAt(1):" ",m=i.width-(A+o).length,s=i.width&&m>0?p.repeat(m):"",r+=i.align?A+o+s:p==="0"?A+s+o:s+A+o)}return r}var E=Object.create(null);function S(x){if(E[x])return E[x];for(var a=x,u,n=[],o=0;a;){if((u=h.text.exec(a))!==null)n.push(u[0]);else if((u=h.modulo.exec(a))!==null)n.push("%");else if((u=h.placeholder.exec(a))!==null){if(u[2]){o|=1;var r=[],t=u[2],e=[];if((e=h.key.exec(t))!==null)for(r.push(e[1]);(t=t.substring(e[0].length))!=="";)if((e=h.key_access.exec(t))!==null)r.push(e[1]);else if((e=h.index_access.exec(t))!==null)r.push(e[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");u[2]=r}else o|=2;if(o===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:u[0],param_no:u[1],keys:u[2],sign:u[3],pad_char:u[4],align:u[5],width:u[6],precision:u[7],type:u[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");a=a.substring(u[0].length)}return E[x]=n}c.sprintf=f,c.vsprintf=g,typeof window<"u"&&(window.sprintf=f,window.vsprintf=g)})()}(sprintf$1)),sprintf$1}requireSprintf();var ace$1={exports:{}},hasRequiredAce;function requireAce(){return hasRequiredAce||(hasRequiredAce=1,function(c,h){(function(){var f="ace",g=function(){return this}();!g&&typeof window<"u"&&(g=window);var at=function(n,o,r){if(typeof n!="string"){at.original?at.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(r=o),at.modules[n]||(at.payloads[n]=r,at.modules[n]=null)};at.modules={},at.payloads={};var E=function(n,o,r){if(typeof o=="string"){var t=a(n,o);if(t!=null)return r&&r(),t}else if(Object.prototype.toString.call(o)==="[object Array]"){for(var e=[],i=0,s=o.length;i<s;++i){var p=a(n,o[i]);if(p==null&&S.original)return;e.push(p)}return r&&r.apply(null,e)||!0}},S=function(n,o){var r=E("",n,o);return r==null&&S.original?S.original.apply(this,arguments):r},x=function(n,o){if(o.indexOf("!")!==-1){var r=o.split("!");return x(n,r[0])+"!"+x(n,r[1])}if(o.charAt(0)=="."){var t=n.split("/").slice(0,-1).join("/");for(o=t+"/"+o;o.indexOf(".")!==-1&&e!=o;){var e=o;o=o.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return o},a=function(n,o){o=x(n,o);var r=at.modules[o];if(!r){if(r=at.payloads[o],typeof r=="function"){var t={},e={id:o,uri:"",exports:t,packaged:!0},i=function(p,m){return E(o,p,m)},s=r(i,t,e);t=s||e.exports,at.modules[o]=t,delete at.payloads[o]}r=at.modules[o]=t||r}return r};function u(n){var o=g;g[n]||(g[n]={}),o=g[n],(!o.define||!o.define.packaged)&&(at.original=o.define,o.define=at,o.define.packaged=!0),(!o.require||!o.require.packaged)&&(S.original=o.require,o.require=S,o.require.packaged=!0)}u(f)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(f,g,at){function E(S,x,a){Object.defineProperty(S,x,{value:a,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||E(String.prototype,"startsWith",function(S,x){return x=x||0,this.lastIndexOf(S,x)===x}),String.prototype.endsWith||E(String.prototype,"endsWith",function(S,x){var a=this;(x===void 0||x>a.length)&&(x=a.length),x-=S.length;var u=a.indexOf(S,x);return u!==-1&&u===x}),String.prototype.repeat||E(String.prototype,"repeat",function(S){for(var x="",a=this;S>0;)S&1&&(x+=a),(S>>=1)&&(a+=a);return x}),String.prototype.includes||E(String.prototype,"includes",function(S,x){return this.indexOf(S,x)!=-1}),Object.assign||(Object.assign=function(S){if(S==null)throw new TypeError("Cannot convert undefined or null to object");for(var x=Object(S),a=1;a<arguments.length;a++){var u=arguments[a];u!=null&&Object.keys(u).forEach(function(n){x[n]=u[n]})}return x}),Object.values||(Object.values=function(S){return Object.keys(S).map(function(x){return S[x]})}),Array.prototype.find||E(Array.prototype,"find",function(S){for(var x=this.length,a=arguments[1],u=0;u<x;u++){var n=this[u];if(S.call(a,n,u,this))return n}}),Array.prototype.findIndex||E(Array.prototype,"findIndex",function(S){for(var x=this.length,a=arguments[1],u=0;u<x;u++){var n=this[u];if(S.call(a,n,u,this))return u}}),Array.prototype.includes||E(Array.prototype,"includes",function(S,x){return this.indexOf(S,x)!=-1}),Array.prototype.fill||E(Array.prototype,"fill",function(S){for(var x=this,a=x.length>>>0,u=arguments[1],n=u>>0,o=n<0?Math.max(a+n,0):Math.min(n,a),r=arguments[2],t=r===void 0?a:r>>0,e=t<0?Math.max(a+t,0):Math.min(t,a);o<e;)x[o]=S,o++;return x}),Array.of||E(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(f,g,at){f("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(f,g,at){g.deepCopy=function E(S){if(typeof S!="object"||!S)return S;var x;if(Array.isArray(S)){x=[];for(var a=0;a<S.length;a++)x[a]=E(S[a]);return x}if(Object.prototype.toString.call(S)!=="[object Object]")return S;x={};for(var a in S)x[a]=E(S[a]);return x}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(f,g,at){g.last=function(x){return x[x.length-1]},g.stringReverse=function(x){return x.split("").reverse().join("")},g.stringRepeat=function(x,a){for(var u="";a>0;)a&1&&(u+=x),(a>>=1)&&(x+=x);return u};var E=/^\s\s*/,S=/\s\s*$/;g.stringTrimLeft=function(x){return x.replace(E,"")},g.stringTrimRight=function(x){return x.replace(S,"")},g.copyObject=function(x){var a={};for(var u in x)a[u]=x[u];return a},g.copyArray=function(x){for(var a=[],u=0,n=x.length;u<n;u++)x[u]&&typeof x[u]=="object"?a[u]=this.copyObject(x[u]):a[u]=x[u];return a},g.deepCopy=f("./deep_copy").deepCopy,g.arrayToMap=function(x){for(var a={},u=0;u<x.length;u++)a[x[u]]=1;return a},g.createMap=function(x){var a=Object.create(null);for(var u in x)a[u]=x[u];return a},g.arrayRemove=function(x,a){for(var u=0;u<=x.length;u++)a===x[u]&&x.splice(u,1)},g.escapeRegExp=function(x){return x.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},g.escapeHTML=function(x){return(""+x).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},g.getMatchOffsets=function(x,a){var u=[];return x.replace(a,function(n){u.push({offset:arguments[arguments.length-2],length:n.length})}),u},g.deferredCall=function(x){var a=null,u=function(){a=null,x()},n=function(o){return n.cancel(),a=setTimeout(u,o||0),n};return n.schedule=n,n.call=function(){return this.cancel(),x(),n},n.cancel=function(){return clearTimeout(a),a=null,n},n.isPending=function(){return a},n},g.delayedCall=function(x,a){var u=null,n=function(){u=null,x()},o=function(r){u==null&&(u=setTimeout(n,r||a))};return o.delay=function(r){u&&clearTimeout(u),u=setTimeout(n,r||a)},o.schedule=o,o.call=function(){this.cancel(),x()},o.cancel=function(){u&&clearTimeout(u),u=null},o.isPending=function(){return u},o},g.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},g.skipEmptyMatch=function(x,a,u){return u&&x.codePointAt(a)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(f,g,at){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 E=typeof navigator=="object"?navigator:{},S=(/mac|win|linux/i.exec(E.platform)||["other"])[0].toLowerCase(),x=E.userAgent||"",a=E.appName||"";g.isWin=S=="win",g.isMac=S=="mac",g.isLinux=S=="linux",g.isIE=a=="Microsoft Internet Explorer"||a.indexOf("MSAppHost")>=0?parseFloat((x.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((x.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),g.isOldIE=g.isIE&&g.isIE<9,g.isGecko=g.isMozilla=x.match(/ Gecko\/\d+/),g.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",g.isWebKit=parseFloat(x.split("WebKit/")[1])||void 0,g.isChrome=parseFloat(x.split(" Chrome/")[1])||void 0,g.isSafari=parseFloat(x.split(" Safari/")[1])&&!g.isChrome||void 0,g.isEdge=parseFloat(x.split(" Edge/")[1])||void 0,g.isAIR=x.indexOf("AdobeAIR")>=0,g.isAndroid=x.indexOf("Android")>=0,g.isChromeOS=x.indexOf(" CrOS ")>=0,g.isIOS=/iPad|iPhone|iPod/.test(x)&&!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,at){var E=f("./useragent"),S="http://www.w3.org/1999/xhtml";g.buildDom=function r(t,e,i){if(typeof t=="string"&&t){var s=document.createTextNode(t);return e&&e.appendChild(s),s}if(!Array.isArray(t))return t&&t.appendChild&&e&&e.appendChild(t),t;if(typeof t[0]!="string"||!t[0]){for(var p=[],m=0;m<t.length;m++){var _=r(t[m],e,i);_&&p.push(_)}return p}var A=document.createElement(t[0]),C=t[1],b=1;C&&typeof C=="object"&&!Array.isArray(C)&&(b=2);for(var m=b;m<t.length;m++)r(t[m],A,i);return b==2&&Object.keys(C).forEach(function(Me){var Re=C[Me];Me==="class"?A.className=Array.isArray(Re)?Re.join(" "):Re:typeof Re=="function"||Me=="value"||Me[0]=="$"?A[Me]=Re:Me==="ref"?i&&(i[Re]=A):Me==="style"?typeof Re=="string"&&(A.style.cssText=Re):Re!=null&&A.setAttribute(Me,Re)}),e&&e.appendChild(A),A},g.getDocumentHead=function(r){return r||(r=document),r.head||r.getElementsByTagName("head")[0]||r.documentElement},g.createElement=function(r,t){return document.createElementNS?document.createElementNS(t||S,r):document.createElement(r)},g.removeChildren=function(r){r.innerHTML=""},g.createTextNode=function(r,t){var e=t?t.ownerDocument:document;return e.createTextNode(r)},g.createFragment=function(r){var t=r?r.ownerDocument:document;return t.createDocumentFragment()},g.hasCssClass=function(r,t){var e=(r.className+"").split(/\s+/g);return e.indexOf(t)!==-1},g.addCssClass=function(r,t){g.hasCssClass(r,t)||(r.className+=" "+t)},g.removeCssClass=function(r,t){for(var e=r.className.split(/\s+/g);;){var i=e.indexOf(t);if(i==-1)break;e.splice(i,1)}r.className=e.join(" ")},g.toggleCssClass=function(r,t){for(var e=r.className.split(/\s+/g),i=!0;;){var s=e.indexOf(t);if(s==-1)break;i=!1,e.splice(s,1)}return i&&e.push(t),r.className=e.join(" "),i},g.setCssClass=function(r,t,e){e?g.addCssClass(r,t):g.removeCssClass(r,t)},g.hasCssString=function(r,t){var e=0,i;if(t=t||document,i=t.querySelectorAll("style")){for(;e<i.length;)if(i[e++].id===r)return!0}},g.removeElementById=function(r,t){t=t||document,t.getElementById(r)&&t.getElementById(r).remove()};var x,a=[];g.useStrictCSP=function(r){x=r,r==!1?u():a||(a=[])};function u(){var r=a;a=null,r&&r.forEach(function(t){n(t[0],t[1])})}function n(r,t,e){if(!(typeof document>"u")){if(a){if(e)u();else if(e===!1)return a.push([r,t])}if(!x){var i=e;!e||!e.getRootNode?i=document:(i=e.getRootNode(),(!i||i==e)&&(i=document));var s=i.ownerDocument||i;if(t&&g.hasCssString(t,i))return null;t&&(r+=`
|
5
|
+
/*# sourceURL=ace/css/`+t+" */");var p=g.createElement("style");p.appendChild(s.createTextNode(r)),t&&(p.id=t),i==s&&(i=g.getDocumentHead(s)),i.insertBefore(p,i.firstChild)}}}if(g.importCssString=n,g.importCssStylsheet=function(r,t){g.buildDom(["link",{rel:"stylesheet",href:r}],g.getDocumentHead(t))},g.scrollbarWidth=function(r){var t=g.createElement("ace_inner");t.style.width="100%",t.style.minWidth="0px",t.style.height="200px",t.style.display="block";var e=g.createElement("ace_outer"),i=e.style;i.position="absolute",i.left="-10000px",i.overflow="hidden",i.width="200px",i.minWidth="0px",i.height="150px",i.display="block",e.appendChild(t);var s=r&&r.documentElement||document&&document.documentElement;if(!s)return 0;s.appendChild(e);var p=t.offsetWidth;i.overflow="scroll";var m=t.offsetWidth;return p===m&&(m=e.clientWidth),s.removeChild(e),p-m},g.computedStyle=function(r,t){return window.getComputedStyle(r,"")||{}},g.setStyle=function(r,t,e){r[t]!==e&&(r[t]=e)},g.HAS_CSS_ANIMATION=!1,g.HAS_CSS_TRANSFORMS=!1,g.HI_DPI=E.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,E.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),!E.isEdge&&typeof o.style.animationName<"u"&&(g.HAS_CSS_ANIMATION=!0),o=null}g.HAS_CSS_TRANSFORMS?g.translate=function(r,t,e){r.style.transform="translate("+Math.round(t)+"px, "+Math.round(e)+"px)"}:g.translate=function(r,t,e){r.style.top=Math.round(e)+"px",r.style.left=Math.round(t)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(f,g,at){/*
|
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 E=f("./dom");g.get=function(S,x){var a=new XMLHttpRequest;a.open("GET",S,!0),a.onreadystatechange=function(){a.readyState===4&&x(a.responseText)},a.send(null)},g.loadScript=function(S,x){var a=E.getDocumentHead(),u=document.createElement("script");u.src=S,a.appendChild(u),u.onload=u.onreadystatechange=function(n,o){(o||!u.readyState||u.readyState=="loaded"||u.readyState=="complete")&&(u=u.onload=u.onreadystatechange=null,o||x())}},g.qualifyURL=function(S){var x=document.createElement("a");return x.href=S,x.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(f,g,at){g.inherits=function(E,S){E.super_=S,E.prototype=Object.create(S.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}})},g.mixin=function(E,S){for(var x in S)E[x]=S[x];return E},g.implement=function(E,S){g.mixin(E,S)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(f,g,at){var E={},S=function(){this.propagationStopped=!0},x=function(){this.defaultPrevented=!0};E._emit=E._dispatchEvent=function(a,u){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[a]||[],o=this._defaultHandlers[a];if(!(!n.length&&!o)){(typeof u!="object"||!u)&&(u={}),u.type||(u.type=a),u.stopPropagation||(u.stopPropagation=S),u.preventDefault||(u.preventDefault=x),n=n.slice();for(var r=0;r<n.length&&(n[r](u,this),!u.propagationStopped);r++);if(o&&!u.defaultPrevented)return o(u,this)}},E._signal=function(a,u){var n=(this._eventRegistry||{})[a];if(n){n=n.slice();for(var o=0;o<n.length;o++)n[o](u,this)}},E.once=function(a,u){var n=this;if(this.on(a,function o(){n.off(a,o),u.apply(null,arguments)}),!u)return new Promise(function(o){u=o})},E.setDefaultHandler=function(a,u){var n=this._defaultHandlers;if(n||(n=this._defaultHandlers={_disabled_:{}}),n[a]){var o=n[a],r=n._disabled_[a];r||(n._disabled_[a]=r=[]),r.push(o);var t=r.indexOf(u);t!=-1&&r.splice(t,1)}n[a]=u},E.removeDefaultHandler=function(a,u){var n=this._defaultHandlers;if(n){var o=n._disabled_[a];if(n[a]==u)o&&this.setDefaultHandler(a,o.pop());else if(o){var r=o.indexOf(u);r!=-1&&o.splice(r,1)}}},E.on=E.addEventListener=function(a,u,n){this._eventRegistry=this._eventRegistry||{};var o=this._eventRegistry[a];return o||(o=this._eventRegistry[a]=[]),o.indexOf(u)==-1&&o[n?"unshift":"push"](u),u},E.off=E.removeListener=E.removeEventListener=function(a,u){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[a];if(n){var o=n.indexOf(u);o!==-1&&n.splice(o,1)}},E.removeAllListeners=function(a){a||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[a]=void 0),this._defaultHandlers&&(this._defaultHandlers[a]=void 0)},g.EventEmitter=E}),ace.define("ace/lib/report_error",["require","exports","module"],function(f,g,at){g.reportError=function(S,x){var a=new Error(S);a.data=x,typeof console=="object"&&console.error&&console.error(a),setTimeout(function(){throw a})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(f,g,at){var E={"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=E}),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,at){"no use strict";var E=f("./oop"),S=f("./event_emitter").EventEmitter,x=f("./report_error").reportError,a=f("./default_english_messages").defaultEnglishMessages,u={setOptions:function(e){Object.keys(e).forEach(function(i){this.setOption(i,e[i])},this)},getOptions:function(e){var i={};if(e)Array.isArray(e)||(e=Object.keys(e));else{var s=this.$options;e=Object.keys(s).filter(function(p){return!s[p].hidden})}return e.forEach(function(p){i[p]=this.getOption(p)},this),i},setOption:function(e,i){if(this["$"+e]!==i){var s=this.$options[e];if(!s)return n('misspelled option "'+e+'"');if(s.forwardTo)return this[s.forwardTo]&&this[s.forwardTo].setOption(e,i);s.handlesSet||(this["$"+e]=i),s&&s.set&&s.set.call(this,i)}},getOption:function(e){var i=this.$options[e];return i?i.forwardTo?this[i.forwardTo]&&this[i.forwardTo].getOption(e):i&&i.get?i.get.call(this):this["$"+e]:n('misspelled option "'+e+'"')}};function n(e){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var o,r,t=function(){function e(){this.$defaultOptions={},o=a,r="dollarSigns"}return e.prototype.defineOptions=function(i,s,p){return i.$options||(this.$defaultOptions[s]=i.$options={}),Object.keys(p).forEach(function(m){var _=p[m];typeof _=="string"&&(_={forwardTo:_}),_.name||(_.name=m),i.$options[_.name]=_,"initialValue"in _&&(i["$"+_.name]=_.initialValue)}),E.implement(i,u),this},e.prototype.resetOptions=function(i){Object.keys(i.$options).forEach(function(s){var p=i.$options[s];"value"in p&&i.setOption(s,p.value)})},e.prototype.setDefaultValue=function(i,s,p){if(!i){for(i in this.$defaultOptions)if(this.$defaultOptions[i][s])break;if(!this.$defaultOptions[i][s])return!1}var m=this.$defaultOptions[i]||(this.$defaultOptions[i]={});m[s]&&(m.forwardTo?this.setDefaultValue(m.forwardTo,s,p):m[s].value=p)},e.prototype.setDefaultValues=function(i,s){Object.keys(s).forEach(function(p){this.setDefaultValue(i,p,s[p])},this)},e.prototype.setMessages=function(i,s){o=i,s&&s.placeholders&&(r=s.placeholders)},e.prototype.nls=function(i,s,p){o[i]||(n("No message found for the key '"+i+"' in messages with id "+o.$id+", trying to find a translation for the default string '"+s+"'."),o[s]||n("No message found for the default string '"+s+"' in the provided messages. Falling back to the default English message."));var m=o[i]||o[s]||s;return p&&(r==="dollarSigns"&&(m=m.replace(/\$(\$|[\d]+)/g,function(_,A){return A=="$"?"$":p[A]})),r==="curlyBrackets"&&(m=m.replace(/\{([^\}]+)\}/g,function(_,A){return p[A]}))),m},e}();t.prototype.warn=n,t.prototype.reportError=x,E.implement(t.prototype,S),g.AppConfig=t}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(f,g,at){at.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,at){g.isDark=!1,g.cssClass="ace-tm",g.cssText=f("./textmate-css"),g.$id="ace/theme/textmate";var E=f("../lib/dom");E.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,at){"no use strict";var E=f("./lib/lang"),S=f("./lib/net"),x=f("./lib/dom"),a=f("./lib/app_config").AppConfig;at.exports=g=new a;var u={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};g.get=function(t){if(!u.hasOwnProperty(t))throw new Error("Unknown config key: "+t);return u[t]},g.set=function(t,e){if(u.hasOwnProperty(t))u[t]=e;else if(this.setDefaultValue("",t,e)==!1)throw new Error("Unknown config key: "+t);t=="useStrictCSP"&&x.useStrictCSP(e)},g.all=function(){return E.copyObject(u)},g.$modes={},g.moduleUrl=function(t,e){if(u.$moduleUrls[t])return u.$moduleUrls[t];var i=t.split("/");e=e||i[i.length-2]||"";var s=e=="snippets"?"/":"-",p=i[i.length-1];if(e=="worker"&&s=="-"){var m=new RegExp("^"+e+"[\\-_]|[\\-_]"+e+"$","g");p=p.replace(m,"")}(!p||p==e)&&i.length>1&&(p=i[i.length-2]);var _=u[e+"Path"];return _==null?_=u.basePath:s=="/"&&(e=s=""),_&&_.slice(-1)!="/"&&(_+="/"),_+e+s+p+this.get("suffix")},g.setModuleUrl=function(t,e){return u.$moduleUrls[t]=e};var n=function(t,e){if(t==="ace/theme/textmate"||t==="./theme/textmate")return e(null,f("./theme/textmate"));if(o)return o(t,e);console.error("loader is not configured")},o;g.setLoader=function(t){o=t},g.dynamicModules=Object.create(null),g.$loading={},g.$loaded={},g.loadModule=function(t,e){var i;if(Array.isArray(t))var s=t[0],p=t[1];else if(typeof t=="string")var p=t;var m=function(_){if(_&&!g.$loading[p])return e&&e(_);if(g.$loading[p]||(g.$loading[p]=[]),g.$loading[p].push(e),!(g.$loading[p].length>1)){var A=function(){n(p,function(C,b){b&&(g.$loaded[p]=b),g._emit("load.module",{name:p,module:b});var Me=g.$loading[p];g.$loading[p]=null,Me.forEach(function(Re){Re&&Re(b)})})};if(!g.get("packaged"))return A();S.loadScript(g.moduleUrl(p,s),A),r()}};if(g.dynamicModules[p])g.dynamicModules[p]().then(function(_){_.default?m(_.default):m(_)});else{try{i=this.$require(p)}catch{}m(i||g.$loaded[p])}},g.$require=function(t){if(typeof at.require=="function"){var e="require";return at[e](t)}},g.setModuleLoader=function(t,e){g.dynamicModules[t]=e};var r=function(){!u.basePath&&!u.workerPath&&!u.modePath&&!u.themePath&&!Object.keys(u.$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.2"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(f,g,at){f("./lib/fixoldbrowsers");var E=f("./config");E.setLoader(function(u,n){f([u],function(o){n(null,o)})});var S=function(){return this||typeof window<"u"&&window}();at.exports=function(u){E.init=x,E.$require=f,u.require=f},x(!0);function x(u){if(!(!S||!S.document)){E.set("packaged",u||f.packaged||at.packaged||S.define&&(void 0).packaged);var n={},o="",r=document.currentScript||document._currentScript,t=r&&r.ownerDocument||document;r&&r.src&&(o=r.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var e=t.getElementsByTagName("script"),i=0;i<e.length;i++){var s=e[i],p=s.src||s.getAttribute("src");if(p){for(var m=s.attributes,_=0,A=m.length;_<A;_++){var C=m[_];C.name.indexOf("data-ace-")===0&&(n[a(C.name.replace(/^data-ace-/,""))]=C.value)}var b=p.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);b&&(o=b[1])}}o&&(n.base=n.base||o,n.packaged=!0),n.basePath=n.base,n.workerPath=n.workerPath||n.base,n.modePath=n.modePath||n.base,n.themePath=n.themePath||n.base,delete n.base;for(var Me in n)typeof n[Me]<"u"&&E.set(Me,n[Me])}}function a(u){return u.replace(/-(.)/g,function(n,o){return o.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(f,g,at){var E=function(){function S(x,a,u,n){this.start={row:x,column:a},this.end={row:u,column:n}}return S.prototype.isEqual=function(x){return this.start.row===x.start.row&&this.end.row===x.end.row&&this.start.column===x.start.column&&this.end.column===x.end.column},S.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},S.prototype.contains=function(x,a){return this.compare(x,a)==0},S.prototype.compareRange=function(x){var a,u=x.end,n=x.start;return a=this.compare(u.row,u.column),a==1?(a=this.compare(n.row,n.column),a==1?2:a==0?1:0):a==-1?-2:(a=this.compare(n.row,n.column),a==-1?-1:a==1?42:0)},S.prototype.comparePoint=function(x){return this.compare(x.row,x.column)},S.prototype.containsRange=function(x){return this.comparePoint(x.start)==0&&this.comparePoint(x.end)==0},S.prototype.intersects=function(x){var a=this.compareRange(x);return a==-1||a==0||a==1},S.prototype.isEnd=function(x,a){return this.end.row==x&&this.end.column==a},S.prototype.isStart=function(x,a){return this.start.row==x&&this.start.column==a},S.prototype.setStart=function(x,a){typeof x=="object"?(this.start.column=x.column,this.start.row=x.row):(this.start.row=x,this.start.column=a)},S.prototype.setEnd=function(x,a){typeof x=="object"?(this.end.column=x.column,this.end.row=x.row):(this.end.row=x,this.end.column=a)},S.prototype.inside=function(x,a){return this.compare(x,a)==0?!(this.isEnd(x,a)||this.isStart(x,a)):!1},S.prototype.insideStart=function(x,a){return this.compare(x,a)==0?!this.isEnd(x,a):!1},S.prototype.insideEnd=function(x,a){return this.compare(x,a)==0?!this.isStart(x,a):!1},S.prototype.compare=function(x,a){return!this.isMultiLine()&&x===this.start.row?a<this.start.column?-1:a>this.end.column?1:0:x<this.start.row?-1:x>this.end.row?1:this.start.row===x?a>=this.start.column?0:-1:this.end.row===x?a<=this.end.column?0:1:0},S.prototype.compareStart=function(x,a){return this.start.row==x&&this.start.column==a?-1:this.compare(x,a)},S.prototype.compareEnd=function(x,a){return this.end.row==x&&this.end.column==a?1:this.compare(x,a)},S.prototype.compareInside=function(x,a){return this.end.row==x&&this.end.column==a?1:this.start.row==x&&this.start.column==a?-1:this.compare(x,a)},S.prototype.clipRows=function(x,a){if(this.end.row>a)var u={row:a+1,column:0};else if(this.end.row<x)var u={row:x,column:0};if(this.start.row>a)var n={row:a+1,column:0};else if(this.start.row<x)var n={row:x,column:0};return S.fromPoints(n||this.start,u||this.end)},S.prototype.extend=function(x,a){var u=this.compare(x,a);if(u==0)return this;if(u==-1)var n={row:x,column:a};else var o={row:x,column:a};return S.fromPoints(n||this.start,o||this.end)},S.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},S.prototype.isMultiLine=function(){return this.start.row!==this.end.row},S.prototype.clone=function(){return S.fromPoints(this.start,this.end)},S.prototype.collapseRows=function(){return this.end.column==0?new S(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new S(this.start.row,0,this.end.row,0)},S.prototype.toScreenRange=function(x){var a=x.documentToScreenPosition(this.start),u=x.documentToScreenPosition(this.end);return new S(a.row,a.column,u.row,u.column)},S.prototype.moveBy=function(x,a){this.start.row+=x,this.start.column+=a,this.end.row+=x,this.end.column+=a},S}();E.fromPoints=function(S,x){return new E(S.row,S.column,x.row,x.column)},E.comparePoints=function(S,x){return S.row-x.row||S.column-x.column},g.Range=E}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(f,g,at){for(var E=f("./oop"),S={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:"*"}},x={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},a=0;a<10;a++)x["Digit"+a]=48+a,x["Numpad"+a]=96+a,S.PRINTABLE_KEYS[48+a]=""+a,S.FUNCTION_KEYS[96+a]="Numpad"+a;for(var a=65;a<91;a++){var u=String.fromCharCode(a+32);x["Key"+u.toUpperCase()]=a,S.PRINTABLE_KEYS[a]=u}for(var a=1;a<13;a++)x["F"+a]=111+a,S.FUNCTION_KEYS[111+a]="F"+a;var n={Shift:16,Control:17,Alt:18,Meta:224};for(var o in n)x[o]=x[o+"Left"]=x[o+"Right"]=n[o];g.$codeToKeyCode=x,S.PRINTABLE_KEYS[173]="-";for(var r in S.FUNCTION_KEYS){var t=S.FUNCTION_KEYS[r].toLowerCase();S[t]=parseInt(r,10)}for(var r in S.PRINTABLE_KEYS){var t=S.PRINTABLE_KEYS[r].toLowerCase();S[t]=parseInt(r,10)}E.mixin(S,S.MODIFIER_KEYS),E.mixin(S,S.PRINTABLE_KEYS),E.mixin(S,S.FUNCTION_KEYS),S.enter=S.return,S.escape=S.esc,S.del=S.delete,function(){for(var e=["cmd","ctrl","alt","shift"],i=Math.pow(2,e.length);i--;)S.KEY_MODS[i]=e.filter(function(s){return i&S.KEY_MODS[s]}).join("-")+"-"}(),S.KEY_MODS[0]="",S.KEY_MODS[-1]="input-",E.mixin(g,S),g.default=g,g.keyCodeToString=function(e){var i=S[e];return typeof i!="string"&&(i=String.fromCharCode(e)),i.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(f,g,at){var E=f("./keys"),S=f("./useragent"),x=null,a=0,u;function n(){u=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return u={passive:!1},!0}})}catch{}}function o(){return u==null&&n(),u}function r(_,A,C){this.elem=_,this.type=A,this.callback=C}r.prototype.destroy=function(){e(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var t=g.addListener=function(_,A,C,b){_.addEventListener(A,C,o()),b&&b.$toDestroy.push(new r(_,A,C))},e=g.removeListener=function(_,A,C){_.removeEventListener(A,C,o())};g.stopEvent=function(_){return g.stopPropagation(_),g.preventDefault(_),!1},g.stopPropagation=function(_){_.stopPropagation&&_.stopPropagation()},g.preventDefault=function(_){_.preventDefault&&_.preventDefault()},g.getButton=function(_){return _.type=="dblclick"?0:_.type=="contextmenu"||S.isMac&&_.ctrlKey&&!_.altKey&&!_.shiftKey?2:_.button},g.capture=function(_,A,C){var b=_&&_.ownerDocument||document;function Me(Re){A&&A(Re),C&&C(Re),e(b,"mousemove",A),e(b,"mouseup",Me),e(b,"dragstart",Me)}return t(b,"mousemove",A),t(b,"mouseup",Me),t(b,"dragstart",Me),Me},g.addMouseWheelListener=function(_,A,C){t(_,"wheel",function(b){var Me=.15,Re=b.deltaX||0,q=b.deltaY||0;switch(b.deltaMode){case b.DOM_DELTA_PIXEL:b.wheelX=Re*Me,b.wheelY=q*Me;break;case b.DOM_DELTA_LINE:var W=15;b.wheelX=Re*W,b.wheelY=q*W;break;case b.DOM_DELTA_PAGE:var ut=150;b.wheelX=Re*ut,b.wheelY=q*ut;break}A(b)},C)},g.addMultiMouseDownListener=function(_,A,C,b,Me){var Re=0,q,W,ut,G={2:"dblclick",3:"tripleclick",4:"quadclick"};function D(w){if(g.getButton(w)!==0?Re=0:w.detail>1?(Re++,Re>4&&(Re=1)):Re=1,S.isIE){var v=Math.abs(w.clientX-q)>5||Math.abs(w.clientY-W)>5;(!ut||v)&&(Re=1),ut&&clearTimeout(ut),ut=setTimeout(function(){ut=null},A[Re-1]||600),Re==1&&(q=w.clientX,W=w.clientY)}if(w._clicks=Re,C[b]("mousedown",w),Re>4)Re=0;else if(Re>1)return C[b](G[Re],w)}Array.isArray(_)||(_=[_]),_.forEach(function(w){t(w,"mousedown",D,Me)})};function i(_){return 0|(_.ctrlKey?1:0)|(_.altKey?2:0)|(_.shiftKey?4:0)|(_.metaKey?8:0)}g.getModifierString=function(_){return E.KEY_MODS[i(_)]};function s(_,A,C){var b=i(A);if(!C&&A.code&&(C=E.$codeToKeyCode[A.code]||C),!S.isMac&&x){if(A.getModifierState&&(A.getModifierState("OS")||A.getModifierState("Win"))&&(b|=8),x.altGr)if((3&b)!=3)x.altGr=0;else return;if(C===18||C===17){var Me=A.location;if(C===17&&Me===1)x[C]==1&&(a=A.timeStamp);else if(C===18&&b===3&&Me===2){var Re=A.timeStamp-a;Re<50&&(x.altGr=!0)}}}if(C in E.MODIFIER_KEYS&&(C=-1),!(!b&&C===13&&A.location===3&&(_(A,b,-C),A.defaultPrevented))){if(S.isChromeOS&&b&8){if(_(A,b,C),A.defaultPrevented)return;b&=-9}return!b&&!(C in E.FUNCTION_KEYS)&&!(C in E.PRINTABLE_KEYS)?!1:_(A,b,C)}}g.addCommandKeyListener=function(_,A,C){var b=null;t(_,"keydown",function(Me){x[Me.keyCode]=(x[Me.keyCode]||0)+1;var Re=s(A,Me,Me.keyCode);return b=Me.defaultPrevented,Re},C),t(_,"keypress",function(Me){b&&(Me.ctrlKey||Me.altKey||Me.shiftKey||Me.metaKey)&&(g.stopEvent(Me),b=null)},C),t(_,"keyup",function(Me){x[Me.keyCode]=null},C),x||(p(),t(window,"focus",p))};function p(){x=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!S.isOldIE){var m=1;g.nextTick=function(_,A){A=A||window;var C="zero-timeout-message-"+m++,b=function(Me){Me.data==C&&(g.stopPropagation(Me),e(A,"message",b),_())};t(A,"message",b),A.postMessage(C,"*")}}g.$idleBlocked=!1,g.onIdle=function(_,A){return setTimeout(function C(){g.$idleBlocked?setTimeout(C,100):_()},A)},g.$idleBlockId=null,g.blockIdle=function(_){g.$idleBlockId&&clearTimeout(g.$idleBlockId),g.$idleBlocked=!0,g.$idleBlockId=setTimeout(function(){g.$idleBlocked=!1},_||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(_){setTimeout(_,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(f,g,at){var E;at.exports={lineMode:!1,pasteCancelled:function(){return E&&E>Date.now()-50?!0:E=!1},cancel:function(){E=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,at){var E=f("../lib/event"),S=f("../config").nls,x=f("../lib/useragent"),a=f("../lib/dom"),u=f("../lib/lang"),n=f("../clipboard"),o=x.isChrome<18,r=x.isIE,t=x.isChrome>63,e=400,i=f("../lib/keys"),s=i.KEY_MODS,p=x.isIOS,m=p?/\s/:/\n/,_=x.isMobile,A=function(){function C(b,Me){var Re=this;this.host=Me,this.text=a.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","off"),this.text.setAttribute("autocorrect","off"),this.text.setAttribute("autocapitalize","off"),this.text.setAttribute("spellcheck","false"),this.text.style.opacity="0",b.insertBefore(this.text,b.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",_||(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"}),E.addListener(this.text,"blur",function(q){Re.ignoreFocusEvents||(Me.onBlur(q),Re.$isFocused=!1)},Me),E.addListener(this.text,"focus",function(q){if(!Re.ignoreFocusEvents){if(Re.$isFocused=!0,x.isEdge)try{if(!document.hasFocus())return}catch{}Me.onFocus(q),x.isEdge?setTimeout(Re.resetSelection.bind(Re)):Re.resetSelection()}},Me),this.$focusScroll=!1,Me.on("beforeEndOperation",function(){var q=Me.curOp,W=q&&q.command&&q.command.name;if(W!="insertstring"){var ut=W&&(q.docChanged||q.selectionChanged);Re.inComposition&&ut&&(Re.lastValue=Re.text.value="",Re.onCompositionEnd()),Re.resetSelection()}}),Me.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=p?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&Me.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,E.addCommandKeyListener(this.text,function(q,W,ut){if(!Re.inComposition)return Me.onCommandKey(q,W,ut)},Me),E.addListener(this.text,"select",this.onSelect.bind(this),Me),E.addListener(this.text,"input",this.onInput.bind(this),Me),E.addListener(this.text,"cut",this.onCut.bind(this),Me),E.addListener(this.text,"copy",this.onCopy.bind(this),Me),E.addListener(this.text,"paste",this.onPaste.bind(this),Me),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&E.addListener(b,"keydown",function(q){if(!(x.isMac&&!q.metaKey||!q.ctrlKey))switch(q.keyCode){case 67:Re.onCopy(q);break;case 86:Re.onPaste(q);break;case 88:Re.onCut(q);break}},Me),this.syncComposition=u.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),E.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),Me),E.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),Me),E.addListener(this.text,"keyup",this.onKeyup.bind(this),Me),E.addListener(this.text,"keydown",this.syncComposition.bind(this),Me),E.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),Me),this.closeTimeout,E.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),Me),E.addListener(this.text,"mousedown",function(q){q.preventDefault(),Re.onContextMenuClose()},Me),E.addListener(Me.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),Me),E.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),Me),p&&this.addIosSelectionHandler(b,Me,this.text)}return C.prototype.addIosSelectionHandler=function(b,Me,Re){var q=this,W=null,ut=!1;Re.addEventListener("keydown",function(D){W&&clearTimeout(W),ut=!0},!0),Re.addEventListener("keyup",function(D){W=setTimeout(function(){ut=!1},100)},!0);var G=function(D){if(document.activeElement===Re&&!(ut||q.inComposition||Me.$mouseHandler.isMousePressed)&&!q.copied){var w=Re.selectionStart,v=Re.selectionEnd,L=null,lt=0;if(w==0?L=i.up:w==1?L=i.home:v>q.lastSelectionEnd&&q.lastValue[v]==`
|
170
|
+
`?L=i.end:w<q.lastSelectionStart&&q.lastValue[w-1]==" "?(L=i.left,lt=s.option):w<q.lastSelectionStart||w==q.lastSelectionStart&&q.lastSelectionEnd!=q.lastSelectionStart&&w==v?L=i.left:v>q.lastSelectionEnd&&q.lastValue.slice(0,v).split(`
|
171
|
+
`).length>2?L=i.down:v>q.lastSelectionEnd&&q.lastValue[v-1]==" "?(L=i.right,lt=s.option):(v>q.lastSelectionEnd||v==q.lastSelectionEnd&&q.lastSelectionEnd!=q.lastSelectionStart&&w==v)&&(L=i.right),w!==v&&(lt|=s.shift),L){var ct=Me.onCommandKey({},lt,L);if(!ct&&Me.commands){L=i.keyCodeToString(L);var Dt=Me.commands.findKeyCommand(lt,L);Dt&&Me.execCommand(Dt)}q.lastSelectionStart=w,q.lastSelectionEnd=v,q.resetSelection("")}}};document.addEventListener("selectionchange",G),Me.on("destroy",function(){document.removeEventListener("selectionchange",G)})},C.prototype.onContextMenuClose=function(){var b=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){b.tempStyle&&(b.text.style.cssText=b.tempStyle,b.tempStyle=""),b.host.renderer.$isMousePressed=!1,b.host.renderer.$keepTextAreaAtCursor&&b.host.renderer.$moveTextAreaToCursor()},0)},C.prototype.$onContextMenu=function(b){this.host.textInput.onContextMenu(b),this.onContextMenuClose()},C.prototype.onKeyup=function(b){b.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()},C.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},C.prototype.onCompositionStart=function(b){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){b.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var Me=this.host.getSelectionRange();Me.end.row=Me.start.row,Me.end.column=Me.start.column,this.inComposition.markerRange=Me,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()))}},C.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 b=this.text.value;this.sendText(b),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)}}},C.prototype.onCompositionEnd=function(b){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),b&&this.onInput())},C.prototype.onCut=function(b){this.doCopy(b,!0)},C.prototype.onCopy=function(b){this.doCopy(b,!1)},C.prototype.onPaste=function(b){var Me=this.handleClipboardData(b);n.pasteCancelled()||(typeof Me=="string"?(Me&&this.host.onPaste(Me,b),x.isIE&&setTimeout(this.resetSelection),E.preventDefault(b)):(this.text.value="",this.pasted=!0))},C.prototype.doCopy=function(b,Me){var Re=this,q=this.host.getCopyText();if(!q)return E.preventDefault(b);this.handleClipboardData(b,q)?(p&&(this.resetSelection(q),this.copied=q,setTimeout(function(){Re.copied=!1},10)),Me?this.host.onCut():this.host.onCopy(),E.preventDefault(b)):(this.copied=!0,this.text.value=q,this.text.select(),setTimeout(function(){Re.copied=!1,Re.resetSelection(),Me?Re.host.onCut():Re.host.onCopy()}))},C.prototype.handleClipboardData=function(b,Me,Re){var q=b.clipboardData||window.clipboardData;if(!(!q||o)){var W=r||Re?"Text":"text/plain";try{return Me?q.setData(W,Me)!==!1:q.getData(W)}catch(ut){if(!Re)return this.handleClipboardData(ut,Me,!0)}}},C.prototype.onInput=function(b){if(this.inComposition)return this.onCompositionUpdate();if(b&&b.inputType){if(b.inputType=="historyUndo")return this.host.execCommand("undo");if(b.inputType=="historyRedo")return this.host.execCommand("redo")}var Me=this.text.value,Re=this.sendText(Me,!0);(Me.length>e+100||m.test(Re)||_&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},C.prototype.sendText=function(b,Me){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),b&&this.host.onPaste(b),this.pasted=!1,"";for(var Re=this.text.selectionStart,q=this.text.selectionEnd,W=this.lastSelectionStart,ut=this.lastValue.length-this.lastSelectionEnd,G=b,D=b.length-Re,w=b.length-q,v=0;W>0&&this.lastValue[v]==b[v];)v++,W--;for(G=G.slice(v),v=1;ut>0&&this.lastValue.length-v>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-v]==b[b.length-v];)v++,ut--;D-=v-1,w-=v-1;var L=G.length-v+1;if(L<0&&(W=-L,L=0),G=G.slice(0,L),!Me&&!G&&!D&&!W&&!ut&&!w)return"";this.sendingText=!0;var lt=!1;return x.isAndroid&&G==". "&&(G=" ",lt=!0),G&&!W&&!ut&&!D&&!w||this.commandMode?this.host.onTextInput(G):this.host.onTextInput(G,{extendLeft:W,extendRight:ut,restoreStart:D,restoreEnd:w}),this.sendingText=!1,this.lastValue=b,this.lastSelectionStart=Re,this.lastSelectionEnd=q,this.lastRestoreEnd=w,lt?`
|
172
|
+
`:G},C.prototype.onSelect=function(b){var Me=this;if(!this.inComposition){var Re=function(q){return q.selectionStart===0&&q.selectionEnd>=Me.lastValue.length&&q.value===Me.lastValue&&Me.lastValue&&q.selectionEnd!==Me.lastSelectionEnd};this.copied?this.copied=!1:Re(this.text)?(this.host.selectAll(),this.resetSelection()):_&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},C.prototype.$resetSelectionIOS=function(b){if(!(!this.$isFocused||this.copied&&!b||this.sendingText)){b||(b="");var Me=`
|
173
|
+
ab`+b+`cde fg
|
174
|
+
`;Me!=this.text.value&&(this.text.value=this.lastValue=Me);var Re=4,q=4+(b.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=Re||this.lastSelectionEnd!=q)&&this.text.setSelectionRange(Re,q),this.lastSelectionStart=Re,this.lastSelectionEnd=q}},C.prototype.$resetSelection=function(){var b=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var Me=0,Re=0,q="",W=function(Dt,Wt){for(var Vt=Wt,li=1;li<=Dt-b.rowStart&&li<2*b.numberOfExtraLines+1;li++)Vt+=b.host.session.getLine(Dt-li).length+1;return Vt};if(this.host.session){var ut=this.host.selection,G=ut.getRange(),D=ut.cursor.row;D===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):D===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(D<this.rowStart-1||D>this.rowEnd+1)&&(this.rowStart=D>this.numberOfExtraLines?D-this.numberOfExtraLines:0,this.rowEnd=D>this.numberOfExtraLines?D+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var w=[],v=this.rowStart;v<=this.rowEnd;v++)w.push(this.host.session.getLine(v));if(q=w.join(`
|
175
|
+
`),Me=W(G.start.row,G.start.column),Re=W(G.end.row,G.end.column),G.start.row<this.rowStart){var L=this.host.session.getLine(this.rowStart-1);Me=G.start.row<this.rowStart-1?0:Me,Re+=L.length+1,q=L+`
|
176
|
+
`+q}else if(G.end.row>this.rowEnd){var lt=this.host.session.getLine(this.rowEnd+1);Re=G.end.row>this.rowEnd+1?lt.length:G.end.column,Re+=q.length+1,q=q+`
|
177
|
+
`+lt}else _&&D>0&&(q=`
|
178
|
+
`+q,Re+=1,Me+=1);q.length>e&&(Me<e&&Re<e?q=q.slice(0,e):(q=`
|
179
|
+
`,Me==Re?Me=Re=0:(Me=0,Re=1)));var ct=q+`
|
180
|
+
|
181
|
+
`;ct!=this.lastValue&&(this.text.value=this.lastValue=ct,this.lastSelectionStart=this.lastSelectionEnd=ct.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=Re||this.lastSelectionStart!=Me||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(Me,Re),this.lastSelectionStart=Me,this.lastSelectionEnd=Re}catch{}this.inComposition=!1}},C.prototype.setHost=function(b){this.host=b},C.prototype.setNumberOfExtraLines=function(b){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,b<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=b},C.prototype.setAriaLabel=function(){var b="";if(this.host.$textInputAriaLabel&&(b+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var Me=this.host.session.selection.cursor.row;b+=S("text-input.aria-label","Cursor at row $0",[Me+1])}this.text.setAttribute("aria-label",b)},C.prototype.setAriaOptions=function(b){b.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",b.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",b.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),b.role&&this.text.setAttribute("role",b.role),b.setLabel&&(this.text.setAttribute("aria-roledescription",S("text-input.aria-roledescription","editor")),this.setAriaLabel())},C.prototype.focus=function(){var b=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||t||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var Me=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var Re=this.text.getBoundingClientRect().top!=0}catch{return}var q=[];if(Re)for(var W=this.text.parentElement;W&&W.nodeType==1;)q.push(W),W.setAttribute("ace_nocontext","true"),!W.parentElement&&W.getRootNode?W=W.getRootNode().host:W=W.parentElement;this.text.focus({preventScroll:!0}),Re&&q.forEach(function(ut){ut.removeAttribute("ace_nocontext")}),setTimeout(function(){b.text.style.position="",b.text.style.top=="0px"&&(b.text.style.top=Me)},0)},C.prototype.blur=function(){this.text.blur()},C.prototype.isFocused=function(){return this.$isFocused},C.prototype.setInputHandler=function(b){this.inputHandler=b},C.prototype.getInputHandler=function(){return this.inputHandler},C.prototype.getElement=function(){return this.text},C.prototype.setCommandMode=function(b){this.commandMode=b,this.text.readOnly=!1},C.prototype.setReadOnly=function(b){this.commandMode||(this.text.readOnly=b)},C.prototype.setCopyWithEmptySelection=function(b){},C.prototype.onContextMenu=function(b){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:b}),this.moveToMouse(b,!0)},C.prototype.moveToMouse=function(b,Me){var Re=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(Me?"z-index:100000;":"")+(x.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var q=this.host.container.getBoundingClientRect(),W=a.computedStyle(this.host.container),ut=q.top+(parseInt(W.borderTopWidth)||0),G=q.left+(parseInt(W.borderLeftWidth)||0),D=q.bottom-ut-this.text.clientHeight-2,w=function(v){a.translate(Re.text,v.clientX-G-2,Math.min(v.clientY-ut-2,D))};w(b),b.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),x.isWin&&E.capture(this.host.container,w,this.onContextMenuClose.bind(this)))},C.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},C}();g.TextInput=A,g.$setUserAgentForTests=function(C,b){_=C,p=b}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(f,g,at){var E=f("../lib/useragent"),S=0,x=550,a=function(){function o(r){r.$clickSelection=null;var t=r.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(r)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(r)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(r)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(r)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(r));var e=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];e.forEach(function(i){r[i]=this[i]},this),r.selectByLines=this.extendSelectionBy.bind(r,"getLineRange"),r.selectByWords=this.extendSelectionBy.bind(r,"getWordRange")}return o.prototype.onMouseDown=function(r){var t=r.inSelection(),e=r.getDocumentPosition();this.mousedownEvent=r;var i=this.editor,s=r.getButton();if(s!==0){var p=i.getSelectionRange(),m=p.isEmpty();(m||s==1)&&i.selection.moveToPosition(e),s==2&&(i.textInput.onContextMenu(r.domEvent),E.isMozilla||r.preventDefault());return}if(this.mousedownEvent.time=Date.now(),t&&!i.isFocused()&&(i.focus(),this.$focusTimeout&&!this.$clickSelection&&!i.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,t){r=r||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var e=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?e.selection.selectToPosition(r):t||e.selection.moveToPosition(r),t||this.select(),e.setStyle("ace_selecting"),this.setState("select"))},o.prototype.select=function(){var r,t=this.editor,e=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var i=this.$clickSelection.comparePoint(e);if(i==-1)r=this.$clickSelection.end;else if(i==1)r=this.$clickSelection.start;else{var s=n(this.$clickSelection,e);e=s.cursor,r=s.anchor}t.selection.setSelectionAnchor(r.row,r.column)}t.selection.selectToPosition(e),t.renderer.scrollCursorIntoView()},o.prototype.extendSelectionBy=function(r){var t,e=this.editor,i=e.renderer.screenToTextCoordinates(this.x,this.y),s=e.selection[r](i.row,i.column);if(this.$clickSelection){var p=this.$clickSelection.comparePoint(s.start),m=this.$clickSelection.comparePoint(s.end);if(p==-1&&m<=0)t=this.$clickSelection.end,(s.end.row!=i.row||s.end.column!=i.column)&&(i=s.start);else if(m==1&&p>=0)t=this.$clickSelection.start,(s.start.row!=i.row||s.start.column!=i.column)&&(i=s.end);else if(p==-1&&m==1)i=s.end,t=s.start;else{var _=n(this.$clickSelection,i);i=_.cursor,t=_.anchor}e.selection.setSelectionAnchor(t.row,t.column)}e.selection.selectToPosition(i),e.renderer.scrollCursorIntoView()},o.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},o.prototype.focusWait=function(){var r=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(r>S||t-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},o.prototype.onDoubleClick=function(r){var t=r.getDocumentPosition(),e=this.editor,i=e.session,s=i.getBracketRange(t);s?(s.isEmpty()&&(s.start.column--,s.end.column++),this.setState("select")):(s=e.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=s,this.select()},o.prototype.onTripleClick=function(r){var t=r.getDocumentPosition(),e=this.editor;this.setState("selectByLines");var i=e.getSelectionRange();i.isMultiLine()&&i.contains(t.row,t.column)?(this.$clickSelection=e.selection.getLineRange(i.start.row),this.$clickSelection.end=e.selection.getLineRange(i.end.row).end):this.$clickSelection=e.selection.getLineRange(t.row),this.select()},o.prototype.onQuadClick=function(r){var t=this.editor;t.selectAll(),this.$clickSelection=t.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 t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var e=this.$lastScroll,i=r.domEvent.timeStamp,s=i-e.t,p=s?r.wheelX/s:e.vx,m=s?r.wheelY/s:e.vy;s<x&&(p=(p+e.vx)/2,m=(m+e.vy)/2);var _=Math.abs(p/m),A=!1;if(_>=1&&t.renderer.isScrollableBy(r.wheelX*r.speed,0)&&(A=!0),_<=1&&t.renderer.isScrollableBy(0,r.wheelY*r.speed)&&(A=!0),A)e.allowed=i;else if(i-e.allowed<x){var C=Math.abs(p)<=1.5*Math.abs(e.vx)&&Math.abs(m)<=1.5*Math.abs(e.vy);C?(A=!0,e.allowed=i):e.allowed=0}if(e.t=i,e.vx=p,e.vy=m,A)return t.renderer.scrollBy(r.wheelX*r.speed,r.wheelY*r.speed),r.stop()}},o}();a.prototype.selectEnd=a.prototype.selectByLinesEnd,a.prototype.selectAllEnd=a.prototype.selectByLinesEnd,a.prototype.selectByWordsEnd=a.prototype.selectByLinesEnd,g.DefaultHandlers=a;function u(o,r,t,e){return Math.sqrt(Math.pow(t-o,2)+Math.pow(e-r,2))}function n(o,r){if(o.start.row==o.end.row)var t=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 t=r.column-4;else var t=2*r.row-o.start.row-o.end.row;return t<0?{cursor:o.start,anchor:o.end}:{cursor:o.end,anchor:o.start}}}),ace.define("ace/lib/scroll",["require","exports","module"],function(f,g,at){g.preventParentScroll=function(S){S.stopPropagation();var x=S.currentTarget,a=x.scrollHeight>x.clientHeight;a||S.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(f,g,at){var E=this&&this.__extends||function(){var i=function(s,p){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,_){m.__proto__=_}||function(m,_){for(var A in _)Object.prototype.hasOwnProperty.call(_,A)&&(m[A]=_[A])},i(s,p)};return function(s,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");i(s,p);function m(){this.constructor=s}s.prototype=p===null?Object.create(p):(m.prototype=p.prototype,new m)}}(),S=this&&this.__values||function(i){var s=typeof Symbol=="function"&&Symbol.iterator,p=s&&i[s],m=0;if(p)return p.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&m>=i.length&&(i=void 0),{value:i&&i[m++],done:!i}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},x=f("./lib/dom");f("./lib/event");var a=f("./range").Range,u=f("./lib/scroll").preventParentScroll,n="ace_tooltip",o=function(){function i(s){this.isOpen=!1,this.$element=null,this.$parentNode=s}return i.prototype.$init=function(){return this.$element=x.createElement("div"),this.$element.className=n,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},i.prototype.getElement=function(){return this.$element||this.$init()},i.prototype.setText=function(s){this.getElement().textContent=s},i.prototype.setHtml=function(s){this.getElement().innerHTML=s},i.prototype.setPosition=function(s,p){this.getElement().style.left=s+"px",this.getElement().style.top=p+"px"},i.prototype.setClassName=function(s){x.addCssClass(this.getElement(),s)},i.prototype.setTheme=function(s){this.$element.className=n+" "+(s.isDark?"ace_dark ":"")+(s.cssClass||"")},i.prototype.show=function(s,p,m){s!=null&&this.setText(s),p!=null&&m!=null&&this.setPosition(p,m),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},i.prototype.hide=function(s){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=n,this.isOpen=!1)},i.prototype.getHeight=function(){return this.getElement().offsetHeight},i.prototype.getWidth=function(){return this.getElement().offsetWidth},i.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},i}(),r=function(){function i(){this.popups=[]}return i.prototype.addPopup=function(s){this.popups.push(s),this.updatePopups()},i.prototype.removePopup=function(s){var p=this.popups.indexOf(s);p!==-1&&(this.popups.splice(p,1),this.updatePopups())},i.prototype.updatePopups=function(){var s,p,m,_;this.popups.sort(function(G,D){return D.priority-G.priority});var A=[];try{for(var C=S(this.popups),b=C.next();!b.done;b=C.next()){var Me=b.value,Re=!0;try{for(var q=(m=void 0,S(A)),W=q.next();!W.done;W=q.next()){var ut=W.value;if(this.doPopupsOverlap(ut,Me)){Re=!1;break}}}catch(G){m={error:G}}finally{try{W&&!W.done&&(_=q.return)&&_.call(q)}finally{if(m)throw m.error}}Re?A.push(Me):Me.hide()}}catch(G){s={error:G}}finally{try{b&&!b.done&&(p=C.return)&&p.call(C)}finally{if(s)throw s.error}}},i.prototype.doPopupsOverlap=function(s,p){var m=s.getElement().getBoundingClientRect(),_=p.getElement().getBoundingClientRect();return m.left<_.right&&m.right>_.left&&m.top<_.bottom&&m.bottom>_.top},i}(),t=new r;g.popupManager=t,g.Tooltip=o;var e=function(i){E(s,i);function s(p){p===void 0&&(p=document.body);var m=i.call(this,p)||this;m.timeout=void 0,m.lastT=0,m.idleTime=350,m.lastEvent=void 0,m.onMouseOut=m.onMouseOut.bind(m),m.onMouseMove=m.onMouseMove.bind(m),m.waitForHover=m.waitForHover.bind(m),m.hide=m.hide.bind(m);var _=m.getElement();return _.style.whiteSpace="pre-wrap",_.style.pointerEvents="auto",_.addEventListener("mouseout",m.onMouseOut),_.tabIndex=-1,_.addEventListener("blur",(function(){_.contains(document.activeElement)||this.hide()}).bind(m)),_.addEventListener("wheel",u),m}return s.prototype.addToEditor=function(p){p.on("mousemove",this.onMouseMove),p.on("mousedown",this.hide),p.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},s.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)},s.prototype.onMouseMove=function(p,m){this.lastEvent=p,this.lastT=Date.now();var _=m.$mouseHandler.isMousePressed;if(this.isOpen){var A=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(A.row,A.column)||_||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||_||(this.lastEvent=p,this.timeout=setTimeout(this.waitForHover,this.idleTime))},s.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)},s.prototype.isOutsideOfText=function(p){var m=p.editor,_=p.getDocumentPosition(),A=m.session.getLine(_.row);if(_.column==A.length){var C=m.renderer.pixelToScreenCoordinates(p.clientX,p.clientY),b=m.session.documentToScreenPosition(_.row,_.column);if(b.column!=C.column||b.row!=C.row)return!0}return!1},s.prototype.setDataProvider=function(p){this.$gatherData=p},s.prototype.showForRange=function(p,m,_,A){var C=10;if(!(A&&A!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var b=p.renderer;this.isOpen||(t.addPopup(this),this.$registerCloseEvents(),this.setTheme(b.theme)),this.isOpen=!0,this.addMarker(m,p.session),this.range=a.fromPoints(m.start,m.end);var Me=b.textToScreenCoordinates(m.start.row,m.start.column),Re=b.scroller.getBoundingClientRect();Me.pageX<Re.left&&(Me.pageX=Re.left);var q=this.getElement();q.innerHTML="",q.appendChild(_),q.style.maxHeight="",q.style.display="block";var W=q.clientHeight,ut=q.clientWidth,G=window.innerHeight-Me.pageY-b.lineHeight,D=!0;Me.pageY-W<0&&Me.pageY<G&&(D=!1),q.style.maxHeight=(D?Me.pageY:G)-C+"px",q.style.top=D?"":Me.pageY+b.lineHeight+"px",q.style.bottom=D?window.innerHeight-Me.pageY+"px":"",q.style.left=Math.min(Me.pageX,window.innerWidth-ut-C)+"px"}},s.prototype.addMarker=function(p,m){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=m,this.marker=m&&m.addMarker(p,"ace_highlight-marker","text")},s.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,t.removePopup(this)))},s.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},s.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},s.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())},s}(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,at){var E=this&&this.__extends||function(){var i=function(s,p){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,_){m.__proto__=_}||function(m,_){for(var A in _)Object.prototype.hasOwnProperty.call(_,A)&&(m[A]=_[A])},i(s,p)};return function(s,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");i(s,p);function m(){this.constructor=s}s.prototype=p===null?Object.create(p):(m.prototype=p.prototype,new m)}}(),S=this&&this.__values||function(i){var s=typeof Symbol=="function"&&Symbol.iterator,p=s&&i[s],m=0;if(p)return p.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&m>=i.length&&(i=void 0),{value:i&&i[m++],done:!i}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},x=f("../lib/dom"),a=f("../lib/event"),u=f("../tooltip").Tooltip,n=f("../config").nls,o=5,r=3;g.GUTTER_TOOLTIP_LEFT_OFFSET=o,g.GUTTER_TOOLTIP_TOP_OFFSET=r;function t(i){var s=i.editor,p=s.renderer.$gutterLayer,m=new e(s,!0);i.editor.setDefaultHandler("guttermousedown",function(Re){if(!(!s.isFocused()||Re.getButton()!=0)){var q=p.getRegion(Re);if(q!="foldWidgets"){var W=Re.getDocumentPosition().row,ut=s.session.selection;if(Re.getShiftKey())ut.selectTo(W,0);else{if(Re.domEvent.detail==2)return s.selectAll(),Re.preventDefault();i.$clickSelection=s.selection.getLineRange(W)}return i.setState("selectByLines"),i.captureMouse(Re),Re.preventDefault()}}});var _,A;function C(){var Re=A.getDocumentPosition().row,q=s.session.getLength();if(Re==q){var W=s.renderer.pixelToScreenCoordinates(0,A.y).row,ut=A.$pos;if(W>s.session.documentToScreenRow(ut.row,ut.column))return b()}if(m.showTooltip(Re),!!m.isOpen)if(s.on("mousewheel",b),s.on("changeSession",b),window.addEventListener("keydown",b,!0),i.$tooltipFollowsMouse)Me(A);else{var G=A.getGutterRow(),D=p.$lines.get(G);if(D){var w=D.element.querySelector(".ace_gutter_annotation"),v=w.getBoundingClientRect(),L=m.getElement().style;L.left=v.right-o+"px",L.top=v.bottom-r+"px"}else Me(A)}}function b(Re){Re&&Re.type==="keydown"&&(Re.ctrlKey||Re.metaKey)||Re&&Re.type==="mouseout"&&(!Re.relatedTarget||m.getElement().contains(Re.relatedTarget))||(_&&(_=clearTimeout(_)),m.isOpen&&(m.hideTooltip(),s.off("mousewheel",b),s.off("changeSession",b),window.removeEventListener("keydown",b,!0)))}function Me(Re){m.setPosition(Re.x,Re.y)}i.editor.setDefaultHandler("guttermousemove",function(Re){var q=Re.domEvent.target||Re.domEvent.srcElement;if(x.hasCssClass(q,"ace_fold-widget")||x.hasCssClass(q,"ace_custom-widget"))return b();m.isOpen&&i.$tooltipFollowsMouse&&Me(Re),A=Re,!_&&(_=setTimeout(function(){_=null,A&&!i.isMousePressed&&C()},50))}),a.addListener(s.renderer.$gutter,"mouseout",function(Re){A=null,m.isOpen&&(_=setTimeout(function(){_=null,b(Re)},50))},s)}g.GutterHandler=t;var e=function(i){E(s,i);function s(p,m){m===void 0&&(m=!1);var _=i.call(this,p.container)||this;_.id="gt"+ ++s.$uid,_.editor=p,_.visibleTooltipRow;var A=_.getElement();return A.setAttribute("role","tooltip"),A.setAttribute("id",_.id),A.style.pointerEvents="auto",m&&(_.onMouseOut=_.onMouseOut.bind(_),A.addEventListener("mouseout",_.onMouseOut)),_}return s.prototype.onMouseOut=function(p){this.isOpen&&(!p.relatedTarget||this.getElement().contains(p.relatedTarget)||p&&p.currentTarget.contains(p.relatedTarget)||this.hideTooltip())},s.prototype.setPosition=function(p,m){var _=window.innerWidth||document.documentElement.clientWidth,A=window.innerHeight||document.documentElement.clientHeight,C=this.getWidth(),b=this.getHeight();p+=15,m+=15,p+C>_&&(p-=p+C-_),m+b>A&&(m-=20+b),u.prototype.setPosition.call(this,p,m)},Object.defineProperty(s,"annotationLabels",{get:function(){return{error:{singular:n("gutter-tooltip.aria-label.error.singular","error"),plural:n("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:n("gutter-tooltip.aria-label.security.singular","security finding"),plural:n("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:n("gutter-tooltip.aria-label.warning.singular","warning"),plural:n("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:n("gutter-tooltip.aria-label.info.singular","information message"),plural:n("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:n("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:n("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),s.prototype.showTooltip=function(p){var m,_=this.editor.renderer.$gutterLayer,A=_.$annotations[p],C;A?C={displayText:Array.from(A.displayText),type:Array.from(A.type)}:C={displayText:[],type:[]};var b=_.session.getFoldLine(p);if(b&&_.$showFoldedAnnotations){for(var Me={error:[],security:[],warning:[],info:[],hint:[]},Re={error:1,security:2,warning:3,info:4,hint:5},q,W=p+1;W<=b.end.row;W++)if(_.$annotations[W])for(var ut=0;ut<_.$annotations[W].text.length;ut++){var G=_.$annotations[W].type[ut];Me[G].push(_.$annotations[W].text[ut]),(!q||Re[G]<Re[q])&&(q=G)}if(["error","security","warning"].includes(q)){var D="".concat(s.annotationsToSummaryString(Me)," in folded code.");C.displayText.push(D),C.type.push(q+"_fold")}}if(C.displayText.length===0)return this.hideTooltip();for(var w={error:[],security:[],warning:[],info:[],hint:[]},v=_.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",W=0;W<C.displayText.length;W++){var L=x.createElement("span"),lt=x.createElement("span");(m=lt.classList).add.apply(m,["ace_".concat(C.type[W]),v]),lt.setAttribute("aria-label","".concat(s.annotationLabels[C.type[W].replace("_fold","")].singular)),lt.setAttribute("role","img"),lt.appendChild(x.createTextNode(" ")),L.appendChild(lt),L.appendChild(x.createTextNode(C.displayText[W])),L.appendChild(x.createElement("br")),w[C.type[W].replace("_fold","")].push(L)}var ct=this.getElement();x.removeChildren(ct),w.error.forEach(function(Wt){return ct.appendChild(Wt)}),w.security.forEach(function(Wt){return ct.appendChild(Wt)}),w.warning.forEach(function(Wt){return ct.appendChild(Wt)}),w.info.forEach(function(Wt){return ct.appendChild(Wt)}),w.hint.forEach(function(Wt){return ct.appendChild(Wt)}),ct.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip"));var Dt=this.$findLinkedAnnotationNode(p);Dt&&Dt.setAttribute("aria-describedby",this.id),this.show(),this.visibleTooltipRow=p,this.editor._signal("showGutterTooltip",this)},s.prototype.$findLinkedAnnotationNode=function(p){var m=this.$findCellByRow(p);if(m){var _=m.element;if(_.childNodes.length>2)return _.childNodes[2]}},s.prototype.$findCellByRow=function(p){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(m){return m.row===p})},s.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)}},s.annotationsToSummaryString=function(p){var m,_,A=[],C=["error","security","warning","info","hint"];try{for(var b=S(C),Me=b.next();!Me.done;Me=b.next()){var Re=Me.value;if(p[Re].length){var q=p[Re].length===1?s.annotationLabels[Re].singular:s.annotationLabels[Re].plural;A.push("".concat(p[Re].length," ").concat(q))}}}catch(W){m={error:W}}finally{try{Me&&!Me.done&&(_=b.return)&&_.call(b)}finally{if(m)throw m.error}}return A.join(", ")},s}(u);e.$uid=0,g.GutterTooltip=e}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(f,g,at){var E=f("../lib/event"),S=f("../lib/useragent"),x=function(){function a(u,n){this.speed,this.wheelX,this.wheelY,this.domEvent=u,this.editor=n,this.x=this.clientX=u.clientX,this.y=this.clientY=u.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return a.prototype.stopPropagation=function(){E.stopPropagation(this.domEvent),this.propagationStopped=!0},a.prototype.preventDefault=function(){E.preventDefault(this.domEvent),this.defaultPrevented=!0},a.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},a.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},a.prototype.getGutterRow=function(){var u=this.getDocumentPosition().row,n=this.editor.session.documentToScreenRow(u,0),o=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return n-o},a.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var u=this.editor,n=u.getSelectionRange();if(n.isEmpty())this.$inSelection=!1;else{var o=this.getDocumentPosition();this.$inSelection=n.contains(o.row,o.column)}return this.$inSelection},a.prototype.getButton=function(){return E.getButton(this.domEvent)},a.prototype.getShiftKey=function(){return this.domEvent.shiftKey},a.prototype.getAccelKey=function(){return S.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},a}();g.MouseEvent=x}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(f,g,at){var E=f("../lib/dom"),S=f("../lib/event"),x=f("../lib/useragent"),a=200,u=200,n=5;function o(t){var e=t.editor,i=E.createElement("div");i.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",i.textContent=" ";var s=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];s.forEach(function(zt){t[zt]=this[zt]},this),e.on("mousedown",this.onMouseDown.bind(t));var p=e.container,m,_,A,C,b,Me,Re=0,q,W,ut,G,D;this.onDragStart=function(zt){if(this.cancelDrag||!p.draggable){var Ht=this;return setTimeout(function(){Ht.startSelect(),Ht.captureMouse(zt)},0),zt.preventDefault()}b=e.getSelectionRange();var Jt=zt.dataTransfer;Jt.effectAllowed=e.getReadOnly()?"copy":"copyMove",e.container.appendChild(i),Jt.setDragImage&&Jt.setDragImage(i,0,0),setTimeout(function(){e.container.removeChild(i)}),Jt.clearData(),Jt.setData("Text",e.session.getTextRange()),W=!0,this.setState("drag")},this.onDragEnd=function(zt){if(p.draggable=!1,W=!1,this.setState(null),!e.getReadOnly()){var Ht=zt.dataTransfer.dropEffect;!q&&Ht=="move"&&e.session.remove(e.getSelectionRange()),e.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(zt){if(!(e.getReadOnly()||!Vt(zt.dataTransfer)))return _=zt.clientX,A=zt.clientY,m||lt(),Re++,zt.dataTransfer.dropEffect=q=li(zt),S.preventDefault(zt)},this.onDragOver=function(zt){if(!(e.getReadOnly()||!Vt(zt.dataTransfer)))return _=zt.clientX,A=zt.clientY,m||(lt(),Re++),Dt!==null&&(Dt=null),zt.dataTransfer.dropEffect=q=li(zt),S.preventDefault(zt)},this.onDragLeave=function(zt){if(Re--,Re<=0&&m)return ct(),q=null,S.preventDefault(zt)},this.onDrop=function(zt){if(Me){var Ht=zt.dataTransfer;if(W)switch(q){case"move":b.contains(Me.row,Me.column)?b={start:Me,end:Me}:b=e.moveText(b,Me);break;case"copy":b=e.moveText(b,Me,!0);break}else{var Jt=Ht.getData("Text");b={start:Me,end:e.session.insert(Me,Jt)},e.focus(),q=null}return ct(),S.preventDefault(zt)}},S.addListener(p,"dragstart",this.onDragStart.bind(t),e),S.addListener(p,"dragend",this.onDragEnd.bind(t),e),S.addListener(p,"dragenter",this.onDragEnter.bind(t),e),S.addListener(p,"dragover",this.onDragOver.bind(t),e),S.addListener(p,"dragleave",this.onDragLeave.bind(t),e),S.addListener(p,"drop",this.onDrop.bind(t),e);function w(zt,Ht){var Jt=Date.now(),ai=!Ht||zt.row!=Ht.row,hi=!Ht||zt.column!=Ht.column;if(!G||ai||hi)e.moveCursorToPosition(zt),G=Jt,D={x:_,y:A};else{var ui=r(D.x,D.y,_,A);ui>n?G=null:Jt-G>=u&&(e.renderer.scrollCursorIntoView(),G=null)}}function v(zt,Ht){var Jt=Date.now(),ai=e.renderer.layerConfig.lineHeight,hi=e.renderer.layerConfig.characterWidth,ui=e.renderer.scroller.getBoundingClientRect(),pi={x:{left:_-ui.left,right:ui.right-_},y:{top:A-ui.top,bottom:ui.bottom-A}},fi=Math.min(pi.x.left,pi.x.right),gi=Math.min(pi.y.top,pi.y.bottom),mi={row:zt.row,column:zt.column};fi/hi<=2&&(mi.column+=pi.x.left<pi.x.right?-3:2),gi/ai<=1&&(mi.row+=pi.y.top<pi.y.bottom?-1:1);var yi=zt.row!=mi.row,wi=zt.column!=mi.column,vi=!Ht||zt.row!=Ht.row;yi||wi&&!vi?ut?Jt-ut>=a&&e.renderer.scrollCursorIntoView(mi):ut=Jt:ut=null}function L(){var zt=Me;Me=e.renderer.screenToTextCoordinates(_,A),w(Me,zt),v(Me,zt)}function lt(){b=e.selection.toOrientedRange(),m=e.session.addMarker(b,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval(C),L(),C=setInterval(L,20),Re=0,S.addListener(document,"mousemove",Wt)}function ct(){clearInterval(C),e.session.removeMarker(m),m=null,e.selection.fromOrientedRange(b),e.isFocused()&&!W&&e.$resetCursorStyle(),b=null,Me=null,Re=0,ut=null,G=null,S.removeListener(document,"mousemove",Wt)}var Dt=null;function Wt(){Dt==null&&(Dt=setTimeout(function(){Dt!=null&&m&&ct()},20))}function Vt(zt){var Ht=zt.types;return!Ht||Array.prototype.some.call(Ht,function(Jt){return Jt=="text/plain"||Jt=="Text"})}function li(zt){var Ht=["copy","copymove","all","uninitialized"],Jt=["move","copymove","linkmove","all","uninitialized"],ai=x.isMac?zt.altKey:zt.ctrlKey,hi="uninitialized";try{hi=zt.dataTransfer.effectAllowed.toLowerCase()}catch{}var ui="none";return ai&&Ht.indexOf(hi)>=0?ui="copy":Jt.indexOf(hi)>=0?ui="move":Ht.indexOf(hi)>=0&&(ui="copy"),ui}}(function(){this.dragWait=function(){var t=Date.now()-this.mousedownEvent.time;t>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var t=this.editor.container;t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(t){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var t=this.editor,e=t.container;e.draggable=!0,t.renderer.$cursorLayer.setBlinking(!1),t.setStyle("ace_dragging");var i=x.isWin?"default":"move";t.renderer.setCursorStyle(i),this.setState("dragReady")},this.onMouseDrag=function(t){var e=this.editor.container;if(x.isIE&&this.state=="dragReady"){var i=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);i>3&&e.dragDrop()}if(this.state==="dragWait"){var i=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);i>0&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(t){if(this.$dragEnabled){this.mousedownEvent=t;var e=this.editor,i=t.inSelection(),s=t.getButton(),p=t.domEvent.detail||1;if(p===1&&s===0&&i){if(t.editor.inMultiSelectMode&&(t.getAccelKey()||t.getShiftKey()))return;this.mousedownEvent.time=Date.now();var m=t.domEvent.target||t.domEvent.srcElement;if("unselectable"in m&&(m.unselectable="on"),e.getDragDelay()){if(x.isWebKit){this.cancelDrag=!0;var _=e.container;_.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(t,this.onMouseDrag.bind(this)),t.defaultPrevented=!0}}}}).call(o.prototype);function r(t,e,i,s){return Math.sqrt(Math.pow(i-t,2)+Math.pow(s-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,at){var E=f("./mouse_event").MouseEvent,S=f("../lib/event"),x=f("../lib/dom");g.addTouchListeners=function(a,u){var n="scroll",o,r,t,e,i,s,p=0,m,_=0,A=0,C=0,b,Me;function Re(){var w=window.navigator&&window.navigator.clipboard,v=!1,L=function(){var Dt=u.getCopyText(),Wt=u.session.getUndoManager().hasUndo();Me.replaceChild(x.buildDom(v?["span",!Dt&<("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],Dt&<("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],Dt&<("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],w&<("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],Wt&<("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],lt("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],lt("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),Me.firstChild)},lt=function(Dt){return u.commands.canExecute(Dt,u)},ct=function(Dt){var Wt=Dt.target.getAttribute("action");if(Wt=="more"||!v)return v=!v,L();Wt=="paste"?w.readText().then(function(Vt){u.execCommand(Wt,Vt)}):Wt&&((Wt=="cut"||Wt=="copy")&&(w?w.writeText(u.getCopyText()):document.execCommand("copy")),u.execCommand(Wt)),Me.firstChild.style.display="none",v=!1,Wt!="openCommandPalette"&&u.focus()};Me=x.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(Dt){n="menu",Dt.stopPropagation(),Dt.preventDefault(),u.textInput.focus()},ontouchend:function(Dt){Dt.stopPropagation(),Dt.preventDefault(),ct(Dt)},onclick:ct},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],u.container)}function q(){if(!u.getOption("enableMobileMenu")){Me&&W();return}Me||Re();var w=u.selection.cursor,v=u.renderer.textToScreenCoordinates(w.row,w.column),L=u.renderer.textToScreenCoordinates(0,0).pageX,lt=u.renderer.scrollLeft,ct=u.container.getBoundingClientRect();Me.style.top=v.pageY-ct.top-3+"px",v.pageX-ct.left<ct.width-70?(Me.style.left="",Me.style.right="10px"):(Me.style.right="",Me.style.left=L+lt-ct.left+"px"),Me.style.display="",Me.firstChild.style.display="none",u.on("input",W)}function W(w){Me&&(Me.style.display="none"),u.off("input",W)}function ut(){i=null,clearTimeout(i);var w=u.selection.getRange(),v=w.contains(m.row,m.column);(w.isEmpty()||!v)&&(u.selection.moveToPosition(m),u.selection.selectWord()),n="wait",q()}function G(){i=null,clearTimeout(i),u.selection.moveToPosition(m);var w=_>=2?u.selection.getLineRange(m.row):u.session.getBracketRange(m);w&&!w.isEmpty()?u.selection.setRange(w):u.selection.selectWord(),n="wait"}S.addListener(a,"contextmenu",function(w){if(b){var v=u.textInput.getElement();v.focus()}},u),S.addListener(a,"touchstart",function(w){var v=w.touches;if(i||v.length>1){clearTimeout(i),i=null,t=-1,n="zoom";return}b=u.$mouseHandler.isMousePressed=!0;var L=u.renderer.layerConfig.lineHeight,lt=u.renderer.layerConfig.lineHeight,ct=w.timeStamp;e=ct;var Dt=v[0],Wt=Dt.clientX,Vt=Dt.clientY;Math.abs(o-Wt)+Math.abs(r-Vt)>L&&(t=-1),o=w.clientX=Wt,r=w.clientY=Vt,A=C=0;var li=new E(w,u);if(m=li.getDocumentPosition(),ct-t<500&&v.length==1&&!p)_++,w.preventDefault(),w.button=0,G();else{_=0;var zt=u.selection.cursor,Ht=u.selection.isEmpty()?zt:u.selection.anchor,Jt=u.renderer.$cursorLayer.getPixelPosition(zt,!0),ai=u.renderer.$cursorLayer.getPixelPosition(Ht,!0),hi=u.renderer.scroller.getBoundingClientRect(),ui=u.renderer.layerConfig.offset,pi=u.renderer.scrollLeft,fi=function(yi,wi){return yi=yi/lt,wi=wi/L-.75,yi*yi+wi*wi};if(w.clientX<hi.left){n="zoom";return}var gi=fi(w.clientX-hi.left-Jt.left+pi,w.clientY-hi.top-Jt.top+ui),mi=fi(w.clientX-hi.left-ai.left+pi,w.clientY-hi.top-ai.top+ui);gi<3.5&&mi<3.5&&(n=gi>mi?"cursor":"anchor"),mi<3.5?n="anchor":gi<3.5?n="cursor":n="scroll",i=setTimeout(ut,450)}t=ct},u),S.addListener(a,"touchend",function(w){b=u.$mouseHandler.isMousePressed=!1,s&&clearInterval(s),n=="zoom"?(n="",p=0):i?(u.selection.moveToPosition(m),p=0,q()):n=="scroll"?(D(),W()):q(),clearTimeout(i),i=null},u),S.addListener(a,"touchmove",function(w){i&&(clearTimeout(i),i=null);var v=w.touches;if(!(v.length>1||n=="zoom")){var L=v[0],lt=o-L.clientX,ct=r-L.clientY;if(n=="wait")if(lt*lt+ct*ct>4)n="cursor";else return w.preventDefault();o=L.clientX,r=L.clientY,w.clientX=L.clientX,w.clientY=L.clientY;var Dt=w.timeStamp,Wt=Dt-e;if(e=Dt,n=="scroll"){var Vt=new E(w,u);Vt.speed=1,Vt.wheelX=lt,Vt.wheelY=ct,10*Math.abs(lt)<Math.abs(ct)&&(lt=0),10*Math.abs(ct)<Math.abs(lt)&&(ct=0),Wt!=0&&(A=lt/Wt,C=ct/Wt),u._emit("mousewheel",Vt),Vt.propagationStopped||(A=C=0)}else{var li=new E(w,u),zt=li.getDocumentPosition();n=="cursor"?u.selection.moveCursorToPosition(zt):n=="anchor"&&u.selection.setSelectionAnchor(zt.row,zt.column),u.renderer.scrollCursorIntoView(zt),w.preventDefault()}}},u);function D(){p+=60,s=setInterval(function(){p--<=0&&(clearInterval(s),s=null),Math.abs(A)<.01&&(A=0),Math.abs(C)<.01&&(C=0),p<20&&(A=.9*A),p<20&&(C=.9*C);var w=u.session.getScrollTop();u.renderer.scrollBy(10*A,10*C),w==u.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,at){var E=f("../lib/event"),S=f("../lib/useragent"),x=f("./default_handlers").DefaultHandlers,a=f("./default_gutter_handler").GutterHandler,u=f("./mouse_event").MouseEvent,n=f("./dragdrop_handler").DragdropHandler,o=f("./touch_handler").addTouchListeners,r=f("../config"),t=function(){function e(i){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var s=this;this.editor=i,new x(this),new a(this),new n(this);var p=function(A){var C=!document.hasFocus||!document.hasFocus()||!i.isFocused()&&document.activeElement==(i.textInput&&i.textInput.getElement());C&&window.focus(),i.focus(),setTimeout(function(){i.isFocused()||i.focus()})},m=i.renderer.getMouseEventTarget();E.addListener(m,"click",this.onMouseEvent.bind(this,"click"),i),E.addListener(m,"mousemove",this.onMouseMove.bind(this,"mousemove"),i),E.addMultiMouseDownListener([m,i.renderer.scrollBarV&&i.renderer.scrollBarV.inner,i.renderer.scrollBarH&&i.renderer.scrollBarH.inner,i.textInput&&i.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",i),E.addMouseWheelListener(i.container,this.onMouseWheel.bind(this,"mousewheel"),i),o(i.container,i);var _=i.renderer.$gutter;E.addListener(_,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),i),E.addListener(_,"click",this.onMouseEvent.bind(this,"gutterclick"),i),E.addListener(_,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),i),E.addListener(_,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),i),E.addListener(m,"mousedown",p,i),E.addListener(_,"mousedown",p,i),S.isIE&&i.renderer.scrollBarV&&(E.addListener(i.renderer.scrollBarV.element,"mousedown",p,i),E.addListener(i.renderer.scrollBarH.element,"mousedown",p,i)),i.on("mousemove",function(A){if(!(s.state||s.$dragDelay||!s.$dragEnabled)){var C=i.renderer.screenToTextCoordinates(A.x,A.y),b=i.session.selection.getRange(),Me=i.renderer;!b.isEmpty()&&b.insideStart(C.row,C.column)?Me.setCursorStyle("default"):Me.setCursorStyle("")}},i)}return e.prototype.onMouseEvent=function(i,s){this.editor.session&&this.editor._emit(i,new u(s,this.editor))},e.prototype.onMouseMove=function(i,s){var p=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!p||!p.length||this.editor._emit(i,new u(s,this.editor))},e.prototype.onMouseWheel=function(i,s){var p=new u(s,this.editor);p.speed=this.$scrollSpeed*2,p.wheelX=s.wheelX,p.wheelY=s.wheelY,this.editor._emit(i,p)},e.prototype.setState=function(i){this.state=i},e.prototype.captureMouse=function(i,s){this.x=i.x,this.y=i.y,this.isMousePressed=!0;var p=this.editor,m=this.editor.renderer;m.$isMousePressed=!0;var _=this,A=!0,C=function(W){if(W){if(S.isWebKit&&!W.which&&_.releaseMouse)return _.releaseMouse();_.x=W.clientX,_.y=W.clientY,s&&s(W),_.mouseEvent=new u(W,_.editor),_.$mouseMoved=!0}},b=function(W){p.off("beforeEndOperation",q),A=!1,p.session&&Me(),_[_.state+"End"]&&_[_.state+"End"](W),_.state="",_.isMousePressed=m.$isMousePressed=!1,m.$keepTextAreaAtCursor&&m.$moveTextAreaToCursor(),_.$onCaptureMouseMove=_.releaseMouse=null,W&&_.onMouseEvent("mouseup",W),p.endOperation()},Me=function(){_[_.state]&&_[_.state](),_.$mouseMoved=!1},Re=function(){A&&(Me(),E.nextFrame(Re))};if(S.isOldIE&&i.domEvent.type=="dblclick")return setTimeout(function(){b(i)});var q=function(W){_.releaseMouse&&p.curOp.command.name&&p.curOp.selectionChanged&&(_[_.state+"End"]&&_[_.state+"End"](),_.state="",_.releaseMouse())};p.on("beforeEndOperation",q),p.startOperation({command:{name:"mouse"}}),_.$onCaptureMouseMove=C,_.releaseMouse=E.capture(this.editor.container,C,b),Re()},e.prototype.cancelContextMenu=function(){var i=(function(s){s&&s.domEvent&&s.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",i),s&&s.domEvent&&E.stopEvent(s.domEvent))}).bind(this);setTimeout(i,10),this.editor.on("nativecontextmenu",i)},e.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},e}();t.prototype.releaseMouse=null,r.defineOptions(t.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:S.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),g.MouseHandler=t}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(f,g,at){var E=f("../lib/dom"),S=function(){function x(a){a.on("click",function(u){var n=u.getDocumentPosition(),o=a.session,r=o.getFoldAt(n.row,n.column,1);r&&(u.getAccelKey()?o.removeFold(r):o.expandFold(r),u.stop());var t=u.domEvent&&u.domEvent.target;t&&E.hasCssClass(t,"ace_inline_button")&&E.hasCssClass(t,"ace_toggle_wrap")&&(o.setOption("wrap",!o.getUseWrapMode()),a.renderer.scrollCursorIntoView())}),a.on("gutterclick",function(u){var n=a.renderer.$gutterLayer.getRegion(u);if(n=="foldWidgets"){var o=u.getDocumentPosition().row,r=a.session;r.foldWidgets&&r.foldWidgets[o]&&a.session.onFoldWidgetClick(o,u),a.isFocused()||a.focus(),u.stop()}}),a.on("gutterdblclick",function(u){var n=a.renderer.$gutterLayer.getRegion(u);if(n=="foldWidgets"){var o=u.getDocumentPosition().row,r=a.session,t=r.getParentFoldRangeData(o,!0),e=t.range||t.firstRange;if(e){o=e.start.row;var i=r.getFoldAt(o,r.getLine(o).length,1);i?r.removeFold(i):(r.addFold("...",e),a.renderer.scrollCursorIntoView({row:e.start.row,column:0}))}u.stop()}})}return x}();g.FoldHandler=S}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(f,g,at){var E=f("../lib/keys"),S=f("../lib/event"),x=function(){function a(u){this.$editor=u,this.$data={editor:u},this.$handlers=[],this.setDefaultHandler(u.commands)}return a.prototype.setDefaultHandler=function(u){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=u,this.addKeyboardHandler(u,0)},a.prototype.setKeyboardHandler=function(u){var n=this.$handlers;if(n[n.length-1]!=u){for(;n[n.length-1]&&n[n.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(n[n.length-1]);this.addKeyboardHandler(u,1)}},a.prototype.addKeyboardHandler=function(u,n){if(u){typeof u=="function"&&!u.handleKeyboard&&(u.handleKeyboard=u);var o=this.$handlers.indexOf(u);o!=-1&&this.$handlers.splice(o,1),n==null?this.$handlers.push(u):this.$handlers.splice(n,0,u),o==-1&&u.attach&&u.attach(this.$editor)}},a.prototype.removeKeyboardHandler=function(u){var n=this.$handlers.indexOf(u);return n==-1?!1:(this.$handlers.splice(n,1),u.detach&&u.detach(this.$editor),!0)},a.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},a.prototype.getStatusText=function(){var u=this.$data,n=u.editor;return this.$handlers.map(function(o){return o.getStatusText&&o.getStatusText(n,u)||""}).filter(Boolean).join(" ")},a.prototype.$callKeyboardHandlers=function(u,n,o,r){for(var t,e=!1,i=this.$editor.commands,s=this.$handlers.length;s--&&(t=this.$handlers[s].handleKeyboard(this.$data,u,n,o,r),!(!(!t||!t.command)&&(t.command=="null"?e=!0:e=i.exec(t.command,this.$editor,t.args,r),e&&r&&u!=-1&&t.passEvent!=!0&&t.command.passEvent!=!0&&S.stopEvent(r),e))););return!e&&u==-1&&(t={command:"insertstring"},e=i.exec("insertstring",this.$editor,n)),e&&this.$editor._signal&&this.$editor._signal("keyboardActivity",t),e},a.prototype.onCommandKey=function(u,n,o){var r=E.keyCodeToString(o);return this.$callKeyboardHandlers(n,r,o,u)},a.prototype.onTextInput=function(u){return this.$callKeyboardHandlers(-1,u)},a}();g.KeyBinding=x}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(f,g,at){var E=0,S=0,x=!1,a=!1,u=!1,n=[[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,t=1,e=0,i=1,s=2,p=3,m=4,_=5,A=6,C=7,b=8,Me=9,Re=10,q=11,W=12,ut=13,G=14,D=15,w=16,v=17,L=18,lt=[L,L,L,L,L,L,L,L,L,A,_,A,b,_,L,L,L,L,L,L,L,L,L,L,L,L,L,L,_,_,_,A,b,m,m,q,q,q,m,m,m,m,m,Re,Me,Re,Me,Me,s,s,s,s,s,s,s,s,s,s,Me,m,m,m,m,m,m,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,m,m,m,m,m,m,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,m,m,m,m,L,L,L,L,L,L,_,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,Me,m,q,q,q,q,m,m,m,m,e,m,m,L,m,m,q,q,s,s,m,e,m,m,m,s,e,m,m,m,m,m],ct=[b,b,b,b,b,b,b,b,b,b,b,L,L,L,e,i,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,b,_,ut,G,D,w,v,Me,q,q,q,q,q,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,Me,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,b];function Dt(zt,Ht,Jt,ai){var hi=E?o:n,ui=null,pi=null,fi=null,gi=0,mi=null,yi=null,wi=-1,vi=null,bi=null,Si=[];if(!ai)for(vi=0,ai=[];vi<Jt;vi++)ai[vi]=li(zt[vi]);for(S=E,x=!1,a=!1,u=!1,bi=0;bi<Jt;bi++){if(ui=gi,Si[bi]=pi=Vt(zt,ai,Si,bi),gi=hi[ui][pi],mi=gi&240,gi&=15,Ht[bi]=fi=hi[gi][5],mi>0)if(mi==16){for(vi=wi;vi<bi;vi++)Ht[vi]=1;wi=-1}else wi=-1;if(yi=hi[gi][6],yi)wi==-1&&(wi=bi);else if(wi>-1){for(vi=wi;vi<bi;vi++)Ht[vi]=fi;wi=-1}ai[bi]==_&&(Ht[bi]=0),S|=fi}if(u){for(vi=0;vi<Jt;vi++)if(ai[vi]==A){Ht[vi]=E;for(var Ci=vi-1;Ci>=0&&ai[Ci]==b;Ci--)Ht[Ci]=E}}}function Wt(zt,Ht,Jt){if(!(S<zt)){if(zt==1&&E==t&&!a){Jt.reverse();return}for(var ai=Jt.length,hi=0,ui,pi,fi,gi;hi<ai;){if(Ht[hi]>=zt){for(ui=hi+1;ui<ai&&Ht[ui]>=zt;)ui++;for(pi=hi,fi=ui-1;pi<fi;pi++,fi--)gi=Jt[pi],Jt[pi]=Jt[fi],Jt[fi]=gi;hi=ui}hi++}}}function Vt(zt,Ht,Jt,ai){var hi=Ht[ai],ui,pi,fi,gi;switch(hi){case e:case i:x=!1;case m:case p:return hi;case s:return x?p:s;case C:return x=!0,i;case b:return m;case Me:return ai<1||ai+1>=Ht.length||(ui=Jt[ai-1])!=s&&ui!=p||(pi=Ht[ai+1])!=s&&pi!=p?m:(x&&(pi=p),pi==ui?pi:m);case Re:return ui=ai>0?Jt[ai-1]:_,ui==s&&ai+1<Ht.length&&Ht[ai+1]==s?s:m;case q:if(ai>0&&Jt[ai-1]==s)return s;if(x)return m;for(gi=ai+1,fi=Ht.length;gi<fi&&Ht[gi]==q;)gi++;return gi<fi&&Ht[gi]==s?s:m;case W:for(fi=Ht.length,gi=ai+1;gi<fi&&Ht[gi]==W;)gi++;if(gi<fi){var mi=zt[ai],yi=mi>=1425&&mi<=2303||mi==64286;if(ui=Ht[gi],yi&&(ui==i||ui==C))return i}return ai<1||(ui=Ht[ai-1])==_?m:Jt[ai-1];case _:return x=!1,a=!0,E;case A:return u=!0,m;case ut:case G:case w:case v:case D:x=!1;case L:return m}}function li(zt){var Ht=zt.charCodeAt(0),Jt=Ht>>8;return Jt==0?Ht>191?e:lt[Ht]:Jt==5?/[\u0591-\u05f4]/.test(zt)?i:e:Jt==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(zt)?W:/[\u0660-\u0669\u066b-\u066c]/.test(zt)?p:Ht==1642?q:/[\u06f0-\u06f9]/.test(zt)?s:C:Jt==32&&Ht<=8287?ct[Ht&255]:Jt==254&&Ht>=65136?C:m}g.L=e,g.R=i,g.EN=s,g.ON_R=3,g.AN=4,g.R_H=5,g.B=6,g.RLE=7,g.DOT="·",g.doBidiReorder=function(zt,Ht,Jt){if(zt.length<2)return{};var ai=zt.split(""),hi=new Array(ai.length),ui=new Array(ai.length),pi=[];E=Jt?t:r,Dt(ai,pi,ai.length,Ht);for(var fi=0;fi<hi.length;hi[fi]=fi,fi++);Wt(2,pi,hi),Wt(1,pi,hi);for(var fi=0;fi<hi.length-1;fi++)Ht[fi]===p?pi[fi]=g.AN:pi[fi]===i&&(Ht[fi]>C&&Ht[fi]<ut||Ht[fi]===m||Ht[fi]===L)?pi[fi]=g.ON_R:fi>0&&ai[fi-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ai[fi])&&(pi[fi-1]=pi[fi]=g.R_H,fi++);ai[ai.length-1]===g.DOT&&(pi[ai.length-1]=g.B),ai[0]===""&&(pi[0]=g.RLE);for(var fi=0;fi<hi.length;fi++)ui[fi]=pi[hi[fi]];return{logicalFromVisual:hi,bidiLevels:ui}},g.hasBidiCharacters=function(zt,Ht){for(var Jt=!1,ai=0;ai<zt.length;ai++)Ht[ai]=li(zt.charAt(ai)),!Jt&&(Ht[ai]==i||Ht[ai]==C||Ht[ai]==p)&&(Jt=!0);return Jt},g.getVisualFromLogicalIdx=function(zt,Ht){for(var Jt=0;Jt<Ht.logicalFromVisual.length;Jt++)if(Ht.logicalFromVisual[Jt]==zt)return Jt;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(f,g,at){var E=f("./lib/bidiutil"),S=f("./lib/lang"),x=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,a=function(){function u(n){this.session=n,this.bidiMap={},this.currentRow=null,this.bidiUtil=E,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=x.test(n.getValue())}return u.prototype.isBidiRow=function(n,o,r){return this.seenBidi?(n!==this.currentRow&&(this.currentRow=n,this.updateRowLine(o,r),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},u.prototype.onChange=function(n){this.seenBidi?this.currentRow=null:n.action=="insert"&&x.test(n.lines.join(`
|
182
|
+
`))&&(this.seenBidi=!0,this.currentRow=null)},u.prototype.getDocumentRow=function(){var n=0,o=this.session.$screenRowCache;if(o.length){var r=this.session.$getRowCacheIndex(o,this.currentRow);r>=0&&(n=this.session.$docRowCache[r])}return n},u.prototype.getSplitIndex=function(){var n=0,o=this.session.$screenRowCache;if(o.length)for(var r,t=this.session.$getRowCacheIndex(o,this.currentRow);this.currentRow-n>0&&(r=this.session.$getRowCacheIndex(o,this.currentRow-n-1),r===t);)t=r,n++;else n=this.currentRow;return n},u.prototype.updateRowLine=function(n,o){n===void 0&&(n=this.getDocumentRow());var r=n===this.session.getLength()-1,t=r?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(n),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var e=this.session.$wrapData[n];e&&(o===void 0&&(o=this.getSplitIndex()),o>0&&e.length?(this.wrapIndent=e.indent,this.wrapOffset=this.wrapIndent*this.charWidths[E.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?t:E.DOT))}else this.line+=this.showInvisibles?t:E.DOT;var i=this.session,s=0,p;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(m,_){return m===" "||i.isFullWidth(m.charCodeAt(0))?(p=m===" "?i.getScreenTabSize(_+s):2,s+=p-1,S.stringRepeat(E.DOT,p)):m}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==E.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},u.prototype.updateBidiMap=function(){var n=[];E.hasBidiCharacters(this.line,n)||this.isRtlDir?this.bidiMap=E.doBidiReorder(this.line,n,this.isRtlDir):this.bidiMap={}},u.prototype.markAsDirty=function(){this.currentRow=null},u.prototype.updateCharacterWidths=function(n){if(this.characterWidth!==n.$characterSize.width){this.fontMetrics=n;var o=this.characterWidth=n.$characterSize.width,r=n.$measureCharWidth("ה");this.charWidths[E.L]=this.charWidths[E.EN]=this.charWidths[E.ON_R]=o,this.charWidths[E.R]=this.charWidths[E.AN]=r,this.charWidths[E.R_H]=r*.45,this.charWidths[E.B]=this.charWidths[E.RLE]=0,this.currentRow=null}},u.prototype.setShowInvisibles=function(n){this.showInvisibles=n,this.currentRow=null},u.prototype.setEolChar=function(n){this.EOL=n},u.prototype.setContentWidth=function(n){this.contentWidth=n},u.prototype.isRtlLine=function(n){return this.$isRtl?!0:n!=null?this.session.getLine(n).charAt(0)==this.RLE:this.isRtlDir},u.prototype.setRtlDirection=function(n,o){for(var r=n.getCursorPosition(),t=n.selection.getSelectionAnchor().row;t<=r.row;t++)!o&&n.session.getLine(t).charAt(0)===n.session.$bidiHandler.RLE?n.session.doc.removeInLine(t,0,1):o&&n.session.getLine(t).charAt(0)!==n.session.$bidiHandler.RLE&&n.session.doc.insert({column:0,row:t},n.session.$bidiHandler.RLE)},u.prototype.getPosLeft=function(n){n-=this.wrapIndent;var o=this.line.charAt(0)===this.RLE?1:0,r=n>o?this.session.getOverwrite()?n:n-1:o,t=E.getVisualFromLogicalIdx(r,this.bidiMap),e=this.bidiMap.bidiLevels,i=0;!this.session.getOverwrite()&&n<=o&&e[t]%2!==0&&t++;for(var s=0;s<t;s++)i+=this.charWidths[e[s]];return!this.session.getOverwrite()&&n>o&&e[t]%2===0&&(i+=this.charWidths[e[t]]),this.wrapIndent&&(i+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(i+=this.rtlLineOffset),i},u.prototype.getSelections=function(n,o){var r=this.bidiMap,t=r.bidiLevels,e,i=[],s=0,p=Math.min(n,o)-this.wrapIndent,m=Math.max(n,o)-this.wrapIndent,_=!1,A=!1,C=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var b,Me=0;Me<t.length;Me++)b=r.logicalFromVisual[Me],e=t[Me],_=b>=p&&b<m,_&&!A?C=s:!_&&A&&i.push({left:C,width:s-C}),s+=this.charWidths[e],A=_;if(_&&Me===t.length&&i.push({left:C,width:s-C}),this.isRtlDir)for(var Re=0;Re<i.length;Re++)i[Re].left+=this.rtlLineOffset;return i},u.prototype.offsetToCol=function(r){this.isRtlDir&&(r-=this.rtlLineOffset);var o=0,r=Math.max(r,0),t=0,e=0,i=this.bidiMap.bidiLevels,s=this.charWidths[i[e]];for(this.wrapIndent&&(r-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);r>t+s/2;){if(t+=s,e===i.length-1){s=0;break}s=this.charWidths[i[++e]]}return e>0&&i[e-1]%2!==0&&i[e]%2===0?(r<t&&e--,o=this.bidiMap.logicalFromVisual[e]):e>0&&i[e-1]%2===0&&i[e]%2!==0?o=1+(r>t?this.bidiMap.logicalFromVisual[e]:this.bidiMap.logicalFromVisual[e-1]):this.isRtlDir&&e===i.length-1&&s===0&&i[e-1]%2===0||!this.isRtlDir&&e===0&&i[e]%2!==0?o=1+this.bidiMap.logicalFromVisual[e]:(e>0&&i[e-1]%2!==0&&s!==0&&e--,o=this.bidiMap.logicalFromVisual[e]),o===0&&this.isRtlDir&&o++,o+this.wrapIndent},u}();g.BidiHandler=a}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(f,g,at){var E=f("./lib/oop"),S=f("./lib/lang"),x=f("./lib/event_emitter").EventEmitter,a=f("./range").Range,u=function(){function n(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(t){r.$cursorChanged=!0,r.$silent||r._emit("changeCursor"),!r.$isEmpty&&!r.$silent&&r._emit("changeSelection"),!r.$keepDesiredColumnOnChange&&t.old.column!=t.value.column&&(r.$desiredColumn=null)}),this.anchor.on("change",function(){r.$anchorChanged=!0,!r.$isEmpty&&!r.$silent&&r._emit("changeSelection")})}return n.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},n.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},n.prototype.getCursor=function(){return this.lead.getPosition()},n.prototype.setAnchor=function(o,r){this.$isEmpty=!1,this.anchor.setPosition(o,r)},n.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},n.prototype.getSelectionLead=function(){return this.lead.getPosition()},n.prototype.isBackwards=function(){var o=this.anchor,r=this.lead;return o.row>r.row||o.row==r.row&&o.column>r.column},n.prototype.getRange=function(){var o=this.anchor,r=this.lead;return this.$isEmpty?a.fromPoints(r,r):this.isBackwards()?a.fromPoints(r,o):a.fromPoints(o,r)},n.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},n.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},n.prototype.setRange=function(o,r){var t=r?o.end:o.start,e=r?o.start:o.end;this.$setSelection(t.row,t.column,e.row,e.column)},n.prototype.$setSelection=function(o,r,t,e){if(!this.$silent){var i=this.$isEmpty,s=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(o,r),this.cursor.setPosition(t,e),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||i!=this.$isEmpty||s)&&this._emit("changeSelection")}},n.prototype.$moveSelection=function(o){var r=this.lead;this.$isEmpty&&this.setSelectionAnchor(r.row,r.column),o.call(this)},n.prototype.selectTo=function(o,r){this.$moveSelection(function(){this.moveCursorTo(o,r)})},n.prototype.selectToPosition=function(o){this.$moveSelection(function(){this.moveCursorToPosition(o)})},n.prototype.moveTo=function(o,r){this.clearSelection(),this.moveCursorTo(o,r)},n.prototype.moveToPosition=function(o){this.clearSelection(),this.moveCursorToPosition(o)},n.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},n.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},n.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},n.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},n.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},n.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},n.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},n.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},n.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},n.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},n.prototype.getWordRange=function(o,r){if(typeof r>"u"){var t=o||this.lead;o=t.row,r=t.column}return this.session.getWordRange(o,r)},n.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},n.prototype.selectAWord=function(){var o=this.getCursor(),r=this.session.getAWordRange(o.row,o.column);this.setSelectionRange(r)},n.prototype.getLineRange=function(o,r){var t=typeof o=="number"?o:this.lead.row,e,i=this.session.getFoldLine(t);return i?(t=i.start.row,e=i.end.row):e=t,r===!0?new a(t,0,e,this.session.getLine(e).length):new a(t,0,e+1,0)},n.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},n.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},n.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},n.prototype.wouldMoveIntoSoftTab=function(o,r,t){var e=o.column,i=o.column+r;return t<0&&(e=o.column-r,i=o.column),this.session.isTabStop(o)&&this.doc.getLine(o.row).slice(e,i).split(" ").length-1==r},n.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 t=this.session.getTabSize();this.wouldMoveIntoSoftTab(o,t,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-t):this.moveCursorBy(0,-1)}},n.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 t=this.session.getTabSize(),o=this.lead;this.wouldMoveIntoSoftTab(o,t,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,t):this.moveCursorBy(0,1)}},n.prototype.moveCursorLineStart=function(){var o=this.lead.row,r=this.lead.column,t=this.session.documentToScreenRow(o,r),e=this.session.screenToDocumentPosition(t,0),i=this.session.getDisplayLine(o,null,e.row,e.column),s=i.match(/^\s*/);s[0].length!=r&&!this.session.$useEmacsStyleLineStart&&(e.column+=s[0].length),this.moveCursorToPosition(e)},n.prototype.moveCursorLineEnd=function(){var o=this.lead,r=this.session.getDocumentLastRowColumnPosition(o.row,o.column);if(this.lead.column==r.column){var t=this.session.getLine(r.row);if(r.column==t.length){var e=t.search(/\s+$/);e>0&&(r.column=e)}}this.moveCursorTo(r.row,r.column)},n.prototype.moveCursorFileEnd=function(){var o=this.doc.getLength()-1,r=this.doc.getLine(o).length;this.moveCursorTo(o,r)},n.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},n.prototype.moveCursorLongWordRight=function(){var o=this.lead.row,r=this.lead.column,t=this.doc.getLine(o),e=t.substring(r);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var i=this.session.getFoldAt(o,r,1);if(i){this.moveCursorTo(i.end.row,i.end.column);return}if(this.session.nonTokenRe.exec(e)&&(r+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,e=t.substring(r)),r>=t.length){this.moveCursorTo(o,t.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)},n.prototype.moveCursorLongWordLeft=function(){var o=this.lead.row,r=this.lead.column,t;if(t=this.session.getFoldAt(o,r,-1)){this.moveCursorTo(t.start.row,t.start.column);return}var e=this.session.getFoldStringAt(o,r,-1);e==null&&(e=this.doc.getLine(o).substring(0,r));var i=S.stringReverse(e);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(i)&&(r-=this.session.nonTokenRe.lastIndex,i=i.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(i)&&(r-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(o,r)},n.prototype.$shortWordEndIndex=function(o){var r=0,t,e=/\s/,i=this.session.tokenRe;if(i.lastIndex=0,this.session.tokenRe.exec(o))r=this.session.tokenRe.lastIndex;else{for(;(t=o[r])&&e.test(t);)r++;if(r<1){for(i.lastIndex=0;(t=o[r])&&!i.test(t);)if(i.lastIndex=0,r++,e.test(t))if(r>2){r--;break}else{for(;(t=o[r])&&e.test(t);)r++;if(r>2)break}}}return i.lastIndex=0,r},n.prototype.moveCursorShortWordRight=function(){var o=this.lead.row,r=this.lead.column,t=this.doc.getLine(o),e=t.substring(r),i=this.session.getFoldAt(o,r,1);if(i)return this.moveCursorTo(i.end.row,i.end.column);if(r==t.length){var s=this.doc.getLength();do o++,e=this.doc.getLine(o);while(o<s&&/^\s*$/.test(e));/^\s+/.test(e)||(e=""),r=0}var p=this.$shortWordEndIndex(e);this.moveCursorTo(o,r+p)},n.prototype.moveCursorShortWordLeft=function(){var o=this.lead.row,r=this.lead.column,t;if(t=this.session.getFoldAt(o,r,-1))return this.moveCursorTo(t.start.row,t.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 i=S.stringReverse(e),s=this.$shortWordEndIndex(i);return this.moveCursorTo(o,r-s)},n.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},n.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},n.prototype.moveCursorBy=function(o,r){var t=this.session.documentToScreenPosition(this.lead.row,this.lead.column),e;if(r===0&&(o!==0&&(this.session.$bidiHandler.isBidiRow(t.row,this.lead.row)?(e=this.session.$bidiHandler.getPosLeft(t.column),t.column=Math.round(e/this.session.$bidiHandler.charWidths[0])):e=t.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?t.column=this.$desiredColumn:this.$desiredColumn=t.column),o!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var i=this.session.lineWidgets[this.lead.row];o<0?o-=i.rowsAbove||0:o>0&&(o+=i.rowCount-(i.rowsAbove||0))}var s=this.session.screenToDocumentPosition(t.row+o,t.column,e);o!==0&&r===0&&s.row===this.lead.row&&(s.column,this.lead.column),this.moveCursorTo(s.row,s.column+r,r===0)},n.prototype.moveCursorToPosition=function(o){this.moveCursorTo(o.row,o.column)},n.prototype.moveCursorTo=function(o,r,t){var e=this.session.getFoldAt(o,r,1);e&&(o=e.start.row,r=e.start.column),this.$keepDesiredColumnOnChange=!0;var i=this.session.getLine(o);/[\uDC00-\uDFFF]/.test(i.charAt(r))&&i.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,t||(this.$desiredColumn=null)},n.prototype.moveCursorToScreen=function(o,r,t){var e=this.session.screenToDocumentPosition(o,r);this.moveCursorTo(e.row,e.column,t)},n.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},n.prototype.fromOrientedRange=function(o){this.setSelectionRange(o,o.cursor==o.start),this.$desiredColumn=o.desiredColumn||this.$desiredColumn},n.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},n.prototype.getRangeOfMovements=function(o){var r=this.getCursor();try{o(this);var t=this.getCursor();return a.fromPoints(r,t)}catch{return a.fromPoints(r,r)}finally{this.moveCursorToPosition(r)}},n.prototype.toJSON=function(){if(this.rangeCount)var o=this.ranges.map(function(r){var t=r.clone();return t.isBackwards=r.cursor==r.start,t});else{var o=this.getRange();o.isBackwards=this.isBackwards()}return o},n.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 t=a.fromPoints(o[r].start,o[r].end);o[r].isBackwards&&(t.cursor=t.start),this.addRange(t,!0)}return}else o=o[0];this.rangeList&&this.toSingleRange(o),this.setSelectionRange(o,o.isBackwards)},n.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},n}();u.prototype.setSelectionAnchor=u.prototype.setAnchor,u.prototype.getSelectionAnchor=u.prototype.getAnchor,u.prototype.setSelectionRange=u.prototype.setRange,E.implement(u.prototype,x),g.Selection=u}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(f,g,at){var E=f("./lib/report_error").reportError,S=2e3,x=function(){function a(u){this.splitRegex,this.states=u,this.regExps={},this.matchMappings={};for(var n in this.states){for(var o=this.states[n],r=[],t=0,e=this.matchMappings[n]={defaultToken:"text"},i="g",s=[],p=0;p<o.length;p++){var m=o[p];if(m.defaultToken&&(e.defaultToken=m.defaultToken),m.caseInsensitive&&i.indexOf("i")===-1&&(i+="i"),m.unicode&&i.indexOf("u")===-1&&(i+="u"),m.regex!=null){m.regex instanceof RegExp&&(m.regex=m.regex.toString().slice(1,-1));var _=m.regex,A=new RegExp("(?:("+_+")|(.))").exec("a").length-2;Array.isArray(m.token)?m.token.length==1||A==1?m.token=m.token[0]:A-1!=m.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:m,groupCount:A-1}),m.token=m.token[0]):(m.tokenArray=m.token,m.token=null,m.onMatch=this.$arrayTokens):typeof m.token=="function"&&!m.onMatch&&(A>1?m.onMatch=this.$applyToken:m.onMatch=m.token),A>1&&(/\\\d/.test(m.regex)?_=m.regex.replace(/\\([0-9]+)/g,function(C,b){return"\\"+(parseInt(b,10)+t+1)}):(A=1,_=this.removeCapturingGroups(m.regex)),!m.splitRegex&&typeof m.token!="string"&&s.push(m)),e[t]=p,t+=A,r.push(_),m.onMatch||(m.onMatch=null)}}r.length||(e[0]=0,r.push("$")),s.forEach(function(C){C.splitRegex=this.createSplitterRegexp(C.regex,i)},this),this.regExps[n]=new RegExp("("+r.join(")|(")+")|($)",i)}}return a.prototype.$setMaxTokenCount=function(u){S=u|0},a.prototype.$applyToken=function(u){var n=this.splitRegex.exec(u).slice(1),o=this.token.apply(this,n);if(typeof o=="string")return[{type:o,value:u}];for(var r=[],t=0,e=o.length;t<e;t++)n[t]&&(r[r.length]={type:o[t],value:n[t]});return r},a.prototype.$arrayTokens=function(u){if(!u)return[];var n=this.splitRegex.exec(u);if(!n)return"text";for(var o=[],r=this.tokenArray,t=0,e=r.length;t<e;t++)n[t+1]&&(o[o.length]={type:r[t],value:n[t+1]});return o},a.prototype.removeCapturingGroups=function(u){var n=u.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(o,r){return r?"(?:":o});return n},a.prototype.createSplitterRegexp=function(u,n){if(u.indexOf("(?=")!=-1){var o=0,r=!1,t={};u.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,i,s,p,m,_){return r?r=m!="]":m?r=!0:p?(o==t.stack&&(t.end=_+1,t.stack=-1),o--):s&&(o++,s.length!=1&&(t.stack=o,t.start=_)),e}),t.end!=null&&/^\)*$/.test(u.substr(t.end))&&(u=u.substring(0,t.start)+u.substr(t.end))}return u.charAt(0)!="^"&&(u="^"+u),u.charAt(u.length-1)!="$"&&(u+="$"),new RegExp(u,(n||"").replace("g",""))},a.prototype.getLineTokens=function(u,n){if(n&&typeof n!="string"){var o=n.slice(0);n=o[0],n==="#tmp"&&(o.shift(),n=o.shift())}else var o=[];var r=n||"start",t=this.states[r];t||(r="start",t=this.states[r]);var e=this.matchMappings[r],i=this.regExps[r];i.lastIndex=0;for(var s,p=[],m=0,_=0,A={type:null,value:""};s=i.exec(u);){var C=e.defaultToken,b=null,Me=s[0],Re=i.lastIndex;if(Re-Me.length>m){var q=u.substring(m,Re-Me.length);A.type==C?A.value+=q:(A.type&&p.push(A),A={type:C,value:q})}for(var W=0;W<s.length-2;W++)if(s[W+1]!==void 0){b=t[e[W]],b.onMatch?C=b.onMatch(Me,r,o,u):C=b.token,b.next&&(typeof b.next=="string"?r=b.next:r=b.next(r,o),t=this.states[r],t||(this.reportError("state doesn't exist",r),r="start",t=this.states[r]),e=this.matchMappings[r],m=Re,i=this.regExps[r],i.lastIndex=Re),b.consumeLineEnd&&(m=Re);break}if(Me){if(typeof C=="string")(!b||b.merge!==!1)&&A.type===C?A.value+=Me:(A.type&&p.push(A),A={type:C,value:Me});else if(C){A.type&&p.push(A),A={type:null,value:""};for(var W=0;W<C.length;W++)p.push(C[W])}}if(m==u.length)break;if(m=Re,_++>S){for(_>2*u.length&&this.reportError("infinite loop with in ace tokenizer",{startState:n,line:u});m<u.length;)A.type&&p.push(A),A={value:u.substring(m,m+=500),type:"overflow"};r="start",o=[];break}}return A.type&&p.push(A),o.length>1&&o[0]!==r&&o.unshift("#tmp",r),{tokens:p,state:o.length?o:r}},a}();x.prototype.reportError=E,g.Tokenizer=x}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(f,g,at){var E=f("../lib/deep_copy").deepCopy,S;S=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(u,n){if(!n){for(var o in u)this.$rules[o]=u[o];return}for(var o in u){for(var r=u[o],t=0;t<r.length;t++){var e=r[t];(e.next||e.onMatch)&&(typeof e.next=="string"&&e.next.indexOf(n)!==0&&(e.next=n+e.next),e.nextState&&e.nextState.indexOf(n)!==0&&(e.nextState=n+e.nextState))}this.$rules[n+o]=r}},this.getRules=function(){return this.$rules},this.embedRules=function(u,n,o,r,t){var e=typeof u=="function"?new u().getRules():u;if(r)for(var i=0;i<r.length;i++)r[i]=n+r[i];else{r=[];for(var s in e)r.push(n+s)}if(this.addRules(e,n),o)for(var p=Array.prototype[t?"push":"unshift"],i=0;i<r.length;i++)p.apply(this.$rules[r[i]],E(o));this.$embeds||(this.$embeds=[]),this.$embeds.push(n)},this.getEmbeds=function(){return this.$embeds};var x=function(u,n){return(u!="start"||n.length)&&n.unshift(this.nextState,u),this.nextState},a=function(u,n){return n.shift(),n.shift()||"start"};this.normalizeRules=function(){var u=0,n=this.$rules;function o(r){var t=n[r];t.processed=!0;for(var e=0;e<t.length;e++){var i=t[e],s=null;Array.isArray(i)&&(s=i,i={}),!i.regex&&i.start&&(i.regex=i.start,i.next||(i.next=[]),i.next.push({defaultToken:i.token},{token:i.token+".end",regex:i.end||i.start,next:"pop"}),i.token=i.token+".start",i.push=!0);var p=i.next||i.push;if(p&&Array.isArray(p)){var m=i.stateName;m||(m=i.token,typeof m!="string"&&(m=m[0]||""),n[m]&&(m+=u++)),n[m]=p,i.next=m,o(m)}else p=="pop"&&(i.next=a);if(i.push&&(i.nextState=i.next||i.push,i.next=x,delete i.push),i.rules)for(var _ in i.rules)n[_]?n[_].push&&n[_].push.apply(n[_],i.rules[_]):n[_]=i.rules[_];var A=typeof i=="string"?i:i.include;if(A&&(A==="$self"&&(A="start"),Array.isArray(A)?s=A.map(function(b){return n[b]}):s=n[A]),s){var C=[e,1].concat(s);i.noEscape&&(C=C.filter(function(b){return!b.next})),t.splice.apply(t,C),e--}i.keywordMap&&(i.token=this.createKeywordMapper(i.keywordMap,i.defaultToken||"text",i.caseInsensitive),delete i.defaultToken)}}Object.keys(n).forEach(o,this)},this.createKeywordMapper=function(u,n,o,r){var t=Object.create(null);return this.$keywordList=[],Object.keys(u).forEach(function(e){for(var i=u[e],s=i.split(r||"|"),p=s.length;p--;){var m=s[p];this.$keywordList.push(m),o&&(m=m.toLowerCase()),t[m]=e}},this),u=null,o?function(e){return t[e.toLowerCase()]||n}:function(e){return t[e]||n}},this.getKeywords=function(){return this.$keywords}}).call(S.prototype),g.TextHighlightRules=S}),ace.define("ace/mode/behaviour",["require","exports","module"],function(f,g,at){var E;E=function(){this.$behaviours={}},(function(){this.add=function(S,x,a){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[S]:this.$behaviours[S]={}}this.$behaviours[S][x]=a},this.addBehaviours=function(S){for(var x in S)for(var a in S[x])this.add(x,a,S[x][a])},this.remove=function(S){this.$behaviours&&this.$behaviours[S]&&delete this.$behaviours[S]},this.inherit=function(S,x){if(typeof S=="function")var a=new S().getBehaviours(x);else var a=S.getBehaviours(x);this.addBehaviours(a)},this.getBehaviours=function(S){if(S){for(var x={},a=0;a<S.length;a++)this.$behaviours[S[a]]&&(x[S[a]]=this.$behaviours[S[a]]);return x}else return this.$behaviours}}).call(E.prototype),g.Behaviour=E}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(f,g,at){var E=f("./range").Range,S=function(){function x(a,u,n){this.$session=a,this.$row=u,this.$rowTokens=a.getTokens(u);var o=a.getTokenAt(u,n);this.$tokenIndex=o?o.index:-1}return x.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]},x.prototype.stepForward=function(){this.$tokenIndex+=1;for(var a;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,a||(a=this.$session.getLength()),this.$row>=a)return this.$row=a-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},x.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},x.prototype.getCurrentTokenRow=function(){return this.$row},x.prototype.getCurrentTokenColumn=function(){var a=this.$rowTokens,u=this.$tokenIndex,n=a[u].start;if(n!==void 0)return n;for(n=0;u>0;)u-=1,n+=a[u].value.length;return n},x.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},x.prototype.getCurrentTokenRange=function(){var a=this.$rowTokens[this.$tokenIndex],u=this.getCurrentTokenColumn();return new E(this.$row,u,this.$row,u+a.value.length)},x}();g.TokenIterator=S}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(f,g,at){var E=f("../../lib/oop"),S=f("../behaviour").Behaviour,x=f("../../token_iterator").TokenIterator,a=f("../../lib/lang"),u=["text","paren.rparen","rparen","paren","punctuation.operator"],n=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],o,r={},t={'"':'"',"'":"'"},e=function(p){var m=-1;if(p.multiSelect&&(m=p.selection.index,r.rangeCount!=p.multiSelect.rangeCount&&(r={rangeCount:p.multiSelect.rangeCount})),r[m])return o=r[m];o=r[m]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},i=function(p,m,_,A){var C=p.end.row-p.start.row;return{text:_+m+A,selection:[0,p.start.column+1,C,p.end.column+(C?0:1)]}},s;s=function(p){p=p||{},this.add("braces","insertion",function(m,_,A,C,b){var Me=A.getCursorPosition(),Re=C.doc.getLine(Me.row);if(b=="{"){e(A);var q=A.getSelectionRange(),W=C.doc.getTextRange(q),ut=C.getTokenAt(Me.row,Me.column);if(W!==""&&W!=="{"&&A.getWrapBehavioursEnabled())return i(q,W,"{","}");if(ut&&/(?:string)\.quasi|\.xml/.test(ut.type)){var G=[/tag\-(?:open|name)/,/attribute\-name/];return G.some(function(Dt){return Dt.test(ut.type)})||/(string)\.quasi/.test(ut.type)&&ut.value[Me.column-ut.start-1]!=="$"?void 0:(s.recordAutoInsert(A,C,"}"),{text:"{}",selection:[1,1]})}else if(s.isSaneInsertion(A,C))return/[\]\}\)]/.test(Re[Me.column])||A.inMultiSelectMode||p.braces?(s.recordAutoInsert(A,C,"}"),{text:"{}",selection:[1,1]}):(s.recordMaybeInsert(A,C,"{"),{text:"{",selection:[1,1]})}else if(b=="}"){e(A);var D=Re.substring(Me.column,Me.column+1);if(D=="}"){var w=C.$findOpeningBracket("}",{column:Me.column+1,row:Me.row});if(w!==null&&s.isAutoInsertedClosing(Me,Re,b))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(b==`
|
183
|
+
`||b==`\r
|
184
|
+
`){e(A);var v="";s.isMaybeInsertedClosing(Me,Re)&&(v=a.stringRepeat("}",o.maybeInsertedBrackets),s.clearMaybeInsertedClosing());var D=Re.substring(Me.column,Me.column+1);if(D==="}"){var L=C.findMatchingBracket({row:Me.row,column:Me.column+1},"}");if(!L)return null;var lt=this.$getIndent(C.getLine(L.row))}else if(v)var lt=this.$getIndent(Re);else{s.clearMaybeInsertedClosing();return}var ct=lt+C.getTabString();return{text:`
|
185
|
+
`+ct+`
|
186
|
+
`+lt+v,selection:[1,ct.length,1,ct.length]}}else s.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(m,_,A,C,b){var Me=C.doc.getTextRange(b);if(!b.isMultiLine()&&Me=="{"){e(A);var Re=C.doc.getLine(b.start.row),q=Re.substring(b.end.column,b.end.column+1);if(q=="}")return b.end.column++,b;o.maybeInsertedBrackets--}}),this.add("parens","insertion",function(m,_,A,C,b){if(b=="("){e(A);var Me=A.getSelectionRange(),Re=C.doc.getTextRange(Me);if(Re!==""&&A.getWrapBehavioursEnabled())return i(Me,Re,"(",")");if(s.isSaneInsertion(A,C))return s.recordAutoInsert(A,C,")"),{text:"()",selection:[1,1]}}else if(b==")"){e(A);var q=A.getCursorPosition(),W=C.doc.getLine(q.row),ut=W.substring(q.column,q.column+1);if(ut==")"){var G=C.$findOpeningBracket(")",{column:q.column+1,row:q.row});if(G!==null&&s.isAutoInsertedClosing(q,W,b))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(m,_,A,C,b){var Me=C.doc.getTextRange(b);if(!b.isMultiLine()&&Me=="("){e(A);var Re=C.doc.getLine(b.start.row),q=Re.substring(b.start.column+1,b.start.column+2);if(q==")")return b.end.column++,b}}),this.add("brackets","insertion",function(m,_,A,C,b){if(b=="["){e(A);var Me=A.getSelectionRange(),Re=C.doc.getTextRange(Me);if(Re!==""&&A.getWrapBehavioursEnabled())return i(Me,Re,"[","]");if(s.isSaneInsertion(A,C))return s.recordAutoInsert(A,C,"]"),{text:"[]",selection:[1,1]}}else if(b=="]"){e(A);var q=A.getCursorPosition(),W=C.doc.getLine(q.row),ut=W.substring(q.column,q.column+1);if(ut=="]"){var G=C.$findOpeningBracket("]",{column:q.column+1,row:q.row});if(G!==null&&s.isAutoInsertedClosing(q,W,b))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(m,_,A,C,b){var Me=C.doc.getTextRange(b);if(!b.isMultiLine()&&Me=="["){e(A);var Re=C.doc.getLine(b.start.row),q=Re.substring(b.start.column+1,b.start.column+2);if(q=="]")return b.end.column++,b}}),this.add("string_dquotes","insertion",function(m,_,A,C,b){var Me=C.$mode.$quotes||t;if(b.length==1&&Me[b]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(b)!=-1)return;e(A);var Re=b,q=A.getSelectionRange(),W=C.doc.getTextRange(q);if(W!==""&&(W.length!=1||!Me[W])&&A.getWrapBehavioursEnabled())return i(q,W,Re,Re);if(!W){var ut=A.getCursorPosition(),G=C.doc.getLine(ut.row),D=G.substring(ut.column-1,ut.column),w=G.substring(ut.column,ut.column+1),v=C.getTokenAt(ut.row,ut.column),L=C.getTokenAt(ut.row,ut.column+1);if(D=="\\"&&v&&/escape/.test(v.type))return null;var lt=v&&/string|escape/.test(v.type),ct=!L||/string|escape/.test(L.type),Dt;if(w==Re)Dt=lt!==ct,Dt&&/string\.end/.test(L.type)&&(Dt=!1);else{if(lt&&!ct||lt&&ct)return null;var Wt=C.$mode.tokenRe;Wt.lastIndex=0;var Vt=Wt.test(D);Wt.lastIndex=0;var li=Wt.test(w),zt=C.$mode.$pairQuotesAfter,Ht=zt&&zt[Re]&&zt[Re].test(D);if(!Ht&&Vt||li||w&&!/[\s;,.})\]\\]/.test(w))return null;var Jt=G[ut.column-2];if(D==Re&&(Jt==Re||Wt.test(Jt)))return null;Dt=!0}return{text:Dt?Re+Re:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(m,_,A,C,b){var Me=C.$mode.$quotes||t,Re=C.doc.getTextRange(b);if(!b.isMultiLine()&&Me.hasOwnProperty(Re)){e(A);var q=C.doc.getLine(b.start.row),W=q.substring(b.start.column+1,b.start.column+2);if(W==Re)return b.end.column++,b}}),p.closeDocComment!==!1&&this.add("doc comment end","insertion",function(m,_,A,C,b){if(m==="doc-start"&&(b===`
|
187
|
+
`||b===`\r
|
188
|
+
`)&&A.selection.isEmpty()){var Me=A.getCursorPosition();if(Me.column===0)return;for(var Re=C.doc.getLine(Me.row),q=C.doc.getLine(Me.row+1),W=C.getTokens(Me.row),ut=0,G=0;G<W.length;G++){ut+=W[G].value.length;var D=W[G];if(ut>=Me.column){if(ut===Me.column){if(!/\.doc/.test(D.type))return;if(/\*\//.test(D.value)){var w=W[G+1];if(!w||!/\.doc/.test(w.type))return}}var v=Me.column-(ut-D.value.length),L=D.value.indexOf("*/"),lt=D.value.indexOf("/**",L>-1?L+2:0);if(lt!==-1&&v>lt&&v<lt+3||L!==-1&<!==-1&&v>=L&&v<=lt||!/\.doc/.test(D.type))return;break}}var ct=this.$getIndent(Re);if(/\s*\*/.test(q))return/^\s*\*/.test(Re)?{text:b+ct+"* ",selection:[1,2+ct.length,1,2+ct.length]}:{text:b+ct+" * ",selection:[1,3+ct.length,1,3+ct.length]};if(/\/\*\*/.test(Re.substring(0,Me.column)))return{text:b+ct+" * "+b+" "+ct+"*/",selection:[1,4+ct.length,1,4+ct.length]}}})},s.isSaneInsertion=function(p,m){var _=p.getCursorPosition(),A=new x(m,_.row,_.column);if(!this.$matchTokenType(A.getCurrentToken()||"text",u)){if(/[)}\]]/.test(p.session.getLine(_.row)[_.column]))return!0;var C=new x(m,_.row,_.column+1);if(!this.$matchTokenType(C.getCurrentToken()||"text",u))return!1}return A.stepForward(),A.getCurrentTokenRow()!==_.row||this.$matchTokenType(A.getCurrentToken()||"text",n)},s.$matchTokenType=function(p,m){return m.indexOf(p.type||p)>-1},s.recordAutoInsert=function(p,m,_){var A=p.getCursorPosition(),C=m.doc.getLine(A.row);this.isAutoInsertedClosing(A,C,o.autoInsertedLineEnd[0])||(o.autoInsertedBrackets=0),o.autoInsertedRow=A.row,o.autoInsertedLineEnd=_+C.substr(A.column),o.autoInsertedBrackets++},s.recordMaybeInsert=function(p,m,_){var A=p.getCursorPosition(),C=m.doc.getLine(A.row);this.isMaybeInsertedClosing(A,C)||(o.maybeInsertedBrackets=0),o.maybeInsertedRow=A.row,o.maybeInsertedLineStart=C.substr(0,A.column)+_,o.maybeInsertedLineEnd=C.substr(A.column),o.maybeInsertedBrackets++},s.isAutoInsertedClosing=function(p,m,_){return o.autoInsertedBrackets>0&&p.row===o.autoInsertedRow&&_===o.autoInsertedLineEnd[0]&&m.substr(p.column)===o.autoInsertedLineEnd},s.isMaybeInsertedClosing=function(p,m){return o.maybeInsertedBrackets>0&&p.row===o.maybeInsertedRow&&m.substr(p.column)===o.maybeInsertedLineEnd&&m.substr(0,p.column)==o.maybeInsertedLineStart},s.popAutoInsertedClosing=function(){o.autoInsertedLineEnd=o.autoInsertedLineEnd.substr(1),o.autoInsertedBrackets--},s.clearMaybeInsertedClosing=function(){o&&(o.maybeInsertedBrackets=0,o.maybeInsertedRow=-1)},E.inherits(s,S),g.CstyleBehaviour=s}),ace.define("ace/unicode",["require","exports","module"],function(f,g,at){for(var E=[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],S=0,x=[],a=0;a<E.length;a+=2)x.push(S+=E[a]),E[a+1]&&x.push(45,S+=E[a+1]);g.wordChars=String.fromCharCode.apply(null,x)}),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,at){var E=f("../config"),S=f("../tokenizer").Tokenizer,x=f("./text_highlight_rules").TextHighlightRules,a=f("./behaviour/cstyle").CstyleBehaviour,u=f("../unicode"),n=f("../lib/lang"),o=f("../token_iterator").TokenIterator,r=f("../range").Range,t;t=function(){this.HighlightRules=x},(function(){this.$defaultBehaviour=new a,this.tokenRe=new RegExp("^["+u.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+u.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new S(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,i,s,p){var m=i.doc,_=!0,A=!0,C=1/0,b=i.getTabSize(),Me=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var W=this.lineCommentStart.map(n.escapeRegExp).join("|"),Re=this.lineCommentStart[0];else var W=n.escapeRegExp(this.lineCommentStart),Re=this.lineCommentStart;W=new RegExp("^(\\s*)(?:"+W+") ?"),Me=i.getUseSoftTabs();var D=function(li,zt){var Ht=li.match(W);if(Ht){var Jt=Ht[1].length,ai=Ht[0].length;!L(li,Jt,ai)&&Ht[0][ai-1]==" "&&ai--,m.removeInLine(zt,Jt,ai)}},v=Re+" ",G=function(li,zt){(!_||/\S/.test(li))&&(L(li,C,C)?m.insertInLine({row:zt,column:C},v):m.insertInLine({row:zt,column:C},Re))},w=function(li,zt){return W.test(li)},L=function(li,zt,Ht){for(var Jt=0;zt--&&li.charAt(zt)==" ";)Jt++;if(Jt%b!=0)return!1;for(var Jt=0;li.charAt(Ht++)==" ";)Jt++;return b>2?Jt%b!=b-1:Jt%b==0}}else{if(!this.blockComment)return!1;var Re=this.blockComment.start,q=this.blockComment.end,W=new RegExp("^(\\s*)(?:"+n.escapeRegExp(Re)+")"),ut=new RegExp("(?:"+n.escapeRegExp(q)+")\\s*$"),G=function(Dt,Wt){w(Dt,Wt)||(!_||/\S/.test(Dt))&&(m.insertInLine({row:Wt,column:Dt.length},q),m.insertInLine({row:Wt,column:C},Re))},D=function(Dt,Wt){var Vt;(Vt=Dt.match(ut))&&m.removeInLine(Wt,Dt.length-Vt[0].length,Dt.length),(Vt=Dt.match(W))&&m.removeInLine(Wt,Vt[1].length,Vt[0].length)},w=function(Dt,Wt){if(W.test(Dt))return!0;for(var Vt=i.getTokens(Wt),li=0;li<Vt.length;li++)if(Vt[li].type==="comment")return!0}}function lt(Dt){for(var Wt=s;Wt<=p;Wt++)Dt(m.getLine(Wt),Wt)}var ct=1/0;lt(function(Dt,Wt){var Vt=Dt.search(/\S/);Vt!==-1?(Vt<C&&(C=Vt),A&&!w(Dt,Wt)&&(A=!1)):ct>Dt.length&&(ct=Dt.length)}),C==1/0&&(C=ct,_=!1,A=!1),Me&&C%b!=0&&(C=Math.floor(C/b)*b),lt(A?D:G)},this.toggleBlockComment=function(e,i,s,p){var m=this.blockComment;if(m){!m.start&&m[0]&&(m=m[0]);var _=new o(i,p.row,p.column),A=_.getCurrentToken();i.selection;var C=i.selection.toOrientedRange(),b,Me;if(A&&/comment/.test(A.type)){for(var Re,q;A&&/comment/.test(A.type);){var W=A.value.indexOf(m.start);if(W!=-1){var ut=_.getCurrentTokenRow(),G=_.getCurrentTokenColumn()+W;Re=new r(ut,G,ut,G+m.start.length);break}A=_.stepBackward()}for(var _=new o(i,p.row,p.column),A=_.getCurrentToken();A&&/comment/.test(A.type);){var W=A.value.indexOf(m.end);if(W!=-1){var ut=_.getCurrentTokenRow(),G=_.getCurrentTokenColumn()+W;q=new r(ut,G,ut,G+m.end.length);break}A=_.stepForward()}q&&i.remove(q),Re&&(i.remove(Re),b=Re.start.row,Me=-m.start.length)}else Me=m.start.length,b=s.start.row,i.insert(s.end,m.end),i.insert(s.start,m.start);C.start.row==b&&(C.start.column+=Me),C.end.row==b&&(C.end.column+=Me),i.selection.fromOrientedRange(C)}},this.getNextLineIndent=function(e,i,s){return this.$getIndent(i)},this.checkOutdent=function(e,i,s){return!1},this.autoOutdent=function(e,i,s){},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 i in e)if(e[i]){var s=e[i],p=s.prototype.$id,m=E.$modes[p];m||(E.$modes[p]=m=new s),E.$modes[i]||(E.$modes[i]=m),this.$embeds.push(i),this.$modes[i]=m}for(var _=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],A=function(b){(function(Me){var Re=_[b],q=Me[Re];Me[_[b]]=function(){return this.$delegator(Re,arguments,q)}})(C)},C=this,i=0;i<_.length;i++)A(i)},this.$delegator=function(e,i,s){var p=i[0]||"start";if(typeof p!="string"){if(Array.isArray(p[2])){var m=p[2][p[2].length-1],_=this.$modes[m];if(_)return _[e].apply(_,[p[1]].concat([].slice.call(i,1)))}p=p[0]||"start"}for(var A=0;A<this.$embeds.length;A++)if(this.$modes[this.$embeds[A]]){var C=p.split(this.$embeds[A]);if(!C[0]&&C[1]){i[0]=C[1];var _=this.$modes[this.$embeds[A]];return _[e].apply(_,i)}}var b=s.apply(this,i);return s?b:void 0},this.transformAction=function(e,i,s,p,m){if(this.$behaviour){var _=this.$behaviour.getBehaviours();for(var A in _)if(_[A][i]){var C=_[A][i].apply(this,arguments);if(C)return C}}},this.getKeywords=function(e){if(!this.completionKeywords){var i=this.$tokenizer.rules,s=[];for(var p in i)for(var m=i[p],_=0,A=m.length;_<A;_++)if(typeof m[_].token=="string")/keyword|support|storage/.test(m[_].token)&&s.push(m[_].regex);else if(typeof m[_].token=="object"){for(var C=0,b=m[_].token.length;C<b;C++)if(/keyword|support|storage/.test(m[_].token[C])){var p=m[_].regex.match(/\(.+?\)/g)[C];s.push(p.substr(1,p.length-2))}}this.completionKeywords=s}return e?s.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,i,s,p){var m=this.$keywordList||this.$createKeywordList();return m.map(function(_){return{name:_,value:_,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(t.prototype),g.Mode=t}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(f,g,at){var E=f("./lib/dom"),S=function(){function x(a){this.session=a,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 x.prototype.getRowLength=function(a){var u;return this.lineWidgets?u=this.lineWidgets[a]&&this.lineWidgets[a].rowCount||0:u=0,!this.$useWrapMode||!this.$wrapData[a]?1+u:this.$wrapData[a].length+1+u},x.prototype.$getWidgetScreenLength=function(){var a=0;return this.lineWidgets.forEach(function(u){u&&u.rowCount&&!u.hidden&&(a+=u.rowCount)}),a},x.prototype.$onChangeEditor=function(a){this.attach(a.editor)},x.prototype.attach=function(a){a&&a.widgetManager&&a.widgetManager!=this&&a.widgetManager.detach(),this.editor!=a&&(this.detach(),this.editor=a,a&&(a.widgetManager=this,a.renderer.on("beforeRender",this.measureWidgets),a.renderer.on("afterRender",this.renderWidgets)))},x.prototype.detach=function(a){var u=this.editor;if(u){this.editor=null,u.widgetManager=null,u.renderer.off("beforeRender",this.measureWidgets),u.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach(function(o){o&&o.el&&o.el.parentNode&&(o._inDocument=!1,o.el.parentNode.removeChild(o.el))})}},x.prototype.updateOnFold=function(a,u){var n=u.lineWidgets;if(!(!n||!a.action)){for(var o=a.data,r=o.start.row,t=o.end.row,e=a.action=="add",i=r+1;i<t;i++)n[i]&&(n[i].hidden=e);n[t]&&(e?n[r]?n[t].hidden=e:n[r]=n[t]:(n[r]==n[t]&&(n[r]=void 0),n[t].hidden=e))}},x.prototype.updateOnChange=function(a){var u=this.session.lineWidgets;if(u){var n=a.start.row,o=a.end.row-n;if(o!==0)if(a.action=="remove"){var r=u.splice(n+1,o);!u[n]&&r[r.length-1]&&(u[n]=r.pop()),r.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var t=new Array(o);u[n]&&u[n].column!=null&&a.start.column>u[n].column&&n++,t.unshift(n,0),u.splice.apply(u,t),this.$updateRows()}}},x.prototype.$updateRows=function(){var a=this.session.lineWidgets;if(a){var u=!0;a.forEach(function(n,o){if(n)for(u=!1,n.row=o;n.$oldWidget;)n.$oldWidget.row=o,n=n.$oldWidget}),u&&(this.session.lineWidgets=null)}},x.prototype.$registerLineWidget=function(a){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var u=this.session.lineWidgets[a.row];return u&&(a.$oldWidget=u,u.el&&u.el.parentNode&&(u.el.parentNode.removeChild(u.el),u._inDocument=!1)),this.session.lineWidgets[a.row]=a,a},x.prototype.addLineWidget=function(a){if(this.$registerLineWidget(a),a.session=this.session,!this.editor)return a;var u=this.editor.renderer;a.html&&!a.el&&(a.el=E.createElement("div"),a.el.innerHTML=a.html),a.text&&!a.el&&(a.el=E.createElement("div"),a.el.textContent=a.text),a.el&&(E.addCssClass(a.el,"ace_lineWidgetContainer"),a.className&&E.addCssClass(a.el,a.className),a.el.style.position="absolute",a.el.style.zIndex="5",u.container.appendChild(a.el),a._inDocument=!0,a.coverGutter||(a.el.style.zIndex="3"),a.pixelHeight==null&&(a.pixelHeight=a.el.offsetHeight)),a.rowCount==null&&(a.rowCount=a.pixelHeight/u.layerConfig.lineHeight);var n=this.session.getFoldAt(a.row,0);if(a.$fold=n,n){var o=this.session.lineWidgets;a.row==n.end.row&&!o[n.start.row]?o[n.start.row]=a:a.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows(),this.renderWidgets(null,u),this.onWidgetChanged(a),a},x.prototype.removeLineWidget=function(a){if(a._inDocument=!1,a.session=null,a.el&&a.el.parentNode&&a.el.parentNode.removeChild(a.el),a.editor&&a.editor.destroy)try{a.editor.destroy()}catch{}if(this.session.lineWidgets){var u=this.session.lineWidgets[a.row];if(u==a)this.session.lineWidgets[a.row]=a.$oldWidget,a.$oldWidget&&this.onWidgetChanged(a.$oldWidget);else for(;u;){if(u.$oldWidget==a){u.$oldWidget=a.$oldWidget;break}u=u.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows()},x.prototype.getWidgetsAtRow=function(a){for(var u=this.session.lineWidgets,n=u&&u[a],o=[];n;)o.push(n),n=n.$oldWidget;return o},x.prototype.onWidgetChanged=function(a){this.session._changedWidgets.push(a),this.editor&&this.editor.renderer.updateFull()},x.prototype.measureWidgets=function(a,u){var n=this.session._changedWidgets,o=u.layerConfig;if(!(!n||!n.length)){for(var r=1/0,t=0;t<n.length;t++){var e=n[t];if(!(!e||!e.el)&&e.session==this.session){if(!e._inDocument){if(this.session.lineWidgets[e.row]!=e)continue;e._inDocument=!0,u.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 i=e.h/o.lineHeight;e.coverLine&&(i-=this.session.getRowLineCount(e.row),i<0&&(i=0)),e.rowCount!=i&&(e.rowCount=i,e.row<r&&(r=e.row))}}r!=1/0&&(this.session._emit("changeFold",{data:{start:{row:r}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},x.prototype.renderWidgets=function(a,u){var n=u.layerConfig,o=this.session.lineWidgets;if(o){for(var r=Math.min(this.firstRow,n.firstRow),t=Math.max(this.lastRow,n.lastRow,o.length);r>0&&!o[r];)r--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,u.$cursorLayer.config=n;for(var e=r;e<=t;e++){var i=o[e];if(!(!i||!i.el)){if(i.hidden){i.el.style.top=-100-(i.pixelHeight||0)+"px";continue}i._inDocument||(i._inDocument=!0,u.container.appendChild(i.el));var s=u.$cursorLayer.getPixelPosition({row:e,column:0},!0).top;i.coverLine||(s+=n.lineHeight*this.session.getRowLineCount(i.row)),i.el.style.top=s-n.offset+"px";var p=i.coverGutter?0:u.gutterWidth;i.fixedWidth||(p-=u.scrollLeft),i.el.style.left=p+"px",i.fullWidth&&i.screenWidth&&(i.el.style.minWidth=n.width+2*n.padding+"px"),i.fixedWidth?i.el.style.right=u.scrollBar.getWidth()+"px":i.el.style.right=""}}}},x}();g.LineWidgets=S}),ace.define("ace/apply_delta",["require","exports","module"],function(f,g,at){g.applyDelta=function(E,S,x){var a=S.start.row,u=S.start.column,n=E[a]||"";switch(S.action){case"insert":var o=S.lines;if(o.length===1)E[a]=n.substring(0,u)+S.lines[0]+n.substring(u);else{var r=[a,1].concat(S.lines);E.splice.apply(E,r),E[a]=n.substring(0,u)+E[a],E[a+S.lines.length-1]+=n.substring(u)}break;case"remove":var t=S.end.column,e=S.end.row;a===e?E[a]=n.substring(0,u)+n.substring(t):E.splice(a,e-a+1,n.substring(0,u)+E[e].substring(t));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(f,g,at){var E=f("./lib/oop"),S=f("./lib/event_emitter").EventEmitter,x=function(){function n(o,r,t){this.$onChange=this.onChange.bind(this),this.attach(o),typeof r!="number"?this.setPosition(r.row,r.column):this.setPosition(r,t)}return n.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},n.prototype.getDocument=function(){return this.document},n.prototype.onChange=function(o){if(!(o.start.row==o.end.row&&o.start.row!=this.row)&&!(o.start.row>this.row)){var r=u(o,{row:this.row,column:this.column},this.$insertRight);this.setPosition(r.row,r.column,!0)}},n.prototype.setPosition=function(o,r,t){var e;if(t?e={row:o,column:r}:e=this.$clipPositionToDocument(o,r),!(this.row==e.row&&this.column==e.column)){var i={row:this.row,column:this.column};this.row=e.row,this.column=e.column,this._signal("change",{old:i,value:e})}},n.prototype.detach=function(){this.document.off("change",this.$onChange)},n.prototype.attach=function(o){this.document=o||this.document,this.document.on("change",this.$onChange)},n.prototype.$clipPositionToDocument=function(o,r){var t={};return o>=this.document.getLength()?(t.row=Math.max(0,this.document.getLength()-1),t.column=this.document.getLine(t.row).length):o<0?(t.row=0,t.column=0):(t.row=o,t.column=Math.min(this.document.getLine(t.row).length,Math.max(0,r))),r<0&&(t.column=0),t},n}();x.prototype.$insertRight=!1,E.implement(x.prototype,S);function a(n,o,r){var t=r?n.column<=o.column:n.column<o.column;return n.row<o.row||n.row==o.row&&t}function u(n,o,r){var t=n.action=="insert",e=(t?1:-1)*(n.end.row-n.start.row),i=(t?1:-1)*(n.end.column-n.start.column),s=n.start,p=t?s:n.end;return a(o,s,r)?{row:o.row,column:o.column}:a(p,o,!r)?{row:o.row+e,column:o.column+(o.row==p.row?i:0)}:{row:s.row,column:s.column}}g.Anchor=x}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(f,g,at){var E=f("./lib/oop"),S=f("./apply_delta").applyDelta,x=f("./lib/event_emitter").EventEmitter,a=f("./range").Range,u=f("./anchor").Anchor,n=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 t=this.getLength()-1;this.remove(new a(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},r||"")},o.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},o.prototype.createAnchor=function(r,t){return new u(this,r,t)},o.prototype.$detectNewLine=function(r){var t=r.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[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,t){return this.$lines.slice(r,t+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 t;if(r.start.row===r.end.row)t=[this.getLine(r.start.row).substring(r.start.column,r.end.column)];else{t=this.getLines(r.start.row,r.end.row),t[0]=(t[0]||"").substring(r.start.column);var e=t.length-1;r.end.row-r.start.row==e&&(t[e]=t[e].substring(0,r.end.column))}return t},o.prototype.insertLines=function(r,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(r,t)},o.prototype.removeLines=function(r,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(r,t)},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,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(r,this.$split(t))},o.prototype.insertInLine=function(r,t){var e=this.clippedPos(r.row,r.column),i=this.pos(r.row,r.column+t.length);return this.applyDelta({start:e,end:i,action:"insert",lines:[t]},!0),this.clonePos(i)},o.prototype.clippedPos=function(r,t){var e=this.getLength();r===void 0?r=e:r<0?r=0:r>=e&&(r=e-1,t=void 0);var i=this.getLine(r);return t==null&&(t=i.length),t=Math.min(Math.max(t,0),i.length),{row:r,column:t}},o.prototype.clonePos=function(r){return{row:r.row,column:r.column}},o.prototype.pos=function(r,t){return{row:r,column:t}},o.prototype.$clipPosition=function(r){var t=this.getLength();return r.row>=t?(r.row=Math.max(0,t-1),r.column=this.getLine(t-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,t){r=Math.min(Math.max(r,0),this.getLength());var e=0;r<this.getLength()?(t=t.concat([""]),e=0):(t=[""].concat(t),r--,e=this.$lines[r].length),this.insertMergedLines({row:r,column:e},t)},o.prototype.insertMergedLines=function(r,t){var e=this.clippedPos(r.row,r.column),i={row:e.row+t.length-1,column:(t.length==1?e.column:0)+t[t.length-1].length};return this.applyDelta({start:e,end:i,action:"insert",lines:t}),this.clonePos(i)},o.prototype.remove=function(r){var t=this.clippedPos(r.start.row,r.start.column),e=this.clippedPos(r.end.row,r.end.column);return this.applyDelta({start:t,end:e,action:"remove",lines:this.getLinesForRange({start:t,end:e})}),this.clonePos(t)},o.prototype.removeInLine=function(r,t,e){var i=this.clippedPos(r,t),s=this.clippedPos(r,e);return this.applyDelta({start:i,end:s,action:"remove",lines:this.getLinesForRange({start:i,end:s})},!0),this.clonePos(i)},o.prototype.removeFullLines=function(r,t){r=Math.min(Math.max(0,r),this.getLength()-1),t=Math.min(Math.max(0,t),this.getLength()-1);var e=t==this.getLength()-1&&r>0,i=t<this.getLength()-1,s=e?r-1:r,p=e?this.getLine(s).length:0,m=i?t+1:t,_=i?0:this.getLine(m).length,A=new a(s,p,m,_),C=this.$lines.slice(r,t+1);return this.applyDelta({start:A.start,end:A.end,action:"remove",lines:this.getLinesForRange(A)}),C},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,t){if(r instanceof a||(r=a.fromPoints(r.start,r.end)),t.length===0&&r.isEmpty())return r.start;if(t==this.getTextRange(r))return r.end;this.remove(r);var e;return t?e=this.insert(r.start,t):e=r.start,e},o.prototype.applyDeltas=function(r){for(var t=0;t<r.length;t++)this.applyDelta(r[t])},o.prototype.revertDeltas=function(r){for(var t=r.length-1;t>=0;t--)this.revertDelta(r[t])},o.prototype.applyDelta=function(r,t){var e=r.action=="insert";(e?r.lines.length<=1&&!r.lines[0]:!a.comparePoints(r.start,r.end))||(e&&r.lines.length>2e4?this.$splitAndapplyLargeDelta(r,2e4):(S(this.$lines,r,t),this._signal("change",r)))},o.prototype.$safeApplyDelta=function(r){var t=this.$lines.length;(r.action=="remove"&&r.start.row<t&&r.end.row<t||r.action=="insert"&&r.start.row<=t)&&this.applyDelta(r)},o.prototype.$splitAndapplyLargeDelta=function(r,t){for(var e=r.lines,i=e.length-t+1,s=r.start.row,p=r.start.column,m=0,_=0;m<i;m=_){_+=t-1;var A=e.slice(m,_);A.push(""),this.applyDelta({start:this.pos(s+m,p),end:this.pos(s+_,p=0),action:r.action,lines:A},!0)}r.lines=e.slice(m),r.start.row=s+m,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,t){for(var e=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,s=t||0,p=e.length;s<p;s++)if(r-=e[s].length+i,r<0)return{row:s,column:r+e[s].length+i};return{row:p-1,column:r+e[p-1].length+i}},o.prototype.positionToIndex=function(r,t){for(var e=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,s=0,p=Math.min(r.row,e.length),m=t||0;m<p;++m)s+=e[m].length+i;return s+r.column},o.prototype.$split=function(r){return r.split(/\r\n|\r|\n/)},o}();n.prototype.$autoNewLine="",n.prototype.$newLineMode="auto",E.implement(n.prototype,x),g.Document=n}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(f,g,at){var E=f("./lib/oop"),S=f("./lib/event_emitter").EventEmitter,x=function(){function a(u,n){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=u;var o=this;this.$worker=function(){if(o.running){for(var r=new Date,t=o.currentLine,e=-1,i=o.doc,s=t;o.lines[t];)t++;var p=i.getLength(),m=0;for(o.running=!1;t<p;){o.$tokenizeRow(t),e=t;do t++;while(o.lines[t]);if(m++,m%5===0&&new Date-r>20){o.running=setTimeout(o.$worker,20);break}}o.currentLine=t,e==-1&&(e=t),s<=e&&o.fireUpdateEvent(s,e)}}}return a.prototype.setTokenizer=function(u){this.tokenizer=u,this.lines=[],this.states=[],this.start(0)},a.prototype.setDocument=function(u){this.doc=u,this.lines=[],this.states=[],this.stop()},a.prototype.fireUpdateEvent=function(u,n){var o={first:u,last:n};this._signal("update",{data:o})},a.prototype.start=function(u){this.currentLine=Math.min(u||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)},a.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},a.prototype.$updateOnChange=function(u){var n=u.start.row,o=u.end.row-n;if(o===0)this.lines[n]=null;else if(u.action=="remove")this.lines.splice(n,o+1,null),this.states.splice(n,o+1,null);else{var r=Array(o+1);r.unshift(n,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(n,this.currentLine,this.doc.getLength()),this.stop()},a.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},a.prototype.getTokens=function(u){return this.lines[u]||this.$tokenizeRow(u)},a.prototype.getState=function(u){return this.currentLine==u&&this.$tokenizeRow(u),this.states[u]||"start"},a.prototype.$tokenizeRow=function(u){var n=this.doc.getLine(u),o=this.states[u-1],r=this.tokenizer.getLineTokens(n,o,u);return this.states[u]+""!=r.state+""?(this.states[u]=r.state,this.lines[u+1]=null,this.currentLine>u+1&&(this.currentLine=u+1)):this.currentLine==u&&(this.currentLine=u+1),this.lines[u]=r.tokens},a.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},a}();E.implement(x.prototype,S),g.BackgroundTokenizer=x}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(f,g,at){var E=f("./lib/lang"),S=f("./range").Range,x=function(){function a(u,n,o){o===void 0&&(o="text"),this.setRegexp(u),this.clazz=n,this.type=o,this.docLen=0}return a.prototype.setRegexp=function(u){this.regExp+""!=u+""&&(this.regExp=u,this.cache=[])},a.prototype.update=function(u,n,o,r){if(this.regExp){for(var t=r.firstRow,e=r.lastRow,i={},s=o.$editor&&o.$editor.$search,p=s&&s.$isMultilineSearch(o.$editor.getLastSearchOptions()),m=t;m<=e;m++){var _=this.cache[m];if(_==null||o.getValue().length!=this.docLen){if(p){_=[];var A=s.$multiLineForward(o,this.regExp,m,e);if(A){var C=A.endRow<=e?A.endRow-1:e;C>m&&(m=C),_.push(new S(A.startRow,A.startCol,A.endRow,A.endCol))}_.length>this.MAX_RANGES&&(_=_.slice(0,this.MAX_RANGES))}else _=E.getMatchOffsets(o.getLine(m),this.regExp),_.length>this.MAX_RANGES&&(_=_.slice(0,this.MAX_RANGES)),_=_.map(function(q){return new S(m,q.offset,m,q.offset+q.length)});this.cache[m]=_.length?_:""}if(_.length!==0)for(var b=_.length;b--;){var Me=_[b].toScreenRange(o),Re=Me.toString();i[Re]||(i[Re]=!0,n.drawSingleLineMarker(u,Me,this.clazz,r))}}this.docLen=o.getValue().length}},a}();x.prototype.MAX_RANGES=500,g.SearchHighlight=x}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(f,g,at){var E=function(){function C(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return C.prototype.addSession=function(b){this.$session=b},C.prototype.add=function(b,Me,Re){if(!this.$fromUndo&&b!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),Me===!1||!this.lastDeltas){this.lastDeltas=[];var q=this.$undoStack.length;q>this.$undoDepth-1&&this.$undoStack.splice(0,q-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),b.id=this.$rev=++this.$maxRev}(b.action=="remove"||b.action=="insert")&&(this.$lastDelta=b),this.lastDeltas.push(b)}},C.prototype.addSelection=function(b,Me){this.selections.push({value:b,rev:Me||this.$rev})},C.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},C.prototype.markIgnored=function(b,Me){Me==null&&(Me=this.$rev+1);for(var Re=this.$undoStack,q=Re.length;q--;){var W=Re[q][0];if(W.id<=b)break;W.id<Me&&(W.ignore=!0)}this.lastDeltas=null},C.prototype.getSelection=function(b,Me){for(var Re=this.selections,q=Re.length;q--;){var W=Re[q];if(W.rev<b)return Me&&(W=Re[q+1]),W}},C.prototype.getRevision=function(){return this.$rev},C.prototype.getDeltas=function(b,Me){Me==null&&(Me=this.$rev+1);for(var Re=this.$undoStack,q=null,W=0,ut=Re.length;ut--;){var G=Re[ut][0];if(G.id<Me&&!q&&(q=ut+1),G.id<=b){W=ut+1;break}}return Re.slice(W,q)},C.prototype.getChangedRanges=function(b,Me){Me==null&&(Me=this.$rev+1)},C.prototype.getChangedLines=function(b,Me){Me==null&&(Me=this.$rev+1)},C.prototype.undo=function(b,Me){this.lastDeltas=null;var Re=this.$undoStack;if(S(Re,Re.length)){b||(b=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var q=Re.pop(),W=null;return q&&(W=b.undoChanges(q,Me),this.$redoStack.push(q),this.$syncRev()),this.$fromUndo=!1,W}},C.prototype.redo=function(b,Me){if(this.lastDeltas=null,b||(b=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var Re=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);A(this.$redoStack,Re),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(ut){ut[0].id=++this.$maxRev},this)}var q=this.$redoStack.pop(),W=null;return q&&(W=b.redoChanges(q,Me),this.$undoStack.push(q),this.$syncRev()),this.$fromUndo=!1,W},C.prototype.$syncRev=function(){var b=this.$undoStack,Me=b[b.length-1],Re=Me&&Me[0].id||0;this.$redoStackBaseRev=Re,this.$rev=Re},C.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=[]},C.prototype.canUndo=function(){return this.$undoStack.length>0},C.prototype.canRedo=function(){return this.$redoStack.length>0},C.prototype.bookmark=function(b){b==null&&(b=this.$rev),this.mark=b},C.prototype.isAtBookmark=function(){return this.$rev===this.mark},C.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},C.prototype.fromJSON=function(b){this.reset(),this.$undoStack=b.$undoStack,this.$redoStack=b.$redoStack},C.prototype.$prettyPrint=function(b){return b?o(b):o(this.$undoStack)+`
|
195
|
+
---
|
196
|
+
`+o(this.$redoStack)},C}();E.prototype.hasUndo=E.prototype.canUndo,E.prototype.hasRedo=E.prototype.canRedo,E.prototype.isClean=E.prototype.isAtBookmark,E.prototype.markClean=E.prototype.bookmark;function S(C,b){for(var Me=b;Me--;){var Re=C[Me];if(Re&&!Re[0].ignore){for(;Me<b-1;){var q=e(C[Me],C[Me+1]);C[Me]=q[0],C[Me+1]=q[1],Me++}return!0}}}var x=f("./range").Range,a=x.comparePoints;x.comparePoints;function u(C){return{row:C.row,column:C.column}}function n(C){return{start:u(C.start),end:u(C.end),action:C.action,lines:C.lines.slice()}}function o(C){if(C=C||this,Array.isArray(C))return C.map(o).join(`
|
197
|
+
`);var b="";return C.action?(b=C.action=="insert"?"+":"-",b+="["+C.lines+"]"):C.value&&(Array.isArray(C.value)?b=C.value.map(r).join(`
|
198
|
+
`):b=r(C.value)),C.start&&(b+=r(C)),(C.id||C.rev)&&(b+=" ("+(C.id||C.rev)+")"),b}function r(C){return C.start.row+":"+C.start.column+"=>"+C.end.row+":"+C.end.column}function t(C,b){var Me=C.action=="insert",Re=b.action=="insert";if(Me&&Re)if(a(b.start,C.end)>=0)s(b,C,-1);else if(a(b.start,C.start)<=0)s(C,b,1);else return null;else if(Me&&!Re)if(a(b.start,C.end)>=0)s(b,C,-1);else if(a(b.end,C.start)<=0)s(C,b,-1);else return null;else if(!Me&&Re)if(a(b.start,C.start)>=0)s(b,C,1);else if(a(b.start,C.start)<=0)s(C,b,1);else return null;else if(!Me&&!Re)if(a(b.start,C.start)>=0)s(b,C,1);else if(a(b.end,C.start)<=0)s(C,b,-1);else return null;return[b,C]}function e(C,b){for(var Me=C.length;Me--;)for(var Re=0;Re<b.length;Re++)if(!t(C[Me],b[Re])){for(;Me<C.length;){for(;Re--;)t(b[Re],C[Me]);Re=b.length,Me++}return[C,b]}return C.selectionBefore=b.selectionBefore=C.selectionAfter=b.selectionAfter=null,[b,C]}function i(C,b){var Me=C.action=="insert",Re=b.action=="insert";if(Me&&Re)a(C.start,b.start)<0?s(b,C,1):s(C,b,1);else if(Me&&!Re)a(C.start,b.end)>=0?s(C,b,-1):(a(C.start,b.start)<=0||s(C,x.fromPoints(b.start,C.start),-1),s(b,C,1));else if(!Me&&Re)a(b.start,C.end)>=0?s(b,C,-1):(a(b.start,C.start)<=0||s(b,x.fromPoints(C.start,b.start),-1),s(C,b,1));else if(!Me&&!Re)if(a(b.start,C.end)>=0)s(b,C,-1);else if(a(b.end,C.start)<=0)s(C,b,-1);else{var q,W;return a(C.start,b.start)<0&&(q=C,C=m(C,b.start)),a(C.end,b.end)>0&&(W=m(C,b.end)),p(b.end,C.start,C.end,-1),W&&!q&&(C.lines=W.lines,C.start=W.start,C.end=W.end,W=C),[b,q,W].filter(Boolean)}return[b,C]}function s(C,b,Me){p(C.start,b.start,b.end,Me),p(C.end,b.start,b.end,Me)}function p(C,b,Me,Re){C.row==(Re==1?b:Me).row&&(C.column+=Re*(Me.column-b.column)),C.row+=Re*(Me.row-b.row)}function m(C,b){var Me=C.lines,Re=C.end;C.end=u(b);var q=C.end.row-C.start.row,W=Me.splice(q,Me.length),ut=q?b.column:b.column-C.start.column;Me.push(W[0].substring(0,ut)),W[0]=W[0].substr(ut);var G={start:u(b),end:Re,lines:W,action:C.action};return G}function _(C,b){b=n(b);for(var Me=C.length;Me--;){for(var Re=C[Me],q=0;q<Re.length;q++){var W=Re[q],ut=i(W,b);b=ut[0],ut.length!=2&&(ut[2]?(Re.splice(q+1,1,ut[1],ut[2]),q++):ut[1]||(Re.splice(q,1),q--))}Re.length||C.splice(Me,1)}return C}function A(C,b){for(var Me=0;Me<b.length;Me++)for(var Re=b[Me],q=0;q<Re.length;q++)_(C,Re[q])}g.UndoManager=E}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(f,g,at){var E=f("../range").Range,S=function(){function x(a,u){this.foldData=a,Array.isArray(u)?this.folds=u:u=this.folds=[u];var n=u[u.length-1];this.range=new E(u[0].start.row,u[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(o){o.setFoldLine(this)},this)}return x.prototype.shiftRow=function(a){this.start.row+=a,this.end.row+=a,this.folds.forEach(function(u){u.start.row+=a,u.end.row+=a})},x.prototype.addFold=function(a){if(a.sameRow){if(a.start.row<this.startRow||a.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(a),this.folds.sort(function(u,n){return-u.range.compareEnd(n.start.row,n.start.column)}),this.range.compareEnd(a.start.row,a.start.column)>0?(this.end.row=a.end.row,this.end.column=a.end.column):this.range.compareStart(a.end.row,a.end.column)<0&&(this.start.row=a.start.row,this.start.column=a.start.column)}else if(a.start.row==this.end.row)this.folds.push(a),this.end.row=a.end.row,this.end.column=a.end.column;else if(a.end.row==this.start.row)this.folds.unshift(a),this.start.row=a.start.row,this.start.column=a.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");a.foldLine=this},x.prototype.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},x.prototype.walk=function(a,u,n){var o=0,r=this.folds,t,e,i,s=!0;u==null&&(u=this.end.row,n=this.end.column);for(var p=0;p<r.length;p++){if(t=r[p],e=t.range.compareStart(u,n),e==-1){a(null,u,n,o,s);return}if(i=a(null,t.start.row,t.start.column,o,s),i=!i&&a(t.placeholder,t.start.row,t.start.column,o),i||e===0)return;s=!t.sameRow,o=t.end.column}a(null,u,n,o,s)},x.prototype.getNextFoldTo=function(a,u){for(var n,o,r=0;r<this.folds.length;r++){if(n=this.folds[r],o=n.range.compareEnd(a,u),o==-1)return{fold:n,kind:"after"};if(o===0)return{fold:n,kind:"inside"}}return null},x.prototype.addRemoveChars=function(a,u,n){var o=this.getNextFoldTo(a,u),r,t;if(o){if(r=o.fold,o.kind=="inside"&&r.start.column!=u&&r.start.row!=a)window.console&&window.console.log(a,u,r);else if(r.start.row==a){t=this.folds;var e=t.indexOf(r);for(e===0&&(this.start.column+=n),e;e<t.length;e++){if(r=t[e],r.start.column+=n,!r.sameRow)return;r.end.column+=n}this.end.column+=n}}},x.prototype.split=function(a,u){var n=this.getNextFoldTo(a,u);if(!n||n.kind=="inside")return null;var o=n.fold,r=this.folds,t=this.foldData,e=r.indexOf(o),i=r[e-1];this.end.row=i.end.row,this.end.column=i.end.column,r=r.splice(e,r.length-e);var s=new x(t,r);return t.splice(t.indexOf(this)+1,0,s),s},x.prototype.merge=function(a){for(var u=a.folds,n=0;n<u.length;n++)this.addFold(u[n]);var o=this.foldData;o.splice(o.indexOf(a),1)},x.prototype.toString=function(){var a=[this.range.toString()+": ["];return this.folds.forEach(function(u){a.push(" "+u.toString())}),a.push("]"),a.join(`
|
199
|
+
`)},x.prototype.idxToPosition=function(a){for(var u=0,n=0;n<this.folds.length;n++){var o=this.folds[n];if(a-=o.start.column-u,a<0)return{row:o.start.row,column:o.start.column+a};if(a-=o.placeholder.length,a<0)return o.start;u=o.end.column}return{row:this.end.row,column:this.end.column+a}},x}();g.FoldLine=S}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(f,g,at){var E=f("./range").Range,S=E.comparePoints,x=function(){function a(){this.ranges=[],this.$bias=1}return a.prototype.pointIndex=function(u,n,o){for(var r=this.ranges,t=o||0;t<r.length;t++){var e=r[t],i=S(u,e.end);if(!(i>0)){var s=S(u,e.start);return i===0?n&&s!==0?-t-2:t:s>0||s===0&&!n?t:-t-1}}return-t-1},a.prototype.add=function(u){var n=!u.isEmpty(),o=this.pointIndex(u.start,n);o<0&&(o=-o-1);var r=this.pointIndex(u.end,n,o);return r<0?r=-r-1:r++,this.ranges.splice(o,r-o,u)},a.prototype.addList=function(u){for(var n=[],o=u.length;o--;)n.push.apply(n,this.add(u[o]));return n},a.prototype.substractPoint=function(u){var n=this.pointIndex(u);if(n>=0)return this.ranges.splice(n,1)},a.prototype.merge=function(){var u=[],n=this.ranges;n=n.sort(function(i,s){return S(i.start,s.start)});for(var o=n[0],r,t=1;t<n.length;t++){r=o,o=n[t];var e=S(r.end,o.start);e<0||e==0&&!r.isEmpty()&&!o.isEmpty()||(S(r.end,o.end)<0&&(r.end.row=o.end.row,r.end.column=o.end.column),n.splice(t,1),u.push(o),o=r,t--)}return this.ranges=n,u},a.prototype.contains=function(u,n){return this.pointIndex({row:u,column:n})>=0},a.prototype.containsPoint=function(u){return this.pointIndex(u)>=0},a.prototype.rangeAtPoint=function(u){var n=this.pointIndex(u);if(n>=0)return this.ranges[n]},a.prototype.clipRows=function(u,n){var o=this.ranges;if(o[0].start.row>n||o[o.length-1].start.row<u)return[];var r=this.pointIndex({row:u,column:0});r<0&&(r=-r-1);var t=this.pointIndex({row:n,column:0},r);t<0&&(t=-t-1);for(var e=[],i=r;i<t;i++)e.push(o[i]);return e},a.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},a.prototype.attach=function(u){this.session&&this.detach(),this.session=u,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},a.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},a.prototype.$onChange=function(u){for(var n=u.start,o=u.end,r=n.row,t=o.row,e=this.ranges,i=0,s=e.length;i<s;i++){var p=e[i];if(p.end.row>=r)break}if(u.action=="insert")for(var m=t-r,_=-n.column+o.column;i<s;i++){var p=e[i];if(p.start.row>r)break;if(p.start.row==r&&p.start.column>=n.column&&(p.start.column==n.column&&this.$bias<=0||(p.start.column+=_,p.start.row+=m)),p.end.row==r&&p.end.column>=n.column){if(p.end.column==n.column&&this.$bias<0)continue;p.end.column==n.column&&_>0&&i<s-1&&p.end.column>p.start.column&&p.end.column==e[i+1].start.column&&(p.end.column-=_),p.end.column+=_,p.end.row+=m}}else for(var m=r-t,_=n.column-o.column;i<s;i++){var p=e[i];if(p.start.row>t)break;p.end.row<t&&(r<p.end.row||r==p.end.row&&n.column<p.end.column)?(p.end.row=r,p.end.column=n.column):p.end.row==t?p.end.column<=o.column?(m||p.end.column>n.column)&&(p.end.column=n.column,p.end.row=n.row):(p.end.column+=_,p.end.row+=m):p.end.row>t&&(p.end.row+=m),p.start.row<t&&(r<p.start.row||r==p.start.row&&n.column<p.start.column)?(p.start.row=r,p.start.column=n.column):p.start.row==t?p.start.column<=o.column?(m||p.start.column>n.column)&&(p.start.column=n.column,p.start.row=n.row):(p.start.column+=_,p.start.row+=m):p.start.row>t&&(p.start.row+=m)}if(m!=0&&i<s)for(;i<s;i++){var p=e[i];p.start.row+=m,p.end.row+=m}},a}();x.prototype.comparePoints=S,g.RangeList=x}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(f,g,at){var E=this&&this.__extends||function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,s){i.__proto__=s}||function(i,s){for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&(i[p]=s[p])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function i(){this.constructor=t}t.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)}}(),S=f("../range_list").RangeList,x=function(r){E(t,r);function t(e,i){var s=r.call(this)||this;return s.foldLine=null,s.placeholder=i,s.range=e,s.start=e.start,s.end=e.end,s.sameRow=e.start.row==e.end.row,s.subFolds=s.ranges=[],s}return t.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},t.prototype.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(i){i.setFoldLine(e)})},t.prototype.clone=function(){var e=this.range.clone(),i=new t(e,this.placeholder);return this.subFolds.forEach(function(s){i.subFolds.push(s.clone())}),i.collapseChildren=this.collapseChildren,i},t.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){u(e,this.start);for(var _=e.start.row,A=e.start.column,i=0,s=-1;i<this.subFolds.length&&(s=this.subFolds[i].range.compare(_,A),s==1);i++);var p=this.subFolds[i],m=0;if(s==0){if(p.range.containsRange(e))return p.addSubFold(e);m=1}for(var _=e.range.end.row,A=e.range.end.column,C=i,s=-1;C<this.subFolds.length&&(s=this.subFolds[C].range.compare(_,A),s==1);C++);s==0&&C++;for(var b=this.subFolds.splice(i,C-i,e),Me=s==0?b.length-1:b.length,Re=m;Re<Me;Re++)e.addSubFold(b[Re]);return e.setFoldLine(this.foldLine),e}},t.prototype.restoreRange=function(e){return o(e,this.start)},t}(S);function a(r,t){r.row-=t.row,r.row==0&&(r.column-=t.column)}function u(r,t){a(r.start,t),a(r.end,t)}function n(r,t){r.row==0&&(r.column+=t.column),r.row+=t.row}function o(r,t){n(r.start,t),n(r.end,t)}g.Fold=x}),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,at){var E=f("../range").Range,S=f("./fold_line").FoldLine,x=f("./fold").Fold,a=f("../token_iterator").TokenIterator,u=f("../mouse/mouse_event").MouseEvent;function n(){this.getFoldAt=function(o,r,t){var e=this.getFoldLine(o);if(!e)return null;for(var i=e.folds,s=0;s<i.length;s++){var p=i[s].range;if(p.contains(o,r)){if(t==1&&p.isEnd(o,r)&&!p.isEmpty())continue;if(t==-1&&p.isStart(o,r)&&!p.isEmpty())continue;return i[s]}}},this.getFoldsInRange=function(o){var r=o.start,t=o.end,e=this.$foldData,i=[];r.column+=1,t.column-=1;for(var s=0;s<e.length;s++){var p=e[s].range.compareRange(o);if(p!=2){if(p==-2)break;for(var m=e[s].folds,_=0;_<m.length;_++){var A=m[_];if(p=A.range.compareRange(o),p==-2)break;if(p==2)continue;if(p==42)break;i.push(A)}}}return r.column-=1,t.column+=1,i},this.getFoldsInRangeList=function(o){if(Array.isArray(o)){var r=[];o.forEach(function(t){r=r.concat(this.getFoldsInRange(t))},this)}else var r=this.getFoldsInRange(o);return r},this.getAllFolds=function(){for(var o=[],r=this.$foldData,t=0;t<r.length;t++)for(var e=0;e<r[t].folds.length;e++)o.push(r[t].folds[e]);return o},this.getFoldStringAt=function(o,r,t,e){if(e=e||this.getFoldLine(o),!e)return null;for(var i={end:{column:0}},s,p,m=0;m<e.folds.length;m++){p=e.folds[m];var _=p.range.compareEnd(o,r);if(_==-1){s=this.getLine(p.start.row).substring(i.end.column,p.start.column);break}else if(_===0)return null;i=p}return s||(s=this.getLine(p.start.row).substring(i.end.column)),t==-1?s.substring(0,r-i.end.column):t==1?s.substring(r-i.end.column):s},this.getFoldLine=function(o,r){var t=this.$foldData,e=0;for(r&&(e=t.indexOf(r)),e==-1&&(e=0),e;e<t.length;e++){var i=t[e];if(i.start.row<=o&&i.end.row>=o)return i;if(i.end.row>o)return null}return null},this.getNextFoldLine=function(o,r){var t=this.$foldData,e=0;for(r&&(e=t.indexOf(r)),e==-1&&(e=0),e;e<t.length;e++){var i=t[e];if(i.end.row>=o)return i}return null},this.getFoldedRowCount=function(o,r){for(var t=this.$foldData,e=r-o+1,i=0;i<t.length;i++){var s=t[i],p=s.end.row,m=s.start.row;if(p>=r){m<r&&(m>=o?e-=r-m:e=0);break}else p>=o&&(m>=o?e-=p-m:e-=p-o+1)}return e},this.$addFoldLine=function(o){return this.$foldData.push(o),this.$foldData.sort(function(r,t){return r.start.row-t.start.row}),o},this.addFold=function(o,r){var t=this.$foldData,e=!1,i;o instanceof x?i=o:(i=new x(r,o),i.collapseChildren=r.collapseChildren),this.$clipRangeToDocument(i.range);var s=i.start.row,p=i.start.column,m=i.end.row,_=i.end.column,A=this.getFoldAt(s,p,1),C=this.getFoldAt(m,_,-1);if(A&&C==A)return A.addSubFold(i);A&&!A.range.isStart(s,p)&&this.removeFold(A),C&&!C.range.isEnd(m,_)&&this.removeFold(C);var b=this.getFoldsInRange(i.range);b.length>0&&(this.removeFolds(b),i.collapseChildren||b.forEach(function(W){i.addSubFold(W)}));for(var Me=0;Me<t.length;Me++){var Re=t[Me];if(m==Re.start.row){Re.addFold(i),e=!0;break}else if(s==Re.end.row){if(Re.addFold(i),e=!0,!i.sameRow){var q=t[Me+1];if(q&&q.start.row==m){Re.merge(q);break}}break}else if(m<=Re.start.row)break}return e||(Re=this.$addFoldLine(new S(this.$foldData,i))),this.$useWrapMode?this.$updateWrapData(Re.start.row,Re.start.row):this.$updateRowLengthCache(Re.start.row,Re.start.row),this.$modified=!0,this._signal("changeFold",{data:i,action:"add"}),i},this.addFolds=function(o){o.forEach(function(r){this.addFold(r)},this)},this.removeFold=function(o){var r=o.foldLine,t=r.start.row,e=r.end.row,i=this.$foldData,s=r.folds;if(s.length==1)i.splice(i.indexOf(r),1);else if(r.range.isEnd(o.end.row,o.end.column))s.pop(),r.end.row=s[s.length-1].end.row,r.end.column=s[s.length-1].end.column;else if(r.range.isStart(o.start.row,o.start.column))s.shift(),r.start.row=s[0].start.row,r.start.column=s[0].start.column;else if(o.sameRow)s.splice(s.indexOf(o),1);else{var p=r.split(o.start.row,o.start.column);s=p.folds,s.shift(),p.start.row=s[0].start.row,p.start.column=s[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(t,e):this.$updateRowLengthCache(t,e)),this.$modified=!0,this._signal("changeFold",{data:o,action:"remove"})},this.removeFolds=function(o){for(var r=[],t=0;t<o.length;t++)r.push(o[t]);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 t,e;if(o==null)t=new E(0,0,this.getLength(),0),r==null&&(r=!0);else if(typeof o=="number")t=new E(o,0,o,this.getLine(o).length);else if("row"in o)t=E.fromPoints(o,o);else{if(Array.isArray(o))return e=[],o.forEach(function(s){e=e.concat(this.unfold(s))},this),e;t=o}e=this.getFoldsInRangeList(t);for(var i=e;e.length==1&&E.comparePoints(e[0].start,t.start)<0&&E.comparePoints(e[0].end,t.end)>0;)this.expandFolds(e),e=this.getFoldsInRangeList(t);if(r!=!1?this.removeFolds(e):this.expandFolds(e),i.length)return i},this.isRowFolded=function(o,r){return!!this.getFoldLine(o,r)},this.getRowFoldEnd=function(o,r){var t=this.getFoldLine(o,r);return t?t.end.row:o},this.getRowFoldStart=function(o,r){var t=this.getFoldLine(o,r);return t?t.start.row:o},this.getFoldDisplayLine=function(o,r,t,e,i){e==null&&(e=o.start.row),i==null&&(i=0),r==null&&(r=o.end.row),t==null&&(t=this.getLine(r).length);var s=this.doc,p="";return o.walk(function(m,_,A,C){if(!(_<e)){if(_==e){if(A<i)return;C=Math.max(i,C)}m!=null?p+=m:p+=s.getLine(_).substring(C,A)}},r,t),p},this.getDisplayLine=function(o,r,t,e){var i=this.getFoldLine(o);if(i)return this.getFoldDisplayLine(i,o,r,t,e);var s;return s=this.doc.getLine(o),s.substring(e||0,r||s.length)},this.$cloneFoldData=function(){var o=[];return o=this.$foldData.map(function(r){var t=r.folds.map(function(e){return e.clone()});return new S(o,t)}),o},this.toggleFold=function(o){var r=this.selection,t=r.getRange(),e,i;if(t.isEmpty()){var s=t.start;if(e=this.getFoldAt(s.row,s.column),e){this.expandFold(e);return}else if(o){var p=this.getFoldLine(s.row);p&&this.expandFolds(p.folds);return}else(i=this.findMatchingBracket(s))?t.comparePoint(i)==1?t.end=i:(t.start=i,t.start.column++,t.end.column--):(i=this.findMatchingBracket({row:s.row,column:s.column+1}))?(t.comparePoint(i)==1?t.end=i:t.start=i,t.start.column++):t=this.getCommentFoldRange(s.row,s.column)||t}else{var m=this.getFoldsInRange(t);if(o&&m.length){this.expandFolds(m);return}else m.length==1&&(e=m[0])}if(e||(e=this.getFoldAt(t.start.row,t.start.column)),e&&e.range.toString()==t.toString()){this.expandFold(e);return}var _="...";if(!t.isMultiLine()){if(_=this.getTextRange(t),_.length<4)return;_=_.trim().substring(0,2)+".."}this.addFold(_,t)},this.getCommentFoldRange=function(o,r,t){var e=new a(this,o,r),i=e.getCurrentToken(),s=i&&i.type;if(i&&/^comment|string/.test(s)){s=s.match(/comment|string/)[0],s=="comment"&&(s+="|doc-start|\\.doc");var p=new RegExp(s),m=new E;if(t!=1){do i=e.stepBackward();while(i&&p.test(i.type));i=e.stepForward()}m.start.row=e.getCurrentTokenRow(),m.start.column=e.getCurrentTokenColumn()+i.value.length,e=new a(this,o,r);var _=this.getState(e.$row);if(t!=-1){var A=-1;do if(i=e.stepForward(),A==-1){var C=this.getState(e.$row);_.toString()!==C.toString()&&(A=e.$row)}else if(e.$row>A)break;while(i&&p.test(i.type));i=e.stepBackward()}else i=e.getCurrentToken();return m.end.row=e.getCurrentTokenRow(),m.end.column=e.getCurrentTokenColumn(),m.start.row==m.end.row&&m.start.column>m.end.column?void 0:m}},this.foldAll=function(o,r,t,e){t==null&&(t=1e5);var i=this.foldWidgets;if(i){r=r||this.getLength(),o=o||0;for(var s=o;s<r;s++)if(i[s]==null&&(i[s]=this.getFoldWidget(s)),i[s]=="start"&&!(e&&!e(s))){var p=this.getFoldWidgetRange(s);p&&p.isMultiLine()&&p.end.row<=r&&p.start.row>=o&&(s=p.end.row,p.collapseChildren=t,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 t=o.getTokens(r),e=0;e<t.length;e++){var i=t[e];if(!(i.type=="text"&&/^\s+$/.test(i.value)))return!!/comment/.test(i.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 t=this.foldWidgets;if(!t||r&&t[o])return{};for(var e=o-1,i;e>=0;){var s=t[e];if(s==null&&(s=t[e]=this.getFoldWidget(e)),s=="start"){var p=this.getFoldWidgetRange(e);if(i||(i=p),p&&p.end.row>=o)break}e--}return{range:e!==-1&&p,firstRange:i}},this.onFoldWidgetClick=function(o,r){r instanceof u&&(r=r.domEvent);var t={children:r.shiftKey,all:r.ctrlKey||r.metaKey,siblings:r.altKey},e=this.$toggleFoldWidget(o,t);if(!e){var i=r.target||r.srcElement;i&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid")}},this.$toggleFoldWidget=function(o,r){if(this.getFoldWidget){var t=this.getFoldWidget(o),e=this.getLine(o),i=t==="end"?-1:1,s=this.getFoldAt(o,i===-1?0:e.length,i);if(s)return r.children||r.all?this.removeFold(s):this.expandFold(s),s;var p=this.getFoldWidgetRange(o,!0);if(p&&!p.isMultiLine()&&(s=this.getFoldAt(p.start.row,p.start.column,1),s&&p.isEqual(s.range)))return this.removeFold(s),s;if(r.siblings){var m=this.getParentFoldRangeData(o);if(m.range)var _=m.range.start.row+1,A=m.range.end.row;this.foldAll(_,A,r.all?1e4:0)}else r.children?(A=p?p.end.row:this.getLength(),this.foldAll(o+1,A,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 t=this.$toggleFoldWidget(r,{});if(!t){var e=this.getParentFoldRangeData(r,!0);if(t=e.range||e.firstRange,t){r=t.start.row;var i=this.getFoldAt(r,this.getLine(r).length,1);i?this.removeFold(i):this.addFold("...",t)}}},this.updateFoldWidgets=function(o){var r=o.start.row,t=o.end.row-r;if(t===0)this.foldWidgets[r]=null;else if(o.action=="remove")this.foldWidgets.splice(r,t+1,null);else{var e=Array(t+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=n}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(f,g,at){var E=f("../token_iterator").TokenIterator,S=f("../range").Range;function x(){this.findMatchingBracket=function(a,u){if(a.column==0)return null;var n=u||this.getLine(a.row).charAt(a.column-1);if(n=="")return null;var o=n.match(/([\(\[\{])|([\)\]\}])/);return o?o[1]?this.$findClosingBracket(o[1],a):this.$findOpeningBracket(o[2],a):null},this.getBracketRange=function(a){var u=this.getLine(a.row),n=!0,o,r=u.charAt(a.column-1),t=r&&r.match(/([\(\[\{])|([\)\]\}])/);if(t||(r=u.charAt(a.column),a={row:a.row,column:a.column+1},t=r&&r.match(/([\(\[\{])|([\)\]\}])/),n=!1),!t)return null;if(t[1]){var e=this.$findClosingBracket(t[1],a);if(!e)return null;o=S.fromPoints(a,e),n||(o.end.column++,o.start.column--),o.cursor=o.end}else{var e=this.$findOpeningBracket(t[2],a);if(!e)return null;o=S.fromPoints(e,a),n||(o.start.column++,o.end.column--),o.cursor=o.start}return o},this.getMatchingBracketRanges=function(a,u){var n=this.getLine(a.row),o=/([\(\[\{])|([\)\]\}])/,r=!u&&n.charAt(a.column-1),t=r&&r.match(o);if(t||(r=(u===void 0||u)&&n.charAt(a.column),a={row:a.row,column:a.column+1},t=r&&r.match(o)),!t)return null;var e=new S(a.row,a.column-1,a.row,a.column),i=t[1]?this.$findClosingBracket(t[1],a):this.$findOpeningBracket(t[2],a);if(!i)return[e];var s=new S(i.row,i.column,i.row,i.column+1);return[e,s]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(a,u,n){var o=this.$brackets[a],r=1,t=new E(this,u.row,u.column),e=t.getCurrentToken();if(e||(e=t.stepForward()),!!e){n||(n=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var i=u.column-t.getCurrentTokenColumn()-2,s=e.value;;){for(;i>=0;){var p=s.charAt(i);if(p==o){if(r-=1,r==0)return{row:t.getCurrentTokenRow(),column:i+t.getCurrentTokenColumn()}}else p==a&&(r+=1);i-=1}do e=t.stepBackward();while(e&&!n.test(e.type));if(e==null)break;s=e.value,i=s.length-1}return null}},this.$findClosingBracket=function(a,u,n){var o=this.$brackets[a],r=1,t=new E(this,u.row,u.column),e=t.getCurrentToken();if(e||(e=t.stepForward()),!!e){n||(n=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var i=u.column-t.getCurrentTokenColumn();;){for(var s=e.value,p=s.length;i<p;){var m=s.charAt(i);if(m==o){if(r-=1,r==0)return{row:t.getCurrentTokenRow(),column:i+t.getCurrentTokenColumn()}}else m==a&&(r+=1);i+=1}do e=t.stepForward();while(e&&!n.test(e.type));if(e==null)break;i=0}return null}},this.getMatchingTags=function(a){var u=new E(this,a.row,a.column),n=this.$findTagName(u);if(n){var o=u.stepBackward();return o.value==="<"?this.$findClosingTag(u,n):this.$findOpeningTag(u,n)}},this.$findTagName=function(a){var u=a.getCurrentToken(),n=!1,o=!1;if(u&&u.type.indexOf("tag-name")===-1)do o?u=a.stepBackward():u=a.stepForward(),u&&(u.value==="/>"?o=!0:u.type.indexOf("tag-name")!==-1&&(n=!0));while(u&&!n);return u},this.$findClosingTag=function(a,u){var n,o=u.value,r=u.value,t=0,e=new S(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);u=a.stepForward();var i=new S(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+u.value.length),s=!1;do{if(n=u,n.type.indexOf("tag-close")!==-1&&!s){var p=new S(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);s=!0}if(u=a.stepForward(),u){if(u.value===">"&&!s){var p=new S(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);s=!0}if(u.type.indexOf("tag-name")!==-1){if(o=u.value,r===o){if(n.value==="<")t++;else if(n.value==="</"&&(t--,t<0)){a.stepBackward();var m=new S(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2);u=a.stepForward();var _=new S(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+u.value.length);if(u.type.indexOf("tag-close")===-1&&(u=a.stepForward()),u&&u.value===">")var A=new S(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);else return}}}else if(r===o&&u.value==="/>"&&(t--,t<0))var m=new S(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2),_=m,A=_,p=new S(i.end.row,i.end.column,i.end.row,i.end.column+1)}}while(u&&t>=0);if(e&&p&&m&&A&&i&&_)return{openTag:new S(e.start.row,e.start.column,p.end.row,p.end.column),closeTag:new S(m.start.row,m.start.column,A.end.row,A.end.column),openTagName:i,closeTagName:_}},this.$findOpeningTag=function(a,u){var n=a.getCurrentToken(),o=u.value,r=0,t=a.getCurrentTokenRow(),e=a.getCurrentTokenColumn(),i=e+2,s=new S(t,e,t,i);a.stepForward();var p=new S(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+u.value.length);if(u.type.indexOf("tag-close")===-1&&(u=a.stepForward()),!(!u||u.value!==">")){var m=new S(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);a.stepBackward(),a.stepBackward();do if(u=n,t=a.getCurrentTokenRow(),e=a.getCurrentTokenColumn(),i=e+u.value.length,n=a.stepBackward(),u){if(u.type.indexOf("tag-name")!==-1){if(o===u.value)if(n.value==="<"){if(r++,r>0){var _=new S(t,e,t,i),A=new S(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);do u=a.stepForward();while(u&&u.value!==">");var C=new S(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1)}}else n.value==="</"&&r--}else if(u.value==="/>"){for(var b=0,Me=n;Me;){if(Me.type.indexOf("tag-name")!==-1&&Me.value===o){r--;break}else if(Me.value==="<")break;Me=a.stepBackward(),b++}for(var Re=0;Re<b;Re++)a.stepForward()}}while(n&&r<=0);if(A&&C&&s&&m&&_&&p)return{openTag:new S(A.start.row,A.start.column,C.end.row,C.end.column),closeTag:new S(s.start.row,s.start.column,m.end.row,m.end.column),openTagName:_,closeTagName:p}}}}g.BracketMatch=x}),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,at){var E=f("./lib/oop"),S=f("./lib/lang"),x=f("./bidihandler").BidiHandler,a=f("./config"),u=f("./lib/event_emitter").EventEmitter,n=f("./selection").Selection,o=f("./mode/text").Mode,r=f("./range").Range,t=f("./line_widgets").LineWidgets,e=f("./document").Document,i=f("./background_tokenizer").BackgroundTokenizer,s=f("./search_highlight").SearchHighlight,p=f("./undomanager").UndoManager,m=function(){function G(D,w){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"+ ++G.$uid,this.$foldData.toString=function(){return this.join(`
|
200
|
+
`)},this.$gutterCustomWidgets={},this.bgTokenizer=new i(new o().getTokenizer(),this);var v=this;this.bgTokenizer.on("update",function(L){v._signal("tokenizerUpdate",L)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof D!="object"||!D.getLine)&&(D=new e(D)),this.setDocument(D),this.selection=new n(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new x(this),a.resetOptions(this),this.setMode(w),a._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return G.prototype.$initOperationListeners=function(){var D=this;this.curOp=null,this.on("change",function(){D.curOp||(D.startOperation(),D.curOp.selectionBefore=D.$lastSel),D.curOp.docChanged=!0},!0),this.on("changeSelection",function(){D.curOp||(D.startOperation(),D.curOp.selectionBefore=D.$lastSel),D.curOp.selectionChanged=!0},!0),this.$operationResetTimer=S.delayedCall(this.endOperation.bind(this,!0))},G.prototype.startOperation=function(D){if(this.curOp){if(!D||this.curOp.command)return;this.prevOp=this.curOp}D||(D={}),this.$operationResetTimer.schedule(),this.curOp={command:D.command||{},args:D.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",D)},G.prototype.endOperation=function(D){if(this.curOp){if(D&&D.returnValue===!1){this.curOp=null,this._signal("endOperation",D);return}if(D==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var w=this.selection.toJSON();this.curOp.selectionAfter=w,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(w),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",D)}},G.prototype.setDocument=function(D){this.doc&&this.doc.off("change",this.$onChange),this.doc=D,D.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},G.prototype.getDocument=function(){return this.doc},Object.defineProperty(G.prototype,"widgetManager",{get:function(){var D=new t(this);return this.widgetManager=D,this.$editor&&D.attach(this.$editor),D},set:function(D){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:D})},enumerable:!1,configurable:!0}),G.prototype.$resetRowCache=function(D){if(!D){this.$docRowCache=[],this.$screenRowCache=[];return}var w=this.$docRowCache.length,v=this.$getRowCacheIndex(this.$docRowCache,D)+1;w>v&&(this.$docRowCache.splice(v,w),this.$screenRowCache.splice(v,w))},G.prototype.$getRowCacheIndex=function(D,w){for(var v=0,L=D.length-1;v<=L;){var lt=v+L>>1,ct=D[lt];if(w>ct)v=lt+1;else if(w<ct)L=lt-1;else return lt}return v-1},G.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},G.prototype.onChangeFold=function(D){var w=D.data;this.$resetRowCache(w.start.row)},G.prototype.onChange=function(D){this.$modified=!0,this.$bidiHandler.onChange(D),this.$resetRowCache(D.start.row);var w=this.$updateInternalDataOnChange(D);!this.$fromUndo&&this.$undoManager&&(w&&w.length&&(this.$undoManager.add({action:"removeFolds",folds:w},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(D,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(D),this._signal("change",D)},G.prototype.onSelectionChange=function(){this._signal("changeSelection")},G.prototype.setValue=function(D){this.doc.setValue(D),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},G.fromJSON=function(D){typeof D=="string"&&(D=JSON.parse(D));var w=new p;w.$undoStack=D.history.undo,w.$redoStack=D.history.redo,w.mark=D.history.mark,w.$rev=D.history.rev;var v=new G(D.value);return D.folds.forEach(function(L){v.addFold("...",r.fromPoints(L.start,L.end))}),v.setAnnotations(D.annotations),v.setBreakpoints(D.breakpoints),v.setMode(D.mode),v.setScrollLeft(D.scrollLeft),v.setScrollTop(D.scrollTop),v.setUndoManager(w),v.selection.fromJSON(D.selection),v},G.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(D){return D.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},G.prototype.toString=function(){return this.doc.getValue()},G.prototype.getSelection=function(){return this.selection},G.prototype.getState=function(D){return this.bgTokenizer.getState(D)},G.prototype.getTokens=function(D){return this.bgTokenizer.getTokens(D)},G.prototype.getTokenAt=function(D,w){var v=this.bgTokenizer.getTokens(D),L,lt=0;if(w==null){var ct=v.length-1;lt=this.getLine(D).length}else for(var ct=0;ct<v.length&&(lt+=v[ct].value.length,!(lt>=w));ct++);return L=v[ct],L?(L.index=ct,L.start=lt-L.value.length,L):null},G.prototype.setUndoManager=function(D){if(this.$undoManager=D,this.$informUndoManager&&this.$informUndoManager.cancel(),D){var w=this;D.addSession(this),this.$syncInformUndoManager=function(){w.$informUndoManager.cancel(),w.mergeUndoDeltas=!1},this.$informUndoManager=S.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},G.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},G.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},G.prototype.getTabString=function(){return this.getUseSoftTabs()?S.stringRepeat(" ",this.getTabSize()):" "},G.prototype.setUseSoftTabs=function(D){this.setOption("useSoftTabs",D)},G.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},G.prototype.setTabSize=function(D){this.setOption("tabSize",D)},G.prototype.getTabSize=function(){return this.$tabSize},G.prototype.isTabStop=function(D){return this.$useSoftTabs&&D.column%this.$tabSize===0},G.prototype.setNavigateWithinSoftTabs=function(D){this.setOption("navigateWithinSoftTabs",D)},G.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},G.prototype.setOverwrite=function(D){this.setOption("overwrite",D)},G.prototype.getOverwrite=function(){return this.$overwrite},G.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},G.prototype.addGutterDecoration=function(D,w){this.$decorations[D]||(this.$decorations[D]=""),this.$decorations[D]+=" "+w,this._signal("changeBreakpoint",{})},G.prototype.removeGutterCustomWidget=function(D){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(D)},G.prototype.addGutterCustomWidget=function(D,w){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(D,w)},G.prototype.removeGutterDecoration=function(D,w){this.$decorations[D]=(this.$decorations[D]||"").replace(" "+w,""),this._signal("changeBreakpoint",{})},G.prototype.getBreakpoints=function(){return this.$breakpoints},G.prototype.setBreakpoints=function(D){this.$breakpoints=[];for(var w=0;w<D.length;w++)this.$breakpoints[D[w]]="ace_breakpoint";this._signal("changeBreakpoint",{})},G.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},G.prototype.setBreakpoint=function(D,w){w===void 0&&(w="ace_breakpoint"),w?this.$breakpoints[D]=w:delete this.$breakpoints[D],this._signal("changeBreakpoint",{})},G.prototype.clearBreakpoint=function(D){delete this.$breakpoints[D],this._signal("changeBreakpoint",{})},G.prototype.addMarker=function(D,w,v,L){var lt=this.$markerId++,ct={range:D,type:v||"line",renderer:typeof v=="function"?v:null,clazz:w,inFront:!!L,id:lt};return L?(this.$frontMarkers[lt]=ct,this._signal("changeFrontMarker")):(this.$backMarkers[lt]=ct,this._signal("changeBackMarker")),lt},G.prototype.addDynamicMarker=function(D,w){if(D.update){var v=this.$markerId++;return D.id=v,D.inFront=!!w,w?(this.$frontMarkers[v]=D,this._signal("changeFrontMarker")):(this.$backMarkers[v]=D,this._signal("changeBackMarker")),D}},G.prototype.removeMarker=function(D){var w=this.$frontMarkers[D]||this.$backMarkers[D];if(w){var v=w.inFront?this.$frontMarkers:this.$backMarkers;delete v[D],this._signal(w.inFront?"changeFrontMarker":"changeBackMarker")}},G.prototype.getMarkers=function(D){return D?this.$frontMarkers:this.$backMarkers},G.prototype.highlight=function(D){if(!this.$searchHighlight){var w=new s(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(w)}this.$searchHighlight.setRegexp(D)},G.prototype.highlightLines=function(D,w,v,L){typeof w!="number"&&(v=w,w=D),v||(v="ace_step");var lt=new r(D,0,w,1/0);return lt.id=this.addMarker(lt,v,"fullLine",L),lt},G.prototype.setAnnotations=function(D){this.$annotations=D,this._signal("changeAnnotation",{})},G.prototype.getAnnotations=function(){return this.$annotations||[]},G.prototype.clearAnnotations=function(){this.setAnnotations([])},G.prototype.$detectNewLine=function(D){var w=D.match(/^.*?(\r?\n)/m);w?this.$autoNewLine=w[1]:this.$autoNewLine=`
|
201
|
+
`},G.prototype.getWordRange=function(D,w){var v=this.getLine(D),L=!1;if(w>0&&(L=!!v.charAt(w-1).match(this.tokenRe)),L||(L=!!v.charAt(w).match(this.tokenRe)),L)var lt=this.tokenRe;else if(/^\s+$/.test(v.slice(w-1,w+1)))var lt=/\s/;else var lt=this.nonTokenRe;var ct=w;if(ct>0){do ct--;while(ct>=0&&v.charAt(ct).match(lt));ct++}for(var Dt=w;Dt<v.length&&v.charAt(Dt).match(lt);)Dt++;return new r(D,ct,D,Dt)},G.prototype.getAWordRange=function(D,w){for(var v=this.getWordRange(D,w),L=this.getLine(v.end.row);L.charAt(v.end.column).match(/[ \t]/);)v.end.column+=1;return v},G.prototype.setNewLineMode=function(D){this.doc.setNewLineMode(D)},G.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},G.prototype.setUseWorker=function(D){this.setOption("useWorker",D)},G.prototype.getUseWorker=function(){return this.$useWorker},G.prototype.onReloadTokenizer=function(D){var w=D.data;this.bgTokenizer.start(w.first),this._signal("tokenizerUpdate",D)},G.prototype.setMode=function(D,w){if(D&&typeof D=="object"){if(D.getTokenizer)return this.$onChangeMode(D);var v=D,L=v.path}else L=D||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new o),this.$modes[L]&&!v){this.$onChangeMode(this.$modes[L]),w&&w();return}this.$modeId=L,a.loadModule(["mode",L],(function(lt){if(!this.destroyed){if(this.$modeId!==L)return w&&w();this.$modes[L]&&!v?this.$onChangeMode(this.$modes[L]):lt&<.Mode&&(lt=new lt.Mode(v),v||(this.$modes[L]=lt,lt.$id=L),this.$onChangeMode(lt)),w&&w()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},G.prototype.$onChangeMode=function(D,w){if(w||(this.$modeId=D.$id),this.$mode!==D){var v=this.$mode;this.$mode=D,this.$stopWorker(),this.$useWorker&&this.$startWorker();var L=D.getTokenizer();if(L.on!==void 0){var lt=this.onReloadTokenizer.bind(this);L.on("update",lt)}this.bgTokenizer.setTokenizer(L),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=D.tokenRe,this.nonTokenRe=D.nonTokenRe,w||(D.attachToSession&&D.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(D.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:v,mode:D}))}},G.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},G.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(D){a.warn("Could not load worker",D),this.$worker=null}},G.prototype.getMode=function(){return this.$mode},G.prototype.setScrollTop=function(D){this.$scrollTop===D||isNaN(D)||(this.$scrollTop=D,this._signal("changeScrollTop",D))},G.prototype.getScrollTop=function(){return this.$scrollTop},G.prototype.setScrollLeft=function(D){this.$scrollLeft===D||isNaN(D)||(this.$scrollLeft=D,this._signal("changeScrollLeft",D))},G.prototype.getScrollLeft=function(){return this.$scrollLeft},G.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},G.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var D=0;return this.lineWidgets.forEach(function(w){w&&w.screenWidth>D&&(D=w.screenWidth)}),this.lineWidgetWidth=D},G.prototype.$computeWidth=function(D){if(this.$modified||D){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var w=this.doc.getAllLines(),v=this.$rowLengthCache,L=0,lt=0,ct=this.$foldData[lt],Dt=ct?ct.start.row:1/0,Wt=w.length,Vt=0;Vt<Wt;Vt++){if(Vt>Dt){if(Vt=ct.end.row+1,Vt>=Wt)break;ct=this.$foldData[lt++],Dt=ct?ct.start.row:1/0}v[Vt]==null&&(v[Vt]=this.$getStringScreenWidth(w[Vt])[0]),v[Vt]>L&&(L=v[Vt])}this.screenWidth=L}},G.prototype.getLine=function(D){return this.doc.getLine(D)},G.prototype.getLines=function(D,w){return this.doc.getLines(D,w)},G.prototype.getLength=function(){return this.doc.getLength()},G.prototype.getTextRange=function(D){return this.doc.getTextRange(D||this.selection.getRange())},G.prototype.insert=function(D,w){return this.doc.insert(D,w)},G.prototype.remove=function(D){return this.doc.remove(D)},G.prototype.removeFullLines=function(D,w){return this.doc.removeFullLines(D,w)},G.prototype.undoChanges=function(D,w){if(D.length){this.$fromUndo=!0;for(var v=D.length-1;v!=-1;v--){var L=D[v];L.action=="insert"||L.action=="remove"?this.doc.revertDelta(L):L.folds&&this.addFolds(L.folds)}!w&&this.$undoSelect&&(D.selectionBefore?this.selection.fromJSON(D.selectionBefore):this.selection.setRange(this.$getUndoSelection(D,!0))),this.$fromUndo=!1}},G.prototype.redoChanges=function(D,w){if(D.length){this.$fromUndo=!0;for(var v=0;v<D.length;v++){var L=D[v];(L.action=="insert"||L.action=="remove")&&this.doc.$safeApplyDelta(L)}!w&&this.$undoSelect&&(D.selectionAfter?this.selection.fromJSON(D.selectionAfter):this.selection.setRange(this.$getUndoSelection(D,!1))),this.$fromUndo=!1}},G.prototype.setUndoSelect=function(D){this.$undoSelect=D},G.prototype.$getUndoSelection=function(D,w){function v(Wt){return w?Wt.action!=="insert":Wt.action==="insert"}for(var L,lt,ct=0;ct<D.length;ct++){var Dt=D[ct];if(Dt.start){if(!L){v(Dt)?L=r.fromPoints(Dt.start,Dt.end):L=r.fromPoints(Dt.start,Dt.start);continue}v(Dt)?(lt=Dt.start,L.compare(lt.row,lt.column)==-1&&L.setStart(lt),lt=Dt.end,L.compare(lt.row,lt.column)==1&&L.setEnd(lt)):(lt=Dt.start,L.compare(lt.row,lt.column)==-1&&(L=r.fromPoints(Dt.start,Dt.start)))}}return L},G.prototype.replace=function(D,w){return this.doc.replace(D,w)},G.prototype.moveText=function(D,w,v){var L=this.getTextRange(D),lt=this.getFoldsInRange(D),ct=r.fromPoints(w,w);if(!v){this.remove(D);var Dt=D.start.row-D.end.row,Wt=Dt?-D.end.column:D.start.column-D.end.column;Wt&&(ct.start.row==D.end.row&&ct.start.column>D.end.column&&(ct.start.column+=Wt),ct.end.row==D.end.row&&ct.end.column>D.end.column&&(ct.end.column+=Wt)),Dt&&ct.start.row>=D.end.row&&(ct.start.row+=Dt,ct.end.row+=Dt)}if(ct.end=this.insert(ct.start,L),lt.length){var Vt=D.start,li=ct.start,Dt=li.row-Vt.row,Wt=li.column-Vt.column;this.addFolds(lt.map(function(Jt){return Jt=Jt.clone(),Jt.start.row==Vt.row&&(Jt.start.column+=Wt),Jt.end.row==Vt.row&&(Jt.end.column+=Wt),Jt.start.row+=Dt,Jt.end.row+=Dt,Jt}))}return ct},G.prototype.indentRows=function(D,w,v){v=v.replace(/\t/g,this.getTabString());for(var L=D;L<=w;L++)this.doc.insertInLine({row:L,column:0},v)},G.prototype.outdentRows=function(D){for(var w=D.collapseRows(),v=new r(0,0,0,0),L=this.getTabSize(),lt=w.start.row;lt<=w.end.row;++lt){var ct=this.getLine(lt);v.start.row=lt,v.end.row=lt;for(var Dt=0;Dt<L&&ct.charAt(Dt)==" ";++Dt);Dt<L&&ct.charAt(Dt)==" "?(v.start.column=Dt,v.end.column=Dt+1):(v.start.column=0,v.end.column=Dt),this.remove(v)}},G.prototype.$moveLines=function(D,w,v){if(D=this.getRowFoldStart(D),w=this.getRowFoldEnd(w),v<0){var L=this.getRowFoldStart(D+v);if(L<0)return 0;var lt=L-D}else if(v>0){var L=this.getRowFoldEnd(w+v);if(L>this.doc.getLength()-1)return 0;var lt=L-w}else{D=this.$clipRowToDocument(D),w=this.$clipRowToDocument(w);var lt=w-D+1}var ct=new r(D,0,w,Number.MAX_VALUE),Dt=this.getFoldsInRange(ct).map(function(Vt){return Vt=Vt.clone(),Vt.start.row+=lt,Vt.end.row+=lt,Vt}),Wt=v==0?this.doc.getLines(D,w):this.doc.removeFullLines(D,w);return this.doc.insertFullLines(D+lt,Wt),Dt.length&&this.addFolds(Dt),lt},G.prototype.moveLinesUp=function(D,w){return this.$moveLines(D,w,-1)},G.prototype.moveLinesDown=function(D,w){return this.$moveLines(D,w,1)},G.prototype.duplicateLines=function(D,w){return this.$moveLines(D,w,0)},G.prototype.$clipRowToDocument=function(D){return Math.max(0,Math.min(D,this.doc.getLength()-1))},G.prototype.$clipColumnToRow=function(D,w){return w<0?0:Math.min(this.doc.getLine(D).length,w)},G.prototype.$clipPositionToDocument=function(D,w){if(w=Math.max(0,w),D<0)D=0,w=0;else{var v=this.doc.getLength();D>=v?(D=v-1,w=this.doc.getLine(v-1).length):w=Math.min(this.doc.getLine(D).length,w)}return{row:D,column:w}},G.prototype.$clipRangeToDocument=function(D){D.start.row<0?(D.start.row=0,D.start.column=0):D.start.column=this.$clipColumnToRow(D.start.row,D.start.column);var w=this.doc.getLength()-1;return D.end.row>w?(D.end.row=w,D.end.column=this.doc.getLine(w).length):D.end.column=this.$clipColumnToRow(D.end.row,D.end.column),D},G.prototype.setUseWrapMode=function(D){if(D!=this.$useWrapMode){if(this.$useWrapMode=D,this.$modified=!0,this.$resetRowCache(0),D){var w=this.getLength();this.$wrapData=Array(w),this.$updateWrapData(0,w-1)}this._signal("changeWrapMode")}},G.prototype.getUseWrapMode=function(){return this.$useWrapMode},G.prototype.setWrapLimitRange=function(D,w){(this.$wrapLimitRange.min!==D||this.$wrapLimitRange.max!==w)&&(this.$wrapLimitRange={min:D,max:w},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},G.prototype.adjustWrapLimit=function(D,w){var v=this.$wrapLimitRange;v.max<0&&(v={min:w,max:w});var L=this.$constrainWrapLimit(D,v.min,v.max);return L!=this.$wrapLimit&&L>1?(this.$wrapLimit=L,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},G.prototype.$constrainWrapLimit=function(D,w,v){return w&&(D=Math.max(w,D)),v&&(D=Math.min(v,D)),D},G.prototype.getWrapLimit=function(){return this.$wrapLimit},G.prototype.setWrapLimit=function(D){this.setWrapLimitRange(D,D)},G.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},G.prototype.$updateInternalDataOnChange=function(D){var w=this.$useWrapMode,v=D.action,L=D.start,lt=D.end,ct=L.row,Dt=lt.row,Wt=Dt-ct,Vt=null;if(this.$updating=!0,Wt!=0)if(v==="remove"){this[w?"$wrapData":"$rowLengthCache"].splice(ct,Wt);var li=this.$foldData;Vt=this.getFoldsInRange(D),this.removeFolds(Vt);var zt=this.getFoldLine(lt.row),Ht=0;if(zt){zt.addRemoveChars(lt.row,lt.column,L.column-lt.column),zt.shiftRow(-Wt);var Jt=this.getFoldLine(ct);Jt&&Jt!==zt&&(Jt.merge(zt),zt=Jt),Ht=li.indexOf(zt)+1}for(Ht;Ht<li.length;Ht++){var zt=li[Ht];zt.start.row>=lt.row&&zt.shiftRow(-Wt)}Dt=ct}else{var ai=Array(Wt);ai.unshift(ct,0);var hi=w?this.$wrapData:this.$rowLengthCache;hi.splice.apply(hi,ai);var li=this.$foldData,zt=this.getFoldLine(ct),Ht=0;if(zt){var ui=zt.range.compareInside(L.row,L.column);ui==0?(zt=zt.split(L.row,L.column),zt&&(zt.shiftRow(Wt),zt.addRemoveChars(Dt,0,lt.column-L.column))):ui==-1&&(zt.addRemoveChars(ct,0,lt.column-L.column),zt.shiftRow(Wt)),Ht=li.indexOf(zt)+1}for(Ht;Ht<li.length;Ht++){var zt=li[Ht];zt.start.row>=ct&&zt.shiftRow(Wt)}}else{Wt=Math.abs(D.start.column-D.end.column),v==="remove"&&(Vt=this.getFoldsInRange(D),this.removeFolds(Vt),Wt=-Wt);var zt=this.getFoldLine(ct);zt&&zt.addRemoveChars(ct,L.column,Wt)}return w&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,w?this.$updateWrapData(ct,Dt):this.$updateRowLengthCache(ct,Dt),Vt},G.prototype.$updateRowLengthCache=function(D,w){this.$rowLengthCache[D]=null,this.$rowLengthCache[w]=null},G.prototype.$updateWrapData=function(D,w){var v=this.doc.getAllLines(),L=this.getTabSize(),lt=this.$wrapData,ct=this.$wrapLimit,Dt,Wt,Vt=D;for(w=Math.min(w,v.length-1);Vt<=w;)Wt=this.getFoldLine(Vt,Wt),Wt?(Dt=[],Wt.walk((function(li,zt,Ht,Jt){var ai;if(li!=null){ai=this.$getDisplayTokens(li,Dt.length),ai[0]=C;for(var hi=1;hi<ai.length;hi++)ai[hi]=b}else ai=this.$getDisplayTokens(v[zt].substring(Jt,Ht),Dt.length);Dt=Dt.concat(ai)}).bind(this),Wt.end.row,v[Wt.end.row].length+1),lt[Wt.start.row]=this.$computeWrapSplits(Dt,ct,L),Vt=Wt.end.row+1):(Dt=this.$getDisplayTokens(v[Vt]),lt[Vt]=this.$computeWrapSplits(Dt,ct,L),Vt++)},G.prototype.$computeWrapSplits=function(D,w,v){if(D.length==0)return[];var L=[],lt=D.length,ct=0,Dt=0,Wt=this.$wrapAsCode,Vt=this.$indentedSoftWrap,li=w<=Math.max(2*v,8)||Vt===!1?0:Math.floor(w/2);function zt(){var ui=0;if(li===0)return ui;if(Vt)for(var pi=0;pi<D.length;pi++){var fi=D[pi];if(fi==Re)ui+=1;else if(fi==q)ui+=v;else{if(fi==W)continue;break}}return Wt&&Vt!==!1&&(ui+=v),Math.min(ui,li)}function Ht(ui){for(var pi=ui-ct,fi=ct;fi<ui;fi++){var gi=D[fi];(gi===12||gi===2)&&(pi-=1)}L.length||(Jt=zt(),L.indent=Jt),Dt+=pi,L.push(Dt),ct=ui}for(var Jt=0;lt-ct>w-Jt;){var ai=ct+w-Jt;if(D[ai-1]>=Re&&D[ai]>=Re){Ht(ai);continue}if(D[ai]==C||D[ai]==b){for(ai;ai!=ct-1&&D[ai]!=C;ai--);if(ai>ct){Ht(ai);continue}for(ai=ct+w,ai;ai<D.length&&D[ai]==b;ai++);if(ai==D.length)break;Ht(ai);continue}for(var hi=Math.max(ai-(w-(w>>2)),ct-1);ai>hi&&D[ai]<C;)ai--;if(Wt){for(;ai>hi&&D[ai]<C;)ai--;for(;ai>hi&&D[ai]==Me;)ai--}else for(;ai>hi&&D[ai]<Re;)ai--;if(ai>hi){Ht(++ai);continue}ai=ct+w,D[ai]==A&&ai--,Ht(ai-Jt)}return L},G.prototype.$getDisplayTokens=function(D,w){var v=[],L;w=w||0;for(var lt=0;lt<D.length;lt++){var ct=D.charCodeAt(lt);if(ct==9){L=this.getScreenTabSize(v.length+w),v.push(q);for(var Dt=1;Dt<L;Dt++)v.push(W)}else ct==32?v.push(Re):ct>39&&ct<48||ct>57&&ct<64?v.push(Me):ct>=4352&&ut(ct)?v.push(_,A):v.push(_)}return v},G.prototype.$getStringScreenWidth=function(D,w,v){if(w==0)return[0,0];w==null&&(w=1/0),v=v||0;var L,lt;for(lt=0;lt<D.length&&(L=D.charCodeAt(lt),L==9?v+=this.getScreenTabSize(v):L>=4352&&ut(L)?v+=2:v+=1,!(v>w));lt++);return[v,lt]},G.prototype.getRowLength=function(D){var w=1;return this.lineWidgets&&(w+=this.lineWidgets[D]&&this.lineWidgets[D].rowCount||0),!this.$useWrapMode||!this.$wrapData[D]?w:this.$wrapData[D].length+w},G.prototype.getRowLineCount=function(D){return!this.$useWrapMode||!this.$wrapData[D]?1:this.$wrapData[D].length+1},G.prototype.getRowWrapIndent=function(D){if(this.$useWrapMode){var w=this.screenToDocumentPosition(D,Number.MAX_VALUE),v=this.$wrapData[w.row];return v.length&&v[0]<w.column?v.indent:0}else return 0},G.prototype.getScreenLastRowColumn=function(D){var w=this.screenToDocumentPosition(D,Number.MAX_VALUE);return this.documentToScreenColumn(w.row,w.column)},G.prototype.getDocumentLastRowColumn=function(D,w){var v=this.documentToScreenRow(D,w);return this.getScreenLastRowColumn(v)},G.prototype.getDocumentLastRowColumnPosition=function(D,w){var v=this.documentToScreenRow(D,w);return this.screenToDocumentPosition(v,Number.MAX_VALUE/10)},G.prototype.getRowSplitData=function(D){if(this.$useWrapMode)return this.$wrapData[D]},G.prototype.getScreenTabSize=function(D){return this.$tabSize-(D%this.$tabSize|0)},G.prototype.screenToDocumentRow=function(D,w){return this.screenToDocumentPosition(D,w).row},G.prototype.screenToDocumentColumn=function(D,w){return this.screenToDocumentPosition(D,w).column},G.prototype.screenToDocumentPosition=function(D,w,v){if(D<0)return{row:0,column:0};var L,lt=0,ct=0,Dt,Wt=0,Vt=0,li=this.$screenRowCache,zt=this.$getRowCacheIndex(li,D),Ht=li.length;if(Ht&&zt>=0)var Wt=li[zt],lt=this.$docRowCache[zt],Jt=D>li[Ht-1];else var Jt=!Ht;for(var ai=this.getLength()-1,hi=this.getNextFoldLine(lt),ui=hi?hi.start.row:1/0;Wt<=D&&(Vt=this.getRowLength(lt),!(Wt+Vt>D||lt>=ai));)Wt+=Vt,lt++,lt>ui&&(lt=hi.end.row+1,hi=this.getNextFoldLine(lt,hi),ui=hi?hi.start.row:1/0),Jt&&(this.$docRowCache.push(lt),this.$screenRowCache.push(Wt));if(hi&&hi.start.row<=lt)L=this.getFoldDisplayLine(hi),lt=hi.start.row;else{if(Wt+Vt<=D||lt>ai)return{row:ai,column:this.getLine(ai).length};L=this.getLine(lt),hi=null}var pi=0,fi=Math.floor(D-Wt);if(this.$useWrapMode){var gi=this.$wrapData[lt];gi&&(Dt=gi[fi],fi>0&&gi.length&&(pi=gi.indent,ct=gi[fi-1]||gi[gi.length-1],L=L.substring(ct)))}return v!==void 0&&this.$bidiHandler.isBidiRow(Wt+fi,lt,fi)&&(w=this.$bidiHandler.offsetToCol(v)),ct+=this.$getStringScreenWidth(L,w-pi)[1],this.$useWrapMode&&ct>=Dt&&(ct=Dt-1),hi?hi.idxToPosition(ct):{row:lt,column:ct}},G.prototype.documentToScreenPosition=function(D,w){if(typeof w>"u")var v=this.$clipPositionToDocument(D.row,D.column);else v=this.$clipPositionToDocument(D,w);D=v.row,w=v.column;var L=0,lt=null,ct=null;ct=this.getFoldAt(D,w,1),ct&&(D=ct.start.row,w=ct.start.column);var Dt,Wt=0,Vt=this.$docRowCache,li=this.$getRowCacheIndex(Vt,D),zt=Vt.length;if(zt&&li>=0)var Wt=Vt[li],L=this.$screenRowCache[li],Ht=D>Vt[zt-1];else var Ht=!zt;for(var Jt=this.getNextFoldLine(Wt),ai=Jt?Jt.start.row:1/0;Wt<D;){if(Wt>=ai){if(Dt=Jt.end.row+1,Dt>D)break;Jt=this.getNextFoldLine(Dt,Jt),ai=Jt?Jt.start.row:1/0}else Dt=Wt+1;L+=this.getRowLength(Wt),Wt=Dt,Ht&&(this.$docRowCache.push(Wt),this.$screenRowCache.push(L))}var hi="";Jt&&Wt>=ai?(hi=this.getFoldDisplayLine(Jt,D,w),lt=Jt.start.row):(hi=this.getLine(D).substring(0,w),lt=D);var ui=0;if(this.$useWrapMode){var pi=this.$wrapData[lt];if(pi){for(var fi=0;hi.length>=pi[fi];)L++,fi++;hi=hi.substring(pi[fi-1]||0,hi.length),ui=fi>0?pi.indent:0}}return this.lineWidgets&&this.lineWidgets[Wt]&&this.lineWidgets[Wt].rowsAbove&&(L+=this.lineWidgets[Wt].rowsAbove),{row:L,column:ui+this.$getStringScreenWidth(hi)[0]}},G.prototype.documentToScreenColumn=function(D,w){return this.documentToScreenPosition(D,w).column},G.prototype.documentToScreenRow=function(D,w){return this.documentToScreenPosition(D,w).row},G.prototype.getScreenLength=function(){var D=0,w=null;if(this.$useWrapMode)for(var lt=this.$wrapData.length,ct=0,L=0,w=this.$foldData[L++],Dt=w?w.start.row:1/0;ct<lt;){var Wt=this.$wrapData[ct];D+=Wt?Wt.length+1:1,ct++,ct>Dt&&(ct=w.end.row+1,w=this.$foldData[L++],Dt=w?w.start.row:1/0)}else{D=this.getLength();for(var v=this.$foldData,L=0;L<v.length;L++)w=v[L],D-=w.end.row-w.start.row}return this.lineWidgets&&(D+=this.$getWidgetScreenLength()),D},G.prototype.$setFontMetrics=function(D){this.$enableVarChar&&(this.$getStringScreenWidth=function(w,v,L){if(v===0)return[0,0];v||(v=1/0),L=L||0;var lt,ct;for(ct=0;ct<w.length&&(lt=w.charAt(ct),lt===" "?L+=this.getScreenTabSize(L):L+=D.getCharacterWidth(lt),!(L>v));ct++);return[L,ct]})},G.prototype.getPrecedingCharacter=function(){var D=this.selection.getCursor();if(D.column===0)return D.row===0?"":this.doc.getNewLineCharacter();var w=this.getLine(D.row);return w[D.column-1]},G.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()},G}();m.$uid=0,m.prototype.$modes=a.$modes,m.prototype.getValue=m.prototype.toString,m.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},m.prototype.$overwrite=!1,m.prototype.$mode=null,m.prototype.$modeId=null,m.prototype.$scrollTop=0,m.prototype.$scrollLeft=0,m.prototype.$wrapLimit=80,m.prototype.$useWrapMode=!1,m.prototype.$wrapLimitRange={min:null,max:null},m.prototype.lineWidgets=null,m.prototype.isFullWidth=ut,E.implement(m.prototype,u);var _=1,A=2,C=3,b=4,Me=9,Re=10,q=11,W=12;function ut(G){return G<4352?!1:G>=4352&&G<=4447||G>=4515&&G<=4519||G>=4602&&G<=4607||G>=9001&&G<=9002||G>=11904&&G<=11929||G>=11931&&G<=12019||G>=12032&&G<=12245||G>=12272&&G<=12283||G>=12288&&G<=12350||G>=12353&&G<=12438||G>=12441&&G<=12543||G>=12549&&G<=12589||G>=12593&&G<=12686||G>=12688&&G<=12730||G>=12736&&G<=12771||G>=12784&&G<=12830||G>=12832&&G<=12871||G>=12880&&G<=13054||G>=13056&&G<=19903||G>=19968&&G<=42124||G>=42128&&G<=42182||G>=43360&&G<=43388||G>=44032&&G<=55203||G>=55216&&G<=55238||G>=55243&&G<=55291||G>=63744&&G<=64255||G>=65040&&G<=65049||G>=65072&&G<=65106||G>=65108&&G<=65126||G>=65128&&G<=65131||G>=65281&&G<=65376||G>=65504&&G<=65510}f("./edit_session/folding").Folding.call(m.prototype),f("./edit_session/bracket_match").BracketMatch.call(m.prototype),a.defineOptions(m.prototype,"session",{wrap:{set:function(G){if(!G||G=="off"?G=!1:G=="free"?G=!0:G=="printMargin"?G=-1:typeof G=="string"&&(G=parseInt(G,10)||!1),this.$wrap!=G)if(this.$wrap=G,!G)this.setUseWrapMode(!1);else{var D=typeof G=="number"?G:null;this.setWrapLimitRange(D,D),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(G){G=G=="auto"?this.$mode.type!="text":G!="text",G!=this.$wrapAsCode&&(this.$wrapAsCode=G,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(G){this.$useWorker=G,this.$stopWorker(),G&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(G){G=parseInt(G),G>0&&this.$tabSize!==G&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=G,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(G){this.setFoldStyle(G)},handlesSet:!0},overwrite:{set:function(G){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(G){this.doc.setNewLineMode(G)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(G){this.setMode(G)},get:function(){return this.$modeId},handlesSet:!0}}),g.EditSession=m}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(f,g,at){var E=f("./lib/lang"),S=f("./lib/oop"),x=f("./range").Range,a=function(){function r(){this.$options={}}return r.prototype.set=function(t){return S.mixin(this.$options,t),this},r.prototype.getOptions=function(){return E.copyObject(this.$options)},r.prototype.setOptions=function(t){this.$options=t},r.prototype.find=function(t){var e=this.$options,i=this.$matchIterator(t,e);if(!i)return!1;var s=null;return i.forEach(function(p,m,_,A){return s=new x(p,m,_,A),m==A&&e.start&&e.start.start&&e.skipCurrent!=!1&&s.isEqual(e.start)?(s=null,!1):!0}),s},r.prototype.findAll=function(t){var e=this.$options;if(!e.needle)return[];this.$assembleRegExp(e);var i=e.range,s=i?t.getLines(i.start.row,i.end.row):t.doc.getAllLines(),p=[],m=e.re;if(e.$isMultiLine){var _=m.length,A=s.length-_,C;e:for(var b=m.offset||0;b<=A;b++){for(var Me=0;Me<_;Me++)if(s[b+Me].search(m[Me])==-1)continue e;var Re=s[b],q=s[b+_-1],W=Re.length-Re.match(m[0])[0].length,ut=q.match(m[_-1])[0].length;C&&C.end.row===b&&C.end.column>W||(p.push(C=new x(b,W,b+_-1,ut)),_>2&&(b=b+_-2))}}else for(var G,D=0;D<s.length;D++)if(this.$isMultilineSearch(e)){var w=s.length-1;if(G=this.$multiLineForward(t,m,D,w),G){var v=G.endRow<=w?G.endRow-1:w;v>D&&(D=v),p.push(new x(G.startRow,G.startCol,G.endRow,G.endCol))}}else{G=E.getMatchOffsets(s[D],m);for(var Me=0;Me<G.length;Me++){var L=G[Me];p.push(new x(D,L.offset,D,L.offset+L.length))}}if(i){for(var lt=i.start.column,ct=i.end.column,D=0,Me=p.length-1;D<Me&&p[D].start.column<lt&&p[D].start.row==0;)D++;for(var Dt=i.end.row-i.start.row;D<Me&&p[Me].end.column>ct&&p[Me].end.row==Dt;)Me--;for(p=p.slice(D,Me+1),D=0,Me=p.length;D<Me;D++)p[D].start.row+=i.start.row,p[D].end.row+=i.start.row}return p},r.prototype.parseReplaceString=function(t){for(var e={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},i="",s=0,p=t.length;s<p;s++){var m=t.charCodeAt(s);if(m===e.Backslash){if(s++,s>=p){i+="\\";break}var _=t.charCodeAt(s);switch(_){case e.Backslash:i+="\\";break;case e.n:i+=`
|
202
|
+
`;break;case e.t:i+=" ";break}continue}if(m===e.DollarSign){if(s++,s>=p){i+="$";break}var A=t.charCodeAt(s);if(A===e.DollarSign){i+="$$";continue}if(A===e.Digit0||A===e.Ampersand){i+="$&";continue}if(e.Digit1<=A&&A<=e.Digit9){i+="$"+t[s];continue}}i+=t[s]}return i||t},r.prototype.replace=function(t,e){var i=this.$options,s=this.$assembleRegExp(i);if(i.$isMultiLine)return e;if(s){var p=this.$isMultilineSearch(i);p&&(t=t.replace(/\r\n|\r|\n/g,`
|
203
|
+
`));var m=s.exec(t);if(!m||!p&&m[0].length!=t.length)return null;if(e=i.regExp?this.parseReplaceString(e):e.replace(/\$/g,"$$$$"),e=t.replace(s,e),i.preserveCase){e=e.split("");for(var _=Math.min(t.length,t.length);_--;){var A=t[_];A&&A.toLowerCase()!=A?e[_]=e[_].toUpperCase():e[_]=e[_].toLowerCase()}e=e.join("")}return e}},r.prototype.$assembleRegExp=function(t,e){if(t.needle instanceof RegExp)return t.re=t.needle;var i=t.needle;if(!t.needle)return t.re=!1;t.regExp||(i=E.escapeRegExp(i));var s=t.caseSensitive?"gm":"gmi";try{new RegExp(i,"u"),t.$supportsUnicodeFlag=!0,s+="u"}catch{t.$supportsUnicodeFlag=!1}if(t.wholeWord&&(i=u(i,t)),t.$isMultiLine=!e&&/[\n\r]/.test(i),t.$isMultiLine)return t.re=this.$assembleMultilineRegExp(i,s);try{var p=new RegExp(i,s)}catch{p=!1}return t.re=p},r.prototype.$assembleMultilineRegExp=function(t,e){for(var i=t.replace(/\r\n|\r|\n/g,`$
|
204
|
+
^`).split(`
|
205
|
+
`),s=[],p=0;p<i.length;p++)try{s.push(new RegExp(i[p],e))}catch{return!1}return s},r.prototype.$isMultilineSearch=function(t){return t.re&&/\\r\\n|\\r|\\n/.test(t.re.source)&&t.regExp&&!t.$isMultiLine},r.prototype.$multiLineForward=function(t,e,i,s){for(var p,m=o(t,i),_=i;_<=s;){for(var A=0;A<m&&!(_>s);A++){var C=t.getLine(_++);p=p==null?C:p+`
|
206
|
+
`+C}var b=e.exec(p);if(e.lastIndex=0,b){var Me=p.slice(0,b.index).split(`
|
207
|
+
`),Re=b[0].split(`
|
208
|
+
`),q=i+Me.length-1,W=Me[Me.length-1].length,ut=q+Re.length-1,G=Re.length==1?W+Re[0].length:Re[Re.length-1].length;return{startRow:q,startCol:W,endRow:ut,endCol:G}}}return null},r.prototype.$multiLineBackward=function(t,e,i,s,p){for(var m,_=o(t,s),A=t.getLine(s).length-i,C=s;C>=p;){for(var b=0;b<_&&C>=p;b++){var Me=t.getLine(C--);m=m==null?Me:Me+`
|
209
|
+
`+m}var Re=n(m,e,A);if(Re){var q=m.slice(0,Re.index).split(`
|
210
|
+
`),W=Re[0].split(`
|
211
|
+
`),ut=C+q.length,G=q[q.length-1].length,D=ut+W.length-1,w=W.length==1?G+W[0].length:W[W.length-1].length;return{startRow:ut,startCol:G,endRow:D,endCol:w}}}return null},r.prototype.$matchIterator=function(t,e){var i=this.$assembleRegExp(e);if(!i)return!1;var s=this.$isMultilineSearch(e),p=this.$multiLineForward,m=this.$multiLineBackward,_=e.backwards==!0,A=e.skipCurrent!=!1,C=i.unicode,b=e.range,Me=e.start;Me||(Me=b?b[_?"end":"start"]:t.selection.getRange()),Me.start&&(Me=Me[A!=_?"end":"start"]);var Re=b?b.start.row:0,q=b?b.end.row:t.getLength()-1;if(_)var W=function(D){var w=Me.row;if(!G(w,Me.column,D)){for(w--;w>=Re;w--)if(G(w,Number.MAX_VALUE,D))return;if(e.wrap!=!1){for(w=q,Re=Me.row;w>=Re;w--)if(G(w,Number.MAX_VALUE,D))return}}};else var W=function(w){var v=Me.row;if(!G(v,Me.column,w)){for(v=v+1;v<=q;v++)if(G(v,0,w))return;if(e.wrap!=!1){for(v=Re,q=Me.row;v<=q;v++)if(G(v,0,w))return}}};if(e.$isMultiLine)var ut=i.length,G=function(D,w,v){var L=_?D-ut+1:D;if(!(L<0||L+ut>t.getLength())){var lt=t.getLine(L),ct=lt.search(i[0]);if(!(!_&&ct<w||ct===-1)){for(var Dt=1;Dt<ut;Dt++)if(lt=t.getLine(L+Dt),lt.search(i[Dt])==-1)return;var Wt=lt.match(i[ut-1])[0].length;if(!(_&&Wt>w)&&v(L,ct,L+ut-1,Wt))return!0}}};else if(_)var G=function(w,v,L){if(s){var lt=m(t,i,v,w,Re);if(!lt)return!1;if(L(lt.startRow,lt.startCol,lt.endRow,lt.endCol))return!0}else{var ct=t.getLine(w),Dt=[],Wt,Vt=0;for(i.lastIndex=0;Wt=i.exec(ct);){var li=Wt[0].length;if(Vt=Wt.index,!li){if(Vt>=ct.length)break;i.lastIndex=Vt+=E.skipEmptyMatch(ct,Vt,C)}if(Wt.index+li>v)break;Dt.push(Wt.index,li)}for(var zt=Dt.length-1;zt>=0;zt-=2){var Ht=Dt[zt-1],li=Dt[zt];if(L(w,Ht,w,Ht+li))return!0}}};else var G=function(w,v,L){if(i.lastIndex=v,s){var lt=p(t,i,w,q);if(lt){var ct=lt.endRow<=q?lt.endRow-1:q;ct>w&&(w=ct)}if(!lt)return!1;if(L(lt.startRow,lt.startCol,lt.endRow,lt.endCol))return!0}else for(var Dt=t.getLine(w),Wt,Vt;Vt=i.exec(Dt);){var li=Vt[0].length;if(Wt=Vt.index,L(w,Wt,w,Wt+li))return!0;if(!li&&(i.lastIndex=Wt+=E.skipEmptyMatch(Dt,Wt,C),Wt>=Dt.length))return!1}};return{forEach:W}},r}();function u(r,t){var e=E.supportsLookbehind();function i(_,A){A===void 0&&(A=!0);var C=e&&t.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return C.test(_)||t.regExp?e&&t.$supportsUnicodeFlag?A?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var s=Array.from(r),p=s[0],m=s[s.length-1];return i(p)+r+i(m,!1)}function n(r,t,e){for(var i=null,s=0;s<=r.length;){t.lastIndex=s;var p=t.exec(r);if(!p)break;var m=p.index+p[0].length;if(m>r.length-e)break;(!i||m>i.index+i[0].length)&&(i=p),s=p.index+1}return i}function o(r,t){var e=5e3,i={row:t,column:0},s=r.doc.positionToIndex(i),p=s+e,m=r.doc.indexToPosition(p),_=m.row;return _+1}g.Search=a}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(f,g,at){var E=this&&this.__extends||function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,s){i.__proto__=s}||function(i,s){for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&(i[p]=s[p])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function i(){this.constructor=t}t.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)}}(),S=f("../lib/keys"),x=f("../lib/useragent"),a=S.KEY_MODS,u=function(){function r(t,e){this.$init(t,e,!1)}return r.prototype.$init=function(t,e,i){this.platform=e||(x.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(t),this.$singleCommand=i},r.prototype.addCommand=function(t){this.commands[t.name]&&this.removeCommand(t),this.commands[t.name]=t,t.bindKey&&this._buildKeyHash(t)},r.prototype.removeCommand=function(t,e){var i=t&&(typeof t=="string"?t:t.name);t=this.commands[i],e||delete this.commands[i];var s=this.commandKeyBinding;for(var p in s){var m=s[p];if(m==t)delete s[p];else if(Array.isArray(m)){var _=m.indexOf(t);_!=-1&&(m.splice(_,1),m.length==1&&(s[p]=m[0]))}}},r.prototype.bindKey=function(t,e,i){if(typeof t=="object"&&t&&(i==null&&(i=t.position),t=t[this.platform]),!!t){if(typeof e=="function")return this.addCommand({exec:e,bindKey:t,name:e.name||t});t.split("|").forEach(function(s){var p="";if(s.indexOf(" ")!=-1){var m=s.split(/\s+/);s=m.pop(),m.forEach(function(C){var b=this.parseKeys(C),Me=a[b.hashId]+b.key;p+=(p?" ":"")+Me,this._addCommandToBinding(p,"chainKeys")},this),p+=" "}var _=this.parseKeys(s),A=a[_.hashId]+_.key;this._addCommandToBinding(p+A,e,i)},this)}},r.prototype._addCommandToBinding=function(t,e,i){var s=this.commandKeyBinding,p;if(!e)delete s[t];else if(!s[t]||this.$singleCommand)s[t]=e;else{Array.isArray(s[t])?(p=s[t].indexOf(e))!=-1&&s[t].splice(p,1):s[t]=[s[t]],typeof i!="number"&&(i=n(e));var m=s[t];for(p=0;p<m.length;p++){var _=m[p],A=n(_);if(A>i)break}m.splice(p,0,e)}},r.prototype.addCommands=function(t){t&&Object.keys(t).forEach(function(e){var i=t[e];if(i){if(typeof i=="string")return this.bindKey(i,e);typeof i=="function"&&(i={exec:i}),typeof i=="object"&&(i.name||(i.name=e),this.addCommand(i))}},this)},r.prototype.removeCommands=function(t){Object.keys(t).forEach(function(e){this.removeCommand(t[e])},this)},r.prototype.bindKeys=function(t){Object.keys(t).forEach(function(e){this.bindKey(e,t[e])},this)},r.prototype._buildKeyHash=function(t){this.bindKey(t.bindKey,t)},r.prototype.parseKeys=function(t){var e=t.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(A){return A}),i=e.pop(),s=S[i];if(S.FUNCTION_KEYS[s])i=S.FUNCTION_KEYS[s].toLowerCase();else if(e.length){if(e.length==1&&e[0]=="shift")return{key:i.toUpperCase(),hashId:-1}}else return{key:i,hashId:-1};for(var p=0,m=e.length;m--;){var _=S.KEY_MODS[e[m]];if(_==null)return typeof console<"u"&&console.error("invalid modifier "+e[m]+" in "+t),!1;p|=_}return{key:i,hashId:p}},r.prototype.findKeyCommand=function(t,e){var i=a[t]+e;return this.commandKeyBinding[i]},r.prototype.handleKeyboard=function(t,e,i,s){if(!(s<0)){var p=a[e]+i,m=this.commandKeyBinding[p];return t.$keyChain&&(t.$keyChain+=" "+p,m=this.commandKeyBinding[t.$keyChain]||m),m&&(m=="chainKeys"||m[m.length-1]=="chainKeys")?(t.$keyChain=t.$keyChain||p,{command:"null"}):(t.$keyChain&&((!e||e==4)&&i.length==1?t.$keyChain=t.$keyChain.slice(0,-p.length-1):(e==-1||s>0)&&(t.$keyChain="")),{command:m})}},r.prototype.getStatusText=function(t,e){return e.$keyChain||""},r}();function n(r){return typeof r=="object"&&r.bindKey&&r.bindKey.position||(r.isDefault?-100:0)}var o=function(r){E(t,r);function t(e,i){var s=r.call(this,e,i)||this;return s.$singleCommand=!0,s}return t}(u);o.call=function(r,t,e){u.prototype.$init.call(r,t,e,!0)},u.call=function(r,t,e){u.prototype.$init.call(r,t,e,!1)},g.HashHandler=o,g.MultiHashHandler=u}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(f,g,at){var E=this&&this.__extends||function(){var n=function(o,r){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(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");n(o,r);function t(){this.constructor=o}o.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}(),S=f("../lib/oop"),x=f("../keyboard/hash_handler").MultiHashHandler,a=f("../lib/event_emitter").EventEmitter,u=function(n){E(o,n);function o(r,t){var e=n.call(this,t,r)||this;return e.byName=e.commands,e.setDefaultHandler("exec",function(i){return i.args?i.command.exec(i.editor,i.args,i.event,!1):i.command.exec(i.editor,{},i.event,!0)}),e}return o.prototype.exec=function(r,t,e){if(Array.isArray(r)){for(var i=r.length;i--;)if(this.exec(r[i],t,e))return!0;return!1}typeof r=="string"&&(r=this.commands[r]);var s={editor:t,command:r,args:e};return this.canExecute(r,t)?(s.returnValue=this._emit("exec",s),this._signal("afterExec",s),s.returnValue!==!1):(this._signal("commandUnavailable",s),!1)},o.prototype.canExecute=function(r,t){return typeof r=="string"&&(r=this.commands[r]),!(!r||t&&t.$readOnly&&!r.readOnly||this.$checkCommandState!=!1&&r.isAvailable&&!r.isAvailable(t))},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(t){this.macro.push([t.command,t.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(t){typeof t=="string"?this.exec(t,r):this.exec(t[0],r,t[1])},this)}finally{this.$inReplay=!1}}},o.prototype.trimMacro=function(r){return r.map(function(t){return typeof t[0]!="string"&&(t[0]=t[0].name),t[1]||(t=t[0]),t})},o}(x);S.implement(u.prototype,a),g.CommandManager=u}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(f,g,at){var E=f("../lib/lang"),S=f("../config"),x=f("../range").Range;function a(n,o){return{win:n,mac:o}}g.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(n){S.loadModule("ace/ext/settings_menu",function(o){o.init(n),n.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(n){S.loadModule("ace/ext/error_marker",function(o){o.showErrorMarker(n,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(n){S.loadModule("ace/ext/error_marker",function(o){o.showErrorMarker(n,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(n){n.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(n){n.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(n,o){typeof o=="number"&&!isNaN(o)&&n.gotoLine(o),n.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(n){n.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(n){n.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(n){n.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(n){n.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(n){n.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(n){n.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(n){n.session.foldAll(),n.session.unfold(n.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(n){n.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(n){n.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(n){n.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(n){n.selection.isEmpty()?n.selection.selectWord():n.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(n){n.selection.isEmpty()?n.selection.selectWord():n.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(n){S.loadModule("ace/ext/searchbox",function(o){o.Search(n)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(n){n.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(n){n.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(n){n.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(n){n.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(n,o){n.navigateUp(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(n){n.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(n){n.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(n){n.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(n,o){n.navigateDown(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(n){n.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(n){n.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(n){n.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(n){n.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(n){n.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(n,o){n.navigateLeft(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(n){n.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(n){n.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(n){n.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(n){n.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(n){n.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(n,o){n.navigateRight(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(n){n.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(n){n.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(n){n.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(n){n.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(n){n.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(n){n.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(n){n.renderer.scrollBy(0,-2*n.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(n){n.renderer.scrollBy(0,2*n.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(n){n.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(n){n.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(n){n.commands.toggleRecording(n)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(n){n.commands.replay(n)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(n){n.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(n){n.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(n){n.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(n){},readOnly:!0},{name:"cut",description:"Cut",exec:function(n){var o=n.$copyWithEmptySelection&&n.selection.isEmpty(),r=o?n.selection.getLineRange():n.selection.getRange();n._emit("cut",r),r.isEmpty()||n.session.remove(r),n.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(n,o){n.$handlePaste(o)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(n){n.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(n){n.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(n){n.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(n){n.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(n){n.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(n){n.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(n){n.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(n){S.loadModule("ace/ext/searchbox",function(o){o.Search(n,!0)})}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(n){n.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(n){n.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(n){n.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(n){n.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(n){n.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(n){n.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(n){n.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(n){n.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(n){if(n.selection.isEmpty())n.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(n){n.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(n){n.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(n){var o=n.selection.getRange();o.start.column=0,n.session.remove(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(n){var o=n.selection.getRange();o.end.column=Number.MAX_VALUE,n.session.remove(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(n){n.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(n){n.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(n){n.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(n){n.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(n){n.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(n){n.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(n,o){n.insert(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(n,o){n.insert(E.stringRepeat(o.text||"",o.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(n){n.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(n){n.transposeLetters()},multiSelectAction:function(n){n.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(n){n.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(n){n.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(n){n.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(n){var o=n.selection.getRange();o.start.column=o.end.column=0,o.end.row++,n.selection.setRange(o,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:a("Ctrl+F3","F3"),exec:function(n){n.openLink()}},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(n){for(var o=n.selection.isBackwards(),r=o?n.selection.getSelectionLead():n.selection.getSelectionAnchor(),t=o?n.selection.getSelectionAnchor():n.selection.getSelectionLead(),e=n.session.doc.getLine(r.row).length,i=n.session.doc.getTextRange(n.selection.getRange()),s=i.replace(/\n\s*/," ").length,p=n.session.doc.getLine(r.row),m=r.row+1;m<=t.row+1;m++){var _=E.stringTrimLeft(E.stringTrimRight(n.session.doc.getLine(m)));_.length!==0&&(_=" "+_),p+=_}t.row+1<n.session.doc.getLength()-1&&(p+=n.session.doc.getNewLineCharacter()),n.clearSelection(),n.session.doc.replace(new x(r.row,0,t.row+2,0),p),s>0?(n.selection.moveCursorTo(r.row,r.column),n.selection.selectTo(r.row,r.column+s)):(e=n.session.doc.getLine(r.row).length>e?e+1:e,n.selection.moveCursorTo(r.row,e))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(n){var o=n.session.doc.getLength()-1,r=n.session.doc.getLine(o).length,t=n.selection.rangeList.ranges,e=[];t.length<1&&(t=[n.selection.getRange()]);for(var i=0;i<t.length;i++)i==t.length-1&&(t[i].end.row===o&&t[i].end.column===r||e.push(new x(t[i].end.row,t[i].end.column,o,r))),i===0?t[i].start.row===0&&t[i].start.column===0||e.push(new x(0,0,t[i].start.row,t[i].start.column)):e.push(new x(t[i-1].end.row,t[i-1].end.column,t[i].start.row,t[i].start.column));n.exitMultiSelectMode(),n.clearSelection();for(var i=0;i<e.length;i++)n.selection.addRange(e[i],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(n){n.selection.clearSelection(),n.navigateLineEnd(),n.insert(`
|
212
|
+
`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(n){n.selection.clearSelection();var o=n.getCursorPosition();n.selection.moveTo(o.row-1,Number.MAX_VALUE),n.insert(`
|
213
|
+
`),o.row===0&&n.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(n){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),n.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:a("F1","F1"),exec:function(n){n.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:a(null,null),exec:function(n){n.prompt({$type:"modes"})},readOnly:!0}];for(var u=1;u<9;u++)g.commands.push({name:"foldToLevel"+u,description:"Fold To Level "+u,level:u,exec:function(n){n.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,at){var E=f("../lib/keys"),S=f("../mouse/default_gutter_handler").GutterTooltip,x=function(){function u(n){this.editor=n,this.gutterLayer=n.renderer.$gutterLayer,this.element=n.renderer.$gutter,this.lines=n.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new S(this.editor)}return u.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))},u.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))},u.prototype.$onGutterKeyDown=function(n){if(this.annotationTooltip.isOpen){n.preventDefault(),n.keyCode===E.escape&&this.annotationTooltip.hideTooltip();return}if(n.target===this.element){if(n.keyCode!=E.enter)return;n.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),t=this.$findNearestFoldLaneWidget(r),e=this.$findNearestAnnotation(r);if(!(t===null&&e===null)){var i=this.$findClosestNumber(t,e,r);if(i===t)if(this.activeLane="fold",this.activeRowIndex=t,this.$isCustomWidgetVisible(t)){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(n),setTimeout((function(){this.editor._signal("gutterkeydown",new a(n,this))}).bind(this),10)},u.prototype.$handleGutterKeyboardInteraction=function(n){if(n.keyCode===E.tab){n.preventDefault();return}if(n.keyCode===E.escape){n.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(n.keyCode===E.up){switch(n.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(n.keyCode===E.down){switch(n.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(n.keyCode===E.left){n.preventDefault(),this.$switchLane("annotation");return}if(n.keyCode===E.right){n.preventDefault(),this.$switchLane("fold");return}if(n.keyCode===E.enter||n.keyCode===E.space){switch(n.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(n,o);else if(this.gutterLayer.session.foldWidgets[o]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),n),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 t=this.lines.cells[this.activeRowIndex].element.childNodes[2],e=t.getBoundingClientRect(),i=this.annotationTooltip.getElement().style;i.left=e.right+"px",i.top=e.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},u.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()},u.prototype.$isFoldWidgetVisible=function(n){var o=this.editor.isRowFullyVisible(this.$rowIndexToRow(n)),r=this.$getFoldWidget(n).style.display!=="none";return o&&r},u.prototype.$isCustomWidgetVisible=function(n){var o=this.editor.isRowFullyVisible(this.$rowIndexToRow(n)),r=!!this.$getCustomWidget(n);return o&&r},u.prototype.$isAnnotationVisible=function(n){var o=this.editor.isRowFullyVisible(this.$rowIndexToRow(n)),r=this.$getAnnotation(n).style.display!=="none";return o&&r},u.prototype.$getFoldWidget=function(n){var o=this.lines.get(n),r=o.element;return r.childNodes[1]},u.prototype.$getCustomWidget=function(n){var o=this.lines.get(n),r=o.element;return r.childNodes[3]},u.prototype.$getAnnotation=function(n){var o=this.lines.get(n),r=o.element;return r.childNodes[2]},u.prototype.$findNearestFoldLaneWidget=function(n){if(this.$isCustomWidgetVisible(n)||this.$isFoldWidgetVisible(n))return n;for(var o=0;n-o>0||n+o<this.lines.getLength()-1;){if(o++,n-o>=0&&this.$isCustomWidgetVisible(n-o))return n-o;if(n+o<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(n+o))return n+o;if(n-o>=0&&this.$isFoldWidgetVisible(n-o))return n-o;if(n+o<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(n+o))return n+o}return null},u.prototype.$findNearestAnnotation=function(n){if(this.$isAnnotationVisible(n))return n;for(var o=0;n-o>0||n+o<this.lines.getLength()-1;){if(o++,n-o>=0&&this.$isAnnotationVisible(n-o))return n-o;if(n+o<=this.lines.getLength()-1&&this.$isAnnotationVisible(n+o))return n+o}return null},u.prototype.$focusFoldWidget=function(n){if(n!=null){var o=this.$getFoldWidget(n);o.classList.add(this.editor.renderer.keyboardFocusClassName),o.focus()}},u.prototype.$focusCustomWidget=function(n){if(n!=null){var o=this.$getCustomWidget(n);o&&(o.classList.add(this.editor.renderer.keyboardFocusClassName),o.focus())}},u.prototype.$focusAnnotation=function(n){if(n!=null){var o=this.$getAnnotation(n);o.classList.add(this.editor.renderer.keyboardFocusClassName),o.focus()}},u.prototype.$blurFoldWidget=function(n){var o=this.$getFoldWidget(n);o.classList.remove(this.editor.renderer.keyboardFocusClassName),o.blur()},u.prototype.$blurCustomWidget=function(n){var o=this.$getCustomWidget(n);o&&(o.classList.remove(this.editor.renderer.keyboardFocusClassName),o.blur())},u.prototype.$blurAnnotation=function(n){var o=this.$getAnnotation(n);o.classList.remove(this.editor.renderer.keyboardFocusClassName),o.blur()},u.prototype.$moveFoldWidgetUp=function(){for(var n=this.activeRowIndex;n>0;)if(n--,this.$isFoldWidgetVisible(n)||this.$isCustomWidgetVisible(n)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=n,this.$isFoldWidgetVisible(n)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},u.prototype.$moveFoldWidgetDown=function(){for(var n=this.activeRowIndex;n<this.lines.getLength()-1;)if(n++,this.$isFoldWidgetVisible(n)||this.$isCustomWidgetVisible(n)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=n,this.$isFoldWidgetVisible(n)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},u.prototype.$moveAnnotationUp=function(){for(var n=this.activeRowIndex;n>0;)if(n--,this.$isAnnotationVisible(n)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=n,this.$focusAnnotation(this.activeRowIndex);return}},u.prototype.$moveAnnotationDown=function(){for(var n=this.activeRowIndex;n<this.lines.getLength()-1;)if(n++,this.$isAnnotationVisible(n)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=n,this.$focusAnnotation(this.activeRowIndex);return}},u.prototype.$findClosestNumber=function(n,o,r){return n===null?o:o===null||Math.abs(r-n)<=Math.abs(r-o)?n:o},u.prototype.$switchLane=function(n){switch(n){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}},u.prototype.$rowIndexToRow=function(n){var o=this.lines.get(n);return o?o.row:null},u.prototype.$rowToRowIndex=function(n){for(var o=0;o<this.lines.getLength();o++){var r=this.lines.get(o);if(r.row==n)return o}return null},u}();g.GutterKeyboardHandler=x;var a=function(){function u(n,o){this.gutterKeyboardHandler=o,this.domEvent=n}return u.prototype.getKey=function(){return E.keyCodeToString(this.domEvent.keyCode)},u.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},u.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},u.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},u}();g.GutterKeyboardEvent=a}),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,at){var E=this&&this.__values||function(w){var v=typeof Symbol=="function"&&Symbol.iterator,L=v&&w[v],lt=0;if(L)return L.call(w);if(w&&typeof w.length=="number")return{next:function(){return w&<>=w.length&&(w=void 0),{value:w&&w[lt++],done:!w}}};throw new TypeError(v?"Object is not iterable.":"Symbol.iterator is not defined.")},S=f("./lib/oop"),x=f("./lib/dom"),a=f("./lib/lang"),u=f("./lib/useragent"),n=f("./keyboard/textinput").TextInput,o=f("./mouse/mouse_handler").MouseHandler,r=f("./mouse/fold_handler").FoldHandler,t=f("./keyboard/keybinding").KeyBinding,e=f("./edit_session").EditSession,i=f("./search").Search,s=f("./range").Range,p=f("./lib/event_emitter").EventEmitter,m=f("./commands/command_manager").CommandManager,_=f("./commands/default_commands").commands,A=f("./config"),C=f("./token_iterator").TokenIterator,b=f("./keyboard/gutter_handler").GutterKeyboardHandler,Me=f("./config").nls,Re=f("./clipboard"),q=f("./lib/keys"),W=f("./lib/event"),ut=f("./tooltip").HoverTooltip,G=function(){function w(v,L,lt){this.id="editor"+ ++w.$uid,this.session,this.$toDestroy=[];var ct=v.getContainerElement();this.container=ct,this.renderer=v,this.commands=new m(u.isMac?"mac":"win",_),typeof document=="object"&&(this.textInput=new n(v.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new o(this),new r(this)),this.keyBinding=new t(this),this.$search=new i().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=a.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(Dt,Wt){Wt._$emitInputEvent.schedule(31)}),this.setSession(L||lt&<.session||new e("")),A.resetOptions(this),lt&&this.setOptions(lt),A._signal("editor",this)}return w.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},w.prototype.startOperation=function(v){this.session.startOperation(v)},w.prototype.endOperation=function(v){this.session.endOperation(v)},w.prototype.onStartOperation=function(v){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,v||(this.previousCommand=null)},w.prototype.onEndOperation=function(v){if(this.curOp&&this.session){if(v&&v.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var L=this.curOp.command,lt=L&&L.scrollIntoView;if(lt){switch(lt){case"center-animate":lt="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var ct=this.selection.getRange(),Dt=this.renderer.layerConfig;(ct.start.row>=Dt.lastRow||ct.end.row<=Dt.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}lt=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},w.prototype.$historyTracker=function(v){if(this.$mergeUndoDeltas){var L=this.prevOp,lt=this.$mergeableCommands,ct=L.command&&v.command.name==L.command.name;if(v.command.name=="insertstring"){var Dt=v.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),ct=ct&&this.mergeNextCommand&&(!/\s/.test(Dt)||/\s/.test(L.args)),this.mergeNextCommand=!0}else ct=ct&<.indexOf(v.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(ct=!1),ct?this.session.mergeUndoDeltas=!0:lt.indexOf(v.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},w.prototype.setKeyboardHandler=function(v,L){if(v&&typeof v=="string"&&v!="ace"){this.$keybindingId=v;var lt=this;A.loadModule(["keybinding",v],function(ct){lt.$keybindingId==v&<.keyBinding.setKeyboardHandler(ct&&ct.handler),L&&L()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(v),L&&L()},w.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},w.prototype.setSession=function(v){if(this.session!=v){this.curOp&&this.endOperation(),this.curOp={};var L=this.session;if(L){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 lt=this.session.getSelection();lt.off("changeCursor",this.$onCursorChange),lt.off("changeSelection",this.$onSelectionChange)}this.session=v,v?(this.$onDocumentChange=this.onDocumentChange.bind(this),v.on("change",this.$onDocumentChange),this.renderer.setSession(v),this.$onChangeMode=this.onChangeMode.bind(this),v.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),v.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),v.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),v.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),v.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),v.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=v.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(v)),this._signal("changeSession",{session:v,oldSession:L}),this.curOp=null,L&&L._signal("changeEditor",{oldEditor:this}),L&&(L.$editor=null),v&&v._signal("changeEditor",{editor:this}),v&&(v.$editor=this),v&&!v.destroyed&&v.bgTokenizer.scheduleStart()}},w.prototype.getSession=function(){return this.session},w.prototype.setValue=function(v,L){return this.session.doc.setValue(v),L?L==1?this.navigateFileEnd():L==-1&&this.navigateFileStart():this.selectAll(),v},w.prototype.getValue=function(){return this.session.getValue()},w.prototype.getSelection=function(){return this.selection},w.prototype.resize=function(v){this.renderer.onResize(v)},w.prototype.setTheme=function(v,L){this.renderer.setTheme(v,L)},w.prototype.getTheme=function(){return this.renderer.getTheme()},w.prototype.setStyle=function(v,L){this.renderer.setStyle(v,L)},w.prototype.unsetStyle=function(v){this.renderer.unsetStyle(v)},w.prototype.getFontSize=function(){return this.getOption("fontSize")||x.computedStyle(this.container).fontSize},w.prototype.setFontSize=function(v){this.setOption("fontSize",v)},w.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var v=this;this.$highlightPending=!0,setTimeout(function(){v.$highlightPending=!1;var L=v.session;if(!(!L||L.destroyed)){L.$bracketHighlight&&(L.$bracketHighlight.markerIds.forEach(function(Jt){L.removeMarker(Jt)}),L.$bracketHighlight=null);var lt=v.getCursorPosition(),ct=v.getKeyboardHandler(),Dt=ct&&ct.$getDirectionForHighlight&&ct.$getDirectionForHighlight(v),Wt=L.getMatchingBracketRanges(lt,Dt);if(!Wt){var Vt=new C(L,lt.row,lt.column),li=Vt.getCurrentToken();if(li&&/\b(?:tag-open|tag-name)/.test(li.type)){var zt=L.getMatchingTags(lt);zt&&(Wt=[zt.openTagName.isEmpty()?zt.openTag:zt.openTagName,zt.closeTagName.isEmpty()?zt.closeTag:zt.closeTagName])}}if(!Wt&&L.$mode.getMatching&&(Wt=L.$mode.getMatching(v.session)),!Wt){v.getHighlightIndentGuides()&&v.renderer.$textLayer.$highlightIndentGuide();return}var Ht="ace_bracket";Array.isArray(Wt)?Wt.length==1&&(Ht="ace_error_bracket"):Wt=[Wt],Wt.length==2&&(s.comparePoints(Wt[0].end,Wt[1].start)==0?Wt=[s.fromPoints(Wt[0].start,Wt[1].end)]:s.comparePoints(Wt[0].start,Wt[1].end)==0&&(Wt=[s.fromPoints(Wt[1].start,Wt[0].end)])),L.$bracketHighlight={ranges:Wt,markerIds:Wt.map(function(Jt){return L.addMarker(Jt,Ht,"text")})},v.getHighlightIndentGuides()&&v.renderer.$textLayer.$highlightIndentGuide()}},50)}},w.prototype.focus=function(){this.textInput.focus()},w.prototype.isFocused=function(){return this.textInput.isFocused()},w.prototype.blur=function(){this.textInput.blur()},w.prototype.onFocus=function(v){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",v))},w.prototype.onBlur=function(v){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",v))},w.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},w.prototype.onDocumentChange=function(v){var L=this.session.$useWrapMode,lt=v.start.row==v.end.row?v.end.row:1/0;this.renderer.updateLines(v.start.row,lt,L),this._signal("change",v),this.$cursorChange()},w.prototype.onTokenizerUpdate=function(v){var L=v.data;this.renderer.updateLines(L.first,L.last)},w.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},w.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},w.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},w.prototype.$updateHighlightActiveLine=function(){var v=this.getSession(),L;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(L=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(L=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(L=!1)),v.$highlightLineMarker&&!L)v.removeMarker(v.$highlightLineMarker.id),v.$highlightLineMarker=null;else if(!v.$highlightLineMarker&&L){var lt=new s(L.row,L.column,L.row,1/0);lt.id=v.addMarker(lt,"ace_active-line","screenLine"),v.$highlightLineMarker=lt}else L&&(v.$highlightLineMarker.start.row=L.row,v.$highlightLineMarker.end.row=L.row,v.$highlightLineMarker.start.column=L.column,v._signal("changeBackMarker"))},w.prototype.onSelectionChange=function(v){var L=this.session;if(L.$selectionMarker&&L.removeMarker(L.$selectionMarker),L.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var lt=this.selection.getRange(),ct=this.getSelectionStyle();L.$selectionMarker=L.addMarker(lt,"ace_selection",ct)}var Dt=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(Dt),this._signal("changeSelection")},w.prototype.$getSelectionHighLightRegexp=function(){var v=this.session,L=this.getSelectionRange();if(!(L.isEmpty()||L.isMultiLine())){var lt=L.start.column,ct=L.end.column,Dt=v.getLine(L.start.row),Wt=Dt.substring(lt,ct);if(!(Wt.length>5e3||!/[\w\d]/.test(Wt))){var Vt=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:Wt}),li=Dt.substring(lt-1,ct+1);if(Vt.test(li))return Vt}}},w.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},w.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},w.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},w.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},w.prototype.onChangeMode=function(v){this.renderer.updateText(),this._emit("changeMode",v)},w.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},w.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},w.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},w.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},w.prototype.getCopyText=function(){var v=this.getSelectedText(),L=this.session.doc.getNewLineCharacter(),lt=!1;if(!v&&this.$copyWithEmptySelection){lt=!0;for(var ct=this.selection.getAllRanges(),Dt=0;Dt<ct.length;Dt++){var Wt=ct[Dt];Dt&&ct[Dt-1].start.row==Wt.start.row||(v+=this.session.getLine(Wt.start.row)+L)}}var Vt={text:v};return this._signal("copy",Vt),Re.lineMode=lt?Vt.text:!1,Vt.text},w.prototype.onCopy=function(){this.commands.exec("copy",this)},w.prototype.onCut=function(){this.commands.exec("cut",this)},w.prototype.onPaste=function(v,L){var lt={text:v,event:L};this.commands.exec("paste",this,lt)},w.prototype.$handlePaste=function(v){typeof v=="string"&&(v={text:v}),this._signal("paste",v);var L=v.text,lt=L===Re.lineMode,ct=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)lt?ct.insert({row:this.selection.lead.row,column:0},L):this.insert(L);else if(lt)this.selection.rangeList.ranges.forEach(function(Ht){ct.insert({row:Ht.start.row,column:0},L)});else{var Dt=L.split(/\r\n|\r|\n/),Wt=this.selection.rangeList.ranges,Vt=Dt.length==2&&(!Dt[0]||!Dt[1]);if(Dt.length!=Wt.length||Vt)return this.commands.exec("insertstring",this,L);for(var li=Wt.length;li--;){var zt=Wt[li];zt.isEmpty()||ct.remove(zt),ct.insert(zt.start,Dt[li])}}},w.prototype.execCommand=function(v,L){return this.commands.exec(v,this,L)},w.prototype.insert=function(v,L){var lt=this.session,ct=lt.getMode(),Dt=this.getCursorPosition();if(this.getBehavioursEnabled()&&!L){var Wt=ct.transformAction(lt.getState(Dt.row),"insertion",this,lt,v);Wt&&(v!==Wt.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),v=Wt.text)}if(v==" "&&(v=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&v.indexOf(`
|
214
|
+
`)==-1){var Vt=s.fromPoints(Dt,Dt);Vt.end.column+=v.length,this.session.remove(Vt)}}else{var Vt=this.getSelectionRange();Dt=this.session.remove(Vt),this.clearSelection()}if(v==`
|
215
|
+
`||v==`\r
|
216
|
+
`){var Jt=lt.getLine(Dt.row);if(Dt.column>Jt.search(/\S|$/)){var li=Jt.substr(Dt.column).search(/\S|$/);lt.doc.removeInLine(Dt.row,Dt.column,Dt.column+li)}}this.clearSelection();var zt=Dt.column,Ht=lt.getState(Dt.row),Jt=lt.getLine(Dt.row),ai=ct.checkOutdent(Ht,Jt,v);if(lt.insert(Dt,v),Wt&&Wt.selection&&(Wt.selection.length==2?this.selection.setSelectionRange(new s(Dt.row,zt+Wt.selection[0],Dt.row,zt+Wt.selection[1])):this.selection.setSelectionRange(new s(Dt.row+Wt.selection[0],Wt.selection[1],Dt.row+Wt.selection[2],Wt.selection[3]))),this.$enableAutoIndent){if(lt.getDocument().isNewLine(v)){var hi=ct.getNextLineIndent(Ht,Jt.slice(0,Dt.column),lt.getTabString());lt.insert({row:Dt.row+1,column:0},hi)}ai&&ct.autoOutdent(Ht,lt,Dt.row)}},w.prototype.autoIndent=function(){for(var v=this.session,L=v.getMode(),lt=this.selection.isEmpty()?[new s(0,0,v.doc.getLength()-1,0)]:this.selection.getAllRanges(),ct="",Dt="",Wt="",Vt=v.getTabString(),li=0;li<lt.length;li++)for(var zt=lt[li].start.row,Ht=lt[li].end.row,Jt=zt;Jt<=Ht;Jt++){Jt>0&&(ct=v.getState(Jt-1),Dt=v.getLine(Jt-1),Wt=L.getNextLineIndent(ct,Dt,Vt));var ai=v.getLine(Jt),hi=L.$getIndent(ai);if(Wt!==hi){if(hi.length>0){var ui=new s(Jt,0,Jt,hi.length);v.remove(ui)}Wt.length>0&&v.insert({row:Jt,column:0},Wt)}L.autoOutdent(ct,v,Jt)}},w.prototype.onTextInput=function(v,L){if(!L)return this.keyBinding.onTextInput(v);this.startOperation({command:{name:"insertstring"}});var lt=this.applyComposition.bind(this,v,L);this.selection.rangeCount?this.forEachSelection(lt):lt(),this.endOperation()},w.prototype.applyComposition=function(v,L){if(L.extendLeft||L.extendRight){var lt=this.selection.getRange();lt.start.column-=L.extendLeft,lt.end.column+=L.extendRight,lt.start.column<0&&(lt.start.row--,lt.start.column+=this.session.getLine(lt.start.row).length+1),this.selection.setRange(lt),!v&&!lt.isEmpty()&&this.remove()}if((v||!this.selection.isEmpty())&&this.insert(v,!0),L.restoreStart||L.restoreEnd){var lt=this.selection.getRange();lt.start.column-=L.restoreStart,lt.end.column-=L.restoreEnd,this.selection.setRange(lt)}},w.prototype.onCommandKey=function(v,L,lt){return this.keyBinding.onCommandKey(v,L,lt)},w.prototype.setOverwrite=function(v){this.session.setOverwrite(v)},w.prototype.getOverwrite=function(){return this.session.getOverwrite()},w.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},w.prototype.setScrollSpeed=function(v){this.setOption("scrollSpeed",v)},w.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},w.prototype.setDragDelay=function(v){this.setOption("dragDelay",v)},w.prototype.getDragDelay=function(){return this.getOption("dragDelay")},w.prototype.setSelectionStyle=function(v){this.setOption("selectionStyle",v)},w.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},w.prototype.setHighlightActiveLine=function(v){this.setOption("highlightActiveLine",v)},w.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},w.prototype.setHighlightGutterLine=function(v){this.setOption("highlightGutterLine",v)},w.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},w.prototype.setHighlightSelectedWord=function(v){this.setOption("highlightSelectedWord",v)},w.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},w.prototype.setAnimatedScroll=function(v){this.renderer.setAnimatedScroll(v)},w.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},w.prototype.setShowInvisibles=function(v){this.renderer.setShowInvisibles(v)},w.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},w.prototype.setDisplayIndentGuides=function(v){this.renderer.setDisplayIndentGuides(v)},w.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},w.prototype.setHighlightIndentGuides=function(v){this.renderer.setHighlightIndentGuides(v)},w.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},w.prototype.setShowPrintMargin=function(v){this.renderer.setShowPrintMargin(v)},w.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},w.prototype.setPrintMarginColumn=function(v){this.renderer.setPrintMarginColumn(v)},w.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},w.prototype.setReadOnly=function(v){this.setOption("readOnly",v)},w.prototype.getReadOnly=function(){return this.getOption("readOnly")},w.prototype.setBehavioursEnabled=function(v){this.setOption("behavioursEnabled",v)},w.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},w.prototype.setWrapBehavioursEnabled=function(v){this.setOption("wrapBehavioursEnabled",v)},w.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},w.prototype.setShowFoldWidgets=function(v){this.setOption("showFoldWidgets",v)},w.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},w.prototype.setFadeFoldWidgets=function(v){this.setOption("fadeFoldWidgets",v)},w.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},w.prototype.remove=function(v){this.selection.isEmpty()&&(v=="left"?this.selection.selectLeft():this.selection.selectRight());var L=this.getSelectionRange();if(this.getBehavioursEnabled()){var lt=this.session,ct=lt.getState(L.start.row),Dt=lt.getMode().transformAction(ct,"deletion",this,lt,L);if(L.end.column===0){var Wt=lt.getTextRange(L);if(Wt[Wt.length-1]==`
|
217
|
+
`){var Vt=lt.getLine(L.end.row);/^\s+$/.test(Vt)&&(L.end.column=Vt.length)}}Dt&&(L=Dt)}this.session.remove(L),this.clearSelection()},w.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},w.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},w.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},w.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var v=this.getSelectionRange();v.start.column==v.end.column&&v.start.row==v.end.row&&(v.end.column=0,v.end.row++),this.session.remove(v),this.clearSelection()},w.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var v=this.getCursorPosition();this.insert(`
|
218
|
+
`),this.moveCursorToPosition(v)},w.prototype.setGhostText=function(v,L){this.renderer.setGhostText(v,L)},w.prototype.removeGhostText=function(){this.renderer.removeGhostText()},w.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var v=this.getCursorPosition(),L=v.column;if(L!==0){var lt=this.session.getLine(v.row),ct,Dt;L<lt.length?(ct=lt.charAt(L)+lt.charAt(L-1),Dt=new s(v.row,L-1,v.row,L+1)):(ct=lt.charAt(L-1)+lt.charAt(L-2),Dt=new s(v.row,L-2,v.row,L)),this.session.replace(Dt,ct),this.session.selection.moveToPosition(Dt.end)}}},w.prototype.toLowerCase=function(){var v=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var L=this.getSelectionRange(),lt=this.session.getTextRange(L);this.session.replace(L,lt.toLowerCase()),this.selection.setSelectionRange(v)},w.prototype.toUpperCase=function(){var v=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var L=this.getSelectionRange(),lt=this.session.getTextRange(L);this.session.replace(L,lt.toUpperCase()),this.selection.setSelectionRange(v)},w.prototype.indent=function(){var v=this.session,L=this.getSelectionRange();if(L.start.row<L.end.row){var lt=this.$getSelectedRows();v.indentRows(lt.first,lt.last," ");return}else if(L.start.column<L.end.column){var ct=v.getTextRange(L);if(!/^\s+$/.test(ct)){var lt=this.$getSelectedRows();v.indentRows(lt.first,lt.last," ");return}}var Dt=v.getLine(L.start.row),Wt=L.start,Vt=v.getTabSize(),li=v.documentToScreenColumn(Wt.row,Wt.column);if(this.session.getUseSoftTabs())var zt=Vt-li%Vt,Ht=a.stringRepeat(" ",zt);else{for(var zt=li%Vt;Dt[L.start.column-1]==" "&&zt;)L.start.column--,zt--;this.selection.setSelectionRange(L),Ht=" "}return this.insert(Ht)},w.prototype.blockIndent=function(){var v=this.$getSelectedRows();this.session.indentRows(v.first,v.last," ")},w.prototype.blockOutdent=function(){var v=this.session.getSelection();this.session.outdentRows(v.getRange())},w.prototype.sortLines=function(){for(var v=this.$getSelectedRows(),L=this.session,lt=[],ct=v.first;ct<=v.last;ct++)lt.push(L.getLine(ct));lt.sort(function(Vt,li){return Vt.toLowerCase()<li.toLowerCase()?-1:Vt.toLowerCase()>li.toLowerCase()?1:0});for(var Dt=new s(0,0,0,0),ct=v.first;ct<=v.last;ct++){var Wt=L.getLine(ct);Dt.start.row=ct,Dt.end.row=ct,Dt.end.column=Wt.length,L.replace(Dt,lt[ct-v.first])}},w.prototype.toggleCommentLines=function(){var v=this.session.getState(this.getCursorPosition().row),L=this.$getSelectedRows();this.session.getMode().toggleCommentLines(v,this.session,L.first,L.last)},w.prototype.toggleBlockComment=function(){var v=this.getCursorPosition(),L=this.session.getState(v.row),lt=this.getSelectionRange();this.session.getMode().toggleBlockComment(L,this.session,lt,v)},w.prototype.getNumberAt=function(v,L){var lt=/[\-]?[0-9]+(?:\.[0-9]+)?/g;lt.lastIndex=0;for(var ct=this.session.getLine(v);lt.lastIndex<L;){var Dt=lt.exec(ct);if(Dt.index<=L&&Dt.index+Dt[0].length>=L){var Wt={value:Dt[0],start:Dt.index,end:Dt.index+Dt[0].length};return Wt}}return null},w.prototype.modifyNumber=function(v){var L=this.selection.getCursor().row,lt=this.selection.getCursor().column,ct=new s(L,lt-1,L,lt),Dt=this.session.getTextRange(ct);if(!isNaN(parseFloat(Dt))&&isFinite(Dt)){var Wt=this.getNumberAt(L,lt);if(Wt){var Vt=Wt.value.indexOf(".")>=0?Wt.start+Wt.value.indexOf(".")+1:Wt.end,li=Wt.start+Wt.value.length-Vt,zt=parseFloat(Wt.value);zt*=Math.pow(10,li),Vt!==Wt.end&<<Vt?v*=Math.pow(10,Wt.end-lt-1):v*=Math.pow(10,Wt.end-lt),zt+=v,zt/=Math.pow(10,li);var Ht=zt.toFixed(li),Jt=new s(L,Wt.start,L,Wt.end);this.session.replace(Jt,Ht),this.moveCursorTo(L,Math.max(Wt.start+1,lt+Ht.length-Wt.value.length))}}else this.toggleWord()},w.prototype.toggleWord=function(){var v=this.selection.getCursor().row,L=this.selection.getCursor().column;this.selection.selectWord();var lt=this.getSelectedText(),ct=this.selection.getWordRange().start.column,Dt=lt.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),Wt=L-ct-1;Wt<0&&(Wt=0);var Vt=0,li=0,zt=this;lt.match(/[A-Za-z0-9_]+/)&&Dt.forEach(function(mi,yi){li=Vt+mi.length,Wt>=Vt&&Wt<=li&&(lt=mi,zt.selection.clearSelection(),zt.moveCursorTo(v,Vt+ct),zt.selection.selectTo(v,li+ct)),Vt=li});for(var Ht=this.$toggleWordPairs,Jt,ai=0;ai<Ht.length;ai++)for(var hi=Ht[ai],ui=0;ui<=1;ui++){var pi=+!ui,fi=lt.match(new RegExp("^\\s?_?("+a.escapeRegExp(hi[ui])+")\\s?$","i"));if(fi){var gi=lt.match(new RegExp("([_]|^|\\s)("+a.escapeRegExp(fi[1])+")($|\\s)","g"));gi&&(Jt=lt.replace(new RegExp(a.escapeRegExp(hi[ui]),"i"),function(mi){var yi=hi[pi];return mi.toUpperCase()==mi?yi=yi.toUpperCase():mi.charAt(0).toUpperCase()==mi.charAt(0)&&(yi=yi.substr(0,0)+hi[pi].charAt(0).toUpperCase()+yi.substr(1)),yi}),this.insert(Jt),Jt="")}}},w.prototype.findLinkAt=function(v,L){var lt,ct,Dt=this.session.getLine(v),Wt=Dt.split(/((?:https?|ftp):\/\/[\S]+)/),Vt=L;Vt<0&&(Vt=0);var li=0,zt=0,Ht;try{for(var Jt=E(Wt),ai=Jt.next();!ai.done;ai=Jt.next()){var hi=ai.value;if(zt=li+hi.length,Vt>=li&&Vt<=zt&&hi.match(/((?:https?|ftp):\/\/[\S]+)/)){Ht=hi.replace(/[\s:.,'";}\]]+$/,"");break}li=zt}}catch(ui){lt={error:ui}}finally{try{ai&&!ai.done&&(ct=Jt.return)&&ct.call(Jt)}finally{if(lt)throw lt.error}}return Ht},w.prototype.openLink=function(){var v=this.selection.getCursor(),L=this.findLinkAt(v.row,v.column);return L&&window.open(L,"_blank"),L!=null},w.prototype.removeLines=function(){var v=this.$getSelectedRows();this.session.removeFullLines(v.first,v.last),this.clearSelection()},w.prototype.duplicateSelection=function(){var v=this.selection,L=this.session,lt=v.getRange(),ct=v.isBackwards();if(lt.isEmpty()){var Dt=lt.start.row;L.duplicateLines(Dt,Dt)}else{var Wt=ct?lt.start:lt.end,Vt=L.insert(Wt,L.getTextRange(lt));lt.start=Wt,lt.end=Vt,v.setSelectionRange(lt,ct)}},w.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},w.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},w.prototype.moveText=function(v,L,lt){return this.session.moveText(v,L,lt)},w.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},w.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},w.prototype.$moveLines=function(v,L){var lt,ct,Dt=this.selection;if(!Dt.inMultiSelectMode||this.inVirtualSelectionMode){var Wt=Dt.toOrientedRange();lt=this.$getSelectedRows(Wt),ct=this.session.$moveLines(lt.first,lt.last,L?0:v),L&&v==-1&&(ct=0),Wt.moveBy(ct,0),Dt.fromOrientedRange(Wt)}else{var Vt=Dt.rangeList.ranges;Dt.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var li=0,zt=0,Ht=Vt.length,Jt=0;Jt<Ht;Jt++){var ai=Jt;Vt[Jt].moveBy(li,0),lt=this.$getSelectedRows(Vt[Jt]);for(var hi=lt.first,ui=lt.last;++Jt<Ht;){zt&&Vt[Jt].moveBy(zt,0);var pi=this.$getSelectedRows(Vt[Jt]);if(L&&pi.first!=ui)break;if(!L&&pi.first>ui+1)break;ui=pi.last}for(Jt--,li=this.session.$moveLines(hi,ui,L?0:v),L&&v==-1&&(ai=Jt+1);ai<=Jt;)Vt[ai].moveBy(li,0),ai++;L||(li=0),zt+=li}Dt.fromOrientedRange(Dt.ranges[0]),Dt.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},w.prototype.$getSelectedRows=function(v){return v=(v||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(v.start.row),last:this.session.getRowFoldEnd(v.end.row)}},w.prototype.onCompositionStart=function(v){this.renderer.showComposition(v)},w.prototype.onCompositionUpdate=function(v){this.renderer.setCompositionText(v)},w.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},w.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},w.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},w.prototype.isRowVisible=function(v){return v>=this.getFirstVisibleRow()&&v<=this.getLastVisibleRow()},w.prototype.isRowFullyVisible=function(v){return v>=this.renderer.getFirstFullyVisibleRow()&&v<=this.renderer.getLastFullyVisibleRow()},w.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},w.prototype.$moveByPage=function(v,L){var lt=this.renderer,ct=this.renderer.layerConfig,Dt=v*Math.floor(ct.height/ct.lineHeight);L===!0?this.selection.$moveSelection(function(){this.moveCursorBy(Dt,0)}):L===!1&&(this.selection.moveCursorBy(Dt,0),this.selection.clearSelection());var Wt=lt.scrollTop;lt.scrollBy(0,Dt*ct.lineHeight),L!=null&<.scrollCursorIntoView(null,.5),lt.animateScrolling(Wt)},w.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},w.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},w.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},w.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},w.prototype.scrollPageDown=function(){this.$moveByPage(1)},w.prototype.scrollPageUp=function(){this.$moveByPage(-1)},w.prototype.scrollToRow=function(v){this.renderer.scrollToRow(v)},w.prototype.scrollToLine=function(v,L,lt,ct){this.renderer.scrollToLine(v,L,lt,ct)},w.prototype.centerSelection=function(){var v=this.getSelectionRange(),L={row:Math.floor(v.start.row+(v.end.row-v.start.row)/2),column:Math.floor(v.start.column+(v.end.column-v.start.column)/2)};this.renderer.alignCursor(L,.5)},w.prototype.getCursorPosition=function(){return this.selection.getCursor()},w.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},w.prototype.getSelectionRange=function(){return this.selection.getRange()},w.prototype.selectAll=function(){this.selection.selectAll()},w.prototype.clearSelection=function(){this.selection.clearSelection()},w.prototype.moveCursorTo=function(v,L){this.selection.moveCursorTo(v,L)},w.prototype.moveCursorToPosition=function(v){this.selection.moveCursorToPosition(v)},w.prototype.jumpToMatching=function(v,L){var lt=this.getCursorPosition(),ct=new C(this.session,lt.row,lt.column),Dt=ct.getCurrentToken(),Wt=0;Dt&&Dt.type.indexOf("tag-name")!==-1&&(Dt=ct.stepBackward());var Vt=Dt||ct.stepForward();if(Vt){var li,zt=!1,Ht={},Jt=lt.column-Vt.start,ai,hi={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(Vt.value.match(/[{}()\[\]]/g)){for(;Jt<Vt.value.length&&!zt;Jt++)if(hi[Vt.value[Jt]])switch(ai=hi[Vt.value[Jt]]+"."+Vt.type.replace("rparen","lparen"),isNaN(Ht[ai])&&(Ht[ai]=0),Vt.value[Jt]){case"(":case"[":case"{":Ht[ai]++;break;case")":case"]":case"}":Ht[ai]--,Ht[ai]===-1&&(li="bracket",zt=!0);break}}else Vt.type.indexOf("tag-name")!==-1&&(isNaN(Ht[Vt.value])&&(Ht[Vt.value]=0),Dt.value==="<"&&Wt>1?Ht[Vt.value]++:Dt.value==="</"&&Ht[Vt.value]--,Ht[Vt.value]===-1&&(li="tag",zt=!0));zt||(Dt=Vt,Wt++,Vt=ct.stepForward(),Jt=0)}while(Vt&&!zt);if(li){var ui,pi;if(li==="bracket")ui=this.session.getBracketRange(lt),ui||(ui=new s(ct.getCurrentTokenRow(),ct.getCurrentTokenColumn()+Jt-1,ct.getCurrentTokenRow(),ct.getCurrentTokenColumn()+Jt-1),pi=ui.start,(L||pi.row===lt.row&&Math.abs(pi.column-lt.column)<2)&&(ui=this.session.getBracketRange(pi)));else if(li==="tag"){if(!Vt||Vt.type.indexOf("tag-name")===-1)return;if(ui=new s(ct.getCurrentTokenRow(),ct.getCurrentTokenColumn()-2,ct.getCurrentTokenRow(),ct.getCurrentTokenColumn()-2),ui.compare(lt.row,lt.column)===0){var fi=this.session.getMatchingTags(lt);fi&&(fi.openTag.contains(lt.row,lt.column)?(ui=fi.closeTag,pi=ui.start):(ui=fi.openTag,fi.closeTag.start.row===lt.row&&fi.closeTag.start.column===lt.column?pi=ui.end:pi=ui.start))}pi=pi||ui.start}pi=ui&&ui.cursor||pi,pi&&(v?ui&&L?this.selection.setRange(ui):ui&&ui.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(pi.row,pi.column):this.selection.moveTo(pi.row,pi.column))}}},w.prototype.gotoLine=function(v,L,lt){this.selection.clearSelection(),this.session.unfold({row:v-1,column:L||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(v-1,L||0),this.isRowFullyVisible(v-1)||this.scrollToLine(v-1,!0,lt)},w.prototype.navigateTo=function(v,L){this.selection.moveTo(v,L)},w.prototype.navigateUp=function(v){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var L=this.selection.anchor.getPosition();return this.moveCursorToPosition(L)}this.selection.clearSelection(),this.selection.moveCursorBy(-v||-1,0)},w.prototype.navigateDown=function(v){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var L=this.selection.anchor.getPosition();return this.moveCursorToPosition(L)}this.selection.clearSelection(),this.selection.moveCursorBy(v||1,0)},w.prototype.navigateLeft=function(v){if(this.selection.isEmpty())for(v=v||1;v--;)this.selection.moveCursorLeft();else{var L=this.getSelectionRange().start;this.moveCursorToPosition(L)}this.clearSelection()},w.prototype.navigateRight=function(v){if(this.selection.isEmpty())for(v=v||1;v--;)this.selection.moveCursorRight();else{var L=this.getSelectionRange().end;this.moveCursorToPosition(L)}this.clearSelection()},w.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},w.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},w.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},w.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},w.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},w.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},w.prototype.replace=function(v,L){L&&this.$search.set(L);var lt=this.$search.find(this.session),ct=0;return lt&&(this.$tryReplace(lt,v)&&(ct=1),this.selection.setSelectionRange(lt),this.renderer.scrollSelectionIntoView(lt.start,lt.end)),ct},w.prototype.replaceAll=function(v,L){L&&this.$search.set(L);var lt=this.$search.findAll(this.session),ct=0;if(!lt.length)return ct;var Dt=this.getSelectionRange();this.selection.moveTo(0,0);for(var Wt=lt.length-1;Wt>=0;--Wt)this.$tryReplace(lt[Wt],v)&&ct++;return this.selection.setSelectionRange(Dt),ct},w.prototype.$tryReplace=function(v,L){var lt=this.session.getTextRange(v);return L=this.$search.replace(lt,L),L!==null?(v.end=this.session.replace(v,L),v):null},w.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},w.prototype.find=function(v,L,lt){L||(L={}),typeof v=="string"||v instanceof RegExp?L.needle=v:typeof v=="object"&&S.mixin(L,v);var ct=this.selection.getRange();L.needle==null&&(v=this.session.getTextRange(ct)||this.$search.$options.needle,v||(ct=this.session.getWordRange(ct.start.row,ct.start.column),v=this.session.getTextRange(ct)),this.$search.set({needle:v})),this.$search.set(L),L.start||this.$search.set({start:ct});var Dt=this.$search.find(this.session);if(L.preventScroll)return Dt;if(Dt)return this.revealRange(Dt,lt),Dt;L.backwards?ct.start=ct.end:ct.end=ct.start,this.selection.setRange(ct)},w.prototype.findNext=function(v,L){this.find({skipCurrent:!0,backwards:!1},v,L)},w.prototype.findPrevious=function(v,L){this.find(v,{skipCurrent:!0,backwards:!0},L)},w.prototype.revealRange=function(v,L){this.session.unfold(v),this.selection.setSelectionRange(v);var lt=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(v.start,v.end,.5),L!==!1&&this.renderer.animateScrolling(lt)},w.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},w.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},w.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(v){v.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()},w.prototype.setAutoScrollEditorIntoView=function(v){if(v){var L,lt=this,ct=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var Dt=this.$scrollAnchor;Dt.style.cssText="position:absolute",this.container.insertBefore(Dt,this.container.firstChild);var Wt=this.on("changeSelection",function(){ct=!0}),Vt=this.renderer.on("beforeRender",function(){ct&&(L=lt.renderer.container.getBoundingClientRect())}),li=this.renderer.on("afterRender",function(){if(ct&&L&&(lt.isFocused()||lt.searchBox&<.searchBox.isFocused())){var zt=lt.renderer,Ht=zt.$cursorLayer.$pixelPos,Jt=zt.layerConfig,ai=Ht.top-Jt.offset;Ht.top>=0&&ai+L.top<0?ct=!0:Ht.top<Jt.height&&Ht.top+L.top+Jt.lineHeight>window.innerHeight?ct=!1:ct=null,ct!=null&&(Dt.style.top=ai+"px",Dt.style.left=Ht.left+"px",Dt.style.height=Jt.lineHeight+"px",Dt.scrollIntoView(ct)),ct=L=null}});this.setAutoScrollEditorIntoView=function(zt){zt||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",Wt),this.renderer.off("afterRender",li),this.renderer.off("beforeRender",Vt))}}},w.prototype.$resetCursorStyle=function(){var v=this.$cursorStyle||"ace",L=this.renderer.$cursorLayer;L&&(L.setSmoothBlinking(/smooth/.test(v)),L.isBlinking=!this.$readOnly&&v!="wide",x.setCssClass(L.element,"ace_slim-cursors",/slim/.test(v)))},w.prototype.prompt=function(v,L,lt){var ct=this;A.loadModule("ace/ext/prompt",function(Dt){Dt.prompt(ct,v,L,lt)})},w}();G.$uid=0,G.prototype.curOp=null,G.prototype.prevOp={},G.prototype.$mergeableCommands=["backspace","del","insertstring"],G.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"],["&&","||"],["==","!="]],S.implement(G.prototype,p),A.defineOptions(G.prototype,"editor",{selectionStyle:{set:function(w){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:w})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(w){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(w){var v=this;if(this.textInput.setReadOnly(w),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(lt){var ct=!1;if(lt&<.type=="keydown"){if(lt&<.key&&!lt.ctrlKey&&!lt.metaKey&&(lt.key==" "&<.preventDefault(),ct=lt.key.length==1),!ct)return}else lt&<.type!=="exec"&&(ct=!0);if(ct){v.hoverTooltip||(v.hoverTooltip=new ut);var Dt=x.createElement("div");Dt.textContent=Me("editor.tooltip.disable-editing","Editing is disabled"),v.hoverTooltip.isOpen||v.hoverTooltip.showForRange(v,v.getSelectionRange(),Dt)}else v.hoverTooltip&&v.hoverTooltip.isOpen&&v.hoverTooltip.hide()});var L=this.textInput.getElement();w?(W.addListener(L,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(W.removeListener(L,"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(w){this.textInput.setCopyWithEmptySelection(w)},initialValue:!1},cursorStyle:{set:function(w){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(w){this.setAutoScrollEditorIntoView(w)}},keyboardHandler:{set:function(w){this.setKeyboardHandler(w)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(w){this.session.setValue(w)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(w){this.setSession(w)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(w){this.renderer.$gutterLayer.setShowLineNumbers(w),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),w&&this.$relativeLineNumbers?D.attach(this):D.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(w){this.$showLineNumbers&&w?D.attach(this):D.detach(this)}},placeholder:{set:function(w){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var v=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(v&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),x.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!v&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),x.addCssClass(this.container,"ace_hasPlaceholder");var L=x.createElement("div");L.className="ace_placeholder",L.textContent=this.$placeholder||"",this.renderer.placeholderNode=L,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!v&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(w){var v={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(ct){ct.blur(),ct.renderer.scroller.focus()},readOnly:!0},L=function(ct){if(ct.target==this.renderer.scroller&&ct.keyCode===q.enter){ct.preventDefault();var Dt=this.getCursorPosition().row;this.isRowVisible(Dt)||this.scrollToLine(Dt,!0,!0),this.focus()}},lt;w?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(u.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",Me("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",Me("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",L.bind(this)),this.commands.addCommand(v),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",Me("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",Me("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),lt||(lt=new b(this)),lt.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",L.bind(this)),this.commands.removeCommand(v),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),lt&<.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(w){this.$textInputAriaLabel=w},initialValue:""},enableMobileMenu:{set:function(w){this.$enableMobileMenu=w},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 D={getText:function(w,v){return(Math.abs(w.selection.lead.row-v)||v+1+(v<9?"·":""))+""},getWidth:function(w,v,L){return Math.max(v.toString().length,(L.lastRow+1).toString().length,2)*L.characterWidth},update:function(w,v){v.renderer.$loop.schedule(v.renderer.CHANGE_GUTTER)},attach:function(w){w.renderer.$gutterLayer.$renderer=this,w.on("changeSelection",this.update),this.update(null,w)},detach:function(w){w.renderer.$gutterLayer.$renderer==this&&(w.renderer.$gutterLayer.$renderer=null),w.off("changeSelection",this.update),this.update(null,w)}};g.Editor=G}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(f,g,at){var E=f("../lib/dom"),S=function(){function x(a,u){this.element=a,this.canvasHeight=u||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return x.prototype.moveContainer=function(a){E.translate(this.element,0,-(a.firstRowScreen*a.lineHeight%this.canvasHeight)-a.offset*this.$offsetCoefficient)},x.prototype.pageChanged=function(a,u){return Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)!==Math.floor(u.firstRowScreen*u.lineHeight/this.canvasHeight)},x.prototype.computeLineTop=function(a,u,n){var o=u.firstRowScreen*u.lineHeight,r=Math.floor(o/this.canvasHeight),t=n.documentToScreenRow(a,0)*u.lineHeight;return t-r*this.canvasHeight},x.prototype.computeLineHeight=function(a,u,n){return u.lineHeight*n.getRowLineCount(a)},x.prototype.getLength=function(){return this.cells.length},x.prototype.get=function(a){return this.cells[a]},x.prototype.shift=function(){this.$cacheCell(this.cells.shift())},x.prototype.pop=function(){this.$cacheCell(this.cells.pop())},x.prototype.push=function(a){if(Array.isArray(a)){this.cells.push.apply(this.cells,a);for(var u=E.createFragment(this.element),n=0;n<a.length;n++)u.appendChild(a[n].element);this.element.appendChild(u)}else this.cells.push(a),this.element.appendChild(a.element)},x.prototype.unshift=function(a){if(Array.isArray(a)){this.cells.unshift.apply(this.cells,a);for(var u=E.createFragment(this.element),n=0;n<a.length;n++)u.appendChild(a[n].element);this.element.firstChild?this.element.insertBefore(u,this.element.firstChild):this.element.appendChild(u)}else this.cells.unshift(a),this.element.insertAdjacentElement("afterbegin",a.element)},x.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},x.prototype.$cacheCell=function(a){a&&(a.element.remove(),this.cellCache.push(a))},x.prototype.createCell=function(a,u,n,o){var r=this.cellCache.pop();if(!r){var t=E.createElement("div");o&&o(t),this.element.appendChild(t),r={element:t,text:"",row:a}}return r.row=a,r},x}();g.Lines=S}),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,at){var E=f("../lib/dom"),S=f("../lib/oop"),x=f("../lib/lang"),a=f("../lib/event_emitter").EventEmitter,u=f("./lines").Lines,n=f("../config").nls,o=function(){function t(e){this.element=E.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 u(this.element),this.$lines.$offsetCoefficient=1}return t.prototype.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},t.prototype.addGutterDecoration=function(e,i){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,i)},t.prototype.removeGutterDecoration=function(e,i){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,i)},t.prototype.setAnnotations=function(e){this.$annotations=[];for(var i=0;i<e.length;i++){var s=e[i],p=s.row,m=this.$annotations[p];m||(m=this.$annotations[p]={text:[],type:[],displayText:[]});var _=s.text,A=s.text,C=s.type;_=_?x.escapeHTML(_):s.html||"",A=A||s.html||"",m.text.indexOf(_)===-1&&(m.text.push(_),m.type.push(C),m.displayText.push(A));var b=s.className;b?m.className=b:C==="error"?m.className=" ace_error":C==="security"&&!/\bace_error\b/.test(m.className)?m.className=" ace_security":C==="warning"&&!/\bace_(error|security)\b/.test(m.className)?m.className=" ace_warning":C==="info"&&!m.className?m.className=" ace_info":C==="hint"&&!m.className&&(m.className=" ace_hint")}},t.prototype.$updateAnnotations=function(e){if(this.$annotations.length){var i=e.start.row,s=e.end.row-i;if(s!==0)if(e.action=="remove")this.$annotations.splice(i,s+1,null);else{var p=new Array(s+1);p.unshift(i,1),this.$annotations.splice.apply(this.$annotations,p)}}},t.prototype.update=function(e){this.config=e;var i=this.session,s=e.firstRow,p=Math.min(e.lastRow+e.gutterOffset,i.getLength()-1);this.oldLastRow=p,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var m=i.getNextFoldLine(s),_=m?m.start.row:1/0,A=null,C=-1,b=s;;){if(b>_&&(b=m.end.row+1,m=i.getNextFoldLine(b,m),_=m?m.start.row:1/0),b>p){for(;this.$lines.getLength()>C+1;)this.$lines.pop();break}A=this.$lines.get(++C),A?A.row=b:(A=this.$lines.createCell(b,e,this.session,r),this.$lines.push(A)),this.$renderCell(A,e,m,b),b++}this._signal("afterRender"),this.$updateGutterWidth(e)},t.prototype.$updateGutterWidth=function(e){var i=this.session,s=i.gutterRenderer||this.$renderer,p=i.$firstLineNumber,m=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||i.$useWrapMode)&&(m=i.getLength()+p-1);var _=s?s.getWidth(i,m,e):m.toString().length*e.characterWidth,A=this.$padding||this.$computePadding();_+=A.left+A.right,_!==this.gutterWidth&&!isNaN(_)&&(this.gutterWidth=_,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",_))},t.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},t.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 i=this.$lines.cells;this.$cursorCell=null;for(var s=0;s<i.length;s++){var p=i[s];if(p.row>=this.$cursorRow){if(p.row>this.$cursorRow){var m=this.session.getFoldLine(this.$cursorRow);if(s>0&&m&&m.start.row==i[s-1].row)p=i[s-1];else break}p.element.className="ace_gutter-active-line "+p.element.className,this.$cursorCell=p;break}}}}},t.prototype.scrollLines=function(e){var i=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(i,e))return this.update(e);this.$lines.moveContainer(e);var s=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),p=this.oldLastRow;if(this.oldLastRow=s,!i||p<e.firstRow)return this.update(e);if(s<i.firstRow)return this.update(e);if(i.firstRow<e.firstRow)for(var m=this.session.getFoldedRowCount(i.firstRow,e.firstRow-1);m>0;m--)this.$lines.shift();if(p>s)for(var m=this.session.getFoldedRowCount(s+1,p);m>0;m--)this.$lines.pop();e.firstRow<i.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,i.firstRow-1)),s>p&&this.$lines.push(this.$renderLines(e,p+1,s)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},t.prototype.$renderLines=function(e,i,s){for(var p=[],m=i,_=this.session.getNextFoldLine(m),A=_?_.start.row:1/0;m>A&&(m=_.end.row+1,_=this.session.getNextFoldLine(m,_),A=_?_.start.row:1/0),!(m>s);){var C=this.$lines.createCell(m,e,this.session,r);this.$renderCell(C,e,_,m),p.push(C),m++}return p},t.prototype.$renderCell=function(e,i,s,p){var m=e.element,_=this.session,A=m.childNodes[0],C=m.childNodes[1],b=m.childNodes[2],Me=m.childNodes[3],Re=b.firstChild,q=_.$firstLineNumber,W=_.$breakpoints,ut=_.$decorations,G=_.gutterRenderer||this.$renderer,D=this.$showFoldWidgets&&_.foldWidgets,w=s?s.start.row:Number.MAX_VALUE,v=i.lineHeight+"px",L=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",lt=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",ct=(G?G.getText(_,p):p+q).toString();if(this.$highlightGutterLine&&(p==this.$cursorRow||s&&p<this.$cursorRow&&p>=w&&this.$cursorRow<=s.end.row)&&(L+="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)),W[p]&&(L+=W[p]),ut[p]&&(L+=ut[p]),this.$annotations[p]&&p!==w&&(L+=this.$annotations[p].className),D){var Dt=D[p];Dt==null&&(Dt=D[p]=_.getFoldWidget(p))}if(Dt){var Wt="ace_fold-widget ace_"+Dt,Vt=Dt=="start"&&p==w&&p<s.end.row;if(Vt){Wt+=" ace_closed";for(var li="",zt=!1,Ht=p+1;Ht<=s.end.row;Ht++)if(this.$annotations[Ht]){if(this.$annotations[Ht].className===" ace_error"){zt=!0,li=" ace_error_fold";break}this.$annotations[Ht].className===" ace_security"?(zt=!0,li=" ace_security_fold"):this.$annotations[Ht].className===" ace_warning"&&li!==" ace_security_fold"&&(zt=!0,li=" ace_warning_fold")}L+=li}else Wt+=" ace_open";C.className!=Wt&&(C.className=Wt),E.setStyle(C.style,"height",v),E.setStyle(C.style,"display","inline-block"),C.setAttribute("role","button"),C.setAttribute("tabindex","-1");var Jt=_.getFoldWidgetRange(p);Jt?C.setAttribute("aria-label",n("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[Jt.start.row+1,Jt.end.row+1])):s?C.setAttribute("aria-label",n("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[s.start.row+1,s.end.row+1])):C.setAttribute("aria-label",n("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[p+1])),Vt?(C.setAttribute("aria-expanded","false"),C.setAttribute("title",n("gutter.code-folding.closed.title","Unfold code"))):(C.setAttribute("aria-expanded","true"),C.setAttribute("title",n("gutter.code-folding.open.title","Fold code")))}else C&&(E.setStyle(C.style,"display","none"),C.setAttribute("tabindex","0"),C.removeAttribute("role"),C.removeAttribute("aria-label"));var ai=this.session.$gutterCustomWidgets[p];if(ai?this.$addCustomWidget(p,ai,e):Me&&this.$removeCustomWidget(p,e),zt&&this.$showFoldedAnnotations){b.className="ace_gutter_annotation",Re.className=lt,Re.className+=li,E.setStyle(Re.style,"height",v),E.setStyle(b.style,"display","block"),E.setStyle(b.style,"height",v);var hi;switch(li){case" ace_error_fold":hi=n("gutter.annotation.aria-label.error","Error, read annotations row $0",[ct]);break;case" ace_security_fold":hi=n("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[ct]);break;case" ace_warning_fold":hi=n("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[ct]);break}b.setAttribute("aria-label",hi),b.setAttribute("tabindex","-1"),b.setAttribute("role","button")}else if(this.$annotations[p]){b.className="ace_gutter_annotation",Re.className=lt,this.$useSvgGutterIcons?Re.className+=this.$annotations[p].className:m.classList.add(this.$annotations[p].className.replace(" ","")),E.setStyle(Re.style,"height",v),E.setStyle(b.style,"display","block"),E.setStyle(b.style,"height",v);var hi;switch(this.$annotations[p].className){case" ace_error":hi=n("gutter.annotation.aria-label.error","Error, read annotations row $0",[ct]);break;case" ace_security":hi=n("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[ct]);break;case" ace_warning":hi=n("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[ct]);break;case" ace_info":hi=n("gutter.annotation.aria-label.info","Info, read annotations row $0",[ct]);break;case" ace_hint":hi=n("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[ct]);break}b.setAttribute("aria-label",hi),b.setAttribute("tabindex","-1"),b.setAttribute("role","button")}else E.setStyle(b.style,"display","none"),b.removeAttribute("aria-label"),b.removeAttribute("role"),b.setAttribute("tabindex","0");return ct!==A.data&&(A.data=ct),m.className!=L&&(m.className=L),E.setStyle(e.element.style,"height",this.$lines.computeLineHeight(p,i,_)+"px"),E.setStyle(e.element.style,"top",this.$lines.computeLineTop(p,i,_)+"px"),e.text=ct,b.style.display==="none"&&C.style.display==="none"&&!ai?e.element.setAttribute("aria-hidden",!0):e.element.setAttribute("aria-hidden",!1),e},t.prototype.setHighlightGutterLine=function(e){this.$highlightGutterLine=e},t.prototype.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},t.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},t.prototype.setShowFoldWidgets=function(e){e?E.addCssClass(this.element,"ace_folding-enabled"):E.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},t.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},t.prototype.$hideFoldWidget=function(e,i){var s=i||this.$getGutterCell(e);if(s&&s.element){var p=s.element.childNodes[1];p&&E.setStyle(p.style,"display","none")}},t.prototype.$showFoldWidget=function(e,i){var s=i||this.$getGutterCell(e);if(s&&s.element){var p=s.element.childNodes[1];p&&this.session.foldWidgets&&this.session.foldWidgets[s.row]&&E.setStyle(p.style,"display","inline-block")}},t.prototype.$getGutterCell=function(e){var i=this.$lines.cells,s=this.session.documentToScreenRow(e,0);return i[e-this.config.firstRowScreen-(e-s)]},t.prototype.$addCustomWidget=function(e,i,s){var p=i.className,m=i.label,_=i.title,A=i.callbacks;this.session.$gutterCustomWidgets[e]={className:p,label:m,title:_,callbacks:A},this.$hideFoldWidget(e,s);var C=s||this.$getGutterCell(e);if(C&&C.element){var b=C.element.querySelector(".ace_custom-widget");b&&b.remove(),b=E.createElement("span"),b.className="ace_custom-widget ".concat(p),b.setAttribute("tabindex","-1"),b.setAttribute("role","button"),b.setAttribute("aria-label",m),b.setAttribute("title",_),E.setStyle(b.style,"display","inline-block"),E.setStyle(b.style,"height","inherit"),A&&A.onClick&&b.addEventListener("click",function(Me){A.onClick(Me,e),Me.stopPropagation()}),C.element.appendChild(b)}},t.prototype.$removeCustomWidget=function(e,i){delete this.session.$gutterCustomWidgets[e],this.$showFoldWidget(e,i);var s=i||this.$getGutterCell(e);if(s&&s.element){var p=s.element.querySelector(".ace_custom-widget");p&&s.element.removeChild(p)}},t.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=E.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},t.prototype.getRegion=function(e){var i=this.$padding||this.$computePadding(),s=this.element.getBoundingClientRect();if(e.x<i.left+s.left)return"markers";if(this.$showFoldWidgets&&e.x>s.right-i.right)return"foldWidgets"},t}();o.prototype.$fixedWidth=!1,o.prototype.$highlightGutterLine=!0,o.prototype.$renderer="",o.prototype.$showLineNumbers=!0,o.prototype.$showFoldWidgets=!0,S.implement(o.prototype,a);function r(t){var e=document.createTextNode("");t.appendChild(e);var i=E.createElement("span");t.appendChild(i);var s=E.createElement("span");t.appendChild(s);var p=E.createElement("span");return s.appendChild(p),t}g.Gutter=o}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(f,g,at){var E=f("../range").Range,S=f("../lib/dom"),x=function(){function u(n){this.element=S.createElement("div"),this.element.className="ace_layer ace_marker-layer",n.appendChild(this.element)}return u.prototype.setPadding=function(n){this.$padding=n},u.prototype.setSession=function(n){this.session=n},u.prototype.setMarkers=function(n){this.markers=n},u.prototype.elt=function(n,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=n},u.prototype.update=function(n){if(n){this.config=n,this.i=0;var o;for(var r in this.markers){var t=this.markers[r];if(!t.range){t.update(o,this,this.session,n);continue}var e=t.range.clipRows(n.firstRow,n.lastRow);if(!e.isEmpty())if(e=e.toScreenRange(this.session),t.renderer){var i=this.$getTop(e.start.row,n),s=this.$padding+e.start.column*n.characterWidth;t.renderer(o,e,s,i,n)}else t.type=="fullLine"?this.drawFullLineMarker(o,e,t.clazz,n):t.type=="screenLine"?this.drawScreenLineMarker(o,e,t.clazz,n):e.isMultiLine()?t.type=="text"?this.drawTextMarker(o,e,t.clazz,n):this.drawMultiLineMarker(o,e,t.clazz,n):this.drawSingleLineMarker(o,e,t.clazz+" ace_start ace_br15",n)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},u.prototype.$getTop=function(n,o){return(n-o.firstRowScreen)*o.lineHeight},u.prototype.drawTextMarker=function(n,o,r,t,e){for(var i=this.session,s=o.start.row,p=o.end.row,m=s,_=0,A=0,C=i.getScreenLastRowColumn(m),b=new E(m,o.start.column,m,A);m<=p;m++)b.start.row=b.end.row=m,b.start.column=m==s?o.start.column:i.getRowWrapIndent(m),b.end.column=C,_=A,A=C,C=m+1<p?i.getScreenLastRowColumn(m+1):m==p?0:o.end.column,this.drawSingleLineMarker(n,b,r+(m==s?" ace_start":"")+" ace_br"+a(m==s||m==s+1&&o.start.column,_<A,A>C,m==p),t,m==p?0:1,e)},u.prototype.drawMultiLineMarker=function(n,o,r,t,e){var i=this.$padding,s=t.lineHeight,p=this.$getTop(o.start.row,t),m=i+o.start.column*t.characterWidth;if(e=e||"",this.session.$bidiHandler.isBidiRow(o.start.row)){var _=o.clone();_.end.row=_.start.row,_.end.column=this.session.getLine(_.start.row).length,this.drawBidiSingleLineMarker(n,_,r+" ace_br1 ace_start",t,null,e)}else this.elt(r+" ace_br1 ace_start","height:"+s+"px;right:"+i+"px;top:"+p+"px;left:"+m+"px;"+(e||""));if(this.session.$bidiHandler.isBidiRow(o.end.row)){var _=o.clone();_.start.row=_.end.row,_.start.column=0,this.drawBidiSingleLineMarker(n,_,r+" ace_br12",t,null,e)}else{p=this.$getTop(o.end.row,t);var A=o.end.column*t.characterWidth;this.elt(r+" ace_br12","height:"+s+"px;width:"+A+"px;top:"+p+"px;left:"+i+"px;"+(e||""))}if(s=(o.end.row-o.start.row-1)*t.lineHeight,!(s<=0)){p=this.$getTop(o.start.row+1,t);var C=(o.start.column?1:0)|(o.end.column?0:8);this.elt(r+(C?" ace_br"+C:""),"height:"+s+"px;right:"+i+"px;top:"+p+"px;left:"+i+"px;"+(e||""))}},u.prototype.drawSingleLineMarker=function(n,o,r,t,e,i){if(this.session.$bidiHandler.isBidiRow(o.start.row))return this.drawBidiSingleLineMarker(n,o,r,t,e,i);var s=t.lineHeight,p=(o.end.column+(e||0)-o.start.column)*t.characterWidth,m=this.$getTop(o.start.row,t),_=this.$padding+o.start.column*t.characterWidth;this.elt(r,"height:"+s+"px;width:"+p+"px;top:"+m+"px;left:"+_+"px;"+(i||""))},u.prototype.drawBidiSingleLineMarker=function(n,o,r,t,e,i){var s=t.lineHeight,p=this.$getTop(o.start.row,t),m=this.$padding,_=this.session.$bidiHandler.getSelections(o.start.column,o.end.column);_.forEach(function(A){this.elt(r,"height:"+s+"px;width:"+(A.width+(e||0))+"px;top:"+p+"px;left:"+(m+A.left)+"px;"+(i||""))},this)},u.prototype.drawFullLineMarker=function(n,o,r,t,e){var i=this.$getTop(o.start.row,t),s=t.lineHeight;o.start.row!=o.end.row&&(s+=this.$getTop(o.end.row,t)-i),this.elt(r,"height:"+s+"px;top:"+i+"px;left:0;right:0;"+(e||""))},u.prototype.drawScreenLineMarker=function(n,o,r,t,e){var i=this.$getTop(o.start.row,t),s=t.lineHeight;this.elt(r,"height:"+s+"px;top:"+i+"px;left:0;right:0;"+(e||""))},u}();x.prototype.$padding=0;function a(u,n,o,r){return(u?1:0)|(n?2:0)|(o?4:0)|(r?8:0)}g.Marker=x}),ace.define("ace/layer/text_util",["require","exports","module"],function(f,g,at){var E=new Set(["text","rparen","lparen"]);g.isTextToken=function(S){return E.has(S)}}),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,at){var E=f("../lib/oop"),S=f("../lib/dom"),x=f("../lib/lang"),a=f("./lines").Lines,u=f("../lib/event_emitter").EventEmitter,n=f("../config").nls,o=f("./text_util").isTextToken,r=function(){function t(e){this.dom=S,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 a(this.element)}return t.prototype.$updateEolChar=function(){var e=this.session.doc,i=e.getNewLineCharacter()==`
|
219
|
+
`&&e.getNewLineMode()!="windows",s=i?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=s)return this.EOL_CHAR=s,!0},t.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},t.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},t.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},t.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",(function(i){this._signal("changeCharacterSize",i)}).bind(this)),this.$pollSizeChanges()},t.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},t.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},t.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString()},t.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)},t.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},t.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides===e?!1:(this.$highlightIndentGuides=e,e)},t.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var i=this.$tabStrings=[0],s=1;s<e+1;s++)if(this.showTabs){var p=this.dom.createElement("span");p.className="ace_invisible ace_invisible_tab",p.textContent=x.stringRepeat(this.TAB_CHAR,s),i.push(p)}else i.push(this.dom.createTextNode(x.stringRepeat(" ",s),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var m="ace_indent-guide",_=this.showSpaces?" ace_invisible ace_invisible_space":"",A=this.showSpaces?x.stringRepeat(this.SPACE_CHAR,this.tabSize):x.stringRepeat(" ",this.tabSize),C=this.showTabs?" ace_invisible ace_invisible_tab":"",b=this.showTabs?x.stringRepeat(this.TAB_CHAR,this.tabSize):A,p=this.dom.createElement("span");p.className=m+_,p.textContent=A,this.$tabStrings[" "]=p;var p=this.dom.createElement("span");p.className=m+C,p.textContent=b,this.$tabStrings[" "]=p}},t.prototype.updateLines=function(e,i,s){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var p=Math.max(i,e.firstRow),m=Math.min(s,e.lastRow),_=this.element.childNodes,A=0,b=e.firstRow;b<p;b++){var Me=this.session.getFoldLine(b);if(Me)if(Me.containsRow(p)){p=Me.start.row;break}else b=Me.end.row;A++}for(var C=!1,b=p,Me=this.session.getNextFoldLine(b),Re=Me?Me.start.row:1/0;b>Re&&(b=Me.end.row+1,Me=this.session.getNextFoldLine(b,Me),Re=Me?Me.start.row:1/0),!(b>m);){var q=_[A++];if(q){this.dom.removeChildren(q),this.$renderLine(q,b,b==Re?Me:!1),C&&(q.style.top=this.$lines.computeLineTop(b,e,this.session)+"px");var W=e.lineHeight*this.session.getRowLength(b)+"px";q.style.height!=W&&(C=!0,q.style.height=W)}b++}if(C)for(;A<this.$lines.cells.length;){var ut=this.$lines.cells[A++];ut.element.style.top=this.$lines.computeLineTop(ut.row,e,this.session)+"px"}},t.prototype.scrollLines=function(e){var i=this.config;if(this.config=e,this.$lines.pageChanged(i,e))return this.update(e);this.$lines.moveContainer(e);var s=e.lastRow,p=i?i.lastRow:-1;if(!i||p<e.firstRow)return this.update(e);if(s<i.firstRow)return this.update(e);if(!i||i.lastRow<e.firstRow)return this.update(e);if(e.lastRow<i.firstRow)return this.update(e);if(i.firstRow<e.firstRow)for(var m=this.session.getFoldedRowCount(i.firstRow,e.firstRow-1);m>0;m--)this.$lines.shift();if(i.lastRow>e.lastRow)for(var m=this.session.getFoldedRowCount(e.lastRow+1,i.lastRow);m>0;m--)this.$lines.pop();e.firstRow<i.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,i.firstRow-1)),e.lastRow>i.lastRow&&this.$lines.push(this.$renderLinesFragment(e,i.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},t.prototype.$renderLinesFragment=function(e,i,s){for(var p=[],m=i,_=this.session.getNextFoldLine(m),A=_?_.start.row:1/0;m>A&&(m=_.end.row+1,_=this.session.getNextFoldLine(m,_),A=_?_.start.row:1/0),!(m>s);){var C=this.$lines.createCell(m,e,this.session),b=C.element;this.dom.removeChildren(b),S.setStyle(b.style,"height",this.$lines.computeLineHeight(m,e,this.session)+"px"),S.setStyle(b.style,"top",this.$lines.computeLineTop(m,e,this.session)+"px"),this.$renderLine(b,m,m==A?_:!1),this.$useLineGroups()?b.className="ace_line_group":b.className="ace_line",p.push(C),m++}return p},t.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var i=e.firstRow,s=e.lastRow,p=this.$lines;p.getLength();)p.pop();p.push(this.$renderLinesFragment(e,i,s))},t.prototype.$renderToken=function(e,i,s,p){for(var m=this,_=/(\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,A=this.dom.createFragment(this.element),C,b=0;C=_.exec(p);){var Me=C[1],Re=C[2],q=C[3],W=C[4],ut=C[5];if(!(!m.showSpaces&&Re)){var G=b!=C.index?p.slice(b,C.index):"";if(b=C.index+C[0].length,G&&A.appendChild(this.dom.createTextNode(G,this.element)),Me){var D=m.session.getScreenTabSize(i+C.index),w=m.$tabStrings[D].cloneNode(!0);w.charCount=1,A.appendChild(w),i+=D-1}else if(Re)if(m.showSpaces){var v=this.dom.createElement("span");v.className="ace_invisible ace_invisible_space",v.textContent=x.stringRepeat(m.SPACE_CHAR,Re.length),A.appendChild(v)}else A.appendChild(this.dom.createTextNode(Re,this.element));else if(q){var v=this.dom.createElement("span");v.className="ace_invisible ace_invisible_space ace_invalid",v.textContent=x.stringRepeat(m.SPACE_CHAR,q.length),A.appendChild(v)}else if(W){i+=1;var v=this.dom.createElement("span");v.style.width=m.config.characterWidth*2+"px",v.className=m.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",v.textContent=m.showSpaces?m.SPACE_CHAR:W,A.appendChild(v)}else if(ut){i+=1;var v=this.dom.createElement("span");v.style.width=m.config.characterWidth*2+"px",v.className="ace_cjk",v.textContent=ut,A.appendChild(v)}}}if(A.appendChild(this.dom.createTextNode(b?p.slice(b):p,this.element)),o(s.type))e.appendChild(A);else{var L="ace_"+s.type.replace(/\./g," ace_"),v=this.dom.createElement("span");s.type=="fold"&&(v.style.width=s.value.length*this.config.characterWidth+"px",v.setAttribute("title",n("inline-fold.closed.title","Unfold code"))),v.className=L,v.appendChild(A),e.appendChild(v)}return i+p.length},t.prototype.renderIndentGuide=function(e,i,s){var p=i.search(this.$indentGuideRe);if(p<=0||p>=s)return i;if(i[0]==" "){p-=p%this.tabSize;for(var m=p/this.tabSize,_=0;_<m;_++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),i.substr(p)}else if(i[0]==" "){for(var _=0;_<p;_++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),i.substr(p)}return this.$highlightIndentGuide(),i},t.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 i=this.session.selection.getCursor(),s=/^\s*/.exec(this.session.doc.getLine(i.row))[0].length,p=Math.floor(s/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:p,start:i.row};var m=this.session.$bracketHighlight;if(m){for(var _=this.session.$bracketHighlight.ranges,A=0;A<_.length;A++)if(i.row!==_[A].start.row){this.$highlightIndentGuideMarker.end=_[A].start.row+1,i.row>_[A].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&e[i.row]!==""&&i.column===e[i.row].length){this.$highlightIndentGuideMarker.dir=1;for(var A=i.row+1;A<e.length;A++){var C=e[A],b=/^\s*/.exec(C)[0].length;if(C!==""&&(this.$highlightIndentGuideMarker.end=A,b<=s))break}}this.$renderHighlightIndentGuide()}}},t.prototype.$clearActiveIndentGuide=function(){for(var e=this.element.querySelectorAll(".ace_indent-guide-active"),i=0;i<e.length;i++)e[i].classList.remove("ace_indent-guide-active")},t.prototype.$setIndentGuideActive=function(e,i){var s=this.session.doc.getLine(e.row);if(s!==""){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 m=p.childNodes;if(m){var _=m[i-1];_&&_.classList&&_.classList.contains("ace_indent-guide")&&_.classList.add("ace_indent-guide-active")}}},t.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var i=this.$highlightIndentGuideMarker.indentLevel;if(i!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var s=0;s<e.length;s++){var p=e[s];if(this.$highlightIndentGuideMarker.end&&p.row>=this.$highlightIndentGuideMarker.start+1){if(p.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(p,i)}}else for(var s=e.length-1;s>=0;s--){var p=e[s];if(this.$highlightIndentGuideMarker.end&&p.row<this.$highlightIndentGuideMarker.start){if(p.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(p,i)}}}},t.prototype.$createLineElement=function(e){var i=this.dom.createElement("div");return i.className="ace_line",i.style.height=this.config.lineHeight+"px",i},t.prototype.$renderWrappedLine=function(e,i,s){var p=0,m=0,_=s[0],A=0,C=this.$createLineElement();e.appendChild(C);for(var b=0;b<i.length;b++){var Me=i[b],Re=Me.value;if(b==0&&this.displayIndentGuides){if(p=Re.length,Re=this.renderIndentGuide(C,Re,_),!Re)continue;p-=Re.length}if(p+Re.length<_)A=this.$renderToken(C,A,Me,Re),p+=Re.length;else{for(;p+Re.length>=_;){A=this.$renderToken(C,A,Me,Re.substring(0,_-p)),Re=Re.substring(_-p),p=_,C=this.$createLineElement(),e.appendChild(C);var q=this.dom.createTextNode(x.stringRepeat(" ",s.indent),this.element);q.charCount=0,C.appendChild(q),m++,A=0,_=s[m]||Number.MAX_VALUE}Re.length!=0&&(p+=Re.length,A=this.$renderToken(C,A,Me,Re))}}s[s.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(C,A,null,"",!0)},t.prototype.$renderSimpleLine=function(e,i){for(var s=0,p=0;p<i.length;p++){var m=i[p],_=m.value;if(!(p==0&&this.displayIndentGuides&&(_=this.renderIndentGuide(e,_),!_))){if(s+_.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,s,m,_);s=this.$renderToken(e,s,m,_)}}},t.prototype.$renderOverflowMessage=function(e,i,s,p,m){s&&this.$renderToken(e,i,s,p.slice(0,this.MAX_LINE_LENGTH-i));var _=this.dom.createElement("span");_.className="ace_inline_button ace_keyword ace_toggle_wrap",_.textContent=m?"<hide>":"<click to see more...>",e.appendChild(_)},t.prototype.$renderLine=function(e,i,s){if(!s&&s!=!1&&(s=this.session.getFoldLine(i)),s)var p=this.$getFoldLineTokens(i,s);else var p=this.session.getTokens(i);var m=e;if(p.length){var _=this.session.getRowSplitData(i);if(_&&_.length){this.$renderWrappedLine(e,p,_);var m=e.lastChild}else{var m=e;this.$useLineGroups()&&(m=this.$createLineElement(),e.appendChild(m)),this.$renderSimpleLine(m,p)}}else this.$useLineGroups()&&(m=this.$createLineElement(),e.appendChild(m));if(this.showEOL&&m){s&&(i=s.end.row);var A=this.dom.createElement("span");A.className="ace_invisible ace_invisible_eol",A.textContent=i==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,m.appendChild(A)}},t.prototype.$getFoldLineTokens=function(e,i){var s=this.session,p=[];function m(A,C,b){for(var Me=0,Re=0;Re+A[Me].value.length<C;)if(Re+=A[Me].value.length,Me++,Me==A.length)return;if(Re!=C){var q=A[Me].value.substring(C-Re);q.length>b-C&&(q=q.substring(0,b-C)),p.push({type:A[Me].type,value:q}),Re=C+q.length,Me+=1}for(;Re<b&&Me<A.length;){var q=A[Me].value;q.length+Re>b?p.push({type:A[Me].type,value:q.substring(0,b-Re)}):p.push(A[Me]),Re+=q.length,Me+=1}}var _=s.getTokens(e);return i.walk(function(A,C,b,Me,Re){A!=null?p.push({type:"fold",value:A}):(Re&&(_=s.getTokens(C)),_.length&&m(_,Me,b))},i.end.row,this.session.getLine(i.end.row).length),p},t.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},t}();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,E.implement(r.prototype,u),g.Text=r}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(f,g,at){var E=f("../lib/dom"),S=function(){function x(a){this.element=E.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),E.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return x.prototype.$updateOpacity=function(a){for(var u=this.cursors,n=u.length;n--;)E.setStyle(u[n].style,"opacity",a?"":"0")},x.prototype.$startCssAnimation=function(){for(var a=this.cursors,u=a.length;u--;)a[u].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&E.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},x.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,E.removeCssClass(this.element,"ace_animate-blinking")},x.prototype.setPadding=function(a){this.$padding=a},x.prototype.setSession=function(a){this.session=a},x.prototype.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},x.prototype.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},x.prototype.setSmoothBlinking=function(a){a!=this.smoothBlinking&&(this.smoothBlinking=a,E.setCssClass(this.element,"ace_smooth-blinking",a),this.$updateCursors(!0),this.restartTimer())},x.prototype.addCursor=function(){var a=E.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},x.prototype.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},x.prototype.hideCursor=function(){this.isVisible=!1,E.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},x.prototype.showCursor=function(){this.isVisible=!0,E.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},x.prototype.restartTimer=function(){var a=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,E.removeCssClass(this.element,"ace_smooth-blinking")),a(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&E.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),E.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var u=(function(){this.timeoutId=setTimeout(function(){a(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){a(!0),u()},this.blinkInterval),u()}},x.prototype.getPixelPosition=function(a,u){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(a),o=this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,a.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),r=(n.row-(u?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:o,top:r}},x.prototype.isCursorInView=function(a,u){return a.top>=0&&a.top<u.maxHeight},x.prototype.update=function(a){this.config=a;var u=this.session.$selectionMarkers,n=0,o=0;(u===void 0||u.length===0)&&(u=[{cursor:null}]);for(var n=0,r=u.length;n<r;n++){var t=this.getPixelPosition(u[n].cursor,!0);if(!((t.top>a.height+a.offset||t.top<0)&&n>1)){var e=this.cursors[o++]||this.addCursor(),i=e.style;this.drawCursor?this.drawCursor(e,t,a,u[n],this.session):this.isCursorInView(t,a)?(E.setStyle(i,"display","block"),E.translate(e,t.left,t.top),E.setStyle(i,"width",Math.round(a.characterWidth)+"px"),E.setStyle(i,"height",a.lineHeight+"px")):E.setStyle(i,"display","none")}}for(;this.cursors.length>o;)this.removeCursor();var s=this.session.getOverwrite();this.$setOverwrite(s),this.$pixelPos=t,this.restartTimer()},x.prototype.$setOverwrite=function(a){a!=this.overwrite&&(this.overwrite=a,a?E.addCssClass(this.element,"ace_overwrite-cursors"):E.removeCssClass(this.element,"ace_overwrite-cursors"))},x.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},x}();S.prototype.$padding=0,S.prototype.drawCursor=null,g.Cursor=S}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(f,g,at){var E=this&&this.__extends||function(){var e=function(i,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,m){p.__proto__=m}||function(p,m){for(var _ in m)Object.prototype.hasOwnProperty.call(m,_)&&(p[_]=m[_])},e(i,s)};return function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");e(i,s);function p(){this.constructor=i}i.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),S=f("./lib/oop"),x=f("./lib/dom"),a=f("./lib/event"),u=f("./lib/event_emitter").EventEmitter,n=32768,o=function(){function e(i,s){this.element=x.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+s,this.inner=x.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),i.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addListener(this.element,"scroll",this.onScroll.bind(this)),a.addListener(this.element,"mousedown",a.preventDefault)}return e.prototype.setVisible=function(i){this.element.style.display=i?"":"none",this.isVisible=i,this.coeff=1},e}();S.implement(o.prototype,u);var r=function(e){E(i,e);function i(s,p){var m=e.call(this,s,"-v")||this;return m.scrollTop=0,m.scrollHeight=0,p.$scrollbarWidth=m.width=x.scrollbarWidth(s.ownerDocument),m.inner.style.width=m.element.style.width=(m.width||15)+5+"px",m.$minWidth=0,m}return i.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var s=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-s)/(this.coeff-s)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},i.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},i.prototype.setHeight=function(s){this.element.style.height=s+"px"},i.prototype.setScrollHeight=function(s){this.scrollHeight=s,s>n?(this.coeff=n/s,s=n):this.coeff!=1&&(this.coeff=1),this.inner.style.height=s+"px"},i.prototype.setScrollTop=function(s){this.scrollTop!=s&&(this.skipEvent=!0,this.scrollTop=s,this.element.scrollTop=s*this.coeff)},i}(o);r.prototype.setInnerHeight=r.prototype.setScrollHeight;var t=function(e){E(i,e);function i(s,p){var m=e.call(this,s,"-h")||this;return m.scrollLeft=0,m.height=p.$scrollbarWidth,m.inner.style.height=m.element.style.height=(m.height||15)+5+"px",m}return i.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},i.prototype.getHeight=function(){return this.isVisible?this.height:0},i.prototype.setWidth=function(s){this.element.style.width=s+"px"},i.prototype.setInnerWidth=function(s){this.inner.style.width=s+"px"},i.prototype.setScrollWidth=function(s){this.inner.style.width=s+"px"},i.prototype.setScrollLeft=function(s){this.scrollLeft!=s&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=s)},i}(o);g.ScrollBar=r,g.ScrollBarV=r,g.ScrollBarH=t,g.VScrollBar=r,g.HScrollBar=t}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(f,g,at){var E=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,p){s.__proto__=p}||function(s,p){for(var m in p)Object.prototype.hasOwnProperty.call(p,m)&&(s[m]=p[m])},t(e,i)};return function(e,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");t(e,i);function s(){this.constructor=e}e.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s)}}(),S=f("./lib/oop"),x=f("./lib/dom"),a=f("./lib/event"),u=f("./lib/event_emitter").EventEmitter;x.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 n=function(){function t(e,i){this.element=x.createElement("div"),this.element.className="ace_sb"+i,this.inner=x.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,a.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return t.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},t}();S.implement(n.prototype,u);var o=function(t){E(e,t);function e(i,s){var p=t.call(this,i,"-v")||this;return p.scrollTop=0,p.scrollHeight=0,p.parent=i,p.width=p.VScrollWidth,p.renderer=s,p.inner.style.width=p.element.style.width=(p.width||15)+"px",p.$minWidth=0,p}return e.prototype.onMouseDown=function(i,s){if(i==="mousedown"&&!(a.getButton(s)!==0||s.detail===2)){if(s.target===this.inner){var p=this,m=s.clientY,_=function(W){m=W.clientY},A=function(){clearInterval(Re)},C=s.clientY,b=this.thumbTop,Me=function(){if(m!==void 0){var W=p.scrollTopFromThumbTop(b+m-C);W!==p.scrollTop&&p._emit("scroll",{data:W})}};a.capture(this.inner,_,A);var Re=setInterval(Me,20);return a.preventDefault(s)}var q=s.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(q)}),a.preventDefault(s)}},e.prototype.getHeight=function(){return this.height},e.prototype.scrollTopFromThumbTop=function(i){var s=i*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return s=s>>0,s<0?s=0:s>this.pageHeight-this.viewHeight&&(s=this.pageHeight-this.viewHeight),s},e.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},e.prototype.setHeight=function(i){this.height=Math.max(0,i),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},e.prototype.setScrollHeight=function(i,s){this.pageHeight===i&&!s||(this.pageHeight=i,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(i){this.scrollTop=i,i<0&&(i=0),this.thumbTop=i*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},e}(n);o.prototype.setInnerHeight=o.prototype.setScrollHeight;var r=function(t){E(e,t);function e(i,s){var p=t.call(this,i,"-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=s,p}return e.prototype.onMouseDown=function(i,s){if(i==="mousedown"&&!(a.getButton(s)!==0||s.detail===2)){if(s.target===this.inner){var p=this,m=s.clientX,_=function(W){m=W.clientX},A=function(){clearInterval(Re)},C=s.clientX,b=this.thumbLeft,Me=function(){if(m!==void 0){var W=p.scrollLeftFromThumbLeft(b+m-C);W!==p.scrollLeft&&p._emit("scroll",{data:W})}};a.capture(this.inner,_,A);var Re=setInterval(Me,20);return a.preventDefault(s)}var q=s.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(q)}),a.preventDefault(s)}},e.prototype.getHeight=function(){return this.isVisible?this.height:0},e.prototype.scrollLeftFromThumbLeft=function(i){var s=i*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return s=s>>0,s<0?s=0:s>this.pageWidth-this.viewWidth&&(s=this.pageWidth-this.viewWidth),s},e.prototype.setWidth=function(i){this.width=Math.max(0,i),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},e.prototype.setScrollWidth=function(i,s){this.pageWidth===i&&!s||(this.pageWidth=i,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(i){this.scrollLeft=i,i<0&&(i=0),this.thumbLeft=i*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},e}(n);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,at){var E=f("./lib/event"),S=function(){function x(a,u){this.onRender=a,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=u||window;var n=this;this._flush=function(o){n.pending=!1;var r=n.changes;if(r&&(E.blockIdle(100),n.changes=0,n.onRender(r)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}}return x.prototype.schedule=function(a){this.changes=this.changes|a,this.changes&&!this.pending&&(E.nextFrame(this._flush),this.pending=!0)},x.prototype.clear=function(a){var u=this.changes;return this.changes=0,u},x}();g.RenderLoop=S}),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,at){var E=f("../lib/oop"),S=f("../lib/dom"),x=f("../lib/lang"),a=f("../lib/event"),u=f("../lib/useragent"),n=f("../lib/event_emitter").EventEmitter,o=512,r=typeof ResizeObserver=="function",t=200,e=function(){function i(s){this.el=S.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=S.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=S.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),s.appendChild(this.el),this.$measureNode.textContent=x.stringRepeat("X",o),this.$characterSize={width:0,height:0},r?this.$addObserver():this.checkForSizeChanges()}return i.prototype.$setMeasureNodeStyles=function(s,p){s.width=s.height="auto",s.left=s.top="0px",s.visibility="hidden",s.position="absolute",s.whiteSpace="pre",u.isIE<8?s["font-family"]="inherit":s.font="inherit",s.overflow=p?"hidden":"visible"},i.prototype.checkForSizeChanges=function(s){if(s===void 0&&(s=this.$measureSizes()),s&&(this.$characterSize.width!==s.width||this.$characterSize.height!==s.height)){this.$measureNode.style.fontWeight="bold";var p=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=s,this.charSizes=Object.create(null),this.allowBoldFonts=p&&p.width===s.width&&p.height===s.height,this._emit("changeCharacterSize",{data:s})}},i.prototype.$addObserver=function(){var s=this;this.$observer=new window.ResizeObserver(function(p){s.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},i.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var s=this;return this.$pollSizeChangesTimer=a.onIdle(function p(){s.checkForSizeChanges(),a.onIdle(p,500)},500)},i.prototype.setPolling=function(s){s?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},i.prototype.$measureSizes=function(s){var p={height:(s||this.$measureNode).clientHeight,width:(s||this.$measureNode).clientWidth/o};return p.width===0||p.height===0?null:p},i.prototype.$measureCharWidth=function(s){this.$main.textContent=x.stringRepeat(s,o);var p=this.$main.getBoundingClientRect();return p.width/o},i.prototype.getCharacterWidth=function(s){var p=this.charSizes[s];return p===void 0&&(p=this.charSizes[s]=this.$measureCharWidth(s)/this.$characterSize.width),p},i.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},i.prototype.$getZoom=function(s){return!s||!s.parentElement?1:(Number(window.getComputedStyle(s).zoom)||1)*this.$getZoom(s.parentElement)},i.prototype.$initTransformMeasureNodes=function(){var s=function(p,m){return["div",{style:"position: absolute;top:"+p+"px;left:"+m+"px;"}]};this.els=S.buildDom([s(0,0),s(t,0),s(0,t),s(t,t)],this.el)},i.prototype.transformCoordinates=function(s,p){if(s){var m=this.$getZoom(this.el);s=b(1/m,s)}function _(Wt,Vt,li){var zt=Wt[1]*Vt[0]-Wt[0]*Vt[1];return[(-Vt[1]*li[0]+Vt[0]*li[1])/zt,(+Wt[1]*li[0]-Wt[0]*li[1])/zt]}function A(Wt,Vt){return[Wt[0]-Vt[0],Wt[1]-Vt[1]]}function C(Wt,Vt){return[Wt[0]+Vt[0],Wt[1]+Vt[1]]}function b(Wt,Vt){return[Wt*Vt[0],Wt*Vt[1]]}this.els||this.$initTransformMeasureNodes();function Me(Wt){var Vt=Wt.getBoundingClientRect();return[Vt.left,Vt.top]}var Re=Me(this.els[0]),q=Me(this.els[1]),W=Me(this.els[2]),ut=Me(this.els[3]),G=_(A(ut,q),A(ut,W),A(C(q,W),C(ut,Re))),D=b(1+G[0],A(q,Re)),w=b(1+G[1],A(W,Re));if(p){var v=p,L=G[0]*v[0]/t+G[1]*v[1]/t+1,lt=C(b(v[0],D),b(v[1],w));return C(b(1/L/t,lt),Re)}var ct=A(s,Re),Dt=_(A(D,b(G[0],ct)),A(w,b(G[1],ct)),ct);return b(t,Dt)},i}();e.prototype.$characterSize={width:0,height:0},E.implement(e.prototype,n),g.FontMetrics=e}),ace.define("ace/css/editor-css",["require","exports","module"],function(f,g,at){at.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: fixed;
|
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,at){var E=f("../lib/dom"),S=f("../lib/oop"),x=f("../lib/event_emitter").EventEmitter,a=function(){function u(n,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(n)}return u.prototype.$createCanvas=function(){this.canvas=E.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},u.prototype.setScrollBarV=function(n){this.$createCanvas(),this.scrollbarV=n,n.element.appendChild(this.canvas),this.setDimensions()},u.prototype.$updateDecorators=function(n){if(typeof this.canvas.getContext!="function")return;var o=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(n);var r=this.canvas.getContext("2d");function t(D,w){return D.priority<w.priority?-1:D.priority>w.priority?1:0}var e=this.renderer.session.$annotations;if(r.clearRect(0,0,this.canvas.width,this.canvas.height),e){var i={info:1,warning:2,error:3};e.forEach(function(D){D.priority=i[D.type]||null}),e=e.sort(t);for(var s=0;s<e.length;s++){var p=e[s].row,m=this.getVerticalOffsetForRow(p),_=m+this.lineHeight,A=Math.round(this.heightRatio*m),C=Math.round(this.heightRatio*_),b=Math.round((A+C)/2),Me=C-b;Me<this.halfMinDecorationHeight&&(Me=this.halfMinDecorationHeight),b-Me<0&&(b=Me),b+Me>this.canvasHeight&&(b=this.canvasHeight-Me);var Re=b-Me,q=b+Me,W=q-Re;r.fillStyle=o[e[s].type]||null,r.fillRect(0,Re,Math.round(this.oneZoneWidth-1),W)}}var ut=this.renderer.session.selection.getCursor();if(ut){var G=Math.round(this.getVerticalOffsetForRow(ut.row)*this.heightRatio);r.fillStyle="rgba(0, 0, 0, 0.5)",r.fillRect(0,G,this.canvasWidth,2)}},u.prototype.getVerticalOffsetForRow=function(n){n=n|0;var o=this.renderer.session.documentToScreenRow(n,0)*this.lineHeight;return o},u.prototype.setDimensions=function(n){n=n||this.renderer.layerConfig,this.maxHeight=n.maxHeight,this.lineHeight=n.lineHeight,this.canvasHeight=n.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},u.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},u.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},u}();S.implement(a.prototype,x),g.Decorator=a}),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,at){var E=f("./lib/oop"),S=f("./lib/dom"),x=f("./lib/lang"),a=f("./config"),u=f("./layer/gutter").Gutter,n=f("./layer/marker").Marker,o=f("./layer/text").Text,r=f("./layer/cursor").Cursor,t=f("./scrollbar").HScrollBar,e=f("./scrollbar").VScrollBar,i=f("./scrollbar_custom").HScrollBar,s=f("./scrollbar_custom").VScrollBar,p=f("./renderloop").RenderLoop,m=f("./layer/font_metrics").FontMetrics,_=f("./lib/event_emitter").EventEmitter,A=f("./css/editor-css"),C=f("./layer/decorators").Decorator,b=f("./lib/useragent"),Me=f("./layer/text_util").isTextToken;S.importCssString(A,"ace_editor.css",!1);var Re=function(){function q(W,ut){var G=this;this.container=W||S.createElement("div"),S.addCssClass(this.container,"ace_editor"),S.HI_DPI&&S.addCssClass(this.container,"ace_hidpi"),this.setTheme(ut),a.get("useStrictCSP")==null&&a.set("useStrictCSP",!1),this.$gutter=S.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=S.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=S.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new u(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new n(this.content);var D=this.$textLayer=new o(this.content);this.canvas=D.element,this.$markerFront=new n(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 t(this.container,this),this.scrollBarV.on("scroll",function(w){G.$scrollAnimation||G.session.setScrollTop(w.data-G.scrollMargin.top)}),this.scrollBarH.on("scroll",function(w){G.$scrollAnimation||G.session.setScrollLeft(w.data-G.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new m(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(w){G.updateCharacterSize(),G.onResize(!0,G.gutterWidth,G.$size.width,G.$size.height),G._signal("changeCharacterSize",w)}),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=!b.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(),a.resetOptions(this),a._signal("renderer",this)}return q.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(),S.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},q.prototype.setSession=function(W){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=W,W&&this.scrollMargin.top&&W.getScrollTop()<=0&&W.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(W),this.$markerBack.setSession(W),this.$markerFront.setSession(W),this.$gutterLayer.setSession(W),this.$textLayer.setSession(W),W&&(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))},q.prototype.updateLines=function(W,ut,G){if(ut===void 0&&(ut=1/0),this.$changedLines?(this.$changedLines.firstRow>W&&(this.$changedLines.firstRow=W),this.$changedLines.lastRow<ut&&(this.$changedLines.lastRow=ut)):this.$changedLines={firstRow:W,lastRow:ut},this.$changedLines.lastRow<this.layerConfig.firstRow)if(G)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},q.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},q.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},q.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},q.prototype.updateFull=function(W){W?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},q.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},q.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},q.prototype.onResize=function(W,ut,G,D){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=W?1:0;var w=this.container;D||(D=w.clientHeight||w.scrollHeight),!D&&this.$maxLines&&this.lineHeight>1&&(!w.style.height||w.style.height=="0px")&&(w.style.height="1px",D=w.clientHeight||w.scrollHeight),G||(G=w.clientWidth||w.scrollWidth);var v=this.$updateCachedSize(W,ut,G,D);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!G&&!D)return this.resizing=0;W&&(this.$gutterLayer.$padding=null),W?this.$renderChanges(v|this.$changes,!0):this.$loop.schedule(v|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},q.prototype.$updateCachedSize=function(W,ut,G,D){D-=this.$extraHeight||0;var w=0,v=this.$size,L={width:v.width,height:v.height,scrollerHeight:v.scrollerHeight,scrollerWidth:v.scrollerWidth};if(D&&(W||v.height!=D)&&(v.height=D,w|=this.CHANGE_SIZE,v.scrollerHeight=v.height,this.$horizScroll&&(v.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(v.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",w=w|this.CHANGE_SCROLL),G&&(W||v.width!=G)){w|=this.CHANGE_SIZE,v.width=G,ut==null&&(ut=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=ut,S.setStyle(this.scrollBarH.element.style,"left",ut+"px"),S.setStyle(this.scroller.style,"left",ut+this.margin.left+"px"),v.scrollerWidth=Math.max(0,G-ut-this.scrollBarV.getWidth()-this.margin.h),S.setStyle(this.$gutter.style,"left",this.margin.left+"px");var lt=this.scrollBarV.getWidth()+"px";S.setStyle(this.scrollBarH.element.style,"right",lt),S.setStyle(this.scroller.style,"right",lt),S.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(v.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||W)&&(w|=this.CHANGE_FULL)}return v.$dirty=!G||!D,w&&this._signal("resize",L),w},q.prototype.onGutterResize=function(W){var ut=this.$showGutter?W:0;ut!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,ut,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()},q.prototype.adjustWrapLimit=function(){var W=this.$size.scrollerWidth-this.$padding*2,ut=Math.floor(W/this.characterWidth);return this.session.adjustWrapLimit(ut,this.$showPrintMargin&&this.$printMarginColumn)},q.prototype.setAnimatedScroll=function(W){this.setOption("animatedScroll",W)},q.prototype.getAnimatedScroll=function(){return this.$animatedScroll},q.prototype.setShowInvisibles=function(W){this.setOption("showInvisibles",W),this.session.$bidiHandler.setShowInvisibles(W)},q.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},q.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},q.prototype.setDisplayIndentGuides=function(W){this.setOption("displayIndentGuides",W)},q.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},q.prototype.setHighlightIndentGuides=function(W){this.setOption("highlightIndentGuides",W)},q.prototype.setShowPrintMargin=function(W){this.setOption("showPrintMargin",W)},q.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},q.prototype.setPrintMarginColumn=function(W){this.setOption("printMarginColumn",W)},q.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},q.prototype.getShowGutter=function(){return this.getOption("showGutter")},q.prototype.setShowGutter=function(W){return this.setOption("showGutter",W)},q.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},q.prototype.setFadeFoldWidgets=function(W){this.setOption("fadeFoldWidgets",W)},q.prototype.setHighlightGutterLine=function(W){this.setOption("highlightGutterLine",W)},q.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},q.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var W=S.createElement("div");W.className="ace_layer ace_print-margin-layer",this.$printMarginEl=S.createElement("div"),this.$printMarginEl.className="ace_print-margin",W.appendChild(this.$printMarginEl),this.content.insertBefore(W,this.content.firstChild)}var ut=this.$printMarginEl.style;ut.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",ut.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},q.prototype.getContainerElement=function(){return this.container},q.prototype.getMouseEventTarget=function(){return this.scroller},q.prototype.getTextAreaContainer=function(){return this.container},q.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var W=this.textarea.style,ut=this.$composition;if(!this.$keepTextAreaAtCursor&&!ut){S.translate(this.textarea,-100,0);return}var G=this.$cursorLayer.$pixelPos;if(G){ut&&ut.markerRange&&(G=this.$cursorLayer.getPixelPosition(ut.markerRange.start,!0));var D=this.layerConfig,w=G.top,v=G.left;w-=D.offset;var L=ut&&ut.useTextareaForIME||b.isMobile?this.lineHeight:1;if(w<0||w>D.height-L){S.translate(this.textarea,0,0);return}var lt=1,ct=this.$size.height-L;if(!ut)w+=this.lineHeight;else if(ut.useTextareaForIME){var Dt=this.textarea.value;lt=this.characterWidth*this.session.$getStringScreenWidth(Dt)[0]}else w+=this.lineHeight+2;v-=this.scrollLeft,v>this.$size.scrollerWidth-lt&&(v=this.$size.scrollerWidth-lt),v+=this.gutterWidth+this.margin.left,S.setStyle(W,"height",L+"px"),S.setStyle(W,"width",lt+"px"),S.translate(this.textarea,Math.min(v,this.$size.scrollerWidth-lt),Math.min(w,ct))}}},q.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},q.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},q.prototype.getLastFullyVisibleRow=function(){var W=this.layerConfig,ut=W.lastRow,G=this.session.documentToScreenRow(ut,0)*W.lineHeight;return G-this.session.getScrollTop()>W.height-W.lineHeight?ut-1:ut},q.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},q.prototype.setPadding=function(W){this.$padding=W,this.$textLayer.setPadding(W),this.$cursorLayer.setPadding(W),this.$markerFront.setPadding(W),this.$markerBack.setPadding(W),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},q.prototype.setScrollMargin=function(W,ut,G,D){var w=this.scrollMargin;w.top=W|0,w.bottom=ut|0,w.right=D|0,w.left=G|0,w.v=w.top+w.bottom,w.h=w.left+w.right,w.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-w.top),this.updateFull()},q.prototype.setMargin=function(W,ut,G,D){var w=this.margin;w.top=W|0,w.bottom=ut|0,w.right=D|0,w.left=G|0,w.v=w.top+w.bottom,w.h=w.left+w.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},q.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},q.prototype.setHScrollBarAlwaysVisible=function(W){this.setOption("hScrollBarAlwaysVisible",W)},q.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},q.prototype.setVScrollBarAlwaysVisible=function(W){this.setOption("vScrollBarAlwaysVisible",W)},q.prototype.$updateScrollBarV=function(){var W=this.layerConfig.maxHeight,ut=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(W-=(ut-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>W-ut&&(W=this.scrollTop+ut,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(W+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},q.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},q.prototype.freeze=function(){this.$frozen=!0},q.prototype.unfreeze=function(){this.$frozen=!1},q.prototype.$renderChanges=function(W,ut){if(this.$changes&&(W|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!W&&!ut){this.$changes|=W;return}if(this.$size.$dirty)return this.$changes|=W,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",W),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var G=this.layerConfig;if(W&this.CHANGE_FULL||W&this.CHANGE_SIZE||W&this.CHANGE_TEXT||W&this.CHANGE_LINES||W&this.CHANGE_SCROLL||W&this.CHANGE_H_SCROLL){if(W|=this.$computeLayerConfig()|this.$loop.clear(),G.firstRow!=this.layerConfig.firstRow&&G.firstRowScreen==this.layerConfig.firstRowScreen){var D=this.scrollTop+(G.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;D>0&&(this.scrollTop=D,W=W|this.CHANGE_SCROLL,W|=this.$computeLayerConfig()|this.$loop.clear())}G=this.layerConfig,this.$updateScrollBarV(),W&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),S.translate(this.content,-this.scrollLeft,-G.offset);var w=G.width+2*this.$padding+"px",v=G.minHeight+"px";S.setStyle(this.content.style,"width",w),S.setStyle(this.content.style,"height",v)}if(W&this.CHANGE_H_SCROLL&&(S.translate(this.content,-this.scrollLeft,-G.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),W&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(G),this.$showGutter&&this.$gutterLayer.update(G),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(G),this.$markerBack.update(G),this.$markerFront.update(G),this.$cursorLayer.update(G),this.$moveTextAreaToCursor(),this._signal("afterRender",W);return}if(W&this.CHANGE_SCROLL){this.$changedLines=null,W&this.CHANGE_TEXT||W&this.CHANGE_LINES?this.$textLayer.update(G):this.$textLayer.scrollLines(G),this.$showGutter&&(W&this.CHANGE_GUTTER||W&this.CHANGE_LINES?this.$gutterLayer.update(G):this.$gutterLayer.scrollLines(G)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(G),this.$markerBack.update(G),this.$markerFront.update(G),this.$cursorLayer.update(G),this.$moveTextAreaToCursor(),this._signal("afterRender",W);return}W&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(G),this.$showGutter&&this.$gutterLayer.update(G),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(G)):W&this.CHANGE_LINES?((this.$updateLines()||W&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(G),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(G)):W&this.CHANGE_TEXT||W&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(G),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(G)):W&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(G),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(G)),W&this.CHANGE_CURSOR&&(this.$cursorLayer.update(G),this.$moveTextAreaToCursor()),W&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(G),W&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(G),this._signal("afterRender",W)},q.prototype.$autosize=function(){var W=this.session.getScreenLength()*this.lineHeight,ut=this.$maxLines*this.lineHeight,G=Math.min(ut,Math.max((this.$minLines||1)*this.lineHeight,W))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(G+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&G>this.$maxPixelHeight&&(G=this.$maxPixelHeight);var D=G<=2*this.lineHeight,w=!D&&W>ut;if(G!=this.desiredHeight||this.$size.height!=this.desiredHeight||w!=this.$vScroll){w!=this.$vScroll&&(this.$vScroll=w,this.scrollBarV.setVisible(w));var v=this.container.clientWidth;this.container.style.height=G+"px",this.$updateCachedSize(!0,this.$gutterWidth,v,G),this.desiredHeight=G,this._signal("autosize")}},q.prototype.$computeLayerConfig=function(){var W=this.session,ut=this.$size,G=ut.height<=2*this.lineHeight,D=this.session.getScreenLength(),w=D*this.lineHeight,v=this.$getLongestLine(),L=!G&&(this.$hScrollBarAlwaysVisible||ut.scrollerWidth-v-2*this.$padding<0),lt=this.$horizScroll!==L;lt&&(this.$horizScroll=L,this.scrollBarH.setVisible(L));var ct=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),G=ut.height<=2*this.lineHeight);var Dt=ut.scrollerHeight+this.lineHeight,Wt=!this.$maxLines&&this.$scrollPastEnd?(ut.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;w+=Wt;var Vt=this.scrollMargin;this.session.setScrollTop(Math.max(-Vt.top,Math.min(this.scrollTop,w-ut.scrollerHeight+Vt.bottom))),this.session.setScrollLeft(Math.max(-Vt.left,Math.min(this.scrollLeft,v+2*this.$padding-ut.scrollerWidth+Vt.right)));var li=!G&&(this.$vScrollBarAlwaysVisible||ut.scrollerHeight-w+Wt<0||this.scrollTop>Vt.top),zt=ct!==li;zt&&(this.$vScroll=li,this.scrollBarV.setVisible(li));var Ht=this.scrollTop%this.lineHeight,Jt=Math.ceil(Dt/this.lineHeight)-1,ai=Math.max(0,Math.round((this.scrollTop-Ht)/this.lineHeight)),hi=ai+Jt,ui,pi,fi=this.lineHeight;ai=W.screenToDocumentRow(ai,0);var gi=W.getFoldLine(ai);gi&&(ai=gi.start.row),ui=W.documentToScreenRow(ai,0),pi=W.getRowLength(ai)*fi,hi=Math.min(W.screenToDocumentRow(hi,0),W.getLength()-1),Dt=ut.scrollerHeight+W.getRowLength(hi)*fi+pi,Ht=this.scrollTop-ui*fi,Ht<0&&ui>0&&(ui=Math.max(0,ui+Math.floor(Ht/fi)),Ht=this.scrollTop-ui*fi);var mi=0;return(this.layerConfig.width!=v||lt)&&(mi=this.CHANGE_H_SCROLL),(lt||zt)&&(mi|=this.$updateCachedSize(!0,this.gutterWidth,ut.width,ut.height),this._signal("scrollbarVisibilityChanged"),zt&&(v=this.$getLongestLine())),this.layerConfig={width:v,padding:this.$padding,firstRow:ai,firstRowScreen:ui,lastRow:hi,lineHeight:fi,characterWidth:this.characterWidth,minHeight:Dt,maxHeight:w,offset:Ht,gutterOffset:fi?Math.max(0,Math.ceil((Ht+ut.height-ut.scrollerHeight)/fi)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(v-this.$padding),mi},q.prototype.$updateLines=function(){if(this.$changedLines){var W=this.$changedLines.firstRow,ut=this.$changedLines.lastRow;this.$changedLines=null;var G=this.layerConfig;if(!(W>G.lastRow+1)&&!(ut<G.firstRow)){if(ut===1/0){this.$showGutter&&this.$gutterLayer.update(G),this.$textLayer.update(G);return}return this.$textLayer.updateLines(G,W,ut),!0}}},q.prototype.$getLongestLine=function(){var W=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(W+=1),this.$textLayer&&W>this.$textLayer.MAX_LINE_LENGTH&&(W=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(W*this.characterWidth))},q.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},q.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},q.prototype.addGutterDecoration=function(W,ut){this.$gutterLayer.addGutterDecoration(W,ut)},q.prototype.removeGutterDecoration=function(W,ut){this.$gutterLayer.removeGutterDecoration(W,ut)},q.prototype.updateBreakpoints=function(W){this._rows=W,this.$loop.schedule(this.CHANGE_GUTTER)},q.prototype.setAnnotations=function(W){this.$gutterLayer.setAnnotations(W),this.$loop.schedule(this.CHANGE_GUTTER)},q.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},q.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},q.prototype.showCursor=function(){this.$cursorLayer.showCursor()},q.prototype.scrollSelectionIntoView=function(W,ut,G){this.scrollCursorIntoView(W,G),this.scrollCursorIntoView(ut,G)},q.prototype.scrollCursorIntoView=function(W,ut,G){if(this.$size.scrollerHeight!==0){var D=this.$cursorLayer.getPixelPosition(W),w=D.left,v=D.top,L=G&&G.top||0,lt=G&&G.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var ct=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;ct+L>v?(ut&&ct+L>v+this.lineHeight&&(v-=ut*this.$size.scrollerHeight),v===0&&(v=-this.scrollMargin.top),this.session.setScrollTop(v)):ct+this.$size.scrollerHeight-lt<v+this.lineHeight&&(ut&&ct+this.$size.scrollerHeight-lt<v-this.lineHeight&&(v+=ut*this.$size.scrollerHeight),this.session.setScrollTop(v+this.lineHeight+lt-this.$size.scrollerHeight));var Dt=this.scrollLeft,Wt=2*this.layerConfig.characterWidth;w-Wt<Dt?(w-=Wt,w<this.$padding+Wt&&(w=-this.scrollMargin.left),this.session.setScrollLeft(w)):(w+=Wt,Dt+this.$size.scrollerWidth<w+this.characterWidth?this.session.setScrollLeft(Math.round(w+this.characterWidth-this.$size.scrollerWidth)):Dt<=this.$padding&&w-Dt<this.characterWidth&&this.session.setScrollLeft(0))}},q.prototype.getScrollTop=function(){return this.session.getScrollTop()},q.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},q.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},q.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},q.prototype.scrollToRow=function(W){this.session.setScrollTop(W*this.lineHeight)},q.prototype.alignCursor=function(W,ut){typeof W=="number"&&(W={row:W,column:0});var G=this.$cursorLayer.getPixelPosition(W),D=this.$size.scrollerHeight-this.lineHeight,w=G.top-D*(ut||0);return this.session.setScrollTop(w),w},q.prototype.$calcSteps=function(W,ut){var G=0,D=this.STEPS,w=[],v=function(L,lt,ct){return ct*(Math.pow(L-1,3)+1)+lt};for(G=0;G<D;++G)w.push(v(G/this.STEPS,W,ut-W));return w},q.prototype.scrollToLine=function(W,ut,G,D){var w=this.$cursorLayer.getPixelPosition({row:W,column:0}),v=w.top;ut&&(v-=this.$size.scrollerHeight/2);var L=this.scrollTop;this.session.setScrollTop(v),G!==!1&&this.animateScrolling(L,D)},q.prototype.animateScrolling=function(W,ut){var G=this.scrollTop;if(!this.$animatedScroll)return;var D=this;if(W==G)return;if(this.$scrollAnimation){var w=this.$scrollAnimation.steps;if(w.length&&(W=w[0],W==G))return}var v=D.$calcSteps(W,G);this.$scrollAnimation={from:W,to:G,steps:v},clearInterval(this.$timer),D.session.setScrollTop(v.shift()),D.session.$scrollTop=G;function L(){D.$timer=clearInterval(D.$timer),D.$scrollAnimation=null,D.$stopAnimation=!1,ut&&ut()}this.$timer=setInterval(function(){if(D.$stopAnimation){L();return}if(!D.session)return clearInterval(D.$timer);v.length?(D.session.setScrollTop(v.shift()),D.session.$scrollTop=G):G!=null?(D.session.$scrollTop=-1,D.session.setScrollTop(G),G=null):L()},10)},q.prototype.scrollToY=function(W){this.scrollTop!==W&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=W)},q.prototype.scrollToX=function(W){this.scrollLeft!==W&&(this.scrollLeft=W),this.$loop.schedule(this.CHANGE_H_SCROLL)},q.prototype.scrollTo=function(W,ut){this.session.setScrollTop(ut),this.session.setScrollLeft(W)},q.prototype.scrollBy=function(W,ut){ut&&this.session.setScrollTop(this.session.getScrollTop()+ut),W&&this.session.setScrollLeft(this.session.getScrollLeft()+W)},q.prototype.isScrollableBy=function(W,ut){if(ut<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||ut>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||W<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||W>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},q.prototype.pixelToScreenCoordinates=function(W,ut){var G;if(this.$hasCssTransforms){G={top:0,left:0};var D=this.$fontMetrics.transformCoordinates([W,ut]);W=D[1]-this.gutterWidth-this.margin.left,ut=D[0]}else G=this.scroller.getBoundingClientRect();var w=W+this.scrollLeft-G.left-this.$padding,v=w/this.characterWidth,L=Math.floor((ut+this.scrollTop-G.top)/this.lineHeight),lt=this.$blockCursor?Math.floor(v):Math.round(v);return{row:L,column:lt,side:v-lt>0?1:-1,offsetX:w}},q.prototype.screenToTextCoordinates=function(W,ut){var G;if(this.$hasCssTransforms){G={top:0,left:0};var D=this.$fontMetrics.transformCoordinates([W,ut]);W=D[1]-this.gutterWidth-this.margin.left,ut=D[0]}else G=this.scroller.getBoundingClientRect();var w=W+this.scrollLeft-G.left-this.$padding,v=w/this.characterWidth,L=this.$blockCursor?Math.floor(v):Math.round(v),lt=Math.floor((ut+this.scrollTop-G.top)/this.lineHeight);return this.session.screenToDocumentPosition(lt,Math.max(L,0),w)},q.prototype.textToScreenCoordinates=function(W,ut){var G=this.scroller.getBoundingClientRect(),D=this.session.documentToScreenPosition(W,ut),w=this.$padding+(this.session.$bidiHandler.isBidiRow(D.row,W)?this.session.$bidiHandler.getPosLeft(D.column):Math.round(D.column*this.characterWidth)),v=D.row*this.lineHeight;return{pageX:G.left+w-this.scrollLeft,pageY:G.top+v-this.scrollTop}},q.prototype.visualizeFocus=function(){S.addCssClass(this.container,"ace_focus")},q.prototype.visualizeBlur=function(){S.removeCssClass(this.container,"ace_focus")},q.prototype.showComposition=function(W){this.$composition=W,W.cssText||(W.cssText=this.textarea.style.cssText),W.useTextareaForIME==null&&(W.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(S.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):W.markerId=this.session.addMarker(W.markerRange,"ace_composition_marker","text")},q.prototype.setCompositionText=function(W){var ut=this.session.selection.cursor;this.addToken(W,"composition_placeholder",ut.row,ut.column),this.$moveTextAreaToCursor()},q.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),S.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var W=this.session.selection.cursor;this.removeExtraToken(W.row,W.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},q.prototype.setGhostText=function(W,ut){var G=this.session.selection.cursor,D=ut||{row:G.row,column:G.column};this.removeGhostText();var w=this.$calculateWrappedTextChunks(W,D);this.addToken(w[0].text,"ghost_text",D.row,D.column),this.$ghostText={text:W,position:{row:D.row,column:D.column}};var v=S.createElement("div");if(w.length>1){var L=this.hideTokensAfterPosition(D.row,D.column),lt;w.slice(1).forEach(function(zt){var Ht=S.createElement("div"),Jt=S.createElement("span");Jt.className="ace_ghost_text",zt.wrapped&&(Ht.className="ghost_text_line_wrapped"),zt.text.length===0&&(zt.text=" "),Jt.appendChild(S.createTextNode(zt.text)),Ht.appendChild(Jt),v.appendChild(Ht),lt=Ht}),L.forEach(function(zt){var Ht=S.createElement("span");Me(zt.type)||(Ht.className="ace_"+zt.type.replace(/\./g," ace_")),Ht.appendChild(S.createTextNode(zt.value)),lt.appendChild(Ht)}),this.$ghostTextWidget={el:v,row:D.row,column:D.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var ct=this.$cursorLayer.getPixelPosition(D,!0),Dt=this.container,Wt=Dt.getBoundingClientRect().height,Vt=w.length*this.lineHeight,li=Vt<Wt-ct.top;if(li)return;Vt<Wt?this.scrollBy(0,(w.length-1)*this.lineHeight):this.scrollToRow(D.row)}},q.prototype.$calculateWrappedTextChunks=function(W,ut){var G=this.$size.scrollerWidth-this.$padding*2,D=Math.floor(G/this.characterWidth)-2;D=D<=0?60:D;for(var w=W.split(/\r?\n/),v=[],L=0;L<w.length;L++){var lt=this.session.$getDisplayTokens(w[L],ut.column),ct=this.session.$computeWrapSplits(lt,D,this.session.$tabSize);if(ct.length>0){var Dt=0;ct.push(w[L].length);for(var Wt=0;Wt<ct.length;Wt++){var Vt=w[L].slice(Dt,ct[Wt]);v.push({text:Vt,wrapped:!0}),Dt=ct[Wt]}}else v.push({text:w[L],wrapped:!1})}return v},q.prototype.removeGhostText=function(){if(this.$ghostText){var W=this.$ghostText.position;this.removeExtraToken(W.row,W.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},q.prototype.addToken=function(W,ut,G,D){var w=this.session;w.bgTokenizer.lines[G]=null;var v={type:ut,value:W},L=w.getTokens(G);if(D==null||!L.length)L.push(v);else for(var lt=0,ct=0;ct<L.length;ct++){var Dt=L[ct];if(lt+=Dt.value.length,D<=lt){var Wt=Dt.value.length-(lt-D),Vt=Dt.value.slice(0,Wt),li=Dt.value.slice(Wt);L.splice(ct,1,{type:Dt.type,value:Vt},v,{type:Dt.type,value:li});break}}this.updateLines(G,G)},q.prototype.hideTokensAfterPosition=function(W,ut){for(var G=this.session.getTokens(W),D=0,w=!1,v=[],L=0;L<G.length;L++){var lt=G[L];if(D+=lt.value.length,lt.type!=="ghost_text"){if(w){v.push({type:lt.type,value:lt.value}),lt.type="hidden_token";continue}D===ut&&(w=!0)}}return this.updateLines(W,W),v},q.prototype.removeExtraToken=function(W,ut){this.session.bgTokenizer.lines[W]=null,this.updateLines(W,W)},q.prototype.setTheme=function(W,ut){var G=this;if(this.$themeId=W,G._dispatchEvent("themeChange",{theme:W}),!W||typeof W=="string"){var D=W||this.$options.theme.initialValue;a.loadModule(["theme",D],w)}else w(W);function w(v){if(G.$themeId!=W)return ut&&ut();if(!v||!v.cssClass)throw new Error("couldn't load module "+W+" or it didn't call define");v.$id&&(G.$themeId=v.$id),S.importCssString(v.cssText,v.cssClass,G.container),G.theme&&S.removeCssClass(G.container,G.theme.cssClass);var L="padding"in v?v.padding:"padding"in(G.theme||{})?4:G.$padding;G.$padding&&L!=G.$padding&&G.setPadding(L),G.$theme=v.cssClass,G.theme=v,S.addCssClass(G.container,v.cssClass),S.setCssClass(G.container,"ace_dark",v.isDark),G.$size&&(G.$size.width=0,G.$updateSizeAsync()),G._dispatchEvent("themeLoaded",{theme:v}),ut&&ut(),b.isSafari&&G.scroller&&(G.scroller.style.background="red",G.scroller.style.background="")}},q.prototype.getTheme=function(){return this.$themeId},q.prototype.setStyle=function(W,ut){S.setCssClass(this.container,W,ut!==!1)},q.prototype.unsetStyle=function(W){S.removeCssClass(this.container,W)},q.prototype.setCursorStyle=function(W){S.setStyle(this.scroller.style,"cursor",W)},q.prototype.setMouseCursor=function(W){S.setStyle(this.scroller.style,"cursor",W)},q.prototype.attachToShadowRoot=function(){S.importCssString(A,"ace_editor.css",this.container)},q.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},q.prototype.$updateCustomScrollbar=function(W){var ut=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),W===!0?(this.scrollBarV=new s(this.container,this),this.scrollBarH=new i(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(G){ut.$scrollAnimation||ut.session.setScrollTop(G.data-ut.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(G){ut.$scrollAnimation||ut.session.setScrollLeft(G.data-ut.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new C(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new e(this.container,this),this.scrollBarH=new t(this.container,this),this.scrollBarV.addEventListener("scroll",function(G){ut.$scrollAnimation||ut.session.setScrollTop(G.data-ut.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(G){ut.$scrollAnimation||ut.session.setScrollLeft(G.data-ut.scrollMargin.left)}))},q.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var W=this;this.$resizeTimer=x.delayedCall(function(){W.destroyed||W.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(ut){var G=ut[0].contentRect.width,D=ut[0].contentRect.height;Math.abs(W.$size.width-G)>1||Math.abs(W.$size.height-D)>1?W.$resizeTimer.delay():W.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},q}();Re.prototype.CHANGE_CURSOR=1,Re.prototype.CHANGE_MARKER=2,Re.prototype.CHANGE_GUTTER=4,Re.prototype.CHANGE_SCROLL=8,Re.prototype.CHANGE_LINES=16,Re.prototype.CHANGE_TEXT=32,Re.prototype.CHANGE_SIZE=64,Re.prototype.CHANGE_MARKER_BACK=128,Re.prototype.CHANGE_MARKER_FRONT=256,Re.prototype.CHANGE_FULL=512,Re.prototype.CHANGE_H_SCROLL=1024,Re.prototype.$changes=0,Re.prototype.$padding=null,Re.prototype.$frozen=!1,Re.prototype.STEPS=8,E.implement(Re.prototype,_),a.defineOptions(Re.prototype,"renderer",{useResizeObserver:{set:function(q){!q&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):q&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(q){this.$textLayer.setShowInvisibles(q)&&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(q){typeof q=="number"&&(this.$printMarginColumn=q),this.$showPrintMargin=!!q,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(q){this.$gutter.style.display=q?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(q){this.$gutterLayer.$useSvgGutterIcons=q},initialValue:!1},showFoldedAnnotations:{set:function(q){this.$gutterLayer.$showFoldedAnnotations=q},initialValue:!1},fadeFoldWidgets:{set:function(q){S.setCssClass(this.$gutter,"ace_fade-fold-widgets",q)},initialValue:!1},showFoldWidgets:{set:function(q){this.$gutterLayer.setShowFoldWidgets(q),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(q){this.$textLayer.setDisplayIndentGuides(q)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(q){this.$textLayer.setHighlightIndentGuides(q)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(q){this.$gutterLayer.setHighlightGutterLine(q),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(q){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(q){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(q){typeof q=="number"&&(q=q+"px"),this.container.style.fontSize=q,this.updateFontSize()},initialValue:12},fontFamily:{set:function(q){this.container.style.fontFamily=q,this.updateFontSize()}},maxLines:{set:function(q){this.updateFull()}},minLines:{set:function(q){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(q){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(q){q=+q||0,this.$scrollPastEnd!=q&&(this.$scrollPastEnd=q,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(q){this.$gutterLayer.$fixedWidth=!!q,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(q){this.$updateCustomScrollbar(q)},initialValue:!1},theme:{set:function(q){this.setTheme(q)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!b.isMobile&&!b.isIE}}),g.VirtualRenderer=Re}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(f,g,at){var E=f("../lib/oop"),S=f("../lib/net"),x=f("../lib/event_emitter").EventEmitter,a=f("../config");function u(t){var e="importScripts('"+S.qualifyURL(t)+"');";try{return new Blob([e],{type:"application/javascript"})}catch{var i=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,s=new i;return s.append(e),s.getBlob("application/javascript")}}function n(t){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var e=u(t),i=window.URL||window.webkitURL,s=i.createObjectURL(e);return new Worker(s)}return new Worker(t)}var o=function(t){t.postMessage||(t=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=t,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(){E.implement(this,x),this.$createWorkerFromOldConfig=function(t,e,i,s,p){if(f.nameToUrl&&!f.toUrl&&(f.toUrl=f.nameToUrl),a.get("packaged")||!f.toUrl)s=s||a.moduleUrl(e,"worker");else{var m=this.$normalizePath;s=s||m(f.toUrl("ace/worker/worker.js",null,"_"));var _={};t.forEach(function(A){_[A]=m(f.toUrl(A,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=n(s),p&&this.send("importScripts",p),this.$worker.postMessage({init:!0,tlns:_,module:e,classname:i}),this.$worker},this.onMessage=function(t){var e=t.data;switch(e.type){case"event":this._signal(e.name,{data:e.data});break;case"call":var i=this.callbacks[e.id];i&&(i(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(t){window.console&&console.error&&console.error(t)},this.$normalizePath=function(t){return S.qualifyURL(t)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(t){t.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(t,e){this.$worker.postMessage({command:t,args:e})},this.call=function(t,e,i){if(i){var s=this.callbackId++;this.callbacks[s]=i,e.push(s)}this.send(t,e)},this.emit=function(t,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:t,data:{data:e.data}})}catch(i){console.error(i.stack)}},this.attachToDocument=function(t){this.$doc&&this.terminate(),this.$doc=t,this.call("setValue",[t.getValue()]),t.on("change",this.changeListener,!0)},this.changeListener=function(t){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),t.action=="insert"?this.deltaQueue.push(t.start,t.lines):this.deltaQueue.push(t.start,t.end)},this.$sendDeltaQueue=function(){var t=this.deltaQueue;t&&(this.deltaQueue=null,t.length>50&&t.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:t}))}}).call(o.prototype);var r=function(t,e,i){var s=null,p=!1,m=Object.create(x),_=[],A=new o({messageBuffer:_,terminate:function(){},postMessage:function(b){_.push(b),s&&(p?setTimeout(C):C())}});A.setEmitSync=function(b){p=b};var C=function(){var b=_.shift();b.command?s[b.command].apply(s,b.args):b.event&&m._signal(b.event,b.data)};return m.postMessage=function(b){A.onMessage({data:b})},m.callback=function(b,Me){this.postMessage({type:"call",id:Me,data:b})},m.emit=function(b,Me){this.postMessage({type:"event",name:b,data:Me})},a.loadModule(["worker",e],function(b){for(s=new b[i](m);_.length;)C()}),A};g.UIWorkerClient=r,g.WorkerClient=o,g.createWorker=n}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(f,g,at){var E=f("./range").Range,S=f("./lib/event_emitter").EventEmitter,x=f("./lib/oop"),a=function(){function u(n,o,r,t,e,i){var s=this;this.length=o,this.session=n,this.doc=n.getDocument(),this.mainClass=e,this.othersClass=i,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=t,this.$onCursorChange=function(){setTimeout(function(){s.onCursorChange()})},this.$pos=r;var p=n.getUndoManager().$undoStack||n.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=p.length,this.setup(),n.selection.on("changeCursor",this.$onCursorChange)}return u.prototype.setup=function(){var n=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 t=this.pos;t.$insertRight=!0,t.detach(),t.markerId=r.addMarker(new E(t.row,t.column,t.row,t.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(e){var i=o.createAnchor(e.row,e.column);i.$insertRight=!0,i.detach(),n.others.push(i)}),r.setUndoSelect(!1)},u.prototype.showOtherMarkers=function(){if(!this.othersActive){var n=this.session,o=this;this.othersActive=!0,this.others.forEach(function(r){r.markerId=n.addMarker(new E(r.row,r.column,r.row,r.column+o.length),o.othersClass,null,!1)})}},u.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var n=0;n<this.others.length;n++)this.session.removeMarker(this.others[n].markerId)}},u.prototype.onUpdate=function(n){if(this.$updating)return this.updateAnchors(n);var o=n;if(o.start.row===o.end.row&&o.start.row===this.pos.row){this.$updating=!0;var r=n.action==="insert"?o.end.column-o.start.column:o.start.column-o.end.column,t=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(n),t&&(this.length+=r),t&&!this.session.$fromUndo){if(n.action==="insert")for(var i=this.others.length-1;i>=0;i--){var s=this.others[i],p={row:s.row,column:s.column+e};this.doc.insertMergedLines(p,n.lines)}else if(n.action==="remove")for(var i=this.others.length-1;i>=0;i--){var s=this.others[i],p={row:s.row,column:s.column+e};this.doc.remove(new E(p.row,p.column,p.row,p.column-r))}}this.$updating=!1,this.updateMarkers()}},u.prototype.updateAnchors=function(n){this.pos.onChange(n);for(var o=this.others.length;o--;)this.others[o].onChange(n);this.updateMarkers()},u.prototype.updateMarkers=function(){if(!this.$updating){var n=this,o=this.session,r=function(e,i){o.removeMarker(e.markerId),e.markerId=o.addMarker(new E(e.row,e.column,e.row,e.column+n.length),i,null,!1)};r(this.pos,this.mainClass);for(var t=this.others.length;t--;)r(this.others[t],this.othersClass)}},u.prototype.onCursorChange=function(n){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",n)):(this.hideOtherMarkers(),this._emit("cursorLeave",n))}},u.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},u.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var n=this.session.getUndoManager(),o=(n.$undoStack||n.$undostack).length-this.$undoStackDepth,r=0;r<o;r++)n.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},u}();x.implement(a.prototype,S),g.PlaceHolder=a}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(f,g,at){var E=f("../lib/event"),S=f("../lib/useragent");function x(u,n){return u.row==n.row&&u.column==n.column}function a(u){var n=u.domEvent,o=n.altKey,r=n.shiftKey,t=n.ctrlKey,e=u.getAccelKey(),i=u.getButton();if(t&&S.isMac&&(i=n.button),u.editor.inMultiSelectMode&&i==2){u.editor.textInput.onContextMenu(u.domEvent);return}if(!t&&!o&&!e){i===0&&u.editor.inMultiSelectMode&&u.editor.exitMultiSelectMode();return}if(i===0){var s=u.editor,p=s.selection,m=s.inMultiSelectMode,_=u.getDocumentPosition(),A=p.getCursor(),C=u.inSelection()||p.isEmpty()&&x(_,A),b=u.x,Me=u.y,Re=function(Vt){b=Vt.clientX,Me=Vt.clientY},q=s.session,W=s.renderer.pixelToScreenCoordinates(b,Me),ut=W,G;if(s.$mouseHandler.$enableJumpToDef)t&&o||e&&o?G=r?"block":"add":o&&s.$blockSelectEnabled&&(G="block");else if(e&&!o){if(G="add",!m&&r)return}else o&&s.$blockSelectEnabled&&(G="block");if(G&&S.isMac&&n.ctrlKey&&s.$mouseHandler.cancelContextMenu(),G=="add"){if(!m&&C)return;if(!m){var D=p.toOrientedRange();s.addSelectionMarker(D)}var w=p.rangeList.rangeAtPoint(_);s.inVirtualSelectionMode=!0,r&&(w=null,D=p.ranges[0]||D,s.removeSelectionMarker(D)),s.once("mouseup",function(){var Vt=p.toOrientedRange();w&&Vt.isEmpty()&&x(w.cursor,Vt.cursor)?p.substractPoint(Vt.cursor):(r?p.substractPoint(D.cursor):D&&(s.removeSelectionMarker(D),p.addRange(D)),p.addRange(Vt)),s.inVirtualSelectionMode=!1})}else if(G=="block"){u.stop(),s.inVirtualSelectionMode=!0;var v,L=[],lt=function(){var Vt=s.renderer.pixelToScreenCoordinates(b,Me),li=q.screenToDocumentPosition(Vt.row,Vt.column,Vt.offsetX);x(ut,Vt)&&x(li,p.lead)||(ut=Vt,s.selection.moveToPosition(li),s.renderer.scrollCursorIntoView(),s.removeSelectionMarkers(L),L=p.rectangularRangeBlock(ut,W),s.$mouseHandler.$clickSelection&&L.length==1&&L[0].isEmpty()&&(L[0]=s.$mouseHandler.$clickSelection.clone()),L.forEach(s.addSelectionMarker,s),s.updateSelectionMarkers())};m&&!e?p.toSingleRange():!m&&e&&(v=p.toOrientedRange(),s.addSelectionMarker(v)),r?W=q.documentToScreenPosition(p.lead):p.moveToPosition(_),ut={row:-1,column:-1};var ct=function(Vt){lt(),clearInterval(Wt),s.removeSelectionMarkers(L),L.length||(L=[p.toOrientedRange()]),v&&(s.removeSelectionMarker(v),p.toSingleRange(v));for(var li=0;li<L.length;li++)p.addRange(L[li]);s.inVirtualSelectionMode=!1,s.$mouseHandler.$clickSelection=null},Dt=lt;E.capture(s.container,Re,ct);var Wt=setInterval(function(){Dt()},20);return u.preventDefault()}}}g.onMouseDown=a}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(f,g,at){g.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(S){S.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(S){S.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(S){S.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(S){S.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(S){S.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(S){S.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(S){S.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(S){S.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(S){S.multiSelect.rangeCount>1?S.multiSelect.joinSelections():S.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(S){S.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(S){S.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(S){S.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(S){S.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(S){return S&&S.inMultiSelectMode}}];var E=f("../keyboard/hash_handler").HashHandler;g.keyboardHandler=new E(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,at){var E=f("./range_list").RangeList,S=f("./range").Range,x=f("./selection").Selection,a=f("./mouse/multi_select_handler").onMouseDown,u=f("./lib/event"),n=f("./lib/lang"),o=f("./commands/multi_select_commands");g.commands=o.defaultCommands.concat(o.multiSelectCommands);var r=f("./search").Search,t=new r;function e(A,C,b){return t.$options.wrap=!0,t.$options.needle=C,t.$options.backwards=b==-1,t.find(A)}var i=f("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(i.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(A,C){if(A){if(!this.inMultiSelectMode&&this.rangeCount===0){var b=this.toOrientedRange();if(this.rangeList.add(b),this.rangeList.add(A),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),C||this.fromOrientedRange(A);this.rangeList.removeAll(),this.rangeList.add(b),this.$onAddRange(b)}A.cursor||(A.cursor=A.end);var Me=this.rangeList.add(A);return this.$onAddRange(A),Me.length&&this.$onRemoveRange(Me),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),C||this.fromOrientedRange(A)}},this.toSingleRange=function(A){A=A||this.ranges[0];var C=this.rangeList.removeAll();C.length&&this.$onRemoveRange(C),A&&this.fromOrientedRange(A)},this.substractPoint=function(A){var C=this.rangeList.substractPoint(A);if(C)return this.$onRemoveRange(C),C[0]},this.mergeOverlappingRanges=function(){var A=this.rangeList.merge();A.length&&this.$onRemoveRange(A)},this.$onAddRange=function(A){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(A),this._signal("addRange",{range:A})},this.$onRemoveRange=function(A){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var C=this.rangeList.ranges.pop();A.push(C),this.rangeCount=0}for(var b=A.length;b--;){var Me=this.ranges.indexOf(A[b]);this.ranges.splice(Me,1)}this._signal("removeRange",{ranges:A}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),C=C||this.ranges[0],C&&!C.isEqual(this.getRange())&&this.fromOrientedRange(C)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new E,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var A=this.ranges.length?this.ranges:[this.getRange()],C=[],b=0;b<A.length;b++){var Me=A[b],Re=Me.start.row,q=Me.end.row;if(Re===q)C.push(Me.clone());else{for(C.push(new S(Re,Me.start.column,Re,this.session.getLine(Re).length));++Re<q;)C.push(this.getLineRange(Re,!0));C.push(new S(q,0,q,Me.end.column))}b==0&&!this.isBackwards()&&(C=C.reverse())}this.toSingleRange();for(var b=C.length;b--;)this.addRange(C[b])},this.joinSelections=function(){var A=this.rangeList.ranges,C=A[A.length-1],b=S.fromPoints(A[0].start,C.end);this.toSingleRange(),this.setSelectionRange(b,C.cursor==C.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var A=this.rangeList.ranges,C=A[A.length-1],b=S.fromPoints(A[0].start,C.end);this.toSingleRange(),this.setSelectionRange(b,C.cursor==C.start)}else{var Me=this.session.documentToScreenPosition(this.cursor),Re=this.session.documentToScreenPosition(this.anchor),q=this.rectangularRangeBlock(Me,Re);q.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(A,C,b){var Me=[],Re=A.column<C.column;if(Re)var q=A.column,W=C.column,ut=A.offsetX,G=C.offsetX;else var q=C.column,W=A.column,ut=C.offsetX,G=A.offsetX;var D=A.row<C.row;if(D)var w=A.row,v=C.row;else var w=C.row,v=A.row;q<0&&(q=0),w<0&&(w=0),w==v&&(b=!0);for(var L,lt=w;lt<=v;lt++){var ct=S.fromPoints(this.session.screenToDocumentPosition(lt,q,ut),this.session.screenToDocumentPosition(lt,W,G));if(ct.isEmpty()){if(L&&p(ct.end,L))break;L=ct.end}ct.cursor=Re?ct.start:ct.end,Me.push(ct)}if(D&&Me.reverse(),!b){for(var Dt=Me.length-1;Me[Dt].isEmpty()&&Dt>0;)Dt--;if(Dt>0)for(var Wt=0;Me[Wt].isEmpty();)Wt++;for(var Vt=Dt;Vt>=Wt;Vt--)Me[Vt].isEmpty()&&Me.splice(Vt,1)}return Me}}).call(x.prototype);var s=f("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(A){A.cursor||(A.cursor=A.end);var C=this.getSelectionStyle();return A.marker=this.session.addMarker(A,"ace_selection",C),this.session.$selectionMarkers.push(A),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,A},this.removeSelectionMarker=function(A){if(A.marker){this.session.removeMarker(A.marker);var C=this.session.$selectionMarkers.indexOf(A);C!=-1&&this.session.$selectionMarkers.splice(C,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(A){for(var C=this.session.$selectionMarkers,b=A.length;b--;){var Me=A[b];if(Me.marker){this.session.removeMarker(Me.marker);var Re=C.indexOf(Me);Re!=-1&&C.splice(Re,1)}}this.session.selectionMarkerCount=C.length},this.$onAddRange=function(A){this.addSelectionMarker(A.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(A){this.removeSelectionMarkers(A.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(A){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(A){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(A){var C=A.command,b=A.editor;if(b.multiSelect){if(C.multiSelectAction)C.multiSelectAction=="forEach"?Me=b.forEachSelection(C,A.args):C.multiSelectAction=="forEachLine"?Me=b.forEachSelection(C,A.args,!0):C.multiSelectAction=="single"?(b.exitMultiSelectMode(),Me=C.exec(b,A.args||{})):Me=C.multiSelectAction(b,A.args||{});else{var Me=C.exec(b,A.args||{});b.multiSelect.addRange(b.multiSelect.toOrientedRange()),b.multiSelect.mergeOverlappingRanges()}return Me}},this.forEachSelection=function(A,C,b){if(!this.inVirtualSelectionMode){var Me=b&&b.keepOrder,Re=b==!0||b&&b.$byLines,q=this.session,W=this.selection,ut=W.rangeList,G=(Me?W:ut).ranges,D;if(!G.length)return A.exec?A.exec(this,C||{}):A(this,C||{});var w=W._eventRegistry;W._eventRegistry={};var v=new x(q);this.inVirtualSelectionMode=!0;for(var L=G.length;L--;){if(Re)for(;L>0&&G[L].start.row==G[L-1].end.row;)L--;v.fromOrientedRange(G[L]),v.index=L,this.selection=q.selection=v;var lt=A.exec?A.exec(this,C||{}):A(this,C||{});!D&<!==void 0&&(D=lt),v.toOrientedRange(G[L])}v.detach(),this.selection=q.selection=W,this.inVirtualSelectionMode=!1,W._eventRegistry=w,W.mergeOverlappingRanges(),W.ranges[0]&&W.fromOrientedRange(W.ranges[0]);var ct=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),ct&&ct.from==ct.to&&this.renderer.animateScrolling(ct.from),D}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var A="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var C=this.multiSelect.rangeList.ranges,b=[],Me=0;Me<C.length;Me++)b.push(this.session.getTextRange(C[Me]));var Re=this.session.getDocument().getNewLineCharacter();A=b.join(Re),A.length==(b.length-1)*Re.length&&(A="")}else this.selection.isEmpty()||(A=this.session.getTextRange(this.getSelectionRange()));return A},this.$checkMultiselectChange=function(A,C){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var b=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&C==this.multiSelect.anchor)return;var Me=C==this.multiSelect.anchor?b.cursor==b.start?b.end:b.start:b.cursor;Me.row!=C.row||this.session.$clipPositionToDocument(Me.row,Me.column).column!=C.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(A,C,b){if(C=C||{},C.needle=A||C.needle,C.needle==null){var Me=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();C.needle=this.session.getTextRange(Me)}this.$search.set(C);var Re=this.$search.findAll(this.session);if(!Re.length)return 0;var q=this.multiSelect;b||q.toSingleRange(Re[0]);for(var W=Re.length;W--;)q.addRange(Re[W],!0);return Me&&q.rangeList.rangeAtPoint(Me.start)&&q.addRange(Me,!0),Re.length},this.selectMoreLines=function(A,C){var b=this.selection.toOrientedRange(),Me=b.cursor==b.end,Re=this.session.documentToScreenPosition(b.cursor);this.selection.$desiredColumn&&(Re.column=this.selection.$desiredColumn);var q=this.session.screenToDocumentPosition(Re.row+A,Re.column);if(b.isEmpty())var ut=q;else var W=this.session.documentToScreenPosition(Me?b.end:b.start),ut=this.session.screenToDocumentPosition(W.row+A,W.column);if(Me){var G=S.fromPoints(q,ut);G.cursor=G.start}else{var G=S.fromPoints(ut,q);G.cursor=G.end}if(G.desiredColumn=Re.column,!this.selection.inMultiSelectMode)this.selection.addRange(b);else if(C)var D=b.cursor;this.selection.addRange(G),D&&this.selection.substractPoint(D)},this.transposeSelections=function(A){for(var C=this.session,b=C.multiSelect,Me=b.ranges,Re=Me.length;Re--;){var q=Me[Re];if(q.isEmpty()){var W=C.getWordRange(q.start.row,q.start.column);q.start.row=W.start.row,q.start.column=W.start.column,q.end.row=W.end.row,q.end.column=W.end.column}}b.mergeOverlappingRanges();for(var ut=[],Re=Me.length;Re--;){var q=Me[Re];ut.unshift(C.getTextRange(q))}A<0?ut.unshift(ut.pop()):ut.push(ut.shift());for(var Re=Me.length;Re--;){var q=Me[Re],G=q.clone();C.replace(q,ut[Re]),q.start.row=G.start.row,q.start.column=G.start.column}b.fromOrientedRange(b.ranges[0])},this.selectMore=function(A,C,b){var Me=this.session,Re=Me.multiSelect,q=Re.toOrientedRange();if(!(q.isEmpty()&&(q=Me.getWordRange(q.start.row,q.start.column),q.cursor=A==-1?q.start:q.end,this.multiSelect.addRange(q),b))){var W=Me.getTextRange(q),ut=e(Me,W,A);ut&&(ut.cursor=A==-1?ut.start:ut.end,this.session.unfold(ut),this.multiSelect.addRange(ut),this.renderer.scrollCursorIntoView(null,.5)),C&&this.multiSelect.substractPoint(q.cursor)}},this.alignCursors=function(){var A=this.session,C=A.multiSelect,b=C.ranges,Me=-1,Re=b.filter(function(Dt){if(Dt.cursor.row==Me)return!0;Me=Dt.cursor.row});if(!b.length||Re.length==b.length-1){var q=this.selection.getRange(),W=q.start.row,ut=q.end.row,G=W==ut;if(G){var D=this.session.getLength(),w;do w=this.session.getLine(ut);while(/[=:]/.test(w)&&++ut<D);do w=this.session.getLine(W);while(/[=:]/.test(w)&&--W>0);W<0&&(W=0),ut>=D&&(ut=D-1)}var v=this.session.removeFullLines(W,ut);v=this.$reAlignText(v,G),this.session.insert({row:W,column:0},v.join(`
|
954
|
+
`)+`
|
955
|
+
`),G||(q.start.column=0,q.end.column=v[v.length-1].length),this.selection.setRange(q)}else{Re.forEach(function(Dt){C.substractPoint(Dt.cursor)});var L=0,lt=1/0,ct=b.map(function(Dt){var Wt=Dt.cursor,Vt=A.getLine(Wt.row),li=Vt.substr(Wt.column).search(/\S/g);return li==-1&&(li=0),Wt.column>L&&(L=Wt.column),li<lt&&(lt=li),li});b.forEach(function(Dt,Wt){var Vt=Dt.cursor,li=L-Vt.column,zt=ct[Wt]-lt;li>zt?A.insert(Vt,n.stringRepeat(" ",li-zt)):A.remove(new S(Vt.row,Vt.column,Vt.row,Vt.column-li+zt)),Dt.start.column=Dt.end.column=L,Dt.start.row=Dt.end.row=Vt.row,Dt.cursor=Dt.end}),C.fromOrientedRange(b[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(A,C){var b=!0,Me=!0,Re,q,W;return A.map(function(v){var L=v.match(/(\s*)(.*?)(\s*)([=:].*)/);return L?Re==null?(Re=L[1].length,q=L[2].length,W=L[3].length,L):(Re+q+W!=L[1].length+L[2].length+L[3].length&&(Me=!1),Re!=L[1].length&&(b=!1),Re>L[1].length&&(Re=L[1].length),q<L[2].length&&(q=L[2].length),W>L[3].length&&(W=L[3].length),L):[v]}).map(C?G:b?Me?D:G:w);function ut(v){return n.stringRepeat(" ",v)}function G(v){return v[2]?ut(Re)+v[2]+ut(q-v[2].length+W)+v[4].replace(/^([=:])\s+/,"$1 "):v[0]}function D(v){return v[2]?ut(Re+q-v[2].length)+v[2]+ut(W)+v[4].replace(/^([=:])\s+/,"$1 "):v[0]}function w(v){return v[2]?ut(Re)+v[2]+ut(W)+v[4].replace(/^([=:])\s+/,"$1 "):v[0]}}}).call(s.prototype);function p(A,C){return A.row==C.row&&A.column==C.column}g.onSessionChange=function(A){var C=A.session;C&&!C.multiSelect&&(C.$selectionMarkers=[],C.selection.$initRangeList(),C.multiSelect=C.selection),this.multiSelect=C&&C.multiSelect;var b=A.oldSession;b&&(b.multiSelect.off("addRange",this.$onAddRange),b.multiSelect.off("removeRange",this.$onRemoveRange),b.multiSelect.off("multiSelect",this.$onMultiSelect),b.multiSelect.off("singleSelect",this.$onSingleSelect),b.multiSelect.lead.off("change",this.$checkMultiselectChange),b.multiSelect.anchor.off("change",this.$checkMultiselectChange)),C&&(C.multiSelect.on("addRange",this.$onAddRange),C.multiSelect.on("removeRange",this.$onRemoveRange),C.multiSelect.on("multiSelect",this.$onMultiSelect),C.multiSelect.on("singleSelect",this.$onSingleSelect),C.multiSelect.lead.on("change",this.$checkMultiselectChange),C.multiSelect.anchor.on("change",this.$checkMultiselectChange)),C&&this.inMultiSelectMode!=C.selection.inMultiSelectMode&&(C.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function m(A){A.$multiselectOnSessionChange||(A.$onAddRange=A.$onAddRange.bind(A),A.$onRemoveRange=A.$onRemoveRange.bind(A),A.$onMultiSelect=A.$onMultiSelect.bind(A),A.$onSingleSelect=A.$onSingleSelect.bind(A),A.$multiselectOnSessionChange=g.onSessionChange.bind(A),A.$checkMultiselectChange=A.$checkMultiselectChange.bind(A),A.$multiselectOnSessionChange(A),A.on("changeSession",A.$multiselectOnSessionChange),A.on("mousedown",a),A.commands.addCommands(o.defaultCommands),_(A))}function _(A){if(!A.textInput)return;var C=A.textInput.getElement(),b=!1;u.addListener(C,"keydown",function(Re){var q=Re.keyCode==18&&!(Re.ctrlKey||Re.shiftKey||Re.metaKey);A.$blockSelectEnabled&&q?b||(A.renderer.setMouseCursor("crosshair"),b=!0):b&&Me()},A),u.addListener(C,"keyup",Me,A),u.addListener(C,"blur",Me,A);function Me(Re){b&&(A.renderer.setMouseCursor(""),b=!1)}}g.MultiSelect=m,f("./config").defineOptions(s.prototype,"editor",{enableMultiselect:{set:function(A){m(this),A?this.on("mousedown",a):this.off("mousedown",a)},value:!0},enableBlockSelect:{set:function(A){this.$blockSelectEnabled=A},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(f,g,at){var E=f("../../range").Range,S=g.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(x,a,u){var n=x.getLine(u);return this.foldingStartMarker.test(n)?"start":a=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(n)?"end":""},this.getFoldWidgetRange=function(x,a,u){return null},this.indentationBlock=function(x,a,u){var n=/\S/,o=x.getLine(a),r=o.search(n);if(r!=-1){for(var t=u||o.length,e=x.getLength(),i=a,s=a;++a<e;){var p=x.getLine(a).search(n);if(p!=-1){if(p<=r){var m=x.getTokenAt(a,0);if(!m||m.type!=="string")break}s=a}}if(s>i){var _=x.getLine(s).length;return new E(i,t,s,_)}}},this.openingBracketBlock=function(x,a,u,n,o){var r={row:u,column:n+1},t=x.$findClosingBracket(a,r,o);if(t){var e=x.foldWidgets[t.row];return e==null&&(e=x.getFoldWidget(t.row)),e=="start"&&t.row>r.row&&(t.row--,t.column=x.getLine(t.row).length),E.fromPoints(r,t)}},this.closingBracketBlock=function(x,a,u,n,o){var r={row:u,column:n},t=x.$findOpeningBracket(a,r);if(t)return t.column++,r.column--,E.fromPoints(t,r)}}).call(S.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(f,g,at){var E=f("../lib/dom"),S=f("../range").Range,x=f("../config").nls;function a(n,o,r){for(var t=0,e=n.length-1;t<=e;){var i=t+e>>1,s=r(o,n[i]);if(s>0)t=i+1;else if(s<0)e=i-1;else return i}return-(t+1)}function u(n,o,r){var t=n.getAnnotations().sort(S.comparePoints);if(t.length){var e=a(t,{row:o,column:-1},S.comparePoints);e<0&&(e=-e-1),e>=t.length?e=r>0?0:t.length-1:e===0&&r<0&&(e=t.length-1);var i=t[e];if(!(!i||!r)){if(i.row===o){do i=t[e+=r];while(i&&i.row===o);if(!i)return t.slice()}var s=[];o=i.row;do s[r<0?"unshift":"push"](i),i=t[e+=r];while(i&&i.row==o);return s.length&&s}}}g.showErrorMarker=function(n,o){var r=n.session,t=n.getCursorPosition(),e=t.row,i=r.widgetManager.getWidgetsAtRow(e).filter(function(Re){return Re.type=="errorMarker"})[0];i?i.destroy():e-=o;var s=u(r,e,o),p;if(s){var m=s[0];t.column=(m.pos&&typeof m.column!="number"?m.pos.sc:m.column)||0,t.row=m.row,p=n.renderer.$gutterLayer.$annotations[t.row]}else{if(i)return;p={displayText:[x("error-marker.good-state","Looks good!")],className:"ace_ok"}}n.session.unfold(t.row),n.selection.moveToPosition(t);var _={row:t.row,fixedWidth:!0,coverGutter:!0,el:E.createElement("div"),type:"errorMarker"},A=_.el.appendChild(E.createElement("div")),C=_.el.appendChild(E.createElement("div"));C.className="error_widget_arrow "+p.className;var b=n.renderer.$cursorLayer.getPixelPosition(t).left;C.style.left=b+n.renderer.gutterWidth-5+"px",_.el.className="error_widget_wrapper",A.className="error_widget "+p.className,p.displayText.forEach(function(Re,q){A.appendChild(E.createTextNode(Re)),q<p.displayText.length-1&&A.appendChild(E.createElement("br"))}),A.appendChild(E.createElement("div"));var Me=function(Re,q,W){if(q===0&&(W==="esc"||W==="return"))return _.destroy(),{command:"null"}};_.destroy=function(){n.$mouseHandler.isMousePressed||(n.keyBinding.removeKeyboardHandler(Me),r.widgetManager.removeLineWidget(_),n.off("changeSelection",_.destroy),n.off("changeSession",_.destroy),n.off("mouseup",_.destroy),n.off("change",_.destroy))},n.keyBinding.addKeyboardHandler(Me),n.on("changeSelection",_.destroy),n.on("changeSession",_.destroy),n.on("mouseup",_.destroy),n.on("change",_.destroy),n.session.widgetManager.addLineWidget(_),_.el.onmousedown=n.focus.bind(n),n.renderer.scrollCursorIntoView(null,.5,{bottom:_.el.offsetHeight})},E.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,at){f("./loader_build")(g);var E=f("./lib/dom"),S=f("./range").Range,x=f("./editor").Editor,a=f("./edit_session").EditSession,u=f("./undomanager").UndoManager,n=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,t){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 x)return r.env.editor;var i="";if(r&&/input|textarea/i.test(r.tagName)){var s=r;i=s.value,r=E.createElement("pre"),s.parentNode.replaceChild(r,s)}else r&&(i=r.textContent,r.innerHTML="");var p=g.createEditSession(i),m=new x(new n(r),p,t),_={document:p,editor:m,onResize:m.resize.bind(m,null)};return s&&(_.textarea=s),m.on("destroy",function(){_.editor.container.env=null}),m.container.env=m.env=_,m},g.createEditSession=function(r,t){var e=new a(r,t);return e.setUndoManager(new u),e},g.Range=S,g.Editor=x,g.EditSession=a,g.UndoManager=u,g.VirtualRenderer=n;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 at in f)f.hasOwnProperty(at)&&(g.ace[at]=f[at]);g.ace.default=g.ace,c&&(c.exports=g.ace)})}()}(ace$1)),ace$1.exports}var aceExports=requireAce(),modeRuby={exports:{}},hasRequiredModeRuby;function requireModeRuby(){return hasRequiredModeRuby||(hasRequiredModeRuby=1,function(c,h){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(f,g,at){var E=f("../lib/oop"),S=f("./text_highlight_rules").TextHighlightRules,x=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 a=g.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},u=g.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},n=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/},t=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"},i=g.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},s=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",m="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",_="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",A="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",C=this.$keywords=this.createKeywordMapper({keyword:m,"constant.language":_,"variable.language":A,"support.function":p,"invalid.deprecated":"debugger"},"identifier"),b=`\\\\(?: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})*})`,Me={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};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:b},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:b},{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(Re,q,W){W.length&&(W=[]);var ut=Re[Re.length-1];return W.unshift(ut,q),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(Re,q,W){W.length&&(W=[]);var ut=Re[Re.length-1];return W.unshift(ut,q),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(Re,q,W){W.length&&(W=[]);var ut=Re[Re.length-1];return W.unshift(ut,q),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(Re,q,W){W.length&&(W=[]);var ut=Re[Re.length-1];return W.unshift(ut,q),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(Re,q,W){W.length&&(W=[]);var ut=Re[Re.length-1];return W.unshift(ut,q),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},i,{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\\?(?:"+b+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},r,t,x,a,e,u,n,o,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:C,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(Re,q,W){var ut=Re[2]=="-"||Re[2]=="~"?"indentedHeredoc":"heredoc",G=Re.split(this.splitRegex);return W.push(ut,G[3]),[{type:"constant",value:G[1]},{type:"string",value:G[2]},{type:"support.class",value:G[3]},{type:"string",value:G[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(Re,q,W){return Re===W[1]?(W.shift(),W.shift(),this.next=W[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(Re,q,W){return Re===W[1]?(W.shift(),W.shift(),this.next=W[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(Re,q){return q[0]==="heredoc"||q[0]==="indentedHeredoc"?q[0]:Re}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(Re,q,W){return this.next="",Re=="}"&&W.length>1&&W[1]!="start"&&(W.shift(),this.next=W.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(Re,q,W){return W.length&&Re===W[0]?(W.unshift(Re,q),this.token):"string"}},{token:"constant.language.escape",regex:b},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(Re,q,W){return W.length&&Re===Me[W[0]]?(W.shift(),this.next=W.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(Re,q,W){return W.length&&Re===W[0]?(W.unshift(Re,q),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(Re,q,W){return W.length&&Re===Me[W[0]]?(W.shift(),this.next=W.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(Re,q,W){return W.length&&Re===W[0]?(W.unshift(Re,q),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(Re,q,W){return W.length&&Re===Me[W[0]]?(W.shift(),this.next=W.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(Re,q,W){return W.length&&Re===W[0]?(W.unshift(Re,q),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:b},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(Re,q,W){return W.length&&Re===Me[W[0]]?(W.shift(),this.next=W.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(Re,q,W){return W.length&&Re===W[0]?(W.unshift(Re,q),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(Re,q,W){return W.length&&Re[0]===Me[W[0]]?(W.shift(),this.next=W.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()};E.inherits(s,S),g.RubyHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(f,g,at){var E=f("../range").Range,S=function(){};(function(){this.checkOutdent=function(x,a){return/^\s+$/.test(x)?/^\s*\}/.test(a):!1},this.autoOutdent=function(x,a){var u=x.getLine(a),n=u.match(/^(\s*\})/);if(!n)return 0;var o=n[1].length,r=x.findMatchingBracket({row:a,column:o});if(!r||r.row==a)return 0;var t=this.$getIndent(x.getLine(r.row));x.replace(new E(a,0,a,o-1),t)},this.$getIndent=function(x){return x.match(/^\s*/)[0]}}).call(S.prototype),g.MatchingBraceOutdent=S}),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,at){var E=f("../../lib/oop"),S=f("./fold_mode").FoldMode,x=f("../../range").Range,a=f("../../token_iterator").TokenIterator,u=g.FoldMode=function(){};E.inherits(u,S),(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(n,o,r){var t=n.getLine(r),e=this.foldingStartMarker.test(t),i=this.foldingStopMarker.test(t);if(e&&!i){var s=t.match(this.foldingStartMarker);if(s[1]){if((s[1]=="if"||s[1]=="else"||s[1]=="while"||s[1]=="until"||s[1]=="unless")&&(s[1]=="else"&&/^\s*else\s*$/.test(t)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(t)===!1)||s[1]=="when"&&/\sthen\s/.test(t)===!0)return;if(n.getTokenAt(r,s.index+2).type==="keyword")return"start"}else if(!s[3]||n.getTokenAt(r,s.index+1).type==="comment.multiline")return"start"}if(o!="markbeginend"||!i||e&&i)return"";var s=t.match(this.foldingStopMarker);if(s[3]==="end"){if(n.getTokenAt(r,s.index+1).type==="keyword")return"end"}else if(!s[1]||n.getTokenAt(r,s.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(n,o,r){var t=n.doc.getLine(r),e=this.foldingStartMarker.exec(t);if(e)return e[1]||e[3]?this.rubyBlock(n,r,e.index+2):this.openingBracketBlock(n,"{",r,e.index);var e=this.foldingStopMarker.exec(t);if(e)return e[3]==="end"&&n.getTokenAt(r,e.index+1).type==="keyword"?this.rubyBlock(n,r,e.index+1):e[1]==="=end"&&n.getTokenAt(r,e.index+1).type==="comment.multiline"?this.rubyBlock(n,r,e.index+1):this.closingBracketBlock(n,"}",r,e.index+e[0].length)},this.rubyBlock=function(n,G,r,t){var e=new a(n,G,r),i=e.getCurrentToken();if(!(!i||i.type!="keyword"&&i.type!="comment.multiline")){var s=i.value,p=n.getLine(G);switch(i.value){case"if":case"unless":case"while":case"until":var m=new RegExp("^\\s*"+i.value);if(!m.test(p))return;var _=this.indentKeywords[s];break;case"when":if(/\sthen\s/.test(p))return;case"elsif":case"rescue":case"ensure":var _=1;break;case"else":var m=new RegExp("^\\s*"+i.value+"\\s*$");if(!m.test(p))return;var _=1;break;default:var _=this.indentKeywords[s]}var A=[s];if(_){var C=_===-1?n.getLine(G-1).length:n.getLine(G).length,b=G,Me=[];if(Me.push(e.getCurrentTokenRange()),e.step=_===-1?e.stepBackward:e.stepForward,i.type=="comment.multiline"){for(;i=e.step();)if(i.type==="comment.multiline"){if(_==1){if(C=6,i.value=="=end")break}else if(i.value=="=begin")break}}else for(;i=e.step();){var Re=!1;if(i.type==="keyword"){var q=_*this.indentKeywords[i.value];switch(p=n.getLine(e.getCurrentTokenRow()),i.value){case"do":for(var W=e.$tokenIndex-1;W>=0;W--){var ut=e.$rowTokens[W];if(ut&&(ut.value=="while"||ut.value=="until"||ut.value=="for")){q=0;break}}break;case"else":var m=new RegExp("^\\s*"+i.value+"\\s*$");(!m.test(p)||s=="case")&&(q=0,Re=!0);break;case"if":case"unless":case"while":case"until":var m=new RegExp("^\\s*"+i.value);m.test(p)||(q=0,Re=!0);break;case"when":(/\sthen\s/.test(p)||s=="case")&&(q=0,Re=!0)}if(q>0)A.unshift(i.value);else if(q<=0&&Re===!1){if(A.shift(),!A.length&&((s=="while"||s=="until"||s=="for")&&i.value!="do"||i.value=="do"&&_==-1&&q!=0||i.value!="do"))break;q===0&&A.unshift(i.value)}}}if(!i)return null;if(t)return Me.push(e.getCurrentTokenRange()),Me;var G=e.getCurrentTokenRow();if(_===-1){if(i.type==="comment.multiline")var D=6;else var D=n.getLine(G).length;return new x(G,D,b-1,C)}return new x(b,C,G-1,n.getLine(G-1).length)}}}}).call(u.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,at){var E=f("../lib/oop"),S=f("./text").Mode,x=f("./ruby_highlight_rules").RubyHighlightRules,a=f("./matching_brace_outdent").MatchingBraceOutdent,u=f("../range").Range,n=f("./folding/ruby").FoldMode,o=function(){this.HighlightRules=x,this.$outdent=new a,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new n,this.indentKeywords=this.foldingRules.indentKeywords};E.inherits(o,S),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(r,t,e){var i=this.$getIndent(t),s=this.getTokenizer().getLineTokens(t,r),p=s.tokens;if(p.length&&p[p.length-1].type=="comment")return i;if(r=="start"){var m=t.match(/^.*[\{\(\[]\s*$/),_=t.match(/^\s*(class|def|module)\s.*$/),A=t.match(/.*do(\s*|\s+\|.*\|\s*)$/),C=t.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(m||_||A||C)&&(i+=e)}return i},this.checkOutdent=function(r,t,e){return/^\s+(end|else|rescue|ensure)$/.test(t+e)||this.$outdent.checkOutdent(t,e)},this.autoOutdent=function(r,t,e){var i=t.getLine(e);if(/}/.test(i))return this.$outdent.autoOutdent(t,e);var s=this.$getIndent(i),p=t.getLine(e-1),m=this.$getIndent(p),_=t.getTabString();m.length<=s.length&&s.slice(-_.length)==_&&t.remove(new u(e,s.length-_.length,e,s.length))},this.getMatching=function(r,t,e){if(t==null){var i=r.selection.lead;e=i.column,t=i.row}var s=r.getTokenAt(t,e);if(s&&s.value in this.indentKeywords)return this.foldingRules.rubyBlock(r,t,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){c&&(c.exports=f)})}()}(modeRuby)),modeRuby.exports}requireModeRuby();var themeTwilight={exports:{}},hasRequiredThemeTwilight;function requireThemeTwilight(){return hasRequiredThemeTwilight||(hasRequiredThemeTwilight=1,function(c,h){ace.define("ace/theme/twilight-css",["require","exports","module"],function(f,g,at){at.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,at){g.isDark=!0,g.cssClass="ace-twilight",g.cssText=f("./twilight-css");var E=f("../lib/dom");E.importCssString(g.cssText,g.cssClass,!1)}),function(){ace.require(["ace/theme/twilight"],function(f){c&&(c.exports=f)})}()}(themeTwilight)),themeTwilight.exports}requireThemeTwilight();var Qt=Object.defineProperty,Zt=(c,h,f)=>h in c?Qt(c,h,{enumerable:!0,configurable:!0,writable:!0,value:f}):c[h]=f,j=(c,h,f)=>Zt(c,typeof h!="symbol"?h+"":h,f);function gt(c,h){return function(){return c.apply(h,arguments)}}const{toString:Yt}=Object.prototype,{getPrototypeOf:Ue}=Object,{iterator:pe,toStringTag:bt}=Symbol,me=(c=>h=>{const f=Yt.call(h);return c[f]||(c[f]=f.slice(8,-1).toLowerCase())})(Object.create(null)),$=c=>(c=c.toLowerCase(),h=>me(h)===c),ge=c=>h=>typeof h===c,{isArray:K}=Array,Y=ge("undefined");function ee(c){return c!==null&&!Y(c)&&c.constructor!==null&&!Y(c.constructor)&&T(c.constructor.isBuffer)&&c.constructor.isBuffer(c)}const yt=$("ArrayBuffer");function en(c){let h;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?h=ArrayBuffer.isView(c):h=c&&c.buffer&&yt(c.buffer),h}const tn=ge("string"),T=ge("function"),wt=ge("number"),te=c=>c!==null&&typeof c=="object",nn=c=>c===!0||c===!1,le=c=>{if(me(c)!=="object")return!1;const h=Ue(c);return(h===null||h===Object.prototype||Object.getPrototypeOf(h)===null)&&!(bt in c)&&!(pe in c)},sn=c=>{if(!te(c)||ee(c))return!1;try{return Object.keys(c).length===0&&Object.getPrototypeOf(c)===Object.prototype}catch{return!1}},rn=$("Date"),on=$("File"),cn=$("Blob"),an=$("FileList"),ln=c=>te(c)&&T(c.pipe),un=c=>{let h;return c&&(typeof FormData=="function"&&c instanceof FormData||T(c.append)&&((h=me(c))==="formdata"||h==="object"&&T(c.toString)&&c.toString()==="[object FormData]"))},hn=$("URLSearchParams"),[dn,fn,pn,mn]=["ReadableStream","Request","Response","Headers"].map($),gn=c=>c.trim?c.trim():c.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ne(c,h,{allOwnKeys:f=!1}={}){if(c===null||typeof c>"u")return;let g,at;if(typeof c!="object"&&(c=[c]),K(c))for(g=0,at=c.length;g<at;g++)h.call(null,c[g],g,c);else{if(ee(c))return;const E=f?Object.getOwnPropertyNames(c):Object.keys(c),S=E.length;let x;for(g=0;g<S;g++)x=E[g],h.call(null,c[x],x,c)}}function _t(c,h){if(ee(c))return null;h=h.toLowerCase();const f=Object.keys(c);let g=f.length,at;for(;g-- >0;)if(at=f[g],h===at.toLowerCase())return at;return null}const H=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Et=c=>!Y(c)&&c!==H;function ke(){const{caseless:c}=Et(this)&&this||{},h={},f=(g,at)=>{const E=c&&_t(h,at)||at;le(h[E])&&le(g)?h[E]=ke(h[E],g):le(g)?h[E]=ke({},g):K(g)?h[E]=g.slice():h[E]=g};for(let g=0,at=arguments.length;g<at;g++)arguments[g]&&ne(arguments[g],f);return h}const bn=(c,h,f,{allOwnKeys:g}={})=>(ne(h,(at,E)=>{f&&T(at)?c[E]=gt(at,f):c[E]=at},{allOwnKeys:g}),c),yn=c=>(c.charCodeAt(0)===65279&&(c=c.slice(1)),c),wn=(c,h,f,g)=>{c.prototype=Object.create(h.prototype,g),c.prototype.constructor=c,Object.defineProperty(c,"super",{value:h.prototype}),f&&Object.assign(c.prototype,f)},_n=(c,h,f,g)=>{let at,E,S;const x={};if(h=h||{},c==null)return h;do{for(at=Object.getOwnPropertyNames(c),E=at.length;E-- >0;)S=at[E],(!g||g(S,c,h))&&!x[S]&&(h[S]=c[S],x[S]=!0);c=f!==!1&&Ue(c)}while(c&&(!f||f(c,h))&&c!==Object.prototype);return h},En=(c,h,f)=>{c=String(c),(f===void 0||f>c.length)&&(f=c.length),f-=h.length;const g=c.indexOf(h,f);return g!==-1&&g===f},Sn=c=>{if(!c)return null;if(K(c))return c;let h=c.length;if(!wt(h))return null;const f=new Array(h);for(;h-- >0;)f[h]=c[h];return f},xn=(c=>h=>c&&h instanceof c)(typeof Uint8Array<"u"&&Ue(Uint8Array)),Rn=(c,h)=>{const f=(c&&c[pe]).call(c);let g;for(;(g=f.next())&&!g.done;){const at=g.value;h.call(c,at[0],at[1])}},An=(c,h)=>{let f;const g=[];for(;(f=c.exec(h))!==null;)g.push(f);return g},On=$("HTMLFormElement"),Cn=c=>c.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(h,f,g){return f.toUpperCase()+g}),We=(({hasOwnProperty:c})=>(h,f)=>c.call(h,f))(Object.prototype),Tn=$("RegExp"),St=(c,h)=>{const f=Object.getOwnPropertyDescriptors(c),g={};ne(f,(at,E)=>{let S;(S=h(at,E,c))!==!1&&(g[E]=S||at)}),Object.defineProperties(c,g)},kn=c=>{St(c,(h,f)=>{if(T(c)&&["arguments","caller","callee"].indexOf(f)!==-1)return!1;const g=c[f];if(T(g)){if(h.enumerable=!1,"writable"in h){h.writable=!1;return}h.set||(h.set=()=>{throw Error("Can not rewrite read-only method '"+f+"'")})}})},Nn=(c,h)=>{const f={},g=at=>{at.forEach(E=>{f[E]=!0})};return K(c)?g(c):g(String(c).split(h)),f},Pn=()=>{},In=(c,h)=>c!=null&&Number.isFinite(c=+c)?c:h;function Ln(c){return!!(c&&T(c.append)&&c[bt]==="FormData"&&c[pe])}const jn=c=>{const h=new Array(10),f=(g,at)=>{if(te(g)){if(h.indexOf(g)>=0)return;if(ee(g))return g;if(!("toJSON"in g)){h[at]=g;const E=K(g)?[]:{};return ne(g,(S,x)=>{const a=f(S,at+1);!Y(a)&&(E[x]=a)}),h[at]=void 0,E}}return g};return f(c,0)},vn=$("AsyncFunction"),$n=c=>c&&(te(c)||T(c))&&T(c.then)&&T(c.catch),xt=((c,h)=>c?setImmediate:h?((f,g)=>(H.addEventListener("message",({source:at,data:E})=>{at===H&&E===f&&g.length&&g.shift()()},!1),at=>{g.push(at),H.postMessage(f,"*")}))(`axios@${Math.random()}`,[]):f=>setTimeout(f))(typeof setImmediate=="function",T(H.postMessage)),Fn=typeof queueMicrotask<"u"?queueMicrotask.bind(H):typeof process<"u"&&process.nextTick||xt,Un=c=>c!=null&&T(c[pe]),l={isArray:K,isArrayBuffer:yt,isBuffer:ee,isFormData:un,isArrayBufferView:en,isString:tn,isNumber:wt,isBoolean:nn,isObject:te,isPlainObject:le,isEmptyObject:sn,isReadableStream:dn,isRequest:fn,isResponse:pn,isHeaders:mn,isUndefined:Y,isDate:rn,isFile:on,isBlob:cn,isRegExp:Tn,isFunction:T,isStream:ln,isURLSearchParams:hn,isTypedArray:xn,isFileList:an,forEach:ne,merge:ke,extend:bn,trim:gn,stripBOM:yn,inherits:wn,toFlatObject:_n,kindOf:me,kindOfTest:$,endsWith:En,toArray:Sn,forEachEntry:Rn,matchAll:An,isHTMLForm:On,hasOwnProperty:We,hasOwnProp:We,reduceDescriptors:St,freezeMethods:kn,toObjectSet:Nn,toCamelCase:Cn,noop:Pn,toFiniteNumber:In,findKey:_t,global:H,isContextDefined:Et,isSpecCompliantForm:Ln,toJSONObject:jn,isAsyncFn:vn,isThenable:$n,setImmediate:xt,asap:Fn,isIterable:Un};function y(c,h,f,g,at){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=c,this.name="AxiosError",h&&(this.code=h),f&&(this.config=f),g&&(this.request=g),at&&(this.response=at,this.status=at.status?at.status:null)}l.inherits(y,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 Rt=y.prototype,At={};["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(c=>{At[c]={value:c}}),Object.defineProperties(y,At),Object.defineProperty(Rt,"isAxiosError",{value:!0}),y.from=(c,h,f,g,at,E)=>{const S=Object.create(Rt);return l.toFlatObject(c,S,function(x){return x!==Error.prototype},x=>x!=="isAxiosError"),y.call(S,c.message,h,f,g,at),S.cause=c,S.name=c.name,E&&Object.assign(S,E),S};const Dn=null;function Ne(c){return l.isPlainObject(c)||l.isArray(c)}function Ot(c){return l.endsWith(c,"[]")?c.slice(0,-2):c}function Ke(c,h,f){return c?c.concat(h).map(function(g,at){return g=Ot(g),!f&&at?"["+g+"]":g}).join(f?".":""):h}function qn(c){return l.isArray(c)&&!c.some(Ne)}const Bn=l.toFlatObject(l,{},null,function(c){return/^is[A-Z]/.test(c)});function be(c,h,f){if(!l.isObject(c))throw new TypeError("target must be an object");h=h||new FormData,f=l.toFlatObject(f,{metaTokens:!0,dots:!1,indexes:!1},!1,function(t,e){return!l.isUndefined(e[t])});const g=f.metaTokens,at=f.visitor||u,E=f.dots,S=f.indexes,x=(f.Blob||typeof Blob<"u"&&Blob)&&l.isSpecCompliantForm(h);if(!l.isFunction(at))throw new TypeError("visitor must be a function");function a(t){if(t===null)return"";if(l.isDate(t))return t.toISOString();if(l.isBoolean(t))return t.toString();if(!x&&l.isBlob(t))throw new y("Blob is not supported. Use a Buffer instead.");return l.isArrayBuffer(t)||l.isTypedArray(t)?x&&typeof Blob=="function"?new Blob([t]):Buffer.from(t):t}function u(t,e,i){let s=t;if(t&&!i&&typeof t=="object"){if(l.endsWith(e,"{}"))e=g?e:e.slice(0,-2),t=JSON.stringify(t);else if(l.isArray(t)&&qn(t)||(l.isFileList(t)||l.endsWith(e,"[]"))&&(s=l.toArray(t)))return e=Ot(e),s.forEach(function(p,m){!(l.isUndefined(p)||p===null)&&h.append(S===!0?Ke([e],m,E):S===null?e:e+"[]",a(p))}),!1}return Ne(t)?!0:(h.append(Ke(i,e,E),a(t)),!1)}const n=[],o=Object.assign(Bn,{defaultVisitor:u,convertValue:a,isVisitable:Ne});function r(t,e){if(!l.isUndefined(t)){if(n.indexOf(t)!==-1)throw Error("Circular reference detected in "+e.join("."));n.push(t),l.forEach(t,function(i,s){(!(l.isUndefined(i)||i===null)&&at.call(h,i,l.isString(s)?s.trim():s,e,o))===!0&&r(i,e?e.concat(s):[s])}),n.pop()}}if(!l.isObject(c))throw new TypeError("data must be an object");return r(c),h}function Xe(c){const h={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(c).replace(/[!'()~]|%20|%00/g,function(f){return h[f]})}function De(c,h){this._pairs=[],c&&be(c,this,h)}const Ct=De.prototype;Ct.append=function(c,h){this._pairs.push([c,h])},Ct.toString=function(c){const h=c?function(f){return c.call(this,f,Xe)}:Xe;return this._pairs.map(function(f){return h(f[0])+"="+h(f[1])},"").join("&")};function Mn(c){return encodeURIComponent(c).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Tt(c,h,f){if(!h)return c;const g=f&&f.encode||Mn;l.isFunction(f)&&(f={serialize:f});const at=f&&f.serialize;let E;if(at?E=at(h,f):E=l.isURLSearchParams(h)?h.toString():new De(h,f).toString(g),E){const S=c.indexOf("#");S!==-1&&(c=c.slice(0,S)),c+=(c.indexOf("?")===-1?"?":"&")+E}return c}class Ge{constructor(){this.handlers=[]}use(h,f,g){return this.handlers.push({fulfilled:h,rejected:f,synchronous:g?g.synchronous:!1,runWhen:g?g.runWhen:null}),this.handlers.length-1}eject(h){this.handlers[h]&&(this.handlers[h]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(h){l.forEach(this.handlers,function(f){f!==null&&h(f)})}}const kt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Hn=typeof URLSearchParams<"u"?URLSearchParams:De,zn=typeof FormData<"u"?FormData:null,Vn=typeof Blob<"u"?Blob:null,Jn={isBrowser:!0,classes:{URLSearchParams:Hn,FormData:zn,Blob:Vn},protocols:["http","https","file","blob","url","data"]},qe=typeof window<"u"&&typeof document<"u",Pe=typeof navigator=="object"&&navigator||void 0,Wn=qe&&(!Pe||["ReactNative","NativeScript","NS"].indexOf(Pe.product)<0),Kn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Xn=qe&&window.location.href||"http://localhost",Gn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:qe,hasStandardBrowserEnv:Wn,hasStandardBrowserWebWorkerEnv:Kn,navigator:Pe,origin:Xn},Symbol.toStringTag,{value:"Module"})),O={...Gn,...Jn};function Qn(c,h){return be(c,new O.classes.URLSearchParams,{visitor:function(f,g,at,E){return O.isNode&&l.isBuffer(f)?(this.append(g,f.toString("base64")),!1):E.defaultVisitor.apply(this,arguments)},...h})}function Zn(c){return l.matchAll(/\w+|\[(\w*)]/g,c).map(h=>h[0]==="[]"?"":h[1]||h[0])}function Yn(c){const h={},f=Object.keys(c);let g;const at=f.length;let E;for(g=0;g<at;g++)E=f[g],h[E]=c[E];return h}function Nt(c){function h(f,g,at,E){let S=f[E++];if(S==="__proto__")return!0;const x=Number.isFinite(+S),a=E>=f.length;return S=!S&&l.isArray(at)?at.length:S,a?(l.hasOwnProp(at,S)?at[S]=[at[S],g]:at[S]=g,!x):((!at[S]||!l.isObject(at[S]))&&(at[S]=[]),h(f,g,at[S],E)&&l.isArray(at[S])&&(at[S]=Yn(at[S])),!x)}if(l.isFormData(c)&&l.isFunction(c.entries)){const f={};return l.forEachEntry(c,(g,at)=>{h(Zn(g),at,f,0)}),f}return null}function es(c,h,f){if(l.isString(c))try{return(h||JSON.parse)(c),l.trim(c)}catch(g){if(g.name!=="SyntaxError")throw g}return(f||JSON.stringify)(c)}const se={transitional:kt,adapter:["xhr","http","fetch"],transformRequest:[function(c,h){const f=h.getContentType()||"",g=f.indexOf("application/json")>-1,at=l.isObject(c);if(at&&l.isHTMLForm(c)&&(c=new FormData(c)),l.isFormData(c))return g?JSON.stringify(Nt(c)):c;if(l.isArrayBuffer(c)||l.isBuffer(c)||l.isStream(c)||l.isFile(c)||l.isBlob(c)||l.isReadableStream(c))return c;if(l.isArrayBufferView(c))return c.buffer;if(l.isURLSearchParams(c))return h.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),c.toString();let E;if(at){if(f.indexOf("application/x-www-form-urlencoded")>-1)return Qn(c,this.formSerializer).toString();if((E=l.isFileList(c))||f.indexOf("multipart/form-data")>-1){const S=this.env&&this.env.FormData;return be(E?{"files[]":c}:c,S&&new S,this.formSerializer)}}return at||g?(h.setContentType("application/json",!1),es(c)):c}],transformResponse:[function(c){const h=this.transitional||se.transitional,f=h&&h.forcedJSONParsing,g=this.responseType==="json";if(l.isResponse(c)||l.isReadableStream(c))return c;if(c&&l.isString(c)&&(f&&!this.responseType||g)){const at=!(h&&h.silentJSONParsing)&&g;try{return JSON.parse(c)}catch(E){if(at)throw E.name==="SyntaxError"?y.from(E,y.ERR_BAD_RESPONSE,this,null,this.response):E}}return c}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:O.classes.FormData,Blob:O.classes.Blob},validateStatus:function(c){return c>=200&&c<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};l.forEach(["delete","get","head","post","put","patch"],c=>{se.headers[c]={}});const ts=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"]),ns=c=>{const h={};let f,g,at;return c&&c.split(`
|
1119
|
+
`).forEach(function(E){at=E.indexOf(":"),f=E.substring(0,at).trim().toLowerCase(),g=E.substring(at+1).trim(),!(!f||h[f]&&ts[f])&&(f==="set-cookie"?h[f]?h[f].push(g):h[f]=[g]:h[f]=h[f]?h[f]+", "+g:g)}),h},Qe=Symbol("internals");function Q(c){return c&&String(c).trim().toLowerCase()}function ue(c){return c===!1||c==null?c:l.isArray(c)?c.map(ue):String(c)}function ss(c){const h=Object.create(null),f=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let g;for(;g=f.exec(c);)h[g[1]]=g[2];return h}const rs=c=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(c.trim());function Ae(c,h,f,g,at){if(l.isFunction(g))return g.call(this,h,f);if(at&&(h=f),!!l.isString(h)){if(l.isString(g))return h.indexOf(g)!==-1;if(l.isRegExp(g))return g.test(h)}}function is(c){return c.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(h,f,g)=>f.toUpperCase()+g)}function os(c,h){const f=l.toCamelCase(" "+h);["get","set","has"].forEach(g=>{Object.defineProperty(c,g+f,{value:function(at,E,S){return this[g].call(this,h,at,E,S)},configurable:!0})})}let k=class{constructor(c){c&&this.set(c)}set(c,h,f){const g=this;function at(S,x,a){const u=Q(x);if(!u)throw new Error("header name must be a non-empty string");const n=l.findKey(g,u);(!n||g[n]===void 0||a===!0||a===void 0&&g[n]!==!1)&&(g[n||x]=ue(S))}const E=(S,x)=>l.forEach(S,(a,u)=>at(a,u,x));if(l.isPlainObject(c)||c instanceof this.constructor)E(c,h);else if(l.isString(c)&&(c=c.trim())&&!rs(c))E(ns(c),h);else if(l.isObject(c)&&l.isIterable(c)){let S={},x,a;for(const u of c){if(!l.isArray(u))throw TypeError("Object iterator must return a key-value pair");S[a=u[0]]=(x=S[a])?l.isArray(x)?[...x,u[1]]:[x,u[1]]:u[1]}E(S,h)}else c!=null&&at(h,c,f);return this}get(c,h){if(c=Q(c),c){const f=l.findKey(this,c);if(f){const g=this[f];if(!h)return g;if(h===!0)return ss(g);if(l.isFunction(h))return h.call(this,g,f);if(l.isRegExp(h))return h.exec(g);throw new TypeError("parser must be boolean|regexp|function")}}}has(c,h){if(c=Q(c),c){const f=l.findKey(this,c);return!!(f&&this[f]!==void 0&&(!h||Ae(this,this[f],f,h)))}return!1}delete(c,h){const f=this;let g=!1;function at(E){if(E=Q(E),E){const S=l.findKey(f,E);S&&(!h||Ae(f,f[S],S,h))&&(delete f[S],g=!0)}}return l.isArray(c)?c.forEach(at):at(c),g}clear(c){const h=Object.keys(this);let f=h.length,g=!1;for(;f--;){const at=h[f];(!c||Ae(this,this[at],at,c,!0))&&(delete this[at],g=!0)}return g}normalize(c){const h=this,f={};return l.forEach(this,(g,at)=>{const E=l.findKey(f,at);if(E){h[E]=ue(g),delete h[at];return}const S=c?is(at):String(at).trim();S!==at&&delete h[at],h[S]=ue(g),f[S]=!0}),this}concat(...c){return this.constructor.concat(this,...c)}toJSON(c){const h=Object.create(null);return l.forEach(this,(f,g)=>{f!=null&&f!==!1&&(h[g]=c&&l.isArray(f)?f.join(", "):f)}),h}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([c,h])=>c+": "+h).join(`
|
1120
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(c){return c instanceof this?c:new this(c)}static concat(c,...h){const f=new this(c);return h.forEach(g=>f.set(g)),f}static accessor(c){const h=(this[Qe]=this[Qe]={accessors:{}}).accessors,f=this.prototype;function g(at){const E=Q(at);h[E]||(os(f,at),h[E]=!0)}return l.isArray(c)?c.forEach(g):g(c),this}};k.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),l.reduceDescriptors(k.prototype,({value:c},h)=>{let f=h[0].toUpperCase()+h.slice(1);return{get:()=>c,set(g){this[f]=g}}}),l.freezeMethods(k);function Oe(c,h){const f=this||se,g=h||f,at=k.from(g.headers);let E=g.data;return l.forEach(c,function(S){E=S.call(f,E,at.normalize(),h?h.status:void 0)}),at.normalize(),E}function Pt(c){return!!(c&&c.__CANCEL__)}function X(c,h,f){y.call(this,c??"canceled",y.ERR_CANCELED,h,f),this.name="CanceledError"}l.inherits(X,y,{__CANCEL__:!0});function It(c,h,f){const g=f.config.validateStatus;!f.status||!g||g(f.status)?c(f):h(new y("Request failed with status code "+f.status,[y.ERR_BAD_REQUEST,y.ERR_BAD_RESPONSE][Math.floor(f.status/100)-4],f.config,f.request,f))}function cs(c){const h=/^([-+\w]{1,25})(:?\/\/|:)/.exec(c);return h&&h[1]||""}function as(c,h){c=c||10;const f=new Array(c),g=new Array(c);let at=0,E=0,S;return h=h!==void 0?h:1e3,function(x){const a=Date.now(),u=g[E];S||(S=a),f[at]=x,g[at]=a;let n=E,o=0;for(;n!==at;)o+=f[n++],n=n%c;if(at=(at+1)%c,at===E&&(E=(E+1)%c),a-S<h)return;const r=u&&a-u;return r?Math.round(o*1e3/r):void 0}}function ls(c,h){let f=0,g=1e3/h,at,E;const S=(x,a=Date.now())=>{f=a,at=null,E&&(clearTimeout(E),E=null),c(...x)};return[(...x)=>{const a=Date.now(),u=a-f;u>=g?S(x,a):(at=x,E||(E=setTimeout(()=>{E=null,S(at)},g-u)))},()=>at&&S(at)]}const de=(c,h,f=3)=>{let g=0;const at=as(50,250);return ls(E=>{const S=E.loaded,x=E.lengthComputable?E.total:void 0,a=S-g,u=at(a),n=S<=x;g=S;const o={loaded:S,total:x,progress:x?S/x:void 0,bytes:a,rate:u||void 0,estimated:u&&x&&n?(x-S)/u:void 0,event:E,lengthComputable:x!=null,[h?"download":"upload"]:!0};c(o)},f)},Ze=(c,h)=>{const f=c!=null;return[g=>h[0]({lengthComputable:f,total:c,loaded:g}),h[1]]},Ye=c=>(...h)=>l.asap(()=>c(...h)),us=O.hasStandardBrowserEnv?((c,h)=>f=>(f=new URL(f,O.origin),c.protocol===f.protocol&&c.host===f.host&&(h||c.port===f.port)))(new URL(O.origin),O.navigator&&/(msie|trident)/i.test(O.navigator.userAgent)):()=>!0,hs=O.hasStandardBrowserEnv?{write(c,h,f,g,at,E){const S=[c+"="+encodeURIComponent(h)];l.isNumber(f)&&S.push("expires="+new Date(f).toGMTString()),l.isString(g)&&S.push("path="+g),l.isString(at)&&S.push("domain="+at),E===!0&&S.push("secure"),document.cookie=S.join("; ")},read(c){const h=document.cookie.match(new RegExp("(^|;\\s*)("+c+")=([^;]*)"));return h?decodeURIComponent(h[3]):null},remove(c){this.write(c,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function ds(c){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(c)}function fs(c,h){return h?c.replace(/\/?\/$/,"")+"/"+h.replace(/^\/+/,""):c}function Lt(c,h,f){let g=!ds(h);return c&&(g||f==!1)?fs(c,h):h}const et=c=>c instanceof k?{...c}:c;function V(c,h){h=h||{};const f={};function g(u,n,o,r){return l.isPlainObject(u)&&l.isPlainObject(n)?l.merge.call({caseless:r},u,n):l.isPlainObject(n)?l.merge({},n):l.isArray(n)?n.slice():n}function at(u,n,o,r){if(l.isUndefined(n)){if(!l.isUndefined(u))return g(void 0,u,o,r)}else return g(u,n,o,r)}function E(u,n){if(!l.isUndefined(n))return g(void 0,n)}function S(u,n){if(l.isUndefined(n)){if(!l.isUndefined(u))return g(void 0,u)}else return g(void 0,n)}function x(u,n,o){if(o in h)return g(u,n);if(o in c)return g(void 0,u)}const a={url:E,method:E,data:E,baseURL:S,transformRequest:S,transformResponse:S,paramsSerializer:S,timeout:S,timeoutMessage:S,withCredentials:S,withXSRFToken:S,adapter:S,responseType:S,xsrfCookieName:S,xsrfHeaderName:S,onUploadProgress:S,onDownloadProgress:S,decompress:S,maxContentLength:S,maxBodyLength:S,beforeRedirect:S,transport:S,httpAgent:S,httpsAgent:S,cancelToken:S,socketPath:S,responseEncoding:S,validateStatus:x,headers:(u,n,o)=>at(et(u),et(n),o,!0)};return l.forEach(Object.keys({...c,...h}),function(u){const n=a[u]||at,o=n(c[u],h[u],u);l.isUndefined(o)&&n!==x||(f[u]=o)}),f}const jt=c=>{const h=V({},c);let{data:f,withXSRFToken:g,xsrfHeaderName:at,xsrfCookieName:E,headers:S,auth:x}=h;h.headers=S=k.from(S),h.url=Tt(Lt(h.baseURL,h.url,h.allowAbsoluteUrls),c.params,c.paramsSerializer),x&&S.set("Authorization","Basic "+btoa((x.username||"")+":"+(x.password?unescape(encodeURIComponent(x.password)):"")));let a;if(l.isFormData(f)){if(O.hasStandardBrowserEnv||O.hasStandardBrowserWebWorkerEnv)S.setContentType(void 0);else if((a=S.getContentType())!==!1){const[u,...n]=a?a.split(";").map(o=>o.trim()).filter(Boolean):[];S.setContentType([u||"multipart/form-data",...n].join("; "))}}if(O.hasStandardBrowserEnv&&(g&&l.isFunction(g)&&(g=g(h)),g||g!==!1&&us(h.url))){const u=at&&E&&hs.read(E);u&&S.set(at,u)}return h},ps=typeof XMLHttpRequest<"u",ms=ps&&function(c){return new Promise(function(h,f){const g=jt(c);let at=g.data;const E=k.from(g.headers).normalize();let{responseType:S,onUploadProgress:x,onDownloadProgress:a}=g,u,n,o,r,t;function e(){r&&r(),t&&t(),g.cancelToken&&g.cancelToken.unsubscribe(u),g.signal&&g.signal.removeEventListener("abort",u)}let i=new XMLHttpRequest;i.open(g.method.toUpperCase(),g.url,!0),i.timeout=g.timeout;function s(){if(!i)return;const m=k.from("getAllResponseHeaders"in i&&i.getAllResponseHeaders()),_={data:!S||S==="text"||S==="json"?i.responseText:i.response,status:i.status,statusText:i.statusText,headers:m,config:c,request:i};It(function(A){h(A),e()},function(A){f(A),e()},_),i=null}"onloadend"in i?i.onloadend=s:i.onreadystatechange=function(){!i||i.readyState!==4||i.status===0&&!(i.responseURL&&i.responseURL.indexOf("file:")===0)||setTimeout(s)},i.onabort=function(){i&&(f(new y("Request aborted",y.ECONNABORTED,c,i)),i=null)},i.onerror=function(){f(new y("Network Error",y.ERR_NETWORK,c,i)),i=null},i.ontimeout=function(){let m=g.timeout?"timeout of "+g.timeout+"ms exceeded":"timeout exceeded";const _=g.transitional||kt;g.timeoutErrorMessage&&(m=g.timeoutErrorMessage),f(new y(m,_.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,c,i)),i=null},at===void 0&&E.setContentType(null),"setRequestHeader"in i&&l.forEach(E.toJSON(),function(m,_){i.setRequestHeader(_,m)}),l.isUndefined(g.withCredentials)||(i.withCredentials=!!g.withCredentials),S&&S!=="json"&&(i.responseType=g.responseType),a&&([o,t]=de(a,!0),i.addEventListener("progress",o)),x&&i.upload&&([n,r]=de(x),i.upload.addEventListener("progress",n),i.upload.addEventListener("loadend",r)),(g.cancelToken||g.signal)&&(u=m=>{i&&(f(!m||m.type?new X(null,c,i):m),i.abort(),i=null)},g.cancelToken&&g.cancelToken.subscribe(u),g.signal&&(g.signal.aborted?u():g.signal.addEventListener("abort",u)));const p=cs(g.url);if(p&&O.protocols.indexOf(p)===-1){f(new y("Unsupported protocol "+p+":",y.ERR_BAD_REQUEST,c));return}i.send(at||null)})},gs=(c,h)=>{const{length:f}=c=c?c.filter(Boolean):[];if(h||f){let g=new AbortController,at;const E=function(u){if(!at){at=!0,x();const n=u instanceof Error?u:this.reason;g.abort(n instanceof y?n:new X(n instanceof Error?n.message:n))}};let S=h&&setTimeout(()=>{S=null,E(new y(`timeout ${h} of ms exceeded`,y.ETIMEDOUT))},h);const x=()=>{c&&(S&&clearTimeout(S),S=null,c.forEach(u=>{u.unsubscribe?u.unsubscribe(E):u.removeEventListener("abort",E)}),c=null)};c.forEach(u=>u.addEventListener("abort",E));const{signal:a}=g;return a.unsubscribe=()=>l.asap(x),a}},bs=function*(c,h){let f=c.byteLength;if(f<h){yield c;return}let g=0,at;for(;g<f;)at=g+h,yield c.slice(g,at),g=at},ys=async function*(c,h){for await(const f of ws(c))yield*bs(f,h)},ws=async function*(c){if(c[Symbol.asyncIterator]){yield*c;return}const h=c.getReader();try{for(;;){const{done:f,value:g}=await h.read();if(f)break;yield g}}finally{await h.cancel()}},tt=(c,h,f,g)=>{const at=ys(c,h);let E=0,S,x=a=>{S||(S=!0,g&&g(a))};return new ReadableStream({async pull(a){try{const{done:u,value:n}=await at.next();if(u){x(),a.close();return}let o=n.byteLength;if(f){let r=E+=o;f(r)}a.enqueue(new Uint8Array(n))}catch(u){throw x(u),u}},cancel(a){return x(a),at.return()}},{highWaterMark:2})},ye=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",vt=ye&&typeof ReadableStream=="function",_s=ye&&(typeof TextEncoder=="function"?(c=>h=>c.encode(h))(new TextEncoder):async c=>new Uint8Array(await new Response(c).arrayBuffer())),$t=(c,...h)=>{try{return!!c(...h)}catch{return!1}},Es=vt&&$t(()=>{let c=!1;const h=new Request(O.origin,{body:new ReadableStream,method:"POST",get duplex(){return c=!0,"half"}}).headers.has("Content-Type");return c&&!h}),nt=64*1024,Ie=vt&&$t(()=>l.isReadableStream(new Response("").body)),fe={stream:Ie&&(c=>c.body)};ye&&(c=>{["text","arrayBuffer","blob","formData","stream"].forEach(h=>{!fe[h]&&(fe[h]=l.isFunction(c[h])?f=>f[h]():(f,g)=>{throw new y(`Response type '${h}' is not supported`,y.ERR_NOT_SUPPORT,g)})})})(new Response);const Ss=async c=>{if(c==null)return 0;if(l.isBlob(c))return c.size;if(l.isSpecCompliantForm(c))return(await new Request(O.origin,{method:"POST",body:c}).arrayBuffer()).byteLength;if(l.isArrayBufferView(c)||l.isArrayBuffer(c))return c.byteLength;if(l.isURLSearchParams(c)&&(c=c+""),l.isString(c))return(await _s(c)).byteLength},xs=async(c,h)=>l.toFiniteNumber(c.getContentLength())??Ss(h),Rs=ye&&(async c=>{let{url:h,method:f,data:g,signal:at,cancelToken:E,timeout:S,onDownloadProgress:x,onUploadProgress:a,responseType:u,headers:n,withCredentials:o="same-origin",fetchOptions:r}=jt(c);u=u?(u+"").toLowerCase():"text";let t=gs([at,E&&E.toAbortSignal()],S),e;const i=t&&t.unsubscribe&&(()=>{t.unsubscribe()});let s;try{if(a&&Es&&f!=="get"&&f!=="head"&&(s=await xs(n,g))!==0){let C=new Request(h,{method:"POST",body:g,duplex:"half"}),b;if(l.isFormData(g)&&(b=C.headers.get("content-type"))&&n.setContentType(b),C.body){const[Me,Re]=Ze(s,de(Ye(a)));g=tt(C.body,nt,Me,Re)}}l.isString(o)||(o=o?"include":"omit");const p="credentials"in Request.prototype;e=new Request(h,{...r,signal:t,method:f.toUpperCase(),headers:n.normalize().toJSON(),body:g,duplex:"half",credentials:p?o:void 0});let m=await fetch(e,r);const _=Ie&&(u==="stream"||u==="response");if(Ie&&(x||_&&i)){const C={};["status","statusText","headers"].forEach(q=>{C[q]=m[q]});const b=l.toFiniteNumber(m.headers.get("content-length")),[Me,Re]=x&&Ze(b,de(Ye(x),!0))||[];m=new Response(tt(m.body,nt,Me,()=>{Re&&Re(),i&&i()}),C)}u=u||"text";let A=await fe[l.findKey(fe,u)||"text"](m,c);return!_&&i&&i(),await new Promise((C,b)=>{It(C,b,{data:A,headers:k.from(m.headers),status:m.status,statusText:m.statusText,config:c,request:e})})}catch(p){throw i&&i(),p&&p.name==="TypeError"&&/Load failed|fetch/i.test(p.message)?Object.assign(new y("Network Error",y.ERR_NETWORK,c,e),{cause:p.cause||p}):y.from(p,p&&p.code,c,e)}}),Le={http:Dn,xhr:ms,fetch:Rs};l.forEach(Le,(c,h)=>{if(c){try{Object.defineProperty(c,"name",{value:h})}catch{}Object.defineProperty(c,"adapterName",{value:h})}});const st=c=>`- ${c}`,As=c=>l.isFunction(c)||c===null||c===!1,Ft={getAdapter:c=>{c=l.isArray(c)?c:[c];const{length:h}=c;let f,g;const at={};for(let E=0;E<h;E++){f=c[E];let S;if(g=f,!As(f)&&(g=Le[(S=String(f)).toLowerCase()],g===void 0))throw new y(`Unknown adapter '${S}'`);if(g)break;at[S||"#"+E]=g}if(!g){const E=Object.entries(at).map(([x,a])=>`adapter ${x} `+(a===!1?"is not supported by the environment":"is not available in the build"));let S=h?E.length>1?`since :
|
1121
|
+
`+E.map(st).join(`
|
1122
|
+
`):" "+st(E[0]):"as no adapter specified";throw new y("There is no suitable adapter to dispatch the request "+S,"ERR_NOT_SUPPORT")}return g},adapters:Le};function Ce(c){if(c.cancelToken&&c.cancelToken.throwIfRequested(),c.signal&&c.signal.aborted)throw new X(null,c)}function rt(c){return Ce(c),c.headers=k.from(c.headers),c.data=Oe.call(c,c.transformRequest),["post","put","patch"].indexOf(c.method)!==-1&&c.headers.setContentType("application/x-www-form-urlencoded",!1),Ft.getAdapter(c.adapter||se.adapter)(c).then(function(h){return Ce(c),h.data=Oe.call(c,c.transformResponse,h),h.headers=k.from(h.headers),h},function(h){return Pt(h)||(Ce(c),h&&h.response&&(h.response.data=Oe.call(c,c.transformResponse,h.response),h.response.headers=k.from(h.response.headers))),Promise.reject(h)})}const Ut="1.11.0",we={};["object","boolean","number","function","string","symbol"].forEach((c,h)=>{we[c]=function(f){return typeof f===c||"a"+(h<1?"n ":" ")+c}});const it={};we.transitional=function(c,h,f){function g(at,E){return"[Axios v"+Ut+"] Transitional option '"+at+"'"+E+(f?". "+f:"")}return(at,E,S)=>{if(c===!1)throw new y(g(E," has been removed"+(h?" in "+h:"")),y.ERR_DEPRECATED);return h&&!it[E]&&(it[E]=!0,console.warn(g(E," has been deprecated since v"+h+" and will be removed in the near future"))),c?c(at,E,S):!0}},we.spelling=function(c){return(h,f)=>(console.warn(`${f} is likely a misspelling of ${c}`),!0)};function Os(c,h,f){if(typeof c!="object")throw new y("options must be an object",y.ERR_BAD_OPTION_VALUE);const g=Object.keys(c);let at=g.length;for(;at-- >0;){const E=g[at],S=h[E];if(S){const x=c[E],a=x===void 0||S(x,E,c);if(a!==!0)throw new y("option "+E+" must be "+a,y.ERR_BAD_OPTION_VALUE);continue}if(f!==!0)throw new y("Unknown option "+E,y.ERR_BAD_OPTION)}}const he={assertOptions:Os,validators:we},F=he.validators;let z=class{constructor(c){this.defaults=c||{},this.interceptors={request:new Ge,response:new Ge}}async request(c,h){try{return await this._request(c,h)}catch(f){if(f instanceof Error){let g={};Error.captureStackTrace?Error.captureStackTrace(g):g=new Error;const at=g.stack?g.stack.replace(/^.+\n/,""):"";try{f.stack?at&&!String(f.stack).endsWith(at.replace(/^.+\n.+\n/,""))&&(f.stack+=`
|
1123
|
+
`+at):f.stack=at}catch{}}throw f}}_request(c,h){typeof c=="string"?(h=h||{},h.url=c):h=c||{},h=V(this.defaults,h);const{transitional:f,paramsSerializer:g,headers:at}=h;f!==void 0&&he.assertOptions(f,{silentJSONParsing:F.transitional(F.boolean),forcedJSONParsing:F.transitional(F.boolean),clarifyTimeoutError:F.transitional(F.boolean)},!1),g!=null&&(l.isFunction(g)?h.paramsSerializer={serialize:g}:he.assertOptions(g,{encode:F.function,serialize:F.function},!0)),h.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?h.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:h.allowAbsoluteUrls=!0),he.assertOptions(h,{baseUrl:F.spelling("baseURL"),withXsrfToken:F.spelling("withXSRFToken")},!0),h.method=(h.method||this.defaults.method||"get").toLowerCase();let E=at&&l.merge(at.common,at[h.method]);at&&l.forEach(["delete","get","head","post","put","patch","common"],t=>{delete at[t]}),h.headers=k.concat(E,at);const S=[];let x=!0;this.interceptors.request.forEach(function(t){typeof t.runWhen=="function"&&t.runWhen(h)===!1||(x=x&&t.synchronous,S.unshift(t.fulfilled,t.rejected))});const a=[];this.interceptors.response.forEach(function(t){a.push(t.fulfilled,t.rejected)});let u,n=0,o;if(!x){const t=[rt.bind(this),void 0];for(t.unshift(...S),t.push(...a),o=t.length,u=Promise.resolve(h);n<o;)u=u.then(t[n++],t[n++]);return u}o=S.length;let r=h;for(n=0;n<o;){const t=S[n++],e=S[n++];try{r=t(r)}catch(i){e.call(this,i);break}}try{u=rt.call(this,r)}catch(t){return Promise.reject(t)}for(n=0,o=a.length;n<o;)u=u.then(a[n++],a[n++]);return u}getUri(c){c=V(this.defaults,c);const h=Lt(c.baseURL,c.url,c.allowAbsoluteUrls);return Tt(h,c.params,c.paramsSerializer)}};l.forEach(["delete","get","head","options"],function(c){z.prototype[c]=function(h,f){return this.request(V(f||{},{method:c,url:h,data:(f||{}).data}))}}),l.forEach(["post","put","patch"],function(c){function h(f){return function(g,at,E){return this.request(V(E||{},{method:c,headers:f?{"Content-Type":"multipart/form-data"}:{},url:g,data:at}))}}z.prototype[c]=h(),z.prototype[c+"Form"]=h(!0)});let Cs=class $i{constructor(h){if(typeof h!="function")throw new TypeError("executor must be a function.");let f;this.promise=new Promise(function(at){f=at});const g=this;this.promise.then(at=>{if(!g._listeners)return;let E=g._listeners.length;for(;E-- >0;)g._listeners[E](at);g._listeners=null}),this.promise.then=at=>{let E;const S=new Promise(x=>{g.subscribe(x),E=x}).then(at);return S.cancel=function(){g.unsubscribe(E)},S},h(function(at,E,S){g.reason||(g.reason=new X(at,E,S),f(g.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(h){if(this.reason){h(this.reason);return}this._listeners?this._listeners.push(h):this._listeners=[h]}unsubscribe(h){if(!this._listeners)return;const f=this._listeners.indexOf(h);f!==-1&&this._listeners.splice(f,1)}toAbortSignal(){const h=new AbortController,f=g=>{h.abort(g)};return this.subscribe(f),h.signal.unsubscribe=()=>this.unsubscribe(f),h.signal}static source(){let h;return{token:new $i(function(f){h=f}),cancel:h}}};function Ts(c){return function(h){return c.apply(null,h)}}function ks(c){return l.isObject(c)&&c.isAxiosError===!0}const je={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(je).forEach(([c,h])=>{je[h]=c});function qt(c){const h=new z(c),f=gt(z.prototype.request,h);return l.extend(f,z.prototype,h,{allOwnKeys:!0}),l.extend(f,h,null,{allOwnKeys:!0}),f.create=function(g){return qt(V(c,g))},f}const R=qt(se);R.Axios=z,R.CanceledError=X,R.CancelToken=Cs,R.isCancel=Pt,R.VERSION=Ut,R.toFormData=be,R.AxiosError=y,R.Cancel=R.CanceledError,R.all=function(c){return Promise.all(c)},R.spread=Ts,R.isAxiosError=ks,R.mergeConfig=V,R.AxiosHeaders=k,R.formToJSON=c=>Nt(l.isHTMLForm(c)?new FormData(c):c),R.getAdapter=Ft.getAdapter,R.HttpStatusCode=je,R.default=R;const{Axios:Vr,AxiosError:Jr,CanceledError:Wr,isCancel:Kr,CancelToken:Xr,VERSION:Gr,all:Qr,Cancel:Zr,isAxiosError:Yr,spread:ei,toFormData:ti,AxiosHeaders:ni,HttpStatusCode:si,formToJSON:ri,getAdapter:ii,mergeConfig:oi}=R,Be=R.create({baseURL:location.origin,timeout:6e4,params:{}});Be.interceptors.response.use(c=>c,c=>{var h,f,g,at,E,S,x,a,u,n,o;if(c.response){if(c.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(e){e&&OpenC3Auth.setTokens()}),c.response.config.headers["Ignore-Errors"]&&c.response.config.headers["Ignore-Errors"].includes(c.response.status.toString()))return Promise.reject(c);let r=`HTTP ${c.response.status} - `;(h=c.response)!=null&&h.statusText&&(r+=`${c.response.statusText} `),(g=(f=c.response)==null?void 0:f.config)!=null&&g.data&&(r+=`${c.response.config.data} `),(E=(at=c.response)==null?void 0:at.data)!=null&&E.message?r+=`${c.response.data.message}`:(x=(S=c.response)==null?void 0:S.data)!=null&&x.exception?r+=`${c.response.data.exception}`:(n=(u=(a=c.response)==null?void 0:a.data)==null?void 0:u.error)!=null&&n.message?(c.response.data.error.class&&(r+=`${c.response.data.error.class} `),r+=`${c.response.data.error.message}`):r+=`${(o=c.response)==null?void 0:o.data}`;const{$cosmosNotify:t}=window;throw t&&t.serious({title:"Network error",body:r}),c}else throw c});const oe=async function(c,h,{data:f,params:g={},headers:at,noAuth:E=!1,noScope:S=!1,onUploadProgress:x=!1}={}){if(!E){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}at.Authorization=localStorage.openc3Token}return at.manual=!0,!S&&!g.scope&&(g.scope=window.openc3Scope),Be({method:c,url:h,data:f,params:g,headers:at,onUploadProgress:x})},ve={Accept:"application/json"},ot={...ve,"Content-Type":"application/json"},ci={get:function(c,{params:h,headers:f=ve,noScope:g,noAuth:at,onUploadProgress:E}={}){return oe("get",c,{params:h,headers:f,noScope:g,noAuth:at,onUploadProgress:E})},put:function(c,{data:h,params:f,headers:g=ot,noScope:at,noAuth:E,onUploadProgress:S}={}){return oe("put",c,{data:h,params:f,headers:g,noScope:at,noAuth:E,onUploadProgress:S})},post:function(c,{data:h,params:f,headers:g=ot,noScope:at,noAuth:E,onUploadProgress:S}={}){return oe("post",c,{data:h,params:f,headers:g,noScope:at,noAuth:E,onUploadProgress:S})},delete:function(c,{params:h,headers:f=ve,noScope:g,noAuth:at,onUploadProgress:E}={}){return oe("delete",c,{params:h,headers:f,noScope:g,noAuth:at,onUploadProgress:E})}};let _e=()=>({emit(c,...h){for(let f=this.events[c]||[],g=0,at=f.length;g<at;g++)f[g](...h)},events:{},on(c,h){var f;return((f=this.events)[c]||(f[c]=[])).push(h),()=>{var g;this.events[c]=(g=this.events[c])==null?void 0:g.filter(at=>h!==at)}}});class re extends Error{constructor(h,f){h instanceof Error?(super(h.message),this.cause=h):super(h),this.reason=f,this.name="ReasonError"}}function Bt(c){return c?`{${Object.keys(c).sort().filter(h=>c[h]!==void 0).map(h=>{let f=JSON.stringify(c[h]);return`${JSON.stringify(h)}:${f}`}).join(",")}}`:""}class Is{constructor(h){this.channel=h,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",h=>{if(h.type==="info"){this._state||(this._state=this.stateFromInfo(h));return}this._state&&(h.type==="join"?this._state[h.id]=h.info:h.type==="leave"&&delete this._state[h.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(h=>h()),this.listeners.length=0}async join(h,f){if(!this._info)return this._info={id:h,info:f},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let h=await this.channel.perform("$presence:leave");return delete this._info,h}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let h=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(h),this._state}finally{delete this._promise}}stateFromInfo(h){return h.records.reduce((f,{id:g,info:at})=>(f[g]=at,f),{})}}const B=Symbol("state");class Mt{constructor(h={}){this.emitter=_e(),this.params=Object.freeze(h),this.presence=new Is(this),this.initialConnect=!0,this[B]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Bt({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[B]}attached(h){if(this.receiver){if(this.receiver!==h)throw Error("Already connected to a different receiver");return!1}return this.receiver=h,!0}connecting(){this[B]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[B]="connected";let h=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:h})):this.emit("connect",{reconnect:!0,restored:h})}restored(){if(this.state==="connected")throw Error("Already connected");this[B]="connected";let h=!0,f=!0;this.initialConnect=!1,this.emit("connect",{reconnect:f,restored:h})}disconnected(h){this.state==="disconnected"||this.state==="closed"||(this[B]="disconnected",this.presence.reset(),this.emit("disconnect",h))}closed(h){this.state!=="closed"&&(this[B]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",h))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(h,f){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,h,f)}async send(h){return this.perform(void 0,h)}async whisper(h){try{await this.perform("$whisper",h)}catch(f){let g=this.receiver?this.receiver.logger:null;g&&g.warn("whisper failed: ",f)}}receive(h,f){this.emit("message",h,f)}on(h,f){return this.emitter.on(h,f)}once(h,f){let g=this.emitter.on(h,(...at)=>{g(),f(...at)});return g}emit(h,...f){return this.emitter.emit(h,...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((h,f)=>{let g=[()=>delete this._pendingSubscribe];g.push(this.on("connect",()=>{g.forEach(at=>at()),h()})),g.push(this.on("close",at=>{g.forEach(E=>E()),f(at||new re("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class He extends Mt{constructor(h,f){super(f),this.channelId=h}set channelId(h){this._channelId=h}get channelId(){return this._channelId}}j(He,"identifier","__ghost__");const Bs="$pubsub";class $e extends Mt{async perform(h,f){if(h.startsWith("$"))return super.perform(h,f);throw Error("not implemented")}}j($e,"identifier",Bs);function Se(c){return ar.test(c)}const ar=/^-?[0-9]+$/;function Kt(c){return lr.test(c)}const lr=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Xt(c,h){const f=Number.parseFloat(c),g=String(f);if(c===g)return!0;const at=ht(c),E=ht(g);return!!(at===E||(h==null?void 0:h.approx)===!0&&!Se(c)&&E.length>=14&&at.startsWith(E.substring(0,14)))}let Z=function(c){return c.underflow="underflow",c.overflow="overflow",c.truncate_integer="truncate_integer",c.truncate_float="truncate_float",c}({});function ur(c){if(Xt(c,{approx:!1}))return;if(Se(c))return Z.truncate_integer;const h=Number.parseFloat(c);return Number.isFinite(h)?h===0?Z.underflow:Z.truncate_float:Z.overflow}function ht(c){const{start:h,end:f}=hr(c),g=c.substring(h,f),at=g.indexOf(".");return at===-1?g:g.substring(0,at)+g.substring(at+1)}function hr(c){let h=0;for(c[0]==="-"&&h++;c[h]==="0"||c[h]===".";)h++;let f=c.lastIndexOf("e");for(f===-1&&(f=c.lastIndexOf("E")),f===-1&&(f=c.length);(c[f-1]==="0"||c[f-1]===".")&&f>h;)f--;return{start:h,end:f}}class dr{constructor(h){if(j(this,"isLosslessNumber",!0),!Kt(h))throw new Error(`Invalid number (value: "${h}")`);this.value=h}valueOf(){const h=ur(this.value);if(h===void 0||h===Z.truncate_float)return Number.parseFloat(this.value);if(Se(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${h} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function fr(c){return c&&typeof c=="object"&&c.isLosslessNumber||!1}function pr(c){return new dr(c)}function mr(c,h){return ze({"":c},"",c,h)}function ze(c,h,f,g){return Array.isArray(f)?g.call(c,h,br(f,g)):f&&typeof f=="object"&&!fr(f)?g.call(c,h,gr(f,g)):g.call(c,h,f)}function gr(c,h){for(const f of Object.keys(c)){const g=ze(c,f,c[f],h);g!==void 0?c[f]=g:delete c[f]}return c}function br(c,h){for(let f=0;f<c.length;f++)c[f]=ze(c,String(f),c[f],h);return c}function yr(c,h){let f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:pr,g=0;const at=x();return e(at),s(),h?mr(at,h):at;function E(){if(c.charCodeAt(g)===Rr){g++,u();const w={};let v=!0;for(;g<c.length&&c.charCodeAt(g)!==ft;){v?v=!1:(r(),u());const L=g,lt=n();if(lt===void 0){_();return}u(),t();const ct=x();if(ct===void 0){q();return}Object.prototype.hasOwnProperty.call(w,lt)&&!Fe(ct,w[lt])&&A(lt,L+1),w[lt]=ct}return c.charCodeAt(g)!==ft&&C(),g++,w}}function S(){if(c.charCodeAt(g)===Ar){g++,u();const w=[];let v=!0;for(;g<c.length&&c.charCodeAt(g)!==pt;){v?v=!1:r();const L=x();i(L),w.push(L)}return c.charCodeAt(g)!==pt&&b(),g++,w}}function x(){u();const w=n()??o()??E()??S()??a("true",!0)??a("false",!1)??a("null",null);return u(),w}function a(w,v){if(c.slice(g,g+w.length)===w)return g+=w.length,v}function u(){for(;wr(c.charCodeAt(g));)g++}function n(){if(c.charCodeAt(g)===Te){g++;let w="";for(;g<c.length&&c.charCodeAt(g)!==Te;){if(c.charCodeAt(g)===xr){const v=c[g+1],L=Sr[v];L!==void 0?(w+=L,g++):v==="u"?ce(c.charCodeAt(g+2))&&ce(c.charCodeAt(g+3))&&ce(c.charCodeAt(g+4))&&ce(c.charCodeAt(g+5))?(w+=String.fromCharCode(Number.parseInt(c.slice(g+2,g+6),16)),g+=5):W(g):Re(g)}else Er(c.charCodeAt(g))?w+=c[g]:Me(c[g]);g++}return m(),g++,w}}function o(){const w=g;if(c.charCodeAt(g)===mt&&(g++,p(w)),c.charCodeAt(g)===Ve)g++;else if(_r(c.charCodeAt(g)))for(g++;ae(c.charCodeAt(g));)g++;if(c.charCodeAt(g)===Lr)for(g++,p(w);ae(c.charCodeAt(g));)g++;if(c.charCodeAt(g)===Ur||c.charCodeAt(g)===Fr)for(g++,(c.charCodeAt(g)===mt||c.charCodeAt(g)===Nr)&&g++,p(w);ae(c.charCodeAt(g));)g++;if(g>w)return f(c.slice(w,g))}function r(){if(c.charCodeAt(g)!==Ir)throw new SyntaxError(`Comma ',' expected after value ${D()}`);g++}function t(){if(c.charCodeAt(g)!==jr)throw new SyntaxError(`Colon ':' expected after property name ${D()}`);g++}function e(w){if(w===void 0)throw new SyntaxError(`JSON value expected ${D()}`)}function i(w){if(w===void 0)throw new SyntaxError(`Array item expected ${D()}`)}function s(){if(g<c.length)throw new SyntaxError(`Expected end of input ${D()}`)}function p(w){if(!ae(c.charCodeAt(g))){const v=c.slice(w,g);throw new SyntaxError(`Invalid number '${v}', expecting a digit ${D()}`)}}function m(){if(c.charCodeAt(g)!==Te)throw new SyntaxError(`End of string '"' expected ${D()}`)}function _(){throw new SyntaxError(`Quoted object key expected ${D()}`)}function A(w,v){throw new SyntaxError(`Duplicate key '${w}' encountered at position ${v}`)}function C(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${D()}`)}function b(){throw new SyntaxError(`Array item or end of array ']' expected ${D()}`)}function Me(w){throw new SyntaxError(`Invalid character '${w}' ${ut()}`)}function Re(w){const v=c.slice(w,w+2);throw new SyntaxError(`Invalid escape character '${v}' ${ut()}`)}function q(){throw new SyntaxError(`Object value expected after ':' ${ut()}`)}function W(w){const v=c.slice(w,w+6);throw new SyntaxError(`Invalid unicode character '${v}' ${ut()}`)}function ut(){return`at position ${g}`}function G(){return g<c.length?`but got '${c[g]}'`:"but reached end of input"}function D(){return`${G()} ${ut()}`}}function wr(c){return c===Or||c===Cr||c===Tr||c===kr}function ce(c){return c>=Ve&&c<=Je||c>=vr&&c<=Dr||c>=$r&&c<=qr}function ae(c){return c>=Ve&&c<=Je}function _r(c){return c>=Pr&&c<=Je}function Er(c){return c>=32&&c<=1114111}function Fe(c,h){return c===h?!0:Array.isArray(c)&&Array.isArray(h)?c.length===h.length&&c.every((f,g)=>Fe(f,h[g])):dt(c)&&dt(h)?[...new Set([...Object.keys(c),...Object.keys(h)])].every(f=>Fe(c[f],h[f])):!1}function dt(c){return typeof c=="object"&&c!==null}const Sr={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
1124
|
+
`,r:"\r",t:" "},xr=92,Rr=123,ft=125,Ar=91,pt=93,Or=32,Cr=10,Tr=9,kr=13,Te=34,Nr=43,mt=45,Ve=48,Pr=49,Je=57,Ir=44,Lr=46,jr=58,vr=65,$r=97,Fr=69,Ur=101,Dr=70,qr=102;function Gt(c,h,f,g){return at(c);function at(a,u){if(Array.isArray(g)){const n=g.find(o=>o.test(a));if(n){const o=n.stringify(a);if(typeof o!="string"||!Kt(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 a=="boolean"||typeof a=="number"||typeof a=="string"||a===null||a instanceof Date||a instanceof Boolean||a instanceof Number||a instanceof String)return JSON.stringify(a);if(a!=null&&a.isLosslessNumber||typeof a=="bigint")return a.toString();if(Array.isArray(a))return E(a);if(a&&typeof a=="object")return S(a)}function E(a,u){if(a.length===0)return"[]";let n="[";for(let o=0;o<a.length;o++){const r=a[o];typeof r<"u"&&typeof r!="function"?n+=at(r):n+="null",o<a.length-1&&(n+=",")}return n+="]",n}function S(a,u){if(typeof a.toJSON=="function")return Gt(a.toJSON(),h,f,void 0);const n=Array.isArray(h)?h.map(String):Object.keys(a);if(n.length===0)return"{}";let o=!0,r="{";for(const t of n){const e=a[t];if(x(t,e)){o?o=!1:r+=",";const i=JSON.stringify(t);r+=`${i}:`,r+=at(e)}}return r+="}",r}function x(a,u){return typeof u<"u"&&typeof u!="function"&&typeof u!="symbol"}}function Br(c){return Se(c)&&!Xt(c)?BigInt(c):parseFloat(c)}class di{constructor(){j(this,"id",1)}async exec(h,f,g={},at={},E=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return g.scope=window.openc3Scope,at.manual=!0,(await Be.post("/openc3-api/api",{jsonrpc:"2.0",method:h,params:f,id:this.id,keyword_params:g},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...at},timeout:E,transformRequest:[(S,x)=>Gt(S)],transformResponse:[S=>yr(S,void 0,Br)]})).data.result}catch(S){let x=new Error;throw S.response?(x.name=S.response.data.error.data.class,x.message=S.response.data.error.data.message,x.object=S.response.data.error):S.request?(x.name="Request error",x.message="Request error, no response received"):x=S,x}}decode_openc3_type(h){if(h!==null&&typeof h=="object"&&h.json_class=="Float"&&h.raw){if(h.raw=="NaN")return NaN;if(h.raw=="Infinity")return 1/0;if(h.raw=="-Infinity")return-1/0}return null}encode_openc3_type(h){return Number.isNaN(h)?{json_class:"Float",raw:"NaN"}:h==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:h==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(h=>{h&&(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(h){return this.exec("set_offline_access",[h])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(h,f){return this.exec("map_target_to_interface",[h,f])}connect_interface(h,...f){return f.length>0?this.exec("connect_interface",[h,...f]):this.exec("connect_interface",[h])}disconnect_interface(h){return this.exec("disconnect_interface",[h])}interface_cmd(h,f,...g){return this.exec("interface_cmd",[h,f,...g])}get_all_router_info(){return this.exec("get_all_router_info",[])}connect_router(h){return this.exec("connect_router",[h])}disconnect_router(h){return this.exec("disconnect_router",[h])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(h){return this.exec("get_tlm_cnts",[h])}get_item(h,f,g){return this.exec("get_item",[h,f,g])}get_param(h,f,g){return this.exec("get_param",[h,f,g])}get_parameter(h,f,g){return this.exec("get_param",[h,f,g])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(h){return this.exec("set_limits_set",[h])}get_target(h){return this.exec("get_target",[h])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(h,f){return this.exec("get_tlm",[h,f])}get_telemetry(h,f){return this.exec("get_tlm",[h,f])}get_all_tlm(h){return this.exec("get_all_tlm",[h])}get_all_telemetry(h){return this.exec("get_all_tlm",[h])}get_all_tlm_names(h,f=!1){return this.exec("get_all_tlm_names",[h],{hidden:f})}get_all_telemetry_names(h){return this.exec("get_all_tlm_names",[h])}get_all_tlm_item_names(h){return this.exec("get_all_tlm_item_names",[h])}async get_tlm_packet(h,f,g,at=30){const E=await this.exec("get_tlm_packet",[h,f],{type:g,stale_time:at});if(E!=null){let S=E.length,x=null;for(let a=0;a<S;a++)x=this.decode_openc3_type(E[a][1]),x!==null&&(E[a][1]=x)}return E}get_packet_derived_items(h,f){return this.exec("get_packet_derived_items",[h,f])}get_tlm_buffer(h,f){return this.exec("get_tlm_buffer",[h,f])}get_tlm_available(h){return this.exec("get_tlm_available",[h])}async get_tlm_values(h,f=30,g=null,at=null,E=null){let S={stale_time:f};g!==null&&(S.cache_timeout=g),at!==null&&(S.start_time=at.toISOString()),E!==null&&(S.end_time=E.toISOString());const x=await this.exec("get_tlm_values",[h],S,{},1e4);if(x&&x.length>0){let a=x[0].length,u=null;for(let n=0;n<a;n++)u=this.decode_openc3_type(x[0][n]),u!==null&&(x[0][n]=u)}return x}get_limits(h,f,g){return this.exec("get_limits",[h,f,g])}async tlm(h,f,g,at="CONVERTED"){let E=null;if(f===void 0)E=await this.exec("tlm",[h]);else if(g===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(f))E=await this.exec("tlm",[h],{type:f});else{let x=new Error;throw x.name="TypeError",x.message=`Invalid data type ${f}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,x}else E=await this.exec("tlm",[h,f,g],{type:at});let S=this.decode_openc3_type(E);return S!==null&&(E=S),E}async inject_tlm(h,f,g=null,at="CONVERTED"){await this.exec("inject_tlm",[h,f,g],{type:at})}set_tlm(h,f,g,at){return this.exec("set_tlm",[h,f,g],{type:at})}override_tlm(h,f,g,at){return this.exec("override_tlm",[h,f,g],{type:at})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(h,f,g,at){return this.exec("normalize_tlm",[h,f,g],{type:at})}get_all_cmds(h){return this.exec("get_all_cmds",[h])}get_all_commands(h){return this.exec("get_all_cmds",[h])}get_all_cmd_names(h,f=!1){return this.exec("get_all_cmd_names",[h],{hidden:f})}get_all_command_names(h){return this.exec("get_all_cmd_names",[h])}get_cmd(h,f){return this.exec("get_cmd",[h,f])}get_command(h,f){return this.exec("get_cmd",[h,f])}get_cmd_cnts(h){return this.exec("get_cmd_cnts",[h])}get_cmd_value(h,f,g,at="CONVERTED"){return this.exec("get_cmd_value",[h,f,g,at])}get_cmd_buffer(h,f){return this.exec("get_cmd_buffer",[h,f])}_cmd(h,f,g,at,E){let S=null;for(let x in at)Object.prototype.hasOwnProperty.call(at,x)&&(S=this.encode_openc3_type(at[x]),S!==null&&(at[x]=S));return this.exec(h,[f,g,at],{},E)}get_cmd_hazardous(h,f,g,at={}){return f===void 0?this.exec("get_cmd_hazardous",h,{},at):this._cmd("get_cmd_hazardous",h,f,g,at)}cmd(h,f,g,at={}){return f===void 0?this.exec("cmd",h,{},at):this._cmd("cmd",h,f,g,at)}cmd_no_range_check(h,f,g,at={}){return f===void 0?this.exec("cmd_no_range_check",h,{},at):this._cmd("cmd_no_range_check",h,f,g,at)}cmd_raw(h,f,g,at={}){return f===void 0?this.exec("cmd_raw",h,{},at):this._cmd("cmd_raw",h,f,g,at)}cmd_raw_no_range_check(h,f,g,at={}){return f===void 0?this.exec("cmd_raw_no_range_check",h,{},at):this._cmd("cmd_raw_no_range_check",h,f,g,at)}cmd_no_hazardous_check(h,f,g,at={}){return f===void 0?this.exec("cmd_no_hazardous_check",h,{},at):this._cmd("cmd_no_hazardous_check",h,f,g,at)}cmd_no_checks(h,f,g,at={}){return f===void 0?this.exec("cmd_no_checks",h,{},at):this._cmd("cmd_no_checks",h,f,g,at)}cmd_raw_no_hazardous_check(h,f,g,at={}){return f===void 0?this.exec("cmd_raw_no_hazardous_check",h,{},at):this._cmd("cmd_raw_no_hazardous_check",h,f,g,at)}cmd_raw_no_checks(h,f,g,at={}){return f===void 0?this.exec("cmd_raw_no_checks",h,{},at):this._cmd("cmd_raw_no_checks",h,f,g,at)}build_cmd(h,f,g){return f===void 0?this.exec("build_cmd",h):this._cmd("build_cmd",h,f,g)}build_command(h,f,g){return f===void 0?this.exec("build_cmd",h):this._cmd("build_cmd",h,f,g)}get_interface_names(){return this.exec("get_interface_names",[])}send_raw(h,f){return this.exec("send_raw",[h,f])}list_configs(h){return this.exec("list_configs",[h])}load_config(h,f){return this.exec("load_config",[h,f])}save_config(h,f,g){return this.exec("save_config",[h,f,g])}delete_config(h,f){return this.exec("delete_config",[h,f])}enable_limits(h,f,g){return this.exec("enable_limits",[h,f,g])}disable_limits(h,f,g){return this.exec("disable_limits",[h,f,g])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(h){return this.exec("get_overall_limits_state",[h])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(h,f){return this.exec("get_setting",[h],f)}get_settings(h,f){return this.exec("get_settings",h,f)}set_setting(h,f){return this.exec("set_setting",[h,f])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(h,f){return this.exec("set_setting",[h,f])}get_metrics(){return this.exec("get_metrics",[])}async hashString(h){if(window.isSecureContext){const f=new TextEncoder().encode(h),g=await crypto.subtle.digest("SHA-256",f),at=new Uint8Array(g);return Array.from(at).map(E=>E.toString(16).padStart(2,"0")).join("")}}}const Utilities={methods:{isFloat(c){return!!(/^\s*[-+]?\d*\.\d+\s*$/.test(c)||/^\s*[-+]?(\d+((\.\d+)?)|(\.\d+))[eE][-+]?\d+\s*$/.test(c))},isInt(c){return!!(/^\s*[-+]?\d+\s*$/.test(c)||/^\s*0[xX][\dabcdefABCDEF]+\s*$/.test(c))},isArray(c){return!!/^\s*\[.*\]\s*$/.test(c)},removeQuotes(c){if(c.length<2)return c;let h=c.charAt(0);if(h!=='"'&&h!=="'")return c;let f=c.charAt(c.length-1);return h!==f?c:c.slice(1,-1)},convertToString(c){let h=0,f="";if(Object.prototype.toString.call(c).slice(8,-1)==="Array"){let g=c.length;for(f="[ ",h=0;h<g;h++)Object.prototype.toString.call(c[h]).slice(8,-1)==="String"?f+='"'+c[h]+'"':f+=c[h],h!==g-1&&(f+=", ");f+=" ]"}else if(Object.prototype.toString.call(c).slice(8,-1)==="Object")if(c.json_class==="String"&&c.raw)for(f="0x",h=0;h<c.raw.length;h++){let g=c.raw[h].toString(16).toUpperCase();g.length<2&&(g="0"+g),f+=g}else c.json_class==="Float"&&c.raw&&(f=c.raw);else f=String(c);return f}}},_sfc_main$1={mixins:[Utilities],props:{modelValue:{type:[String,Number],default:void 0},states:{type:Object,default:()=>null},statesInHex:{type:Boolean,default:!1}},computed:{textFieldValue(){return this.convertToString(this.modelValue)},stateValue(){return this.statesInHex?"0x"+this.modelValue.toString(16):this.modelValue},selectValue(){return this.modelValue===""?null:this.modelValue},stateOptions(){return this.states?Object.keys(this.states).map(c=>({label:c,...this.states[c]})):null},hazardous(){var c,h;return((h=(c=Object.entries(this.states).find(([f,g])=>g.value===this.modelValue))==null?void 0:c.at(1))==null?void 0:h.hazardous)!==void 0},stateClass(){return this.hazardous?"hazardous mr-4":"mr-4"}},methods:{handleChange(c){this.$emit("update:modelValue",c)}}},_hoisted_1$1={key:1,class:"d-flex align-center"};function _sfc_render$1(c,h,f,g,at,E){const S=resolveComponent("v-text-field"),x=resolveComponent("v-select");return openBlock(),createElementBlock("div",null,[f.states?(openBlock(),createElementBlock("div",_hoisted_1$1,[createVNode(x,{items:E.stateOptions,"model-value":E.selectValue,"onUpdate:modelValue":E.handleChange,"item-title":"label",class:normalizeClass(E.stateClass),"hide-details":"",density:"compact",variant:"outlined",placeholder:"Select...","min-width":"120px","data-test":"cmd-param-select"},null,8,["items","model-value","onUpdate:modelValue","class"]),createVNode(S,{"model-value":E.stateValue,disabled:"","hide-details":"",density:"compact",variant:"outlined","min-width":"60px","data-test":"cmd-param-value"},null,8,["model-value"])])):(openBlock(),createBlock(S,{key:0,"model-value":E.textFieldValue,"onUpdate:modelValue":E.handleChange,"hide-details":"",density:"compact",variant:"filled","data-test":"cmd-param-value"},null,8,["model-value","onUpdate:modelValue"]))])}const CommandParameterEditor=_export_sfc(_sfc_main$1,[["render",_sfc_render$1],["__scopeId","data-v-b19a55d5"]]),_sfc_main={components:{DetailsDialog:P,CriticalCmdDialog:N,TargetPacketItemChooser:re$1,CommandParameterEditor,TopBar:Z$1,Openc3Screen:Ee},mixins:[Utilities],data(){return{title:"Command Sender",search:"",headers:[{title:"Name",value:"parameter_name"},{title:"Value or State",value:"val"},{title:"Units",value:"units"},{title:"Range",value:"range"},{title:"Description",value:"description"}],editor:null,targetName:"",commandName:"",commandDescription:"",paramList:"",lastTargetName:"",lastCommandName:"",lastParamList:"",ignoreRangeChecks:!1,statesInHex:!1,showIgnoredParams:!1,cmdRaw:!1,ignoredParams:[],rows:[],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,viewDetails:!1,contextMenuShown:!1,parameterName:"",reservedItemNames:[],x:0,y:0,contextMenuOptions:[{title:"Details",action:()=>{this.contextMenuShown=!1,this.viewDetails=!0}}],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.updateCmdParams()}},{label:"Disable Parameter Conversions",checkbox:!0,checked:this.cmdRaw,command:()=>{this.cmdRaw=!this.cmdRaw.checked}}]}]}},created(){ci.get("/openc3-api/autocomplete/reserved-item-names").then(c=>{this.reservedItemNames=c.data}),this.api=new di,this.$route.params.target&&this.$route.params.packet&&this.commandChanged({targetName:this.$route.params.target.toUpperCase(),packetName:this.$route.params.packet.toUpperCase()}),ci.get("/openc3-api/autocomplete/keywords/screen").then(c=>{this.keywords=c.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",c=>{if(c.key==="Enter"){c.preventDefault();let h=this.editor.session.getLine(this.editor.getCursorPosition().row);if(h==="")return;let f=h.indexOf('"'),g=h.lastIndexOf('"');h=h.substr(f+1,g-f-1),this.sendCmd(h)}})},beforeUnmount(){this.editor.destroy(),this.editor.container.remove()},methods:{showContextMenu(c,h){c.preventDefault(),this.parameterName=h.item.parameter_name,this.contextMenuShown=!1,this.x=c.clientX,this.y=c.clientY,this.$nextTick(()=>{this.contextMenuShown=!0})},convertToValue(param){if(param.val!==void 0&¶m.states&&!this.cmdRaw)return Object.keys(param.states).find(c=>param.states[c].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 c=upcaseStr.slice(2);c.length%2!==0&&(c="0"+c);let h={json_class:"String",raw:[]};for(let f=0;f<c.length;f+=2){let g=c.charAt(f)+c.charAt(f+1);h.raw.push(parseInt(g,16))}return h}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(c){(this.targetName!==c.targetName||this.commandName!==c.packetName)&&(this.targetName=c.targetName,this.commandName=c.packetName,this.sendDisabled===!1&&this.updateCmdParams(),this.targetName&&this.commandName?this.$router.replace({name:"CommandSender",params:{target:this.targetName,packet:this.commandName}}).catch(h=>{}):this.$router.replace({name:"CommandSender"}).catch(h=>{}))},updateCmdParams(){this.sendDisabled=!0,this.ignoredParams=[],this.rows=[],this.targetName&&this.commandName?this.api.get_target(this.targetName).then(c=>(this.ignoredParams=c.ignored_parameters,this.api.get_cmd(this.targetName,this.commandName)),c=>{this.displayError("getting ignored parameters",c),this.sendDisabled=!1}).then(c=>{if(c.items.forEach(h=>{if(!this.reservedItemNames.includes(h.name)&&(!this.ignoredParams.includes(h.name)||this.showIgnoredParams)){let f=h.default;!h.states&&h.data_type==="STRING"&&typeof h.default=="string"&&(f=`'${f}'`),h.required&&(f=""),h.format_string&&(f=sprintf(h.format_string,h.default));let g="N/A";h.minimum!=null&&h.maximum!=null&&(h.data_type==="FLOAT"&&(h.minimum<-1e6&&Number.isSafeInteger(h.minimum)&&(h.minimum=h.minimum.toExponential(3)),h.maximum>1e6&&Number.isSafeInteger(h.maximum)&&(h.maximum=h.maximum.toExponential(3))),g=`${h.minimum}..${h.maximum}`),this.rows.push({parameter_name:h.name,val:f,states:h.states,description:h.description,range:g,units:h.units,type:h.data_type})}}),c.screen)this.loadScreen(c.screen[0],c.screen[1]).then(h=>{this.screenTarget=c.screen[0],this.screenName=c.screen[1],this.screenDefinition=h.data,this.screenCount+=1});else{if(c.related_items){this.screenTarget="LOCAL",this.screenName="CMDSENDER";let h=`SCREEN AUTO AUTO 1.0
|
1125
|
+
`;for(const f of c.related_items)h+=`LABELVALUE '${f[0]}' '${f[1]}' '${f[2]}' WITH_UNITS 20
|
1126
|
+
`;this.screenDefinition=h}else this.screenTarget=null,this.screenName=null,this.screenDefinition=null;this.screenCount+=1}this.commandDescription=c.description,this.sendDisabled=!1,this.status=""},c=>{this.displayError("getting command parameters",c),this.sendDisabled=!1}):(this.sendDisabled=!1,this.status="")},createParamList(){let c={};for(const h of this.rows)c[h.parameter_name]=this.convertToValue(h);return c},buildCmd(){this.sendCmd(this.targetName,this.commandName,this.createParamList())},sendCmd(c,h,f){this.lastTargetName=c,this.lastCommandName=h,this.lastParamList=f,this.sendDisabled=!0;let g=!1,at="";this.api.get_cmd_hazardous(c,h,f).then(E=>{if(g=E,g)h===void 0?this.hazardousCommand=c.split(" ").slice(0,2).join(" "):this.hazardousCommand=`${c} ${h}`,this.displaySendHazardous=!0;else{let S;this.cmdRaw?this.ignoreRangeChecks?(at="cmd_raw_no_range_check",S=this.api.cmd_raw_no_range_check(c,h,f,{"Ignore-Errors":"428"})):(at="cmd_raw",S=this.api.cmd_raw(c,h,f,{"Ignore-Errors":"428 500"})):this.ignoreRangeChecks?(at="cmd_no_range_check",S=this.api.cmd_no_range_check(c,h,f,{"Ignore-Errors":"428"})):(at="cmd",S=this.api.cmd(c,h,f,{"Ignore-Errors":"428 500"})),S.then(x=>{this.processCmdResponse(!0,c,h,at,x)},x=>{this.processCmdResponse(!1,c,h,at,x)})}},E=>{this.processCmdResponse(!1,c,h,at,E)})},sendHazardousCmd(){this.displaySendHazardous=!1;let c="",h="";this.cmdRaw?this.ignoreRangeChecks?(h="cmd_raw_no_range_check",c=this.api.cmd_raw_no_checks(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428"})):(h="cmd_raw",c=this.api.cmd_raw_no_hazardous_check(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428 500"})):this.ignoreRangeChecks?(h="cmd_no_range_check",c=this.api.cmd_no_checks(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428"})):(h="cmd",c=this.api.cmd_no_hazardous_check(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428 500"})),c.then(f=>{this.processCmdResponse(!0,this.lastTargetName,this.lastCommandName,h,f)},f=>{this.processCmdResponse(!1,this.lastTargetName,this.lastCommandName,h,f)})},cancelHazardousCmd(){this.displaySendHazardous=!1,this.status="Hazardous command not sent",this.sendDisabled=!1},processCmdResponse(c,h,f,g,at){f===void 0&&([h,f]=h.split(" ").slice(0,2));let E="";if(c){E=`${g}("${at.target_name} ${at.cmd_name}`;let S=Object.keys(at.cmd_params);if(S.length>0){E+=" with ";for(let x=0;x<S.length;x++){let a=S[x],u="";at.obfuscated_items.includes(a)?u="*****":u=this.convertToString(at.cmd_params[a]),typeof at.cmd_params[a]=="string"&&u.charAt(0)!=="'"&&u.charAt(0)!=='"'&&(u=`'${u}'`),E+=a+" "+u,x<S.length-1&&(E+=", ")}}if(E+='")',!this.history.includes(E)){let x=E;this.history.length!==0&&(x+=`
|
1127
|
+
${this.history}`),this.editor.setValue(x),this.editor.moveCursorTo(0,0)}if(E+=" sent.",this.status.includes(E)){let x=this.status.split("sent.");if(x[1].includes("(")){let a=parseInt(x[1].substr(2,x[1].indexOf(")")-2));E=x[0]+"sent. ("+(a+1)+")"}else E+=" (2)"}this.status=E}else{let S="sending "+h+" "+f;this.displayError(S,at,!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(c,h,f=!1){this.status=`Error ${c} due to ${h.name}`,h.message&&h.message!==""&&(this.status+=": ",this.status+=h.message),this.status.includes("CriticalCmdError")&&(this.status="Critical Command Queued For Approval"),f&&(h.message.includes("CriticalCmdError")?(this.criticalCmdUuid=h.object.data.instance_variables["@uuid"],this.criticalCmdString=h.object.data.instance_variables["@command"].cmd_string,this.criticalCmdUser=h.object.data.instance_variables["@command"].username,this.displayCriticalCmd=!0):this.displayErrorDialog=!0)},loadScreen(c,h){return ci.get("/openc3-api/screen/"+c+"/"+h,{headers:{Accept:"text/plain"}})}}},_hoisted_1={style:{padding:"10px"}},_hoisted_2={class:"pa-3"},_hoisted_3={ref:"editor",class:"editor","data-test":"sender-history"},_hoisted_4={class:"mx-1"},_hoisted_5=["textContent"],_hoisted_6={class:"openc3-yellow"},_hoisted_7={class:"mx-1"};function _sfc_render(c,h,f,g,at,E){const S=resolveComponent("top-bar"),x=resolveComponent("target-packet-item-chooser"),a=resolveComponent("v-spacer"),u=resolveComponent("v-text-field"),n=resolveComponent("v-card-title"),o=resolveComponent("command-parameter-editor"),r=resolveComponent("v-data-table"),t=resolveComponent("v-card"),e=resolveComponent("v-col"),i=resolveComponent("v-btn"),s=resolveComponent("v-tooltip"),p=resolveComponent("v-row"),m=resolveComponent("v-card-subtitle"),_=resolveComponent("openc3-screen"),A=resolveComponent("v-list-item-title"),C=resolveComponent("v-list-item"),b=resolveComponent("v-list"),Me=resolveComponent("v-menu"),Re=resolveComponent("details-dialog"),q=resolveComponent("critical-cmd-dialog"),W=resolveComponent("v-toolbar"),ut=resolveComponent("v-card-text"),G=resolveComponent("v-dialog"),D=resolveComponent("v-card-actions"),w=resolveComponent("v-select");return openBlock(),createElementBlock("div",null,[createVNode(S,{menus:E.menus,title:at.title},null,8,["menus","title"]),createVNode(t,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_1,[createVNode(x,{"initial-target-name":c.$route.params.target,"initial-packet-name":c.$route.params.packet,disabled:at.sendDisabled||at.commandName==null,"button-text":"Send",mode:"cmd",onOnSet:h[0]||(h[0]=v=>E.commandChanged(v)),onAddItem:h[1]||(h[1]=v=>E.buildCmd(v))},null,8,["initial-target-name","initial-packet-name","disabled"])]),at.rows.length!==0?(openBlock(),createBlock(t,{key:0},{default:withCtx(()=>[createVNode(n,{class:"d-flex align-center justify-content-space-between"},{default:withCtx(()=>[h[12]||(h[12]=createTextVNode(" Parameters ",-1)),createVNode(a),createVNode(u,{modelValue:at.search,"onUpdate:modelValue":h[2]||(h[2]=v=>at.search=v),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search"},null,8,["modelValue"])]),_:1,__:[12]}),createVNode(r,{headers:at.headers,items:at.rows,search:at.search,"items-per-page":-1,"hide-default-footer":"","multi-sort":"",density:"compact","onContextmenu:row":E.showContextMenu},{"item.val":withCtx(({item:v})=>[createVNode(o,{modelValue:v.val,"onUpdate:modelValue":L=>v.val=L,states:v.states,"states-in-hex":at.statesInHex},null,8,["modelValue","onUpdate:modelValue","states","states-in-hex"])]),_:1},8,["headers","items","search","onContextmenu:row"])]),_:1})):createCommentVNode("",!0),createElementVNode("div",_hoisted_2,"Status: "+toDisplayString(at.status),1)]),_:1}),h[26]||(h[26]=createElementVNode("div",{style:{height:"15px"}},null,-1)),createVNode(p,{"no-gutters":""},{default:withCtx(()=>[createVNode(e,{class:"pr-4"},{default:withCtx(()=>[createVNode(t,{class:"pb-2"},{default:withCtx(()=>[createVNode(m,null,{default:withCtx(()=>[createVNode(p,null,{default:withCtx(()=>[createVNode(e,{class:"pt-6"},{default:withCtx(()=>h[13]||(h[13]=[createTextVNode(" Editable Command History: (Pressing Enter on the line re-executes the command) ",-1)])),_:1,__:[13]}),createVNode(e,null,{default:withCtx(()=>[createVNode(s,{"open-delay":600,location:"top"},{activator:withCtx(({props:v})=>[createElementVNode("div",mergeProps(v,{class:"float-right"}),[createVNode(i,{icon:"mdi-delete-sweep",variant:"text","data-test":"clear-history",onClick:E.clearHistory},null,8,["onClick"])],16)]),default:withCtx(()=>[h[14]||(h[14]=createElementVNode("span",null," Clear History ",-1))]),_:1,__:[14]})]),_:1})]),_:1})]),_:1}),createVNode(p,{"no-gutters":"",class:"mt-2 mb-2"},{default:withCtx(()=>[createVNode(e,null,{default:withCtx(()=>[createElementVNode("pre",_hoisted_3,null,512)]),_:1})]),_:1})]),_:1})]),_:1}),at.screenDefinition?(openBlock(),createBlock(e,{key:0,md:"auto"},{default:withCtx(()=>[createVNode(_,{target:at.screenTarget,screen:at.screenName,definition:at.screenDefinition,keywords:at.keywords,count:at.screenCount,"show-close":!1},null,8,["target","screen","definition","keywords","count"])]),_:1})):createCommentVNode("",!0)]),_:1}),h[27]||(h[27]=createElementVNode("div",{style:{height:"15px"}},null,-1)),createVNode(Me,{modelValue:at.contextMenuShown,"onUpdate:modelValue":h[3]||(h[3]=v=>at.contextMenuShown=v),target:[at.x,at.y]},{default:withCtx(()=>[createVNode(b,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(at.contextMenuOptions,(v,L)=>(openBlock(),createBlock(C,{key:L,onClick:withModifiers(v.action,["stop"])},{default:withCtx(()=>[createVNode(A,null,{default:withCtx(()=>[createTextVNode(toDisplayString(v.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),createVNode(Re,{modelValue:at.viewDetails,"onUpdate:modelValue":h[4]||(h[4]=v=>at.viewDetails=v),"target-name":at.targetName,"packet-name":at.commandName,"item-name":at.parameterName,type:"cmd"},null,8,["modelValue","target-name","packet-name","item-name"]),createVNode(q,{modelValue:at.displayCriticalCmd,"onUpdate:modelValue":h[5]||(h[5]=v=>at.displayCriticalCmd=v),uuid:at.criticalCmdUuid,"cmd-string":at.criticalCmdString,"cmd-user":at.criticalCmdUser},null,8,["modelValue","uuid","cmd-string","cmd-user"]),createVNode(G,{modelValue:at.displayErrorDialog,"onUpdate:modelValue":h[7]||(h[7]=v=>at.displayErrorDialog=v),"max-width":"600"},{default:withCtx(()=>[createVNode(t,null,{default:withCtx(()=>[createVNode(W,{height:"24"},{default:withCtx(()=>[createVNode(a),h[15]||(h[15]=createElementVNode("span",null," Error ",-1)),createVNode(a)]),_:1,__:[15]}),createVNode(ut,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_4,[createVNode(p,{class:"my-2"},{default:withCtx(()=>[createVNode(ut,null,{default:withCtx(()=>[createElementVNode("span",{textContent:toDisplayString(at.status)},null,8,_hoisted_5)]),_:1})]),_:1}),createVNode(p,null,{default:withCtx(()=>[createVNode(a),createVNode(i,{color:"primary","data-test":"error-dialog-ok",onClick:h[6]||(h[6]=v=>at.displayErrorDialog=!1)},{default:withCtx(()=>h[16]||(h[16]=[createTextVNode(" Ok ",-1)])),_:1,__:[16]})]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"]),createVNode(G,{modelValue:at.displaySendHazardous,"onUpdate:modelValue":h[8]||(h[8]=v=>at.displaySendHazardous=v),"max-width":"600"},{default:withCtx(()=>[createVNode(t,null,{default:withCtx(()=>[createVNode(W,{height:"24"},{default:withCtx(()=>[createVNode(a),h[17]||(h[17]=createElementVNode("span",null," Hazardous Warning ",-1)),createVNode(a)]),_:1,__:[17]}),createVNode(ut,{class:"mt-6"},{default:withCtx(()=>[createTextVNode(" Warning: Command "+toDisplayString(at.hazardousCommand)+" is Hazardous. Send? ",1),h[18]||(h[18]=createElementVNode("br",null,null,-1)),createElementVNode("span",_hoisted_6," Description: "+toDisplayString(at.commandDescription),1)]),_:1,__:[18]}),createVNode(D,{class:"px-2"},{default:withCtx(()=>[createVNode(a),createVNode(i,{variant:"outlined",onClick:E.cancelHazardousCmd},{default:withCtx(()=>h[19]||(h[19]=[createTextVNode(" Cancel ",-1)])),_:1,__:[19]},8,["onClick"]),createVNode(i,{variant:"flat",onClick:E.sendHazardousCmd},{default:withCtx(()=>h[20]||(h[20]=[createTextVNode(" Send ",-1)])),_:1,__:[20]},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),createVNode(G,{modelValue:at.displaySendRaw,"onUpdate:modelValue":h[11]||(h[11]=v=>at.displaySendRaw=v),"max-width":"600"},{default:withCtx(()=>[createVNode(t,null,{default:withCtx(()=>[createVNode(W,{height:"24"},{default:withCtx(()=>[createVNode(a),h[21]||(h[21]=createElementVNode("span",null," Send Raw ",-1)),createVNode(a)]),_:1,__:[21]}),createVNode(ut,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_7,[createVNode(p,{class:"my-2"},{default:withCtx(()=>[createVNode(e,null,{default:withCtx(()=>h[22]||(h[22]=[createTextVNode("Interface:",-1)])),_:1,__:[22]}),createVNode(e,null,{default:withCtx(()=>[createVNode(w,{modelValue:at.selectedInterface,"onUpdate:modelValue":h[9]||(h[9]=v=>at.selectedInterface=v),variant:"solo","hide-details":"",density:"compact",items:at.interfaces,"item-title":"label","item-value":"value"},null,8,["modelValue","items"])]),_:1})]),_:1}),createVNode(p,{"no-gutters":""},{default:withCtx(()=>[createVNode(e,null,{default:withCtx(()=>h[23]||(h[23]=[createTextVNode("Filename:",-1)])),_:1,__:[23]}),createVNode(e,null,{default:withCtx(()=>[createElementVNode("input",{type:"file",onChange:h[10]||(h[10]=v=>c.selectRawCmdFile(v))},null,32)]),_:1})]),_:1}),createVNode(p,null,{default:withCtx(()=>[createVNode(a),createVNode(i,{variant:"outlined","data-test":"raw-cancel",onClick:c.cancelRawCmd},{default:withCtx(()=>h[24]||(h[24]=[createTextVNode(" Cancel ",-1)])),_:1,__:[24]},8,["onClick"]),createVNode(i,{class:"bg-primary","data-test":"raw-ok",onClick:c.sendRawCmd},{default:withCtx(()=>h[25]||(h[25]=[createTextVNode(" Ok ",-1)])),_:1,__:[25]},8,["onClick"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"])])}const CommandSender=exports("default",_export_sfc(_sfc_main,[["render",_sfc_render],["__scopeId","data-v-07bbe0f0"]]))}}});
|