openc3-cosmos-tool-cmdsender 6.3.0 → 6.4.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-BbsN1dzF-594144199eb2d95551ed.js → ArrayWidget-DAZApfkV-783f55807ac5527fb87f.js} +2 -2
- data/tools/cmdsender/{ArrayplotWidget-CCKEyYIx-9499ee0a0346cbe7cb1d.js → ArrayplotWidget-BfsxDplv-790f7bd5f20bf0e9dac9.js} +1 -1
- data/tools/cmdsender/{BarColumn-C6p07yWK-4468c21718ece53c5e65.js → BarColumn-q0nAsvrd-f997cafbe8de75a60a16.js} +1 -1
- data/tools/cmdsender/BlockWidget-SDCUWcMQ-cd6676cb4e770e128374.js +2 -0
- data/tools/cmdsender/{ButtonWidget-CtfJzCBR-ad127f6b877657c1f822.js → ButtonWidget-BVMjwC19-ea064d3318ced55312a2.js} +2 -2
- data/tools/cmdsender/CanvasWidget-bVkufjRQ-cdb8d66c2dd43421b509.js +1 -0
- data/tools/cmdsender/CanvasdotWidget-DpniFfca-8442a48e0e88489a4d6f.js +1 -0
- data/tools/cmdsender/{CanvasimageWidget-BPlj5QYK-f70317e097c787f5f886.js → CanvasimageWidget-DHOSz-dJ-6fb8cab74942cc5a975d.js} +1 -1
- data/tools/cmdsender/{CanvasimagevalueWidget-DVFGLt8f-e2b3eb4b4fbb08481683.js → CanvasimagevalueWidget-zrURWWUL-a43f731c8c70e3d8d217.js} +1 -1
- data/tools/cmdsender/CanvaslabelWidget-D-XAMifp-2410c210f978b6033cd5.js +1 -0
- data/tools/cmdsender/{CanvaslabelvalueWidget-B7yIDmsn-b2ba8d17526f8dc5ccd2.js → CanvaslabelvalueWidget-BsIdBtEb-257b7f47d541e05bb406.js} +1 -1
- data/tools/cmdsender/{CanvaslineWidget-BICdxX0Q-41bf3fef8c9f49ca865b.js → CanvaslineWidget-CA2aPGRg-58382772561100d17df6.js} +1 -1
- data/tools/cmdsender/{CanvaslinevalueWidget-Cq-Ddh0P-49b015962846b88154a6.js → CanvaslinevalueWidget-J7epKRlo-a9665407b111305cc629.js} +1 -1
- data/tools/cmdsender/CheckbuttonWidget-ByH-PDRG-61a209d5c57919598957.js +1 -0
- data/tools/cmdsender/{ComboboxWidget-CtyKbEWb-8cee3038b482aa26b002.js → ComboboxWidget-Bdm_fMzW-64dbfe09dd6356946dc9.js} +1 -1
- data/tools/cmdsender/CommandSender-46cc7fb6179998a95626.js +1125 -0
- data/tools/cmdsender/{CriticalCmdDialog-DPIZOBeP-e9cef69f6baacd12a1b6.js → CriticalCmdDialog-Bcq8PGag-8af4b4c2a12813cf256a.js} +1 -1
- data/tools/cmdsender/DateWidget-BaQqthC7-26312570587da0dfa9e3.js +1 -0
- data/tools/cmdsender/{DetailsDialog-DmEC5BTs-351fb65c89f4820397e7.js → DetailsDialog-C5jf8o0K-ca6423787f25a5704743.js} +1 -1
- data/tools/cmdsender/{DynamicWidget-CfMtj7H8-c47e8d5ced9a7c47fa39.js → DynamicWidget-CfMtj7H8-85404dcfa2c23a2859a1.js} +1 -1
- data/tools/cmdsender/FormatvalueWidget--H5B9i_Y-e1927c8538d8b8cd160e.js +1 -0
- data/tools/cmdsender/Graph-M382Zo8o-350662c31f735f1f5bf9.js +1 -0
- data/tools/cmdsender/{GraphWidget-DurWDmpg-7b61f52f7f0dbcb4da37.js → GraphWidget-_YOGDD1U-ef7863a321b7efdc30c4.js} +1 -1
- data/tools/cmdsender/{HorizontalWidget-Cd_wl1b3-3dd6d4ae8647f7d42b80.js → HorizontalWidget-D_gzrOWs-7982ce684d3333fff3f9.js} +1 -1
- data/tools/cmdsender/HorizontalboxWidget-GDcjO-UB-9f5f912784a1a1e4a1aa.js +1 -0
- data/tools/cmdsender/HorizontallineWidget-DZvOYFxf-2a9e214240fac27bcde5.js +1 -0
- data/tools/cmdsender/{IframeWidget-BPerHCCa-265bd8d7acc72d2c0d70.js → IframeWidget-CuUav9b3-4a63a027fba0ecb63a8c.js} +1 -1
- data/tools/cmdsender/{ImageLoader-4N-7Gj61-7e6eec121d686572959a.js → ImageLoader-3KLKJ5mV-10aec719d0b16706ef25.js} +1 -1
- data/tools/cmdsender/{ImageviewerWidget-Cw_H_HmZ-d2a4e85b3987492ecd85.js → ImageviewerWidget-BMZ6REN4-e9264415cbf7e715915d.js} +1 -1
- data/tools/cmdsender/{LabelWidget-xrmcVeq8-f0507c5a077c4cdfd664.js → LabelWidget-oh6FIG6s-376a68b513f68c374efa.js} +1 -1
- data/tools/cmdsender/LabelledWidget-Bic36les-35cd0178f189394fdace.js +1 -0
- data/tools/cmdsender/LabelprogressbarWidget-CqIiGoDb-7396e77c8166865f5a76.js +1 -0
- data/tools/cmdsender/LabelsparklineWidget-DLhmqO02-430b169ce4f8b7b991b1.js +1 -0
- data/tools/cmdsender/{LabelvalueWidget-CQ06wWDK-3f12e0f4173201707f77.js → LabelvalueWidget-BefwSSVq-8e98160107a7824d1556.js} +1 -1
- data/tools/cmdsender/{LabelvaluedescWidget-Bo8zT01X-bb9ad75f7e0a954f36ca.js → LabelvaluedescWidget-NxrCzznm-daaa2f3467fd5b28e23d.js} +1 -1
- data/tools/cmdsender/{LabelvaluelimitsbarWidget-BucTw8Yk-3577bdad4273d9419048.js → LabelvaluelimitsbarWidget-pq7qoolL-4675f36ffb4ef69e866d.js} +1 -1
- data/tools/cmdsender/LabelvaluelimitscolumnWidget-edkpogsl-851cca98a2e0eb0744d4.js +1 -0
- data/tools/cmdsender/{LabelvaluerangebarWidget-D8cbfXFM-b4100d49aaebd2dd9635.js → LabelvaluerangebarWidget-DpJNv9dh-862c6a3a2862fd2305bf.js} +1 -1
- data/tools/cmdsender/{Layout-Tf--nruw-d89e597992d289c5c9c4.js → Layout-B0hvhBQO-e6239a7ee0f690978d7b.js} +1 -1
- data/tools/cmdsender/{LedWidget-qH_FthkK-83bc6f921cc74ab91f5d.js → LedWidget--4eSxBnn-e2415850d9f65c5e2693.js} +1 -1
- data/tools/cmdsender/LimitsbarWidget-BQaumgRt-14051bcf110b43e908aa.js +1 -0
- data/tools/cmdsender/{LimitscolorWidget-c6Qa6su7-41be9e0311e5fe7c52e0.js → LimitscolorWidget-BBF9sRtF-a654614c2970f03af34c.js} +1 -1
- data/tools/cmdsender/{LimitscolumnWidget-CcLs_443-b7a68d42b7b00e3512b8.js → LimitscolumnWidget-DZZtSoXw-3d592b1d832fb60b38f3.js} +1 -1
- data/tools/cmdsender/LinegraphWidget-DTLZmyWs-cfe4438d1db28ffecdb5.js +1 -0
- data/tools/cmdsender/MatrixbycolumnsWidget-dpgZz4wR-a567cee9d2e8151267fc.js +1 -0
- data/tools/cmdsender/{ProgressbarWidget-iYGw8-Dc-14e4a41c6a023b994c3e.js → ProgressbarWidget-7cYr8136-6cdab535d735eb50cadc.js} +1 -1
- data/tools/cmdsender/RadiobuttonWidget-DTfn-7F2-c2f317bbf02f00e9d575.js +1 -0
- data/tools/cmdsender/RadiogroupWidget-DWvTpw94-5165fc95e72f20c56883.js +1 -0
- data/tools/cmdsender/{RangebarWidget-D_zGTtCa-fd1c1fdb62c79ce04f5d.js → RangebarWidget-CG2Y7eYp-74a241903ef6ca44b01f.js} +1 -1
- data/tools/cmdsender/{RollupWidget-Dolsixyt-4bc9a6714cfa5e29069a.js → RollupWidget-C6HKTfCR-74a1d01b8bc54adbce95.js} +1 -1
- data/tools/cmdsender/{ScrollwindowWidget-DV2nZuNi-59140cec70809d54ae70.js → ScrollwindowWidget-DvhBCYd2-7fa7f86b72a13d2bd10f.js} +1 -1
- data/tools/cmdsender/SignalWidget-BZIoGjam-582128309028261e0eef.js +1 -0
- data/tools/cmdsender/{SpacerWidget-BH0p2OLi-414df726eb2e8a024774.js → SpacerWidget-YBS8RZIE-3c9c2aebd6deabdde047.js} +1 -1
- data/tools/cmdsender/{SparklineWidget-coxi9r2g-82d776fb6d0457093393.js → SparklineWidget-BMhY9vYe-a9fb546f8c87571a4a29.js} +1 -1
- data/tools/cmdsender/TabbookWidget-RfET19pq-28fa60a8ed59d88c5cd4.js +1 -0
- data/tools/cmdsender/TextboxWidget-M8vFBSxS-8fcc56055f207340cdc2.js +1 -0
- data/tools/cmdsender/{TextfieldWidget-C08N4JE8-4958b374f603abb2f9b3.js → TextfieldWidget-Dev7lCsT-f82082fdfd3fb4c94d1c.js} +1 -1
- data/tools/cmdsender/{TimeWidget-DtwdEcFg-489a9a23316a3b57cc13.js → TimeWidget-CQzn13rQ-722b7692402bae341594.js} +1 -1
- data/tools/cmdsender/TitleWidget-C4zbSian-84c1cf561d6f4f38460d.js +1 -0
- data/tools/cmdsender/{VWidget-DQqb7NVW-8290bc2533653e765e4a.js → VWidget-iASFPjdx-c9f9e59cc3421d1cbe2f.js} +1 -1
- data/tools/cmdsender/ValueWidget-BVI6uUVX-ea187c76f612c84d30b0.js +1 -0
- data/tools/cmdsender/ValuelimitsbarWidget-BiIcery0-c15369466a5badbb6ca7.js +1 -0
- data/tools/cmdsender/{ValuelimitscolumnWidget-QvhI6EcE-64fb0222c498943bc5e4.js → ValuelimitscolumnWidget-BiRI8GbI-492b22f1b60995e13b85.js} +1 -1
- data/tools/cmdsender/{ValuerangebarWidget-Dt3K9BnC-a2ab381501d79ce10604.js → ValuerangebarWidget-CtMFQu9--db3568b20da634e6ead1.js} +1 -1
- data/tools/cmdsender/{VerticalWidget-BIIViZgI-6dc9a0298b9e20c15b32.js → VerticalWidget-CRmcpQBn-80541f4f4395ae2fda0e.js} +1 -1
- data/tools/cmdsender/VerticalboxWidget-C-qChjug-a3fb6d36a4188c24f605.js +1 -0
- data/tools/cmdsender/Widget-CFEnOKms-d772101b7287d2a7be64.js +1 -0
- data/tools/cmdsender/main-915d780c91de54e299f0.js +1503 -0
- data/tools/cmdsender/main.js +1 -1
- metadata +70 -70
- data/tools/cmdsender/BlockWidget-DlCHbqZX-db1d2ffcb135d88e1452.js +0 -2
- data/tools/cmdsender/CanvasWidget-CqRlXc4r-3eb909cdddae90766ad2.js +0 -1
- data/tools/cmdsender/CanvasdotWidget--Xr_KsZs-5126dda17abe035ff90a.js +0 -1
- data/tools/cmdsender/CanvaslabelWidget-CYNqmyP0-3a0a9e7f091516e4e064.js +0 -1
- data/tools/cmdsender/CheckbuttonWidget-B74AWeaW-87ed8255ef695bb52883.js +0 -1
- data/tools/cmdsender/CommandSender-6e091b1f97552e91e2f4.js +0 -1121
- data/tools/cmdsender/DateWidget-BEVSczU8-a781613ae187bc6e58a6.js +0 -1
- data/tools/cmdsender/FormatvalueWidget-DN12xymS-565e883640cb1ee4bcd6.js +0 -1
- data/tools/cmdsender/Graph-Bgo0cjl3-12e656c2fbd09d6ca84a.js +0 -1
- data/tools/cmdsender/HorizontalboxWidget-BcMTFBU--87012312234b9b917885.js +0 -1
- data/tools/cmdsender/HorizontallineWidget-CXFqHclf-c2faa7570d2da527f0e3.js +0 -1
- data/tools/cmdsender/LabelledWidget-D48QoyMk-7c6bcc9d958c4da37475.js +0 -1
- data/tools/cmdsender/LabelprogressbarWidget-C_950t6g-df94ae42db00bc117b3a.js +0 -1
- data/tools/cmdsender/LabelsparklineWidget-0KXQyPoU-c93d00860885c336a273.js +0 -1
- data/tools/cmdsender/LabelvaluelimitscolumnWidget-Dflb1hNd-37e8f6b7cc0a2c7184e3.js +0 -1
- data/tools/cmdsender/LimitsbarWidget-B9lAB2RD-288b3467382d9530b782.js +0 -1
- data/tools/cmdsender/LinegraphWidget-BSVYLFo1-f82a0f9cf2c7f99ce325.js +0 -1
- data/tools/cmdsender/MatrixbycolumnsWidget-DXFpZTre-fe6f1c46262a7417647e.js +0 -1
- data/tools/cmdsender/RadiobuttonWidget-ytmoVZ3u-b2ebbb35500b17d001dd.js +0 -1
- data/tools/cmdsender/RadiogroupWidget-CusMBhKH-ccf57e6e8b6750f23d2c.js +0 -1
- data/tools/cmdsender/SignalWidget-d9-6h85k-ed90ce120ebbc1af270d.js +0 -1
- data/tools/cmdsender/TabbookWidget-B1XKplGH-1e431e646853de0b2638.js +0 -1
- data/tools/cmdsender/TextboxWidget-C-_M2M4l-887a4f53ee9ef2c01014.js +0 -1
- data/tools/cmdsender/TitleWidget-CT-aLcNb-d460b47d0ecbf991d963.js +0 -1
- data/tools/cmdsender/ValueWidget-C6RanBj3-126e69a1a5c1ac9279c9.js +0 -1
- data/tools/cmdsender/ValuelimitsbarWidget-B3bvjfxc-b79ddd1d1e23a4ef45ad.js +0 -1
- data/tools/cmdsender/VerticalboxWidget-DY72fLHW-d667c1651494c8557f7f.js +0 -1
- data/tools/cmdsender/Widget-oyqWpFXJ-9037f91b02577da12e4e.js +0 -1
- data/tools/cmdsender/main-69178b62009db0b76b8d.js +0 -1499
@@ -0,0 +1,1125 @@
|
|
1
|
+
System.register(["./main-915d780c91de54e299f0.js","vue","./CriticalCmdDialog-Bcq8PGag-8af4b4c2a12813cf256a.js","./DetailsDialog-C5jf8o0K-ca6423787f25a5704743.js","vue-router","single-spa","vuex","vuetify"],function(exports,module){"use strict";var d,UA,FA,BA,WA,IS,bA,_export_sfc,we$1,resolveComponent,createBlock,openBlock,Teleport,createVNode,withCtx,createElementVNode,toDisplayString,createElementBlock,Fragment,renderList,createTextVNode,mergeProps,createSlots,createCommentVNode,normalizeStyle,withDirectives,vShow,normalizeProps,guardReactiveProps,withModifiers,normalizeClass,N$1,P;return{setters:[c=>{d=c.d,UA=c.U,FA=c.F,BA=c.B,WA=c.W,IS=c.I,bA=c.b,_export_sfc=c._,we$1=c.w},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$1=c.N},c=>{P=c.P},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-80865e28]{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:u}={}){this.isVimModeEnabled()?(c.setKeyboardHandler(M),ace.config.loadModule(M,g=>{g.CodeMirror.Vim.defineEx("write","w",p=>{typeof u=="function"?u():p.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,u,g,p,se,E){const S=resolveComponent("v-col"),_=resolveComponent("v-row"),a=resolveComponent("v-icon"),h=resolveComponent("v-btn"),i=resolveComponent("v-divider"),r=resolveComponent("v-list-item-title"),o=resolveComponent("v-list-item"),t=resolveComponent("v-list"),e=resolveComponent("v-menu"),n=resolveComponent("v-radio"),s=resolveComponent("v-list-item-action"),f=resolveComponent("v-radio-group"),m=resolveComponent("v-checkbox");return openBlock(),createBlock(Teleport,{to:"#openc3-menu"},[createVNode(_,{"no-gutters":""},{default:withCtx(()=>[createVNode(S,{"align-self":"end"},{default:withCtx(()=>[createElementVNode("span",z$1,toDisplayString(g.title),1)]),_:1})]),_:1}),createVNode(_,{dense:"",class:"flex-nowrap"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(g.menus,(x,A)=>(openBlock(),createBlock(e,{ref_for:!0,ref:"topmenu",key:A},{activator:withCtx(({props:C})=>[createVNode(h,mergeProps({ref_for:!0},C,{variant:"outlined",class:"mx-1 menu-button",text:x.label,"data-test":E.formatDT(`${g.title} ${x.label}`)}),{append:withCtx(()=>[createVNode(a,{class:"menu-button-icon"},{default:withCtx(()=>u[0]||(u[0]=[createTextVNode(" mdi-menu-down ")])),_:1})]),_:2},1040,["text","data-test"])]),default:withCtx(()=>[createVNode(t,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(x.items,(C,b)=>(openBlock(),createElementBlock(Fragment,null,[C.divider?(openBlock(),createBlock(i,{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:G})=>[(openBlock(),createBlock(o,mergeProps({ref_for:!0},G,{disabled:C.disabled,key:b}),createSlots({append:withCtx(()=>[createVNode(a,null,{default:withCtx(()=>u[1]||(u[1]=[createTextVNode(" mdi-chevron-right ")])),_:1})]),default:withCtx(()=>[!C.radio&&!C.checkbox?(openBlock(),createBlock(r,{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,(G,Se)=>(openBlock(),createBlock(o,{key:Se,"prepend-icon":G.icon,onClick:q=>E.subMenuClick(G)},{default:withCtx(()=>[createVNode(r,null,{default:withCtx(()=>[createTextVNode(toDisplayString(G.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):C.radioGroup?(openBlock(),createBlock(f,{"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,(G,Se)=>(openBlock(),createBlock(o,{key:Se+"-choice"},{default:withCtx(()=>[createVNode(s,{class:"list-action"},{default:withCtx(()=>[createVNode(n,{color:"secondary",label:G.label,value:G.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(openBlock(),createBlock(o,{onClick:G=>C.command(C),disabled:C.disabled,"data-test":E.formatDT(`${g.title} ${x.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":G=>C.checked=G,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(r,{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(){FA.get("/openc3-api/autocomplete/data/screen").then(u=>{this.autocompleteData=u.data}),this.api=new BA}async getCompletions(u,g,p,se,E){let S=g.getLine(p.row).slice(0,p.column).trimStart().split(/ (?![^<]*>)/),_=this.autocompleteData;S.length>1&&(_=_.find(i=>i.caption===S[0]));let a={},h=!0;if(_&&_.params){_.params.length==S.length-1&&(h=!1);let i=_.params[S.length-2];if(i["Target name"])_=(await this.api.get_target_names()).reduce((r,o)=>(r[o]=1,r),{});else if(i["Packet name"]){let r=S[S.length-2];_=(await this.api.get_all_tlm(r)).reduce((o,t)=>(o[t.packet_name]=t.description,o),{})}else if(i["Item name"]){let r=S[S.length-3],o=S[S.length-2];_=(await this.api.get_tlm(r,o)).items.reduce((t,e)=>(t[e.name]=e.description,t),{})}else _=i;a=Object.keys(_||{}).map(r=>{let o={value:r+(h?" ":""),command:h&&"startAutocomplete"};return typeof _[r]=="string"&&(o.meta=_[r]),o})}else a=_;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:()=>[]}},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,u=[];const g=this.errors.toSorted((p,se)=>p.lineNumber-se.lineNumber);for(const p of g){let se=`At ${p.lineNumber}: (${p.line}) ${p.message}.`;p.usage&&(se+=` Usage: ${p.usage}`),u.push(se),c.add(p.message)}return u}return[]},show:{get(){return this.modelValue},set(c){this.$emit("update:modelValue",c)}}},mounted:function(){this.editor=bA.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 u=this.editor.getCursorPosition(),g=this.editor.session.getTokenAt(u.row,u.column);if(g){let p=g.value.trim();p.includes(" ")?this.docsKeyword=p.split(" ")[0]:this.docsKeyword=p,this.contextMenu=!0}},openDocumentation(){window.open(`${window.location.origin}/tools/staticdocs/docs/configuration/telemetry-screens#${this.docsKeyword.toLowerCase()}`,"_blank")},buildScreenMode(){let c=bA.require("ace/lib/oop"),u=bA.require("ace/mode/text_highlight_rules").TextHighlightRules,g=this.keywords.join("|"),p=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*(${g})\\b`)}]},this.normalizeRules()};c.inherits(p,u);let se=function(){this.HighlightRules=p},E=bA.require("ace/mode/text").Mode;return c.inherits(se,E),(function(){this.$id="ace/mode/openc3"}).call(se.prototype),se},downloadScreen:function(){const c=new Blob([this.editor.getValue()],{type:"text/plain"}),u=document.createElement("a");u.href=URL.createObjectURL(c),u.setAttribute("download",`${this.screen.toLowerCase()}.txt`),u.click()},loadFile:function(){const c=new FileReader;c.readAsText(this.file);const u=this;c.onload=function(){u.editor.setValue(c.result),u.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,u,g,p,se,E){const S=resolveComponent("v-btn"),_=resolveComponent("v-spacer"),a=resolveComponent("v-toolbar"),h=resolveComponent("v-row"),i=resolveComponent("v-file-input"),r=resolveComponent("v-list-item-title"),o=resolveComponent("v-list-item"),t=resolveComponent("v-divider"),e=resolveComponent("v-list"),n=resolveComponent("v-menu"),s=resolveComponent("v-card-text"),f=resolveComponent("v-card"),m=resolveComponent("v-dialog");return openBlock(),createBlock(m,{modelValue:E.show,"onUpdate:modelValue":u[5]||(u[5]=x=>E.show=x),persistent:"",width:"75vw"},{default:withCtx(()=>[createVNode(f,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(_),createElementVNode("span",null," Edit Screen: "+toDisplayString(g.target)+" "+toDisplayString(g.screen),1),createVNode(_),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(h,{class:"mt-3"},{default:withCtx(()=>u[6]||(u[6]=[createTextVNode(" Upload a screen file. ")])),_:1}),createVNode(h,{"no-gutters":"",align:"center"},{default:withCtx(()=>[createVNode(S,{disabled:!se.file,color:"primary",class:"mr-3","data-test":"edit-screen-load",onClick:E.loadFile},{default:withCtx(()=>u[7]||(u[7]=[createTextVNode(" Load ")])),_:1},8,["disabled","onClick"]),createVNode(i,{modelValue:se.file,"onUpdate:modelValue":u[0]||(u[0]=x=>se.file=x),"truncate-length":"15",accept:".txt",label:"Click to select .txt screen file."},null,8,["modelValue"])]),_:1}),createVNode(h,{class:"mb-2"},{default:withCtx(()=>u[8]||(u[8]=[createTextVNode(" Edit the screen definition. ")])),_:1}),createVNode(h,{class:"mb-2"},{default:withCtx(()=>[createElementVNode("pre",{ref:"editor",class:"editor",onContextmenu:u[1]||(u[1]=withModifiers((...x)=>E.showContextMenu&&E.showContextMenu(...x),["prevent"]))},null,544),createVNode(n,{modelValue:se.contextMenu,"onUpdate:modelValue":u[2]||(u[2]=x=>se.contextMenu=x),target:[se.menuX,se.menuY]},{default:withCtx(()=>[createVNode(e,null,{default:withCtx(()=>[createVNode(o,{link:""},{default:withCtx(()=>[createVNode(r,{onClick:E.openDocumentation},{default:withCtx(()=>[createTextVNode(toDisplayString(se.docsKeyword)+" documentation ",1)]),_:1},8,["onClick"])]),_:1}),createVNode(t),createVNode(o,{title:"Toggle Vim mode","prepend-icon":"extras:vim",onClick:E.toggleVimMode},null,8,["onClick"])]),_:1})]),_:1},8,["modelValue","target"])]),_:1}),createVNode(h,{style:{"max-height":"120px","overflow-y":"auto"}},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(E.editErrors,(x,A)=>(openBlock(),createElementBlock("div",{key:A},[createElementVNode("span",{class:"text-red",textContent:toDisplayString(x)},null,8,te$1)]))),128))]),_:1}),createVNode(h,{class:"mt-5"},{default:withCtx(()=>[u[11]||(u[11]=createElementVNode("span",null,"Ctrl-space brings up autocomplete. Right click keywords for documentation.",-1)),createVNode(_),createVNode(S,{class:"mx-2",variant:"outlined","data-test":"edit-screen-cancel",onClick:u[3]||(u[3]=x=>c.$emit("cancel"))},{default:withCtx(()=>u[9]||(u[9]=[createTextVNode(" Cancel ")])),_:1}),createVNode(S,{class:"mx-2",color:"primary","data-test":"edit-screen-save",onClick:u[4]||(u[4]=x=>c.$emit("save",c.editor.getValue()))},{default:withCtx(()=>u[10]||(u[10]=[createTextVNode(" Save ")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const ie$1=d(ee$1,[["render",ne$1],["__scopeId","data-v-0caab967"]]),N=20,ye$1={components:{EditScreenDialog:ie$1},mixins:[UA],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}},data(){return{api:null,backup:"",currentDefinition:this.definition,editDialog:!1,expand:!0,configParser:null,configError:!1,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:[],screenValues:{},updateCounter:0,screenId:IS.uniqueId("openc3-screen_")}},computed:{error:function(){if(this.errorDialog&&this.errors.length>0){let c=new Set,u="";for(const g of this.errors){if(c.has(g.message))continue;let p=`${g.time}: (${g.type}) ${g.message}
|
3
|
+
`;u+=p,c.add(g.message)}return u}return null},computedStyle(){var c;let u={};const g=this.width||((c=this.$refs.bar)==null?void 0:c.clientWidth);return this.floated&&(u.position="absolute",u.top=this.top+"px",u.left=this.left+"px",u.width=g+"px"),u}},watch:{count:{handler(c,u){this.currentDefinition=this.definition,this.rerender()}}},errorCaptured(c,u,g){return console.log({err:c,vm:u,info:g}),this.errors.length<N&&(console.log({errors:this.errors}),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()}),this.configError=!0),!1},created(){this.api=new BA,this.configParser=new WA,this.parseDefinition(),this.screenKey=Math.floor(Math.random()*1e6)},mounted(){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)},methods:{open(c,u){this.$parent.showScreen(c,u)},close(c,u){this.$parent.closeScreenByName(c,u)},closeAll(){this.$parent.closeAll()},clearErrors:function(){this.errors=[],this.configError=!1},updateRefreshInterval:function(){let c=this.pollingPeriod*1e3;this.updater&&clearInterval(this.updater),this.updater=setInterval(()=>{this.update()},c)},parseDefinition:function(){if(this.clearErrors(),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,u,g,p)=>{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(u[0]),this.height=parseInt(u[1]),this.pollingPeriod=parseFloat(u[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(u[0]);break;case"SETTING":case"SUBSETTING":(this.currentLayout.widgets[this.currentLayout.widgets.length-1]??this.currentLayout).settings.push(u);break;case"GLOBAL_SETTING":case"GLOBAL_SUBSETTING":this.globalSettings.push(u);break;default:this.processWidget(c,u,g,p);break}}),typeof this.layoutStack[0]>"u"){let c=[],u=[];for(const g of this.dynamicWidgets)c.push(g.name),u.push(g.lineNumber);this.errors.length<N&&(this.errors.push({type:"usage",message:`Unknown widget! Are these widgets: ${c.join(",")}?`,lineNumber:u.join(","),time:new Date().getTime()}),this.configError=!0),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(),u=this.$refs.bar.getBoundingClientRect();this.top=u.top-c.top-5,this.left=u.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 u=this.dragX-c.clientX,g=this.dragY-c.clientY;this.dragX=c.clientX,this.dragY=c.clientY,this.top=this.$refs.bar.offsetTop-g,this.left=this.$refs.bar.offsetLeft-u,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(){FA.post("/openc3-api/screen/",{data:{scope:window.openc3Scope,target:this.target,screen:this.screen,text:this.currentDefinition}},0)})},deleteScreen:function(){this.editDialog=!1,FA.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,u,g,p){let se=null;c==="NAMED_WIDGET"&&(this.configParser.verify_num_parameters(2,null,`${c} <Widget Name> <Widget Type> <Widget Settings... (optional)>`),se=u[0].toUpperCase(),c=u[1].toUpperCase(),u=u.slice(2,u.length));const E=c.charAt(0).toUpperCase()+c.slice(1).toLowerCase()+"Widget";let S=[];if(S.push(["__SCREEN_ID__",this.screenId]),se!==null&&S.push(["NAMED_WIDGET",se]),c==="VERTICAL"||c==="VERTICALBOX"||c==="HORIZONTAL"||c==="HORIZONTALBOX"||c==="MATRIXBYCOLUMNS"||c==="TABBOOK"||c==="TABITEM"||c==="CANVAS"||c==="RADIOGROUP"||c==="SCROLLWINDOW"){const _={type:E,parameters:u,settings:S,screenValues:this.screenValues,screenTimeZone:this.timeZone,widgets:[]};this.layoutStack.push(_),this.currentLayout.widgets.push(_),this.currentLayout=_}else if(this.$options.components[E])this.currentLayout.widgets.push({type:E,target:this.target,parameters:u,settings:S,screenValues:this.screenValues,screenTimeZone:this.timeZone,line:g,lineNumber:p});else{let _={type:"DynamicWidget",target:this.target,parameters:u,settings:S,screenValues:this.screenValues,screenTimeZone:this.timeZone,name:E,line:g,lineNumber:p};this.currentLayout.widgets.push(_),this.dynamicWidgets.push(_)}},applyGlobalSettings:function(c){c.forEach(u=>{this.globalSettings.forEach(g=>{u.type.toLowerCase()===g[0].toLowerCase()+"widget"&&(u.settings.find(p=>p[0]===g[1])||u.settings.push(g.slice(1)))}),u.widgets&&this.applyGlobalSettings(u.widgets)})},update:function(){this.screenItems.length!==0&&this.configError===!1&&this.api.get_tlm_values(this.screenItems,this.staleTime,this.cacheTimeout).then(c=>{this.clearErrors(),this.updateValues(c)}).catch(c=>{let u=JSON.stringify(c,null,2);u.includes("no response received")||(this.configError=!0),this.errors.find(g=>g.message===u)||this.errors.length<N&&this.errors.push({type:"error",message:u,time:new Date().getTime()})})},updateValues:function(c){this.updateCounter+=1;for(let u=0;u<c.length;u++)c[u].push(this.updateCounter),this.screenValues[this.screenItems[u]]=c[u]},addItem:function(c){this.screenItems.push(c),this.screenValues[c]=[null,null,0]},deleteItem:function(c){let u=this.screenItems.indexOf(c);this.screenItems.splice(u,1)}}},_e={ref:"screen",class:"pa-1",style:{position:"relative"}},be$1={key:1,class:"pa-1",style:{position:"relative"}};function xe$1(c,u,g,p,se,E){const S=resolveComponent("v-btn"),_=resolveComponent("v-tooltip"),a=resolveComponent("v-spacer"),h=resolveComponent("v-toolbar"),i=resolveComponent("v-overlay"),r=resolveComponent("vertical-widget"),o=resolveComponent("v-expand-transition"),t=resolveComponent("v-card"),e=resolveComponent("edit-screen-dialog"),n=resolveComponent("v-textarea"),s=resolveComponent("v-dialog");return openBlock(),createElementBlock("div",{ref:"bar",style:normalizeStyle(E.computedStyle)},[g.inline?createCommentVNode("",!0):(openBlock(),createBlock(t,{key:0,"min-height":se.height,"min-width":se.width,style:{cursor:"default"}},{default:withCtx(()=>[createVNode(h,{height:"24"},{default:withCtx(()=>[withDirectives(createVNode(S,{icon:"mdi-alert",variant:"text",density:"compact","data-test":"error-graph-icon","aria-label":"Show Errors",onClick:u[0]||(u[0]=()=>{se.errorDialog=!0})},null,512),[[vShow,se.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"]),g.fixFloated?createCommentVNode("",!0):(openBlock(),createBlock(_,{key:0,"open-delay":600,location:"top"},{activator:withCtx(({props:f})=>[createElementVNode("div",normalizeProps(guardReactiveProps(f)),[createVNode(S,{icon:se.floated?"mdi-balloon":"mdi-view-grid-outline",variant:"text","data-test":"float-screen-icon","aria-label":se.floated?"Unfloat Screen":"Float Screen",onClick:E.floatScreen},null,8,["icon","aria-label","onClick"])],16)]),default:withCtx(()=>[createElementVNode("span",null,toDisplayString(se.floated?"Unfloat Screen":"Float Screen"),1)]),_:1})),se.floated?(openBlock(),createBlock(_,{key:1,"open-delay":600,location:"top"},{activator:withCtx(({props:f})=>[createElementVNode("div",normalizeProps(guardReactiveProps(f)),[createVNode(S,{icon:"mdi-arrow-up",variant:"text","data-test":"up-screen-icon","aria-label":"Move Screen Up",onClick:E.upScreen},null,8,["onClick"])],16)]),default:withCtx(()=>[u[7]||(u[7]=createElementVNode("span",null," Move Screen Up ",-1))]),_:1})):createCommentVNode("",!0),se.floated&&se.zIndex>g.minZ?(openBlock(),createBlock(_,{key:2,"open-delay":600,location:"top"},{activator:withCtx(({props:f})=>[createElementVNode("div",normalizeProps(guardReactiveProps(f)),[createVNode(S,{icon:"mdi-arrow-down",variant:"text","data-test":"down-screen-icon","aria-label":"Move Screen Down",onClick:E.downScreen},null,8,["onClick"])],16)]),default:withCtx(()=>[u[8]||(u[8]=createElementVNode("span",null," Move Screen Down ",-1))]),_:1})):createCommentVNode("",!0),createVNode(a),createElementVNode("span",null,toDisplayString(g.target)+" "+toDisplayString(g.screen),1),createVNode(a),se.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","data-test":"maximize-screen-icon","aria-label":"Maximize Screen",onClick:E.minMaxTransition},null,8,["onClick"])),g.showClose?(openBlock(),createBlock(S,{key:5,icon:"mdi-close-box",variant:"text",density:"compact","data-test":"close-screen-icon","aria-label":"Close Screen",onClick:u[1]||(u[1]=f=>c.$emit("close-screen"))})):createCommentVNode("",!0)]),_:1}),se.editDialog?createCommentVNode("",!0):(openBlock(),createBlock(o,{key:0},{default:withCtx(()=>[withDirectives(createElementVNode("div",_e,[createVNode(i,{style:{"pointer-events":"none"},"model-value":se.errors.length!==0,opacity:"0.8",absolute:"",attach:""},null,8,["model-value"]),(openBlock(),createBlock(r,{key:se.screenKey,widgets:se.layoutStack[0].widgets,"screen-values":se.screenValues,"screen-time-zone":g.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,se.expand]])]),_:1}))]),_:1},8,["min-height","min-width"])),g.inline?(openBlock(),createElementBlock("div",be$1,[createVNode(i,{style:{"pointer-events":"none"},"model-value":se.errors.length!==0,opacity:"0.8",absolute:"",attach:""},null,8,["model-value"]),(openBlock(),createBlock(r,{key:se.screenKey,widgets:se.layoutStack[0].widgets,"screen-values":se.screenValues,"screen-time-zone":g.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),se.editDialog?(openBlock(),createBlock(e,{key:2,modelValue:se.editDialog,"onUpdate:modelValue":u[2]||(u[2]=f=>se.editDialog=f),target:g.target,screen:g.screen,definition:se.currentDefinition,keywords:g.keywords,errors:se.errors,onSave:u[3]||(u[3]=f=>E.saveEdit(f)),onCancel:u[4]||(u[4]=f=>E.cancelEdit()),onDelete:u[5]||(u[5]=f=>E.deleteScreen())},null,8,["modelValue","target","screen","definition","keywords","errors"])):createCommentVNode("",!0),createVNode(s,{modelValue:se.errorDialog,"onUpdate:modelValue":u[6]||(u[6]=f=>se.errorDialog=f),width:"60vw"},{default:withCtx(()=>[createVNode(h,{height:"24"},{default:withCtx(()=>[createVNode(a),createElementVNode("span",null," Screen: "+toDisplayString(g.target)+" "+toDisplayString(g.screen)+" Errors ",1),createVNode(a)]),_:1}),createVNode(t,null,{default:withCtx(()=>[createVNode(n,{class:"errors",readonly:"",rows:"13","model-value":E.error},null,8,["model-value"])]),_:1})]),_:1},8,["modelValue"])],4)}const Ie$1=d(ye$1,[["render",xe$1],["__scopeId","data-v-38e2d544"]]);var sprintf$1={},hasRequiredSprintf;function requireSprintf(){return hasRequiredSprintf||(hasRequiredSprintf=1,function(c){(function(){var u={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 g(_){return se(S(_),arguments)}function p(_,a){return g.apply(null,[_].concat(a||[]))}function se(_,a){var h=1,i=_.length,r,o="",t,e,n,s,f,m,x,A;for(t=0;t<i;t++)if(typeof _[t]=="string")o+=_[t];else if(typeof _[t]=="object"){if(n=_[t],n.keys)for(r=a[h],e=0;e<n.keys.length;e++){if(r==null)throw new Error(g('[sprintf] Cannot access property "%s" of undefined value "%s"',n.keys[e],n.keys[e-1]));r=r[n.keys[e]]}else n.param_no?r=a[n.param_no]:r=a[h++];if(u.not_type.test(n.type)&&u.not_primitive.test(n.type)&&r instanceof Function&&(r=r()),u.numeric_arg.test(n.type)&&typeof r!="number"&&isNaN(r))throw new TypeError(g("[sprintf] expecting number but found %T",r));switch(u.number.test(n.type)&&(x=r>=0),n.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,n.width?parseInt(n.width):0);break;case"e":r=n.precision?parseFloat(r).toExponential(n.precision):parseFloat(r).toExponential();break;case"f":r=n.precision?parseFloat(r).toFixed(n.precision):parseFloat(r);break;case"g":r=n.precision?String(Number(r.toPrecision(n.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=n.precision?r.substring(0,n.precision):r;break;case"t":r=String(!!r),r=n.precision?r.substring(0,n.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=n.precision?r.substring(0,n.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=n.precision?r.substring(0,n.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase();break}u.json.test(n.type)?o+=r:(u.number.test(n.type)&&(!x||n.sign)?(A=x?"+":"-",r=r.toString().replace(u.sign,"")):A="",f=n.pad_char?n.pad_char==="0"?"0":n.pad_char.charAt(1):" ",m=n.width-(A+r).length,s=n.width&&m>0?f.repeat(m):"",o+=n.align?A+r+s:f==="0"?A+s+r:s+A+r)}return o}var E=Object.create(null);function S(_){if(E[_])return E[_];for(var a=_,h,i=[],r=0;a;){if((h=u.text.exec(a))!==null)i.push(h[0]);else if((h=u.modulo.exec(a))!==null)i.push("%");else if((h=u.placeholder.exec(a))!==null){if(h[2]){r|=1;var o=[],t=h[2],e=[];if((e=u.key.exec(t))!==null)for(o.push(e[1]);(t=t.substring(e[0].length))!=="";)if((e=u.key_access.exec(t))!==null)o.push(e[1]);else if((e=u.index_access.exec(t))!==null)o.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");h[2]=o}else r|=2;if(r===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push({placeholder:h[0],param_no:h[1],keys:h[2],sign:h[3],pad_char:h[4],align:h[5],width:h[6],precision:h[7],type:h[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");a=a.substring(h[0].length)}return E[_]=i}c.sprintf=g,c.vsprintf=p,typeof window<"u"&&(window.sprintf=g,window.vsprintf=p)})()}(sprintf$1)),sprintf$1}requireSprintf();var ace$1={exports:{}},hasRequiredAce;function requireAce(){return hasRequiredAce||(hasRequiredAce=1,function(c,u){(function(){var g="ace",p=function(){return this}();!p&&typeof window<"u"&&(p=window);var se=function(i,r,o){if(typeof i!="string"){se.original?se.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(o=r),se.modules[i]||(se.payloads[i]=o,se.modules[i]=null)};se.modules={},se.payloads={};var E=function(i,r,o){if(typeof r=="string"){var t=a(i,r);if(t!=null)return o&&o(),t}else if(Object.prototype.toString.call(r)==="[object Array]"){for(var e=[],n=0,s=r.length;n<s;++n){var f=a(i,r[n]);if(f==null&&S.original)return;e.push(f)}return o&&o.apply(null,e)||!0}},S=function(i,r){var o=E("",i,r);return o==null&&S.original?S.original.apply(this,arguments):o},_=function(i,r){if(r.indexOf("!")!==-1){var o=r.split("!");return _(i,o[0])+"!"+_(i,o[1])}if(r.charAt(0)=="."){var t=i.split("/").slice(0,-1).join("/");for(r=t+"/"+r;r.indexOf(".")!==-1&&e!=r;){var e=r;r=r.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return r},a=function(i,r){r=_(i,r);var o=se.modules[r];if(!o){if(o=se.payloads[r],typeof o=="function"){var t={},e={id:r,uri:"",exports:t,packaged:!0},n=function(f,m){return E(r,f,m)},s=o(n,t,e);t=s||e.exports,se.modules[r]=t,delete se.payloads[r]}o=se.modules[r]=t||o}return o};function h(i){var r=p;p[i]||(p[i]={}),r=p[i],(!r.define||!r.define.packaged)&&(se.original=r.define,r.define=se,r.define.packaged=!0),(!r.require||!r.require.packaged)&&(S.original=r.require,r.require=S,r.require.packaged=!0)}h(g)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(g,p,se){function E(S,_,a){Object.defineProperty(S,_,{value:a,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||E(String.prototype,"startsWith",function(S,_){return _=_||0,this.lastIndexOf(S,_)===_}),String.prototype.endsWith||E(String.prototype,"endsWith",function(S,_){var a=this;(_===void 0||_>a.length)&&(_=a.length),_-=S.length;var h=a.indexOf(S,_);return h!==-1&&h===_}),String.prototype.repeat||E(String.prototype,"repeat",function(S){for(var _="",a=this;S>0;)S&1&&(_+=a),(S>>=1)&&(a+=a);return _}),String.prototype.includes||E(String.prototype,"includes",function(S,_){return this.indexOf(S,_)!=-1}),Object.assign||(Object.assign=function(S){if(S==null)throw new TypeError("Cannot convert undefined or null to object");for(var _=Object(S),a=1;a<arguments.length;a++){var h=arguments[a];h!=null&&Object.keys(h).forEach(function(i){_[i]=h[i]})}return _}),Object.values||(Object.values=function(S){return Object.keys(S).map(function(_){return S[_]})}),Array.prototype.find||E(Array.prototype,"find",function(S){for(var _=this.length,a=arguments[1],h=0;h<_;h++){var i=this[h];if(S.call(a,i,h,this))return i}}),Array.prototype.findIndex||E(Array.prototype,"findIndex",function(S){for(var _=this.length,a=arguments[1],h=0;h<_;h++){var i=this[h];if(S.call(a,i,h,this))return h}}),Array.prototype.includes||E(Array.prototype,"includes",function(S,_){return this.indexOf(S,_)!=-1}),Array.prototype.fill||E(Array.prototype,"fill",function(S){for(var _=this,a=_.length>>>0,h=arguments[1],i=h>>0,r=i<0?Math.max(a+i,0):Math.min(i,a),o=arguments[2],t=o===void 0?a:o>>0,e=t<0?Math.max(a+t,0):Math.min(t,a);r<e;)_[r]=S,r++;return _}),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(g,p,se){g("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(g,p,se){p.deepCopy=function E(S){if(typeof S!="object"||!S)return S;var _;if(Array.isArray(S)){_=[];for(var a=0;a<S.length;a++)_[a]=E(S[a]);return _}if(Object.prototype.toString.call(S)!=="[object Object]")return S;_={};for(var a in S)_[a]=E(S[a]);return _}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(g,p,se){p.last=function(_){return _[_.length-1]},p.stringReverse=function(_){return _.split("").reverse().join("")},p.stringRepeat=function(_,a){for(var h="";a>0;)a&1&&(h+=_),(a>>=1)&&(_+=_);return h};var E=/^\s\s*/,S=/\s\s*$/;p.stringTrimLeft=function(_){return _.replace(E,"")},p.stringTrimRight=function(_){return _.replace(S,"")},p.copyObject=function(_){var a={};for(var h in _)a[h]=_[h];return a},p.copyArray=function(_){for(var a=[],h=0,i=_.length;h<i;h++)_[h]&&typeof _[h]=="object"?a[h]=this.copyObject(_[h]):a[h]=_[h];return a},p.deepCopy=g("./deep_copy").deepCopy,p.arrayToMap=function(_){for(var a={},h=0;h<_.length;h++)a[_[h]]=1;return a},p.createMap=function(_){var a=Object.create(null);for(var h in _)a[h]=_[h];return a},p.arrayRemove=function(_,a){for(var h=0;h<=_.length;h++)a===_[h]&&_.splice(h,1)},p.escapeRegExp=function(_){return _.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},p.escapeHTML=function(_){return(""+_).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},p.getMatchOffsets=function(_,a){var h=[];return _.replace(a,function(i){h.push({offset:arguments[arguments.length-2],length:i.length})}),h},p.deferredCall=function(_){var a=null,h=function(){a=null,_()},i=function(r){return i.cancel(),a=setTimeout(h,r||0),i};return i.schedule=i,i.call=function(){return this.cancel(),_(),i},i.cancel=function(){return clearTimeout(a),a=null,i},i.isPending=function(){return a},i},p.delayedCall=function(_,a){var h=null,i=function(){h=null,_()},r=function(o){h==null&&(h=setTimeout(i,o||a))};return r.delay=function(o){h&&clearTimeout(h),h=setTimeout(i,o||a)},r.schedule=r,r.call=function(){this.cancel(),_()},r.cancel=function(){h&&clearTimeout(h),h=null},r.isPending=function(){return h},r},p.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},p.skipEmptyMatch=function(_,a,h){return h&&_.codePointAt(a)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(g,p,se){p.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},p.getOS=function(){return p.isMac?p.OS.MAC:p.isLinux?p.OS.LINUX:p.OS.WINDOWS};var E=typeof navigator=="object"?navigator:{},S=(/mac|win|linux/i.exec(E.platform)||["other"])[0].toLowerCase(),_=E.userAgent||"",a=E.appName||"";p.isWin=S=="win",p.isMac=S=="mac",p.isLinux=S=="linux",p.isIE=a=="Microsoft Internet Explorer"||a.indexOf("MSAppHost")>=0?parseFloat((_.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((_.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),p.isOldIE=p.isIE&&p.isIE<9,p.isGecko=p.isMozilla=_.match(/ Gecko\/\d+/),p.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",p.isWebKit=parseFloat(_.split("WebKit/")[1])||void 0,p.isChrome=parseFloat(_.split(" Chrome/")[1])||void 0,p.isSafari=parseFloat(_.split(" Safari/")[1])&&!p.isChrome||void 0,p.isEdge=parseFloat(_.split(" Edge/")[1])||void 0,p.isAIR=_.indexOf("AdobeAIR")>=0,p.isAndroid=_.indexOf("Android")>=0,p.isChromeOS=_.indexOf(" CrOS ")>=0,p.isIOS=/iPad|iPhone|iPod/.test(_)&&!window.MSStream,p.isIOS&&(p.isMac=!0),p.isMobile=p.isIOS||p.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(g,p,se){var E=g("./useragent"),S="http://www.w3.org/1999/xhtml";p.buildDom=function o(t,e,n){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 f=[],m=0;m<t.length;m++){var x=o(t[m],e,n);x&&f.push(x)}return f}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++)o(t[m],A,n);return b==2&&Object.keys(C).forEach(function(G){var Se=C[G];G==="class"?A.className=Array.isArray(Se)?Se.join(" "):Se:typeof Se=="function"||G=="value"||G[0]=="$"?A[G]=Se:G==="ref"?n&&(n[Se]=A):G==="style"?typeof Se=="string"&&(A.style.cssText=Se):Se!=null&&A.setAttribute(G,Se)}),e&&e.appendChild(A),A},p.getDocumentHead=function(o){return o||(o=document),o.head||o.getElementsByTagName("head")[0]||o.documentElement},p.createElement=function(o,t){return document.createElementNS?document.createElementNS(t||S,o):document.createElement(o)},p.removeChildren=function(o){o.innerHTML=""},p.createTextNode=function(o,t){var e=t?t.ownerDocument:document;return e.createTextNode(o)},p.createFragment=function(o){var t=o?o.ownerDocument:document;return t.createDocumentFragment()},p.hasCssClass=function(o,t){var e=(o.className+"").split(/\s+/g);return e.indexOf(t)!==-1},p.addCssClass=function(o,t){p.hasCssClass(o,t)||(o.className+=" "+t)},p.removeCssClass=function(o,t){for(var e=o.className.split(/\s+/g);;){var n=e.indexOf(t);if(n==-1)break;e.splice(n,1)}o.className=e.join(" ")},p.toggleCssClass=function(o,t){for(var e=o.className.split(/\s+/g),n=!0;;){var s=e.indexOf(t);if(s==-1)break;n=!1,e.splice(s,1)}return n&&e.push(t),o.className=e.join(" "),n},p.setCssClass=function(o,t,e){e?p.addCssClass(o,t):p.removeCssClass(o,t)},p.hasCssString=function(o,t){var e=0,n;if(t=t||document,n=t.querySelectorAll("style")){for(;e<n.length;)if(n[e++].id===o)return!0}},p.removeElementById=function(o,t){t=t||document,t.getElementById(o)&&t.getElementById(o).remove()};var _,a=[];p.useStrictCSP=function(o){_=o,o==!1?h():a||(a=[])};function h(){var o=a;a=null,o&&o.forEach(function(t){i(t[0],t[1])})}function i(o,t,e){if(!(typeof document>"u")){if(a){if(e)h();else if(e===!1)return a.push([o,t])}if(!_){var n=e;!e||!e.getRootNode?n=document:(n=e.getRootNode(),(!n||n==e)&&(n=document));var s=n.ownerDocument||n;if(t&&p.hasCssString(t,n))return null;t&&(o+=`
|
4
|
+
/*# sourceURL=ace/css/`+t+" */");var f=p.createElement("style");f.appendChild(s.createTextNode(o)),t&&(f.id=t),n==s&&(n=p.getDocumentHead(s)),n.insertBefore(f,n.firstChild)}}}if(p.importCssString=i,p.importCssStylsheet=function(o,t){p.buildDom(["link",{rel:"stylesheet",href:o}],p.getDocumentHead(t))},p.scrollbarWidth=function(o){var t=p.createElement("ace_inner");t.style.width="100%",t.style.minWidth="0px",t.style.height="200px",t.style.display="block";var e=p.createElement("ace_outer"),n=e.style;n.position="absolute",n.left="-10000px",n.overflow="hidden",n.width="200px",n.minWidth="0px",n.height="150px",n.display="block",e.appendChild(t);var s=o&&o.documentElement||document&&document.documentElement;if(!s)return 0;s.appendChild(e);var f=t.offsetWidth;n.overflow="scroll";var m=t.offsetWidth;return f===m&&(m=e.clientWidth),s.removeChild(e),f-m},p.computedStyle=function(o,t){return window.getComputedStyle(o,"")||{}},p.setStyle=function(o,t,e){o[t]!==e&&(o[t]=e)},p.HAS_CSS_ANIMATION=!1,p.HAS_CSS_TRANSFORMS=!1,p.HI_DPI=E.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,E.isChromeOS&&(p.HI_DPI=!1),typeof document<"u"){var r=document.createElement("div");p.HI_DPI&&r.style.transform!==void 0&&(p.HAS_CSS_TRANSFORMS=!0),!E.isEdge&&typeof r.style.animationName<"u"&&(p.HAS_CSS_ANIMATION=!0),r=null}p.HAS_CSS_TRANSFORMS?p.translate=function(o,t,e){o.style.transform="translate("+Math.round(t)+"px, "+Math.round(e)+"px)"}:p.translate=function(o,t,e){o.style.top=Math.round(e)+"px",o.style.left=Math.round(t)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(g,p,se){/*
|
5
|
+
* based on code from:
|
6
|
+
*
|
7
|
+
* @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
|
8
|
+
* Available via the MIT or new BSD license.
|
9
|
+
* see: http://github.com/jrburke/requirejs for details
|
10
|
+
*/var E=g("./dom");p.get=function(S,_){var a=new XMLHttpRequest;a.open("GET",S,!0),a.onreadystatechange=function(){a.readyState===4&&_(a.responseText)},a.send(null)},p.loadScript=function(S,_){var a=E.getDocumentHead(),h=document.createElement("script");h.src=S,a.appendChild(h),h.onload=h.onreadystatechange=function(i,r){(r||!h.readyState||h.readyState=="loaded"||h.readyState=="complete")&&(h=h.onload=h.onreadystatechange=null,r||_())}},p.qualifyURL=function(S){var _=document.createElement("a");return _.href=S,_.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(g,p,se){p.inherits=function(E,S){E.super_=S,E.prototype=Object.create(S.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}})},p.mixin=function(E,S){for(var _ in S)E[_]=S[_];return E},p.implement=function(E,S){p.mixin(E,S)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(g,p,se){var E={},S=function(){this.propagationStopped=!0},_=function(){this.defaultPrevented=!0};E._emit=E._dispatchEvent=function(a,h){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var i=this._eventRegistry[a]||[],r=this._defaultHandlers[a];if(!(!i.length&&!r)){(typeof h!="object"||!h)&&(h={}),h.type||(h.type=a),h.stopPropagation||(h.stopPropagation=S),h.preventDefault||(h.preventDefault=_),i=i.slice();for(var o=0;o<i.length&&(i[o](h,this),!h.propagationStopped);o++);if(r&&!h.defaultPrevented)return r(h,this)}},E._signal=function(a,h){var i=(this._eventRegistry||{})[a];if(i){i=i.slice();for(var r=0;r<i.length;r++)i[r](h,this)}},E.once=function(a,h){var i=this;if(this.on(a,function r(){i.off(a,r),h.apply(null,arguments)}),!h)return new Promise(function(r){h=r})},E.setDefaultHandler=function(a,h){var i=this._defaultHandlers;if(i||(i=this._defaultHandlers={_disabled_:{}}),i[a]){var r=i[a],o=i._disabled_[a];o||(i._disabled_[a]=o=[]),o.push(r);var t=o.indexOf(h);t!=-1&&o.splice(t,1)}i[a]=h},E.removeDefaultHandler=function(a,h){var i=this._defaultHandlers;if(i){var r=i._disabled_[a];if(i[a]==h)r&&this.setDefaultHandler(a,r.pop());else if(r){var o=r.indexOf(h);o!=-1&&r.splice(o,1)}}},E.on=E.addEventListener=function(a,h,i){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[a];return r||(r=this._eventRegistry[a]=[]),r.indexOf(h)==-1&&r[i?"unshift":"push"](h),h},E.off=E.removeListener=E.removeEventListener=function(a,h){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[a];if(i){var r=i.indexOf(h);r!==-1&&i.splice(r,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)},p.EventEmitter=E}),ace.define("ace/lib/report_error",["require","exports","module"],function(g,p,se){p.reportError=function(S,_){var a=new Error(S);a.data=_,typeof console=="object"&&console.error&&console.error(a),setTimeout(function(){throw a})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(g,p,se){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"};p.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(g,p,se){"no use strict";var E=g("./oop"),S=g("./event_emitter").EventEmitter,_=g("./report_error").reportError,a=g("./default_english_messages").defaultEnglishMessages,h={setOptions:function(e){Object.keys(e).forEach(function(n){this.setOption(n,e[n])},this)},getOptions:function(e){var n={};if(e)Array.isArray(e)||(n=e,e=Object.keys(n));else{var s=this.$options;e=Object.keys(s).filter(function(f){return!s[f].hidden})}return e.forEach(function(f){n[f]=this.getOption(f)},this),n},setOption:function(e,n){if(this["$"+e]!==n){var s=this.$options[e];if(!s)return i('misspelled option "'+e+'"');if(s.forwardTo)return this[s.forwardTo]&&this[s.forwardTo].setOption(e,n);s.handlesSet||(this["$"+e]=n),s&&s.set&&s.set.call(this,n)}},getOption:function(e){var n=this.$options[e];return n?n.forwardTo?this[n.forwardTo]&&this[n.forwardTo].getOption(e):n&&n.get?n.get.call(this):this["$"+e]:i('misspelled option "'+e+'"')}};function i(e){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var r,o,t=function(){function e(){this.$defaultOptions={},r=a,o="dollarSigns"}return e.prototype.defineOptions=function(n,s,f){return n.$options||(this.$defaultOptions[s]=n.$options={}),Object.keys(f).forEach(function(m){var x=f[m];typeof x=="string"&&(x={forwardTo:x}),x.name||(x.name=m),n.$options[x.name]=x,"initialValue"in x&&(n["$"+x.name]=x.initialValue)}),E.implement(n,h),this},e.prototype.resetOptions=function(n){Object.keys(n.$options).forEach(function(s){var f=n.$options[s];"value"in f&&n.setOption(s,f.value)})},e.prototype.setDefaultValue=function(n,s,f){if(!n){for(n in this.$defaultOptions)if(this.$defaultOptions[n][s])break;if(!this.$defaultOptions[n][s])return!1}var m=this.$defaultOptions[n]||(this.$defaultOptions[n]={});m[s]&&(m.forwardTo?this.setDefaultValue(m.forwardTo,s,f):m[s].value=f)},e.prototype.setDefaultValues=function(n,s){Object.keys(s).forEach(function(f){this.setDefaultValue(n,f,s[f])},this)},e.prototype.setMessages=function(n,s){r=n,s&&s.placeholders&&(o=s.placeholders)},e.prototype.nls=function(n,s,f){r[n]||(i("No message found for the key '"+n+"' in messages with id "+r.$id+", trying to find a translation for the default string '"+s+"'."),r[s]||i("No message found for the default string '"+s+"' in the provided messages. Falling back to the default English message."));var m=r[n]||r[s]||s;return f&&(o==="dollarSigns"&&(m=m.replace(/\$(\$|[\d]+)/g,function(x,A){return A=="$"?"$":f[A]})),o==="curlyBrackets"&&(m=m.replace(/\{([^\}]+)\}/g,function(x,A){return f[A]}))),m},e}();t.prototype.warn=i,t.prototype.reportError=_,E.implement(t.prototype,S),p.AppConfig=t}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(g,p,se){se.exports=`.ace-tm .ace_gutter {
|
11
|
+
background: #f0f0f0;
|
12
|
+
color: #333;
|
13
|
+
}
|
14
|
+
|
15
|
+
.ace-tm .ace_print-margin {
|
16
|
+
width: 1px;
|
17
|
+
background: #e8e8e8;
|
18
|
+
}
|
19
|
+
|
20
|
+
.ace-tm .ace_fold {
|
21
|
+
background-color: #6B72E6;
|
22
|
+
}
|
23
|
+
|
24
|
+
.ace-tm {
|
25
|
+
background-color: #FFFFFF;
|
26
|
+
color: black;
|
27
|
+
}
|
28
|
+
|
29
|
+
.ace-tm .ace_cursor {
|
30
|
+
color: black;
|
31
|
+
}
|
32
|
+
|
33
|
+
.ace-tm .ace_invisible {
|
34
|
+
color: rgb(191, 191, 191);
|
35
|
+
}
|
36
|
+
|
37
|
+
.ace-tm .ace_storage,
|
38
|
+
.ace-tm .ace_keyword {
|
39
|
+
color: blue;
|
40
|
+
}
|
41
|
+
|
42
|
+
.ace-tm .ace_constant {
|
43
|
+
color: rgb(197, 6, 11);
|
44
|
+
}
|
45
|
+
|
46
|
+
.ace-tm .ace_constant.ace_buildin {
|
47
|
+
color: rgb(88, 72, 246);
|
48
|
+
}
|
49
|
+
|
50
|
+
.ace-tm .ace_constant.ace_language {
|
51
|
+
color: rgb(88, 92, 246);
|
52
|
+
}
|
53
|
+
|
54
|
+
.ace-tm .ace_constant.ace_library {
|
55
|
+
color: rgb(6, 150, 14);
|
56
|
+
}
|
57
|
+
|
58
|
+
.ace-tm .ace_invalid {
|
59
|
+
background-color: rgba(255, 0, 0, 0.1);
|
60
|
+
color: red;
|
61
|
+
}
|
62
|
+
|
63
|
+
.ace-tm .ace_support.ace_function {
|
64
|
+
color: rgb(60, 76, 114);
|
65
|
+
}
|
66
|
+
|
67
|
+
.ace-tm .ace_support.ace_constant {
|
68
|
+
color: rgb(6, 150, 14);
|
69
|
+
}
|
70
|
+
|
71
|
+
.ace-tm .ace_support.ace_type,
|
72
|
+
.ace-tm .ace_support.ace_class {
|
73
|
+
color: rgb(109, 121, 222);
|
74
|
+
}
|
75
|
+
|
76
|
+
.ace-tm .ace_keyword.ace_operator {
|
77
|
+
color: rgb(104, 118, 135);
|
78
|
+
}
|
79
|
+
|
80
|
+
.ace-tm .ace_string {
|
81
|
+
color: rgb(3, 106, 7);
|
82
|
+
}
|
83
|
+
|
84
|
+
.ace-tm .ace_comment {
|
85
|
+
color: rgb(76, 136, 107);
|
86
|
+
}
|
87
|
+
|
88
|
+
.ace-tm .ace_comment.ace_doc {
|
89
|
+
color: rgb(0, 102, 255);
|
90
|
+
}
|
91
|
+
|
92
|
+
.ace-tm .ace_comment.ace_doc.ace_tag {
|
93
|
+
color: rgb(128, 159, 191);
|
94
|
+
}
|
95
|
+
|
96
|
+
.ace-tm .ace_constant.ace_numeric {
|
97
|
+
color: rgb(0, 0, 205);
|
98
|
+
}
|
99
|
+
|
100
|
+
.ace-tm .ace_variable {
|
101
|
+
color: rgb(49, 132, 149);
|
102
|
+
}
|
103
|
+
|
104
|
+
.ace-tm .ace_xml-pe {
|
105
|
+
color: rgb(104, 104, 91);
|
106
|
+
}
|
107
|
+
|
108
|
+
.ace-tm .ace_entity.ace_name.ace_function {
|
109
|
+
color: #0000A2;
|
110
|
+
}
|
111
|
+
|
112
|
+
|
113
|
+
.ace-tm .ace_heading {
|
114
|
+
color: rgb(12, 7, 255);
|
115
|
+
}
|
116
|
+
|
117
|
+
.ace-tm .ace_list {
|
118
|
+
color:rgb(185, 6, 144);
|
119
|
+
}
|
120
|
+
|
121
|
+
.ace-tm .ace_meta.ace_tag {
|
122
|
+
color:rgb(0, 22, 142);
|
123
|
+
}
|
124
|
+
|
125
|
+
.ace-tm .ace_string.ace_regex {
|
126
|
+
color: rgb(255, 0, 0)
|
127
|
+
}
|
128
|
+
|
129
|
+
.ace-tm .ace_marker-layer .ace_selection {
|
130
|
+
background: rgb(181, 213, 255);
|
131
|
+
}
|
132
|
+
.ace-tm.ace_multiselect .ace_selection.ace_start {
|
133
|
+
box-shadow: 0 0 3px 0px white;
|
134
|
+
}
|
135
|
+
.ace-tm .ace_marker-layer .ace_step {
|
136
|
+
background: rgb(252, 255, 0);
|
137
|
+
}
|
138
|
+
|
139
|
+
.ace-tm .ace_marker-layer .ace_stack {
|
140
|
+
background: rgb(164, 229, 101);
|
141
|
+
}
|
142
|
+
|
143
|
+
.ace-tm .ace_marker-layer .ace_bracket {
|
144
|
+
margin: -1px 0 0 -1px;
|
145
|
+
border: 1px solid rgb(192, 192, 192);
|
146
|
+
}
|
147
|
+
|
148
|
+
.ace-tm .ace_marker-layer .ace_active-line {
|
149
|
+
background: rgba(0, 0, 0, 0.07);
|
150
|
+
}
|
151
|
+
|
152
|
+
.ace-tm .ace_gutter-active-line {
|
153
|
+
background-color : #dcdcdc;
|
154
|
+
}
|
155
|
+
|
156
|
+
.ace-tm .ace_marker-layer .ace_selected-word {
|
157
|
+
background: rgb(250, 250, 255);
|
158
|
+
border: 1px solid rgb(200, 200, 250);
|
159
|
+
}
|
160
|
+
|
161
|
+
.ace-tm .ace_indent-guide {
|
162
|
+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
|
163
|
+
}
|
164
|
+
|
165
|
+
.ace-tm .ace_indent-guide-active {
|
166
|
+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
|
167
|
+
}
|
168
|
+
`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(g,p,se){p.isDark=!1,p.cssClass="ace-tm",p.cssText=g("./textmate-css"),p.$id="ace/theme/textmate";var E=g("../lib/dom");E.importCssString(p.cssText,p.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(g,p,se){"no use strict";var E=g("./lib/lang"),S=g("./lib/net"),_=g("./lib/dom"),a=g("./lib/app_config").AppConfig;se.exports=p=new a;var h={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};p.get=function(t){if(!h.hasOwnProperty(t))throw new Error("Unknown config key: "+t);return h[t]},p.set=function(t,e){if(h.hasOwnProperty(t))h[t]=e;else if(this.setDefaultValue("",t,e)==!1)throw new Error("Unknown config key: "+t);t=="useStrictCSP"&&_.useStrictCSP(e)},p.all=function(){return E.copyObject(h)},p.$modes={},p.moduleUrl=function(t,e){if(h.$moduleUrls[t])return h.$moduleUrls[t];var n=t.split("/");e=e||n[n.length-2]||"";var s=e=="snippets"?"/":"-",f=n[n.length-1];if(e=="worker"&&s=="-"){var m=new RegExp("^"+e+"[\\-_]|[\\-_]"+e+"$","g");f=f.replace(m,"")}(!f||f==e)&&n.length>1&&(f=n[n.length-2]);var x=h[e+"Path"];return x==null?x=h.basePath:s=="/"&&(e=s=""),x&&x.slice(-1)!="/"&&(x+="/"),x+e+s+f+this.get("suffix")},p.setModuleUrl=function(t,e){return h.$moduleUrls[t]=e};var i=function(t,e){if(t==="ace/theme/textmate"||t==="./theme/textmate")return e(null,g("./theme/textmate"));if(r)return r(t,e);console.error("loader is not configured")},r;p.setLoader=function(t){r=t},p.dynamicModules=Object.create(null),p.$loading={},p.$loaded={},p.loadModule=function(t,e){var n;if(Array.isArray(t))var s=t[0],f=t[1];else if(typeof t=="string")var f=t;var m=function(x){if(x&&!p.$loading[f])return e&&e(x);if(p.$loading[f]||(p.$loading[f]=[]),p.$loading[f].push(e),!(p.$loading[f].length>1)){var A=function(){i(f,function(C,b){b&&(p.$loaded[f]=b),p._emit("load.module",{name:f,module:b});var G=p.$loading[f];p.$loading[f]=null,G.forEach(function(Se){Se&&Se(b)})})};if(!p.get("packaged"))return A();S.loadScript(p.moduleUrl(f,s),A),o()}};if(p.dynamicModules[f])p.dynamicModules[f]().then(function(x){x.default?m(x.default):m(x)});else{try{n=this.$require(f)}catch{}m(n||p.$loaded[f])}},p.$require=function(t){if(typeof se.require=="function"){var e="require";return se[e](t)}},p.setModuleLoader=function(t,e){p.dynamicModules[t]=e};var o=function(){!h.basePath&&!h.workerPath&&!h.modePath&&!h.themePath&&!Object.keys(h.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),o=function(){})};p.version="1.40.1"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(g,p,se){g("./lib/fixoldbrowsers");var E=g("./config");E.setLoader(function(h,i){g([h],function(r){i(null,r)})});var S=function(){return this||typeof window<"u"&&window}();se.exports=function(h){E.init=_,E.$require=g,h.require=g},_(!0);function _(h){if(!(!S||!S.document)){E.set("packaged",h||g.packaged||se.packaged||S.define&&(void 0).packaged);var i={},r="",o=document.currentScript||document._currentScript,t=o&&o.ownerDocument||document;o&&o.src&&(r=o.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var e=t.getElementsByTagName("script"),n=0;n<e.length;n++){var s=e[n],f=s.src||s.getAttribute("src");if(f){for(var m=s.attributes,x=0,A=m.length;x<A;x++){var C=m[x];C.name.indexOf("data-ace-")===0&&(i[a(C.name.replace(/^data-ace-/,""))]=C.value)}var b=f.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);b&&(r=b[1])}}r&&(i.base=i.base||r,i.packaged=!0),i.basePath=i.base,i.workerPath=i.workerPath||i.base,i.modePath=i.modePath||i.base,i.themePath=i.themePath||i.base,delete i.base;for(var G in i)typeof i[G]<"u"&&E.set(G,i[G])}}function a(h){return h.replace(/-(.)/g,function(i,r){return r.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(g,p,se){var E=function(){function S(_,a,h,i){this.start={row:_,column:a},this.end={row:h,column:i}}return S.prototype.isEqual=function(_){return this.start.row===_.start.row&&this.end.row===_.end.row&&this.start.column===_.start.column&&this.end.column===_.end.column},S.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},S.prototype.contains=function(_,a){return this.compare(_,a)==0},S.prototype.compareRange=function(_){var a,h=_.end,i=_.start;return a=this.compare(h.row,h.column),a==1?(a=this.compare(i.row,i.column),a==1?2:a==0?1:0):a==-1?-2:(a=this.compare(i.row,i.column),a==-1?-1:a==1?42:0)},S.prototype.comparePoint=function(_){return this.compare(_.row,_.column)},S.prototype.containsRange=function(_){return this.comparePoint(_.start)==0&&this.comparePoint(_.end)==0},S.prototype.intersects=function(_){var a=this.compareRange(_);return a==-1||a==0||a==1},S.prototype.isEnd=function(_,a){return this.end.row==_&&this.end.column==a},S.prototype.isStart=function(_,a){return this.start.row==_&&this.start.column==a},S.prototype.setStart=function(_,a){typeof _=="object"?(this.start.column=_.column,this.start.row=_.row):(this.start.row=_,this.start.column=a)},S.prototype.setEnd=function(_,a){typeof _=="object"?(this.end.column=_.column,this.end.row=_.row):(this.end.row=_,this.end.column=a)},S.prototype.inside=function(_,a){return this.compare(_,a)==0?!(this.isEnd(_,a)||this.isStart(_,a)):!1},S.prototype.insideStart=function(_,a){return this.compare(_,a)==0?!this.isEnd(_,a):!1},S.prototype.insideEnd=function(_,a){return this.compare(_,a)==0?!this.isStart(_,a):!1},S.prototype.compare=function(_,a){return!this.isMultiLine()&&_===this.start.row?a<this.start.column?-1:a>this.end.column?1:0:_<this.start.row?-1:_>this.end.row?1:this.start.row===_?a>=this.start.column?0:-1:this.end.row===_?a<=this.end.column?0:1:0},S.prototype.compareStart=function(_,a){return this.start.row==_&&this.start.column==a?-1:this.compare(_,a)},S.prototype.compareEnd=function(_,a){return this.end.row==_&&this.end.column==a?1:this.compare(_,a)},S.prototype.compareInside=function(_,a){return this.end.row==_&&this.end.column==a?1:this.start.row==_&&this.start.column==a?-1:this.compare(_,a)},S.prototype.clipRows=function(_,a){if(this.end.row>a)var h={row:a+1,column:0};else if(this.end.row<_)var h={row:_,column:0};if(this.start.row>a)var i={row:a+1,column:0};else if(this.start.row<_)var i={row:_,column:0};return S.fromPoints(i||this.start,h||this.end)},S.prototype.extend=function(_,a){var h=this.compare(_,a);if(h==0)return this;if(h==-1)var i={row:_,column:a};else var r={row:_,column:a};return S.fromPoints(i||this.start,r||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(_){var a=_.documentToScreenPosition(this.start),h=_.documentToScreenPosition(this.end);return new S(a.row,a.column,h.row,h.column)},S.prototype.moveBy=function(_,a){this.start.row+=_,this.start.column+=a,this.end.row+=_,this.end.column+=a},S}();E.fromPoints=function(S,_){return new E(S.row,S.column,_.row,_.column)},E.comparePoints=function(S,_){return S.row-_.row||S.column-_.column},p.Range=E}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(g,p,se){for(var E=g("./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:"*"}},_={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++)_["Digit"+a]=48+a,_["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 h=String.fromCharCode(a+32);_["Key"+h.toUpperCase()]=a,S.PRINTABLE_KEYS[a]=h}for(var a=1;a<13;a++)_["F"+a]=111+a,S.FUNCTION_KEYS[111+a]="F"+a;var i={Shift:16,Control:17,Alt:18,Meta:224};for(var r in i)_[r]=_[r+"Left"]=_[r+"Right"]=i[r];p.$codeToKeyCode=_,S.PRINTABLE_KEYS[173]="-";for(var o in S.FUNCTION_KEYS){var t=S.FUNCTION_KEYS[o].toLowerCase();S[t]=parseInt(o,10)}for(var o in S.PRINTABLE_KEYS){var t=S.PRINTABLE_KEYS[o].toLowerCase();S[t]=parseInt(o,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"],n=Math.pow(2,e.length);n--;)S.KEY_MODS[n]=e.filter(function(s){return n&S.KEY_MODS[s]}).join("-")+"-"}(),S.KEY_MODS[0]="",S.KEY_MODS[-1]="input-",E.mixin(p,S),p.default=p,p.keyCodeToString=function(e){var n=S[e];return typeof n!="string"&&(n=String.fromCharCode(e)),n.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(g,p,se){var E=g("./keys"),S=g("./useragent"),_=null,a=0,h;function i(){h=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return h={passive:!1},!0}})}catch{}}function r(){return h==null&&i(),h}function o(x,A,C){this.elem=x,this.type=A,this.callback=C}o.prototype.destroy=function(){e(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var t=p.addListener=function(x,A,C,b){x.addEventListener(A,C,r()),b&&b.$toDestroy.push(new o(x,A,C))},e=p.removeListener=function(x,A,C){x.removeEventListener(A,C,r())};p.stopEvent=function(x){return p.stopPropagation(x),p.preventDefault(x),!1},p.stopPropagation=function(x){x.stopPropagation&&x.stopPropagation()},p.preventDefault=function(x){x.preventDefault&&x.preventDefault()},p.getButton=function(x){return x.type=="dblclick"?0:x.type=="contextmenu"||S.isMac&&x.ctrlKey&&!x.altKey&&!x.shiftKey?2:x.button},p.capture=function(x,A,C){var b=x&&x.ownerDocument||document;function G(Se){A&&A(Se),C&&C(Se),e(b,"mousemove",A),e(b,"mouseup",G),e(b,"dragstart",G)}return t(b,"mousemove",A),t(b,"mouseup",G),t(b,"dragstart",G),G},p.addMouseWheelListener=function(x,A,C){t(x,"wheel",function(b){var G=.15,Se=b.deltaX||0,q=b.deltaY||0;switch(b.deltaMode){case b.DOM_DELTA_PIXEL:b.wheelX=Se*G,b.wheelY=q*G;break;case b.DOM_DELTA_LINE:var U=15;b.wheelX=Se*U,b.wheelY=q*U;break;case b.DOM_DELTA_PAGE:var at=150;b.wheelX=Se*at,b.wheelY=q*at;break}A(b)},C)},p.addMultiMouseDownListener=function(x,A,C,b,G){var Se=0,q,U,at,j={2:"dblclick",3:"tripleclick",4:"quadclick"};function W(y){if(p.getButton(y)!==0?Se=0:y.detail>1?(Se++,Se>4&&(Se=1)):Se=1,S.isIE){var v=Math.abs(y.clientX-q)>5||Math.abs(y.clientY-U)>5;(!at||v)&&(Se=1),at&&clearTimeout(at),at=setTimeout(function(){at=null},A[Se-1]||600),Se==1&&(q=y.clientX,U=y.clientY)}if(y._clicks=Se,C[b]("mousedown",y),Se>4)Se=0;else if(Se>1)return C[b](j[Se],y)}Array.isArray(x)||(x=[x]),x.forEach(function(y){t(y,"mousedown",W,G)})};function n(x){return 0|(x.ctrlKey?1:0)|(x.altKey?2:0)|(x.shiftKey?4:0)|(x.metaKey?8:0)}p.getModifierString=function(x){return E.KEY_MODS[n(x)]};function s(x,A,C){var b=n(A);if(!C&&A.code&&(C=E.$codeToKeyCode[A.code]||C),!S.isMac&&_){if(A.getModifierState&&(A.getModifierState("OS")||A.getModifierState("Win"))&&(b|=8),_.altGr)if((3&b)!=3)_.altGr=0;else return;if(C===18||C===17){var G=A.location;if(C===17&&G===1)_[C]==1&&(a=A.timeStamp);else if(C===18&&b===3&&G===2){var Se=A.timeStamp-a;Se<50&&(_.altGr=!0)}}}if(C in E.MODIFIER_KEYS&&(C=-1),!(!b&&C===13&&A.location===3&&(x(A,b,-C),A.defaultPrevented))){if(S.isChromeOS&&b&8){if(x(A,b,C),A.defaultPrevented)return;b&=-9}return!b&&!(C in E.FUNCTION_KEYS)&&!(C in E.PRINTABLE_KEYS)?!1:x(A,b,C)}}p.addCommandKeyListener=function(x,A,C){var b=null;t(x,"keydown",function(G){_[G.keyCode]=(_[G.keyCode]||0)+1;var Se=s(A,G,G.keyCode);return b=G.defaultPrevented,Se},C),t(x,"keypress",function(G){b&&(G.ctrlKey||G.altKey||G.shiftKey||G.metaKey)&&(p.stopEvent(G),b=null)},C),t(x,"keyup",function(G){_[G.keyCode]=null},C),_||(f(),t(window,"focus",f))};function f(){_=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!S.isOldIE){var m=1;p.nextTick=function(x,A){A=A||window;var C="zero-timeout-message-"+m++,b=function(G){G.data==C&&(p.stopPropagation(G),e(A,"message",b),x())};t(A,"message",b),A.postMessage(C,"*")}}p.$idleBlocked=!1,p.onIdle=function(x,A){return setTimeout(function C(){p.$idleBlocked?setTimeout(C,100):x()},A)},p.$idleBlockId=null,p.blockIdle=function(x){p.$idleBlockId&&clearTimeout(p.$idleBlockId),p.$idleBlocked=!0,p.$idleBlockId=setTimeout(function(){p.$idleBlocked=!1},x||100)},p.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),p.nextFrame?p.nextFrame=p.nextFrame.bind(window):p.nextFrame=function(x){setTimeout(x,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(g,p,se){var E;se.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(g,p,se){var E=g("../lib/event"),S=g("../config").nls,_=g("../lib/useragent"),a=g("../lib/dom"),h=g("../lib/lang"),i=g("../clipboard"),r=_.isChrome<18,o=_.isIE,t=_.isChrome>63,e=400,n=g("../lib/keys"),s=n.KEY_MODS,f=_.isIOS,m=f?/\s/:/\n/,x=_.isMobile,A;A=function(C,b){var G=a.createElement("textarea");G.className="ace_text-input",G.setAttribute("wrap","off"),G.setAttribute("autocorrect","off"),G.setAttribute("autocapitalize","off"),G.setAttribute("spellcheck","false"),G.style.opacity="0",C.insertBefore(G,C.firstChild);var Se=!1,q=!1,U=!1,at=!1,j="";x||(G.style.fontSize="1px");var W=!1,y=!1,v="",D=0,Ee=0,qe=0,ot=Number.MAX_SAFE_INTEGER,lt=Number.MIN_SAFE_INTEGER,ct=0;try{var Ut=document.activeElement===G}catch{}this.setNumberOfExtraLines=function(Jt){if(ot=Number.MAX_SAFE_INTEGER,lt=Number.MIN_SAFE_INTEGER,Jt<0){ct=0;return}ct=Jt},this.setAriaLabel=function(){var Jt="";if(b.$textInputAriaLabel&&(Jt+="".concat(b.$textInputAriaLabel,", ")),b.session){var gi=b.session.selection.cursor.row;Jt+=S("text-input.aria-label","Cursor at row $0",[gi+1])}G.setAttribute("aria-label",Jt)},this.setAriaOptions=function(Jt){Jt.activeDescendant?(G.setAttribute("aria-haspopup","true"),G.setAttribute("aria-autocomplete",Jt.inline?"both":"list"),G.setAttribute("aria-activedescendant",Jt.activeDescendant)):(G.setAttribute("aria-haspopup","false"),G.setAttribute("aria-autocomplete","both"),G.removeAttribute("aria-activedescendant")),Jt.role&&G.setAttribute("role",Jt.role),Jt.setLabel&&(G.setAttribute("aria-roledescription",S("text-input.aria-roledescription","editor")),this.setAriaLabel())},this.setAriaOptions({role:"textbox"}),E.addListener(G,"blur",function(Jt){y||(b.onBlur(Jt),Ut=!1)},b),E.addListener(G,"focus",function(Jt){if(!y){if(Ut=!0,_.isEdge)try{if(!document.hasFocus())return}catch{}b.onFocus(Jt),_.isEdge?setTimeout(zt):zt()}},b),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:b.renderer.enableKeyboardAccessibility}),j||t||this.$focusScroll=="browser")return G.focus({preventScroll:!0});var Jt=G.style.top;G.style.position="fixed",G.style.top="0px";try{var gi=G.getBoundingClientRect().top!=0}catch{return}var mi=[];if(gi)for(var yi=G.parentElement;yi&&yi.nodeType==1;)mi.push(yi),yi.setAttribute("ace_nocontext","true"),!yi.parentElement&&yi.getRootNode?yi=yi.getRootNode().host:yi=yi.parentElement;G.focus({preventScroll:!0}),gi&&mi.forEach(function(bi){bi.removeAttribute("ace_nocontext")}),setTimeout(function(){G.style.position="",G.style.top=="0px"&&(G.style.top=Jt)},0)},this.blur=function(){G.blur()},this.isFocused=function(){return Ut},b.on("beforeEndOperation",function(){var Jt=b.curOp,gi=Jt&&Jt.command&&Jt.command.name;if(gi!="insertstring"){var mi=gi&&(Jt.docChanged||Jt.selectionChanged);U&&mi&&(v=G.value="",Ri()),zt()}}),b.on("changeSelection",this.setAriaLabel);var Mt=function(Jt,gi){for(var mi=gi,yi=1;yi<=Jt-ot&&yi<2*ct+1;yi++)mi+=b.session.getLine(Jt-yi).length+1;return mi},zt=f?function(Jt){if(!(!Ut||Se&&!Jt||at)){Jt||(Jt="");var gi=`
|
169
|
+
ab`+Jt+`cde fg
|
170
|
+
`;gi!=G.value&&(G.value=v=gi);var mi=4,yi=4+(Jt.length||(b.selection.isEmpty()?0:1));(D!=mi||Ee!=yi)&&G.setSelectionRange(mi,yi),D=mi,Ee=yi}}:function(){if(!(U||at)&&!(!Ut&&!ui)){U=!0;var Jt=0,gi=0,mi="";if(b.session){var yi=b.selection,bi=yi.getRange(),xi=yi.cursor.row;xi===lt+1?(ot=lt+1,lt=ot+2*ct):xi===ot-1?(lt=ot-1,ot=lt-2*ct):(xi<ot-1||xi>lt+1)&&(ot=xi>ct?xi-ct:0,lt=xi>ct?xi+ct:2*ct);for(var ki=[],Ai=ot;Ai<=lt;Ai++)ki.push(b.session.getLine(Ai));if(mi=ki.join(`
|
171
|
+
`),Jt=Mt(bi.start.row,bi.start.column),gi=Mt(bi.end.row,bi.end.column),bi.start.row<ot){var Si=b.session.getLine(ot-1);Jt=bi.start.row<ot-1?0:Jt,gi+=Si.length+1,mi=Si+`
|
172
|
+
`+mi}else if(bi.end.row>lt){var Ci=b.session.getLine(lt+1);gi=bi.end.row>lt+1?Ci.length:bi.end.column,gi+=mi.length+1,mi=mi+`
|
173
|
+
`+Ci}else x&&xi>0&&(mi=`
|
174
|
+
`+mi,gi+=1,Jt+=1);mi.length>e&&(Jt<e&&gi<e?mi=mi.slice(0,e):(mi=`
|
175
|
+
`,Jt==gi?Jt=gi=0:(Jt=0,gi=1)));var Ei=mi+`
|
176
|
+
|
177
|
+
`;Ei!=v&&(G.value=v=Ei,D=Ee=Ei.length)}if(ui&&(D=G.selectionStart,Ee=G.selectionEnd),Ee!=gi||D!=Jt||G.selectionEnd!=Ee)try{G.setSelectionRange(Jt,gi),D=Jt,Ee=gi}catch{}U=!1}};this.resetSelection=zt,Ut&&b.onFocus();var Ht=function(Jt){return Jt.selectionStart===0&&Jt.selectionEnd>=v.length&&Jt.value===v&&v&&Jt.selectionEnd!==Ee},Vt=function(Jt){U||(Se?Se=!1:Ht(G)?(b.selectAll(),zt()):x&&G.selectionStart!=D&&zt())},hi=null;this.setInputHandler=function(Jt){hi=Jt},this.getInputHandler=function(){return hi};var ui=!1,fi=function(Jt,gi){if(ui&&(ui=!1),q)return zt(),Jt&&b.onPaste(Jt),q=!1,"";for(var mi=G.selectionStart,yi=G.selectionEnd,bi=D,xi=v.length-Ee,ki=Jt,Ai=Jt.length-mi,Si=Jt.length-yi,Ci=0;bi>0&&v[Ci]==Jt[Ci];)Ci++,bi--;for(ki=ki.slice(Ci),Ci=1;xi>0&&v.length-Ci>D-1&&v[v.length-Ci]==Jt[Jt.length-Ci];)Ci++,xi--;Ai-=Ci-1,Si-=Ci-1;var Ei=ki.length-Ci+1;if(Ei<0&&(bi=-Ei,Ei=0),ki=ki.slice(0,Ei),!gi&&!ki&&!Ai&&!bi&&!xi&&!Si)return"";at=!0;var Ii=!1;return _.isAndroid&&ki==". "&&(ki=" ",Ii=!0),ki&&!bi&&!xi&&!Ai&&!Si||W?b.onTextInput(ki):b.onTextInput(ki,{extendLeft:bi,extendRight:xi,restoreStart:Ai,restoreEnd:Si}),at=!1,v=Jt,D=mi,Ee=yi,qe=Si,Ii?`
|
178
|
+
`:ki},di=function(Jt){if(U)return Li();if(Jt&&Jt.inputType){if(Jt.inputType=="historyUndo")return b.execCommand("undo");if(Jt.inputType=="historyRedo")return b.execCommand("redo")}var gi=G.value,mi=fi(gi,!0);(gi.length>e+100||m.test(mi)||x&&D<1&&D==Ee)&&zt()},vi=function(Jt,gi,mi){var yi=Jt.clipboardData||window.clipboardData;if(!(!yi||r)){var bi=o||mi?"Text":"text/plain";try{return gi?yi.setData(bi,gi)!==!1:yi.getData(bi)}catch(xi){if(!mi)return vi(xi,gi,!0)}}},wi=function(Jt,gi){var mi=b.getCopyText();if(!mi)return E.preventDefault(Jt);vi(Jt,mi)?(f&&(zt(mi),Se=mi,setTimeout(function(){Se=!1},10)),gi?b.onCut():b.onCopy(),E.preventDefault(Jt)):(Se=!0,G.value=mi,G.select(),setTimeout(function(){Se=!1,zt(),gi?b.onCut():b.onCopy()}))},_i=function(Jt){wi(Jt,!0)},Mi=function(Jt){wi(Jt,!1)},$i=function(Jt){var gi=vi(Jt);i.pasteCancelled()||(typeof gi=="string"?(gi&&b.onPaste(gi,Jt),_.isIE&&setTimeout(zt),E.preventDefault(Jt)):(G.value="",q=!0))};E.addCommandKeyListener(G,function(Jt,gi,mi){if(!U)return b.onCommandKey(Jt,gi,mi)},b),E.addListener(G,"select",Vt,b),E.addListener(G,"input",di,b),E.addListener(G,"cut",_i,b),E.addListener(G,"copy",Mi,b),E.addListener(G,"paste",$i,b),(!("oncut"in G)||!("oncopy"in G)||!("onpaste"in G))&&E.addListener(C,"keydown",function(Jt){if(!(_.isMac&&!Jt.metaKey||!Jt.ctrlKey))switch(Jt.keyCode){case 67:Mi(Jt);break;case 86:$i(Jt);break;case 88:_i(Jt);break}},b);var Ti=function(Jt){if(!(U||!b.onCompositionStart||b.$readOnly)&&(U={},!W)){Jt.data&&(U.useTextareaForIME=!1),setTimeout(Li,0),b._signal("compositionStart"),b.on("mousedown",Oi);var gi=b.getSelectionRange();gi.end.row=gi.start.row,gi.end.column=gi.start.column,U.markerRange=gi,U.selectionStart=D,b.onCompositionStart(U),U.useTextareaForIME?(v=G.value="",D=0,Ee=0):(G.msGetInputContext&&(U.context=G.msGetInputContext()),G.getInputContext&&(U.context=G.getInputContext()))}},Li=function(){if(!(!U||!b.onCompositionUpdate||b.$readOnly)){if(W)return Oi();if(U.useTextareaForIME)b.onCompositionUpdate(G.value);else{var Jt=G.value;fi(Jt),U.markerRange&&(U.context&&(U.markerRange.start.column=U.selectionStart=U.context.compositionStartOffset),U.markerRange.end.column=U.markerRange.start.column+Ee-U.selectionStart+qe)}}},Ri=function(Jt){!b.onCompositionEnd||b.$readOnly||(U=!1,b.onCompositionEnd(),b.off("mousedown",Oi),Jt&&di())};function Oi(){y=!0,G.blur(),G.focus(),y=!1}var Bi=h.delayedCall(Li,50).schedule.bind(null,null);function Pi(Jt){Jt.keyCode==27&&G.value.length<G.selectionStart&&(U||(v=G.value),D=Ee=-1,zt()),Bi()}E.addListener(G,"compositionstart",Ti,b),E.addListener(G,"compositionupdate",Li,b),E.addListener(G,"keyup",Pi,b),E.addListener(G,"keydown",Bi,b),E.addListener(G,"compositionend",Ri,b),this.getElement=function(){return G},this.setCommandMode=function(Jt){W=Jt,G.readOnly=!1},this.setReadOnly=function(Jt){W||(G.readOnly=Jt)},this.setCopyWithEmptySelection=function(Jt){},this.onContextMenu=function(Jt){ui=!0,zt(),b._emit("nativecontextmenu",{target:b,domEvent:Jt}),this.moveToMouse(Jt,!0)},this.moveToMouse=function(Jt,gi){j||(j=G.style.cssText),G.style.cssText=(gi?"z-index:100000;":"")+(_.isIE?"opacity:0.1;":"")+"text-indent: -"+(D+Ee)*b.renderer.characterWidth*.5+"px;";var mi=b.container.getBoundingClientRect(),yi=a.computedStyle(b.container),bi=mi.top+(parseInt(yi.borderTopWidth)||0),xi=mi.left+(parseInt(yi.borderLeftWidth)||0),ki=mi.bottom-bi-G.clientHeight-2,Ai=function(Si){a.translate(G,Si.clientX-xi-2,Math.min(Si.clientY-bi-2,ki))};Ai(Jt),Jt.type=="mousedown"&&(b.renderer.$isMousePressed=!0,clearTimeout(Di),_.isWin&&E.capture(b.container,Ai,Ni))},this.onContextMenuClose=Ni;var Di;function Ni(){clearTimeout(Di),Di=setTimeout(function(){j&&(G.style.cssText=j,j=""),b.renderer.$isMousePressed=!1,b.renderer.$keepTextAreaAtCursor&&b.renderer.$moveTextAreaToCursor()},0)}var Fi=function(Jt){b.textInput.onContextMenu(Jt),Ni()};E.addListener(G,"mouseup",Fi,b),E.addListener(G,"mousedown",function(Jt){Jt.preventDefault(),Ni()},b),E.addListener(b.renderer.scroller,"contextmenu",Fi,b),E.addListener(G,"contextmenu",Fi,b),f&&Hi(C,b,G);function Hi(Jt,gi,mi){var yi=null,bi=!1;mi.addEventListener("keydown",function(ki){yi&&clearTimeout(yi),bi=!0},!0),mi.addEventListener("keyup",function(ki){yi=setTimeout(function(){bi=!1},100)},!0);var xi=function(ki){if(document.activeElement===mi&&!(bi||U||gi.$mouseHandler.isMousePressed)&&!Se){var Ai=mi.selectionStart,Si=mi.selectionEnd,Ci=null,Ei=0;if(Ai==0?Ci=n.up:Ai==1?Ci=n.home:Si>Ee&&v[Si]==`
|
179
|
+
`?Ci=n.end:Ai<D&&v[Ai-1]==" "?(Ci=n.left,Ei=s.option):Ai<D||Ai==D&&Ee!=D&&Ai==Si?Ci=n.left:Si>Ee&&v.slice(0,Si).split(`
|
180
|
+
`).length>2?Ci=n.down:Si>Ee&&v[Si-1]==" "?(Ci=n.right,Ei=s.option):(Si>Ee||Si==Ee&&Ee!=D&&Ai==Si)&&(Ci=n.right),Ai!==Si&&(Ei|=s.shift),Ci){var Ii=gi.onCommandKey({},Ei,Ci);if(!Ii&&gi.commands){Ci=n.keyCodeToString(Ci);var Wi=gi.commands.findKeyCommand(Ei,Ci);Wi&&gi.execCommand(Wi)}D=Ai,Ee=Si,zt("")}}};document.addEventListener("selectionchange",xi),gi.on("destroy",function(){document.removeEventListener("selectionchange",xi)})}this.destroy=function(){G.parentElement&&G.parentElement.removeChild(G)}},p.TextInput=A,p.$setUserAgentForTests=function(C,b){x=C,f=b}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(g,p,se){var E=g("../lib/useragent"),S=0,_=550,a=function(){function r(o){o.$clickSelection=null;var t=o.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(o)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(o)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(o)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(o)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(o));var e=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];e.forEach(function(n){o[n]=this[n]},this),o.selectByLines=this.extendSelectionBy.bind(o,"getLineRange"),o.selectByWords=this.extendSelectionBy.bind(o,"getWordRange")}return r.prototype.onMouseDown=function(o){var t=o.inSelection(),e=o.getDocumentPosition();this.mousedownEvent=o;var n=this.editor,s=o.getButton();if(s!==0){var f=n.getSelectionRange(),m=f.isEmpty();(m||s==1)&&n.selection.moveToPosition(e),s==2&&(n.textInput.onContextMenu(o.domEvent),E.isMozilla||o.preventDefault());return}if(this.mousedownEvent.time=Date.now(),t&&!n.isFocused()&&(n.focus(),this.$focusTimeout&&!this.$clickSelection&&!n.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(o);return}return this.captureMouse(o),this.startSelect(e,o.domEvent._clicks>1),o.preventDefault()},r.prototype.startSelect=function(o,t){o=o||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var e=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?e.selection.selectToPosition(o):t||e.selection.moveToPosition(o),t||this.select(),e.setStyle("ace_selecting"),this.setState("select"))},r.prototype.select=function(){var o,t=this.editor,e=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var n=this.$clickSelection.comparePoint(e);if(n==-1)o=this.$clickSelection.end;else if(n==1)o=this.$clickSelection.start;else{var s=i(this.$clickSelection,e);e=s.cursor,o=s.anchor}t.selection.setSelectionAnchor(o.row,o.column)}t.selection.selectToPosition(e),t.renderer.scrollCursorIntoView()},r.prototype.extendSelectionBy=function(o){var t,e=this.editor,n=e.renderer.screenToTextCoordinates(this.x,this.y),s=e.selection[o](n.row,n.column);if(this.$clickSelection){var f=this.$clickSelection.comparePoint(s.start),m=this.$clickSelection.comparePoint(s.end);if(f==-1&&m<=0)t=this.$clickSelection.end,(s.end.row!=n.row||s.end.column!=n.column)&&(n=s.start);else if(m==1&&f>=0)t=this.$clickSelection.start,(s.start.row!=n.row||s.start.column!=n.column)&&(n=s.end);else if(f==-1&&m==1)n=s.end,t=s.start;else{var x=i(this.$clickSelection,n);n=x.cursor,t=x.anchor}e.selection.setSelectionAnchor(t.row,t.column)}e.selection.selectToPosition(n),e.renderer.scrollCursorIntoView()},r.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},r.prototype.focusWait=function(){var o=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(o>S||t-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},r.prototype.onDoubleClick=function(o){var t=o.getDocumentPosition(),e=this.editor,n=e.session,s=n.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()},r.prototype.onTripleClick=function(o){var t=o.getDocumentPosition(),e=this.editor;this.setState("selectByLines");var n=e.getSelectionRange();n.isMultiLine()&&n.contains(t.row,t.column)?(this.$clickSelection=e.selection.getLineRange(n.start.row),this.$clickSelection.end=e.selection.getLineRange(n.end.row).end):this.$clickSelection=e.selection.getLineRange(t.row),this.select()},r.prototype.onQuadClick=function(o){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},r.prototype.onMouseWheel=function(o){if(!o.getAccelKey()){o.getShiftKey()&&o.wheelY&&!o.wheelX&&(o.wheelX=o.wheelY,o.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var e=this.$lastScroll,n=o.domEvent.timeStamp,s=n-e.t,f=s?o.wheelX/s:e.vx,m=s?o.wheelY/s:e.vy;s<_&&(f=(f+e.vx)/2,m=(m+e.vy)/2);var x=Math.abs(f/m),A=!1;if(x>=1&&t.renderer.isScrollableBy(o.wheelX*o.speed,0)&&(A=!0),x<=1&&t.renderer.isScrollableBy(0,o.wheelY*o.speed)&&(A=!0),A)e.allowed=n;else if(n-e.allowed<_){var C=Math.abs(f)<=1.5*Math.abs(e.vx)&&Math.abs(m)<=1.5*Math.abs(e.vy);C?(A=!0,e.allowed=n):e.allowed=0}if(e.t=n,e.vx=f,e.vy=m,A)return t.renderer.scrollBy(o.wheelX*o.speed,o.wheelY*o.speed),o.stop()}},r}();a.prototype.selectEnd=a.prototype.selectByLinesEnd,a.prototype.selectAllEnd=a.prototype.selectByLinesEnd,a.prototype.selectByWordsEnd=a.prototype.selectByLinesEnd,p.DefaultHandlers=a;function h(r,o,t,e){return Math.sqrt(Math.pow(t-r,2)+Math.pow(e-o,2))}function i(r,o){if(r.start.row==r.end.row)var t=2*o.column-r.start.column-r.end.column;else if(r.start.row==r.end.row-1&&!r.start.column&&!r.end.column)var t=o.column-4;else var t=2*o.row-r.start.row-r.end.row;return t<0?{cursor:r.start,anchor:r.end}:{cursor:r.end,anchor:r.start}}}),ace.define("ace/lib/scroll",["require","exports","module"],function(g,p,se){p.preventParentScroll=function(S){S.stopPropagation();var _=S.currentTarget,a=_.scrollHeight>_.clientHeight;a||S.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(g,p,se){var E=this&&this.__extends||function(){var n=function(s,f){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,x){m.__proto__=x}||function(m,x){for(var A in x)Object.prototype.hasOwnProperty.call(x,A)&&(m[A]=x[A])},n(s,f)};return function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");n(s,f);function m(){this.constructor=s}s.prototype=f===null?Object.create(f):(m.prototype=f.prototype,new m)}}(),S=this&&this.__values||function(n){var s=typeof Symbol=="function"&&Symbol.iterator,f=s&&n[s],m=0;if(f)return f.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&m>=n.length&&(n=void 0),{value:n&&n[m++],done:!n}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},_=g("./lib/dom");g("./lib/event");var a=g("./range").Range,h=g("./lib/scroll").preventParentScroll,i="ace_tooltip",r=function(){function n(s){this.isOpen=!1,this.$element=null,this.$parentNode=s}return n.prototype.$init=function(){return this.$element=_.createElement("div"),this.$element.className=i,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},n.prototype.getElement=function(){return this.$element||this.$init()},n.prototype.setText=function(s){this.getElement().textContent=s},n.prototype.setHtml=function(s){this.getElement().innerHTML=s},n.prototype.setPosition=function(s,f){this.getElement().style.left=s+"px",this.getElement().style.top=f+"px"},n.prototype.setClassName=function(s){_.addCssClass(this.getElement(),s)},n.prototype.setTheme=function(s){this.$element.className=i+" "+(s.isDark?"ace_dark ":"")+(s.cssClass||"")},n.prototype.show=function(s,f,m){s!=null&&this.setText(s),f!=null&&m!=null&&this.setPosition(f,m),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},n.prototype.hide=function(s){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=i,this.isOpen=!1)},n.prototype.getHeight=function(){return this.getElement().offsetHeight},n.prototype.getWidth=function(){return this.getElement().offsetWidth},n.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},n}(),o=function(){function n(){this.popups=[]}return n.prototype.addPopup=function(s){this.popups.push(s),this.updatePopups()},n.prototype.removePopup=function(s){var f=this.popups.indexOf(s);f!==-1&&(this.popups.splice(f,1),this.updatePopups())},n.prototype.updatePopups=function(){var s,f,m,x;this.popups.sort(function(j,W){return W.priority-j.priority});var A=[];try{for(var C=S(this.popups),b=C.next();!b.done;b=C.next()){var G=b.value,Se=!0;try{for(var q=(m=void 0,S(A)),U=q.next();!U.done;U=q.next()){var at=U.value;if(this.doPopupsOverlap(at,G)){Se=!1;break}}}catch(j){m={error:j}}finally{try{U&&!U.done&&(x=q.return)&&x.call(q)}finally{if(m)throw m.error}}Se?A.push(G):G.hide()}}catch(j){s={error:j}}finally{try{b&&!b.done&&(f=C.return)&&f.call(C)}finally{if(s)throw s.error}}},n.prototype.doPopupsOverlap=function(s,f){var m=s.getElement().getBoundingClientRect(),x=f.getElement().getBoundingClientRect();return m.left<x.right&&m.right>x.left&&m.top<x.bottom&&m.bottom>x.top},n}(),t=new o;p.popupManager=t,p.Tooltip=r;var e=function(n){E(s,n);function s(f){f===void 0&&(f=document.body);var m=n.call(this,f)||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 x=m.getElement();return x.style.whiteSpace="pre-wrap",x.style.pointerEvents="auto",x.addEventListener("mouseout",m.onMouseOut),x.tabIndex=-1,x.addEventListener("blur",(function(){x.contains(document.activeElement)||this.hide()}).bind(m)),x.addEventListener("wheel",h),m}return s.prototype.addToEditor=function(f){f.on("mousemove",this.onMouseMove),f.on("mousedown",this.hide),f.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},s.prototype.removeFromEditor=function(f){f.off("mousemove",this.onMouseMove),f.off("mousedown",this.hide),f.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},s.prototype.onMouseMove=function(f,m){this.lastEvent=f,this.lastT=Date.now();var x=m.$mouseHandler.isMousePressed;if(this.isOpen){var A=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(A.row,A.column)||x||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||x||(this.lastEvent=f,this.timeout=setTimeout(this.waitForHover,this.idleTime))},s.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var f=Date.now()-this.lastT;if(this.idleTime-f>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-f);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},s.prototype.isOutsideOfText=function(f){var m=f.editor,x=f.getDocumentPosition(),A=m.session.getLine(x.row);if(x.column==A.length){var C=m.renderer.pixelToScreenCoordinates(f.clientX,f.clientY),b=m.session.documentToScreenPosition(x.row,x.column);if(b.column!=C.column||b.row!=C.row)return!0}return!1},s.prototype.setDataProvider=function(f){this.$gatherData=f},s.prototype.showForRange=function(f,m,x,A){var C=10;if(!(A&&A!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var b=f.renderer;this.isOpen||(t.addPopup(this),this.$registerCloseEvents(),this.setTheme(b.theme)),this.isOpen=!0,this.addMarker(m,f.session),this.range=a.fromPoints(m.start,m.end);var G=b.textToScreenCoordinates(m.start.row,m.start.column),Se=b.scroller.getBoundingClientRect();G.pageX<Se.left&&(G.pageX=Se.left);var q=this.getElement();q.innerHTML="",q.appendChild(x),q.style.maxHeight="",q.style.display="block";var U=q.clientHeight,at=q.clientWidth,j=window.innerHeight-G.pageY-b.lineHeight,W=!0;G.pageY-U<0&&G.pageY<j&&(W=!1),q.style.maxHeight=(W?G.pageY:j)-C+"px",q.style.top=W?"":G.pageY+b.lineHeight+"px",q.style.bottom=W?window.innerHeight-G.pageY+"px":"",q.style.left=Math.min(G.pageX,window.innerWidth-at-C)+"px"}},s.prototype.addMarker=function(f,m){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=m,this.marker=m&&m.addMarker(f,"ace_highlight-marker","text")},s.prototype.hide=function(f){!f&&document.activeElement==this.getElement()||f&&f.target&&(f.type!="keydown"||f.ctrlKey||f.metaKey)&&this.$element.contains(f.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(f){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!f.relatedTarget||this.getElement().contains(f.relatedTarget)||f&&f.currentTarget.contains(f.relatedTarget)||f.relatedTarget.classList.contains("ace_content")||this.hide())},s}(r);p.HoverTooltip=e}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(g,p,se){var E=this&&this.__extends||function(){var n=function(s,f){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,x){m.__proto__=x}||function(m,x){for(var A in x)Object.prototype.hasOwnProperty.call(x,A)&&(m[A]=x[A])},n(s,f)};return function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");n(s,f);function m(){this.constructor=s}s.prototype=f===null?Object.create(f):(m.prototype=f.prototype,new m)}}(),S=this&&this.__values||function(n){var s=typeof Symbol=="function"&&Symbol.iterator,f=s&&n[s],m=0;if(f)return f.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&m>=n.length&&(n=void 0),{value:n&&n[m++],done:!n}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},_=g("../lib/dom"),a=g("../lib/event"),h=g("../tooltip").Tooltip,i=g("../config").nls,r=5,o=3;p.GUTTER_TOOLTIP_LEFT_OFFSET=r,p.GUTTER_TOOLTIP_TOP_OFFSET=o;function t(n){var s=n.editor,f=s.renderer.$gutterLayer,m=new e(s,!0);n.editor.setDefaultHandler("guttermousedown",function(Se){if(!(!s.isFocused()||Se.getButton()!=0)){var q=f.getRegion(Se);if(q!="foldWidgets"){var U=Se.getDocumentPosition().row,at=s.session.selection;if(Se.getShiftKey())at.selectTo(U,0);else{if(Se.domEvent.detail==2)return s.selectAll(),Se.preventDefault();n.$clickSelection=s.selection.getLineRange(U)}return n.setState("selectByLines"),n.captureMouse(Se),Se.preventDefault()}}});var x,A;function C(){var Se=A.getDocumentPosition().row,q=s.session.getLength();if(Se==q){var U=s.renderer.pixelToScreenCoordinates(0,A.y).row,at=A.$pos;if(U>s.session.documentToScreenRow(at.row,at.column))return b()}if(m.showTooltip(Se),!!m.isOpen)if(s.on("mousewheel",b),s.on("changeSession",b),window.addEventListener("keydown",b,!0),n.$tooltipFollowsMouse)G(A);else{var j=A.getGutterRow(),W=f.$lines.get(j);if(W){var y=W.element.querySelector(".ace_gutter_annotation"),v=y.getBoundingClientRect(),D=m.getElement().style;D.left=v.right-r+"px",D.top=v.bottom-o+"px"}else G(A)}}function b(Se){Se&&Se.type==="keydown"&&(Se.ctrlKey||Se.metaKey)||Se&&Se.type==="mouseout"&&(!Se.relatedTarget||m.getElement().contains(Se.relatedTarget))||(x&&(x=clearTimeout(x)),m.isOpen&&(m.hideTooltip(),s.off("mousewheel",b),s.off("changeSession",b),window.removeEventListener("keydown",b,!0)))}function G(Se){m.setPosition(Se.x,Se.y)}n.editor.setDefaultHandler("guttermousemove",function(Se){var q=Se.domEvent.target||Se.domEvent.srcElement;if(_.hasCssClass(q,"ace_fold-widget")||_.hasCssClass(q,"ace_custom-widget"))return b();m.isOpen&&n.$tooltipFollowsMouse&&G(Se),A=Se,!x&&(x=setTimeout(function(){x=null,A&&!n.isMousePressed&&C()},50))}),a.addListener(s.renderer.$gutter,"mouseout",function(Se){A=null,m.isOpen&&(x=setTimeout(function(){x=null,b(Se)},50))},s)}p.GutterHandler=t;var e=function(n){E(s,n);function s(f,m){m===void 0&&(m=!1);var x=n.call(this,f.container)||this;x.editor=f,x.visibleTooltipRow;var A=x.getElement();return A.setAttribute("role","tooltip"),A.style.pointerEvents="auto",m&&(x.onMouseOut=x.onMouseOut.bind(x),A.addEventListener("mouseout",x.onMouseOut)),x}return s.prototype.onMouseOut=function(f){this.isOpen&&(!f.relatedTarget||this.getElement().contains(f.relatedTarget)||f&&f.currentTarget.contains(f.relatedTarget)||this.hideTooltip())},s.prototype.setPosition=function(f,m){var x=window.innerWidth||document.documentElement.clientWidth,A=window.innerHeight||document.documentElement.clientHeight,C=this.getWidth(),b=this.getHeight();f+=15,m+=15,f+C>x&&(f-=f+C-x),m+b>A&&(m-=20+b),h.prototype.setPosition.call(this,f,m)},Object.defineProperty(s,"annotationLabels",{get:function(){return{error:{singular:i("gutter-tooltip.aria-label.error.singular","error"),plural:i("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:i("gutter-tooltip.aria-label.security.singular","security finding"),plural:i("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:i("gutter-tooltip.aria-label.warning.singular","warning"),plural:i("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:i("gutter-tooltip.aria-label.info.singular","information message"),plural:i("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:i("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:i("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),s.prototype.showTooltip=function(f){var m,x=this.editor.renderer.$gutterLayer,A=x.$annotations[f],C;A?C={displayText:Array.from(A.displayText),type:Array.from(A.type)}:C={displayText:[],type:[]};var b=x.session.getFoldLine(f);if(b&&x.$showFoldedAnnotations){for(var G={error:[],security:[],warning:[],info:[],hint:[]},Se={error:1,security:2,warning:3,info:4,hint:5},q,U=f+1;U<=b.end.row;U++)if(x.$annotations[U])for(var at=0;at<x.$annotations[U].text.length;at++){var j=x.$annotations[U].type[at];G[j].push(x.$annotations[U].text[at]),(!q||Se[j]<Se[q])&&(q=j)}if(["error","security","warning"].includes(q)){var W="".concat(s.annotationsToSummaryString(G)," in folded code.");C.displayText.push(W),C.type.push(q+"_fold")}}if(C.displayText.length===0)return this.hideTooltip();for(var y={error:[],security:[],warning:[],info:[],hint:[]},v=x.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",U=0;U<C.displayText.length;U++){var D=_.createElement("span"),Ee=_.createElement("span");(m=Ee.classList).add.apply(m,["ace_".concat(C.type[U]),v]),Ee.setAttribute("aria-label","".concat(s.annotationLabels[C.type[U].replace("_fold","")].singular)),Ee.setAttribute("role","img"),Ee.appendChild(_.createTextNode(" ")),D.appendChild(Ee),D.appendChild(_.createTextNode(C.displayText[U])),D.appendChild(_.createElement("br")),y[C.type[U].replace("_fold","")].push(D)}var qe=this.getElement();_.removeChildren(qe),y.error.forEach(function(ot){return qe.appendChild(ot)}),y.security.forEach(function(ot){return qe.appendChild(ot)}),y.warning.forEach(function(ot){return qe.appendChild(ot)}),y.info.forEach(function(ot){return qe.appendChild(ot)}),y.hint.forEach(function(ot){return qe.appendChild(ot)}),qe.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.visibleTooltipRow=f,this.editor._signal("showGutterTooltip",this)},s.prototype.hideTooltip=function(){this.isOpen&&(this.$element.removeAttribute("aria-live"),this.hide(),this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this))},s.annotationsToSummaryString=function(f){var m,x,A=[],C=["error","security","warning","info","hint"];try{for(var b=S(C),G=b.next();!G.done;G=b.next()){var Se=G.value;if(f[Se].length){var q=f[Se].length===1?s.annotationLabels[Se].singular:s.annotationLabels[Se].plural;A.push("".concat(f[Se].length," ").concat(q))}}}catch(U){m={error:U}}finally{try{G&&!G.done&&(x=b.return)&&x.call(b)}finally{if(m)throw m.error}}return A.join(", ")},s}(h);p.GutterTooltip=e}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(g,p,se){var E=g("../lib/event"),S=g("../lib/useragent"),_=function(){function a(h,i){this.speed,this.wheelX,this.wheelY,this.domEvent=h,this.editor=i,this.x=this.clientX=h.clientX,this.y=this.clientY=h.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return 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 h=this.getDocumentPosition().row,i=this.editor.session.documentToScreenRow(h,0),r=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return i-r},a.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var h=this.editor,i=h.getSelectionRange();if(i.isEmpty())this.$inSelection=!1;else{var r=this.getDocumentPosition();this.$inSelection=i.contains(r.row,r.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}();p.MouseEvent=_}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(g,p,se){var E=g("../lib/dom"),S=g("../lib/event"),_=g("../lib/useragent"),a=200,h=200,i=5;function r(t){var e=t.editor,n=E.createElement("div");n.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",n.textContent=" ";var s=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];s.forEach(function(Mt){t[Mt]=this[Mt]},this),e.on("mousedown",this.onMouseDown.bind(t));var f=e.container,m,x,A,C,b,G,Se=0,q,U,at,j,W;this.onDragStart=function(Mt){if(this.cancelDrag||!f.draggable){var zt=this;return setTimeout(function(){zt.startSelect(),zt.captureMouse(Mt)},0),Mt.preventDefault()}b=e.getSelectionRange();var Ht=Mt.dataTransfer;Ht.effectAllowed=e.getReadOnly()?"copy":"copyMove",e.container.appendChild(n),Ht.setDragImage&&Ht.setDragImage(n,0,0),setTimeout(function(){e.container.removeChild(n)}),Ht.clearData(),Ht.setData("Text",e.session.getTextRange()),U=!0,this.setState("drag")},this.onDragEnd=function(Mt){if(f.draggable=!1,U=!1,this.setState(null),!e.getReadOnly()){var zt=Mt.dataTransfer.dropEffect;!q&&zt=="move"&&e.session.remove(e.getSelectionRange()),e.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(Mt){if(!(e.getReadOnly()||!ct(Mt.dataTransfer)))return x=Mt.clientX,A=Mt.clientY,m||Ee(),Se++,Mt.dataTransfer.dropEffect=q=Ut(Mt),S.preventDefault(Mt)},this.onDragOver=function(Mt){if(!(e.getReadOnly()||!ct(Mt.dataTransfer)))return x=Mt.clientX,A=Mt.clientY,m||(Ee(),Se++),ot!==null&&(ot=null),Mt.dataTransfer.dropEffect=q=Ut(Mt),S.preventDefault(Mt)},this.onDragLeave=function(Mt){if(Se--,Se<=0&&m)return qe(),q=null,S.preventDefault(Mt)},this.onDrop=function(Mt){if(G){var zt=Mt.dataTransfer;if(U)switch(q){case"move":b.contains(G.row,G.column)?b={start:G,end:G}:b=e.moveText(b,G);break;case"copy":b=e.moveText(b,G,!0);break}else{var Ht=zt.getData("Text");b={start:G,end:e.session.insert(G,Ht)},e.focus(),q=null}return qe(),S.preventDefault(Mt)}},S.addListener(f,"dragstart",this.onDragStart.bind(t),e),S.addListener(f,"dragend",this.onDragEnd.bind(t),e),S.addListener(f,"dragenter",this.onDragEnter.bind(t),e),S.addListener(f,"dragover",this.onDragOver.bind(t),e),S.addListener(f,"dragleave",this.onDragLeave.bind(t),e),S.addListener(f,"drop",this.onDrop.bind(t),e);function y(Mt,zt){var Ht=Date.now(),Vt=!zt||Mt.row!=zt.row,hi=!zt||Mt.column!=zt.column;if(!j||Vt||hi)e.moveCursorToPosition(Mt),j=Ht,W={x,y:A};else{var ui=o(W.x,W.y,x,A);ui>i?j=null:Ht-j>=h&&(e.renderer.scrollCursorIntoView(),j=null)}}function v(Mt,zt){var Ht=Date.now(),Vt=e.renderer.layerConfig.lineHeight,hi=e.renderer.layerConfig.characterWidth,ui=e.renderer.scroller.getBoundingClientRect(),fi={x:{left:x-ui.left,right:ui.right-x},y:{top:A-ui.top,bottom:ui.bottom-A}},di=Math.min(fi.x.left,fi.x.right),vi=Math.min(fi.y.top,fi.y.bottom),wi={row:Mt.row,column:Mt.column};di/hi<=2&&(wi.column+=fi.x.left<fi.x.right?-3:2),vi/Vt<=1&&(wi.row+=fi.y.top<fi.y.bottom?-1:1);var _i=Mt.row!=wi.row,Mi=Mt.column!=wi.column,$i=!zt||Mt.row!=zt.row;_i||Mi&&!$i?at?Ht-at>=a&&e.renderer.scrollCursorIntoView(wi):at=Ht:at=null}function D(){var Mt=G;G=e.renderer.screenToTextCoordinates(x,A),y(G,Mt),v(G,Mt)}function Ee(){b=e.selection.toOrientedRange(),m=e.session.addMarker(b,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval(C),D(),C=setInterval(D,20),Se=0,S.addListener(document,"mousemove",lt)}function qe(){clearInterval(C),e.session.removeMarker(m),m=null,e.selection.fromOrientedRange(b),e.isFocused()&&!U&&e.$resetCursorStyle(),b=null,G=null,Se=0,at=null,j=null,S.removeListener(document,"mousemove",lt)}var ot=null;function lt(){ot==null&&(ot=setTimeout(function(){ot!=null&&m&&qe()},20))}function ct(Mt){var zt=Mt.types;return!zt||Array.prototype.some.call(zt,function(Ht){return Ht=="text/plain"||Ht=="Text"})}function Ut(Mt){var zt=["copy","copymove","all","uninitialized"],Ht=["move","copymove","linkmove","all","uninitialized"],Vt=_.isMac?Mt.altKey:Mt.ctrlKey,hi="uninitialized";try{hi=Mt.dataTransfer.effectAllowed.toLowerCase()}catch{}var ui="none";return Vt&&zt.indexOf(hi)>=0?ui="copy":Ht.indexOf(hi)>=0?ui="move":zt.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 n=_.isWin?"default":"move";t.renderer.setCursorStyle(n),this.setState("dragReady")},this.onMouseDrag=function(t){var e=this.editor.container;if(_.isIE&&this.state=="dragReady"){var n=o(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>3&&e.dragDrop()}if(this.state==="dragWait"){var n=o(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>0&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(t){if(this.$dragEnabled){this.mousedownEvent=t;var e=this.editor,n=t.inSelection(),s=t.getButton(),f=t.domEvent.detail||1;if(f===1&&s===0&&n){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(_.isWebKit){this.cancelDrag=!0;var x=e.container;x.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(t,this.onMouseDrag.bind(this)),t.defaultPrevented=!0}}}}).call(r.prototype);function o(t,e,n,s){return Math.sqrt(Math.pow(n-t,2)+Math.pow(s-e,2))}p.DragdropHandler=r}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(g,p,se){var E=g("./mouse_event").MouseEvent,S=g("../lib/event"),_=g("../lib/dom");p.addTouchListeners=function(a,h){var i="scroll",r,o,t,e,n,s,f=0,m,x=0,A=0,C=0,b,G;function Se(){var y=window.navigator&&window.navigator.clipboard,v=!1,D=function(){var ot=h.getCopyText(),lt=h.session.getUndoManager().hasUndo();G.replaceChild(_.buildDom(v?["span",!ot&&Ee("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],ot&&Ee("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],ot&&Ee("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],y&&Ee("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],lt&&Ee("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],Ee("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],Ee("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),G.firstChild)},Ee=function(ot){return h.commands.canExecute(ot,h)},qe=function(ot){var lt=ot.target.getAttribute("action");if(lt=="more"||!v)return v=!v,D();lt=="paste"?y.readText().then(function(ct){h.execCommand(lt,ct)}):lt&&((lt=="cut"||lt=="copy")&&(y?y.writeText(h.getCopyText()):document.execCommand("copy")),h.execCommand(lt)),G.firstChild.style.display="none",v=!1,lt!="openCommandPalette"&&h.focus()};G=_.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(ot){i="menu",ot.stopPropagation(),ot.preventDefault(),h.textInput.focus()},ontouchend:function(ot){ot.stopPropagation(),ot.preventDefault(),qe(ot)},onclick:qe},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],h.container)}function q(){if(!h.getOption("enableMobileMenu")){G&&U();return}G||Se();var y=h.selection.cursor,v=h.renderer.textToScreenCoordinates(y.row,y.column),D=h.renderer.textToScreenCoordinates(0,0).pageX,Ee=h.renderer.scrollLeft,qe=h.container.getBoundingClientRect();G.style.top=v.pageY-qe.top-3+"px",v.pageX-qe.left<qe.width-70?(G.style.left="",G.style.right="10px"):(G.style.right="",G.style.left=D+Ee-qe.left+"px"),G.style.display="",G.firstChild.style.display="none",h.on("input",U)}function U(y){G&&(G.style.display="none"),h.off("input",U)}function at(){n=null,clearTimeout(n);var y=h.selection.getRange(),v=y.contains(m.row,m.column);(y.isEmpty()||!v)&&(h.selection.moveToPosition(m),h.selection.selectWord()),i="wait",q()}function j(){n=null,clearTimeout(n),h.selection.moveToPosition(m);var y=x>=2?h.selection.getLineRange(m.row):h.session.getBracketRange(m);y&&!y.isEmpty()?h.selection.setRange(y):h.selection.selectWord(),i="wait"}S.addListener(a,"contextmenu",function(y){if(b){var v=h.textInput.getElement();v.focus()}},h),S.addListener(a,"touchstart",function(y){var v=y.touches;if(n||v.length>1){clearTimeout(n),n=null,t=-1,i="zoom";return}b=h.$mouseHandler.isMousePressed=!0;var D=h.renderer.layerConfig.lineHeight,Ee=h.renderer.layerConfig.lineHeight,qe=y.timeStamp;e=qe;var ot=v[0],lt=ot.clientX,ct=ot.clientY;Math.abs(r-lt)+Math.abs(o-ct)>D&&(t=-1),r=y.clientX=lt,o=y.clientY=ct,A=C=0;var Ut=new E(y,h);if(m=Ut.getDocumentPosition(),qe-t<500&&v.length==1&&!f)x++,y.preventDefault(),y.button=0,j();else{x=0;var Mt=h.selection.cursor,zt=h.selection.isEmpty()?Mt:h.selection.anchor,Ht=h.renderer.$cursorLayer.getPixelPosition(Mt,!0),Vt=h.renderer.$cursorLayer.getPixelPosition(zt,!0),hi=h.renderer.scroller.getBoundingClientRect(),ui=h.renderer.layerConfig.offset,fi=h.renderer.scrollLeft,di=function(_i,Mi){return _i=_i/Ee,Mi=Mi/D-.75,_i*_i+Mi*Mi};if(y.clientX<hi.left){i="zoom";return}var vi=di(y.clientX-hi.left-Ht.left+fi,y.clientY-hi.top-Ht.top+ui),wi=di(y.clientX-hi.left-Vt.left+fi,y.clientY-hi.top-Vt.top+ui);vi<3.5&&wi<3.5&&(i=vi>wi?"cursor":"anchor"),wi<3.5?i="anchor":vi<3.5?i="cursor":i="scroll",n=setTimeout(at,450)}t=qe},h),S.addListener(a,"touchend",function(y){b=h.$mouseHandler.isMousePressed=!1,s&&clearInterval(s),i=="zoom"?(i="",f=0):n?(h.selection.moveToPosition(m),f=0,q()):i=="scroll"?(W(),U()):q(),clearTimeout(n),n=null},h),S.addListener(a,"touchmove",function(y){n&&(clearTimeout(n),n=null);var v=y.touches;if(!(v.length>1||i=="zoom")){var D=v[0],Ee=r-D.clientX,qe=o-D.clientY;if(i=="wait")if(Ee*Ee+qe*qe>4)i="cursor";else return y.preventDefault();r=D.clientX,o=D.clientY,y.clientX=D.clientX,y.clientY=D.clientY;var ot=y.timeStamp,lt=ot-e;if(e=ot,i=="scroll"){var ct=new E(y,h);ct.speed=1,ct.wheelX=Ee,ct.wheelY=qe,10*Math.abs(Ee)<Math.abs(qe)&&(Ee=0),10*Math.abs(qe)<Math.abs(Ee)&&(qe=0),lt!=0&&(A=Ee/lt,C=qe/lt),h._emit("mousewheel",ct),ct.propagationStopped||(A=C=0)}else{var Ut=new E(y,h),Mt=Ut.getDocumentPosition();i=="cursor"?h.selection.moveCursorToPosition(Mt):i=="anchor"&&h.selection.setSelectionAnchor(Mt.row,Mt.column),h.renderer.scrollCursorIntoView(Mt),y.preventDefault()}}},h);function W(){f+=60,s=setInterval(function(){f--<=0&&(clearInterval(s),s=null),Math.abs(A)<.01&&(A=0),Math.abs(C)<.01&&(C=0),f<20&&(A=.9*A),f<20&&(C=.9*C);var y=h.session.getScrollTop();h.renderer.scrollBy(10*A,10*C),y==h.session.getScrollTop()&&(f=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(g,p,se){var E=g("../lib/event"),S=g("../lib/useragent"),_=g("./default_handlers").DefaultHandlers,a=g("./default_gutter_handler").GutterHandler,h=g("./mouse_event").MouseEvent,i=g("./dragdrop_handler").DragdropHandler,r=g("./touch_handler").addTouchListeners,o=g("../config"),t=function(){function e(n){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var s=this;this.editor=n,new _(this),new a(this),new i(this);var f=function(A){var C=!document.hasFocus||!document.hasFocus()||!n.isFocused()&&document.activeElement==(n.textInput&&n.textInput.getElement());C&&window.focus(),n.focus(),setTimeout(function(){n.isFocused()||n.focus()})},m=n.renderer.getMouseEventTarget();E.addListener(m,"click",this.onMouseEvent.bind(this,"click"),n),E.addListener(m,"mousemove",this.onMouseMove.bind(this,"mousemove"),n),E.addMultiMouseDownListener([m,n.renderer.scrollBarV&&n.renderer.scrollBarV.inner,n.renderer.scrollBarH&&n.renderer.scrollBarH.inner,n.textInput&&n.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",n),E.addMouseWheelListener(n.container,this.onMouseWheel.bind(this,"mousewheel"),n),r(n.container,n);var x=n.renderer.$gutter;E.addListener(x,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),n),E.addListener(x,"click",this.onMouseEvent.bind(this,"gutterclick"),n),E.addListener(x,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),n),E.addListener(x,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),n),E.addListener(m,"mousedown",f,n),E.addListener(x,"mousedown",f,n),S.isIE&&n.renderer.scrollBarV&&(E.addListener(n.renderer.scrollBarV.element,"mousedown",f,n),E.addListener(n.renderer.scrollBarH.element,"mousedown",f,n)),n.on("mousemove",function(A){if(!(s.state||s.$dragDelay||!s.$dragEnabled)){var C=n.renderer.screenToTextCoordinates(A.x,A.y),b=n.session.selection.getRange(),G=n.renderer;!b.isEmpty()&&b.insideStart(C.row,C.column)?G.setCursorStyle("default"):G.setCursorStyle("")}},n)}return e.prototype.onMouseEvent=function(n,s){this.editor.session&&this.editor._emit(n,new h(s,this.editor))},e.prototype.onMouseMove=function(n,s){var f=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!f||!f.length||this.editor._emit(n,new h(s,this.editor))},e.prototype.onMouseWheel=function(n,s){var f=new h(s,this.editor);f.speed=this.$scrollSpeed*2,f.wheelX=s.wheelX,f.wheelY=s.wheelY,this.editor._emit(n,f)},e.prototype.setState=function(n){this.state=n},e.prototype.captureMouse=function(n,s){this.x=n.x,this.y=n.y,this.isMousePressed=!0;var f=this.editor,m=this.editor.renderer;m.$isMousePressed=!0;var x=this,A=function(q){if(q){if(S.isWebKit&&!q.which&&x.releaseMouse)return x.releaseMouse();x.x=q.clientX,x.y=q.clientY,s&&s(q),x.mouseEvent=new h(q,x.editor),x.$mouseMoved=!0}},C=function(q){f.off("beforeEndOperation",G),clearInterval(Se),f.session&&b(),x[x.state+"End"]&&x[x.state+"End"](q),x.state="",x.isMousePressed=m.$isMousePressed=!1,m.$keepTextAreaAtCursor&&m.$moveTextAreaToCursor(),x.$onCaptureMouseMove=x.releaseMouse=null,q&&x.onMouseEvent("mouseup",q),f.endOperation()},b=function(){x[x.state]&&x[x.state](),x.$mouseMoved=!1};if(S.isOldIE&&n.domEvent.type=="dblclick")return setTimeout(function(){C(n)});var G=function(q){x.releaseMouse&&f.curOp.command.name&&f.curOp.selectionChanged&&(x[x.state+"End"]&&x[x.state+"End"](),x.state="",x.releaseMouse())};f.on("beforeEndOperation",G),f.startOperation({command:{name:"mouse"}}),x.$onCaptureMouseMove=A,x.releaseMouse=E.capture(this.editor.container,A,C);var Se=setInterval(b,20)},e.prototype.cancelContextMenu=function(){var n=(function(s){s&&s.domEvent&&s.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",n),s&&s.domEvent&&E.stopEvent(s.domEvent))}).bind(this);setTimeout(n,10),this.editor.on("nativecontextmenu",n)},e.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},e}();t.prototype.releaseMouse=null,o.defineOptions(t.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:S.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),p.MouseHandler=t}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(g,p,se){var E=g("../lib/dom"),S=function(){function _(a){a.on("click",function(h){var i=h.getDocumentPosition(),r=a.session,o=r.getFoldAt(i.row,i.column,1);o&&(h.getAccelKey()?r.removeFold(o):r.expandFold(o),h.stop());var t=h.domEvent&&h.domEvent.target;t&&E.hasCssClass(t,"ace_inline_button")&&E.hasCssClass(t,"ace_toggle_wrap")&&(r.setOption("wrap",!r.getUseWrapMode()),a.renderer.scrollCursorIntoView())}),a.on("gutterclick",function(h){var i=a.renderer.$gutterLayer.getRegion(h);if(i=="foldWidgets"){var r=h.getDocumentPosition().row,o=a.session;o.foldWidgets&&o.foldWidgets[r]&&a.session.onFoldWidgetClick(r,h),a.isFocused()||a.focus(),h.stop()}}),a.on("gutterdblclick",function(h){var i=a.renderer.$gutterLayer.getRegion(h);if(i=="foldWidgets"){var r=h.getDocumentPosition().row,o=a.session,t=o.getParentFoldRangeData(r,!0),e=t.range||t.firstRange;if(e){r=e.start.row;var n=o.getFoldAt(r,o.getLine(r).length,1);n?o.removeFold(n):(o.addFold("...",e),a.renderer.scrollCursorIntoView({row:e.start.row,column:0}))}h.stop()}})}return _}();p.FoldHandler=S}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(g,p,se){var E=g("../lib/keys"),S=g("../lib/event"),_=function(){function a(h){this.$editor=h,this.$data={editor:h},this.$handlers=[],this.setDefaultHandler(h.commands)}return a.prototype.setDefaultHandler=function(h){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=h,this.addKeyboardHandler(h,0)},a.prototype.setKeyboardHandler=function(h){var i=this.$handlers;if(i[i.length-1]!=h){for(;i[i.length-1]&&i[i.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(i[i.length-1]);this.addKeyboardHandler(h,1)}},a.prototype.addKeyboardHandler=function(h,i){if(h){typeof h=="function"&&!h.handleKeyboard&&(h.handleKeyboard=h);var r=this.$handlers.indexOf(h);r!=-1&&this.$handlers.splice(r,1),i==null?this.$handlers.push(h):this.$handlers.splice(i,0,h),r==-1&&h.attach&&h.attach(this.$editor)}},a.prototype.removeKeyboardHandler=function(h){var i=this.$handlers.indexOf(h);return i==-1?!1:(this.$handlers.splice(i,1),h.detach&&h.detach(this.$editor),!0)},a.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},a.prototype.getStatusText=function(){var h=this.$data,i=h.editor;return this.$handlers.map(function(r){return r.getStatusText&&r.getStatusText(i,h)||""}).filter(Boolean).join(" ")},a.prototype.$callKeyboardHandlers=function(h,i,r,o){for(var t,e=!1,n=this.$editor.commands,s=this.$handlers.length;s--&&(t=this.$handlers[s].handleKeyboard(this.$data,h,i,r,o),!(!(!t||!t.command)&&(t.command=="null"?e=!0:e=n.exec(t.command,this.$editor,t.args,o),e&&o&&h!=-1&&t.passEvent!=!0&&t.command.passEvent!=!0&&S.stopEvent(o),e))););return!e&&h==-1&&(t={command:"insertstring"},e=n.exec("insertstring",this.$editor,i)),e&&this.$editor._signal&&this.$editor._signal("keyboardActivity",t),e},a.prototype.onCommandKey=function(h,i,r){var o=E.keyCodeToString(r);return this.$callKeyboardHandlers(i,o,r,h)},a.prototype.onTextInput=function(h){return this.$callKeyboardHandlers(-1,h)},a}();p.KeyBinding=_}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(g,p,se){var E=0,S=0,_=!1,a=!1,h=!1,i=[[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]],r=[[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]],o=0,t=1,e=0,n=1,s=2,f=3,m=4,x=5,A=6,C=7,b=8,G=9,Se=10,q=11,U=12,at=13,j=14,W=15,y=16,v=17,D=18,Ee=[D,D,D,D,D,D,D,D,D,A,x,A,b,x,D,D,D,D,D,D,D,D,D,D,D,D,D,D,x,x,x,A,b,m,m,q,q,q,m,m,m,m,m,Se,G,Se,G,G,s,s,s,s,s,s,s,s,s,s,G,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,D,D,D,D,D,D,x,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,G,m,q,q,q,q,m,m,m,m,e,m,m,D,m,m,q,q,s,s,m,e,m,m,m,s,e,m,m,m,m,m],qe=[b,b,b,b,b,b,b,b,b,b,b,D,D,D,e,n,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,x,at,j,W,y,v,G,q,q,q,q,q,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,G,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 ot(Mt,zt,Ht,Vt){var hi=E?r:i,ui=null,fi=null,di=null,vi=0,wi=null,_i=null,Mi=-1,$i=null,Ti=null,Li=[];if(!Vt)for($i=0,Vt=[];$i<Ht;$i++)Vt[$i]=Ut(Mt[$i]);for(S=E,_=!1,a=!1,h=!1,Ti=0;Ti<Ht;Ti++){if(ui=vi,Li[Ti]=fi=ct(Mt,Vt,Li,Ti),vi=hi[ui][fi],wi=vi&240,vi&=15,zt[Ti]=di=hi[vi][5],wi>0)if(wi==16){for($i=Mi;$i<Ti;$i++)zt[$i]=1;Mi=-1}else Mi=-1;if(_i=hi[vi][6],_i)Mi==-1&&(Mi=Ti);else if(Mi>-1){for($i=Mi;$i<Ti;$i++)zt[$i]=di;Mi=-1}Vt[Ti]==x&&(zt[Ti]=0),S|=di}if(h){for($i=0;$i<Ht;$i++)if(Vt[$i]==A){zt[$i]=E;for(var Ri=$i-1;Ri>=0&&Vt[Ri]==b;Ri--)zt[Ri]=E}}}function lt(Mt,zt,Ht){if(!(S<Mt)){if(Mt==1&&E==t&&!a){Ht.reverse();return}for(var Vt=Ht.length,hi=0,ui,fi,di,vi;hi<Vt;){if(zt[hi]>=Mt){for(ui=hi+1;ui<Vt&&zt[ui]>=Mt;)ui++;for(fi=hi,di=ui-1;fi<di;fi++,di--)vi=Ht[fi],Ht[fi]=Ht[di],Ht[di]=vi;hi=ui}hi++}}}function ct(Mt,zt,Ht,Vt){var hi=zt[Vt],ui,fi,di,vi;switch(hi){case e:case n:_=!1;case m:case f:return hi;case s:return _?f:s;case C:return _=!0,n;case b:return m;case G:return Vt<1||Vt+1>=zt.length||(ui=Ht[Vt-1])!=s&&ui!=f||(fi=zt[Vt+1])!=s&&fi!=f?m:(_&&(fi=f),fi==ui?fi:m);case Se:return ui=Vt>0?Ht[Vt-1]:x,ui==s&&Vt+1<zt.length&&zt[Vt+1]==s?s:m;case q:if(Vt>0&&Ht[Vt-1]==s)return s;if(_)return m;for(vi=Vt+1,di=zt.length;vi<di&&zt[vi]==q;)vi++;return vi<di&&zt[vi]==s?s:m;case U:for(di=zt.length,vi=Vt+1;vi<di&&zt[vi]==U;)vi++;if(vi<di){var wi=Mt[Vt],_i=wi>=1425&&wi<=2303||wi==64286;if(ui=zt[vi],_i&&(ui==n||ui==C))return n}return Vt<1||(ui=zt[Vt-1])==x?m:Ht[Vt-1];case x:return _=!1,a=!0,E;case A:return h=!0,m;case at:case j:case y:case v:case W:_=!1;case D:return m}}function Ut(Mt){var zt=Mt.charCodeAt(0),Ht=zt>>8;return Ht==0?zt>191?e:Ee[zt]:Ht==5?/[\u0591-\u05f4]/.test(Mt)?n:e:Ht==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(Mt)?U:/[\u0660-\u0669\u066b-\u066c]/.test(Mt)?f:zt==1642?q:/[\u06f0-\u06f9]/.test(Mt)?s:C:Ht==32&&zt<=8287?qe[zt&255]:Ht==254&&zt>=65136?C:m}p.L=e,p.R=n,p.EN=s,p.ON_R=3,p.AN=4,p.R_H=5,p.B=6,p.RLE=7,p.DOT="·",p.doBidiReorder=function(Mt,zt,Ht){if(Mt.length<2)return{};var Vt=Mt.split(""),hi=new Array(Vt.length),ui=new Array(Vt.length),fi=[];E=Ht?t:o,ot(Vt,fi,Vt.length,zt);for(var di=0;di<hi.length;hi[di]=di,di++);lt(2,fi,hi),lt(1,fi,hi);for(var di=0;di<hi.length-1;di++)zt[di]===f?fi[di]=p.AN:fi[di]===n&&(zt[di]>C&&zt[di]<at||zt[di]===m||zt[di]===D)?fi[di]=p.ON_R:di>0&&Vt[di-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(Vt[di])&&(fi[di-1]=fi[di]=p.R_H,di++);Vt[Vt.length-1]===p.DOT&&(fi[Vt.length-1]=p.B),Vt[0]===""&&(fi[0]=p.RLE);for(var di=0;di<hi.length;di++)ui[di]=fi[hi[di]];return{logicalFromVisual:hi,bidiLevels:ui}},p.hasBidiCharacters=function(Mt,zt){for(var Ht=!1,Vt=0;Vt<Mt.length;Vt++)zt[Vt]=Ut(Mt.charAt(Vt)),!Ht&&(zt[Vt]==n||zt[Vt]==C||zt[Vt]==f)&&(Ht=!0);return Ht},p.getVisualFromLogicalIdx=function(Mt,zt){for(var Ht=0;Ht<zt.logicalFromVisual.length;Ht++)if(zt.logicalFromVisual[Ht]==Mt)return Ht;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(g,p,se){var E=g("./lib/bidiutil"),S=g("./lib/lang"),_=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,a=function(){function h(i){this.session=i,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=_.test(i.getValue())}return h.prototype.isBidiRow=function(i,r,o){return this.seenBidi?(i!==this.currentRow&&(this.currentRow=i,this.updateRowLine(r,o),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},h.prototype.onChange=function(i){this.seenBidi?this.currentRow=null:i.action=="insert"&&_.test(i.lines.join(`
|
181
|
+
`))&&(this.seenBidi=!0,this.currentRow=null)},h.prototype.getDocumentRow=function(){var i=0,r=this.session.$screenRowCache;if(r.length){var o=this.session.$getRowCacheIndex(r,this.currentRow);o>=0&&(i=this.session.$docRowCache[o])}return i},h.prototype.getSplitIndex=function(){var i=0,r=this.session.$screenRowCache;if(r.length)for(var o,t=this.session.$getRowCacheIndex(r,this.currentRow);this.currentRow-i>0&&(o=this.session.$getRowCacheIndex(r,this.currentRow-i-1),o===t);)t=o,i++;else i=this.currentRow;return i},h.prototype.updateRowLine=function(i,r){i===void 0&&(i=this.getDocumentRow());var o=i===this.session.getLength()-1,t=o?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(i),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var e=this.session.$wrapData[i];e&&(r===void 0&&(r=this.getSplitIndex()),r>0&&e.length?(this.wrapIndent=e.indent,this.wrapOffset=this.wrapIndent*this.charWidths[E.L],this.line=r<e.length?this.line.substring(e[r-1],e[r]):this.line.substring(e[e.length-1])):this.line=this.line.substring(0,e[r]),r==e.length&&(this.line+=this.showInvisibles?t:E.DOT))}else this.line+=this.showInvisibles?t:E.DOT;var n=this.session,s=0,f;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(m,x){return m===" "||n.isFullWidth(m.charCodeAt(0))?(f=m===" "?n.getScreenTabSize(x+s):2,s+=f-1,S.stringRepeat(E.DOT,f)):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)},h.prototype.updateBidiMap=function(){var i=[];E.hasBidiCharacters(this.line,i)||this.isRtlDir?this.bidiMap=E.doBidiReorder(this.line,i,this.isRtlDir):this.bidiMap={}},h.prototype.markAsDirty=function(){this.currentRow=null},h.prototype.updateCharacterWidths=function(i){if(this.characterWidth!==i.$characterSize.width){this.fontMetrics=i;var r=this.characterWidth=i.$characterSize.width,o=i.$measureCharWidth("ה");this.charWidths[E.L]=this.charWidths[E.EN]=this.charWidths[E.ON_R]=r,this.charWidths[E.R]=this.charWidths[E.AN]=o,this.charWidths[E.R_H]=o*.45,this.charWidths[E.B]=this.charWidths[E.RLE]=0,this.currentRow=null}},h.prototype.setShowInvisibles=function(i){this.showInvisibles=i,this.currentRow=null},h.prototype.setEolChar=function(i){this.EOL=i},h.prototype.setContentWidth=function(i){this.contentWidth=i},h.prototype.isRtlLine=function(i){return this.$isRtl?!0:i!=null?this.session.getLine(i).charAt(0)==this.RLE:this.isRtlDir},h.prototype.setRtlDirection=function(i,r){for(var o=i.getCursorPosition(),t=i.selection.getSelectionAnchor().row;t<=o.row;t++)!r&&i.session.getLine(t).charAt(0)===i.session.$bidiHandler.RLE?i.session.doc.removeInLine(t,0,1):r&&i.session.getLine(t).charAt(0)!==i.session.$bidiHandler.RLE&&i.session.doc.insert({column:0,row:t},i.session.$bidiHandler.RLE)},h.prototype.getPosLeft=function(i){i-=this.wrapIndent;var r=this.line.charAt(0)===this.RLE?1:0,o=i>r?this.session.getOverwrite()?i:i-1:r,t=E.getVisualFromLogicalIdx(o,this.bidiMap),e=this.bidiMap.bidiLevels,n=0;!this.session.getOverwrite()&&i<=r&&e[t]%2!==0&&t++;for(var s=0;s<t;s++)n+=this.charWidths[e[s]];return!this.session.getOverwrite()&&i>r&&e[t]%2===0&&(n+=this.charWidths[e[t]]),this.wrapIndent&&(n+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(n+=this.rtlLineOffset),n},h.prototype.getSelections=function(i,r){var o=this.bidiMap,t=o.bidiLevels,e,n=[],s=0,f=Math.min(i,r)-this.wrapIndent,m=Math.max(i,r)-this.wrapIndent,x=!1,A=!1,C=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var b,G=0;G<t.length;G++)b=o.logicalFromVisual[G],e=t[G],x=b>=f&&b<m,x&&!A?C=s:!x&&A&&n.push({left:C,width:s-C}),s+=this.charWidths[e],A=x;if(x&&G===t.length&&n.push({left:C,width:s-C}),this.isRtlDir)for(var Se=0;Se<n.length;Se++)n[Se].left+=this.rtlLineOffset;return n},h.prototype.offsetToCol=function(o){this.isRtlDir&&(o-=this.rtlLineOffset);var r=0,o=Math.max(o,0),t=0,e=0,n=this.bidiMap.bidiLevels,s=this.charWidths[n[e]];for(this.wrapIndent&&(o-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);o>t+s/2;){if(t+=s,e===n.length-1){s=0;break}s=this.charWidths[n[++e]]}return e>0&&n[e-1]%2!==0&&n[e]%2===0?(o<t&&e--,r=this.bidiMap.logicalFromVisual[e]):e>0&&n[e-1]%2===0&&n[e]%2!==0?r=1+(o>t?this.bidiMap.logicalFromVisual[e]:this.bidiMap.logicalFromVisual[e-1]):this.isRtlDir&&e===n.length-1&&s===0&&n[e-1]%2===0||!this.isRtlDir&&e===0&&n[e]%2!==0?r=1+this.bidiMap.logicalFromVisual[e]:(e>0&&n[e-1]%2!==0&&s!==0&&e--,r=this.bidiMap.logicalFromVisual[e]),r===0&&this.isRtlDir&&r++,r+this.wrapIndent},h}();p.BidiHandler=a}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(g,p,se){var E=g("./lib/oop"),S=g("./lib/lang"),_=g("./lib/event_emitter").EventEmitter,a=g("./range").Range,h=function(){function i(r){this.session=r,this.doc=r.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var o=this;this.cursor.on("change",function(t){o.$cursorChanged=!0,o.$silent||o._emit("changeCursor"),!o.$isEmpty&&!o.$silent&&o._emit("changeSelection"),!o.$keepDesiredColumnOnChange&&t.old.column!=t.value.column&&(o.$desiredColumn=null)}),this.anchor.on("change",function(){o.$anchorChanged=!0,!o.$isEmpty&&!o.$silent&&o._emit("changeSelection")})}return i.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},i.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},i.prototype.getCursor=function(){return this.lead.getPosition()},i.prototype.setAnchor=function(r,o){this.$isEmpty=!1,this.anchor.setPosition(r,o)},i.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},i.prototype.getSelectionLead=function(){return this.lead.getPosition()},i.prototype.isBackwards=function(){var r=this.anchor,o=this.lead;return r.row>o.row||r.row==o.row&&r.column>o.column},i.prototype.getRange=function(){var r=this.anchor,o=this.lead;return this.$isEmpty?a.fromPoints(o,o):this.isBackwards()?a.fromPoints(o,r):a.fromPoints(r,o)},i.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},i.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},i.prototype.setRange=function(r,o){var t=o?r.end:r.start,e=o?r.start:r.end;this.$setSelection(t.row,t.column,e.row,e.column)},i.prototype.$setSelection=function(r,o,t,e){if(!this.$silent){var n=this.$isEmpty,s=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(r,o),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||n!=this.$isEmpty||s)&&this._emit("changeSelection")}},i.prototype.$moveSelection=function(r){var o=this.lead;this.$isEmpty&&this.setSelectionAnchor(o.row,o.column),r.call(this)},i.prototype.selectTo=function(r,o){this.$moveSelection(function(){this.moveCursorTo(r,o)})},i.prototype.selectToPosition=function(r){this.$moveSelection(function(){this.moveCursorToPosition(r)})},i.prototype.moveTo=function(r,o){this.clearSelection(),this.moveCursorTo(r,o)},i.prototype.moveToPosition=function(r){this.clearSelection(),this.moveCursorToPosition(r)},i.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},i.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},i.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},i.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},i.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},i.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},i.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},i.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},i.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},i.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},i.prototype.getWordRange=function(r,o){if(typeof o>"u"){var t=r||this.lead;r=t.row,o=t.column}return this.session.getWordRange(r,o)},i.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},i.prototype.selectAWord=function(){var r=this.getCursor(),o=this.session.getAWordRange(r.row,r.column);this.setSelectionRange(o)},i.prototype.getLineRange=function(r,o){var t=typeof r=="number"?r:this.lead.row,e,n=this.session.getFoldLine(t);return n?(t=n.start.row,e=n.end.row):e=t,o===!0?new a(t,0,e,this.session.getLine(e).length):new a(t,0,e+1,0)},i.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},i.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},i.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},i.prototype.wouldMoveIntoSoftTab=function(r,o,t){var e=r.column,n=r.column+o;return t<0&&(e=r.column-o,n=r.column),this.session.isTabStop(r)&&this.doc.getLine(r.row).slice(e,n).split(" ").length-1==o},i.prototype.moveCursorLeft=function(){var r=this.lead.getPosition(),o;if(o=this.session.getFoldAt(r.row,r.column,-1))this.moveCursorTo(o.start.row,o.start.column);else if(r.column===0)r.row>0&&this.moveCursorTo(r.row-1,this.doc.getLine(r.row-1).length);else{var t=this.session.getTabSize();this.wouldMoveIntoSoftTab(r,t,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-t):this.moveCursorBy(0,-1)}},i.prototype.moveCursorRight=function(){var r=this.lead.getPosition(),o;if(o=this.session.getFoldAt(r.row,r.column,1))this.moveCursorTo(o.end.row,o.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(),r=this.lead;this.wouldMoveIntoSoftTab(r,t,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,t):this.moveCursorBy(0,1)}},i.prototype.moveCursorLineStart=function(){var r=this.lead.row,o=this.lead.column,t=this.session.documentToScreenRow(r,o),e=this.session.screenToDocumentPosition(t,0),n=this.session.getDisplayLine(r,null,e.row,e.column),s=n.match(/^\s*/);s[0].length!=o&&!this.session.$useEmacsStyleLineStart&&(e.column+=s[0].length),this.moveCursorToPosition(e)},i.prototype.moveCursorLineEnd=function(){var r=this.lead,o=this.session.getDocumentLastRowColumnPosition(r.row,r.column);if(this.lead.column==o.column){var t=this.session.getLine(o.row);if(o.column==t.length){var e=t.search(/\s+$/);e>0&&(o.column=e)}}this.moveCursorTo(o.row,o.column)},i.prototype.moveCursorFileEnd=function(){var r=this.doc.getLength()-1,o=this.doc.getLine(r).length;this.moveCursorTo(r,o)},i.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},i.prototype.moveCursorLongWordRight=function(){var r=this.lead.row,o=this.lead.column,t=this.doc.getLine(r),e=t.substring(o);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var n=this.session.getFoldAt(r,o,1);if(n){this.moveCursorTo(n.end.row,n.end.column);return}if(this.session.nonTokenRe.exec(e)&&(o+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,e=t.substring(o)),o>=t.length){this.moveCursorTo(r,t.length),this.moveCursorRight(),r<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(e)&&(o+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(r,o)},i.prototype.moveCursorLongWordLeft=function(){var r=this.lead.row,o=this.lead.column,t;if(t=this.session.getFoldAt(r,o,-1)){this.moveCursorTo(t.start.row,t.start.column);return}var e=this.session.getFoldStringAt(r,o,-1);e==null&&(e=this.doc.getLine(r).substring(0,o));var n=S.stringReverse(e);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(n)&&(o-=this.session.nonTokenRe.lastIndex,n=n.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),o<=0){this.moveCursorTo(r,0),this.moveCursorLeft(),r>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(n)&&(o-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(r,o)},i.prototype.$shortWordEndIndex=function(r){var o=0,t,e=/\s/,n=this.session.tokenRe;if(n.lastIndex=0,this.session.tokenRe.exec(r))o=this.session.tokenRe.lastIndex;else{for(;(t=r[o])&&e.test(t);)o++;if(o<1){for(n.lastIndex=0;(t=r[o])&&!n.test(t);)if(n.lastIndex=0,o++,e.test(t))if(o>2){o--;break}else{for(;(t=r[o])&&e.test(t);)o++;if(o>2)break}}}return n.lastIndex=0,o},i.prototype.moveCursorShortWordRight=function(){var r=this.lead.row,o=this.lead.column,t=this.doc.getLine(r),e=t.substring(o),n=this.session.getFoldAt(r,o,1);if(n)return this.moveCursorTo(n.end.row,n.end.column);if(o==t.length){var s=this.doc.getLength();do r++,e=this.doc.getLine(r);while(r<s&&/^\s*$/.test(e));/^\s+/.test(e)||(e=""),o=0}var f=this.$shortWordEndIndex(e);this.moveCursorTo(r,o+f)},i.prototype.moveCursorShortWordLeft=function(){var r=this.lead.row,o=this.lead.column,t;if(t=this.session.getFoldAt(r,o,-1))return this.moveCursorTo(t.start.row,t.start.column);var e=this.session.getLine(r).substring(0,o);if(o===0){do r--,e=this.doc.getLine(r);while(r>0&&/^\s*$/.test(e));o=e.length,/\s+$/.test(e)||(e="")}var n=S.stringReverse(e),s=this.$shortWordEndIndex(n);return this.moveCursorTo(r,o-s)},i.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},i.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},i.prototype.moveCursorBy=function(r,o){var t=this.session.documentToScreenPosition(this.lead.row,this.lead.column),e;if(o===0&&(r!==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),r!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var n=this.session.lineWidgets[this.lead.row];r<0?r-=n.rowsAbove||0:r>0&&(r+=n.rowCount-(n.rowsAbove||0))}var s=this.session.screenToDocumentPosition(t.row+r,t.column,e);r!==0&&o===0&&s.row===this.lead.row&&(s.column,this.lead.column),this.moveCursorTo(s.row,s.column+o,o===0)},i.prototype.moveCursorToPosition=function(r){this.moveCursorTo(r.row,r.column)},i.prototype.moveCursorTo=function(r,o,t){var e=this.session.getFoldAt(r,o,1);e&&(r=e.start.row,o=e.start.column),this.$keepDesiredColumnOnChange=!0;var n=this.session.getLine(r);/[\uDC00-\uDFFF]/.test(n.charAt(o))&&n.charAt(o-1)&&(this.lead.row==r&&this.lead.column==o+1?o=o-1:o=o+1),this.lead.setPosition(r,o),this.$keepDesiredColumnOnChange=!1,t||(this.$desiredColumn=null)},i.prototype.moveCursorToScreen=function(r,o,t){var e=this.session.screenToDocumentPosition(r,o);this.moveCursorTo(e.row,e.column,t)},i.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},i.prototype.fromOrientedRange=function(r){this.setSelectionRange(r,r.cursor==r.start),this.$desiredColumn=r.desiredColumn||this.$desiredColumn},i.prototype.toOrientedRange=function(r){var o=this.getRange();return r?(r.start.column=o.start.column,r.start.row=o.start.row,r.end.column=o.end.column,r.end.row=o.end.row):r=o,r.cursor=this.isBackwards()?r.start:r.end,r.desiredColumn=this.$desiredColumn,r},i.prototype.getRangeOfMovements=function(r){var o=this.getCursor();try{r(this);var t=this.getCursor();return a.fromPoints(o,t)}catch{return a.fromPoints(o,o)}finally{this.moveCursorToPosition(o)}},i.prototype.toJSON=function(){if(this.rangeCount)var r=this.ranges.map(function(o){var t=o.clone();return t.isBackwards=o.cursor==o.start,t});else{var r=this.getRange();r.isBackwards=this.isBackwards()}return r},i.prototype.fromJSON=function(r){if(r.start==null)if(this.rangeList&&r.length>1){this.toSingleRange(r[0]);for(var o=r.length;o--;){var t=a.fromPoints(r[o].start,r[o].end);r[o].isBackwards&&(t.cursor=t.start),this.addRange(t,!0)}return}else r=r[0];this.rangeList&&this.toSingleRange(r),this.setSelectionRange(r,r.isBackwards)},i.prototype.isEqual=function(r){if((r.length||this.rangeCount)&&r.length!=this.rangeCount)return!1;if(!r.length||!this.ranges)return this.getRange().isEqual(r);for(var o=this.ranges.length;o--;)if(!this.ranges[o].isEqual(r[o]))return!1;return!0},i}();h.prototype.setSelectionAnchor=h.prototype.setAnchor,h.prototype.getSelectionAnchor=h.prototype.getAnchor,h.prototype.setSelectionRange=h.prototype.setRange,E.implement(h.prototype,_),p.Selection=h}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(g,p,se){var E=g("./lib/report_error").reportError,S=2e3,_=function(){function a(h){this.splitRegex,this.states=h,this.regExps={},this.matchMappings={};for(var i in this.states){for(var r=this.states[i],o=[],t=0,e=this.matchMappings[i]={defaultToken:"text"},n="g",s=[],f=0;f<r.length;f++){var m=r[f];if(m.defaultToken&&(e.defaultToken=m.defaultToken),m.caseInsensitive&&n.indexOf("i")===-1&&(n+="i"),m.unicode&&n.indexOf("u")===-1&&(n+="u"),m.regex!=null){m.regex instanceof RegExp&&(m.regex=m.regex.toString().slice(1,-1));var x=m.regex,A=new RegExp("(?:("+x+")|(.))").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)?x=m.regex.replace(/\\([0-9]+)/g,function(C,b){return"\\"+(parseInt(b,10)+t+1)}):(A=1,x=this.removeCapturingGroups(m.regex)),!m.splitRegex&&typeof m.token!="string"&&s.push(m)),e[t]=f,t+=A,o.push(x),m.onMatch||(m.onMatch=null)}}o.length||(e[0]=0,o.push("$")),s.forEach(function(C){C.splitRegex=this.createSplitterRegexp(C.regex,n)},this),this.regExps[i]=new RegExp("("+o.join(")|(")+")|($)",n)}}return a.prototype.$setMaxTokenCount=function(h){S=h|0},a.prototype.$applyToken=function(h){var i=this.splitRegex.exec(h).slice(1),r=this.token.apply(this,i);if(typeof r=="string")return[{type:r,value:h}];for(var o=[],t=0,e=r.length;t<e;t++)i[t]&&(o[o.length]={type:r[t],value:i[t]});return o},a.prototype.$arrayTokens=function(h){if(!h)return[];var i=this.splitRegex.exec(h);if(!i)return"text";for(var r=[],o=this.tokenArray,t=0,e=o.length;t<e;t++)i[t+1]&&(r[r.length]={type:o[t],value:i[t+1]});return r},a.prototype.removeCapturingGroups=function(h){var i=h.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(r,o){return o?"(?:":r});return i},a.prototype.createSplitterRegexp=function(h,i){if(h.indexOf("(?=")!=-1){var r=0,o=!1,t={};h.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,n,s,f,m,x){return o?o=m!="]":m?o=!0:f?(r==t.stack&&(t.end=x+1,t.stack=-1),r--):s&&(r++,s.length!=1&&(t.stack=r,t.start=x)),e}),t.end!=null&&/^\)*$/.test(h.substr(t.end))&&(h=h.substring(0,t.start)+h.substr(t.end))}return h.charAt(0)!="^"&&(h="^"+h),h.charAt(h.length-1)!="$"&&(h+="$"),new RegExp(h,(i||"").replace("g",""))},a.prototype.getLineTokens=function(h,i){if(i&&typeof i!="string"){var r=i.slice(0);i=r[0],i==="#tmp"&&(r.shift(),i=r.shift())}else var r=[];var o=i||"start",t=this.states[o];t||(o="start",t=this.states[o]);var e=this.matchMappings[o],n=this.regExps[o];n.lastIndex=0;for(var s,f=[],m=0,x=0,A={type:null,value:""};s=n.exec(h);){var C=e.defaultToken,b=null,G=s[0],Se=n.lastIndex;if(Se-G.length>m){var q=h.substring(m,Se-G.length);A.type==C?A.value+=q:(A.type&&f.push(A),A={type:C,value:q})}for(var U=0;U<s.length-2;U++)if(s[U+1]!==void 0){b=t[e[U]],b.onMatch?C=b.onMatch(G,o,r,h):C=b.token,b.next&&(typeof b.next=="string"?o=b.next:o=b.next(o,r),t=this.states[o],t||(this.reportError("state doesn't exist",o),o="start",t=this.states[o]),e=this.matchMappings[o],m=Se,n=this.regExps[o],n.lastIndex=Se),b.consumeLineEnd&&(m=Se);break}if(G){if(typeof C=="string")(!b||b.merge!==!1)&&A.type===C?A.value+=G:(A.type&&f.push(A),A={type:C,value:G});else if(C){A.type&&f.push(A),A={type:null,value:""};for(var U=0;U<C.length;U++)f.push(C[U])}}if(m==h.length)break;if(m=Se,x++>S){for(x>2*h.length&&this.reportError("infinite loop with in ace tokenizer",{startState:i,line:h});m<h.length;)A.type&&f.push(A),A={value:h.substring(m,m+=500),type:"overflow"};o="start",r=[];break}}return A.type&&f.push(A),r.length>1&&r[0]!==o&&r.unshift("#tmp",o),{tokens:f,state:r.length?r:o}},a}();_.prototype.reportError=E,p.Tokenizer=_}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(g,p,se){var E=g("../lib/deep_copy").deepCopy,S;S=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(h,i){if(!i){for(var r in h)this.$rules[r]=h[r];return}for(var r in h){for(var o=h[r],t=0;t<o.length;t++){var e=o[t];(e.next||e.onMatch)&&(typeof e.next=="string"&&e.next.indexOf(i)!==0&&(e.next=i+e.next),e.nextState&&e.nextState.indexOf(i)!==0&&(e.nextState=i+e.nextState))}this.$rules[i+r]=o}},this.getRules=function(){return this.$rules},this.embedRules=function(h,i,r,o,t){var e=typeof h=="function"?new h().getRules():h;if(o)for(var n=0;n<o.length;n++)o[n]=i+o[n];else{o=[];for(var s in e)o.push(i+s)}if(this.addRules(e,i),r)for(var f=Array.prototype[t?"push":"unshift"],n=0;n<o.length;n++)f.apply(this.$rules[o[n]],E(r));this.$embeds||(this.$embeds=[]),this.$embeds.push(i)},this.getEmbeds=function(){return this.$embeds};var _=function(h,i){return(h!="start"||i.length)&&i.unshift(this.nextState,h),this.nextState},a=function(h,i){return i.shift(),i.shift()||"start"};this.normalizeRules=function(){var h=0,i=this.$rules;function r(o){var t=i[o];t.processed=!0;for(var e=0;e<t.length;e++){var n=t[e],s=null;Array.isArray(n)&&(s=n,n={}),!n.regex&&n.start&&(n.regex=n.start,n.next||(n.next=[]),n.next.push({defaultToken:n.token},{token:n.token+".end",regex:n.end||n.start,next:"pop"}),n.token=n.token+".start",n.push=!0);var f=n.next||n.push;if(f&&Array.isArray(f)){var m=n.stateName;m||(m=n.token,typeof m!="string"&&(m=m[0]||""),i[m]&&(m+=h++)),i[m]=f,n.next=m,r(m)}else f=="pop"&&(n.next=a);if(n.push&&(n.nextState=n.next||n.push,n.next=_,delete n.push),n.rules)for(var x in n.rules)i[x]?i[x].push&&i[x].push.apply(i[x],n.rules[x]):i[x]=n.rules[x];var A=typeof n=="string"?n:n.include;if(A&&(A==="$self"&&(A="start"),Array.isArray(A)?s=A.map(function(b){return i[b]}):s=i[A]),s){var C=[e,1].concat(s);n.noEscape&&(C=C.filter(function(b){return!b.next})),t.splice.apply(t,C),e--}n.keywordMap&&(n.token=this.createKeywordMapper(n.keywordMap,n.defaultToken||"text",n.caseInsensitive),delete n.defaultToken)}}Object.keys(i).forEach(r,this)},this.createKeywordMapper=function(h,i,r,o){var t=Object.create(null);return this.$keywordList=[],Object.keys(h).forEach(function(e){for(var n=h[e],s=n.split(o||"|"),f=s.length;f--;){var m=s[f];this.$keywordList.push(m),r&&(m=m.toLowerCase()),t[m]=e}},this),h=null,r?function(e){return t[e.toLowerCase()]||i}:function(e){return t[e]||i}},this.getKeywords=function(){return this.$keywords}}).call(S.prototype),p.TextHighlightRules=S}),ace.define("ace/mode/behaviour",["require","exports","module"],function(g,p,se){var E;E=function(){this.$behaviours={}},(function(){this.add=function(S,_,a){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[S]:this.$behaviours[S]={}}this.$behaviours[S][_]=a},this.addBehaviours=function(S){for(var _ in S)for(var a in S[_])this.add(_,a,S[_][a])},this.remove=function(S){this.$behaviours&&this.$behaviours[S]&&delete this.$behaviours[S]},this.inherit=function(S,_){if(typeof S=="function")var a=new S().getBehaviours(_);else var a=S.getBehaviours(_);this.addBehaviours(a)},this.getBehaviours=function(S){if(S){for(var _={},a=0;a<S.length;a++)this.$behaviours[S[a]]&&(_[S[a]]=this.$behaviours[S[a]]);return _}else return this.$behaviours}}).call(E.prototype),p.Behaviour=E}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(g,p,se){var E=g("./range").Range,S=function(){function _(a,h,i){this.$session=a,this.$row=h,this.$rowTokens=a.getTokens(h);var r=a.getTokenAt(h,i);this.$tokenIndex=r?r.index:-1}return _.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},_.prototype.stepForward=function(){this.$tokenIndex+=1;for(var 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]},_.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},_.prototype.getCurrentTokenRow=function(){return this.$row},_.prototype.getCurrentTokenColumn=function(){var a=this.$rowTokens,h=this.$tokenIndex,i=a[h].start;if(i!==void 0)return i;for(i=0;h>0;)h-=1,i+=a[h].value.length;return i},_.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},_.prototype.getCurrentTokenRange=function(){var a=this.$rowTokens[this.$tokenIndex],h=this.getCurrentTokenColumn();return new E(this.$row,h,this.$row,h+a.value.length)},_}();p.TokenIterator=S}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(g,p,se){var E=g("../../lib/oop"),S=g("../behaviour").Behaviour,_=g("../../token_iterator").TokenIterator,a=g("../../lib/lang"),h=["text","paren.rparen","rparen","paren","punctuation.operator"],i=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],r,o={},t={'"':'"',"'":"'"},e=function(f){var m=-1;if(f.multiSelect&&(m=f.selection.index,o.rangeCount!=f.multiSelect.rangeCount&&(o={rangeCount:f.multiSelect.rangeCount})),o[m])return r=o[m];r=o[m]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},n=function(f,m,x,A){var C=f.end.row-f.start.row;return{text:x+m+A,selection:[0,f.start.column+1,C,f.end.column+(C?0:1)]}},s;s=function(f){f=f||{},this.add("braces","insertion",function(m,x,A,C,b){var G=A.getCursorPosition(),Se=C.doc.getLine(G.row);if(b=="{"){e(A);var q=A.getSelectionRange(),U=C.doc.getTextRange(q),at=C.getTokenAt(G.row,G.column);if(U!==""&&U!=="{"&&A.getWrapBehavioursEnabled())return n(q,U,"{","}");if(at&&/(?:string)\.quasi|\.xml/.test(at.type)){var j=[/tag\-(?:open|name)/,/attribute\-name/];return j.some(function(ot){return ot.test(at.type)})||/(string)\.quasi/.test(at.type)&&at.value[G.column-at.start-1]!=="$"?void 0:(s.recordAutoInsert(A,C,"}"),{text:"{}",selection:[1,1]})}else if(s.isSaneInsertion(A,C))return/[\]\}\)]/.test(Se[G.column])||A.inMultiSelectMode||f.braces?(s.recordAutoInsert(A,C,"}"),{text:"{}",selection:[1,1]}):(s.recordMaybeInsert(A,C,"{"),{text:"{",selection:[1,1]})}else if(b=="}"){e(A);var W=Se.substring(G.column,G.column+1);if(W=="}"){var y=C.$findOpeningBracket("}",{column:G.column+1,row:G.row});if(y!==null&&s.isAutoInsertedClosing(G,Se,b))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(b==`
|
182
|
+
`||b==`\r
|
183
|
+
`){e(A);var v="";s.isMaybeInsertedClosing(G,Se)&&(v=a.stringRepeat("}",r.maybeInsertedBrackets),s.clearMaybeInsertedClosing());var W=Se.substring(G.column,G.column+1);if(W==="}"){var D=C.findMatchingBracket({row:G.row,column:G.column+1},"}");if(!D)return null;var Ee=this.$getIndent(C.getLine(D.row))}else if(v)var Ee=this.$getIndent(Se);else{s.clearMaybeInsertedClosing();return}var qe=Ee+C.getTabString();return{text:`
|
184
|
+
`+qe+`
|
185
|
+
`+Ee+v,selection:[1,qe.length,1,qe.length]}}else s.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(m,x,A,C,b){var G=C.doc.getTextRange(b);if(!b.isMultiLine()&&G=="{"){e(A);var Se=C.doc.getLine(b.start.row),q=Se.substring(b.end.column,b.end.column+1);if(q=="}")return b.end.column++,b;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(m,x,A,C,b){if(b=="("){e(A);var G=A.getSelectionRange(),Se=C.doc.getTextRange(G);if(Se!==""&&A.getWrapBehavioursEnabled())return n(G,Se,"(",")");if(s.isSaneInsertion(A,C))return s.recordAutoInsert(A,C,")"),{text:"()",selection:[1,1]}}else if(b==")"){e(A);var q=A.getCursorPosition(),U=C.doc.getLine(q.row),at=U.substring(q.column,q.column+1);if(at==")"){var j=C.$findOpeningBracket(")",{column:q.column+1,row:q.row});if(j!==null&&s.isAutoInsertedClosing(q,U,b))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(m,x,A,C,b){var G=C.doc.getTextRange(b);if(!b.isMultiLine()&&G=="("){e(A);var Se=C.doc.getLine(b.start.row),q=Se.substring(b.start.column+1,b.start.column+2);if(q==")")return b.end.column++,b}}),this.add("brackets","insertion",function(m,x,A,C,b){if(b=="["){e(A);var G=A.getSelectionRange(),Se=C.doc.getTextRange(G);if(Se!==""&&A.getWrapBehavioursEnabled())return n(G,Se,"[","]");if(s.isSaneInsertion(A,C))return s.recordAutoInsert(A,C,"]"),{text:"[]",selection:[1,1]}}else if(b=="]"){e(A);var q=A.getCursorPosition(),U=C.doc.getLine(q.row),at=U.substring(q.column,q.column+1);if(at=="]"){var j=C.$findOpeningBracket("]",{column:q.column+1,row:q.row});if(j!==null&&s.isAutoInsertedClosing(q,U,b))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(m,x,A,C,b){var G=C.doc.getTextRange(b);if(!b.isMultiLine()&&G=="["){e(A);var Se=C.doc.getLine(b.start.row),q=Se.substring(b.start.column+1,b.start.column+2);if(q=="]")return b.end.column++,b}}),this.add("string_dquotes","insertion",function(m,x,A,C,b){var G=C.$mode.$quotes||t;if(b.length==1&&G[b]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(b)!=-1)return;e(A);var Se=b,q=A.getSelectionRange(),U=C.doc.getTextRange(q);if(U!==""&&(U.length!=1||!G[U])&&A.getWrapBehavioursEnabled())return n(q,U,Se,Se);if(!U){var at=A.getCursorPosition(),j=C.doc.getLine(at.row),W=j.substring(at.column-1,at.column),y=j.substring(at.column,at.column+1),v=C.getTokenAt(at.row,at.column),D=C.getTokenAt(at.row,at.column+1);if(W=="\\"&&v&&/escape/.test(v.type))return null;var Ee=v&&/string|escape/.test(v.type),qe=!D||/string|escape/.test(D.type),ot;if(y==Se)ot=Ee!==qe,ot&&/string\.end/.test(D.type)&&(ot=!1);else{if(Ee&&!qe||Ee&&qe)return null;var lt=C.$mode.tokenRe;lt.lastIndex=0;var ct=lt.test(W);lt.lastIndex=0;var Ut=lt.test(y),Mt=C.$mode.$pairQuotesAfter,zt=Mt&&Mt[Se]&&Mt[Se].test(W);if(!zt&&ct||Ut||y&&!/[\s;,.})\]\\]/.test(y))return null;var Ht=j[at.column-2];if(W==Se&&(Ht==Se||lt.test(Ht)))return null;ot=!0}return{text:ot?Se+Se:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(m,x,A,C,b){var G=C.$mode.$quotes||t,Se=C.doc.getTextRange(b);if(!b.isMultiLine()&&G.hasOwnProperty(Se)){e(A);var q=C.doc.getLine(b.start.row),U=q.substring(b.start.column+1,b.start.column+2);if(U==Se)return b.end.column++,b}}),f.closeDocComment!==!1&&this.add("doc comment end","insertion",function(m,x,A,C,b){if(m==="doc-start"&&(b===`
|
186
|
+
`||b===`\r
|
187
|
+
`)&&A.selection.isEmpty()){var G=A.getCursorPosition();if(G.column===0)return;for(var Se=C.doc.getLine(G.row),q=C.doc.getLine(G.row+1),U=C.getTokens(G.row),at=0,j=0;j<U.length;j++){at+=U[j].value.length;var W=U[j];if(at>=G.column){if(at===G.column){if(!/\.doc/.test(W.type))return;if(/\*\//.test(W.value)){var y=U[j+1];if(!y||!/\.doc/.test(y.type))return}}var v=G.column-(at-W.value.length),D=W.value.indexOf("*/"),Ee=W.value.indexOf("/**",D>-1?D+2:0);if(Ee!==-1&&v>Ee&&v<Ee+3||D!==-1&&Ee!==-1&&v>=D&&v<=Ee||!/\.doc/.test(W.type))return;break}}var qe=this.$getIndent(Se);if(/\s*\*/.test(q))return/^\s*\*/.test(Se)?{text:b+qe+"* ",selection:[1,2+qe.length,1,2+qe.length]}:{text:b+qe+" * ",selection:[1,3+qe.length,1,3+qe.length]};if(/\/\*\*/.test(Se.substring(0,G.column)))return{text:b+qe+" * "+b+" "+qe+"*/",selection:[1,4+qe.length,1,4+qe.length]}}})},s.isSaneInsertion=function(f,m){var x=f.getCursorPosition(),A=new _(m,x.row,x.column);if(!this.$matchTokenType(A.getCurrentToken()||"text",h)){if(/[)}\]]/.test(f.session.getLine(x.row)[x.column]))return!0;var C=new _(m,x.row,x.column+1);if(!this.$matchTokenType(C.getCurrentToken()||"text",h))return!1}return A.stepForward(),A.getCurrentTokenRow()!==x.row||this.$matchTokenType(A.getCurrentToken()||"text",i)},s.$matchTokenType=function(f,m){return m.indexOf(f.type||f)>-1},s.recordAutoInsert=function(f,m,x){var A=f.getCursorPosition(),C=m.doc.getLine(A.row);this.isAutoInsertedClosing(A,C,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=A.row,r.autoInsertedLineEnd=x+C.substr(A.column),r.autoInsertedBrackets++},s.recordMaybeInsert=function(f,m,x){var A=f.getCursorPosition(),C=m.doc.getLine(A.row);this.isMaybeInsertedClosing(A,C)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=A.row,r.maybeInsertedLineStart=C.substr(0,A.column)+x,r.maybeInsertedLineEnd=C.substr(A.column),r.maybeInsertedBrackets++},s.isAutoInsertedClosing=function(f,m,x){return r.autoInsertedBrackets>0&&f.row===r.autoInsertedRow&&x===r.autoInsertedLineEnd[0]&&m.substr(f.column)===r.autoInsertedLineEnd},s.isMaybeInsertedClosing=function(f,m){return r.maybeInsertedBrackets>0&&f.row===r.maybeInsertedRow&&m.substr(f.column)===r.maybeInsertedLineEnd&&m.substr(0,f.column)==r.maybeInsertedLineStart},s.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},s.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},E.inherits(s,S),p.CstyleBehaviour=s}),ace.define("ace/unicode",["require","exports","module"],function(g,p,se){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,_=[],a=0;a<E.length;a+=2)_.push(S+=E[a]),E[a+1]&&_.push(45,S+=E[a+1]);p.wordChars=String.fromCharCode.apply(null,_)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(g,p,se){var E=g("../config"),S=g("../tokenizer").Tokenizer,_=g("./text_highlight_rules").TextHighlightRules,a=g("./behaviour/cstyle").CstyleBehaviour,h=g("../unicode"),i=g("../lib/lang"),r=g("../token_iterator").TokenIterator,o=g("../range").Range,t;t=function(){this.HighlightRules=_},(function(){this.$defaultBehaviour=new a,this.tokenRe=new RegExp("^["+h.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+h.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new S(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,n,s,f){var m=n.doc,x=!0,A=!0,C=1/0,b=n.getTabSize(),G=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var U=this.lineCommentStart.map(i.escapeRegExp).join("|"),Se=this.lineCommentStart[0];else var U=i.escapeRegExp(this.lineCommentStart),Se=this.lineCommentStart;U=new RegExp("^(\\s*)(?:"+U+") ?"),G=n.getUseSoftTabs();var W=function(Ut,Mt){var zt=Ut.match(U);if(zt){var Ht=zt[1].length,Vt=zt[0].length;!D(Ut,Ht,Vt)&&zt[0][Vt-1]==" "&&Vt--,m.removeInLine(Mt,Ht,Vt)}},v=Se+" ",j=function(Ut,Mt){(!x||/\S/.test(Ut))&&(D(Ut,C,C)?m.insertInLine({row:Mt,column:C},v):m.insertInLine({row:Mt,column:C},Se))},y=function(Ut,Mt){return U.test(Ut)},D=function(Ut,Mt,zt){for(var Ht=0;Mt--&&Ut.charAt(Mt)==" ";)Ht++;if(Ht%b!=0)return!1;for(var Ht=0;Ut.charAt(zt++)==" ";)Ht++;return b>2?Ht%b!=b-1:Ht%b==0}}else{if(!this.blockComment)return!1;var Se=this.blockComment.start,q=this.blockComment.end,U=new RegExp("^(\\s*)(?:"+i.escapeRegExp(Se)+")"),at=new RegExp("(?:"+i.escapeRegExp(q)+")\\s*$"),j=function(ot,lt){y(ot,lt)||(!x||/\S/.test(ot))&&(m.insertInLine({row:lt,column:ot.length},q),m.insertInLine({row:lt,column:C},Se))},W=function(ot,lt){var ct;(ct=ot.match(at))&&m.removeInLine(lt,ot.length-ct[0].length,ot.length),(ct=ot.match(U))&&m.removeInLine(lt,ct[1].length,ct[0].length)},y=function(ot,lt){if(U.test(ot))return!0;for(var ct=n.getTokens(lt),Ut=0;Ut<ct.length;Ut++)if(ct[Ut].type==="comment")return!0}}function Ee(ot){for(var lt=s;lt<=f;lt++)ot(m.getLine(lt),lt)}var qe=1/0;Ee(function(ot,lt){var ct=ot.search(/\S/);ct!==-1?(ct<C&&(C=ct),A&&!y(ot,lt)&&(A=!1)):qe>ot.length&&(qe=ot.length)}),C==1/0&&(C=qe,x=!1,A=!1),G&&C%b!=0&&(C=Math.floor(C/b)*b),Ee(A?W:j)},this.toggleBlockComment=function(e,n,s,f){var m=this.blockComment;if(m){!m.start&&m[0]&&(m=m[0]);var x=new r(n,f.row,f.column),A=x.getCurrentToken();n.selection;var C=n.selection.toOrientedRange(),b,G;if(A&&/comment/.test(A.type)){for(var Se,q;A&&/comment/.test(A.type);){var U=A.value.indexOf(m.start);if(U!=-1){var at=x.getCurrentTokenRow(),j=x.getCurrentTokenColumn()+U;Se=new o(at,j,at,j+m.start.length);break}A=x.stepBackward()}for(var x=new r(n,f.row,f.column),A=x.getCurrentToken();A&&/comment/.test(A.type);){var U=A.value.indexOf(m.end);if(U!=-1){var at=x.getCurrentTokenRow(),j=x.getCurrentTokenColumn()+U;q=new o(at,j,at,j+m.end.length);break}A=x.stepForward()}q&&n.remove(q),Se&&(n.remove(Se),b=Se.start.row,G=-m.start.length)}else G=m.start.length,b=s.start.row,n.insert(s.end,m.end),n.insert(s.start,m.start);C.start.row==b&&(C.start.column+=G),C.end.row==b&&(C.end.column+=G),n.selection.fromOrientedRange(C)}},this.getNextLineIndent=function(e,n,s){return this.$getIndent(n)},this.checkOutdent=function(e,n,s){return!1},this.autoOutdent=function(e,n,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 n in e)if(e[n]){var s=e[n],f=s.prototype.$id,m=E.$modes[f];m||(E.$modes[f]=m=new s),E.$modes[n]||(E.$modes[n]=m),this.$embeds.push(n),this.$modes[n]=m}for(var x=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],A=function(b){(function(G){var Se=x[b],q=G[Se];G[x[b]]=function(){return this.$delegator(Se,arguments,q)}})(C)},C=this,n=0;n<x.length;n++)A(n)},this.$delegator=function(e,n,s){var f=n[0]||"start";if(typeof f!="string"){if(Array.isArray(f[2])){var m=f[2][f[2].length-1],x=this.$modes[m];if(x)return x[e].apply(x,[f[1]].concat([].slice.call(n,1)))}f=f[0]||"start"}for(var A=0;A<this.$embeds.length;A++)if(this.$modes[this.$embeds[A]]){var C=f.split(this.$embeds[A]);if(!C[0]&&C[1]){n[0]=C[1];var x=this.$modes[this.$embeds[A]];return x[e].apply(x,n)}}var b=s.apply(this,n);return s?b:void 0},this.transformAction=function(e,n,s,f,m){if(this.$behaviour){var x=this.$behaviour.getBehaviours();for(var A in x)if(x[A][n]){var C=x[A][n].apply(this,arguments);if(C)return C}}},this.getKeywords=function(e){if(!this.completionKeywords){var n=this.$tokenizer.rules,s=[];for(var f in n)for(var m=n[f],x=0,A=m.length;x<A;x++)if(typeof m[x].token=="string")/keyword|support|storage/.test(m[x].token)&&s.push(m[x].regex);else if(typeof m[x].token=="object"){for(var C=0,b=m[x].token.length;C<b;C++)if(/keyword|support|storage/.test(m[x].token[C])){var f=m[x].regex.match(/\(.+?\)/g)[C];s.push(f.substr(1,f.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,n,s,f){var m=this.$keywordList||this.$createKeywordList();return m.map(function(x){return{name:x,value:x,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(t.prototype),p.Mode=t}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(g,p,se){var E=g("./lib/dom"),S=function(){function _(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 _.prototype.getRowLength=function(a){var h;return this.lineWidgets?h=this.lineWidgets[a]&&this.lineWidgets[a].rowCount||0:h=0,!this.$useWrapMode||!this.$wrapData[a]?1+h:this.$wrapData[a].length+1+h},_.prototype.$getWidgetScreenLength=function(){var a=0;return this.lineWidgets.forEach(function(h){h&&h.rowCount&&!h.hidden&&(a+=h.rowCount)}),a},_.prototype.$onChangeEditor=function(a){this.attach(a.editor)},_.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)))},_.prototype.detach=function(a){var h=this.editor;if(h){this.editor=null,h.widgetManager=null,h.renderer.off("beforeRender",this.measureWidgets),h.renderer.off("afterRender",this.renderWidgets);var i=this.session.lineWidgets;i&&i.forEach(function(r){r&&r.el&&r.el.parentNode&&(r._inDocument=!1,r.el.parentNode.removeChild(r.el))})}},_.prototype.updateOnFold=function(a,h){var i=h.lineWidgets;if(!(!i||!a.action)){for(var r=a.data,o=r.start.row,t=r.end.row,e=a.action=="add",n=o+1;n<t;n++)i[n]&&(i[n].hidden=e);i[t]&&(e?i[o]?i[t].hidden=e:i[o]=i[t]:(i[o]==i[t]&&(i[o]=void 0),i[t].hidden=e))}},_.prototype.updateOnChange=function(a){var h=this.session.lineWidgets;if(h){var i=a.start.row,r=a.end.row-i;if(r!==0)if(a.action=="remove"){var o=h.splice(i+1,r);!h[i]&&o[o.length-1]&&(h[i]=o.pop()),o.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var t=new Array(r);h[i]&&h[i].column!=null&&a.start.column>h[i].column&&i++,t.unshift(i,0),h.splice.apply(h,t),this.$updateRows()}}},_.prototype.$updateRows=function(){var a=this.session.lineWidgets;if(a){var h=!0;a.forEach(function(i,r){if(i)for(h=!1,i.row=r;i.$oldWidget;)i.$oldWidget.row=r,i=i.$oldWidget}),h&&(this.session.lineWidgets=null)}},_.prototype.$registerLineWidget=function(a){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var h=this.session.lineWidgets[a.row];return h&&(a.$oldWidget=h,h.el&&h.el.parentNode&&(h.el.parentNode.removeChild(h.el),h._inDocument=!1)),this.session.lineWidgets[a.row]=a,a},_.prototype.addLineWidget=function(a){if(this.$registerLineWidget(a),a.session=this.session,!this.editor)return a;var h=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",h.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/h.layerConfig.lineHeight);var i=this.session.getFoldAt(a.row,0);if(a.$fold=i,i){var r=this.session.lineWidgets;a.row==i.end.row&&!r[i.start.row]?r[i.start.row]=a:a.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows(),this.renderWidgets(null,h),this.onWidgetChanged(a),a},_.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 h=this.session.lineWidgets[a.row];if(h==a)this.session.lineWidgets[a.row]=a.$oldWidget,a.$oldWidget&&this.onWidgetChanged(a.$oldWidget);else for(;h;){if(h.$oldWidget==a){h.$oldWidget=a.$oldWidget;break}h=h.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows()},_.prototype.getWidgetsAtRow=function(a){for(var h=this.session.lineWidgets,i=h&&h[a],r=[];i;)r.push(i),i=i.$oldWidget;return r},_.prototype.onWidgetChanged=function(a){this.session._changedWidgets.push(a),this.editor&&this.editor.renderer.updateFull()},_.prototype.measureWidgets=function(a,h){var i=this.session._changedWidgets,r=h.layerConfig;if(!(!i||!i.length)){for(var o=1/0,t=0;t<i.length;t++){var e=i[t];if(!(!e||!e.el)&&e.session==this.session){if(!e._inDocument){if(this.session.lineWidgets[e.row]!=e)continue;e._inDocument=!0,h.container.appendChild(e.el)}e.h=e.el.offsetHeight,e.fixedWidth||(e.w=e.el.offsetWidth,e.screenWidth=Math.ceil(e.w/r.characterWidth));var n=e.h/r.lineHeight;e.coverLine&&(n-=this.session.getRowLineCount(e.row),n<0&&(n=0)),e.rowCount!=n&&(e.rowCount=n,e.row<o&&(o=e.row))}}o!=1/0&&(this.session._emit("changeFold",{data:{start:{row:o}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},_.prototype.renderWidgets=function(a,h){var i=h.layerConfig,r=this.session.lineWidgets;if(r){for(var o=Math.min(this.firstRow,i.firstRow),t=Math.max(this.lastRow,i.lastRow,r.length);o>0&&!r[o];)o--;this.firstRow=i.firstRow,this.lastRow=i.lastRow,h.$cursorLayer.config=i;for(var e=o;e<=t;e++){var n=r[e];if(!(!n||!n.el)){if(n.hidden){n.el.style.top=-100-(n.pixelHeight||0)+"px";continue}n._inDocument||(n._inDocument=!0,h.container.appendChild(n.el));var s=h.$cursorLayer.getPixelPosition({row:e,column:0},!0).top;n.coverLine||(s+=i.lineHeight*this.session.getRowLineCount(n.row)),n.el.style.top=s-i.offset+"px";var f=n.coverGutter?0:h.gutterWidth;n.fixedWidth||(f-=h.scrollLeft),n.el.style.left=f+"px",n.fullWidth&&n.screenWidth&&(n.el.style.minWidth=i.width+2*i.padding+"px"),n.fixedWidth?n.el.style.right=h.scrollBar.getWidth()+"px":n.el.style.right=""}}}},_}();p.LineWidgets=S}),ace.define("ace/apply_delta",["require","exports","module"],function(g,p,se){p.applyDelta=function(E,S,_){var a=S.start.row,h=S.start.column,i=E[a]||"";switch(S.action){case"insert":var r=S.lines;if(r.length===1)E[a]=i.substring(0,h)+S.lines[0]+i.substring(h);else{var o=[a,1].concat(S.lines);E.splice.apply(E,o),E[a]=i.substring(0,h)+E[a],E[a+S.lines.length-1]+=i.substring(h)}break;case"remove":var t=S.end.column,e=S.end.row;a===e?E[a]=i.substring(0,h)+i.substring(t):E.splice(a,e-a+1,i.substring(0,h)+E[e].substring(t));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(g,p,se){var E=g("./lib/oop"),S=g("./lib/event_emitter").EventEmitter,_=function(){function i(r,o,t){this.$onChange=this.onChange.bind(this),this.attach(r),typeof o!="number"?this.setPosition(o.row,o.column):this.setPosition(o,t)}return i.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},i.prototype.getDocument=function(){return this.document},i.prototype.onChange=function(r){if(!(r.start.row==r.end.row&&r.start.row!=this.row)&&!(r.start.row>this.row)){var o=h(r,{row:this.row,column:this.column},this.$insertRight);this.setPosition(o.row,o.column,!0)}},i.prototype.setPosition=function(r,o,t){var e;if(t?e={row:r,column:o}:e=this.$clipPositionToDocument(r,o),!(this.row==e.row&&this.column==e.column)){var n={row:this.row,column:this.column};this.row=e.row,this.column=e.column,this._signal("change",{old:n,value:e})}},i.prototype.detach=function(){this.document.off("change",this.$onChange)},i.prototype.attach=function(r){this.document=r||this.document,this.document.on("change",this.$onChange)},i.prototype.$clipPositionToDocument=function(r,o){var t={};return r>=this.document.getLength()?(t.row=Math.max(0,this.document.getLength()-1),t.column=this.document.getLine(t.row).length):r<0?(t.row=0,t.column=0):(t.row=r,t.column=Math.min(this.document.getLine(t.row).length,Math.max(0,o))),o<0&&(t.column=0),t},i}();_.prototype.$insertRight=!1,E.implement(_.prototype,S);function a(i,r,o){var t=o?i.column<=r.column:i.column<r.column;return i.row<r.row||i.row==r.row&&t}function h(i,r,o){var t=i.action=="insert",e=(t?1:-1)*(i.end.row-i.start.row),n=(t?1:-1)*(i.end.column-i.start.column),s=i.start,f=t?s:i.end;return a(r,s,o)?{row:r.row,column:r.column}:a(f,r,!o)?{row:r.row+e,column:r.column+(r.row==f.row?n:0)}:{row:s.row,column:s.column}}p.Anchor=_}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(g,p,se){var E=g("./lib/oop"),S=g("./apply_delta").applyDelta,_=g("./lib/event_emitter").EventEmitter,a=g("./range").Range,h=g("./anchor").Anchor,i=function(){function r(o){this.$lines=[""],o.length===0?this.$lines=[""]:Array.isArray(o)?this.insertMergedLines({row:0,column:0},o):this.insert({row:0,column:0},o)}return r.prototype.setValue=function(o){var t=this.getLength()-1;this.remove(new a(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},o||"")},r.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},r.prototype.createAnchor=function(o,t){return new h(this,o,t)},r.prototype.$detectNewLine=function(o){var t=o.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:`
|
188
|
+
`,this._signal("changeNewLineMode")},r.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
|
189
|
+
`;case"unix":return`
|
190
|
+
`;default:return this.$autoNewLine||`
|
191
|
+
`}},r.prototype.setNewLineMode=function(o){this.$newLineMode!==o&&(this.$newLineMode=o,this._signal("changeNewLineMode"))},r.prototype.getNewLineMode=function(){return this.$newLineMode},r.prototype.isNewLine=function(o){return o==`\r
|
192
|
+
`||o=="\r"||o==`
|
193
|
+
`},r.prototype.getLine=function(o){return this.$lines[o]||""},r.prototype.getLines=function(o,t){return this.$lines.slice(o,t+1)},r.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},r.prototype.getLength=function(){return this.$lines.length},r.prototype.getTextRange=function(o){return this.getLinesForRange(o).join(this.getNewLineCharacter())},r.prototype.getLinesForRange=function(o){var t;if(o.start.row===o.end.row)t=[this.getLine(o.start.row).substring(o.start.column,o.end.column)];else{t=this.getLines(o.start.row,o.end.row),t[0]=(t[0]||"").substring(o.start.column);var e=t.length-1;o.end.row-o.start.row==e&&(t[e]=t[e].substring(0,o.end.column))}return t},r.prototype.insertLines=function(o,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(o,t)},r.prototype.removeLines=function(o,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(o,t)},r.prototype.insertNewLine=function(o){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(o,["",""])},r.prototype.insert=function(o,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(o,this.$split(t))},r.prototype.insertInLine=function(o,t){var e=this.clippedPos(o.row,o.column),n=this.pos(o.row,o.column+t.length);return this.applyDelta({start:e,end:n,action:"insert",lines:[t]},!0),this.clonePos(n)},r.prototype.clippedPos=function(o,t){var e=this.getLength();o===void 0?o=e:o<0?o=0:o>=e&&(o=e-1,t=void 0);var n=this.getLine(o);return t==null&&(t=n.length),t=Math.min(Math.max(t,0),n.length),{row:o,column:t}},r.prototype.clonePos=function(o){return{row:o.row,column:o.column}},r.prototype.pos=function(o,t){return{row:o,column:t}},r.prototype.$clipPosition=function(o){var t=this.getLength();return o.row>=t?(o.row=Math.max(0,t-1),o.column=this.getLine(t-1).length):(o.row=Math.max(0,o.row),o.column=Math.min(Math.max(o.column,0),this.getLine(o.row).length)),o},r.prototype.insertFullLines=function(o,t){o=Math.min(Math.max(o,0),this.getLength());var e=0;o<this.getLength()?(t=t.concat([""]),e=0):(t=[""].concat(t),o--,e=this.$lines[o].length),this.insertMergedLines({row:o,column:e},t)},r.prototype.insertMergedLines=function(o,t){var e=this.clippedPos(o.row,o.column),n={row:e.row+t.length-1,column:(t.length==1?e.column:0)+t[t.length-1].length};return this.applyDelta({start:e,end:n,action:"insert",lines:t}),this.clonePos(n)},r.prototype.remove=function(o){var t=this.clippedPos(o.start.row,o.start.column),e=this.clippedPos(o.end.row,o.end.column);return this.applyDelta({start:t,end:e,action:"remove",lines:this.getLinesForRange({start:t,end:e})}),this.clonePos(t)},r.prototype.removeInLine=function(o,t,e){var n=this.clippedPos(o,t),s=this.clippedPos(o,e);return this.applyDelta({start:n,end:s,action:"remove",lines:this.getLinesForRange({start:n,end:s})},!0),this.clonePos(n)},r.prototype.removeFullLines=function(o,t){o=Math.min(Math.max(0,o),this.getLength()-1),t=Math.min(Math.max(0,t),this.getLength()-1);var e=t==this.getLength()-1&&o>0,n=t<this.getLength()-1,s=e?o-1:o,f=e?this.getLine(s).length:0,m=n?t+1:t,x=n?0:this.getLine(m).length,A=new a(s,f,m,x),C=this.$lines.slice(o,t+1);return this.applyDelta({start:A.start,end:A.end,action:"remove",lines:this.getLinesForRange(A)}),C},r.prototype.removeNewLine=function(o){o<this.getLength()-1&&o>=0&&this.applyDelta({start:this.pos(o,this.getLine(o).length),end:this.pos(o+1,0),action:"remove",lines:["",""]})},r.prototype.replace=function(o,t){if(o instanceof a||(o=a.fromPoints(o.start,o.end)),t.length===0&&o.isEmpty())return o.start;if(t==this.getTextRange(o))return o.end;this.remove(o);var e;return t?e=this.insert(o.start,t):e=o.start,e},r.prototype.applyDeltas=function(o){for(var t=0;t<o.length;t++)this.applyDelta(o[t])},r.prototype.revertDeltas=function(o){for(var t=o.length-1;t>=0;t--)this.revertDelta(o[t])},r.prototype.applyDelta=function(o,t){var e=o.action=="insert";(e?o.lines.length<=1&&!o.lines[0]:!a.comparePoints(o.start,o.end))||(e&&o.lines.length>2e4?this.$splitAndapplyLargeDelta(o,2e4):(S(this.$lines,o,t),this._signal("change",o)))},r.prototype.$safeApplyDelta=function(o){var t=this.$lines.length;(o.action=="remove"&&o.start.row<t&&o.end.row<t||o.action=="insert"&&o.start.row<=t)&&this.applyDelta(o)},r.prototype.$splitAndapplyLargeDelta=function(o,t){for(var e=o.lines,n=e.length-t+1,s=o.start.row,f=o.start.column,m=0,x=0;m<n;m=x){x+=t-1;var A=e.slice(m,x);A.push(""),this.applyDelta({start:this.pos(s+m,f),end:this.pos(s+x,f=0),action:o.action,lines:A},!0)}o.lines=e.slice(m),o.start.row=s+m,o.start.column=f,this.applyDelta(o,!0)},r.prototype.revertDelta=function(o){this.$safeApplyDelta({start:this.clonePos(o.start),end:this.clonePos(o.end),action:o.action=="insert"?"remove":"insert",lines:o.lines.slice()})},r.prototype.indexToPosition=function(o,t){for(var e=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,s=t||0,f=e.length;s<f;s++)if(o-=e[s].length+n,o<0)return{row:s,column:o+e[s].length+n};return{row:f-1,column:o+e[f-1].length+n}},r.prototype.positionToIndex=function(o,t){for(var e=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,s=0,f=Math.min(o.row,e.length),m=t||0;m<f;++m)s+=e[m].length+n;return s+o.column},r.prototype.$split=function(o){return o.split(/\r\n|\r|\n/)},r}();i.prototype.$autoNewLine="",i.prototype.$newLineMode="auto",E.implement(i.prototype,_),p.Document=i}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(g,p,se){var E=g("./lib/oop"),S=g("./lib/event_emitter").EventEmitter,_=function(){function a(h,i){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=h;var r=this;this.$worker=function(){if(r.running){for(var o=new Date,t=r.currentLine,e=-1,n=r.doc,s=t;r.lines[t];)t++;var f=n.getLength(),m=0;for(r.running=!1;t<f;){r.$tokenizeRow(t),e=t;do t++;while(r.lines[t]);if(m++,m%5===0&&new Date-o>20){r.running=setTimeout(r.$worker,20);break}}r.currentLine=t,e==-1&&(e=t),s<=e&&r.fireUpdateEvent(s,e)}}}return a.prototype.setTokenizer=function(h){this.tokenizer=h,this.lines=[],this.states=[],this.start(0)},a.prototype.setDocument=function(h){this.doc=h,this.lines=[],this.states=[],this.stop()},a.prototype.fireUpdateEvent=function(h,i){var r={first:h,last:i};this._signal("update",{data:r})},a.prototype.start=function(h){this.currentLine=Math.min(h||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},a.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},a.prototype.$updateOnChange=function(h){var i=h.start.row,r=h.end.row-i;if(r===0)this.lines[i]=null;else if(h.action=="remove")this.lines.splice(i,r+1,null),this.states.splice(i,r+1,null);else{var o=Array(r+1);o.unshift(i,1),this.lines.splice.apply(this.lines,o),this.states.splice.apply(this.states,o)}this.currentLine=Math.min(i,this.currentLine,this.doc.getLength()),this.stop()},a.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},a.prototype.getTokens=function(h){return this.lines[h]||this.$tokenizeRow(h)},a.prototype.getState=function(h){return this.currentLine==h&&this.$tokenizeRow(h),this.states[h]||"start"},a.prototype.$tokenizeRow=function(h){var i=this.doc.getLine(h),r=this.states[h-1],o=this.tokenizer.getLineTokens(i,r,h);return this.states[h]+""!=o.state+""?(this.states[h]=o.state,this.lines[h+1]=null,this.currentLine>h+1&&(this.currentLine=h+1)):this.currentLine==h&&(this.currentLine=h+1),this.lines[h]=o.tokens},a.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},a}();E.implement(_.prototype,S),p.BackgroundTokenizer=_}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(g,p,se){var E=g("./lib/lang"),S=g("./range").Range,_=function(){function a(h,i,r){r===void 0&&(r="text"),this.setRegexp(h),this.clazz=i,this.type=r,this.docLen=0}return a.prototype.setRegexp=function(h){this.regExp+""!=h+""&&(this.regExp=h,this.cache=[])},a.prototype.update=function(h,i,r,o){if(this.regExp){for(var t=o.firstRow,e=o.lastRow,n={},s=r.$editor.$search,f=s.$isMultilineSearch(r.$editor.getLastSearchOptions()),m=t;m<=e;m++){var x=this.cache[m];if(x==null||r.getValue().length!=this.docLen){if(f){x=[];var A=s.$multiLineForward(r,this.regExp,m,e);if(A){var C=A.endRow<=e?A.endRow-1:e;C>m&&(m=C),x.push(new S(A.startRow,A.startCol,A.endRow,A.endCol))}x.length>this.MAX_RANGES&&(x=x.slice(0,this.MAX_RANGES))}else x=E.getMatchOffsets(r.getLine(m),this.regExp),x.length>this.MAX_RANGES&&(x=x.slice(0,this.MAX_RANGES)),x=x.map(function(q){return new S(m,q.offset,m,q.offset+q.length)});this.cache[m]=x.length?x:""}if(x.length!==0)for(var b=x.length;b--;){var G=x[b].toScreenRange(r),Se=G.toString();n[Se]||(n[Se]=!0,i.drawSingleLineMarker(h,G,this.clazz,o))}}this.docLen=r.getValue().length}},a}();_.prototype.MAX_RANGES=500,p.SearchHighlight=_}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(g,p,se){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,G,Se){if(!this.$fromUndo&&b!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),G===!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,G){this.selections.push({value:b,rev:G||this.$rev})},C.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},C.prototype.markIgnored=function(b,G){G==null&&(G=this.$rev+1);for(var Se=this.$undoStack,q=Se.length;q--;){var U=Se[q][0];if(U.id<=b)break;U.id<G&&(U.ignore=!0)}this.lastDeltas=null},C.prototype.getSelection=function(b,G){for(var Se=this.selections,q=Se.length;q--;){var U=Se[q];if(U.rev<b)return G&&(U=Se[q+1]),U}},C.prototype.getRevision=function(){return this.$rev},C.prototype.getDeltas=function(b,G){G==null&&(G=this.$rev+1);for(var Se=this.$undoStack,q=null,U=0,at=Se.length;at--;){var j=Se[at][0];if(j.id<G&&!q&&(q=at+1),j.id<=b){U=at+1;break}}return Se.slice(U,q)},C.prototype.getChangedRanges=function(b,G){G==null&&(G=this.$rev+1)},C.prototype.getChangedLines=function(b,G){G==null&&(G=this.$rev+1)},C.prototype.undo=function(b,G){this.lastDeltas=null;var Se=this.$undoStack;if(S(Se,Se.length)){b||(b=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var q=Se.pop(),U=null;return q&&(U=b.undoChanges(q,G),this.$redoStack.push(q),this.$syncRev()),this.$fromUndo=!1,U}},C.prototype.redo=function(b,G){if(this.lastDeltas=null,b||(b=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var Se=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);A(this.$redoStack,Se),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(at){at[0].id=++this.$maxRev},this)}var q=this.$redoStack.pop(),U=null;return q&&(U=b.redoChanges(q,G),this.$undoStack.push(q),this.$syncRev()),this.$fromUndo=!1,U},C.prototype.$syncRev=function(){var b=this.$undoStack,G=b[b.length-1],Se=G&&G[0].id||0;this.$redoStackBaseRev=Se,this.$rev=Se},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?r(b):r(this.$undoStack)+`
|
194
|
+
---
|
195
|
+
`+r(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 G=b;G--;){var Se=C[G];if(Se&&!Se[0].ignore){for(;G<b-1;){var q=e(C[G],C[G+1]);C[G]=q[0],C[G+1]=q[1],G++}return!0}}}var _=g("./range").Range,a=_.comparePoints;_.comparePoints;function h(C){return{row:C.row,column:C.column}}function i(C){return{start:h(C.start),end:h(C.end),action:C.action,lines:C.lines.slice()}}function r(C){if(C=C||this,Array.isArray(C))return C.map(r).join(`
|
196
|
+
`);var b="";return C.action?(b=C.action=="insert"?"+":"-",b+="["+C.lines+"]"):C.value&&(Array.isArray(C.value)?b=C.value.map(o).join(`
|
197
|
+
`):b=o(C.value)),C.start&&(b+=o(C)),(C.id||C.rev)&&(b+=" ("+(C.id||C.rev)+")"),b}function o(C){return C.start.row+":"+C.start.column+"=>"+C.end.row+":"+C.end.column}function t(C,b){var G=C.action=="insert",Se=b.action=="insert";if(G&&Se)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(G&&!Se)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(!G&&Se)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(!G&&!Se)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 G=C.length;G--;)for(var Se=0;Se<b.length;Se++)if(!t(C[G],b[Se])){for(;G<C.length;){for(;Se--;)t(b[Se],C[G]);Se=b.length,G++}return[C,b]}return C.selectionBefore=b.selectionBefore=C.selectionAfter=b.selectionAfter=null,[b,C]}function n(C,b){var G=C.action=="insert",Se=b.action=="insert";if(G&&Se)a(C.start,b.start)<0?s(b,C,1):s(C,b,1);else if(G&&!Se)a(C.start,b.end)>=0?s(C,b,-1):(a(C.start,b.start)<=0||s(C,_.fromPoints(b.start,C.start),-1),s(b,C,1));else if(!G&&Se)a(b.start,C.end)>=0?s(b,C,-1):(a(b.start,C.start)<=0||s(b,_.fromPoints(C.start,b.start),-1),s(C,b,1));else if(!G&&!Se)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,U;return a(C.start,b.start)<0&&(q=C,C=m(C,b.start)),a(C.end,b.end)>0&&(U=m(C,b.end)),f(b.end,C.start,C.end,-1),U&&!q&&(C.lines=U.lines,C.start=U.start,C.end=U.end,U=C),[b,q,U].filter(Boolean)}return[b,C]}function s(C,b,G){f(C.start,b.start,b.end,G),f(C.end,b.start,b.end,G)}function f(C,b,G,Se){C.row==(Se==1?b:G).row&&(C.column+=Se*(G.column-b.column)),C.row+=Se*(G.row-b.row)}function m(C,b){var G=C.lines,Se=C.end;C.end=h(b);var q=C.end.row-C.start.row,U=G.splice(q,G.length),at=q?b.column:b.column-C.start.column;G.push(U[0].substring(0,at)),U[0]=U[0].substr(at);var j={start:h(b),end:Se,lines:U,action:C.action};return j}function x(C,b){b=i(b);for(var G=C.length;G--;){for(var Se=C[G],q=0;q<Se.length;q++){var U=Se[q],at=n(U,b);b=at[0],at.length!=2&&(at[2]?(Se.splice(q+1,1,at[1],at[2]),q++):at[1]||(Se.splice(q,1),q--))}Se.length||C.splice(G,1)}return C}function A(C,b){for(var G=0;G<b.length;G++)for(var Se=b[G],q=0;q<Se.length;q++)x(C,Se[q])}p.UndoManager=E}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(g,p,se){var E=g("../range").Range,S=function(){function _(a,h){this.foldData=a,Array.isArray(h)?this.folds=h:h=this.folds=[h];var i=h[h.length-1];this.range=new E(h[0].start.row,h[0].start.column,i.end.row,i.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(r){r.setFoldLine(this)},this)}return _.prototype.shiftRow=function(a){this.start.row+=a,this.end.row+=a,this.folds.forEach(function(h){h.start.row+=a,h.end.row+=a})},_.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(h,i){return-h.range.compareEnd(i.start.row,i.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},_.prototype.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},_.prototype.walk=function(a,h,i){var r=0,o=this.folds,t,e,n,s=!0;h==null&&(h=this.end.row,i=this.end.column);for(var f=0;f<o.length;f++){if(t=o[f],e=t.range.compareStart(h,i),e==-1){a(null,h,i,r,s);return}if(n=a(null,t.start.row,t.start.column,r,s),n=!n&&a(t.placeholder,t.start.row,t.start.column,r),n||e===0)return;s=!t.sameRow,r=t.end.column}a(null,h,i,r,s)},_.prototype.getNextFoldTo=function(a,h){for(var i,r,o=0;o<this.folds.length;o++){if(i=this.folds[o],r=i.range.compareEnd(a,h),r==-1)return{fold:i,kind:"after"};if(r===0)return{fold:i,kind:"inside"}}return null},_.prototype.addRemoveChars=function(a,h,i){var r=this.getNextFoldTo(a,h),o,t;if(r){if(o=r.fold,r.kind=="inside"&&o.start.column!=h&&o.start.row!=a)window.console&&window.console.log(a,h,o);else if(o.start.row==a){t=this.folds;var e=t.indexOf(o);for(e===0&&(this.start.column+=i),e;e<t.length;e++){if(o=t[e],o.start.column+=i,!o.sameRow)return;o.end.column+=i}this.end.column+=i}}},_.prototype.split=function(a,h){var i=this.getNextFoldTo(a,h);if(!i||i.kind=="inside")return null;var r=i.fold,o=this.folds,t=this.foldData,e=o.indexOf(r),n=o[e-1];this.end.row=n.end.row,this.end.column=n.end.column,o=o.splice(e,o.length-e);var s=new _(t,o);return t.splice(t.indexOf(this)+1,0,s),s},_.prototype.merge=function(a){for(var h=a.folds,i=0;i<h.length;i++)this.addFold(h[i]);var r=this.foldData;r.splice(r.indexOf(a),1)},_.prototype.toString=function(){var a=[this.range.toString()+": ["];return this.folds.forEach(function(h){a.push(" "+h.toString())}),a.push("]"),a.join(`
|
198
|
+
`)},_.prototype.idxToPosition=function(a){for(var h=0,i=0;i<this.folds.length;i++){var r=this.folds[i];if(a-=r.start.column-h,a<0)return{row:r.start.row,column:r.start.column+a};if(a-=r.placeholder.length,a<0)return r.start;h=r.end.column}return{row:this.end.row,column:this.end.column+a}},_}();p.FoldLine=S}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(g,p,se){var E=g("./range").Range,S=E.comparePoints,_=function(){function a(){this.ranges=[],this.$bias=1}return a.prototype.pointIndex=function(h,i,r){for(var o=this.ranges,t=r||0;t<o.length;t++){var e=o[t],n=S(h,e.end);if(!(n>0)){var s=S(h,e.start);return n===0?i&&s!==0?-t-2:t:s>0||s===0&&!i?t:-t-1}}return-t-1},a.prototype.add=function(h){var i=!h.isEmpty(),r=this.pointIndex(h.start,i);r<0&&(r=-r-1);var o=this.pointIndex(h.end,i,r);return o<0?o=-o-1:o++,this.ranges.splice(r,o-r,h)},a.prototype.addList=function(h){for(var i=[],r=h.length;r--;)i.push.apply(i,this.add(h[r]));return i},a.prototype.substractPoint=function(h){var i=this.pointIndex(h);if(i>=0)return this.ranges.splice(i,1)},a.prototype.merge=function(){var h=[],i=this.ranges;i=i.sort(function(n,s){return S(n.start,s.start)});for(var r=i[0],o,t=1;t<i.length;t++){o=r,r=i[t];var e=S(o.end,r.start);e<0||e==0&&!o.isEmpty()&&!r.isEmpty()||(S(o.end,r.end)<0&&(o.end.row=r.end.row,o.end.column=r.end.column),i.splice(t,1),h.push(r),r=o,t--)}return this.ranges=i,h},a.prototype.contains=function(h,i){return this.pointIndex({row:h,column:i})>=0},a.prototype.containsPoint=function(h){return this.pointIndex(h)>=0},a.prototype.rangeAtPoint=function(h){var i=this.pointIndex(h);if(i>=0)return this.ranges[i]},a.prototype.clipRows=function(h,i){var r=this.ranges;if(r[0].start.row>i||r[r.length-1].start.row<h)return[];var o=this.pointIndex({row:h,column:0});o<0&&(o=-o-1);var t=this.pointIndex({row:i,column:0},o);t<0&&(t=-t-1);for(var e=[],n=o;n<t;n++)e.push(r[n]);return e},a.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},a.prototype.attach=function(h){this.session&&this.detach(),this.session=h,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(h){for(var i=h.start,r=h.end,o=i.row,t=r.row,e=this.ranges,n=0,s=e.length;n<s;n++){var f=e[n];if(f.end.row>=o)break}if(h.action=="insert")for(var m=t-o,x=-i.column+r.column;n<s;n++){var f=e[n];if(f.start.row>o)break;if(f.start.row==o&&f.start.column>=i.column&&(f.start.column==i.column&&this.$bias<=0||(f.start.column+=x,f.start.row+=m)),f.end.row==o&&f.end.column>=i.column){if(f.end.column==i.column&&this.$bias<0)continue;f.end.column==i.column&&x>0&&n<s-1&&f.end.column>f.start.column&&f.end.column==e[n+1].start.column&&(f.end.column-=x),f.end.column+=x,f.end.row+=m}}else for(var m=o-t,x=i.column-r.column;n<s;n++){var f=e[n];if(f.start.row>t)break;f.end.row<t&&(o<f.end.row||o==f.end.row&&i.column<f.end.column)?(f.end.row=o,f.end.column=i.column):f.end.row==t?f.end.column<=r.column?(m||f.end.column>i.column)&&(f.end.column=i.column,f.end.row=i.row):(f.end.column+=x,f.end.row+=m):f.end.row>t&&(f.end.row+=m),f.start.row<t&&(o<f.start.row||o==f.start.row&&i.column<f.start.column)?(f.start.row=o,f.start.column=i.column):f.start.row==t?f.start.column<=r.column?(m||f.start.column>i.column)&&(f.start.column=i.column,f.start.row=i.row):(f.start.column+=x,f.start.row+=m):f.start.row>t&&(f.start.row+=m)}if(m!=0&&n<s)for(;n<s;n++){var f=e[n];f.start.row+=m,f.end.row+=m}},a}();_.prototype.comparePoints=S,p.RangeList=_}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(g,p,se){var E=this&&this.__extends||function(){var o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var f in s)Object.prototype.hasOwnProperty.call(s,f)&&(n[f]=s[f])},o(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");o(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),S=g("../range_list").RangeList,_=function(o){E(t,o);function t(e,n){var s=o.call(this)||this;return s.foldLine=null,s.placeholder=n,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(n){n.setFoldLine(e)})},t.prototype.clone=function(){var e=this.range.clone(),n=new t(e,this.placeholder);return this.subFolds.forEach(function(s){n.subFolds.push(s.clone())}),n.collapseChildren=this.collapseChildren,n},t.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){h(e,this.start);for(var x=e.start.row,A=e.start.column,n=0,s=-1;n<this.subFolds.length&&(s=this.subFolds[n].range.compare(x,A),s==1);n++);var f=this.subFolds[n],m=0;if(s==0){if(f.range.containsRange(e))return f.addSubFold(e);m=1}for(var x=e.range.end.row,A=e.range.end.column,C=n,s=-1;C<this.subFolds.length&&(s=this.subFolds[C].range.compare(x,A),s==1);C++);s==0&&C++;for(var b=this.subFolds.splice(n,C-n,e),G=s==0?b.length-1:b.length,Se=m;Se<G;Se++)e.addSubFold(b[Se]);return e.setFoldLine(this.foldLine),e}},t.prototype.restoreRange=function(e){return r(e,this.start)},t}(S);function a(o,t){o.row-=t.row,o.row==0&&(o.column-=t.column)}function h(o,t){a(o.start,t),a(o.end,t)}function i(o,t){o.row==0&&(o.column+=t.column),o.row+=t.row}function r(o,t){i(o.start,t),i(o.end,t)}p.Fold=_}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(g,p,se){var E=g("../range").Range,S=g("./fold_line").FoldLine,_=g("./fold").Fold,a=g("../token_iterator").TokenIterator,h=g("../mouse/mouse_event").MouseEvent;function i(){this.getFoldAt=function(r,o,t){var e=this.getFoldLine(r);if(!e)return null;for(var n=e.folds,s=0;s<n.length;s++){var f=n[s].range;if(f.contains(r,o)){if(t==1&&f.isEnd(r,o)&&!f.isEmpty())continue;if(t==-1&&f.isStart(r,o)&&!f.isEmpty())continue;return n[s]}}},this.getFoldsInRange=function(r){var o=r.start,t=r.end,e=this.$foldData,n=[];o.column+=1,t.column-=1;for(var s=0;s<e.length;s++){var f=e[s].range.compareRange(r);if(f!=2){if(f==-2)break;for(var m=e[s].folds,x=0;x<m.length;x++){var A=m[x];if(f=A.range.compareRange(r),f==-2)break;if(f==2)continue;if(f==42)break;n.push(A)}}}return o.column-=1,t.column+=1,n},this.getFoldsInRangeList=function(r){if(Array.isArray(r)){var o=[];r.forEach(function(t){o=o.concat(this.getFoldsInRange(t))},this)}else var o=this.getFoldsInRange(r);return o},this.getAllFolds=function(){for(var r=[],o=this.$foldData,t=0;t<o.length;t++)for(var e=0;e<o[t].folds.length;e++)r.push(o[t].folds[e]);return r},this.getFoldStringAt=function(r,o,t,e){if(e=e||this.getFoldLine(r),!e)return null;for(var n={end:{column:0}},s,f,m=0;m<e.folds.length;m++){f=e.folds[m];var x=f.range.compareEnd(r,o);if(x==-1){s=this.getLine(f.start.row).substring(n.end.column,f.start.column);break}else if(x===0)return null;n=f}return s||(s=this.getLine(f.start.row).substring(n.end.column)),t==-1?s.substring(0,o-n.end.column):t==1?s.substring(o-n.end.column):s},this.getFoldLine=function(r,o){var t=this.$foldData,e=0;for(o&&(e=t.indexOf(o)),e==-1&&(e=0),e;e<t.length;e++){var n=t[e];if(n.start.row<=r&&n.end.row>=r)return n;if(n.end.row>r)return null}return null},this.getNextFoldLine=function(r,o){var t=this.$foldData,e=0;for(o&&(e=t.indexOf(o)),e==-1&&(e=0),e;e<t.length;e++){var n=t[e];if(n.end.row>=r)return n}return null},this.getFoldedRowCount=function(r,o){for(var t=this.$foldData,e=o-r+1,n=0;n<t.length;n++){var s=t[n],f=s.end.row,m=s.start.row;if(f>=o){m<o&&(m>=r?e-=o-m:e=0);break}else f>=r&&(m>=r?e-=f-m:e-=f-r+1)}return e},this.$addFoldLine=function(r){return this.$foldData.push(r),this.$foldData.sort(function(o,t){return o.start.row-t.start.row}),r},this.addFold=function(r,o){var t=this.$foldData,e=!1,n;r instanceof _?n=r:(n=new _(o,r),n.collapseChildren=o.collapseChildren),this.$clipRangeToDocument(n.range);var s=n.start.row,f=n.start.column,m=n.end.row,x=n.end.column,A=this.getFoldAt(s,f,1),C=this.getFoldAt(m,x,-1);if(A&&C==A)return A.addSubFold(n);A&&!A.range.isStart(s,f)&&this.removeFold(A),C&&!C.range.isEnd(m,x)&&this.removeFold(C);var b=this.getFoldsInRange(n.range);b.length>0&&(this.removeFolds(b),n.collapseChildren||b.forEach(function(U){n.addSubFold(U)}));for(var G=0;G<t.length;G++){var Se=t[G];if(m==Se.start.row){Se.addFold(n),e=!0;break}else if(s==Se.end.row){if(Se.addFold(n),e=!0,!n.sameRow){var q=t[G+1];if(q&&q.start.row==m){Se.merge(q);break}}break}else if(m<=Se.start.row)break}return e||(Se=this.$addFoldLine(new S(this.$foldData,n))),this.$useWrapMode?this.$updateWrapData(Se.start.row,Se.start.row):this.$updateRowLengthCache(Se.start.row,Se.start.row),this.$modified=!0,this._signal("changeFold",{data:n,action:"add"}),n},this.addFolds=function(r){r.forEach(function(o){this.addFold(o)},this)},this.removeFold=function(r){var o=r.foldLine,t=o.start.row,e=o.end.row,n=this.$foldData,s=o.folds;if(s.length==1)n.splice(n.indexOf(o),1);else if(o.range.isEnd(r.end.row,r.end.column))s.pop(),o.end.row=s[s.length-1].end.row,o.end.column=s[s.length-1].end.column;else if(o.range.isStart(r.start.row,r.start.column))s.shift(),o.start.row=s[0].start.row,o.start.column=s[0].start.column;else if(r.sameRow)s.splice(s.indexOf(r),1);else{var f=o.split(r.start.row,r.start.column);s=f.folds,s.shift(),f.start.row=s[0].start.row,f.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:r,action:"remove"})},this.removeFolds=function(r){for(var o=[],t=0;t<r.length;t++)o.push(r[t]);o.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(r){this.removeFold(r),r.subFolds.forEach(function(o){r.restoreRange(o),this.addFold(o)},this),r.collapseChildren>0&&this.foldAll(r.start.row+1,r.end.row,r.collapseChildren-1),r.subFolds=[]},this.expandFolds=function(r){r.forEach(function(o){this.expandFold(o)},this)},this.unfold=function(r,o){var t,e;if(r==null)t=new E(0,0,this.getLength(),0),o==null&&(o=!0);else if(typeof r=="number")t=new E(r,0,r,this.getLine(r).length);else if("row"in r)t=E.fromPoints(r,r);else{if(Array.isArray(r))return e=[],r.forEach(function(s){e=e.concat(this.unfold(s))},this),e;t=r}e=this.getFoldsInRangeList(t);for(var n=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(o!=!1?this.removeFolds(e):this.expandFolds(e),n.length)return n},this.isRowFolded=function(r,o){return!!this.getFoldLine(r,o)},this.getRowFoldEnd=function(r,o){var t=this.getFoldLine(r,o);return t?t.end.row:r},this.getRowFoldStart=function(r,o){var t=this.getFoldLine(r,o);return t?t.start.row:r},this.getFoldDisplayLine=function(r,o,t,e,n){e==null&&(e=r.start.row),n==null&&(n=0),o==null&&(o=r.end.row),t==null&&(t=this.getLine(o).length);var s=this.doc,f="";return r.walk(function(m,x,A,C){if(!(x<e)){if(x==e){if(A<n)return;C=Math.max(n,C)}m!=null?f+=m:f+=s.getLine(x).substring(C,A)}},o,t),f},this.getDisplayLine=function(r,o,t,e){var n=this.getFoldLine(r);if(n)return this.getFoldDisplayLine(n,r,o,t,e);var s;return s=this.doc.getLine(r),s.substring(e||0,o||s.length)},this.$cloneFoldData=function(){var r=[];return r=this.$foldData.map(function(o){var t=o.folds.map(function(e){return e.clone()});return new S(r,t)}),r},this.toggleFold=function(r){var o=this.selection,t=o.getRange(),e,n;if(t.isEmpty()){var s=t.start;if(e=this.getFoldAt(s.row,s.column),e){this.expandFold(e);return}else if(r){var f=this.getFoldLine(s.row);f&&this.expandFolds(f.folds);return}else(n=this.findMatchingBracket(s))?t.comparePoint(n)==1?t.end=n:(t.start=n,t.start.column++,t.end.column--):(n=this.findMatchingBracket({row:s.row,column:s.column+1}))?(t.comparePoint(n)==1?t.end=n:t.start=n,t.start.column++):t=this.getCommentFoldRange(s.row,s.column)||t}else{var m=this.getFoldsInRange(t);if(r&&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 x="...";if(!t.isMultiLine()){if(x=this.getTextRange(t),x.length<4)return;x=x.trim().substring(0,2)+".."}this.addFold(x,t)},this.getCommentFoldRange=function(r,o,t){var e=new a(this,r,o),n=e.getCurrentToken(),s=n&&n.type;if(n&&/^comment|string/.test(s)){s=s.match(/comment|string/)[0],s=="comment"&&(s+="|doc-start|\\.doc");var f=new RegExp(s),m=new E;if(t!=1){do n=e.stepBackward();while(n&&f.test(n.type));n=e.stepForward()}m.start.row=e.getCurrentTokenRow(),m.start.column=e.getCurrentTokenColumn()+n.value.length,e=new a(this,r,o);var x=this.getState(e.$row);if(t!=-1){var A=-1;do if(n=e.stepForward(),A==-1){var C=this.getState(e.$row);x.toString()!==C.toString()&&(A=e.$row)}else if(e.$row>A)break;while(n&&f.test(n.type));n=e.stepBackward()}else n=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(r,o,t,e){t==null&&(t=1e5);var n=this.foldWidgets;if(n){o=o||this.getLength(),r=r||0;for(var s=r;s<o;s++)if(n[s]==null&&(n[s]=this.getFoldWidget(s)),n[s]=="start"&&!(e&&!e(s))){var f=this.getFoldWidgetRange(s);f&&f.isMultiLine()&&f.end.row<=o&&f.start.row>=r&&(s=f.end.row,f.collapseChildren=t,this.addFold("...",f))}}},this.foldToLevel=function(r){for(this.foldAll();r-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var r=this;this.foldAll(null,null,null,function(o){for(var t=r.getTokens(o),e=0;e<t.length;e++){var n=t[e];if(!(n.type=="text"&&/^\s+$/.test(n.value)))return!!/comment/.test(n.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(r){if(!this.$foldStyles[r])throw new Error("invalid fold style: "+r+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=r){this.$foldStyle=r,r=="manual"&&this.unfold();var o=this.$foldMode;this.$setFolding(null),this.$setFolding(o)}},this.$setFolding=function(r){if(this.$foldMode!=r){if(this.$foldMode=r,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!r||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=r.getFoldWidget.bind(r,this,this.$foldStyle),this.getFoldWidgetRange=r.getFoldWidgetRange.bind(r,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(r,o){var t=this.foldWidgets;if(!t||o&&t[r])return{};for(var e=r-1,n;e>=0;){var s=t[e];if(s==null&&(s=t[e]=this.getFoldWidget(e)),s=="start"){var f=this.getFoldWidgetRange(e);if(n||(n=f),f&&f.end.row>=r)break}e--}return{range:e!==-1&&f,firstRange:n}},this.onFoldWidgetClick=function(r,o){o instanceof h&&(o=o.domEvent);var t={children:o.shiftKey,all:o.ctrlKey||o.metaKey,siblings:o.altKey},e=this.$toggleFoldWidget(r,t);if(!e){var n=o.target||o.srcElement;n&&/ace_fold-widget/.test(n.className)&&(n.className+=" ace_invalid")}},this.$toggleFoldWidget=function(r,o){if(this.getFoldWidget){var t=this.getFoldWidget(r),e=this.getLine(r),n=t==="end"?-1:1,s=this.getFoldAt(r,n===-1?0:e.length,n);if(s)return o.children||o.all?this.removeFold(s):this.expandFold(s),s;var f=this.getFoldWidgetRange(r,!0);if(f&&!f.isMultiLine()&&(s=this.getFoldAt(f.start.row,f.start.column,1),s&&f.isEqual(s.range)))return this.removeFold(s),s;if(o.siblings){var m=this.getParentFoldRangeData(r);if(m.range)var x=m.range.start.row+1,A=m.range.end.row;this.foldAll(x,A,o.all?1e4:0)}else o.children?(A=f?f.end.row:this.getLength(),this.foldAll(r+1,A,o.all?1e4:0)):f&&(o.all&&(f.collapseChildren=1e4),this.addFold("...",f));return f}},this.toggleFoldWidget=function(r){var o=this.selection.getCursor().row;o=this.getRowFoldStart(o);var t=this.$toggleFoldWidget(o,{});if(!t){var e=this.getParentFoldRangeData(o,!0);if(t=e.range||e.firstRange,t){o=t.start.row;var n=this.getFoldAt(o,this.getLine(o).length,1);n?this.removeFold(n):this.addFold("...",t)}}},this.updateFoldWidgets=function(r){var o=r.start.row,t=r.end.row-o;if(t===0)this.foldWidgets[o]=null;else if(r.action=="remove")this.foldWidgets.splice(o,t+1,null);else{var e=Array(t+1);e.unshift(o,1),this.foldWidgets.splice.apply(this.foldWidgets,e)}},this.tokenizerUpdateFoldWidgets=function(r){var o=r.data;o.first!=o.last&&this.foldWidgets.length>o.first&&this.foldWidgets.splice(o.first,this.foldWidgets.length)}}p.Folding=i}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(g,p,se){var E=g("../token_iterator").TokenIterator,S=g("../range").Range;function _(){this.findMatchingBracket=function(a,h){if(a.column==0)return null;var i=h||this.getLine(a.row).charAt(a.column-1);if(i=="")return null;var r=i.match(/([\(\[\{])|([\)\]\}])/);return r?r[1]?this.$findClosingBracket(r[1],a):this.$findOpeningBracket(r[2],a):null},this.getBracketRange=function(a){var h=this.getLine(a.row),i=!0,r,o=h.charAt(a.column-1),t=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(t||(o=h.charAt(a.column),a={row:a.row,column:a.column+1},t=o&&o.match(/([\(\[\{])|([\)\]\}])/),i=!1),!t)return null;if(t[1]){var e=this.$findClosingBracket(t[1],a);if(!e)return null;r=S.fromPoints(a,e),i||(r.end.column++,r.start.column--),r.cursor=r.end}else{var e=this.$findOpeningBracket(t[2],a);if(!e)return null;r=S.fromPoints(e,a),i||(r.start.column++,r.end.column--),r.cursor=r.start}return r},this.getMatchingBracketRanges=function(a,h){var i=this.getLine(a.row),r=/([\(\[\{])|([\)\]\}])/,o=!h&&i.charAt(a.column-1),t=o&&o.match(r);if(t||(o=(h===void 0||h)&&i.charAt(a.column),a={row:a.row,column:a.column+1},t=o&&o.match(r)),!t)return null;var e=new S(a.row,a.column-1,a.row,a.column),n=t[1]?this.$findClosingBracket(t[1],a):this.$findOpeningBracket(t[2],a);if(!n)return[e];var s=new S(n.row,n.column,n.row,n.column+1);return[e,s]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(a,h,i){var r=this.$brackets[a],o=1,t=new E(this,h.row,h.column),e=t.getCurrentToken();if(e||(e=t.stepForward()),!!e){i||(i=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var n=h.column-t.getCurrentTokenColumn()-2,s=e.value;;){for(;n>=0;){var f=s.charAt(n);if(f==r){if(o-=1,o==0)return{row:t.getCurrentTokenRow(),column:n+t.getCurrentTokenColumn()}}else f==a&&(o+=1);n-=1}do e=t.stepBackward();while(e&&!i.test(e.type));if(e==null)break;s=e.value,n=s.length-1}return null}},this.$findClosingBracket=function(a,h,i){var r=this.$brackets[a],o=1,t=new E(this,h.row,h.column),e=t.getCurrentToken();if(e||(e=t.stepForward()),!!e){i||(i=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var n=h.column-t.getCurrentTokenColumn();;){for(var s=e.value,f=s.length;n<f;){var m=s.charAt(n);if(m==r){if(o-=1,o==0)return{row:t.getCurrentTokenRow(),column:n+t.getCurrentTokenColumn()}}else m==a&&(o+=1);n+=1}do e=t.stepForward();while(e&&!i.test(e.type));if(e==null)break;n=0}return null}},this.getMatchingTags=function(a){var h=new E(this,a.row,a.column),i=this.$findTagName(h);if(i){var r=h.stepBackward();return r.value==="<"?this.$findClosingTag(h,i):this.$findOpeningTag(h,i)}},this.$findTagName=function(a){var h=a.getCurrentToken(),i=!1,r=!1;if(h&&h.type.indexOf("tag-name")===-1)do r?h=a.stepBackward():h=a.stepForward(),h&&(h.value==="/>"?r=!0:h.type.indexOf("tag-name")!==-1&&(i=!0));while(h&&!i);return h},this.$findClosingTag=function(a,h){var i,r=h.value,o=h.value,t=0,e=new S(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);h=a.stepForward();var n=new S(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+h.value.length),s=!1;do{if(i=h,i.type.indexOf("tag-close")!==-1&&!s){var f=new S(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);s=!0}if(h=a.stepForward(),h){if(h.value===">"&&!s){var f=new S(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);s=!0}if(h.type.indexOf("tag-name")!==-1){if(r=h.value,o===r){if(i.value==="<")t++;else if(i.value==="</"&&(t--,t<0)){a.stepBackward();var m=new S(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2);h=a.stepForward();var x=new S(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+h.value.length);if(h.type.indexOf("tag-close")===-1&&(h=a.stepForward()),h&&h.value===">")var A=new S(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);else return}}}else if(o===r&&h.value==="/>"&&(t--,t<0))var m=new S(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2),x=m,A=x,f=new S(n.end.row,n.end.column,n.end.row,n.end.column+1)}}while(h&&t>=0);if(e&&f&&m&&A&&n&&x)return{openTag:new S(e.start.row,e.start.column,f.end.row,f.end.column),closeTag:new S(m.start.row,m.start.column,A.end.row,A.end.column),openTagName:n,closeTagName:x}},this.$findOpeningTag=function(a,h){var i=a.getCurrentToken(),r=h.value,o=0,t=a.getCurrentTokenRow(),e=a.getCurrentTokenColumn(),n=e+2,s=new S(t,e,t,n);a.stepForward();var f=new S(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+h.value.length);if(h.type.indexOf("tag-close")===-1&&(h=a.stepForward()),!(!h||h.value!==">")){var m=new S(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);a.stepBackward(),a.stepBackward();do if(h=i,t=a.getCurrentTokenRow(),e=a.getCurrentTokenColumn(),n=e+h.value.length,i=a.stepBackward(),h){if(h.type.indexOf("tag-name")!==-1){if(r===h.value)if(i.value==="<"){if(o++,o>0){var x=new S(t,e,t,n),A=new S(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);do h=a.stepForward();while(h&&h.value!==">");var C=new S(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1)}}else i.value==="</"&&o--}else if(h.value==="/>"){for(var b=0,G=i;G;){if(G.type.indexOf("tag-name")!==-1&&G.value===r){o--;break}else if(G.value==="<")break;G=a.stepBackward(),b++}for(var Se=0;Se<b;Se++)a.stepForward()}}while(i&&o<=0);if(A&&C&&s&&m&&x&&f)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:x,closeTagName:f}}}}p.BracketMatch=_}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/line_widgets","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(g,p,se){var E=g("./lib/oop"),S=g("./lib/lang"),_=g("./bidihandler").BidiHandler,a=g("./config"),h=g("./lib/event_emitter").EventEmitter,i=g("./selection").Selection,r=g("./mode/text").Mode,o=g("./range").Range,t=g("./line_widgets").LineWidgets,e=g("./document").Document,n=g("./background_tokenizer").BackgroundTokenizer,s=g("./search_highlight").SearchHighlight,f=g("./undomanager").UndoManager,m=function(){function j(W,y){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"+ ++j.$uid,this.$foldData.toString=function(){return this.join(`
|
199
|
+
`)},this.$gutterCustomWidgets={},this.bgTokenizer=new n(new r().getTokenizer(),this);var v=this;this.bgTokenizer.on("update",function(D){v._signal("tokenizerUpdate",D)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof W!="object"||!W.getLine)&&(W=new e(W)),this.setDocument(W),this.selection=new i(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new _(this),a.resetOptions(this),this.setMode(y),a._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return j.prototype.$initOperationListeners=function(){var W=this;this.curOp=null,this.on("change",function(){W.curOp||(W.startOperation(),W.curOp.selectionBefore=W.$lastSel),W.curOp.docChanged=!0},!0),this.on("changeSelection",function(){W.curOp||(W.startOperation(),W.curOp.selectionBefore=W.$lastSel),W.curOp.selectionChanged=!0},!0),this.$operationResetTimer=S.delayedCall(this.endOperation.bind(this,!0))},j.prototype.startOperation=function(W){if(this.curOp){if(!W||this.curOp.command)return;this.prevOp=this.curOp}W||(W={}),this.$operationResetTimer.schedule(),this.curOp={command:W.command||{},args:W.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",W)},j.prototype.endOperation=function(W){if(this.curOp){if(W&&W.returnValue===!1){this.curOp=null,this._signal("endOperation",W);return}if(W==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var y=this.selection.toJSON();this.curOp.selectionAfter=y,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(y),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",W)}},j.prototype.setDocument=function(W){this.doc&&this.doc.off("change",this.$onChange),this.doc=W,W.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},j.prototype.getDocument=function(){return this.doc},Object.defineProperty(j.prototype,"widgetManager",{get:function(){var W=new t(this);return this.widgetManager=W,this.$editor&&W.attach(this.$editor),W},set:function(W){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:W})},enumerable:!1,configurable:!0}),j.prototype.$resetRowCache=function(W){if(!W){this.$docRowCache=[],this.$screenRowCache=[];return}var y=this.$docRowCache.length,v=this.$getRowCacheIndex(this.$docRowCache,W)+1;y>v&&(this.$docRowCache.splice(v,y),this.$screenRowCache.splice(v,y))},j.prototype.$getRowCacheIndex=function(W,y){for(var v=0,D=W.length-1;v<=D;){var Ee=v+D>>1,qe=W[Ee];if(y>qe)v=Ee+1;else if(y<qe)D=Ee-1;else return Ee}return v-1},j.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},j.prototype.onChangeFold=function(W){var y=W.data;this.$resetRowCache(y.start.row)},j.prototype.onChange=function(W){this.$modified=!0,this.$bidiHandler.onChange(W),this.$resetRowCache(W.start.row);var y=this.$updateInternalDataOnChange(W);!this.$fromUndo&&this.$undoManager&&(y&&y.length&&(this.$undoManager.add({action:"removeFolds",folds:y},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(W,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(W),this._signal("change",W)},j.prototype.onSelectionChange=function(){this._signal("changeSelection")},j.prototype.setValue=function(W){this.doc.setValue(W),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},j.fromJSON=function(W){typeof W=="string"&&(W=JSON.parse(W));var y=new f;y.$undoStack=W.history.undo,y.$redoStack=W.history.redo,y.mark=W.history.mark,y.$rev=W.history.rev;var v=new j(W.value);return W.folds.forEach(function(D){v.addFold("...",o.fromPoints(D.start,D.end))}),v.setAnnotations(W.annotations),v.setBreakpoints(W.breakpoints),v.setMode(W.mode),v.setScrollLeft(W.scrollLeft),v.setScrollTop(W.scrollTop),v.setUndoManager(y),v.selection.fromJSON(W.selection),v},j.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(W){return W.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},j.prototype.toString=function(){return this.doc.getValue()},j.prototype.getSelection=function(){return this.selection},j.prototype.getState=function(W){return this.bgTokenizer.getState(W)},j.prototype.getTokens=function(W){return this.bgTokenizer.getTokens(W)},j.prototype.getTokenAt=function(W,y){var v=this.bgTokenizer.getTokens(W),D,Ee=0;if(y==null){var qe=v.length-1;Ee=this.getLine(W).length}else for(var qe=0;qe<v.length&&(Ee+=v[qe].value.length,!(Ee>=y));qe++);return D=v[qe],D?(D.index=qe,D.start=Ee-D.value.length,D):null},j.prototype.setUndoManager=function(W){if(this.$undoManager=W,this.$informUndoManager&&this.$informUndoManager.cancel(),W){var y=this;W.addSession(this),this.$syncInformUndoManager=function(){y.$informUndoManager.cancel(),y.mergeUndoDeltas=!1},this.$informUndoManager=S.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},j.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},j.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},j.prototype.getTabString=function(){return this.getUseSoftTabs()?S.stringRepeat(" ",this.getTabSize()):" "},j.prototype.setUseSoftTabs=function(W){this.setOption("useSoftTabs",W)},j.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},j.prototype.setTabSize=function(W){this.setOption("tabSize",W)},j.prototype.getTabSize=function(){return this.$tabSize},j.prototype.isTabStop=function(W){return this.$useSoftTabs&&W.column%this.$tabSize===0},j.prototype.setNavigateWithinSoftTabs=function(W){this.setOption("navigateWithinSoftTabs",W)},j.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},j.prototype.setOverwrite=function(W){this.setOption("overwrite",W)},j.prototype.getOverwrite=function(){return this.$overwrite},j.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},j.prototype.addGutterDecoration=function(W,y){this.$decorations[W]||(this.$decorations[W]=""),this.$decorations[W]+=" "+y,this._signal("changeBreakpoint",{})},j.prototype.removeGutterCustomWidget=function(W){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(W)},j.prototype.addGutterCustomWidget=function(W,y){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(W,y)},j.prototype.removeGutterDecoration=function(W,y){this.$decorations[W]=(this.$decorations[W]||"").replace(" "+y,""),this._signal("changeBreakpoint",{})},j.prototype.getBreakpoints=function(){return this.$breakpoints},j.prototype.setBreakpoints=function(W){this.$breakpoints=[];for(var y=0;y<W.length;y++)this.$breakpoints[W[y]]="ace_breakpoint";this._signal("changeBreakpoint",{})},j.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},j.prototype.setBreakpoint=function(W,y){y===void 0&&(y="ace_breakpoint"),y?this.$breakpoints[W]=y:delete this.$breakpoints[W],this._signal("changeBreakpoint",{})},j.prototype.clearBreakpoint=function(W){delete this.$breakpoints[W],this._signal("changeBreakpoint",{})},j.prototype.addMarker=function(W,y,v,D){var Ee=this.$markerId++,qe={range:W,type:v||"line",renderer:typeof v=="function"?v:null,clazz:y,inFront:!!D,id:Ee};return D?(this.$frontMarkers[Ee]=qe,this._signal("changeFrontMarker")):(this.$backMarkers[Ee]=qe,this._signal("changeBackMarker")),Ee},j.prototype.addDynamicMarker=function(W,y){if(W.update){var v=this.$markerId++;return W.id=v,W.inFront=!!y,y?(this.$frontMarkers[v]=W,this._signal("changeFrontMarker")):(this.$backMarkers[v]=W,this._signal("changeBackMarker")),W}},j.prototype.removeMarker=function(W){var y=this.$frontMarkers[W]||this.$backMarkers[W];if(y){var v=y.inFront?this.$frontMarkers:this.$backMarkers;delete v[W],this._signal(y.inFront?"changeFrontMarker":"changeBackMarker")}},j.prototype.getMarkers=function(W){return W?this.$frontMarkers:this.$backMarkers},j.prototype.highlight=function(W){if(!this.$searchHighlight){var y=new s(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(y)}this.$searchHighlight.setRegexp(W)},j.prototype.highlightLines=function(W,y,v,D){typeof y!="number"&&(v=y,y=W),v||(v="ace_step");var Ee=new o(W,0,y,1/0);return Ee.id=this.addMarker(Ee,v,"fullLine",D),Ee},j.prototype.setAnnotations=function(W){this.$annotations=W,this._signal("changeAnnotation",{})},j.prototype.getAnnotations=function(){return this.$annotations||[]},j.prototype.clearAnnotations=function(){this.setAnnotations([])},j.prototype.$detectNewLine=function(W){var y=W.match(/^.*?(\r?\n)/m);y?this.$autoNewLine=y[1]:this.$autoNewLine=`
|
200
|
+
`},j.prototype.getWordRange=function(W,y){var v=this.getLine(W),D=!1;if(y>0&&(D=!!v.charAt(y-1).match(this.tokenRe)),D||(D=!!v.charAt(y).match(this.tokenRe)),D)var Ee=this.tokenRe;else if(/^\s+$/.test(v.slice(y-1,y+1)))var Ee=/\s/;else var Ee=this.nonTokenRe;var qe=y;if(qe>0){do qe--;while(qe>=0&&v.charAt(qe).match(Ee));qe++}for(var ot=y;ot<v.length&&v.charAt(ot).match(Ee);)ot++;return new o(W,qe,W,ot)},j.prototype.getAWordRange=function(W,y){for(var v=this.getWordRange(W,y),D=this.getLine(v.end.row);D.charAt(v.end.column).match(/[ \t]/);)v.end.column+=1;return v},j.prototype.setNewLineMode=function(W){this.doc.setNewLineMode(W)},j.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},j.prototype.setUseWorker=function(W){this.setOption("useWorker",W)},j.prototype.getUseWorker=function(){return this.$useWorker},j.prototype.onReloadTokenizer=function(W){var y=W.data;this.bgTokenizer.start(y.first),this._signal("tokenizerUpdate",W)},j.prototype.setMode=function(W,y){if(W&&typeof W=="object"){if(W.getTokenizer)return this.$onChangeMode(W);var v=W,D=v.path}else D=W||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new r),this.$modes[D]&&!v){this.$onChangeMode(this.$modes[D]),y&&y();return}this.$modeId=D,a.loadModule(["mode",D],(function(Ee){if(!this.destroyed){if(this.$modeId!==D)return y&&y();this.$modes[D]&&!v?this.$onChangeMode(this.$modes[D]):Ee&&Ee.Mode&&(Ee=new Ee.Mode(v),v||(this.$modes[D]=Ee,Ee.$id=D),this.$onChangeMode(Ee)),y&&y()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},j.prototype.$onChangeMode=function(W,y){if(y||(this.$modeId=W.$id),this.$mode!==W){var v=this.$mode;this.$mode=W,this.$stopWorker(),this.$useWorker&&this.$startWorker();var D=W.getTokenizer();if(D.on!==void 0){var Ee=this.onReloadTokenizer.bind(this);D.on("update",Ee)}this.bgTokenizer.setTokenizer(D),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=W.tokenRe,this.nonTokenRe=W.nonTokenRe,y||(W.attachToSession&&W.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(W.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:v,mode:W}))}},j.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},j.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(W){a.warn("Could not load worker",W),this.$worker=null}},j.prototype.getMode=function(){return this.$mode},j.prototype.setScrollTop=function(W){this.$scrollTop===W||isNaN(W)||(this.$scrollTop=W,this._signal("changeScrollTop",W))},j.prototype.getScrollTop=function(){return this.$scrollTop},j.prototype.setScrollLeft=function(W){this.$scrollLeft===W||isNaN(W)||(this.$scrollLeft=W,this._signal("changeScrollLeft",W))},j.prototype.getScrollLeft=function(){return this.$scrollLeft},j.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},j.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var W=0;return this.lineWidgets.forEach(function(y){y&&y.screenWidth>W&&(W=y.screenWidth)}),this.lineWidgetWidth=W},j.prototype.$computeWidth=function(W){if(this.$modified||W){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var y=this.doc.getAllLines(),v=this.$rowLengthCache,D=0,Ee=0,qe=this.$foldData[Ee],ot=qe?qe.start.row:1/0,lt=y.length,ct=0;ct<lt;ct++){if(ct>ot){if(ct=qe.end.row+1,ct>=lt)break;qe=this.$foldData[Ee++],ot=qe?qe.start.row:1/0}v[ct]==null&&(v[ct]=this.$getStringScreenWidth(y[ct])[0]),v[ct]>D&&(D=v[ct])}this.screenWidth=D}},j.prototype.getLine=function(W){return this.doc.getLine(W)},j.prototype.getLines=function(W,y){return this.doc.getLines(W,y)},j.prototype.getLength=function(){return this.doc.getLength()},j.prototype.getTextRange=function(W){return this.doc.getTextRange(W||this.selection.getRange())},j.prototype.insert=function(W,y){return this.doc.insert(W,y)},j.prototype.remove=function(W){return this.doc.remove(W)},j.prototype.removeFullLines=function(W,y){return this.doc.removeFullLines(W,y)},j.prototype.undoChanges=function(W,y){if(W.length){this.$fromUndo=!0;for(var v=W.length-1;v!=-1;v--){var D=W[v];D.action=="insert"||D.action=="remove"?this.doc.revertDelta(D):D.folds&&this.addFolds(D.folds)}!y&&this.$undoSelect&&(W.selectionBefore?this.selection.fromJSON(W.selectionBefore):this.selection.setRange(this.$getUndoSelection(W,!0))),this.$fromUndo=!1}},j.prototype.redoChanges=function(W,y){if(W.length){this.$fromUndo=!0;for(var v=0;v<W.length;v++){var D=W[v];(D.action=="insert"||D.action=="remove")&&this.doc.$safeApplyDelta(D)}!y&&this.$undoSelect&&(W.selectionAfter?this.selection.fromJSON(W.selectionAfter):this.selection.setRange(this.$getUndoSelection(W,!1))),this.$fromUndo=!1}},j.prototype.setUndoSelect=function(W){this.$undoSelect=W},j.prototype.$getUndoSelection=function(W,y){function v(lt){return y?lt.action!=="insert":lt.action==="insert"}for(var D,Ee,qe=0;qe<W.length;qe++){var ot=W[qe];if(ot.start){if(!D){v(ot)?D=o.fromPoints(ot.start,ot.end):D=o.fromPoints(ot.start,ot.start);continue}v(ot)?(Ee=ot.start,D.compare(Ee.row,Ee.column)==-1&&D.setStart(Ee),Ee=ot.end,D.compare(Ee.row,Ee.column)==1&&D.setEnd(Ee)):(Ee=ot.start,D.compare(Ee.row,Ee.column)==-1&&(D=o.fromPoints(ot.start,ot.start)))}}return D},j.prototype.replace=function(W,y){return this.doc.replace(W,y)},j.prototype.moveText=function(W,y,v){var D=this.getTextRange(W),Ee=this.getFoldsInRange(W),qe=o.fromPoints(y,y);if(!v){this.remove(W);var ot=W.start.row-W.end.row,lt=ot?-W.end.column:W.start.column-W.end.column;lt&&(qe.start.row==W.end.row&&qe.start.column>W.end.column&&(qe.start.column+=lt),qe.end.row==W.end.row&&qe.end.column>W.end.column&&(qe.end.column+=lt)),ot&&qe.start.row>=W.end.row&&(qe.start.row+=ot,qe.end.row+=ot)}if(qe.end=this.insert(qe.start,D),Ee.length){var ct=W.start,Ut=qe.start,ot=Ut.row-ct.row,lt=Ut.column-ct.column;this.addFolds(Ee.map(function(Ht){return Ht=Ht.clone(),Ht.start.row==ct.row&&(Ht.start.column+=lt),Ht.end.row==ct.row&&(Ht.end.column+=lt),Ht.start.row+=ot,Ht.end.row+=ot,Ht}))}return qe},j.prototype.indentRows=function(W,y,v){v=v.replace(/\t/g,this.getTabString());for(var D=W;D<=y;D++)this.doc.insertInLine({row:D,column:0},v)},j.prototype.outdentRows=function(W){for(var y=W.collapseRows(),v=new o(0,0,0,0),D=this.getTabSize(),Ee=y.start.row;Ee<=y.end.row;++Ee){var qe=this.getLine(Ee);v.start.row=Ee,v.end.row=Ee;for(var ot=0;ot<D&&qe.charAt(ot)==" ";++ot);ot<D&&qe.charAt(ot)==" "?(v.start.column=ot,v.end.column=ot+1):(v.start.column=0,v.end.column=ot),this.remove(v)}},j.prototype.$moveLines=function(W,y,v){if(W=this.getRowFoldStart(W),y=this.getRowFoldEnd(y),v<0){var D=this.getRowFoldStart(W+v);if(D<0)return 0;var Ee=D-W}else if(v>0){var D=this.getRowFoldEnd(y+v);if(D>this.doc.getLength()-1)return 0;var Ee=D-y}else{W=this.$clipRowToDocument(W),y=this.$clipRowToDocument(y);var Ee=y-W+1}var qe=new o(W,0,y,Number.MAX_VALUE),ot=this.getFoldsInRange(qe).map(function(ct){return ct=ct.clone(),ct.start.row+=Ee,ct.end.row+=Ee,ct}),lt=v==0?this.doc.getLines(W,y):this.doc.removeFullLines(W,y);return this.doc.insertFullLines(W+Ee,lt),ot.length&&this.addFolds(ot),Ee},j.prototype.moveLinesUp=function(W,y){return this.$moveLines(W,y,-1)},j.prototype.moveLinesDown=function(W,y){return this.$moveLines(W,y,1)},j.prototype.duplicateLines=function(W,y){return this.$moveLines(W,y,0)},j.prototype.$clipRowToDocument=function(W){return Math.max(0,Math.min(W,this.doc.getLength()-1))},j.prototype.$clipColumnToRow=function(W,y){return y<0?0:Math.min(this.doc.getLine(W).length,y)},j.prototype.$clipPositionToDocument=function(W,y){if(y=Math.max(0,y),W<0)W=0,y=0;else{var v=this.doc.getLength();W>=v?(W=v-1,y=this.doc.getLine(v-1).length):y=Math.min(this.doc.getLine(W).length,y)}return{row:W,column:y}},j.prototype.$clipRangeToDocument=function(W){W.start.row<0?(W.start.row=0,W.start.column=0):W.start.column=this.$clipColumnToRow(W.start.row,W.start.column);var y=this.doc.getLength()-1;return W.end.row>y?(W.end.row=y,W.end.column=this.doc.getLine(y).length):W.end.column=this.$clipColumnToRow(W.end.row,W.end.column),W},j.prototype.setUseWrapMode=function(W){if(W!=this.$useWrapMode){if(this.$useWrapMode=W,this.$modified=!0,this.$resetRowCache(0),W){var y=this.getLength();this.$wrapData=Array(y),this.$updateWrapData(0,y-1)}this._signal("changeWrapMode")}},j.prototype.getUseWrapMode=function(){return this.$useWrapMode},j.prototype.setWrapLimitRange=function(W,y){(this.$wrapLimitRange.min!==W||this.$wrapLimitRange.max!==y)&&(this.$wrapLimitRange={min:W,max:y},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},j.prototype.adjustWrapLimit=function(W,y){var v=this.$wrapLimitRange;v.max<0&&(v={min:y,max:y});var D=this.$constrainWrapLimit(W,v.min,v.max);return D!=this.$wrapLimit&&D>1?(this.$wrapLimit=D,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},j.prototype.$constrainWrapLimit=function(W,y,v){return y&&(W=Math.max(y,W)),v&&(W=Math.min(v,W)),W},j.prototype.getWrapLimit=function(){return this.$wrapLimit},j.prototype.setWrapLimit=function(W){this.setWrapLimitRange(W,W)},j.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},j.prototype.$updateInternalDataOnChange=function(W){var y=this.$useWrapMode,v=W.action,D=W.start,Ee=W.end,qe=D.row,ot=Ee.row,lt=ot-qe,ct=null;if(this.$updating=!0,lt!=0)if(v==="remove"){this[y?"$wrapData":"$rowLengthCache"].splice(qe,lt);var Ut=this.$foldData;ct=this.getFoldsInRange(W),this.removeFolds(ct);var Mt=this.getFoldLine(Ee.row),zt=0;if(Mt){Mt.addRemoveChars(Ee.row,Ee.column,D.column-Ee.column),Mt.shiftRow(-lt);var Ht=this.getFoldLine(qe);Ht&&Ht!==Mt&&(Ht.merge(Mt),Mt=Ht),zt=Ut.indexOf(Mt)+1}for(zt;zt<Ut.length;zt++){var Mt=Ut[zt];Mt.start.row>=Ee.row&&Mt.shiftRow(-lt)}ot=qe}else{var Vt=Array(lt);Vt.unshift(qe,0);var hi=y?this.$wrapData:this.$rowLengthCache;hi.splice.apply(hi,Vt);var Ut=this.$foldData,Mt=this.getFoldLine(qe),zt=0;if(Mt){var ui=Mt.range.compareInside(D.row,D.column);ui==0?(Mt=Mt.split(D.row,D.column),Mt&&(Mt.shiftRow(lt),Mt.addRemoveChars(ot,0,Ee.column-D.column))):ui==-1&&(Mt.addRemoveChars(qe,0,Ee.column-D.column),Mt.shiftRow(lt)),zt=Ut.indexOf(Mt)+1}for(zt;zt<Ut.length;zt++){var Mt=Ut[zt];Mt.start.row>=qe&&Mt.shiftRow(lt)}}else{lt=Math.abs(W.start.column-W.end.column),v==="remove"&&(ct=this.getFoldsInRange(W),this.removeFolds(ct),lt=-lt);var Mt=this.getFoldLine(qe);Mt&&Mt.addRemoveChars(qe,D.column,lt)}return y&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,y?this.$updateWrapData(qe,ot):this.$updateRowLengthCache(qe,ot),ct},j.prototype.$updateRowLengthCache=function(W,y){this.$rowLengthCache[W]=null,this.$rowLengthCache[y]=null},j.prototype.$updateWrapData=function(W,y){var v=this.doc.getAllLines(),D=this.getTabSize(),Ee=this.$wrapData,qe=this.$wrapLimit,ot,lt,ct=W;for(y=Math.min(y,v.length-1);ct<=y;)lt=this.getFoldLine(ct,lt),lt?(ot=[],lt.walk((function(Ut,Mt,zt,Ht){var Vt;if(Ut!=null){Vt=this.$getDisplayTokens(Ut,ot.length),Vt[0]=C;for(var hi=1;hi<Vt.length;hi++)Vt[hi]=b}else Vt=this.$getDisplayTokens(v[Mt].substring(Ht,zt),ot.length);ot=ot.concat(Vt)}).bind(this),lt.end.row,v[lt.end.row].length+1),Ee[lt.start.row]=this.$computeWrapSplits(ot,qe,D),ct=lt.end.row+1):(ot=this.$getDisplayTokens(v[ct]),Ee[ct]=this.$computeWrapSplits(ot,qe,D),ct++)},j.prototype.$computeWrapSplits=function(W,y,v){if(W.length==0)return[];var D=[],Ee=W.length,qe=0,ot=0,lt=this.$wrapAsCode,ct=this.$indentedSoftWrap,Ut=y<=Math.max(2*v,8)||ct===!1?0:Math.floor(y/2);function Mt(){var ui=0;if(Ut===0)return ui;if(ct)for(var fi=0;fi<W.length;fi++){var di=W[fi];if(di==Se)ui+=1;else if(di==q)ui+=v;else{if(di==U)continue;break}}return lt&&ct!==!1&&(ui+=v),Math.min(ui,Ut)}function zt(ui){for(var fi=ui-qe,di=qe;di<ui;di++){var vi=W[di];(vi===12||vi===2)&&(fi-=1)}D.length||(Ht=Mt(),D.indent=Ht),ot+=fi,D.push(ot),qe=ui}for(var Ht=0;Ee-qe>y-Ht;){var Vt=qe+y-Ht;if(W[Vt-1]>=Se&&W[Vt]>=Se){zt(Vt);continue}if(W[Vt]==C||W[Vt]==b){for(Vt;Vt!=qe-1&&W[Vt]!=C;Vt--);if(Vt>qe){zt(Vt);continue}for(Vt=qe+y,Vt;Vt<W.length&&W[Vt]==b;Vt++);if(Vt==W.length)break;zt(Vt);continue}for(var hi=Math.max(Vt-(y-(y>>2)),qe-1);Vt>hi&&W[Vt]<C;)Vt--;if(lt){for(;Vt>hi&&W[Vt]<C;)Vt--;for(;Vt>hi&&W[Vt]==G;)Vt--}else for(;Vt>hi&&W[Vt]<Se;)Vt--;if(Vt>hi){zt(++Vt);continue}Vt=qe+y,W[Vt]==A&&Vt--,zt(Vt-Ht)}return D},j.prototype.$getDisplayTokens=function(W,y){var v=[],D;y=y||0;for(var Ee=0;Ee<W.length;Ee++){var qe=W.charCodeAt(Ee);if(qe==9){D=this.getScreenTabSize(v.length+y),v.push(q);for(var ot=1;ot<D;ot++)v.push(U)}else qe==32?v.push(Se):qe>39&&qe<48||qe>57&&qe<64?v.push(G):qe>=4352&&at(qe)?v.push(x,A):v.push(x)}return v},j.prototype.$getStringScreenWidth=function(W,y,v){if(y==0)return[0,0];y==null&&(y=1/0),v=v||0;var D,Ee;for(Ee=0;Ee<W.length&&(D=W.charCodeAt(Ee),D==9?v+=this.getScreenTabSize(v):D>=4352&&at(D)?v+=2:v+=1,!(v>y));Ee++);return[v,Ee]},j.prototype.getRowLength=function(W){var y=1;return this.lineWidgets&&(y+=this.lineWidgets[W]&&this.lineWidgets[W].rowCount||0),!this.$useWrapMode||!this.$wrapData[W]?y:this.$wrapData[W].length+y},j.prototype.getRowLineCount=function(W){return!this.$useWrapMode||!this.$wrapData[W]?1:this.$wrapData[W].length+1},j.prototype.getRowWrapIndent=function(W){if(this.$useWrapMode){var y=this.screenToDocumentPosition(W,Number.MAX_VALUE),v=this.$wrapData[y.row];return v.length&&v[0]<y.column?v.indent:0}else return 0},j.prototype.getScreenLastRowColumn=function(W){var y=this.screenToDocumentPosition(W,Number.MAX_VALUE);return this.documentToScreenColumn(y.row,y.column)},j.prototype.getDocumentLastRowColumn=function(W,y){var v=this.documentToScreenRow(W,y);return this.getScreenLastRowColumn(v)},j.prototype.getDocumentLastRowColumnPosition=function(W,y){var v=this.documentToScreenRow(W,y);return this.screenToDocumentPosition(v,Number.MAX_VALUE/10)},j.prototype.getRowSplitData=function(W){if(this.$useWrapMode)return this.$wrapData[W]},j.prototype.getScreenTabSize=function(W){return this.$tabSize-(W%this.$tabSize|0)},j.prototype.screenToDocumentRow=function(W,y){return this.screenToDocumentPosition(W,y).row},j.prototype.screenToDocumentColumn=function(W,y){return this.screenToDocumentPosition(W,y).column},j.prototype.screenToDocumentPosition=function(W,y,v){if(W<0)return{row:0,column:0};var D,Ee=0,qe=0,ot,lt=0,ct=0,Ut=this.$screenRowCache,Mt=this.$getRowCacheIndex(Ut,W),zt=Ut.length;if(zt&&Mt>=0)var lt=Ut[Mt],Ee=this.$docRowCache[Mt],Ht=W>Ut[zt-1];else var Ht=!zt;for(var Vt=this.getLength()-1,hi=this.getNextFoldLine(Ee),ui=hi?hi.start.row:1/0;lt<=W&&(ct=this.getRowLength(Ee),!(lt+ct>W||Ee>=Vt));)lt+=ct,Ee++,Ee>ui&&(Ee=hi.end.row+1,hi=this.getNextFoldLine(Ee,hi),ui=hi?hi.start.row:1/0),Ht&&(this.$docRowCache.push(Ee),this.$screenRowCache.push(lt));if(hi&&hi.start.row<=Ee)D=this.getFoldDisplayLine(hi),Ee=hi.start.row;else{if(lt+ct<=W||Ee>Vt)return{row:Vt,column:this.getLine(Vt).length};D=this.getLine(Ee),hi=null}var fi=0,di=Math.floor(W-lt);if(this.$useWrapMode){var vi=this.$wrapData[Ee];vi&&(ot=vi[di],di>0&&vi.length&&(fi=vi.indent,qe=vi[di-1]||vi[vi.length-1],D=D.substring(qe)))}return v!==void 0&&this.$bidiHandler.isBidiRow(lt+di,Ee,di)&&(y=this.$bidiHandler.offsetToCol(v)),qe+=this.$getStringScreenWidth(D,y-fi)[1],this.$useWrapMode&&qe>=ot&&(qe=ot-1),hi?hi.idxToPosition(qe):{row:Ee,column:qe}},j.prototype.documentToScreenPosition=function(W,y){if(typeof y>"u")var v=this.$clipPositionToDocument(W.row,W.column);else v=this.$clipPositionToDocument(W,y);W=v.row,y=v.column;var D=0,Ee=null,qe=null;qe=this.getFoldAt(W,y,1),qe&&(W=qe.start.row,y=qe.start.column);var ot,lt=0,ct=this.$docRowCache,Ut=this.$getRowCacheIndex(ct,W),Mt=ct.length;if(Mt&&Ut>=0)var lt=ct[Ut],D=this.$screenRowCache[Ut],zt=W>ct[Mt-1];else var zt=!Mt;for(var Ht=this.getNextFoldLine(lt),Vt=Ht?Ht.start.row:1/0;lt<W;){if(lt>=Vt){if(ot=Ht.end.row+1,ot>W)break;Ht=this.getNextFoldLine(ot,Ht),Vt=Ht?Ht.start.row:1/0}else ot=lt+1;D+=this.getRowLength(lt),lt=ot,zt&&(this.$docRowCache.push(lt),this.$screenRowCache.push(D))}var hi="";Ht&<>=Vt?(hi=this.getFoldDisplayLine(Ht,W,y),Ee=Ht.start.row):(hi=this.getLine(W).substring(0,y),Ee=W);var ui=0;if(this.$useWrapMode){var fi=this.$wrapData[Ee];if(fi){for(var di=0;hi.length>=fi[di];)D++,di++;hi=hi.substring(fi[di-1]||0,hi.length),ui=di>0?fi.indent:0}}return this.lineWidgets&&this.lineWidgets[lt]&&this.lineWidgets[lt].rowsAbove&&(D+=this.lineWidgets[lt].rowsAbove),{row:D,column:ui+this.$getStringScreenWidth(hi)[0]}},j.prototype.documentToScreenColumn=function(W,y){return this.documentToScreenPosition(W,y).column},j.prototype.documentToScreenRow=function(W,y){return this.documentToScreenPosition(W,y).row},j.prototype.getScreenLength=function(){var W=0,y=null;if(this.$useWrapMode)for(var Ee=this.$wrapData.length,qe=0,D=0,y=this.$foldData[D++],ot=y?y.start.row:1/0;qe<Ee;){var lt=this.$wrapData[qe];W+=lt?lt.length+1:1,qe++,qe>ot&&(qe=y.end.row+1,y=this.$foldData[D++],ot=y?y.start.row:1/0)}else{W=this.getLength();for(var v=this.$foldData,D=0;D<v.length;D++)y=v[D],W-=y.end.row-y.start.row}return this.lineWidgets&&(W+=this.$getWidgetScreenLength()),W},j.prototype.$setFontMetrics=function(W){this.$enableVarChar&&(this.$getStringScreenWidth=function(y,v,D){if(v===0)return[0,0];v||(v=1/0),D=D||0;var Ee,qe;for(qe=0;qe<y.length&&(Ee=y.charAt(qe),Ee===" "?D+=this.getScreenTabSize(D):D+=W.getCharacterWidth(Ee),!(D>v));qe++);return[D,qe]})},j.prototype.getPrecedingCharacter=function(){var W=this.selection.getCursor();if(W.column===0)return W.row===0?"":this.doc.getNewLineCharacter();var y=this.getLine(W.row);return y[W.column-1]},j.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()},j}();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=at,E.implement(m.prototype,h);var x=1,A=2,C=3,b=4,G=9,Se=10,q=11,U=12;function at(j){return j<4352?!1:j>=4352&&j<=4447||j>=4515&&j<=4519||j>=4602&&j<=4607||j>=9001&&j<=9002||j>=11904&&j<=11929||j>=11931&&j<=12019||j>=12032&&j<=12245||j>=12272&&j<=12283||j>=12288&&j<=12350||j>=12353&&j<=12438||j>=12441&&j<=12543||j>=12549&&j<=12589||j>=12593&&j<=12686||j>=12688&&j<=12730||j>=12736&&j<=12771||j>=12784&&j<=12830||j>=12832&&j<=12871||j>=12880&&j<=13054||j>=13056&&j<=19903||j>=19968&&j<=42124||j>=42128&&j<=42182||j>=43360&&j<=43388||j>=44032&&j<=55203||j>=55216&&j<=55238||j>=55243&&j<=55291||j>=63744&&j<=64255||j>=65040&&j<=65049||j>=65072&&j<=65106||j>=65108&&j<=65126||j>=65128&&j<=65131||j>=65281&&j<=65376||j>=65504&&j<=65510}g("./edit_session/folding").Folding.call(m.prototype),g("./edit_session/bracket_match").BracketMatch.call(m.prototype),a.defineOptions(m.prototype,"session",{wrap:{set:function(j){if(!j||j=="off"?j=!1:j=="free"?j=!0:j=="printMargin"?j=-1:typeof j=="string"&&(j=parseInt(j,10)||!1),this.$wrap!=j)if(this.$wrap=j,!j)this.setUseWrapMode(!1);else{var W=typeof j=="number"?j:null;this.setWrapLimitRange(W,W),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(j){j=j=="auto"?this.$mode.type!="text":j!="text",j!=this.$wrapAsCode&&(this.$wrapAsCode=j,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(j){this.$useWorker=j,this.$stopWorker(),j&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(j){j=parseInt(j),j>0&&this.$tabSize!==j&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=j,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(j){this.setFoldStyle(j)},handlesSet:!0},overwrite:{set:function(j){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(j){this.doc.setNewLineMode(j)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(j){this.setMode(j)},get:function(){return this.$modeId},handlesSet:!0}}),p.EditSession=m}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(g,p,se){var E=g("./lib/lang"),S=g("./lib/oop"),_=g("./range").Range,a=function(){function o(){this.$options={}}return o.prototype.set=function(t){return S.mixin(this.$options,t),this},o.prototype.getOptions=function(){return E.copyObject(this.$options)},o.prototype.setOptions=function(t){this.$options=t},o.prototype.find=function(t){var e=this.$options,n=this.$matchIterator(t,e);if(!n)return!1;var s=null;return n.forEach(function(f,m,x,A){return s=new _(f,m,x,A),m==A&&e.start&&e.start.start&&e.skipCurrent!=!1&&s.isEqual(e.start)?(s=null,!1):!0}),s},o.prototype.findAll=function(t){var e=this.$options;if(!e.needle)return[];this.$assembleRegExp(e);var n=e.range,s=n?t.getLines(n.start.row,n.end.row):t.doc.getAllLines(),f=[],m=e.re;if(e.$isMultiLine){var x=m.length,A=s.length-x,C;e:for(var b=m.offset||0;b<=A;b++){for(var G=0;G<x;G++)if(s[b+G].search(m[G])==-1)continue e;var Se=s[b],q=s[b+x-1],U=Se.length-Se.match(m[0])[0].length,at=q.match(m[x-1])[0].length;C&&C.end.row===b&&C.end.column>U||(f.push(C=new _(b,U,b+x-1,at)),x>2&&(b=b+x-2))}}else for(var j,W=0;W<s.length;W++)if(this.$isMultilineSearch(e)){var y=s.length-1;if(j=this.$multiLineForward(t,m,W,y),j){var v=j.endRow<=y?j.endRow-1:y;v>W&&(W=v),f.push(new _(j.startRow,j.startCol,j.endRow,j.endCol))}}else{j=E.getMatchOffsets(s[W],m);for(var G=0;G<j.length;G++){var D=j[G];f.push(new _(W,D.offset,W,D.offset+D.length))}}if(n){for(var Ee=n.start.column,qe=n.end.column,W=0,G=f.length-1;W<G&&f[W].start.column<Ee&&f[W].start.row==0;)W++;for(var ot=n.end.row-n.start.row;W<G&&f[G].end.column>qe&&f[G].end.row==ot;)G--;for(f=f.slice(W,G+1),W=0,G=f.length;W<G;W++)f[W].start.row+=n.start.row,f[W].end.row+=n.start.row}return f},o.prototype.parseReplaceString=function(t){for(var e={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},n="",s=0,f=t.length;s<f;s++){var m=t.charCodeAt(s);if(m===e.Backslash){if(s++,s>=f){n+="\\";break}var x=t.charCodeAt(s);switch(x){case e.Backslash:n+="\\";break;case e.n:n+=`
|
201
|
+
`;break;case e.t:n+=" ";break}continue}if(m===e.DollarSign){if(s++,s>=f){n+="$";break}var A=t.charCodeAt(s);if(A===e.DollarSign){n+="$$";continue}if(A===e.Digit0||A===e.Ampersand){n+="$&";continue}if(e.Digit1<=A&&A<=e.Digit9){n+="$"+t[s];continue}}n+=t[s]}return n||t},o.prototype.replace=function(t,e){var n=this.$options,s=this.$assembleRegExp(n);if(n.$isMultiLine)return e;if(s){var f=this.$isMultilineSearch(n);f&&(t=t.replace(/\r\n|\r|\n/g,`
|
202
|
+
`));var m=s.exec(t);if(!m||!f&&m[0].length!=t.length)return null;if(e=n.regExp?this.parseReplaceString(e):e.replace(/\$/g,"$$$$"),e=t.replace(s,e),n.preserveCase){e=e.split("");for(var x=Math.min(t.length,t.length);x--;){var A=t[x];A&&A.toLowerCase()!=A?e[x]=e[x].toUpperCase():e[x]=e[x].toLowerCase()}e=e.join("")}return e}},o.prototype.$assembleRegExp=function(t,e){if(t.needle instanceof RegExp)return t.re=t.needle;var n=t.needle;if(!t.needle)return t.re=!1;t.regExp||(n=E.escapeRegExp(n));var s=t.caseSensitive?"gm":"gmi";try{new RegExp(n,"u"),t.$supportsUnicodeFlag=!0,s+="u"}catch{t.$supportsUnicodeFlag=!1}if(t.wholeWord&&(n=h(n,t)),t.$isMultiLine=!e&&/[\n\r]/.test(n),t.$isMultiLine)return t.re=this.$assembleMultilineRegExp(n,s);try{var f=new RegExp(n,s)}catch{f=!1}return t.re=f},o.prototype.$assembleMultilineRegExp=function(t,e){for(var n=t.replace(/\r\n|\r|\n/g,`$
|
203
|
+
^`).split(`
|
204
|
+
`),s=[],f=0;f<n.length;f++)try{s.push(new RegExp(n[f],e))}catch{return!1}return s},o.prototype.$isMultilineSearch=function(t){return t.re&&/\\r\\n|\\r|\\n/.test(t.re.source)&&t.regExp&&!t.$isMultiLine},o.prototype.$multiLineForward=function(t,e,n,s){for(var f,m=r(t,n),x=n;x<=s;){for(var A=0;A<m&&!(x>s);A++){var C=t.getLine(x++);f=f==null?C:f+`
|
205
|
+
`+C}var b=e.exec(f);if(e.lastIndex=0,b){var G=f.slice(0,b.index).split(`
|
206
|
+
`),Se=b[0].split(`
|
207
|
+
`),q=n+G.length-1,U=G[G.length-1].length,at=q+Se.length-1,j=Se.length==1?U+Se[0].length:Se[Se.length-1].length;return{startRow:q,startCol:U,endRow:at,endCol:j}}}return null},o.prototype.$multiLineBackward=function(t,e,n,s,f){for(var m,x=r(t,s),A=t.getLine(s).length-n,C=s;C>=f;){for(var b=0;b<x&&C>=f;b++){var G=t.getLine(C--);m=m==null?G:G+`
|
208
|
+
`+m}var Se=i(m,e,A);if(Se){var q=m.slice(0,Se.index).split(`
|
209
|
+
`),U=Se[0].split(`
|
210
|
+
`),at=C+q.length,j=q[q.length-1].length,W=at+U.length-1,y=U.length==1?j+U[0].length:U[U.length-1].length;return{startRow:at,startCol:j,endRow:W,endCol:y}}}return null},o.prototype.$matchIterator=function(t,e){var n=this.$assembleRegExp(e);if(!n)return!1;var s=this.$isMultilineSearch(e),f=this.$multiLineForward,m=this.$multiLineBackward,x=e.backwards==!0,A=e.skipCurrent!=!1,C=n.unicode,b=e.range,G=e.start;G||(G=b?b[x?"end":"start"]:t.selection.getRange()),G.start&&(G=G[A!=x?"end":"start"]);var Se=b?b.start.row:0,q=b?b.end.row:t.getLength()-1;if(x)var U=function(W){var y=G.row;if(!j(y,G.column,W)){for(y--;y>=Se;y--)if(j(y,Number.MAX_VALUE,W))return;if(e.wrap!=!1){for(y=q,Se=G.row;y>=Se;y--)if(j(y,Number.MAX_VALUE,W))return}}};else var U=function(y){var v=G.row;if(!j(v,G.column,y)){for(v=v+1;v<=q;v++)if(j(v,0,y))return;if(e.wrap!=!1){for(v=Se,q=G.row;v<=q;v++)if(j(v,0,y))return}}};if(e.$isMultiLine)var at=n.length,j=function(W,y,v){var D=x?W-at+1:W;if(!(D<0||D+at>t.getLength())){var Ee=t.getLine(D),qe=Ee.search(n[0]);if(!(!x&&qe<y||qe===-1)){for(var ot=1;ot<at;ot++)if(Ee=t.getLine(D+ot),Ee.search(n[ot])==-1)return;var lt=Ee.match(n[at-1])[0].length;if(!(x&<>y)&&v(D,qe,D+at-1,lt))return!0}}};else if(x)var j=function(y,v,D){if(s){var Ee=m(t,n,v,y,Se);if(!Ee)return!1;if(D(Ee.startRow,Ee.startCol,Ee.endRow,Ee.endCol))return!0}else{var qe=t.getLine(y),ot=[],lt,ct=0;for(n.lastIndex=0;lt=n.exec(qe);){var Ut=lt[0].length;if(ct=lt.index,!Ut){if(ct>=qe.length)break;n.lastIndex=ct+=E.skipEmptyMatch(qe,ct,C)}if(lt.index+Ut>v)break;ot.push(lt.index,Ut)}for(var Mt=ot.length-1;Mt>=0;Mt-=2){var zt=ot[Mt-1],Ut=ot[Mt];if(D(y,zt,y,zt+Ut))return!0}}};else var j=function(y,v,D){if(n.lastIndex=v,s){var Ee=f(t,n,y,q);if(Ee){var qe=Ee.endRow<=q?Ee.endRow-1:q;qe>y&&(y=qe)}if(!Ee)return!1;if(D(Ee.startRow,Ee.startCol,Ee.endRow,Ee.endCol))return!0}else for(var ot=t.getLine(y),lt,ct;ct=n.exec(ot);){var Ut=ct[0].length;if(lt=ct.index,D(y,lt,y,lt+Ut))return!0;if(!Ut&&(n.lastIndex=lt+=E.skipEmptyMatch(ot,lt,C),lt>=ot.length))return!1}};return{forEach:U}},o}();function h(o,t){var e=E.supportsLookbehind();function n(x,A){A===void 0&&(A=!0);var C=e&&t.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return C.test(x)||t.regExp?e&&t.$supportsUnicodeFlag?A?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var s=Array.from(o),f=s[0],m=s[s.length-1];return n(f)+o+n(m,!1)}function i(o,t,e){for(var n=null,s=0;s<=o.length;){t.lastIndex=s;var f=t.exec(o);if(!f)break;var m=f.index+f[0].length;if(m>o.length-e)break;(!n||m>n.index+n[0].length)&&(n=f),s=f.index+1}return n}function r(o,t){var e=5e3,n={row:t,column:0},s=o.doc.positionToIndex(n),f=s+e,m=o.doc.indexToPosition(f),x=m.row;return x+1}p.Search=a}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(g,p,se){var E=this&&this.__extends||function(){var o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var f in s)Object.prototype.hasOwnProperty.call(s,f)&&(n[f]=s[f])},o(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");o(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),S=g("../lib/keys"),_=g("../lib/useragent"),a=S.KEY_MODS,h=function(){function o(t,e){this.$init(t,e,!1)}return o.prototype.$init=function(t,e,n){this.platform=e||(_.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(t),this.$singleCommand=n},o.prototype.addCommand=function(t){this.commands[t.name]&&this.removeCommand(t),this.commands[t.name]=t,t.bindKey&&this._buildKeyHash(t)},o.prototype.removeCommand=function(t,e){var n=t&&(typeof t=="string"?t:t.name);t=this.commands[n],e||delete this.commands[n];var s=this.commandKeyBinding;for(var f in s){var m=s[f];if(m==t)delete s[f];else if(Array.isArray(m)){var x=m.indexOf(t);x!=-1&&(m.splice(x,1),m.length==1&&(s[f]=m[0]))}}},o.prototype.bindKey=function(t,e,n){if(typeof t=="object"&&t&&(n==null&&(n=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 f="";if(s.indexOf(" ")!=-1){var m=s.split(/\s+/);s=m.pop(),m.forEach(function(C){var b=this.parseKeys(C),G=a[b.hashId]+b.key;f+=(f?" ":"")+G,this._addCommandToBinding(f,"chainKeys")},this),f+=" "}var x=this.parseKeys(s),A=a[x.hashId]+x.key;this._addCommandToBinding(f+A,e,n)},this)}},o.prototype._addCommandToBinding=function(t,e,n){var s=this.commandKeyBinding,f;if(!e)delete s[t];else if(!s[t]||this.$singleCommand)s[t]=e;else{Array.isArray(s[t])?(f=s[t].indexOf(e))!=-1&&s[t].splice(f,1):s[t]=[s[t]],typeof n!="number"&&(n=i(e));var m=s[t];for(f=0;f<m.length;f++){var x=m[f],A=i(x);if(A>n)break}m.splice(f,0,e)}},o.prototype.addCommands=function(t){t&&Object.keys(t).forEach(function(e){var n=t[e];if(n){if(typeof n=="string")return this.bindKey(n,e);typeof n=="function"&&(n={exec:n}),typeof n=="object"&&(n.name||(n.name=e),this.addCommand(n))}},this)},o.prototype.removeCommands=function(t){Object.keys(t).forEach(function(e){this.removeCommand(t[e])},this)},o.prototype.bindKeys=function(t){Object.keys(t).forEach(function(e){this.bindKey(e,t[e])},this)},o.prototype._buildKeyHash=function(t){this.bindKey(t.bindKey,t)},o.prototype.parseKeys=function(t){var e=t.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(A){return A}),n=e.pop(),s=S[n];if(S.FUNCTION_KEYS[s])n=S.FUNCTION_KEYS[s].toLowerCase();else if(e.length){if(e.length==1&&e[0]=="shift")return{key:n.toUpperCase(),hashId:-1}}else return{key:n,hashId:-1};for(var f=0,m=e.length;m--;){var x=S.KEY_MODS[e[m]];if(x==null)return typeof console<"u"&&console.error("invalid modifier "+e[m]+" in "+t),!1;f|=x}return{key:n,hashId:f}},o.prototype.findKeyCommand=function(t,e){var n=a[t]+e;return this.commandKeyBinding[n]},o.prototype.handleKeyboard=function(t,e,n,s){if(!(s<0)){var f=a[e]+n,m=this.commandKeyBinding[f];return t.$keyChain&&(t.$keyChain+=" "+f,m=this.commandKeyBinding[t.$keyChain]||m),m&&(m=="chainKeys"||m[m.length-1]=="chainKeys")?(t.$keyChain=t.$keyChain||f,{command:"null"}):(t.$keyChain&&((!e||e==4)&&n.length==1?t.$keyChain=t.$keyChain.slice(0,-f.length-1):(e==-1||s>0)&&(t.$keyChain="")),{command:m})}},o.prototype.getStatusText=function(t,e){return e.$keyChain||""},o}();function i(o){return typeof o=="object"&&o.bindKey&&o.bindKey.position||(o.isDefault?-100:0)}var r=function(o){E(t,o);function t(e,n){var s=o.call(this,e,n)||this;return s.$singleCommand=!0,s}return t}(h);r.call=function(o,t,e){h.prototype.$init.call(o,t,e,!0)},h.call=function(o,t,e){h.prototype.$init.call(o,t,e,!1)},p.HashHandler=r,p.MultiHashHandler=h}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(g,p,se){var E=this&&this.__extends||function(){var i=function(r,o){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(r,o)};return function(r,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");i(r,o);function t(){this.constructor=r}r.prototype=o===null?Object.create(o):(t.prototype=o.prototype,new t)}}(),S=g("../lib/oop"),_=g("../keyboard/hash_handler").MultiHashHandler,a=g("../lib/event_emitter").EventEmitter,h=function(i){E(r,i);function r(o,t){var e=i.call(this,t,o)||this;return e.byName=e.commands,e.setDefaultHandler("exec",function(n){return n.args?n.command.exec(n.editor,n.args,n.event,!1):n.command.exec(n.editor,{},n.event,!0)}),e}return r.prototype.exec=function(o,t,e){if(Array.isArray(o)){for(var n=o.length;n--;)if(this.exec(o[n],t,e))return!0;return!1}typeof o=="string"&&(o=this.commands[o]);var s={editor:t,command:o,args:e};return this.canExecute(o,t)?(s.returnValue=this._emit("exec",s),this._signal("afterExec",s),s.returnValue!==!1):(this._signal("commandUnavailable",s),!1)},r.prototype.canExecute=function(o,t){return typeof o=="string"&&(o=this.commands[o]),!(!o||t&&t.$readOnly&&!o.readOnly||this.$checkCommandState!=!1&&o.isAvailable&&!o.isAvailable(t))},r.prototype.toggleRecording=function(o){if(!this.$inReplay)return o&&o._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)},r.prototype.replay=function(o){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(o);try{this.$inReplay=!0,this.macro.forEach(function(t){typeof t=="string"?this.exec(t,o):this.exec(t[0],o,t[1])},this)}finally{this.$inReplay=!1}}},r.prototype.trimMacro=function(o){return o.map(function(t){return typeof t[0]!="string"&&(t[0]=t[0].name),t[1]||(t=t[0]),t})},r}(_);S.implement(h.prototype,a),p.CommandManager=h}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(g,p,se){var E=g("../lib/lang"),S=g("../config"),_=g("../range").Range;function a(i,r){return{win:i,mac:r}}p.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(i){S.loadModule("ace/ext/settings_menu",function(r){r.init(i),i.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(i){S.loadModule("ace/ext/error_marker",function(r){r.showErrorMarker(i,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(i){S.loadModule("ace/ext/error_marker",function(r){r.showErrorMarker(i,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(i){i.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(i){i.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(i,r){typeof r=="number"&&!isNaN(r)&&i.gotoLine(r),i.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(i){i.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(i){i.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(i){i.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(i){i.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(i){i.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(i){i.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(i){i.session.foldAll(),i.session.unfold(i.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(i){i.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(i){i.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(i){i.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(i){i.selection.isEmpty()?i.selection.selectWord():i.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(i){i.selection.isEmpty()?i.selection.selectWord():i.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(i){S.loadModule("ace/ext/searchbox",function(r){r.Search(i)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(i){i.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(i){i.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(i){i.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(i){i.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(i,r){i.navigateUp(r.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(i){i.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(i){i.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(i){i.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(i,r){i.navigateDown(r.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(i){i.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(i){i.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(i){i.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(i){i.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(i){i.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(i,r){i.navigateLeft(r.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(i){i.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(i){i.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(i){i.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(i){i.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(i){i.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(i,r){i.navigateRight(r.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(i){i.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(i){i.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(i){i.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(i){i.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(i){i.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(i){i.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(i){i.renderer.scrollBy(0,-2*i.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(i){i.renderer.scrollBy(0,2*i.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(i){i.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(i){i.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(i){i.commands.toggleRecording(i)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(i){i.commands.replay(i)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(i){i.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(i){i.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(i){i.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(i){},readOnly:!0},{name:"cut",description:"Cut",exec:function(i){var r=i.$copyWithEmptySelection&&i.selection.isEmpty(),o=r?i.selection.getLineRange():i.selection.getRange();i._emit("cut",o),o.isEmpty()||i.session.remove(o),i.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(i,r){i.$handlePaste(r)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(i){i.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(i){i.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(i){i.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(i){i.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(i){i.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(i){i.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(i){i.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(i){S.loadModule("ace/ext/searchbox",function(r){r.Search(i,!0)})}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(i){i.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(i){i.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(i){i.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(i){i.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(i){i.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(i){i.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(i){i.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(i){i.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(i){if(i.selection.isEmpty())i.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(i){i.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(i){i.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(i){var r=i.selection.getRange();r.start.column=0,i.session.remove(r)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(i){var r=i.selection.getRange();r.end.column=Number.MAX_VALUE,i.session.remove(r)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(i){i.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(i){i.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(i){i.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(i){i.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(i){i.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(i){i.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(i,r){i.insert(r)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(i,r){i.insert(E.stringRepeat(r.text||"",r.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(i){i.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(i){i.transposeLetters()},multiSelectAction:function(i){i.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(i){i.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(i){i.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(i){i.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(i){var r=i.selection.getRange();r.start.column=r.end.column=0,r.end.row++,i.selection.setRange(r,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:a("Ctrl+F3","F3"),exec:function(i){i.openLink()}},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(i){for(var r=i.selection.isBackwards(),o=r?i.selection.getSelectionLead():i.selection.getSelectionAnchor(),t=r?i.selection.getSelectionAnchor():i.selection.getSelectionLead(),e=i.session.doc.getLine(o.row).length,n=i.session.doc.getTextRange(i.selection.getRange()),s=n.replace(/\n\s*/," ").length,f=i.session.doc.getLine(o.row),m=o.row+1;m<=t.row+1;m++){var x=E.stringTrimLeft(E.stringTrimRight(i.session.doc.getLine(m)));x.length!==0&&(x=" "+x),f+=x}t.row+1<i.session.doc.getLength()-1&&(f+=i.session.doc.getNewLineCharacter()),i.clearSelection(),i.session.doc.replace(new _(o.row,0,t.row+2,0),f),s>0?(i.selection.moveCursorTo(o.row,o.column),i.selection.selectTo(o.row,o.column+s)):(e=i.session.doc.getLine(o.row).length>e?e+1:e,i.selection.moveCursorTo(o.row,e))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(i){var r=i.session.doc.getLength()-1,o=i.session.doc.getLine(r).length,t=i.selection.rangeList.ranges,e=[];t.length<1&&(t=[i.selection.getRange()]);for(var n=0;n<t.length;n++)n==t.length-1&&(t[n].end.row===r&&t[n].end.column===o||e.push(new _(t[n].end.row,t[n].end.column,r,o))),n===0?t[n].start.row===0&&t[n].start.column===0||e.push(new _(0,0,t[n].start.row,t[n].start.column)):e.push(new _(t[n-1].end.row,t[n-1].end.column,t[n].start.row,t[n].start.column));i.exitMultiSelectMode(),i.clearSelection();for(var n=0;n<e.length;n++)i.selection.addRange(e[n],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(i){i.selection.clearSelection(),i.navigateLineEnd(),i.insert(`
|
211
|
+
`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(i){i.selection.clearSelection();var r=i.getCursorPosition();i.selection.moveTo(r.row-1,Number.MAX_VALUE),i.insert(`
|
212
|
+
`),r.row===0&&i.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(i){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),i.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:a("F1","F1"),exec:function(i){i.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:a(null,null),exec:function(i){i.prompt({$type:"modes"})},readOnly:!0}];for(var h=1;h<9;h++)p.commands.push({name:"foldToLevel"+h,description:"Fold To Level "+h,level:h,exec:function(i){i.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(g,p,se){var E=g("../lib/keys"),S=g("../mouse/default_gutter_handler").GutterTooltip,_=function(){function h(i){this.editor=i,this.gutterLayer=i.renderer.$gutterLayer,this.element=i.renderer.$gutter,this.lines=i.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new S(this.editor)}return h.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},h.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},h.prototype.$onGutterKeyDown=function(i){if(this.annotationTooltip.isOpen){i.preventDefault(),i.keyCode===E.escape&&this.annotationTooltip.hideTooltip();return}if(i.target===this.element){if(i.keyCode!=E.enter)return;i.preventDefault();var r=this.editor.getCursorPosition().row;this.editor.isRowVisible(r)||this.editor.scrollToLine(r,!0,!0),setTimeout((function(){var o=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),t=this.$findNearestFoldLaneWidget(o),e=this.$findNearestAnnotation(o);if(!(t===null&&e===null)){var n=this.$findClosestNumber(t,e,o);if(n===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(i),setTimeout((function(){this.editor._signal("gutterkeydown",new a(i,this))}).bind(this),10)},h.prototype.$handleGutterKeyboardInteraction=function(i){if(i.keyCode===E.tab){i.preventDefault();return}if(i.keyCode===E.escape){i.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(i.keyCode===E.up){switch(i.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(i.keyCode===E.down){switch(i.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(i.keyCode===E.left){i.preventDefault(),this.$switchLane("annotation");return}if(i.keyCode===E.right){i.preventDefault(),this.$switchLane("fold");return}if(i.keyCode===E.enter||i.keyCode===E.space){switch(i.preventDefault(),this.activeLane){case"fold":var r=this.$rowIndexToRow(this.activeRowIndex),o=this.editor.session.$gutterCustomWidgets[r];if(o)o.callbacks&&o.callbacks.onClick&&o.callbacks.onClick(i,r);else if(this.gutterLayer.session.foldWidgets[r]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),i),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==r&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(r),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(),n=this.annotationTooltip.getElement().style;n.left=e.right+"px",n.top=e.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},h.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},h.prototype.$isFoldWidgetVisible=function(i){var r=this.editor.isRowFullyVisible(this.$rowIndexToRow(i)),o=this.$getFoldWidget(i).style.display!=="none";return r&&o},h.prototype.$isCustomWidgetVisible=function(i){var r=this.editor.isRowFullyVisible(this.$rowIndexToRow(i)),o=!!this.$getCustomWidget(i);return r&&o},h.prototype.$isAnnotationVisible=function(i){var r=this.editor.isRowFullyVisible(this.$rowIndexToRow(i)),o=this.$getAnnotation(i).style.display!=="none";return r&&o},h.prototype.$getFoldWidget=function(i){var r=this.lines.get(i),o=r.element;return o.childNodes[1]},h.prototype.$getCustomWidget=function(i){var r=this.lines.get(i),o=r.element;return o.childNodes[3]},h.prototype.$getAnnotation=function(i){var r=this.lines.get(i),o=r.element;return o.childNodes[2]},h.prototype.$findNearestFoldLaneWidget=function(i){if(this.$isCustomWidgetVisible(i)||this.$isFoldWidgetVisible(i))return i;for(var r=0;i-r>0||i+r<this.lines.getLength()-1;){if(r++,i-r>=0&&this.$isCustomWidgetVisible(i-r))return i-r;if(i+r<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(i+r))return i+r;if(i-r>=0&&this.$isFoldWidgetVisible(i-r))return i-r;if(i+r<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(i+r))return i+r}return null},h.prototype.$findNearestAnnotation=function(i){if(this.$isAnnotationVisible(i))return i;for(var r=0;i-r>0||i+r<this.lines.getLength()-1;){if(r++,i-r>=0&&this.$isAnnotationVisible(i-r))return i-r;if(i+r<=this.lines.getLength()-1&&this.$isAnnotationVisible(i+r))return i+r}return null},h.prototype.$focusFoldWidget=function(i){if(i!=null){var r=this.$getFoldWidget(i);r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus()}},h.prototype.$focusCustomWidget=function(i){if(i!=null){var r=this.$getCustomWidget(i);r&&(r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus())}},h.prototype.$focusAnnotation=function(i){if(i!=null){var r=this.$getAnnotation(i);r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus()}},h.prototype.$blurFoldWidget=function(i){var r=this.$getFoldWidget(i);r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.blur()},h.prototype.$blurCustomWidget=function(i){var r=this.$getCustomWidget(i);r&&(r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.blur())},h.prototype.$blurAnnotation=function(i){var r=this.$getAnnotation(i);r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.blur()},h.prototype.$moveFoldWidgetUp=function(){for(var i=this.activeRowIndex;i>0;)if(i--,this.$isFoldWidgetVisible(i)||this.$isCustomWidgetVisible(i)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=i,this.$isFoldWidgetVisible(i)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},h.prototype.$moveFoldWidgetDown=function(){for(var i=this.activeRowIndex;i<this.lines.getLength()-1;)if(i++,this.$isFoldWidgetVisible(i)||this.$isCustomWidgetVisible(i)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=i,this.$isFoldWidgetVisible(i)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},h.prototype.$moveAnnotationUp=function(){for(var i=this.activeRowIndex;i>0;)if(i--,this.$isAnnotationVisible(i)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=i,this.$focusAnnotation(this.activeRowIndex);return}},h.prototype.$moveAnnotationDown=function(){for(var i=this.activeRowIndex;i<this.lines.getLength()-1;)if(i++,this.$isAnnotationVisible(i)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=i,this.$focusAnnotation(this.activeRowIndex);return}},h.prototype.$findClosestNumber=function(i,r,o){return i===null?r:r===null||Math.abs(o-i)<=Math.abs(o-r)?i:r},h.prototype.$switchLane=function(i){switch(i){case"annotation":if(this.activeLane==="annotation")break;var r=this.$findNearestAnnotation(this.activeRowIndex);if(r==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=r,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var o=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(o===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=o,this.$isCustomWidgetVisible(o)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},h.prototype.$rowIndexToRow=function(i){var r=this.lines.get(i);return r?r.row:null},h.prototype.$rowToRowIndex=function(i){for(var r=0;r<this.lines.getLength();r++){var o=this.lines.get(r);if(o.row==i)return r}return null},h}();p.GutterKeyboardHandler=_;var a=function(){function h(i,r){this.gutterKeyboardHandler=r,this.domEvent=i}return h.prototype.getKey=function(){return E.keyCodeToString(this.domEvent.keyCode)},h.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},h.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},h.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},h}();p.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(g,p,se){var E=this&&this.__values||function(y){var v=typeof Symbol=="function"&&Symbol.iterator,D=v&&y[v],Ee=0;if(D)return D.call(y);if(y&&typeof y.length=="number")return{next:function(){return y&&Ee>=y.length&&(y=void 0),{value:y&&y[Ee++],done:!y}}};throw new TypeError(v?"Object is not iterable.":"Symbol.iterator is not defined.")},S=g("./lib/oop"),_=g("./lib/dom"),a=g("./lib/lang"),h=g("./lib/useragent"),i=g("./keyboard/textinput").TextInput,r=g("./mouse/mouse_handler").MouseHandler,o=g("./mouse/fold_handler").FoldHandler,t=g("./keyboard/keybinding").KeyBinding,e=g("./edit_session").EditSession,n=g("./search").Search,s=g("./range").Range,f=g("./lib/event_emitter").EventEmitter,m=g("./commands/command_manager").CommandManager,x=g("./commands/default_commands").commands,A=g("./config"),C=g("./token_iterator").TokenIterator,b=g("./keyboard/gutter_handler").GutterKeyboardHandler,G=g("./config").nls,Se=g("./clipboard"),q=g("./lib/keys"),U=g("./lib/event"),at=g("./tooltip").HoverTooltip,j=function(){function y(v,D,Ee){this.session,this.$toDestroy=[];var qe=v.getContainerElement();this.container=qe,this.renderer=v,this.id="editor"+ ++y.$uid,this.commands=new m(h.isMac?"mac":"win",x),typeof document=="object"&&(this.textInput=new i(v.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new r(this),new o(this)),this.keyBinding=new t(this),this.$search=new n().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(ot,lt){lt._$emitInputEvent.schedule(31)}),this.setSession(D||Ee&&Ee.session||new e("")),A.resetOptions(this),Ee&&this.setOptions(Ee),A._signal("editor",this)}return y.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},y.prototype.startOperation=function(v){this.session.startOperation(v)},y.prototype.endOperation=function(v){this.session.endOperation(v)},y.prototype.onStartOperation=function(v){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,v||(this.previousCommand=null)},y.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 D=this.curOp.command,Ee=D&&D.scrollIntoView;if(Ee){switch(Ee){case"center-animate":Ee="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var qe=this.selection.getRange(),ot=this.renderer.layerConfig;(qe.start.row>=ot.lastRow||qe.end.row<=ot.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}Ee=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},y.prototype.$historyTracker=function(v){if(this.$mergeUndoDeltas){var D=this.prevOp,Ee=this.$mergeableCommands,qe=D.command&&v.command.name==D.command.name;if(v.command.name=="insertstring"){var ot=v.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),qe=qe&&this.mergeNextCommand&&(!/\s/.test(ot)||/\s/.test(D.args)),this.mergeNextCommand=!0}else qe=qe&&Ee.indexOf(v.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(qe=!1),qe?this.session.mergeUndoDeltas=!0:Ee.indexOf(v.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},y.prototype.setKeyboardHandler=function(v,D){if(v&&typeof v=="string"&&v!="ace"){this.$keybindingId=v;var Ee=this;A.loadModule(["keybinding",v],function(qe){Ee.$keybindingId==v&&Ee.keyBinding.setKeyboardHandler(qe&&qe.handler),D&&D()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(v),D&&D()},y.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},y.prototype.setSession=function(v){if(this.session!=v){this.curOp&&this.endOperation(),this.curOp={};var D=this.session;if(D){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 Ee=this.session.getSelection();Ee.off("changeCursor",this.$onCursorChange),Ee.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:D}),this.curOp=null,D&&D._signal("changeEditor",{oldEditor:this}),D&&(D.$editor=null),v&&v._signal("changeEditor",{editor:this}),v&&(v.$editor=this),v&&!v.destroyed&&v.bgTokenizer.scheduleStart()}},y.prototype.getSession=function(){return this.session},y.prototype.setValue=function(v,D){return this.session.doc.setValue(v),D?D==1?this.navigateFileEnd():D==-1&&this.navigateFileStart():this.selectAll(),v},y.prototype.getValue=function(){return this.session.getValue()},y.prototype.getSelection=function(){return this.selection},y.prototype.resize=function(v){this.renderer.onResize(v)},y.prototype.setTheme=function(v,D){this.renderer.setTheme(v,D)},y.prototype.getTheme=function(){return this.renderer.getTheme()},y.prototype.setStyle=function(v){this.renderer.setStyle(v)},y.prototype.unsetStyle=function(v){this.renderer.unsetStyle(v)},y.prototype.getFontSize=function(){return this.getOption("fontSize")||_.computedStyle(this.container).fontSize},y.prototype.setFontSize=function(v){this.setOption("fontSize",v)},y.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var v=this;this.$highlightPending=!0,setTimeout(function(){v.$highlightPending=!1;var D=v.session;if(!(!D||D.destroyed)){D.$bracketHighlight&&(D.$bracketHighlight.markerIds.forEach(function(Ht){D.removeMarker(Ht)}),D.$bracketHighlight=null);var Ee=v.getCursorPosition(),qe=v.getKeyboardHandler(),ot=qe&&qe.$getDirectionForHighlight&&qe.$getDirectionForHighlight(v),lt=D.getMatchingBracketRanges(Ee,ot);if(!lt){var ct=new C(D,Ee.row,Ee.column),Ut=ct.getCurrentToken();if(Ut&&/\b(?:tag-open|tag-name)/.test(Ut.type)){var Mt=D.getMatchingTags(Ee);Mt&&(lt=[Mt.openTagName.isEmpty()?Mt.openTag:Mt.openTagName,Mt.closeTagName.isEmpty()?Mt.closeTag:Mt.closeTagName])}}if(!lt&&D.$mode.getMatching&&(lt=D.$mode.getMatching(v.session)),!lt){v.getHighlightIndentGuides()&&v.renderer.$textLayer.$highlightIndentGuide();return}var zt="ace_bracket";Array.isArray(lt)?lt.length==1&&(zt="ace_error_bracket"):lt=[lt],lt.length==2&&(s.comparePoints(lt[0].end,lt[1].start)==0?lt=[s.fromPoints(lt[0].start,lt[1].end)]:s.comparePoints(lt[0].start,lt[1].end)==0&&(lt=[s.fromPoints(lt[1].start,lt[0].end)])),D.$bracketHighlight={ranges:lt,markerIds:lt.map(function(Ht){return D.addMarker(Ht,zt,"text")})},v.getHighlightIndentGuides()&&v.renderer.$textLayer.$highlightIndentGuide()}},50)}},y.prototype.focus=function(){this.textInput.focus()},y.prototype.isFocused=function(){return this.textInput.isFocused()},y.prototype.blur=function(){this.textInput.blur()},y.prototype.onFocus=function(v){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",v))},y.prototype.onBlur=function(v){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",v))},y.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},y.prototype.onDocumentChange=function(v){var D=this.session.$useWrapMode,Ee=v.start.row==v.end.row?v.end.row:1/0;this.renderer.updateLines(v.start.row,Ee,D),this._signal("change",v),this.$cursorChange()},y.prototype.onTokenizerUpdate=function(v){var D=v.data;this.renderer.updateLines(D.first,D.last)},y.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},y.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},y.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},y.prototype.$updateHighlightActiveLine=function(){var v=this.getSession(),D;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(D=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(D=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(D=!1)),v.$highlightLineMarker&&!D)v.removeMarker(v.$highlightLineMarker.id),v.$highlightLineMarker=null;else if(!v.$highlightLineMarker&&D){var Ee=new s(D.row,D.column,D.row,1/0);Ee.id=v.addMarker(Ee,"ace_active-line","screenLine"),v.$highlightLineMarker=Ee}else D&&(v.$highlightLineMarker.start.row=D.row,v.$highlightLineMarker.end.row=D.row,v.$highlightLineMarker.start.column=D.column,v._signal("changeBackMarker"))},y.prototype.onSelectionChange=function(v){var D=this.session;if(D.$selectionMarker&&D.removeMarker(D.$selectionMarker),D.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var Ee=this.selection.getRange(),qe=this.getSelectionStyle();D.$selectionMarker=D.addMarker(Ee,"ace_selection",qe)}var ot=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(ot),this._signal("changeSelection")},y.prototype.$getSelectionHighLightRegexp=function(){var v=this.session,D=this.getSelectionRange();if(!(D.isEmpty()||D.isMultiLine())){var Ee=D.start.column,qe=D.end.column,ot=v.getLine(D.start.row),lt=ot.substring(Ee,qe);if(!(lt.length>5e3||!/[\w\d]/.test(lt))){var ct=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:lt}),Ut=ot.substring(Ee-1,qe+1);if(ct.test(Ut))return ct}}},y.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},y.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},y.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},y.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},y.prototype.onChangeMode=function(v){this.renderer.updateText(),this._emit("changeMode",v)},y.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},y.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},y.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},y.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},y.prototype.getCopyText=function(){var v=this.getSelectedText(),D=this.session.doc.getNewLineCharacter(),Ee=!1;if(!v&&this.$copyWithEmptySelection){Ee=!0;for(var qe=this.selection.getAllRanges(),ot=0;ot<qe.length;ot++){var lt=qe[ot];ot&&qe[ot-1].start.row==lt.start.row||(v+=this.session.getLine(lt.start.row)+D)}}var ct={text:v};return this._signal("copy",ct),Se.lineMode=Ee?ct.text:!1,ct.text},y.prototype.onCopy=function(){this.commands.exec("copy",this)},y.prototype.onCut=function(){this.commands.exec("cut",this)},y.prototype.onPaste=function(v,D){var Ee={text:v,event:D};this.commands.exec("paste",this,Ee)},y.prototype.$handlePaste=function(v){typeof v=="string"&&(v={text:v}),this._signal("paste",v);var D=v.text,Ee=D===Se.lineMode,qe=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)Ee?qe.insert({row:this.selection.lead.row,column:0},D):this.insert(D);else if(Ee)this.selection.rangeList.ranges.forEach(function(zt){qe.insert({row:zt.start.row,column:0},D)});else{var ot=D.split(/\r\n|\r|\n/),lt=this.selection.rangeList.ranges,ct=ot.length==2&&(!ot[0]||!ot[1]);if(ot.length!=lt.length||ct)return this.commands.exec("insertstring",this,D);for(var Ut=lt.length;Ut--;){var Mt=lt[Ut];Mt.isEmpty()||qe.remove(Mt),qe.insert(Mt.start,ot[Ut])}}},y.prototype.execCommand=function(v,D){return this.commands.exec(v,this,D)},y.prototype.insert=function(v,D){var Ee=this.session,qe=Ee.getMode(),ot=this.getCursorPosition();if(this.getBehavioursEnabled()&&!D){var lt=qe.transformAction(Ee.getState(ot.row),"insertion",this,Ee,v);lt&&(v!==lt.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),v=lt.text)}if(v==" "&&(v=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&v.indexOf(`
|
213
|
+
`)==-1){var ct=s.fromPoints(ot,ot);ct.end.column+=v.length,this.session.remove(ct)}}else{var ct=this.getSelectionRange();ot=this.session.remove(ct),this.clearSelection()}if(v==`
|
214
|
+
`||v==`\r
|
215
|
+
`){var Ht=Ee.getLine(ot.row);if(ot.column>Ht.search(/\S|$/)){var Ut=Ht.substr(ot.column).search(/\S|$/);Ee.doc.removeInLine(ot.row,ot.column,ot.column+Ut)}}this.clearSelection();var Mt=ot.column,zt=Ee.getState(ot.row),Ht=Ee.getLine(ot.row),Vt=qe.checkOutdent(zt,Ht,v);if(Ee.insert(ot,v),lt&<.selection&&(lt.selection.length==2?this.selection.setSelectionRange(new s(ot.row,Mt+lt.selection[0],ot.row,Mt+lt.selection[1])):this.selection.setSelectionRange(new s(ot.row+lt.selection[0],lt.selection[1],ot.row+lt.selection[2],lt.selection[3]))),this.$enableAutoIndent){if(Ee.getDocument().isNewLine(v)){var hi=qe.getNextLineIndent(zt,Ht.slice(0,ot.column),Ee.getTabString());Ee.insert({row:ot.row+1,column:0},hi)}Vt&&qe.autoOutdent(zt,Ee,ot.row)}},y.prototype.autoIndent=function(){for(var v=this.session,D=v.getMode(),Ee=this.selection.isEmpty()?[new s(0,0,v.doc.getLength()-1,0)]:this.selection.getAllRanges(),qe="",ot="",lt="",ct=v.getTabString(),Ut=0;Ut<Ee.length;Ut++)for(var Mt=Ee[Ut].start.row,zt=Ee[Ut].end.row,Ht=Mt;Ht<=zt;Ht++){Ht>0&&(qe=v.getState(Ht-1),ot=v.getLine(Ht-1),lt=D.getNextLineIndent(qe,ot,ct));var Vt=v.getLine(Ht),hi=D.$getIndent(Vt);if(lt!==hi){if(hi.length>0){var ui=new s(Ht,0,Ht,hi.length);v.remove(ui)}lt.length>0&&v.insert({row:Ht,column:0},lt)}D.autoOutdent(qe,v,Ht)}},y.prototype.onTextInput=function(v,D){if(!D)return this.keyBinding.onTextInput(v);this.startOperation({command:{name:"insertstring"}});var Ee=this.applyComposition.bind(this,v,D);this.selection.rangeCount?this.forEachSelection(Ee):Ee(),this.endOperation()},y.prototype.applyComposition=function(v,D){if(D.extendLeft||D.extendRight){var Ee=this.selection.getRange();Ee.start.column-=D.extendLeft,Ee.end.column+=D.extendRight,Ee.start.column<0&&(Ee.start.row--,Ee.start.column+=this.session.getLine(Ee.start.row).length+1),this.selection.setRange(Ee),!v&&!Ee.isEmpty()&&this.remove()}if((v||!this.selection.isEmpty())&&this.insert(v,!0),D.restoreStart||D.restoreEnd){var Ee=this.selection.getRange();Ee.start.column-=D.restoreStart,Ee.end.column-=D.restoreEnd,this.selection.setRange(Ee)}},y.prototype.onCommandKey=function(v,D,Ee){return this.keyBinding.onCommandKey(v,D,Ee)},y.prototype.setOverwrite=function(v){this.session.setOverwrite(v)},y.prototype.getOverwrite=function(){return this.session.getOverwrite()},y.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},y.prototype.setScrollSpeed=function(v){this.setOption("scrollSpeed",v)},y.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},y.prototype.setDragDelay=function(v){this.setOption("dragDelay",v)},y.prototype.getDragDelay=function(){return this.getOption("dragDelay")},y.prototype.setSelectionStyle=function(v){this.setOption("selectionStyle",v)},y.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},y.prototype.setHighlightActiveLine=function(v){this.setOption("highlightActiveLine",v)},y.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},y.prototype.setHighlightGutterLine=function(v){this.setOption("highlightGutterLine",v)},y.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},y.prototype.setHighlightSelectedWord=function(v){this.setOption("highlightSelectedWord",v)},y.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},y.prototype.setAnimatedScroll=function(v){this.renderer.setAnimatedScroll(v)},y.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},y.prototype.setShowInvisibles=function(v){this.renderer.setShowInvisibles(v)},y.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},y.prototype.setDisplayIndentGuides=function(v){this.renderer.setDisplayIndentGuides(v)},y.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},y.prototype.setHighlightIndentGuides=function(v){this.renderer.setHighlightIndentGuides(v)},y.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},y.prototype.setShowPrintMargin=function(v){this.renderer.setShowPrintMargin(v)},y.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},y.prototype.setPrintMarginColumn=function(v){this.renderer.setPrintMarginColumn(v)},y.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},y.prototype.setReadOnly=function(v){this.setOption("readOnly",v)},y.prototype.getReadOnly=function(){return this.getOption("readOnly")},y.prototype.setBehavioursEnabled=function(v){this.setOption("behavioursEnabled",v)},y.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},y.prototype.setWrapBehavioursEnabled=function(v){this.setOption("wrapBehavioursEnabled",v)},y.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},y.prototype.setShowFoldWidgets=function(v){this.setOption("showFoldWidgets",v)},y.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},y.prototype.setFadeFoldWidgets=function(v){this.setOption("fadeFoldWidgets",v)},y.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},y.prototype.remove=function(v){this.selection.isEmpty()&&(v=="left"?this.selection.selectLeft():this.selection.selectRight());var D=this.getSelectionRange();if(this.getBehavioursEnabled()){var Ee=this.session,qe=Ee.getState(D.start.row),ot=Ee.getMode().transformAction(qe,"deletion",this,Ee,D);if(D.end.column===0){var lt=Ee.getTextRange(D);if(lt[lt.length-1]==`
|
216
|
+
`){var ct=Ee.getLine(D.end.row);/^\s+$/.test(ct)&&(D.end.column=ct.length)}}ot&&(D=ot)}this.session.remove(D),this.clearSelection()},y.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},y.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},y.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},y.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()},y.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var v=this.getCursorPosition();this.insert(`
|
217
|
+
`),this.moveCursorToPosition(v)},y.prototype.setGhostText=function(v,D){this.renderer.setGhostText(v,D)},y.prototype.removeGhostText=function(){this.renderer.removeGhostText()},y.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var v=this.getCursorPosition(),D=v.column;if(D!==0){var Ee=this.session.getLine(v.row),qe,ot;D<Ee.length?(qe=Ee.charAt(D)+Ee.charAt(D-1),ot=new s(v.row,D-1,v.row,D+1)):(qe=Ee.charAt(D-1)+Ee.charAt(D-2),ot=new s(v.row,D-2,v.row,D)),this.session.replace(ot,qe),this.session.selection.moveToPosition(ot.end)}}},y.prototype.toLowerCase=function(){var v=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var D=this.getSelectionRange(),Ee=this.session.getTextRange(D);this.session.replace(D,Ee.toLowerCase()),this.selection.setSelectionRange(v)},y.prototype.toUpperCase=function(){var v=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var D=this.getSelectionRange(),Ee=this.session.getTextRange(D);this.session.replace(D,Ee.toUpperCase()),this.selection.setSelectionRange(v)},y.prototype.indent=function(){var v=this.session,D=this.getSelectionRange();if(D.start.row<D.end.row){var Ee=this.$getSelectedRows();v.indentRows(Ee.first,Ee.last," ");return}else if(D.start.column<D.end.column){var qe=v.getTextRange(D);if(!/^\s+$/.test(qe)){var Ee=this.$getSelectedRows();v.indentRows(Ee.first,Ee.last," ");return}}var ot=v.getLine(D.start.row),lt=D.start,ct=v.getTabSize(),Ut=v.documentToScreenColumn(lt.row,lt.column);if(this.session.getUseSoftTabs())var Mt=ct-Ut%ct,zt=a.stringRepeat(" ",Mt);else{for(var Mt=Ut%ct;ot[D.start.column-1]==" "&&Mt;)D.start.column--,Mt--;this.selection.setSelectionRange(D),zt=" "}return this.insert(zt)},y.prototype.blockIndent=function(){var v=this.$getSelectedRows();this.session.indentRows(v.first,v.last," ")},y.prototype.blockOutdent=function(){var v=this.session.getSelection();this.session.outdentRows(v.getRange())},y.prototype.sortLines=function(){for(var v=this.$getSelectedRows(),D=this.session,Ee=[],qe=v.first;qe<=v.last;qe++)Ee.push(D.getLine(qe));Ee.sort(function(ct,Ut){return ct.toLowerCase()<Ut.toLowerCase()?-1:ct.toLowerCase()>Ut.toLowerCase()?1:0});for(var ot=new s(0,0,0,0),qe=v.first;qe<=v.last;qe++){var lt=D.getLine(qe);ot.start.row=qe,ot.end.row=qe,ot.end.column=lt.length,D.replace(ot,Ee[qe-v.first])}},y.prototype.toggleCommentLines=function(){var v=this.session.getState(this.getCursorPosition().row),D=this.$getSelectedRows();this.session.getMode().toggleCommentLines(v,this.session,D.first,D.last)},y.prototype.toggleBlockComment=function(){var v=this.getCursorPosition(),D=this.session.getState(v.row),Ee=this.getSelectionRange();this.session.getMode().toggleBlockComment(D,this.session,Ee,v)},y.prototype.getNumberAt=function(v,D){var Ee=/[\-]?[0-9]+(?:\.[0-9]+)?/g;Ee.lastIndex=0;for(var qe=this.session.getLine(v);Ee.lastIndex<D;){var ot=Ee.exec(qe);if(ot.index<=D&&ot.index+ot[0].length>=D){var lt={value:ot[0],start:ot.index,end:ot.index+ot[0].length};return lt}}return null},y.prototype.modifyNumber=function(v){var D=this.selection.getCursor().row,Ee=this.selection.getCursor().column,qe=new s(D,Ee-1,D,Ee),ot=this.session.getTextRange(qe);if(!isNaN(parseFloat(ot))&&isFinite(ot)){var lt=this.getNumberAt(D,Ee);if(lt){var ct=lt.value.indexOf(".")>=0?lt.start+lt.value.indexOf(".")+1:lt.end,Ut=lt.start+lt.value.length-ct,Mt=parseFloat(lt.value);Mt*=Math.pow(10,Ut),ct!==lt.end&&Ee<ct?v*=Math.pow(10,lt.end-Ee-1):v*=Math.pow(10,lt.end-Ee),Mt+=v,Mt/=Math.pow(10,Ut);var zt=Mt.toFixed(Ut),Ht=new s(D,lt.start,D,lt.end);this.session.replace(Ht,zt),this.moveCursorTo(D,Math.max(lt.start+1,Ee+zt.length-lt.value.length))}}else this.toggleWord()},y.prototype.toggleWord=function(){var v=this.selection.getCursor().row,D=this.selection.getCursor().column;this.selection.selectWord();var Ee=this.getSelectedText(),qe=this.selection.getWordRange().start.column,ot=Ee.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),lt=D-qe-1;lt<0&&(lt=0);var ct=0,Ut=0,Mt=this;Ee.match(/[A-Za-z0-9_]+/)&&ot.forEach(function(wi,_i){Ut=ct+wi.length,lt>=ct&<<=Ut&&(Ee=wi,Mt.selection.clearSelection(),Mt.moveCursorTo(v,ct+qe),Mt.selection.selectTo(v,Ut+qe)),ct=Ut});for(var zt=this.$toggleWordPairs,Ht,Vt=0;Vt<zt.length;Vt++)for(var hi=zt[Vt],ui=0;ui<=1;ui++){var fi=+!ui,di=Ee.match(new RegExp("^\\s?_?("+a.escapeRegExp(hi[ui])+")\\s?$","i"));if(di){var vi=Ee.match(new RegExp("([_]|^|\\s)("+a.escapeRegExp(di[1])+")($|\\s)","g"));vi&&(Ht=Ee.replace(new RegExp(a.escapeRegExp(hi[ui]),"i"),function(wi){var _i=hi[fi];return wi.toUpperCase()==wi?_i=_i.toUpperCase():wi.charAt(0).toUpperCase()==wi.charAt(0)&&(_i=_i.substr(0,0)+hi[fi].charAt(0).toUpperCase()+_i.substr(1)),_i}),this.insert(Ht),Ht="")}}},y.prototype.findLinkAt=function(v,D){var Ee,qe,ot=this.session.getLine(v),lt=ot.split(/((?:https?|ftp):\/\/[\S]+)/),ct=D;ct<0&&(ct=0);var Ut=0,Mt=0,zt;try{for(var Ht=E(lt),Vt=Ht.next();!Vt.done;Vt=Ht.next()){var hi=Vt.value;if(Mt=Ut+hi.length,ct>=Ut&&ct<=Mt&&hi.match(/((?:https?|ftp):\/\/[\S]+)/)){zt=hi.replace(/[\s:.,'";}\]]+$/,"");break}Ut=Mt}}catch(ui){Ee={error:ui}}finally{try{Vt&&!Vt.done&&(qe=Ht.return)&&qe.call(Ht)}finally{if(Ee)throw Ee.error}}return zt},y.prototype.openLink=function(){var v=this.selection.getCursor(),D=this.findLinkAt(v.row,v.column);return D&&window.open(D,"_blank"),D!=null},y.prototype.removeLines=function(){var v=this.$getSelectedRows();this.session.removeFullLines(v.first,v.last),this.clearSelection()},y.prototype.duplicateSelection=function(){var v=this.selection,D=this.session,Ee=v.getRange(),qe=v.isBackwards();if(Ee.isEmpty()){var ot=Ee.start.row;D.duplicateLines(ot,ot)}else{var lt=qe?Ee.start:Ee.end,ct=D.insert(lt,D.getTextRange(Ee));Ee.start=lt,Ee.end=ct,v.setSelectionRange(Ee,qe)}},y.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},y.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},y.prototype.moveText=function(v,D,Ee){return this.session.moveText(v,D,Ee)},y.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},y.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},y.prototype.$moveLines=function(v,D){var Ee,qe,ot=this.selection;if(!ot.inMultiSelectMode||this.inVirtualSelectionMode){var lt=ot.toOrientedRange();Ee=this.$getSelectedRows(lt),qe=this.session.$moveLines(Ee.first,Ee.last,D?0:v),D&&v==-1&&(qe=0),lt.moveBy(qe,0),ot.fromOrientedRange(lt)}else{var ct=ot.rangeList.ranges;ot.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var Ut=0,Mt=0,zt=ct.length,Ht=0;Ht<zt;Ht++){var Vt=Ht;ct[Ht].moveBy(Ut,0),Ee=this.$getSelectedRows(ct[Ht]);for(var hi=Ee.first,ui=Ee.last;++Ht<zt;){Mt&&ct[Ht].moveBy(Mt,0);var fi=this.$getSelectedRows(ct[Ht]);if(D&&fi.first!=ui)break;if(!D&&fi.first>ui+1)break;ui=fi.last}for(Ht--,Ut=this.session.$moveLines(hi,ui,D?0:v),D&&v==-1&&(Vt=Ht+1);Vt<=Ht;)ct[Vt].moveBy(Ut,0),Vt++;D||(Ut=0),Mt+=Ut}ot.fromOrientedRange(ot.ranges[0]),ot.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},y.prototype.$getSelectedRows=function(v){return v=(v||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(v.start.row),last:this.session.getRowFoldEnd(v.end.row)}},y.prototype.onCompositionStart=function(v){this.renderer.showComposition(v)},y.prototype.onCompositionUpdate=function(v){this.renderer.setCompositionText(v)},y.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},y.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},y.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},y.prototype.isRowVisible=function(v){return v>=this.getFirstVisibleRow()&&v<=this.getLastVisibleRow()},y.prototype.isRowFullyVisible=function(v){return v>=this.renderer.getFirstFullyVisibleRow()&&v<=this.renderer.getLastFullyVisibleRow()},y.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},y.prototype.$moveByPage=function(v,D){var Ee=this.renderer,qe=this.renderer.layerConfig,ot=v*Math.floor(qe.height/qe.lineHeight);D===!0?this.selection.$moveSelection(function(){this.moveCursorBy(ot,0)}):D===!1&&(this.selection.moveCursorBy(ot,0),this.selection.clearSelection());var lt=Ee.scrollTop;Ee.scrollBy(0,ot*qe.lineHeight),D!=null&&Ee.scrollCursorIntoView(null,.5),Ee.animateScrolling(lt)},y.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},y.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},y.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},y.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},y.prototype.scrollPageDown=function(){this.$moveByPage(1)},y.prototype.scrollPageUp=function(){this.$moveByPage(-1)},y.prototype.scrollToRow=function(v){this.renderer.scrollToRow(v)},y.prototype.scrollToLine=function(v,D,Ee,qe){this.renderer.scrollToLine(v,D,Ee,qe)},y.prototype.centerSelection=function(){var v=this.getSelectionRange(),D={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(D,.5)},y.prototype.getCursorPosition=function(){return this.selection.getCursor()},y.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},y.prototype.getSelectionRange=function(){return this.selection.getRange()},y.prototype.selectAll=function(){this.selection.selectAll()},y.prototype.clearSelection=function(){this.selection.clearSelection()},y.prototype.moveCursorTo=function(v,D){this.selection.moveCursorTo(v,D)},y.prototype.moveCursorToPosition=function(v){this.selection.moveCursorToPosition(v)},y.prototype.jumpToMatching=function(v,D){var Ee=this.getCursorPosition(),qe=new C(this.session,Ee.row,Ee.column),ot=qe.getCurrentToken(),lt=0;ot&&ot.type.indexOf("tag-name")!==-1&&(ot=qe.stepBackward());var ct=ot||qe.stepForward();if(ct){var Ut,Mt=!1,zt={},Ht=Ee.column-ct.start,Vt,hi={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(ct.value.match(/[{}()\[\]]/g)){for(;Ht<ct.value.length&&!Mt;Ht++)if(hi[ct.value[Ht]])switch(Vt=hi[ct.value[Ht]]+"."+ct.type.replace("rparen","lparen"),isNaN(zt[Vt])&&(zt[Vt]=0),ct.value[Ht]){case"(":case"[":case"{":zt[Vt]++;break;case")":case"]":case"}":zt[Vt]--,zt[Vt]===-1&&(Ut="bracket",Mt=!0);break}}else ct.type.indexOf("tag-name")!==-1&&(isNaN(zt[ct.value])&&(zt[ct.value]=0),ot.value==="<"&<>1?zt[ct.value]++:ot.value==="</"&&zt[ct.value]--,zt[ct.value]===-1&&(Ut="tag",Mt=!0));Mt||(ot=ct,lt++,ct=qe.stepForward(),Ht=0)}while(ct&&!Mt);if(Ut){var ui,fi;if(Ut==="bracket")ui=this.session.getBracketRange(Ee),ui||(ui=new s(qe.getCurrentTokenRow(),qe.getCurrentTokenColumn()+Ht-1,qe.getCurrentTokenRow(),qe.getCurrentTokenColumn()+Ht-1),fi=ui.start,(D||fi.row===Ee.row&&Math.abs(fi.column-Ee.column)<2)&&(ui=this.session.getBracketRange(fi)));else if(Ut==="tag"){if(!ct||ct.type.indexOf("tag-name")===-1)return;if(ui=new s(qe.getCurrentTokenRow(),qe.getCurrentTokenColumn()-2,qe.getCurrentTokenRow(),qe.getCurrentTokenColumn()-2),ui.compare(Ee.row,Ee.column)===0){var di=this.session.getMatchingTags(Ee);di&&(di.openTag.contains(Ee.row,Ee.column)?(ui=di.closeTag,fi=ui.start):(ui=di.openTag,di.closeTag.start.row===Ee.row&&di.closeTag.start.column===Ee.column?fi=ui.end:fi=ui.start))}fi=fi||ui.start}fi=ui&&ui.cursor||fi,fi&&(v?ui&&D?this.selection.setRange(ui):ui&&ui.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(fi.row,fi.column):this.selection.moveTo(fi.row,fi.column))}}},y.prototype.gotoLine=function(v,D,Ee){this.selection.clearSelection(),this.session.unfold({row:v-1,column:D||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(v-1,D||0),this.isRowFullyVisible(v-1)||this.scrollToLine(v-1,!0,Ee)},y.prototype.navigateTo=function(v,D){this.selection.moveTo(v,D)},y.prototype.navigateUp=function(v){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var D=this.selection.anchor.getPosition();return this.moveCursorToPosition(D)}this.selection.clearSelection(),this.selection.moveCursorBy(-v||-1,0)},y.prototype.navigateDown=function(v){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var D=this.selection.anchor.getPosition();return this.moveCursorToPosition(D)}this.selection.clearSelection(),this.selection.moveCursorBy(v||1,0)},y.prototype.navigateLeft=function(v){if(this.selection.isEmpty())for(v=v||1;v--;)this.selection.moveCursorLeft();else{var D=this.getSelectionRange().start;this.moveCursorToPosition(D)}this.clearSelection()},y.prototype.navigateRight=function(v){if(this.selection.isEmpty())for(v=v||1;v--;)this.selection.moveCursorRight();else{var D=this.getSelectionRange().end;this.moveCursorToPosition(D)}this.clearSelection()},y.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},y.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},y.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},y.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},y.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},y.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},y.prototype.replace=function(v,D){D&&this.$search.set(D);var Ee=this.$search.find(this.session),qe=0;return Ee&&(this.$tryReplace(Ee,v)&&(qe=1),this.selection.setSelectionRange(Ee),this.renderer.scrollSelectionIntoView(Ee.start,Ee.end)),qe},y.prototype.replaceAll=function(v,D){D&&this.$search.set(D);var Ee=this.$search.findAll(this.session),qe=0;if(!Ee.length)return qe;var ot=this.getSelectionRange();this.selection.moveTo(0,0);for(var lt=Ee.length-1;lt>=0;--lt)this.$tryReplace(Ee[lt],v)&&qe++;return this.selection.setSelectionRange(ot),qe},y.prototype.$tryReplace=function(v,D){var Ee=this.session.getTextRange(v);return D=this.$search.replace(Ee,D),D!==null?(v.end=this.session.replace(v,D),v):null},y.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},y.prototype.find=function(v,D,Ee){D||(D={}),typeof v=="string"||v instanceof RegExp?D.needle=v:typeof v=="object"&&S.mixin(D,v);var qe=this.selection.getRange();D.needle==null&&(v=this.session.getTextRange(qe)||this.$search.$options.needle,v||(qe=this.session.getWordRange(qe.start.row,qe.start.column),v=this.session.getTextRange(qe)),this.$search.set({needle:v})),this.$search.set(D),D.start||this.$search.set({start:qe});var ot=this.$search.find(this.session);if(D.preventScroll)return ot;if(ot)return this.revealRange(ot,Ee),ot;D.backwards?qe.start=qe.end:qe.end=qe.start,this.selection.setRange(qe)},y.prototype.findNext=function(v,D){this.find({skipCurrent:!0,backwards:!1},v,D)},y.prototype.findPrevious=function(v,D){this.find(v,{skipCurrent:!0,backwards:!0},D)},y.prototype.revealRange=function(v,D){this.session.unfold(v),this.selection.setSelectionRange(v);var Ee=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(v.start,v.end,.5),D!==!1&&this.renderer.animateScrolling(Ee)},y.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},y.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},y.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(v){v.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},y.prototype.setAutoScrollEditorIntoView=function(v){if(v){var D,Ee=this,qe=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var ot=this.$scrollAnchor;ot.style.cssText="position:absolute",this.container.insertBefore(ot,this.container.firstChild);var lt=this.on("changeSelection",function(){qe=!0}),ct=this.renderer.on("beforeRender",function(){qe&&(D=Ee.renderer.container.getBoundingClientRect())}),Ut=this.renderer.on("afterRender",function(){if(qe&&D&&(Ee.isFocused()||Ee.searchBox&&Ee.searchBox.isFocused())){var Mt=Ee.renderer,zt=Mt.$cursorLayer.$pixelPos,Ht=Mt.layerConfig,Vt=zt.top-Ht.offset;zt.top>=0&&Vt+D.top<0?qe=!0:zt.top<Ht.height&&zt.top+D.top+Ht.lineHeight>window.innerHeight?qe=!1:qe=null,qe!=null&&(ot.style.top=Vt+"px",ot.style.left=zt.left+"px",ot.style.height=Ht.lineHeight+"px",ot.scrollIntoView(qe)),qe=D=null}});this.setAutoScrollEditorIntoView=function(Mt){Mt||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",lt),this.renderer.off("afterRender",Ut),this.renderer.off("beforeRender",ct))}}},y.prototype.$resetCursorStyle=function(){var v=this.$cursorStyle||"ace",D=this.renderer.$cursorLayer;D&&(D.setSmoothBlinking(/smooth/.test(v)),D.isBlinking=!this.$readOnly&&v!="wide",_.setCssClass(D.element,"ace_slim-cursors",/slim/.test(v)))},y.prototype.prompt=function(v,D,Ee){var qe=this;A.loadModule("ace/ext/prompt",function(ot){ot.prompt(qe,v,D,Ee)})},y}();j.$uid=0,j.prototype.curOp=null,j.prototype.prevOp={},j.prototype.$mergeableCommands=["backspace","del","insertstring"],j.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(j.prototype,f),A.defineOptions(j.prototype,"editor",{selectionStyle:{set:function(y){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:y})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(y){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(y){var v=this;this.textInput.setReadOnly(y),this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(Ee){var qe=!1;if(Ee&&Ee.type=="keydown"){if(qe=Ee&&Ee.key&&Ee.key.length==1&&!Ee.ctrlKey&&!Ee.metaKey,!qe)return}else Ee&&Ee.type!=="exec"&&(qe=!0);if(qe){v.hoverTooltip||(v.hoverTooltip=new at);var ot=_.createElement("div");ot.textContent=G("editor.tooltip.disable-editing","Editing is disabled"),v.hoverTooltip.isOpen||v.hoverTooltip.showForRange(v,v.getSelectionRange(),ot)}else v.hoverTooltip&&v.hoverTooltip.isOpen&&v.hoverTooltip.hide()});var D=this.textInput.getElement();y?(U.addListener(D,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(U.removeListener(D,"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(y){this.textInput.setCopyWithEmptySelection(y)},initialValue:!1},cursorStyle:{set:function(y){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(y){this.setAutoScrollEditorIntoView(y)}},keyboardHandler:{set:function(y){this.setKeyboardHandler(y)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(y){this.session.setValue(y)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(y){this.setSession(y)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(y){this.renderer.$gutterLayer.setShowLineNumbers(y),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),y&&this.$relativeLineNumbers?W.attach(this):W.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(y){this.$showLineNumbers&&y?W.attach(this):W.detach(this)}},placeholder:{set:function(y){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),_.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),_.addCssClass(this.container,"ace_hasPlaceholder");var D=_.createElement("div");D.className="ace_placeholder",D.textContent=this.$placeholder||"",this.renderer.placeholderNode=D,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(y){var v={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(qe){qe.blur(),qe.renderer.scroller.focus()},readOnly:!0},D=function(qe){if(qe.target==this.renderer.scroller&&qe.keyCode===q.enter){qe.preventDefault();var ot=this.getCursorPosition().row;this.isRowVisible(ot)||this.scrollToLine(ot,!0,!0),this.focus()}},Ee;y?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(h.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",G("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",G("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",D.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",G("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",G("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),Ee||(Ee=new b(this)),Ee.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",D.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),Ee&&Ee.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(y){this.$textInputAriaLabel=y},initialValue:""},enableMobileMenu:{set:function(y){this.$enableMobileMenu=y},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 W={getText:function(y,v){return(Math.abs(y.selection.lead.row-v)||v+1+(v<9?"·":""))+""},getWidth:function(y,v,D){return Math.max(v.toString().length,(D.lastRow+1).toString().length,2)*D.characterWidth},update:function(y,v){v.renderer.$loop.schedule(v.renderer.CHANGE_GUTTER)},attach:function(y){y.renderer.$gutterLayer.$renderer=this,y.on("changeSelection",this.update),this.update(null,y)},detach:function(y){y.renderer.$gutterLayer.$renderer==this&&(y.renderer.$gutterLayer.$renderer=null),y.off("changeSelection",this.update),this.update(null,y)}};p.Editor=j}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(g,p,se){var E=g("../lib/dom"),S=function(){function _(a,h){this.element=a,this.canvasHeight=h||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return _.prototype.moveContainer=function(a){E.translate(this.element,0,-(a.firstRowScreen*a.lineHeight%this.canvasHeight)-a.offset*this.$offsetCoefficient)},_.prototype.pageChanged=function(a,h){return Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)!==Math.floor(h.firstRowScreen*h.lineHeight/this.canvasHeight)},_.prototype.computeLineTop=function(a,h,i){var r=h.firstRowScreen*h.lineHeight,o=Math.floor(r/this.canvasHeight),t=i.documentToScreenRow(a,0)*h.lineHeight;return t-o*this.canvasHeight},_.prototype.computeLineHeight=function(a,h,i){return h.lineHeight*i.getRowLineCount(a)},_.prototype.getLength=function(){return this.cells.length},_.prototype.get=function(a){return this.cells[a]},_.prototype.shift=function(){this.$cacheCell(this.cells.shift())},_.prototype.pop=function(){this.$cacheCell(this.cells.pop())},_.prototype.push=function(a){if(Array.isArray(a)){this.cells.push.apply(this.cells,a);for(var h=E.createFragment(this.element),i=0;i<a.length;i++)h.appendChild(a[i].element);this.element.appendChild(h)}else this.cells.push(a),this.element.appendChild(a.element)},_.prototype.unshift=function(a){if(Array.isArray(a)){this.cells.unshift.apply(this.cells,a);for(var h=E.createFragment(this.element),i=0;i<a.length;i++)h.appendChild(a[i].element);this.element.firstChild?this.element.insertBefore(h,this.element.firstChild):this.element.appendChild(h)}else this.cells.unshift(a),this.element.insertAdjacentElement("afterbegin",a.element)},_.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},_.prototype.$cacheCell=function(a){a&&(a.element.remove(),this.cellCache.push(a))},_.prototype.createCell=function(a,h,i,r){var o=this.cellCache.pop();if(!o){var t=E.createElement("div");r&&r(t),this.element.appendChild(t),o={element:t,text:"",row:a}}return o.row=a,o},_}();p.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(g,p,se){var E=g("../lib/dom"),S=g("../lib/oop"),_=g("../lib/lang"),a=g("../lib/event_emitter").EventEmitter,h=g("./lines").Lines,i=g("../config").nls,r=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 h(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,n){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,n)},t.prototype.removeGutterDecoration=function(e,n){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,n)},t.prototype.setAnnotations=function(e){this.$annotations=[];for(var n=0;n<e.length;n++){var s=e[n],f=s.row,m=this.$annotations[f];m||(m=this.$annotations[f]={text:[],type:[],displayText:[]});var x=s.text,A=s.text,C=s.type;x=x?_.escapeHTML(x):s.html||"",A=A||s.html||"",m.text.indexOf(x)===-1&&(m.text.push(x),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 n=e.start.row,s=e.end.row-n;if(s!==0)if(e.action=="remove")this.$annotations.splice(n,s+1,null);else{var f=new Array(s+1);f.unshift(n,1),this.$annotations.splice.apply(this.$annotations,f)}}},t.prototype.update=function(e){this.config=e;var n=this.session,s=e.firstRow,f=Math.min(e.lastRow+e.gutterOffset,n.getLength()-1);this.oldLastRow=f,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var m=n.getNextFoldLine(s),x=m?m.start.row:1/0,A=null,C=-1,b=s;;){if(b>x&&(b=m.end.row+1,m=n.getNextFoldLine(b,m),x=m?m.start.row:1/0),b>f){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,o),this.$lines.push(A)),this.$renderCell(A,e,m,b),b++}this._signal("afterRender"),this.$updateGutterWidth(e)},t.prototype.$updateGutterWidth=function(e){var n=this.session,s=n.gutterRenderer||this.$renderer,f=n.$firstLineNumber,m=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||n.$useWrapMode)&&(m=n.getLength()+f-1);var x=s?s.getWidth(n,m,e):m.toString().length*e.characterWidth,A=this.$padding||this.$computePadding();x+=A.left+A.right,x!==this.gutterWidth&&!isNaN(x)&&(this.gutterWidth=x,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",x))},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 n=this.$lines.cells;this.$cursorCell=null;for(var s=0;s<n.length;s++){var f=n[s];if(f.row>=this.$cursorRow){if(f.row>this.$cursorRow){var m=this.session.getFoldLine(this.$cursorRow);if(s>0&&m&&m.start.row==n[s-1].row)f=n[s-1];else break}f.element.className="ace_gutter-active-line "+f.element.className,this.$cursorCell=f;break}}}}},t.prototype.scrollLines=function(e){var n=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(n,e))return this.update(e);this.$lines.moveContainer(e);var s=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),f=this.oldLastRow;if(this.oldLastRow=s,!n||f<e.firstRow)return this.update(e);if(s<n.firstRow)return this.update(e);if(n.firstRow<e.firstRow)for(var m=this.session.getFoldedRowCount(n.firstRow,e.firstRow-1);m>0;m--)this.$lines.shift();if(f>s)for(var m=this.session.getFoldedRowCount(s+1,f);m>0;m--)this.$lines.pop();e.firstRow<n.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,n.firstRow-1)),s>f&&this.$lines.push(this.$renderLines(e,f+1,s)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},t.prototype.$renderLines=function(e,n,s){for(var f=[],m=n,x=this.session.getNextFoldLine(m),A=x?x.start.row:1/0;m>A&&(m=x.end.row+1,x=this.session.getNextFoldLine(m,x),A=x?x.start.row:1/0),!(m>s);){var C=this.$lines.createCell(m,e,this.session,o);this.$renderCell(C,e,x,m),f.push(C),m++}return f},t.prototype.$renderCell=function(e,n,s,f){var m=e.element,x=this.session,A=m.childNodes[0],C=m.childNodes[1],b=m.childNodes[2],G=m.childNodes[3],Se=b.firstChild,q=x.$firstLineNumber,U=x.$breakpoints,at=x.$decorations,j=x.gutterRenderer||this.$renderer,W=this.$showFoldWidgets&&x.foldWidgets,y=s?s.start.row:Number.MAX_VALUE,v=n.lineHeight+"px",D=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",Ee=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",qe=(j?j.getText(x,f):f+q).toString();if(this.$highlightGutterLine&&(f==this.$cursorRow||s&&f<this.$cursorRow&&f>=y&&this.$cursorRow<=s.end.row)&&(D+="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)),U[f]&&(D+=U[f]),at[f]&&(D+=at[f]),this.$annotations[f]&&f!==y&&(D+=this.$annotations[f].className),W){var ot=W[f];ot==null&&(ot=W[f]=x.getFoldWidget(f))}if(ot){var lt="ace_fold-widget ace_"+ot,ct=ot=="start"&&f==y&&f<s.end.row;if(ct){lt+=" ace_closed";for(var Ut="",Mt=!1,zt=f+1;zt<=s.end.row;zt++)if(this.$annotations[zt]){if(this.$annotations[zt].className===" ace_error"){Mt=!0,Ut=" ace_error_fold";break}this.$annotations[zt].className===" ace_security"?(Mt=!0,Ut=" ace_security_fold"):this.$annotations[zt].className===" ace_warning"&&Ut!==" ace_security_fold"&&(Mt=!0,Ut=" ace_warning_fold")}D+=Ut}else lt+=" ace_open";C.className!=lt&&(C.className=lt),E.setStyle(C.style,"height",v),E.setStyle(C.style,"display","inline-block"),C.setAttribute("role","button"),C.setAttribute("tabindex","-1");var Ht=x.getFoldWidgetRange(f);Ht?C.setAttribute("aria-label",i("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[Ht.start.row+1,Ht.end.row+1])):s?C.setAttribute("aria-label",i("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",i("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[f+1])),ct?(C.setAttribute("aria-expanded","false"),C.setAttribute("title",i("gutter.code-folding.closed.title","Unfold code"))):(C.setAttribute("aria-expanded","true"),C.setAttribute("title",i("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 Vt=this.session.$gutterCustomWidgets[f];if(Vt?this.$addCustomWidget(f,Vt,e):G&&this.$removeCustomWidget(f,e),Mt&&this.$showFoldedAnnotations){b.className="ace_gutter_annotation",Se.className=Ee,Se.className+=Ut,E.setStyle(Se.style,"height",v),E.setStyle(b.style,"display","block"),E.setStyle(b.style,"height",v);var hi;switch(Ut){case" ace_error_fold":hi=i("gutter.annotation.aria-label.error","Error, read annotations row $0",[qe]);break;case" ace_security_fold":hi=i("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[qe]);break;case" ace_warning_fold":hi=i("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[qe]);break}b.setAttribute("aria-label",hi),b.setAttribute("tabindex","-1"),b.setAttribute("role","button")}else if(this.$annotations[f]){b.className="ace_gutter_annotation",Se.className=Ee,this.$useSvgGutterIcons?Se.className+=this.$annotations[f].className:m.classList.add(this.$annotations[f].className.replace(" ","")),E.setStyle(Se.style,"height",v),E.setStyle(b.style,"display","block"),E.setStyle(b.style,"height",v);var hi;switch(this.$annotations[f].className){case" ace_error":hi=i("gutter.annotation.aria-label.error","Error, read annotations row $0",[qe]);break;case" ace_security":hi=i("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[qe]);break;case" ace_warning":hi=i("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[qe]);break;case" ace_info":hi=i("gutter.annotation.aria-label.info","Info, read annotations row $0",[qe]);break;case" ace_hint":hi=i("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[qe]);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 qe!==A.data&&(A.data=qe),m.className!=D&&(m.className=D),E.setStyle(e.element.style,"height",this.$lines.computeLineHeight(f,n,x)+"px"),E.setStyle(e.element.style,"top",this.$lines.computeLineTop(f,n,x)+"px"),e.text=qe,b.style.display==="none"&&C.style.display==="none"&&!Vt?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,n){var s=n||this.$getGutterCell(e);if(s&&s.element){var f=s.element.childNodes[1];f&&E.setStyle(f.style,"display","none")}},t.prototype.$showFoldWidget=function(e,n){var s=n||this.$getGutterCell(e);if(s&&s.element){var f=s.element.childNodes[1];f&&this.session.foldWidgets&&this.session.foldWidgets[s.row]&&E.setStyle(f.style,"display","inline-block")}},t.prototype.$getGutterCell=function(e){var n=this.$lines.cells,s=this.session.documentToScreenRow(e,0);return n[e-this.config.firstRowScreen-(e-s)]},t.prototype.$addCustomWidget=function(e,n,s){var f=n.className,m=n.label,x=n.title,A=n.callbacks;this.session.$gutterCustomWidgets[e]={className:f,label:m,title:x,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(f),b.setAttribute("tabindex","-1"),b.setAttribute("role","button"),b.setAttribute("aria-label",m),b.setAttribute("title",x),E.setStyle(b.style,"display","inline-block"),E.setStyle(b.style,"height","inherit"),A&&A.onClick&&b.addEventListener("click",function(G){A.onClick(G,e),G.stopPropagation()}),C.element.appendChild(b)}},t.prototype.$removeCustomWidget=function(e,n){delete this.session.$gutterCustomWidgets[e],this.$showFoldWidget(e,n);var s=n||this.$getGutterCell(e);if(s&&s.element){var f=s.element.querySelector(".ace_custom-widget");f&&s.element.removeChild(f)}},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 n=this.$padding||this.$computePadding(),s=this.element.getBoundingClientRect();if(e.x<n.left+s.left)return"markers";if(this.$showFoldWidgets&&e.x>s.right-n.right)return"foldWidgets"},t}();r.prototype.$fixedWidth=!1,r.prototype.$highlightGutterLine=!0,r.prototype.$renderer="",r.prototype.$showLineNumbers=!0,r.prototype.$showFoldWidgets=!0,S.implement(r.prototype,a);function o(t){var e=document.createTextNode("");t.appendChild(e);var n=E.createElement("span");t.appendChild(n);var s=E.createElement("span");t.appendChild(s);var f=E.createElement("span");return s.appendChild(f),t}p.Gutter=r}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(g,p,se){var E=g("../range").Range,S=g("../lib/dom"),_=function(){function h(i){this.element=S.createElement("div"),this.element.className="ace_layer ace_marker-layer",i.appendChild(this.element)}return h.prototype.setPadding=function(i){this.$padding=i},h.prototype.setSession=function(i){this.session=i},h.prototype.setMarkers=function(i){this.markers=i},h.prototype.elt=function(i,r){var o=this.i!=-1&&this.element.childNodes[this.i];o?this.i++:(o=document.createElement("div"),this.element.appendChild(o),this.i=-1),o.style.cssText=r,o.className=i},h.prototype.update=function(i){if(i){this.config=i,this.i=0;var r;for(var o in this.markers){var t=this.markers[o];if(!t.range){t.update(r,this,this.session,i);continue}var e=t.range.clipRows(i.firstRow,i.lastRow);if(!e.isEmpty())if(e=e.toScreenRange(this.session),t.renderer){var n=this.$getTop(e.start.row,i),s=this.$padding+e.start.column*i.characterWidth;t.renderer(r,e,s,n,i)}else t.type=="fullLine"?this.drawFullLineMarker(r,e,t.clazz,i):t.type=="screenLine"?this.drawScreenLineMarker(r,e,t.clazz,i):e.isMultiLine()?t.type=="text"?this.drawTextMarker(r,e,t.clazz,i):this.drawMultiLineMarker(r,e,t.clazz,i):this.drawSingleLineMarker(r,e,t.clazz+" ace_start ace_br15",i)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},h.prototype.$getTop=function(i,r){return(i-r.firstRowScreen)*r.lineHeight},h.prototype.drawTextMarker=function(i,r,o,t,e){for(var n=this.session,s=r.start.row,f=r.end.row,m=s,x=0,A=0,C=n.getScreenLastRowColumn(m),b=new E(m,r.start.column,m,A);m<=f;m++)b.start.row=b.end.row=m,b.start.column=m==s?r.start.column:n.getRowWrapIndent(m),b.end.column=C,x=A,A=C,C=m+1<f?n.getScreenLastRowColumn(m+1):m==f?0:r.end.column,this.drawSingleLineMarker(i,b,o+(m==s?" ace_start":"")+" ace_br"+a(m==s||m==s+1&&r.start.column,x<A,A>C,m==f),t,m==f?0:1,e)},h.prototype.drawMultiLineMarker=function(i,r,o,t,e){var n=this.$padding,s=t.lineHeight,f=this.$getTop(r.start.row,t),m=n+r.start.column*t.characterWidth;if(e=e||"",this.session.$bidiHandler.isBidiRow(r.start.row)){var x=r.clone();x.end.row=x.start.row,x.end.column=this.session.getLine(x.start.row).length,this.drawBidiSingleLineMarker(i,x,o+" ace_br1 ace_start",t,null,e)}else this.elt(o+" ace_br1 ace_start","height:"+s+"px;right:"+n+"px;top:"+f+"px;left:"+m+"px;"+(e||""));if(this.session.$bidiHandler.isBidiRow(r.end.row)){var x=r.clone();x.start.row=x.end.row,x.start.column=0,this.drawBidiSingleLineMarker(i,x,o+" ace_br12",t,null,e)}else{f=this.$getTop(r.end.row,t);var A=r.end.column*t.characterWidth;this.elt(o+" ace_br12","height:"+s+"px;width:"+A+"px;top:"+f+"px;left:"+n+"px;"+(e||""))}if(s=(r.end.row-r.start.row-1)*t.lineHeight,!(s<=0)){f=this.$getTop(r.start.row+1,t);var C=(r.start.column?1:0)|(r.end.column?0:8);this.elt(o+(C?" ace_br"+C:""),"height:"+s+"px;right:"+n+"px;top:"+f+"px;left:"+n+"px;"+(e||""))}},h.prototype.drawSingleLineMarker=function(i,r,o,t,e,n){if(this.session.$bidiHandler.isBidiRow(r.start.row))return this.drawBidiSingleLineMarker(i,r,o,t,e,n);var s=t.lineHeight,f=(r.end.column+(e||0)-r.start.column)*t.characterWidth,m=this.$getTop(r.start.row,t),x=this.$padding+r.start.column*t.characterWidth;this.elt(o,"height:"+s+"px;width:"+f+"px;top:"+m+"px;left:"+x+"px;"+(n||""))},h.prototype.drawBidiSingleLineMarker=function(i,r,o,t,e,n){var s=t.lineHeight,f=this.$getTop(r.start.row,t),m=this.$padding,x=this.session.$bidiHandler.getSelections(r.start.column,r.end.column);x.forEach(function(A){this.elt(o,"height:"+s+"px;width:"+(A.width+(e||0))+"px;top:"+f+"px;left:"+(m+A.left)+"px;"+(n||""))},this)},h.prototype.drawFullLineMarker=function(i,r,o,t,e){var n=this.$getTop(r.start.row,t),s=t.lineHeight;r.start.row!=r.end.row&&(s+=this.$getTop(r.end.row,t)-n),this.elt(o,"height:"+s+"px;top:"+n+"px;left:0;right:0;"+(e||""))},h.prototype.drawScreenLineMarker=function(i,r,o,t,e){var n=this.$getTop(r.start.row,t),s=t.lineHeight;this.elt(o,"height:"+s+"px;top:"+n+"px;left:0;right:0;"+(e||""))},h}();_.prototype.$padding=0;function a(h,i,r,o){return(h?1:0)|(i?2:0)|(r?4:0)|(o?8:0)}p.Marker=_}),ace.define("ace/layer/text_util",["require","exports","module"],function(g,p,se){var E=new Set(["text","rparen","lparen"]);p.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(g,p,se){var E=g("../lib/oop"),S=g("../lib/dom"),_=g("../lib/lang"),a=g("./lines").Lines,h=g("../lib/event_emitter").EventEmitter,i=g("../config").nls,r=g("./text_util").isTextToken,o=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,n=e.getNewLineCharacter()==`
|
218
|
+
`&&e.getNewLineMode()!="windows",s=n?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(n){this._signal("changeCharacterSize",n)}).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 n=this.$tabStrings=[0],s=1;s<e+1;s++)if(this.showTabs){var f=this.dom.createElement("span");f.className="ace_invisible ace_invisible_tab",f.textContent=_.stringRepeat(this.TAB_CHAR,s),n.push(f)}else n.push(this.dom.createTextNode(_.stringRepeat(" ",s),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var m="ace_indent-guide",x=this.showSpaces?" ace_invisible ace_invisible_space":"",A=this.showSpaces?_.stringRepeat(this.SPACE_CHAR,this.tabSize):_.stringRepeat(" ",this.tabSize),C=this.showTabs?" ace_invisible ace_invisible_tab":"",b=this.showTabs?_.stringRepeat(this.TAB_CHAR,this.tabSize):A,f=this.dom.createElement("span");f.className=m+x,f.textContent=A,this.$tabStrings[" "]=f;var f=this.dom.createElement("span");f.className=m+C,f.textContent=b,this.$tabStrings[" "]=f}},t.prototype.updateLines=function(e,n,s){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var f=Math.max(n,e.firstRow),m=Math.min(s,e.lastRow),x=this.element.childNodes,A=0,b=e.firstRow;b<f;b++){var G=this.session.getFoldLine(b);if(G)if(G.containsRow(f)){f=G.start.row;break}else b=G.end.row;A++}for(var C=!1,b=f,G=this.session.getNextFoldLine(b),Se=G?G.start.row:1/0;b>Se&&(b=G.end.row+1,G=this.session.getNextFoldLine(b,G),Se=G?G.start.row:1/0),!(b>m);){var q=x[A++];if(q){this.dom.removeChildren(q),this.$renderLine(q,b,b==Se?G:!1),C&&(q.style.top=this.$lines.computeLineTop(b,e,this.session)+"px");var U=e.lineHeight*this.session.getRowLength(b)+"px";q.style.height!=U&&(C=!0,q.style.height=U)}b++}if(C)for(;A<this.$lines.cells.length;){var at=this.$lines.cells[A++];at.element.style.top=this.$lines.computeLineTop(at.row,e,this.session)+"px"}},t.prototype.scrollLines=function(e){var n=this.config;if(this.config=e,this.$lines.pageChanged(n,e))return this.update(e);this.$lines.moveContainer(e);var s=e.lastRow,f=n?n.lastRow:-1;if(!n||f<e.firstRow)return this.update(e);if(s<n.firstRow)return this.update(e);if(!n||n.lastRow<e.firstRow)return this.update(e);if(e.lastRow<n.firstRow)return this.update(e);if(n.firstRow<e.firstRow)for(var m=this.session.getFoldedRowCount(n.firstRow,e.firstRow-1);m>0;m--)this.$lines.shift();if(n.lastRow>e.lastRow)for(var m=this.session.getFoldedRowCount(e.lastRow+1,n.lastRow);m>0;m--)this.$lines.pop();e.firstRow<n.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,n.firstRow-1)),e.lastRow>n.lastRow&&this.$lines.push(this.$renderLinesFragment(e,n.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},t.prototype.$renderLinesFragment=function(e,n,s){for(var f=[],m=n,x=this.session.getNextFoldLine(m),A=x?x.start.row:1/0;m>A&&(m=x.end.row+1,x=this.session.getNextFoldLine(m,x),A=x?x.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?x:!1),this.$useLineGroups()?b.className="ace_line_group":b.className="ace_line",f.push(C),m++}return f},t.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var n=e.firstRow,s=e.lastRow,f=this.$lines;f.getLength();)f.pop();f.push(this.$renderLinesFragment(e,n,s))},t.prototype.$renderToken=function(e,n,s,f){for(var m=this,x=/(\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=x.exec(f);){var G=C[1],Se=C[2],q=C[3],U=C[4],at=C[5];if(!(!m.showSpaces&&Se)){var j=b!=C.index?f.slice(b,C.index):"";if(b=C.index+C[0].length,j&&A.appendChild(this.dom.createTextNode(j,this.element)),G){var W=m.session.getScreenTabSize(n+C.index);A.appendChild(m.$tabStrings[W].cloneNode(!0)),n+=W-1}else if(Se)if(m.showSpaces){var y=this.dom.createElement("span");y.className="ace_invisible ace_invisible_space",y.textContent=_.stringRepeat(m.SPACE_CHAR,Se.length),A.appendChild(y)}else A.appendChild(this.dom.createTextNode(Se,this.element));else if(q){var y=this.dom.createElement("span");y.className="ace_invisible ace_invisible_space ace_invalid",y.textContent=_.stringRepeat(m.SPACE_CHAR,q.length),A.appendChild(y)}else if(U){n+=1;var y=this.dom.createElement("span");y.style.width=m.config.characterWidth*2+"px",y.className=m.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",y.textContent=m.showSpaces?m.SPACE_CHAR:U,A.appendChild(y)}else if(at){n+=1;var y=this.dom.createElement("span");y.style.width=m.config.characterWidth*2+"px",y.className="ace_cjk",y.textContent=at,A.appendChild(y)}}}if(A.appendChild(this.dom.createTextNode(b?f.slice(b):f,this.element)),r(s.type))e.appendChild(A);else{var v="ace_"+s.type.replace(/\./g," ace_"),y=this.dom.createElement("span");s.type=="fold"&&(y.style.width=s.value.length*this.config.characterWidth+"px",y.setAttribute("title",i("inline-fold.closed.title","Unfold code"))),y.className=v,y.appendChild(A),e.appendChild(y)}return n+f.length},t.prototype.renderIndentGuide=function(e,n,s){var f=n.search(this.$indentGuideRe);if(f<=0||f>=s)return n;if(n[0]==" "){f-=f%this.tabSize;for(var m=f/this.tabSize,x=0;x<m;x++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),n.substr(f)}else if(n[0]==" "){for(var x=0;x<f;x++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),n.substr(f)}return this.$highlightIndentGuide(),n},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 n=this.session.selection.getCursor(),s=/^\s*/.exec(this.session.doc.getLine(n.row))[0].length,f=Math.floor(s/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:f,start:n.row};var m=this.session.$bracketHighlight;if(m){for(var x=this.session.$bracketHighlight.ranges,A=0;A<x.length;A++)if(n.row!==x[A].start.row){this.$highlightIndentGuideMarker.end=x[A].start.row+1,n.row>x[A].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&e[n.row]!==""&&n.column===e[n.row].length){this.$highlightIndentGuideMarker.dir=1;for(var A=n.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"),n=0;n<e.length;n++)e[n].classList.remove("ace_indent-guide-active")},t.prototype.$setIndentGuideActive=function(e,n){var s=this.session.doc.getLine(e.row);if(s!==""){var f=e.element;if(e.element.classList&&e.element.classList.contains("ace_line_group"))if(e.element.childNodes.length>0)f=e.element.childNodes[0];else return;var m=f.childNodes;if(m){var x=m[n-1];x&&x.classList&&x.classList.contains("ace_indent-guide")&&x.classList.add("ace_indent-guide-active")}}},t.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var n=this.$highlightIndentGuideMarker.indentLevel;if(n!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var s=0;s<e.length;s++){var f=e[s];if(this.$highlightIndentGuideMarker.end&&f.row>=this.$highlightIndentGuideMarker.start+1){if(f.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(f,n)}}else for(var s=e.length-1;s>=0;s--){var f=e[s];if(this.$highlightIndentGuideMarker.end&&f.row<this.$highlightIndentGuideMarker.start){if(f.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(f,n)}}}},t.prototype.$createLineElement=function(e){var n=this.dom.createElement("div");return n.className="ace_line",n.style.height=this.config.lineHeight+"px",n},t.prototype.$renderWrappedLine=function(e,n,s){var f=0,m=0,x=s[0],A=0,C=this.$createLineElement();e.appendChild(C);for(var b=0;b<n.length;b++){var G=n[b],Se=G.value;if(b==0&&this.displayIndentGuides){if(f=Se.length,Se=this.renderIndentGuide(C,Se,x),!Se)continue;f-=Se.length}if(f+Se.length<x)A=this.$renderToken(C,A,G,Se),f+=Se.length;else{for(;f+Se.length>=x;)A=this.$renderToken(C,A,G,Se.substring(0,x-f)),Se=Se.substring(x-f),f=x,C=this.$createLineElement(),e.appendChild(C),C.appendChild(this.dom.createTextNode(_.stringRepeat(" ",s.indent),this.element)),m++,A=0,x=s[m]||Number.MAX_VALUE;Se.length!=0&&(f+=Se.length,A=this.$renderToken(C,A,G,Se))}}s[s.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(C,A,null,"",!0)},t.prototype.$renderSimpleLine=function(e,n){for(var s=0,f=0;f<n.length;f++){var m=n[f],x=m.value;if(!(f==0&&this.displayIndentGuides&&(x=this.renderIndentGuide(e,x),!x))){if(s+x.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,s,m,x);s=this.$renderToken(e,s,m,x)}}},t.prototype.$renderOverflowMessage=function(e,n,s,f,m){s&&this.$renderToken(e,n,s,f.slice(0,this.MAX_LINE_LENGTH-n));var x=this.dom.createElement("span");x.className="ace_inline_button ace_keyword ace_toggle_wrap",x.textContent=m?"<hide>":"<click to see more...>",e.appendChild(x)},t.prototype.$renderLine=function(e,n,s){if(!s&&s!=!1&&(s=this.session.getFoldLine(n)),s)var f=this.$getFoldLineTokens(n,s);else var f=this.session.getTokens(n);var m=e;if(f.length){var x=this.session.getRowSplitData(n);if(x&&x.length){this.$renderWrappedLine(e,f,x);var m=e.lastChild}else{var m=e;this.$useLineGroups()&&(m=this.$createLineElement(),e.appendChild(m)),this.$renderSimpleLine(m,f)}}else this.$useLineGroups()&&(m=this.$createLineElement(),e.appendChild(m));if(this.showEOL&&m){s&&(n=s.end.row);var A=this.dom.createElement("span");A.className="ace_invisible ace_invisible_eol",A.textContent=n==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,m.appendChild(A)}},t.prototype.$getFoldLineTokens=function(e,n){var s=this.session,f=[];function m(A,C,b){for(var G=0,Se=0;Se+A[G].value.length<C;)if(Se+=A[G].value.length,G++,G==A.length)return;if(Se!=C){var q=A[G].value.substring(C-Se);q.length>b-C&&(q=q.substring(0,b-C)),f.push({type:A[G].type,value:q}),Se=C+q.length,G+=1}for(;Se<b&&G<A.length;){var q=A[G].value;q.length+Se>b?f.push({type:A[G].type,value:q.substring(0,b-Se)}):f.push(A[G]),Se+=q.length,G+=1}}var x=s.getTokens(e);return n.walk(function(A,C,b,G,Se){A!=null?f.push({type:"fold",value:A}):(Se&&(x=s.getTokens(C)),x.length&&m(x,G,b))},n.end.row,this.session.getLine(n.end.row).length),f},t.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},t}();o.prototype.EOF_CHAR="¶",o.prototype.EOL_CHAR_LF="¬",o.prototype.EOL_CHAR_CRLF="¤",o.prototype.EOL_CHAR=o.prototype.EOL_CHAR_LF,o.prototype.TAB_CHAR="—",o.prototype.SPACE_CHAR="·",o.prototype.$padding=0,o.prototype.MAX_LINE_LENGTH=1e4,o.prototype.showInvisibles=!1,o.prototype.showSpaces=!1,o.prototype.showTabs=!1,o.prototype.showEOL=!1,o.prototype.displayIndentGuides=!0,o.prototype.$highlightIndentGuides=!0,o.prototype.$tabStrings=[],o.prototype.destroy={},o.prototype.onChangeTabSize=o.prototype.$computeTabString,E.implement(o.prototype,h),p.Text=o}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(g,p,se){var E=g("../lib/dom"),S=function(){function _(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 _.prototype.$updateOpacity=function(a){for(var h=this.cursors,i=h.length;i--;)E.setStyle(h[i].style,"opacity",a?"":"0")},_.prototype.$startCssAnimation=function(){for(var a=this.cursors,h=a.length;h--;)a[h].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&E.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},_.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,E.removeCssClass(this.element,"ace_animate-blinking")},_.prototype.setPadding=function(a){this.$padding=a},_.prototype.setSession=function(a){this.session=a},_.prototype.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},_.prototype.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},_.prototype.setSmoothBlinking=function(a){a!=this.smoothBlinking&&(this.smoothBlinking=a,E.setCssClass(this.element,"ace_smooth-blinking",a),this.$updateCursors(!0),this.restartTimer())},_.prototype.addCursor=function(){var a=E.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},_.prototype.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},_.prototype.hideCursor=function(){this.isVisible=!1,E.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},_.prototype.showCursor=function(){this.isVisible=!0,E.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},_.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 h=(function(){this.timeoutId=setTimeout(function(){a(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){a(!0),h()},this.blinkInterval),h()}},_.prototype.getPixelPosition=function(a,h){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var i=this.session.documentToScreenPosition(a),r=this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,a.row)?this.session.$bidiHandler.getPosLeft(i.column):i.column*this.config.characterWidth),o=(i.row-(h?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:r,top:o}},_.prototype.isCursorInView=function(a,h){return a.top>=0&&a.top<h.maxHeight},_.prototype.update=function(a){this.config=a;var h=this.session.$selectionMarkers,i=0,r=0;(h===void 0||h.length===0)&&(h=[{cursor:null}]);for(var i=0,o=h.length;i<o;i++){var t=this.getPixelPosition(h[i].cursor,!0);if(!((t.top>a.height+a.offset||t.top<0)&&i>1)){var e=this.cursors[r++]||this.addCursor(),n=e.style;this.drawCursor?this.drawCursor(e,t,a,h[i],this.session):this.isCursorInView(t,a)?(E.setStyle(n,"display","block"),E.translate(e,t.left,t.top),E.setStyle(n,"width",Math.round(a.characterWidth)+"px"),E.setStyle(n,"height",a.lineHeight+"px")):E.setStyle(n,"display","none")}}for(;this.cursors.length>r;)this.removeCursor();var s=this.session.getOverwrite();this.$setOverwrite(s),this.$pixelPos=t,this.restartTimer()},_.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"))},_.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},_}();S.prototype.$padding=0,S.prototype.drawCursor=null,p.Cursor=S}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(g,p,se){var E=this&&this.__extends||function(){var e=function(n,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,m){f.__proto__=m}||function(f,m){for(var x in m)Object.prototype.hasOwnProperty.call(m,x)&&(f[x]=m[x])},e(n,s)};return function(n,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");e(n,s);function f(){this.constructor=n}n.prototype=s===null?Object.create(s):(f.prototype=s.prototype,new f)}}(),S=g("./lib/oop"),_=g("./lib/dom"),a=g("./lib/event"),h=g("./lib/event_emitter").EventEmitter,i=32768,r=function(){function e(n,s){this.element=_.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+s,this.inner=_.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),n.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addListener(this.element,"scroll",this.onScroll.bind(this)),a.addListener(this.element,"mousedown",a.preventDefault)}return e.prototype.setVisible=function(n){this.element.style.display=n?"":"none",this.isVisible=n,this.coeff=1},e}();S.implement(r.prototype,h);var o=function(e){E(n,e);function n(s,f){var m=e.call(this,s,"-v")||this;return m.scrollTop=0,m.scrollHeight=0,f.$scrollbarWidth=m.width=_.scrollbarWidth(s.ownerDocument),m.inner.style.width=m.element.style.width=(m.width||15)+5+"px",m.$minWidth=0,m}return n.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},n.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},n.prototype.setHeight=function(s){this.element.style.height=s+"px"},n.prototype.setScrollHeight=function(s){this.scrollHeight=s,s>i?(this.coeff=i/s,s=i):this.coeff!=1&&(this.coeff=1),this.inner.style.height=s+"px"},n.prototype.setScrollTop=function(s){this.scrollTop!=s&&(this.skipEvent=!0,this.scrollTop=s,this.element.scrollTop=s*this.coeff)},n}(r);o.prototype.setInnerHeight=o.prototype.setScrollHeight;var t=function(e){E(n,e);function n(s,f){var m=e.call(this,s,"-h")||this;return m.scrollLeft=0,m.height=f.$scrollbarWidth,m.inner.style.height=m.element.style.height=(m.height||15)+5+"px",m}return n.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},n.prototype.getHeight=function(){return this.isVisible?this.height:0},n.prototype.setWidth=function(s){this.element.style.width=s+"px"},n.prototype.setInnerWidth=function(s){this.inner.style.width=s+"px"},n.prototype.setScrollWidth=function(s){this.inner.style.width=s+"px"},n.prototype.setScrollLeft=function(s){this.scrollLeft!=s&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=s)},n}(r);p.ScrollBar=o,p.ScrollBarV=o,p.ScrollBarH=t,p.VScrollBar=o,p.HScrollBar=t}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(g,p,se){var E=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,f){s.__proto__=f}||function(s,f){for(var m in f)Object.prototype.hasOwnProperty.call(f,m)&&(s[m]=f[m])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function s(){this.constructor=e}e.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)}}(),S=g("./lib/oop"),_=g("./lib/dom"),a=g("./lib/event"),h=g("./lib/event_emitter").EventEmitter;_.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
|
219
|
+
position: absolute;
|
220
|
+
background: rgba(128, 128, 128, 0.6);
|
221
|
+
-moz-box-sizing: border-box;
|
222
|
+
box-sizing: border-box;
|
223
|
+
border: 1px solid #bbb;
|
224
|
+
border-radius: 2px;
|
225
|
+
z-index: 8;
|
226
|
+
}
|
227
|
+
.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
|
228
|
+
position: absolute;
|
229
|
+
z-index: 6;
|
230
|
+
background: none;
|
231
|
+
overflow: hidden!important;
|
232
|
+
}
|
233
|
+
.ace_editor>.ace_sb-v {
|
234
|
+
z-index: 6;
|
235
|
+
right: 0;
|
236
|
+
top: 0;
|
237
|
+
width: 12px;
|
238
|
+
}
|
239
|
+
.ace_editor>.ace_sb-v div {
|
240
|
+
z-index: 8;
|
241
|
+
right: 0;
|
242
|
+
width: 100%;
|
243
|
+
}
|
244
|
+
.ace_editor>.ace_sb-h {
|
245
|
+
bottom: 0;
|
246
|
+
left: 0;
|
247
|
+
height: 12px;
|
248
|
+
}
|
249
|
+
.ace_editor>.ace_sb-h div {
|
250
|
+
bottom: 0;
|
251
|
+
height: 100%;
|
252
|
+
}
|
253
|
+
.ace_editor>.ace_sb_grabbed {
|
254
|
+
z-index: 8;
|
255
|
+
background: #000;
|
256
|
+
}`,"ace_scrollbar.css",!1);var i=function(){function t(e,n){this.element=_.createElement("div"),this.element.className="ace_sb"+n,this.inner=_.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,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(i.prototype,h);var r=function(t){E(e,t);function e(n,s){var f=t.call(this,n,"-v")||this;return f.scrollTop=0,f.scrollHeight=0,f.parent=n,f.width=f.VScrollWidth,f.renderer=s,f.inner.style.width=f.element.style.width=(f.width||15)+"px",f.$minWidth=0,f}return e.prototype.onMouseDown=function(n,s){if(n==="mousedown"&&!(a.getButton(s)!==0||s.detail===2)){if(s.target===this.inner){var f=this,m=s.clientY,x=function(U){m=U.clientY},A=function(){clearInterval(Se)},C=s.clientY,b=this.thumbTop,G=function(){if(m!==void 0){var U=f.scrollTopFromThumbTop(b+m-C);U!==f.scrollTop&&f._emit("scroll",{data:U})}};a.capture(this.inner,x,A);var Se=setInterval(G,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(n){var s=n*(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(n){this.height=Math.max(0,n),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},e.prototype.setScrollHeight=function(n,s){this.pageHeight===n&&!s||(this.pageHeight=n,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},e.prototype.setScrollTop=function(n){this.scrollTop=n,n<0&&(n=0),this.thumbTop=n*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},e}(i);r.prototype.setInnerHeight=r.prototype.setScrollHeight;var o=function(t){E(e,t);function e(n,s){var f=t.call(this,n,"-h")||this;return f.scrollLeft=0,f.scrollWidth=0,f.height=f.HScrollHeight,f.inner.style.height=f.element.style.height=(f.height||12)+"px",f.renderer=s,f}return e.prototype.onMouseDown=function(n,s){if(n==="mousedown"&&!(a.getButton(s)!==0||s.detail===2)){if(s.target===this.inner){var f=this,m=s.clientX,x=function(U){m=U.clientX},A=function(){clearInterval(Se)},C=s.clientX,b=this.thumbLeft,G=function(){if(m!==void 0){var U=f.scrollLeftFromThumbLeft(b+m-C);U!==f.scrollLeft&&f._emit("scroll",{data:U})}};a.capture(this.inner,x,A);var Se=setInterval(G,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(n){var s=n*(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(n){this.width=Math.max(0,n),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},e.prototype.setScrollWidth=function(n,s){this.pageWidth===n&&!s||(this.pageWidth=n,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},e.prototype.setScrollLeft=function(n){this.scrollLeft=n,n<0&&(n=0),this.thumbLeft=n*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},e}(i);o.prototype.setInnerWidth=o.prototype.setScrollWidth,p.ScrollBar=r,p.ScrollBarV=r,p.ScrollBarH=o,p.VScrollBar=r,p.HScrollBar=o}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(g,p,se){var E=g("./lib/event"),S=function(){function _(a,h){this.onRender=a,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=h||window;var i=this;this._flush=function(r){i.pending=!1;var o=i.changes;if(o&&(E.blockIdle(100),i.changes=0,i.onRender(o)),i.changes){if(i.$recursionLimit--<0)return;i.schedule()}else i.$recursionLimit=2}}return _.prototype.schedule=function(a){this.changes=this.changes|a,this.changes&&!this.pending&&(E.nextFrame(this._flush),this.pending=!0)},_.prototype.clear=function(a){var h=this.changes;return this.changes=0,h},_}();p.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(g,p,se){var E=g("../lib/oop"),S=g("../lib/dom"),_=g("../lib/lang"),a=g("../lib/event"),h=g("../lib/useragent"),i=g("../lib/event_emitter").EventEmitter,r=512,o=typeof ResizeObserver=="function",t=200,e=function(){function n(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=_.stringRepeat("X",r),this.$characterSize={width:0,height:0},o?this.$addObserver():this.checkForSizeChanges()}return n.prototype.$setMeasureNodeStyles=function(s,f){s.width=s.height="auto",s.left=s.top="0px",s.visibility="hidden",s.position="absolute",s.whiteSpace="pre",h.isIE<8?s["font-family"]="inherit":s.font="inherit",s.overflow=f?"hidden":"visible"},n.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 f=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=s,this.charSizes=Object.create(null),this.allowBoldFonts=f&&f.width===s.width&&f.height===s.height,this._emit("changeCharacterSize",{data:s})}},n.prototype.$addObserver=function(){var s=this;this.$observer=new window.ResizeObserver(function(f){s.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},n.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var s=this;return this.$pollSizeChangesTimer=a.onIdle(function f(){s.checkForSizeChanges(),a.onIdle(f,500)},500)},n.prototype.setPolling=function(s){s?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},n.prototype.$measureSizes=function(s){var f={height:(s||this.$measureNode).clientHeight,width:(s||this.$measureNode).clientWidth/r};return f.width===0||f.height===0?null:f},n.prototype.$measureCharWidth=function(s){this.$main.textContent=_.stringRepeat(s,r);var f=this.$main.getBoundingClientRect();return f.width/r},n.prototype.getCharacterWidth=function(s){var f=this.charSizes[s];return f===void 0&&(f=this.charSizes[s]=this.$measureCharWidth(s)/this.$characterSize.width),f},n.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},n.prototype.$getZoom=function(s){return!s||!s.parentElement?1:(Number(window.getComputedStyle(s).zoom)||1)*this.$getZoom(s.parentElement)},n.prototype.$initTransformMeasureNodes=function(){var s=function(f,m){return["div",{style:"position: absolute;top:"+f+"px;left:"+m+"px;"}]};this.els=S.buildDom([s(0,0),s(t,0),s(0,t),s(t,t)],this.el)},n.prototype.transformCoordinates=function(s,f){if(s){var m=this.$getZoom(this.el);s=b(1/m,s)}function x(lt,ct,Ut){var Mt=lt[1]*ct[0]-lt[0]*ct[1];return[(-ct[1]*Ut[0]+ct[0]*Ut[1])/Mt,(+lt[1]*Ut[0]-lt[0]*Ut[1])/Mt]}function A(lt,ct){return[lt[0]-ct[0],lt[1]-ct[1]]}function C(lt,ct){return[lt[0]+ct[0],lt[1]+ct[1]]}function b(lt,ct){return[lt*ct[0],lt*ct[1]]}this.els||this.$initTransformMeasureNodes();function G(lt){var ct=lt.getBoundingClientRect();return[ct.left,ct.top]}var Se=G(this.els[0]),q=G(this.els[1]),U=G(this.els[2]),at=G(this.els[3]),j=x(A(at,q),A(at,U),A(C(q,U),C(at,Se))),W=b(1+j[0],A(q,Se)),y=b(1+j[1],A(U,Se));if(f){var v=f,D=j[0]*v[0]/t+j[1]*v[1]/t+1,Ee=C(b(v[0],W),b(v[1],y));return C(b(1/D/t,Ee),Se)}var qe=A(s,Se),ot=x(A(W,b(j[0],qe)),A(y,b(j[1],qe)),qe);return b(t,ot)},n}();e.prototype.$characterSize={width:0,height:0},E.implement(e.prototype,i),p.FontMetrics=e}),ace.define("ace/css/editor-css",["require","exports","module"],function(g,p,se){se.exports=`
|
257
|
+
.ace_br1 {border-top-left-radius : 3px;}
|
258
|
+
.ace_br2 {border-top-right-radius : 3px;}
|
259
|
+
.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
|
260
|
+
.ace_br4 {border-bottom-right-radius: 3px;}
|
261
|
+
.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
|
262
|
+
.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
|
263
|
+
.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
|
264
|
+
.ace_br8 {border-bottom-left-radius : 3px;}
|
265
|
+
.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
|
266
|
+
.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
|
267
|
+
.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
|
268
|
+
.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
269
|
+
.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
270
|
+
.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
271
|
+
.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
272
|
+
|
273
|
+
|
274
|
+
.ace_editor {
|
275
|
+
position: relative;
|
276
|
+
overflow: hidden;
|
277
|
+
padding: 0;
|
278
|
+
font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
|
279
|
+
direction: ltr;
|
280
|
+
text-align: left;
|
281
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
282
|
+
forced-color-adjust: none;
|
283
|
+
}
|
284
|
+
|
285
|
+
.ace_scroller {
|
286
|
+
position: absolute;
|
287
|
+
overflow: hidden;
|
288
|
+
top: 0;
|
289
|
+
bottom: 0;
|
290
|
+
background-color: inherit;
|
291
|
+
-ms-user-select: none;
|
292
|
+
-moz-user-select: none;
|
293
|
+
-webkit-user-select: none;
|
294
|
+
user-select: none;
|
295
|
+
cursor: text;
|
296
|
+
}
|
297
|
+
|
298
|
+
.ace_content {
|
299
|
+
position: absolute;
|
300
|
+
box-sizing: border-box;
|
301
|
+
min-width: 100%;
|
302
|
+
contain: style size layout;
|
303
|
+
font-variant-ligatures: no-common-ligatures;
|
304
|
+
}
|
305
|
+
.ace_invisible {
|
306
|
+
font-variant-ligatures: none;
|
307
|
+
}
|
308
|
+
|
309
|
+
.ace_keyboard-focus:focus {
|
310
|
+
box-shadow: inset 0 0 0 2px #5E9ED6;
|
311
|
+
outline: none;
|
312
|
+
}
|
313
|
+
|
314
|
+
.ace_dragging .ace_scroller:before{
|
315
|
+
position: absolute;
|
316
|
+
top: 0;
|
317
|
+
left: 0;
|
318
|
+
right: 0;
|
319
|
+
bottom: 0;
|
320
|
+
content: '';
|
321
|
+
background: rgba(250, 250, 250, 0.01);
|
322
|
+
z-index: 1000;
|
323
|
+
}
|
324
|
+
.ace_dragging.ace_dark .ace_scroller:before{
|
325
|
+
background: rgba(0, 0, 0, 0.01);
|
326
|
+
}
|
327
|
+
|
328
|
+
.ace_gutter {
|
329
|
+
position: absolute;
|
330
|
+
overflow : hidden;
|
331
|
+
width: auto;
|
332
|
+
top: 0;
|
333
|
+
bottom: 0;
|
334
|
+
left: 0;
|
335
|
+
cursor: default;
|
336
|
+
z-index: 4;
|
337
|
+
-ms-user-select: none;
|
338
|
+
-moz-user-select: none;
|
339
|
+
-webkit-user-select: none;
|
340
|
+
user-select: none;
|
341
|
+
contain: style size layout;
|
342
|
+
}
|
343
|
+
|
344
|
+
.ace_gutter-active-line {
|
345
|
+
position: absolute;
|
346
|
+
left: 0;
|
347
|
+
right: 0;
|
348
|
+
}
|
349
|
+
|
350
|
+
.ace_scroller.ace_scroll-left:after {
|
351
|
+
content: "";
|
352
|
+
position: absolute;
|
353
|
+
top: 0;
|
354
|
+
right: 0;
|
355
|
+
bottom: 0;
|
356
|
+
left: 0;
|
357
|
+
box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
|
358
|
+
pointer-events: none;
|
359
|
+
}
|
360
|
+
|
361
|
+
.ace_gutter-cell, .ace_gutter-cell_svg-icons {
|
362
|
+
position: absolute;
|
363
|
+
top: 0;
|
364
|
+
left: 0;
|
365
|
+
right: 0;
|
366
|
+
padding-left: 19px;
|
367
|
+
padding-right: 6px;
|
368
|
+
background-repeat: no-repeat;
|
369
|
+
}
|
370
|
+
|
371
|
+
.ace_gutter-cell_svg-icons .ace_gutter_annotation {
|
372
|
+
margin-left: -14px;
|
373
|
+
float: left;
|
374
|
+
}
|
375
|
+
|
376
|
+
.ace_gutter-cell .ace_gutter_annotation {
|
377
|
+
margin-left: -19px;
|
378
|
+
float: left;
|
379
|
+
}
|
380
|
+
|
381
|
+
.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 {
|
382
|
+
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==");
|
383
|
+
background-repeat: no-repeat;
|
384
|
+
background-position: 2px center;
|
385
|
+
}
|
386
|
+
|
387
|
+
.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
|
388
|
+
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==");
|
389
|
+
background-repeat: no-repeat;
|
390
|
+
background-position: 2px center;
|
391
|
+
}
|
392
|
+
|
393
|
+
.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
|
394
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
|
395
|
+
background-repeat: no-repeat;
|
396
|
+
background-position: 2px center;
|
397
|
+
}
|
398
|
+
|
399
|
+
.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 {
|
400
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
|
401
|
+
}
|
402
|
+
|
403
|
+
.ace_icon_svg.ace_error {
|
404
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
|
405
|
+
background-color: crimson;
|
406
|
+
}
|
407
|
+
.ace_icon_svg.ace_security {
|
408
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
|
409
|
+
background-color: crimson;
|
410
|
+
}
|
411
|
+
.ace_icon_svg.ace_warning {
|
412
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
|
413
|
+
background-color: darkorange;
|
414
|
+
}
|
415
|
+
.ace_icon_svg.ace_info {
|
416
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
|
417
|
+
background-color: royalblue;
|
418
|
+
}
|
419
|
+
.ace_icon_svg.ace_hint {
|
420
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
|
421
|
+
background-color: silver;
|
422
|
+
}
|
423
|
+
|
424
|
+
.ace_icon_svg.ace_error_fold {
|
425
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
|
426
|
+
background-color: crimson;
|
427
|
+
}
|
428
|
+
.ace_icon_svg.ace_security_fold {
|
429
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
|
430
|
+
background-color: crimson;
|
431
|
+
}
|
432
|
+
.ace_icon_svg.ace_warning_fold {
|
433
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
|
434
|
+
background-color: darkorange;
|
435
|
+
}
|
436
|
+
|
437
|
+
.ace_scrollbar {
|
438
|
+
contain: strict;
|
439
|
+
position: absolute;
|
440
|
+
right: 0;
|
441
|
+
bottom: 0;
|
442
|
+
z-index: 6;
|
443
|
+
}
|
444
|
+
|
445
|
+
.ace_scrollbar-inner {
|
446
|
+
position: absolute;
|
447
|
+
cursor: text;
|
448
|
+
left: 0;
|
449
|
+
top: 0;
|
450
|
+
}
|
451
|
+
|
452
|
+
.ace_scrollbar-v{
|
453
|
+
overflow-x: hidden;
|
454
|
+
overflow-y: scroll;
|
455
|
+
top: 0;
|
456
|
+
}
|
457
|
+
|
458
|
+
.ace_scrollbar-h {
|
459
|
+
overflow-x: scroll;
|
460
|
+
overflow-y: hidden;
|
461
|
+
left: 0;
|
462
|
+
}
|
463
|
+
|
464
|
+
.ace_print-margin {
|
465
|
+
position: absolute;
|
466
|
+
height: 100%;
|
467
|
+
}
|
468
|
+
|
469
|
+
.ace_text-input {
|
470
|
+
position: absolute;
|
471
|
+
z-index: 0;
|
472
|
+
width: 0.5em;
|
473
|
+
height: 1em;
|
474
|
+
opacity: 0;
|
475
|
+
background: transparent;
|
476
|
+
-moz-appearance: none;
|
477
|
+
appearance: none;
|
478
|
+
border: none;
|
479
|
+
resize: none;
|
480
|
+
outline: none;
|
481
|
+
overflow: hidden;
|
482
|
+
font: inherit;
|
483
|
+
padding: 0 1px;
|
484
|
+
margin: 0 -1px;
|
485
|
+
contain: strict;
|
486
|
+
-ms-user-select: text;
|
487
|
+
-moz-user-select: text;
|
488
|
+
-webkit-user-select: text;
|
489
|
+
user-select: text;
|
490
|
+
/*with \`pre-line\` chrome inserts instead of space*/
|
491
|
+
white-space: pre!important;
|
492
|
+
}
|
493
|
+
.ace_text-input.ace_composition {
|
494
|
+
background: transparent;
|
495
|
+
color: inherit;
|
496
|
+
z-index: 1000;
|
497
|
+
opacity: 1;
|
498
|
+
}
|
499
|
+
.ace_composition_placeholder { color: transparent }
|
500
|
+
.ace_composition_marker {
|
501
|
+
border-bottom: 1px solid;
|
502
|
+
position: absolute;
|
503
|
+
border-radius: 0;
|
504
|
+
margin-top: 1px;
|
505
|
+
}
|
506
|
+
|
507
|
+
[ace_nocontext=true] {
|
508
|
+
transform: none!important;
|
509
|
+
filter: none!important;
|
510
|
+
clip-path: none!important;
|
511
|
+
mask : none!important;
|
512
|
+
contain: none!important;
|
513
|
+
perspective: none!important;
|
514
|
+
mix-blend-mode: initial!important;
|
515
|
+
z-index: auto;
|
516
|
+
}
|
517
|
+
|
518
|
+
.ace_layer {
|
519
|
+
z-index: 1;
|
520
|
+
position: absolute;
|
521
|
+
overflow: hidden;
|
522
|
+
/* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
|
523
|
+
word-wrap: normal;
|
524
|
+
white-space: pre;
|
525
|
+
height: 100%;
|
526
|
+
width: 100%;
|
527
|
+
box-sizing: border-box;
|
528
|
+
/* setting pointer-events: auto; on node under the mouse, which changes
|
529
|
+
during scroll, will break mouse wheel scrolling in Safari */
|
530
|
+
pointer-events: none;
|
531
|
+
}
|
532
|
+
|
533
|
+
.ace_gutter-layer {
|
534
|
+
position: relative;
|
535
|
+
width: auto;
|
536
|
+
text-align: right;
|
537
|
+
pointer-events: auto;
|
538
|
+
height: 1000000px;
|
539
|
+
contain: style size layout;
|
540
|
+
}
|
541
|
+
|
542
|
+
.ace_text-layer {
|
543
|
+
font: inherit !important;
|
544
|
+
position: absolute;
|
545
|
+
height: 1000000px;
|
546
|
+
width: 1000000px;
|
547
|
+
contain: style size layout;
|
548
|
+
}
|
549
|
+
|
550
|
+
.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
|
551
|
+
contain: style size layout;
|
552
|
+
position: absolute;
|
553
|
+
top: 0;
|
554
|
+
left: 0;
|
555
|
+
right: 0;
|
556
|
+
}
|
557
|
+
|
558
|
+
.ace_hidpi .ace_text-layer,
|
559
|
+
.ace_hidpi .ace_gutter-layer,
|
560
|
+
.ace_hidpi .ace_content,
|
561
|
+
.ace_hidpi .ace_gutter {
|
562
|
+
contain: strict;
|
563
|
+
}
|
564
|
+
.ace_hidpi .ace_text-layer > .ace_line,
|
565
|
+
.ace_hidpi .ace_text-layer > .ace_line_group {
|
566
|
+
contain: strict;
|
567
|
+
}
|
568
|
+
|
569
|
+
.ace_cjk {
|
570
|
+
display: inline-block;
|
571
|
+
text-align: center;
|
572
|
+
}
|
573
|
+
|
574
|
+
.ace_cursor-layer {
|
575
|
+
z-index: 4;
|
576
|
+
}
|
577
|
+
|
578
|
+
.ace_cursor {
|
579
|
+
z-index: 4;
|
580
|
+
position: absolute;
|
581
|
+
box-sizing: border-box;
|
582
|
+
border-left: 2px solid;
|
583
|
+
/* workaround for smooth cursor repaintng whole screen in chrome */
|
584
|
+
transform: translatez(0);
|
585
|
+
}
|
586
|
+
|
587
|
+
.ace_multiselect .ace_cursor {
|
588
|
+
border-left-width: 1px;
|
589
|
+
}
|
590
|
+
|
591
|
+
.ace_slim-cursors .ace_cursor {
|
592
|
+
border-left-width: 1px;
|
593
|
+
}
|
594
|
+
|
595
|
+
.ace_overwrite-cursors .ace_cursor {
|
596
|
+
border-left-width: 0;
|
597
|
+
border-bottom: 1px solid;
|
598
|
+
}
|
599
|
+
|
600
|
+
.ace_hidden-cursors .ace_cursor {
|
601
|
+
opacity: 0.2;
|
602
|
+
}
|
603
|
+
|
604
|
+
.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
|
605
|
+
opacity: 0;
|
606
|
+
}
|
607
|
+
|
608
|
+
.ace_smooth-blinking .ace_cursor {
|
609
|
+
transition: opacity 0.18s;
|
610
|
+
}
|
611
|
+
|
612
|
+
.ace_animate-blinking .ace_cursor {
|
613
|
+
animation-duration: 1000ms;
|
614
|
+
animation-timing-function: step-end;
|
615
|
+
animation-name: blink-ace-animate;
|
616
|
+
animation-iteration-count: infinite;
|
617
|
+
}
|
618
|
+
|
619
|
+
.ace_animate-blinking.ace_smooth-blinking .ace_cursor {
|
620
|
+
animation-duration: 1000ms;
|
621
|
+
animation-timing-function: ease-in-out;
|
622
|
+
animation-name: blink-ace-animate-smooth;
|
623
|
+
}
|
624
|
+
|
625
|
+
@keyframes blink-ace-animate {
|
626
|
+
from, to { opacity: 1; }
|
627
|
+
60% { opacity: 0; }
|
628
|
+
}
|
629
|
+
|
630
|
+
@keyframes blink-ace-animate-smooth {
|
631
|
+
from, to { opacity: 1; }
|
632
|
+
45% { opacity: 1; }
|
633
|
+
60% { opacity: 0; }
|
634
|
+
85% { opacity: 0; }
|
635
|
+
}
|
636
|
+
|
637
|
+
.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
|
638
|
+
position: absolute;
|
639
|
+
z-index: 3;
|
640
|
+
}
|
641
|
+
|
642
|
+
.ace_marker-layer .ace_selection {
|
643
|
+
position: absolute;
|
644
|
+
z-index: 5;
|
645
|
+
}
|
646
|
+
|
647
|
+
.ace_marker-layer .ace_bracket {
|
648
|
+
position: absolute;
|
649
|
+
z-index: 6;
|
650
|
+
}
|
651
|
+
|
652
|
+
.ace_marker-layer .ace_error_bracket {
|
653
|
+
position: absolute;
|
654
|
+
border-bottom: 1px solid #DE5555;
|
655
|
+
border-radius: 0;
|
656
|
+
}
|
657
|
+
|
658
|
+
.ace_marker-layer .ace_active-line {
|
659
|
+
position: absolute;
|
660
|
+
z-index: 2;
|
661
|
+
}
|
662
|
+
|
663
|
+
.ace_marker-layer .ace_selected-word {
|
664
|
+
position: absolute;
|
665
|
+
z-index: 4;
|
666
|
+
box-sizing: border-box;
|
667
|
+
}
|
668
|
+
|
669
|
+
.ace_line .ace_fold {
|
670
|
+
box-sizing: border-box;
|
671
|
+
|
672
|
+
display: inline-block;
|
673
|
+
height: 11px;
|
674
|
+
margin-top: -2px;
|
675
|
+
vertical-align: middle;
|
676
|
+
|
677
|
+
background-image:
|
678
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
679
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
|
680
|
+
background-repeat: no-repeat, repeat-x;
|
681
|
+
background-position: center center, top left;
|
682
|
+
color: transparent;
|
683
|
+
|
684
|
+
border: 1px solid black;
|
685
|
+
border-radius: 2px;
|
686
|
+
|
687
|
+
cursor: pointer;
|
688
|
+
pointer-events: auto;
|
689
|
+
}
|
690
|
+
|
691
|
+
.ace_dark .ace_fold {
|
692
|
+
}
|
693
|
+
|
694
|
+
.ace_fold:hover{
|
695
|
+
background-image:
|
696
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
697
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
|
698
|
+
}
|
699
|
+
|
700
|
+
.ace_tooltip {
|
701
|
+
background-color: #f5f5f5;
|
702
|
+
border: 1px solid gray;
|
703
|
+
border-radius: 1px;
|
704
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
|
705
|
+
color: black;
|
706
|
+
padding: 3px 4px;
|
707
|
+
position: fixed;
|
708
|
+
z-index: 999999;
|
709
|
+
box-sizing: border-box;
|
710
|
+
cursor: default;
|
711
|
+
white-space: pre-wrap;
|
712
|
+
word-wrap: break-word;
|
713
|
+
line-height: normal;
|
714
|
+
font-style: normal;
|
715
|
+
font-weight: normal;
|
716
|
+
letter-spacing: normal;
|
717
|
+
pointer-events: none;
|
718
|
+
overflow: auto;
|
719
|
+
max-width: min(33em, 66vw);
|
720
|
+
overscroll-behavior: contain;
|
721
|
+
}
|
722
|
+
.ace_tooltip pre {
|
723
|
+
white-space: pre-wrap;
|
724
|
+
}
|
725
|
+
|
726
|
+
.ace_tooltip.ace_dark {
|
727
|
+
background-color: #636363;
|
728
|
+
color: #fff;
|
729
|
+
}
|
730
|
+
|
731
|
+
.ace_tooltip:focus {
|
732
|
+
outline: 1px solid #5E9ED6;
|
733
|
+
}
|
734
|
+
|
735
|
+
.ace_icon {
|
736
|
+
display: inline-block;
|
737
|
+
width: 18px;
|
738
|
+
vertical-align: top;
|
739
|
+
}
|
740
|
+
|
741
|
+
.ace_icon_svg {
|
742
|
+
display: inline-block;
|
743
|
+
width: 12px;
|
744
|
+
vertical-align: top;
|
745
|
+
-webkit-mask-repeat: no-repeat;
|
746
|
+
-webkit-mask-size: 12px;
|
747
|
+
-webkit-mask-position: center;
|
748
|
+
}
|
749
|
+
|
750
|
+
.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
|
751
|
+
padding-right: 13px;
|
752
|
+
}
|
753
|
+
|
754
|
+
.ace_fold-widget, .ace_custom-widget {
|
755
|
+
box-sizing: border-box;
|
756
|
+
|
757
|
+
margin: 0 -12px 0 1px;
|
758
|
+
display: none;
|
759
|
+
width: 11px;
|
760
|
+
vertical-align: top;
|
761
|
+
|
762
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
|
763
|
+
background-repeat: no-repeat;
|
764
|
+
background-position: center;
|
765
|
+
|
766
|
+
border-radius: 3px;
|
767
|
+
|
768
|
+
border: 1px solid transparent;
|
769
|
+
cursor: pointer;
|
770
|
+
}
|
771
|
+
|
772
|
+
.ace_custom-widget {
|
773
|
+
background: none;
|
774
|
+
}
|
775
|
+
|
776
|
+
.ace_folding-enabled .ace_fold-widget {
|
777
|
+
display: inline-block;
|
778
|
+
}
|
779
|
+
|
780
|
+
.ace_fold-widget.ace_end {
|
781
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
|
782
|
+
}
|
783
|
+
|
784
|
+
.ace_fold-widget.ace_closed {
|
785
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
|
786
|
+
}
|
787
|
+
|
788
|
+
.ace_fold-widget:hover {
|
789
|
+
border: 1px solid rgba(0, 0, 0, 0.3);
|
790
|
+
background-color: rgba(255, 255, 255, 0.2);
|
791
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
|
792
|
+
}
|
793
|
+
|
794
|
+
.ace_fold-widget:active {
|
795
|
+
border: 1px solid rgba(0, 0, 0, 0.4);
|
796
|
+
background-color: rgba(0, 0, 0, 0.05);
|
797
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
|
798
|
+
}
|
799
|
+
/**
|
800
|
+
* Dark version for fold widgets
|
801
|
+
*/
|
802
|
+
.ace_dark .ace_fold-widget {
|
803
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
|
804
|
+
}
|
805
|
+
.ace_dark .ace_fold-widget.ace_end {
|
806
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
|
807
|
+
}
|
808
|
+
.ace_dark .ace_fold-widget.ace_closed {
|
809
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
|
810
|
+
}
|
811
|
+
.ace_dark .ace_fold-widget:hover {
|
812
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
813
|
+
background-color: rgba(255, 255, 255, 0.1);
|
814
|
+
}
|
815
|
+
.ace_dark .ace_fold-widget:active {
|
816
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
817
|
+
}
|
818
|
+
|
819
|
+
.ace_inline_button {
|
820
|
+
border: 1px solid lightgray;
|
821
|
+
display: inline-block;
|
822
|
+
margin: -1px 8px;
|
823
|
+
padding: 0 5px;
|
824
|
+
pointer-events: auto;
|
825
|
+
cursor: pointer;
|
826
|
+
}
|
827
|
+
.ace_inline_button:hover {
|
828
|
+
border-color: gray;
|
829
|
+
background: rgba(200,200,200,0.2);
|
830
|
+
display: inline-block;
|
831
|
+
pointer-events: auto;
|
832
|
+
}
|
833
|
+
|
834
|
+
.ace_fold-widget.ace_invalid {
|
835
|
+
background-color: #FFB4B4;
|
836
|
+
border-color: #DE5555;
|
837
|
+
}
|
838
|
+
|
839
|
+
.ace_fade-fold-widgets .ace_fold-widget {
|
840
|
+
transition: opacity 0.4s ease 0.05s;
|
841
|
+
opacity: 0;
|
842
|
+
}
|
843
|
+
|
844
|
+
.ace_fade-fold-widgets:hover .ace_fold-widget {
|
845
|
+
transition: opacity 0.05s ease 0.05s;
|
846
|
+
opacity:1;
|
847
|
+
}
|
848
|
+
|
849
|
+
.ace_underline {
|
850
|
+
text-decoration: underline;
|
851
|
+
}
|
852
|
+
|
853
|
+
.ace_bold {
|
854
|
+
font-weight: bold;
|
855
|
+
}
|
856
|
+
|
857
|
+
.ace_nobold .ace_bold {
|
858
|
+
font-weight: normal;
|
859
|
+
}
|
860
|
+
|
861
|
+
.ace_italic {
|
862
|
+
font-style: italic;
|
863
|
+
}
|
864
|
+
|
865
|
+
|
866
|
+
.ace_error-marker {
|
867
|
+
background-color: rgba(255, 0, 0,0.2);
|
868
|
+
position: absolute;
|
869
|
+
z-index: 9;
|
870
|
+
}
|
871
|
+
|
872
|
+
.ace_highlight-marker {
|
873
|
+
background-color: rgba(255, 255, 0,0.2);
|
874
|
+
position: absolute;
|
875
|
+
z-index: 8;
|
876
|
+
}
|
877
|
+
|
878
|
+
.ace_mobile-menu {
|
879
|
+
position: absolute;
|
880
|
+
line-height: 1.5;
|
881
|
+
border-radius: 4px;
|
882
|
+
-ms-user-select: none;
|
883
|
+
-moz-user-select: none;
|
884
|
+
-webkit-user-select: none;
|
885
|
+
user-select: none;
|
886
|
+
background: white;
|
887
|
+
box-shadow: 1px 3px 2px grey;
|
888
|
+
border: 1px solid #dcdcdc;
|
889
|
+
color: black;
|
890
|
+
}
|
891
|
+
.ace_dark > .ace_mobile-menu {
|
892
|
+
background: #333;
|
893
|
+
color: #ccc;
|
894
|
+
box-shadow: 1px 3px 2px grey;
|
895
|
+
border: 1px solid #444;
|
896
|
+
|
897
|
+
}
|
898
|
+
.ace_mobile-button {
|
899
|
+
padding: 2px;
|
900
|
+
cursor: pointer;
|
901
|
+
overflow: hidden;
|
902
|
+
}
|
903
|
+
.ace_mobile-button:hover {
|
904
|
+
background-color: #eee;
|
905
|
+
opacity:1;
|
906
|
+
}
|
907
|
+
.ace_mobile-button:active {
|
908
|
+
background-color: #ddd;
|
909
|
+
}
|
910
|
+
|
911
|
+
.ace_placeholder {
|
912
|
+
position: relative;
|
913
|
+
font-family: arial;
|
914
|
+
transform: scale(0.9);
|
915
|
+
transform-origin: left;
|
916
|
+
white-space: pre;
|
917
|
+
opacity: 0.7;
|
918
|
+
margin: 0 10px;
|
919
|
+
z-index: 1;
|
920
|
+
}
|
921
|
+
|
922
|
+
.ace_ghost_text {
|
923
|
+
opacity: 0.5;
|
924
|
+
font-style: italic;
|
925
|
+
}
|
926
|
+
|
927
|
+
.ace_ghost_text_container > div {
|
928
|
+
white-space: pre;
|
929
|
+
}
|
930
|
+
|
931
|
+
.ghost_text_line_wrapped::after {
|
932
|
+
content: "↩";
|
933
|
+
position: absolute;
|
934
|
+
}
|
935
|
+
|
936
|
+
.ace_lineWidgetContainer.ace_ghost_text {
|
937
|
+
margin: 0px 4px
|
938
|
+
}
|
939
|
+
|
940
|
+
.ace_screenreader-only {
|
941
|
+
position:absolute;
|
942
|
+
left:-10000px;
|
943
|
+
top:auto;
|
944
|
+
width:1px;
|
945
|
+
height:1px;
|
946
|
+
overflow:hidden;
|
947
|
+
}
|
948
|
+
|
949
|
+
.ace_hidden_token {
|
950
|
+
display: none;
|
951
|
+
}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(g,p,se){var E=g("../lib/dom"),S=g("../lib/oop"),_=g("../lib/event_emitter").EventEmitter,a=function(){function h(i,r){this.canvas=E.createElement("canvas"),this.renderer=r,this.pixelRatio=1,this.maxHeight=r.layerConfig.maxHeight,this.lineHeight=r.layerConfig.lineHeight,this.canvasHeight=i.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=i.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",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)"},i.element.appendChild(this.canvas)}return h.prototype.$updateDecorators=function(i){var r=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(i){this.maxHeight=i.maxHeight,this.lineHeight=i.lineHeight,this.canvasHeight=i.height;var o=(i.lastRow+1)*this.lineHeight;o<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight}var t=this.canvas.getContext("2d");function e(at,j){return at.priority<j.priority?-1:at.priority>j.priority?1:0}var n=this.renderer.session.$annotations;if(t.clearRect(0,0,this.canvas.width,this.canvas.height),n){var s={info:1,warning:2,error:3};n.forEach(function(at){at.priority=s[at.type]||null}),n=n.sort(e);for(var f=this.renderer.session.$foldData,m=0;m<n.length;m++){var x=n[m].row,A=this.compensateFoldRows(x,f),C=Math.round((x-A)*this.lineHeight*this.heightRatio),b=Math.round((x-A)*this.lineHeight*this.heightRatio),G=Math.round(((x-A)*this.lineHeight+this.lineHeight)*this.heightRatio),Se=G-b;if(Se<this.minDecorationHeight){var q=(b+G)/2|0;q<this.halfMinDecorationHeight?q=this.halfMinDecorationHeight:q+this.halfMinDecorationHeight>this.canvasHeight&&(q=this.canvasHeight-this.halfMinDecorationHeight),b=Math.round(q-this.halfMinDecorationHeight),G=Math.round(q+this.halfMinDecorationHeight)}t.fillStyle=r[n[m].type]||null,t.fillRect(0,C,this.canvasWidth,G-b)}}var U=this.renderer.session.selection.getCursor();if(U){var A=this.compensateFoldRows(U.row,f),C=Math.round((U.row-A)*this.lineHeight*this.heightRatio);t.fillStyle="rgba(0, 0, 0, 0.5)",t.fillRect(0,C,this.canvasWidth,2)}},h.prototype.compensateFoldRows=function(i,r){var o=0;if(r&&r.length>0)for(var t=0;t<r.length;t++)i>r[t].start.row&&i<r[t].end.row?o+=i-r[t].start.row:i>=r[t].end.row&&(o+=r[t].end.row-r[t].start.row);return o},h}();S.implement(a.prototype,_),p.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(g,p,se){var E=g("./lib/oop"),S=g("./lib/dom"),_=g("./lib/lang"),a=g("./config"),h=g("./layer/gutter").Gutter,i=g("./layer/marker").Marker,r=g("./layer/text").Text,o=g("./layer/cursor").Cursor,t=g("./scrollbar").HScrollBar,e=g("./scrollbar").VScrollBar,n=g("./scrollbar_custom").HScrollBar,s=g("./scrollbar_custom").VScrollBar,f=g("./renderloop").RenderLoop,m=g("./layer/font_metrics").FontMetrics,x=g("./lib/event_emitter").EventEmitter,A=g("./css/editor-css"),C=g("./layer/decorators").Decorator,b=g("./lib/useragent"),G=g("./layer/text_util").isTextToken;S.importCssString(A,"ace_editor.css",!1);var Se=function(){function q(U,at){var j=this;this.container=U||S.createElement("div"),S.addCssClass(this.container,"ace_editor"),S.HI_DPI&&S.addCssClass(this.container,"ace_hidpi"),this.setTheme(at),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 h(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new i(this.content);var W=this.$textLayer=new r(this.content);this.canvas=W.element,this.$markerFront=new i(this.content),this.$cursorLayer=new o(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(y){j.$scrollAnimation||j.session.setScrollTop(y.data-j.scrollMargin.top)}),this.scrollBarH.on("scroll",function(y){j.$scrollAnimation||j.session.setScrollLeft(y.data-j.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(y){j.updateCharacterSize(),j.onResize(!0,j.gutterWidth,j.$size.width,j.$size.height),j._signal("changeCharacterSize",y)}),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 f(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(U){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=U,U&&this.scrollMargin.top&&U.getScrollTop()<=0&&U.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(U),this.$markerBack.setSession(U),this.$markerFront.setSession(U),this.$gutterLayer.setSession(U),this.$textLayer.setSession(U),U&&(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(U,at,j){if(at===void 0&&(at=1/0),this.$changedLines?(this.$changedLines.firstRow>U&&(this.$changedLines.firstRow=U),this.$changedLines.lastRow<at&&(this.$changedLines.lastRow=at)):this.$changedLines={firstRow:U,lastRow:at},this.$changedLines.lastRow<this.layerConfig.firstRow)if(j)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(U){U?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(U,at,j,W){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=U?1:0;var y=this.container;W||(W=y.clientHeight||y.scrollHeight),!W&&this.$maxLines&&this.lineHeight>1&&(!y.style.height||y.style.height=="0px")&&(y.style.height="1px",W=y.clientHeight||y.scrollHeight),j||(j=y.clientWidth||y.scrollWidth);var v=this.$updateCachedSize(U,at,j,W);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!j&&!W)return this.resizing=0;U&&(this.$gutterLayer.$padding=null),U?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(U,at,j,W){W-=this.$extraHeight||0;var y=0,v=this.$size,D={width:v.width,height:v.height,scrollerHeight:v.scrollerHeight,scrollerWidth:v.scrollerWidth};if(W&&(U||v.height!=W)&&(v.height=W,y|=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",y=y|this.CHANGE_SCROLL),j&&(U||v.width!=j)){y|=this.CHANGE_SIZE,v.width=j,at==null&&(at=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=at,S.setStyle(this.scrollBarH.element.style,"left",at+"px"),S.setStyle(this.scroller.style,"left",at+this.margin.left+"px"),v.scrollerWidth=Math.max(0,j-at-this.scrollBarV.getWidth()-this.margin.h),S.setStyle(this.$gutter.style,"left",this.margin.left+"px");var Ee=this.scrollBarV.getWidth()+"px";S.setStyle(this.scrollBarH.element.style,"right",Ee),S.setStyle(this.scroller.style,"right",Ee),S.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(v.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||U)&&(y|=this.CHANGE_FULL)}return v.$dirty=!j||!W,y&&this._signal("resize",D),y},q.prototype.onGutterResize=function(U){var at=this.$showGutter?U:0;at!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,at,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 U=this.$size.scrollerWidth-this.$padding*2,at=Math.floor(U/this.characterWidth);return this.session.adjustWrapLimit(at,this.$showPrintMargin&&this.$printMarginColumn)},q.prototype.setAnimatedScroll=function(U){this.setOption("animatedScroll",U)},q.prototype.getAnimatedScroll=function(){return this.$animatedScroll},q.prototype.setShowInvisibles=function(U){this.setOption("showInvisibles",U),this.session.$bidiHandler.setShowInvisibles(U)},q.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},q.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},q.prototype.setDisplayIndentGuides=function(U){this.setOption("displayIndentGuides",U)},q.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},q.prototype.setHighlightIndentGuides=function(U){this.setOption("highlightIndentGuides",U)},q.prototype.setShowPrintMargin=function(U){this.setOption("showPrintMargin",U)},q.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},q.prototype.setPrintMarginColumn=function(U){this.setOption("printMarginColumn",U)},q.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},q.prototype.getShowGutter=function(){return this.getOption("showGutter")},q.prototype.setShowGutter=function(U){return this.setOption("showGutter",U)},q.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},q.prototype.setFadeFoldWidgets=function(U){this.setOption("fadeFoldWidgets",U)},q.prototype.setHighlightGutterLine=function(U){this.setOption("highlightGutterLine",U)},q.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},q.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var U=S.createElement("div");U.className="ace_layer ace_print-margin-layer",this.$printMarginEl=S.createElement("div"),this.$printMarginEl.className="ace_print-margin",U.appendChild(this.$printMarginEl),this.content.insertBefore(U,this.content.firstChild)}var at=this.$printMarginEl.style;at.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",at.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 U=this.textarea.style,at=this.$composition;if(!this.$keepTextAreaAtCursor&&!at){S.translate(this.textarea,-100,0);return}var j=this.$cursorLayer.$pixelPos;if(j){at&&at.markerRange&&(j=this.$cursorLayer.getPixelPosition(at.markerRange.start,!0));var W=this.layerConfig,y=j.top,v=j.left;y-=W.offset;var D=at&&at.useTextareaForIME||b.isMobile?this.lineHeight:1;if(y<0||y>W.height-D){S.translate(this.textarea,0,0);return}var Ee=1,qe=this.$size.height-D;if(!at)y+=this.lineHeight;else if(at.useTextareaForIME){var ot=this.textarea.value;Ee=this.characterWidth*this.session.$getStringScreenWidth(ot)[0]}else y+=this.lineHeight+2;v-=this.scrollLeft,v>this.$size.scrollerWidth-Ee&&(v=this.$size.scrollerWidth-Ee),v+=this.gutterWidth+this.margin.left,S.setStyle(U,"height",D+"px"),S.setStyle(U,"width",Ee+"px"),S.translate(this.textarea,Math.min(v,this.$size.scrollerWidth-Ee),Math.min(y,qe))}}},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 U=this.layerConfig,at=U.lastRow,j=this.session.documentToScreenRow(at,0)*U.lineHeight;return j-this.session.getScrollTop()>U.height-U.lineHeight?at-1:at},q.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},q.prototype.setPadding=function(U){this.$padding=U,this.$textLayer.setPadding(U),this.$cursorLayer.setPadding(U),this.$markerFront.setPadding(U),this.$markerBack.setPadding(U),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},q.prototype.setScrollMargin=function(U,at,j,W){var y=this.scrollMargin;y.top=U|0,y.bottom=at|0,y.right=W|0,y.left=j|0,y.v=y.top+y.bottom,y.h=y.left+y.right,y.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-y.top),this.updateFull()},q.prototype.setMargin=function(U,at,j,W){var y=this.margin;y.top=U|0,y.bottom=at|0,y.right=W|0,y.left=j|0,y.v=y.top+y.bottom,y.h=y.left+y.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(U){this.setOption("hScrollBarAlwaysVisible",U)},q.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},q.prototype.setVScrollBarAlwaysVisible=function(U){this.setOption("vScrollBarAlwaysVisible",U)},q.prototype.$updateScrollBarV=function(){var U=this.layerConfig.maxHeight,at=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(U-=(at-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>U-at&&(U=this.scrollTop+at,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(U+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(U,at){if(this.$changes&&(U|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!U&&!at){this.$changes|=U;return}if(this.$size.$dirty)return this.$changes|=U,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",U),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var j=this.layerConfig;if(U&this.CHANGE_FULL||U&this.CHANGE_SIZE||U&this.CHANGE_TEXT||U&this.CHANGE_LINES||U&this.CHANGE_SCROLL||U&this.CHANGE_H_SCROLL){if(U|=this.$computeLayerConfig()|this.$loop.clear(),j.firstRow!=this.layerConfig.firstRow&&j.firstRowScreen==this.layerConfig.firstRowScreen){var W=this.scrollTop+(j.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;W>0&&(this.scrollTop=W,U=U|this.CHANGE_SCROLL,U|=this.$computeLayerConfig()|this.$loop.clear())}j=this.layerConfig,this.$updateScrollBarV(),U&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),S.translate(this.content,-this.scrollLeft,-j.offset);var y=j.width+2*this.$padding+"px",v=j.minHeight+"px";S.setStyle(this.content.style,"width",y),S.setStyle(this.content.style,"height",v)}if(U&this.CHANGE_H_SCROLL&&(S.translate(this.content,-this.scrollLeft,-j.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),U&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(j),this.$showGutter&&this.$gutterLayer.update(j),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(j),this.$markerBack.update(j),this.$markerFront.update(j),this.$cursorLayer.update(j),this.$moveTextAreaToCursor(),this._signal("afterRender",U);return}if(U&this.CHANGE_SCROLL){this.$changedLines=null,U&this.CHANGE_TEXT||U&this.CHANGE_LINES?this.$textLayer.update(j):this.$textLayer.scrollLines(j),this.$showGutter&&(U&this.CHANGE_GUTTER||U&this.CHANGE_LINES?this.$gutterLayer.update(j):this.$gutterLayer.scrollLines(j)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(j),this.$markerBack.update(j),this.$markerFront.update(j),this.$cursorLayer.update(j),this.$moveTextAreaToCursor(),this._signal("afterRender",U);return}U&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(j),this.$showGutter&&this.$gutterLayer.update(j),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(j)):U&this.CHANGE_LINES?((this.$updateLines()||U&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(j),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(j)):U&this.CHANGE_TEXT||U&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(j),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(j)):U&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(j),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(j)),U&this.CHANGE_CURSOR&&(this.$cursorLayer.update(j),this.$moveTextAreaToCursor()),U&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(j),U&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(j),this._signal("afterRender",U)},q.prototype.$autosize=function(){var U=this.session.getScreenLength()*this.lineHeight,at=this.$maxLines*this.lineHeight,j=Math.min(at,Math.max((this.$minLines||1)*this.lineHeight,U))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(j+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&j>this.$maxPixelHeight&&(j=this.$maxPixelHeight);var W=j<=2*this.lineHeight,y=!W&&U>at;if(j!=this.desiredHeight||this.$size.height!=this.desiredHeight||y!=this.$vScroll){y!=this.$vScroll&&(this.$vScroll=y,this.scrollBarV.setVisible(y));var v=this.container.clientWidth;this.container.style.height=j+"px",this.$updateCachedSize(!0,this.$gutterWidth,v,j),this.desiredHeight=j,this._signal("autosize")}},q.prototype.$computeLayerConfig=function(){var U=this.session,at=this.$size,j=at.height<=2*this.lineHeight,W=this.session.getScreenLength(),y=W*this.lineHeight,v=this.$getLongestLine(),D=!j&&(this.$hScrollBarAlwaysVisible||at.scrollerWidth-v-2*this.$padding<0),Ee=this.$horizScroll!==D;Ee&&(this.$horizScroll=D,this.scrollBarH.setVisible(D));var qe=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),j=at.height<=2*this.lineHeight);var ot=at.scrollerHeight+this.lineHeight,lt=!this.$maxLines&&this.$scrollPastEnd?(at.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;y+=lt;var ct=this.scrollMargin;this.session.setScrollTop(Math.max(-ct.top,Math.min(this.scrollTop,y-at.scrollerHeight+ct.bottom))),this.session.setScrollLeft(Math.max(-ct.left,Math.min(this.scrollLeft,v+2*this.$padding-at.scrollerWidth+ct.right)));var Ut=!j&&(this.$vScrollBarAlwaysVisible||at.scrollerHeight-y+lt<0||this.scrollTop>ct.top),Mt=qe!==Ut;Mt&&(this.$vScroll=Ut,this.scrollBarV.setVisible(Ut));var zt=this.scrollTop%this.lineHeight,Ht=Math.ceil(ot/this.lineHeight)-1,Vt=Math.max(0,Math.round((this.scrollTop-zt)/this.lineHeight)),hi=Vt+Ht,ui,fi,di=this.lineHeight;Vt=U.screenToDocumentRow(Vt,0);var vi=U.getFoldLine(Vt);vi&&(Vt=vi.start.row),ui=U.documentToScreenRow(Vt,0),fi=U.getRowLength(Vt)*di,hi=Math.min(U.screenToDocumentRow(hi,0),U.getLength()-1),ot=at.scrollerHeight+U.getRowLength(hi)*di+fi,zt=this.scrollTop-ui*di;var wi=0;return(this.layerConfig.width!=v||Ee)&&(wi=this.CHANGE_H_SCROLL),(Ee||Mt)&&(wi|=this.$updateCachedSize(!0,this.gutterWidth,at.width,at.height),this._signal("scrollbarVisibilityChanged"),Mt&&(v=this.$getLongestLine())),this.layerConfig={width:v,padding:this.$padding,firstRow:Vt,firstRowScreen:ui,lastRow:hi,lineHeight:di,characterWidth:this.characterWidth,minHeight:ot,maxHeight:y,offset:zt,gutterOffset:di?Math.max(0,Math.ceil((zt+at.height-at.scrollerHeight)/di)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(v-this.$padding),wi},q.prototype.$updateLines=function(){if(this.$changedLines){var U=this.$changedLines.firstRow,at=this.$changedLines.lastRow;this.$changedLines=null;var j=this.layerConfig;if(!(U>j.lastRow+1)&&!(at<j.firstRow)){if(at===1/0){this.$showGutter&&this.$gutterLayer.update(j),this.$textLayer.update(j);return}return this.$textLayer.updateLines(j,U,at),!0}}},q.prototype.$getLongestLine=function(){var U=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(U+=1),this.$textLayer&&U>this.$textLayer.MAX_LINE_LENGTH&&(U=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(U*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(U,at){this.$gutterLayer.addGutterDecoration(U,at)},q.prototype.removeGutterDecoration=function(U,at){this.$gutterLayer.removeGutterDecoration(U,at)},q.prototype.updateBreakpoints=function(U){this._rows=U,this.$loop.schedule(this.CHANGE_GUTTER)},q.prototype.setAnnotations=function(U){this.$gutterLayer.setAnnotations(U),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(U,at,j){this.scrollCursorIntoView(U,j),this.scrollCursorIntoView(at,j)},q.prototype.scrollCursorIntoView=function(U,at,j){if(this.$size.scrollerHeight!==0){var W=this.$cursorLayer.getPixelPosition(U),y=W.left,v=W.top,D=j&&j.top||0,Ee=j&&j.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var qe=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;qe+D>v?(at&&qe+D>v+this.lineHeight&&(v-=at*this.$size.scrollerHeight),v===0&&(v=-this.scrollMargin.top),this.session.setScrollTop(v)):qe+this.$size.scrollerHeight-Ee<v+this.lineHeight&&(at&&qe+this.$size.scrollerHeight-Ee<v-this.lineHeight&&(v+=at*this.$size.scrollerHeight),this.session.setScrollTop(v+this.lineHeight+Ee-this.$size.scrollerHeight));var ot=this.scrollLeft,lt=2*this.layerConfig.characterWidth;y-lt<ot?(y-=lt,y<this.$padding+lt&&(y=-this.scrollMargin.left),this.session.setScrollLeft(y)):(y+=lt,ot+this.$size.scrollerWidth<y+this.characterWidth?this.session.setScrollLeft(Math.round(y+this.characterWidth-this.$size.scrollerWidth)):ot<=this.$padding&&y-ot<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(U){this.session.setScrollTop(U*this.lineHeight)},q.prototype.alignCursor=function(U,at){typeof U=="number"&&(U={row:U,column:0});var j=this.$cursorLayer.getPixelPosition(U),W=this.$size.scrollerHeight-this.lineHeight,y=j.top-W*(at||0);return this.session.setScrollTop(y),y},q.prototype.$calcSteps=function(U,at){var j=0,W=this.STEPS,y=[],v=function(D,Ee,qe){return qe*(Math.pow(D-1,3)+1)+Ee};for(j=0;j<W;++j)y.push(v(j/this.STEPS,U,at-U));return y},q.prototype.scrollToLine=function(U,at,j,W){var y=this.$cursorLayer.getPixelPosition({row:U,column:0}),v=y.top;at&&(v-=this.$size.scrollerHeight/2);var D=this.scrollTop;this.session.setScrollTop(v),j!==!1&&this.animateScrolling(D,W)},q.prototype.animateScrolling=function(U,at){var j=this.scrollTop;if(!this.$animatedScroll)return;var W=this;if(U==j)return;if(this.$scrollAnimation){var y=this.$scrollAnimation.steps;if(y.length&&(U=y[0],U==j))return}var v=W.$calcSteps(U,j);this.$scrollAnimation={from:U,to:j,steps:v},clearInterval(this.$timer),W.session.setScrollTop(v.shift()),W.session.$scrollTop=j;function D(){W.$timer=clearInterval(W.$timer),W.$scrollAnimation=null,W.$stopAnimation=!1,at&&at()}this.$timer=setInterval(function(){if(W.$stopAnimation){D();return}if(!W.session)return clearInterval(W.$timer);v.length?(W.session.setScrollTop(v.shift()),W.session.$scrollTop=j):j!=null?(W.session.$scrollTop=-1,W.session.setScrollTop(j),j=null):D()},10)},q.prototype.scrollToY=function(U){this.scrollTop!==U&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=U)},q.prototype.scrollToX=function(U){this.scrollLeft!==U&&(this.scrollLeft=U),this.$loop.schedule(this.CHANGE_H_SCROLL)},q.prototype.scrollTo=function(U,at){this.session.setScrollTop(at),this.session.setScrollLeft(U)},q.prototype.scrollBy=function(U,at){at&&this.session.setScrollTop(this.session.getScrollTop()+at),U&&this.session.setScrollLeft(this.session.getScrollLeft()+U)},q.prototype.isScrollableBy=function(U,at){if(at<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||at>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||U<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||U>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},q.prototype.pixelToScreenCoordinates=function(U,at){var j;if(this.$hasCssTransforms){j={top:0,left:0};var W=this.$fontMetrics.transformCoordinates([U,at]);U=W[1]-this.gutterWidth-this.margin.left,at=W[0]}else j=this.scroller.getBoundingClientRect();var y=U+this.scrollLeft-j.left-this.$padding,v=y/this.characterWidth,D=Math.floor((at+this.scrollTop-j.top)/this.lineHeight),Ee=this.$blockCursor?Math.floor(v):Math.round(v);return{row:D,column:Ee,side:v-Ee>0?1:-1,offsetX:y}},q.prototype.screenToTextCoordinates=function(U,at){var j;if(this.$hasCssTransforms){j={top:0,left:0};var W=this.$fontMetrics.transformCoordinates([U,at]);U=W[1]-this.gutterWidth-this.margin.left,at=W[0]}else j=this.scroller.getBoundingClientRect();var y=U+this.scrollLeft-j.left-this.$padding,v=y/this.characterWidth,D=this.$blockCursor?Math.floor(v):Math.round(v),Ee=Math.floor((at+this.scrollTop-j.top)/this.lineHeight);return this.session.screenToDocumentPosition(Ee,Math.max(D,0),y)},q.prototype.textToScreenCoordinates=function(U,at){var j=this.scroller.getBoundingClientRect(),W=this.session.documentToScreenPosition(U,at),y=this.$padding+(this.session.$bidiHandler.isBidiRow(W.row,U)?this.session.$bidiHandler.getPosLeft(W.column):Math.round(W.column*this.characterWidth)),v=W.row*this.lineHeight;return{pageX:j.left+y-this.scrollLeft,pageY:j.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(U){this.$composition=U,U.cssText||(U.cssText=this.textarea.style.cssText),U.useTextareaForIME==null&&(U.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(S.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):U.markerId=this.session.addMarker(U.markerRange,"ace_composition_marker","text")},q.prototype.setCompositionText=function(U){var at=this.session.selection.cursor;this.addToken(U,"composition_placeholder",at.row,at.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 U=this.session.selection.cursor;this.removeExtraToken(U.row,U.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},q.prototype.setGhostText=function(U,at){var j=this.session.selection.cursor,W=at||{row:j.row,column:j.column};this.removeGhostText();var y=this.$calculateWrappedTextChunks(U,W);this.addToken(y[0].text,"ghost_text",W.row,W.column),this.$ghostText={text:U,position:{row:W.row,column:W.column}};var v=S.createElement("div");if(y.length>1){var D=this.hideTokensAfterPosition(W.row,W.column),Ee;y.slice(1).forEach(function(Mt){var zt=S.createElement("div"),Ht=S.createElement("span");Ht.className="ace_ghost_text",Mt.wrapped&&(zt.className="ghost_text_line_wrapped"),Mt.text.length===0&&(Mt.text=" "),Ht.appendChild(S.createTextNode(Mt.text)),zt.appendChild(Ht),v.appendChild(zt),Ee=zt}),D.forEach(function(Mt){var zt=S.createElement("span");G(Mt.type)||(zt.className="ace_"+Mt.type.replace(/\./g," ace_")),zt.appendChild(S.createTextNode(Mt.value)),Ee.appendChild(zt)}),this.$ghostTextWidget={el:v,row:W.row,column:W.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var qe=this.$cursorLayer.getPixelPosition(W,!0),ot=this.container,lt=ot.getBoundingClientRect().height,ct=y.length*this.lineHeight,Ut=ct<lt-qe.top;if(Ut)return;ct<lt?this.scrollBy(0,(y.length-1)*this.lineHeight):this.scrollToRow(W.row)}},q.prototype.$calculateWrappedTextChunks=function(U,at){var j=this.$size.scrollerWidth-this.$padding*2,W=Math.floor(j/this.characterWidth)-2;W=W<=0?60:W;for(var y=U.split(/\r?\n/),v=[],D=0;D<y.length;D++){var Ee=this.session.$getDisplayTokens(y[D],at.column),qe=this.session.$computeWrapSplits(Ee,W,this.session.$tabSize);if(qe.length>0){var ot=0;qe.push(y[D].length);for(var lt=0;lt<qe.length;lt++){var ct=y[D].slice(ot,qe[lt]);v.push({text:ct,wrapped:!0}),ot=qe[lt]}}else v.push({text:y[D],wrapped:!1})}return v},q.prototype.removeGhostText=function(){if(this.$ghostText){var U=this.$ghostText.position;this.removeExtraToken(U.row,U.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},q.prototype.addToken=function(U,at,j,W){var y=this.session;y.bgTokenizer.lines[j]=null;var v={type:at,value:U},D=y.getTokens(j);if(W==null||!D.length)D.push(v);else for(var Ee=0,qe=0;qe<D.length;qe++){var ot=D[qe];if(Ee+=ot.value.length,W<=Ee){var lt=ot.value.length-(Ee-W),ct=ot.value.slice(0,lt),Ut=ot.value.slice(lt);D.splice(qe,1,{type:ot.type,value:ct},v,{type:ot.type,value:Ut});break}}this.updateLines(j,j)},q.prototype.hideTokensAfterPosition=function(U,at){for(var j=this.session.getTokens(U),W=0,y=!1,v=[],D=0;D<j.length;D++){var Ee=j[D];if(W+=Ee.value.length,Ee.type!=="ghost_text"){if(y){v.push({type:Ee.type,value:Ee.value}),Ee.type="hidden_token";continue}W===at&&(y=!0)}}return this.updateLines(U,U),v},q.prototype.removeExtraToken=function(U,at){this.session.bgTokenizer.lines[U]=null,this.updateLines(U,U)},q.prototype.setTheme=function(U,at){var j=this;if(this.$themeId=U,j._dispatchEvent("themeChange",{theme:U}),!U||typeof U=="string"){var W=U||this.$options.theme.initialValue;a.loadModule(["theme",W],y)}else y(U);function y(v){if(j.$themeId!=U)return at&&at();if(!v||!v.cssClass)throw new Error("couldn't load module "+U+" or it didn't call define");v.$id&&(j.$themeId=v.$id),S.importCssString(v.cssText,v.cssClass,j.container),j.theme&&S.removeCssClass(j.container,j.theme.cssClass);var D="padding"in v?v.padding:"padding"in(j.theme||{})?4:j.$padding;j.$padding&&D!=j.$padding&&j.setPadding(D),j.$theme=v.cssClass,j.theme=v,S.addCssClass(j.container,v.cssClass),S.setCssClass(j.container,"ace_dark",v.isDark),j.$size&&(j.$size.width=0,j.$updateSizeAsync()),j._dispatchEvent("themeLoaded",{theme:v}),at&&at(),b.isSafari&&j.scroller&&(j.scroller.style.background="red",j.scroller.style.background="")}},q.prototype.getTheme=function(){return this.$themeId},q.prototype.setStyle=function(U,at){S.setCssClass(this.container,U,at!==!1)},q.prototype.unsetStyle=function(U){S.removeCssClass(this.container,U)},q.prototype.setCursorStyle=function(U){S.setStyle(this.scroller.style,"cursor",U)},q.prototype.setMouseCursor=function(U){S.setStyle(this.scroller.style,"cursor",U)},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(U){var at=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,U===!0?(this.scrollBarV=new s(this.container,this),this.scrollBarH=new n(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(j){at.$scrollAnimation||at.session.setScrollTop(j.data-at.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(j){at.$scrollAnimation||at.session.setScrollLeft(j.data-at.scrollMargin.left)}),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(j){at.$scrollAnimation||at.session.setScrollTop(j.data-at.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(j){at.$scrollAnimation||at.session.setScrollLeft(j.data-at.scrollMargin.left)}))},q.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var U=this;this.$resizeTimer=_.delayedCall(function(){U.destroyed||U.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(at){var j=at[0].contentRect.width,W=at[0].contentRect.height;Math.abs(U.$size.width-j)>1||Math.abs(U.$size.height-W)>1?U.$resizeTimer.delay():U.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},q}();Se.prototype.CHANGE_CURSOR=1,Se.prototype.CHANGE_MARKER=2,Se.prototype.CHANGE_GUTTER=4,Se.prototype.CHANGE_SCROLL=8,Se.prototype.CHANGE_LINES=16,Se.prototype.CHANGE_TEXT=32,Se.prototype.CHANGE_SIZE=64,Se.prototype.CHANGE_MARKER_BACK=128,Se.prototype.CHANGE_MARKER_FRONT=256,Se.prototype.CHANGE_FULL=512,Se.prototype.CHANGE_H_SCROLL=1024,Se.prototype.$changes=0,Se.prototype.$padding=null,Se.prototype.$frozen=!1,Se.prototype.STEPS=8,E.implement(Se.prototype,x),a.defineOptions(Se.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}}),p.VirtualRenderer=Se}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(g,p,se){var E=g("../lib/oop"),S=g("../lib/net"),_=g("../lib/event_emitter").EventEmitter,a=g("../config");function h(t){var e="importScripts('"+S.qualifyURL(t)+"');";try{return new Blob([e],{type:"application/javascript"})}catch{var n=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,s=new n;return s.append(e),s.getBlob("application/javascript")}}function i(t){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var e=h(t),n=window.URL||window.webkitURL,s=n.createObjectURL(e);return new Worker(s)}return new Worker(t)}var r=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,_),this.$createWorkerFromOldConfig=function(t,e,n,s,f){if(g.nameToUrl&&!g.toUrl&&(g.toUrl=g.nameToUrl),a.get("packaged")||!g.toUrl)s=s||a.moduleUrl(e,"worker");else{var m=this.$normalizePath;s=s||m(g.toUrl("ace/worker/worker.js",null,"_"));var x={};t.forEach(function(A){x[A]=m(g.toUrl(A,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=i(s),f&&this.send("importScripts",f),this.$worker.postMessage({init:!0,tlns:x,module:e,classname:n}),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 n=this.callbacks[e.id];n&&(n(e.data),delete this.callbacks[e.id]);break;case"error":this.reportError(e.data);break;case"log":window.console&&console.log&&console.log.apply(console,e.data);break}},this.reportError=function(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,n){if(n){var s=this.callbackId++;this.callbacks[s]=n,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(n){console.error(n.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(r.prototype);var o=function(t,e,n){var s=null,f=!1,m=Object.create(_),x=[],A=new r({messageBuffer:x,terminate:function(){},postMessage:function(b){x.push(b),s&&(f?setTimeout(C):C())}});A.setEmitSync=function(b){f=b};var C=function(){var b=x.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,G){this.postMessage({type:"call",id:G,data:b})},m.emit=function(b,G){this.postMessage({type:"event",name:b,data:G})},a.loadModule(["worker",e],function(b){for(s=new b[n](m);x.length;)C()}),A};p.UIWorkerClient=o,p.WorkerClient=r,p.createWorker=i}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(g,p,se){var E=g("./range").Range,S=g("./lib/event_emitter").EventEmitter,_=g("./lib/oop"),a=function(){function h(i,r,o,t,e,n){var s=this;this.length=r,this.session=i,this.doc=i.getDocument(),this.mainClass=e,this.othersClass=n,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=o;var f=i.getUndoManager().$undoStack||i.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=f.length,this.setup(),i.selection.on("changeCursor",this.$onCursorChange)}return h.prototype.setup=function(){var i=this,r=this.doc,o=this.session;this.selectionBefore=o.selection.toJSON(),o.selection.inMultiSelectMode&&o.selection.toSingleRange(),this.pos=r.createAnchor(this.$pos.row,this.$pos.column);var t=this.pos;t.$insertRight=!0,t.detach(),t.markerId=o.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 n=r.createAnchor(e.row,e.column);n.$insertRight=!0,n.detach(),i.others.push(n)}),o.setUndoSelect(!1)},h.prototype.showOtherMarkers=function(){if(!this.othersActive){var i=this.session,r=this;this.othersActive=!0,this.others.forEach(function(o){o.markerId=i.addMarker(new E(o.row,o.column,o.row,o.column+r.length),r.othersClass,null,!1)})}},h.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var i=0;i<this.others.length;i++)this.session.removeMarker(this.others[i].markerId)}},h.prototype.onUpdate=function(i){if(this.$updating)return this.updateAnchors(i);var r=i;if(r.start.row===r.end.row&&r.start.row===this.pos.row){this.$updating=!0;var o=i.action==="insert"?r.end.column-r.start.column:r.start.column-r.end.column,t=r.start.column>=this.pos.column&&r.start.column<=this.pos.column+this.length+1,e=r.start.column-this.pos.column;if(this.updateAnchors(i),t&&(this.length+=o),t&&!this.session.$fromUndo){if(i.action==="insert")for(var n=this.others.length-1;n>=0;n--){var s=this.others[n],f={row:s.row,column:s.column+e};this.doc.insertMergedLines(f,i.lines)}else if(i.action==="remove")for(var n=this.others.length-1;n>=0;n--){var s=this.others[n],f={row:s.row,column:s.column+e};this.doc.remove(new E(f.row,f.column,f.row,f.column-o))}}this.$updating=!1,this.updateMarkers()}},h.prototype.updateAnchors=function(i){this.pos.onChange(i);for(var r=this.others.length;r--;)this.others[r].onChange(i);this.updateMarkers()},h.prototype.updateMarkers=function(){if(!this.$updating){var i=this,r=this.session,o=function(e,n){r.removeMarker(e.markerId),e.markerId=r.addMarker(new E(e.row,e.column,e.row,e.column+i.length),n,null,!1)};o(this.pos,this.mainClass);for(var t=this.others.length;t--;)o(this.others[t],this.othersClass)}},h.prototype.onCursorChange=function(i){if(!(this.$updating||!this.session)){var r=this.session.selection.getCursor();r.row===this.pos.row&&r.column>=this.pos.column&&r.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",i)):(this.hideOtherMarkers(),this._emit("cursorLeave",i))}},h.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},h.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var i=this.session.getUndoManager(),r=(i.$undoStack||i.$undostack).length-this.$undoStackDepth,o=0;o<r;o++)i.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},h}();_.implement(a.prototype,S),p.PlaceHolder=a}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(g,p,se){var E=g("../lib/event"),S=g("../lib/useragent");function _(h,i){return h.row==i.row&&h.column==i.column}function a(h){var i=h.domEvent,r=i.altKey,o=i.shiftKey,t=i.ctrlKey,e=h.getAccelKey(),n=h.getButton();if(t&&S.isMac&&(n=i.button),h.editor.inMultiSelectMode&&n==2){h.editor.textInput.onContextMenu(h.domEvent);return}if(!t&&!r&&!e){n===0&&h.editor.inMultiSelectMode&&h.editor.exitMultiSelectMode();return}if(n===0){var s=h.editor,f=s.selection,m=s.inMultiSelectMode,x=h.getDocumentPosition(),A=f.getCursor(),C=h.inSelection()||f.isEmpty()&&_(x,A),b=h.x,G=h.y,Se=function(ct){b=ct.clientX,G=ct.clientY},q=s.session,U=s.renderer.pixelToScreenCoordinates(b,G),at=U,j;if(s.$mouseHandler.$enableJumpToDef)t&&r||e&&r?j=o?"block":"add":r&&s.$blockSelectEnabled&&(j="block");else if(e&&!r){if(j="add",!m&&o)return}else r&&s.$blockSelectEnabled&&(j="block");if(j&&S.isMac&&i.ctrlKey&&s.$mouseHandler.cancelContextMenu(),j=="add"){if(!m&&C)return;if(!m){var W=f.toOrientedRange();s.addSelectionMarker(W)}var y=f.rangeList.rangeAtPoint(x);s.inVirtualSelectionMode=!0,o&&(y=null,W=f.ranges[0]||W,s.removeSelectionMarker(W)),s.once("mouseup",function(){var ct=f.toOrientedRange();y&&ct.isEmpty()&&_(y.cursor,ct.cursor)?f.substractPoint(ct.cursor):(o?f.substractPoint(W.cursor):W&&(s.removeSelectionMarker(W),f.addRange(W)),f.addRange(ct)),s.inVirtualSelectionMode=!1})}else if(j=="block"){h.stop(),s.inVirtualSelectionMode=!0;var v,D=[],Ee=function(){var ct=s.renderer.pixelToScreenCoordinates(b,G),Ut=q.screenToDocumentPosition(ct.row,ct.column,ct.offsetX);_(at,ct)&&_(Ut,f.lead)||(at=ct,s.selection.moveToPosition(Ut),s.renderer.scrollCursorIntoView(),s.removeSelectionMarkers(D),D=f.rectangularRangeBlock(at,U),s.$mouseHandler.$clickSelection&&D.length==1&&D[0].isEmpty()&&(D[0]=s.$mouseHandler.$clickSelection.clone()),D.forEach(s.addSelectionMarker,s),s.updateSelectionMarkers())};m&&!e?f.toSingleRange():!m&&e&&(v=f.toOrientedRange(),s.addSelectionMarker(v)),o?U=q.documentToScreenPosition(f.lead):f.moveToPosition(x),at={row:-1,column:-1};var qe=function(ct){Ee(),clearInterval(lt),s.removeSelectionMarkers(D),D.length||(D=[f.toOrientedRange()]),v&&(s.removeSelectionMarker(v),f.toSingleRange(v));for(var Ut=0;Ut<D.length;Ut++)f.addRange(D[Ut]);s.inVirtualSelectionMode=!1,s.$mouseHandler.$clickSelection=null},ot=Ee;E.capture(s.container,Se,qe);var lt=setInterval(function(){ot()},20);return h.preventDefault()}}}p.onMouseDown=a}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(g,p,se){p.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}],p.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=g("../keyboard/hash_handler").HashHandler;p.keyboardHandler=new E(p.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(g,p,se){var E=g("./range_list").RangeList,S=g("./range").Range,_=g("./selection").Selection,a=g("./mouse/multi_select_handler").onMouseDown,h=g("./lib/event"),i=g("./lib/lang"),r=g("./commands/multi_select_commands");p.commands=r.defaultCommands.concat(r.multiSelectCommands);var o=g("./search").Search,t=new o;function e(A,C,b){return t.$options.wrap=!0,t.$options.needle=C,t.$options.backwards=b==-1,t.find(A)}var n=g("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(n.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 G=this.rangeList.add(A);return this.$onAddRange(A),G.length&&this.$onRemoveRange(G),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 G=this.ranges.indexOf(A[b]);this.ranges.splice(G,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 G=A[b],Se=G.start.row,q=G.end.row;if(Se===q)C.push(G.clone());else{for(C.push(new S(Se,G.start.column,Se,this.session.getLine(Se).length));++Se<q;)C.push(this.getLineRange(Se,!0));C.push(new S(q,0,q,G.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 G=this.session.documentToScreenPosition(this.cursor),Se=this.session.documentToScreenPosition(this.anchor),q=this.rectangularRangeBlock(G,Se);q.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(A,C,b){var G=[],Se=A.column<C.column;if(Se)var q=A.column,U=C.column,at=A.offsetX,j=C.offsetX;else var q=C.column,U=A.column,at=C.offsetX,j=A.offsetX;var W=A.row<C.row;if(W)var y=A.row,v=C.row;else var y=C.row,v=A.row;q<0&&(q=0),y<0&&(y=0),y==v&&(b=!0);for(var D,Ee=y;Ee<=v;Ee++){var qe=S.fromPoints(this.session.screenToDocumentPosition(Ee,q,at),this.session.screenToDocumentPosition(Ee,U,j));if(qe.isEmpty()){if(D&&f(qe.end,D))break;D=qe.end}qe.cursor=Se?qe.start:qe.end,G.push(qe)}if(W&&G.reverse(),!b){for(var ot=G.length-1;G[ot].isEmpty()&&ot>0;)ot--;if(ot>0)for(var lt=0;G[lt].isEmpty();)lt++;for(var ct=ot;ct>=lt;ct--)G[ct].isEmpty()&&G.splice(ct,1)}return G}}).call(_.prototype);var s=g("./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 G=A[b];if(G.marker){this.session.removeMarker(G.marker);var Se=C.indexOf(G);Se!=-1&&C.splice(Se,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(r.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(r.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"?G=b.forEachSelection(C,A.args):C.multiSelectAction=="forEachLine"?G=b.forEachSelection(C,A.args,!0):C.multiSelectAction=="single"?(b.exitMultiSelectMode(),G=C.exec(b,A.args||{})):G=C.multiSelectAction(b,A.args||{});else{var G=C.exec(b,A.args||{});b.multiSelect.addRange(b.multiSelect.toOrientedRange()),b.multiSelect.mergeOverlappingRanges()}return G}},this.forEachSelection=function(A,C,b){if(!this.inVirtualSelectionMode){var G=b&&b.keepOrder,Se=b==!0||b&&b.$byLines,q=this.session,U=this.selection,at=U.rangeList,j=(G?U:at).ranges,W;if(!j.length)return A.exec?A.exec(this,C||{}):A(this,C||{});var y=U._eventRegistry;U._eventRegistry={};var v=new _(q);this.inVirtualSelectionMode=!0;for(var D=j.length;D--;){if(Se)for(;D>0&&j[D].start.row==j[D-1].end.row;)D--;v.fromOrientedRange(j[D]),v.index=D,this.selection=q.selection=v;var Ee=A.exec?A.exec(this,C||{}):A(this,C||{});!W&&Ee!==void 0&&(W=Ee),v.toOrientedRange(j[D])}v.detach(),this.selection=q.selection=U,this.inVirtualSelectionMode=!1,U._eventRegistry=y,U.mergeOverlappingRanges(),U.ranges[0]&&U.fromOrientedRange(U.ranges[0]);var qe=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),qe&&qe.from==qe.to&&this.renderer.animateScrolling(qe.from),W}},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=[],G=0;G<C.length;G++)b.push(this.session.getTextRange(C[G]));var Se=this.session.getDocument().getNewLineCharacter();A=b.join(Se),A.length==(b.length-1)*Se.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 G=C==this.multiSelect.anchor?b.cursor==b.start?b.end:b.start:b.cursor;G.row!=C.row||this.session.$clipPositionToDocument(G.row,G.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 G=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();C.needle=this.session.getTextRange(G)}this.$search.set(C);var Se=this.$search.findAll(this.session);if(!Se.length)return 0;var q=this.multiSelect;b||q.toSingleRange(Se[0]);for(var U=Se.length;U--;)q.addRange(Se[U],!0);return G&&q.rangeList.rangeAtPoint(G.start)&&q.addRange(G,!0),Se.length},this.selectMoreLines=function(A,C){var b=this.selection.toOrientedRange(),G=b.cursor==b.end,Se=this.session.documentToScreenPosition(b.cursor);this.selection.$desiredColumn&&(Se.column=this.selection.$desiredColumn);var q=this.session.screenToDocumentPosition(Se.row+A,Se.column);if(b.isEmpty())var at=q;else var U=this.session.documentToScreenPosition(G?b.end:b.start),at=this.session.screenToDocumentPosition(U.row+A,U.column);if(G){var j=S.fromPoints(q,at);j.cursor=j.start}else{var j=S.fromPoints(at,q);j.cursor=j.end}if(j.desiredColumn=Se.column,!this.selection.inMultiSelectMode)this.selection.addRange(b);else if(C)var W=b.cursor;this.selection.addRange(j),W&&this.selection.substractPoint(W)},this.transposeSelections=function(A){for(var C=this.session,b=C.multiSelect,G=b.ranges,Se=G.length;Se--;){var q=G[Se];if(q.isEmpty()){var U=C.getWordRange(q.start.row,q.start.column);q.start.row=U.start.row,q.start.column=U.start.column,q.end.row=U.end.row,q.end.column=U.end.column}}b.mergeOverlappingRanges();for(var at=[],Se=G.length;Se--;){var q=G[Se];at.unshift(C.getTextRange(q))}A<0?at.unshift(at.pop()):at.push(at.shift());for(var Se=G.length;Se--;){var q=G[Se],j=q.clone();C.replace(q,at[Se]),q.start.row=j.start.row,q.start.column=j.start.column}b.fromOrientedRange(b.ranges[0])},this.selectMore=function(A,C,b){var G=this.session,Se=G.multiSelect,q=Se.toOrientedRange();if(!(q.isEmpty()&&(q=G.getWordRange(q.start.row,q.start.column),q.cursor=A==-1?q.start:q.end,this.multiSelect.addRange(q),b))){var U=G.getTextRange(q),at=e(G,U,A);at&&(at.cursor=A==-1?at.start:at.end,this.session.unfold(at),this.multiSelect.addRange(at),this.renderer.scrollCursorIntoView(null,.5)),C&&this.multiSelect.substractPoint(q.cursor)}},this.alignCursors=function(){var A=this.session,C=A.multiSelect,b=C.ranges,G=-1,Se=b.filter(function(ot){if(ot.cursor.row==G)return!0;G=ot.cursor.row});if(!b.length||Se.length==b.length-1){var q=this.selection.getRange(),U=q.start.row,at=q.end.row,j=U==at;if(j){var W=this.session.getLength(),y;do y=this.session.getLine(at);while(/[=:]/.test(y)&&++at<W);do y=this.session.getLine(U);while(/[=:]/.test(y)&&--U>0);U<0&&(U=0),at>=W&&(at=W-1)}var v=this.session.removeFullLines(U,at);v=this.$reAlignText(v,j),this.session.insert({row:U,column:0},v.join(`
|
952
|
+
`)+`
|
953
|
+
`),j||(q.start.column=0,q.end.column=v[v.length-1].length),this.selection.setRange(q)}else{Se.forEach(function(ot){C.substractPoint(ot.cursor)});var D=0,Ee=1/0,qe=b.map(function(ot){var lt=ot.cursor,ct=A.getLine(lt.row),Ut=ct.substr(lt.column).search(/\S/g);return Ut==-1&&(Ut=0),lt.column>D&&(D=lt.column),Ut<Ee&&(Ee=Ut),Ut});b.forEach(function(ot,lt){var ct=ot.cursor,Ut=D-ct.column,Mt=qe[lt]-Ee;Ut>Mt?A.insert(ct,i.stringRepeat(" ",Ut-Mt)):A.remove(new S(ct.row,ct.column,ct.row,ct.column-Ut+Mt)),ot.start.column=ot.end.column=D,ot.start.row=ot.end.row=ct.row,ot.cursor=ot.end}),C.fromOrientedRange(b[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(A,C){var b=!0,G=!0,Se,q,U;return A.map(function(v){var D=v.match(/(\s*)(.*?)(\s*)([=:].*)/);return D?Se==null?(Se=D[1].length,q=D[2].length,U=D[3].length,D):(Se+q+U!=D[1].length+D[2].length+D[3].length&&(G=!1),Se!=D[1].length&&(b=!1),Se>D[1].length&&(Se=D[1].length),q<D[2].length&&(q=D[2].length),U>D[3].length&&(U=D[3].length),D):[v]}).map(C?j:b?G?W:j:y);function at(v){return i.stringRepeat(" ",v)}function j(v){return v[2]?at(Se)+v[2]+at(q-v[2].length+U)+v[4].replace(/^([=:])\s+/,"$1 "):v[0]}function W(v){return v[2]?at(Se+q-v[2].length)+v[2]+at(U)+v[4].replace(/^([=:])\s+/,"$1 "):v[0]}function y(v){return v[2]?at(Se)+v[2]+at(U)+v[4].replace(/^([=:])\s+/,"$1 "):v[0]}}}).call(s.prototype);function f(A,C){return A.row==C.row&&A.column==C.column}p.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=p.onSessionChange.bind(A),A.$checkMultiselectChange=A.$checkMultiselectChange.bind(A),A.$multiselectOnSessionChange(A),A.on("changeSession",A.$multiselectOnSessionChange),A.on("mousedown",a),A.commands.addCommands(r.defaultCommands),x(A))}function x(A){if(!A.textInput)return;var C=A.textInput.getElement(),b=!1;h.addListener(C,"keydown",function(Se){var q=Se.keyCode==18&&!(Se.ctrlKey||Se.shiftKey||Se.metaKey);A.$blockSelectEnabled&&q?b||(A.renderer.setMouseCursor("crosshair"),b=!0):b&&G()},A),h.addListener(C,"keyup",G,A),h.addListener(C,"blur",G,A);function G(Se){b&&(A.renderer.setMouseCursor(""),b=!1)}}p.MultiSelect=m,g("./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(g,p,se){var E=g("../../range").Range,S=p.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(_,a,h){var i=_.getLine(h);return this.foldingStartMarker.test(i)?"start":a=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(_,a,h){return null},this.indentationBlock=function(_,a,h){var i=/\S/,r=_.getLine(a),o=r.search(i);if(o!=-1){for(var t=h||r.length,e=_.getLength(),n=a,s=a;++a<e;){var f=_.getLine(a).search(i);if(f!=-1){if(f<=o){var m=_.getTokenAt(a,0);if(!m||m.type!=="string")break}s=a}}if(s>n){var x=_.getLine(s).length;return new E(n,t,s,x)}}},this.openingBracketBlock=function(_,a,h,i,r){var o={row:h,column:i+1},t=_.$findClosingBracket(a,o,r);if(t){var e=_.foldWidgets[t.row];return e==null&&(e=_.getFoldWidget(t.row)),e=="start"&&t.row>o.row&&(t.row--,t.column=_.getLine(t.row).length),E.fromPoints(o,t)}},this.closingBracketBlock=function(_,a,h,i,r){var o={row:h,column:i},t=_.$findOpeningBracket(a,o);if(t)return t.column++,o.column--,E.fromPoints(t,o)}}).call(S.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(g,p,se){var E=g("../lib/dom"),S=g("../range").Range,_=g("../config").nls;function a(i,r,o){for(var t=0,e=i.length-1;t<=e;){var n=t+e>>1,s=o(r,i[n]);if(s>0)t=n+1;else if(s<0)e=n-1;else return n}return-(t+1)}function h(i,r,o){var t=i.getAnnotations().sort(S.comparePoints);if(t.length){var e=a(t,{row:r,column:-1},S.comparePoints);e<0&&(e=-e-1),e>=t.length?e=o>0?0:t.length-1:e===0&&o<0&&(e=t.length-1);var n=t[e];if(!(!n||!o)){if(n.row===r){do n=t[e+=o];while(n&&n.row===r);if(!n)return t.slice()}var s=[];r=n.row;do s[o<0?"unshift":"push"](n),n=t[e+=o];while(n&&n.row==r);return s.length&&s}}}p.showErrorMarker=function(i,r){var o=i.session,t=i.getCursorPosition(),e=t.row,n=o.widgetManager.getWidgetsAtRow(e).filter(function(Se){return Se.type=="errorMarker"})[0];n?n.destroy():e-=r;var s=h(o,e,r),f;if(s){var m=s[0];t.column=(m.pos&&typeof m.column!="number"?m.pos.sc:m.column)||0,t.row=m.row,f=i.renderer.$gutterLayer.$annotations[t.row]}else{if(n)return;f={displayText:[_("error-marker.good-state","Looks good!")],className:"ace_ok"}}i.session.unfold(t.row),i.selection.moveToPosition(t);var x={row:t.row,fixedWidth:!0,coverGutter:!0,el:E.createElement("div"),type:"errorMarker"},A=x.el.appendChild(E.createElement("div")),C=x.el.appendChild(E.createElement("div"));C.className="error_widget_arrow "+f.className;var b=i.renderer.$cursorLayer.getPixelPosition(t).left;C.style.left=b+i.renderer.gutterWidth-5+"px",x.el.className="error_widget_wrapper",A.className="error_widget "+f.className,f.displayText.forEach(function(Se,q){A.appendChild(E.createTextNode(Se)),q<f.displayText.length-1&&A.appendChild(E.createElement("br"))}),A.appendChild(E.createElement("div"));var G=function(Se,q,U){if(q===0&&(U==="esc"||U==="return"))return x.destroy(),{command:"null"}};x.destroy=function(){i.$mouseHandler.isMousePressed||(i.keyBinding.removeKeyboardHandler(G),o.widgetManager.removeLineWidget(x),i.off("changeSelection",x.destroy),i.off("changeSession",x.destroy),i.off("mouseup",x.destroy),i.off("change",x.destroy))},i.keyBinding.addKeyboardHandler(G),i.on("changeSelection",x.destroy),i.on("changeSession",x.destroy),i.on("mouseup",x.destroy),i.on("change",x.destroy),i.session.widgetManager.addLineWidget(x),x.el.onmousedown=i.focus.bind(i),i.renderer.scrollCursorIntoView(null,.5,{bottom:x.el.offsetHeight})},E.importCssString(`
|
954
|
+
.error_widget_wrapper {
|
955
|
+
background: inherit;
|
956
|
+
color: inherit;
|
957
|
+
border:none
|
958
|
+
}
|
959
|
+
.error_widget {
|
960
|
+
border-top: solid 2px;
|
961
|
+
border-bottom: solid 2px;
|
962
|
+
margin: 5px 0;
|
963
|
+
padding: 10px 40px;
|
964
|
+
white-space: pre-wrap;
|
965
|
+
}
|
966
|
+
.error_widget.ace_error, .error_widget_arrow.ace_error{
|
967
|
+
border-color: #ff5a5a
|
968
|
+
}
|
969
|
+
.error_widget.ace_warning, .error_widget_arrow.ace_warning{
|
970
|
+
border-color: #F1D817
|
971
|
+
}
|
972
|
+
.error_widget.ace_info, .error_widget_arrow.ace_info{
|
973
|
+
border-color: #5a5a5a
|
974
|
+
}
|
975
|
+
.error_widget.ace_ok, .error_widget_arrow.ace_ok{
|
976
|
+
border-color: #5aaa5a
|
977
|
+
}
|
978
|
+
.error_widget_arrow {
|
979
|
+
position: absolute;
|
980
|
+
border: solid 5px;
|
981
|
+
border-top-color: transparent!important;
|
982
|
+
border-right-color: transparent!important;
|
983
|
+
border-left-color: transparent!important;
|
984
|
+
top: -5px;
|
985
|
+
}
|
986
|
+
`,"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(g,p,se){g("./loader_build")(p);var E=g("./lib/dom"),S=g("./range").Range,_=g("./editor").Editor,a=g("./edit_session").EditSession,h=g("./undomanager").UndoManager,i=g("./virtual_renderer").VirtualRenderer;g("./worker/worker_client"),g("./keyboard/hash_handler"),g("./placeholder"),g("./multi_select"),g("./mode/folding/fold_mode"),g("./theme/textmate"),g("./ext/error_marker"),p.config=g("./config"),p.edit=function(o,t){if(typeof o=="string"){var e=o;if(o=document.getElementById(e),!o)throw new Error("ace.edit can't find div #"+e)}if(o&&o.env&&o.env.editor instanceof _)return o.env.editor;var n="";if(o&&/input|textarea/i.test(o.tagName)){var s=o;n=s.value,o=E.createElement("pre"),s.parentNode.replaceChild(o,s)}else o&&(n=o.textContent,o.innerHTML="");var f=p.createEditSession(n),m=new _(new i(o),f,t),x={document:f,editor:m,onResize:m.resize.bind(m,null)};return s&&(x.textarea=s),m.on("destroy",function(){x.editor.container.env=null}),m.container.env=m.env=x,m},p.createEditSession=function(o,t){var e=new a(o,t);return e.setUndoManager(new h),e},p.Range=S,p.Editor=_,p.EditSession=a,p.UndoManager=h,p.VirtualRenderer=i;var r=p.config.version;p.version=r}),function(){ace.require(["ace/ace"],function(g){g&&(g.config.init(!0),g.define=ace.define);var p=function(){return this}();!p&&typeof window<"u"&&(p=window),!p&&typeof self<"u"&&(p=self),p.ace||(p.ace=g);for(var se in g)g.hasOwnProperty(se)&&(p.ace[se]=g[se]);p.ace.default=p.ace,c&&(c.exports=p.ace)})}()}(ace$1)),ace$1.exports}var aceExports=requireAce(),modeRuby={exports:{}},hasRequiredModeRuby;function requireModeRuby(){return hasRequiredModeRuby||(hasRequiredModeRuby=1,function(c,u){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(g,p,se){var E=g("../lib/oop"),S=g("./text_highlight_rules").TextHighlightRules,_=p.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};p.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},p.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},p.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var a=p.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},h=p.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},i=p.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},r=p.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},o=p.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},t=p.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},e=p.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},n=p.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},s=function(){var f="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",x="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":x,"variable.language":A,"support.function":f,"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})*})`,G={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};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(Se,q,U){U.length&&(U=[]);var at=Se[Se.length-1];return U.unshift(at,q),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(Se,q,U){U.length&&(U=[]);var at=Se[Se.length-1];return U.unshift(at,q),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(Se,q,U){U.length&&(U=[]);var at=Se[Se.length-1];return U.unshift(at,q),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(Se,q,U){U.length&&(U=[]);var at=Se[Se.length-1];return U.unshift(at,q),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(Se,q,U){U.length&&(U=[]);var at=Se[Se.length-1];return U.unshift(at,q),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},n,{token:"variable.global",regex:"[$][a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]*"},{token:["punctuation.operator","support.function"],regex:/(\.)([a-zA-Z_\d]+)(?=\()/},{token:["punctuation.operator","identifier"],regex:/(\.)([a-zA-Z_][a-zA-Z_\d]*)/},{token:"string.character",regex:"\\B\\?(?:"+b+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},o,t,_,a,e,h,i,r,{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(Se,q,U){var at=Se[2]=="-"||Se[2]=="~"?"indentedHeredoc":"heredoc",j=Se.split(this.splitRegex);return U.push(at,j[3]),[{type:"constant",value:j[1]},{type:"string",value:j[2]},{type:"support.class",value:j[3]},{type:"string",value:j[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(Se,q,U){return Se===U[1]?(U.shift(),U.shift(),this.next=U[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(Se,q,U){return Se===U[1]?(U.shift(),U.shift(),this.next=U[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(Se,q){return q[0]==="heredoc"||q[0]==="indentedHeredoc"?q[0]:Se}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(Se,q,U){return this.next="",Se=="}"&&U.length>1&&U[1]!="start"&&(U.shift(),this.next=U.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(Se,q,U){return U.length&&Se===U[0]?(U.unshift(Se,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(Se,q,U){return U.length&&Se===G[U[0]]?(U.shift(),this.next=U.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(Se,q,U){return U.length&&Se===U[0]?(U.unshift(Se,q),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(Se,q,U){return U.length&&Se===G[U[0]]?(U.shift(),this.next=U.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(Se,q,U){return U.length&&Se===U[0]?(U.unshift(Se,q),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(Se,q,U){return U.length&&Se===G[U[0]]?(U.shift(),this.next=U.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(Se,q,U){return U.length&&Se===U[0]?(U.unshift(Se,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(Se,q,U){return U.length&&Se===G[U[0]]?(U.shift(),this.next=U.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(Se,q,U){return U.length&&Se===U[0]?(U.unshift(Se,q),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(Se,q,U){return U.length&&Se[0]===G[U[0]]?(U.shift(),this.next=U.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),p.RubyHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(g,p,se){var E=g("../range").Range,S=function(){};(function(){this.checkOutdent=function(_,a){return/^\s+$/.test(_)?/^\s*\}/.test(a):!1},this.autoOutdent=function(_,a){var h=_.getLine(a),i=h.match(/^(\s*\})/);if(!i)return 0;var r=i[1].length,o=_.findMatchingBracket({row:a,column:r});if(!o||o.row==a)return 0;var t=this.$getIndent(_.getLine(o.row));_.replace(new E(a,0,a,r-1),t)},this.$getIndent=function(_){return _.match(/^\s*/)[0]}}).call(S.prototype),p.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(g,p,se){var E=g("../../lib/oop"),S=g("./fold_mode").FoldMode,_=g("../../range").Range,a=g("../../token_iterator").TokenIterator,h=p.FoldMode=function(){};E.inherits(h,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(i,r,o){var t=i.getLine(o),e=this.foldingStartMarker.test(t),n=this.foldingStopMarker.test(t);if(e&&!n){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(i.getTokenAt(o,s.index+2).type==="keyword")return"start"}else if(!s[3]||i.getTokenAt(o,s.index+1).type==="comment.multiline")return"start"}if(r!="markbeginend"||!n||e&&n)return"";var s=t.match(this.foldingStopMarker);if(s[3]==="end"){if(i.getTokenAt(o,s.index+1).type==="keyword")return"end"}else if(!s[1]||i.getTokenAt(o,s.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(i,r,o){var t=i.doc.getLine(o),e=this.foldingStartMarker.exec(t);if(e)return e[1]||e[3]?this.rubyBlock(i,o,e.index+2):this.openingBracketBlock(i,"{",o,e.index);var e=this.foldingStopMarker.exec(t);if(e)return e[3]==="end"&&i.getTokenAt(o,e.index+1).type==="keyword"?this.rubyBlock(i,o,e.index+1):e[1]==="=end"&&i.getTokenAt(o,e.index+1).type==="comment.multiline"?this.rubyBlock(i,o,e.index+1):this.closingBracketBlock(i,"}",o,e.index+e[0].length)},this.rubyBlock=function(i,j,o,t){var e=new a(i,j,o),n=e.getCurrentToken();if(!(!n||n.type!="keyword"&&n.type!="comment.multiline")){var s=n.value,f=i.getLine(j);switch(n.value){case"if":case"unless":case"while":case"until":var m=new RegExp("^\\s*"+n.value);if(!m.test(f))return;var x=this.indentKeywords[s];break;case"when":if(/\sthen\s/.test(f))return;case"elsif":case"rescue":case"ensure":var x=1;break;case"else":var m=new RegExp("^\\s*"+n.value+"\\s*$");if(!m.test(f))return;var x=1;break;default:var x=this.indentKeywords[s]}var A=[s];if(x){var C=x===-1?i.getLine(j-1).length:i.getLine(j).length,b=j,G=[];if(G.push(e.getCurrentTokenRange()),e.step=x===-1?e.stepBackward:e.stepForward,n.type=="comment.multiline"){for(;n=e.step();)if(n.type==="comment.multiline"){if(x==1){if(C=6,n.value=="=end")break}else if(n.value=="=begin")break}}else for(;n=e.step();){var Se=!1;if(n.type==="keyword"){var q=x*this.indentKeywords[n.value];switch(f=i.getLine(e.getCurrentTokenRow()),n.value){case"do":for(var U=e.$tokenIndex-1;U>=0;U--){var at=e.$rowTokens[U];if(at&&(at.value=="while"||at.value=="until"||at.value=="for")){q=0;break}}break;case"else":var m=new RegExp("^\\s*"+n.value+"\\s*$");(!m.test(f)||s=="case")&&(q=0,Se=!0);break;case"if":case"unless":case"while":case"until":var m=new RegExp("^\\s*"+n.value);m.test(f)||(q=0,Se=!0);break;case"when":(/\sthen\s/.test(f)||s=="case")&&(q=0,Se=!0)}if(q>0)A.unshift(n.value);else if(q<=0&&Se===!1){if(A.shift(),!A.length&&((s=="while"||s=="until"||s=="for")&&n.value!="do"||n.value=="do"&&x==-1&&q!=0||n.value!="do"))break;q===0&&A.unshift(n.value)}}}if(!n)return null;if(t)return G.push(e.getCurrentTokenRange()),G;var j=e.getCurrentTokenRow();if(x===-1){if(n.type==="comment.multiline")var W=6;else var W=i.getLine(j).length;return new _(j,W,b-1,C)}return new _(b,C,j-1,i.getLine(j-1).length)}}}}).call(h.prototype)}),ace.define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/ruby"],function(g,p,se){var E=g("../lib/oop"),S=g("./text").Mode,_=g("./ruby_highlight_rules").RubyHighlightRules,a=g("./matching_brace_outdent").MatchingBraceOutdent,h=g("../range").Range,i=g("./folding/ruby").FoldMode,r=function(){this.HighlightRules=_,this.$outdent=new a,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new i,this.indentKeywords=this.foldingRules.indentKeywords};E.inherits(r,S),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(o,t,e){var n=this.$getIndent(t),s=this.getTokenizer().getLineTokens(t,o),f=s.tokens;if(f.length&&f[f.length-1].type=="comment")return n;if(o=="start"){var m=t.match(/^.*[\{\(\[]\s*$/),x=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||x||A||C)&&(n+=e)}return n},this.checkOutdent=function(o,t,e){return/^\s+(end|else|rescue|ensure)$/.test(t+e)||this.$outdent.checkOutdent(t,e)},this.autoOutdent=function(o,t,e){var n=t.getLine(e);if(/}/.test(n))return this.$outdent.autoOutdent(t,e);var s=this.$getIndent(n),f=t.getLine(e-1),m=this.$getIndent(f),x=t.getTabString();m.length<=s.length&&s.slice(-x.length)==x&&t.remove(new h(e,s.length-x.length,e,s.length))},this.getMatching=function(o,t,e){if(t==null){var n=o.selection.lead;e=n.column,t=n.row}var s=o.getTokenAt(t,e);if(s&&s.value in this.indentKeywords)return this.foldingRules.rubyBlock(o,t,e,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(r.prototype),p.Mode=r}),function(){ace.require(["ace/mode/ruby"],function(g){c&&(c.exports=g)})}()}(modeRuby)),modeRuby.exports}requireModeRuby();var themeTwilight={exports:{}},hasRequiredThemeTwilight;function requireThemeTwilight(){return hasRequiredThemeTwilight||(hasRequiredThemeTwilight=1,function(c,u){ace.define("ace/theme/twilight-css",["require","exports","module"],function(g,p,se){se.exports=`.ace-twilight .ace_gutter {
|
987
|
+
background: #232323;
|
988
|
+
color: #E2E2E2
|
989
|
+
}
|
990
|
+
|
991
|
+
.ace-twilight .ace_print-margin {
|
992
|
+
width: 1px;
|
993
|
+
background: #232323
|
994
|
+
}
|
995
|
+
|
996
|
+
.ace-twilight {
|
997
|
+
background-color: #141414;
|
998
|
+
color: #F8F8F8
|
999
|
+
}
|
1000
|
+
|
1001
|
+
.ace-twilight .ace_cursor {
|
1002
|
+
color: #A7A7A7
|
1003
|
+
}
|
1004
|
+
|
1005
|
+
.ace-twilight .ace_marker-layer .ace_selection {
|
1006
|
+
background: rgba(221, 240, 255, 0.20)
|
1007
|
+
}
|
1008
|
+
|
1009
|
+
.ace-twilight.ace_multiselect .ace_selection.ace_start {
|
1010
|
+
box-shadow: 0 0 3px 0px #141414;
|
1011
|
+
}
|
1012
|
+
|
1013
|
+
.ace-twilight .ace_marker-layer .ace_step {
|
1014
|
+
background: rgb(102, 82, 0)
|
1015
|
+
}
|
1016
|
+
|
1017
|
+
.ace-twilight .ace_marker-layer .ace_bracket {
|
1018
|
+
margin: -1px 0 0 -1px;
|
1019
|
+
border: 1px solid rgba(255, 255, 255, 0.25)
|
1020
|
+
}
|
1021
|
+
|
1022
|
+
.ace-twilight .ace_marker-layer .ace_active-line {
|
1023
|
+
background: rgba(255, 255, 255, 0.031)
|
1024
|
+
}
|
1025
|
+
|
1026
|
+
.ace-twilight .ace_gutter-active-line {
|
1027
|
+
background-color: rgba(255, 255, 255, 0.031)
|
1028
|
+
}
|
1029
|
+
|
1030
|
+
.ace-twilight .ace_marker-layer .ace_selected-word {
|
1031
|
+
border: 1px solid rgba(221, 240, 255, 0.20)
|
1032
|
+
}
|
1033
|
+
|
1034
|
+
.ace-twilight .ace_invisible {
|
1035
|
+
color: rgba(255, 255, 255, 0.25)
|
1036
|
+
}
|
1037
|
+
|
1038
|
+
.ace-twilight .ace_keyword,
|
1039
|
+
.ace-twilight .ace_meta {
|
1040
|
+
color: #CDA869
|
1041
|
+
}
|
1042
|
+
|
1043
|
+
.ace-twilight .ace_constant,
|
1044
|
+
.ace-twilight .ace_constant.ace_character,
|
1045
|
+
.ace-twilight .ace_constant.ace_character.ace_escape,
|
1046
|
+
.ace-twilight .ace_constant.ace_other,
|
1047
|
+
.ace-twilight .ace_heading,
|
1048
|
+
.ace-twilight .ace_markup.ace_heading,
|
1049
|
+
.ace-twilight .ace_support.ace_constant {
|
1050
|
+
color: #CF6A4C
|
1051
|
+
}
|
1052
|
+
|
1053
|
+
.ace-twilight .ace_invalid.ace_illegal {
|
1054
|
+
color: #F8F8F8;
|
1055
|
+
background-color: rgba(86, 45, 86, 0.75)
|
1056
|
+
}
|
1057
|
+
|
1058
|
+
.ace-twilight .ace_invalid.ace_deprecated {
|
1059
|
+
text-decoration: underline;
|
1060
|
+
font-style: italic;
|
1061
|
+
color: #D2A8A1
|
1062
|
+
}
|
1063
|
+
|
1064
|
+
.ace-twilight .ace_support {
|
1065
|
+
color: #9B859D
|
1066
|
+
}
|
1067
|
+
|
1068
|
+
.ace-twilight .ace_fold {
|
1069
|
+
background-color: #AC885B;
|
1070
|
+
border-color: #F8F8F8
|
1071
|
+
}
|
1072
|
+
|
1073
|
+
.ace-twilight .ace_support.ace_function {
|
1074
|
+
color: #DAD085
|
1075
|
+
}
|
1076
|
+
|
1077
|
+
.ace-twilight .ace_list,
|
1078
|
+
.ace-twilight .ace_markup.ace_list,
|
1079
|
+
.ace-twilight .ace_storage {
|
1080
|
+
color: #F9EE98
|
1081
|
+
}
|
1082
|
+
|
1083
|
+
.ace-twilight .ace_entity.ace_name.ace_function,
|
1084
|
+
.ace-twilight .ace_meta.ace_tag {
|
1085
|
+
color: #AC885B
|
1086
|
+
}
|
1087
|
+
|
1088
|
+
.ace-twilight .ace_string {
|
1089
|
+
color: #8F9D6A
|
1090
|
+
}
|
1091
|
+
|
1092
|
+
.ace-twilight .ace_string.ace_regexp {
|
1093
|
+
color: #E9C062
|
1094
|
+
}
|
1095
|
+
|
1096
|
+
.ace-twilight .ace_comment {
|
1097
|
+
font-style: italic;
|
1098
|
+
color: #5F5A60
|
1099
|
+
}
|
1100
|
+
|
1101
|
+
.ace-twilight .ace_variable {
|
1102
|
+
color: #7587A6
|
1103
|
+
}
|
1104
|
+
|
1105
|
+
.ace-twilight .ace_xml-pe {
|
1106
|
+
color: #494949
|
1107
|
+
}
|
1108
|
+
|
1109
|
+
.ace-twilight .ace_indent-guide {
|
1110
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y
|
1111
|
+
}
|
1112
|
+
|
1113
|
+
.ace-twilight .ace_indent-guide-active {
|
1114
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
|
1115
|
+
}
|
1116
|
+
`}),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],function(g,p,se){p.isDark=!0,p.cssClass="ace-twilight",p.cssText=g("./twilight-css");var E=g("../lib/dom");E.importCssString(p.cssText,p.cssClass,!1)}),function(){ace.require(["ace/theme/twilight"],function(g){c&&(c.exports=g)})}()}(themeTwilight)),themeTwilight.exports}requireThemeTwilight();var Gt=Object.defineProperty,Zt=(c,u,g)=>u in c?Gt(c,u,{enumerable:!0,configurable:!0,writable:!0,value:g}):c[u]=g,L=(c,u,g)=>Zt(c,typeof u!="symbol"?u+"":u,g);function mt(c,u){return function(){return c.apply(u,arguments)}}const{toString:Qt}=Object.prototype,{getPrototypeOf:$e}=Object,{iterator:de,toStringTag:gt}=Symbol,fe=(c=>u=>{const g=Qt.call(u);return c[g]||(c[g]=g.slice(8,-1).toLowerCase())})(Object.create(null)),$=c=>(c=c.toLowerCase(),u=>fe(u)===c),pe=c=>u=>typeof u===c,{isArray:K}=Array,Y=pe("undefined");function Yt(c){return c!==null&&!Y(c)&&c.constructor!==null&&!Y(c.constructor)&&T(c.constructor.isBuffer)&&c.constructor.isBuffer(c)}const bt=$("ArrayBuffer");function en(c){let u;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?u=ArrayBuffer.isView(c):u=c&&c.buffer&&bt(c.buffer),u}const tn=pe("string"),T=pe("function"),wt=pe("number"),me=c=>c!==null&&typeof c=="object",nn=c=>c===!0||c===!1,ce=c=>{if(fe(c)!=="object")return!1;const u=$e(c);return(u===null||u===Object.prototype||Object.getPrototypeOf(u)===null)&&!(gt in c)&&!(de in c)},sn=$("Date"),rn=$("File"),on=$("Blob"),cn=$("FileList"),an=c=>me(c)&&T(c.pipe),ln=c=>{let u;return c&&(typeof FormData=="function"&&c instanceof FormData||T(c.append)&&((u=fe(c))==="formdata"||u==="object"&&T(c.toString)&&c.toString()==="[object FormData]"))},un=$("URLSearchParams"),[hn,dn,fn,pn]=["ReadableStream","Request","Response","Headers"].map($),mn=c=>c.trim?c.trim():c.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ee(c,u,{allOwnKeys:g=!1}={}){if(c===null||typeof c>"u")return;let p,se;if(typeof c!="object"&&(c=[c]),K(c))for(p=0,se=c.length;p<se;p++)u.call(null,c[p],p,c);else{const E=g?Object.getOwnPropertyNames(c):Object.keys(c),S=E.length;let _;for(p=0;p<S;p++)_=E[p],u.call(null,c[_],_,c)}}function yt(c,u){u=u.toLowerCase();const g=Object.keys(c);let p=g.length,se;for(;p-- >0;)if(se=g[p],u===se.toLowerCase())return se;return null}const H=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,_t=c=>!Y(c)&&c!==H;function Ce(){const{caseless:c}=_t(this)&&this||{},u={},g=(p,se)=>{const E=c&&yt(u,se)||se;ce(u[E])&&ce(p)?u[E]=Ce(u[E],p):ce(p)?u[E]=Ce({},p):K(p)?u[E]=p.slice():u[E]=p};for(let p=0,se=arguments.length;p<se;p++)arguments[p]&&ee(arguments[p],g);return u}const gn=(c,u,g,{allOwnKeys:p}={})=>(ee(u,(se,E)=>{g&&T(se)?c[E]=mt(se,g):c[E]=se},{allOwnKeys:p}),c),bn=c=>(c.charCodeAt(0)===65279&&(c=c.slice(1)),c),wn=(c,u,g,p)=>{c.prototype=Object.create(u.prototype,p),c.prototype.constructor=c,Object.defineProperty(c,"super",{value:u.prototype}),g&&Object.assign(c.prototype,g)},yn=(c,u,g,p)=>{let se,E,S;const _={};if(u=u||{},c==null)return u;do{for(se=Object.getOwnPropertyNames(c),E=se.length;E-- >0;)S=se[E],(!p||p(S,c,u))&&!_[S]&&(u[S]=c[S],_[S]=!0);c=g!==!1&&$e(c)}while(c&&(!g||g(c,u))&&c!==Object.prototype);return u},_n=(c,u,g)=>{c=String(c),(g===void 0||g>c.length)&&(g=c.length),g-=u.length;const p=c.indexOf(u,g);return p!==-1&&p===g},En=c=>{if(!c)return null;if(K(c))return c;let u=c.length;if(!wt(u))return null;const g=new Array(u);for(;u-- >0;)g[u]=c[u];return g},Sn=(c=>u=>c&&u instanceof c)(typeof Uint8Array<"u"&&$e(Uint8Array)),xn=(c,u)=>{const g=(c&&c[de]).call(c);let p;for(;(p=g.next())&&!p.done;){const se=p.value;u.call(c,se[0],se[1])}},Rn=(c,u)=>{let g;const p=[];for(;(g=c.exec(u))!==null;)p.push(g);return p},An=$("HTMLFormElement"),On=c=>c.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(u,g,p){return g.toUpperCase()+p}),Je=(({hasOwnProperty:c})=>(u,g)=>c.call(u,g))(Object.prototype),Cn=$("RegExp"),Et=(c,u)=>{const g=Object.getOwnPropertyDescriptors(c),p={};ee(g,(se,E)=>{let S;(S=u(se,E,c))!==!1&&(p[E]=S||se)}),Object.defineProperties(c,p)},Tn=c=>{Et(c,(u,g)=>{if(T(c)&&["arguments","caller","callee"].indexOf(g)!==-1)return!1;const p=c[g];if(T(p)){if(u.enumerable=!1,"writable"in u){u.writable=!1;return}u.set||(u.set=()=>{throw Error("Can not rewrite read-only method '"+g+"'")})}})},kn=(c,u)=>{const g={},p=se=>{se.forEach(E=>{g[E]=!0})};return K(c)?p(c):p(String(c).split(u)),g},Nn=()=>{},Pn=(c,u)=>c!=null&&Number.isFinite(c=+c)?c:u;function In(c){return!!(c&&T(c.append)&&c[gt]==="FormData"&&c[de])}const vn=c=>{const u=new Array(10),g=(p,se)=>{if(me(p)){if(u.indexOf(p)>=0)return;if(!("toJSON"in p)){u[se]=p;const E=K(p)?[]:{};return ee(p,(S,_)=>{const a=g(S,se+1);!Y(a)&&(E[_]=a)}),u[se]=void 0,E}}return p};return g(c,0)},Ln=$("AsyncFunction"),jn=c=>c&&(me(c)||T(c))&&T(c.then)&&T(c.catch),St=((c,u)=>c?setImmediate:u?((g,p)=>(H.addEventListener("message",({source:se,data:E})=>{se===H&&E===g&&p.length&&p.shift()()},!1),se=>{p.push(se),H.postMessage(g,"*")}))(`axios@${Math.random()}`,[]):g=>setTimeout(g))(typeof setImmediate=="function",T(H.postMessage)),$n=typeof queueMicrotask<"u"?queueMicrotask.bind(H):typeof process<"u"&&process.nextTick||St,Fn=c=>c!=null&&T(c[de]),l={isArray:K,isArrayBuffer:bt,isBuffer:Yt,isFormData:ln,isArrayBufferView:en,isString:tn,isNumber:wt,isBoolean:nn,isObject:me,isPlainObject:ce,isReadableStream:hn,isRequest:dn,isResponse:fn,isHeaders:pn,isUndefined:Y,isDate:sn,isFile:rn,isBlob:on,isRegExp:Cn,isFunction:T,isStream:an,isURLSearchParams:un,isTypedArray:Sn,isFileList:cn,forEach:ee,merge:Ce,extend:gn,trim:mn,stripBOM:bn,inherits:wn,toFlatObject:yn,kindOf:fe,kindOfTest:$,endsWith:_n,toArray:En,forEachEntry:xn,matchAll:Rn,isHTMLForm:An,hasOwnProperty:Je,hasOwnProp:Je,reduceDescriptors:Et,freezeMethods:Tn,toObjectSet:kn,toCamelCase:On,noop:Nn,toFiniteNumber:Pn,findKey:yt,global:H,isContextDefined:_t,isSpecCompliantForm:In,toJSONObject:vn,isAsyncFn:Ln,isThenable:jn,setImmediate:St,asap:$n,isIterable:Fn};function w(c,u,g,p,se){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=c,this.name="AxiosError",u&&(this.code=u),g&&(this.config=g),p&&(this.request=p),se&&(this.response=se,this.status=se.status?se.status:null)}l.inherits(w,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:l.toJSONObject(this.config),code:this.code,status:this.status}}});const xt=w.prototype,Rt={};["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=>{Rt[c]={value:c}}),Object.defineProperties(w,Rt),Object.defineProperty(xt,"isAxiosError",{value:!0}),w.from=(c,u,g,p,se,E)=>{const S=Object.create(xt);return l.toFlatObject(c,S,function(_){return _!==Error.prototype},_=>_!=="isAxiosError"),w.call(S,c.message,u,g,p,se),S.cause=c,S.name=c.name,E&&Object.assign(S,E),S};const Un=null;function Te(c){return l.isPlainObject(c)||l.isArray(c)}function At(c){return l.endsWith(c,"[]")?c.slice(0,-2):c}function We(c,u,g){return c?c.concat(u).map(function(p,se){return p=At(p),!g&&se?"["+p+"]":p}).join(g?".":""):u}function Dn(c){return l.isArray(c)&&!c.some(Te)}const qn=l.toFlatObject(l,{},null,function(c){return/^is[A-Z]/.test(c)});function ge(c,u,g){if(!l.isObject(c))throw new TypeError("target must be an object");u=u||new FormData,g=l.toFlatObject(g,{metaTokens:!0,dots:!1,indexes:!1},!1,function(t,e){return!l.isUndefined(e[t])});const p=g.metaTokens,se=g.visitor||h,E=g.dots,S=g.indexes,_=(g.Blob||typeof Blob<"u"&&Blob)&&l.isSpecCompliantForm(u);if(!l.isFunction(se))throw new TypeError("visitor must be a function");function a(t){if(t===null)return"";if(l.isDate(t))return t.toISOString();if(!_&&l.isBlob(t))throw new w("Blob is not supported. Use a Buffer instead.");return l.isArrayBuffer(t)||l.isTypedArray(t)?_&&typeof Blob=="function"?new Blob([t]):Buffer.from(t):t}function h(t,e,n){let s=t;if(t&&!n&&typeof t=="object"){if(l.endsWith(e,"{}"))e=p?e:e.slice(0,-2),t=JSON.stringify(t);else if(l.isArray(t)&&Dn(t)||(l.isFileList(t)||l.endsWith(e,"[]"))&&(s=l.toArray(t)))return e=At(e),s.forEach(function(f,m){!(l.isUndefined(f)||f===null)&&u.append(S===!0?We([e],m,E):S===null?e:e+"[]",a(f))}),!1}return Te(t)?!0:(u.append(We(n,e,E),a(t)),!1)}const i=[],r=Object.assign(qn,{defaultVisitor:h,convertValue:a,isVisitable:Te});function o(t,e){if(!l.isUndefined(t)){if(i.indexOf(t)!==-1)throw Error("Circular reference detected in "+e.join("."));i.push(t),l.forEach(t,function(n,s){(!(l.isUndefined(n)||n===null)&&se.call(u,n,l.isString(s)?s.trim():s,e,r))===!0&&o(n,e?e.concat(s):[s])}),i.pop()}}if(!l.isObject(c))throw new TypeError("data must be an object");return o(c),u}function Ke(c){const u={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(c).replace(/[!'()~]|%20|%00/g,function(g){return u[g]})}function Fe(c,u){this._pairs=[],c&&ge(c,this,u)}const Ot=Fe.prototype;Ot.append=function(c,u){this._pairs.push([c,u])},Ot.toString=function(c){const u=c?function(g){return c.call(this,g,Ke)}:Ke;return this._pairs.map(function(g){return u(g[0])+"="+u(g[1])},"").join("&")};function Bn(c){return encodeURIComponent(c).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ct(c,u,g){if(!u)return c;const p=g&&g.encode||Bn;l.isFunction(g)&&(g={serialize:g});const se=g&&g.serialize;let E;if(se?E=se(u,g):E=l.isURLSearchParams(u)?u.toString():new Fe(u,g).toString(p),E){const S=c.indexOf("#");S!==-1&&(c=c.slice(0,S)),c+=(c.indexOf("?")===-1?"?":"&")+E}return c}class Xe{constructor(){this.handlers=[]}use(u,g,p){return this.handlers.push({fulfilled:u,rejected:g,synchronous:p?p.synchronous:!1,runWhen:p?p.runWhen:null}),this.handlers.length-1}eject(u){this.handlers[u]&&(this.handlers[u]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(u){l.forEach(this.handlers,function(g){g!==null&&u(g)})}}const Tt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Mn=typeof URLSearchParams<"u"?URLSearchParams:Fe,Hn=typeof FormData<"u"?FormData:null,zn=typeof Blob<"u"?Blob:null,Vn={isBrowser:!0,classes:{URLSearchParams:Mn,FormData:Hn,Blob:zn},protocols:["http","https","file","blob","url","data"]},Ue=typeof window<"u"&&typeof document<"u",ke=typeof navigator=="object"&&navigator||void 0,Jn=Ue&&(!ke||["ReactNative","NativeScript","NS"].indexOf(ke.product)<0),Wn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Kn=Ue&&window.location.href||"http://localhost",Xn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ue,hasStandardBrowserEnv:Jn,hasStandardBrowserWebWorkerEnv:Wn,navigator:ke,origin:Kn},Symbol.toStringTag,{value:"Module"})),O={...Xn,...Vn};function Gn(c,u){return ge(c,new O.classes.URLSearchParams,Object.assign({visitor:function(g,p,se,E){return O.isNode&&l.isBuffer(g)?(this.append(p,g.toString("base64")),!1):E.defaultVisitor.apply(this,arguments)}},u))}function Zn(c){return l.matchAll(/\w+|\[(\w*)]/g,c).map(u=>u[0]==="[]"?"":u[1]||u[0])}function Qn(c){const u={},g=Object.keys(c);let p;const se=g.length;let E;for(p=0;p<se;p++)E=g[p],u[E]=c[E];return u}function kt(c){function u(g,p,se,E){let S=g[E++];if(S==="__proto__")return!0;const _=Number.isFinite(+S),a=E>=g.length;return S=!S&&l.isArray(se)?se.length:S,a?(l.hasOwnProp(se,S)?se[S]=[se[S],p]:se[S]=p,!_):((!se[S]||!l.isObject(se[S]))&&(se[S]=[]),u(g,p,se[S],E)&&l.isArray(se[S])&&(se[S]=Qn(se[S])),!_)}if(l.isFormData(c)&&l.isFunction(c.entries)){const g={};return l.forEachEntry(c,(p,se)=>{u(Zn(p),se,g,0)}),g}return null}function Yn(c,u,g){if(l.isString(c))try{return(u||JSON.parse)(c),l.trim(c)}catch(p){if(p.name!=="SyntaxError")throw p}return(g||JSON.stringify)(c)}const te={transitional:Tt,adapter:["xhr","http","fetch"],transformRequest:[function(c,u){const g=u.getContentType()||"",p=g.indexOf("application/json")>-1,se=l.isObject(c);if(se&&l.isHTMLForm(c)&&(c=new FormData(c)),l.isFormData(c))return p?JSON.stringify(kt(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 u.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),c.toString();let E;if(se){if(g.indexOf("application/x-www-form-urlencoded")>-1)return Gn(c,this.formSerializer).toString();if((E=l.isFileList(c))||g.indexOf("multipart/form-data")>-1){const S=this.env&&this.env.FormData;return ge(E?{"files[]":c}:c,S&&new S,this.formSerializer)}}return se||p?(u.setContentType("application/json",!1),Yn(c)):c}],transformResponse:[function(c){const u=this.transitional||te.transitional,g=u&&u.forcedJSONParsing,p=this.responseType==="json";if(l.isResponse(c)||l.isReadableStream(c))return c;if(c&&l.isString(c)&&(g&&!this.responseType||p)){const se=!(u&&u.silentJSONParsing)&&p;try{return JSON.parse(c)}catch(E){if(se)throw E.name==="SyntaxError"?w.from(E,w.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=>{te.headers[c]={}});const es=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"]),ts=c=>{const u={};let g,p,se;return c&&c.split(`
|
1117
|
+
`).forEach(function(E){se=E.indexOf(":"),g=E.substring(0,se).trim().toLowerCase(),p=E.substring(se+1).trim(),!(!g||u[g]&&es[g])&&(g==="set-cookie"?u[g]?u[g].push(p):u[g]=[p]:u[g]=u[g]?u[g]+", "+p:p)}),u},Ge=Symbol("internals");function Z(c){return c&&String(c).trim().toLowerCase()}function ae(c){return c===!1||c==null?c:l.isArray(c)?c.map(ae):String(c)}function ns(c){const u=Object.create(null),g=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let p;for(;p=g.exec(c);)u[p[1]]=p[2];return u}const ss=c=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(c.trim());function xe(c,u,g,p,se){if(l.isFunction(p))return p.call(this,u,g);if(se&&(u=g),!!l.isString(u)){if(l.isString(p))return u.indexOf(p)!==-1;if(l.isRegExp(p))return p.test(u)}}function rs(c){return c.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(u,g,p)=>g.toUpperCase()+p)}function is(c,u){const g=l.toCamelCase(" "+u);["get","set","has"].forEach(p=>{Object.defineProperty(c,p+g,{value:function(se,E,S){return this[p].call(this,u,se,E,S)},configurable:!0})})}let k=class{constructor(c){c&&this.set(c)}set(c,u,g){const p=this;function se(S,_,a){const h=Z(_);if(!h)throw new Error("header name must be a non-empty string");const i=l.findKey(p,h);(!i||p[i]===void 0||a===!0||a===void 0&&p[i]!==!1)&&(p[i||_]=ae(S))}const E=(S,_)=>l.forEach(S,(a,h)=>se(a,h,_));if(l.isPlainObject(c)||c instanceof this.constructor)E(c,u);else if(l.isString(c)&&(c=c.trim())&&!ss(c))E(ts(c),u);else if(l.isObject(c)&&l.isIterable(c)){let S={},_,a;for(const h of c){if(!l.isArray(h))throw TypeError("Object iterator must return a key-value pair");S[a=h[0]]=(_=S[a])?l.isArray(_)?[..._,h[1]]:[_,h[1]]:h[1]}E(S,u)}else c!=null&&se(u,c,g);return this}get(c,u){if(c=Z(c),c){const g=l.findKey(this,c);if(g){const p=this[g];if(!u)return p;if(u===!0)return ns(p);if(l.isFunction(u))return u.call(this,p,g);if(l.isRegExp(u))return u.exec(p);throw new TypeError("parser must be boolean|regexp|function")}}}has(c,u){if(c=Z(c),c){const g=l.findKey(this,c);return!!(g&&this[g]!==void 0&&(!u||xe(this,this[g],g,u)))}return!1}delete(c,u){const g=this;let p=!1;function se(E){if(E=Z(E),E){const S=l.findKey(g,E);S&&(!u||xe(g,g[S],S,u))&&(delete g[S],p=!0)}}return l.isArray(c)?c.forEach(se):se(c),p}clear(c){const u=Object.keys(this);let g=u.length,p=!1;for(;g--;){const se=u[g];(!c||xe(this,this[se],se,c,!0))&&(delete this[se],p=!0)}return p}normalize(c){const u=this,g={};return l.forEach(this,(p,se)=>{const E=l.findKey(g,se);if(E){u[E]=ae(p),delete u[se];return}const S=c?rs(se):String(se).trim();S!==se&&delete u[se],u[S]=ae(p),g[S]=!0}),this}concat(...c){return this.constructor.concat(this,...c)}toJSON(c){const u=Object.create(null);return l.forEach(this,(g,p)=>{g!=null&&g!==!1&&(u[p]=c&&l.isArray(g)?g.join(", "):g)}),u}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([c,u])=>c+": "+u).join(`
|
1118
|
+
`)}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,...u){const g=new this(c);return u.forEach(p=>g.set(p)),g}static accessor(c){const u=(this[Ge]=this[Ge]={accessors:{}}).accessors,g=this.prototype;function p(se){const E=Z(se);u[E]||(is(g,se),u[E]=!0)}return l.isArray(c)?c.forEach(p):p(c),this}};k.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),l.reduceDescriptors(k.prototype,({value:c},u)=>{let g=u[0].toUpperCase()+u.slice(1);return{get:()=>c,set(p){this[g]=p}}}),l.freezeMethods(k);function Re(c,u){const g=this||te,p=u||g,se=k.from(p.headers);let E=p.data;return l.forEach(c,function(S){E=S.call(g,E,se.normalize(),u?u.status:void 0)}),se.normalize(),E}function Nt(c){return!!(c&&c.__CANCEL__)}function X(c,u,g){w.call(this,c??"canceled",w.ERR_CANCELED,u,g),this.name="CanceledError"}l.inherits(X,w,{__CANCEL__:!0});function Pt(c,u,g){const p=g.config.validateStatus;!g.status||!p||p(g.status)?c(g):u(new w("Request failed with status code "+g.status,[w.ERR_BAD_REQUEST,w.ERR_BAD_RESPONSE][Math.floor(g.status/100)-4],g.config,g.request,g))}function os(c){const u=/^([-+\w]{1,25})(:?\/\/|:)/.exec(c);return u&&u[1]||""}function cs(c,u){c=c||10;const g=new Array(c),p=new Array(c);let se=0,E=0,S;return u=u!==void 0?u:1e3,function(_){const a=Date.now(),h=p[E];S||(S=a),g[se]=_,p[se]=a;let i=E,r=0;for(;i!==se;)r+=g[i++],i=i%c;if(se=(se+1)%c,se===E&&(E=(E+1)%c),a-S<u)return;const o=h&&a-h;return o?Math.round(r*1e3/o):void 0}}function as(c,u){let g=0,p=1e3/u,se,E;const S=(_,a=Date.now())=>{g=a,se=null,E&&(clearTimeout(E),E=null),c.apply(null,_)};return[(..._)=>{const a=Date.now(),h=a-g;h>=p?S(_,a):(se=_,E||(E=setTimeout(()=>{E=null,S(se)},p-h)))},()=>se&&S(se)]}const ue=(c,u,g=3)=>{let p=0;const se=cs(50,250);return as(E=>{const S=E.loaded,_=E.lengthComputable?E.total:void 0,a=S-p,h=se(a),i=S<=_;p=S;const r={loaded:S,total:_,progress:_?S/_:void 0,bytes:a,rate:h||void 0,estimated:h&&_&&i?(_-S)/h:void 0,event:E,lengthComputable:_!=null,[u?"download":"upload"]:!0};c(r)},g)},Ze=(c,u)=>{const g=c!=null;return[p=>u[0]({lengthComputable:g,total:c,loaded:p}),u[1]]},Qe=c=>(...u)=>l.asap(()=>c(...u)),ls=O.hasStandardBrowserEnv?((c,u)=>g=>(g=new URL(g,O.origin),c.protocol===g.protocol&&c.host===g.host&&(u||c.port===g.port)))(new URL(O.origin),O.navigator&&/(msie|trident)/i.test(O.navigator.userAgent)):()=>!0,us=O.hasStandardBrowserEnv?{write(c,u,g,p,se,E){const S=[c+"="+encodeURIComponent(u)];l.isNumber(g)&&S.push("expires="+new Date(g).toGMTString()),l.isString(p)&&S.push("path="+p),l.isString(se)&&S.push("domain="+se),E===!0&&S.push("secure"),document.cookie=S.join("; ")},read(c){const u=document.cookie.match(new RegExp("(^|;\\s*)("+c+")=([^;]*)"));return u?decodeURIComponent(u[3]):null},remove(c){this.write(c,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function hs(c){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(c)}function ds(c,u){return u?c.replace(/\/?\/$/,"")+"/"+u.replace(/^\/+/,""):c}function It(c,u,g){let p=!hs(u);return c&&(p||g==!1)?ds(c,u):u}const Ye=c=>c instanceof k?{...c}:c;function V(c,u){u=u||{};const g={};function p(h,i,r,o){return l.isPlainObject(h)&&l.isPlainObject(i)?l.merge.call({caseless:o},h,i):l.isPlainObject(i)?l.merge({},i):l.isArray(i)?i.slice():i}function se(h,i,r,o){if(l.isUndefined(i)){if(!l.isUndefined(h))return p(void 0,h,r,o)}else return p(h,i,r,o)}function E(h,i){if(!l.isUndefined(i))return p(void 0,i)}function S(h,i){if(l.isUndefined(i)){if(!l.isUndefined(h))return p(void 0,h)}else return p(void 0,i)}function _(h,i,r){if(r in u)return p(h,i);if(r in c)return p(void 0,h)}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:_,headers:(h,i,r)=>se(Ye(h),Ye(i),r,!0)};return l.forEach(Object.keys(Object.assign({},c,u)),function(h){const i=a[h]||se,r=i(c[h],u[h],h);l.isUndefined(r)&&i!==_||(g[h]=r)}),g}const vt=c=>{const u=V({},c);let{data:g,withXSRFToken:p,xsrfHeaderName:se,xsrfCookieName:E,headers:S,auth:_}=u;u.headers=S=k.from(S),u.url=Ct(It(u.baseURL,u.url,u.allowAbsoluteUrls),c.params,c.paramsSerializer),_&&S.set("Authorization","Basic "+btoa((_.username||"")+":"+(_.password?unescape(encodeURIComponent(_.password)):"")));let a;if(l.isFormData(g)){if(O.hasStandardBrowserEnv||O.hasStandardBrowserWebWorkerEnv)S.setContentType(void 0);else if((a=S.getContentType())!==!1){const[h,...i]=a?a.split(";").map(r=>r.trim()).filter(Boolean):[];S.setContentType([h||"multipart/form-data",...i].join("; "))}}if(O.hasStandardBrowserEnv&&(p&&l.isFunction(p)&&(p=p(u)),p||p!==!1&&ls(u.url))){const h=se&&E&&us.read(E);h&&S.set(se,h)}return u},fs=typeof XMLHttpRequest<"u",ps=fs&&function(c){return new Promise(function(u,g){const p=vt(c);let se=p.data;const E=k.from(p.headers).normalize();let{responseType:S,onUploadProgress:_,onDownloadProgress:a}=p,h,i,r,o,t;function e(){o&&o(),t&&t(),p.cancelToken&&p.cancelToken.unsubscribe(h),p.signal&&p.signal.removeEventListener("abort",h)}let n=new XMLHttpRequest;n.open(p.method.toUpperCase(),p.url,!0),n.timeout=p.timeout;function s(){if(!n)return;const m=k.from("getAllResponseHeaders"in n&&n.getAllResponseHeaders()),x={data:!S||S==="text"||S==="json"?n.responseText:n.response,status:n.status,statusText:n.statusText,headers:m,config:c,request:n};Pt(function(A){u(A),e()},function(A){g(A),e()},x),n=null}"onloadend"in n?n.onloadend=s:n.onreadystatechange=function(){!n||n.readyState!==4||n.status===0&&!(n.responseURL&&n.responseURL.indexOf("file:")===0)||setTimeout(s)},n.onabort=function(){n&&(g(new w("Request aborted",w.ECONNABORTED,c,n)),n=null)},n.onerror=function(){g(new w("Network Error",w.ERR_NETWORK,c,n)),n=null},n.ontimeout=function(){let m=p.timeout?"timeout of "+p.timeout+"ms exceeded":"timeout exceeded";const x=p.transitional||Tt;p.timeoutErrorMessage&&(m=p.timeoutErrorMessage),g(new w(m,x.clarifyTimeoutError?w.ETIMEDOUT:w.ECONNABORTED,c,n)),n=null},se===void 0&&E.setContentType(null),"setRequestHeader"in n&&l.forEach(E.toJSON(),function(m,x){n.setRequestHeader(x,m)}),l.isUndefined(p.withCredentials)||(n.withCredentials=!!p.withCredentials),S&&S!=="json"&&(n.responseType=p.responseType),a&&([r,t]=ue(a,!0),n.addEventListener("progress",r)),_&&n.upload&&([i,o]=ue(_),n.upload.addEventListener("progress",i),n.upload.addEventListener("loadend",o)),(p.cancelToken||p.signal)&&(h=m=>{n&&(g(!m||m.type?new X(null,c,n):m),n.abort(),n=null)},p.cancelToken&&p.cancelToken.subscribe(h),p.signal&&(p.signal.aborted?h():p.signal.addEventListener("abort",h)));const f=os(p.url);if(f&&O.protocols.indexOf(f)===-1){g(new w("Unsupported protocol "+f+":",w.ERR_BAD_REQUEST,c));return}n.send(se||null)})},ms=(c,u)=>{const{length:g}=c=c?c.filter(Boolean):[];if(u||g){let p=new AbortController,se;const E=function(h){if(!se){se=!0,_();const i=h instanceof Error?h:this.reason;p.abort(i instanceof w?i:new X(i instanceof Error?i.message:i))}};let S=u&&setTimeout(()=>{S=null,E(new w(`timeout ${u} of ms exceeded`,w.ETIMEDOUT))},u);const _=()=>{c&&(S&&clearTimeout(S),S=null,c.forEach(h=>{h.unsubscribe?h.unsubscribe(E):h.removeEventListener("abort",E)}),c=null)};c.forEach(h=>h.addEventListener("abort",E));const{signal:a}=p;return a.unsubscribe=()=>l.asap(_),a}},gs=function*(c,u){let g=c.byteLength;if(g<u){yield c;return}let p=0,se;for(;p<g;)se=p+u,yield c.slice(p,se),p=se},bs=async function*(c,u){for await(const g of ws(c))yield*gs(g,u)},ws=async function*(c){if(c[Symbol.asyncIterator]){yield*c;return}const u=c.getReader();try{for(;;){const{done:g,value:p}=await u.read();if(g)break;yield p}}finally{await u.cancel()}},et=(c,u,g,p)=>{const se=bs(c,u);let E=0,S,_=a=>{S||(S=!0,p&&p(a))};return new ReadableStream({async pull(a){try{const{done:h,value:i}=await se.next();if(h){_(),a.close();return}let r=i.byteLength;if(g){let o=E+=r;g(o)}a.enqueue(new Uint8Array(i))}catch(h){throw _(h),h}},cancel(a){return _(a),se.return()}},{highWaterMark:2})},be=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Lt=be&&typeof ReadableStream=="function",ys=be&&(typeof TextEncoder=="function"?(c=>u=>c.encode(u))(new TextEncoder):async c=>new Uint8Array(await new Response(c).arrayBuffer())),jt=(c,...u)=>{try{return!!c(...u)}catch{return!1}},_s=Lt&&jt(()=>{let c=!1;const u=new Request(O.origin,{body:new ReadableStream,method:"POST",get duplex(){return c=!0,"half"}}).headers.has("Content-Type");return c&&!u}),tt=64*1024,Ne=Lt&&jt(()=>l.isReadableStream(new Response("").body)),he={stream:Ne&&(c=>c.body)};be&&(c=>{["text","arrayBuffer","blob","formData","stream"].forEach(u=>{!he[u]&&(he[u]=l.isFunction(c[u])?g=>g[u]():(g,p)=>{throw new w(`Response type '${u}' is not supported`,w.ERR_NOT_SUPPORT,p)})})})(new Response);const Es=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 ys(c)).byteLength},Ss=async(c,u)=>l.toFiniteNumber(c.getContentLength())??Es(u),xs=be&&(async c=>{let{url:u,method:g,data:p,signal:se,cancelToken:E,timeout:S,onDownloadProgress:_,onUploadProgress:a,responseType:h,headers:i,withCredentials:r="same-origin",fetchOptions:o}=vt(c);h=h?(h+"").toLowerCase():"text";let t=ms([se,E&&E.toAbortSignal()],S),e;const n=t&&t.unsubscribe&&(()=>{t.unsubscribe()});let s;try{if(a&&_s&&g!=="get"&&g!=="head"&&(s=await Ss(i,p))!==0){let C=new Request(u,{method:"POST",body:p,duplex:"half"}),b;if(l.isFormData(p)&&(b=C.headers.get("content-type"))&&i.setContentType(b),C.body){const[G,Se]=Ze(s,ue(Qe(a)));p=et(C.body,tt,G,Se)}}l.isString(r)||(r=r?"include":"omit");const f="credentials"in Request.prototype;e=new Request(u,{...o,signal:t,method:g.toUpperCase(),headers:i.normalize().toJSON(),body:p,duplex:"half",credentials:f?r:void 0});let m=await fetch(e);const x=Ne&&(h==="stream"||h==="response");if(Ne&&(_||x&&n)){const C={};["status","statusText","headers"].forEach(q=>{C[q]=m[q]});const b=l.toFiniteNumber(m.headers.get("content-length")),[G,Se]=_&&Ze(b,ue(Qe(_),!0))||[];m=new Response(et(m.body,tt,G,()=>{Se&&Se(),n&&n()}),C)}h=h||"text";let A=await he[l.findKey(he,h)||"text"](m,c);return!x&&n&&n(),await new Promise((C,b)=>{Pt(C,b,{data:A,headers:k.from(m.headers),status:m.status,statusText:m.statusText,config:c,request:e})})}catch(f){throw n&&n(),f&&f.name==="TypeError"&&/Load failed|fetch/i.test(f.message)?Object.assign(new w("Network Error",w.ERR_NETWORK,c,e),{cause:f.cause||f}):w.from(f,f&&f.code,c,e)}}),Pe={http:Un,xhr:ps,fetch:xs};l.forEach(Pe,(c,u)=>{if(c){try{Object.defineProperty(c,"name",{value:u})}catch{}Object.defineProperty(c,"adapterName",{value:u})}});const nt=c=>`- ${c}`,Rs=c=>l.isFunction(c)||c===null||c===!1,$t={getAdapter:c=>{c=l.isArray(c)?c:[c];const{length:u}=c;let g,p;const se={};for(let E=0;E<u;E++){g=c[E];let S;if(p=g,!Rs(g)&&(p=Pe[(S=String(g)).toLowerCase()],p===void 0))throw new w(`Unknown adapter '${S}'`);if(p)break;se[S||"#"+E]=p}if(!p){const E=Object.entries(se).map(([_,a])=>`adapter ${_} `+(a===!1?"is not supported by the environment":"is not available in the build"));let S=u?E.length>1?`since :
|
1119
|
+
`+E.map(nt).join(`
|
1120
|
+
`):" "+nt(E[0]):"as no adapter specified";throw new w("There is no suitable adapter to dispatch the request "+S,"ERR_NOT_SUPPORT")}return p},adapters:Pe};function Ae(c){if(c.cancelToken&&c.cancelToken.throwIfRequested(),c.signal&&c.signal.aborted)throw new X(null,c)}function st(c){return Ae(c),c.headers=k.from(c.headers),c.data=Re.call(c,c.transformRequest),["post","put","patch"].indexOf(c.method)!==-1&&c.headers.setContentType("application/x-www-form-urlencoded",!1),$t.getAdapter(c.adapter||te.adapter)(c).then(function(u){return Ae(c),u.data=Re.call(c,c.transformResponse,u),u.headers=k.from(u.headers),u},function(u){return Nt(u)||(Ae(c),u&&u.response&&(u.response.data=Re.call(c,c.transformResponse,u.response),u.response.headers=k.from(u.response.headers))),Promise.reject(u)})}const Ft="1.9.0",we={};["object","boolean","number","function","string","symbol"].forEach((c,u)=>{we[c]=function(g){return typeof g===c||"a"+(u<1?"n ":" ")+c}});const rt={};we.transitional=function(c,u,g){function p(se,E){return"[Axios v"+Ft+"] Transitional option '"+se+"'"+E+(g?". "+g:"")}return(se,E,S)=>{if(c===!1)throw new w(p(E," has been removed"+(u?" in "+u:"")),w.ERR_DEPRECATED);return u&&!rt[E]&&(rt[E]=!0,console.warn(p(E," has been deprecated since v"+u+" and will be removed in the near future"))),c?c(se,E,S):!0}},we.spelling=function(c){return(u,g)=>(console.warn(`${g} is likely a misspelling of ${c}`),!0)};function As(c,u,g){if(typeof c!="object")throw new w("options must be an object",w.ERR_BAD_OPTION_VALUE);const p=Object.keys(c);let se=p.length;for(;se-- >0;){const E=p[se],S=u[E];if(S){const _=c[E],a=_===void 0||S(_,E,c);if(a!==!0)throw new w("option "+E+" must be "+a,w.ERR_BAD_OPTION_VALUE);continue}if(g!==!0)throw new w("Unknown option "+E,w.ERR_BAD_OPTION)}}const le={assertOptions:As,validators:we},F=le.validators;let z=class{constructor(c){this.defaults=c||{},this.interceptors={request:new Xe,response:new Xe}}async request(c,u){try{return await this._request(c,u)}catch(g){if(g instanceof Error){let p={};Error.captureStackTrace?Error.captureStackTrace(p):p=new Error;const se=p.stack?p.stack.replace(/^.+\n/,""):"";try{g.stack?se&&!String(g.stack).endsWith(se.replace(/^.+\n.+\n/,""))&&(g.stack+=`
|
1121
|
+
`+se):g.stack=se}catch{}}throw g}}_request(c,u){typeof c=="string"?(u=u||{},u.url=c):u=c||{},u=V(this.defaults,u);const{transitional:g,paramsSerializer:p,headers:se}=u;g!==void 0&&le.assertOptions(g,{silentJSONParsing:F.transitional(F.boolean),forcedJSONParsing:F.transitional(F.boolean),clarifyTimeoutError:F.transitional(F.boolean)},!1),p!=null&&(l.isFunction(p)?u.paramsSerializer={serialize:p}:le.assertOptions(p,{encode:F.function,serialize:F.function},!0)),u.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?u.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:u.allowAbsoluteUrls=!0),le.assertOptions(u,{baseUrl:F.spelling("baseURL"),withXsrfToken:F.spelling("withXSRFToken")},!0),u.method=(u.method||this.defaults.method||"get").toLowerCase();let E=se&&l.merge(se.common,se[u.method]);se&&l.forEach(["delete","get","head","post","put","patch","common"],t=>{delete se[t]}),u.headers=k.concat(E,se);const S=[];let _=!0;this.interceptors.request.forEach(function(t){typeof t.runWhen=="function"&&t.runWhen(u)===!1||(_=_&&t.synchronous,S.unshift(t.fulfilled,t.rejected))});const a=[];this.interceptors.response.forEach(function(t){a.push(t.fulfilled,t.rejected)});let h,i=0,r;if(!_){const t=[st.bind(this),void 0];for(t.unshift.apply(t,S),t.push.apply(t,a),r=t.length,h=Promise.resolve(u);i<r;)h=h.then(t[i++],t[i++]);return h}r=S.length;let o=u;for(i=0;i<r;){const t=S[i++],e=S[i++];try{o=t(o)}catch(n){e.call(this,n);break}}try{h=st.call(this,o)}catch(t){return Promise.reject(t)}for(i=0,r=a.length;i<r;)h=h.then(a[i++],a[i++]);return h}getUri(c){c=V(this.defaults,c);const u=It(c.baseURL,c.url,c.allowAbsoluteUrls);return Ct(u,c.params,c.paramsSerializer)}};l.forEach(["delete","get","head","options"],function(c){z.prototype[c]=function(u,g){return this.request(V(g||{},{method:c,url:u,data:(g||{}).data}))}}),l.forEach(["post","put","patch"],function(c){function u(g){return function(p,se,E){return this.request(V(E||{},{method:c,headers:g?{"Content-Type":"multipart/form-data"}:{},url:p,data:se}))}}z.prototype[c]=u(),z.prototype[c+"Form"]=u(!0)});let Os=class zi{constructor(u){if(typeof u!="function")throw new TypeError("executor must be a function.");let g;this.promise=new Promise(function(se){g=se});const p=this;this.promise.then(se=>{if(!p._listeners)return;let E=p._listeners.length;for(;E-- >0;)p._listeners[E](se);p._listeners=null}),this.promise.then=se=>{let E;const S=new Promise(_=>{p.subscribe(_),E=_}).then(se);return S.cancel=function(){p.unsubscribe(E)},S},u(function(se,E,S){p.reason||(p.reason=new X(se,E,S),g(p.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(u){if(this.reason){u(this.reason);return}this._listeners?this._listeners.push(u):this._listeners=[u]}unsubscribe(u){if(!this._listeners)return;const g=this._listeners.indexOf(u);g!==-1&&this._listeners.splice(g,1)}toAbortSignal(){const u=new AbortController,g=p=>{u.abort(p)};return this.subscribe(g),u.signal.unsubscribe=()=>this.unsubscribe(g),u.signal}static source(){let u;return{token:new zi(function(g){u=g}),cancel:u}}};function Cs(c){return function(u){return c.apply(null,u)}}function Ts(c){return l.isObject(c)&&c.isAxiosError===!0}const Ie={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(Ie).forEach(([c,u])=>{Ie[u]=c});function Dt(c){const u=new z(c),g=mt(z.prototype.request,u);return l.extend(g,z.prototype,u,{allOwnKeys:!0}),l.extend(g,u,null,{allOwnKeys:!0}),g.create=function(p){return Dt(V(c,p))},g}const R=Dt(te);R.Axios=z,R.CanceledError=X,R.CancelToken=Os,R.isCancel=Nt,R.VERSION=Ft,R.toFormData=ge,R.AxiosError=w,R.Cancel=R.CanceledError,R.all=function(c){return Promise.all(c)},R.spread=Cs,R.isAxiosError=Ts,R.mergeConfig=V,R.AxiosHeaders=k,R.formToJSON=c=>kt(l.isHTMLForm(c)?new FormData(c):c),R.getAdapter=$t.getAdapter,R.HttpStatusCode=Ie,R.default=R;const{Axios:Wr,AxiosError:Kr,CanceledError:Xr,isCancel:Gr,CancelToken:Zr,VERSION:Qr,all:Yr,Cancel:ei,isAxiosError:ti,spread:ni,toFormData:si,AxiosHeaders:ri,HttpStatusCode:ii,formToJSON:oi,getAdapter:ci,mergeConfig:ai}=R,De=R.create({baseURL:location.origin,timeout:6e4,params:{}});De.interceptors.response.use(c=>c,c=>{var u,g,p,se,E,S,_,a,h,i,r;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 o=`HTTP ${c.response.status} - `;(u=c.response)!=null&&u.statusText&&(o+=`${c.response.statusText} `),(p=(g=c.response)==null?void 0:g.config)!=null&&p.data&&(o+=`${c.response.config.data} `),(E=(se=c.response)==null?void 0:se.data)!=null&&E.message?o+=`${c.response.data.message}`:(_=(S=c.response)==null?void 0:S.data)!=null&&_.exception?o+=`${c.response.data.exception}`:(i=(h=(a=c.response)==null?void 0:a.data)==null?void 0:h.error)!=null&&i.message?(c.response.data.error.class&&(o+=`${c.response.data.error.class} `),o+=`${c.response.data.error.message}`):o+=`${(r=c.response)==null?void 0:r.data}`;const{$cosmosNotify:t}=window;throw t&&t.serious({title:"Network error",body:o}),c}else throw c});const re=async function(c,u,{data:g,params:p={},headers:se,noAuth:E=!1,noScope:S=!1,onUploadProgress:_=!1}={}){if(!E){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}se.Authorization=localStorage.openc3Token}return se.manual=!0,!S&&!p.scope&&(p.scope=window.openc3Scope),De({method:c,url:u,data:g,params:p,headers:se,onUploadProgress:_})},ve={Accept:"application/json"},it={...ve,"Content-Type":"application/json"},li={get:function(c,{params:u,headers:g=ve,noScope:p,noAuth:se,onUploadProgress:E}={}){return re("get",c,{params:u,headers:g,noScope:p,noAuth:se,onUploadProgress:E})},put:function(c,{data:u,params:g,headers:p=it,noScope:se,noAuth:E,onUploadProgress:S}={}){return re("put",c,{data:u,params:g,headers:p,noScope:se,noAuth:E,onUploadProgress:S})},post:function(c,{data:u,params:g,headers:p=it,noScope:se,noAuth:E,onUploadProgress:S}={}){return re("post",c,{data:u,params:g,headers:p,noScope:se,noAuth:E,onUploadProgress:S})},delete:function(c,{params:u,headers:g=ve,noScope:p,noAuth:se,onUploadProgress:E}={}){return re("delete",c,{params:u,headers:g,noScope:p,noAuth:se,onUploadProgress:E})}};let ye=()=>({emit(c,...u){for(let g=this.events[c]||[],p=0,se=g.length;p<se;p++)g[p](...u)},events:{},on(c,u){var g;return((g=this.events)[c]||(g[c]=[])).push(u),()=>{var p;this.events[c]=(p=this.events[c])==null?void 0:p.filter(se=>u!==se)}}});class ne extends Error{constructor(u,g){u instanceof Error?(super(u.message),this.cause=u):super(u),this.reason=g,this.name="ReasonError"}}function qt(c){return c?`{${Object.keys(c).sort().filter(u=>c[u]!==void 0).map(u=>{let g=JSON.stringify(c[u]);return`${JSON.stringify(u)}:${g}`}).join(",")}}`:""}class Ps{constructor(u){this.channel=u,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",u=>{if(u.type==="info"){this._state||(this._state=this.stateFromInfo(u));return}this._state&&(u.type==="join"?this._state[u.id]=u.info:u.type==="leave"&&delete this._state[u.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(u=>u()),this.listeners.length=0}async join(u,g){if(!this._info)return this._info={id:u,info:g},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let u=await this.channel.perform("$presence:leave");return delete this._info,u}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let u=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(u),this._state}finally{delete this._promise}}stateFromInfo(u){return u.records.reduce((g,{id:p,info:se})=>(g[p]=se,g),{})}}const B=Symbol("state");class Bt{constructor(u={}){this.emitter=ye(),this.params=Object.freeze(u),this.presence=new Ps(this),this.initialConnect=!0,this[B]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=qt({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[B]}attached(u){if(this.receiver){if(this.receiver!==u)throw Error("Already connected to a different receiver");return!1}return this.receiver=u,!0}connecting(){this[B]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[B]="connected";let u=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:u})):this.emit("connect",{reconnect:!0,restored:u})}restored(){if(this.state==="connected")throw Error("Already connected");this[B]="connected";let u=!0,g=!0;this.initialConnect=!1,this.emit("connect",{reconnect:g,restored:u})}disconnected(u){this.state==="disconnected"||this.state==="closed"||(this[B]="disconnected",this.presence.reset(),this.emit("disconnect",u))}closed(u){this.state!=="closed"&&(this[B]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",u))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(u,g){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,u,g)}async send(u){return this.perform(void 0,u)}async whisper(u){try{await this.perform("$whisper",u)}catch(g){let p=this.receiver?this.receiver.logger:null;p&&p.warn("whisper failed: ",g)}}receive(u,g){this.emit("message",u,g)}on(u,g){return this.emitter.on(u,g)}once(u,g){let p=this.emitter.on(u,(...se)=>{p(),g(...se)});return p}emit(u,...g){return this.emitter.emit(u,...g)}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((u,g)=>{let p=[()=>delete this._pendingSubscribe];p.push(this.on("connect",()=>{p.forEach(se=>se()),u()})),p.push(this.on("close",se=>{p.forEach(E=>E()),g(se||new ne("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class Be extends Bt{constructor(u,g){super(g),this.channelId=u}set channelId(u){this._channelId=u}get channelId(){return this._channelId}}L(Be,"identifier","__ghost__");const qs="$pubsub";class Le extends Bt{async perform(u,g){if(u.startsWith("$"))return super.perform(u,g);throw Error("not implemented")}}L(Le,"identifier",qs);function Me(c){return cr.test(c)}const cr=/^-?[0-9]+$/;function Wt(c){return ar.test(c)}const ar=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Kt(c,u){const g=Number.parseFloat(c),p=String(g),se=ut(c),E=ut(p);return!!(se===E||(u==null?void 0:u.approx)===!0&&!Me(c)&&E.length>=14&&se.startsWith(E.substring(0,14)))}let Q=function(c){return c.underflow="underflow",c.overflow="overflow",c.truncate_integer="truncate_integer",c.truncate_float="truncate_float",c}({});function lr(c){if(Kt(c,{approx:!1}))return;if(Me(c))return Q.truncate_integer;const u=Number.parseFloat(c);return Number.isFinite(u)?u===0?Q.underflow:Q.truncate_float:Q.overflow}function ut(c){return c.replace(ur,"").replace(dr,"").replace(fr,"").replace(hr,"")}const ur=/[eE][+-]?\d+$/,hr=/^-?(0*)?/,dr=/\./,fr=/0+$/;class pr{constructor(u){if(L(this,"isLosslessNumber",!0),!Wt(u))throw new Error(`Invalid number (value: "${u}")`);this.value=u}valueOf(){const u=lr(this.value);if(u===void 0||u===Q.truncate_float)return Number.parseFloat(this.value);if(Me(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${u} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function mr(c){return c&&typeof c=="object"&&c.isLosslessNumber===!0||!1}function gr(c){return new pr(c)}function br(c,u){return He({"":c},"",c,u)}function He(c,u,g,p){return Array.isArray(g)?p.call(c,u,yr(g,p)):g&&typeof g=="object"&&!mr(g)?p.call(c,u,wr(g,p)):p.call(c,u,g)}function wr(c,u){for(const g of Object.keys(c)){const p=He(c,g,c[g],u);p!==void 0?c[g]=p:delete c[g]}return c}function yr(c,u){for(let g=0;g<c.length;g++)c[g]=He(c,String(g),c[g],u);return c}function _r(c,u){let g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:gr,p=0;const se=_();return e(se),s(),u?br(se,u):se;function E(){if(c.charCodeAt(p)===Or){p++,h();const y={};let v=!0;for(;p<c.length&&c.charCodeAt(p)!==dt;){v?v=!1:(o(),h());const D=p,Ee=i();if(Ee===void 0){x();return}h(),t();const qe=_();if(qe===void 0){q();return}Object.prototype.hasOwnProperty.call(y,Ee)&&!je(qe,y[Ee])&&A(Ee,D+1),y[Ee]=qe}return c.charCodeAt(p)!==dt&&C(),p++,y}}function S(){if(c.charCodeAt(p)===Cr){p++,h();const y=[];let v=!0;for(;p<c.length&&c.charCodeAt(p)!==ft;){v?v=!1:o();const D=_();n(D),y.push(D)}return c.charCodeAt(p)!==ft&&b(),p++,y}}function _(){h();const y=i()??r()??E()??S()??a("true",!0)??a("false",!1)??a("null",null);return h(),y}function a(y,v){if(c.slice(p,p+y.length)===y)return p+=y.length,v}function h(){for(;Er(c.charCodeAt(p));)p++}function i(){if(c.charCodeAt(p)===Oe){p++;let y="";for(;p<c.length&&c.charCodeAt(p)!==Oe;){if(c.charCodeAt(p)===Ar){const v=c[p+1],D=Rr[v];D!==void 0?(y+=D,p++):v==="u"?ie(c.charCodeAt(p+2))&&ie(c.charCodeAt(p+3))&&ie(c.charCodeAt(p+4))&&ie(c.charCodeAt(p+5))?(y+=String.fromCharCode(Number.parseInt(c.slice(p+2,p+6),16)),p+=5):U(p):Se(p)}else xr(c.charCodeAt(p))?y+=c[p]:G(c[p]);p++}return m(),p++,y}}function r(){const y=p;if(c.charCodeAt(p)===pt&&(p++,f(y)),c.charCodeAt(p)===ze)p++;else if(Sr(c.charCodeAt(p)))for(p++;oe(c.charCodeAt(p));)p++;if(c.charCodeAt(p)===jr)for(p++,f(y);oe(c.charCodeAt(p));)p++;if(c.charCodeAt(p)===qr||c.charCodeAt(p)===Dr)for(p++,(c.charCodeAt(p)===pt||c.charCodeAt(p)===Ir)&&p++,f(y);oe(c.charCodeAt(p));)p++;if(p>y)return g(c.slice(y,p))}function o(){if(c.charCodeAt(p)!==Lr)throw new SyntaxError(`Comma ',' expected after value ${W()}`);p++}function t(){if(c.charCodeAt(p)!==$r)throw new SyntaxError(`Colon ':' expected after property name ${W()}`);p++}function e(y){if(y===void 0)throw new SyntaxError(`JSON value expected ${W()}`)}function n(y){if(y===void 0)throw new SyntaxError(`Array item expected ${W()}`)}function s(){if(p<c.length)throw new SyntaxError(`Expected end of input ${W()}`)}function f(y){if(!oe(c.charCodeAt(p))){const v=c.slice(y,p);throw new SyntaxError(`Invalid number '${v}', expecting a digit ${W()}`)}}function m(){if(c.charCodeAt(p)!==Oe)throw new SyntaxError(`End of string '"' expected ${W()}`)}function x(){throw new SyntaxError(`Quoted object key expected ${W()}`)}function A(y,v){throw new SyntaxError(`Duplicate key '${y}' encountered at position ${v}`)}function C(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${W()}`)}function b(){throw new SyntaxError(`Array item or end of array ']' expected ${W()}`)}function G(y){throw new SyntaxError(`Invalid character '${y}' ${at()}`)}function Se(y){const v=c.slice(y,y+2);throw new SyntaxError(`Invalid escape character '${v}' ${at()}`)}function q(){throw new SyntaxError(`Object value expected after ':' ${at()}`)}function U(y){const v=c.slice(y,y+6);throw new SyntaxError(`Invalid unicode character '${v}' ${at()}`)}function at(){return`at position ${p}`}function j(){return p<c.length?`but got '${c[p]}'`:"but reached end of input"}function W(){return`${j()} ${at()}`}}function Er(c){return c===Tr||c===kr||c===Nr||c===Pr}function ie(c){return c>=ze&&c<=Ve||c>=Fr&&c<=Br||c>=Ur&&c<=Mr}function oe(c){return c>=ze&&c<=Ve}function Sr(c){return c>=vr&&c<=Ve}function xr(c){return c>=32&&c<=1114111}function je(c,u){return c===u?!0:Array.isArray(c)&&Array.isArray(u)?c.length===u.length&&c.every((g,p)=>je(g,u[p])):ht(c)&&ht(u)?[...new Set([...Object.keys(c),...Object.keys(u)])].every(g=>je(c[g],u[g])):!1}function ht(c){return typeof c=="object"&&c!==null}const Rr={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
1122
|
+
`,r:"\r",t:" "},Ar=92,Or=123,dt=125,Cr=91,ft=93,Tr=32,kr=10,Nr=9,Pr=13,Oe=34,Ir=43,pt=45,ze=48,vr=49,Ve=57,Lr=44,jr=46,$r=58,Fr=65,Ur=97,Dr=69,qr=101,Br=70,Mr=102;function Xt(c,u,g,p){return se(c);function se(a,h){if(Array.isArray(p)){const i=p.find(r=>r.test(a));if(i){const r=i.stringify(a);if(typeof r!="string"||!Wt(r))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${r})`);return r}}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,h){if(a.length===0)return"[]";let i="[";for(let r=0;r<a.length;r++){const o=a[r];typeof o<"u"&&typeof o!="function"?i+=se(o):i+="null",r<a.length-1&&(i+=",")}return i+="]",i}function S(a,h){if(typeof a.toJSON=="function")return Xt(a.toJSON(),u,g,void 0);const i=Array.isArray(u)?u.map(String):Object.keys(a);if(i.length===0)return"{}";let r=!0,o="{";for(const t of i){const e=a[t];if(_(t,e)){r?r=!1:o+=",";const n=JSON.stringify(t);o+=`${n}:`,o+=se(e)}}return o+="}",o}function _(a,h){return typeof h<"u"&&typeof h!="function"&&typeof h!="symbol"}}function Hr(c){return Kt(c)?parseFloat(c):BigInt(c)}class pi{constructor(){L(this,"id",1)}async exec(u,g,p={},se={},E=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return p.scope=window.openc3Scope,se.manual=!0,(await De.post("/openc3-api/api",{jsonrpc:"2.0",method:u,params:g,id:this.id,keyword_params:p},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...se},timeout:E,transformRequest:[(S,_)=>Xt(S)],transformResponse:[S=>_r(S,void 0,Hr)]})).data.result}catch(S){let _=new Error;throw S.response?(_.name=S.response.data.error.data.class,_.message=S.response.data.error.data.message,_.object=S.response.data.error):S.request?(_.name="Request error",_.message="Request error, no response received"):_.name="Unknown error",_}}decode_openc3_type(u){if(u!==null&&typeof u=="object"&&u.json_class=="Float"&&u.raw){if(u.raw=="NaN")return NaN;if(u.raw=="Infinity")return 1/0;if(u.raw=="-Infinity")return-1/0}return null}encode_openc3_type(u){return Number.isNaN(u)?{json_class:"Float",raw:"NaN"}:u==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:u==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(u=>{u&&(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(u){return this.exec("set_offline_access",[u])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(u,g){return this.exec("map_target_to_interface",[u,g])}connect_interface(u,...g){return g.length>0?this.exec("connect_interface",[u,...g]):this.exec("connect_interface",[u])}disconnect_interface(u){return this.exec("disconnect_interface",[u])}interface_cmd(u,g,...p){return this.exec("interface_cmd",[u,g,...p])}get_all_router_info(){return this.exec("get_all_router_info",[])}connect_router(u){return this.exec("connect_router",[u])}disconnect_router(u){return this.exec("disconnect_router",[u])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(u){return this.exec("get_tlm_cnts",[u])}get_item(u,g,p){return this.exec("get_item",[u,g,p])}get_param(u,g,p){return this.exec("get_param",[u,g,p])}get_parameter(u,g,p){return this.exec("get_param",[u,g,p])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(u){return this.exec("set_limits_set",[u])}get_target(u){return this.exec("get_target",[u])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(u,g){return this.exec("get_tlm",[u,g])}get_telemetry(u,g){return this.exec("get_tlm",[u,g])}get_all_tlm(u){return this.exec("get_all_tlm",[u])}get_all_telemetry(u){return this.exec("get_all_tlm",[u])}get_all_tlm_names(u,g=!1){return this.exec("get_all_tlm_names",[u],{hidden:g})}get_all_telemetry_names(u){return this.exec("get_all_tlm_names",[u])}get_all_tlm_item_names(u){return this.exec("get_all_tlm_item_names",[u])}async get_tlm_packet(u,g,p,se=30){const E=await this.exec("get_tlm_packet",[u,g],{type:p,stale_time:se});if(E!=null){let S=E.length,_=null;for(let a=0;a<S;a++)_=this.decode_openc3_type(E[a][1]),_!==null&&(E[a][1]=_)}return E}get_packet_derived_items(u,g){return this.exec("get_packet_derived_items",[u,g])}get_tlm_buffer(u,g){return this.exec("get_tlm_buffer",[u,g])}async get_tlm_values(u,g=30,p=null){let se={stale_time:g};p!==null&&(se.cache_timeout=p);const E=await this.exec("get_tlm_values",[u],se,{},1e4);let S=E[0].length,_=null;for(let a=0;a<S;a++)_=this.decode_openc3_type(E[0][a]),_!==null&&(E[0][a]=_);return E}get_limits(u,g,p){return this.exec("get_limits",[u,g,p])}async tlm(u,g,p,se="CONVERTED"){let E=null;if(g===void 0)E=await this.exec("tlm",[u]);else if(p===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(g))E=await this.exec("tlm",[u],{type:g});else{let _=new Error;throw _.name="TypeError",_.message=`Invalid data type ${g}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,_}else E=await this.exec("tlm",[u,g,p],{type:se});let S=this.decode_openc3_type(E);return S!==null&&(E=S),E}async inject_tlm(u,g,p=null,se="CONVERTED"){await this.exec("inject_tlm",[u,g,p],{type:se})}set_tlm(u,g,p,se){return this.exec("set_tlm",[u,g,p],{type:se})}override_tlm(u,g,p,se){return this.exec("override_tlm",[u,g,p],{type:se})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(u,g,p,se){return this.exec("normalize_tlm",[u,g,p],{type:se})}get_all_cmds(u){return this.exec("get_all_cmds",[u])}get_all_commands(u){return this.exec("get_all_cmds",[u])}get_all_cmd_names(u,g=!1){return this.exec("get_all_cmd_names",[u],{hidden:g})}get_all_command_names(u){return this.exec("get_all_cmd_names",[u])}get_cmd(u,g){return this.exec("get_cmd",[u,g])}get_command(u,g){return this.exec("get_cmd",[u,g])}get_cmd_cnts(u){return this.exec("get_cmd_cnts",[u])}get_cmd_value(u,g,p,se="CONVERTED"){return this.exec("get_cmd_value",[u,g,p,se])}get_cmd_buffer(u,g){return this.exec("get_cmd_buffer",[u,g])}_cmd(u,g,p,se,E){let S=null;for(let _ in se)Object.prototype.hasOwnProperty.call(se,_)&&(S=this.encode_openc3_type(se[_]),S!==null&&(se[_]=S));return this.exec(u,[g,p,se],{},E)}get_cmd_hazardous(u,g,p,se={}){return g===void 0?this.exec("get_cmd_hazardous",u,{},se):this._cmd("get_cmd_hazardous",u,g,p,se)}cmd(u,g,p,se={}){return g===void 0?this.exec("cmd",u,{},se):this._cmd("cmd",u,g,p,se)}cmd_no_range_check(u,g,p,se={}){return g===void 0?this.exec("cmd_no_range_check",u,{},se):this._cmd("cmd_no_range_check",u,g,p,se)}cmd_raw(u,g,p,se={}){return g===void 0?this.exec("cmd_raw",u,{},se):this._cmd("cmd_raw",u,g,p,se)}cmd_raw_no_range_check(u,g,p,se={}){return g===void 0?this.exec("cmd_raw_no_range_check",u,{},se):this._cmd("cmd_raw_no_range_check",u,g,p,se)}cmd_no_hazardous_check(u,g,p,se={}){return g===void 0?this.exec("cmd_no_hazardous_check",u,{},se):this._cmd("cmd_no_hazardous_check",u,g,p,se)}cmd_no_checks(u,g,p,se={}){return g===void 0?this.exec("cmd_no_checks",u,{},se):this._cmd("cmd_no_checks",u,g,p,se)}cmd_raw_no_hazardous_check(u,g,p,se={}){return g===void 0?this.exec("cmd_raw_no_hazardous_check",u,{},se):this._cmd("cmd_raw_no_hazardous_check",u,g,p,se)}cmd_raw_no_checks(u,g,p,se={}){return g===void 0?this.exec("cmd_raw_no_checks",u,{},se):this._cmd("cmd_raw_no_checks",u,g,p,se)}build_cmd(u,g,p){return g===void 0?this.exec("build_cmd",u):this._cmd("build_cmd",u,g,p)}build_command(u,g,p){return g===void 0?this.exec("build_cmd",u):this._cmd("build_cmd",u,g,p)}get_interface_names(){return this.exec("get_interface_names",[])}send_raw(u,g){return this.exec("send_raw",[u,g])}list_configs(u){return this.exec("list_configs",[u])}load_config(u,g){return this.exec("load_config",[u,g])}save_config(u,g,p){return this.exec("save_config",[u,g,p])}delete_config(u,g){return this.exec("delete_config",[u,g])}enable_limits(u,g,p){return this.exec("enable_limits",[u,g,p])}disable_limits(u,g,p){return this.exec("disable_limits",[u,g,p])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(u){return this.exec("get_overall_limits_state",[u])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(u){return this.exec("get_setting",[u])}get_settings(u){return this.exec("get_settings",u)}set_setting(u,g){return this.exec("set_setting",[u,g])}update_news(){return this.exec("update_news",[])}save_setting(u,g){return this.exec("set_setting",[u,g])}get_metrics(){return this.exec("get_metrics",[])}async hashString(u){if(window.isSecureContext){const g=new TextEncoder().encode(u),p=await crypto.subtle.digest("SHA-256",g),se=new Uint8Array(p);return Array.from(se).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 u=c.charAt(0);if(u!=='"'&&u!=="'")return c;let g=c.charAt(c.length-1);return u!==g?c:c.slice(1,-1)},convertToString(c){let u=0,g="";if(Object.prototype.toString.call(c).slice(8,-1)==="Array"){let p=c.length;for(g="[ ",u=0;u<p;u++)Object.prototype.toString.call(c[u]).slice(8,-1)==="String"?g+='"'+c[u]+'"':g+=c[u],u!==p-1&&(g+=", ");g+=" ]"}else if(Object.prototype.toString.call(c).slice(8,-1)==="Object")if(c.json_class==="String"&&c.raw)for(g="0x",u=0;u<c.raw.length;u++){let p=c.raw[u].toString(16).toUpperCase();p.length<2&&(p="0"+p),g+=p}else c.json_class==="Float"&&c.raw&&(g=c.raw);else g=String(c);return g}}},_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,u;return((u=(c=Object.entries(this.states).find(([g,p])=>p.value===this.modelValue))==null?void 0:c.at(1))==null?void 0:u.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,u,g,p,se,E){const S=resolveComponent("v-text-field"),_=resolveComponent("v-select");return openBlock(),createElementBlock("div",null,[g.states?(openBlock(),createElementBlock("div",_hoisted_1$1,[createVNode(_,{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$1,TargetPacketItemChooser:we$1,CommandParameterEditor,TopBar:Z$1,Openc3Screen:Ie$1},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(){li.get("/openc3-api/autocomplete/reserved-item-names").then(c=>{this.reservedItemNames=c.data}),this.api=new pi,this.$route.params.target&&this.$route.params.packet&&this.commandChanged({targetName:this.$route.params.target.toUpperCase(),packetName:this.$route.params.packet.toUpperCase()}),li.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 u=this.editor.session.getLine(this.editor.getCursorPosition().row);if(u==="")return;let g=u.indexOf('"'),p=u.lastIndexOf('"');u=u.substr(g+1,p-g-1),this.sendCmd(u)}})},beforeUnmount(){this.editor.destroy(),this.editor.container.remove()},methods:{showContextMenu(c,u){c.preventDefault(),this.parameterName=u.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 u={json_class:"String",raw:[]};for(let g=0;g<c.length;g+=2){let p=c.charAt(g)+c.charAt(g+1);u.raw.push(parseInt(p,16))}return u}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.$router.replace({name:"CommandSender",params:{target:this.targetName,packet:this.commandName}}).catch(u=>{}))},updateCmdParams(){this.sendDisabled=!0,this.ignoredParams=[],this.rows=[],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(u=>{if(!this.reservedItemNames.includes(u.name)&&(!this.ignoredParams.includes(u.name)||this.showIgnoredParams)){let g=u.default;!u.states&&u.data_type==="STRING"&&typeof u.default=="string"&&(g=`'${g}'`),u.required&&(g=""),u.format_string&&(g=sprintf(u.format_string,u.default));let p="N/A";u.minimum!=null&&u.maximum!=null&&(u.data_type==="FLOAT"&&(u.minimum<-1e6&&Number.isSafeInteger(u.minimum)&&(u.minimum=u.minimum.toExponential(3)),u.maximum>1e6&&Number.isSafeInteger(u.maximum)&&(u.maximum=u.maximum.toExponential(3))),p=`${u.minimum}..${u.maximum}`),this.rows.push({parameter_name:u.name,val:g,states:u.states,description:u.description,range:p,units:u.units,type:u.data_type})}}),c.screen)this.loadScreen(c.screen[0],c.screen[1]).then(u=>{this.screenTarget=c.screen[0],this.screenName=c.screen[1],this.screenDefinition=u.data,this.screenCount+=1});else{if(c.related_items){this.screenTarget="LOCAL",this.screenName="CMDSENDER";let u=`SCREEN AUTO AUTO 1.0
|
1123
|
+
`;for(const g of c.related_items)u+=`LABELVALUE '${g[0]}' '${g[1]}' '${g[2]}' WITH_UNITS 20
|
1124
|
+
`;this.screenDefinition=u}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})},createParamList(){let c={};for(const u of this.rows)c[u.parameter_name]=this.convertToValue(u);return c},buildCmd(){this.sendCmd(this.targetName,this.commandName,this.createParamList())},sendCmd(c,u,g){this.lastTargetName=c,this.lastCommandName=u,this.lastParamList=g,this.sendDisabled=!0;let p=!1,se="";this.api.get_cmd_hazardous(c,u,g).then(E=>{if(p=E,p)u===void 0?this.hazardousCommand=c.split(" ").slice(0,2).join(" "):this.hazardousCommand=`${c} ${u}`,this.displaySendHazardous=!0;else{let S;this.cmdRaw?this.ignoreRangeChecks?(se="cmd_raw_no_range_check",S=this.api.cmd_raw_no_range_check(c,u,g,{"Ignore-Errors":"428"})):(se="cmd_raw",S=this.api.cmd_raw(c,u,g,{"Ignore-Errors":"428 500"})):this.ignoreRangeChecks?(se="cmd_no_range_check",S=this.api.cmd_no_range_check(c,u,g,{"Ignore-Errors":"428"})):(se="cmd",S=this.api.cmd(c,u,g,{"Ignore-Errors":"428 500"})),S.then(_=>{this.processCmdResponse(!0,c,u,se,_)},_=>{this.processCmdResponse(!1,c,u,se,_)})}},E=>{this.processCmdResponse(!1,c,u,se,E)})},sendHazardousCmd(){this.displaySendHazardous=!1;let c="",u="";this.cmdRaw?this.ignoreRangeChecks?(u="cmd_raw_no_range_check",c=this.api.cmd_raw_no_checks(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428"})):(u="cmd_raw",c=this.api.cmd_raw_no_hazardous_check(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428 500"})):this.ignoreRangeChecks?(u="cmd_no_range_check",c=this.api.cmd_no_checks(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428"})):(u="cmd",c=this.api.cmd_no_hazardous_check(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428 500"})),c.then(g=>{this.processCmdResponse(!0,this.lastTargetName,this.lastCommandName,u,g)},g=>{this.processCmdResponse(!1,this.lastTargetName,this.lastCommandName,u,g)})},cancelHazardousCmd(){this.displaySendHazardous=!1,this.status="Hazardous command not sent",this.sendDisabled=!1},processCmdResponse(c,u,g,p,se){g===void 0&&([u,g]=u.split(" ").slice(0,2));let E="";if(c){E=`${p}("${se[0]} ${se[1]}`;let S=Object.keys(se[2]);if(S.length>0){E+=" with ";for(let _=0;_<S.length;_++){let a=S[_],h=this.convertToString(se[2][a]);typeof se[2][a]=="string"&&h.charAt(0)!=="'"&&h.charAt(0)!=='"'&&(h=`'${h}'`),E+=a+" "+h,_<S.length-1&&(E+=", ")}}if(E+='")',!this.history.includes(E)){let _=E;this.history.length!==0&&(_+=`
|
1125
|
+
${this.history}`),this.editor.setValue(_),this.editor.moveCursorTo(0,0)}if(E+=" sent.",this.status.includes(E)){let _=this.status.split("sent.");if(_[1].includes("(")){let a=parseInt(_[1].substr(2,_[1].indexOf(")")-2));E=_[0]+"sent. ("+(a+1)+")"}else E+=" (2)"}this.status=E}else{let S="sending "+u+" "+g;this.displayError(S,se,!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,u,g=!1){this.status=`Error ${c} due to ${u.name}`,u.message&&u.message!==""&&(this.status+=": ",this.status+=u.message),this.status.includes("CriticalCmdError")&&(this.status="Critical Command Queued For Approval"),g&&(u.message.includes("CriticalCmdError")?(this.criticalCmdUuid=u.object.data.instance_variables["@uuid"],this.criticalCmdString=u.object.data.instance_variables["@cmd_string"],this.criticalCmdUser=u.object.data.instance_variables["@username"],this.displayCriticalCmd=!0):this.displayErrorDialog=!0)},loadScreen(c,u){return li.get("/openc3-api/screen/"+c+"/"+u,{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,u,g,p,se,E){const S=resolveComponent("top-bar"),_=resolveComponent("target-packet-item-chooser"),a=resolveComponent("v-spacer"),h=resolveComponent("v-text-field"),i=resolveComponent("v-card-title"),r=resolveComponent("command-parameter-editor"),o=resolveComponent("v-data-table"),t=resolveComponent("v-card"),e=resolveComponent("v-col"),n=resolveComponent("v-btn"),s=resolveComponent("v-tooltip"),f=resolveComponent("v-row"),m=resolveComponent("v-card-subtitle"),x=resolveComponent("openc3-screen"),A=resolveComponent("v-list-item-title"),C=resolveComponent("v-list-item"),b=resolveComponent("v-list"),G=resolveComponent("v-menu"),Se=resolveComponent("details-dialog"),q=resolveComponent("critical-cmd-dialog"),U=resolveComponent("v-toolbar"),at=resolveComponent("v-card-text"),j=resolveComponent("v-dialog"),W=resolveComponent("v-card-actions"),y=resolveComponent("v-select");return openBlock(),createElementBlock("div",null,[createVNode(S,{menus:E.menus,title:se.title},null,8,["menus","title"]),createVNode(t,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_1,[createVNode(_,{"initial-target-name":c.$route.params.target,"initial-packet-name":c.$route.params.packet,disabled:se.sendDisabled,"button-text":"Send",mode:"cmd",onOnSet:u[0]||(u[0]=v=>E.commandChanged(v)),onAddItem:u[1]||(u[1]=v=>E.buildCmd(v))},null,8,["initial-target-name","initial-packet-name","disabled"])]),se.rows.length!==0?(openBlock(),createBlock(t,{key:0},{default:withCtx(()=>[createVNode(i,{class:"d-flex align-center justify-content-space-between"},{default:withCtx(()=>[u[12]||(u[12]=createTextVNode(" Parameters ")),createVNode(a),createVNode(h,{modelValue:se.search,"onUpdate:modelValue":u[2]||(u[2]=v=>se.search=v),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search"},null,8,["modelValue"])]),_:1}),createVNode(o,{headers:se.headers,items:se.rows,search:se.search,"items-per-page":-1,"hide-default-footer":"","multi-sort":"",density:"compact","onContextmenu:row":E.showContextMenu},{"item.val":withCtx(({item:v})=>[createVNode(r,{modelValue:v.val,"onUpdate:modelValue":D=>v.val=D,states:v.states,"states-in-hex":se.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(se.status),1)]),_:1}),u[26]||(u[26]=createElementVNode("div",{style:{height:"15px"}},null,-1)),createVNode(f,{"no-gutters":""},{default:withCtx(()=>[createVNode(e,{class:"pr-4"},{default:withCtx(()=>[createVNode(t,{class:"pb-2"},{default:withCtx(()=>[createVNode(m,null,{default:withCtx(()=>[createVNode(f,null,{default:withCtx(()=>[createVNode(e,{class:"pt-6"},{default:withCtx(()=>u[13]||(u[13]=[createTextVNode(" Editable Command History: (Pressing Enter on the line re-executes the command) ")])),_:1}),createVNode(e,null,{default:withCtx(()=>[createVNode(s,{"open-delay":600,location:"top"},{activator:withCtx(({props:v})=>[createElementVNode("div",mergeProps(v,{class:"float-right"}),[createVNode(n,{icon:"mdi-delete-sweep",variant:"text","data-test":"clear-history",onClick:E.clearHistory},null,8,["onClick"])],16)]),default:withCtx(()=>[u[14]||(u[14]=createElementVNode("span",null," Clear History ",-1))]),_:1})]),_:1})]),_:1})]),_:1}),createVNode(f,{"no-gutters":"",class:"mt-2 mb-2"},{default:withCtx(()=>[createVNode(e,null,{default:withCtx(()=>[createElementVNode("pre",_hoisted_3,null,512)]),_:1})]),_:1})]),_:1})]),_:1}),se.screenDefinition?(openBlock(),createBlock(e,{key:0,md:"auto"},{default:withCtx(()=>[createVNode(x,{target:se.screenTarget,screen:se.screenName,definition:se.screenDefinition,keywords:se.keywords,count:se.screenCount,"show-close":!1},null,8,["target","screen","definition","keywords","count"])]),_:1})):createCommentVNode("",!0)]),_:1}),u[27]||(u[27]=createElementVNode("div",{style:{height:"15px"}},null,-1)),createVNode(G,{modelValue:se.contextMenuShown,"onUpdate:modelValue":u[3]||(u[3]=v=>se.contextMenuShown=v),target:[se.x,se.y]},{default:withCtx(()=>[createVNode(b,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(se.contextMenuOptions,(v,D)=>(openBlock(),createBlock(C,{key:D,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(Se,{modelValue:se.viewDetails,"onUpdate:modelValue":u[4]||(u[4]=v=>se.viewDetails=v),"target-name":se.targetName,"packet-name":se.commandName,"item-name":se.parameterName,type:"cmd"},null,8,["modelValue","target-name","packet-name","item-name"]),createVNode(q,{modelValue:se.displayCriticalCmd,"onUpdate:modelValue":u[5]||(u[5]=v=>se.displayCriticalCmd=v),uuid:se.criticalCmdUuid,"cmd-string":se.criticalCmdString,"cmd-user":se.criticalCmdUser},null,8,["modelValue","uuid","cmd-string","cmd-user"]),createVNode(j,{modelValue:se.displayErrorDialog,"onUpdate:modelValue":u[7]||(u[7]=v=>se.displayErrorDialog=v),"max-width":"600"},{default:withCtx(()=>[createVNode(t,null,{default:withCtx(()=>[createVNode(U,{height:"24"},{default:withCtx(()=>[createVNode(a),u[15]||(u[15]=createElementVNode("span",null," Error ",-1)),createVNode(a)]),_:1}),createVNode(at,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_4,[createVNode(f,{class:"my-2"},{default:withCtx(()=>[createVNode(at,null,{default:withCtx(()=>[createElementVNode("span",{textContent:toDisplayString(se.status)},null,8,_hoisted_5)]),_:1})]),_:1}),createVNode(f,null,{default:withCtx(()=>[createVNode(a),createVNode(n,{color:"primary","data-test":"error-dialog-ok",onClick:u[6]||(u[6]=v=>se.displayErrorDialog=!1)},{default:withCtx(()=>u[16]||(u[16]=[createTextVNode(" Ok ")])),_:1})]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"]),createVNode(j,{modelValue:se.displaySendHazardous,"onUpdate:modelValue":u[8]||(u[8]=v=>se.displaySendHazardous=v),"max-width":"600"},{default:withCtx(()=>[createVNode(t,null,{default:withCtx(()=>[createVNode(U,{height:"24"},{default:withCtx(()=>[createVNode(a),u[17]||(u[17]=createElementVNode("span",null," Hazardous Warning ",-1)),createVNode(a)]),_:1}),createVNode(at,{class:"mt-6"},{default:withCtx(()=>[createTextVNode(" Warning: Command "+toDisplayString(se.hazardousCommand)+" is Hazardous. Send? ",1),u[18]||(u[18]=createElementVNode("br",null,null,-1)),createElementVNode("span",_hoisted_6," Description: "+toDisplayString(se.commandDescription),1)]),_:1}),createVNode(W,{class:"px-2"},{default:withCtx(()=>[createVNode(a),createVNode(n,{variant:"outlined",onClick:E.cancelHazardousCmd},{default:withCtx(()=>u[19]||(u[19]=[createTextVNode(" Cancel ")])),_:1},8,["onClick"]),createVNode(n,{variant:"flat",onClick:E.sendHazardousCmd},{default:withCtx(()=>u[20]||(u[20]=[createTextVNode(" Send ")])),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),createVNode(j,{modelValue:se.displaySendRaw,"onUpdate:modelValue":u[11]||(u[11]=v=>se.displaySendRaw=v),"max-width":"600"},{default:withCtx(()=>[createVNode(t,null,{default:withCtx(()=>[createVNode(U,{height:"24"},{default:withCtx(()=>[createVNode(a),u[21]||(u[21]=createElementVNode("span",null," Send Raw ",-1)),createVNode(a)]),_:1}),createVNode(at,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_7,[createVNode(f,{class:"my-2"},{default:withCtx(()=>[createVNode(e,null,{default:withCtx(()=>u[22]||(u[22]=[createTextVNode("Interface:")])),_:1}),createVNode(e,null,{default:withCtx(()=>[createVNode(y,{modelValue:se.selectedInterface,"onUpdate:modelValue":u[9]||(u[9]=v=>se.selectedInterface=v),variant:"solo","hide-details":"",density:"compact",items:se.interfaces,"item-title":"label","item-value":"value"},null,8,["modelValue","items"])]),_:1})]),_:1}),createVNode(f,{"no-gutters":""},{default:withCtx(()=>[createVNode(e,null,{default:withCtx(()=>u[23]||(u[23]=[createTextVNode("Filename:")])),_:1}),createVNode(e,null,{default:withCtx(()=>[createElementVNode("input",{type:"file",onChange:u[10]||(u[10]=v=>c.selectRawCmdFile(v))},null,32)]),_:1})]),_:1}),createVNode(f,null,{default:withCtx(()=>[createVNode(a),createVNode(n,{variant:"outlined","data-test":"raw-cancel",onClick:c.cancelRawCmd},{default:withCtx(()=>u[24]||(u[24]=[createTextVNode(" Cancel ")])),_:1},8,["onClick"]),createVNode(n,{class:"bg-primary","data-test":"raw-ok",onClick:c.sendRawCmd},{default:withCtx(()=>u[25]||(u[25]=[createTextVNode(" Ok ")])),_:1},8,["onClick"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"])])}const CommandSender=exports("default",_export_sfc(_sfc_main,[["render",_sfc_render],["__scopeId","data-v-80865e28"]]))}}});
|