openc3-cosmos-tool-cmdsender 6.9.1 → 6.9.2

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.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/tools/cmdsender/ArrayWidget-C59wpWWk-ad3f8edc3a31fc872a34.js +2 -0
  3. data/tools/cmdsender/{ArrayplotWidget-CoRsUxHG-12382b56c3a62d81268d.js → ArrayplotWidget-tKqIV461-48ad65598dc61cc7d749.js} +1 -1
  4. data/tools/cmdsender/{BarColumn-DHP-zQ4R-1f19e419c9fc0b5e2325.js → BarColumn-CUO9ur6W-8a0a0fbdd77cebc286c3.js} +1 -1
  5. data/tools/cmdsender/{BlockWidget-BmHSFvOq-ffd01fde7e072a4e1519.js → BlockWidget-BdlMR_1A-55d292146464319013db.js} +2 -2
  6. data/tools/cmdsender/{ButtonWidget-C3ZWRjZZ-3658b69c040de7f78724.js → ButtonWidget-C2JVmh3p-6f91606cfcc237b36347.js} +2 -2
  7. data/tools/cmdsender/{CanvasWidget-CL-XzPF4-32f86cd2020f72ca7b55.js → CanvasWidget-BRbdw1fu-9d50b22a897df077fc92.js} +1 -1
  8. data/tools/cmdsender/{CanvasdotWidget-D8Y9DgVE-2e5aace28ea8c8104413.js → CanvasdotWidget-C8T_w03p-541ce9ae7057dd8c5032.js} +1 -1
  9. data/tools/cmdsender/{CanvasimageWidget-DHSGK_tD-1cf702923458f84067bb.js → CanvasimageWidget-C1w2vSsG-569cd64921be8317e52a.js} +1 -1
  10. data/tools/cmdsender/{CanvasimagevalueWidget-Btt_fQfC-f8d53e22fc85f2dca1fe.js → CanvasimagevalueWidget-BMv2SmEq-94cc4949a2ffd7b7bedb.js} +1 -1
  11. data/tools/cmdsender/{CanvaslabelWidget-BF_8RTjv-a633541bd16ee71e9eec.js → CanvaslabelWidget-LEBZQ3DR-c98254a2f3597c763c20.js} +1 -1
  12. data/tools/cmdsender/{CanvaslabelvalueWidget-scbwaujI-5656f52d22b36774474d.js → CanvaslabelvalueWidget-Q6UdEanF-96a0cd8f9cbf0570935c.js} +1 -1
  13. data/tools/cmdsender/{CanvaslineWidget-gRvm_-TT-d8b308db18b27a8177d5.js → CanvaslineWidget-BhvBCDoS-59cfca214be9fbec3697.js} +1 -1
  14. data/tools/cmdsender/{CanvaslinevalueWidget-CljziRek-38828a400e35bd685f09.js → CanvaslinevalueWidget-EaASC9TU-aabbf3f9bef97ea9fe1d.js} +1 -1
  15. data/tools/cmdsender/CheckbuttonWidget-C3bjQwrp-bf8a8151f1d1dd45988f.js +1 -0
  16. data/tools/cmdsender/{ComboboxWidget-BLXNYFiY-4203a77617e41e26f45d.js → ComboboxWidget-CmruSbJy-d3d2f33b82e6918f63cf.js} +1 -1
  17. data/tools/cmdsender/CommandSender-af37cb2ac42e9e845a72.js +1127 -0
  18. data/tools/cmdsender/{CriticalCmdDialog-CnNlsHRX-eb2ff0eba1fe61b10098.js → CriticalCmdDialog-C1ODz6z7-58ccfe6caff0101fba06.js} +1 -1
  19. data/tools/cmdsender/{DateWidget-BTqLCtLS-5aca2baf2e497848a8f8.js → DateWidget-CcUxRlJ2-e58a18e5eec10401eb69.js} +1 -1
  20. data/tools/cmdsender/{DetailsDialog-BNCS3QAe-5f07bef4b1e4ad85fd6e.js → DetailsDialog-DxYZre4A-b1dff0fde5a169f9fa77.js} +1 -1
  21. data/tools/cmdsender/{DynamicWidget-CfMtj7H8-ebe9b82dc117c61e0170.js → DynamicWidget-DHL7pbgW-ce073067d27cf213d394.js} +1 -1
  22. data/tools/cmdsender/{FormatvalueWidget-CLYx8qbg-8c7ed74d03fa7f37496b.js → FormatvalueWidget-Lk5K0wTL-8d1694fd54ca54eba5df.js} +1 -1
  23. data/tools/cmdsender/Graph-CjEE2WxX-c2d41a08f55d9f253279.js +1 -0
  24. data/tools/cmdsender/{GraphWidget-Cb6Ozf54-1cec3756ce292f5991ab.js → GraphWidget-BaO2FpKo-5c9f3d3896879ecaf522.js} +1 -1
  25. data/tools/cmdsender/{HorizontalWidget-AY2M01qP-ea2249ce225a09e47b49.js → HorizontalWidget-D3Q5IUQg-f5d5c6bbd65136661443.js} +1 -1
  26. data/tools/cmdsender/{HorizontalboxWidget-2MEKvq_C-a10be2e674ec68ae792b.js → HorizontalboxWidget-D7bUUqfG-5f4d3f65ff21c06fc7aa.js} +1 -1
  27. data/tools/cmdsender/HorizontallineWidget-DZcIetQh-a7a4fe16954b1430ad98.js +1 -0
  28. data/tools/cmdsender/{IframeWidget-UKKUl7k5-be906eb76f2b0d670672.js → IframeWidget-Df7vTYZj-caeb2d5dccd0f63376d3.js} +1 -1
  29. data/tools/cmdsender/{ImageLoader-C-CIL4YD-1e5f8ca87354a669df68.js → ImageLoader-DpKY46fX-5e1ff6653e5b6feab1df.js} +1 -1
  30. data/tools/cmdsender/{ImageviewerWidget-DhuQH5Io-aa4a8a3e53ccf85fb1b5.js → ImageviewerWidget-wHbhv08x-34951dd560eb3cc32a80.js} +1 -1
  31. data/tools/cmdsender/{LabelWidget-SO9zqcNN-c2936922e4207b83f9b2.js → LabelWidget-BehwzOCR-c57136597e4741fef259.js} +1 -1
  32. data/tools/cmdsender/LabelledWidget-DJKR8ikj-8c28d2c4e4b99019efd4.js +1 -0
  33. data/tools/cmdsender/LabelprogressbarWidget-D4Qzq894-350a08013e402f437f81.js +1 -0
  34. data/tools/cmdsender/LabelsparklineWidget-CwCOklZG-99e6ac6ba09011026c8a.js +1 -0
  35. data/tools/cmdsender/{LabelvalueWidget-B6BbNFnk-4971efbad7da88e9579a.js → LabelvalueWidget-DW8Q7BTX-5a70125a862fbd014d3e.js} +1 -1
  36. data/tools/cmdsender/{LabelvaluedescWidget-CxfL-H9C-c83400ba9bf86aa3541d.js → LabelvaluedescWidget-DgNX7tK2-d1d776a85b36c6510ed4.js} +1 -1
  37. data/tools/cmdsender/{LabelvaluelimitsbarWidget-BT5k9mHv-9f5a61501af1065377bf.js → LabelvaluelimitsbarWidget-DAEBW0hU-d4a6567b491ccd15a2c0.js} +1 -1
  38. data/tools/cmdsender/LabelvaluelimitscolumnWidget-Dok-of6n-7bb6db9c6618251ea306.js +1 -0
  39. data/tools/cmdsender/{LabelvaluerangebarWidget-DexAc2UB-77a8434e333fd67f39fa.js → LabelvaluerangebarWidget-CQ0xCUFU-cf35ecd3173e804d161d.js} +1 -1
  40. data/tools/cmdsender/{Layout-Dd6dRf3R-9fa9e9eee9d4990a312e.js → Layout-CrCMUbtG-263cb294b8f4f0b20972.js} +1 -1
  41. data/tools/cmdsender/{LedWidget-D1RwHb_V-255d306e006a21235592.js → LedWidget-DzQNEDF7-1f006247ef38d5455234.js} +1 -1
  42. data/tools/cmdsender/{LimitsbarWidget-ClOmoV50-da09cec359cfaf0f211f.js → LimitsbarWidget-zkoAz9SQ-82a08bb687294ed8473c.js} +1 -1
  43. data/tools/cmdsender/{LimitscolorWidget-CBUoEYKp-932a625ff9c092bd86a8.js → LimitscolorWidget-dez316Rk-2ab66aec984170040751.js} +1 -1
  44. data/tools/cmdsender/{LimitscolumnWidget-hsHkmY-_-7bac75e133a678b23f1b.js → LimitscolumnWidget-D-IPNDVg-87f010e56db049a7d6bc.js} +1 -1
  45. data/tools/cmdsender/{LinegraphWidget-CXrKtxOo-cf44e3fe8eed6c318881.js → LinegraphWidget-CicnZgjt-a3c5fbb095f2912f3672.js} +1 -1
  46. data/tools/cmdsender/{MatrixbycolumnsWidget-CsogVU9c-4631712b82dddedc6941.js → MatrixbycolumnsWidget-D3qN6GTr-b0b5a2df84f72fc36089.js} +1 -1
  47. data/tools/cmdsender/{ProgressbarWidget-CO6CEkxP-2ce1771a4846e8a8cf08.js → ProgressbarWidget-CLilcPBe-468e8ceae4bdc13b59bd.js} +1 -1
  48. data/tools/cmdsender/{RadiobuttonWidget-DrxUclws-770a5f3146efc5032d1b.js → RadiobuttonWidget-Dsy01RJ--733d34e9ac02af4efced.js} +1 -1
  49. data/tools/cmdsender/RadiogroupWidget-BNcVGNj1-f07f6726b4c763706b8b.js +1 -0
  50. data/tools/cmdsender/{RangebarWidget-5uQTfLMP-7e60c76a2eca0bb75f66.js → RangebarWidget-DhcoIdNf-1c69e2a9e28e5fae8fd8.js} +1 -1
  51. data/tools/cmdsender/{RollupWidget-B0DCULnu-0fd5fadba6c3b796088d.js → RollupWidget-BypuPvE7-9cd207ba005e6bef6d56.js} +1 -1
  52. data/tools/cmdsender/{ScrollwindowWidget-BOkZQgtf-3761cd2de16927753fc7.js → ScrollwindowWidget-DNQgHoNO-31b268c6e58b90fc17ee.js} +1 -1
  53. data/tools/cmdsender/{SignalWidget-Cis0Xkea-587dda7c83764be27649.js → SignalWidget-BHwyScCG-fb08ddcc1c4e52e724a5.js} +1 -1
  54. data/tools/cmdsender/{SpacerWidget-CLcqC2Qk-6d8937921d404243eed5.js → SpacerWidget-CFxXXTm7-a1e7e244045cb087aee4.js} +1 -1
  55. data/tools/cmdsender/{SparklineWidget-CTp83eZ--b86ab4fcd1195736406d.js → SparklineWidget-C0lRpRrp-58129fb3942b5f1ed4b2.js} +1 -1
  56. data/tools/cmdsender/{TabbookWidget-uucd-zsX-40158b55e179635f1f12.js → TabbookWidget-CeeBOYOt-de01c6ae71daba6bff42.js} +1 -1
  57. data/tools/cmdsender/TargetPacketItemChooser-Brm7gfWf-26983e29e3a6eca41a2c.js +1 -0
  58. data/tools/cmdsender/TextboxWidget-DoA2b3YU-aeac8867ebcdb98d8b12.js +1 -0
  59. data/tools/cmdsender/{TextfieldWidget--HTv9ddk-bd20ecc02fad7ae1272a.js → TextfieldWidget-Dj4DV74o-70ae4e4156c5f1adc4c0.js} +1 -1
  60. data/tools/cmdsender/{TimeWidget-CPNVZaUM-1a556d4ad81c0931627a.js → TimeWidget-DAQDQ0UM-fa4d902a77f52c4a6592.js} +1 -1
  61. data/tools/cmdsender/TitleWidget-Ct0JlY9s-e605e9fc801abdafa17f.js +1 -0
  62. data/tools/cmdsender/{VWidget-DQGJRgAk-e85a66609662da5278e5.js → VWidget-A802LGvR-26fa136e33b94f4e0f61.js} +1 -1
  63. data/tools/cmdsender/{ValueWidget-Bk1RFjks-36377dfb44f88d58fef7.js → ValueWidget-QaBYsiZz-d4ae8ba10d289cdbd237.js} +1 -1
  64. data/tools/cmdsender/ValuelimitsbarWidget-CFToRM7w-5f555298942a08a38065.js +1 -0
  65. data/tools/cmdsender/ValuelimitscolumnWidget-BG7naMYx-5394880ba6c143c10f2d.js +1 -0
  66. data/tools/cmdsender/{ValuerangebarWidget-CcQw_XK9-6eae3666d09e61ab6e7b.js → ValuerangebarWidget-CChK2Lmm-eccd1b9c1492aa5fa4dc.js} +1 -1
  67. data/tools/cmdsender/{VerticalWidget-CNtFQv3R-f75db01ef87079daca16.js → VerticalWidget-C8iN5DJK-d70edb3c6377dead1976.js} +1 -1
  68. data/tools/cmdsender/VerticalboxWidget-CXwUSWrP-2c2b736a313f590363ce.js +1 -0
  69. data/tools/cmdsender/{Widget-LsyjS7ZS-8214468518010a07cb13.js → Widget-Cx1jBJHK-fcffd1a5c97ce4434cea.js} +1 -1
  70. data/tools/cmdsender/main-ca725949e5b295285205.js +1505 -0
  71. data/tools/cmdsender/main.js +1 -1
  72. metadata +70 -70
  73. data/tools/cmdsender/ArrayWidget-DLfNWDzN-25f622d30e861b0041db.js +0 -2
  74. data/tools/cmdsender/CheckbuttonWidget-BOabI_jE-7de4a680244044506436.js +0 -1
  75. data/tools/cmdsender/CommandSender-c2c3cbce87aa148e34be.js +0 -1127
  76. data/tools/cmdsender/Graph-BliBYJxD-9bf510fe38f721a89a17.js +0 -1
  77. data/tools/cmdsender/HorizontallineWidget-DgpOPA7q-4d288700a7e7536f1bc0.js +0 -1
  78. data/tools/cmdsender/LabelledWidget-DWoM5AJ5-2578fd12945fe3ace33e.js +0 -1
  79. data/tools/cmdsender/LabelprogressbarWidget-D3vnkvQZ-ed8368d506db7914cea4.js +0 -1
  80. data/tools/cmdsender/LabelsparklineWidget-DO0T-Jot-e66eb13e86cd18eee2b5.js +0 -1
  81. data/tools/cmdsender/LabelvaluelimitscolumnWidget-DUbmxh4p-5091d99f17474b41b98e.js +0 -1
  82. data/tools/cmdsender/RadiogroupWidget-DN9C38cg-31cf51aa52ffefd66050.js +0 -1
  83. data/tools/cmdsender/TargetPacketItemChooser-CXpSx-eA-c0e56e3b26de57ba3ae6.js +0 -1
  84. data/tools/cmdsender/TextboxWidget-C2n38ti5-39b2e9a3da26cecfa990.js +0 -1
  85. data/tools/cmdsender/TitleWidget-Cp0cb6V8-1e935d9763456a67e665.js +0 -1
  86. data/tools/cmdsender/ValuelimitsbarWidget-C0HIBYh2-425663e1934f79f395b0.js +0 -1
  87. data/tools/cmdsender/ValuelimitscolumnWidget-BTT90uyX-d981d2f17fd5678449c0.js +0 -1
  88. data/tools/cmdsender/VerticalboxWidget-Yxmz1SnU-ab8d172c30511e4200b8.js +0 -1
  89. data/tools/cmdsender/main-7e8c04b151ea937bf64e.js +0 -1505
@@ -0,0 +1,1127 @@
1
+ System.register(["./main-ca725949e5b295285205.js","vue","./TargetPacketItemChooser-Brm7gfWf-26983e29e3a6eca41a2c.js","./DetailsDialog-DxYZre4A-b1dff0fde5a169f9fa77.js","./CriticalCmdDialog-C1ODz6z7-58ccfe6caff0101fba06.js","single-spa","vue-router","vuex","vuetify"],function(exports,module){"use strict";var d,UA,FA,BA,WA,Ik,bA,_export_sfc,resolveComponent,createBlock,openBlock,Teleport,createVNode,withCtx,createElementVNode,toDisplayString,createElementBlock,Fragment,renderList,createTextVNode,mergeProps,createSlots,createCommentVNode,normalizeStyle,withDirectives,vShow,normalizeProps,guardReactiveProps,withKeys,withModifiers,renderSlot,normalizeClass,S,P$1,N$1;return{setters:[u=>{d=u.d,UA=u.U,FA=u.F,BA=u.B,WA=u.W,Ik=u.I,bA=u.b,_export_sfc=u._},u=>{resolveComponent=u.resolveComponent,createBlock=u.createBlock,openBlock=u.openBlock,Teleport=u.Teleport,createVNode=u.createVNode,withCtx=u.withCtx,createElementVNode=u.createElementVNode,toDisplayString=u.toDisplayString,createElementBlock=u.createElementBlock,Fragment=u.Fragment,renderList=u.renderList,createTextVNode=u.createTextVNode,mergeProps=u.mergeProps,createSlots=u.createSlots,createCommentVNode=u.createCommentVNode,normalizeStyle=u.normalizeStyle,withDirectives=u.withDirectives,vShow=u.vShow,normalizeProps=u.normalizeProps,guardReactiveProps=u.guardReactiveProps,withKeys=u.withKeys,withModifiers=u.withModifiers,renderSlot=u.renderSlot,normalizeClass=u.normalizeClass},u=>{S=u.S},u=>{P$1=u.P},u=>{N$1=u.N},null,null,null,null],execute:function(){var __vite_style__=document.createElement("style");__vite_style__.textContent=`.editor[data-v-ba9d74bc]{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",E="ace/keyboard/vim",K$1="openc3-ace-default-scripting-language",Z={isVimModeEnabled(){return localStorage.getItem(I)==="true"},setVimMode(u){localStorage.setItem(I,JSON.stringify(!!u))},toggleVimMode(u){this.isVimModeEnabled()?(u.setKeyboardHandler(null),this.setVimMode(!1)):(u.setKeyboardHandler(E),this.setVimMode(!0)),u.focus()},applyVimModeIfEnabled(u,{saveFn:f}={}){this.isVimModeEnabled()?(u.setKeyboardHandler(E),ace.config.loadModule(E,p=>{p.CodeMirror.Vim.defineEx("write","w",v=>{typeof f=="function"?f():v.ace.execCommand("save")})})):u.setKeyboardHandler(null)},getDefaultScriptingLanguage(){return localStorage.getItem(K$1)||"python"},setDefaultScriptingLanguage(u){(u==="ruby"||u==="python")&&localStorage.setItem(K$1,u)}},z$2={props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(u){return u.replaceAll(" ","-").toLowerCase()},subMenuClick(u){u.command(u),this.$refs.topmenu[0].isActive=!1}},mounted(){document.title=this.title}},F={class:"app-title mr-2"};function J(u,f,p,v,fe,x){const w=resolveComponent("v-col"),A=resolveComponent("v-row"),c=resolveComponent("v-icon"),h=resolveComponent("v-btn"),n=resolveComponent("v-divider"),o=resolveComponent("v-list-item-title"),r=resolveComponent("v-list-item"),i=resolveComponent("v-list"),e=resolveComponent("v-menu"),t=resolveComponent("v-radio"),a=resolveComponent("v-list-item-action"),g=resolveComponent("v-radio-group"),m=resolveComponent("v-checkbox");return openBlock(),createBlock(Teleport,{to:"#openc3-menu"},[createVNode(A,{"no-gutters":""},{default:withCtx(()=>[createVNode(w,{"align-self":"end"},{default:withCtx(()=>[createElementVNode("span",F,toDisplayString(p.title),1)]),_:1})]),_:1}),createVNode(A,{dense:"",class:"flex-nowrap"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(p.menus,(M,O)=>(openBlock(),createBlock(e,{ref_for:!0,ref:"topmenu",key:O},{activator:withCtx(({props:$})=>[createVNode(h,mergeProps({ref_for:!0},$,{variant:"outlined",class:"mx-1 menu-button",text:M.label,"data-test":x.formatDT(`${p.title} ${M.label}`)}),{append:withCtx(()=>[createVNode(c,{class:"menu-button-icon"},{default:withCtx(()=>[...f[0]||(f[0]=[createTextVNode(" mdi-menu-down ",-1)])]),_:1})]),_:1},16,["text","data-test"])]),default:withCtx(()=>[createVNode(i,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(M.items,($,b)=>(openBlock(),createElementBlock(Fragment,null,[$.divider?(openBlock(),createBlock(n,{key:b+"-divider"})):$.subMenu&&$.subMenu.length>0?(openBlock(),createElementBlock("div",{key:b+"-submenu"},[(openBlock(),createBlock(e,{"open-on-hover":"",location:"right",key:b},{activator:withCtx(({props:he})=>[(openBlock(),createBlock(r,mergeProps({ref_for:!0},he,{disabled:$.disabled,key:b}),createSlots({append:withCtx(()=>[createVNode(c,null,{default:withCtx(()=>[...f[1]||(f[1]=[createTextVNode(" mdi-chevron-right ",-1)])]),_:1})]),default:withCtx(()=>[!$.radio&&!$.checkbox?(openBlock(),createBlock(o,{key:0,style:normalizeStyle("cursor: pointer;"+($.disabled?"opacity: 0.2":""))},{default:withCtx(()=>[createTextVNode(toDisplayString($.label),1)]),_:2},1032,["style"])):createCommentVNode("",!0)]),_:2},[$.icon?{name:"prepend",fn:withCtx(()=>[createVNode(c,{disabled:$.disabled},{default:withCtx(()=>[createTextVNode(toDisplayString($.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:withCtx(()=>[createVNode(i,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList($.subMenu,(he,Te)=>(openBlock(),createBlock(r,{key:Te,"prepend-icon":he.icon,onClick:de=>x.subMenuClick(he)},{default:withCtx(()=>[createVNode(o,null,{default:withCtx(()=>[createTextVNode(toDisplayString(he.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):$.radioGroup?(openBlock(),createBlock(g,{"model-value":$.value,"onUpdate:modelValue":$.command,key:b+"-radio-group","hide-details":"",density:"compact",class:"ma-0 pa-0"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList($.choices,(he,Te)=>(openBlock(),createBlock(r,{key:Te+"-choice"},{default:withCtx(()=>[createVNode(a,{class:"list-action"},{default:withCtx(()=>[createVNode(t,{color:"secondary",label:he.label,value:he.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(openBlock(),createBlock(r,{onClick:he=>$.command($),disabled:$.disabled,"data-test":x.formatDT(`${p.title} ${M.label} ${$.label}`),key:b+"-list"},createSlots({default:withCtx(()=>[$.checkbox?(openBlock(),createBlock(a,{key:0,class:"list-action"},{default:withCtx(()=>[createVNode(m,{modelValue:$.checked,"onUpdate:modelValue":he=>$.checked=he,label:$.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):createCommentVNode("",!0),!$.radio&&!$.checkbox?(openBlock(),createBlock(o,{key:1,style:normalizeStyle("cursor: pointer;"+($.disabled?"opacity: 0.2":""))},{default:withCtx(()=>[createTextVNode(toDisplayString($.label),1)]),_:2},1032,["style"])):createCommentVNode("",!0)]),_:2},[$.icon?{name:"prepend",fn:withCtx(()=>[createVNode(c,{icon:$.icon,disabled:$.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["onClick","disabled","data-test"]))],64))),256))]),_:2},1024)]),_:2},1024))),128))]),_:1})])}const j$1=d(z$2,[["render",J],["__scopeId","data-v-4d454b93"]]);let Q$1=class{constructor(){FA.get("/openc3-api/autocomplete/data/screen").then(f=>{this.autocompleteData=f.data}),this.api=new BA}async getCompletions(f,p,v,fe,x){let w=p.getLine(v.row).slice(0,v.column).trimStart().split(/ (?![^<]*>)/),A=this.autocompleteData;w.length>1&&(A=A.find(n=>n.caption===w[0]));let c={},h=!0;if(A&&A.params){A.params.length==w.length-1&&(h=!1);let n=A.params[w.length-2];if(n["Target name"])A=(await this.api.get_target_names()).reduce((o,r)=>(o[r]=1,o),{});else if(n["Packet name"]){let o=w[w.length-2];A=(await this.api.get_all_tlm(o)).reduce((r,i)=>(r[i.packet_name]=i.description,r),{})}else if(n["Item name"]){let o=w[w.length-3],r=w[w.length-2];A=(await this.api.get_tlm(o,r)).items.reduce((i,e)=>(i[e.name]=e.description,i),{})}else A=n;c=Object.keys(A||{}).map(o=>{let r={value:o+(h?" ":""),command:h&&"startAutocomplete"};return typeof A[o]=="string"&&(r.meta=A[o]),r})}else c=A;x(null,c)}};const ee$1={props:{modelValue:Boolean,target:{type:String,default:""},screen:{type:String,default:""},definition:{type:String,default:""},keywords:{type:Array,default:()=>[]},errors:{type:Array,default:()=>[]}},emits:["cancel","delete","save","update:modelValue"],data(){return{file:null,docsKeyword:"",contextMenu:!1,menuX:0,menuY:0}},computed:{editErrors:function(){if(this.definition===""&&!this.file)return["Input can not be blank."];if(this.errors.length!==0){let u=new Set,f=[];const p=this.errors.toSorted((v,fe)=>v.lineNumber-fe.lineNumber);for(const v of p){let fe=`At ${v.lineNumber}: (${v.line}) ${v.message}.`;v.usage&&(fe+=` Usage: ${v.usage}`),f.push(fe),u.add(v.message)}return f}return[]},show:{get(){return this.modelValue},set(u){this.$emit("update:modelValue",u)}}},mounted:function(){this.editor=bA.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight");const u=this.buildScreenMode();this.editor.session.setMode(new u),this.editor.session.setTabSize(2),this.editor.session.setUseWrapMode(!0),this.editor.$blockScrolling=1/0,this.editor.setOption("enableBasicAutocompletion",!0),this.editor.setOption("enableLiveAutocompletion",!0),this.editor.completers=[new Q$1],this.editor.setHighlightActiveLine(!1),this.editor.setValue(this.definition),this.editor.clearSelection(),Z.applyVimModeIfEnabled(this.editor),this.editor.focus()},beforeUnmount(){this.editor.destroy(),this.editor.container.remove()},methods:{toggleVimMode:function(){Z.toggleVimMode(this.editor)},showContextMenu:function(u){this.menuX=u.pageX,this.menuY=u.pageY;let f=this.editor.getCursorPosition(),p=this.editor.session.getTokenAt(f.row,f.column);if(p){let v=p.value.trim();v.includes(" ")?this.docsKeyword=v.split(" ")[0]:this.docsKeyword=v,this.contextMenu=!0}},openDocumentation(){window.open(`${window.location.origin}/tools/staticdocs/docs/configuration/telemetry-screens#${this.docsKeyword.toLowerCase()}`,"_blank")},buildScreenMode(){let u=bA.require("ace/lib/oop"),f=bA.require("ace/mode/text_highlight_rules").TextHighlightRules,p=this.keywords.join("|"),v=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*(${p})\\b`)}]},this.normalizeRules()};u.inherits(v,f);let fe=function(){this.HighlightRules=v},x=bA.require("ace/mode/text").Mode;return u.inherits(fe,x),(function(){this.$id="ace/mode/openc3"}).call(fe.prototype),fe},downloadScreen:function(){const u=new Blob([this.editor.getValue()],{type:"text/plain"}),f=document.createElement("a");f.href=URL.createObjectURL(u),f.setAttribute("download",`${this.screen.toLowerCase()}.txt`),f.click()},loadFile:function(){const u=new FileReader;u.readAsText(this.file);const f=this;u.onload=function(){f.editor.setValue(u.result),f.file=null}},deleteScreen:function(){this.$dialog.confirm("Are you sure you want to delete this screen?!",{okText:"Delete",cancelText:"Cancel"}).then(u=>{this.$emit("delete")})}}},te$1=["textContent"];function ne$1(u,f,p,v,fe,x){const w=resolveComponent("v-btn"),A=resolveComponent("v-spacer"),c=resolveComponent("v-toolbar"),h=resolveComponent("v-row"),n=resolveComponent("v-file-input"),o=resolveComponent("v-list-item-title"),r=resolveComponent("v-list-item"),i=resolveComponent("v-divider"),e=resolveComponent("v-list"),t=resolveComponent("v-menu"),a=resolveComponent("v-card-text"),g=resolveComponent("v-card"),m=resolveComponent("v-dialog");return openBlock(),createBlock(m,{modelValue:x.show,"onUpdate:modelValue":f[5]||(f[5]=M=>x.show=M),persistent:"",width:"75vw",onKeydown:f[6]||(f[6]=withKeys(M=>u.$emit("cancel"),["esc"]))},{default:withCtx(()=>[createVNode(g,null,{default:withCtx(()=>[createVNode(c,{height:"24"},{default:withCtx(()=>[createVNode(w,{class:"mx-2",icon:"mdi-delete",variant:"text",density:"compact","data-test":"delete-screen-icon",onClick:x.deleteScreen},null,8,["onClick"]),createVNode(A),createElementVNode("span",null," Edit Screen: "+toDisplayString(p.target)+" "+toDisplayString(p.screen),1),createVNode(A),createVNode(w,{class:"mx-2",icon:"mdi-download",variant:"text",density:"compact","data-test":"download-screen-icon",onClick:x.downloadScreen},null,8,["onClick"])]),_:1}),createVNode(a,{style:{"max-height":"90vh"}},{default:withCtx(()=>[createVNode(h,{class:"mt-3"},{default:withCtx(()=>[...f[7]||(f[7]=[createTextVNode(" Upload a screen file. ",-1)])]),_:1}),createVNode(h,{"no-gutters":"",align:"center"},{default:withCtx(()=>[createVNode(w,{disabled:!fe.file,color:"primary",class:"mr-3","data-test":"edit-screen-load",onClick:x.loadFile},{default:withCtx(()=>[...f[8]||(f[8]=[createTextVNode(" Load ",-1)])]),_:1},8,["disabled","onClick"]),createVNode(n,{modelValue:fe.file,"onUpdate:modelValue":f[0]||(f[0]=M=>fe.file=M),"truncate-length":"15",accept:".txt",label:"Click to select .txt screen file."},null,8,["modelValue"])]),_:1}),createVNode(h,{class:"mb-2"},{default:withCtx(()=>[...f[9]||(f[9]=[createTextVNode(" Edit the screen definition. ",-1)])]),_:1}),createVNode(h,{class:"mb-2"},{default:withCtx(()=>[createElementVNode("pre",{ref:"editor",class:"editor",onContextmenu:f[1]||(f[1]=withModifiers((...M)=>x.showContextMenu&&x.showContextMenu(...M),["prevent"]))},null,544),createVNode(t,{modelValue:fe.contextMenu,"onUpdate:modelValue":f[2]||(f[2]=M=>fe.contextMenu=M),target:[fe.menuX,fe.menuY]},{default:withCtx(()=>[createVNode(e,null,{default:withCtx(()=>[createVNode(r,{link:""},{default:withCtx(()=>[createVNode(o,{onClick:x.openDocumentation},{default:withCtx(()=>[createTextVNode(toDisplayString(fe.docsKeyword)+" documentation ",1)]),_:1},8,["onClick"])]),_:1}),createVNode(i),createVNode(r,{title:"Toggle Vim mode","prepend-icon":"extras:vim",onClick:x.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(x.editErrors,(M,O)=>(openBlock(),createElementBlock("div",{key:O},[createElementVNode("span",{class:"text-red",textContent:toDisplayString(M)},null,8,te$1)]))),128))]),_:1}),createVNode(h,{class:"mt-5"},{default:withCtx(()=>[f[12]||(f[12]=createElementVNode("span",null," Ctrl-space brings up autocomplete. Right click keywords for documentation. ",-1)),createVNode(A),createVNode(w,{class:"mx-2",variant:"outlined","data-test":"edit-screen-cancel",onClick:f[3]||(f[3]=M=>u.$emit("cancel"))},{default:withCtx(()=>[...f[10]||(f[10]=[createTextVNode(" Cancel ",-1)])]),_:1}),createVNode(w,{class:"mx-2",color:"primary","data-test":"edit-screen-save",onClick:f[4]||(f[4]=M=>u.$emit("save",u.editor.getValue()))},{default:withCtx(()=>[...f[11]||(f[11]=[createTextVNode(" Save ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const ie$2=d(ee$1,[["render",ne$1],["__scopeId","data-v-00a228d0"]]),z$1=20,ye$1={components:{EditScreenDialog:ie$2},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},playbackMode:{type:String,default:"realtime"},playbackDateTime:{type:Date,default:null}},emits:["close-screen","delete-screen","drag-screen","edit-screen","float-screen","min-max-screen","unfloat-screen"],data(){return{api:null,backup:"",currentDefinition:this.definition,editDialog:!1,expand:!0,configParser:null,currentLayout:null,layoutStack:[],namedWidgets:{},dynamicWidgets:[],width:null,height:null,staleTime:30,cacheTimeout:.1,globalSettings:[],substitute:!1,original_target_name:null,force_substitute:!1,pollingPeriod:1,errors:[],errorDialog:!1,screenKey:null,dragX:0,dragY:0,floated:this.initialFloated,top:this.initialTop,left:this.initialLeft,zIndex:this.initialZ,changeCounter:0,screenItems:[],actualScreenItems:[],screenValues:{},updateCounter:0,updater:null,screenId:Ik.uniqueId("openc3-screen_"),tlmAvailableTimeout:null}},computed:{error:function(){if(this.errorDialog&&this.errors.length>0){let u=new Set,f="";for(const p of this.errors){if(u.has(p.message))continue;let v=`${p.time}: (${p.type}) ${p.message}
3
+ `;f+=v,u.add(p.message)}return f}return null},computedStyle(){var u;let f={};const p=this.width||((u=this.$refs.bar)==null?void 0:u.clientWidth);return this.floated&&(f.position="absolute",f.top=this.top+"px",f.left=this.left+"px",f.width=p+"px"),f}},watch:{count:{handler(u,f){this.currentDefinition=this.definition,this.rerender()}},playbackDateTime:{handler(u,f){this.playbackMode==="playback"&&u&&this.update()}},playbackMode:{handler(u,f){u==="realtime"?this.updateRefreshInterval():(clearInterval(this.updater),this.updater=null)}}},errorCaptured(u,f,p){return this.errors.length<z$1&&(u.usage?this.errors.push({type:"usage",message:u.message,usage:u.usage,line:u.line,lineNumber:u.lineNumber,time:new Date().getTime()}):this.errors.push({type:"error",message:u,time:new Date().getTime()})),!1},created(){this.api=new BA,this.configParser=new WA,this.parseDefinition(),this.screenKey=Math.floor(Math.random()*1e6)},mounted(){this.playbackMode==="realtime"&&this.updateRefreshInterval(),this.floated&&(this.$refs.bar.onmousedown=this.dragMouseDown,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex)},unmounted(){this.updater!=null&&(clearInterval(this.updater),this.updater=null),this.tlmAvailableTimeout!=null&&(clearTimeout(this.tlmAvailableTimeout),this.tlmAvailableTimeout=null)},methods:{open(u,f){this.$parent.showScreen(u,f)},close(u,f){this.$parent.closeScreenByName(u,f)},closeAll(){this.$parent.closeAll()},clearErrors:function(){this.errors=[]},updateRefreshInterval:function(){let u=this.pollingPeriod*1e3;this.updater&&clearInterval(this.updater),this.updater=setInterval(()=>{this.update()},u)},parseDefinition:function(){if(this.clearErrors(),this.screenItems=[],this.namedWidgets={},this.layoutStack=[],this.dynamicWidgets=[],this.layoutStack.push({type:"VerticalWidget",parameters:[],widgets:[]}),this.currentLayout=this.layoutStack[this.layoutStack.length-1],this.configParser.parse_string(this.currentDefinition,"",!1,!0,(u,f,p,v)=>{if(u)switch(u){case"SCREEN":this.configParser.verify_num_parameters(3,4,`${u} <Width or AUTO> <Height or AUTO> <Polling Period>`),this.width=parseInt(f[0]),this.height=parseInt(f[1]),this.pollingPeriod=parseFloat(f[2]);break;case"END":this.configParser.verify_num_parameters(0,0,`${u}`),this.layoutStack.pop(),this.currentLayout=this.layoutStack[this.layoutStack.length-1];break;case"STALE_TIME":this.configParser.verify_num_parameters(1,1,`${u} <Time (s)>`),this.staleTime=parseInt(f[0]);break;case"SUBSETTING":this.configParser.verify_num_parameters(3,null,`${u} <Index> <Widget Type> <Widget Settings...>`),f[1]==="RAW"&&(f[1]="RAW__"+f[2].toLowerCase());case"SETTING":this.configParser.verify_num_parameters(2,null,`${u} <Widget Type> <Widget Settings...>`),f[0]==="RAW"&&(f[0]="RAW__"+f[1].toLowerCase()),(this.currentLayout.widgets[this.currentLayout.widgets.length-1]??this.currentLayout).settings.push(f);break;case"GLOBAL_SUBSETTING":this.configParser.verify_num_parameters(3,null,`${u} <Index> <Widget Type> <Widget Settings...>`),f[2]==="RAW"&&(f[2]="RAW__"+f[3].toLowerCase());case"GLOBAL_SETTING":this.configParser.verify_num_parameters(2,null,`${u} <Widget Type> <Widget Settings...>`),f[1]==="RAW"&&(f[1]="RAW__"+f[2].toLowerCase()),this.globalSettings.push(f);break;default:this.processWidget(u,f,p,v);break}}),typeof this.layoutStack[0]>"u"){let u=[],f=[];for(const p of this.dynamicWidgets)u.push(p.name),f.push(p.lineNumber);this.errors.length<z$1&&this.errors.push({type:"usage",message:`Unknown widget! Are these widgets: ${u.join(",")}?`,lineNumber:f.join(","),time:new Date().getTime()}),this.layoutStack[0]={type:"VerticalWidget",parameters:[],widgets:[]}}else this.applyGlobalSettings(this.layoutStack[0].widgets)},openEdit:function(){this.backup=this.currentDefinition.repeat(1),this.editDialog=!0},upScreen:function(){this.zIndex+=1,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex,this.$emit("drag-screen",[this.floated,this.top,this.left,this.zIndex])},downScreen:function(){this.zIndex>this.minZ&&(this.zIndex-=1,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex,this.$emit("drag-screen",[this.floated,this.top,this.left,this.zIndex]))},floatScreen:function(){if(this.floated)this.$refs.bar.onmousedown=null,this.$refs.bar.parentElement.parentElement.style="z-index: 0",this.floated=!1,this.$emit("unfloat-screen",[this.floated,this.top,this.left,this.zIndex]);else{let u=this.$refs.bar.parentElement.parentElement.parentElement.getBoundingClientRect(),f=this.$refs.bar.getBoundingClientRect();this.top=f.top-u.top-5,this.left=f.left-u.left-5,this.$refs.bar.onmousedown=this.dragMouseDown,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex,this.floated=!0,this.$emit("float-screen",[this.floated,this.top,this.left,this.zIndex])}},dragMouseDown:function(u){u=u||window.event,u.preventDefault(),this.dragX=u.clientX,this.dragY=u.clientY,document.onmouseup=this.closeDragElement,document.onmousemove=this.elementDrag},elementDrag:function(u){u=u||window.event,u.preventDefault();let f=this.dragX-u.clientX,p=this.dragY-u.clientY;this.dragX=u.clientX,this.dragY=u.clientY,this.top=this.$refs.bar.offsetTop-p,this.left=this.$refs.bar.offsetLeft-f,this.$emit("drag-screen",[this.floated,this.top,this.left,this.zIndex])},closeDragElement:function(){document.onmouseup=null,document.onmousemove=null},rerender:function(){this.parseDefinition(),this.updateRefreshInterval(),this.screenKey=Math.floor(Math.random()*1e6),this.$nextTick(function(){this.clearErrors(),this.$emit("edit-screen")})},cancelEdit:function(){this.file=null,this.editDialog=!1,this.currentDefinition=this.backup,this.rerender()},saveEdit:function(u){this.editDialog=!1,this.currentDefinition=u,this.rerender(),this.$nextTick(function(){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(u=>{this.$emit("delete-screen")})},minMaxTransition:function(){this.expand=!this.expand,this.$emit("min-max-screen")},processWidget:function(u,f,p,v){let fe=null;u==="NAMED_WIDGET"&&(this.configParser.verify_num_parameters(2,null,`${u} <Widget Name> <Widget Type> <Widget Settings... (optional)>`),fe=f[0].toUpperCase(),u=f[1].toUpperCase(),f=f.slice(2,f.length));const x=u.charAt(0).toUpperCase()+u.slice(1).toLowerCase()+"Widget";let w=[];if(w.push(["__SCREEN_ID__",this.screenId]),fe!==null&&w.push(["NAMED_WIDGET",fe]),u==="VERTICAL"||u==="VERTICALBOX"||u==="HORIZONTAL"||u==="HORIZONTALBOX"||u==="MATRIXBYCOLUMNS"||u==="TABBOOK"||u==="TABITEM"||u==="CANVAS"||u==="RADIOGROUP"||u==="SCROLLWINDOW"){const A={type:x,parameters:f,settings:w,screenValues:this.screenValues,screenTimeZone:this.timeZone,widgets:[]};this.layoutStack.push(A),this.currentLayout.widgets.push(A),this.currentLayout=A}else if(this.$options.components[x])this.currentLayout.widgets.push({type:x,target:this.target,parameters:f,settings:w,screenValues:this.screenValues,screenTimeZone:this.timeZone,line:p,lineNumber:v});else{let A={type:"DynamicWidget",target:this.target,parameters:f,settings:w,screenValues:this.screenValues,screenTimeZone:this.timeZone,name:x,line:p,lineNumber:v};this.currentLayout.widgets.push(A),this.dynamicWidgets.push(A)}},applyGlobalSettings:function(u){u.forEach(f=>{this.globalSettings.forEach(p=>{f.type.toLowerCase()===p[0].toLowerCase()+"widget"&&(f.settings.find(v=>v[0]===p[1])||f.settings.push(p.slice(1)))}),f.widgets&&this.applyGlobalSettings(f.widgets)})},update:function(){let u=this.playbackMode==="playback"?this.playbackDateTime:null;this.actualScreenItems.length!==0&&this.api.get_tlm_values(this.actualScreenItems,this.staleTime,this.cacheTimeout,u).then(f=>{f&&f.length>0&&this.updateValues(f)}).catch(f=>{let p=JSON.stringify(f,null,2);this.errors.find(v=>v.message===p)||this.errors.length<z$1&&this.errors.push({type:"error",message:p,time:new Date().getTime()})})},updateValues:function(u){if(this.updateCounter+=1,u.length!=this.screenItems.length||u.length!=this.actualScreenItems.length)console.log(`get_tlm_values mismatch: data.length: ${u.length}, screenItems.length: ${this.screenItems.length}, actualScreenItems.length: ${this.actualScreenItems.length}`,JSON.stringify(u),JSON.stringify(this.screenItems),JSON.stringify(this.actualScreenItems));else for(let f=0;f<u.length;f++)u[f].push(this.updateCounter),this.screenValues[this.screenItems[f]]=u[f]},debouncedUpdateTlmAvailable:function(){this.tlmAvailableTimeout!=null&&clearTimeout(this.tlmAvailableTimeout),this.tlmAvailableTimeout=setTimeout(()=>{this.api.get_tlm_available(this.screenItems).then(u=>{if(this.actualScreenItems=u,this.screenItems.length!=u.length)console.log("Error getting tlm available",this.screenItems,this.actualScreenItems);else for(let f=0;f<this.actualScreenItems.length;f++)if(this.actualScreenItems[f]===null){const p=this.screenItems[f].split("__"),v=this.currentDefinition.split(`
4
+ `),fe=v.findIndex(x=>x.includes(p[0])&&x.includes(p[1])&&x.includes(p[2]))+1;fe>0?this.errors.push({type:"usage",message:`Null for ${p.join(" ")}! Does it exist?`,line:v[fe-1],lineNumber:fe,time:new Date().getTime()}):this.errors.push({type:"error",message:`Null for ${p.join(" ")}! Does it exist?`,time:new Date().getTime()})}}).catch(u=>{console.log("Error getting tlm available",u),this.actualScreenItems=this.screenItems}),this.tlmAvailableTimeout=null},100)},addItem:function(u){this.screenItems.push(u),this.screenValues[u]=[null,null,0],this.debouncedUpdateTlmAvailable()},deleteItem:function(u){let f=this.screenItems.indexOf(u);this.screenItems.splice(f,1),this.debouncedUpdateTlmAvailable()}}},_e$1={ref:"screen",class:"pa-1",style:{position:"relative"}},be$1={key:1,class:"pa-1",style:{position:"relative"}};function xe$1(u,f,p,v,fe,x){const w=resolveComponent("v-btn"),A=resolveComponent("v-tooltip"),c=resolveComponent("v-spacer"),h=resolveComponent("v-toolbar"),n=resolveComponent("v-overlay"),o=resolveComponent("vertical-widget"),r=resolveComponent("v-expand-transition"),i=resolveComponent("v-card"),e=resolveComponent("edit-screen-dialog"),t=resolveComponent("v-textarea"),a=resolveComponent("v-card-actions"),g=resolveComponent("v-dialog");return openBlock(),createElementBlock("div",{ref:"bar",style:normalizeStyle(x.computedStyle)},[p.inline?createCommentVNode("",!0):(openBlock(),createBlock(i,{key:0,"min-height":fe.height,"min-width":fe.width,style:{cursor:"default"}},{default:withCtx(()=>[createVNode(h,{height:"24"},{default:withCtx(()=>[withDirectives(createVNode(w,{icon:"mdi-alert",variant:"text",density:"compact","data-test":"error-graph-icon","aria-label":"Show Errors",onClick:f[0]||(f[0]=()=>{fe.errorDialog=!0})},null,512),[[vShow,fe.errors.length!==0]]),createVNode(w,{icon:"mdi-pencil",variant:"text",density:"compact","data-test":"edit-screen-icon","aria-label":"Edit Screen",onClick:x.openEdit},null,8,["onClick"]),p.fixFloated?createCommentVNode("",!0):(openBlock(),createBlock(A,{key:0,"open-delay":600,location:"top"},{activator:withCtx(({props:m})=>[createElementVNode("div",normalizeProps(guardReactiveProps(m)),[createVNode(w,{icon:fe.floated?"mdi-balloon":"mdi-view-grid-outline",variant:"text",density:"compact","data-test":"float-screen-icon","aria-label":fe.floated?"Unfloat Screen":"Float Screen",onClick:x.floatScreen},null,8,["icon","aria-label","onClick"])],16)]),default:withCtx(()=>[createElementVNode("span",null,toDisplayString(fe.floated?"Unfloat Screen":"Float Screen"),1)]),_:1})),fe.floated?(openBlock(),createBlock(A,{key:1,"open-delay":600,location:"top"},{activator:withCtx(({props:m})=>[createElementVNode("div",normalizeProps(guardReactiveProps(m)),[createVNode(w,{icon:"mdi-arrow-up",variant:"text",density:"compact","data-test":"up-screen-icon","aria-label":"Move Screen Up",onClick:x.upScreen},null,8,["onClick"])],16)]),default:withCtx(()=>[f[6]||(f[6]=createElementVNode("span",null," Move Screen Up ",-1))]),_:1})):createCommentVNode("",!0),fe.floated&&fe.zIndex>p.minZ?(openBlock(),createBlock(A,{key:2,"open-delay":600,location:"top"},{activator:withCtx(({props:m})=>[createElementVNode("div",normalizeProps(guardReactiveProps(m)),[createVNode(w,{icon:"mdi-arrow-down",variant:"text",density:"compact","data-test":"down-screen-icon","aria-label":"Move Screen Down",onClick:x.downScreen},null,8,["onClick"])],16)]),default:withCtx(()=>[f[7]||(f[7]=createElementVNode("span",null," Move Screen Down ",-1))]),_:1})):createCommentVNode("",!0),createVNode(c),createElementVNode("span",null,toDisplayString(p.target)+" "+toDisplayString(p.screen),1),createVNode(c),fe.expand?(openBlock(),createBlock(w,{key:3,icon:"mdi-window-minimize",variant:"text",density:"compact","data-test":"minimize-screen-icon","aria-label":"Minimize Screen",onClick:x.minMaxTransition},null,8,["onClick"])):(openBlock(),createBlock(w,{key:4,icon:"mdi-window-maximize",variant:"text",density:"compact","data-test":"maximize-screen-icon","aria-label":"Maximize Screen",onClick:x.minMaxTransition},null,8,["onClick"])),p.showClose?(openBlock(),createBlock(w,{key:5,icon:"mdi-close-box",variant:"text",density:"compact","data-test":"close-screen-icon","aria-label":"Close Screen",onClick:f[1]||(f[1]=m=>u.$emit("close-screen"))})):createCommentVNode("",!0)]),_:1}),fe.editDialog?createCommentVNode("",!0):(openBlock(),createBlock(r,{key:0},{default:withCtx(()=>[withDirectives(createElementVNode("div",_e$1,[createVNode(n,{style:{"pointer-events":"none"},"model-value":fe.errors.length!==0,opacity:"0.8",absolute:"",attach:"","scroll-strategy":"none"},null,8,["model-value"]),(openBlock(),createBlock(o,{key:fe.screenKey,widgets:fe.layoutStack[0].widgets,"screen-values":fe.screenValues,"screen-time-zone":p.timeZone,onAddItem:x.addItem,onDeleteItem:x.deleteItem,onOpen:x.open,onClose:x.close,onCloseAll:x.closeAll},null,8,["widgets","screen-values","screen-time-zone","onAddItem","onDeleteItem","onOpen","onClose","onCloseAll"]))],512),[[vShow,fe.expand]])]),_:1}))]),_:1},8,["min-height","min-width"])),p.inline?(openBlock(),createElementBlock("div",be$1,[createVNode(n,{style:{"pointer-events":"none"},"model-value":fe.errors.length!==0,opacity:"0.8",absolute:"",attach:"","scroll-strategy":"none"},null,8,["model-value"]),withDirectives(createVNode(w,{icon:"mdi-alert",variant:"text",density:"compact","data-test":"error-graph-icon","aria-label":"Show Errors",onClick:f[2]||(f[2]=()=>{fe.errorDialog=!0})},null,512),[[vShow,fe.errors.length!==0]]),(openBlock(),createBlock(o,{key:fe.screenKey,widgets:fe.layoutStack[0].widgets,"screen-values":fe.screenValues,"screen-time-zone":p.timeZone,onAddItem:x.addItem,onDeleteItem:x.deleteItem,onOpen:x.open,onClose:x.close,onCloseAll:x.closeAll},null,8,["widgets","screen-values","screen-time-zone","onAddItem","onDeleteItem","onOpen","onClose","onCloseAll"]))])):createCommentVNode("",!0),fe.editDialog?(openBlock(),createBlock(e,{key:2,modelValue:fe.editDialog,"onUpdate:modelValue":f[3]||(f[3]=m=>fe.editDialog=m),target:p.target,screen:p.screen,definition:fe.currentDefinition,keywords:p.keywords,errors:fe.errors,onSave:x.saveEdit,onCancel:x.cancelEdit,onDelete:x.deleteScreen},null,8,["modelValue","target","screen","definition","keywords","errors","onSave","onCancel","onDelete"])):createCommentVNode("",!0),createVNode(g,{modelValue:fe.errorDialog,"onUpdate:modelValue":f[5]||(f[5]=m=>fe.errorDialog=m),width:"60vw"},{default:withCtx(()=>[createVNode(h,{height:"24"},{default:withCtx(()=>[createVNode(c),createElementVNode("span",null," Screen: "+toDisplayString(p.target)+" "+toDisplayString(p.screen)+" Errors ",1),createVNode(c)]),_:1}),createVNode(i,null,{default:withCtx(()=>[createVNode(t,{class:"errors",readonly:"",rows:"13","model-value":x.error},null,8,["model-value"]),createVNode(a,{class:"pb-5"},{default:withCtx(()=>[createVNode(c),createVNode(w,{variant:"outlined",class:"mr-2",onClick:x.clearErrors},{default:withCtx(()=>[...f[8]||(f[8]=[createTextVNode(" Clear Errors ",-1)])]),_:1},8,["onClick"]),createVNode(w,{variant:"flat",class:"mr-2",onClick:f[4]||(f[4]=m=>fe.errorDialog=!1)},{default:withCtx(()=>[...f[9]||(f[9]=[createTextVNode(" Close ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])],4)}const Ee$1=d(ye$1,[["render",xe$1],["__scopeId","data-v-95e4a143"]]),s={methods:{isFloat(u){return!!(/^\s*[-+]?\d*\.\d+\s*$/.test(u)||/^\s*[-+]?(\d+((\.\d+)?)|(\.\d+))[eE][-+]?\d+\s*$/.test(u))},isInt(u){return!!(/^\s*[-+]?\d+\s*$/.test(u)||/^\s*0[xX][\dabcdefABCDEF]+\s*$/.test(u))},isArray(u){return/^\s*\[.*\]\s*$/.test(u)},removeQuotes(u){if(u.length<2)return u;let f=u.charAt(0);if(f!=='"'&&f!=="'")return u;let p=u.charAt(u.length-1);return f!==p?u:u.slice(1,-1)},convertToString(u){let f="";if(Object.prototype.toString.call(u).slice(8,-1)==="Array"){let p=u.length;f="[ ";for(let v=0;v<p;v++)Object.prototype.toString.call(u[v]).slice(8,-1)==="String"?f+='"'+u[v]+'"':f+=u[v],v!==p-1&&(f+=", ");f+=" ]"}else if(Object.prototype.toString.call(u).slice(8,-1)==="Object")if(u.json_class==="String"&&u.raw){f="0x";for(let p of u.raw)f+=p.toString(16).padStart(2,"0").toUpperCase()}else u.json_class==="Float"&&u.raw&&(f=u.raw);else f=String(u);return f}}},j={name:"CommandParameterEditor",mixins:[s],props:{modelValue:{type:[String,Number],default:void 0},states:{type:Object,default:()=>null},statesInHex:{type:Boolean,default:!1}},emits:["update:modelValue"],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(u=>({label:u,...this.states[u]})):null},hazardous(){var u,f;return((f=(u=Object.entries(this.states).find(([p,v])=>v.value===this.modelValue))==null?void 0:u.at(1))==null?void 0:f.hazardous)!==void 0},stateClass(){return this.hazardous?"hazardous mr-4":"mr-4"}},methods:{handleChange(u){this.$emit("update:modelValue",u)}}},q={key:1,class:"d-flex align-center"};function L(u,f,p,v,fe,x){const w=resolveComponent("v-text-field"),A=resolveComponent("v-select");return openBlock(),createElementBlock("div",null,[p.states?(openBlock(),createElementBlock("div",q,[createVNode(A,{items:x.stateOptions,"model-value":x.selectValue,"item-title":"label",class:normalizeClass(x.stateClass),"hide-details":"",density:"compact",variant:"outlined",placeholder:"Select...","min-width":"120px","data-test":"cmd-param-select","onUpdate:modelValue":x.handleChange},null,8,["items","model-value","class","onUpdate:modelValue"]),createVNode(w,{"model-value":x.stateValue,disabled:"","hide-details":"",density:"compact",variant:"outlined","min-width":"60px","data-test":"cmd-param-value"},null,8,["model-value"])])):(openBlock(),createBlock(w,{key:0,"model-value":x.textFieldValue,"hide-details":"",density:"compact",variant:"filled","data-test":"cmd-param-value","onUpdate:modelValue":x.handleChange},null,8,["model-value","onUpdate:modelValue"]))])}const H$1=d(j,[["render",L],["__scopeId","data-v-b38d5e7f"]]),z={name:"CommandEditor",components:{TargetPacketItemChooser:S,CommandParameterEditor:H$1,DetailsDialog:P$1},mixins:[s],props:{initialTargetName:{type:String,default:null},initialPacketName:{type:String,default:null},cmdString:{type:String,default:null},sendDisabled:{type:Boolean,default:!1},statesInHex:{type:Boolean,default:!1},showIgnoredParams:{type:Boolean,default:!1},cmdRaw:{type:Boolean,default:!1},showCommandButton:{type:Boolean,default:!0},showQueueSelect:{type:Boolean,default:!0}},emits:["command-changed","build-cmd"],data(){return{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"}],api:null,targetName:"",commandName:"",commandDescription:"",ignoredParams:[],computedRows:[],reservedItemNames:["PACKET_TIMESECONDS","PACKET_TIMEFORMATTED","RECEIVED_TIMESECONDS","RECEIVED_TIMEFORMATTED","RECEIVED_COUNT"],contextMenuShown:!1,viewDetails:!1,parameterName:"",x:0,y:0,contextMenuOptions:[{title:"Details",action:()=>{this.contextMenuShown=!1,this.viewDetails=!0}}]}},created(){this.api=new BA,this.cmdString?this.processCmdString():(this.targetName=this.initialTargetName,this.commandName=this.initialPacketName,this.updateCmdParams())},methods:{commandChanged(u){(this.targetName!==u.targetName||this.commandName!==u.packetName)&&(this.targetName=u.targetName,this.commandName=u.packetName,this.updateCmdParams()),this.$emit("command-changed",u)},buildCmd(u){this.$emit("build-cmd",u)},showContextMenu(u,f){u.preventDefault(),this.parameterName=f.item.parameter_name,this.contextMenuShown=!1,this.x=u.clientX,this.y=u.clientY,this.$nextTick(()=>{this.contextMenuShown=!0})},updateCmdParams(){this.ignoredParams=[],this.computedRows=[],this.targetName&&this.commandName&&this.api.get_target(this.targetName).then(u=>(this.ignoredParams=u.ignored_parameters,this.api.get_cmd(this.targetName,this.commandName)),u=>{console.error("Error getting ignored parameters:",u)}).then(u=>{u&&(u.items.forEach(f=>{if(!this.reservedItemNames.includes(f.name)&&(!this.ignoredParams.includes(f.name)||this.showIgnoredParams)){let p=f.default;!f.states&&f.data_type==="STRING"&&typeof f.default=="string"&&(p=`'${p}'`),f.required&&(p=null),f.format_string&&f.default&&(p=sprintf(f.format_string,f.default));let v="N/A";f.minimum!=null&&f.maximum!=null&&(f.data_type==="FLOAT"&&(f.minimum<-1e6&&Number.isSafeInteger(f.minimum)&&(f.minimum=f.minimum.toExponential(3)),f.maximum>1e6&&Number.isSafeInteger(f.maximum)&&(f.maximum=f.maximum.toExponential(3))),v=`${f.minimum}..${f.maximum}`),this.computedRows.push({parameter_name:f.name,val:p,states:f.states,description:f.description,range:v,units:f.units,type:f.data_type})}}),this.commandDescription=u.description,this.populateParametersFromParsed())},u=>{console.error("Error getting command parameters:",u)})},triggerUpdateCmdParams(){this.updateCmdParams()},getRows(){return this.computedRows},getCmdString(){let u=`${this.targetName} ${this.commandName}`;if(this.computedRows.length===0)return u;u+=" with";for(const f of this.computedRows){if(f.val===null)throw new Error(`Required parameter ${f.parameter_name} not set`);if(f.val!==null&&f.val!==void 0&&f.val!==""){if(f.states){const v=Object.entries(f.states).find(([,fe])=>fe.value===f.val);if(v){u+=` ${f.parameter_name} '${v[0]}',`;continue}}let p=this.convertToString(f.val);p.includes(" ")&&!this.isArray(p)?u+=` ${f.parameter_name} '${p}',`:u+=` ${f.parameter_name} ${p},`}}return u.slice(0,-1)},parseCmdString(u){const f=u.split(" ");if(f.length<2)return{target:"",command:"",params:{}};if(f.length===2)return{target:f[0],command:f[1],params:{}};if(f[2]!=="with")return{target:"",command:"",params:{}};const p=f[0],v=f[1];let fe={};const x=u.split(" with ")[1];let w=[],A=0,c="";for(let h of x)h==="["?(A++,c+=h):h==="]"?(A--,c+=h):h===","&&A===0?(w.push(c.trim()),c=""):c+=h;c.trim()!==""&&w.push(c.trim());for(let h of w){let n=h.indexOf(" ");if(n>0){let o=h.substring(0,n).trim(),r=h.substring(n+1).trim();fe[o]=r}}return{target:p,command:v,params:fe}},processCmdString(){const u=this.parseCmdString(this.cmdString);u.target&&u.command&&(this.targetName=u.target,this.commandName=u.command,this.parsedParameters=u.params,this.updateCmdParams())},populateParametersFromParsed(){!this.parsedParameters||Object.keys(this.parsedParameters).length===0||this.$nextTick(()=>{setTimeout(()=>{this.computedRows.forEach(u=>{if(this.parsedParameters.hasOwnProperty(u.parameter_name)){const f=this.parsedParameters[u.parameter_name];if(u.states&&typeof f=="string"){const p=Object.keys(u.states).find(v=>v===f||v.toLowerCase()===f.toLowerCase());p?u.val=u.states[p].value:u.val=f}else u.type==="STRING"&&typeof f=="string"?u.val=f.startsWith("'")||f.startsWith('"')?f:`'${f}'`:u.val=f}})},100)})}}},K={style:{padding:"10px"}};function G$1(u,f,p,v,fe,x){const w=resolveComponent("target-packet-item-chooser"),A=resolveComponent("v-spacer"),c=resolveComponent("v-text-field"),h=resolveComponent("v-card-title"),n=resolveComponent("command-parameter-editor"),o=resolveComponent("v-data-table"),r=resolveComponent("v-card"),i=resolveComponent("v-list-item-title"),e=resolveComponent("v-list-item"),t=resolveComponent("v-list"),a=resolveComponent("v-menu"),g=resolveComponent("details-dialog");return openBlock(),createBlock(r,null,{default:withCtx(()=>[createElementVNode("div",K,[createVNode(w,{"initial-target-name":fe.targetName,"initial-packet-name":fe.commandName,disabled:p.sendDisabled,"button-text":p.showCommandButton?"Send":null,"show-queue-select":p.showQueueSelect,mode:"cmd",onOnSet:f[0]||(f[0]=m=>x.commandChanged(m)),onAddItem:f[1]||(f[1]=m=>x.buildCmd(m))},null,8,["initial-target-name","initial-packet-name","disabled","button-text","show-queue-select"])]),fe.computedRows.length!==0?(openBlock(),createBlock(r,{key:0},{default:withCtx(()=>[createVNode(h,{class:"d-flex align-center justify-content-space-between"},{default:withCtx(()=>[f[5]||(f[5]=createTextVNode(" Parameters ",-1)),createVNode(A),createVNode(c,{modelValue:fe.search,"onUpdate:modelValue":f[2]||(f[2]=m=>fe.search=m),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:fe.headers,items:fe.computedRows,search:fe.search,"items-per-page":-1,"hide-default-footer":"","multi-sort":"",density:"compact","onContextmenu:row":x.showContextMenu},{"item.val":withCtx(({item:m})=>[renderSlot(u.$slots,"parameter-editor",{item:m,statesInHex:p.statesInHex},()=>[createVNode(n,{modelValue:m.val,"onUpdate:modelValue":M=>m.val=M,states:m.states,"states-in-hex":p.statesInHex},null,8,["modelValue","onUpdate:modelValue","states","states-in-hex"])])]),_:3},8,["headers","items","search","onContextmenu:row"])]),_:3})):createCommentVNode("",!0),createVNode(a,{modelValue:fe.contextMenuShown,"onUpdate:modelValue":f[3]||(f[3]=m=>fe.contextMenuShown=m),target:[fe.x,fe.y]},{default:withCtx(()=>[createVNode(t,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(fe.contextMenuOptions,(m,M)=>(openBlock(),createBlock(e,{key:M,onClick:withModifiers(m.action,["stop"])},{default:withCtx(()=>[createVNode(i,null,{default:withCtx(()=>[createTextVNode(toDisplayString(m.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),createVNode(g,{modelValue:fe.viewDetails,"onUpdate:modelValue":f[4]||(f[4]=m=>fe.viewDetails=m),"target-name":fe.targetName,"packet-name":fe.commandName,"item-name":fe.parameterName,type:"cmd"},null,8,["modelValue","target-name","packet-name","item-name"])]),_:3})}const ie$1=d(z,[["render",G$1]]);var ace$1={exports:{}},hasRequiredAce;function requireAce(){return hasRequiredAce||(hasRequiredAce=1,function(u,f){(function(){var p="ace",v=function(){return this}();!v&&typeof window<"u"&&(v=window);var fe=function(n,o,r){if(typeof n!="string"){fe.original?fe.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(r=o),fe.modules[n]||(fe.payloads[n]=r,fe.modules[n]=null)};fe.modules={},fe.payloads={};var x=function(n,o,r){if(typeof o=="string"){var i=c(n,o);if(i!=null)return r&&r(),i}else if(Object.prototype.toString.call(o)==="[object Array]"){for(var e=[],t=0,a=o.length;t<a;++t){var g=c(n,o[t]);if(g==null&&w.original)return;e.push(g)}return r&&r.apply(null,e)||!0}},w=function(n,o){var r=x("",n,o);return r==null&&w.original?w.original.apply(this,arguments):r},A=function(n,o){if(o.indexOf("!")!==-1){var r=o.split("!");return A(n,r[0])+"!"+A(n,r[1])}if(o.charAt(0)=="."){var i=n.split("/").slice(0,-1).join("/");for(o=i+"/"+o;o.indexOf(".")!==-1&&e!=o;){var e=o;o=o.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return o},c=function(n,o){o=A(n,o);var r=fe.modules[o];if(!r){if(r=fe.payloads[o],typeof r=="function"){var i={},e={id:o,uri:"",exports:i,packaged:!0},t=function(g,m){return x(o,g,m)},a=r(t,i,e);i=a||e.exports,fe.modules[o]=i,delete fe.payloads[o]}r=fe.modules[o]=i||r}return r};function h(n){var o=v;v[n]||(v[n]={}),o=v[n],(!o.define||!o.define.packaged)&&(fe.original=o.define,o.define=fe,o.define.packaged=!0),(!o.require||!o.require.packaged)&&(w.original=o.require,o.require=w,o.require.packaged=!0)}h(p)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(p,v,fe){function x(w,A,c){Object.defineProperty(w,A,{value:c,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||x(String.prototype,"startsWith",function(w,A){return A=A||0,this.lastIndexOf(w,A)===A}),String.prototype.endsWith||x(String.prototype,"endsWith",function(w,A){var c=this;(A===void 0||A>c.length)&&(A=c.length),A-=w.length;var h=c.indexOf(w,A);return h!==-1&&h===A}),String.prototype.repeat||x(String.prototype,"repeat",function(w){for(var A="",c=this;w>0;)w&1&&(A+=c),(w>>=1)&&(c+=c);return A}),String.prototype.includes||x(String.prototype,"includes",function(w,A){return this.indexOf(w,A)!=-1}),Object.assign||(Object.assign=function(w){if(w==null)throw new TypeError("Cannot convert undefined or null to object");for(var A=Object(w),c=1;c<arguments.length;c++){var h=arguments[c];h!=null&&Object.keys(h).forEach(function(n){A[n]=h[n]})}return A}),Object.values||(Object.values=function(w){return Object.keys(w).map(function(A){return w[A]})}),Array.prototype.find||x(Array.prototype,"find",function(w){for(var A=this.length,c=arguments[1],h=0;h<A;h++){var n=this[h];if(w.call(c,n,h,this))return n}}),Array.prototype.findIndex||x(Array.prototype,"findIndex",function(w){for(var A=this.length,c=arguments[1],h=0;h<A;h++){var n=this[h];if(w.call(c,n,h,this))return h}}),Array.prototype.includes||x(Array.prototype,"includes",function(w,A){return this.indexOf(w,A)!=-1}),Array.prototype.fill||x(Array.prototype,"fill",function(w){for(var A=this,c=A.length>>>0,h=arguments[1],n=h>>0,o=n<0?Math.max(c+n,0):Math.min(n,c),r=arguments[2],i=r===void 0?c:r>>0,e=i<0?Math.max(c+i,0):Math.min(i,c);o<e;)A[o]=w,o++;return A}),Array.of||x(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(p,v,fe){p("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(p,v,fe){v.deepCopy=function x(w){if(typeof w!="object"||!w)return w;var A;if(Array.isArray(w)){A=[];for(var c=0;c<w.length;c++)A[c]=x(w[c]);return A}if(Object.prototype.toString.call(w)!=="[object Object]")return w;A={};for(var c in w)A[c]=x(w[c]);return A}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(p,v,fe){v.last=function(A){return A[A.length-1]},v.stringReverse=function(A){return A.split("").reverse().join("")},v.stringRepeat=function(A,c){for(var h="";c>0;)c&1&&(h+=A),(c>>=1)&&(A+=A);return h};var x=/^\s\s*/,w=/\s\s*$/;v.stringTrimLeft=function(A){return A.replace(x,"")},v.stringTrimRight=function(A){return A.replace(w,"")},v.copyObject=function(A){var c={};for(var h in A)c[h]=A[h];return c},v.copyArray=function(A){for(var c=[],h=0,n=A.length;h<n;h++)A[h]&&typeof A[h]=="object"?c[h]=this.copyObject(A[h]):c[h]=A[h];return c},v.deepCopy=p("./deep_copy").deepCopy,v.arrayToMap=function(A){for(var c={},h=0;h<A.length;h++)c[A[h]]=1;return c},v.createMap=function(A){var c=Object.create(null);for(var h in A)c[h]=A[h];return c},v.arrayRemove=function(A,c){for(var h=0;h<=A.length;h++)c===A[h]&&A.splice(h,1)},v.escapeRegExp=function(A){return A.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},v.escapeHTML=function(A){return(""+A).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},v.getMatchOffsets=function(A,c){var h=[];return A.replace(c,function(n){h.push({offset:arguments[arguments.length-2],length:n.length})}),h},v.deferredCall=function(A){var c=null,h=function(){c=null,A()},n=function(o){return n.cancel(),c=setTimeout(h,o||0),n};return n.schedule=n,n.call=function(){return this.cancel(),A(),n},n.cancel=function(){return clearTimeout(c),c=null,n},n.isPending=function(){return c},n},v.delayedCall=function(A,c){var h=null,n=function(){h=null,A()},o=function(r){h==null&&(h=setTimeout(n,r||c))};return o.delay=function(r){h&&clearTimeout(h),h=setTimeout(n,r||c)},o.schedule=o,o.call=function(){this.cancel(),A()},o.cancel=function(){h&&clearTimeout(h),h=null},o.isPending=function(){return h},o},v.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},v.skipEmptyMatch=function(A,c,h){return h&&A.codePointAt(c)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(p,v,fe){v.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},v.getOS=function(){return v.isMac?v.OS.MAC:v.isLinux?v.OS.LINUX:v.OS.WINDOWS};var x=typeof navigator=="object"?navigator:{},w=(/mac|win|linux/i.exec(x.platform)||["other"])[0].toLowerCase(),A=x.userAgent||"",c=x.appName||"";v.isWin=w=="win",v.isMac=w=="mac",v.isLinux=w=="linux",v.isIE=c=="Microsoft Internet Explorer"||c.indexOf("MSAppHost")>=0?parseFloat((A.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((A.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),v.isOldIE=v.isIE&&v.isIE<9,v.isGecko=v.isMozilla=A.match(/ Gecko\/\d+/),v.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",v.isWebKit=parseFloat(A.split("WebKit/")[1])||void 0,v.isChrome=parseFloat(A.split(" Chrome/")[1])||void 0,v.isSafari=parseFloat(A.split(" Safari/")[1])&&!v.isChrome||void 0,v.isEdge=parseFloat(A.split(" Edge/")[1])||void 0,v.isAIR=A.indexOf("AdobeAIR")>=0,v.isAndroid=A.indexOf("Android")>=0,v.isChromeOS=A.indexOf(" CrOS ")>=0,v.isIOS=/iPad|iPhone|iPod/.test(A)&&!window.MSStream,v.isIOS&&(v.isMac=!0),v.isMobile=v.isIOS||v.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(p,v,fe){var x=p("./useragent"),w="http://www.w3.org/1999/xhtml";v.buildDom=function r(i,e,t){if(typeof i=="string"&&i){var a=document.createTextNode(i);return e&&e.appendChild(a),a}if(!Array.isArray(i))return i&&i.appendChild&&e&&e.appendChild(i),i;if(typeof i[0]!="string"||!i[0]){for(var g=[],m=0;m<i.length;m++){var M=r(i[m],e,t);M&&g.push(M)}return g}var O=document.createElement(i[0]),$=i[1],b=1;$&&typeof $=="object"&&!Array.isArray($)&&(b=2);for(var m=b;m<i.length;m++)r(i[m],O,t);return b==2&&Object.keys($).forEach(function(he){var Te=$[he];he==="class"?O.className=Array.isArray(Te)?Te.join(" "):Te:typeof Te=="function"||he=="value"||he[0]=="$"?O[he]=Te:he==="ref"?t&&(t[Te]=O):he==="style"?typeof Te=="string"&&(O.style.cssText=Te):Te!=null&&O.setAttribute(he,Te)}),e&&e.appendChild(O),O},v.getDocumentHead=function(r){return r||(r=document),r.head||r.getElementsByTagName("head")[0]||r.documentElement},v.createElement=function(r,i){return document.createElementNS?document.createElementNS(i||w,r):document.createElement(r)},v.removeChildren=function(r){r.innerHTML=""},v.createTextNode=function(r,i){var e=i?i.ownerDocument:document;return e.createTextNode(r)},v.createFragment=function(r){var i=r?r.ownerDocument:document;return i.createDocumentFragment()},v.hasCssClass=function(r,i){var e=(r.className+"").split(/\s+/g);return e.indexOf(i)!==-1},v.addCssClass=function(r,i){v.hasCssClass(r,i)||(r.className+=" "+i)},v.removeCssClass=function(r,i){for(var e=r.className.split(/\s+/g);;){var t=e.indexOf(i);if(t==-1)break;e.splice(t,1)}r.className=e.join(" ")},v.toggleCssClass=function(r,i){for(var e=r.className.split(/\s+/g),t=!0;;){var a=e.indexOf(i);if(a==-1)break;t=!1,e.splice(a,1)}return t&&e.push(i),r.className=e.join(" "),t},v.setCssClass=function(r,i,e){e?v.addCssClass(r,i):v.removeCssClass(r,i)},v.hasCssString=function(r,i){var e=0,t;if(i=i||document,t=i.querySelectorAll("style")){for(;e<t.length;)if(t[e++].id===r)return!0}},v.removeElementById=function(r,i){i=i||document,i.getElementById(r)&&i.getElementById(r).remove()};var A,c=[];v.useStrictCSP=function(r){A=r,r==!1?h():c||(c=[])};function h(){var r=c;c=null,r&&r.forEach(function(i){n(i[0],i[1])})}function n(r,i,e){if(!(typeof document>"u")){if(c){if(e)h();else if(e===!1)return c.push([r,i])}if(!A){var t=e;!e||!e.getRootNode?t=document:(t=e.getRootNode(),(!t||t==e)&&(t=document));var a=t.ownerDocument||t;if(i&&v.hasCssString(i,t))return null;i&&(r+=`
5
+ /*# sourceURL=ace/css/`+i+" */");var g=v.createElement("style");g.appendChild(a.createTextNode(r)),i&&(g.id=i),t==a&&(t=v.getDocumentHead(a)),t.insertBefore(g,t.firstChild)}}}if(v.importCssString=n,v.importCssStylsheet=function(r,i){v.buildDom(["link",{rel:"stylesheet",href:r}],v.getDocumentHead(i))},v.$fixPositionBug=function(r){var i=r.getBoundingClientRect();if(r.style.left){var e=parseFloat(r.style.left),t=+i.left;Math.abs(e-t)>1&&(r.style.left=2*e-t+"px")}if(r.style.right){var e=parseFloat(r.style.right),t=window.innerWidth-i.right;Math.abs(e-t)>1&&(r.style.right=2*e-t+"px")}if(r.style.top){var e=parseFloat(r.style.top),t=+i.top;Math.abs(e-t)>1&&(r.style.top=2*e-t+"px")}if(r.style.bottom){var e=parseFloat(r.style.bottom),t=window.innerHeight-i.bottom;Math.abs(e-t)>1&&(r.style.bottom=2*e-t+"px")}},v.scrollbarWidth=function(r){var i=v.createElement("ace_inner");i.style.width="100%",i.style.minWidth="0px",i.style.height="200px",i.style.display="block";var e=v.createElement("ace_outer"),t=e.style;t.position="absolute",t.left="-10000px",t.overflow="hidden",t.width="200px",t.minWidth="0px",t.height="150px",t.display="block",e.appendChild(i);var a=r&&r.documentElement||document&&document.documentElement;if(!a)return 0;a.appendChild(e);var g=i.offsetWidth;t.overflow="scroll";var m=i.offsetWidth;return g===m&&(m=e.clientWidth),a.removeChild(e),g-m},v.computedStyle=function(r,i){return window.getComputedStyle(r,"")||{}},v.setStyle=function(r,i,e){r[i]!==e&&(r[i]=e)},v.HAS_CSS_ANIMATION=!1,v.HAS_CSS_TRANSFORMS=!1,v.HI_DPI=x.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,x.isChromeOS&&(v.HI_DPI=!1),typeof document<"u"){var o=document.createElement("div");v.HI_DPI&&o.style.transform!==void 0&&(v.HAS_CSS_TRANSFORMS=!0),!x.isEdge&&typeof o.style.animationName<"u"&&(v.HAS_CSS_ANIMATION=!0),o=null}v.HAS_CSS_TRANSFORMS?v.translate=function(r,i,e){r.style.transform="translate("+Math.round(i)+"px, "+Math.round(e)+"px)"}:v.translate=function(r,i,e){r.style.top=Math.round(e)+"px",r.style.left=Math.round(i)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(p,v,fe){/*
6
+ * based on code from:
7
+ *
8
+ * @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
9
+ * Available via the MIT or new BSD license.
10
+ * see: http://github.com/jrburke/requirejs for details
11
+ */var x=p("./dom");v.get=function(w,A){var c=new XMLHttpRequest;c.open("GET",w,!0),c.onreadystatechange=function(){c.readyState===4&&A(c.responseText)},c.send(null)},v.loadScript=function(w,A){var c=x.getDocumentHead(),h=document.createElement("script");h.src=w,c.appendChild(h),h.onload=h.onreadystatechange=function(n,o){(o||!h.readyState||h.readyState=="loaded"||h.readyState=="complete")&&(h=h.onload=h.onreadystatechange=null,o||A())}},v.qualifyURL=function(w){var A=document.createElement("a");return A.href=w,A.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(p,v,fe){v.inherits=function(x,w){x.super_=w,x.prototype=Object.create(w.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}})},v.mixin=function(x,w){for(var A in w)x[A]=w[A];return x},v.implement=function(x,w){v.mixin(x,w)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(p,v,fe){var x={},w=function(){this.propagationStopped=!0},A=function(){this.defaultPrevented=!0};x._emit=x._dispatchEvent=function(c,h){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[c]||[],o=this._defaultHandlers[c];if(!(!n.length&&!o)){(typeof h!="object"||!h)&&(h={}),h.type||(h.type=c),h.stopPropagation||(h.stopPropagation=w),h.preventDefault||(h.preventDefault=A),n=n.slice();for(var r=0;r<n.length&&(n[r](h,this),!h.propagationStopped);r++);if(o&&!h.defaultPrevented)return o(h,this)}},x._signal=function(c,h){var n=(this._eventRegistry||{})[c];if(n){n=n.slice();for(var o=0;o<n.length;o++)n[o](h,this)}},x.once=function(c,h){var n=this;if(this.on(c,function o(){n.off(c,o),h.apply(null,arguments)}),!h)return new Promise(function(o){h=o})},x.setDefaultHandler=function(c,h){var n=this._defaultHandlers;if(n||(n=this._defaultHandlers={_disabled_:{}}),n[c]){var o=n[c],r=n._disabled_[c];r||(n._disabled_[c]=r=[]),r.push(o);var i=r.indexOf(h);i!=-1&&r.splice(i,1)}n[c]=h},x.removeDefaultHandler=function(c,h){var n=this._defaultHandlers;if(n){var o=n._disabled_[c];if(n[c]==h)o&&this.setDefaultHandler(c,o.pop());else if(o){var r=o.indexOf(h);r!=-1&&o.splice(r,1)}}},x.on=x.addEventListener=function(c,h,n){this._eventRegistry=this._eventRegistry||{};var o=this._eventRegistry[c];return o||(o=this._eventRegistry[c]=[]),o.indexOf(h)==-1&&o[n?"unshift":"push"](h),h},x.off=x.removeListener=x.removeEventListener=function(c,h){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[c];if(n){var o=n.indexOf(h);o!==-1&&n.splice(o,1)}},x.removeAllListeners=function(c){c||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[c]=void 0),this._defaultHandlers&&(this._defaultHandlers[c]=void 0)},v.EventEmitter=x}),ace.define("ace/lib/report_error",["require","exports","module"],function(p,v,fe){v.reportError=function(w,A){var c=new Error(w);c.data=A,typeof console=="object"&&console.error&&console.error(c),setTimeout(function(){throw c})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(p,v,fe){var x={"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"};v.defaultEnglishMessages=x}),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(p,v,fe){"no use strict";var x=p("./oop"),w=p("./event_emitter").EventEmitter,A=p("./report_error").reportError,c=p("./default_english_messages").defaultEnglishMessages,h={setOptions:function(e){Object.keys(e).forEach(function(t){this.setOption(t,e[t])},this)},getOptions:function(e){var t={};if(e)Array.isArray(e)||(e=Object.keys(e));else{var a=this.$options;e=Object.keys(a).filter(function(g){return!a[g].hidden})}return e.forEach(function(g){t[g]=this.getOption(g)},this),t},setOption:function(e,t){if(this["$"+e]!==t){var a=this.$options[e];if(!a)return n('misspelled option "'+e+'"');if(a.forwardTo)return this[a.forwardTo]&&this[a.forwardTo].setOption(e,t);a.handlesSet||(this["$"+e]=t),a&&a.set&&a.set.call(this,t)}},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:n('misspelled option "'+e+'"')}};function n(e){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var o,r,i=function(){function e(){this.$defaultOptions={},o=c,r="dollarSigns"}return e.prototype.defineOptions=function(t,a,g){return t.$options||(this.$defaultOptions[a]=t.$options={}),Object.keys(g).forEach(function(m){var M=g[m];typeof M=="string"&&(M={forwardTo:M}),M.name||(M.name=m),t.$options[M.name]=M,"initialValue"in M&&(t["$"+M.name]=M.initialValue)}),x.implement(t,h),this},e.prototype.resetOptions=function(t){Object.keys(t.$options).forEach(function(a){var g=t.$options[a];"value"in g&&t.setOption(a,g.value)})},e.prototype.setDefaultValue=function(t,a,g){if(!t){for(t in this.$defaultOptions)if(this.$defaultOptions[t][a])break;if(!this.$defaultOptions[t][a])return!1}var m=this.$defaultOptions[t]||(this.$defaultOptions[t]={});m[a]&&(m.forwardTo?this.setDefaultValue(m.forwardTo,a,g):m[a].value=g)},e.prototype.setDefaultValues=function(t,a){Object.keys(a).forEach(function(g){this.setDefaultValue(t,g,a[g])},this)},e.prototype.setMessages=function(t,a){o=t,a&&a.placeholders&&(r=a.placeholders)},e.prototype.nls=function(t,a,g){o[t]||(n("No message found for the key '"+t+"' in messages with id "+o.$id+", trying to find a translation for the default string '"+a+"'."),o[a]||n("No message found for the default string '"+a+"' in the provided messages. Falling back to the default English message."));var m=o[t]||o[a]||a;return g&&(r==="dollarSigns"&&(m=m.replace(/\$(\$|[\d]+)/g,function(M,O){return O=="$"?"$":g[O]})),r==="curlyBrackets"&&(m=m.replace(/\{([^\}]+)\}/g,function(M,O){return g[O]}))),m},e}();i.prototype.warn=n,i.prototype.reportError=A,x.implement(i.prototype,w),v.AppConfig=i}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(p,v,fe){fe.exports=`.ace-tm .ace_gutter {
12
+ background: #f0f0f0;
13
+ color: #333;
14
+ }
15
+
16
+ .ace-tm .ace_print-margin {
17
+ width: 1px;
18
+ background: #e8e8e8;
19
+ }
20
+
21
+ .ace-tm .ace_fold {
22
+ background-color: #6B72E6;
23
+ }
24
+
25
+ .ace-tm {
26
+ background-color: #FFFFFF;
27
+ color: black;
28
+ }
29
+
30
+ .ace-tm .ace_cursor {
31
+ color: black;
32
+ }
33
+
34
+ .ace-tm .ace_invisible {
35
+ color: rgb(191, 191, 191);
36
+ }
37
+
38
+ .ace-tm .ace_storage,
39
+ .ace-tm .ace_keyword {
40
+ color: blue;
41
+ }
42
+
43
+ .ace-tm .ace_constant {
44
+ color: rgb(197, 6, 11);
45
+ }
46
+
47
+ .ace-tm .ace_constant.ace_buildin {
48
+ color: rgb(88, 72, 246);
49
+ }
50
+
51
+ .ace-tm .ace_constant.ace_language {
52
+ color: rgb(88, 92, 246);
53
+ }
54
+
55
+ .ace-tm .ace_constant.ace_library {
56
+ color: rgb(6, 150, 14);
57
+ }
58
+
59
+ .ace-tm .ace_invalid {
60
+ background-color: rgba(255, 0, 0, 0.1);
61
+ color: red;
62
+ }
63
+
64
+ .ace-tm .ace_support.ace_function {
65
+ color: rgb(60, 76, 114);
66
+ }
67
+
68
+ .ace-tm .ace_support.ace_constant {
69
+ color: rgb(6, 150, 14);
70
+ }
71
+
72
+ .ace-tm .ace_support.ace_type,
73
+ .ace-tm .ace_support.ace_class {
74
+ color: rgb(109, 121, 222);
75
+ }
76
+
77
+ .ace-tm .ace_keyword.ace_operator {
78
+ color: rgb(104, 118, 135);
79
+ }
80
+
81
+ .ace-tm .ace_string {
82
+ color: rgb(3, 106, 7);
83
+ }
84
+
85
+ .ace-tm .ace_comment {
86
+ color: rgb(76, 136, 107);
87
+ }
88
+
89
+ .ace-tm .ace_comment.ace_doc {
90
+ color: rgb(0, 102, 255);
91
+ }
92
+
93
+ .ace-tm .ace_comment.ace_doc.ace_tag {
94
+ color: rgb(128, 159, 191);
95
+ }
96
+
97
+ .ace-tm .ace_constant.ace_numeric {
98
+ color: rgb(0, 0, 205);
99
+ }
100
+
101
+ .ace-tm .ace_variable {
102
+ color: rgb(49, 132, 149);
103
+ }
104
+
105
+ .ace-tm .ace_xml-pe {
106
+ color: rgb(104, 104, 91);
107
+ }
108
+
109
+ .ace-tm .ace_entity.ace_name.ace_function {
110
+ color: #0000A2;
111
+ }
112
+
113
+
114
+ .ace-tm .ace_heading {
115
+ color: rgb(12, 7, 255);
116
+ }
117
+
118
+ .ace-tm .ace_list {
119
+ color:rgb(185, 6, 144);
120
+ }
121
+
122
+ .ace-tm .ace_meta.ace_tag {
123
+ color:rgb(0, 22, 142);
124
+ }
125
+
126
+ .ace-tm .ace_string.ace_regex {
127
+ color: rgb(255, 0, 0)
128
+ }
129
+
130
+ .ace-tm .ace_marker-layer .ace_selection {
131
+ background: rgb(181, 213, 255);
132
+ }
133
+ .ace-tm.ace_multiselect .ace_selection.ace_start {
134
+ box-shadow: 0 0 3px 0px white;
135
+ }
136
+ .ace-tm .ace_marker-layer .ace_step {
137
+ background: rgb(252, 255, 0);
138
+ }
139
+
140
+ .ace-tm .ace_marker-layer .ace_stack {
141
+ background: rgb(164, 229, 101);
142
+ }
143
+
144
+ .ace-tm .ace_marker-layer .ace_bracket {
145
+ margin: -1px 0 0 -1px;
146
+ border: 1px solid rgb(192, 192, 192);
147
+ }
148
+
149
+ .ace-tm .ace_marker-layer .ace_active-line {
150
+ background: rgba(0, 0, 0, 0.07);
151
+ }
152
+
153
+ .ace-tm .ace_gutter-active-line {
154
+ background-color : #dcdcdc;
155
+ }
156
+
157
+ .ace-tm .ace_marker-layer .ace_selected-word {
158
+ background: rgb(250, 250, 255);
159
+ border: 1px solid rgb(200, 200, 250);
160
+ }
161
+
162
+ .ace-tm .ace_indent-guide {
163
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
164
+ }
165
+
166
+ .ace-tm .ace_indent-guide-active {
167
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
168
+ }
169
+ `}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(p,v,fe){v.isDark=!1,v.cssClass="ace-tm",v.cssText=p("./textmate-css"),v.$id="ace/theme/textmate";var x=p("../lib/dom");x.importCssString(v.cssText,v.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(p,v,fe){"no use strict";var x=p("./lib/lang"),w=p("./lib/net"),A=p("./lib/dom"),c=p("./lib/app_config").AppConfig;fe.exports=v=new c;var h={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};v.get=function(i){if(!h.hasOwnProperty(i))throw new Error("Unknown config key: "+i);return h[i]},v.set=function(i,e){if(h.hasOwnProperty(i))h[i]=e;else if(this.setDefaultValue("",i,e)==!1)throw new Error("Unknown config key: "+i);i=="useStrictCSP"&&A.useStrictCSP(e)},v.all=function(){return x.copyObject(h)},v.$modes={},v.moduleUrl=function(i,e){if(h.$moduleUrls[i])return h.$moduleUrls[i];var t=i.split("/");e=e||t[t.length-2]||"";var a=e=="snippets"?"/":"-",g=t[t.length-1];if(e=="worker"&&a=="-"){var m=new RegExp("^"+e+"[\\-_]|[\\-_]"+e+"$","g");g=g.replace(m,"")}(!g||g==e)&&t.length>1&&(g=t[t.length-2]);var M=h[e+"Path"];return M==null?M=h.basePath:a=="/"&&(e=a=""),M&&M.slice(-1)!="/"&&(M+="/"),M+e+a+g+this.get("suffix")},v.setModuleUrl=function(i,e){return h.$moduleUrls[i]=e};var n=function(i,e){if(i==="ace/theme/textmate"||i==="./theme/textmate")return e(null,p("./theme/textmate"));if(o)return o(i,e);console.error("loader is not configured")},o;v.setLoader=function(i){o=i},v.dynamicModules=Object.create(null),v.$loading={},v.$loaded={},v.loadModule=function(i,e){var t;if(Array.isArray(i))var a=i[0],g=i[1];else if(typeof i=="string")var g=i;var m=function(M){if(M&&!v.$loading[g])return e&&e(M);if(v.$loading[g]||(v.$loading[g]=[]),v.$loading[g].push(e),!(v.$loading[g].length>1)){var O=function(){n(g,function($,b){b&&(v.$loaded[g]=b),v._emit("load.module",{name:g,module:b});var he=v.$loading[g];v.$loading[g]=null,he.forEach(function(Te){Te&&Te(b)})})};if(!v.get("packaged"))return O();w.loadScript(v.moduleUrl(g,a),O),r()}};if(v.dynamicModules[g])v.dynamicModules[g]().then(function(M){M.default?m(M.default):m(M)});else{try{t=this.$require(g)}catch{}m(t||v.$loaded[g])}},v.$require=function(i){if(typeof fe.require=="function"){var e="require";return fe[e](i)}},v.setModuleLoader=function(i,e){v.dynamicModules[i]=e};var r=function(){!h.basePath&&!h.workerPath&&!h.modePath&&!h.themePath&&!Object.keys(h.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),r=function(){})};v.version="1.43.4"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(p,v,fe){p("./lib/fixoldbrowsers");var x=p("./config");x.setLoader(function(h,n){p([h],function(o){n(null,o)})});var w=function(){return this||typeof window<"u"&&window}();fe.exports=function(h){x.init=A,x.$require=p,h.require=p},A(!0);function A(h){if(!(!w||!w.document)){x.set("packaged",h||p.packaged||fe.packaged||w.define&&(void 0).packaged);var n={},o="",r=document.currentScript||document._currentScript,i=r&&r.ownerDocument||document;r&&r.src&&(o=r.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var e=i.getElementsByTagName("script"),t=0;t<e.length;t++){var a=e[t],g=a.src||a.getAttribute("src");if(g){for(var m=a.attributes,M=0,O=m.length;M<O;M++){var $=m[M];$.name.indexOf("data-ace-")===0&&(n[c($.name.replace(/^data-ace-/,""))]=$.value)}var b=g.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);b&&(o=b[1])}}o&&(n.base=n.base||o,n.packaged=!0),n.basePath=n.base,n.workerPath=n.workerPath||n.base,n.modePath=n.modePath||n.base,n.themePath=n.themePath||n.base,delete n.base;for(var he in n)typeof n[he]<"u"&&x.set(he,n[he])}}function c(h){return h.replace(/-(.)/g,function(n,o){return o.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(p,v,fe){var x=function(){function w(A,c,h,n){this.start={row:A,column:c},this.end={row:h,column:n}}return w.prototype.isEqual=function(A){return this.start.row===A.start.row&&this.end.row===A.end.row&&this.start.column===A.start.column&&this.end.column===A.end.column},w.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},w.prototype.contains=function(A,c){return this.compare(A,c)==0},w.prototype.compareRange=function(A){var c,h=A.end,n=A.start;return c=this.compare(h.row,h.column),c==1?(c=this.compare(n.row,n.column),c==1?2:c==0?1:0):c==-1?-2:(c=this.compare(n.row,n.column),c==-1?-1:c==1?42:0)},w.prototype.comparePoint=function(A){return this.compare(A.row,A.column)},w.prototype.containsRange=function(A){return this.comparePoint(A.start)==0&&this.comparePoint(A.end)==0},w.prototype.intersects=function(A){var c=this.compareRange(A);return c==-1||c==0||c==1},w.prototype.isEnd=function(A,c){return this.end.row==A&&this.end.column==c},w.prototype.isStart=function(A,c){return this.start.row==A&&this.start.column==c},w.prototype.setStart=function(A,c){typeof A=="object"?(this.start.column=A.column,this.start.row=A.row):(this.start.row=A,this.start.column=c)},w.prototype.setEnd=function(A,c){typeof A=="object"?(this.end.column=A.column,this.end.row=A.row):(this.end.row=A,this.end.column=c)},w.prototype.inside=function(A,c){return this.compare(A,c)==0?!(this.isEnd(A,c)||this.isStart(A,c)):!1},w.prototype.insideStart=function(A,c){return this.compare(A,c)==0?!this.isEnd(A,c):!1},w.prototype.insideEnd=function(A,c){return this.compare(A,c)==0?!this.isStart(A,c):!1},w.prototype.compare=function(A,c){return!this.isMultiLine()&&A===this.start.row?c<this.start.column?-1:c>this.end.column?1:0:A<this.start.row?-1:A>this.end.row?1:this.start.row===A?c>=this.start.column?0:-1:this.end.row===A?c<=this.end.column?0:1:0},w.prototype.compareStart=function(A,c){return this.start.row==A&&this.start.column==c?-1:this.compare(A,c)},w.prototype.compareEnd=function(A,c){return this.end.row==A&&this.end.column==c?1:this.compare(A,c)},w.prototype.compareInside=function(A,c){return this.end.row==A&&this.end.column==c?1:this.start.row==A&&this.start.column==c?-1:this.compare(A,c)},w.prototype.clipRows=function(A,c){if(this.end.row>c)var h={row:c+1,column:0};else if(this.end.row<A)var h={row:A,column:0};if(this.start.row>c)var n={row:c+1,column:0};else if(this.start.row<A)var n={row:A,column:0};return w.fromPoints(n||this.start,h||this.end)},w.prototype.extend=function(A,c){var h=this.compare(A,c);if(h==0)return this;if(h==-1)var n={row:A,column:c};else var o={row:A,column:c};return w.fromPoints(n||this.start,o||this.end)},w.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},w.prototype.isMultiLine=function(){return this.start.row!==this.end.row},w.prototype.clone=function(){return w.fromPoints(this.start,this.end)},w.prototype.collapseRows=function(){return this.end.column==0?new w(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new w(this.start.row,0,this.end.row,0)},w.prototype.toScreenRange=function(A){var c=A.documentToScreenPosition(this.start),h=A.documentToScreenPosition(this.end);return new w(c.row,c.column,h.row,h.column)},w.prototype.moveBy=function(A,c){this.start.row+=A,this.start.column+=c,this.end.row+=A,this.end.column+=c},w}();x.fromPoints=function(w,A){return new x(w.row,w.column,A.row,A.column)},x.comparePoints=function(w,A){return w.row-A.row||w.column-A.column},v.Range=x}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(p,v,fe){for(var x=p("./oop"),w={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:"*"}},A={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},c=0;c<10;c++)A["Digit"+c]=48+c,A["Numpad"+c]=96+c,w.PRINTABLE_KEYS[48+c]=""+c,w.FUNCTION_KEYS[96+c]="Numpad"+c;for(var c=65;c<91;c++){var h=String.fromCharCode(c+32);A["Key"+h.toUpperCase()]=c,w.PRINTABLE_KEYS[c]=h}for(var c=1;c<13;c++)A["F"+c]=111+c,w.FUNCTION_KEYS[111+c]="F"+c;var n={Shift:16,Control:17,Alt:18,Meta:224};for(var o in n)A[o]=A[o+"Left"]=A[o+"Right"]=n[o];v.$codeToKeyCode=A,w.PRINTABLE_KEYS[173]="-";for(var r in w.FUNCTION_KEYS){var i=w.FUNCTION_KEYS[r].toLowerCase();w[i]=parseInt(r,10)}for(var r in w.PRINTABLE_KEYS){var i=w.PRINTABLE_KEYS[r].toLowerCase();w[i]=parseInt(r,10)}x.mixin(w,w.MODIFIER_KEYS),x.mixin(w,w.PRINTABLE_KEYS),x.mixin(w,w.FUNCTION_KEYS),w.enter=w.return,w.escape=w.esc,w.del=w.delete,function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)w.KEY_MODS[t]=e.filter(function(a){return t&w.KEY_MODS[a]}).join("-")+"-"}(),w.KEY_MODS[0]="",w.KEY_MODS[-1]="input-",x.mixin(v,w),v.default=v,v.keyCodeToString=function(e){var t=w[e];return typeof t!="string"&&(t=String.fromCharCode(e)),t.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(p,v,fe){var x=p("./keys"),w=p("./useragent"),A=null,c=0,h;function n(){h=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return h={passive:!1},!0}})}catch{}}function o(){return h==null&&n(),h}function r(M,O,$){this.elem=M,this.type=O,this.callback=$}r.prototype.destroy=function(){e(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var i=v.addListener=function(M,O,$,b){M.addEventListener(O,$,o()),b&&b.$toDestroy.push(new r(M,O,$))},e=v.removeListener=function(M,O,$){M.removeEventListener(O,$,o())};v.stopEvent=function(M){return v.stopPropagation(M),v.preventDefault(M),!1},v.stopPropagation=function(M){M.stopPropagation&&M.stopPropagation()},v.preventDefault=function(M){M.preventDefault&&M.preventDefault()},v.getButton=function(M){return M.type=="dblclick"?0:M.type=="contextmenu"||w.isMac&&M.ctrlKey&&!M.altKey&&!M.shiftKey?2:M.button},v.capture=function(M,O,$){var b=M&&M.ownerDocument||document;function he(Te){O&&O(Te),$&&$(Te),e(b,"mousemove",O),e(b,"mouseup",he),e(b,"dragstart",he)}return i(b,"mousemove",O),i(b,"mouseup",he),i(b,"dragstart",he),he},v.addMouseWheelListener=function(M,O,$){i(M,"wheel",function(b){var he=.15,Te=b.deltaX||0,de=b.deltaY||0;switch(b.deltaMode){case b.DOM_DELTA_PIXEL:b.wheelX=Te*he,b.wheelY=de*he;break;case b.DOM_DELTA_LINE:var Y=15;b.wheelX=Te*Y,b.wheelY=de*Y;break;case b.DOM_DELTA_PAGE:var gt=150;b.wheelX=Te*gt,b.wheelY=de*gt;break}O(b)},$)},v.addMultiMouseDownListener=function(M,O,$,b,he){var Te=0,de,Y,gt,U={2:"dblclick",3:"tripleclick",4:"quadclick"};function V(C){if(v.getButton(C)!==0?Te=0:C.detail>1?(Te++,Te>4&&(Te=1)):Te=1,w.isIE){var y=Math.abs(C.clientX-de)>5||Math.abs(C.clientY-Y)>5;(!gt||y)&&(Te=1),gt&&clearTimeout(gt),gt=setTimeout(function(){gt=null},O[Te-1]||600),Te==1&&(de=C.clientX,Y=C.clientY)}if(C._clicks=Te,$[b]("mousedown",C),Te>4)Te=0;else if(Te>1)return $[b](U[Te],C)}Array.isArray(M)||(M=[M]),M.forEach(function(C){i(C,"mousedown",V,he)})};function t(M){return 0|(M.ctrlKey?1:0)|(M.altKey?2:0)|(M.shiftKey?4:0)|(M.metaKey?8:0)}v.getModifierString=function(M){return x.KEY_MODS[t(M)]};function a(M,O,$){var b=t(O);if(!$&&O.code&&($=x.$codeToKeyCode[O.code]||$),!w.isMac&&A){if(O.getModifierState&&(O.getModifierState("OS")||O.getModifierState("Win"))&&(b|=8),A.altGr)if((3&b)!=3)A.altGr=0;else return;if($===18||$===17){var he=O.location;if($===17&&he===1)A[$]==1&&(c=O.timeStamp);else if($===18&&b===3&&he===2){var Te=O.timeStamp-c;Te<50&&(A.altGr=!0)}}}if($ in x.MODIFIER_KEYS&&($=-1),!(!b&&$===13&&O.location===3&&(M(O,b,-$),O.defaultPrevented))){if(w.isChromeOS&&b&8){if(M(O,b,$),O.defaultPrevented)return;b&=-9}return!b&&!($ in x.FUNCTION_KEYS)&&!($ in x.PRINTABLE_KEYS)?!1:M(O,b,$)}}v.addCommandKeyListener=function(M,O,$){var b=null;i(M,"keydown",function(he){A[he.keyCode]=(A[he.keyCode]||0)+1;var Te=a(O,he,he.keyCode);return b=he.defaultPrevented,Te},$),i(M,"keypress",function(he){b&&(he.ctrlKey||he.altKey||he.shiftKey||he.metaKey)&&(v.stopEvent(he),b=null)},$),i(M,"keyup",function(he){A[he.keyCode]=null},$),A||(g(),i(window,"focus",g))};function g(){A=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!w.isOldIE){var m=1;v.nextTick=function(M,O){O=O||window;var $="zero-timeout-message-"+m++,b=function(he){he.data==$&&(v.stopPropagation(he),e(O,"message",b),M())};i(O,"message",b),O.postMessage($,"*")}}v.$idleBlocked=!1,v.onIdle=function(M,O){return setTimeout(function $(){v.$idleBlocked?setTimeout($,100):M()},O)},v.$idleBlockId=null,v.blockIdle=function(M){v.$idleBlockId&&clearTimeout(v.$idleBlockId),v.$idleBlocked=!0,v.$idleBlockId=setTimeout(function(){v.$idleBlocked=!1},M||100)},v.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),v.nextFrame?v.nextFrame=v.nextFrame.bind(window):v.nextFrame=function(M){setTimeout(M,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(p,v,fe){var x;fe.exports={lineMode:!1,pasteCancelled:function(){return x&&x>Date.now()-50?!0:x=!1},cancel:function(){x=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(p,v,fe){var x=p("../lib/event"),w=p("../config").nls,A=p("../lib/useragent"),c=p("../lib/dom"),h=p("../lib/lang"),n=p("../clipboard"),o=A.isChrome<18,r=A.isIE,i=A.isChrome>63,e=400,t=p("../lib/keys"),a=t.KEY_MODS,g=A.isIOS,m=g?/\s/:/\n/,M=A.isMobile,O=function(){function $(b,he){var Te=this;this.host=he,this.text=c.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","off"),this.text.setAttribute("autocomplete","off"),this.text.setAttribute("autocorrect","off"),this.text.setAttribute("autocapitalize","off"),this.text.setAttribute("spellcheck","false"),this.text.style.opacity="0",b.insertBefore(this.text,b.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",M||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch{}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),x.addListener(this.text,"blur",function(de){Te.ignoreFocusEvents||(he.onBlur(de),Te.$isFocused=!1)},he),x.addListener(this.text,"focus",function(de){if(!Te.ignoreFocusEvents){if(Te.$isFocused=!0,A.isEdge)try{if(!document.hasFocus())return}catch{}he.onFocus(de),A.isEdge?setTimeout(Te.resetSelection.bind(Te)):Te.resetSelection()}},he),this.$focusScroll=!1,he.on("beforeEndOperation",function(){var de=he.curOp,Y=de&&de.command&&de.command.name;if(Y!="insertstring"){var gt=Y&&(de.docChanged||de.selectionChanged);Te.inComposition&&gt&&(Te.lastValue=Te.text.value="",Te.onCompositionEnd()),Te.resetSelection()}}),he.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=g?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&he.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,x.addCommandKeyListener(this.text,function(de,Y,gt){if(!Te.inComposition)return he.onCommandKey(de,Y,gt)},he),x.addListener(this.text,"select",this.onSelect.bind(this),he),x.addListener(this.text,"input",this.onInput.bind(this),he),x.addListener(this.text,"cut",this.onCut.bind(this),he),x.addListener(this.text,"copy",this.onCopy.bind(this),he),x.addListener(this.text,"paste",this.onPaste.bind(this),he),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&x.addListener(b,"keydown",function(de){if(!(A.isMac&&!de.metaKey||!de.ctrlKey))switch(de.keyCode){case 67:Te.onCopy(de);break;case 86:Te.onPaste(de);break;case 88:Te.onCut(de);break}},he),this.syncComposition=h.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),x.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),he),x.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),he),x.addListener(this.text,"keyup",this.onKeyup.bind(this),he),x.addListener(this.text,"keydown",this.syncComposition.bind(this),he),x.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),he),this.closeTimeout,x.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),he),x.addListener(this.text,"mousedown",function(de){de.preventDefault(),Te.onContextMenuClose()},he),x.addListener(he.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),he),x.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),he),g&&this.addIosSelectionHandler(b,he,this.text)}return $.prototype.addIosSelectionHandler=function(b,he,Te){var de=this,Y=null,gt=!1;Te.addEventListener("keydown",function(V){Y&&clearTimeout(Y),gt=!0},!0),Te.addEventListener("keyup",function(V){Y=setTimeout(function(){gt=!1},100)},!0);var U=function(V){if(document.activeElement===Te&&!(gt||de.inComposition||he.$mouseHandler.isMousePressed)&&!de.copied){var C=Te.selectionStart,y=Te.selectionEnd,T=null,ke=0;if(C==0?T=t.up:C==1?T=t.home:y>de.lastSelectionEnd&&de.lastValue[y]==`
170
+ `?T=t.end:C<de.lastSelectionStart&&de.lastValue[C-1]==" "?(T=t.left,ke=a.option):C<de.lastSelectionStart||C==de.lastSelectionStart&&de.lastSelectionEnd!=de.lastSelectionStart&&C==y?T=t.left:y>de.lastSelectionEnd&&de.lastValue.slice(0,y).split(`
171
+ `).length>2?T=t.down:y>de.lastSelectionEnd&&de.lastValue[y-1]==" "?(T=t.right,ke=a.option):(y>de.lastSelectionEnd||y==de.lastSelectionEnd&&de.lastSelectionEnd!=de.lastSelectionStart&&C==y)&&(T=t.right),C!==y&&(ke|=a.shift),T){var Qe=he.onCommandKey({},ke,T);if(!Qe&&he.commands){T=t.keyCodeToString(T);var Je=he.commands.findKeyCommand(ke,T);Je&&he.execCommand(Je)}de.lastSelectionStart=C,de.lastSelectionEnd=y,de.resetSelection("")}}};document.addEventListener("selectionchange",U),he.on("destroy",function(){document.removeEventListener("selectionchange",U)})},$.prototype.onContextMenuClose=function(){var b=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){b.tempStyle&&(b.text.style.cssText=b.tempStyle,b.tempStyle=""),b.host.renderer.$isMousePressed=!1,b.host.renderer.$keepTextAreaAtCursor&&b.host.renderer.$moveTextAreaToCursor()},0)},$.prototype.$onContextMenu=function(b){this.host.textInput.onContextMenu(b),this.onContextMenuClose()},$.prototype.onKeyup=function(b){b.keyCode==27&&this.text.value.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},$.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},$.prototype.onCompositionStart=function(b){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){b.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var he=this.host.getSelectionRange();he.end.row=he.start.row,he.end.column=he.start.column,this.inComposition.markerRange=he,this.inComposition.selectionStart=this.lastSelectionStart,this.host.onCompositionStart(this.inComposition),this.inComposition.useTextareaForIME?(this.lastValue=this.text.value="",this.lastSelectionStart=0,this.lastSelectionEnd=0):(this.text.msGetInputContext&&(this.inComposition.context=this.text.msGetInputContext()),this.text.getInputContext&&(this.inComposition.context=this.text.getInputContext()))}},$.prototype.onCompositionUpdate=function(){if(!(!this.inComposition||!this.host.onCompositionUpdate||this.host.$readOnly)){if(this.commandMode)return this.cancelComposition();if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var b=this.text.value;this.sendText(b),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},$.prototype.onCompositionEnd=function(b){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),b&&this.onInput())},$.prototype.onCut=function(b){this.doCopy(b,!0)},$.prototype.onCopy=function(b){this.doCopy(b,!1)},$.prototype.onPaste=function(b){var he=this.handleClipboardData(b);n.pasteCancelled()||(typeof he=="string"?(he&&this.host.onPaste(he,b),A.isIE&&setTimeout(this.resetSelection),x.preventDefault(b)):(this.text.value="",this.pasted=!0))},$.prototype.doCopy=function(b,he){var Te=this,de=this.host.getCopyText();if(!de)return x.preventDefault(b);this.handleClipboardData(b,de)?(g&&(this.resetSelection(de),this.copied=de,setTimeout(function(){Te.copied=!1},10)),he?this.host.onCut():this.host.onCopy(),x.preventDefault(b)):(this.copied=!0,this.text.value=de,this.text.select(),setTimeout(function(){Te.copied=!1,Te.resetSelection(),he?Te.host.onCut():Te.host.onCopy()}))},$.prototype.handleClipboardData=function(b,he,Te){var de=b.clipboardData||window.clipboardData;if(!(!de||o)){var Y=r||Te?"Text":"text/plain";try{return he?de.setData(Y,he)!==!1:de.getData(Y)}catch(gt){if(!Te)return this.handleClipboardData(gt,he,!0)}}},$.prototype.onInput=function(b){if(this.inComposition)return this.onCompositionUpdate();if(b&&b.inputType){if(b.inputType=="historyUndo")return this.host.execCommand("undo");if(b.inputType=="historyRedo")return this.host.execCommand("redo")}var he=this.text.value,Te=this.sendText(he,!0);(he.length>e+100||m.test(Te)||M&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},$.prototype.sendText=function(b,he){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),b&&this.host.onPaste(b),this.pasted=!1,"";for(var Te=this.text.selectionStart,de=this.text.selectionEnd,Y=this.lastSelectionStart,gt=this.lastValue.length-this.lastSelectionEnd,U=b,V=b.length-Te,C=b.length-de,y=0;Y>0&&this.lastValue[y]==b[y];)y++,Y--;for(U=U.slice(y),y=1;gt>0&&this.lastValue.length-y>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-y]==b[b.length-y];)y++,gt--;V-=y-1,C-=y-1;var T=U.length-y+1;if(T<0&&(Y=-T,T=0),U=U.slice(0,T),!he&&!U&&!V&&!Y&&!gt&&!C)return"";this.sendingText=!0;var ke=!1;return A.isAndroid&&U==". "&&(U=" ",ke=!0),U&&!Y&&!gt&&!V&&!C||this.commandMode?this.host.onTextInput(U):this.host.onTextInput(U,{extendLeft:Y,extendRight:gt,restoreStart:V,restoreEnd:C}),this.sendingText=!1,this.lastValue=b,this.lastSelectionStart=Te,this.lastSelectionEnd=de,this.lastRestoreEnd=C,ke?`
172
+ `:U},$.prototype.onSelect=function(b){var he=this;if(!this.inComposition){var Te=function(de){return de.selectionStart===0&&de.selectionEnd>=he.lastValue.length&&de.value===he.lastValue&&he.lastValue&&de.selectionEnd!==he.lastSelectionEnd};this.copied?this.copied=!1:Te(this.text)?(this.host.selectAll(),this.resetSelection()):M&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},$.prototype.$resetSelectionIOS=function(b){if(!(!this.$isFocused||this.copied&&!b||this.sendingText)){b||(b="");var he=`
173
+ ab`+b+`cde fg
174
+ `;he!=this.text.value&&(this.text.value=this.lastValue=he);var Te=4,de=4+(b.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=Te||this.lastSelectionEnd!=de)&&this.text.setSelectionRange(Te,de),this.lastSelectionStart=Te,this.lastSelectionEnd=de}},$.prototype.$resetSelection=function(){var b=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var he=0,Te=0,de="",Y=function(Je,mt){for(var yt=mt,Qt=1;Qt<=Je-b.rowStart&&Qt<2*b.numberOfExtraLines+1;Qt++)yt+=b.host.session.getLine(Je-Qt).length+1;return yt};if(this.host.session){var gt=this.host.selection,U=gt.getRange(),V=gt.cursor.row;V===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):V===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(V<this.rowStart-1||V>this.rowEnd+1)&&(this.rowStart=V>this.numberOfExtraLines?V-this.numberOfExtraLines:0,this.rowEnd=V>this.numberOfExtraLines?V+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var C=[],y=this.rowStart;y<=this.rowEnd;y++)C.push(this.host.session.getLine(y));if(de=C.join(`
175
+ `),he=Y(U.start.row,U.start.column),Te=Y(U.end.row,U.end.column),U.start.row<this.rowStart){var T=this.host.session.getLine(this.rowStart-1);he=U.start.row<this.rowStart-1?0:he,Te+=T.length+1,de=T+`
176
+ `+de}else if(U.end.row>this.rowEnd){var ke=this.host.session.getLine(this.rowEnd+1);Te=U.end.row>this.rowEnd+1?ke.length:U.end.column,Te+=de.length+1,de=de+`
177
+ `+ke}else M&&V>0&&(de=`
178
+ `+de,Te+=1,he+=1);de.length>e&&(he<e&&Te<e?de=de.slice(0,e):(de=`
179
+ `,he==Te?he=Te=0:(he=0,Te=1)));var Qe=de+`
180
+
181
+ `;Qe!=this.lastValue&&(this.text.value=this.lastValue=Qe,this.lastSelectionStart=this.lastSelectionEnd=Qe.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=Te||this.lastSelectionStart!=he||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(he,Te),this.lastSelectionStart=he,this.lastSelectionEnd=Te}catch{}this.inComposition=!1}},$.prototype.setHost=function(b){this.host=b},$.prototype.setNumberOfExtraLines=function(b){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,b<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=b},$.prototype.setAriaLabel=function(){var b="";if(this.host.$textInputAriaLabel&&(b+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var he=this.host.session.selection.cursor.row;b+=w("text-input.aria-label","Cursor at row $0",[he+1])}this.text.setAttribute("aria-label",b)},$.prototype.setAriaOptions=function(b){b.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",b.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",b.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),b.role&&this.text.setAttribute("role",b.role),b.setLabel&&(this.text.setAttribute("aria-roledescription",w("text-input.aria-roledescription","editor")),this.setAriaLabel())},$.prototype.focus=function(){var b=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||i||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var he=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var Te=this.text.getBoundingClientRect().top!=0}catch{return}var de=[];if(Te)for(var Y=this.text.parentElement;Y&&Y.nodeType==1;)de.push(Y),Y.setAttribute("ace_nocontext","true"),!Y.parentElement&&Y.getRootNode?Y=Y.getRootNode().host:Y=Y.parentElement;this.text.focus({preventScroll:!0}),Te&&de.forEach(function(gt){gt.removeAttribute("ace_nocontext")}),setTimeout(function(){b.text.style.position="",b.text.style.top=="0px"&&(b.text.style.top=he)},0)},$.prototype.blur=function(){this.text.blur()},$.prototype.isFocused=function(){return this.$isFocused},$.prototype.setInputHandler=function(b){this.inputHandler=b},$.prototype.getInputHandler=function(){return this.inputHandler},$.prototype.getElement=function(){return this.text},$.prototype.setCommandMode=function(b){this.commandMode=b,this.text.readOnly=!1},$.prototype.setReadOnly=function(b){this.commandMode||(this.text.readOnly=b)},$.prototype.setCopyWithEmptySelection=function(b){},$.prototype.onContextMenu=function(b){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:b}),this.moveToMouse(b,!0)},$.prototype.moveToMouse=function(b,he){var Te=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(he?"z-index:100000;":"")+(A.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var de=this.host.container.getBoundingClientRect(),Y=c.computedStyle(this.host.container),gt=de.top+(parseInt(Y.borderTopWidth)||0),U=de.left+(parseInt(Y.borderLeftWidth)||0),V=de.bottom-gt-this.text.clientHeight-2,C=function(y){c.translate(Te.text,y.clientX-U-2,Math.min(y.clientY-gt-2,V))};C(b),b.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),A.isWin&&x.capture(this.host.container,C,this.onContextMenuClose.bind(this)))},$.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},$}();v.TextInput=O,v.$setUserAgentForTests=function($,b){M=$,g=b}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(p,v,fe){var x=p("../lib/useragent"),w=0,A=550,c=function(){function o(r){r.$clickSelection=null;var i=r.editor;i.setDefaultHandler("mousedown",this.onMouseDown.bind(r)),i.setDefaultHandler("dblclick",this.onDoubleClick.bind(r)),i.setDefaultHandler("tripleclick",this.onTripleClick.bind(r)),i.setDefaultHandler("quadclick",this.onQuadClick.bind(r)),i.setDefaultHandler("mousewheel",this.onMouseWheel.bind(r));var e=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];e.forEach(function(t){r[t]=this[t]},this),r.selectByLines=this.extendSelectionBy.bind(r,"getLineRange"),r.selectByWords=this.extendSelectionBy.bind(r,"getWordRange")}return o.prototype.onMouseDown=function(r){var i=r.inSelection(),e=r.getDocumentPosition();this.mousedownEvent=r;var t=this.editor,a=r.getButton();if(a!==0){var g=t.getSelectionRange(),m=g.isEmpty();(m||a==1)&&t.selection.moveToPosition(e),a==2&&(t.textInput.onContextMenu(r.domEvent),x.isMozilla||r.preventDefault());return}if(this.mousedownEvent.time=Date.now(),i&&!t.isFocused()&&(t.focus(),this.$focusTimeout&&!this.$clickSelection&&!t.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(r);return}return this.captureMouse(r),this.startSelect(e,r.domEvent._clicks>1),r.preventDefault()},o.prototype.startSelect=function(r,i){r=r||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var e=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?e.selection.selectToPosition(r):i||e.selection.moveToPosition(r),i||this.select(),e.setStyle("ace_selecting"),this.setState("select"))},o.prototype.select=function(){var r,i=this.editor,e=i.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var t=this.$clickSelection.comparePoint(e);if(t==-1)r=this.$clickSelection.end;else if(t==1)r=this.$clickSelection.start;else{var a=n(this.$clickSelection,e,i.session);e=a.cursor,r=a.anchor}i.selection.setSelectionAnchor(r.row,r.column)}i.selection.selectToPosition(e),i.renderer.scrollCursorIntoView()},o.prototype.extendSelectionBy=function(r){var i,e=this.editor,t=e.renderer.screenToTextCoordinates(this.x,this.y),a=e.selection[r](t.row,t.column);if(this.$clickSelection){var g=this.$clickSelection.comparePoint(a.start),m=this.$clickSelection.comparePoint(a.end);if(g==-1&&m<=0)i=this.$clickSelection.end,(a.end.row!=t.row||a.end.column!=t.column)&&(t=a.start);else if(m==1&&g>=0)i=this.$clickSelection.start,(a.start.row!=t.row||a.start.column!=t.column)&&(t=a.end);else if(g==-1&&m==1)t=a.end,i=a.start;else{var M=n(this.$clickSelection,t,e.session);t=M.cursor,i=M.anchor}e.selection.setSelectionAnchor(i.row,i.column)}e.selection.selectToPosition(t),e.renderer.scrollCursorIntoView()},o.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},o.prototype.focusWait=function(){var r=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),i=Date.now();(r>w||i-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},o.prototype.onDoubleClick=function(r){var i=r.getDocumentPosition(),e=this.editor,t=e.session,a=t.getBracketRange(i);a?(a.isEmpty()&&(a.start.column--,a.end.column++),this.setState("select")):(a=e.selection.getWordRange(i.row,i.column),this.setState("selectByWords")),this.$clickSelection=a,this.select()},o.prototype.onTripleClick=function(r){var i=r.getDocumentPosition(),e=this.editor;this.setState("selectByLines");var t=e.getSelectionRange();t.isMultiLine()&&t.contains(i.row,i.column)?(this.$clickSelection=e.selection.getLineRange(t.start.row),this.$clickSelection.end=e.selection.getLineRange(t.end.row).end):this.$clickSelection=e.selection.getLineRange(i.row),this.select()},o.prototype.onQuadClick=function(r){var i=this.editor;i.selectAll(),this.$clickSelection=i.getSelectionRange(),this.setState("selectAll")},o.prototype.onMouseWheel=function(r){if(!r.getAccelKey()){r.getShiftKey()&&r.wheelY&&!r.wheelX&&(r.wheelX=r.wheelY,r.wheelY=0);var i=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var e=this.$lastScroll,t=r.domEvent.timeStamp,a=t-e.t,g=a?r.wheelX/a:e.vx,m=a?r.wheelY/a:e.vy;a<A&&(g=(g+e.vx)/2,m=(m+e.vy)/2);var M=Math.abs(g/m),O=!1;if(M>=1&&i.renderer.isScrollableBy(r.wheelX*r.speed,0)&&(O=!0),M<=1&&i.renderer.isScrollableBy(0,r.wheelY*r.speed)&&(O=!0),O)e.allowed=t;else if(t-e.allowed<A){var $=Math.abs(g)<=1.5*Math.abs(e.vx)&&Math.abs(m)<=1.5*Math.abs(e.vy);$?(O=!0,e.allowed=t):e.allowed=0}if(e.t=t,e.vx=g,e.vy=m,O)return i.renderer.scrollBy(r.wheelX*r.speed,r.wheelY*r.speed),r.stop()}},o}();c.prototype.selectEnd=c.prototype.selectByLinesEnd,c.prototype.selectAllEnd=c.prototype.selectByLinesEnd,c.prototype.selectByWordsEnd=c.prototype.selectByLinesEnd,v.DefaultHandlers=c;function h(o,r,i,e){return Math.sqrt(Math.pow(i-o,2)+Math.pow(e-r,2))}function n(o,r,i){if(o.start.row==o.end.row)var e=2*r.column-o.start.column-o.end.column;else if(o.start.row==o.end.row-1&&!o.start.column&&!o.end.column)var e=3*r.column-2*i.getLine(o.start.row).length;else var e=2*r.row-o.start.row-o.end.row;return e<0?{cursor:o.start,anchor:o.end}:{cursor:o.end,anchor:o.start}}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(p,v,fe){var x=p("../lib/event"),w=p("../lib/useragent"),A=function(){function c(h,n){this.speed,this.wheelX,this.wheelY,this.domEvent=h,this.editor=n,this.x=this.clientX=h.clientX,this.y=this.clientY=h.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return c.prototype.stopPropagation=function(){x.stopPropagation(this.domEvent),this.propagationStopped=!0},c.prototype.preventDefault=function(){x.preventDefault(this.domEvent),this.defaultPrevented=!0},c.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},c.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},c.prototype.getGutterRow=function(){var h=this.getDocumentPosition().row,n=this.editor.session.documentToScreenRow(h,0),o=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return n-o},c.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var h=this.editor,n=h.getSelectionRange();if(n.isEmpty())this.$inSelection=!1;else{var o=this.getDocumentPosition();this.$inSelection=n.contains(o.row,o.column)}return this.$inSelection},c.prototype.getButton=function(){return x.getButton(this.domEvent)},c.prototype.getShiftKey=function(){return this.domEvent.shiftKey},c.prototype.getAccelKey=function(){return w.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},c}();v.MouseEvent=A}),ace.define("ace/lib/scroll",["require","exports","module"],function(p,v,fe){v.preventParentScroll=function(w){w.stopPropagation();var A=w.currentTarget,c=A.scrollHeight>A.clientHeight;c||w.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(p,v,fe){var x=this&&this.__extends||function(){var t=function(a,g){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,M){m.__proto__=M}||function(m,M){for(var O in M)Object.prototype.hasOwnProperty.call(M,O)&&(m[O]=M[O])},t(a,g)};return function(a,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");t(a,g);function m(){this.constructor=a}a.prototype=g===null?Object.create(g):(m.prototype=g.prototype,new m)}}(),w=this&&this.__values||function(t){var a=typeof Symbol=="function"&&Symbol.iterator,g=a&&t[a],m=0;if(g)return g.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&m>=t.length&&(t=void 0),{value:t&&t[m++],done:!t}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")},A=p("./lib/dom");p("./lib/event");var c=p("./range").Range,h=p("./lib/scroll").preventParentScroll,n="ace_tooltip",o=function(){function t(a){this.isOpen=!1,this.$element=null,this.$parentNode=a}return t.prototype.$init=function(){return this.$element=A.createElement("div"),this.$element.className=n,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},t.prototype.getElement=function(){return this.$element||this.$init()},t.prototype.setText=function(a){this.getElement().textContent=a},t.prototype.setHtml=function(a){this.getElement().innerHTML=a},t.prototype.setPosition=function(a,g){this.getElement().style.left=a+"px",this.getElement().style.top=g+"px"},t.prototype.setClassName=function(a){A.addCssClass(this.getElement(),a)},t.prototype.setTheme=function(a){this.theme&&(this.theme.isDark&&A.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&A.removeCssClass(this.getElement(),this.theme.cssClass)),a.isDark&&A.addCssClass(this.getElement(),"ace_dark"),a.cssClass&&A.addCssClass(this.getElement(),a.cssClass),this.theme={isDark:a.isDark,cssClass:a.cssClass}},t.prototype.show=function(a,g,m){a!=null&&this.setText(a),g!=null&&m!=null&&this.setPosition(g,m),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},t.prototype.hide=function(a){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=n,this.isOpen=!1)},t.prototype.getHeight=function(){return this.getElement().offsetHeight},t.prototype.getWidth=function(){return this.getElement().offsetWidth},t.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},t}(),r=function(){function t(){this.popups=[]}return t.prototype.addPopup=function(a){this.popups.push(a),this.updatePopups()},t.prototype.removePopup=function(a){var g=this.popups.indexOf(a);g!==-1&&(this.popups.splice(g,1),this.updatePopups())},t.prototype.updatePopups=function(){var a,g,m,M;this.popups.sort(function(U,V){return V.priority-U.priority});var O=[];try{for(var $=w(this.popups),b=$.next();!b.done;b=$.next()){var he=b.value,Te=!0;try{for(var de=(m=void 0,w(O)),Y=de.next();!Y.done;Y=de.next()){var gt=Y.value;if(this.doPopupsOverlap(gt,he)){Te=!1;break}}}catch(U){m={error:U}}finally{try{Y&&!Y.done&&(M=de.return)&&M.call(de)}finally{if(m)throw m.error}}Te?O.push(he):he.hide()}}catch(U){a={error:U}}finally{try{b&&!b.done&&(g=$.return)&&g.call($)}finally{if(a)throw a.error}}},t.prototype.doPopupsOverlap=function(a,g){var m=a.getElement().getBoundingClientRect(),M=g.getElement().getBoundingClientRect();return m.left<M.right&&m.right>M.left&&m.top<M.bottom&&m.bottom>M.top},t}(),i=new r;v.popupManager=i,v.Tooltip=o;var e=function(t){x(a,t);function a(g){g===void 0&&(g=document.body);var m=t.call(this,g)||this;m.timeout=void 0,m.lastT=0,m.idleTime=350,m.lastEvent=void 0,m.onMouseOut=m.onMouseOut.bind(m),m.onMouseMove=m.onMouseMove.bind(m),m.waitForHover=m.waitForHover.bind(m),m.hide=m.hide.bind(m);var M=m.getElement();return M.style.whiteSpace="pre-wrap",M.style.pointerEvents="auto",M.addEventListener("mouseout",m.onMouseOut),M.tabIndex=-1,M.addEventListener("blur",(function(){M.contains(document.activeElement)||this.hide()}).bind(m)),M.addEventListener("wheel",h),m}return a.prototype.addToEditor=function(g){g.on("mousemove",this.onMouseMove),g.on("mousedown",this.hide);var m=g.renderer.getMouseEventTarget();m&&typeof m.removeEventListener=="function"&&m.addEventListener("mouseout",this.onMouseOut,!0)},a.prototype.removeFromEditor=function(g){g.off("mousemove",this.onMouseMove),g.off("mousedown",this.hide);var m=g.renderer.getMouseEventTarget();m&&typeof m.removeEventListener=="function"&&m.removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},a.prototype.onMouseMove=function(g,m){this.lastEvent=g,this.lastT=Date.now();var M=m.$mouseHandler.isMousePressed;if(this.isOpen){var O=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(O.row,O.column)||M||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||M||(this.lastEvent=g,this.timeout=setTimeout(this.waitForHover,this.idleTime))},a.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var g=Date.now()-this.lastT;if(this.idleTime-g>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-g);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},a.prototype.isOutsideOfText=function(g){var m=g.editor,M=g.getDocumentPosition(),O=m.session.getLine(M.row);if(M.column==O.length){var $=m.renderer.pixelToScreenCoordinates(g.clientX,g.clientY),b=m.session.documentToScreenPosition(M.row,M.column);if(b.column!=$.column||b.row!=$.row)return!0}return!1},a.prototype.setDataProvider=function(g){this.$gatherData=g},a.prototype.showForRange=function(g,m,M,O){if(!(O&&O!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var $=g.renderer;this.isOpen||(i.addPopup(this),this.$registerCloseEvents(),this.setTheme($.theme)),this.isOpen=!0,this.range=c.fromPoints(m.start,m.end);var b=$.textToScreenCoordinates(m.start.row,m.start.column),he=$.scroller.getBoundingClientRect();b.pageX<he.left&&(b.pageX=he.left);var Te=this.getElement();Te.innerHTML="",Te.appendChild(M),Te.style.maxHeight="",Te.style.display="block",this.$setPosition(g,b,!0,m),A.$fixPositionBug(Te)}},a.prototype.$setPosition=function(g,m,M,O){var $=10;M&&this.addMarker(O,g.session);var b=g.renderer,he=this.getElement(),Te=he.offsetHeight,de=he.offsetWidth,Y=m.pageY,gt=m.pageX,U=window.innerHeight-Y-b.lineHeight,V=this.$shouldPlaceAbove(Te,Y,U-$);he.style.maxHeight=(V?Y:U)-$+"px",he.style.top=V?"":Y+b.lineHeight+"px",he.style.bottom=V?window.innerHeight-Y+"px":"",he.style.left=Math.min(gt,window.innerWidth-de-$)+"px"},a.prototype.$shouldPlaceAbove=function(g,m,M){return!(m-g<0&&m<M)},a.prototype.addMarker=function(g,m){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=m,this.marker=m&&m.addMarker(g,"ace_highlight-marker","text")},a.prototype.hide=function(g){g&&this.$fromKeyboard&&g.type=="keydown"&&g.code=="Escape"||!g&&document.activeElement==this.getElement()||g&&g.target&&(g.type!="keydown"||g.ctrlKey||g.metaKey)&&this.$element.contains(g.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$fromKeyboard=!1,this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,i.removePopup(this)))},a.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},a.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},a.prototype.onMouseOut=function(g){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!g.relatedTarget||this.getElement().contains(g.relatedTarget)||g&&g.currentTarget.contains(g.relatedTarget)||g.relatedTarget.classList.contains("ace_content")||this.hide())},a}(o);v.HoverTooltip=e}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/mouse/mouse_event","ace/tooltip","ace/config","ace/range"],function(p,v,fe){var x=this&&this.__extends||function(){var e=function(t,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,m){g.__proto__=m}||function(g,m){for(var M in m)Object.prototype.hasOwnProperty.call(m,M)&&(g[M]=m[M])},e(t,a)};return function(t,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");e(t,a);function g(){this.constructor=t}t.prototype=a===null?Object.create(a):(g.prototype=a.prototype,new g)}}(),w=this&&this.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,a=t&&e[t],g=0;if(a)return a.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&g>=e.length&&(e=void 0),{value:e&&e[g++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},A=p("../lib/dom"),c=p("./mouse_event").MouseEvent,h=p("../tooltip").HoverTooltip,n=p("../config").nls,o=p("../range").Range;function r(e){var t=e.editor,a=t.renderer.$gutterLayer;e.$tooltip=new i(t),e.$tooltip.addToEditor(t),e.$tooltip.setDataProvider(function(g,m){var M=g.getDocumentPosition().row;e.$tooltip.showTooltip(M)}),e.editor.setDefaultHandler("guttermousedown",function(g){if(!(!t.isFocused()||g.getButton()!=0)){var m=a.getRegion(g);if(m!="foldWidgets"){var M=g.getDocumentPosition().row,O=t.session.selection;if(g.getShiftKey())O.selectTo(M,0);else{if(g.domEvent.detail==2)return t.selectAll(),g.preventDefault();e.$clickSelection=t.selection.getLineRange(M)}return e.setState("selectByLines"),e.captureMouse(g),g.preventDefault()}}})}v.GutterHandler=r;var i=function(e){x(t,e);function t(a){var g=e.call(this,a.container)||this;g.id="gt"+ ++t.$uid,g.editor=a,g.visibleTooltipRow;var m=g.getElement();return m.setAttribute("role","tooltip"),m.setAttribute("id",g.id),m.style.pointerEvents="auto",g.idleTime=50,g.onDomMouseMove=g.onDomMouseMove.bind(g),g.onDomMouseOut=g.onDomMouseOut.bind(g),g.setClassName("ace_gutter-tooltip"),g}return t.prototype.onDomMouseMove=function(a){var g=new c(a,this.editor);this.onMouseMove(g,this.editor)},t.prototype.onDomMouseOut=function(a){var g=new c(a,this.editor);this.onMouseOut(g)},t.prototype.addToEditor=function(a){var g=a.renderer.$gutter;g.addEventListener("mousemove",this.onDomMouseMove),g.addEventListener("mouseout",this.onDomMouseOut),e.prototype.addToEditor.call(this,a)},t.prototype.removeFromEditor=function(a){var g=a.renderer.$gutter;g.removeEventListener("mousemove",this.onDomMouseMove),g.removeEventListener("mouseout",this.onDomMouseOut),e.prototype.removeFromEditor.call(this,a)},t.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),e.prototype.destroy.call(this)},Object.defineProperty(t,"annotationLabels",{get:function(){return{error:{singular:n("gutter-tooltip.aria-label.error.singular","error"),plural:n("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:n("gutter-tooltip.aria-label.security.singular","security finding"),plural:n("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:n("gutter-tooltip.aria-label.warning.singular","warning"),plural:n("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:n("gutter-tooltip.aria-label.info.singular","information message"),plural:n("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:n("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:n("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),t.prototype.showTooltip=function(a){var g,m=this.editor.renderer.$gutterLayer,M=m.$annotations[a],O;M?O={displayText:Array.from(M.displayText),type:Array.from(M.type)}:O={displayText:[],type:[]};var $=m.session.getFoldLine(a);if($&&m.$showFoldedAnnotations){for(var b={error:[],security:[],warning:[],info:[],hint:[]},he={error:1,security:2,warning:3,info:4,hint:5},Te,de=a+1;de<=$.end.row;de++)if(m.$annotations[de])for(var Y=0;Y<m.$annotations[de].text.length;Y++){var gt=m.$annotations[de].type[Y];b[gt].push(m.$annotations[de].text[Y]),(!Te||he[gt]<he[Te])&&(Te=gt)}if(["error","security","warning"].includes(Te)){var U="".concat(t.annotationsToSummaryString(b)," in folded code.");O.displayText.push(U),O.type.push(Te+"_fold")}}if(O.displayText.length===0)return this.hide();for(var V={error:[],security:[],warning:[],info:[],hint:[]},C=m.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",de=0;de<O.displayText.length;de++){var y=A.createElement("span"),T=A.createElement("span");(g=T.classList).add.apply(g,["ace_".concat(O.type[de]),C]),T.setAttribute("aria-label","".concat(t.annotationLabels[O.type[de].replace("_fold","")].singular)),T.setAttribute("role","img"),T.appendChild(A.createTextNode(" ")),y.appendChild(T),y.appendChild(A.createTextNode(O.displayText[de])),y.appendChild(A.createElement("br")),V[O.type[de].replace("_fold","")].push(y)}var ke=A.createElement("span");V.error.forEach(function(mt){return ke.appendChild(mt)}),V.security.forEach(function(mt){return ke.appendChild(mt)}),V.warning.forEach(function(mt){return ke.appendChild(mt)}),V.info.forEach(function(mt){return ke.appendChild(mt)}),V.hint.forEach(function(mt){return ke.appendChild(mt)}),ke.setAttribute("aria-live","polite");var Qe=this.$findLinkedAnnotationNode(a);Qe&&Qe.setAttribute("aria-describedby",this.id);var Je=o.fromPoints({row:a,column:0},{row:a,column:0});this.showForRange(this.editor,Je,ke),this.visibleTooltipRow=a,this.editor._signal("showGutterTooltip",this)},t.prototype.$setPosition=function(a,g,m,M){var O=this.$findCellByRow(M.start.row);if(O){var $=O&&O.element,b=$&&$.querySelector(".ace_gutter_annotation");if(b){var he=b.getBoundingClientRect();if(he){var Te={pageX:he.right,pageY:he.top};return e.prototype.$setPosition.call(this,a,Te,!1,M)}}}},t.prototype.$shouldPlaceAbove=function(a,g,m){return m<a},t.prototype.$findLinkedAnnotationNode=function(a){var g=this.$findCellByRow(a);if(g){var m=g.element;if(m.childNodes.length>2)return m.childNodes[2]}},t.prototype.$findCellByRow=function(a){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(g){return g.row===a})},t.prototype.hide=function(a){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.visibleTooltipRow!=null){var g=this.$findLinkedAnnotationNode(this.visibleTooltipRow);g&&g.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),e.prototype.hide.call(this,a)}},t.annotationsToSummaryString=function(a){var g,m,M=[],O=["error","security","warning","info","hint"];try{for(var $=w(O),b=$.next();!b.done;b=$.next()){var he=b.value;if(a[he].length){var Te=a[he].length===1?t.annotationLabels[he].singular:t.annotationLabels[he].plural;M.push("".concat(a[he].length," ").concat(Te))}}}catch(de){g={error:de}}finally{try{b&&!b.done&&(m=$.return)&&m.call($)}finally{if(g)throw g.error}}return M.join(", ")},t.prototype.isOutsideOfText=function(a){var g=a.editor,m=g.renderer.$gutter.getBoundingClientRect();return!(a.clientX>=m.left&&a.clientX<=m.right&&a.clientY>=m.top&&a.clientY<=m.bottom)},t}(h);i.$uid=0,v.GutterTooltip=i}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(p,v,fe){var x=p("../lib/dom"),w=p("../lib/event"),A=p("../lib/useragent"),c=200,h=200,n=5;function o(i){var e=i.editor,t=x.createElement("div");t.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",t.textContent=" ";var a=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];a.forEach(function(bt){i[bt]=this[bt]},this),e.on("mousedown",this.onMouseDown.bind(i));var g=e.container,m,M,O,$,b,he,Te=0,de,Y,gt,U,V;this.onDragStart=function(bt){if(this.cancelDrag||!g.draggable){var Gt=this;return setTimeout(function(){Gt.startSelect(),Gt.captureMouse(bt)},0),bt.preventDefault()}b=e.getSelectionRange();var Yt=bt.dataTransfer;Yt.effectAllowed=e.getReadOnly()?"copy":"copyMove",e.container.appendChild(t),Yt.setDragImage&&Yt.setDragImage(t,0,0),setTimeout(function(){e.container.removeChild(t)}),Yt.clearData(),Yt.setData("Text",e.session.getTextRange()),Y=!0,this.setState("drag")},this.onDragEnd=function(bt){if(g.draggable=!1,Y=!1,this.setState(null),!e.getReadOnly()){var Gt=bt.dataTransfer.dropEffect;!de&&Gt=="move"&&e.session.remove(e.getSelectionRange()),e.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(bt){if(!(e.getReadOnly()||!yt(bt.dataTransfer)))return M=bt.clientX,O=bt.clientY,m||ke(),Te++,bt.dataTransfer.dropEffect=de=Qt(bt),w.preventDefault(bt)},this.onDragOver=function(bt){if(!(e.getReadOnly()||!yt(bt.dataTransfer)))return M=bt.clientX,O=bt.clientY,m||(ke(),Te++),Je!==null&&(Je=null),bt.dataTransfer.dropEffect=de=Qt(bt),w.preventDefault(bt)},this.onDragLeave=function(bt){if(Te--,Te<=0&&m)return Qe(),de=null,w.preventDefault(bt)},this.onDrop=function(bt){if(he){var Gt=bt.dataTransfer;if(Y)switch(de){case"move":b.contains(he.row,he.column)?b={start:he,end:he}:b=e.moveText(b,he);break;case"copy":b=e.moveText(b,he,!0);break}else{var Yt=Gt.getData("Text");b={start:he,end:e.session.insert(he,Yt)},e.focus(),de=null}return Qe(),w.preventDefault(bt)}},w.addListener(g,"dragstart",this.onDragStart.bind(i),e),w.addListener(g,"dragend",this.onDragEnd.bind(i),e),w.addListener(g,"dragenter",this.onDragEnter.bind(i),e),w.addListener(g,"dragover",this.onDragOver.bind(i),e),w.addListener(g,"dragleave",this.onDragLeave.bind(i),e),w.addListener(g,"drop",this.onDrop.bind(i),e);function C(bt,Gt){var Yt=Date.now(),Zt=!Gt||bt.row!=Gt.row,Jt=!Gt||bt.column!=Gt.column;if(!U||Zt||Jt)e.moveCursorToPosition(bt),U=Yt,V={x:M,y:O};else{var pi=r(V.x,V.y,M,O);pi>n?U=null:Yt-U>=h&&(e.renderer.scrollCursorIntoView(),U=null)}}function y(bt,Gt){var Yt=Date.now(),Zt=e.renderer.layerConfig.lineHeight,Jt=e.renderer.layerConfig.characterWidth,pi=e.renderer.scroller.getBoundingClientRect(),mi={x:{left:M-pi.left,right:pi.right-M},y:{top:O-pi.top,bottom:pi.bottom-O}},gi=Math.min(mi.x.left,mi.x.right),vi=Math.min(mi.y.top,mi.y.bottom),wi={row:bt.row,column:bt.column};gi/Jt<=2&&(wi.column+=mi.x.left<mi.x.right?-3:2),vi/Zt<=1&&(wi.row+=mi.y.top<mi.y.bottom?-1:1);var Ci=bt.row!=wi.row,Si=bt.column!=wi.column,bi=!Gt||bt.row!=Gt.row;Ci||Si&&!bi?gt?Yt-gt>=c&&e.renderer.scrollCursorIntoView(wi):gt=Yt:gt=null}function T(){var bt=he;he=e.renderer.screenToTextCoordinates(M,O),C(he,bt),y(he,bt)}function ke(){b=e.selection.toOrientedRange(),m=e.session.addMarker(b,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval($),T(),$=setInterval(T,20),Te=0,w.addListener(document,"mousemove",mt)}function Qe(){clearInterval($),e.session.removeMarker(m),m=null,e.selection.fromOrientedRange(b),e.isFocused()&&!Y&&e.$resetCursorStyle(),b=null,he=null,Te=0,gt=null,U=null,w.removeListener(document,"mousemove",mt)}var Je=null;function mt(){Je==null&&(Je=setTimeout(function(){Je!=null&&m&&Qe()},20))}function yt(bt){var Gt=bt.types;return!Gt||Array.prototype.some.call(Gt,function(Yt){return Yt=="text/plain"||Yt=="Text"})}function Qt(bt){var Gt=["copy","copymove","all","uninitialized"],Yt=["move","copymove","linkmove","all","uninitialized"],Zt=A.isMac?bt.altKey:bt.ctrlKey,Jt="uninitialized";try{Jt=bt.dataTransfer.effectAllowed.toLowerCase()}catch{}var pi="none";return Zt&&Gt.indexOf(Jt)>=0?pi="copy":Yt.indexOf(Jt)>=0?pi="move":Gt.indexOf(Jt)>=0&&(pi="copy"),pi}}(function(){this.dragWait=function(){var i=Date.now()-this.mousedownEvent.time;i>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var i=this.editor.container;i.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(i){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var i=this.editor,e=i.container;e.draggable=!0,i.renderer.$cursorLayer.setBlinking(!1),i.setStyle("ace_dragging");var t=A.isWin?"default":"move";i.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(i){var e=this.editor.container;if(A.isIE&&this.state=="dragReady"){var t=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);t>3&&e.dragDrop()}if(this.state==="dragWait"){var t=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);t>0&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(i){if(this.$dragEnabled){this.mousedownEvent=i;var e=this.editor,t=i.inSelection(),a=i.getButton(),g=i.domEvent.detail||1;if(g===1&&a===0&&t){if(i.editor.inMultiSelectMode&&(i.getAccelKey()||i.getShiftKey()))return;this.mousedownEvent.time=Date.now();var m=i.domEvent.target||i.domEvent.srcElement;if("unselectable"in m&&(m.unselectable="on"),e.getDragDelay()){if(A.isWebKit){this.cancelDrag=!0;var M=e.container;M.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(i,this.onMouseDrag.bind(this)),i.defaultPrevented=!0}}}}).call(o.prototype);function r(i,e,t,a){return Math.sqrt(Math.pow(t-i,2)+Math.pow(a-e,2))}v.DragdropHandler=o}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(p,v,fe){var x=p("./mouse_event").MouseEvent,w=p("../lib/event"),A=p("../lib/dom");v.addTouchListeners=function(c,h){var n="scroll",o,r,i,e,t,a,g=0,m,M=0,O=0,$=0,b,he;function Te(){var C=window.navigator&&window.navigator.clipboard,y=!1,T=function(){var Je=h.getCopyText(),mt=h.session.getUndoManager().hasUndo();he.replaceChild(A.buildDom(y?["span",!Je&&ke("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],Je&&ke("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],Je&&ke("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],C&&ke("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],mt&&ke("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],ke("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],ke("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),he.firstChild)},ke=function(Je){return h.commands.canExecute(Je,h)},Qe=function(Je){var mt=Je.target.getAttribute("action");if(mt=="more"||!y)return y=!y,T();mt=="paste"?C.readText().then(function(yt){h.execCommand(mt,yt)}):mt&&((mt=="cut"||mt=="copy")&&(C?C.writeText(h.getCopyText()):document.execCommand("copy")),h.execCommand(mt)),he.firstChild.style.display="none",y=!1,mt!="openCommandPalette"&&h.focus()};he=A.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(Je){n="menu",Je.stopPropagation(),Je.preventDefault(),h.textInput.focus()},ontouchend:function(Je){Je.stopPropagation(),Je.preventDefault(),Qe(Je)},onclick:Qe},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],h.container)}function de(){if(!h.getOption("enableMobileMenu")){he&&Y();return}he||Te();var C=h.selection.cursor,y=h.renderer.textToScreenCoordinates(C.row,C.column),T=h.renderer.textToScreenCoordinates(0,0).pageX,ke=h.renderer.scrollLeft,Qe=h.container.getBoundingClientRect();he.style.top=y.pageY-Qe.top-3+"px",y.pageX-Qe.left<Qe.width-70?(he.style.left="",he.style.right="10px"):(he.style.right="",he.style.left=T+ke-Qe.left+"px"),he.style.display="",he.firstChild.style.display="none",h.on("input",Y)}function Y(C){he&&(he.style.display="none"),h.off("input",Y)}function gt(){t=null,clearTimeout(t);var C=h.selection.getRange(),y=C.contains(m.row,m.column);(C.isEmpty()||!y)&&(h.selection.moveToPosition(m),h.selection.selectWord()),n="wait",de()}function U(){t=null,clearTimeout(t),h.selection.moveToPosition(m);var C=M>=2?h.selection.getLineRange(m.row):h.session.getBracketRange(m);C&&!C.isEmpty()?h.selection.setRange(C):h.selection.selectWord(),n="wait"}w.addListener(c,"contextmenu",function(C){if(b){var y=h.textInput.getElement();y.focus()}},h),w.addListener(c,"touchstart",function(C){var y=C.touches;if(t||y.length>1){clearTimeout(t),t=null,i=-1,n="zoom";return}b=h.$mouseHandler.isMousePressed=!0;var T=h.renderer.layerConfig.lineHeight,ke=h.renderer.layerConfig.lineHeight,Qe=C.timeStamp;e=Qe;var Je=y[0],mt=Je.clientX,yt=Je.clientY;Math.abs(o-mt)+Math.abs(r-yt)>T&&(i=-1),o=C.clientX=mt,r=C.clientY=yt,O=$=0;var Qt=new x(C,h);if(m=Qt.getDocumentPosition(),Qe-i<500&&y.length==1&&!g)M++,C.preventDefault(),C.button=0,U();else{M=0;var bt=h.selection.cursor,Gt=h.selection.isEmpty()?bt:h.selection.anchor,Yt=h.renderer.$cursorLayer.getPixelPosition(bt,!0),Zt=h.renderer.$cursorLayer.getPixelPosition(Gt,!0),Jt=h.renderer.scroller.getBoundingClientRect(),pi=h.renderer.layerConfig.offset,mi=h.renderer.scrollLeft,gi=function(Ci,Si){return Ci=Ci/ke,Si=Si/T-.75,Ci*Ci+Si*Si};if(C.clientX<Jt.left){n="zoom";return}var vi=gi(C.clientX-Jt.left-Yt.left+mi,C.clientY-Jt.top-Yt.top+pi),wi=gi(C.clientX-Jt.left-Zt.left+mi,C.clientY-Jt.top-Zt.top+pi);vi<3.5&&wi<3.5&&(n=vi>wi?"cursor":"anchor"),wi<3.5?n="anchor":vi<3.5?n="cursor":n="scroll",t=setTimeout(gt,450)}i=Qe},h),w.addListener(c,"touchend",function(C){b=h.$mouseHandler.isMousePressed=!1,a&&clearInterval(a),n=="zoom"?(n="",g=0):t?(h.selection.moveToPosition(m),g=0,de()):n=="scroll"?(V(),Y()):de(),clearTimeout(t),t=null},h),w.addListener(c,"touchmove",function(C){t&&(clearTimeout(t),t=null);var y=C.touches;if(!(y.length>1||n=="zoom")){var T=y[0],ke=o-T.clientX,Qe=r-T.clientY;if(n=="wait")if(ke*ke+Qe*Qe>4)n="cursor";else return C.preventDefault();o=T.clientX,r=T.clientY,C.clientX=T.clientX,C.clientY=T.clientY;var Je=C.timeStamp,mt=Je-e;if(e=Je,n=="scroll"){var yt=new x(C,h);yt.speed=1,yt.wheelX=ke,yt.wheelY=Qe,10*Math.abs(ke)<Math.abs(Qe)&&(ke=0),10*Math.abs(Qe)<Math.abs(ke)&&(Qe=0),mt!=0&&(O=ke/mt,$=Qe/mt),h._emit("mousewheel",yt),yt.propagationStopped||(O=$=0)}else{var Qt=new x(C,h),bt=Qt.getDocumentPosition();n=="cursor"?h.selection.moveCursorToPosition(bt):n=="anchor"&&h.selection.setSelectionAnchor(bt.row,bt.column),h.renderer.scrollCursorIntoView(bt),C.preventDefault()}}},h);function V(){g+=60,a=setInterval(function(){g--<=0&&(clearInterval(a),a=null),Math.abs(O)<.01&&(O=0),Math.abs($)<.01&&($=0),g<20&&(O=.9*O),g<20&&($=.9*$);var C=h.session.getScrollTop();h.renderer.scrollBy(10*O,10*$),C==h.session.getScrollTop()&&(g=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(p,v,fe){var x=p("../lib/event"),w=p("../lib/useragent"),A=p("./default_handlers").DefaultHandlers,c=p("./default_gutter_handler").GutterHandler,h=p("./mouse_event").MouseEvent,n=p("./dragdrop_handler").DragdropHandler,o=p("./touch_handler").addTouchListeners,r=p("../config"),i=function(){function e(t){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var a=this;this.editor=t,new A(this),new c(this),new n(this);var g=function(O){var $=!document.hasFocus||!document.hasFocus()||!t.isFocused()&&document.activeElement==(t.textInput&&t.textInput.getElement());$&&window.focus(),t.focus(),setTimeout(function(){t.isFocused()||t.focus()})},m=t.renderer.getMouseEventTarget();x.addListener(m,"click",this.onMouseEvent.bind(this,"click"),t),x.addListener(m,"mousemove",this.onMouseMove.bind(this,"mousemove"),t),x.addMultiMouseDownListener([m,t.renderer.scrollBarV&&t.renderer.scrollBarV.inner,t.renderer.scrollBarH&&t.renderer.scrollBarH.inner,t.textInput&&t.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",t),x.addMouseWheelListener(t.container,this.onMouseWheel.bind(this,"mousewheel"),t),o(t.container,t);var M=t.renderer.$gutter;x.addListener(M,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),t),x.addListener(M,"click",this.onMouseEvent.bind(this,"gutterclick"),t),x.addListener(M,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),t),x.addListener(M,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),t),x.addListener(m,"mousedown",g,t),x.addListener(M,"mousedown",g,t),w.isIE&&t.renderer.scrollBarV&&(x.addListener(t.renderer.scrollBarV.element,"mousedown",g,t),x.addListener(t.renderer.scrollBarH.element,"mousedown",g,t)),t.on("mousemove",function(O){if(!(a.state||a.$dragDelay||!a.$dragEnabled)){var $=t.renderer.screenToTextCoordinates(O.x,O.y),b=t.session.selection.getRange(),he=t.renderer;!b.isEmpty()&&b.insideStart($.row,$.column)?he.setCursorStyle("default"):he.setCursorStyle("")}},t)}return e.prototype.onMouseEvent=function(t,a){this.editor.session&&this.editor._emit(t,new h(a,this.editor))},e.prototype.onMouseMove=function(t,a){var g=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!g||!g.length||this.editor._emit(t,new h(a,this.editor))},e.prototype.onMouseWheel=function(t,a){var g=new h(a,this.editor);g.speed=this.$scrollSpeed*2,g.wheelX=a.wheelX,g.wheelY=a.wheelY,this.editor._emit(t,g)},e.prototype.setState=function(t){this.state=t},e.prototype.captureMouse=function(t,a){this.x=t.x,this.y=t.y,this.isMousePressed=!0;var g=this.editor,m=this.editor.renderer;m.$isMousePressed=!0;var M=this,O=!0,$=function(Y){if(Y){if(w.isWebKit&&!Y.which&&M.releaseMouse)return M.releaseMouse();M.x=Y.clientX,M.y=Y.clientY,a&&a(Y),M.mouseEvent=new h(Y,M.editor),M.$mouseMoved=!0}},b=function(Y){g.off("beforeEndOperation",de),O=!1,g.session&&he(),M[M.state+"End"]&&M[M.state+"End"](Y),M.state="",M.isMousePressed=m.$isMousePressed=!1,m.$keepTextAreaAtCursor&&m.$moveTextAreaToCursor(),M.$onCaptureMouseMove=M.releaseMouse=null,Y&&M.onMouseEvent("mouseup",Y),g.endOperation()},he=function(){M[M.state]&&M[M.state](),M.$mouseMoved=!1},Te=function(){O&&(he(),x.nextFrame(Te))};if(w.isOldIE&&t.domEvent.type=="dblclick")return setTimeout(function(){b(t)});var de=function(Y){M.releaseMouse&&g.curOp.command.name&&g.curOp.selectionChanged&&(M[M.state+"End"]&&M[M.state+"End"](),M.state="",M.releaseMouse())};g.on("beforeEndOperation",de),g.startOperation({command:{name:"mouse"}}),M.$onCaptureMouseMove=$,M.releaseMouse=x.capture(this.editor.container,$,b),Te()},e.prototype.cancelContextMenu=function(){var t=(function(a){a&&a.domEvent&&a.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",t),a&&a.domEvent&&x.stopEvent(a.domEvent))}).bind(this);setTimeout(t,10),this.editor.on("nativecontextmenu",t)},e.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse(),this.$tooltip&&this.$tooltip.destroy()},e}();i.prototype.releaseMouse=null,r.defineOptions(i.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:w.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0}}),v.MouseHandler=i}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(p,v,fe){var x=p("../lib/dom"),w=function(){function A(c){c.on("click",function(h){var n=h.getDocumentPosition(),o=c.session,r=o.getFoldAt(n.row,n.column,1);r&&(h.getAccelKey()?o.removeFold(r):o.expandFold(r),h.stop());var i=h.domEvent&&h.domEvent.target;i&&x.hasCssClass(i,"ace_inline_button")&&x.hasCssClass(i,"ace_toggle_wrap")&&(o.setOption("wrap",!o.getUseWrapMode()),c.renderer.scrollCursorIntoView())}),c.on("gutterclick",function(h){var n=c.renderer.$gutterLayer.getRegion(h);if(n=="foldWidgets"){var o=h.getDocumentPosition().row,r=c.session;r.foldWidgets&&r.foldWidgets[o]&&c.session.onFoldWidgetClick(o,h),c.isFocused()||c.focus(),h.stop()}}),c.on("gutterdblclick",function(h){var n=c.renderer.$gutterLayer.getRegion(h);if(n=="foldWidgets"){var o=h.getDocumentPosition().row,r=c.session,i=r.getParentFoldRangeData(o,!0),e=i.range||i.firstRange;if(e){o=e.start.row;var t=r.getFoldAt(o,r.getLine(o).length,1);t?r.removeFold(t):(r.addFold("...",e),c.renderer.scrollCursorIntoView({row:e.start.row,column:0}))}h.stop()}})}return A}();v.FoldHandler=w}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(p,v,fe){var x=p("../lib/keys"),w=p("../lib/event"),A=function(){function c(h){this.$editor=h,this.$data={editor:h},this.$handlers=[],this.setDefaultHandler(h.commands)}return c.prototype.setDefaultHandler=function(h){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=h,this.addKeyboardHandler(h,0)},c.prototype.setKeyboardHandler=function(h){var n=this.$handlers;if(n[n.length-1]!=h){for(;n[n.length-1]&&n[n.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(n[n.length-1]);this.addKeyboardHandler(h,1)}},c.prototype.addKeyboardHandler=function(h,n){if(h){typeof h=="function"&&!h.handleKeyboard&&(h.handleKeyboard=h);var o=this.$handlers.indexOf(h);o!=-1&&this.$handlers.splice(o,1),n==null?this.$handlers.push(h):this.$handlers.splice(n,0,h),o==-1&&h.attach&&h.attach(this.$editor)}},c.prototype.removeKeyboardHandler=function(h){var n=this.$handlers.indexOf(h);return n==-1?!1:(this.$handlers.splice(n,1),h.detach&&h.detach(this.$editor),!0)},c.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},c.prototype.getStatusText=function(){var h=this.$data,n=h.editor;return this.$handlers.map(function(o){return o.getStatusText&&o.getStatusText(n,h)||""}).filter(Boolean).join(" ")},c.prototype.$callKeyboardHandlers=function(h,n,o,r){for(var i,e=!1,t=this.$editor.commands,a=this.$handlers.length;a--&&(i=this.$handlers[a].handleKeyboard(this.$data,h,n,o,r),!(!(!i||!i.command)&&(i.command=="null"?e=!0:e=t.exec(i.command,this.$editor,i.args,r),e&&r&&h!=-1&&i.passEvent!=!0&&i.command.passEvent!=!0&&w.stopEvent(r),e))););return!e&&h==-1&&(i={command:"insertstring"},e=t.exec("insertstring",this.$editor,n)),e&&this.$editor._signal&&this.$editor._signal("keyboardActivity",i),e},c.prototype.onCommandKey=function(h,n,o){var r=x.keyCodeToString(o);return this.$callKeyboardHandlers(n,r,o,h)},c.prototype.onTextInput=function(h){return this.$callKeyboardHandlers(-1,h)},c}();v.KeyBinding=A}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(p,v,fe){var x=0,w=0,A=!1,c=!1,h=!1,n=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],o=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],r=0,i=1,e=0,t=1,a=2,g=3,m=4,M=5,O=6,$=7,b=8,he=9,Te=10,de=11,Y=12,gt=13,U=14,V=15,C=16,y=17,T=18,ke=[T,T,T,T,T,T,T,T,T,O,M,O,b,M,T,T,T,T,T,T,T,T,T,T,T,T,T,T,M,M,M,O,b,m,m,de,de,de,m,m,m,m,m,Te,he,Te,he,he,a,a,a,a,a,a,a,a,a,a,he,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,T,T,T,T,T,T,M,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,he,m,de,de,de,de,m,m,m,m,e,m,m,T,m,m,de,de,a,a,m,e,m,m,m,a,e,m,m,m,m,m],Qe=[b,b,b,b,b,b,b,b,b,b,b,T,T,T,e,t,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,M,gt,U,V,C,y,he,de,de,de,de,de,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,he,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 Je(bt,Gt,Yt,Zt){var Jt=x?o:n,pi=null,mi=null,gi=null,vi=0,wi=null,Ci=null,Si=-1,bi=null,$i=null,_i=[];if(!Zt)for(bi=0,Zt=[];bi<Yt;bi++)Zt[bi]=Qt(bt[bi]);for(w=x,A=!1,c=!1,h=!1,$i=0;$i<Yt;$i++){if(pi=vi,_i[$i]=mi=yt(bt,Zt,_i,$i),vi=Jt[pi][mi],wi=vi&240,vi&=15,Gt[$i]=gi=Jt[vi][5],wi>0)if(wi==16){for(bi=Si;bi<$i;bi++)Gt[bi]=1;Si=-1}else Si=-1;if(Ci=Jt[vi][6],Ci)Si==-1&&(Si=$i);else if(Si>-1){for(bi=Si;bi<$i;bi++)Gt[bi]=gi;Si=-1}Zt[$i]==M&&(Gt[$i]=0),w|=gi}if(h){for(bi=0;bi<Yt;bi++)if(Zt[bi]==O){Gt[bi]=x;for(var xi=bi-1;xi>=0&&Zt[xi]==b;xi--)Gt[xi]=x}}}function mt(bt,Gt,Yt){if(!(w<bt)){if(bt==1&&x==i&&!c){Yt.reverse();return}for(var Zt=Yt.length,Jt=0,pi,mi,gi,vi;Jt<Zt;){if(Gt[Jt]>=bt){for(pi=Jt+1;pi<Zt&&Gt[pi]>=bt;)pi++;for(mi=Jt,gi=pi-1;mi<gi;mi++,gi--)vi=Yt[mi],Yt[mi]=Yt[gi],Yt[gi]=vi;Jt=pi}Jt++}}}function yt(bt,Gt,Yt,Zt){var Jt=Gt[Zt],pi,mi,gi,vi;switch(Jt){case e:case t:A=!1;case m:case g:return Jt;case a:return A?g:a;case $:return A=!0,t;case b:return m;case he:return Zt<1||Zt+1>=Gt.length||(pi=Yt[Zt-1])!=a&&pi!=g||(mi=Gt[Zt+1])!=a&&mi!=g?m:(A&&(mi=g),mi==pi?mi:m);case Te:return pi=Zt>0?Yt[Zt-1]:M,pi==a&&Zt+1<Gt.length&&Gt[Zt+1]==a?a:m;case de:if(Zt>0&&Yt[Zt-1]==a)return a;if(A)return m;for(vi=Zt+1,gi=Gt.length;vi<gi&&Gt[vi]==de;)vi++;return vi<gi&&Gt[vi]==a?a:m;case Y:for(gi=Gt.length,vi=Zt+1;vi<gi&&Gt[vi]==Y;)vi++;if(vi<gi){var wi=bt[Zt],Ci=wi>=1425&&wi<=2303||wi==64286;if(pi=Gt[vi],Ci&&(pi==t||pi==$))return t}return Zt<1||(pi=Gt[Zt-1])==M?m:Yt[Zt-1];case M:return A=!1,c=!0,x;case O:return h=!0,m;case gt:case U:case C:case y:case V:A=!1;case T:return m}}function Qt(bt){var Gt=bt.charCodeAt(0),Yt=Gt>>8;return Yt==0?Gt>191?e:ke[Gt]:Yt==5?/[\u0591-\u05f4]/.test(bt)?t:e:Yt==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(bt)?Y:/[\u0660-\u0669\u066b-\u066c]/.test(bt)?g:Gt==1642?de:/[\u06f0-\u06f9]/.test(bt)?a:$:Yt==32&&Gt<=8287?Qe[Gt&255]:Yt==254&&Gt>=65136?$:m}v.L=e,v.R=t,v.EN=a,v.ON_R=3,v.AN=4,v.R_H=5,v.B=6,v.RLE=7,v.DOT="·",v.doBidiReorder=function(bt,Gt,Yt){if(bt.length<2)return{};var Zt=bt.split(""),Jt=new Array(Zt.length),pi=new Array(Zt.length),mi=[];x=Yt?i:r,Je(Zt,mi,Zt.length,Gt);for(var gi=0;gi<Jt.length;Jt[gi]=gi,gi++);mt(2,mi,Jt),mt(1,mi,Jt);for(var gi=0;gi<Jt.length-1;gi++)Gt[gi]===g?mi[gi]=v.AN:mi[gi]===t&&(Gt[gi]>$&&Gt[gi]<gt||Gt[gi]===m||Gt[gi]===T)?mi[gi]=v.ON_R:gi>0&&Zt[gi-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(Zt[gi])&&(mi[gi-1]=mi[gi]=v.R_H,gi++);Zt[Zt.length-1]===v.DOT&&(mi[Zt.length-1]=v.B),Zt[0]==="‫"&&(mi[0]=v.RLE);for(var gi=0;gi<Jt.length;gi++)pi[gi]=mi[Jt[gi]];return{logicalFromVisual:Jt,bidiLevels:pi}},v.hasBidiCharacters=function(bt,Gt){for(var Yt=!1,Zt=0;Zt<bt.length;Zt++)Gt[Zt]=Qt(bt.charAt(Zt)),!Yt&&(Gt[Zt]==t||Gt[Zt]==$||Gt[Zt]==g)&&(Yt=!0);return Yt},v.getVisualFromLogicalIdx=function(bt,Gt){for(var Yt=0;Yt<Gt.logicalFromVisual.length;Yt++)if(Gt.logicalFromVisual[Yt]==bt)return Yt;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(p,v,fe){var x=p("./lib/bidiutil"),w=p("./lib/lang"),A=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,c=function(){function h(n){this.session=n,this.bidiMap={},this.currentRow=null,this.bidiUtil=x,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=A.test(n.getValue())}return h.prototype.isBidiRow=function(n,o,r){return this.seenBidi?(n!==this.currentRow&&(this.currentRow=n,this.updateRowLine(o,r),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},h.prototype.onChange=function(n){this.seenBidi?this.currentRow=null:n.action=="insert"&&A.test(n.lines.join(`
182
+ `))&&(this.seenBidi=!0,this.currentRow=null)},h.prototype.getDocumentRow=function(){var n=0,o=this.session.$screenRowCache;if(o.length){var r=this.session.$getRowCacheIndex(o,this.currentRow);r>=0&&(n=this.session.$docRowCache[r])}return n},h.prototype.getSplitIndex=function(){var n=0,o=this.session.$screenRowCache;if(o.length)for(var r,i=this.session.$getRowCacheIndex(o,this.currentRow);this.currentRow-n>0&&(r=this.session.$getRowCacheIndex(o,this.currentRow-n-1),r===i);)i=r,n++;else n=this.currentRow;return n},h.prototype.updateRowLine=function(n,o){n===void 0&&(n=this.getDocumentRow());var r=n===this.session.getLength()-1,i=r?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(n),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var e=this.session.$wrapData[n];e&&(o===void 0&&(o=this.getSplitIndex()),o>0&&e.length?(this.wrapIndent=e.indent,this.wrapOffset=this.wrapIndent*this.charWidths[x.L],this.line=o<e.length?this.line.substring(e[o-1],e[o]):this.line.substring(e[e.length-1])):this.line=this.line.substring(0,e[o]),o==e.length&&(this.line+=this.showInvisibles?i:x.DOT))}else this.line+=this.showInvisibles?i:x.DOT;var t=this.session,a=0,g;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(m,M){return m===" "||t.isFullWidth(m.charCodeAt(0))?(g=m===" "?t.getScreenTabSize(M+a):2,a+=g-1,w.stringRepeat(x.DOT,g)):m}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==x.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 n=[];x.hasBidiCharacters(this.line,n)||this.isRtlDir?this.bidiMap=x.doBidiReorder(this.line,n,this.isRtlDir):this.bidiMap={}},h.prototype.markAsDirty=function(){this.currentRow=null},h.prototype.updateCharacterWidths=function(n){if(this.characterWidth!==n.$characterSize.width){this.fontMetrics=n;var o=this.characterWidth=n.$characterSize.width,r=n.$measureCharWidth("ה");this.charWidths[x.L]=this.charWidths[x.EN]=this.charWidths[x.ON_R]=o,this.charWidths[x.R]=this.charWidths[x.AN]=r,this.charWidths[x.R_H]=r*.45,this.charWidths[x.B]=this.charWidths[x.RLE]=0,this.currentRow=null}},h.prototype.setShowInvisibles=function(n){this.showInvisibles=n,this.currentRow=null},h.prototype.setEolChar=function(n){this.EOL=n},h.prototype.setContentWidth=function(n){this.contentWidth=n},h.prototype.isRtlLine=function(n){return this.$isRtl?!0:n!=null?this.session.getLine(n).charAt(0)==this.RLE:this.isRtlDir},h.prototype.setRtlDirection=function(n,o){for(var r=n.getCursorPosition(),i=n.selection.getSelectionAnchor().row;i<=r.row;i++)!o&&n.session.getLine(i).charAt(0)===n.session.$bidiHandler.RLE?n.session.doc.removeInLine(i,0,1):o&&n.session.getLine(i).charAt(0)!==n.session.$bidiHandler.RLE&&n.session.doc.insert({column:0,row:i},n.session.$bidiHandler.RLE)},h.prototype.getPosLeft=function(n){n-=this.wrapIndent;var o=this.line.charAt(0)===this.RLE?1:0,r=n>o?this.session.getOverwrite()?n:n-1:o,i=x.getVisualFromLogicalIdx(r,this.bidiMap),e=this.bidiMap.bidiLevels,t=0;!this.session.getOverwrite()&&n<=o&&e[i]%2!==0&&i++;for(var a=0;a<i;a++)t+=this.charWidths[e[a]];return!this.session.getOverwrite()&&n>o&&e[i]%2===0&&(t+=this.charWidths[e[i]]),this.wrapIndent&&(t+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(t+=this.rtlLineOffset),t},h.prototype.getSelections=function(n,o){var r=this.bidiMap,i=r.bidiLevels,e,t=[],a=0,g=Math.min(n,o)-this.wrapIndent,m=Math.max(n,o)-this.wrapIndent,M=!1,O=!1,$=0;this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var b,he=0;he<i.length;he++)b=r.logicalFromVisual[he],e=i[he],M=b>=g&&b<m,M&&!O?$=a:!M&&O&&t.push({left:$,width:a-$}),a+=this.charWidths[e],O=M;if(M&&he===i.length&&t.push({left:$,width:a-$}),this.isRtlDir)for(var Te=0;Te<t.length;Te++)t[Te].left+=this.rtlLineOffset;return t},h.prototype.offsetToCol=function(r){this.isRtlDir&&(r-=this.rtlLineOffset);var o=0,r=Math.max(r,0),i=0,e=0,t=this.bidiMap.bidiLevels,a=this.charWidths[t[e]];for(this.wrapIndent&&(r-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);r>i+a/2;){if(i+=a,e===t.length-1){a=0;break}a=this.charWidths[t[++e]]}return e>0&&t[e-1]%2!==0&&t[e]%2===0?(r<i&&e--,o=this.bidiMap.logicalFromVisual[e]):e>0&&t[e-1]%2===0&&t[e]%2!==0?o=1+(r>i?this.bidiMap.logicalFromVisual[e]:this.bidiMap.logicalFromVisual[e-1]):this.isRtlDir&&e===t.length-1&&a===0&&t[e-1]%2===0||!this.isRtlDir&&e===0&&t[e]%2!==0?o=1+this.bidiMap.logicalFromVisual[e]:(e>0&&t[e-1]%2!==0&&a!==0&&e--,o=this.bidiMap.logicalFromVisual[e]),o===0&&this.isRtlDir&&o++,o+this.wrapIndent},h}();v.BidiHandler=c}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(p,v,fe){var x=p("./lib/oop"),w=p("./lib/lang"),A=p("./lib/event_emitter").EventEmitter,c=p("./range").Range,h=function(){function n(o){this.session=o,this.doc=o.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var r=this;this.cursor.on("change",function(i){r.$cursorChanged=!0,r.$silent||r._emit("changeCursor"),!r.$isEmpty&&!r.$silent&&r._emit("changeSelection"),!r.$keepDesiredColumnOnChange&&i.old.column!=i.value.column&&(r.$desiredColumn=null)}),this.anchor.on("change",function(){r.$anchorChanged=!0,!r.$isEmpty&&!r.$silent&&r._emit("changeSelection")})}return n.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},n.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},n.prototype.getCursor=function(){return this.lead.getPosition()},n.prototype.setAnchor=function(o,r){this.$isEmpty=!1,this.anchor.setPosition(o,r)},n.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},n.prototype.getSelectionLead=function(){return this.lead.getPosition()},n.prototype.isBackwards=function(){var o=this.anchor,r=this.lead;return o.row>r.row||o.row==r.row&&o.column>r.column},n.prototype.getRange=function(){var o=this.anchor,r=this.lead;return this.$isEmpty?c.fromPoints(r,r):this.isBackwards()?c.fromPoints(r,o):c.fromPoints(o,r)},n.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},n.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},n.prototype.setRange=function(o,r){var i=r?o.end:o.start,e=r?o.start:o.end;this.$setSelection(i.row,i.column,e.row,e.column)},n.prototype.$setSelection=function(o,r,i,e){if(!this.$silent){var t=this.$isEmpty,a=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(o,r),this.cursor.setPosition(i,e),this.$isEmpty=!c.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||t!=this.$isEmpty||a)&&this._emit("changeSelection")}},n.prototype.$moveSelection=function(o){var r=this.lead;this.$isEmpty&&this.setSelectionAnchor(r.row,r.column),o.call(this)},n.prototype.selectTo=function(o,r){this.$moveSelection(function(){this.moveCursorTo(o,r)})},n.prototype.selectToPosition=function(o){this.$moveSelection(function(){this.moveCursorToPosition(o)})},n.prototype.moveTo=function(o,r){this.clearSelection(),this.moveCursorTo(o,r)},n.prototype.moveToPosition=function(o){this.clearSelection(),this.moveCursorToPosition(o)},n.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},n.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},n.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},n.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},n.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},n.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},n.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},n.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},n.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},n.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},n.prototype.getWordRange=function(o,r){if(typeof r>"u"){var i=o||this.lead;o=i.row,r=i.column}return this.session.getWordRange(o,r)},n.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},n.prototype.selectAWord=function(){var o=this.getCursor(),r=this.session.getAWordRange(o.row,o.column);this.setSelectionRange(r)},n.prototype.getLineRange=function(o,r){var i=typeof o=="number"?o:this.lead.row,e,t=this.session.getFoldLine(i);return t?(i=t.start.row,e=t.end.row):e=i,r===!0?new c(i,0,e,this.session.getLine(e).length):new c(i,0,e+1,0)},n.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},n.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},n.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},n.prototype.wouldMoveIntoSoftTab=function(o,r,i){var e=o.column,t=o.column+r;return i<0&&(e=o.column-r,t=o.column),this.session.isTabStop(o)&&this.doc.getLine(o.row).slice(e,t).split(" ").length-1==r},n.prototype.moveCursorLeft=function(){var o=this.lead.getPosition(),r;if(r=this.session.getFoldAt(o.row,o.column,-1))this.moveCursorTo(r.start.row,r.start.column);else if(o.column===0)o.row>0&&this.moveCursorTo(o.row-1,this.doc.getLine(o.row-1).length);else{var i=this.session.getTabSize();this.wouldMoveIntoSoftTab(o,i,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-i):this.moveCursorBy(0,-1)}},n.prototype.moveCursorRight=function(){var o=this.lead.getPosition(),r;if(r=this.session.getFoldAt(o.row,o.column,1))this.moveCursorTo(r.end.row,r.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var i=this.session.getTabSize(),o=this.lead;this.wouldMoveIntoSoftTab(o,i,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,i):this.moveCursorBy(0,1)}},n.prototype.moveCursorLineStart=function(){var o=this.lead.row,r=this.lead.column,i=this.session.documentToScreenRow(o,r),e=this.session.screenToDocumentPosition(i,0),t=this.session.getDisplayLine(o,null,e.row,e.column),a=t.match(/^\s*/);a[0].length!=r&&!this.session.$useEmacsStyleLineStart&&(e.column+=a[0].length),this.moveCursorToPosition(e)},n.prototype.moveCursorLineEnd=function(){var o=this.lead,r=this.session.getDocumentLastRowColumnPosition(o.row,o.column);if(this.lead.column==r.column){var i=this.session.getLine(r.row);if(r.column==i.length){var e=i.search(/\s+$/);e>0&&(r.column=e)}}this.moveCursorTo(r.row,r.column)},n.prototype.moveCursorFileEnd=function(){var o=this.doc.getLength()-1,r=this.doc.getLine(o).length;this.moveCursorTo(o,r)},n.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},n.prototype.moveCursorLongWordRight=function(){var o=this.lead.row,r=this.lead.column,i=this.doc.getLine(o),e=i.substring(r);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var t=this.session.getFoldAt(o,r,1);if(t){this.moveCursorTo(t.end.row,t.end.column);return}if(this.session.nonTokenRe.exec(e)&&(r+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,e=i.substring(r)),r>=i.length){this.moveCursorTo(o,i.length),this.moveCursorRight(),o<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(e)&&(r+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(o,r)},n.prototype.moveCursorLongWordLeft=function(){var o=this.lead.row,r=this.lead.column,i;if(i=this.session.getFoldAt(o,r,-1)){this.moveCursorTo(i.start.row,i.start.column);return}var e=this.session.getFoldStringAt(o,r,-1);e==null&&(e=this.doc.getLine(o).substring(0,r));var t=w.stringReverse(e);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(t)&&(r-=this.session.nonTokenRe.lastIndex,t=t.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),r<=0){this.moveCursorTo(o,0),this.moveCursorLeft(),o>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(t)&&(r-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(o,r)},n.prototype.$shortWordEndIndex=function(o){var r=0,i,e=/\s/,t=this.session.tokenRe;if(t.lastIndex=0,this.session.tokenRe.exec(o))r=this.session.tokenRe.lastIndex;else{for(;(i=o[r])&&e.test(i);)r++;if(r<1){for(t.lastIndex=0;(i=o[r])&&!t.test(i);)if(t.lastIndex=0,r++,e.test(i))if(r>2){r--;break}else{for(;(i=o[r])&&e.test(i);)r++;if(r>2)break}}}return t.lastIndex=0,r},n.prototype.moveCursorShortWordRight=function(){var o=this.lead.row,r=this.lead.column,i=this.doc.getLine(o),e=i.substring(r),t=this.session.getFoldAt(o,r,1);if(t)return this.moveCursorTo(t.end.row,t.end.column);if(r==i.length){var a=this.doc.getLength();do o++,e=this.doc.getLine(o);while(o<a&&/^\s*$/.test(e));/^\s+/.test(e)||(e=""),r=0}var g=this.$shortWordEndIndex(e);this.moveCursorTo(o,r+g)},n.prototype.moveCursorShortWordLeft=function(){var o=this.lead.row,r=this.lead.column,i;if(i=this.session.getFoldAt(o,r,-1))return this.moveCursorTo(i.start.row,i.start.column);var e=this.session.getLine(o).substring(0,r);if(r===0){do o--,e=this.doc.getLine(o);while(o>0&&/^\s*$/.test(e));r=e.length,/\s+$/.test(e)||(e="")}var t=w.stringReverse(e),a=this.$shortWordEndIndex(t);return this.moveCursorTo(o,r-a)},n.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},n.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},n.prototype.moveCursorBy=function(o,r){var i=this.session.documentToScreenPosition(this.lead.row,this.lead.column),e;if(r===0&&(o!==0&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(e=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(e/this.session.$bidiHandler.charWidths[0])):e=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column),o!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var t=this.session.lineWidgets[this.lead.row];o<0?o-=t.rowsAbove||0:o>0&&(o+=t.rowCount-(t.rowsAbove||0))}var a=this.session.screenToDocumentPosition(i.row+o,i.column,e);o!==0&&r===0&&a.row===this.lead.row&&(a.column,this.lead.column),this.moveCursorTo(a.row,a.column+r,r===0)},n.prototype.moveCursorToPosition=function(o){this.moveCursorTo(o.row,o.column)},n.prototype.moveCursorTo=function(o,r,i){var e=this.session.getFoldAt(o,r,1);e&&(o=e.start.row,r=e.start.column),this.$keepDesiredColumnOnChange=!0;var t=this.session.getLine(o);/[\uDC00-\uDFFF]/.test(t.charAt(r))&&t.charAt(r-1)&&(this.lead.row==o&&this.lead.column==r+1?r=r-1:r=r+1),this.lead.setPosition(o,r),this.$keepDesiredColumnOnChange=!1,i||(this.$desiredColumn=null)},n.prototype.moveCursorToScreen=function(o,r,i){var e=this.session.screenToDocumentPosition(o,r);this.moveCursorTo(e.row,e.column,i)},n.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},n.prototype.fromOrientedRange=function(o){this.setSelectionRange(o,o.cursor==o.start),this.$desiredColumn=o.desiredColumn||this.$desiredColumn},n.prototype.toOrientedRange=function(o){var r=this.getRange();return o?(o.start.column=r.start.column,o.start.row=r.start.row,o.end.column=r.end.column,o.end.row=r.end.row):o=r,o.cursor=this.isBackwards()?o.start:o.end,o.desiredColumn=this.$desiredColumn,o},n.prototype.getRangeOfMovements=function(o){var r=this.getCursor();try{o(this);var i=this.getCursor();return c.fromPoints(r,i)}catch{return c.fromPoints(r,r)}finally{this.moveCursorToPosition(r)}},n.prototype.toJSON=function(){if(this.rangeCount)var o=this.ranges.map(function(r){var i=r.clone();return i.isBackwards=r.cursor==r.start,i});else{var o=this.getRange();o.isBackwards=this.isBackwards()}return o},n.prototype.fromJSON=function(o){if(o.start==null)if(this.rangeList&&o.length>1){this.toSingleRange(o[0]);for(var r=o.length;r--;){var i=c.fromPoints(o[r].start,o[r].end);o[r].isBackwards&&(i.cursor=i.start),this.addRange(i,!0)}return}else o=o[0];this.rangeList&&this.toSingleRange(o),this.setSelectionRange(o,o.isBackwards)},n.prototype.isEqual=function(o){if((o.length||this.rangeCount)&&o.length!=this.rangeCount)return!1;if(!o.length||!this.ranges)return this.getRange().isEqual(o);for(var r=this.ranges.length;r--;)if(!this.ranges[r].isEqual(o[r]))return!1;return!0},n}();h.prototype.setSelectionAnchor=h.prototype.setAnchor,h.prototype.getSelectionAnchor=h.prototype.getAnchor,h.prototype.setSelectionRange=h.prototype.setRange,x.implement(h.prototype,A),v.Selection=h}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(p,v,fe){var x=p("./lib/report_error").reportError,w=2e3,A=function(){function c(h){this.splitRegex,this.states=h,this.regExps={},this.matchMappings={};for(var n in this.states){for(var o=this.states[n],r=[],i=0,e=this.matchMappings[n]={defaultToken:"text"},t="g",a=[],g=0;g<o.length;g++){var m=o[g];if(m.defaultToken&&(e.defaultToken=m.defaultToken),m.caseInsensitive&&t.indexOf("i")===-1&&(t+="i"),m.unicode&&t.indexOf("u")===-1&&(t+="u"),m.regex!=null){m.regex instanceof RegExp&&(m.regex=m.regex.toString().slice(1,-1));var M=m.regex,O=new RegExp("(?:("+M+")|(.))").exec("a").length-2;Array.isArray(m.token)?m.token.length==1||O==1?m.token=m.token[0]:O-1!=m.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:m,groupCount:O-1}),m.token=m.token[0]):(m.tokenArray=m.token,m.token=null,m.onMatch=this.$arrayTokens):typeof m.token=="function"&&!m.onMatch&&(O>1?m.onMatch=this.$applyToken:m.onMatch=m.token),O>1&&(/\\\d/.test(m.regex)?M=m.regex.replace(/\\([0-9]+)/g,function($,b){return"\\"+(parseInt(b,10)+i+1)}):(O=1,M=this.removeCapturingGroups(m.regex)),!m.splitRegex&&typeof m.token!="string"&&a.push(m)),e[i]=g,i+=O,r.push(M),m.onMatch||(m.onMatch=null)}}r.length||(e[0]=0,r.push("$")),a.forEach(function($){$.splitRegex=this.createSplitterRegexp($.regex,t)},this),this.regExps[n]=new RegExp("("+r.join(")|(")+")|($)",t)}}return c.prototype.$setMaxTokenCount=function(h){w=h|0},c.prototype.$applyToken=function(h){var n=this.splitRegex.exec(h).slice(1),o=this.token.apply(this,n);if(typeof o=="string")return[{type:o,value:h}];for(var r=[],i=0,e=o.length;i<e;i++)n[i]&&(r[r.length]={type:o[i],value:n[i]});return r},c.prototype.$arrayTokens=function(h){if(!h)return[];var n=this.splitRegex.exec(h);if(!n)return"text";for(var o=[],r=this.tokenArray,i=0,e=r.length;i<e;i++)n[i+1]&&(o[o.length]={type:r[i],value:n[i+1]});return o},c.prototype.removeCapturingGroups=function(h){var n=h.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(o,r){return r?"(?:":o});return n},c.prototype.createSplitterRegexp=function(h,n){if(h.indexOf("(?=")!=-1){var o=0,r=!1,i={};h.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,t,a,g,m,M){return r?r=m!="]":m?r=!0:g?(o==i.stack&&(i.end=M+1,i.stack=-1),o--):a&&(o++,a.length!=1&&(i.stack=o,i.start=M)),e}),i.end!=null&&/^\)*$/.test(h.substr(i.end))&&(h=h.substring(0,i.start)+h.substr(i.end))}return h.charAt(0)!="^"&&(h="^"+h),h.charAt(h.length-1)!="$"&&(h+="$"),new RegExp(h,(n||"").replace("g",""))},c.prototype.getLineTokens=function(h,n){if(n&&typeof n!="string"){var o=n.slice(0);n=o[0],n==="#tmp"&&(o.shift(),n=o.shift())}else var o=[];var r=n||"start",i=this.states[r];i||(r="start",i=this.states[r]);var e=this.matchMappings[r],t=this.regExps[r];t.lastIndex=0;for(var a,g=[],m=0,M=0,O={type:null,value:""};a=t.exec(h);){var $=e.defaultToken,b=null,he=a[0],Te=t.lastIndex;if(Te-he.length>m){var de=h.substring(m,Te-he.length);O.type==$?O.value+=de:(O.type&&g.push(O),O={type:$,value:de})}for(var Y=0;Y<a.length-2;Y++)if(a[Y+1]!==void 0){b=i[e[Y]],b.onMatch?$=b.onMatch(he,r,o,h):$=b.token,b.next&&(typeof b.next=="string"?r=b.next:r=b.next(r,o),i=this.states[r],i||(this.reportError("state doesn't exist",r),r="start",i=this.states[r]),e=this.matchMappings[r],m=Te,t=this.regExps[r],t.lastIndex=Te),b.consumeLineEnd&&(m=Te);break}if(he){if(typeof $=="string")(!b||b.merge!==!1)&&O.type===$?O.value+=he:(O.type&&g.push(O),O={type:$,value:he});else if($){O.type&&g.push(O),O={type:null,value:""};for(var Y=0;Y<$.length;Y++)g.push($[Y])}}if(m==h.length)break;if(m=Te,M++>w){for(M>2*h.length&&this.reportError("infinite loop with in ace tokenizer",{startState:n,line:h});m<h.length;)O.type&&g.push(O),O={value:h.substring(m,m+=500),type:"overflow"};r="start",o=[];break}}return O.type&&g.push(O),o.length>1&&o[0]!==r&&o.unshift("#tmp",r),{tokens:g,state:o.length?o:r}},c}();A.prototype.reportError=x,v.Tokenizer=A}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(p,v,fe){var x=p("../lib/deep_copy").deepCopy,w;w=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(h,n){if(!n){for(var o in h)this.$rules[o]=h[o];return}for(var o in h){for(var r=h[o],i=0;i<r.length;i++){var e=r[i];(e.next||e.onMatch)&&(typeof e.next=="string"&&e.next.indexOf(n)!==0&&(e.next=n+e.next),e.nextState&&e.nextState.indexOf(n)!==0&&(e.nextState=n+e.nextState))}this.$rules[n+o]=r}},this.getRules=function(){return this.$rules},this.embedRules=function(h,n,o,r,i){var e=typeof h=="function"?new h().getRules():h;if(r)for(var t=0;t<r.length;t++)r[t]=n+r[t];else{r=[];for(var a in e)r.push(n+a)}if(this.addRules(e,n),o)for(var g=Array.prototype[i?"push":"unshift"],t=0;t<r.length;t++)g.apply(this.$rules[r[t]],x(o));this.$embeds||(this.$embeds=[]),this.$embeds.push(n)},this.getEmbeds=function(){return this.$embeds};var A=function(h,n){return(h!="start"||n.length)&&n.unshift(this.nextState,h),this.nextState},c=function(h,n){return n.shift(),n.shift()||"start"};this.normalizeRules=function(){var h=0,n=this.$rules;function o(r){var i=n[r];i.processed=!0;for(var e=0;e<i.length;e++){var t=i[e],a=null;Array.isArray(t)&&(a=t,t={}),!t.regex&&t.start&&(t.regex=t.start,t.next||(t.next=[]),t.next.push({defaultToken:t.token},{token:t.token+".end",regex:t.end||t.start,next:"pop"}),t.token=t.token+".start",t.push=!0);var g=t.next||t.push;if(g&&Array.isArray(g)){var m=t.stateName;m||(m=t.token,typeof m!="string"&&(m=m[0]||""),n[m]&&(m+=h++)),n[m]=g,t.next=m,o(m)}else g=="pop"&&(t.next=c);if(t.push&&(t.nextState=t.next||t.push,t.next=A,delete t.push),t.rules)for(var M in t.rules)n[M]?n[M].push&&n[M].push.apply(n[M],t.rules[M]):n[M]=t.rules[M];var O=typeof t=="string"?t:t.include;if(O&&(O==="$self"&&(O="start"),Array.isArray(O)?a=O.map(function(b){return n[b]}):a=n[O]),a){var $=[e,1].concat(a);t.noEscape&&($=$.filter(function(b){return!b.next})),i.splice.apply(i,$),e--}t.keywordMap&&(t.token=this.createKeywordMapper(t.keywordMap,t.defaultToken||"text",t.caseInsensitive),delete t.defaultToken)}}Object.keys(n).forEach(o,this)},this.createKeywordMapper=function(h,n,o,r){var i=Object.create(null);return this.$keywordList=[],Object.keys(h).forEach(function(e){for(var t=h[e],a=t.split(r||"|"),g=a.length;g--;){var m=a[g];this.$keywordList.push(m),o&&(m=m.toLowerCase()),i[m]=e}},this),h=null,o?function(e){return i[e.toLowerCase()]||n}:function(e){return i[e]||n}},this.getKeywords=function(){return this.$keywords}}).call(w.prototype),v.TextHighlightRules=w}),ace.define("ace/mode/behaviour",["require","exports","module"],function(p,v,fe){var x;x=function(){this.$behaviours={}},(function(){this.add=function(w,A,c){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[w]:this.$behaviours[w]={}}this.$behaviours[w][A]=c},this.addBehaviours=function(w){for(var A in w)for(var c in w[A])this.add(A,c,w[A][c])},this.remove=function(w){this.$behaviours&&this.$behaviours[w]&&delete this.$behaviours[w]},this.inherit=function(w,A){if(typeof w=="function")var c=new w().getBehaviours(A);else var c=w.getBehaviours(A);this.addBehaviours(c)},this.getBehaviours=function(w){if(w){for(var A={},c=0;c<w.length;c++)this.$behaviours[w[c]]&&(A[w[c]]=this.$behaviours[w[c]]);return A}else return this.$behaviours}}).call(x.prototype),v.Behaviour=x}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(p,v,fe){var x=p("./range").Range,w=function(){function A(c,h,n){this.$session=c,this.$row=h,this.$rowTokens=c.getTokens(h);var o=c.getTokenAt(h,n);this.$tokenIndex=o?o.index:-1}return A.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]},A.prototype.stepForward=function(){this.$tokenIndex+=1;for(var c;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,c||(c=this.$session.getLength()),this.$row>=c)return this.$row=c-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},A.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},A.prototype.getCurrentTokenRow=function(){return this.$row},A.prototype.getCurrentTokenColumn=function(){var c=this.$rowTokens,h=this.$tokenIndex,n=c[h].start;if(n!==void 0)return n;for(n=0;h>0;)h-=1,n+=c[h].value.length;return n},A.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},A.prototype.getCurrentTokenRange=function(){var c=this.$rowTokens[this.$tokenIndex],h=this.getCurrentTokenColumn();return new x(this.$row,h,this.$row,h+c.value.length)},A}();v.TokenIterator=w}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(p,v,fe){var x=p("../../lib/oop"),w=p("../behaviour").Behaviour,A=p("../../token_iterator").TokenIterator,c=p("../../lib/lang"),h=["text","paren.rparen","rparen","paren","punctuation.operator"],n=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],o,r={},i={'"':'"',"'":"'"},e=function(g){var m=-1;if(g.multiSelect&&(m=g.selection.index,r.rangeCount!=g.multiSelect.rangeCount&&(r={rangeCount:g.multiSelect.rangeCount})),r[m])return o=r[m];o=r[m]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},t=function(g,m,M,O){var $=g.end.row-g.start.row;return{text:M+m+O,selection:[0,g.start.column+1,$,g.end.column+($?0:1)]}},a;a=function(g){g=g||{},this.add("braces","insertion",function(m,M,O,$,b){var he=O.getCursorPosition(),Te=$.doc.getLine(he.row);if(b=="{"){e(O);var de=O.getSelectionRange(),Y=$.doc.getTextRange(de),gt=$.getTokenAt(he.row,he.column);if(Y!==""&&Y!=="{"&&O.getWrapBehavioursEnabled())return t(de,Y,"{","}");if(gt&&/(?:string)\.quasi|\.xml/.test(gt.type)){var U=[/tag\-(?:open|name)/,/attribute\-name/];return U.some(function(Je){return Je.test(gt.type)})||/(string)\.quasi/.test(gt.type)&&gt.value[he.column-gt.start-1]!=="$"?void 0:(a.recordAutoInsert(O,$,"}"),{text:"{}",selection:[1,1]})}else if(a.isSaneInsertion(O,$))return/[\]\}\)]/.test(Te[he.column])||O.inMultiSelectMode||g.braces?(a.recordAutoInsert(O,$,"}"),{text:"{}",selection:[1,1]}):(a.recordMaybeInsert(O,$,"{"),{text:"{",selection:[1,1]})}else if(b=="}"){e(O);var V=Te.substring(he.column,he.column+1);if(V=="}"){var C=$.$findOpeningBracket("}",{column:he.column+1,row:he.row});if(C!==null&&a.isAutoInsertedClosing(he,Te,b))return a.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(b==`
183
+ `||b==`\r
184
+ `){e(O);var y="";a.isMaybeInsertedClosing(he,Te)&&(y=c.stringRepeat("}",o.maybeInsertedBrackets),a.clearMaybeInsertedClosing());var V=Te.substring(he.column,he.column+1);if(V==="}"){var T=$.findMatchingBracket({row:he.row,column:he.column+1},"}");if(!T)return null;var ke=this.$getIndent($.getLine(T.row))}else if(y)var ke=this.$getIndent(Te);else{a.clearMaybeInsertedClosing();return}var Qe=ke+$.getTabString();return{text:`
185
+ `+Qe+`
186
+ `+ke+y,selection:[1,Qe.length,1,Qe.length]}}else a.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(m,M,O,$,b){var he=$.doc.getTextRange(b);if(!b.isMultiLine()&&he=="{"){e(O);var Te=$.doc.getLine(b.start.row),de=Te.substring(b.end.column,b.end.column+1);if(de=="}")return b.end.column++,b;o.maybeInsertedBrackets--}}),this.add("parens","insertion",function(m,M,O,$,b){if(b=="("){e(O);var he=O.getSelectionRange(),Te=$.doc.getTextRange(he);if(Te!==""&&O.getWrapBehavioursEnabled())return t(he,Te,"(",")");if(a.isSaneInsertion(O,$))return a.recordAutoInsert(O,$,")"),{text:"()",selection:[1,1]}}else if(b==")"){e(O);var de=O.getCursorPosition(),Y=$.doc.getLine(de.row),gt=Y.substring(de.column,de.column+1);if(gt==")"){var U=$.$findOpeningBracket(")",{column:de.column+1,row:de.row});if(U!==null&&a.isAutoInsertedClosing(de,Y,b))return a.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(m,M,O,$,b){var he=$.doc.getTextRange(b);if(!b.isMultiLine()&&he=="("){e(O);var Te=$.doc.getLine(b.start.row),de=Te.substring(b.start.column+1,b.start.column+2);if(de==")")return b.end.column++,b}}),this.add("brackets","insertion",function(m,M,O,$,b){if(b=="["){e(O);var he=O.getSelectionRange(),Te=$.doc.getTextRange(he);if(Te!==""&&O.getWrapBehavioursEnabled())return t(he,Te,"[","]");if(a.isSaneInsertion(O,$))return a.recordAutoInsert(O,$,"]"),{text:"[]",selection:[1,1]}}else if(b=="]"){e(O);var de=O.getCursorPosition(),Y=$.doc.getLine(de.row),gt=Y.substring(de.column,de.column+1);if(gt=="]"){var U=$.$findOpeningBracket("]",{column:de.column+1,row:de.row});if(U!==null&&a.isAutoInsertedClosing(de,Y,b))return a.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(m,M,O,$,b){var he=$.doc.getTextRange(b);if(!b.isMultiLine()&&he=="["){e(O);var Te=$.doc.getLine(b.start.row),de=Te.substring(b.start.column+1,b.start.column+2);if(de=="]")return b.end.column++,b}}),this.add("string_dquotes","insertion",function(m,M,O,$,b){var he=$.$mode.$quotes||i;if(b.length==1&&he[b]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(b)!=-1)return;e(O);var Te=b,de=O.getSelectionRange(),Y=$.doc.getTextRange(de);if(Y!==""&&(Y.length!=1||!he[Y])&&O.getWrapBehavioursEnabled())return t(de,Y,Te,Te);if(!Y){var gt=O.getCursorPosition(),U=$.doc.getLine(gt.row),V=U.substring(gt.column-1,gt.column),C=U.substring(gt.column,gt.column+1),y=$.getTokenAt(gt.row,gt.column),T=$.getTokenAt(gt.row,gt.column+1);if(V=="\\"&&y&&/escape/.test(y.type))return null;var ke=y&&/string|escape/.test(y.type),Qe=!T||/string|escape/.test(T.type),Je;if(C==Te)Je=ke!==Qe,Je&&/string\.end/.test(T.type)&&(Je=!1);else{if(ke&&!Qe||ke&&Qe)return null;var mt=$.$mode.tokenRe;mt.lastIndex=0;var yt=mt.test(V);mt.lastIndex=0;var Qt=mt.test(C),bt=$.$mode.$pairQuotesAfter,Gt=bt&&bt[Te]&&bt[Te].test(V);if(!Gt&&yt||Qt||C&&!/[\s;,.})\]\\]/.test(C))return null;var Yt=U[gt.column-2];if(V==Te&&(Yt==Te||mt.test(Yt)))return null;Je=!0}return{text:Je?Te+Te:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(m,M,O,$,b){var he=$.$mode.$quotes||i,Te=$.doc.getTextRange(b);if(!b.isMultiLine()&&he.hasOwnProperty(Te)){e(O);var de=$.doc.getLine(b.start.row),Y=de.substring(b.start.column+1,b.start.column+2);if(Y==Te)return b.end.column++,b}}),g.closeDocComment!==!1&&this.add("doc comment end","insertion",function(m,M,O,$,b){if(m==="doc-start"&&(b===`
187
+ `||b===`\r
188
+ `)&&O.selection.isEmpty()){var he=O.getCursorPosition();if(he.column===0)return;for(var Te=$.doc.getLine(he.row),de=$.doc.getLine(he.row+1),Y=$.getTokens(he.row),gt=0,U=0;U<Y.length;U++){gt+=Y[U].value.length;var V=Y[U];if(gt>=he.column){if(gt===he.column){if(!/\.doc/.test(V.type))return;if(/\*\//.test(V.value)){var C=Y[U+1];if(!C||!/\.doc/.test(C.type))return}}var y=he.column-(gt-V.value.length),T=V.value.indexOf("*/"),ke=V.value.indexOf("/**",T>-1?T+2:0);if(ke!==-1&&y>ke&&y<ke+3||T!==-1&&ke!==-1&&y>=T&&y<=ke||!/\.doc/.test(V.type))return;break}}var Qe=this.$getIndent(Te);if(/\s*\*/.test(de))return/^\s*\*/.test(Te)?{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(Te.substring(0,he.column)))return{text:b+Qe+" * "+b+" "+Qe+"*/",selection:[1,4+Qe.length,1,4+Qe.length]}}})},a.isSaneInsertion=function(g,m){var M=g.getCursorPosition(),O=new A(m,M.row,M.column);if(!this.$matchTokenType(O.getCurrentToken()||"text",h)){if(/[)}\]]/.test(g.session.getLine(M.row)[M.column]))return!0;var $=new A(m,M.row,M.column+1);if(!this.$matchTokenType($.getCurrentToken()||"text",h))return!1}return O.stepForward(),O.getCurrentTokenRow()!==M.row||this.$matchTokenType(O.getCurrentToken()||"text",n)},a.$matchTokenType=function(g,m){return m.indexOf(g.type||g)>-1},a.recordAutoInsert=function(g,m,M){var O=g.getCursorPosition(),$=m.doc.getLine(O.row);this.isAutoInsertedClosing(O,$,o.autoInsertedLineEnd[0])||(o.autoInsertedBrackets=0),o.autoInsertedRow=O.row,o.autoInsertedLineEnd=M+$.substr(O.column),o.autoInsertedBrackets++},a.recordMaybeInsert=function(g,m,M){var O=g.getCursorPosition(),$=m.doc.getLine(O.row);this.isMaybeInsertedClosing(O,$)||(o.maybeInsertedBrackets=0),o.maybeInsertedRow=O.row,o.maybeInsertedLineStart=$.substr(0,O.column)+M,o.maybeInsertedLineEnd=$.substr(O.column),o.maybeInsertedBrackets++},a.isAutoInsertedClosing=function(g,m,M){return o.autoInsertedBrackets>0&&g.row===o.autoInsertedRow&&M===o.autoInsertedLineEnd[0]&&m.substr(g.column)===o.autoInsertedLineEnd},a.isMaybeInsertedClosing=function(g,m){return o.maybeInsertedBrackets>0&&g.row===o.maybeInsertedRow&&m.substr(g.column)===o.maybeInsertedLineEnd&&m.substr(0,g.column)==o.maybeInsertedLineStart},a.popAutoInsertedClosing=function(){o.autoInsertedLineEnd=o.autoInsertedLineEnd.substr(1),o.autoInsertedBrackets--},a.clearMaybeInsertedClosing=function(){o&&(o.maybeInsertedBrackets=0,o.maybeInsertedRow=-1)},x.inherits(a,w),v.CstyleBehaviour=a}),ace.define("ace/unicode",["require","exports","module"],function(p,v,fe){for(var x=[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],w=0,A=[],c=0;c<x.length;c+=2)A.push(w+=x[c]),x[c+1]&&A.push(45,w+=x[c+1]);v.wordChars=String.fromCharCode.apply(null,A)}),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(p,v,fe){var x=p("../config"),w=p("../tokenizer").Tokenizer,A=p("./text_highlight_rules").TextHighlightRules,c=p("./behaviour/cstyle").CstyleBehaviour,h=p("../unicode"),n=p("../lib/lang"),o=p("../token_iterator").TokenIterator,r=p("../range").Range,i;i=function(){this.HighlightRules=A},(function(){this.$defaultBehaviour=new c,this.tokenRe=new RegExp("^["+h.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+h.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new w(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,a,g){var m=t.doc,M=!0,O=!0,$=1/0,b=t.getTabSize(),he=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var Y=this.lineCommentStart.map(n.escapeRegExp).join("|"),Te=this.lineCommentStart[0];else var Y=n.escapeRegExp(this.lineCommentStart),Te=this.lineCommentStart;Y=new RegExp("^(\\s*)(?:"+Y+") ?"),he=t.getUseSoftTabs();var V=function(Qt,bt){var Gt=Qt.match(Y);if(Gt){var Yt=Gt[1].length,Zt=Gt[0].length;!T(Qt,Yt,Zt)&&Gt[0][Zt-1]==" "&&Zt--,m.removeInLine(bt,Yt,Zt)}},y=Te+" ",U=function(Qt,bt){(!M||/\S/.test(Qt))&&(T(Qt,$,$)?m.insertInLine({row:bt,column:$},y):m.insertInLine({row:bt,column:$},Te))},C=function(Qt,bt){return Y.test(Qt)},T=function(Qt,bt,Gt){for(var Yt=0;bt--&&Qt.charAt(bt)==" ";)Yt++;if(Yt%b!=0)return!1;for(var Yt=0;Qt.charAt(Gt++)==" ";)Yt++;return b>2?Yt%b!=b-1:Yt%b==0}}else{if(!this.blockComment)return!1;var Te=this.blockComment.start,de=this.blockComment.end,Y=new RegExp("^(\\s*)(?:"+n.escapeRegExp(Te)+")"),gt=new RegExp("(?:"+n.escapeRegExp(de)+")\\s*$"),U=function(Je,mt){C(Je,mt)||(!M||/\S/.test(Je))&&(m.insertInLine({row:mt,column:Je.length},de),m.insertInLine({row:mt,column:$},Te))},V=function(Je,mt){var yt;(yt=Je.match(gt))&&m.removeInLine(mt,Je.length-yt[0].length,Je.length),(yt=Je.match(Y))&&m.removeInLine(mt,yt[1].length,yt[0].length)},C=function(Je,mt){if(Y.test(Je))return!0;for(var yt=t.getTokens(mt),Qt=0;Qt<yt.length;Qt++)if(yt[Qt].type==="comment")return!0}}function ke(Je){for(var mt=a;mt<=g;mt++)Je(m.getLine(mt),mt)}var Qe=1/0;ke(function(Je,mt){var yt=Je.search(/\S/);yt!==-1?(yt<$&&($=yt),O&&!C(Je,mt)&&(O=!1)):Qe>Je.length&&(Qe=Je.length)}),$==1/0&&($=Qe,M=!1,O=!1),he&&$%b!=0&&($=Math.floor($/b)*b),ke(O?V:U)},this.toggleBlockComment=function(e,t,a,g){var m=this.blockComment;if(m){!m.start&&m[0]&&(m=m[0]);var M=new o(t,g.row,g.column),O=M.getCurrentToken();t.selection;var $=t.selection.toOrientedRange(),b,he;if(O&&/comment/.test(O.type)){for(var Te,de;O&&/comment/.test(O.type);){var Y=O.value.indexOf(m.start);if(Y!=-1){var gt=M.getCurrentTokenRow(),U=M.getCurrentTokenColumn()+Y;Te=new r(gt,U,gt,U+m.start.length);break}O=M.stepBackward()}for(var M=new o(t,g.row,g.column),O=M.getCurrentToken();O&&/comment/.test(O.type);){var Y=O.value.indexOf(m.end);if(Y!=-1){var gt=M.getCurrentTokenRow(),U=M.getCurrentTokenColumn()+Y;de=new r(gt,U,gt,U+m.end.length);break}O=M.stepForward()}de&&t.remove(de),Te&&(t.remove(Te),b=Te.start.row,he=-m.start.length)}else he=m.start.length,b=a.start.row,t.insert(a.end,m.end),t.insert(a.start,m.start);$.start.row==b&&($.start.column+=he),$.end.row==b&&($.end.column+=he),t.selection.fromOrientedRange($)}},this.getNextLineIndent=function(e,t,a){return this.$getIndent(t)},this.checkOutdent=function(e,t,a){return!1},this.autoOutdent=function(e,t,a){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){this.$embeds=[],this.$modes={};for(var t in e)if(e[t]){var a=e[t],g=a.prototype.$id,m=x.$modes[g];m||(x.$modes[g]=m=new a),x.$modes[t]||(x.$modes[t]=m),this.$embeds.push(t),this.$modes[t]=m}for(var M=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],O=function(b){(function(he){var Te=M[b],de=he[Te];he[M[b]]=function(){return this.$delegator(Te,arguments,de)}})($)},$=this,t=0;t<M.length;t++)O(t)},this.$delegator=function(e,t,a){var g=t[0]||"start";if(typeof g!="string"){if(Array.isArray(g[2])){var m=g[2][g[2].length-1],M=this.$modes[m];if(M)return M[e].apply(M,[g[1]].concat([].slice.call(t,1)))}g=g[0]||"start"}for(var O=0;O<this.$embeds.length;O++)if(this.$modes[this.$embeds[O]]){var $=g.split(this.$embeds[O]);if(!$[0]&&$[1]){t[0]=$[1];var M=this.$modes[this.$embeds[O]];return M[e].apply(M,t)}}var b=a.apply(this,t);return a?b:void 0},this.transformAction=function(e,t,a,g,m){if(this.$behaviour){var M=this.$behaviour.getBehaviours();for(var O in M)if(M[O][t]){var $=M[O][t].apply(this,arguments);if($)return $}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,a=[];for(var g in t)for(var m=t[g],M=0,O=m.length;M<O;M++)if(typeof m[M].token=="string")/keyword|support|storage/.test(m[M].token)&&a.push(m[M].regex);else if(typeof m[M].token=="object"){for(var $=0,b=m[M].token.length;$<b;$++)if(/keyword|support|storage/.test(m[M].token[$])){var g=m[M].regex.match(/\(.+?\)/g)[$];a.push(g.substr(1,g.length-2))}}this.completionKeywords=a}return e?a.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,a,g){var m=this.$keywordList||this.$createKeywordList();return m.map(function(M){return{name:M,value:M,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(i.prototype),v.Mode=i}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(p,v,fe){var x=p("./lib/dom"),w=function(){function A(c){this.session=c,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return A.prototype.getRowLength=function(c){var h;return this.lineWidgets?h=this.lineWidgets[c]&&this.lineWidgets[c].rowCount||0:h=0,!this.$useWrapMode||!this.$wrapData[c]?1+h:this.$wrapData[c].length+1+h},A.prototype.$getWidgetScreenLength=function(){var c=0;return this.lineWidgets.forEach(function(h){h&&h.rowCount&&!h.hidden&&(c+=h.rowCount)}),c},A.prototype.$onChangeEditor=function(c){this.attach(c.editor)},A.prototype.attach=function(c){c&&c.widgetManager&&c.widgetManager!=this&&c.widgetManager.detach(),this.editor!=c&&(this.detach(),this.editor=c,c&&(c.widgetManager=this,c.renderer.on("beforeRender",this.measureWidgets),c.renderer.on("afterRender",this.renderWidgets)))},A.prototype.detach=function(c){var h=this.editor;if(h){this.editor=null,h.widgetManager=null,h.renderer.off("beforeRender",this.measureWidgets),h.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach(function(o){o&&o.el&&o.el.parentNode&&(o._inDocument=!1,o.el.parentNode.removeChild(o.el))})}},A.prototype.updateOnFold=function(c,h){var n=h.lineWidgets;if(!(!n||!c.action)){for(var o=c.data,r=o.start.row,i=o.end.row,e=c.action=="add",t=r+1;t<i;t++)n[t]&&(n[t].hidden=e);n[i]&&(e?n[r]?n[i].hidden=e:n[r]=n[i]:(n[r]==n[i]&&(n[r]=void 0),n[i].hidden=e))}},A.prototype.updateOnChange=function(c){var h=this.session.lineWidgets;if(h){var n=c.start.row,o=c.end.row-n;if(o!==0)if(c.action=="remove"){var r=h.splice(n+1,o);!h[n]&&r[r.length-1]&&(h[n]=r.pop()),r.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var i=new Array(o);h[n]&&h[n].column!=null&&c.start.column>h[n].column&&n++,i.unshift(n,0),h.splice.apply(h,i),this.$updateRows()}}},A.prototype.$updateRows=function(){var c=this.session.lineWidgets;if(c){var h=!0;c.forEach(function(n,o){if(n)for(h=!1,n.row=o;n.$oldWidget;)n.$oldWidget.row=o,n=n.$oldWidget}),h&&(this.session.lineWidgets=null)}},A.prototype.$registerLineWidget=function(c){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var h=this.session.lineWidgets[c.row];return h&&(c.$oldWidget=h,h.el&&h.el.parentNode&&(h.el.parentNode.removeChild(h.el),h._inDocument=!1)),this.session.lineWidgets[c.row]=c,c},A.prototype.addLineWidget=function(c){if(this.$registerLineWidget(c),c.session=this.session,!this.editor)return c;var h=this.editor.renderer;c.html&&!c.el&&(c.el=x.createElement("div"),c.el.innerHTML=c.html),c.text&&!c.el&&(c.el=x.createElement("div"),c.el.textContent=c.text),c.el&&(x.addCssClass(c.el,"ace_lineWidgetContainer"),c.className&&x.addCssClass(c.el,c.className),c.el.style.position="absolute",c.el.style.zIndex="5",h.container.appendChild(c.el),c._inDocument=!0,c.coverGutter||(c.el.style.zIndex="3"),c.pixelHeight==null&&(c.pixelHeight=c.el.offsetHeight)),c.rowCount==null&&(c.rowCount=c.pixelHeight/h.layerConfig.lineHeight);var n=this.session.getFoldAt(c.row,0);if(c.$fold=n,n){var o=this.session.lineWidgets;c.row==n.end.row&&!o[n.start.row]?o[n.start.row]=c:c.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:c.row}}}),this.$updateRows(),this.renderWidgets(null,h),this.onWidgetChanged(c),c},A.prototype.removeLineWidget=function(c){if(c._inDocument=!1,c.session=null,c.el&&c.el.parentNode&&c.el.parentNode.removeChild(c.el),c.editor&&c.editor.destroy)try{c.editor.destroy()}catch{}if(this.session.lineWidgets){var h=this.session.lineWidgets[c.row];if(h==c)this.session.lineWidgets[c.row]=c.$oldWidget,c.$oldWidget&&this.onWidgetChanged(c.$oldWidget);else for(;h;){if(h.$oldWidget==c){h.$oldWidget=c.$oldWidget;break}h=h.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:c.row}}}),this.$updateRows()},A.prototype.getWidgetsAtRow=function(c){for(var h=this.session.lineWidgets,n=h&&h[c],o=[];n;)o.push(n),n=n.$oldWidget;return o},A.prototype.onWidgetChanged=function(c){this.session._changedWidgets.push(c),this.editor&&this.editor.renderer.updateFull()},A.prototype.measureWidgets=function(c,h){var n=this.session._changedWidgets,o=h.layerConfig;if(!(!n||!n.length)){for(var r=1/0,i=0;i<n.length;i++){var e=n[i];if(!(!e||!e.el)&&e.session==this.session){if(!e._inDocument){if(this.session.lineWidgets[e.row]!=e)continue;e._inDocument=!0,h.container.appendChild(e.el)}e.h=e.el.offsetHeight,e.fixedWidth||(e.w=e.el.offsetWidth,e.screenWidth=Math.ceil(e.w/o.characterWidth));var t=e.h/o.lineHeight;e.coverLine&&(t-=this.session.getRowLineCount(e.row),t<0&&(t=0)),e.rowCount!=t&&(e.rowCount=t,e.row<r&&(r=e.row))}}r!=1/0&&(this.session._emit("changeFold",{data:{start:{row:r}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},A.prototype.renderWidgets=function(c,h){var n=h.layerConfig,o=this.session.lineWidgets;if(o){for(var r=Math.min(this.firstRow,n.firstRow),i=Math.max(this.lastRow,n.lastRow,o.length);r>0&&!o[r];)r--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,h.$cursorLayer.config=n;for(var e=r;e<=i;e++){var t=o[e];if(!(!t||!t.el)){if(t.hidden){t.el.style.top=-100-(t.pixelHeight||0)+"px";continue}t._inDocument||(t._inDocument=!0,h.container.appendChild(t.el));var a=h.$cursorLayer.getPixelPosition({row:e,column:0},!0).top;t.coverLine||(a+=n.lineHeight*this.session.getRowLineCount(t.row)),t.el.style.top=a-n.offset+"px";var g=t.coverGutter?0:h.gutterWidth;t.fixedWidth||(g-=h.scrollLeft),t.el.style.left=g+"px",t.fullWidth&&t.screenWidth&&(t.el.style.minWidth=n.width+2*n.padding+"px"),t.fixedWidth?t.el.style.right=h.scrollBar.getWidth()+"px":t.el.style.right=""}}}},A}();v.LineWidgets=w}),ace.define("ace/apply_delta",["require","exports","module"],function(p,v,fe){v.applyDelta=function(x,w,A){var c=w.start.row,h=w.start.column,n=x[c]||"";switch(w.action){case"insert":var o=w.lines;if(o.length===1)x[c]=n.substring(0,h)+w.lines[0]+n.substring(h);else{var r=[c,1].concat(w.lines);x.splice.apply(x,r),x[c]=n.substring(0,h)+x[c],x[c+w.lines.length-1]+=n.substring(h)}break;case"remove":var i=w.end.column,e=w.end.row;c===e?x[c]=n.substring(0,h)+n.substring(i):x.splice(c,e-c+1,n.substring(0,h)+x[e].substring(i));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(p,v,fe){var x=p("./lib/oop"),w=p("./lib/event_emitter").EventEmitter,A=function(){function n(o,r,i){this.$onChange=this.onChange.bind(this),this.attach(o),typeof r!="number"?this.setPosition(r.row,r.column):this.setPosition(r,i)}return n.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},n.prototype.getDocument=function(){return this.document},n.prototype.onChange=function(o){if(!(o.start.row==o.end.row&&o.start.row!=this.row)&&!(o.start.row>this.row)){var r=h(o,{row:this.row,column:this.column},this.$insertRight);this.setPosition(r.row,r.column,!0)}},n.prototype.setPosition=function(o,r,i){var e;if(i?e={row:o,column:r}:e=this.$clipPositionToDocument(o,r),!(this.row==e.row&&this.column==e.column)){var t={row:this.row,column:this.column};this.row=e.row,this.column=e.column,this._signal("change",{old:t,value:e})}},n.prototype.detach=function(){this.document.off("change",this.$onChange)},n.prototype.attach=function(o){this.document=o||this.document,this.document.on("change",this.$onChange)},n.prototype.$clipPositionToDocument=function(o,r){var i={};return o>=this.document.getLength()?(i.row=Math.max(0,this.document.getLength()-1),i.column=this.document.getLine(i.row).length):o<0?(i.row=0,i.column=0):(i.row=o,i.column=Math.min(this.document.getLine(i.row).length,Math.max(0,r))),r<0&&(i.column=0),i},n}();A.prototype.$insertRight=!1,x.implement(A.prototype,w);function c(n,o,r){var i=r?n.column<=o.column:n.column<o.column;return n.row<o.row||n.row==o.row&&i}function h(n,o,r){var i=n.action=="insert",e=(i?1:-1)*(n.end.row-n.start.row),t=(i?1:-1)*(n.end.column-n.start.column),a=n.start,g=i?a:n.end;return c(o,a,r)?{row:o.row,column:o.column}:c(g,o,!r)?{row:o.row+e,column:o.column+(o.row==g.row?t:0)}:{row:a.row,column:a.column}}v.Anchor=A}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(p,v,fe){var x=p("./lib/oop"),w=p("./apply_delta").applyDelta,A=p("./lib/event_emitter").EventEmitter,c=p("./range").Range,h=p("./anchor").Anchor,n=function(){function o(r){this.$lines=[""],r.length===0?this.$lines=[""]:Array.isArray(r)?this.insertMergedLines({row:0,column:0},r):this.insert({row:0,column:0},r)}return o.prototype.setValue=function(r){var i=this.getLength()-1;this.remove(new c(0,0,i,this.getLine(i).length)),this.insert({row:0,column:0},r||"")},o.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},o.prototype.createAnchor=function(r,i){return new h(this,r,i)},o.prototype.$detectNewLine=function(r){var i=r.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=i?i[1]:`
189
+ `,this._signal("changeNewLineMode")},o.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
190
+ `;case"unix":return`
191
+ `;default:return this.$autoNewLine||`
192
+ `}},o.prototype.setNewLineMode=function(r){this.$newLineMode!==r&&(this.$newLineMode=r,this._signal("changeNewLineMode"))},o.prototype.getNewLineMode=function(){return this.$newLineMode},o.prototype.isNewLine=function(r){return r==`\r
193
+ `||r=="\r"||r==`
194
+ `},o.prototype.getLine=function(r){return this.$lines[r]||""},o.prototype.getLines=function(r,i){return this.$lines.slice(r,i+1)},o.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},o.prototype.getLength=function(){return this.$lines.length},o.prototype.getTextRange=function(r){return this.getLinesForRange(r).join(this.getNewLineCharacter())},o.prototype.getLinesForRange=function(r){var i;if(r.start.row===r.end.row)i=[this.getLine(r.start.row).substring(r.start.column,r.end.column)];else{i=this.getLines(r.start.row,r.end.row),i[0]=(i[0]||"").substring(r.start.column);var e=i.length-1;r.end.row-r.start.row==e&&(i[e]=i[e].substring(0,r.end.column))}return i},o.prototype.insertLines=function(r,i){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(r,i)},o.prototype.removeLines=function(r,i){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(r,i)},o.prototype.insertNewLine=function(r){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(r,["",""])},o.prototype.insert=function(r,i){return this.getLength()<=1&&this.$detectNewLine(i),this.insertMergedLines(r,this.$split(i))},o.prototype.insertInLine=function(r,i){var e=this.clippedPos(r.row,r.column),t=this.pos(r.row,r.column+i.length);return this.applyDelta({start:e,end:t,action:"insert",lines:[i]},!0),this.clonePos(t)},o.prototype.clippedPos=function(r,i){var e=this.getLength();r===void 0?r=e:r<0?r=0:r>=e&&(r=e-1,i=void 0);var t=this.getLine(r);return i==null&&(i=t.length),i=Math.min(Math.max(i,0),t.length),{row:r,column:i}},o.prototype.clonePos=function(r){return{row:r.row,column:r.column}},o.prototype.pos=function(r,i){return{row:r,column:i}},o.prototype.$clipPosition=function(r){var i=this.getLength();return r.row>=i?(r.row=Math.max(0,i-1),r.column=this.getLine(i-1).length):(r.row=Math.max(0,r.row),r.column=Math.min(Math.max(r.column,0),this.getLine(r.row).length)),r},o.prototype.insertFullLines=function(r,i){r=Math.min(Math.max(r,0),this.getLength());var e=0;r<this.getLength()?(i=i.concat([""]),e=0):(i=[""].concat(i),r--,e=this.$lines[r].length),this.insertMergedLines({row:r,column:e},i)},o.prototype.insertMergedLines=function(r,i){var e=this.clippedPos(r.row,r.column),t={row:e.row+i.length-1,column:(i.length==1?e.column:0)+i[i.length-1].length};return this.applyDelta({start:e,end:t,action:"insert",lines:i}),this.clonePos(t)},o.prototype.remove=function(r){var i=this.clippedPos(r.start.row,r.start.column),e=this.clippedPos(r.end.row,r.end.column);return this.applyDelta({start:i,end:e,action:"remove",lines:this.getLinesForRange({start:i,end:e})}),this.clonePos(i)},o.prototype.removeInLine=function(r,i,e){var t=this.clippedPos(r,i),a=this.clippedPos(r,e);return this.applyDelta({start:t,end:a,action:"remove",lines:this.getLinesForRange({start:t,end:a})},!0),this.clonePos(t)},o.prototype.removeFullLines=function(r,i){r=Math.min(Math.max(0,r),this.getLength()-1),i=Math.min(Math.max(0,i),this.getLength()-1);var e=i==this.getLength()-1&&r>0,t=i<this.getLength()-1,a=e?r-1:r,g=e?this.getLine(a).length:0,m=t?i+1:i,M=t?0:this.getLine(m).length,O=new c(a,g,m,M),$=this.$lines.slice(r,i+1);return this.applyDelta({start:O.start,end:O.end,action:"remove",lines:this.getLinesForRange(O)}),$},o.prototype.removeNewLine=function(r){r<this.getLength()-1&&r>=0&&this.applyDelta({start:this.pos(r,this.getLine(r).length),end:this.pos(r+1,0),action:"remove",lines:["",""]})},o.prototype.replace=function(r,i){if(r instanceof c||(r=c.fromPoints(r.start,r.end)),i.length===0&&r.isEmpty())return r.start;if(i==this.getTextRange(r))return r.end;this.remove(r);var e;return i?e=this.insert(r.start,i):e=r.start,e},o.prototype.applyDeltas=function(r){for(var i=0;i<r.length;i++)this.applyDelta(r[i])},o.prototype.revertDeltas=function(r){for(var i=r.length-1;i>=0;i--)this.revertDelta(r[i])},o.prototype.applyDelta=function(r,i){var e=r.action=="insert";(e?r.lines.length<=1&&!r.lines[0]:!c.comparePoints(r.start,r.end))||(e&&r.lines.length>2e4?this.$splitAndapplyLargeDelta(r,2e4):(w(this.$lines,r,i),this._signal("change",r)))},o.prototype.$safeApplyDelta=function(r){var i=this.$lines.length;(r.action=="remove"&&r.start.row<i&&r.end.row<i||r.action=="insert"&&r.start.row<=i)&&this.applyDelta(r)},o.prototype.$splitAndapplyLargeDelta=function(r,i){for(var e=r.lines,t=e.length-i+1,a=r.start.row,g=r.start.column,m=0,M=0;m<t;m=M){M+=i-1;var O=e.slice(m,M);O.push(""),this.applyDelta({start:this.pos(a+m,g),end:this.pos(a+M,g=0),action:r.action,lines:O},!0)}r.lines=e.slice(m),r.start.row=a+m,r.start.column=g,this.applyDelta(r,!0)},o.prototype.revertDelta=function(r){this.$safeApplyDelta({start:this.clonePos(r.start),end:this.clonePos(r.end),action:r.action=="insert"?"remove":"insert",lines:r.lines.slice()})},o.prototype.indexToPosition=function(r,i){for(var e=this.$lines||this.getAllLines(),t=this.getNewLineCharacter().length,a=i||0,g=e.length;a<g;a++)if(r-=e[a].length+t,r<0)return{row:a,column:r+e[a].length+t};return{row:g-1,column:r+e[g-1].length+t}},o.prototype.positionToIndex=function(r,i){for(var e=this.$lines||this.getAllLines(),t=this.getNewLineCharacter().length,a=0,g=Math.min(r.row,e.length),m=i||0;m<g;++m)a+=e[m].length+t;return a+r.column},o.prototype.$split=function(r){return r.split(/\r\n|\r|\n/)},o}();n.prototype.$autoNewLine="",n.prototype.$newLineMode="auto",x.implement(n.prototype,A),v.Document=n}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(p,v,fe){var x=p("./lib/oop"),w=p("./lib/event_emitter").EventEmitter,A=function(){function c(h,n){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=h;var o=this;this.$worker=function(){if(o.running){for(var r=new Date,i=o.currentLine,e=-1,t=o.doc,a=i;o.lines[i];)i++;var g=t.getLength(),m=0;for(o.running=!1;i<g;){o.$tokenizeRow(i),e=i;do i++;while(o.lines[i]);if(m++,m%5===0&&new Date-r>20){o.running=setTimeout(o.$worker,20);break}}o.currentLine=i,e==-1&&(e=i),a<=e&&o.fireUpdateEvent(a,e)}}}return c.prototype.setTokenizer=function(h){this.tokenizer=h,this.lines=[],this.states=[],this.start(0)},c.prototype.setDocument=function(h){this.doc=h,this.lines=[],this.states=[],this.stop()},c.prototype.fireUpdateEvent=function(h,n){var o={first:h,last:n};this._signal("update",{data:o})},c.prototype.start=function(h){this.currentLine=Math.min(h||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},c.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},c.prototype.$updateOnChange=function(h){var n=h.start.row,o=h.end.row-n;if(o===0)this.lines[n]=null;else if(h.action=="remove")this.lines.splice(n,o+1,null),this.states.splice(n,o+1,null);else{var r=Array(o+1);r.unshift(n,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(n,this.currentLine,this.doc.getLength()),this.stop()},c.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},c.prototype.getTokens=function(h){return this.lines[h]||this.$tokenizeRow(h)},c.prototype.getState=function(h){return this.currentLine==h&&this.$tokenizeRow(h),this.states[h]||"start"},c.prototype.$tokenizeRow=function(h){var n=this.doc.getLine(h),o=this.states[h-1],r=this.tokenizer.getLineTokens(n,o,h);return this.states[h]+""!=r.state+""?(this.states[h]=r.state,this.lines[h+1]=null,this.currentLine>h+1&&(this.currentLine=h+1)):this.currentLine==h&&(this.currentLine=h+1),this.lines[h]=r.tokens},c.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},c}();x.implement(A.prototype,w),v.BackgroundTokenizer=A}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(p,v,fe){var x=p("./lib/lang"),w=p("./range").Range,A=function(){function c(h,n,o){o===void 0&&(o="text"),this.setRegexp(h),this.clazz=n,this.type=o,this.docLen=0}return c.prototype.setRegexp=function(h){this.regExp+""!=h+""&&(this.regExp=h,this.cache=[])},c.prototype.update=function(h,n,o,r){if(this.regExp){for(var i=r.firstRow,e=r.lastRow,t={},a=o.$editor&&o.$editor.$search,g=a&&a.$isMultilineSearch(o.$editor.getLastSearchOptions()),m=i;m<=e;m++){var M=this.cache[m];if(M==null||o.getValue().length!=this.docLen){if(g){M=[];var O=a.$multiLineForward(o,this.regExp,m,e);if(O){var $=O.endRow<=e?O.endRow-1:e;$>m&&(m=$),M.push(new w(O.startRow,O.startCol,O.endRow,O.endCol))}M.length>this.MAX_RANGES&&(M=M.slice(0,this.MAX_RANGES))}else M=x.getMatchOffsets(o.getLine(m),this.regExp),M.length>this.MAX_RANGES&&(M=M.slice(0,this.MAX_RANGES)),M=M.map(function(de){return new w(m,de.offset,m,de.offset+de.length)});this.cache[m]=M.length?M:""}if(M.length!==0)for(var b=M.length;b--;){var he=M[b].toScreenRange(o),Te=he.toString();t[Te]||(t[Te]=!0,n.drawSingleLineMarker(h,he,this.clazz,r))}}this.docLen=o.getValue().length}},c}();A.prototype.MAX_RANGES=500,v.SearchHighlight=A}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(p,v,fe){var x=function(){function $(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return $.prototype.addSession=function(b){this.$session=b},$.prototype.add=function(b,he,Te){if(!this.$fromUndo&&b!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),he===!1||!this.lastDeltas){this.lastDeltas=[];var de=this.$undoStack.length;de>this.$undoDepth-1&&this.$undoStack.splice(0,de-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)}},$.prototype.addSelection=function(b,he){this.selections.push({value:b,rev:he||this.$rev})},$.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},$.prototype.markIgnored=function(b,he){he==null&&(he=this.$rev+1);for(var Te=this.$undoStack,de=Te.length;de--;){var Y=Te[de][0];if(Y.id<=b)break;Y.id<he&&(Y.ignore=!0)}this.lastDeltas=null},$.prototype.getSelection=function(b,he){for(var Te=this.selections,de=Te.length;de--;){var Y=Te[de];if(Y.rev<b)return he&&(Y=Te[de+1]),Y}},$.prototype.getRevision=function(){return this.$rev},$.prototype.getDeltas=function(b,he){he==null&&(he=this.$rev+1);for(var Te=this.$undoStack,de=null,Y=0,gt=Te.length;gt--;){var U=Te[gt][0];if(U.id<he&&!de&&(de=gt+1),U.id<=b){Y=gt+1;break}}return Te.slice(Y,de)},$.prototype.getChangedRanges=function(b,he){he==null&&(he=this.$rev+1)},$.prototype.getChangedLines=function(b,he){he==null&&(he=this.$rev+1)},$.prototype.undo=function(b,he){this.lastDeltas=null;var Te=this.$undoStack;if(w(Te,Te.length)){b||(b=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var de=Te.pop(),Y=null;return de&&(Y=b.undoChanges(de,he),this.$redoStack.push(de),this.$syncRev()),this.$fromUndo=!1,Y}},$.prototype.redo=function(b,he){if(this.lastDeltas=null,b||(b=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var Te=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);O(this.$redoStack,Te),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(gt){gt[0].id=++this.$maxRev},this)}var de=this.$redoStack.pop(),Y=null;return de&&(Y=b.redoChanges(de,he),this.$undoStack.push(de),this.$syncRev()),this.$fromUndo=!1,Y},$.prototype.$syncRev=function(){var b=this.$undoStack,he=b[b.length-1],Te=he&&he[0].id||0;this.$redoStackBaseRev=Te,this.$rev=Te},$.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=[]},$.prototype.canUndo=function(){return this.$undoStack.length>0},$.prototype.canRedo=function(){return this.$redoStack.length>0},$.prototype.bookmark=function(b){b==null&&(b=this.$rev),this.mark=b},$.prototype.isAtBookmark=function(){return this.$rev===this.mark},$.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},$.prototype.fromJSON=function(b){this.reset(),this.$undoStack=b.$undoStack,this.$redoStack=b.$redoStack},$.prototype.$prettyPrint=function(b){return b?o(b):o(this.$undoStack)+`
195
+ ---
196
+ `+o(this.$redoStack)},$}();x.prototype.hasUndo=x.prototype.canUndo,x.prototype.hasRedo=x.prototype.canRedo,x.prototype.isClean=x.prototype.isAtBookmark,x.prototype.markClean=x.prototype.bookmark;function w($,b){for(var he=b;he--;){var Te=$[he];if(Te&&!Te[0].ignore){for(;he<b-1;){var de=e($[he],$[he+1]);$[he]=de[0],$[he+1]=de[1],he++}return!0}}}var A=p("./range").Range,c=A.comparePoints;A.comparePoints;function h($){return{row:$.row,column:$.column}}function n($){return{start:h($.start),end:h($.end),action:$.action,lines:$.lines.slice()}}function o($){if($=$||this,Array.isArray($))return $.map(o).join(`
197
+ `);var b="";return $.action?(b=$.action=="insert"?"+":"-",b+="["+$.lines+"]"):$.value&&(Array.isArray($.value)?b=$.value.map(r).join(`
198
+ `):b=r($.value)),$.start&&(b+=r($)),($.id||$.rev)&&(b+=" ("+($.id||$.rev)+")"),b}function r($){return $.start.row+":"+$.start.column+"=>"+$.end.row+":"+$.end.column}function i($,b){var he=$.action=="insert",Te=b.action=="insert";if(he&&Te)if(c(b.start,$.end)>=0)a(b,$,-1);else if(c(b.start,$.start)<=0)a($,b,1);else return null;else if(he&&!Te)if(c(b.start,$.end)>=0)a(b,$,-1);else if(c(b.end,$.start)<=0)a($,b,-1);else return null;else if(!he&&Te)if(c(b.start,$.start)>=0)a(b,$,1);else if(c(b.start,$.start)<=0)a($,b,1);else return null;else if(!he&&!Te)if(c(b.start,$.start)>=0)a(b,$,1);else if(c(b.end,$.start)<=0)a($,b,-1);else return null;return[b,$]}function e($,b){for(var he=$.length;he--;)for(var Te=0;Te<b.length;Te++)if(!i($[he],b[Te])){for(;he<$.length;){for(;Te--;)i(b[Te],$[he]);Te=b.length,he++}return[$,b]}return $.selectionBefore=b.selectionBefore=$.selectionAfter=b.selectionAfter=null,[b,$]}function t($,b){var he=$.action=="insert",Te=b.action=="insert";if(he&&Te)c($.start,b.start)<0?a(b,$,1):a($,b,1);else if(he&&!Te)c($.start,b.end)>=0?a($,b,-1):(c($.start,b.start)<=0||a($,A.fromPoints(b.start,$.start),-1),a(b,$,1));else if(!he&&Te)c(b.start,$.end)>=0?a(b,$,-1):(c(b.start,$.start)<=0||a(b,A.fromPoints($.start,b.start),-1),a($,b,1));else if(!he&&!Te)if(c(b.start,$.end)>=0)a(b,$,-1);else if(c(b.end,$.start)<=0)a($,b,-1);else{var de,Y;return c($.start,b.start)<0&&(de=$,$=m($,b.start)),c($.end,b.end)>0&&(Y=m($,b.end)),g(b.end,$.start,$.end,-1),Y&&!de&&($.lines=Y.lines,$.start=Y.start,$.end=Y.end,Y=$),[b,de,Y].filter(Boolean)}return[b,$]}function a($,b,he){g($.start,b.start,b.end,he),g($.end,b.start,b.end,he)}function g($,b,he,Te){$.row==(Te==1?b:he).row&&($.column+=Te*(he.column-b.column)),$.row+=Te*(he.row-b.row)}function m($,b){var he=$.lines,Te=$.end;$.end=h(b);var de=$.end.row-$.start.row,Y=he.splice(de,he.length),gt=de?b.column:b.column-$.start.column;he.push(Y[0].substring(0,gt)),Y[0]=Y[0].substr(gt);var U={start:h(b),end:Te,lines:Y,action:$.action};return U}function M($,b){b=n(b);for(var he=$.length;he--;){for(var Te=$[he],de=0;de<Te.length;de++){var Y=Te[de],gt=t(Y,b);b=gt[0],gt.length!=2&&(gt[2]?(Te.splice(de+1,1,gt[1],gt[2]),de++):gt[1]||(Te.splice(de,1),de--))}Te.length||$.splice(he,1)}return $}function O($,b){for(var he=0;he<b.length;he++)for(var Te=b[he],de=0;de<Te.length;de++)M($,Te[de])}v.UndoManager=x}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(p,v,fe){var x=p("../range").Range,w=function(){function A(c,h){this.foldData=c,Array.isArray(h)?this.folds=h:h=this.folds=[h];var n=h[h.length-1];this.range=new x(h[0].start.row,h[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(o){o.setFoldLine(this)},this)}return A.prototype.shiftRow=function(c){this.start.row+=c,this.end.row+=c,this.folds.forEach(function(h){h.start.row+=c,h.end.row+=c})},A.prototype.addFold=function(c){if(c.sameRow){if(c.start.row<this.startRow||c.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(c),this.folds.sort(function(h,n){return-h.range.compareEnd(n.start.row,n.start.column)}),this.range.compareEnd(c.start.row,c.start.column)>0?(this.end.row=c.end.row,this.end.column=c.end.column):this.range.compareStart(c.end.row,c.end.column)<0&&(this.start.row=c.start.row,this.start.column=c.start.column)}else if(c.start.row==this.end.row)this.folds.push(c),this.end.row=c.end.row,this.end.column=c.end.column;else if(c.end.row==this.start.row)this.folds.unshift(c),this.start.row=c.start.row,this.start.column=c.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");c.foldLine=this},A.prototype.containsRow=function(c){return c>=this.start.row&&c<=this.end.row},A.prototype.walk=function(c,h,n){var o=0,r=this.folds,i,e,t,a=!0;h==null&&(h=this.end.row,n=this.end.column);for(var g=0;g<r.length;g++){if(i=r[g],e=i.range.compareStart(h,n),e==-1){c(null,h,n,o,a);return}if(t=c(null,i.start.row,i.start.column,o,a),t=!t&&c(i.placeholder,i.start.row,i.start.column,o),t||e===0)return;a=!i.sameRow,o=i.end.column}c(null,h,n,o,a)},A.prototype.getNextFoldTo=function(c,h){for(var n,o,r=0;r<this.folds.length;r++){if(n=this.folds[r],o=n.range.compareEnd(c,h),o==-1)return{fold:n,kind:"after"};if(o===0)return{fold:n,kind:"inside"}}return null},A.prototype.addRemoveChars=function(c,h,n){var o=this.getNextFoldTo(c,h),r,i;if(o){if(r=o.fold,o.kind=="inside"&&r.start.column!=h&&r.start.row!=c)window.console&&window.console.log(c,h,r);else if(r.start.row==c){i=this.folds;var e=i.indexOf(r);for(e===0&&(this.start.column+=n),e;e<i.length;e++){if(r=i[e],r.start.column+=n,!r.sameRow)return;r.end.column+=n}this.end.column+=n}}},A.prototype.split=function(c,h){var n=this.getNextFoldTo(c,h);if(!n||n.kind=="inside")return null;var o=n.fold,r=this.folds,i=this.foldData,e=r.indexOf(o),t=r[e-1];this.end.row=t.end.row,this.end.column=t.end.column,r=r.splice(e,r.length-e);var a=new A(i,r);return i.splice(i.indexOf(this)+1,0,a),a},A.prototype.merge=function(c){for(var h=c.folds,n=0;n<h.length;n++)this.addFold(h[n]);var o=this.foldData;o.splice(o.indexOf(c),1)},A.prototype.toString=function(){var c=[this.range.toString()+": ["];return this.folds.forEach(function(h){c.push(" "+h.toString())}),c.push("]"),c.join(`
199
+ `)},A.prototype.idxToPosition=function(c){for(var h=0,n=0;n<this.folds.length;n++){var o=this.folds[n];if(c-=o.start.column-h,c<0)return{row:o.start.row,column:o.start.column+c};if(c-=o.placeholder.length,c<0)return o.start;h=o.end.column}return{row:this.end.row,column:this.end.column+c}},A}();v.FoldLine=w}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(p,v,fe){var x=p("./range").Range,w=x.comparePoints,A=function(){function c(){this.ranges=[],this.$bias=1}return c.prototype.pointIndex=function(h,n,o){for(var r=this.ranges,i=o||0;i<r.length;i++){var e=r[i],t=w(h,e.end);if(!(t>0)){var a=w(h,e.start);return t===0?n&&a!==0?-i-2:i:a>0||a===0&&!n?i:-i-1}}return-i-1},c.prototype.add=function(h){var n=!h.isEmpty(),o=this.pointIndex(h.start,n);o<0&&(o=-o-1);var r=this.pointIndex(h.end,n,o);return r<0?r=-r-1:r++,this.ranges.splice(o,r-o,h)},c.prototype.addList=function(h){for(var n=[],o=h.length;o--;)n.push.apply(n,this.add(h[o]));return n},c.prototype.substractPoint=function(h){var n=this.pointIndex(h);if(n>=0)return this.ranges.splice(n,1)},c.prototype.merge=function(){var h=[],n=this.ranges;n=n.sort(function(t,a){return w(t.start,a.start)});for(var o=n[0],r,i=1;i<n.length;i++){r=o,o=n[i];var e=w(r.end,o.start);e<0||e==0&&!r.isEmpty()&&!o.isEmpty()||(w(r.end,o.end)<0&&(r.end.row=o.end.row,r.end.column=o.end.column),n.splice(i,1),h.push(o),o=r,i--)}return this.ranges=n,h},c.prototype.contains=function(h,n){return this.pointIndex({row:h,column:n})>=0},c.prototype.containsPoint=function(h){return this.pointIndex(h)>=0},c.prototype.rangeAtPoint=function(h){var n=this.pointIndex(h);if(n>=0)return this.ranges[n]},c.prototype.clipRows=function(h,n){var o=this.ranges;if(o[0].start.row>n||o[o.length-1].start.row<h)return[];var r=this.pointIndex({row:h,column:0});r<0&&(r=-r-1);var i=this.pointIndex({row:n,column:0},r);i<0&&(i=-i-1);for(var e=[],t=r;t<i;t++)e.push(o[t]);return e},c.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},c.prototype.attach=function(h){this.session&&this.detach(),this.session=h,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},c.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},c.prototype.$onChange=function(h){for(var n=h.start,o=h.end,r=n.row,i=o.row,e=this.ranges,t=0,a=e.length;t<a;t++){var g=e[t];if(g.end.row>=r)break}if(h.action=="insert")for(var m=i-r,M=-n.column+o.column;t<a;t++){var g=e[t];if(g.start.row>r)break;if(g.start.row==r&&g.start.column>=n.column&&(g.start.column==n.column&&this.$bias<=0||(g.start.column+=M,g.start.row+=m)),g.end.row==r&&g.end.column>=n.column){if(g.end.column==n.column&&this.$bias<0)continue;g.end.column==n.column&&M>0&&t<a-1&&g.end.column>g.start.column&&g.end.column==e[t+1].start.column&&(g.end.column-=M),g.end.column+=M,g.end.row+=m}}else for(var m=r-i,M=n.column-o.column;t<a;t++){var g=e[t];if(g.start.row>i)break;g.end.row<i&&(r<g.end.row||r==g.end.row&&n.column<g.end.column)?(g.end.row=r,g.end.column=n.column):g.end.row==i?g.end.column<=o.column?(m||g.end.column>n.column)&&(g.end.column=n.column,g.end.row=n.row):(g.end.column+=M,g.end.row+=m):g.end.row>i&&(g.end.row+=m),g.start.row<i&&(r<g.start.row||r==g.start.row&&n.column<g.start.column)?(g.start.row=r,g.start.column=n.column):g.start.row==i?g.start.column<=o.column?(m||g.start.column>n.column)&&(g.start.column=n.column,g.start.row=n.row):(g.start.column+=M,g.start.row+=m):g.start.row>i&&(g.start.row+=m)}if(m!=0&&t<a)for(;t<a;t++){var g=e[t];g.start.row+=m,g.end.row+=m}},c}();A.prototype.comparePoints=w,v.RangeList=A}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(p,v,fe){var x=this&&this.__extends||function(){var r=function(i,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var g in a)Object.prototype.hasOwnProperty.call(a,g)&&(t[g]=a[g])},r(i,e)};return function(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(i,e);function t(){this.constructor=i}i.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}}(),w=p("../range_list").RangeList,A=function(r){x(i,r);function i(e,t){var a=r.call(this)||this;return a.foldLine=null,a.placeholder=t,a.range=e,a.start=e.start,a.end=e.end,a.sameRow=e.start.row==e.end.row,a.subFolds=a.ranges=[],a}return i.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},i.prototype.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(t){t.setFoldLine(e)})},i.prototype.clone=function(){var e=this.range.clone(),t=new i(e,this.placeholder);return this.subFolds.forEach(function(a){t.subFolds.push(a.clone())}),t.collapseChildren=this.collapseChildren,t},i.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){h(e,this.start);for(var M=e.start.row,O=e.start.column,t=0,a=-1;t<this.subFolds.length&&(a=this.subFolds[t].range.compare(M,O),a==1);t++);var g=this.subFolds[t],m=0;if(a==0){if(g.range.containsRange(e))return g.addSubFold(e);m=1}for(var M=e.range.end.row,O=e.range.end.column,$=t,a=-1;$<this.subFolds.length&&(a=this.subFolds[$].range.compare(M,O),a==1);$++);a==0&&$++;for(var b=this.subFolds.splice(t,$-t,e),he=a==0?b.length-1:b.length,Te=m;Te<he;Te++)e.addSubFold(b[Te]);return e.setFoldLine(this.foldLine),e}},i.prototype.restoreRange=function(e){return o(e,this.start)},i}(w);function c(r,i){r.row-=i.row,r.row==0&&(r.column-=i.column)}function h(r,i){c(r.start,i),c(r.end,i)}function n(r,i){r.row==0&&(r.column+=i.column),r.row+=i.row}function o(r,i){n(r.start,i),n(r.end,i)}v.Fold=A}),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(p,v,fe){var x=p("../range").Range,w=p("./fold_line").FoldLine,A=p("./fold").Fold,c=p("../token_iterator").TokenIterator,h=p("../mouse/mouse_event").MouseEvent;function n(){this.getFoldAt=function(o,r,i){var e=this.getFoldLine(o);if(!e)return null;for(var t=e.folds,a=0;a<t.length;a++){var g=t[a].range;if(g.contains(o,r)){if(i==1&&g.isEnd(o,r)&&!g.isEmpty())continue;if(i==-1&&g.isStart(o,r)&&!g.isEmpty())continue;return t[a]}}},this.getFoldsInRange=function(o){var r=o.start,i=o.end,e=this.$foldData,t=[];r.column+=1,i.column-=1;for(var a=0;a<e.length;a++){var g=e[a].range.compareRange(o);if(g!=2){if(g==-2)break;for(var m=e[a].folds,M=0;M<m.length;M++){var O=m[M];if(g=O.range.compareRange(o),g==-2)break;if(g==2)continue;if(g==42)break;t.push(O)}}}return r.column-=1,i.column+=1,t},this.getFoldsInRangeList=function(o){if(Array.isArray(o)){var r=[];o.forEach(function(i){r=r.concat(this.getFoldsInRange(i))},this)}else var r=this.getFoldsInRange(o);return r},this.getAllFolds=function(){for(var o=[],r=this.$foldData,i=0;i<r.length;i++)for(var e=0;e<r[i].folds.length;e++)o.push(r[i].folds[e]);return o},this.getFoldStringAt=function(o,r,i,e){if(e=e||this.getFoldLine(o),!e)return null;for(var t={end:{column:0}},a,g,m=0;m<e.folds.length;m++){g=e.folds[m];var M=g.range.compareEnd(o,r);if(M==-1){a=this.getLine(g.start.row).substring(t.end.column,g.start.column);break}else if(M===0)return null;t=g}return a||(a=this.getLine(g.start.row).substring(t.end.column)),i==-1?a.substring(0,r-t.end.column):i==1?a.substring(r-t.end.column):a},this.getFoldLine=function(o,r){var i=this.$foldData,e=0;for(r&&(e=i.indexOf(r)),e==-1&&(e=0),e;e<i.length;e++){var t=i[e];if(t.start.row<=o&&t.end.row>=o)return t;if(t.end.row>o)return null}return null},this.getNextFoldLine=function(o,r){var i=this.$foldData,e=0;for(r&&(e=i.indexOf(r)),e==-1&&(e=0),e;e<i.length;e++){var t=i[e];if(t.end.row>=o)return t}return null},this.getFoldedRowCount=function(o,r){for(var i=this.$foldData,e=r-o+1,t=0;t<i.length;t++){var a=i[t],g=a.end.row,m=a.start.row;if(g>=r){m<r&&(m>=o?e-=r-m:e=0);break}else g>=o&&(m>=o?e-=g-m:e-=g-o+1)}return e},this.$addFoldLine=function(o){return this.$foldData.push(o),this.$foldData.sort(function(r,i){return r.start.row-i.start.row}),o},this.addFold=function(o,r){var i=this.$foldData,e=!1,t;o instanceof A?t=o:(t=new A(r,o),t.collapseChildren=r.collapseChildren),this.$clipRangeToDocument(t.range);var a=t.start.row,g=t.start.column,m=t.end.row,M=t.end.column,O=this.getFoldAt(a,g,1),$=this.getFoldAt(m,M,-1);if(O&&$==O)return O.addSubFold(t);O&&!O.range.isStart(a,g)&&this.removeFold(O),$&&!$.range.isEnd(m,M)&&this.removeFold($);var b=this.getFoldsInRange(t.range);b.length>0&&(this.removeFolds(b),t.collapseChildren||b.forEach(function(Y){t.addSubFold(Y)}));for(var he=0;he<i.length;he++){var Te=i[he];if(m==Te.start.row){Te.addFold(t),e=!0;break}else if(a==Te.end.row){if(Te.addFold(t),e=!0,!t.sameRow){var de=i[he+1];if(de&&de.start.row==m){Te.merge(de);break}}break}else if(m<=Te.start.row)break}return e||(Te=this.$addFoldLine(new w(this.$foldData,t))),this.$useWrapMode?this.$updateWrapData(Te.start.row,Te.start.row):this.$updateRowLengthCache(Te.start.row,Te.start.row),this.$modified=!0,this._signal("changeFold",{data:t,action:"add"}),t},this.addFolds=function(o){o.forEach(function(r){this.addFold(r)},this)},this.removeFold=function(o){var r=o.foldLine,i=r.start.row,e=r.end.row,t=this.$foldData,a=r.folds;if(a.length==1)t.splice(t.indexOf(r),1);else if(r.range.isEnd(o.end.row,o.end.column))a.pop(),r.end.row=a[a.length-1].end.row,r.end.column=a[a.length-1].end.column;else if(r.range.isStart(o.start.row,o.start.column))a.shift(),r.start.row=a[0].start.row,r.start.column=a[0].start.column;else if(o.sameRow)a.splice(a.indexOf(o),1);else{var g=r.split(o.start.row,o.start.column);a=g.folds,a.shift(),g.start.row=a[0].start.row,g.start.column=a[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(i,e):this.$updateRowLengthCache(i,e)),this.$modified=!0,this._signal("changeFold",{data:o,action:"remove"})},this.removeFolds=function(o){for(var r=[],i=0;i<o.length;i++)r.push(o[i]);r.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(o){this.removeFold(o),o.subFolds.forEach(function(r){o.restoreRange(r),this.addFold(r)},this),o.collapseChildren>0&&this.foldAll(o.start.row+1,o.end.row,o.collapseChildren-1),o.subFolds=[]},this.expandFolds=function(o){o.forEach(function(r){this.expandFold(r)},this)},this.unfold=function(o,r){var i,e;if(o==null)i=new x(0,0,this.getLength(),0),r==null&&(r=!0);else if(typeof o=="number")i=new x(o,0,o,this.getLine(o).length);else if("row"in o)i=x.fromPoints(o,o);else{if(Array.isArray(o))return e=[],o.forEach(function(a){e=e.concat(this.unfold(a))},this),e;i=o}e=this.getFoldsInRangeList(i);for(var t=e;e.length==1&&x.comparePoints(e[0].start,i.start)<0&&x.comparePoints(e[0].end,i.end)>0;)this.expandFolds(e),e=this.getFoldsInRangeList(i);if(r!=!1?this.removeFolds(e):this.expandFolds(e),t.length)return t},this.isRowFolded=function(o,r){return!!this.getFoldLine(o,r)},this.getRowFoldEnd=function(o,r){var i=this.getFoldLine(o,r);return i?i.end.row:o},this.getRowFoldStart=function(o,r){var i=this.getFoldLine(o,r);return i?i.start.row:o},this.getFoldDisplayLine=function(o,r,i,e,t){e==null&&(e=o.start.row),t==null&&(t=0),r==null&&(r=o.end.row),i==null&&(i=this.getLine(r).length);var a=this.doc,g="";return o.walk(function(m,M,O,$){if(!(M<e)){if(M==e){if(O<t)return;$=Math.max(t,$)}m!=null?g+=m:g+=a.getLine(M).substring($,O)}},r,i),g},this.getDisplayLine=function(o,r,i,e){var t=this.getFoldLine(o);if(t)return this.getFoldDisplayLine(t,o,r,i,e);var a;return a=this.doc.getLine(o),a.substring(e||0,r||a.length)},this.$cloneFoldData=function(){var o=[];return o=this.$foldData.map(function(r){var i=r.folds.map(function(e){return e.clone()});return new w(o,i)}),o},this.toggleFold=function(o){var r=this.selection,i=r.getRange(),e,t;if(i.isEmpty()){var a=i.start;if(e=this.getFoldAt(a.row,a.column),e){this.expandFold(e);return}else if(o){var g=this.getFoldLine(a.row);g&&this.expandFolds(g.folds);return}else(t=this.findMatchingBracket(a))?i.comparePoint(t)==1?i.end=t:(i.start=t,i.start.column++,i.end.column--):(t=this.findMatchingBracket({row:a.row,column:a.column+1}))?(i.comparePoint(t)==1?i.end=t:i.start=t,i.start.column++):i=this.getCommentFoldRange(a.row,a.column)||i}else{var m=this.getFoldsInRange(i);if(o&&m.length){this.expandFolds(m);return}else m.length==1&&(e=m[0])}if(e||(e=this.getFoldAt(i.start.row,i.start.column)),e&&e.range.toString()==i.toString()){this.expandFold(e);return}var M="...";if(!i.isMultiLine()){if(M=this.getTextRange(i),M.length<4)return;M=M.trim().substring(0,2)+".."}this.addFold(M,i)},this.getCommentFoldRange=function(o,r,i){var e=new c(this,o,r),t=e.getCurrentToken(),a=t&&t.type;if(t&&/^comment|string/.test(a)){a=a.match(/comment|string/)[0],a=="comment"&&(a+="|doc-start|\\.doc");var g=new RegExp(a),m=new x;if(i!=1){do t=e.stepBackward();while(t&&g.test(t.type));t=e.stepForward()}m.start.row=e.getCurrentTokenRow(),m.start.column=e.getCurrentTokenColumn()+t.value.length,e=new c(this,o,r);var M=this.getState(e.$row);if(i!=-1){var O=-1;do if(t=e.stepForward(),O==-1){var $=this.getState(e.$row);M.toString()!==$.toString()&&(O=e.$row)}else if(e.$row>O)break;while(t&&g.test(t.type));t=e.stepBackward()}else t=e.getCurrentToken();return m.end.row=e.getCurrentTokenRow(),m.end.column=e.getCurrentTokenColumn(),m.start.row==m.end.row&&m.start.column>m.end.column?void 0:m}},this.foldAll=function(o,r,i,e){i==null&&(i=1e5);var t=this.foldWidgets;if(t){r=r||this.getLength(),o=o||0;for(var a=o;a<r;a++)if(t[a]==null&&(t[a]=this.getFoldWidget(a)),t[a]=="start"&&!(e&&!e(a))){var g=this.getFoldWidgetRange(a);g&&g.isMultiLine()&&g.end.row<=r&&g.start.row>=o&&(a=g.end.row,g.collapseChildren=i,this.addFold("...",g))}}},this.foldToLevel=function(o){for(this.foldAll();o-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var o=this;this.foldAll(null,null,null,function(r){for(var i=o.getTokens(r),e=0;e<i.length;e++){var t=i[e];if(!(t.type=="text"&&/^\s+$/.test(t.value)))return!!/comment/.test(t.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(o){if(!this.$foldStyles[o])throw new Error("invalid fold style: "+o+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=o){this.$foldStyle=o,o=="manual"&&this.unfold();var r=this.$foldMode;this.$setFolding(null),this.$setFolding(r)}},this.$setFolding=function(o){if(this.$foldMode!=o){if(this.$foldMode=o,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!o||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=o.getFoldWidget.bind(o,this,this.$foldStyle),this.getFoldWidgetRange=o.getFoldWidgetRange.bind(o,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(o,r){var i=this.foldWidgets;if(!i||r&&i[o])return{};for(var e=o-1,t;e>=0;){var a=i[e];if(a==null&&(a=i[e]=this.getFoldWidget(e)),a=="start"){var g=this.getFoldWidgetRange(e);if(t||(t=g),g&&g.end.row>=o)break}e--}return{range:e!==-1&&g,firstRange:t}},this.onFoldWidgetClick=function(o,r){r instanceof h&&(r=r.domEvent);var i={children:r.shiftKey,all:r.ctrlKey||r.metaKey,siblings:r.altKey},e=this.$toggleFoldWidget(o,i);if(!e){var t=r.target||r.srcElement;t&&/ace_fold-widget/.test(t.className)&&(t.className+=" ace_invalid")}},this.$toggleFoldWidget=function(o,r){if(this.getFoldWidget){var i=this.getFoldWidget(o),e=this.getLine(o),t=i==="end"?-1:1,a=this.getFoldAt(o,t===-1?0:e.length,t);if(a)return r.children||r.all?this.removeFold(a):this.expandFold(a),a;var g=this.getFoldWidgetRange(o,!0);if(g&&!g.isMultiLine()&&(a=this.getFoldAt(g.start.row,g.start.column,1),a&&g.isEqual(a.range)))return this.removeFold(a),a;if(r.siblings){var m=this.getParentFoldRangeData(o);if(m.range)var M=m.range.start.row+1,O=m.range.end.row;this.foldAll(M,O,r.all?1e4:0)}else r.children?(O=g?g.end.row:this.getLength(),this.foldAll(o+1,O,r.all?1e4:0)):g&&(r.all&&(g.collapseChildren=1e4),this.addFold("...",g));return g}},this.toggleFoldWidget=function(o){var r=this.selection.getCursor().row;r=this.getRowFoldStart(r);var i=this.$toggleFoldWidget(r,{});if(!i){var e=this.getParentFoldRangeData(r,!0);if(i=e.range||e.firstRange,i){r=i.start.row;var t=this.getFoldAt(r,this.getLine(r).length,1);t?this.removeFold(t):this.addFold("...",i)}}},this.updateFoldWidgets=function(o){var r=o.start.row,i=o.end.row-r;if(i===0)this.foldWidgets[r]=null;else if(o.action=="remove")this.foldWidgets.splice(r,i+1,null);else{var e=Array(i+1);e.unshift(r,1),this.foldWidgets.splice.apply(this.foldWidgets,e)}},this.tokenizerUpdateFoldWidgets=function(o){var r=o.data;r.first!=r.last&&this.foldWidgets.length>r.first&&this.foldWidgets.splice(r.first,this.foldWidgets.length)}}v.Folding=n}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(p,v,fe){var x=p("../token_iterator").TokenIterator,w=p("../range").Range;function A(){this.findMatchingBracket=function(c,h){if(c.column==0)return null;var n=h||this.getLine(c.row).charAt(c.column-1);if(n=="")return null;var o=n.match(/([\(\[\{])|([\)\]\}])/);return o?o[1]?this.$findClosingBracket(o[1],c):this.$findOpeningBracket(o[2],c):null},this.getBracketRange=function(c){var h=this.getLine(c.row),n=!0,o,r=h.charAt(c.column-1),i=r&&r.match(/([\(\[\{])|([\)\]\}])/);if(i||(r=h.charAt(c.column),c={row:c.row,column:c.column+1},i=r&&r.match(/([\(\[\{])|([\)\]\}])/),n=!1),!i)return null;if(i[1]){var e=this.$findClosingBracket(i[1],c);if(!e)return null;o=w.fromPoints(c,e),n||(o.end.column++,o.start.column--),o.cursor=o.end}else{var e=this.$findOpeningBracket(i[2],c);if(!e)return null;o=w.fromPoints(e,c),n||(o.start.column++,o.end.column--),o.cursor=o.start}return o},this.getMatchingBracketRanges=function(c,h){var n=this.getLine(c.row),o=/([\(\[\{])|([\)\]\}])/,r=!h&&n.charAt(c.column-1),i=r&&r.match(o);if(i||(r=(h===void 0||h)&&n.charAt(c.column),c={row:c.row,column:c.column+1},i=r&&r.match(o)),!i)return null;var e=new w(c.row,c.column-1,c.row,c.column),t=i[1]?this.$findClosingBracket(i[1],c):this.$findOpeningBracket(i[2],c);if(!t)return[e];var a=new w(t.row,t.column,t.row,t.column+1);return[e,a]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(c,h,n){var o=this.$brackets[c],r=1,i=new x(this,h.row,h.column),e=i.getCurrentToken();if(e||(e=i.stepForward()),!!e){n||(n=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var t=h.column-i.getCurrentTokenColumn()-2,a=e.value;;){for(;t>=0;){var g=a.charAt(t);if(g==o){if(r-=1,r==0)return{row:i.getCurrentTokenRow(),column:t+i.getCurrentTokenColumn()}}else g==c&&(r+=1);t-=1}do e=i.stepBackward();while(e&&!n.test(e.type));if(e==null)break;a=e.value,t=a.length-1}return null}},this.$findClosingBracket=function(c,h,n){var o=this.$brackets[c],r=1,i=new x(this,h.row,h.column),e=i.getCurrentToken();if(e||(e=i.stepForward()),!!e){n||(n=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var t=h.column-i.getCurrentTokenColumn();;){for(var a=e.value,g=a.length;t<g;){var m=a.charAt(t);if(m==o){if(r-=1,r==0)return{row:i.getCurrentTokenRow(),column:t+i.getCurrentTokenColumn()}}else m==c&&(r+=1);t+=1}do e=i.stepForward();while(e&&!n.test(e.type));if(e==null)break;t=0}return null}},this.getMatchingTags=function(c){var h=new x(this,c.row,c.column),n=this.$findTagName(h);if(n){var o=h.stepBackward();return o.value==="<"?this.$findClosingTag(h,n):this.$findOpeningTag(h,n)}},this.$findTagName=function(c){var h=c.getCurrentToken(),n=!1,o=!1;if(h&&h.type.indexOf("tag-name")===-1)do o?h=c.stepBackward():h=c.stepForward(),h&&(h.value==="/>"?o=!0:h.type.indexOf("tag-name")!==-1&&(n=!0));while(h&&!n);return h},this.$findClosingTag=function(c,h){var n,o=h.value,r=h.value,i=0,e=new w(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);h=c.stepForward();var t=new w(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+h.value.length),a=!1;do{if(n=h,n.type.indexOf("tag-close")!==-1&&!a){var g=new w(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);a=!0}if(h=c.stepForward(),h){if(h.value===">"&&!a){var g=new w(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);a=!0}if(h.type.indexOf("tag-name")!==-1){if(o=h.value,r===o){if(n.value==="<")i++;else if(n.value==="</"&&(i--,i<0)){c.stepBackward();var m=new w(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+2);h=c.stepForward();var M=new w(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+h.value.length);if(h.type.indexOf("tag-close")===-1&&(h=c.stepForward()),h&&h.value===">")var O=new w(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);else return}}}else if(r===o&&h.value==="/>"&&(i--,i<0))var m=new w(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+2),M=m,O=M,g=new w(t.end.row,t.end.column,t.end.row,t.end.column+1)}}while(h&&i>=0);if(e&&g&&m&&O&&t&&M)return{openTag:new w(e.start.row,e.start.column,g.end.row,g.end.column),closeTag:new w(m.start.row,m.start.column,O.end.row,O.end.column),openTagName:t,closeTagName:M}},this.$findOpeningTag=function(c,h){var n=c.getCurrentToken(),o=h.value,r=0,i=c.getCurrentTokenRow(),e=c.getCurrentTokenColumn(),t=e+2,a=new w(i,e,i,t);c.stepForward();var g=new w(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+h.value.length);if(h.type.indexOf("tag-close")===-1&&(h=c.stepForward()),!(!h||h.value!==">")){var m=new w(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);c.stepBackward(),c.stepBackward();do if(h=n,i=c.getCurrentTokenRow(),e=c.getCurrentTokenColumn(),t=e+h.value.length,n=c.stepBackward(),h){if(h.type.indexOf("tag-name")!==-1){if(o===h.value)if(n.value==="<"){if(r++,r>0){var M=new w(i,e,i,t),O=new w(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);do h=c.stepForward();while(h&&h.value!==">");var $=new w(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1)}}else n.value==="</"&&r--}else if(h.value==="/>"){for(var b=0,he=n;he;){if(he.type.indexOf("tag-name")!==-1&&he.value===o){r--;break}else if(he.value==="<")break;he=c.stepBackward(),b++}for(var Te=0;Te<b;Te++)c.stepForward()}}while(n&&r<=0);if(O&&$&&a&&m&&M&&g)return{openTag:new w(O.start.row,O.start.column,$.end.row,$.end.column),closeTag:new w(a.start.row,a.start.column,m.end.row,m.end.column),openTagName:M,closeTagName:g}}}}v.BracketMatch=A}),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(p,v,fe){var x=p("./lib/oop"),w=p("./lib/lang"),A=p("./bidihandler").BidiHandler,c=p("./config"),h=p("./lib/event_emitter").EventEmitter,n=p("./selection").Selection,o=p("./mode/text").Mode,r=p("./range").Range,i=p("./line_widgets").LineWidgets,e=p("./document").Document,t=p("./background_tokenizer").BackgroundTokenizer,a=p("./search_highlight").SearchHighlight,g=p("./undomanager").UndoManager,m=function(){function U(V,C){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"+ ++U.$uid,this.$foldData.toString=function(){return this.join(`
200
+ `)},this.$gutterCustomWidgets={},this.bgTokenizer=new t(new o().getTokenizer(),this);var y=this;this.bgTokenizer.on("update",function(T){y._signal("tokenizerUpdate",T)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof V!="object"||!V.getLine)&&(V=new e(V)),this.setDocument(V),this.selection=new n(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new A(this),c.resetOptions(this),this.setMode(C),c._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return U.prototype.$initOperationListeners=function(){var V=this;this.curOp=null,this.on("change",function(){V.curOp||(V.startOperation(),V.curOp.selectionBefore=V.$lastSel),V.curOp.docChanged=!0},!0),this.on("changeSelection",function(){V.curOp||(V.startOperation(),V.curOp.selectionBefore=V.$lastSel),V.curOp.selectionChanged=!0},!0),this.$operationResetTimer=w.delayedCall(this.endOperation.bind(this,!0))},U.prototype.startOperation=function(V){if(this.curOp){if(!V||this.curOp.command)return;this.prevOp=this.curOp}V||(V={}),this.$operationResetTimer.schedule(),this.curOp={command:V.command||{},args:V.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",V)},U.prototype.endOperation=function(V){if(this.curOp){if(V&&V.returnValue===!1){this.curOp=null,this._signal("endOperation",V);return}if(V==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var C=this.selection.toJSON();this.curOp.selectionAfter=C,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(C),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",V)}},U.prototype.setDocument=function(V){this.doc&&this.doc.off("change",this.$onChange),this.doc=V,V.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},U.prototype.getDocument=function(){return this.doc},Object.defineProperty(U.prototype,"widgetManager",{get:function(){var V=new i(this);return this.widgetManager=V,this.$editor&&V.attach(this.$editor),V},set:function(V){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:V})},enumerable:!1,configurable:!0}),U.prototype.$resetRowCache=function(V){if(!V){this.$docRowCache=[],this.$screenRowCache=[];return}var C=this.$docRowCache.length,y=this.$getRowCacheIndex(this.$docRowCache,V)+1;C>y&&(this.$docRowCache.splice(y,C),this.$screenRowCache.splice(y,C))},U.prototype.$getRowCacheIndex=function(V,C){for(var y=0,T=V.length-1;y<=T;){var ke=y+T>>1,Qe=V[ke];if(C>Qe)y=ke+1;else if(C<Qe)T=ke-1;else return ke}return y-1},U.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},U.prototype.onChangeFold=function(V){var C=V.data;this.$resetRowCache(C.start.row)},U.prototype.onChange=function(V){this.$modified=!0,this.$bidiHandler.onChange(V),this.$resetRowCache(V.start.row);var C=this.$updateInternalDataOnChange(V);!this.$fromUndo&&this.$undoManager&&(C&&C.length&&(this.$undoManager.add({action:"removeFolds",folds:C},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(V,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(V),this._signal("change",V)},U.prototype.onSelectionChange=function(){this._signal("changeSelection")},U.prototype.setValue=function(V){this.doc.setValue(V),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},U.fromJSON=function(V){typeof V=="string"&&(V=JSON.parse(V));var C=new g;C.$undoStack=V.history.undo,C.$redoStack=V.history.redo,C.mark=V.history.mark,C.$rev=V.history.rev;var y=new U(V.value);return V.folds.forEach(function(T){y.addFold("...",r.fromPoints(T.start,T.end))}),y.setAnnotations(V.annotations),y.setBreakpoints(V.breakpoints),y.setMode(V.mode),y.setScrollLeft(V.scrollLeft),y.setScrollTop(V.scrollTop),y.setUndoManager(C),y.selection.fromJSON(V.selection),y},U.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(V){return V.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},U.prototype.toString=function(){return this.doc.getValue()},U.prototype.getSelection=function(){return this.selection},U.prototype.getState=function(V){return this.bgTokenizer.getState(V)},U.prototype.getTokens=function(V){return this.bgTokenizer.getTokens(V)},U.prototype.getTokenAt=function(V,C){var y=this.bgTokenizer.getTokens(V),T,ke=0;if(C==null){var Qe=y.length-1;ke=this.getLine(V).length}else for(var Qe=0;Qe<y.length&&(ke+=y[Qe].value.length,!(ke>=C));Qe++);return T=y[Qe],T?(T.index=Qe,T.start=ke-T.value.length,T):null},U.prototype.setUndoManager=function(V){if(this.$undoManager=V,this.$informUndoManager&&this.$informUndoManager.cancel(),V){var C=this;V.addSession(this),this.$syncInformUndoManager=function(){C.$informUndoManager.cancel(),C.mergeUndoDeltas=!1},this.$informUndoManager=w.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},U.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},U.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},U.prototype.getTabString=function(){return this.getUseSoftTabs()?w.stringRepeat(" ",this.getTabSize()):" "},U.prototype.setUseSoftTabs=function(V){this.setOption("useSoftTabs",V)},U.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},U.prototype.setTabSize=function(V){this.setOption("tabSize",V)},U.prototype.getTabSize=function(){return this.$tabSize},U.prototype.isTabStop=function(V){return this.$useSoftTabs&&V.column%this.$tabSize===0},U.prototype.setNavigateWithinSoftTabs=function(V){this.setOption("navigateWithinSoftTabs",V)},U.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},U.prototype.setOverwrite=function(V){this.setOption("overwrite",V)},U.prototype.getOverwrite=function(){return this.$overwrite},U.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},U.prototype.addGutterDecoration=function(V,C){this.$decorations[V]||(this.$decorations[V]=""),this.$decorations[V]+=" "+C,this._signal("changeBreakpoint",{})},U.prototype.removeGutterCustomWidget=function(V){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(V)},U.prototype.addGutterCustomWidget=function(V,C){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(V,C)},U.prototype.removeGutterDecoration=function(V,C){this.$decorations[V]=(this.$decorations[V]||"").replace(" "+C,""),this._signal("changeBreakpoint",{})},U.prototype.getBreakpoints=function(){return this.$breakpoints},U.prototype.setBreakpoints=function(V){this.$breakpoints=[];for(var C=0;C<V.length;C++)this.$breakpoints[V[C]]="ace_breakpoint";this._signal("changeBreakpoint",{})},U.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},U.prototype.setBreakpoint=function(V,C){C===void 0&&(C="ace_breakpoint"),C?this.$breakpoints[V]=C:delete this.$breakpoints[V],this._signal("changeBreakpoint",{})},U.prototype.clearBreakpoint=function(V){delete this.$breakpoints[V],this._signal("changeBreakpoint",{})},U.prototype.addMarker=function(V,C,y,T){var ke=this.$markerId++,Qe={range:V,type:y||"line",renderer:typeof y=="function"?y:null,clazz:C,inFront:!!T,id:ke};return T?(this.$frontMarkers[ke]=Qe,this._signal("changeFrontMarker")):(this.$backMarkers[ke]=Qe,this._signal("changeBackMarker")),ke},U.prototype.addDynamicMarker=function(V,C){if(V.update){var y=this.$markerId++;return V.id=y,V.inFront=!!C,C?(this.$frontMarkers[y]=V,this._signal("changeFrontMarker")):(this.$backMarkers[y]=V,this._signal("changeBackMarker")),V}},U.prototype.removeMarker=function(V){var C=this.$frontMarkers[V]||this.$backMarkers[V];if(C){var y=C.inFront?this.$frontMarkers:this.$backMarkers;delete y[V],this._signal(C.inFront?"changeFrontMarker":"changeBackMarker")}},U.prototype.getMarkers=function(V){return V?this.$frontMarkers:this.$backMarkers},U.prototype.highlight=function(V){if(!this.$searchHighlight){var C=new a(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(C)}this.$searchHighlight.setRegexp(V)},U.prototype.highlightLines=function(V,C,y,T){typeof C!="number"&&(y=C,C=V),y||(y="ace_step");var ke=new r(V,0,C,1/0);return ke.id=this.addMarker(ke,y,"fullLine",T),ke},U.prototype.setAnnotations=function(V){this.$annotations=V,this._signal("changeAnnotation",{})},U.prototype.getAnnotations=function(){return this.$annotations||[]},U.prototype.clearAnnotations=function(){this.setAnnotations([])},U.prototype.$detectNewLine=function(V){var C=V.match(/^.*?(\r?\n)/m);C?this.$autoNewLine=C[1]:this.$autoNewLine=`
201
+ `},U.prototype.getWordRange=function(V,C){var y=this.getLine(V),T=!1;if(C>0&&(T=!!y.charAt(C-1).match(this.tokenRe)),T||(T=!!y.charAt(C).match(this.tokenRe)),T)var ke=this.tokenRe;else if(/^\s+$/.test(y.slice(C-1,C+1)))var ke=/\s/;else var ke=this.nonTokenRe;var Qe=C;if(Qe>0){do Qe--;while(Qe>=0&&y.charAt(Qe).match(ke));Qe++}for(var Je=C;Je<y.length&&y.charAt(Je).match(ke);)Je++;return new r(V,Qe,V,Je)},U.prototype.getAWordRange=function(V,C){for(var y=this.getWordRange(V,C),T=this.getLine(y.end.row);T.charAt(y.end.column).match(/[ \t]/);)y.end.column+=1;return y},U.prototype.setNewLineMode=function(V){this.doc.setNewLineMode(V)},U.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},U.prototype.setUseWorker=function(V){this.setOption("useWorker",V)},U.prototype.getUseWorker=function(){return this.$useWorker},U.prototype.onReloadTokenizer=function(V){var C=V.data;this.bgTokenizer.start(C.first),this._signal("tokenizerUpdate",V)},U.prototype.setMode=function(V,C){if(V&&typeof V=="object"){if(V.getTokenizer)return this.$onChangeMode(V);var y=V,T=y.path}else T=V||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new o),this.$modes[T]&&!y){this.$onChangeMode(this.$modes[T]),C&&C();return}this.$modeId=T,c.loadModule(["mode",T],(function(ke){if(!this.destroyed){if(this.$modeId!==T)return C&&C();this.$modes[T]&&!y?this.$onChangeMode(this.$modes[T]):ke&&ke.Mode&&(ke=new ke.Mode(y),y||(this.$modes[T]=ke,ke.$id=T),this.$onChangeMode(ke)),C&&C()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},U.prototype.$onChangeMode=function(V,C){if(C||(this.$modeId=V.$id),this.$mode!==V){var y=this.$mode;this.$mode=V,this.$stopWorker(),this.$useWorker&&this.$startWorker();var T=V.getTokenizer();if(T.on!==void 0){var ke=this.onReloadTokenizer.bind(this);T.on("update",ke)}this.bgTokenizer.setTokenizer(T),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=V.tokenRe,this.nonTokenRe=V.nonTokenRe,C||(V.attachToSession&&V.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(V.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:y,mode:V}))}},U.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},U.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(V){c.warn("Could not load worker",V),this.$worker=null}},U.prototype.getMode=function(){return this.$mode},U.prototype.setScrollTop=function(V){this.$scrollTop===V||isNaN(V)||(this.$scrollTop=V,this._signal("changeScrollTop",V))},U.prototype.getScrollTop=function(){return this.$scrollTop},U.prototype.setScrollLeft=function(V){this.$scrollLeft===V||isNaN(V)||(this.$scrollLeft=V,this._signal("changeScrollLeft",V))},U.prototype.getScrollLeft=function(){return this.$scrollLeft},U.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},U.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var V=0;return this.lineWidgets.forEach(function(C){C&&C.screenWidth>V&&(V=C.screenWidth)}),this.lineWidgetWidth=V},U.prototype.$computeWidth=function(V){if(this.$modified||V){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var C=this.doc.getAllLines(),y=this.$rowLengthCache,T=0,ke=0,Qe=this.$foldData[ke],Je=Qe?Qe.start.row:1/0,mt=C.length,yt=0;yt<mt;yt++){if(yt>Je){if(yt=Qe.end.row+1,yt>=mt)break;Qe=this.$foldData[ke++],Je=Qe?Qe.start.row:1/0}y[yt]==null&&(y[yt]=this.$getStringScreenWidth(C[yt])[0]),y[yt]>T&&(T=y[yt])}this.screenWidth=T}},U.prototype.getLine=function(V){return this.doc.getLine(V)},U.prototype.getLines=function(V,C){return this.doc.getLines(V,C)},U.prototype.getLength=function(){return this.doc.getLength()},U.prototype.getTextRange=function(V){return this.doc.getTextRange(V||this.selection.getRange())},U.prototype.insert=function(V,C){return this.doc.insert(V,C)},U.prototype.remove=function(V){return this.doc.remove(V)},U.prototype.removeFullLines=function(V,C){return this.doc.removeFullLines(V,C)},U.prototype.undoChanges=function(V,C){if(V.length){this.$fromUndo=!0;for(var y=V.length-1;y!=-1;y--){var T=V[y];T.action=="insert"||T.action=="remove"?this.doc.revertDelta(T):T.folds&&this.addFolds(T.folds)}!C&&this.$undoSelect&&(V.selectionBefore?this.selection.fromJSON(V.selectionBefore):this.selection.setRange(this.$getUndoSelection(V,!0))),this.$fromUndo=!1}},U.prototype.redoChanges=function(V,C){if(V.length){this.$fromUndo=!0;for(var y=0;y<V.length;y++){var T=V[y];(T.action=="insert"||T.action=="remove")&&this.doc.$safeApplyDelta(T)}!C&&this.$undoSelect&&(V.selectionAfter?this.selection.fromJSON(V.selectionAfter):this.selection.setRange(this.$getUndoSelection(V,!1))),this.$fromUndo=!1}},U.prototype.setUndoSelect=function(V){this.$undoSelect=V},U.prototype.$getUndoSelection=function(V,C){function y(mt){return C?mt.action!=="insert":mt.action==="insert"}for(var T,ke,Qe=0;Qe<V.length;Qe++){var Je=V[Qe];if(Je.start){if(!T){y(Je)?T=r.fromPoints(Je.start,Je.end):T=r.fromPoints(Je.start,Je.start);continue}y(Je)?(ke=Je.start,T.compare(ke.row,ke.column)==-1&&T.setStart(ke),ke=Je.end,T.compare(ke.row,ke.column)==1&&T.setEnd(ke)):(ke=Je.start,T.compare(ke.row,ke.column)==-1&&(T=r.fromPoints(Je.start,Je.start)))}}return T},U.prototype.replace=function(V,C){return this.doc.replace(V,C)},U.prototype.moveText=function(V,C,y){var T=this.getTextRange(V),ke=this.getFoldsInRange(V),Qe=r.fromPoints(C,C);if(!y){this.remove(V);var Je=V.start.row-V.end.row,mt=Je?-V.end.column:V.start.column-V.end.column;mt&&(Qe.start.row==V.end.row&&Qe.start.column>V.end.column&&(Qe.start.column+=mt),Qe.end.row==V.end.row&&Qe.end.column>V.end.column&&(Qe.end.column+=mt)),Je&&Qe.start.row>=V.end.row&&(Qe.start.row+=Je,Qe.end.row+=Je)}if(Qe.end=this.insert(Qe.start,T),ke.length){var yt=V.start,Qt=Qe.start,Je=Qt.row-yt.row,mt=Qt.column-yt.column;this.addFolds(ke.map(function(Yt){return Yt=Yt.clone(),Yt.start.row==yt.row&&(Yt.start.column+=mt),Yt.end.row==yt.row&&(Yt.end.column+=mt),Yt.start.row+=Je,Yt.end.row+=Je,Yt}))}return Qe},U.prototype.indentRows=function(V,C,y){y=y.replace(/\t/g,this.getTabString());for(var T=V;T<=C;T++)this.doc.insertInLine({row:T,column:0},y)},U.prototype.outdentRows=function(V){for(var C=V.collapseRows(),y=new r(0,0,0,0),T=this.getTabSize(),ke=C.start.row;ke<=C.end.row;++ke){var Qe=this.getLine(ke);y.start.row=ke,y.end.row=ke;for(var Je=0;Je<T&&Qe.charAt(Je)==" ";++Je);Je<T&&Qe.charAt(Je)==" "?(y.start.column=Je,y.end.column=Je+1):(y.start.column=0,y.end.column=Je),this.remove(y)}},U.prototype.$moveLines=function(V,C,y){if(V=this.getRowFoldStart(V),C=this.getRowFoldEnd(C),y<0){var T=this.getRowFoldStart(V+y);if(T<0)return 0;var ke=T-V}else if(y>0){var T=this.getRowFoldEnd(C+y);if(T>this.doc.getLength()-1)return 0;var ke=T-C}else{V=this.$clipRowToDocument(V),C=this.$clipRowToDocument(C);var ke=C-V+1}var Qe=new r(V,0,C,Number.MAX_VALUE),Je=this.getFoldsInRange(Qe).map(function(yt){return yt=yt.clone(),yt.start.row+=ke,yt.end.row+=ke,yt}),mt=y==0?this.doc.getLines(V,C):this.doc.removeFullLines(V,C);return this.doc.insertFullLines(V+ke,mt),Je.length&&this.addFolds(Je),ke},U.prototype.moveLinesUp=function(V,C){return this.$moveLines(V,C,-1)},U.prototype.moveLinesDown=function(V,C){return this.$moveLines(V,C,1)},U.prototype.duplicateLines=function(V,C){return this.$moveLines(V,C,0)},U.prototype.$clipRowToDocument=function(V){return Math.max(0,Math.min(V,this.doc.getLength()-1))},U.prototype.$clipColumnToRow=function(V,C){return C<0?0:Math.min(this.doc.getLine(V).length,C)},U.prototype.$clipPositionToDocument=function(V,C){if(C=Math.max(0,C),V<0)V=0,C=0;else{var y=this.doc.getLength();V>=y?(V=y-1,C=this.doc.getLine(y-1).length):C=Math.min(this.doc.getLine(V).length,C)}return{row:V,column:C}},U.prototype.$clipRangeToDocument=function(V){V.start.row<0?(V.start.row=0,V.start.column=0):V.start.column=this.$clipColumnToRow(V.start.row,V.start.column);var C=this.doc.getLength()-1;return V.end.row>C?(V.end.row=C,V.end.column=this.doc.getLine(C).length):V.end.column=this.$clipColumnToRow(V.end.row,V.end.column),V},U.prototype.setUseWrapMode=function(V){if(V!=this.$useWrapMode){if(this.$useWrapMode=V,this.$modified=!0,this.$resetRowCache(0),V){var C=this.getLength();this.$wrapData=Array(C),this.$updateWrapData(0,C-1)}this._signal("changeWrapMode")}},U.prototype.getUseWrapMode=function(){return this.$useWrapMode},U.prototype.setWrapLimitRange=function(V,C){(this.$wrapLimitRange.min!==V||this.$wrapLimitRange.max!==C)&&(this.$wrapLimitRange={min:V,max:C},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},U.prototype.adjustWrapLimit=function(V,C){var y=this.$wrapLimitRange;y.max<0&&(y={min:C,max:C});var T=this.$constrainWrapLimit(V,y.min,y.max);return T!=this.$wrapLimit&&T>1?(this.$wrapLimit=T,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},U.prototype.$constrainWrapLimit=function(V,C,y){return C&&(V=Math.max(C,V)),y&&(V=Math.min(y,V)),V},U.prototype.getWrapLimit=function(){return this.$wrapLimit},U.prototype.setWrapLimit=function(V){this.setWrapLimitRange(V,V)},U.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},U.prototype.$updateInternalDataOnChange=function(V){var C=this.$useWrapMode,y=V.action,T=V.start,ke=V.end,Qe=T.row,Je=ke.row,mt=Je-Qe,yt=null;if(this.$updating=!0,mt!=0)if(y==="remove"){this[C?"$wrapData":"$rowLengthCache"].splice(Qe,mt);var Qt=this.$foldData;yt=this.getFoldsInRange(V),this.removeFolds(yt);var bt=this.getFoldLine(ke.row),Gt=0;if(bt){bt.addRemoveChars(ke.row,ke.column,T.column-ke.column),bt.shiftRow(-mt);var Yt=this.getFoldLine(Qe);Yt&&Yt!==bt&&(Yt.merge(bt),bt=Yt),Gt=Qt.indexOf(bt)+1}for(Gt;Gt<Qt.length;Gt++){var bt=Qt[Gt];bt.start.row>=ke.row&&bt.shiftRow(-mt)}Je=Qe}else{var Zt=Array(mt);Zt.unshift(Qe,0);var Jt=C?this.$wrapData:this.$rowLengthCache;Jt.splice.apply(Jt,Zt);var Qt=this.$foldData,bt=this.getFoldLine(Qe),Gt=0;if(bt){var pi=bt.range.compareInside(T.row,T.column);pi==0?(bt=bt.split(T.row,T.column),bt&&(bt.shiftRow(mt),bt.addRemoveChars(Je,0,ke.column-T.column))):pi==-1&&(bt.addRemoveChars(Qe,0,ke.column-T.column),bt.shiftRow(mt)),Gt=Qt.indexOf(bt)+1}for(Gt;Gt<Qt.length;Gt++){var bt=Qt[Gt];bt.start.row>=Qe&&bt.shiftRow(mt)}}else{mt=Math.abs(V.start.column-V.end.column),y==="remove"&&(yt=this.getFoldsInRange(V),this.removeFolds(yt),mt=-mt);var bt=this.getFoldLine(Qe);bt&&bt.addRemoveChars(Qe,T.column,mt)}return C&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,C?this.$updateWrapData(Qe,Je):this.$updateRowLengthCache(Qe,Je),yt},U.prototype.$updateRowLengthCache=function(V,C){this.$rowLengthCache[V]=null,this.$rowLengthCache[C]=null},U.prototype.$updateWrapData=function(V,C){var y=this.doc.getAllLines(),T=this.getTabSize(),ke=this.$wrapData,Qe=this.$wrapLimit,Je,mt,yt=V;for(C=Math.min(C,y.length-1);yt<=C;)mt=this.getFoldLine(yt,mt),mt?(Je=[],mt.walk((function(Qt,bt,Gt,Yt){var Zt;if(Qt!=null){Zt=this.$getDisplayTokens(Qt,Je.length),Zt[0]=$;for(var Jt=1;Jt<Zt.length;Jt++)Zt[Jt]=b}else Zt=this.$getDisplayTokens(y[bt].substring(Yt,Gt),Je.length);Je=Je.concat(Zt)}).bind(this),mt.end.row,y[mt.end.row].length+1),ke[mt.start.row]=this.$computeWrapSplits(Je,Qe,T),yt=mt.end.row+1):(Je=this.$getDisplayTokens(y[yt]),ke[yt]=this.$computeWrapSplits(Je,Qe,T),yt++)},U.prototype.$computeWrapSplits=function(V,C,y){if(V.length==0)return[];var T=[],ke=V.length,Qe=0,Je=0,mt=this.$wrapAsCode,yt=this.$indentedSoftWrap,Qt=C<=Math.max(2*y,8)||yt===!1?0:Math.floor(C/2);function bt(){var pi=0;if(Qt===0)return pi;if(yt)for(var mi=0;mi<V.length;mi++){var gi=V[mi];if(gi==Te)pi+=1;else if(gi==de)pi+=y;else{if(gi==Y)continue;break}}return mt&&yt!==!1&&(pi+=y),Math.min(pi,Qt)}function Gt(pi){for(var mi=pi-Qe,gi=Qe;gi<pi;gi++){var vi=V[gi];(vi===12||vi===2)&&(mi-=1)}T.length||(Yt=bt(),T.indent=Yt),Je+=mi,T.push(Je),Qe=pi}for(var Yt=0;ke-Qe>C-Yt;){var Zt=Qe+C-Yt;if(V[Zt-1]>=Te&&V[Zt]>=Te){Gt(Zt);continue}if(V[Zt]==$||V[Zt]==b){for(Zt;Zt!=Qe-1&&V[Zt]!=$;Zt--);if(Zt>Qe){Gt(Zt);continue}for(Zt=Qe+C,Zt;Zt<V.length&&V[Zt]==b;Zt++);if(Zt==V.length)break;Gt(Zt);continue}for(var Jt=Math.max(Zt-(C-(C>>2)),Qe-1);Zt>Jt&&V[Zt]<$;)Zt--;if(mt){for(;Zt>Jt&&V[Zt]<$;)Zt--;for(;Zt>Jt&&V[Zt]==he;)Zt--}else for(;Zt>Jt&&V[Zt]<Te;)Zt--;if(Zt>Jt){Gt(++Zt);continue}Zt=Qe+C,V[Zt]==O&&Zt--,Gt(Zt-Yt)}return T},U.prototype.$getDisplayTokens=function(V,C){var y=[],T;C=C||0;for(var ke=0;ke<V.length;ke++){var Qe=V.charCodeAt(ke);if(Qe==9){T=this.getScreenTabSize(y.length+C),y.push(de);for(var Je=1;Je<T;Je++)y.push(Y)}else Qe==32?y.push(Te):Qe>39&&Qe<48||Qe>57&&Qe<64?y.push(he):Qe>=4352&&gt(Qe)?y.push(M,O):y.push(M)}return y},U.prototype.$getStringScreenWidth=function(V,C,y){if(C==0)return[0,0];C==null&&(C=1/0),y=y||0;var T,ke;for(ke=0;ke<V.length&&(T=V.charCodeAt(ke),T==9?y+=this.getScreenTabSize(y):T>=4352&&gt(T)?y+=2:y+=1,!(y>C));ke++);return[y,ke]},U.prototype.getRowLength=function(V){var C=1;return this.lineWidgets&&(C+=this.lineWidgets[V]&&this.lineWidgets[V].rowCount||0),!this.$useWrapMode||!this.$wrapData[V]?C:this.$wrapData[V].length+C},U.prototype.getRowLineCount=function(V){return!this.$useWrapMode||!this.$wrapData[V]?1:this.$wrapData[V].length+1},U.prototype.getRowWrapIndent=function(V){if(this.$useWrapMode){var C=this.screenToDocumentPosition(V,Number.MAX_VALUE),y=this.$wrapData[C.row];return y.length&&y[0]<C.column?y.indent:0}else return 0},U.prototype.getScreenLastRowColumn=function(V){var C=this.screenToDocumentPosition(V,Number.MAX_VALUE);return this.documentToScreenColumn(C.row,C.column)},U.prototype.getDocumentLastRowColumn=function(V,C){var y=this.documentToScreenRow(V,C);return this.getScreenLastRowColumn(y)},U.prototype.getDocumentLastRowColumnPosition=function(V,C){var y=this.documentToScreenRow(V,C);return this.screenToDocumentPosition(y,Number.MAX_VALUE/10)},U.prototype.getRowSplitData=function(V){if(this.$useWrapMode)return this.$wrapData[V]},U.prototype.getScreenTabSize=function(V){return this.$tabSize-(V%this.$tabSize|0)},U.prototype.screenToDocumentRow=function(V,C){return this.screenToDocumentPosition(V,C).row},U.prototype.screenToDocumentColumn=function(V,C){return this.screenToDocumentPosition(V,C).column},U.prototype.screenToDocumentPosition=function(V,C,y){if(V<0)return{row:0,column:0};var T,ke=0,Qe=0,Je,mt=0,yt=0,Qt=this.$screenRowCache,bt=this.$getRowCacheIndex(Qt,V),Gt=Qt.length;if(Gt&&bt>=0)var mt=Qt[bt],ke=this.$docRowCache[bt],Yt=V>Qt[Gt-1];else var Yt=!Gt;for(var Zt=this.getLength()-1,Jt=this.getNextFoldLine(ke),pi=Jt?Jt.start.row:1/0;mt<=V&&(yt=this.getRowLength(ke),!(mt+yt>V||ke>=Zt));)mt+=yt,ke++,ke>pi&&(ke=Jt.end.row+1,Jt=this.getNextFoldLine(ke,Jt),pi=Jt?Jt.start.row:1/0),Yt&&(this.$docRowCache.push(ke),this.$screenRowCache.push(mt));if(Jt&&Jt.start.row<=ke)T=this.getFoldDisplayLine(Jt),ke=Jt.start.row;else{if(mt+yt<=V||ke>Zt)return{row:Zt,column:this.getLine(Zt).length};T=this.getLine(ke),Jt=null}var mi=0,gi=Math.floor(V-mt);if(this.$useWrapMode){var vi=this.$wrapData[ke];vi&&(Je=vi[gi],gi>0&&vi.length&&(mi=vi.indent,Qe=vi[gi-1]||vi[vi.length-1],T=T.substring(Qe)))}return y!==void 0&&this.$bidiHandler.isBidiRow(mt+gi,ke,gi)&&(C=this.$bidiHandler.offsetToCol(y)),Qe+=this.$getStringScreenWidth(T,C-mi)[1],this.$useWrapMode&&Qe>=Je&&(Qe=Je-1),Jt?Jt.idxToPosition(Qe):{row:ke,column:Qe}},U.prototype.documentToScreenPosition=function(V,C){if(typeof C>"u")var y=this.$clipPositionToDocument(V.row,V.column);else y=this.$clipPositionToDocument(V,C);V=y.row,C=y.column;var T=0,ke=null,Qe=null;Qe=this.getFoldAt(V,C,1),Qe&&(V=Qe.start.row,C=Qe.start.column);var Je,mt=0,yt=this.$docRowCache,Qt=this.$getRowCacheIndex(yt,V),bt=yt.length;if(bt&&Qt>=0)var mt=yt[Qt],T=this.$screenRowCache[Qt],Gt=V>yt[bt-1];else var Gt=!bt;for(var Yt=this.getNextFoldLine(mt),Zt=Yt?Yt.start.row:1/0;mt<V;){if(mt>=Zt){if(Je=Yt.end.row+1,Je>V)break;Yt=this.getNextFoldLine(Je,Yt),Zt=Yt?Yt.start.row:1/0}else Je=mt+1;T+=this.getRowLength(mt),mt=Je,Gt&&(this.$docRowCache.push(mt),this.$screenRowCache.push(T))}var Jt="";Yt&&mt>=Zt?(Jt=this.getFoldDisplayLine(Yt,V,C),ke=Yt.start.row):(Jt=this.getLine(V).substring(0,C),ke=V);var pi=0;if(this.$useWrapMode){var mi=this.$wrapData[ke];if(mi){for(var gi=0;Jt.length>=mi[gi];)T++,gi++;Jt=Jt.substring(mi[gi-1]||0,Jt.length),pi=gi>0?mi.indent:0}}return this.lineWidgets&&this.lineWidgets[mt]&&this.lineWidgets[mt].rowsAbove&&(T+=this.lineWidgets[mt].rowsAbove),{row:T,column:pi+this.$getStringScreenWidth(Jt)[0]}},U.prototype.documentToScreenColumn=function(V,C){return this.documentToScreenPosition(V,C).column},U.prototype.documentToScreenRow=function(V,C){return this.documentToScreenPosition(V,C).row},U.prototype.getScreenLength=function(){var V=0,C=null;if(this.$useWrapMode)for(var ke=this.$wrapData.length,Qe=0,T=0,C=this.$foldData[T++],Je=C?C.start.row:1/0;Qe<ke;){var mt=this.$wrapData[Qe];V+=mt?mt.length+1:1,Qe++,Qe>Je&&(Qe=C.end.row+1,C=this.$foldData[T++],Je=C?C.start.row:1/0)}else{V=this.getLength();for(var y=this.$foldData,T=0;T<y.length;T++)C=y[T],V-=C.end.row-C.start.row}return this.lineWidgets&&(V+=this.$getWidgetScreenLength()),V},U.prototype.$setFontMetrics=function(V){this.$enableVarChar&&(this.$getStringScreenWidth=function(C,y,T){if(y===0)return[0,0];y||(y=1/0),T=T||0;var ke,Qe;for(Qe=0;Qe<C.length&&(ke=C.charAt(Qe),ke===" "?T+=this.getScreenTabSize(T):T+=V.getCharacterWidth(ke),!(T>y));Qe++);return[T,Qe]})},U.prototype.getPrecedingCharacter=function(){var V=this.selection.getCursor();if(V.column===0)return V.row===0?"":this.doc.getNewLineCharacter();var C=this.getLine(V.row);return C[V.column-1]},U.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()},U}();m.$uid=0,m.prototype.$modes=c.$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=gt,x.implement(m.prototype,h);var M=1,O=2,$=3,b=4,he=9,Te=10,de=11,Y=12;function gt(U){return U<4352?!1:U>=4352&&U<=4447||U>=4515&&U<=4519||U>=4602&&U<=4607||U>=9001&&U<=9002||U>=11904&&U<=11929||U>=11931&&U<=12019||U>=12032&&U<=12245||U>=12272&&U<=12283||U>=12288&&U<=12350||U>=12353&&U<=12438||U>=12441&&U<=12543||U>=12549&&U<=12589||U>=12593&&U<=12686||U>=12688&&U<=12730||U>=12736&&U<=12771||U>=12784&&U<=12830||U>=12832&&U<=12871||U>=12880&&U<=13054||U>=13056&&U<=19903||U>=19968&&U<=42124||U>=42128&&U<=42182||U>=43360&&U<=43388||U>=44032&&U<=55203||U>=55216&&U<=55238||U>=55243&&U<=55291||U>=63744&&U<=64255||U>=65040&&U<=65049||U>=65072&&U<=65106||U>=65108&&U<=65126||U>=65128&&U<=65131||U>=65281&&U<=65376||U>=65504&&U<=65510}p("./edit_session/folding").Folding.call(m.prototype),p("./edit_session/bracket_match").BracketMatch.call(m.prototype),c.defineOptions(m.prototype,"session",{wrap:{set:function(U){if(!U||U=="off"?U=!1:U=="free"?U=!0:U=="printMargin"?U=-1:typeof U=="string"&&(U=parseInt(U,10)||!1),this.$wrap!=U)if(this.$wrap=U,!U)this.setUseWrapMode(!1);else{var V=typeof U=="number"?U:null;this.setWrapLimitRange(V,V),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(U){U=U=="auto"?this.$mode.type!="text":U!="text",U!=this.$wrapAsCode&&(this.$wrapAsCode=U,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(U){this.$useWorker=U,this.$stopWorker(),U&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(U){U=parseInt(U),U>0&&this.$tabSize!==U&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=U,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(U){this.setFoldStyle(U)},handlesSet:!0},overwrite:{set:function(U){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(U){this.doc.setNewLineMode(U)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(U){this.setMode(U)},get:function(){return this.$modeId},handlesSet:!0}}),v.EditSession=m}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(p,v,fe){var x=p("./lib/lang"),w=p("./lib/oop"),A=p("./range").Range,c=function(){function r(){this.$options={}}return r.prototype.set=function(i){return w.mixin(this.$options,i),this},r.prototype.getOptions=function(){return x.copyObject(this.$options)},r.prototype.setOptions=function(i){this.$options=i},r.prototype.find=function(i){var e=this.$options,t=this.$matchIterator(i,e);if(!t)return!1;var a=null;return t.forEach(function(g,m,M,O){return a=new A(g,m,M,O),m==O&&e.start&&e.start.start&&e.skipCurrent!=!1&&a.isEqual(e.start)?(a=null,!1):!0}),a},r.prototype.findAll=function(i){var e=this.$options;if(!e.needle)return[];this.$assembleRegExp(e);var t=e.range,a=t?i.getLines(t.start.row,t.end.row):i.doc.getAllLines(),g=[],m=e.re;if(e.$isMultiLine){var M=m.length,O=a.length-M,$;e:for(var b=m.offset||0;b<=O;b++){for(var he=0;he<M;he++)if(a[b+he].search(m[he])==-1)continue e;var Te=a[b],de=a[b+M-1],Y=Te.length-Te.match(m[0])[0].length,gt=de.match(m[M-1])[0].length;$&&$.end.row===b&&$.end.column>Y||(g.push($=new A(b,Y,b+M-1,gt)),M>2&&(b=b+M-2))}}else for(var U,V=0;V<a.length;V++)if(this.$isMultilineSearch(e)){var C=a.length-1;if(U=this.$multiLineForward(i,m,V,C),U){var y=U.endRow<=C?U.endRow-1:C;y>V&&(V=y),g.push(new A(U.startRow,U.startCol,U.endRow,U.endCol))}}else{U=x.getMatchOffsets(a[V],m);for(var he=0;he<U.length;he++){var T=U[he];g.push(new A(V,T.offset,V,T.offset+T.length))}}if(t){for(var ke=t.start.column,Qe=t.end.column,V=0,he=g.length-1;V<he&&g[V].start.column<ke&&g[V].start.row==0;)V++;for(var Je=t.end.row-t.start.row;V<he&&g[he].end.column>Qe&&g[he].end.row==Je;)he--;for(g=g.slice(V,he+1),V=0,he=g.length;V<he;V++)g[V].start.row+=t.start.row,g[V].end.row+=t.start.row}return g},r.prototype.parseReplaceString=function(i){for(var e={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},t="",a=0,g=i.length;a<g;a++){var m=i.charCodeAt(a);if(m===e.Backslash){if(a++,a>=g){t+="\\";break}var M=i.charCodeAt(a);switch(M){case e.Backslash:t+="\\";break;case e.n:t+=`
202
+ `;break;case e.t:t+=" ";break}continue}if(m===e.DollarSign){if(a++,a>=g){t+="$";break}var O=i.charCodeAt(a);if(O===e.DollarSign){t+="$$";continue}if(O===e.Digit0||O===e.Ampersand){t+="$&";continue}if(e.Digit1<=O&&O<=e.Digit9){t+="$"+i[a];continue}}t+=i[a]}return t||i},r.prototype.replace=function(i,e){var t=this.$options,a=this.$assembleRegExp(t);if(t.$isMultiLine)return e;if(a){var g=this.$isMultilineSearch(t);g&&(i=i.replace(/\r\n|\r|\n/g,`
203
+ `));var m=a.exec(i);if(!m||!g&&m[0].length!=i.length)return null;if(e=t.regExp?this.parseReplaceString(e):e.replace(/\$/g,"$$$$"),e=i.replace(a,e),t.preserveCase){e=e.split("");for(var M=Math.min(i.length,i.length);M--;){var O=i[M];O&&O.toLowerCase()!=O?e[M]=e[M].toUpperCase():e[M]=e[M].toLowerCase()}e=e.join("")}return e}},r.prototype.$assembleRegExp=function(i,e){if(i.needle instanceof RegExp)return i.re=i.needle;var t=i.needle;if(!i.needle)return i.re=!1;i.regExp||(t=x.escapeRegExp(t));var a=i.caseSensitive?"gm":"gmi";try{new RegExp(t,"u"),i.$supportsUnicodeFlag=!0,a+="u"}catch{i.$supportsUnicodeFlag=!1}if(i.wholeWord&&(t=h(t,i)),i.$isMultiLine=!e&&/[\n\r]/.test(t),i.$isMultiLine)return i.re=this.$assembleMultilineRegExp(t,a);try{var g=new RegExp(t,a)}catch{g=!1}return i.re=g},r.prototype.$assembleMultilineRegExp=function(i,e){for(var t=i.replace(/\r\n|\r|\n/g,`$
204
+ ^`).split(`
205
+ `),a=[],g=0;g<t.length;g++)try{a.push(new RegExp(t[g],e))}catch{return!1}return a},r.prototype.$isMultilineSearch=function(i){return i.re&&/\\r\\n|\\r|\\n/.test(i.re.source)&&i.regExp&&!i.$isMultiLine},r.prototype.$multiLineForward=function(i,e,t,a){for(var g,m=o(i,t),M=t;M<=a;){for(var O=0;O<m&&!(M>a);O++){var $=i.getLine(M++);g=g==null?$:g+`
206
+ `+$}var b=e.exec(g);if(e.lastIndex=0,b){var he=g.slice(0,b.index).split(`
207
+ `),Te=b[0].split(`
208
+ `),de=t+he.length-1,Y=he[he.length-1].length,gt=de+Te.length-1,U=Te.length==1?Y+Te[0].length:Te[Te.length-1].length;return{startRow:de,startCol:Y,endRow:gt,endCol:U}}}return null},r.prototype.$multiLineBackward=function(i,e,t,a,g){for(var m,M=o(i,a),O=i.getLine(a).length-t,$=a;$>=g;){for(var b=0;b<M&&$>=g;b++){var he=i.getLine($--);m=m==null?he:he+`
209
+ `+m}var Te=n(m,e,O);if(Te){var de=m.slice(0,Te.index).split(`
210
+ `),Y=Te[0].split(`
211
+ `),gt=$+de.length,U=de[de.length-1].length,V=gt+Y.length-1,C=Y.length==1?U+Y[0].length:Y[Y.length-1].length;return{startRow:gt,startCol:U,endRow:V,endCol:C}}}return null},r.prototype.$matchIterator=function(i,e){var t=this.$assembleRegExp(e);if(!t)return!1;var a=this.$isMultilineSearch(e),g=this.$multiLineForward,m=this.$multiLineBackward,M=e.backwards==!0,O=e.skipCurrent!=!1,$=t.unicode,b=e.range,he=e.start;he||(he=b?b[M?"end":"start"]:i.selection.getRange()),he.start&&(he=he[O!=M?"end":"start"]);var Te=b?b.start.row:0,de=b?b.end.row:i.getLength()-1;if(M)var Y=function(V){var C=he.row;if(!U(C,he.column,V)){for(C--;C>=Te;C--)if(U(C,Number.MAX_VALUE,V))return;if(e.wrap!=!1){for(C=de,Te=he.row;C>=Te;C--)if(U(C,Number.MAX_VALUE,V))return}}};else var Y=function(C){var y=he.row;if(!U(y,he.column,C)){for(y=y+1;y<=de;y++)if(U(y,0,C))return;if(e.wrap!=!1){for(y=Te,de=he.row;y<=de;y++)if(U(y,0,C))return}}};if(e.$isMultiLine)var gt=t.length,U=function(V,C,y){var T=M?V-gt+1:V;if(!(T<0||T+gt>i.getLength())){var ke=i.getLine(T),Qe=ke.search(t[0]);if(!(!M&&Qe<C||Qe===-1)){for(var Je=1;Je<gt;Je++)if(ke=i.getLine(T+Je),ke.search(t[Je])==-1)return;var mt=ke.match(t[gt-1])[0].length;if(!(M&&mt>C)&&y(T,Qe,T+gt-1,mt))return!0}}};else if(M)var U=function(C,y,T){if(a){var ke=m(i,t,y,C,Te);if(!ke)return!1;if(T(ke.startRow,ke.startCol,ke.endRow,ke.endCol))return!0}else{var Qe=i.getLine(C),Je=[],mt,yt=0;for(t.lastIndex=0;mt=t.exec(Qe);){var Qt=mt[0].length;if(yt=mt.index,!Qt){if(yt>=Qe.length)break;t.lastIndex=yt+=x.skipEmptyMatch(Qe,yt,$)}if(mt.index+Qt>y)break;Je.push(mt.index,Qt)}for(var bt=Je.length-1;bt>=0;bt-=2){var Gt=Je[bt-1],Qt=Je[bt];if(T(C,Gt,C,Gt+Qt))return!0}}};else var U=function(C,y,T){if(t.lastIndex=y,a){var ke=g(i,t,C,de);if(ke){var Qe=ke.endRow<=de?ke.endRow-1:de;Qe>C&&(C=Qe)}if(!ke)return!1;if(T(ke.startRow,ke.startCol,ke.endRow,ke.endCol))return!0}else for(var Je=i.getLine(C),mt,yt;yt=t.exec(Je);){var Qt=yt[0].length;if(mt=yt.index,T(C,mt,C,mt+Qt))return!0;if(!Qt&&(t.lastIndex=mt+=x.skipEmptyMatch(Je,mt,$),mt>=Je.length))return!1}};return{forEach:Y}},r}();function h(r,i){var e=x.supportsLookbehind();function t(M,O){O===void 0&&(O=!0);var $=e&&i.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return $.test(M)||i.regExp?e&&i.$supportsUnicodeFlag?O?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var a=Array.from(r),g=a[0],m=a[a.length-1];return t(g)+r+t(m,!1)}function n(r,i,e){for(var t=null,a=0;a<=r.length;){i.lastIndex=a;var g=i.exec(r);if(!g)break;var m=g.index+g[0].length;if(m>r.length-e)break;(!t||m>t.index+t[0].length)&&(t=g),a=g.index+1}return t}function o(r,i){var e=5e3,t={row:i,column:0},a=r.doc.positionToIndex(t),g=a+e,m=r.doc.indexToPosition(g),M=m.row;return M+1}v.Search=c}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(p,v,fe){var x=this&&this.__extends||function(){var r=function(i,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var g in a)Object.prototype.hasOwnProperty.call(a,g)&&(t[g]=a[g])},r(i,e)};return function(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(i,e);function t(){this.constructor=i}i.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}}(),w=p("../lib/keys"),A=p("../lib/useragent"),c=w.KEY_MODS,h=function(){function r(i,e){this.$init(i,e,!1)}return r.prototype.$init=function(i,e,t){this.platform=e||(A.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(i),this.$singleCommand=t},r.prototype.addCommand=function(i){this.commands[i.name]&&this.removeCommand(i),this.commands[i.name]=i,i.bindKey&&this._buildKeyHash(i)},r.prototype.removeCommand=function(i,e){var t=i&&(typeof i=="string"?i:i.name);i=this.commands[t],e||delete this.commands[t];var a=this.commandKeyBinding;for(var g in a){var m=a[g];if(m==i)delete a[g];else if(Array.isArray(m)){var M=m.indexOf(i);M!=-1&&(m.splice(M,1),m.length==1&&(a[g]=m[0]))}}},r.prototype.bindKey=function(i,e,t){if(typeof i=="object"&&i&&(t==null&&(t=i.position),i=i[this.platform]),!!i){if(typeof e=="function")return this.addCommand({exec:e,bindKey:i,name:e.name||i});i.split("|").forEach(function(a){var g="";if(a.indexOf(" ")!=-1){var m=a.split(/\s+/);a=m.pop(),m.forEach(function($){var b=this.parseKeys($),he=c[b.hashId]+b.key;g+=(g?" ":"")+he,this._addCommandToBinding(g,"chainKeys")},this),g+=" "}var M=this.parseKeys(a),O=c[M.hashId]+M.key;this._addCommandToBinding(g+O,e,t)},this)}},r.prototype._addCommandToBinding=function(i,e,t){var a=this.commandKeyBinding,g;if(!e)delete a[i];else if(!a[i]||this.$singleCommand)a[i]=e;else{Array.isArray(a[i])?(g=a[i].indexOf(e))!=-1&&a[i].splice(g,1):a[i]=[a[i]],typeof t!="number"&&(t=n(e));var m=a[i];for(g=0;g<m.length;g++){var M=m[g],O=n(M);if(O>t)break}m.splice(g,0,e)}},r.prototype.addCommands=function(i){i&&Object.keys(i).forEach(function(e){var t=i[e];if(t){if(typeof t=="string")return this.bindKey(t,e);typeof t=="function"&&(t={exec:t}),typeof t=="object"&&(t.name||(t.name=e),this.addCommand(t))}},this)},r.prototype.removeCommands=function(i){Object.keys(i).forEach(function(e){this.removeCommand(i[e])},this)},r.prototype.bindKeys=function(i){Object.keys(i).forEach(function(e){this.bindKey(e,i[e])},this)},r.prototype._buildKeyHash=function(i){this.bindKey(i.bindKey,i)},r.prototype.parseKeys=function(i){var e=i.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(O){return O}),t=e.pop(),a=w[t];if(w.FUNCTION_KEYS[a])t=w.FUNCTION_KEYS[a].toLowerCase();else if(e.length){if(e.length==1&&e[0]=="shift")return{key:t.toUpperCase(),hashId:-1}}else return{key:t,hashId:-1};for(var g=0,m=e.length;m--;){var M=w.KEY_MODS[e[m]];if(M==null)return typeof console<"u"&&console.error("invalid modifier "+e[m]+" in "+i),!1;g|=M}return{key:t,hashId:g}},r.prototype.findKeyCommand=function(i,e){var t=c[i]+e;return this.commandKeyBinding[t]},r.prototype.handleKeyboard=function(i,e,t,a){if(!(a<0)){var g=c[e]+t,m=this.commandKeyBinding[g];return i.$keyChain&&(i.$keyChain+=" "+g,m=this.commandKeyBinding[i.$keyChain]||m),m&&(m=="chainKeys"||m[m.length-1]=="chainKeys")?(i.$keyChain=i.$keyChain||g,{command:"null"}):(i.$keyChain&&((!e||e==4)&&t.length==1?i.$keyChain=i.$keyChain.slice(0,-g.length-1):(e==-1||a>0)&&(i.$keyChain="")),{command:m})}},r.prototype.getStatusText=function(i,e){return e.$keyChain||""},r}();function n(r){return typeof r=="object"&&r.bindKey&&r.bindKey.position||(r.isDefault?-100:0)}var o=function(r){x(i,r);function i(e,t){var a=r.call(this,e,t)||this;return a.$singleCommand=!0,a}return i}(h);o.call=function(r,i,e){h.prototype.$init.call(r,i,e,!0)},h.call=function(r,i,e){h.prototype.$init.call(r,i,e,!1)},v.HashHandler=o,v.MultiHashHandler=h}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(p,v,fe){var x=this&&this.__extends||function(){var n=function(o,r){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,e){i.__proto__=e}||function(i,e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t])},n(o,r)};return function(o,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(o,r);function i(){this.constructor=o}o.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}}(),w=p("../lib/oop"),A=p("../keyboard/hash_handler").MultiHashHandler,c=p("../lib/event_emitter").EventEmitter,h=function(n){x(o,n);function o(r,i){var e=n.call(this,i,r)||this;return e.byName=e.commands,e.setDefaultHandler("exec",function(t){return t.args?t.command.exec(t.editor,t.args,t.event,!1):t.command.exec(t.editor,{},t.event,!0)}),e}return o.prototype.exec=function(r,i,e){if(Array.isArray(r)){for(var t=r.length;t--;)if(this.exec(r[t],i,e))return!0;return!1}typeof r=="string"&&(r=this.commands[r]);var a={editor:i,command:r,args:e};return this.canExecute(r,i)?(a.returnValue=this._emit("exec",a),this._signal("afterExec",a),a.returnValue!==!1):(this._signal("commandUnavailable",a),!1)},o.prototype.canExecute=function(r,i){return typeof r=="string"&&(r=this.commands[r]),!(!r||i&&i.$readOnly&&!r.readOnly||this.$checkCommandState!=!1&&r.isAvailable&&!r.isAvailable(i))},o.prototype.toggleRecording=function(r){if(!this.$inReplay)return r&&r._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(i){this.macro.push([i.command,i.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},o.prototype.replay=function(r){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(r);try{this.$inReplay=!0,this.macro.forEach(function(i){typeof i=="string"?this.exec(i,r):this.exec(i[0],r,i[1])},this)}finally{this.$inReplay=!1}}},o.prototype.trimMacro=function(r){return r.map(function(i){return typeof i[0]!="string"&&(i[0]=i[0].name),i[1]||(i=i[0]),i})},o}(A);w.implement(h.prototype,c),v.CommandManager=h}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(p,v,fe){var x=p("../lib/lang"),w=p("../config"),A=p("../range").Range;function c(n,o){return{win:n,mac:o}}v.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:c("Ctrl-,","Command-,"),exec:function(n){w.loadModule("ace/ext/settings_menu",function(o){o.init(n),n.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:c("Alt-E","F4"),exec:function(n){w.loadModule("ace/ext/error_marker",function(o){o.showErrorMarker(n,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:c("Alt-Shift-E","Shift-F4"),exec:function(n){w.loadModule("ace/ext/error_marker",function(o){o.showErrorMarker(n,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:c("Ctrl-A","Command-A"),exec:function(n){n.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:c(null,"Ctrl-L"),exec:function(n){n.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:c("Ctrl-L","Command-L"),exec:function(n,o){typeof o=="number"&&!isNaN(o)&&n.gotoLine(o),n.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:c("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(n){n.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:c("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(n){n.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:c("F2","F2"),exec:function(n){n.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:c("Alt-F2","Alt-F2"),exec:function(n){n.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:c(null,"Ctrl-Command-Option-0"),exec:function(n){n.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:c(null,"Ctrl-Command-Option-0"),exec:function(n){n.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:c("Alt-0","Command-Option-0"),exec:function(n){n.session.foldAll(),n.session.unfold(n.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:c("Alt-Shift-0","Command-Option-Shift-0"),exec:function(n){n.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:c("Ctrl-K","Command-G"),exec:function(n){n.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:c("Ctrl-Shift-K","Command-Shift-G"),exec:function(n){n.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:c("Alt-K","Ctrl-G"),exec:function(n){n.selection.isEmpty()?n.selection.selectWord():n.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:c("Alt-Shift-K","Ctrl-Shift-G"),exec:function(n){n.selection.isEmpty()?n.selection.selectWord():n.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:c("Ctrl-F","Command-F"),exec:function(n){w.loadModule("ace/ext/searchbox",function(o){o.Search(n)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(n){n.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:c("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(n){n.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:c("Ctrl-Home","Command-Home|Command-Up"),exec:function(n){n.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:c("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(n){n.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:c("Up","Up|Ctrl-P"),exec:function(n,o){n.navigateUp(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:c("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(n){n.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:c("Ctrl-End","Command-End|Command-Down"),exec:function(n){n.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:c("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(n){n.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:c("Down","Down|Ctrl-N"),exec:function(n,o){n.navigateDown(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:c("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(n){n.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:c("Ctrl-Left","Option-Left"),exec:function(n){n.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:c("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(n){n.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:c("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(n){n.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:c("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(n){n.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:c("Left","Left|Ctrl-B"),exec:function(n,o){n.navigateLeft(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:c("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(n){n.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:c("Ctrl-Right","Option-Right"),exec:function(n){n.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:c("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(n){n.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:c("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(n){n.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:c("Shift-Right","Shift-Right"),exec:function(n){n.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:c("Right","Right|Ctrl-F"),exec:function(n,o){n.navigateRight(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(n){n.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:c(null,"Option-PageDown"),exec:function(n){n.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:c("PageDown","PageDown|Ctrl-V"),exec:function(n){n.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(n){n.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:c(null,"Option-PageUp"),exec:function(n){n.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(n){n.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:c("Ctrl-Up",null),exec:function(n){n.renderer.scrollBy(0,-2*n.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:c("Ctrl-Down",null),exec:function(n){n.renderer.scrollBy(0,2*n.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(n){n.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(n){n.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:c("Ctrl-Alt-E","Command-Option-E"),exec:function(n){n.commands.toggleRecording(n)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:c("Ctrl-Shift-E","Command-Shift-E"),exec:function(n){n.commands.replay(n)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:c("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(n){n.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:c("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(n){n.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:c("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(n){n.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:c(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(n){},readOnly:!0},{name:"cut",description:"Cut",exec:function(n){var o=n.$copyWithEmptySelection&&n.selection.isEmpty(),r=o?n.selection.getLineRange():n.selection.getRange();n._emit("cut",r),r.isEmpty()||n.session.remove(r),n.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(n,o){n.$handlePaste(o)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:c("Ctrl-D","Command-D"),exec:function(n){n.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:c("Ctrl-Shift-D","Command-Shift-D"),exec:function(n){n.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:c("Ctrl-Alt-S","Command-Alt-S"),exec:function(n){n.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:c("Ctrl-/","Command-/"),exec:function(n){n.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:c("Ctrl-Shift-/","Command-Shift-/"),exec:function(n){n.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:c("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(n){n.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:c("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(n){n.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:c("Ctrl-H","Command-Option-F"),exec:function(n){w.loadModule("ace/ext/searchbox",function(o){o.Search(n,!0)})}},{name:"undo",description:"Undo",bindKey:c("Ctrl-Z","Command-Z"),exec:function(n){n.undo()}},{name:"redo",description:"Redo",bindKey:c("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(n){n.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:c("Alt-Shift-Up","Command-Option-Up"),exec:function(n){n.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:c("Alt-Up","Option-Up"),exec:function(n){n.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:c("Alt-Shift-Down","Command-Option-Down"),exec:function(n){n.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:c("Alt-Down","Option-Down"),exec:function(n){n.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:c("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(n){n.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:c("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(n){n.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:c("Shift-Delete",null),exec:function(n){if(n.selection.isEmpty())n.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:c("Alt-Backspace","Command-Backspace"),exec:function(n){n.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:c("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(n){n.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:c("Ctrl-Shift-Backspace",null),exec:function(n){var o=n.selection.getRange();o.start.column=0,n.session.remove(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:c("Ctrl-Shift-Delete",null),exec:function(n){var o=n.selection.getRange();o.end.column=Number.MAX_VALUE,n.session.remove(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:c("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(n){n.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:c("Ctrl-Delete","Alt-Delete"),exec:function(n){n.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:c("Shift-Tab","Shift-Tab"),exec:function(n){n.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:c("Tab","Tab"),exec:function(n){n.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:c("Ctrl-[","Ctrl-["),exec:function(n){n.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:c("Ctrl-]","Ctrl-]"),exec:function(n){n.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(n,o){n.insert(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(n,o){n.insert(x.stringRepeat(o.text||"",o.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:c(null,"Ctrl-O"),exec:function(n){n.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:c("Alt-Shift-X","Ctrl-T"),exec:function(n){n.transposeLetters()},multiSelectAction:function(n){n.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:c("Ctrl-U","Ctrl-U"),exec:function(n){n.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:c("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(n){n.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:c(null,null),exec:function(n){n.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:c("Ctrl-Shift-L","Command-Shift-L"),exec:function(n){var o=n.selection.getRange();o.start.column=o.end.column=0,o.end.row++,n.selection.setRange(o,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:c("Ctrl+F3","F3"),exec:function(n){n.openLink()}},{name:"joinlines",description:"Join lines",bindKey:c(null,null),exec:function(n){for(var o=n.selection.isBackwards(),r=o?n.selection.getSelectionLead():n.selection.getSelectionAnchor(),i=o?n.selection.getSelectionAnchor():n.selection.getSelectionLead(),e=n.session.doc.getLine(r.row).length,t=n.session.doc.getTextRange(n.selection.getRange()),a=t.replace(/\n\s*/," ").length,g=n.session.doc.getLine(r.row),m=r.row+1;m<=i.row+1;m++){var M=x.stringTrimLeft(x.stringTrimRight(n.session.doc.getLine(m)));M.length!==0&&(M=" "+M),g+=M}i.row+1<n.session.doc.getLength()-1&&(g+=n.session.doc.getNewLineCharacter()),n.clearSelection(),n.session.doc.replace(new A(r.row,0,i.row+2,0),g),a>0?(n.selection.moveCursorTo(r.row,r.column),n.selection.selectTo(r.row,r.column+a)):(e=n.session.doc.getLine(r.row).length>e?e+1:e,n.selection.moveCursorTo(r.row,e))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:c(null,null),exec:function(n){var o=n.session.doc.getLength()-1,r=n.session.doc.getLine(o).length,i=n.selection.rangeList.ranges,e=[];i.length<1&&(i=[n.selection.getRange()]);for(var t=0;t<i.length;t++)t==i.length-1&&(i[t].end.row===o&&i[t].end.column===r||e.push(new A(i[t].end.row,i[t].end.column,o,r))),t===0?i[t].start.row===0&&i[t].start.column===0||e.push(new A(0,0,i[t].start.row,i[t].start.column)):e.push(new A(i[t-1].end.row,i[t-1].end.column,i[t].start.row,i[t].start.column));n.exitMultiSelectMode(),n.clearSelection();for(var t=0;t<e.length;t++)n.selection.addRange(e[t],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(n){n.selection.clearSelection(),n.navigateLineEnd(),n.insert(`
212
+ `)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(n){n.selection.clearSelection();var o=n.getCursorPosition();n.selection.moveTo(o.row-1,Number.MAX_VALUE),n.insert(`
213
+ `),o.row===0&&n.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(n){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),n.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:c("F1","F1"),exec:function(n){n.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:c(null,null),exec:function(n){n.prompt({$type:"modes"})},readOnly:!0}];for(var h=1;h<9;h++)v.commands.push({name:"foldToLevel"+h,description:"Fold To Level "+h,level:h,exec:function(n){n.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys"],function(p,v,fe){var x=p("../lib/keys"),w=function(){function c(h){this.editor=h,this.gutterLayer=h.renderer.$gutterLayer,this.element=h.renderer.$gutter,this.lines=h.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=this.editor.$mouseHandler.$tooltip}return c.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))},c.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))},c.prototype.$onGutterKeyDown=function(h){if(this.annotationTooltip.isOpen){h.preventDefault(),h.keyCode===x.escape&&this.annotationTooltip.hide();return}if(h.target===this.element){if(h.keyCode!=x.enter)return;h.preventDefault();var n=this.editor.getCursorPosition().row;this.editor.isRowVisible(n)||this.editor.scrollToLine(n,!0,!0),setTimeout((function(){var o=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),r=this.$findNearestFoldLaneWidget(o),i=this.$findNearestAnnotation(o);if(!(r===null&&i===null)){var e=this.$findClosestNumber(r,i,o);if(e===r)if(this.activeLane="fold",this.activeRowIndex=r,this.$isCustomWidgetVisible(r)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=i,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(h),setTimeout((function(){this.editor._signal("gutterkeydown",new A(h,this))}).bind(this),10)},c.prototype.$handleGutterKeyboardInteraction=function(h){if(h.keyCode===x.tab){h.preventDefault();return}if(h.keyCode===x.escape){h.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(h.keyCode===x.up){switch(h.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(h.keyCode===x.down){switch(h.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(h.keyCode===x.left){h.preventDefault(),this.$switchLane("annotation");return}if(h.keyCode===x.right){h.preventDefault(),this.$switchLane("fold");return}if(h.keyCode===x.enter||h.keyCode===x.space){switch(h.preventDefault(),this.activeLane){case"fold":var n=this.$rowIndexToRow(this.activeRowIndex),o=this.editor.session.$gutterCustomWidgets[n];if(o)o.callbacks&&o.callbacks.onClick&&o.callbacks.onClick(h,n);else if(this.gutterLayer.session.foldWidgets[n]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),h),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==n&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(n),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex)),this.annotationTooltip.$fromKeyboard=!0;break}return}},c.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.hide()},c.prototype.$isFoldWidgetVisible=function(h){var n=this.editor.isRowFullyVisible(this.$rowIndexToRow(h)),o=this.$getFoldWidget(h).style.display!=="none";return n&&o},c.prototype.$isCustomWidgetVisible=function(h){var n=this.editor.isRowFullyVisible(this.$rowIndexToRow(h)),o=!!this.$getCustomWidget(h);return n&&o},c.prototype.$isAnnotationVisible=function(h){var n=this.editor.isRowFullyVisible(this.$rowIndexToRow(h)),o=this.$getAnnotation(h).style.display!=="none";return n&&o},c.prototype.$getFoldWidget=function(h){var n=this.lines.get(h),o=n.element;return o.childNodes[1]},c.prototype.$getCustomWidget=function(h){var n=this.lines.get(h),o=n.element;return o.childNodes[3]},c.prototype.$getAnnotation=function(h){var n=this.lines.get(h),o=n.element;return o.childNodes[2]},c.prototype.$findNearestFoldLaneWidget=function(h){if(this.$isCustomWidgetVisible(h)||this.$isFoldWidgetVisible(h))return h;for(var n=0;h-n>0||h+n<this.lines.getLength()-1;){if(n++,h-n>=0&&this.$isCustomWidgetVisible(h-n))return h-n;if(h+n<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(h+n))return h+n;if(h-n>=0&&this.$isFoldWidgetVisible(h-n))return h-n;if(h+n<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(h+n))return h+n}return null},c.prototype.$findNearestAnnotation=function(h){if(this.$isAnnotationVisible(h))return h;for(var n=0;h-n>0||h+n<this.lines.getLength()-1;){if(n++,h-n>=0&&this.$isAnnotationVisible(h-n))return h-n;if(h+n<=this.lines.getLength()-1&&this.$isAnnotationVisible(h+n))return h+n}return null},c.prototype.$focusFoldWidget=function(h){if(h!=null){var n=this.$getFoldWidget(h);n.classList.add(this.editor.renderer.keyboardFocusClassName),n.focus()}},c.prototype.$focusCustomWidget=function(h){if(h!=null){var n=this.$getCustomWidget(h);n&&(n.classList.add(this.editor.renderer.keyboardFocusClassName),n.focus())}},c.prototype.$focusAnnotation=function(h){if(h!=null){var n=this.$getAnnotation(h);n.classList.add(this.editor.renderer.keyboardFocusClassName),n.focus()}},c.prototype.$blurFoldWidget=function(h){var n=this.$getFoldWidget(h);n.classList.remove(this.editor.renderer.keyboardFocusClassName),n.blur()},c.prototype.$blurCustomWidget=function(h){var n=this.$getCustomWidget(h);n&&(n.classList.remove(this.editor.renderer.keyboardFocusClassName),n.blur())},c.prototype.$blurAnnotation=function(h){var n=this.$getAnnotation(h);n.classList.remove(this.editor.renderer.keyboardFocusClassName),n.blur()},c.prototype.$moveFoldWidgetUp=function(){for(var h=this.activeRowIndex;h>0;)if(h--,this.$isFoldWidgetVisible(h)||this.$isCustomWidgetVisible(h)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=h,this.$isFoldWidgetVisible(h)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},c.prototype.$moveFoldWidgetDown=function(){for(var h=this.activeRowIndex;h<this.lines.getLength()-1;)if(h++,this.$isFoldWidgetVisible(h)||this.$isCustomWidgetVisible(h)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=h,this.$isFoldWidgetVisible(h)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},c.prototype.$moveAnnotationUp=function(){for(var h=this.activeRowIndex;h>0;)if(h--,this.$isAnnotationVisible(h)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=h,this.$focusAnnotation(this.activeRowIndex);return}},c.prototype.$moveAnnotationDown=function(){for(var h=this.activeRowIndex;h<this.lines.getLength()-1;)if(h++,this.$isAnnotationVisible(h)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=h,this.$focusAnnotation(this.activeRowIndex);return}},c.prototype.$findClosestNumber=function(h,n,o){return h===null?n:n===null||Math.abs(o-h)<=Math.abs(o-n)?h:n},c.prototype.$switchLane=function(h){switch(h){case"annotation":if(this.activeLane==="annotation")break;var n=this.$findNearestAnnotation(this.activeRowIndex);if(n==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=n,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}},c.prototype.$rowIndexToRow=function(h){var n=this.lines.get(h);return n?n.row:null},c.prototype.$rowToRowIndex=function(h){for(var n=0;n<this.lines.getLength();n++){var o=this.lines.get(n);if(o.row==h)return n}return null},c}();v.GutterKeyboardHandler=w;var A=function(){function c(h,n){this.gutterKeyboardHandler=n,this.domEvent=h}return c.prototype.getKey=function(){return x.keyCodeToString(this.domEvent.keyCode)},c.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},c.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},c.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},c}();v.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(p,v,fe){var x=this&&this.__values||function(C){var y=typeof Symbol=="function"&&Symbol.iterator,T=y&&C[y],ke=0;if(T)return T.call(C);if(C&&typeof C.length=="number")return{next:function(){return C&&ke>=C.length&&(C=void 0),{value:C&&C[ke++],done:!C}}};throw new TypeError(y?"Object is not iterable.":"Symbol.iterator is not defined.")},w=p("./lib/oop"),A=p("./lib/dom"),c=p("./lib/lang"),h=p("./lib/useragent"),n=p("./keyboard/textinput").TextInput,o=p("./mouse/mouse_handler").MouseHandler,r=p("./mouse/fold_handler").FoldHandler,i=p("./keyboard/keybinding").KeyBinding,e=p("./edit_session").EditSession,t=p("./search").Search,a=p("./range").Range,g=p("./lib/event_emitter").EventEmitter,m=p("./commands/command_manager").CommandManager,M=p("./commands/default_commands").commands,O=p("./config"),$=p("./token_iterator").TokenIterator,b=p("./keyboard/gutter_handler").GutterKeyboardHandler,he=p("./config").nls,Te=p("./clipboard"),de=p("./lib/keys"),Y=p("./lib/event"),gt=p("./tooltip").HoverTooltip,U=function(){function C(y,T,ke){this.id="editor"+ ++C.$uid,this.session,this.$toDestroy=[];var Qe=y.getContainerElement();this.container=Qe,this.renderer=y,this.commands=new m(h.isMac?"mac":"win",M),typeof document=="object"&&(this.textInput=new n(y.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new o(this),new r(this)),this.keyBinding=new i(this),this.$search=new t().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=c.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(Je,mt){mt._$emitInputEvent.schedule(31)}),this.setSession(T||ke&&ke.session||new e("")),O.resetOptions(this),ke&&this.setOptions(ke),O._signal("editor",this)}return C.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},C.prototype.startOperation=function(y){this.session.startOperation(y)},C.prototype.endOperation=function(y){this.session.endOperation(y)},C.prototype.onStartOperation=function(y){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,y||(this.previousCommand=null)},C.prototype.onEndOperation=function(y){if(this.curOp&&this.session){if(y&&y.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var T=this.curOp.command,ke=T&&T.scrollIntoView;if(ke){switch(ke){case"center-animate":ke="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var Qe=this.selection.getRange(),Je=this.renderer.layerConfig;(Qe.start.row>=Je.lastRow||Qe.end.row<=Je.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}ke=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},C.prototype.$historyTracker=function(y){if(this.$mergeUndoDeltas){var T=this.prevOp,ke=this.$mergeableCommands,Qe=T.command&&y.command.name==T.command.name;if(y.command.name=="insertstring"){var Je=y.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),Qe=Qe&&this.mergeNextCommand&&(!/\s/.test(Je)||/\s/.test(T.args)),this.mergeNextCommand=!0}else Qe=Qe&&ke.indexOf(y.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(Qe=!1),Qe?this.session.mergeUndoDeltas=!0:ke.indexOf(y.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},C.prototype.setKeyboardHandler=function(y,T){if(y&&typeof y=="string"&&y!="ace"){this.$keybindingId=y;var ke=this;O.loadModule(["keybinding",y],function(Qe){ke.$keybindingId==y&&ke.keyBinding.setKeyboardHandler(Qe&&Qe.handler),T&&T()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(y),T&&T()},C.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},C.prototype.setSession=function(y){if(this.session!=y){this.curOp&&this.endOperation(),this.curOp={};var T=this.session;if(T){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var ke=this.session.getSelection();ke.off("changeCursor",this.$onCursorChange),ke.off("changeSelection",this.$onSelectionChange)}this.session=y,y?(this.$onDocumentChange=this.onDocumentChange.bind(this),y.on("change",this.$onDocumentChange),this.renderer.setSession(y),this.$onChangeMode=this.onChangeMode.bind(this),y.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),y.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),y.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),y.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),y.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),y.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=y.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(y)),this._signal("changeSession",{session:y,oldSession:T}),this.curOp=null,T&&T._signal("changeEditor",{oldEditor:this}),T&&(T.$editor=null),y&&y._signal("changeEditor",{editor:this}),y&&(y.$editor=this),y&&!y.destroyed&&y.bgTokenizer.scheduleStart()}},C.prototype.getSession=function(){return this.session},C.prototype.setValue=function(y,T){return this.session.doc.setValue(y),T?T==1?this.navigateFileEnd():T==-1&&this.navigateFileStart():this.selectAll(),y},C.prototype.getValue=function(){return this.session.getValue()},C.prototype.getSelection=function(){return this.selection},C.prototype.resize=function(y){this.renderer.onResize(y)},C.prototype.setTheme=function(y,T){this.renderer.setTheme(y,T)},C.prototype.getTheme=function(){return this.renderer.getTheme()},C.prototype.setStyle=function(y,T){this.renderer.setStyle(y,T)},C.prototype.unsetStyle=function(y){this.renderer.unsetStyle(y)},C.prototype.getFontSize=function(){return this.getOption("fontSize")||A.computedStyle(this.container).fontSize},C.prototype.setFontSize=function(y){this.setOption("fontSize",y)},C.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var y=this;this.$highlightPending=!0,setTimeout(function(){y.$highlightPending=!1;var T=y.session;if(!(!T||T.destroyed)){T.$bracketHighlight&&(T.$bracketHighlight.markerIds.forEach(function(Yt){T.removeMarker(Yt)}),T.$bracketHighlight=null);var ke=y.getCursorPosition(),Qe=y.getKeyboardHandler(),Je=Qe&&Qe.$getDirectionForHighlight&&Qe.$getDirectionForHighlight(y),mt=T.getMatchingBracketRanges(ke,Je);if(!mt){var yt=new $(T,ke.row,ke.column),Qt=yt.getCurrentToken();if(Qt&&/\b(?:tag-open|tag-name)/.test(Qt.type)){var bt=T.getMatchingTags(ke);bt&&(mt=[bt.openTagName.isEmpty()?bt.openTag:bt.openTagName,bt.closeTagName.isEmpty()?bt.closeTag:bt.closeTagName])}}if(!mt&&T.$mode.getMatching&&(mt=T.$mode.getMatching(y.session)),!mt){y.getHighlightIndentGuides()&&y.renderer.$textLayer.$highlightIndentGuide();return}var Gt="ace_bracket";Array.isArray(mt)?mt.length==1&&(Gt="ace_error_bracket"):mt=[mt],mt.length==2&&(a.comparePoints(mt[0].end,mt[1].start)==0?mt=[a.fromPoints(mt[0].start,mt[1].end)]:a.comparePoints(mt[0].start,mt[1].end)==0&&(mt=[a.fromPoints(mt[1].start,mt[0].end)])),T.$bracketHighlight={ranges:mt,markerIds:mt.map(function(Yt){return T.addMarker(Yt,Gt,"text")})},y.getHighlightIndentGuides()&&y.renderer.$textLayer.$highlightIndentGuide()}},50)}},C.prototype.focus=function(){this.textInput.focus()},C.prototype.isFocused=function(){return this.textInput.isFocused()},C.prototype.blur=function(){this.textInput.blur()},C.prototype.onFocus=function(y){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",y))},C.prototype.onBlur=function(y){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",y))},C.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},C.prototype.onDocumentChange=function(y){var T=this.session.$useWrapMode,ke=y.start.row==y.end.row?y.end.row:1/0;this.renderer.updateLines(y.start.row,ke,T),this._signal("change",y),this.$cursorChange()},C.prototype.onTokenizerUpdate=function(y){var T=y.data;this.renderer.updateLines(T.first,T.last)},C.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},C.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},C.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},C.prototype.$updateHighlightActiveLine=function(){var y=this.getSession(),T;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(T=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(T=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(T=!1)),y.$highlightLineMarker&&!T)y.removeMarker(y.$highlightLineMarker.id),y.$highlightLineMarker=null;else if(!y.$highlightLineMarker&&T){var ke=new a(T.row,T.column,T.row,1/0);ke.id=y.addMarker(ke,"ace_active-line","screenLine"),y.$highlightLineMarker=ke}else T&&(y.$highlightLineMarker.start.row=T.row,y.$highlightLineMarker.end.row=T.row,y.$highlightLineMarker.start.column=T.column,y._signal("changeBackMarker"))},C.prototype.onSelectionChange=function(y){var T=this.session;if(T.$selectionMarker&&T.removeMarker(T.$selectionMarker),T.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var ke=this.selection.getRange(),Qe=this.getSelectionStyle();T.$selectionMarker=T.addMarker(ke,"ace_selection",Qe)}var Je=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(Je),this._signal("changeSelection")},C.prototype.$getSelectionHighLightRegexp=function(){var y=this.session,T=this.getSelectionRange();if(!(T.isEmpty()||T.isMultiLine())){var ke=T.start.column,Qe=T.end.column,Je=y.getLine(T.start.row),mt=Je.substring(ke,Qe);if(!(mt.length>5e3||!/[\w\d]/.test(mt))){var yt=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:mt}),Qt=Je.substring(ke-1,Qe+1);if(yt.test(Qt))return yt}}},C.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},C.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},C.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},C.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},C.prototype.onChangeMode=function(y){this.renderer.updateText(),this._emit("changeMode",y)},C.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},C.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},C.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},C.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},C.prototype.getCopyText=function(){var y=this.getSelectedText(),T=this.session.doc.getNewLineCharacter(),ke=!1;if(!y&&this.$copyWithEmptySelection){ke=!0;for(var Qe=this.selection.getAllRanges(),Je=0;Je<Qe.length;Je++){var mt=Qe[Je];Je&&Qe[Je-1].start.row==mt.start.row||(y+=this.session.getLine(mt.start.row)+T)}}var yt={text:y};return this._signal("copy",yt),Te.lineMode=ke?yt.text:!1,yt.text},C.prototype.onCopy=function(){this.commands.exec("copy",this)},C.prototype.onCut=function(){this.commands.exec("cut",this)},C.prototype.onPaste=function(y,T){var ke={text:y,event:T};this.commands.exec("paste",this,ke)},C.prototype.$handlePaste=function(y){typeof y=="string"&&(y={text:y}),this._signal("paste",y);var T=y.text,ke=T===Te.lineMode,Qe=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)ke?Qe.insert({row:this.selection.lead.row,column:0},T):this.insert(T);else if(ke)this.selection.rangeList.ranges.forEach(function(Gt){Qe.insert({row:Gt.start.row,column:0},T)});else{var Je=T.split(/\r\n|\r|\n/),mt=this.selection.rangeList.ranges,yt=Je.length==2&&(!Je[0]||!Je[1]);if(Je.length!=mt.length||yt)return this.commands.exec("insertstring",this,T);for(var Qt=mt.length;Qt--;){var bt=mt[Qt];bt.isEmpty()||Qe.remove(bt),Qe.insert(bt.start,Je[Qt])}}},C.prototype.execCommand=function(y,T){return this.commands.exec(y,this,T)},C.prototype.insert=function(y,T){var ke=this.session,Qe=ke.getMode(),Je=this.getCursorPosition();if(this.getBehavioursEnabled()&&!T){var mt=Qe.transformAction(ke.getState(Je.row),"insertion",this,ke,y);mt&&(y!==mt.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),y=mt.text)}if(y==" "&&(y=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&y.indexOf(`
214
+ `)==-1){var yt=a.fromPoints(Je,Je);yt.end.column+=y.length,this.session.remove(yt)}}else{var yt=this.getSelectionRange();Je=this.session.remove(yt),this.clearSelection()}if(y==`
215
+ `||y==`\r
216
+ `){var Yt=ke.getLine(Je.row);if(Je.column>Yt.search(/\S|$/)){var Qt=Yt.substr(Je.column).search(/\S|$/);ke.doc.removeInLine(Je.row,Je.column,Je.column+Qt)}}this.clearSelection();var bt=Je.column,Gt=ke.getState(Je.row),Yt=ke.getLine(Je.row),Zt=Qe.checkOutdent(Gt,Yt,y);if(ke.insert(Je,y),mt&&mt.selection&&(mt.selection.length==2?this.selection.setSelectionRange(new a(Je.row,bt+mt.selection[0],Je.row,bt+mt.selection[1])):this.selection.setSelectionRange(new a(Je.row+mt.selection[0],mt.selection[1],Je.row+mt.selection[2],mt.selection[3]))),this.$enableAutoIndent){if(ke.getDocument().isNewLine(y)){var Jt=Qe.getNextLineIndent(Gt,Yt.slice(0,Je.column),ke.getTabString());ke.insert({row:Je.row+1,column:0},Jt)}Zt&&Qe.autoOutdent(Gt,ke,Je.row)}},C.prototype.autoIndent=function(){for(var y=this.session,T=y.getMode(),ke=this.selection.isEmpty()?[new a(0,0,y.doc.getLength()-1,0)]:this.selection.getAllRanges(),Qe="",Je="",mt="",yt=y.getTabString(),Qt=0;Qt<ke.length;Qt++)for(var bt=ke[Qt].start.row,Gt=ke[Qt].end.row,Yt=bt;Yt<=Gt;Yt++){Yt>0&&(Qe=y.getState(Yt-1),Je=y.getLine(Yt-1),mt=T.getNextLineIndent(Qe,Je,yt));var Zt=y.getLine(Yt),Jt=T.$getIndent(Zt);if(mt!==Jt){if(Jt.length>0){var pi=new a(Yt,0,Yt,Jt.length);y.remove(pi)}mt.length>0&&y.insert({row:Yt,column:0},mt)}T.autoOutdent(Qe,y,Yt)}},C.prototype.onTextInput=function(y,T){if(!T)return this.keyBinding.onTextInput(y);this.startOperation({command:{name:"insertstring"}});var ke=this.applyComposition.bind(this,y,T);this.selection.rangeCount?this.forEachSelection(ke):ke(),this.endOperation()},C.prototype.applyComposition=function(y,T){if(T.extendLeft||T.extendRight){var ke=this.selection.getRange();ke.start.column-=T.extendLeft,ke.end.column+=T.extendRight,ke.start.column<0&&(ke.start.row--,ke.start.column+=this.session.getLine(ke.start.row).length+1),this.selection.setRange(ke),!y&&!ke.isEmpty()&&this.remove()}if((y||!this.selection.isEmpty())&&this.insert(y,!0),T.restoreStart||T.restoreEnd){var ke=this.selection.getRange();ke.start.column-=T.restoreStart,ke.end.column-=T.restoreEnd,this.selection.setRange(ke)}},C.prototype.onCommandKey=function(y,T,ke){return this.keyBinding.onCommandKey(y,T,ke)},C.prototype.setOverwrite=function(y){this.session.setOverwrite(y)},C.prototype.getOverwrite=function(){return this.session.getOverwrite()},C.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},C.prototype.setScrollSpeed=function(y){this.setOption("scrollSpeed",y)},C.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},C.prototype.setDragDelay=function(y){this.setOption("dragDelay",y)},C.prototype.getDragDelay=function(){return this.getOption("dragDelay")},C.prototype.setSelectionStyle=function(y){this.setOption("selectionStyle",y)},C.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},C.prototype.setHighlightActiveLine=function(y){this.setOption("highlightActiveLine",y)},C.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},C.prototype.setHighlightGutterLine=function(y){this.setOption("highlightGutterLine",y)},C.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},C.prototype.setHighlightSelectedWord=function(y){this.setOption("highlightSelectedWord",y)},C.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},C.prototype.setAnimatedScroll=function(y){this.renderer.setAnimatedScroll(y)},C.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},C.prototype.setShowInvisibles=function(y){this.renderer.setShowInvisibles(y)},C.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},C.prototype.setDisplayIndentGuides=function(y){this.renderer.setDisplayIndentGuides(y)},C.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},C.prototype.setHighlightIndentGuides=function(y){this.renderer.setHighlightIndentGuides(y)},C.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},C.prototype.setShowPrintMargin=function(y){this.renderer.setShowPrintMargin(y)},C.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},C.prototype.setPrintMarginColumn=function(y){this.renderer.setPrintMarginColumn(y)},C.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},C.prototype.setReadOnly=function(y){this.setOption("readOnly",y)},C.prototype.getReadOnly=function(){return this.getOption("readOnly")},C.prototype.setBehavioursEnabled=function(y){this.setOption("behavioursEnabled",y)},C.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},C.prototype.setWrapBehavioursEnabled=function(y){this.setOption("wrapBehavioursEnabled",y)},C.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},C.prototype.setShowFoldWidgets=function(y){this.setOption("showFoldWidgets",y)},C.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},C.prototype.setFadeFoldWidgets=function(y){this.setOption("fadeFoldWidgets",y)},C.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},C.prototype.remove=function(y){this.selection.isEmpty()&&(y=="left"?this.selection.selectLeft():this.selection.selectRight());var T=this.getSelectionRange();if(this.getBehavioursEnabled()){var ke=this.session,Qe=ke.getState(T.start.row),Je=ke.getMode().transformAction(Qe,"deletion",this,ke,T);if(T.end.column===0){var mt=ke.getTextRange(T);if(mt[mt.length-1]==`
217
+ `){var yt=ke.getLine(T.end.row);/^\s+$/.test(yt)&&(T.end.column=yt.length)}}Je&&(T=Je)}this.session.remove(T),this.clearSelection()},C.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},C.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},C.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},C.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var y=this.getSelectionRange();y.start.column==y.end.column&&y.start.row==y.end.row&&(y.end.column=0,y.end.row++),this.session.remove(y),this.clearSelection()},C.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var y=this.getCursorPosition();this.insert(`
218
+ `),this.moveCursorToPosition(y)},C.prototype.setGhostText=function(y,T){this.renderer.setGhostText(y,T)},C.prototype.removeGhostText=function(){this.renderer.removeGhostText()},C.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var y=this.getCursorPosition(),T=y.column;if(T!==0){var ke=this.session.getLine(y.row),Qe,Je;T<ke.length?(Qe=ke.charAt(T)+ke.charAt(T-1),Je=new a(y.row,T-1,y.row,T+1)):(Qe=ke.charAt(T-1)+ke.charAt(T-2),Je=new a(y.row,T-2,y.row,T)),this.session.replace(Je,Qe),this.session.selection.moveToPosition(Je.end)}}},C.prototype.toLowerCase=function(){var y=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var T=this.getSelectionRange(),ke=this.session.getTextRange(T);this.session.replace(T,ke.toLowerCase()),this.selection.setSelectionRange(y)},C.prototype.toUpperCase=function(){var y=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var T=this.getSelectionRange(),ke=this.session.getTextRange(T);this.session.replace(T,ke.toUpperCase()),this.selection.setSelectionRange(y)},C.prototype.indent=function(){var y=this.session,T=this.getSelectionRange();if(T.start.row<T.end.row){var ke=this.$getSelectedRows();y.indentRows(ke.first,ke.last," ");return}else if(T.start.column<T.end.column){var Qe=y.getTextRange(T);if(!/^\s+$/.test(Qe)){var ke=this.$getSelectedRows();y.indentRows(ke.first,ke.last," ");return}}var Je=y.getLine(T.start.row),mt=T.start,yt=y.getTabSize(),Qt=y.documentToScreenColumn(mt.row,mt.column);if(this.session.getUseSoftTabs())var bt=yt-Qt%yt,Gt=c.stringRepeat(" ",bt);else{for(var bt=Qt%yt;Je[T.start.column-1]==" "&&bt;)T.start.column--,bt--;this.selection.setSelectionRange(T),Gt=" "}return this.insert(Gt)},C.prototype.blockIndent=function(){var y=this.$getSelectedRows();this.session.indentRows(y.first,y.last," ")},C.prototype.blockOutdent=function(){var y=this.session.getSelection();this.session.outdentRows(y.getRange())},C.prototype.sortLines=function(){for(var y=this.$getSelectedRows(),T=this.session,ke=[],Qe=y.first;Qe<=y.last;Qe++)ke.push(T.getLine(Qe));ke.sort(function(yt,Qt){return yt.toLowerCase()<Qt.toLowerCase()?-1:yt.toLowerCase()>Qt.toLowerCase()?1:0});for(var Je=new a(0,0,0,0),Qe=y.first;Qe<=y.last;Qe++){var mt=T.getLine(Qe);Je.start.row=Qe,Je.end.row=Qe,Je.end.column=mt.length,T.replace(Je,ke[Qe-y.first])}},C.prototype.toggleCommentLines=function(){var y=this.session.getState(this.getCursorPosition().row),T=this.$getSelectedRows();this.session.getMode().toggleCommentLines(y,this.session,T.first,T.last)},C.prototype.toggleBlockComment=function(){var y=this.getCursorPosition(),T=this.session.getState(y.row),ke=this.getSelectionRange();this.session.getMode().toggleBlockComment(T,this.session,ke,y)},C.prototype.getNumberAt=function(y,T){var ke=/[\-]?[0-9]+(?:\.[0-9]+)?/g;ke.lastIndex=0;for(var Qe=this.session.getLine(y);ke.lastIndex<T;){var Je=ke.exec(Qe);if(Je.index<=T&&Je.index+Je[0].length>=T){var mt={value:Je[0],start:Je.index,end:Je.index+Je[0].length};return mt}}return null},C.prototype.modifyNumber=function(y){var T=this.selection.getCursor().row,ke=this.selection.getCursor().column,Qe=new a(T,ke-1,T,ke),Je=this.session.getTextRange(Qe);if(!isNaN(parseFloat(Je))&&isFinite(Je)){var mt=this.getNumberAt(T,ke);if(mt){var yt=mt.value.indexOf(".")>=0?mt.start+mt.value.indexOf(".")+1:mt.end,Qt=mt.start+mt.value.length-yt,bt=parseFloat(mt.value);bt*=Math.pow(10,Qt),yt!==mt.end&&ke<yt?y*=Math.pow(10,mt.end-ke-1):y*=Math.pow(10,mt.end-ke),bt+=y,bt/=Math.pow(10,Qt);var Gt=bt.toFixed(Qt),Yt=new a(T,mt.start,T,mt.end);this.session.replace(Yt,Gt),this.moveCursorTo(T,Math.max(mt.start+1,ke+Gt.length-mt.value.length))}}else this.toggleWord()},C.prototype.toggleWord=function(){var y=this.selection.getCursor().row,T=this.selection.getCursor().column;this.selection.selectWord();var ke=this.getSelectedText(),Qe=this.selection.getWordRange().start.column,Je=ke.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),mt=T-Qe-1;mt<0&&(mt=0);var yt=0,Qt=0,bt=this;ke.match(/[A-Za-z0-9_]+/)&&Je.forEach(function(wi,Ci){Qt=yt+wi.length,mt>=yt&&mt<=Qt&&(ke=wi,bt.selection.clearSelection(),bt.moveCursorTo(y,yt+Qe),bt.selection.selectTo(y,Qt+Qe)),yt=Qt});for(var Gt=this.$toggleWordPairs,Yt,Zt=0;Zt<Gt.length;Zt++)for(var Jt=Gt[Zt],pi=0;pi<=1;pi++){var mi=+!pi,gi=ke.match(new RegExp("^\\s?_?("+c.escapeRegExp(Jt[pi])+")\\s?$","i"));if(gi){var vi=ke.match(new RegExp("([_]|^|\\s)("+c.escapeRegExp(gi[1])+")($|\\s)","g"));vi&&(Yt=ke.replace(new RegExp(c.escapeRegExp(Jt[pi]),"i"),function(wi){var Ci=Jt[mi];return wi.toUpperCase()==wi?Ci=Ci.toUpperCase():wi.charAt(0).toUpperCase()==wi.charAt(0)&&(Ci=Ci.substr(0,0)+Jt[mi].charAt(0).toUpperCase()+Ci.substr(1)),Ci}),this.insert(Yt),Yt="")}}},C.prototype.findLinkAt=function(y,T){var ke,Qe,Je=this.session.getLine(y),mt=Je.split(/((?:https?|ftp):\/\/[\S]+)/),yt=T;yt<0&&(yt=0);var Qt=0,bt=0,Gt;try{for(var Yt=x(mt),Zt=Yt.next();!Zt.done;Zt=Yt.next()){var Jt=Zt.value;if(bt=Qt+Jt.length,yt>=Qt&&yt<=bt&&Jt.match(/((?:https?|ftp):\/\/[\S]+)/)){Gt=Jt.replace(/[\s:.,'";}\]]+$/,"");break}Qt=bt}}catch(pi){ke={error:pi}}finally{try{Zt&&!Zt.done&&(Qe=Yt.return)&&Qe.call(Yt)}finally{if(ke)throw ke.error}}return Gt},C.prototype.openLink=function(){var y=this.selection.getCursor(),T=this.findLinkAt(y.row,y.column);return T&&window.open(T,"_blank"),T!=null},C.prototype.removeLines=function(){var y=this.$getSelectedRows();this.session.removeFullLines(y.first,y.last),this.clearSelection()},C.prototype.duplicateSelection=function(){var y=this.selection,T=this.session,ke=y.getRange(),Qe=y.isBackwards();if(ke.isEmpty()){var Je=ke.start.row;T.duplicateLines(Je,Je)}else{var mt=Qe?ke.start:ke.end,yt=T.insert(mt,T.getTextRange(ke));ke.start=mt,ke.end=yt,y.setSelectionRange(ke,Qe)}},C.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},C.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},C.prototype.moveText=function(y,T,ke){return this.session.moveText(y,T,ke)},C.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},C.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},C.prototype.$moveLines=function(y,T){var ke,Qe,Je=this.selection;if(!Je.inMultiSelectMode||this.inVirtualSelectionMode){var mt=Je.toOrientedRange();ke=this.$getSelectedRows(mt),Qe=this.session.$moveLines(ke.first,ke.last,T?0:y),T&&y==-1&&(Qe=0),mt.moveBy(Qe,0),Je.fromOrientedRange(mt)}else{var yt=Je.rangeList.ranges;Je.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var Qt=0,bt=0,Gt=yt.length,Yt=0;Yt<Gt;Yt++){var Zt=Yt;yt[Yt].moveBy(Qt,0),ke=this.$getSelectedRows(yt[Yt]);for(var Jt=ke.first,pi=ke.last;++Yt<Gt;){bt&&yt[Yt].moveBy(bt,0);var mi=this.$getSelectedRows(yt[Yt]);if(T&&mi.first!=pi)break;if(!T&&mi.first>pi+1)break;pi=mi.last}for(Yt--,Qt=this.session.$moveLines(Jt,pi,T?0:y),T&&y==-1&&(Zt=Yt+1);Zt<=Yt;)yt[Zt].moveBy(Qt,0),Zt++;T||(Qt=0),bt+=Qt}Je.fromOrientedRange(Je.ranges[0]),Je.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},C.prototype.$getSelectedRows=function(y){return y=(y||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(y.start.row),last:this.session.getRowFoldEnd(y.end.row)}},C.prototype.onCompositionStart=function(y){this.renderer.showComposition(y)},C.prototype.onCompositionUpdate=function(y){this.renderer.setCompositionText(y)},C.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},C.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},C.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},C.prototype.isRowVisible=function(y){return y>=this.getFirstVisibleRow()&&y<=this.getLastVisibleRow()},C.prototype.isRowFullyVisible=function(y){return y>=this.renderer.getFirstFullyVisibleRow()&&y<=this.renderer.getLastFullyVisibleRow()},C.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},C.prototype.$moveByPage=function(y,T){var ke=this.renderer,Qe=this.renderer.layerConfig,Je=y*Math.floor(Qe.height/Qe.lineHeight);T===!0?this.selection.$moveSelection(function(){this.moveCursorBy(Je,0)}):T===!1&&(this.selection.moveCursorBy(Je,0),this.selection.clearSelection());var mt=ke.scrollTop;ke.scrollBy(0,Je*Qe.lineHeight),T!=null&&ke.scrollCursorIntoView(null,.5),ke.animateScrolling(mt)},C.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},C.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},C.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},C.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},C.prototype.scrollPageDown=function(){this.$moveByPage(1)},C.prototype.scrollPageUp=function(){this.$moveByPage(-1)},C.prototype.scrollToRow=function(y){this.renderer.scrollToRow(y)},C.prototype.scrollToLine=function(y,T,ke,Qe){this.renderer.scrollToLine(y,T,ke,Qe)},C.prototype.centerSelection=function(){var y=this.getSelectionRange(),T={row:Math.floor(y.start.row+(y.end.row-y.start.row)/2),column:Math.floor(y.start.column+(y.end.column-y.start.column)/2)};this.renderer.alignCursor(T,.5)},C.prototype.getCursorPosition=function(){return this.selection.getCursor()},C.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},C.prototype.getSelectionRange=function(){return this.selection.getRange()},C.prototype.selectAll=function(){this.selection.selectAll()},C.prototype.clearSelection=function(){this.selection.clearSelection()},C.prototype.moveCursorTo=function(y,T){this.selection.moveCursorTo(y,T)},C.prototype.moveCursorToPosition=function(y){this.selection.moveCursorToPosition(y)},C.prototype.jumpToMatching=function(y,T){var ke=this.getCursorPosition(),Qe=new $(this.session,ke.row,ke.column),Je=Qe.getCurrentToken(),mt=0;Je&&Je.type.indexOf("tag-name")!==-1&&(Je=Qe.stepBackward());var yt=Je||Qe.stepForward();if(yt){var Qt,bt=!1,Gt={},Yt=ke.column-yt.start,Zt,Jt={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(yt.value.match(/[{}()\[\]]/g)){for(;Yt<yt.value.length&&!bt;Yt++)if(Jt[yt.value[Yt]])switch(Zt=Jt[yt.value[Yt]]+"."+yt.type.replace("rparen","lparen"),isNaN(Gt[Zt])&&(Gt[Zt]=0),yt.value[Yt]){case"(":case"[":case"{":Gt[Zt]++;break;case")":case"]":case"}":Gt[Zt]--,Gt[Zt]===-1&&(Qt="bracket",bt=!0);break}}else yt.type.indexOf("tag-name")!==-1&&(isNaN(Gt[yt.value])&&(Gt[yt.value]=0),Je.value==="<"&&mt>1?Gt[yt.value]++:Je.value==="</"&&Gt[yt.value]--,Gt[yt.value]===-1&&(Qt="tag",bt=!0));bt||(Je=yt,mt++,yt=Qe.stepForward(),Yt=0)}while(yt&&!bt);if(Qt){var pi,mi;if(Qt==="bracket")pi=this.session.getBracketRange(ke),pi||(pi=new a(Qe.getCurrentTokenRow(),Qe.getCurrentTokenColumn()+Yt-1,Qe.getCurrentTokenRow(),Qe.getCurrentTokenColumn()+Yt-1),mi=pi.start,(T||mi.row===ke.row&&Math.abs(mi.column-ke.column)<2)&&(pi=this.session.getBracketRange(mi)));else if(Qt==="tag"){if(!yt||yt.type.indexOf("tag-name")===-1)return;if(pi=new a(Qe.getCurrentTokenRow(),Qe.getCurrentTokenColumn()-2,Qe.getCurrentTokenRow(),Qe.getCurrentTokenColumn()-2),pi.compare(ke.row,ke.column)===0){var gi=this.session.getMatchingTags(ke);gi&&(gi.openTag.contains(ke.row,ke.column)?(pi=gi.closeTag,mi=pi.start):(pi=gi.openTag,gi.closeTag.start.row===ke.row&&gi.closeTag.start.column===ke.column?mi=pi.end:mi=pi.start))}mi=mi||pi.start}mi=pi&&pi.cursor||mi,mi&&(y?pi&&T?this.selection.setRange(pi):pi&&pi.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(mi.row,mi.column):this.selection.moveTo(mi.row,mi.column))}}},C.prototype.gotoLine=function(y,T,ke){this.selection.clearSelection(),this.session.unfold({row:y-1,column:T||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(y-1,T||0),this.isRowFullyVisible(y-1)||this.scrollToLine(y-1,!0,ke)},C.prototype.navigateTo=function(y,T){this.selection.moveTo(y,T)},C.prototype.navigateUp=function(y){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var T=this.selection.anchor.getPosition();return this.moveCursorToPosition(T)}this.selection.clearSelection(),this.selection.moveCursorBy(-y||-1,0)},C.prototype.navigateDown=function(y){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var T=this.selection.anchor.getPosition();return this.moveCursorToPosition(T)}this.selection.clearSelection(),this.selection.moveCursorBy(y||1,0)},C.prototype.navigateLeft=function(y){if(this.selection.isEmpty())for(y=y||1;y--;)this.selection.moveCursorLeft();else{var T=this.getSelectionRange().start;this.moveCursorToPosition(T)}this.clearSelection()},C.prototype.navigateRight=function(y){if(this.selection.isEmpty())for(y=y||1;y--;)this.selection.moveCursorRight();else{var T=this.getSelectionRange().end;this.moveCursorToPosition(T)}this.clearSelection()},C.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},C.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},C.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},C.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},C.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},C.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},C.prototype.replace=function(y,T){T&&this.$search.set(T);var ke=this.$search.find(this.session),Qe=0;return ke&&(this.$tryReplace(ke,y)&&(Qe=1),this.selection.setSelectionRange(ke),this.renderer.scrollSelectionIntoView(ke.start,ke.end)),Qe},C.prototype.replaceAll=function(y,T){T&&this.$search.set(T);var ke=this.$search.findAll(this.session),Qe=0;if(!ke.length)return Qe;var Je=this.getSelectionRange();this.selection.moveTo(0,0);for(var mt=ke.length-1;mt>=0;--mt)this.$tryReplace(ke[mt],y)&&Qe++;return this.selection.setSelectionRange(Je),Qe},C.prototype.$tryReplace=function(y,T){var ke=this.session.getTextRange(y);return T=this.$search.replace(ke,T),T!==null?(y.end=this.session.replace(y,T),y):null},C.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},C.prototype.find=function(y,T,ke){T||(T={}),typeof y=="string"||y instanceof RegExp?T.needle=y:typeof y=="object"&&w.mixin(T,y);var Qe=this.selection.getRange();T.needle==null&&(y=this.session.getTextRange(Qe)||this.$search.$options.needle,y||(Qe=this.session.getWordRange(Qe.start.row,Qe.start.column),y=this.session.getTextRange(Qe)),this.$search.set({needle:y})),this.$search.set(T),T.start||this.$search.set({start:Qe});var Je=this.$search.find(this.session);if(T.preventScroll)return Je;if(Je)return this.revealRange(Je,ke),Je;T.backwards?Qe.start=Qe.end:Qe.end=Qe.start,this.selection.setRange(Qe)},C.prototype.findNext=function(y,T){this.find({skipCurrent:!0,backwards:!1},y,T)},C.prototype.findPrevious=function(y,T){this.find(y,{skipCurrent:!0,backwards:!0},T)},C.prototype.revealRange=function(y,T){this.session.unfold(y),this.selection.setSelectionRange(y);var ke=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(y.start,y.end,.5),T!==!1&&this.renderer.animateScrolling(ke)},C.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},C.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},C.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(y){y.destroy()}),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},C.prototype.setAutoScrollEditorIntoView=function(y){if(y){var T,ke=this,Qe=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var Je=this.$scrollAnchor;Je.style.cssText="position:absolute",this.container.insertBefore(Je,this.container.firstChild);var mt=this.on("changeSelection",function(){Qe=!0}),yt=this.renderer.on("beforeRender",function(){Qe&&(T=ke.renderer.container.getBoundingClientRect())}),Qt=this.renderer.on("afterRender",function(){if(Qe&&T&&(ke.isFocused()||ke.searchBox&&ke.searchBox.isFocused())){var bt=ke.renderer,Gt=bt.$cursorLayer.$pixelPos,Yt=bt.layerConfig,Zt=Gt.top-Yt.offset;Gt.top>=0&&Zt+T.top<0?Qe=!0:Gt.top<Yt.height&&Gt.top+T.top+Yt.lineHeight>window.innerHeight?Qe=!1:Qe=null,Qe!=null&&(Je.style.top=Zt+"px",Je.style.left=Gt.left+"px",Je.style.height=Yt.lineHeight+"px",Je.scrollIntoView(Qe)),Qe=T=null}});this.setAutoScrollEditorIntoView=function(bt){bt||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",mt),this.renderer.off("afterRender",Qt),this.renderer.off("beforeRender",yt))}}},C.prototype.$resetCursorStyle=function(){var y=this.$cursorStyle||"ace",T=this.renderer.$cursorLayer;T&&(T.setSmoothBlinking(/smooth/.test(y)),T.isBlinking=!this.$readOnly&&y!="wide",A.setCssClass(T.element,"ace_slim-cursors",/slim/.test(y)))},C.prototype.prompt=function(y,T,ke){var Qe=this;O.loadModule("ace/ext/prompt",function(Je){Je.prompt(Qe,y,T,ke)})},C}();U.$uid=0,U.prototype.curOp=null,U.prototype.prevOp={},U.prototype.$mergeableCommands=["backspace","del","insertstring"],U.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"],["&&","||"],["==","!="]],w.implement(U.prototype,g),O.defineOptions(U.prototype,"editor",{selectionStyle:{set:function(C){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:C})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(C){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(C){var y=this;if(this.textInput.setReadOnly(C),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(ke){var Qe=!1;if(ke&&ke.type=="keydown"){if(ke&&ke.key&&!ke.ctrlKey&&!ke.metaKey&&(ke.key==" "&&ke.preventDefault(),Qe=ke.key.length==1),!Qe)return}else ke&&ke.type!=="exec"&&(Qe=!0);if(Qe){y.hoverTooltip||(y.hoverTooltip=new gt);var Je=A.createElement("div");Je.textContent=he("editor.tooltip.disable-editing","Editing is disabled"),y.hoverTooltip.isOpen||y.hoverTooltip.showForRange(y,y.getSelectionRange(),Je)}else y.hoverTooltip&&y.hoverTooltip.isOpen&&y.hoverTooltip.hide()});var T=this.textInput.getElement();C?(Y.addListener(T,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(Y.removeListener(T,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback),this.hoverTooltip&&(this.hoverTooltip.destroy(),this.hoverTooltip=null))}},initialValue:!1},copyWithEmptySelection:{set:function(C){this.textInput.setCopyWithEmptySelection(C)},initialValue:!1},cursorStyle:{set:function(C){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(C){this.setAutoScrollEditorIntoView(C)}},keyboardHandler:{set:function(C){this.setKeyboardHandler(C)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(C){this.session.setValue(C)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(C){this.setSession(C)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(C){this.renderer.$gutterLayer.setShowLineNumbers(C),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),C&&this.$relativeLineNumbers?V.attach(this):V.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(C){this.$showLineNumbers&&C?V.attach(this):V.detach(this)}},placeholder:{set:function(C){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var y=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(y&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),A.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!y&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),A.addCssClass(this.container,"ace_hasPlaceholder");var T=A.createElement("div");T.className="ace_placeholder",T.textContent=this.$placeholder||"",this.renderer.placeholderNode=T,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!y&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(C){var y={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},T=function(Qe){if(Qe.target==this.renderer.scroller&&Qe.keyCode===de.enter){Qe.preventDefault();var Je=this.getCursorPosition().row;this.isRowVisible(Je)||this.scrollToLine(Je,!0,!0),this.focus()}},ke;C?(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",he("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",he("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",T.bind(this)),this.commands.addCommand(y),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",he("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",he("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),ke||(ke=new b(this)),ke.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",T.bind(this)),this.commands.removeCommand(y),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),ke&&ke.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(C){this.$textInputAriaLabel=C},initialValue:""},enableMobileMenu:{set:function(C){this.$enableMobileMenu=C},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",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var V={getText:function(C,y){return(Math.abs(C.selection.lead.row-y)||y+1+(y<9?"·":""))+""},getWidth:function(C,y,T){return Math.max(y.toString().length,(T.lastRow+1).toString().length,2)*T.characterWidth},update:function(C,y){y.renderer.$loop.schedule(y.renderer.CHANGE_GUTTER)},attach:function(C){C.renderer.$gutterLayer.$renderer=this,C.on("changeSelection",this.update),this.update(null,C)},detach:function(C){C.renderer.$gutterLayer.$renderer==this&&(C.renderer.$gutterLayer.$renderer=null),C.off("changeSelection",this.update),this.update(null,C)}};v.Editor=U}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(p,v,fe){var x=p("../lib/dom"),w=function(){function A(c,h){this.element=c,this.canvasHeight=h||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return A.prototype.moveContainer=function(c){x.translate(this.element,0,-(c.firstRowScreen*c.lineHeight%this.canvasHeight)-c.offset*this.$offsetCoefficient)},A.prototype.pageChanged=function(c,h){return Math.floor(c.firstRowScreen*c.lineHeight/this.canvasHeight)!==Math.floor(h.firstRowScreen*h.lineHeight/this.canvasHeight)},A.prototype.computeLineTop=function(c,h,n){var o=h.firstRowScreen*h.lineHeight,r=Math.floor(o/this.canvasHeight),i=n.documentToScreenRow(c,0)*h.lineHeight;return i-r*this.canvasHeight},A.prototype.computeLineHeight=function(c,h,n){return h.lineHeight*n.getRowLineCount(c)},A.prototype.getLength=function(){return this.cells.length},A.prototype.get=function(c){return this.cells[c]},A.prototype.shift=function(){this.$cacheCell(this.cells.shift())},A.prototype.pop=function(){this.$cacheCell(this.cells.pop())},A.prototype.push=function(c){if(Array.isArray(c)){this.cells.push.apply(this.cells,c);for(var h=x.createFragment(this.element),n=0;n<c.length;n++)h.appendChild(c[n].element);this.element.appendChild(h)}else this.cells.push(c),this.element.appendChild(c.element)},A.prototype.unshift=function(c){if(Array.isArray(c)){this.cells.unshift.apply(this.cells,c);for(var h=x.createFragment(this.element),n=0;n<c.length;n++)h.appendChild(c[n].element);this.element.firstChild?this.element.insertBefore(h,this.element.firstChild):this.element.appendChild(h)}else this.cells.unshift(c),this.element.insertAdjacentElement("afterbegin",c.element)},A.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},A.prototype.$cacheCell=function(c){c&&(c.element.remove(),this.cellCache.push(c))},A.prototype.createCell=function(c,h,n,o){var r=this.cellCache.pop();if(!r){var i=x.createElement("div");o&&o(i),this.element.appendChild(i),r={element:i,text:"",row:c}}return r.row=c,r},A}();v.Lines=w}),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(p,v,fe){var x=p("../lib/dom"),w=p("../lib/oop"),A=p("../lib/lang"),c=p("../lib/event_emitter").EventEmitter,h=p("./lines").Lines,n=p("../config").nls,o=function(){function i(e){this.$showCursorMarker=null,this.element=x.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new h(this.element),this.$lines.$offsetCoefficient=1}return i.prototype.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},i.prototype.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},i.prototype.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},i.prototype.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var a=e[t],g=a.row,m=this.$annotations[g];m||(m=this.$annotations[g]={text:[],type:[],displayText:[]});var M=a.text,O=a.text,$=a.type;M=M?A.escapeHTML(M):a.html||"",O=O||a.html||"",m.text.indexOf(M)===-1&&(m.text.push(M),m.type.push($),m.displayText.push(O));var b=a.className;b?m.className=b:$==="error"?m.className=" ace_error":$==="security"&&!/\bace_error\b/.test(m.className)?m.className=" ace_security":$==="warning"&&!/\bace_(error|security)\b/.test(m.className)?m.className=" ace_warning":$==="info"&&!m.className?m.className=" ace_info":$==="hint"&&!m.className&&(m.className=" ace_hint")}},i.prototype.$updateAnnotations=function(e){if(this.$annotations.length){var t=e.start.row,a=e.end.row-t;if(a!==0)if(e.action=="remove")this.$annotations.splice(t,a+1,null);else{var g=new Array(a+1);g.unshift(t,1),this.$annotations.splice.apply(this.$annotations,g)}}},i.prototype.update=function(e){this.config=e;var t=this.session,a=e.firstRow,g=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1);this.oldLastRow=g,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var m=t.getNextFoldLine(a),M=m?m.start.row:1/0,O=null,$=-1,b=a;;){if(b>M&&(b=m.end.row+1,m=t.getNextFoldLine(b,m),M=m?m.start.row:1/0),b>g){for(;this.$lines.getLength()>$+1;)this.$lines.pop();break}O=this.$lines.get(++$),O?O.row=b:(O=this.$lines.createCell(b,e,this.session,r),this.$lines.push(O)),this.$renderCell(O,e,m,b),b++}this._signal("afterRender"),this.$updateGutterWidth(e),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},i.prototype.$updateGutterWidth=function(e){var t=this.session,a=t.gutterRenderer||this.$renderer,g=t.$firstLineNumber,m=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(m=t.getLength()+g-1);var M=a?a.getWidth(t,m,e):m.toString().length*e.characterWidth,O=this.$padding||this.$computePadding();M+=O.left+O.right,M!==this.gutterWidth&&!isNaN(M)&&(this.gutterWidth=M,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",M))},i.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},i.prototype.updateLineHighlight=function(){if(this.$showCursorMarker&&this.$updateCursorMarker(),!!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 t=this.$lines.cells;this.$cursorCell=null;for(var a=0;a<t.length;a++){var g=t[a];if(g.row>=this.$cursorRow){if(g.row>this.$cursorRow){var m=this.session.getFoldLine(this.$cursorRow);if(a>0&&m&&m.start.row==t[a-1].row)g=t[a-1];else break}g.element.className="ace_gutter-active-line "+g.element.className,this.$cursorCell=g;break}}}}},i.prototype.$updateCursorMarker=function(){if(this.session){var e=this.session;this.$highlightElement||(this.$highlightElement=x.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var t=e.selection.cursor,a=this.config,g=this.$lines,m=a.firstRowScreen*a.lineHeight,M=Math.floor(m/g.canvasHeight),O=e.documentToScreenRow(t)*a.lineHeight,$=O-M*g.canvasHeight;x.setStyle(this.$highlightElement.style,"height",a.lineHeight+"px"),x.setStyle(this.$highlightElement.style,"top",$+"px")}},i.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var a=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),g=this.oldLastRow;if(this.oldLastRow=a,!t||g<e.firstRow)return this.update(e);if(a<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var m=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);m>0;m--)this.$lines.shift();if(g>a)for(var m=this.session.getFoldedRowCount(a+1,g);m>0;m--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,t.firstRow-1)),a>g&&this.$lines.push(this.$renderLines(e,g+1,a)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},i.prototype.$renderLines=function(e,t,a){for(var g=[],m=t,M=this.session.getNextFoldLine(m),O=M?M.start.row:1/0;m>O&&(m=M.end.row+1,M=this.session.getNextFoldLine(m,M),O=M?M.start.row:1/0),!(m>a);){var $=this.$lines.createCell(m,e,this.session,r);this.$renderCell($,e,M,m),g.push($),m++}return g},i.prototype.$renderCell=function(e,t,a,g){var m=e.element,M=this.session,O=m.childNodes[0],$=m.childNodes[1],b=m.childNodes[2],he=m.childNodes[3],Te=b.firstChild,de=M.$firstLineNumber,Y=M.$breakpoints,gt=M.$decorations,U=M.gutterRenderer||this.$renderer,V=this.$showFoldWidgets&&M.foldWidgets,C=a?a.start.row:Number.MAX_VALUE,y=t.lineHeight+"px",T=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",ke=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",Qe=(U?U.getText(M,g):g+de).toString();if(this.$highlightGutterLine&&(g==this.$cursorRow||a&&g<this.$cursorRow&&g>=C&&this.$cursorRow<=a.end.row)&&(T+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),Y[g]&&(T+=Y[g]),gt[g]&&(T+=gt[g]),this.$annotations[g]&&g!==C&&(T+=this.$annotations[g].className),V){var Je=V[g];Je==null&&(Je=V[g]=M.getFoldWidget(g))}if(Je){var mt="ace_fold-widget ace_"+Je,yt=Je=="start"&&g==C&&g<a.end.row;if(yt){mt+=" ace_closed";for(var Qt="",bt=!1,Gt=g+1;Gt<=a.end.row;Gt++)if(this.$annotations[Gt]){if(this.$annotations[Gt].className===" ace_error"){bt=!0,Qt=" ace_error_fold";break}this.$annotations[Gt].className===" ace_security"?(bt=!0,Qt=" ace_security_fold"):this.$annotations[Gt].className===" ace_warning"&&Qt!==" ace_security_fold"&&(bt=!0,Qt=" ace_warning_fold")}T+=Qt}else mt+=" ace_open";$.className!=mt&&($.className=mt),x.setStyle($.style,"height",y),x.setStyle($.style,"display","inline-block"),$.setAttribute("role","button"),$.setAttribute("tabindex","-1");var Yt=M.getFoldWidgetRange(g);Yt?$.setAttribute("aria-label",n("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[Yt.start.row+1,Yt.end.row+1])):a?$.setAttribute("aria-label",n("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[a.start.row+1,a.end.row+1])):$.setAttribute("aria-label",n("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[g+1])),yt?($.setAttribute("aria-expanded","false"),$.setAttribute("title",n("gutter.code-folding.closed.title","Unfold code"))):($.setAttribute("aria-expanded","true"),$.setAttribute("title",n("gutter.code-folding.open.title","Fold code")))}else $&&(x.setStyle($.style,"display","none"),$.setAttribute("tabindex","0"),$.removeAttribute("role"),$.removeAttribute("aria-label"));var Zt=this.session.$gutterCustomWidgets[g];if(Zt?this.$addCustomWidget(g,Zt,e):he&&this.$removeCustomWidget(g,e),bt&&this.$showFoldedAnnotations){b.className="ace_gutter_annotation",Te.className=ke,Te.className+=Qt,x.setStyle(Te.style,"height",y),x.setStyle(b.style,"display","block"),x.setStyle(b.style,"height",y);var Jt;switch(Qt){case" ace_error_fold":Jt=n("gutter.annotation.aria-label.error","Error, read annotations row $0",[Qe]);break;case" ace_security_fold":Jt=n("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[Qe]);break;case" ace_warning_fold":Jt=n("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[Qe]);break}b.setAttribute("aria-label",Jt),b.setAttribute("tabindex","-1"),b.setAttribute("role","button")}else if(this.$annotations[g]){b.className="ace_gutter_annotation",Te.className=ke,this.$useSvgGutterIcons?Te.className+=this.$annotations[g].className:m.classList.add(this.$annotations[g].className.replace(" ","")),x.setStyle(Te.style,"height",y),x.setStyle(b.style,"display","block"),x.setStyle(b.style,"height",y);var Jt;switch(this.$annotations[g].className){case" ace_error":Jt=n("gutter.annotation.aria-label.error","Error, read annotations row $0",[Qe]);break;case" ace_security":Jt=n("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[Qe]);break;case" ace_warning":Jt=n("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[Qe]);break;case" ace_info":Jt=n("gutter.annotation.aria-label.info","Info, read annotations row $0",[Qe]);break;case" ace_hint":Jt=n("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[Qe]);break}b.setAttribute("aria-label",Jt),b.setAttribute("tabindex","-1"),b.setAttribute("role","button")}else x.setStyle(b.style,"display","none"),b.removeAttribute("aria-label"),b.removeAttribute("role"),b.setAttribute("tabindex","0");return Qe!==O.data&&(O.data=Qe),m.className!=T&&(m.className=T),x.setStyle(e.element.style,"height",this.$lines.computeLineHeight(g,t,M)+"px"),x.setStyle(e.element.style,"top",this.$lines.computeLineTop(g,t,M)+"px"),e.text=Qe,b.style.display==="none"&&$.style.display==="none"&&!Zt?e.element.setAttribute("aria-hidden",!0):e.element.setAttribute("aria-hidden",!1),e},i.prototype.setHighlightGutterLine=function(e){this.$highlightGutterLine=e,!e&&this.$highlightElement&&(this.$highlightElement.remove(),this.$highlightElement=null)},i.prototype.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},i.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},i.prototype.setShowFoldWidgets=function(e){e?x.addCssClass(this.element,"ace_folding-enabled"):x.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},i.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},i.prototype.$hideFoldWidget=function(e,t){var a=t||this.$getGutterCell(e);if(a&&a.element){var g=a.element.childNodes[1];g&&x.setStyle(g.style,"display","none")}},i.prototype.$showFoldWidget=function(e,t){var a=t||this.$getGutterCell(e);if(a&&a.element){var g=a.element.childNodes[1];g&&this.session.foldWidgets&&this.session.foldWidgets[a.row]&&x.setStyle(g.style,"display","inline-block")}},i.prototype.$getGutterCell=function(e){var t=this.$lines.cells,a=0,g=t.length-1;if(!(e<t[0].row||e>t[g].row)){for(;a<=g;){var m=Math.floor((a+g)/2),M=t[m];if(M.row>e)g=m-1;else if(M.row<e)a=m+1;else return M}return M}},i.prototype.$addCustomWidget=function(e,t,a){var g=t.className,m=t.label,M=t.title,O=t.callbacks;this.session.$gutterCustomWidgets[e]={className:g,label:m,title:M,callbacks:O},this.$hideFoldWidget(e,a);var $=a||this.$getGutterCell(e);if($&&$.element){var b=$.element.querySelector(".ace_custom-widget");b&&b.remove(),b=x.createElement("span"),b.className="ace_custom-widget ".concat(g),b.setAttribute("tabindex","-1"),b.setAttribute("role","button"),b.setAttribute("aria-label",m),b.setAttribute("title",M),x.setStyle(b.style,"display","inline-block"),x.setStyle(b.style,"height","inherit"),O&&O.onClick&&b.addEventListener("click",function(he){O.onClick(he,e),he.stopPropagation()}),$.element.appendChild(b)}},i.prototype.$removeCustomWidget=function(e,t){delete this.session.$gutterCustomWidgets[e],this.$showFoldWidget(e,t);var a=t||this.$getGutterCell(e);if(a&&a.element){var g=a.element.querySelector(".ace_custom-widget");g&&a.element.removeChild(g)}},i.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=x.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(e.borderLeftWidth)||0)+(parseInt(e.paddingLeft)||0)+1,this.$padding.right=(parseInt(e.borderRightWidth)||0)+(parseInt(e.paddingRight)||0),this.$padding},i.prototype.getRegion=function(e){var t=this.$padding||this.$computePadding(),a=this.element.getBoundingClientRect();if(e.x<t.left+a.left)return"markers";if(this.$showFoldWidgets&&e.x>a.right-t.right)return"foldWidgets"},i}();o.prototype.$fixedWidth=!1,o.prototype.$highlightGutterLine=!0,o.prototype.$renderer=void 0,o.prototype.$showLineNumbers=!0,o.prototype.$showFoldWidgets=!0,w.implement(o.prototype,c);function r(i){var e=document.createTextNode("");i.appendChild(e);var t=x.createElement("span");i.appendChild(t);var a=x.createElement("span");i.appendChild(a);var g=x.createElement("span");return a.appendChild(g),i}v.Gutter=o}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(p,v,fe){var x=p("../range").Range,w=p("../lib/dom"),A=function(){function h(n){this.element=w.createElement("div"),this.element.className="ace_layer ace_marker-layer",n.appendChild(this.element)}return h.prototype.setPadding=function(n){this.$padding=n},h.prototype.setSession=function(n){this.session=n},h.prototype.setMarkers=function(n){this.markers=n},h.prototype.elt=function(n,o){var r=this.i!=-1&&this.element.childNodes[this.i];r?this.i++:(r=document.createElement("div"),this.element.appendChild(r),this.i=-1),r.style.cssText=o,r.className=n},h.prototype.update=function(n){if(n){this.config=n,this.i=0;var o;for(var r in this.markers){var i=this.markers[r];if(!i.range){i.update(o,this,this.session,n);continue}var e=i.range.clipRows(n.firstRow,n.lastRow);if(!e.isEmpty())if(e=e.toScreenRange(this.session),i.renderer){var t=this.$getTop(e.start.row,n),a=this.$padding+e.start.column*n.characterWidth;i.renderer(o,e,a,t,n)}else i.type=="fullLine"?this.drawFullLineMarker(o,e,i.clazz,n):i.type=="screenLine"?this.drawScreenLineMarker(o,e,i.clazz,n):e.isMultiLine()?i.type=="text"?this.drawTextMarker(o,e,i.clazz,n):this.drawMultiLineMarker(o,e,i.clazz,n):this.drawSingleLineMarker(o,e,i.clazz+" ace_start ace_br15",n)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},h.prototype.$getTop=function(n,o){return(n-o.firstRowScreen)*o.lineHeight},h.prototype.drawTextMarker=function(n,o,r,i,e){for(var t=this.session,a=o.start.row,g=o.end.row,m=a,M=0,O=0,$=t.getScreenLastRowColumn(m),b=new x(m,o.start.column,m,O);m<=g;m++)b.start.row=b.end.row=m,b.start.column=m==a?o.start.column:t.getRowWrapIndent(m),b.end.column=$,M=O,O=$,$=m+1<g?t.getScreenLastRowColumn(m+1):m==g?0:o.end.column,this.drawSingleLineMarker(n,b,r+(m==a?" ace_start":"")+" ace_br"+c(m==a||m==a+1&&o.start.column,M<O,O>$,m==g),i,m==g?0:1,e)},h.prototype.drawMultiLineMarker=function(n,o,r,i,e){var t=this.$padding,a=i.lineHeight,g=this.$getTop(o.start.row,i),m=t+o.start.column*i.characterWidth;if(e=e||"",this.session.$bidiHandler.isBidiRow(o.start.row)){var M=o.clone();M.end.row=M.start.row,M.end.column=this.session.getLine(M.start.row).length,this.drawBidiSingleLineMarker(n,M,r+" ace_br1 ace_start",i,null,e)}else this.elt(r+" ace_br1 ace_start","height:"+a+"px;right:"+t+"px;top:"+g+"px;left:"+m+"px;"+(e||""));if(this.session.$bidiHandler.isBidiRow(o.end.row)){var M=o.clone();M.start.row=M.end.row,M.start.column=0,this.drawBidiSingleLineMarker(n,M,r+" ace_br12",i,null,e)}else{g=this.$getTop(o.end.row,i);var O=o.end.column*i.characterWidth;this.elt(r+" ace_br12","height:"+a+"px;width:"+O+"px;top:"+g+"px;left:"+t+"px;"+(e||""))}if(a=(o.end.row-o.start.row-1)*i.lineHeight,!(a<=0)){g=this.$getTop(o.start.row+1,i);var $=(o.start.column?1:0)|(o.end.column?0:8);this.elt(r+($?" ace_br"+$:""),"height:"+a+"px;right:"+t+"px;top:"+g+"px;left:"+t+"px;"+(e||""))}},h.prototype.drawSingleLineMarker=function(n,o,r,i,e,t){if(this.session.$bidiHandler.isBidiRow(o.start.row))return this.drawBidiSingleLineMarker(n,o,r,i,e,t);var a=i.lineHeight,g=(o.end.column+(e||0)-o.start.column)*i.characterWidth,m=this.$getTop(o.start.row,i),M=this.$padding+o.start.column*i.characterWidth;this.elt(r,"height:"+a+"px;width:"+g+"px;top:"+m+"px;left:"+M+"px;"+(t||""))},h.prototype.drawBidiSingleLineMarker=function(n,o,r,i,e,t){var a=i.lineHeight,g=this.$getTop(o.start.row,i),m=this.$padding,M=this.session.$bidiHandler.getSelections(o.start.column,o.end.column);M.forEach(function(O){this.elt(r,"height:"+a+"px;width:"+(O.width+(e||0))+"px;top:"+g+"px;left:"+(m+O.left)+"px;"+(t||""))},this)},h.prototype.drawFullLineMarker=function(n,o,r,i,e){var t=this.$getTop(o.start.row,i),a=i.lineHeight;o.start.row!=o.end.row&&(a+=this.$getTop(o.end.row,i)-t),this.elt(r,"height:"+a+"px;top:"+t+"px;left:0;right:0;"+(e||""))},h.prototype.drawScreenLineMarker=function(n,o,r,i,e){var t=this.$getTop(o.start.row,i),a=i.lineHeight;this.elt(r,"height:"+a+"px;top:"+t+"px;left:0;right:0;"+(e||""))},h}();A.prototype.$padding=0;function c(h,n,o,r){return(h?1:0)|(n?2:0)|(o?4:0)|(r?8:0)}v.Marker=A}),ace.define("ace/layer/text_util",["require","exports","module"],function(p,v,fe){var x=new Set(["text","rparen","lparen"]);v.isTextToken=function(w){return x.has(w)}}),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(p,v,fe){var x=p("../lib/oop"),w=p("../lib/dom"),A=p("../lib/lang"),c=p("./lines").Lines,h=p("../lib/event_emitter").EventEmitter,n=p("../config").nls,o=p("./text_util").isTextToken,r=function(){function i(e){this.dom=w,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new c(this.element)}return i.prototype.$updateEolChar=function(){var e=this.session.doc,t=e.getNewLineCharacter()==`
219
+ `&&e.getNewLineMode()!="windows",a=t?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=a)return this.EOL_CHAR=a,!0},i.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},i.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},i.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},i.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",(function(t){this._signal("changeCharacterSize",t)}).bind(this)),this.$pollSizeChanges()},i.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},i.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},i.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString()},i.prototype.setShowInvisibles=function(e){return this.showInvisibles==e?!1:(this.showInvisibles=e,typeof e=="string"?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},i.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},i.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides===e?!1:(this.$highlightIndentGuides=e,e)},i.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],a=1;a<e+1;a++)if(this.showTabs){var g=this.dom.createElement("span");g.className="ace_invisible ace_invisible_tab",g.textContent=A.stringRepeat(this.TAB_CHAR,a),t.push(g)}else t.push(this.dom.createTextNode(A.stringRepeat(" ",a),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var m="ace_indent-guide",M=this.showSpaces?" ace_invisible ace_invisible_space":"",O=this.showSpaces?A.stringRepeat(this.SPACE_CHAR,this.tabSize):A.stringRepeat(" ",this.tabSize),$=this.showTabs?" ace_invisible ace_invisible_tab":"",b=this.showTabs?A.stringRepeat(this.TAB_CHAR,this.tabSize):O,g=this.dom.createElement("span");g.className=m+M,g.textContent=O,this.$tabStrings[" "]=g;var g=this.dom.createElement("span");g.className=m+$,g.textContent=b,this.$tabStrings[" "]=g}},i.prototype.updateLines=function(e,t,a){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var g=Math.max(t,e.firstRow),m=Math.min(a,e.lastRow),M=this.element.childNodes,O=0,b=e.firstRow;b<g;b++){var he=this.session.getFoldLine(b);if(he)if(he.containsRow(g)){g=he.start.row;break}else b=he.end.row;O++}for(var $=!1,b=g,he=this.session.getNextFoldLine(b),Te=he?he.start.row:1/0;b>Te&&(b=he.end.row+1,he=this.session.getNextFoldLine(b,he),Te=he?he.start.row:1/0),!(b>m);){var de=M[O++];if(de){this.dom.removeChildren(de),this.$renderLine(de,b,b==Te?he:!1),$&&(de.style.top=this.$lines.computeLineTop(b,e,this.session)+"px");var Y=e.lineHeight*this.session.getRowLength(b)+"px";de.style.height!=Y&&($=!0,de.style.height=Y)}b++}if($)for(;O<this.$lines.cells.length;){var gt=this.$lines.cells[O++];gt.element.style.top=this.$lines.computeLineTop(gt.row,e,this.session)+"px"}},i.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var a=e.lastRow,g=t?t.lastRow:-1;if(!t||g<e.firstRow)return this.update(e);if(a<t.firstRow)return this.update(e);if(!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var m=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);m>0;m--)this.$lines.shift();if(t.lastRow>e.lastRow)for(var m=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);m>0;m--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,t.firstRow-1)),e.lastRow>t.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},i.prototype.$renderLinesFragment=function(e,t,a){for(var g=[],m=t,M=this.session.getNextFoldLine(m),O=M?M.start.row:1/0;m>O&&(m=M.end.row+1,M=this.session.getNextFoldLine(m,M),O=M?M.start.row:1/0),!(m>a);){var $=this.$lines.createCell(m,e,this.session),b=$.element;this.dom.removeChildren(b),w.setStyle(b.style,"height",this.$lines.computeLineHeight(m,e,this.session)+"px"),w.setStyle(b.style,"top",this.$lines.computeLineTop(m,e,this.session)+"px"),this.$renderLine(b,m,m==O?M:!1),this.$useLineGroups()?b.className="ace_line_group":b.className="ace_line",g.push($),m++}return g},i.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,a=e.lastRow,g=this.$lines;g.getLength();)g.pop();g.push(this.$renderLinesFragment(e,t,a))},i.prototype.$renderToken=function(e,t,a,g){for(var m=this,M=/(\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,O=this.dom.createFragment(this.element),$,b=0;$=M.exec(g);){var he=$[1],Te=$[2],de=$[3],Y=$[4],gt=$[5];if(!(!m.showSpaces&&Te)){var U=b!=$.index?g.slice(b,$.index):"";if(b=$.index+$[0].length,U&&O.appendChild(this.dom.createTextNode(U,this.element)),he){var V=m.session.getScreenTabSize(t+$.index),C=m.$tabStrings[V].cloneNode(!0);C.charCount=1,O.appendChild(C),t+=V-1}else if(Te)if(m.showSpaces){var y=this.dom.createElement("span");y.className="ace_invisible ace_invisible_space",y.textContent=A.stringRepeat(m.SPACE_CHAR,Te.length),O.appendChild(y)}else O.appendChild(this.dom.createTextNode(Te,this.element));else if(de){var y=this.dom.createElement("span");y.className="ace_invisible ace_invisible_space ace_invalid",y.textContent=A.stringRepeat(m.SPACE_CHAR,de.length),O.appendChild(y)}else if(Y){t+=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:Y,O.appendChild(y)}else if(gt){t+=1;var y=this.dom.createElement("span");y.style.width=m.config.characterWidth*2+"px",y.className="ace_cjk",y.textContent=gt,O.appendChild(y)}}}if(O.appendChild(this.dom.createTextNode(b?g.slice(b):g,this.element)),o(a.type))e.appendChild(O);else{var T="ace_"+a.type.replace(/\./g," ace_"),y=this.dom.createElement("span");a.type=="fold"&&(y.style.width=a.value.length*this.config.characterWidth+"px",y.setAttribute("title",n("inline-fold.closed.title","Unfold code"))),y.className=T,y.appendChild(O),e.appendChild(y)}return t+g.length},i.prototype.renderIndentGuide=function(e,t,a){var g=t.search(this.$indentGuideRe);if(g<=0||g>=a)return t;if(t[0]==" "){g-=g%this.tabSize;for(var m=g/this.tabSize,M=0;M<m;M++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(g)}else if(t[0]==" "){for(var M=0;M<g;M++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(g)}return this.$highlightIndentGuide(),t},i.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var e=this.session.doc.$lines;if(e){var t=this.session.selection.getCursor(),a=/^\s*/.exec(this.session.doc.getLine(t.row))[0].length,g=Math.floor(a/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:g,start:t.row};var m=this.session.$bracketHighlight;if(m){for(var M=this.session.$bracketHighlight.ranges,O=0;O<M.length;O++)if(t.row!==M[O].start.row){this.$highlightIndentGuideMarker.end=M[O].start.row+1,t.row>M[O].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&e[t.row]!==""&&t.column===e[t.row].length){this.$highlightIndentGuideMarker.dir=1;for(var O=t.row+1;O<e.length;O++){var $=e[O],b=/^\s*/.exec($)[0].length;if($!==""&&(this.$highlightIndentGuideMarker.end=O,b<=a))break}}this.$renderHighlightIndentGuide()}}},i.prototype.$clearActiveIndentGuide=function(){for(var e=this.element.querySelectorAll(".ace_indent-guide-active"),t=0;t<e.length;t++)e[t].classList.remove("ace_indent-guide-active")},i.prototype.$setIndentGuideActive=function(e,t){var a=this.session.doc.getLine(e.row);if(a!==""){var g=e.element;if(e.element.classList&&e.element.classList.contains("ace_line_group"))if(e.element.childNodes.length>0)g=e.element.childNodes[0];else return;var m=g.childNodes;if(m){var M=m[t-1];M&&M.classList&&M.classList.contains("ace_indent-guide")&&M.classList.add("ace_indent-guide-active")}}},i.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var t=this.$highlightIndentGuideMarker.indentLevel;if(t!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var a=0;a<e.length;a++){var g=e[a];if(this.$highlightIndentGuideMarker.end&&g.row>=this.$highlightIndentGuideMarker.start+1){if(g.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(g,t)}}else for(var a=e.length-1;a>=0;a--){var g=e[a];if(this.$highlightIndentGuideMarker.end&&g.row<this.$highlightIndentGuideMarker.start){if(g.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(g,t)}}}},i.prototype.$createLineElement=function(e){var t=this.dom.createElement("div");return t.className="ace_line",t.style.height=this.config.lineHeight+"px",t},i.prototype.$renderWrappedLine=function(e,t,a){var g=0,m=0,M=a[0],O=0,$=this.$createLineElement();e.appendChild($);for(var b=0;b<t.length;b++){var he=t[b],Te=he.value;if(b==0&&this.displayIndentGuides){if(g=Te.length,Te=this.renderIndentGuide($,Te,M),!Te)continue;g-=Te.length}if(g+Te.length<M)O=this.$renderToken($,O,he,Te),g+=Te.length;else{for(;g+Te.length>=M;){O=this.$renderToken($,O,he,Te.substring(0,M-g)),Te=Te.substring(M-g),g=M,$=this.$createLineElement(),e.appendChild($);var de=this.dom.createTextNode(A.stringRepeat(" ",a.indent),this.element);de.charCount=0,$.appendChild(de),m++,O=0,M=a[m]||Number.MAX_VALUE}Te.length!=0&&(g+=Te.length,O=this.$renderToken($,O,he,Te))}}a[a.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage($,O,null,"",!0)},i.prototype.$renderSimpleLine=function(e,t){for(var a=0,g=0;g<t.length;g++){var m=t[g],M=m.value;if(!(g==0&&this.displayIndentGuides&&(M=this.renderIndentGuide(e,M),!M))){if(a+M.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,a,m,M);a=this.$renderToken(e,a,m,M)}}},i.prototype.$renderOverflowMessage=function(e,t,a,g,m){a&&this.$renderToken(e,t,a,g.slice(0,this.MAX_LINE_LENGTH-t));var M=this.dom.createElement("span");M.className="ace_inline_button ace_keyword ace_toggle_wrap",M.textContent=m?"<hide>":"<click to see more...>",e.appendChild(M)},i.prototype.$renderLine=function(e,t,a){if(!a&&a!=!1&&(a=this.session.getFoldLine(t)),a)var g=this.$getFoldLineTokens(t,a);else var g=this.session.getTokens(t);var m=e;if(g.length){var M=this.session.getRowSplitData(t);if(M&&M.length){this.$renderWrappedLine(e,g,M);var m=e.lastChild}else{var m=e;this.$useLineGroups()&&(m=this.$createLineElement(),e.appendChild(m)),this.$renderSimpleLine(m,g)}}else this.$useLineGroups()&&(m=this.$createLineElement(),e.appendChild(m));if(this.showEOL&&m){a&&(t=a.end.row);var O=this.dom.createElement("span");O.className="ace_invisible ace_invisible_eol",O.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,m.appendChild(O)}},i.prototype.$getFoldLineTokens=function(e,t){var a=this.session,g=[];function m(O,$,b){for(var he=0,Te=0;Te+O[he].value.length<$;)if(Te+=O[he].value.length,he++,he==O.length)return;if(Te!=$){var de=O[he].value.substring($-Te);de.length>b-$&&(de=de.substring(0,b-$)),g.push({type:O[he].type,value:de}),Te=$+de.length,he+=1}for(;Te<b&&he<O.length;){var de=O[he].value;de.length+Te>b?g.push({type:O[he].type,value:de.substring(0,b-Te)}):g.push(O[he]),Te+=de.length,he+=1}}var M=a.getTokens(e);return t.walk(function(O,$,b,he,Te){O!=null?g.push({type:"fold",value:O}):(Te&&(M=a.getTokens($)),M.length&&m(M,he,b))},t.end.row,this.session.getLine(t.end.row).length),g},i.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},i}();r.prototype.EOF_CHAR="¶",r.prototype.EOL_CHAR_LF="¬",r.prototype.EOL_CHAR_CRLF="¤",r.prototype.EOL_CHAR=r.prototype.EOL_CHAR_LF,r.prototype.TAB_CHAR="—",r.prototype.SPACE_CHAR="·",r.prototype.$padding=0,r.prototype.MAX_LINE_LENGTH=1e4,r.prototype.showInvisibles=!1,r.prototype.showSpaces=!1,r.prototype.showTabs=!1,r.prototype.showEOL=!1,r.prototype.displayIndentGuides=!0,r.prototype.$highlightIndentGuides=!0,r.prototype.$tabStrings=[],r.prototype.destroy={},r.prototype.onChangeTabSize=r.prototype.$computeTabString,x.implement(r.prototype,h),v.Text=r}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(p,v,fe){var x=p("../lib/dom"),w=function(){function A(c){this.element=x.createElement("div"),this.element.className="ace_layer ace_cursor-layer",c.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),x.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return A.prototype.$updateOpacity=function(c){for(var h=this.cursors,n=h.length;n--;)x.setStyle(h[n].style,"opacity",c?"":"0")},A.prototype.$startCssAnimation=function(){for(var c=this.cursors,h=c.length;h--;)c[h].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&x.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},A.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,x.removeCssClass(this.element,"ace_animate-blinking")},A.prototype.setPadding=function(c){this.$padding=c},A.prototype.setSession=function(c){this.session=c},A.prototype.setBlinking=function(c){c!=this.isBlinking&&(this.isBlinking=c,this.restartTimer())},A.prototype.setBlinkInterval=function(c){c!=this.blinkInterval&&(this.blinkInterval=c,this.restartTimer())},A.prototype.setSmoothBlinking=function(c){c!=this.smoothBlinking&&(this.smoothBlinking=c,x.setCssClass(this.element,"ace_smooth-blinking",c),this.$updateCursors(!0),this.restartTimer())},A.prototype.addCursor=function(){var c=x.createElement("div");return c.className="ace_cursor",this.element.appendChild(c),this.cursors.push(c),c},A.prototype.removeCursor=function(){if(this.cursors.length>1){var c=this.cursors.pop();return c.parentNode.removeChild(c),c}},A.prototype.hideCursor=function(){this.isVisible=!1,x.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},A.prototype.showCursor=function(){this.isVisible=!0,x.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},A.prototype.restartTimer=function(){var c=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,x.removeCssClass(this.element,"ace_smooth-blinking")),c(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&x.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),x.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var h=(function(){this.timeoutId=setTimeout(function(){c(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){c(!0),h()},this.blinkInterval),h()}},A.prototype.getPixelPosition=function(c,h){if(!this.config||!this.session)return{left:0,top:0};c||(c=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(c),o=this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,c.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),r=(n.row-(h?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:o,top:r}},A.prototype.isCursorInView=function(c,h){return c.top>=0&&c.top<h.maxHeight},A.prototype.update=function(c){this.config=c;var h=this.session.$selectionMarkers,n=0,o=0;(h===void 0||h.length===0)&&(h=[{cursor:null}]);for(var n=0,r=h.length;n<r;n++){var i=this.getPixelPosition(h[n].cursor,!0);if(!((i.top>c.height+c.offset||i.top<0)&&n>1)){var e=this.cursors[o++]||this.addCursor(),t=e.style;this.drawCursor?this.drawCursor(e,i,c,h[n],this.session):this.isCursorInView(i,c)?(x.setStyle(t,"display","block"),x.translate(e,i.left,i.top),x.setStyle(t,"width",Math.round(c.characterWidth)+"px"),x.setStyle(t,"height",c.lineHeight+"px")):x.setStyle(t,"display","none")}}for(;this.cursors.length>o;)this.removeCursor();var a=this.session.getOverwrite();this.$setOverwrite(a),this.$pixelPos=i,this.restartTimer()},A.prototype.$setOverwrite=function(c){c!=this.overwrite&&(this.overwrite=c,c?x.addCssClass(this.element,"ace_overwrite-cursors"):x.removeCssClass(this.element,"ace_overwrite-cursors"))},A.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},A}();w.prototype.$padding=0,w.prototype.drawCursor=null,v.Cursor=w}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(p,v,fe){var x=this&&this.__extends||function(){var e=function(t,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,m){g.__proto__=m}||function(g,m){for(var M in m)Object.prototype.hasOwnProperty.call(m,M)&&(g[M]=m[M])},e(t,a)};return function(t,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");e(t,a);function g(){this.constructor=t}t.prototype=a===null?Object.create(a):(g.prototype=a.prototype,new g)}}(),w=p("./lib/oop"),A=p("./lib/dom"),c=p("./lib/event"),h=p("./lib/event_emitter").EventEmitter,n=32768,o=function(){function e(t,a){this.element=A.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+a,this.inner=A.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),t.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,c.addListener(this.element,"scroll",this.onScroll.bind(this)),c.addListener(this.element,"mousedown",c.preventDefault)}return e.prototype.setVisible=function(t){this.element.style.display=t?"":"none",this.isVisible=t,this.coeff=1},e}();w.implement(o.prototype,h);var r=function(e){x(t,e);function t(a,g){var m=e.call(this,a,"-v")||this;return m.scrollTop=0,m.scrollHeight=0,g.$scrollbarWidth=m.width=A.scrollbarWidth(a.ownerDocument),m.inner.style.width=m.element.style.width=(m.width||15)+5+"px",m.$minWidth=0,m}return t.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var a=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-a)/(this.coeff-a)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(a){this.element.style.height=a+"px"},t.prototype.setScrollHeight=function(a){this.scrollHeight=a,a>n?(this.coeff=n/a,a=n):this.coeff!=1&&(this.coeff=1),this.inner.style.height=a+"px"},t.prototype.setScrollTop=function(a){this.scrollTop!=a&&(this.skipEvent=!0,this.scrollTop=a,this.element.scrollTop=a*this.coeff)},t}(o);r.prototype.setInnerHeight=r.prototype.setScrollHeight;var i=function(e){x(t,e);function t(a,g){var m=e.call(this,a,"-h")||this;return m.scrollLeft=0,m.height=g.$scrollbarWidth,m.inner.style.height=m.element.style.height=(m.height||15)+5+"px",m}return t.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.setWidth=function(a){this.element.style.width=a+"px"},t.prototype.setInnerWidth=function(a){this.inner.style.width=a+"px"},t.prototype.setScrollWidth=function(a){this.inner.style.width=a+"px"},t.prototype.setScrollLeft=function(a){this.scrollLeft!=a&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=a)},t}(o);v.ScrollBar=r,v.ScrollBarV=r,v.ScrollBarH=i,v.VScrollBar=r,v.HScrollBar=i}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(p,v,fe){var x=this&&this.__extends||function(){var i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,g){a.__proto__=g}||function(a,g){for(var m in g)Object.prototype.hasOwnProperty.call(g,m)&&(a[m]=g[m])},i(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");i(e,t);function a(){this.constructor=e}e.prototype=t===null?Object.create(t):(a.prototype=t.prototype,new a)}}(),w=p("./lib/oop"),A=p("./lib/dom"),c=p("./lib/event"),h=p("./lib/event_emitter").EventEmitter;A.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
220
+ position: absolute;
221
+ background: rgba(128, 128, 128, 0.6);
222
+ -moz-box-sizing: border-box;
223
+ box-sizing: border-box;
224
+ border: 1px solid #bbb;
225
+ border-radius: 2px;
226
+ z-index: 8;
227
+ }
228
+ .ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
229
+ position: absolute;
230
+ z-index: 6;
231
+ background: none;
232
+ overflow: hidden!important;
233
+ }
234
+ .ace_editor>.ace_sb-v {
235
+ z-index: 6;
236
+ right: 0;
237
+ top: 0;
238
+ width: 12px;
239
+ }
240
+ .ace_editor>.ace_sb-v div {
241
+ z-index: 8;
242
+ right: 0;
243
+ width: 100%;
244
+ }
245
+ .ace_editor>.ace_sb-h {
246
+ bottom: 0;
247
+ left: 0;
248
+ height: 12px;
249
+ }
250
+ .ace_editor>.ace_sb-h div {
251
+ bottom: 0;
252
+ height: 100%;
253
+ }
254
+ .ace_editor>.ace_sb_grabbed {
255
+ z-index: 8;
256
+ background: #000;
257
+ }`,"ace_scrollbar.css",!1);var n=function(){function i(e,t){this.element=A.createElement("div"),this.element.className="ace_sb"+t,this.inner=A.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,c.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return i.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},i}();w.implement(n.prototype,h);var o=function(i){x(e,i);function e(t,a){var g=i.call(this,t,"-v")||this;return g.scrollTop=0,g.scrollHeight=0,g.parent=t,g.width=g.VScrollWidth,g.renderer=a,g.inner.style.width=g.element.style.width=(g.width||15)+"px",g.$minWidth=0,g}return e.prototype.onMouseDown=function(t,a){if(t==="mousedown"&&!(c.getButton(a)!==0||a.detail===2)){if(a.target===this.inner){var g=this,m=a.clientY,M=function(Y){m=Y.clientY},O=function(){clearInterval(Te)},$=a.clientY,b=this.thumbTop,he=function(){if(m!==void 0){var Y=g.scrollTopFromThumbTop(b+m-$);Y!==g.scrollTop&&g._emit("scroll",{data:Y})}};c.capture(this.inner,M,O);var Te=setInterval(he,20);return c.preventDefault(a)}var de=a.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(de)}),c.preventDefault(a)}},e.prototype.getHeight=function(){return this.height},e.prototype.scrollTopFromThumbTop=function(t){var a=t*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return a=a>>0,a<0?a=0:a>this.pageHeight-this.viewHeight&&(a=this.pageHeight-this.viewHeight),a},e.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},e.prototype.setHeight=function(t){this.height=Math.max(0,t),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},e.prototype.setScrollHeight=function(t,a){this.pageHeight===t&&!a||(this.pageHeight=t,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(t){this.scrollTop=t,t<0&&(t=0),this.thumbTop=t*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},e}(n);o.prototype.setInnerHeight=o.prototype.setScrollHeight;var r=function(i){x(e,i);function e(t,a){var g=i.call(this,t,"-h")||this;return g.scrollLeft=0,g.scrollWidth=0,g.height=g.HScrollHeight,g.inner.style.height=g.element.style.height=(g.height||12)+"px",g.renderer=a,g}return e.prototype.onMouseDown=function(t,a){if(t==="mousedown"&&!(c.getButton(a)!==0||a.detail===2)){if(a.target===this.inner){var g=this,m=a.clientX,M=function(Y){m=Y.clientX},O=function(){clearInterval(Te)},$=a.clientX,b=this.thumbLeft,he=function(){if(m!==void 0){var Y=g.scrollLeftFromThumbLeft(b+m-$);Y!==g.scrollLeft&&g._emit("scroll",{data:Y})}};c.capture(this.inner,M,O);var Te=setInterval(he,20);return c.preventDefault(a)}var de=a.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(de)}),c.preventDefault(a)}},e.prototype.getHeight=function(){return this.isVisible?this.height:0},e.prototype.scrollLeftFromThumbLeft=function(t){var a=t*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return a=a>>0,a<0?a=0:a>this.pageWidth-this.viewWidth&&(a=this.pageWidth-this.viewWidth),a},e.prototype.setWidth=function(t){this.width=Math.max(0,t),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},e.prototype.setScrollWidth=function(t,a){this.pageWidth===t&&!a||(this.pageWidth=t,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(t){this.scrollLeft=t,t<0&&(t=0),this.thumbLeft=t*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},e}(n);r.prototype.setInnerWidth=r.prototype.setScrollWidth,v.ScrollBar=o,v.ScrollBarV=o,v.ScrollBarH=r,v.VScrollBar=o,v.HScrollBar=r}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(p,v,fe){var x=p("./lib/event"),w=function(){function A(c,h){this.onRender=c,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=h||window;var n=this;this._flush=function(o){n.pending=!1;var r=n.changes;if(r&&(x.blockIdle(100),n.changes=0,n.onRender(r)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}}return A.prototype.schedule=function(c){this.changes=this.changes|c,this.changes&&!this.pending&&(x.nextFrame(this._flush),this.pending=!0)},A.prototype.clear=function(c){var h=this.changes;return this.changes=0,h},A}();v.RenderLoop=w}),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(p,v,fe){var x=p("../lib/oop"),w=p("../lib/dom"),A=p("../lib/lang"),c=p("../lib/event"),h=p("../lib/useragent"),n=p("../lib/event_emitter").EventEmitter,o=512,r=typeof ResizeObserver=="function",i=200,e=function(){function t(a){this.el=w.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=w.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=w.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),a.appendChild(this.el),this.$measureNode.textContent=A.stringRepeat("X",o),this.$characterSize={width:0,height:0},r?this.$addObserver():this.checkForSizeChanges()}return t.prototype.$setMeasureNodeStyles=function(a,g){a.width=a.height="auto",a.left=a.top="0px",a.visibility="hidden",a.position="absolute",a.whiteSpace="pre",h.isIE<8?a["font-family"]="inherit":a.font="inherit",a.overflow=g?"hidden":"visible"},t.prototype.checkForSizeChanges=function(a){if(a===void 0&&(a=this.$measureSizes()),a&&(this.$characterSize.width!==a.width||this.$characterSize.height!==a.height)){this.$measureNode.style.fontWeight="bold";var g=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=a,this.charSizes=Object.create(null),this.allowBoldFonts=g&&g.width===a.width&&g.height===a.height,this._emit("changeCharacterSize",{data:a})}},t.prototype.$addObserver=function(){var a=this;this.$observer=new window.ResizeObserver(function(g){a.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},t.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var a=this;return this.$pollSizeChangesTimer=c.onIdle(function g(){a.checkForSizeChanges(),c.onIdle(g,500)},500)},t.prototype.setPolling=function(a){a?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},t.prototype.$measureSizes=function(a){var g={height:(a||this.$measureNode).clientHeight,width:(a||this.$measureNode).clientWidth/o};return g.width===0||g.height===0?null:g},t.prototype.$measureCharWidth=function(a){this.$main.textContent=A.stringRepeat(a,o);var g=this.$main.getBoundingClientRect();return g.width/o},t.prototype.getCharacterWidth=function(a){var g=this.charSizes[a];return g===void 0&&(g=this.charSizes[a]=this.$measureCharWidth(a)/this.$characterSize.width),g},t.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},t.prototype.$getZoom=function(a){return!a||!a.parentElement?1:(Number(window.getComputedStyle(a).zoom)||1)*this.$getZoom(a.parentElement)},t.prototype.$initTransformMeasureNodes=function(){var a=function(g,m){return["div",{style:"position: absolute;top:"+g+"px;left:"+m+"px;"}]};this.els=w.buildDom([a(0,0),a(i,0),a(0,i),a(i,i)],this.el)},t.prototype.transformCoordinates=function(a,g){if(a){var m=this.$getZoom(this.el);a=b(1/m,a)}function M(mt,yt,Qt){var bt=mt[1]*yt[0]-mt[0]*yt[1];return[(-yt[1]*Qt[0]+yt[0]*Qt[1])/bt,(+mt[1]*Qt[0]-mt[0]*Qt[1])/bt]}function O(mt,yt){return[mt[0]-yt[0],mt[1]-yt[1]]}function $(mt,yt){return[mt[0]+yt[0],mt[1]+yt[1]]}function b(mt,yt){return[mt*yt[0],mt*yt[1]]}this.els||this.$initTransformMeasureNodes();function he(mt){var yt=mt.getBoundingClientRect();return[yt.left,yt.top]}var Te=he(this.els[0]),de=he(this.els[1]),Y=he(this.els[2]),gt=he(this.els[3]),U=M(O(gt,de),O(gt,Y),O($(de,Y),$(gt,Te))),V=b(1+U[0],O(de,Te)),C=b(1+U[1],O(Y,Te));if(g){var y=g,T=U[0]*y[0]/i+U[1]*y[1]/i+1,ke=$(b(y[0],V),b(y[1],C));return $(b(1/T/i,ke),Te)}var Qe=O(a,Te),Je=M(O(V,b(U[0],Qe)),O(C,b(U[1],Qe)),Qe);return b(i,Je)},t}();e.prototype.$characterSize={width:0,height:0},x.implement(e.prototype,n),v.FontMetrics=e}),ace.define("ace/css/editor-css",["require","exports","module"],function(p,v,fe){fe.exports=`
258
+ .ace_br1 {border-top-left-radius : 3px;}
259
+ .ace_br2 {border-top-right-radius : 3px;}
260
+ .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
261
+ .ace_br4 {border-bottom-right-radius: 3px;}
262
+ .ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
263
+ .ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
264
+ .ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
265
+ .ace_br8 {border-bottom-left-radius : 3px;}
266
+ .ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
267
+ .ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
268
+ .ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
269
+ .ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
270
+ .ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
271
+ .ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
272
+ .ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
273
+
274
+
275
+ .ace_editor {
276
+ position: relative;
277
+ overflow: hidden;
278
+ padding: 0;
279
+ font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
280
+ direction: ltr;
281
+ text-align: left;
282
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
283
+ forced-color-adjust: none;
284
+ }
285
+
286
+ .ace_scroller {
287
+ position: absolute;
288
+ overflow: hidden;
289
+ top: 0;
290
+ bottom: 0;
291
+ background-color: inherit;
292
+ -ms-user-select: none;
293
+ -moz-user-select: none;
294
+ -webkit-user-select: none;
295
+ user-select: none;
296
+ cursor: text;
297
+ }
298
+
299
+ .ace_content {
300
+ position: absolute;
301
+ box-sizing: border-box;
302
+ min-width: 100%;
303
+ contain: style size layout;
304
+ font-variant-ligatures: no-common-ligatures;
305
+ }
306
+ .ace_invisible {
307
+ font-variant-ligatures: none;
308
+ }
309
+
310
+ .ace_keyboard-focus:focus {
311
+ box-shadow: inset 0 0 0 2px #5E9ED6;
312
+ outline: none;
313
+ }
314
+
315
+ .ace_dragging .ace_scroller:before{
316
+ position: absolute;
317
+ top: 0;
318
+ left: 0;
319
+ right: 0;
320
+ bottom: 0;
321
+ content: '';
322
+ background: rgba(250, 250, 250, 0.01);
323
+ z-index: 1000;
324
+ }
325
+ .ace_dragging.ace_dark .ace_scroller:before{
326
+ background: rgba(0, 0, 0, 0.01);
327
+ }
328
+
329
+ .ace_gutter {
330
+ position: absolute;
331
+ overflow : hidden;
332
+ width: auto;
333
+ top: 0;
334
+ bottom: 0;
335
+ left: 0;
336
+ cursor: default;
337
+ z-index: 4;
338
+ -ms-user-select: none;
339
+ -moz-user-select: none;
340
+ -webkit-user-select: none;
341
+ user-select: none;
342
+ contain: style size layout;
343
+ }
344
+
345
+ .ace_gutter-active-line {
346
+ position: absolute;
347
+ left: 0;
348
+ right: 0;
349
+ }
350
+
351
+ .ace_scroller.ace_scroll-left:after {
352
+ content: "";
353
+ position: absolute;
354
+ top: 0;
355
+ right: 0;
356
+ bottom: 0;
357
+ left: 0;
358
+ box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
359
+ pointer-events: none;
360
+ }
361
+
362
+ .ace_gutter-cell, .ace_gutter-cell_svg-icons {
363
+ position: absolute;
364
+ top: 0;
365
+ left: 0;
366
+ right: 0;
367
+ padding-left: 19px;
368
+ padding-right: 6px;
369
+ background-repeat: no-repeat;
370
+ }
371
+
372
+ .ace_gutter-cell_svg-icons .ace_gutter_annotation {
373
+ margin-left: -14px;
374
+ float: left;
375
+ }
376
+
377
+ .ace_gutter-cell .ace_gutter_annotation {
378
+ margin-left: -19px;
379
+ float: left;
380
+ }
381
+
382
+ .ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {
383
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");
384
+ background-repeat: no-repeat;
385
+ background-position: 2px center;
386
+ }
387
+
388
+ .ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
389
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");
390
+ background-repeat: no-repeat;
391
+ background-position: 2px center;
392
+ }
393
+
394
+ .ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
395
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
396
+ background-repeat: no-repeat;
397
+ background-position: 2px center;
398
+ }
399
+
400
+ .ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {
401
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
402
+ }
403
+
404
+ .ace_icon_svg.ace_error {
405
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
406
+ background-color: crimson;
407
+ }
408
+ .ace_icon_svg.ace_security {
409
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
410
+ background-color: crimson;
411
+ }
412
+ .ace_icon_svg.ace_warning {
413
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
414
+ background-color: darkorange;
415
+ }
416
+ .ace_icon_svg.ace_info {
417
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
418
+ background-color: royalblue;
419
+ }
420
+ .ace_icon_svg.ace_hint {
421
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
422
+ background-color: silver;
423
+ }
424
+
425
+ .ace_icon_svg.ace_error_fold {
426
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
427
+ background-color: crimson;
428
+ }
429
+ .ace_icon_svg.ace_security_fold {
430
+ -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
431
+ background-color: crimson;
432
+ }
433
+ .ace_icon_svg.ace_warning_fold {
434
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
435
+ background-color: darkorange;
436
+ }
437
+
438
+ .ace_scrollbar {
439
+ contain: strict;
440
+ position: absolute;
441
+ right: 0;
442
+ bottom: 0;
443
+ z-index: 6;
444
+ }
445
+
446
+ .ace_scrollbar-inner {
447
+ position: absolute;
448
+ cursor: text;
449
+ left: 0;
450
+ top: 0;
451
+ }
452
+
453
+ .ace_scrollbar-v{
454
+ overflow-x: hidden;
455
+ overflow-y: scroll;
456
+ top: 0;
457
+ }
458
+
459
+ .ace_scrollbar-h {
460
+ overflow-x: scroll;
461
+ overflow-y: hidden;
462
+ left: 0;
463
+ }
464
+
465
+ .ace_print-margin {
466
+ position: absolute;
467
+ height: 100%;
468
+ }
469
+
470
+ .ace_text-input {
471
+ position: absolute;
472
+ z-index: 0;
473
+ width: 0.5em;
474
+ height: 1em;
475
+ opacity: 0;
476
+ background: transparent;
477
+ -moz-appearance: none;
478
+ appearance: none;
479
+ border: none;
480
+ resize: none;
481
+ outline: none;
482
+ overflow: hidden;
483
+ font: inherit;
484
+ padding: 0 1px;
485
+ margin: 0 -1px;
486
+ contain: strict;
487
+ -ms-user-select: text;
488
+ -moz-user-select: text;
489
+ -webkit-user-select: text;
490
+ user-select: text;
491
+ /*with \`pre-line\` chrome inserts &nbsp; instead of space*/
492
+ white-space: pre!important;
493
+ }
494
+ .ace_text-input.ace_composition {
495
+ background: transparent;
496
+ color: inherit;
497
+ z-index: 1000;
498
+ opacity: 1;
499
+ }
500
+ .ace_composition_placeholder { color: transparent }
501
+ .ace_composition_marker {
502
+ border-bottom: 1px solid;
503
+ position: absolute;
504
+ border-radius: 0;
505
+ margin-top: 1px;
506
+ }
507
+
508
+ [ace_nocontext=true] {
509
+ transform: none!important;
510
+ filter: none!important;
511
+ clip-path: none!important;
512
+ mask : none!important;
513
+ contain: none!important;
514
+ perspective: none!important;
515
+ mix-blend-mode: initial!important;
516
+ z-index: auto;
517
+ }
518
+
519
+ .ace_layer {
520
+ z-index: 1;
521
+ position: absolute;
522
+ overflow: hidden;
523
+ /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
524
+ word-wrap: normal;
525
+ white-space: pre;
526
+ height: 100%;
527
+ width: 100%;
528
+ box-sizing: border-box;
529
+ /* setting pointer-events: auto; on node under the mouse, which changes
530
+ during scroll, will break mouse wheel scrolling in Safari */
531
+ pointer-events: none;
532
+ }
533
+
534
+ .ace_gutter-layer {
535
+ position: relative;
536
+ width: auto;
537
+ text-align: right;
538
+ pointer-events: auto;
539
+ height: 1000000px;
540
+ contain: style size layout;
541
+ }
542
+
543
+ .ace_text-layer {
544
+ font: inherit !important;
545
+ position: absolute;
546
+ height: 1000000px;
547
+ width: 1000000px;
548
+ contain: style size layout;
549
+ }
550
+
551
+ .ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
552
+ contain: style size layout;
553
+ position: absolute;
554
+ top: 0;
555
+ left: 0;
556
+ right: 0;
557
+ }
558
+
559
+ .ace_hidpi .ace_text-layer,
560
+ .ace_hidpi .ace_gutter-layer,
561
+ .ace_hidpi .ace_content,
562
+ .ace_hidpi .ace_gutter {
563
+ contain: strict;
564
+ }
565
+ .ace_hidpi .ace_text-layer > .ace_line,
566
+ .ace_hidpi .ace_text-layer > .ace_line_group {
567
+ contain: strict;
568
+ }
569
+
570
+ .ace_cjk {
571
+ display: inline-block;
572
+ text-align: center;
573
+ }
574
+
575
+ .ace_cursor-layer {
576
+ z-index: 4;
577
+ }
578
+
579
+ .ace_cursor {
580
+ z-index: 4;
581
+ position: absolute;
582
+ box-sizing: border-box;
583
+ border-left: 2px solid;
584
+ /* workaround for smooth cursor repaintng whole screen in chrome */
585
+ transform: translatez(0);
586
+ }
587
+
588
+ .ace_multiselect .ace_cursor {
589
+ border-left-width: 1px;
590
+ }
591
+
592
+ .ace_slim-cursors .ace_cursor {
593
+ border-left-width: 1px;
594
+ }
595
+
596
+ .ace_overwrite-cursors .ace_cursor {
597
+ border-left-width: 0;
598
+ border-bottom: 1px solid;
599
+ }
600
+
601
+ .ace_hidden-cursors .ace_cursor {
602
+ opacity: 0.2;
603
+ }
604
+
605
+ .ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
606
+ opacity: 0;
607
+ }
608
+
609
+ .ace_smooth-blinking .ace_cursor {
610
+ transition: opacity 0.18s;
611
+ }
612
+
613
+ .ace_animate-blinking .ace_cursor {
614
+ animation-duration: 1000ms;
615
+ animation-timing-function: step-end;
616
+ animation-name: blink-ace-animate;
617
+ animation-iteration-count: infinite;
618
+ }
619
+
620
+ .ace_animate-blinking.ace_smooth-blinking .ace_cursor {
621
+ animation-duration: 1000ms;
622
+ animation-timing-function: ease-in-out;
623
+ animation-name: blink-ace-animate-smooth;
624
+ }
625
+
626
+ @keyframes blink-ace-animate {
627
+ from, to { opacity: 1; }
628
+ 60% { opacity: 0; }
629
+ }
630
+
631
+ @keyframes blink-ace-animate-smooth {
632
+ from, to { opacity: 1; }
633
+ 45% { opacity: 1; }
634
+ 60% { opacity: 0; }
635
+ 85% { opacity: 0; }
636
+ }
637
+
638
+ .ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
639
+ position: absolute;
640
+ z-index: 3;
641
+ }
642
+
643
+ .ace_marker-layer .ace_selection {
644
+ position: absolute;
645
+ z-index: 5;
646
+ }
647
+
648
+ .ace_marker-layer .ace_bracket {
649
+ position: absolute;
650
+ z-index: 6;
651
+ }
652
+
653
+ .ace_marker-layer .ace_error_bracket {
654
+ position: absolute;
655
+ border-bottom: 1px solid #DE5555;
656
+ border-radius: 0;
657
+ }
658
+
659
+ .ace_marker-layer .ace_active-line {
660
+ position: absolute;
661
+ z-index: 2;
662
+ }
663
+
664
+ .ace_marker-layer .ace_selected-word {
665
+ position: absolute;
666
+ z-index: 4;
667
+ box-sizing: border-box;
668
+ }
669
+
670
+ .ace_line .ace_fold {
671
+ box-sizing: border-box;
672
+
673
+ display: inline-block;
674
+ height: 11px;
675
+ margin-top: -2px;
676
+ vertical-align: middle;
677
+
678
+ background-image:
679
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
680
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
681
+ background-repeat: no-repeat, repeat-x;
682
+ background-position: center center, top left;
683
+ color: transparent;
684
+
685
+ border: 1px solid black;
686
+ border-radius: 2px;
687
+
688
+ cursor: pointer;
689
+ pointer-events: auto;
690
+ }
691
+
692
+ .ace_dark .ace_fold {
693
+ }
694
+
695
+ .ace_fold:hover{
696
+ background-image:
697
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
698
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
699
+ }
700
+
701
+ .ace_tooltip {
702
+ background-color: #f5f5f5;
703
+ border: 1px solid gray;
704
+ border-radius: 1px;
705
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
706
+ color: black;
707
+ padding: 3px 4px;
708
+ position: fixed;
709
+ z-index: 999999;
710
+ box-sizing: border-box;
711
+ cursor: default;
712
+ white-space: pre-wrap;
713
+ word-wrap: break-word;
714
+ line-height: normal;
715
+ font-style: normal;
716
+ font-weight: normal;
717
+ letter-spacing: normal;
718
+ pointer-events: none;
719
+ overflow: auto;
720
+ max-width: min(33em, 66vw);
721
+ overscroll-behavior: contain;
722
+ }
723
+ .ace_tooltip pre {
724
+ white-space: pre-wrap;
725
+ }
726
+
727
+ .ace_tooltip.ace_dark {
728
+ background-color: #636363;
729
+ color: #fff;
730
+ }
731
+
732
+ .ace_tooltip:focus {
733
+ outline: 1px solid #5E9ED6;
734
+ }
735
+
736
+ .ace_icon {
737
+ display: inline-block;
738
+ width: 18px;
739
+ vertical-align: top;
740
+ }
741
+
742
+ .ace_icon_svg {
743
+ display: inline-block;
744
+ width: 12px;
745
+ vertical-align: top;
746
+ -webkit-mask-repeat: no-repeat;
747
+ -webkit-mask-size: 12px;
748
+ -webkit-mask-position: center;
749
+ }
750
+
751
+ .ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
752
+ padding-right: 13px;
753
+ }
754
+
755
+ .ace_fold-widget, .ace_custom-widget {
756
+ box-sizing: border-box;
757
+
758
+ margin: 0 -12px 0 1px;
759
+ display: none;
760
+ width: 11px;
761
+ vertical-align: top;
762
+
763
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
764
+ background-repeat: no-repeat;
765
+ background-position: center;
766
+
767
+ border-radius: 3px;
768
+
769
+ border: 1px solid transparent;
770
+ cursor: pointer;
771
+ pointer-events: auto;
772
+ }
773
+
774
+ .ace_custom-widget {
775
+ background: none;
776
+ }
777
+
778
+ .ace_folding-enabled .ace_fold-widget {
779
+ display: inline-block;
780
+ }
781
+
782
+ .ace_fold-widget.ace_end {
783
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
784
+ }
785
+
786
+ .ace_fold-widget.ace_closed {
787
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
788
+ }
789
+
790
+ .ace_fold-widget:hover {
791
+ border: 1px solid rgba(0, 0, 0, 0.3);
792
+ background-color: rgba(255, 255, 255, 0.2);
793
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
794
+ }
795
+
796
+ .ace_fold-widget:active {
797
+ border: 1px solid rgba(0, 0, 0, 0.4);
798
+ background-color: rgba(0, 0, 0, 0.05);
799
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
800
+ }
801
+ /**
802
+ * Dark version for fold widgets
803
+ */
804
+ .ace_dark .ace_fold-widget {
805
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
806
+ }
807
+ .ace_dark .ace_fold-widget.ace_end {
808
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
809
+ }
810
+ .ace_dark .ace_fold-widget.ace_closed {
811
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
812
+ }
813
+ .ace_dark .ace_fold-widget:hover {
814
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
815
+ background-color: rgba(255, 255, 255, 0.1);
816
+ }
817
+ .ace_dark .ace_fold-widget:active {
818
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
819
+ }
820
+
821
+ .ace_inline_button {
822
+ border: 1px solid lightgray;
823
+ display: inline-block;
824
+ margin: -1px 8px;
825
+ padding: 0 5px;
826
+ pointer-events: auto;
827
+ cursor: pointer;
828
+ }
829
+ .ace_inline_button:hover {
830
+ border-color: gray;
831
+ background: rgba(200,200,200,0.2);
832
+ display: inline-block;
833
+ pointer-events: auto;
834
+ }
835
+
836
+ .ace_fold-widget.ace_invalid {
837
+ background-color: #FFB4B4;
838
+ border-color: #DE5555;
839
+ }
840
+
841
+ .ace_fade-fold-widgets .ace_fold-widget {
842
+ transition: opacity 0.4s ease 0.05s;
843
+ opacity: 0;
844
+ }
845
+
846
+ .ace_fade-fold-widgets:hover .ace_fold-widget {
847
+ transition: opacity 0.05s ease 0.05s;
848
+ opacity:1;
849
+ }
850
+
851
+ .ace_underline {
852
+ text-decoration: underline;
853
+ }
854
+
855
+ .ace_bold {
856
+ font-weight: bold;
857
+ }
858
+
859
+ .ace_nobold .ace_bold {
860
+ font-weight: normal;
861
+ }
862
+
863
+ .ace_italic {
864
+ font-style: italic;
865
+ }
866
+
867
+
868
+ .ace_error-marker {
869
+ background-color: rgba(255, 0, 0,0.2);
870
+ position: absolute;
871
+ z-index: 9;
872
+ }
873
+
874
+ .ace_highlight-marker {
875
+ background-color: rgba(255, 255, 0,0.2);
876
+ position: absolute;
877
+ z-index: 8;
878
+ }
879
+
880
+ .ace_mobile-menu {
881
+ position: absolute;
882
+ line-height: 1.5;
883
+ border-radius: 4px;
884
+ -ms-user-select: none;
885
+ -moz-user-select: none;
886
+ -webkit-user-select: none;
887
+ user-select: none;
888
+ background: white;
889
+ box-shadow: 1px 3px 2px grey;
890
+ border: 1px solid #dcdcdc;
891
+ color: black;
892
+ }
893
+ .ace_dark > .ace_mobile-menu {
894
+ background: #333;
895
+ color: #ccc;
896
+ box-shadow: 1px 3px 2px grey;
897
+ border: 1px solid #444;
898
+
899
+ }
900
+ .ace_mobile-button {
901
+ padding: 2px;
902
+ cursor: pointer;
903
+ overflow: hidden;
904
+ }
905
+ .ace_mobile-button:hover {
906
+ background-color: #eee;
907
+ opacity:1;
908
+ }
909
+ .ace_mobile-button:active {
910
+ background-color: #ddd;
911
+ }
912
+
913
+ .ace_placeholder {
914
+ position: relative;
915
+ font-family: arial;
916
+ transform: scale(0.9);
917
+ transform-origin: left;
918
+ white-space: pre;
919
+ opacity: 0.7;
920
+ margin: 0 10px;
921
+ z-index: 1;
922
+ }
923
+
924
+ .ace_ghost_text {
925
+ opacity: 0.5;
926
+ font-style: italic;
927
+ }
928
+
929
+ .ace_ghost_text_container > div {
930
+ white-space: pre;
931
+ }
932
+
933
+ .ghost_text_line_wrapped::after {
934
+ content: "↩";
935
+ position: absolute;
936
+ }
937
+
938
+ .ace_lineWidgetContainer.ace_ghost_text {
939
+ margin: 0px 4px
940
+ }
941
+
942
+ .ace_screenreader-only {
943
+ position:absolute;
944
+ left:-10000px;
945
+ top:auto;
946
+ width:1px;
947
+ height:1px;
948
+ overflow:hidden;
949
+ }
950
+
951
+ .ace_hidden_token {
952
+ display: none;
953
+ }`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(p,v,fe){var x=p("../lib/dom"),w=p("../lib/oop"),A=p("../lib/event_emitter").EventEmitter,c=function(){function h(n,o){this.renderer=o,this.pixelRatio=1,this.maxHeight=o.layerConfig.maxHeight,this.lineHeight=o.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},this.setScrollBarV(n)}return h.prototype.$createCanvas=function(){this.canvas=x.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},h.prototype.setScrollBarV=function(n){this.$createCanvas(),this.scrollbarV=n,n.element.appendChild(this.canvas),this.setDimensions()},h.prototype.$updateDecorators=function(n){if(typeof this.canvas.getContext!="function")return;var o=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(n);var r=this.canvas.getContext("2d");function i(V,C){return V.priority<C.priority?-1:V.priority>C.priority?1:0}var e=this.renderer.session.$annotations;if(r.clearRect(0,0,this.canvas.width,this.canvas.height),e){var t={info:1,warning:2,error:3};e.forEach(function(V){V.priority=t[V.type]||null}),e=e.sort(i);for(var a=0;a<e.length;a++){var g=e[a].row,m=this.getVerticalOffsetForRow(g),M=m+this.lineHeight,O=Math.round(this.heightRatio*m),$=Math.round(this.heightRatio*M),b=Math.round((O+$)/2),he=$-b;he<this.halfMinDecorationHeight&&(he=this.halfMinDecorationHeight),b-he<0&&(b=he),b+he>this.canvasHeight&&(b=this.canvasHeight-he);var Te=b-he,de=b+he,Y=de-Te;r.fillStyle=o[e[a].type]||null,r.fillRect(0,Te,Math.round(this.oneZoneWidth-1),Y)}}var gt=this.renderer.session.selection.getCursor();if(gt){var U=Math.round(this.getVerticalOffsetForRow(gt.row)*this.heightRatio);r.fillStyle="rgba(0, 0, 0, 0.5)",r.fillRect(0,U,this.canvasWidth,2)}},h.prototype.getVerticalOffsetForRow=function(n){n=n|0;var o=this.renderer.session.documentToScreenRow(n,0)*this.lineHeight;return o},h.prototype.setDimensions=function(n){n=n||this.renderer.layerConfig,this.maxHeight=n.maxHeight,this.lineHeight=n.lineHeight,this.canvasHeight=n.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight},h.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},h.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},h}();w.implement(c.prototype,A),v.Decorator=c}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(p,v,fe){var x=p("./lib/oop"),w=p("./lib/dom"),A=p("./lib/lang"),c=p("./config"),h=p("./layer/gutter").Gutter,n=p("./layer/marker").Marker,o=p("./layer/text").Text,r=p("./layer/cursor").Cursor,i=p("./scrollbar").HScrollBar,e=p("./scrollbar").VScrollBar,t=p("./scrollbar_custom").HScrollBar,a=p("./scrollbar_custom").VScrollBar,g=p("./renderloop").RenderLoop,m=p("./layer/font_metrics").FontMetrics,M=p("./lib/event_emitter").EventEmitter,O=p("./css/editor-css"),$=p("./layer/decorators").Decorator,b=p("./lib/useragent"),he=p("./layer/text_util").isTextToken;w.importCssString(O,"ace_editor.css",!1);var Te=function(){function de(Y,gt){var U=this;this.container=Y||w.createElement("div"),w.addCssClass(this.container,"ace_editor"),w.HI_DPI&&w.addCssClass(this.container,"ace_hidpi"),this.setTheme(gt),c.get("useStrictCSP")==null&&c.set("useStrictCSP",!1),this.$gutter=w.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=w.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=w.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 n(this.content);var V=this.$textLayer=new o(this.content);this.canvas=V.element,this.$markerFront=new n(this.content),this.$cursorLayer=new r(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new e(this.container,this),this.scrollBarH=new i(this.container,this),this.scrollBarV.on("scroll",function(C){U.$scrollAnimation||U.session.setScrollTop(C.data-U.scrollMargin.top)}),this.scrollBarH.on("scroll",function(C){U.$scrollAnimation||U.session.setScrollLeft(C.data-U.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(C){U.updateCharacterSize(),U.onResize(!0,U.gutterWidth,U.$size.width,U.$size.height),U._signal("changeCharacterSize",C)}),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 g(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),c.resetOptions(this),c._signal("renderer",this)}return de.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(),w.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},de.prototype.setSession=function(Y){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=Y,Y&&this.scrollMargin.top&&Y.getScrollTop()<=0&&Y.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(Y),this.$markerBack.setSession(Y),this.$markerFront.setSession(Y),this.$gutterLayer.setSession(Y),this.$textLayer.setSession(Y),Y&&(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))},de.prototype.updateLines=function(Y,gt,U){if(gt===void 0&&(gt=1/0),this.$changedLines?(this.$changedLines.firstRow>Y&&(this.$changedLines.firstRow=Y),this.$changedLines.lastRow<gt&&(this.$changedLines.lastRow=gt)):this.$changedLines={firstRow:Y,lastRow:gt},this.$changedLines.lastRow<this.layerConfig.firstRow)if(U)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},de.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},de.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},de.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},de.prototype.updateFull=function(Y){Y?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},de.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},de.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},de.prototype.onResize=function(Y,gt,U,V){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=Y?1:0;var C=this.container;V||(V=C.clientHeight||C.scrollHeight),!V&&this.$maxLines&&this.lineHeight>1&&(!C.style.height||C.style.height=="0px")&&(C.style.height="1px",V=C.clientHeight||C.scrollHeight),U||(U=C.clientWidth||C.scrollWidth);var y=this.$updateCachedSize(Y,gt,U,V);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!U&&!V)return this.resizing=0;Y&&(this.$gutterLayer.$padding=null),Y?this.$renderChanges(y|this.$changes,!0):this.$loop.schedule(y|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},de.prototype.$updateCachedSize=function(Y,gt,U,V){V-=this.$extraHeight||0;var C=0,y=this.$size,T={width:y.width,height:y.height,scrollerHeight:y.scrollerHeight,scrollerWidth:y.scrollerWidth};if(V&&(Y||y.height!=V)&&(y.height=V,C|=this.CHANGE_SIZE,y.scrollerHeight=y.height,this.$horizScroll&&(y.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(y.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",C=C|this.CHANGE_SCROLL),U&&(Y||y.width!=U)){C|=this.CHANGE_SIZE,y.width=U,gt==null&&(gt=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=gt,w.setStyle(this.scrollBarH.element.style,"left",gt+"px"),w.setStyle(this.scroller.style,"left",gt+this.margin.left+"px"),y.scrollerWidth=Math.max(0,U-gt-this.scrollBarV.getWidth()-this.margin.h),w.setStyle(this.$gutter.style,"left",this.margin.left+"px");var ke=this.scrollBarV.getWidth()+"px";w.setStyle(this.scrollBarH.element.style,"right",ke),w.setStyle(this.scroller.style,"right",ke),w.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(y.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||Y)&&(C|=this.CHANGE_FULL)}return y.$dirty=!U||!V,C&&this._signal("resize",T),C},de.prototype.onGutterResize=function(Y){var gt=this.$showGutter?Y:0;gt!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,gt,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()},de.prototype.adjustWrapLimit=function(){var Y=this.$size.scrollerWidth-this.$padding*2,gt=Math.floor(Y/this.characterWidth);return this.session.adjustWrapLimit(gt,this.$showPrintMargin&&this.$printMarginColumn)},de.prototype.setAnimatedScroll=function(Y){this.setOption("animatedScroll",Y)},de.prototype.getAnimatedScroll=function(){return this.$animatedScroll},de.prototype.setShowInvisibles=function(Y){this.setOption("showInvisibles",Y),this.session.$bidiHandler.setShowInvisibles(Y)},de.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},de.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},de.prototype.setDisplayIndentGuides=function(Y){this.setOption("displayIndentGuides",Y)},de.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},de.prototype.setHighlightIndentGuides=function(Y){this.setOption("highlightIndentGuides",Y)},de.prototype.setShowPrintMargin=function(Y){this.setOption("showPrintMargin",Y)},de.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},de.prototype.setPrintMarginColumn=function(Y){this.setOption("printMarginColumn",Y)},de.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},de.prototype.getShowGutter=function(){return this.getOption("showGutter")},de.prototype.setShowGutter=function(Y){return this.setOption("showGutter",Y)},de.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},de.prototype.setFadeFoldWidgets=function(Y){this.setOption("fadeFoldWidgets",Y)},de.prototype.setHighlightGutterLine=function(Y){this.setOption("highlightGutterLine",Y)},de.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},de.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var Y=w.createElement("div");Y.className="ace_layer ace_print-margin-layer",this.$printMarginEl=w.createElement("div"),this.$printMarginEl.className="ace_print-margin",Y.appendChild(this.$printMarginEl),this.content.insertBefore(Y,this.content.firstChild)}var gt=this.$printMarginEl.style;gt.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",gt.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},de.prototype.getContainerElement=function(){return this.container},de.prototype.getMouseEventTarget=function(){return this.scroller},de.prototype.getTextAreaContainer=function(){return this.container},de.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var Y=this.textarea.style,gt=this.$composition;if(!this.$keepTextAreaAtCursor&&!gt){w.translate(this.textarea,-100,0);return}var U=this.$cursorLayer.$pixelPos;if(U){gt&&gt.markerRange&&(U=this.$cursorLayer.getPixelPosition(gt.markerRange.start,!0));var V=this.layerConfig,C=U.top,y=U.left;C-=V.offset;var T=gt&&gt.useTextareaForIME||b.isMobile?this.lineHeight:1;if(C<0||C>V.height-T){w.translate(this.textarea,0,0);return}var ke=1,Qe=this.$size.height-T;if(!gt)C+=this.lineHeight;else if(gt.useTextareaForIME){var Je=this.textarea.value;ke=this.characterWidth*this.session.$getStringScreenWidth(Je)[0]}else C+=this.lineHeight+2;y-=this.scrollLeft,y>this.$size.scrollerWidth-ke&&(y=this.$size.scrollerWidth-ke),y+=this.gutterWidth+this.margin.left,w.setStyle(Y,"height",T+"px"),w.setStyle(Y,"width",ke+"px"),w.translate(this.textarea,Math.min(y,this.$size.scrollerWidth-ke),Math.min(C,Qe))}}},de.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},de.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},de.prototype.getLastFullyVisibleRow=function(){var Y=this.layerConfig,gt=Y.lastRow,U=this.session.documentToScreenRow(gt,0)*Y.lineHeight;return U-this.session.getScrollTop()>Y.height-Y.lineHeight?gt-1:gt},de.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},de.prototype.setPadding=function(Y){this.$padding=Y,this.$textLayer.setPadding(Y),this.$cursorLayer.setPadding(Y),this.$markerFront.setPadding(Y),this.$markerBack.setPadding(Y),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},de.prototype.setScrollMargin=function(Y,gt,U,V){var C=this.scrollMargin;C.top=Y|0,C.bottom=gt|0,C.right=V|0,C.left=U|0,C.v=C.top+C.bottom,C.h=C.left+C.right,C.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-C.top),this.updateFull()},de.prototype.setMargin=function(Y,gt,U,V){var C=this.margin;C.top=Y|0,C.bottom=gt|0,C.right=V|0,C.left=U|0,C.v=C.top+C.bottom,C.h=C.left+C.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},de.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},de.prototype.setHScrollBarAlwaysVisible=function(Y){this.setOption("hScrollBarAlwaysVisible",Y)},de.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},de.prototype.setVScrollBarAlwaysVisible=function(Y){this.setOption("vScrollBarAlwaysVisible",Y)},de.prototype.$updateScrollBarV=function(){var Y=this.layerConfig.maxHeight,gt=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(Y-=(gt-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>Y-gt&&(Y=this.scrollTop+gt,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(Y+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},de.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},de.prototype.freeze=function(){this.$frozen=!0},de.prototype.unfreeze=function(){this.$frozen=!1},de.prototype.$renderChanges=function(Y,gt){if(this.$changes&&(Y|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!Y&&!gt){this.$changes|=Y;return}if(this.$size.$dirty)return this.$changes|=Y,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",Y),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var U=this.layerConfig;if(Y&this.CHANGE_FULL||Y&this.CHANGE_SIZE||Y&this.CHANGE_TEXT||Y&this.CHANGE_LINES||Y&this.CHANGE_SCROLL||Y&this.CHANGE_H_SCROLL){if(Y|=this.$computeLayerConfig()|this.$loop.clear(),U.firstRow!=this.layerConfig.firstRow&&U.firstRowScreen==this.layerConfig.firstRowScreen){var V=this.scrollTop+(U.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;V>0&&(this.scrollTop=V,Y=Y|this.CHANGE_SCROLL,Y|=this.$computeLayerConfig()|this.$loop.clear())}U=this.layerConfig,this.$updateScrollBarV(),Y&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),w.translate(this.content,-this.scrollLeft,-U.offset);var C=U.width+2*this.$padding+"px",y=U.minHeight+"px";w.setStyle(this.content.style,"width",C),w.setStyle(this.content.style,"height",y)}if(Y&this.CHANGE_H_SCROLL&&(w.translate(this.content,-this.scrollLeft,-U.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),Y&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(U),this.$showGutter&&this.$gutterLayer.update(U),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(U),this.$markerBack.update(U),this.$markerFront.update(U),this.$cursorLayer.update(U),this.$moveTextAreaToCursor(),this._signal("afterRender",Y);return}if(Y&this.CHANGE_SCROLL){this.$changedLines=null,Y&this.CHANGE_TEXT||Y&this.CHANGE_LINES?this.$textLayer.update(U):this.$textLayer.scrollLines(U),this.$showGutter&&(Y&this.CHANGE_GUTTER||Y&this.CHANGE_LINES?this.$gutterLayer.update(U):this.$gutterLayer.scrollLines(U)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(U),this.$markerBack.update(U),this.$markerFront.update(U),this.$cursorLayer.update(U),this.$moveTextAreaToCursor(),this._signal("afterRender",Y);return}Y&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(U),this.$showGutter&&this.$gutterLayer.update(U),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(U)):Y&this.CHANGE_LINES?((this.$updateLines()||Y&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(U),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(U)):Y&this.CHANGE_TEXT||Y&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(U),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(U)):Y&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(U),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(U)),Y&this.CHANGE_CURSOR&&(this.$cursorLayer.update(U),this.$moveTextAreaToCursor()),Y&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(U),Y&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(U),this._signal("afterRender",Y)},de.prototype.$autosize=function(){var Y=this.session.getScreenLength()*this.lineHeight,gt=this.$maxLines*this.lineHeight,U=Math.min(gt,Math.max((this.$minLines||1)*this.lineHeight,Y))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(U+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&U>this.$maxPixelHeight&&(U=this.$maxPixelHeight);var V=U<=2*this.lineHeight,C=!V&&Y>gt;if(U!=this.desiredHeight||this.$size.height!=this.desiredHeight||C!=this.$vScroll){C!=this.$vScroll&&(this.$vScroll=C,this.scrollBarV.setVisible(C));var y=this.container.clientWidth;this.container.style.height=U+"px",this.$updateCachedSize(!0,this.$gutterWidth,y,U),this.desiredHeight=U,this._signal("autosize")}},de.prototype.$computeLayerConfig=function(){var Y=this.session,gt=this.$size,U=gt.height<=2*this.lineHeight,V=this.session.getScreenLength(),C=V*this.lineHeight,y=this.$getLongestLine(),T=!U&&(this.$hScrollBarAlwaysVisible||gt.scrollerWidth-y-2*this.$padding<0),ke=this.$horizScroll!==T;ke&&(this.$horizScroll=T,this.scrollBarH.setVisible(T));var Qe=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),U=gt.height<=2*this.lineHeight);var Je=gt.scrollerHeight+this.lineHeight,mt=!this.$maxLines&&this.$scrollPastEnd?(gt.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;C+=mt;var yt=this.scrollMargin;this.session.setScrollTop(Math.max(-yt.top,Math.min(this.scrollTop,C-gt.scrollerHeight+yt.bottom))),this.session.setScrollLeft(Math.max(-yt.left,Math.min(this.scrollLeft,y+2*this.$padding-gt.scrollerWidth+yt.right)));var Qt=!U&&(this.$vScrollBarAlwaysVisible||gt.scrollerHeight-C+mt<0||this.scrollTop>yt.top),bt=Qe!==Qt;bt&&(this.$vScroll=Qt,this.scrollBarV.setVisible(Qt));var Gt=this.scrollTop%this.lineHeight,Yt=Math.ceil(Je/this.lineHeight)-1,Zt=Math.max(0,Math.round((this.scrollTop-Gt)/this.lineHeight)),Jt=Zt+Yt,pi,mi,gi=this.lineHeight;Zt=Y.screenToDocumentRow(Zt,0);var vi=Y.getFoldLine(Zt);vi&&(Zt=vi.start.row),pi=Y.documentToScreenRow(Zt,0),mi=Y.getRowLength(Zt)*gi,Jt=Math.min(Y.screenToDocumentRow(Jt,0),Y.getLength()-1),Je=gt.scrollerHeight+Y.getRowLength(Jt)*gi+mi,Gt=this.scrollTop-pi*gi,Gt<0&&pi>0&&(pi=Math.max(0,pi+Math.floor(Gt/gi)),Gt=this.scrollTop-pi*gi);var wi=0;return(this.layerConfig.width!=y||ke)&&(wi=this.CHANGE_H_SCROLL),(ke||bt)&&(wi|=this.$updateCachedSize(!0,this.gutterWidth,gt.width,gt.height),this._signal("scrollbarVisibilityChanged"),bt&&(y=this.$getLongestLine())),this.layerConfig={width:y,padding:this.$padding,firstRow:Zt,firstRowScreen:pi,lastRow:Jt,lineHeight:gi,characterWidth:this.characterWidth,minHeight:Je,maxHeight:C,offset:Gt,gutterOffset:gi?Math.max(0,Math.ceil((Gt+gt.height-gt.scrollerHeight)/gi)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(y-this.$padding),wi},de.prototype.$updateLines=function(){if(this.$changedLines){var Y=this.$changedLines.firstRow,gt=this.$changedLines.lastRow;this.$changedLines=null;var U=this.layerConfig;if(!(Y>U.lastRow+1)&&!(gt<U.firstRow)){if(gt===1/0){this.$showGutter&&this.$gutterLayer.update(U),this.$textLayer.update(U);return}return this.$textLayer.updateLines(U,Y,gt),!0}}},de.prototype.$getLongestLine=function(){var Y=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(Y+=1),this.$textLayer&&Y>this.$textLayer.MAX_LINE_LENGTH&&(Y=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(Y*this.characterWidth))},de.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},de.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},de.prototype.addGutterDecoration=function(Y,gt){this.$gutterLayer.addGutterDecoration(Y,gt)},de.prototype.removeGutterDecoration=function(Y,gt){this.$gutterLayer.removeGutterDecoration(Y,gt)},de.prototype.updateBreakpoints=function(Y){this._rows=Y,this.$loop.schedule(this.CHANGE_GUTTER)},de.prototype.setAnnotations=function(Y){this.$gutterLayer.setAnnotations(Y),this.$loop.schedule(this.CHANGE_GUTTER)},de.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},de.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},de.prototype.showCursor=function(){this.$cursorLayer.showCursor()},de.prototype.scrollSelectionIntoView=function(Y,gt,U){this.scrollCursorIntoView(Y,U),this.scrollCursorIntoView(gt,U)},de.prototype.scrollCursorIntoView=function(Y,gt,U){if(this.$size.scrollerHeight!==0){var V=this.$cursorLayer.getPixelPosition(Y),C=V.left,y=V.top,T=U&&U.top||0,ke=U&&U.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var Qe=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;Qe+T>y?(gt&&Qe+T>y+this.lineHeight&&(y-=gt*this.$size.scrollerHeight),y===0&&(y=-this.scrollMargin.top),this.session.setScrollTop(y)):Qe+this.$size.scrollerHeight-ke<y+this.lineHeight&&(gt&&Qe+this.$size.scrollerHeight-ke<y-this.lineHeight&&(y+=gt*this.$size.scrollerHeight),this.session.setScrollTop(y+this.lineHeight+ke-this.$size.scrollerHeight));var Je=this.scrollLeft,mt=2*this.layerConfig.characterWidth;C-mt<Je?(C-=mt,C<this.$padding+mt&&(C=-this.scrollMargin.left),this.session.setScrollLeft(C)):(C+=mt,Je+this.$size.scrollerWidth<C+this.characterWidth?this.session.setScrollLeft(Math.round(C+this.characterWidth-this.$size.scrollerWidth)):Je<=this.$padding&&C-Je<this.characterWidth&&this.session.setScrollLeft(0))}},de.prototype.getScrollTop=function(){return this.session.getScrollTop()},de.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},de.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},de.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},de.prototype.scrollToRow=function(Y){this.session.setScrollTop(Y*this.lineHeight)},de.prototype.alignCursor=function(Y,gt){typeof Y=="number"&&(Y={row:Y,column:0});var U=this.$cursorLayer.getPixelPosition(Y),V=this.$size.scrollerHeight-this.lineHeight,C=U.top-V*(gt||0);return this.session.setScrollTop(C),C},de.prototype.$calcSteps=function(Y,gt){var U=0,V=this.STEPS,C=[],y=function(T,ke,Qe){return Qe*(Math.pow(T-1,3)+1)+ke};for(U=0;U<V;++U)C.push(y(U/this.STEPS,Y,gt-Y));return C},de.prototype.scrollToLine=function(Y,gt,U,V){var C=this.$cursorLayer.getPixelPosition({row:Y,column:0}),y=C.top;gt&&(y-=this.$size.scrollerHeight/2);var T=this.scrollTop;this.session.setScrollTop(y),U!==!1&&this.animateScrolling(T,V)},de.prototype.animateScrolling=function(Y,gt){var U=this.scrollTop;if(!this.$animatedScroll)return;var V=this;if(Y==U)return;if(this.$scrollAnimation){var C=this.$scrollAnimation.steps;if(C.length&&(Y=C[0],Y==U))return}var y=V.$calcSteps(Y,U);this.$scrollAnimation={from:Y,to:U,steps:y},clearInterval(this.$timer),V.session.setScrollTop(y.shift()),V.session.$scrollTop=U;function T(){V.$timer=clearInterval(V.$timer),V.$scrollAnimation=null,V.$stopAnimation=!1,gt&&gt()}this.$timer=setInterval(function(){if(V.$stopAnimation){T();return}if(!V.session)return clearInterval(V.$timer);y.length?(V.session.setScrollTop(y.shift()),V.session.$scrollTop=U):U!=null?(V.session.$scrollTop=-1,V.session.setScrollTop(U),U=null):T()},10)},de.prototype.scrollToY=function(Y){this.scrollTop!==Y&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=Y)},de.prototype.scrollToX=function(Y){this.scrollLeft!==Y&&(this.scrollLeft=Y),this.$loop.schedule(this.CHANGE_H_SCROLL)},de.prototype.scrollTo=function(Y,gt){this.session.setScrollTop(gt),this.session.setScrollLeft(Y)},de.prototype.scrollBy=function(Y,gt){gt&&this.session.setScrollTop(this.session.getScrollTop()+gt),Y&&this.session.setScrollLeft(this.session.getScrollLeft()+Y)},de.prototype.isScrollableBy=function(Y,gt){if(gt<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||gt>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||Y<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||Y>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},de.prototype.pixelToScreenCoordinates=function(Y,gt){var U;if(this.$hasCssTransforms){U={top:0,left:0};var V=this.$fontMetrics.transformCoordinates([Y,gt]);Y=V[1]-this.gutterWidth-this.margin.left,gt=V[0]}else U=this.scroller.getBoundingClientRect();var C=Y+this.scrollLeft-U.left-this.$padding,y=C/this.characterWidth,T=Math.floor((gt+this.scrollTop-U.top)/this.lineHeight),ke=this.$blockCursor?Math.floor(y):Math.round(y);return{row:T,column:ke,side:y-ke>0?1:-1,offsetX:C}},de.prototype.screenToTextCoordinates=function(Y,gt){var U;if(this.$hasCssTransforms){U={top:0,left:0};var V=this.$fontMetrics.transformCoordinates([Y,gt]);Y=V[1]-this.gutterWidth-this.margin.left,gt=V[0]}else U=this.scroller.getBoundingClientRect();var C=Y+this.scrollLeft-U.left-this.$padding,y=C/this.characterWidth,T=this.$blockCursor?Math.floor(y):Math.round(y),ke=Math.floor((gt+this.scrollTop-U.top)/this.lineHeight);return this.session.screenToDocumentPosition(ke,Math.max(T,0),C)},de.prototype.textToScreenCoordinates=function(Y,gt){var U=this.scroller.getBoundingClientRect(),V=this.session.documentToScreenPosition(Y,gt),C=this.$padding+(this.session.$bidiHandler.isBidiRow(V.row,Y)?this.session.$bidiHandler.getPosLeft(V.column):Math.round(V.column*this.characterWidth)),y=V.row*this.lineHeight;return{pageX:U.left+C-this.scrollLeft,pageY:U.top+y-this.scrollTop}},de.prototype.visualizeFocus=function(){w.addCssClass(this.container,"ace_focus")},de.prototype.visualizeBlur=function(){w.removeCssClass(this.container,"ace_focus")},de.prototype.showComposition=function(Y){this.$composition=Y,Y.cssText||(Y.cssText=this.textarea.style.cssText),Y.useTextareaForIME==null&&(Y.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(w.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):Y.markerId=this.session.addMarker(Y.markerRange,"ace_composition_marker","text")},de.prototype.setCompositionText=function(Y){var gt=this.session.selection.cursor;this.addToken(Y,"composition_placeholder",gt.row,gt.column),this.$moveTextAreaToCursor()},de.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),w.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var Y=this.session.selection.cursor;this.removeExtraToken(Y.row,Y.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},de.prototype.setGhostText=function(Y,gt){var U=this.session.selection.cursor,V=gt||{row:U.row,column:U.column};this.removeGhostText();var C=this.$calculateWrappedTextChunks(Y,V);this.addToken(C[0].text,"ghost_text",V.row,V.column),this.$ghostText={text:Y,position:{row:V.row,column:V.column}};var y=w.createElement("div");if(C.length>1){var T=this.hideTokensAfterPosition(V.row,V.column),ke;C.slice(1).forEach(function(bt){var Gt=w.createElement("div"),Yt=w.createElement("span");Yt.className="ace_ghost_text",bt.wrapped&&(Gt.className="ghost_text_line_wrapped"),bt.text.length===0&&(bt.text=" "),Yt.appendChild(w.createTextNode(bt.text)),Gt.appendChild(Yt),y.appendChild(Gt),ke=Gt}),T.forEach(function(bt){var Gt=w.createElement("span");he(bt.type)||(Gt.className="ace_"+bt.type.replace(/\./g," ace_")),Gt.appendChild(w.createTextNode(bt.value)),ke.appendChild(Gt)}),this.$ghostTextWidget={el:y,row:V.row,column:V.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var Qe=this.$cursorLayer.getPixelPosition(V,!0),Je=this.container,mt=Je.getBoundingClientRect().height,yt=C.length*this.lineHeight,Qt=yt<mt-Qe.top;if(Qt)return;yt<mt?this.scrollBy(0,(C.length-1)*this.lineHeight):this.scrollToRow(V.row)}},de.prototype.$calculateWrappedTextChunks=function(Y,gt){var U=this.$size.scrollerWidth-this.$padding*2,V=Math.floor(U/this.characterWidth)-2;V=V<=0?60:V;for(var C=Y.split(/\r?\n/),y=[],T=0;T<C.length;T++){var ke=this.session.$getDisplayTokens(C[T],gt.column),Qe=this.session.$computeWrapSplits(ke,V,this.session.$tabSize);if(Qe.length>0){var Je=0;Qe.push(C[T].length);for(var mt=0;mt<Qe.length;mt++){var yt=C[T].slice(Je,Qe[mt]);y.push({text:yt,wrapped:!0}),Je=Qe[mt]}}else y.push({text:C[T],wrapped:!1})}return y},de.prototype.removeGhostText=function(){if(this.$ghostText){var Y=this.$ghostText.position;this.removeExtraToken(Y.row,Y.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},de.prototype.addToken=function(Y,gt,U,V){var C=this.session;C.bgTokenizer.lines[U]=null;var y={type:gt,value:Y},T=C.getTokens(U);if(V==null||!T.length)T.push(y);else for(var ke=0,Qe=0;Qe<T.length;Qe++){var Je=T[Qe];if(ke+=Je.value.length,V<=ke){var mt=Je.value.length-(ke-V),yt=Je.value.slice(0,mt),Qt=Je.value.slice(mt);T.splice(Qe,1,{type:Je.type,value:yt},y,{type:Je.type,value:Qt});break}}this.updateLines(U,U)},de.prototype.hideTokensAfterPosition=function(Y,gt){for(var U=this.session.getTokens(Y),V=0,C=!1,y=[],T=0;T<U.length;T++){var ke=U[T];if(V+=ke.value.length,ke.type!=="ghost_text"){if(C){y.push({type:ke.type,value:ke.value}),ke.type="hidden_token";continue}V===gt&&(C=!0)}}return this.updateLines(Y,Y),y},de.prototype.removeExtraToken=function(Y,gt){this.session.bgTokenizer.lines[Y]=null,this.updateLines(Y,Y)},de.prototype.setTheme=function(Y,gt){var U=this;if(this.$themeId=Y,U._dispatchEvent("themeChange",{theme:Y}),!Y||typeof Y=="string"){var V=Y||this.$options.theme.initialValue;c.loadModule(["theme",V],C)}else C(Y);function C(y){if(U.$themeId!=Y)return gt&&gt();if(!y||!y.cssClass)throw new Error("couldn't load module "+Y+" or it didn't call define");y.$id&&(U.$themeId=y.$id),w.importCssString(y.cssText,y.cssClass,U.container),U.theme&&w.removeCssClass(U.container,U.theme.cssClass);var T="padding"in y?y.padding:"padding"in(U.theme||{})?4:U.$padding;if(U.$padding&&T!=U.$padding&&U.setPadding(T),U.$gutterLayer){var ke=y.$showGutterCursorMarker;ke&&!U.$gutterLayer.$showCursorMarker?U.$gutterLayer.$showCursorMarker="theme":!ke&&U.$gutterLayer.$showCursorMarker=="theme"&&(U.$gutterLayer.$showCursorMarker=null)}U.$theme=y.cssClass,U.theme=y,w.addCssClass(U.container,y.cssClass),w.setCssClass(U.container,"ace_dark",y.isDark),U.$size&&(U.$size.width=0,U.$updateSizeAsync()),U._dispatchEvent("themeLoaded",{theme:y}),gt&&gt(),b.isSafari&&U.scroller&&(U.scroller.style.background="red",U.scroller.style.background="")}},de.prototype.getTheme=function(){return this.$themeId},de.prototype.setStyle=function(Y,gt){w.setCssClass(this.container,Y,gt!==!1)},de.prototype.unsetStyle=function(Y){w.removeCssClass(this.container,Y)},de.prototype.setCursorStyle=function(Y){w.setStyle(this.scroller.style,"cursor",Y)},de.prototype.setMouseCursor=function(Y){w.setStyle(this.scroller.style,"cursor",Y)},de.prototype.attachToShadowRoot=function(){w.importCssString(O,"ace_editor.css",this.container)},de.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},de.prototype.$updateCustomScrollbar=function(Y){var gt=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),Y===!0?(this.scrollBarV=new a(this.container,this),this.scrollBarH=new t(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(U){gt.$scrollAnimation||gt.session.setScrollTop(U.data-gt.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(U){gt.$scrollAnimation||gt.session.setScrollLeft(U.data-gt.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new $(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new e(this.container,this),this.scrollBarH=new i(this.container,this),this.scrollBarV.addEventListener("scroll",function(U){gt.$scrollAnimation||gt.session.setScrollTop(U.data-gt.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(U){gt.$scrollAnimation||gt.session.setScrollLeft(U.data-gt.scrollMargin.left)}))},de.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var Y=this;this.$resizeTimer=A.delayedCall(function(){Y.destroyed||Y.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(gt){var U=gt[0].contentRect.width,V=gt[0].contentRect.height;Math.abs(Y.$size.width-U)>1||Math.abs(Y.$size.height-V)>1?Y.$resizeTimer.delay():Y.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},de}();Te.prototype.CHANGE_CURSOR=1,Te.prototype.CHANGE_MARKER=2,Te.prototype.CHANGE_GUTTER=4,Te.prototype.CHANGE_SCROLL=8,Te.prototype.CHANGE_LINES=16,Te.prototype.CHANGE_TEXT=32,Te.prototype.CHANGE_SIZE=64,Te.prototype.CHANGE_MARKER_BACK=128,Te.prototype.CHANGE_MARKER_FRONT=256,Te.prototype.CHANGE_FULL=512,Te.prototype.CHANGE_H_SCROLL=1024,Te.prototype.$changes=0,Te.prototype.$padding=null,Te.prototype.$frozen=!1,Te.prototype.STEPS=8,x.implement(Te.prototype,M),c.defineOptions(Te.prototype,"renderer",{useResizeObserver:{set:function(de){!de&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):de&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(de){this.$textLayer.setShowInvisibles(de)&&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(de){typeof de=="number"&&(this.$printMarginColumn=de),this.$showPrintMargin=!!de,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(de){this.$gutter.style.display=de?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(de){this.$gutterLayer.$useSvgGutterIcons=de},initialValue:!1},showFoldedAnnotations:{set:function(de){this.$gutterLayer.$showFoldedAnnotations=de},initialValue:!1},fadeFoldWidgets:{set:function(de){w.setCssClass(this.$gutter,"ace_fade-fold-widgets",de)},initialValue:!1},showFoldWidgets:{set:function(de){this.$gutterLayer.setShowFoldWidgets(de),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(de){this.$textLayer.setDisplayIndentGuides(de)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(de){this.$textLayer.setHighlightIndentGuides(de)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(de){this.$gutterLayer.setHighlightGutterLine(de),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(de){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(de){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(de){typeof de=="number"&&(de=de+"px"),this.container.style.fontSize=de,this.updateFontSize()},initialValue:12},fontFamily:{set:function(de){this.container.style.fontFamily=de,this.updateFontSize()}},maxLines:{set:function(de){this.updateFull()}},minLines:{set:function(de){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(de){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(de){de=+de||0,this.$scrollPastEnd!=de&&(this.$scrollPastEnd=de,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(de){this.$gutterLayer.$fixedWidth=!!de,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(de){this.$updateCustomScrollbar(de)},initialValue:!1},theme:{set:function(de){this.setTheme(de)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!b.isMobile&&!b.isIE}}),v.VirtualRenderer=Te}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(p,v,fe){var x=p("../lib/oop"),w=p("../lib/net"),A=p("../lib/event_emitter").EventEmitter,c=p("../config");function h(i){var e="importScripts('"+w.qualifyURL(i)+"');";try{return new Blob([e],{type:"application/javascript"})}catch{var t=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,a=new t;return a.append(e),a.getBlob("application/javascript")}}function n(i){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(c.get("loadWorkerFromBlob")){var e=h(i),t=window.URL||window.webkitURL,a=t.createObjectURL(e);return new Worker(a)}return new Worker(i)}var o=function(i){i.postMessage||(i=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=i,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){x.implement(this,A),this.$createWorkerFromOldConfig=function(i,e,t,a,g){if(p.nameToUrl&&!p.toUrl&&(p.toUrl=p.nameToUrl),c.get("packaged")||!p.toUrl)a=a||c.moduleUrl(e,"worker");else{var m=this.$normalizePath;a=a||m(p.toUrl("ace/worker/worker.js",null,"_"));var M={};i.forEach(function(O){M[O]=m(p.toUrl(O,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=n(a),g&&this.send("importScripts",g),this.$worker.postMessage({init:!0,tlns:M,module:e,classname:t}),this.$worker},this.onMessage=function(i){var e=i.data;switch(e.type){case"event":this._signal(e.name,{data:e.data});break;case"call":var t=this.callbacks[e.id];t&&(t(e.data),delete this.callbacks[e.id]);break;case"error":this.reportError(e.data);break;case"log":window.console&&console.log&&console.log.apply(console,e.data);break}},this.reportError=function(i){window.console&&console.error&&console.error(i)},this.$normalizePath=function(i){return w.qualifyURL(i)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(i){i.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(i,e){this.$worker.postMessage({command:i,args:e})},this.call=function(i,e,t){if(t){var a=this.callbackId++;this.callbacks[a]=t,e.push(a)}this.send(i,e)},this.emit=function(i,e){try{e.data&&e.data.err&&(e.data.err={message:e.data.err.message,stack:e.data.err.stack,code:e.data.err.code}),this.$worker&&this.$worker.postMessage({event:i,data:{data:e.data}})}catch(t){console.error(t.stack)}},this.attachToDocument=function(i){this.$doc&&this.terminate(),this.$doc=i,this.call("setValue",[i.getValue()]),i.on("change",this.changeListener,!0)},this.changeListener=function(i){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),i.action=="insert"?this.deltaQueue.push(i.start,i.lines):this.deltaQueue.push(i.start,i.end)},this.$sendDeltaQueue=function(){var i=this.deltaQueue;i&&(this.deltaQueue=null,i.length>50&&i.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:i}))}}).call(o.prototype);var r=function(i,e,t){var a=null,g=!1,m=Object.create(A),M=[],O=new o({messageBuffer:M,terminate:function(){},postMessage:function(b){M.push(b),a&&(g?setTimeout($):$())}});O.setEmitSync=function(b){g=b};var $=function(){var b=M.shift();b.command?a[b.command].apply(a,b.args):b.event&&m._signal(b.event,b.data)};return m.postMessage=function(b){O.onMessage({data:b})},m.callback=function(b,he){this.postMessage({type:"call",id:he,data:b})},m.emit=function(b,he){this.postMessage({type:"event",name:b,data:he})},c.loadModule(["worker",e],function(b){for(a=new b[t](m);M.length;)$()}),O};v.UIWorkerClient=r,v.WorkerClient=o,v.createWorker=n}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(p,v,fe){var x=p("./range").Range,w=p("./lib/event_emitter").EventEmitter,A=p("./lib/oop"),c=function(){function h(n,o,r,i,e,t){var a=this;this.length=o,this.session=n,this.doc=n.getDocument(),this.mainClass=e,this.othersClass=t,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=i,this.$onCursorChange=function(){setTimeout(function(){a.onCursorChange()})},this.$pos=r;var g=n.getUndoManager().$undoStack||n.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=g.length,this.setup(),n.selection.on("changeCursor",this.$onCursorChange)}return h.prototype.setup=function(){var n=this,o=this.doc,r=this.session;this.selectionBefore=r.selection.toJSON(),r.selection.inMultiSelectMode&&r.selection.toSingleRange(),this.pos=o.createAnchor(this.$pos.row,this.$pos.column);var i=this.pos;i.$insertRight=!0,i.detach(),i.markerId=r.addMarker(new x(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(e){var t=o.createAnchor(e.row,e.column);t.$insertRight=!0,t.detach(),n.others.push(t)}),r.setUndoSelect(!1)},h.prototype.showOtherMarkers=function(){if(!this.othersActive){var n=this.session,o=this;this.othersActive=!0,this.others.forEach(function(r){r.markerId=n.addMarker(new x(r.row,r.column,r.row,r.column+o.length),o.othersClass,null,!1)})}},h.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var n=0;n<this.others.length;n++)this.session.removeMarker(this.others[n].markerId)}},h.prototype.onUpdate=function(n){if(this.$updating)return this.updateAnchors(n);var o=n;if(o.start.row===o.end.row&&o.start.row===this.pos.row){this.$updating=!0;var r=n.action==="insert"?o.end.column-o.start.column:o.start.column-o.end.column,i=o.start.column>=this.pos.column&&o.start.column<=this.pos.column+this.length+1,e=o.start.column-this.pos.column;if(this.updateAnchors(n),i&&(this.length+=r),i&&!this.session.$fromUndo){if(n.action==="insert")for(var t=this.others.length-1;t>=0;t--){var a=this.others[t],g={row:a.row,column:a.column+e};this.doc.insertMergedLines(g,n.lines)}else if(n.action==="remove")for(var t=this.others.length-1;t>=0;t--){var a=this.others[t],g={row:a.row,column:a.column+e};this.doc.remove(new x(g.row,g.column,g.row,g.column-r))}}this.$updating=!1,this.updateMarkers()}},h.prototype.updateAnchors=function(n){this.pos.onChange(n);for(var o=this.others.length;o--;)this.others[o].onChange(n);this.updateMarkers()},h.prototype.updateMarkers=function(){if(!this.$updating){var n=this,o=this.session,r=function(e,t){o.removeMarker(e.markerId),e.markerId=o.addMarker(new x(e.row,e.column,e.row,e.column+n.length),t,null,!1)};r(this.pos,this.mainClass);for(var i=this.others.length;i--;)r(this.others[i],this.othersClass)}},h.prototype.onCursorChange=function(n){if(!(this.$updating||!this.session)){var o=this.session.selection.getCursor();o.row===this.pos.row&&o.column>=this.pos.column&&o.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",n)):(this.hideOtherMarkers(),this._emit("cursorLeave",n))}},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 n=this.session.getUndoManager(),o=(n.$undoStack||n.$undostack).length-this.$undoStackDepth,r=0;r<o;r++)n.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},h}();A.implement(c.prototype,w),v.PlaceHolder=c}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(p,v,fe){var x=p("../lib/event"),w=p("../lib/useragent");function A(h,n){return h.row==n.row&&h.column==n.column}function c(h){var n=h.domEvent,o=n.altKey,r=n.shiftKey,i=n.ctrlKey,e=h.getAccelKey(),t=h.getButton();if(i&&w.isMac&&(t=n.button),h.editor.inMultiSelectMode&&t==2){h.editor.textInput.onContextMenu(h.domEvent);return}if(!i&&!o&&!e){t===0&&h.editor.inMultiSelectMode&&h.editor.exitMultiSelectMode();return}if(t===0){var a=h.editor,g=a.selection,m=a.inMultiSelectMode,M=h.getDocumentPosition(),O=g.getCursor(),$=h.inSelection()||g.isEmpty()&&A(M,O),b=h.x,he=h.y,Te=function(yt){b=yt.clientX,he=yt.clientY},de=a.session,Y=a.renderer.pixelToScreenCoordinates(b,he),gt=Y,U;if(a.$mouseHandler.$enableJumpToDef)i&&o||e&&o?U=r?"block":"add":o&&a.$blockSelectEnabled&&(U="block");else if(e&&!o){if(U="add",!m&&r)return}else o&&a.$blockSelectEnabled&&(U="block");if(U&&w.isMac&&n.ctrlKey&&a.$mouseHandler.cancelContextMenu(),U=="add"){if(!m&&$)return;if(!m){var V=g.toOrientedRange();a.addSelectionMarker(V)}var C=g.rangeList.rangeAtPoint(M);a.inVirtualSelectionMode=!0,r&&(C=null,V=g.ranges[0]||V,a.removeSelectionMarker(V)),a.once("mouseup",function(){var yt=g.toOrientedRange();C&&yt.isEmpty()&&A(C.cursor,yt.cursor)?g.substractPoint(yt.cursor):(r?g.substractPoint(V.cursor):V&&(a.removeSelectionMarker(V),g.addRange(V)),g.addRange(yt)),a.inVirtualSelectionMode=!1})}else if(U=="block"){h.stop(),a.inVirtualSelectionMode=!0;var y,T=[],ke=function(){var yt=a.renderer.pixelToScreenCoordinates(b,he),Qt=de.screenToDocumentPosition(yt.row,yt.column,yt.offsetX);A(gt,yt)&&A(Qt,g.lead)||(gt=yt,a.selection.moveToPosition(Qt),a.renderer.scrollCursorIntoView(),a.removeSelectionMarkers(T),T=g.rectangularRangeBlock(gt,Y),a.$mouseHandler.$clickSelection&&T.length==1&&T[0].isEmpty()&&(T[0]=a.$mouseHandler.$clickSelection.clone()),T.forEach(a.addSelectionMarker,a),a.updateSelectionMarkers())};m&&!e?g.toSingleRange():!m&&e&&(y=g.toOrientedRange(),a.addSelectionMarker(y)),r?Y=de.documentToScreenPosition(g.lead):g.moveToPosition(M),gt={row:-1,column:-1};var Qe=function(yt){ke(),clearInterval(mt),a.removeSelectionMarkers(T),T.length||(T=[g.toOrientedRange()]),y&&(a.removeSelectionMarker(y),g.toSingleRange(y));for(var Qt=0;Qt<T.length;Qt++)g.addRange(T[Qt]);a.inVirtualSelectionMode=!1,a.$mouseHandler.$clickSelection=null},Je=ke;x.capture(a.container,Te,Qe);var mt=setInterval(function(){Je()},20);return h.preventDefault()}}}v.onMouseDown=c}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(p,v,fe){v.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(w){w.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(w){w.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(w){w.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(w){w.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(w){w.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(w){w.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(w){w.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(w){w.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(w){w.multiSelect.rangeCount>1?w.multiSelect.joinSelections():w.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(w){w.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(w){w.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(w){w.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],v.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(w){w.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(w){return w&&w.inMultiSelectMode}}];var x=p("../keyboard/hash_handler").HashHandler;v.keyboardHandler=new x(v.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(p,v,fe){var x=p("./range_list").RangeList,w=p("./range").Range,A=p("./selection").Selection,c=p("./mouse/multi_select_handler").onMouseDown,h=p("./lib/event"),n=p("./lib/lang"),o=p("./commands/multi_select_commands");v.commands=o.defaultCommands.concat(o.multiSelectCommands);var r=p("./search").Search,i=new r;function e(O,$,b){return i.$options.wrap=!0,i.$options.needle=$,i.$options.backwards=b==-1,i.find(O)}var t=p("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(t.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(O,$){if(O){if(!this.inMultiSelectMode&&this.rangeCount===0){var b=this.toOrientedRange();if(this.rangeList.add(b),this.rangeList.add(O),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),$||this.fromOrientedRange(O);this.rangeList.removeAll(),this.rangeList.add(b),this.$onAddRange(b)}O.cursor||(O.cursor=O.end);var he=this.rangeList.add(O);return this.$onAddRange(O),he.length&&this.$onRemoveRange(he),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),$||this.fromOrientedRange(O)}},this.toSingleRange=function(O){O=O||this.ranges[0];var $=this.rangeList.removeAll();$.length&&this.$onRemoveRange($),O&&this.fromOrientedRange(O)},this.substractPoint=function(O){var $=this.rangeList.substractPoint(O);if($)return this.$onRemoveRange($),$[0]},this.mergeOverlappingRanges=function(){var O=this.rangeList.merge();O.length&&this.$onRemoveRange(O)},this.$onAddRange=function(O){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(O),this._signal("addRange",{range:O})},this.$onRemoveRange=function(O){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var $=this.rangeList.ranges.pop();O.push($),this.rangeCount=0}for(var b=O.length;b--;){var he=this.ranges.indexOf(O[b]);this.ranges.splice(he,1)}this._signal("removeRange",{ranges:O}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),$=$||this.ranges[0],$&&!$.isEqual(this.getRange())&&this.fromOrientedRange($)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new x,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var O=this.ranges.length?this.ranges:[this.getRange()],$=[],b=0;b<O.length;b++){var he=O[b],Te=he.start.row,de=he.end.row;if(Te===de)$.push(he.clone());else{for($.push(new w(Te,he.start.column,Te,this.session.getLine(Te).length));++Te<de;)$.push(this.getLineRange(Te,!0));$.push(new w(de,0,de,he.end.column))}b==0&&!this.isBackwards()&&($=$.reverse())}this.toSingleRange();for(var b=$.length;b--;)this.addRange($[b])},this.joinSelections=function(){var O=this.rangeList.ranges,$=O[O.length-1],b=w.fromPoints(O[0].start,$.end);this.toSingleRange(),this.setSelectionRange(b,$.cursor==$.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var O=this.rangeList.ranges,$=O[O.length-1],b=w.fromPoints(O[0].start,$.end);this.toSingleRange(),this.setSelectionRange(b,$.cursor==$.start)}else{var he=this.session.documentToScreenPosition(this.cursor),Te=this.session.documentToScreenPosition(this.anchor),de=this.rectangularRangeBlock(he,Te);de.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(O,$,b){var he=[],Te=O.column<$.column;if(Te)var de=O.column,Y=$.column,gt=O.offsetX,U=$.offsetX;else var de=$.column,Y=O.column,gt=$.offsetX,U=O.offsetX;var V=O.row<$.row;if(V)var C=O.row,y=$.row;else var C=$.row,y=O.row;de<0&&(de=0),C<0&&(C=0),C==y&&(b=!0);for(var T,ke=C;ke<=y;ke++){var Qe=w.fromPoints(this.session.screenToDocumentPosition(ke,de,gt),this.session.screenToDocumentPosition(ke,Y,U));if(Qe.isEmpty()){if(T&&g(Qe.end,T))break;T=Qe.end}Qe.cursor=Te?Qe.start:Qe.end,he.push(Qe)}if(V&&he.reverse(),!b){for(var Je=he.length-1;he[Je].isEmpty()&&Je>0;)Je--;if(Je>0)for(var mt=0;he[mt].isEmpty();)mt++;for(var yt=Je;yt>=mt;yt--)he[yt].isEmpty()&&he.splice(yt,1)}return he}}).call(A.prototype);var a=p("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(O){O.cursor||(O.cursor=O.end);var $=this.getSelectionStyle();return O.marker=this.session.addMarker(O,"ace_selection",$),this.session.$selectionMarkers.push(O),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,O},this.removeSelectionMarker=function(O){if(O.marker){this.session.removeMarker(O.marker);var $=this.session.$selectionMarkers.indexOf(O);$!=-1&&this.session.$selectionMarkers.splice($,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(O){for(var $=this.session.$selectionMarkers,b=O.length;b--;){var he=O[b];if(he.marker){this.session.removeMarker(he.marker);var Te=$.indexOf(he);Te!=-1&&$.splice(Te,1)}}this.session.selectionMarkerCount=$.length},this.$onAddRange=function(O){this.addSelectionMarker(O.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(O){this.removeSelectionMarkers(O.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(O){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(o.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(O){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(o.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(O){var $=O.command,b=O.editor;if(b.multiSelect){if($.multiSelectAction)$.multiSelectAction=="forEach"?he=b.forEachSelection($,O.args):$.multiSelectAction=="forEachLine"?he=b.forEachSelection($,O.args,!0):$.multiSelectAction=="single"?(b.exitMultiSelectMode(),he=$.exec(b,O.args||{})):he=$.multiSelectAction(b,O.args||{});else{var he=$.exec(b,O.args||{});b.multiSelect.addRange(b.multiSelect.toOrientedRange()),b.multiSelect.mergeOverlappingRanges()}return he}},this.forEachSelection=function(O,$,b){if(!this.inVirtualSelectionMode){var he=b&&b.keepOrder,Te=b==!0||b&&b.$byLines,de=this.session,Y=this.selection,gt=Y.rangeList,U=(he?Y:gt).ranges,V;if(!U.length)return O.exec?O.exec(this,$||{}):O(this,$||{});var C=Y._eventRegistry;Y._eventRegistry={};var y=new A(de);this.inVirtualSelectionMode=!0;for(var T=U.length;T--;){if(Te)for(;T>0&&U[T].start.row==U[T-1].end.row;)T--;y.fromOrientedRange(U[T]),y.index=T,this.selection=de.selection=y;var ke=O.exec?O.exec(this,$||{}):O(this,$||{});!V&&ke!==void 0&&(V=ke),y.toOrientedRange(U[T])}y.detach(),this.selection=de.selection=Y,this.inVirtualSelectionMode=!1,Y._eventRegistry=C,Y.mergeOverlappingRanges(),Y.ranges[0]&&Y.fromOrientedRange(Y.ranges[0]);var Qe=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),Qe&&Qe.from==Qe.to&&this.renderer.animateScrolling(Qe.from),V}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var O="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var $=this.multiSelect.rangeList.ranges,b=[],he=0;he<$.length;he++)b.push(this.session.getTextRange($[he]));var Te=this.session.getDocument().getNewLineCharacter();O=b.join(Te),O.length==(b.length-1)*Te.length&&(O="")}else this.selection.isEmpty()||(O=this.session.getTextRange(this.getSelectionRange()));return O},this.$checkMultiselectChange=function(O,$){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var b=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&$==this.multiSelect.anchor)return;var he=$==this.multiSelect.anchor?b.cursor==b.start?b.end:b.start:b.cursor;he.row!=$.row||this.session.$clipPositionToDocument(he.row,he.column).column!=$.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(O,$,b){if($=$||{},$.needle=O||$.needle,$.needle==null){var he=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();$.needle=this.session.getTextRange(he)}this.$search.set($);var Te=this.$search.findAll(this.session);if(!Te.length)return 0;var de=this.multiSelect;b||de.toSingleRange(Te[0]);for(var Y=Te.length;Y--;)de.addRange(Te[Y],!0);return he&&de.rangeList.rangeAtPoint(he.start)&&de.addRange(he,!0),Te.length},this.selectMoreLines=function(O,$){var b=this.selection.toOrientedRange(),he=b.cursor==b.end,Te=this.session.documentToScreenPosition(b.cursor);this.selection.$desiredColumn&&(Te.column=this.selection.$desiredColumn);var de=this.session.screenToDocumentPosition(Te.row+O,Te.column);if(b.isEmpty())var gt=de;else var Y=this.session.documentToScreenPosition(he?b.end:b.start),gt=this.session.screenToDocumentPosition(Y.row+O,Y.column);if(he){var U=w.fromPoints(de,gt);U.cursor=U.start}else{var U=w.fromPoints(gt,de);U.cursor=U.end}if(U.desiredColumn=Te.column,!this.selection.inMultiSelectMode)this.selection.addRange(b);else if($)var V=b.cursor;this.selection.addRange(U),V&&this.selection.substractPoint(V)},this.transposeSelections=function(O){for(var $=this.session,b=$.multiSelect,he=b.ranges,Te=he.length;Te--;){var de=he[Te];if(de.isEmpty()){var Y=$.getWordRange(de.start.row,de.start.column);de.start.row=Y.start.row,de.start.column=Y.start.column,de.end.row=Y.end.row,de.end.column=Y.end.column}}b.mergeOverlappingRanges();for(var gt=[],Te=he.length;Te--;){var de=he[Te];gt.unshift($.getTextRange(de))}O<0?gt.unshift(gt.pop()):gt.push(gt.shift());for(var Te=he.length;Te--;){var de=he[Te],U=de.clone();$.replace(de,gt[Te]),de.start.row=U.start.row,de.start.column=U.start.column}b.fromOrientedRange(b.ranges[0])},this.selectMore=function(O,$,b){var he=this.session,Te=he.multiSelect,de=Te.toOrientedRange();if(!(de.isEmpty()&&(de=he.getWordRange(de.start.row,de.start.column),de.cursor=O==-1?de.start:de.end,this.multiSelect.addRange(de),b))){var Y=he.getTextRange(de),gt=e(he,Y,O);gt&&(gt.cursor=O==-1?gt.start:gt.end,this.session.unfold(gt),this.multiSelect.addRange(gt),this.renderer.scrollCursorIntoView(null,.5)),$&&this.multiSelect.substractPoint(de.cursor)}},this.alignCursors=function(){var O=this.session,$=O.multiSelect,b=$.ranges,he=-1,Te=b.filter(function(Je){if(Je.cursor.row==he)return!0;he=Je.cursor.row});if(!b.length||Te.length==b.length-1){var de=this.selection.getRange(),Y=de.start.row,gt=de.end.row,U=Y==gt;if(U){var V=this.session.getLength(),C;do C=this.session.getLine(gt);while(/[=:]/.test(C)&&++gt<V);do C=this.session.getLine(Y);while(/[=:]/.test(C)&&--Y>0);Y<0&&(Y=0),gt>=V&&(gt=V-1)}var y=this.session.removeFullLines(Y,gt);y=this.$reAlignText(y,U),this.session.insert({row:Y,column:0},y.join(`
954
+ `)+`
955
+ `),U||(de.start.column=0,de.end.column=y[y.length-1].length),this.selection.setRange(de)}else{Te.forEach(function(Je){$.substractPoint(Je.cursor)});var T=0,ke=1/0,Qe=b.map(function(Je){var mt=Je.cursor,yt=O.getLine(mt.row),Qt=yt.substr(mt.column).search(/\S/g);return Qt==-1&&(Qt=0),mt.column>T&&(T=mt.column),Qt<ke&&(ke=Qt),Qt});b.forEach(function(Je,mt){var yt=Je.cursor,Qt=T-yt.column,bt=Qe[mt]-ke;Qt>bt?O.insert(yt,n.stringRepeat(" ",Qt-bt)):O.remove(new w(yt.row,yt.column,yt.row,yt.column-Qt+bt)),Je.start.column=Je.end.column=T,Je.start.row=Je.end.row=yt.row,Je.cursor=Je.end}),$.fromOrientedRange(b[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(O,$){var b=!0,he=!0,Te,de,Y;return O.map(function(y){var T=y.match(/(\s*)(.*?)(\s*)([=:].*)/);return T?Te==null?(Te=T[1].length,de=T[2].length,Y=T[3].length,T):(Te+de+Y!=T[1].length+T[2].length+T[3].length&&(he=!1),Te!=T[1].length&&(b=!1),Te>T[1].length&&(Te=T[1].length),de<T[2].length&&(de=T[2].length),Y>T[3].length&&(Y=T[3].length),T):[y]}).map($?U:b?he?V:U:C);function gt(y){return n.stringRepeat(" ",y)}function U(y){return y[2]?gt(Te)+y[2]+gt(de-y[2].length+Y)+y[4].replace(/^([=:])\s+/,"$1 "):y[0]}function V(y){return y[2]?gt(Te+de-y[2].length)+y[2]+gt(Y)+y[4].replace(/^([=:])\s+/,"$1 "):y[0]}function C(y){return y[2]?gt(Te)+y[2]+gt(Y)+y[4].replace(/^([=:])\s+/,"$1 "):y[0]}}}).call(a.prototype);function g(O,$){return O.row==$.row&&O.column==$.column}v.onSessionChange=function(O){var $=O.session;$&&!$.multiSelect&&($.$selectionMarkers=[],$.selection.$initRangeList(),$.multiSelect=$.selection),this.multiSelect=$&&$.multiSelect;var b=O.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)),$&&($.multiSelect.on("addRange",this.$onAddRange),$.multiSelect.on("removeRange",this.$onRemoveRange),$.multiSelect.on("multiSelect",this.$onMultiSelect),$.multiSelect.on("singleSelect",this.$onSingleSelect),$.multiSelect.lead.on("change",this.$checkMultiselectChange),$.multiSelect.anchor.on("change",this.$checkMultiselectChange)),$&&this.inMultiSelectMode!=$.selection.inMultiSelectMode&&($.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function m(O){O.$multiselectOnSessionChange||(O.$onAddRange=O.$onAddRange.bind(O),O.$onRemoveRange=O.$onRemoveRange.bind(O),O.$onMultiSelect=O.$onMultiSelect.bind(O),O.$onSingleSelect=O.$onSingleSelect.bind(O),O.$multiselectOnSessionChange=v.onSessionChange.bind(O),O.$checkMultiselectChange=O.$checkMultiselectChange.bind(O),O.$multiselectOnSessionChange(O),O.on("changeSession",O.$multiselectOnSessionChange),O.on("mousedown",c),O.commands.addCommands(o.defaultCommands),M(O))}function M(O){if(!O.textInput)return;var $=O.textInput.getElement(),b=!1;h.addListener($,"keydown",function(Te){var de=Te.keyCode==18&&!(Te.ctrlKey||Te.shiftKey||Te.metaKey);O.$blockSelectEnabled&&de?b||(O.renderer.setMouseCursor("crosshair"),b=!0):b&&he()},O),h.addListener($,"keyup",he,O),h.addListener($,"blur",he,O);function he(Te){b&&(O.renderer.setMouseCursor(""),b=!1)}}v.MultiSelect=m,p("./config").defineOptions(a.prototype,"editor",{enableMultiselect:{set:function(O){m(this),O?this.on("mousedown",c):this.off("mousedown",c)},value:!0},enableBlockSelect:{set:function(O){this.$blockSelectEnabled=O},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(p,v,fe){var x=p("../../range").Range,w=v.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(A,c,h){var n=A.getLine(h);return this.foldingStartMarker.test(n)?"start":c=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(n)?"end":""},this.getFoldWidgetRange=function(A,c,h){return null},this.indentationBlock=function(A,c,h){var n=/\S/,o=A.getLine(c),r=o.search(n);if(r!=-1){for(var i=h||o.length,e=A.getLength(),t=c,a=c;++c<e;){var g=A.getLine(c).search(n);if(g!=-1){if(g<=r){var m=A.getTokenAt(c,0);if(!m||m.type!=="string")break}a=c}}if(a>t){var M=A.getLine(a).length;return new x(t,i,a,M)}}},this.openingBracketBlock=function(A,c,h,n,o){var r={row:h,column:n+1},i=A.$findClosingBracket(c,r,o);if(i){var e=A.foldWidgets[i.row];return e==null&&(e=A.getFoldWidget(i.row)),e=="start"&&i.row>r.row&&(i.row--,i.column=A.getLine(i.row).length),x.fromPoints(r,i)}},this.closingBracketBlock=function(A,c,h,n,o){var r={row:h,column:n},i=A.$findOpeningBracket(c,r);if(i)return i.column++,r.column--,x.fromPoints(i,r)}}).call(w.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(p,v,fe){var x=p("../lib/dom"),w=p("../range").Range,A=p("../config").nls;function c(n,o,r){for(var i=0,e=n.length-1;i<=e;){var t=i+e>>1,a=r(o,n[t]);if(a>0)i=t+1;else if(a<0)e=t-1;else return t}return-(i+1)}function h(n,o,r){var i=n.getAnnotations().sort(w.comparePoints);if(i.length){var e=c(i,{row:o,column:-1},w.comparePoints);e<0&&(e=-e-1),e>=i.length?e=r>0?0:i.length-1:e===0&&r<0&&(e=i.length-1);var t=i[e];if(!(!t||!r)){if(t.row===o){do t=i[e+=r];while(t&&t.row===o);if(!t)return i.slice()}var a=[];o=t.row;do a[r<0?"unshift":"push"](t),t=i[e+=r];while(t&&t.row==o);return a.length&&a}}}v.showErrorMarker=function(n,o){var r=n.session,i=n.getCursorPosition(),e=i.row,t=r.widgetManager.getWidgetsAtRow(e).filter(function(Te){return Te.type=="errorMarker"})[0];t?t.destroy():e-=o;var a=h(r,e,o),g;if(a){var m=a[0];i.column=(m.pos&&typeof m.column!="number"?m.pos.sc:m.column)||0,i.row=m.row,g=n.renderer.$gutterLayer.$annotations[i.row]}else{if(t)return;g={displayText:[A("error-marker.good-state","Looks good!")],className:"ace_ok"}}n.session.unfold(i.row),n.selection.moveToPosition(i);var M={row:i.row,fixedWidth:!0,coverGutter:!0,el:x.createElement("div"),type:"errorMarker"},O=M.el.appendChild(x.createElement("div")),$=M.el.appendChild(x.createElement("div"));$.className="error_widget_arrow "+g.className;var b=n.renderer.$cursorLayer.getPixelPosition(i).left;$.style.left=b+n.renderer.gutterWidth-5+"px",M.el.className="error_widget_wrapper",O.className="error_widget "+g.className,g.displayText.forEach(function(Te,de){O.appendChild(x.createTextNode(Te)),de<g.displayText.length-1&&O.appendChild(x.createElement("br"))}),O.appendChild(x.createElement("div"));var he=function(Te,de,Y){if(de===0&&(Y==="esc"||Y==="return"))return M.destroy(),{command:"null"}};M.destroy=function(){n.$mouseHandler.isMousePressed||(n.keyBinding.removeKeyboardHandler(he),r.widgetManager.removeLineWidget(M),n.off("changeSelection",M.destroy),n.off("changeSession",M.destroy),n.off("mouseup",M.destroy),n.off("change",M.destroy))},n.keyBinding.addKeyboardHandler(he),n.on("changeSelection",M.destroy),n.on("changeSession",M.destroy),n.on("mouseup",M.destroy),n.on("change",M.destroy),n.session.widgetManager.addLineWidget(M),M.el.onmousedown=n.focus.bind(n),n.renderer.scrollCursorIntoView(null,.5,{bottom:M.el.offsetHeight})},x.importCssString(`
956
+ .error_widget_wrapper {
957
+ background: inherit;
958
+ color: inherit;
959
+ border:none
960
+ }
961
+ .error_widget {
962
+ border-top: solid 2px;
963
+ border-bottom: solid 2px;
964
+ margin: 5px 0;
965
+ padding: 10px 40px;
966
+ white-space: pre-wrap;
967
+ }
968
+ .error_widget.ace_error, .error_widget_arrow.ace_error{
969
+ border-color: #ff5a5a
970
+ }
971
+ .error_widget.ace_warning, .error_widget_arrow.ace_warning{
972
+ border-color: #F1D817
973
+ }
974
+ .error_widget.ace_info, .error_widget_arrow.ace_info{
975
+ border-color: #5a5a5a
976
+ }
977
+ .error_widget.ace_ok, .error_widget_arrow.ace_ok{
978
+ border-color: #5aaa5a
979
+ }
980
+ .error_widget_arrow {
981
+ position: absolute;
982
+ border: solid 5px;
983
+ border-top-color: transparent!important;
984
+ border-right-color: transparent!important;
985
+ border-left-color: transparent!important;
986
+ top: -5px;
987
+ }
988
+ `,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(p,v,fe){p("./loader_build")(v);var x=p("./lib/dom"),w=p("./range").Range,A=p("./editor").Editor,c=p("./edit_session").EditSession,h=p("./undomanager").UndoManager,n=p("./virtual_renderer").VirtualRenderer;p("./worker/worker_client"),p("./keyboard/hash_handler"),p("./placeholder"),p("./multi_select"),p("./mode/folding/fold_mode"),p("./theme/textmate"),p("./ext/error_marker"),v.config=p("./config"),v.edit=function(r,i){if(typeof r=="string"){var e=r;if(r=document.getElementById(e),!r)throw new Error("ace.edit can't find div #"+e)}if(r&&r.env&&r.env.editor instanceof A)return r.env.editor;var t="";if(r&&/input|textarea/i.test(r.tagName)){var a=r;t=a.value,r=x.createElement("pre"),a.parentNode.replaceChild(r,a)}else r&&(t=r.textContent,r.innerHTML="");var g=v.createEditSession(t),m=new A(new n(r),g,i),M={document:g,editor:m,onResize:m.resize.bind(m,null)};return a&&(M.textarea=a),m.on("destroy",function(){M.editor.container.env=null}),m.container.env=m.env=M,m},v.createEditSession=function(r,i){var e=new c(r,i);return e.setUndoManager(new h),e},v.Range=w,v.Editor=A,v.EditSession=c,v.UndoManager=h,v.VirtualRenderer=n;var o=v.config.version;v.version=o}),function(){ace.require(["ace/ace"],function(p){p&&(p.config.init(!0),p.define=ace.define);var v=function(){return this}();!v&&typeof window<"u"&&(v=window),!v&&typeof self<"u"&&(v=self),v.ace||(v.ace=p);for(var fe in p)p.hasOwnProperty(fe)&&(v.ace[fe]=p[fe]);v.ace.default=v.ace,u&&(u.exports=v.ace)})}()}(ace$1)),ace$1.exports}var aceExports=requireAce(),modeRuby={exports:{}},hasRequiredModeRuby;function requireModeRuby(){return hasRequiredModeRuby||(hasRequiredModeRuby=1,function(u,f){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(p,v,fe){var x=p("../lib/oop"),w=p("./text_highlight_rules").TextHighlightRules,A=v.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};v.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},v.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},v.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var c=v.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},h=v.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},n=v.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},o=v.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},r=v.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},i=v.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},e=v.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},t=v.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},a=function(){var g="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",M="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",O="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",$=this.$keywords=this.createKeywordMapper({keyword:m,"constant.language":M,"variable.language":O,"support.function":g,"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})*})`,he={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};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(Te,de,Y){Y.length&&(Y=[]);var gt=Te[Te.length-1];return Y.unshift(gt,de),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(Te,de,Y){Y.length&&(Y=[]);var gt=Te[Te.length-1];return Y.unshift(gt,de),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(Te,de,Y){Y.length&&(Y=[]);var gt=Te[Te.length-1];return Y.unshift(gt,de),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(Te,de,Y){Y.length&&(Y=[]);var gt=Te[Te.length-1];return Y.unshift(gt,de),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(Te,de,Y){Y.length&&(Y=[]);var gt=Te[Te.length-1];return Y.unshift(gt,de),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},t,{token:"variable.global",regex:"[$][a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]*"},{token:["punctuation.operator","support.function"],regex:/(\.)([a-zA-Z_\d]+)(?=\()/},{token:["punctuation.operator","identifier"],regex:/(\.)([a-zA-Z_][a-zA-Z_\d]*)/},{token:"string.character",regex:"\\B\\?(?:"+b+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},r,i,A,c,e,h,n,o,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:$,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(Te,de,Y){var gt=Te[2]=="-"||Te[2]=="~"?"indentedHeredoc":"heredoc",U=Te.split(this.splitRegex);return Y.push(gt,U[3]),[{type:"constant",value:U[1]},{type:"string",value:U[2]},{type:"support.class",value:U[3]},{type:"string",value:U[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(Te,de,Y){return Te===Y[1]?(Y.shift(),Y.shift(),this.next=Y[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(Te,de,Y){return Te===Y[1]?(Y.shift(),Y.shift(),this.next=Y[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(Te,de){return de[0]==="heredoc"||de[0]==="indentedHeredoc"?de[0]:Te}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(Te,de,Y){return this.next="",Te=="}"&&Y.length>1&&Y[1]!="start"&&(Y.shift(),this.next=Y.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(Te,de,Y){return Y.length&&Te===Y[0]?(Y.unshift(Te,de),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(Te,de,Y){return Y.length&&Te===he[Y[0]]?(Y.shift(),this.next=Y.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(Te,de,Y){return Y.length&&Te===Y[0]?(Y.unshift(Te,de),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(Te,de,Y){return Y.length&&Te===he[Y[0]]?(Y.shift(),this.next=Y.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(Te,de,Y){return Y.length&&Te===Y[0]?(Y.unshift(Te,de),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(Te,de,Y){return Y.length&&Te===he[Y[0]]?(Y.shift(),this.next=Y.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(Te,de,Y){return Y.length&&Te===Y[0]?(Y.unshift(Te,de),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(Te,de,Y){return Y.length&&Te===he[Y[0]]?(Y.shift(),this.next=Y.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(Te,de,Y){return Y.length&&Te===Y[0]?(Y.unshift(Te,de),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(Te,de,Y){return Y.length&&Te[0]===he[Y[0]]?(Y.shift(),this.next=Y.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()};x.inherits(a,w),v.RubyHighlightRules=a}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(p,v,fe){var x=p("../range").Range,w=function(){};(function(){this.checkOutdent=function(A,c){return/^\s+$/.test(A)?/^\s*\}/.test(c):!1},this.autoOutdent=function(A,c){var h=A.getLine(c),n=h.match(/^(\s*\})/);if(!n)return 0;var o=n[1].length,r=A.findMatchingBracket({row:c,column:o});if(!r||r.row==c)return 0;var i=this.$getIndent(A.getLine(r.row));A.replace(new x(c,0,c,o-1),i)},this.$getIndent=function(A){return A.match(/^\s*/)[0]}}).call(w.prototype),v.MatchingBraceOutdent=w}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(p,v,fe){var x=p("../../lib/oop"),w=p("./fold_mode").FoldMode,A=p("../../range").Range,c=p("../../token_iterator").TokenIterator,h=v.FoldMode=function(){};x.inherits(h,w),(function(){this.indentKeywords={class:1,def:1,module:1,do:1,unless:1,if:1,while:1,for:1,until:1,begin:1,else:0,elsif:0,rescue:0,ensure:0,when:0,end:-1,case:1,"=begin":1,"=end":-1},this.foldingStartMarker=/(?:\s|^)(def|do|while|class|unless|module|if|for|until|begin|else|elsif|case|rescue|ensure|when)\b|({\s*$)|(=begin)/,this.foldingStopMarker=/(=end(?=$|\s.*$))|(^\s*})|\b(end)\b/,this.getFoldWidget=function(n,o,r){var i=n.getLine(r),e=this.foldingStartMarker.test(i),t=this.foldingStopMarker.test(i);if(e&&!t){var a=i.match(this.foldingStartMarker);if(a[1]){if((a[1]=="if"||a[1]=="else"||a[1]=="while"||a[1]=="until"||a[1]=="unless")&&(a[1]=="else"&&/^\s*else\s*$/.test(i)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(i)===!1)||a[1]=="when"&&/\sthen\s/.test(i)===!0)return;if(n.getTokenAt(r,a.index+2).type==="keyword")return"start"}else if(!a[3]||n.getTokenAt(r,a.index+1).type==="comment.multiline")return"start"}if(o!="markbeginend"||!t||e&&t)return"";var a=i.match(this.foldingStopMarker);if(a[3]==="end"){if(n.getTokenAt(r,a.index+1).type==="keyword")return"end"}else if(!a[1]||n.getTokenAt(r,a.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(n,o,r){var i=n.doc.getLine(r),e=this.foldingStartMarker.exec(i);if(e)return e[1]||e[3]?this.rubyBlock(n,r,e.index+2):this.openingBracketBlock(n,"{",r,e.index);var e=this.foldingStopMarker.exec(i);if(e)return e[3]==="end"&&n.getTokenAt(r,e.index+1).type==="keyword"?this.rubyBlock(n,r,e.index+1):e[1]==="=end"&&n.getTokenAt(r,e.index+1).type==="comment.multiline"?this.rubyBlock(n,r,e.index+1):this.closingBracketBlock(n,"}",r,e.index+e[0].length)},this.rubyBlock=function(n,U,r,i){var e=new c(n,U,r),t=e.getCurrentToken();if(!(!t||t.type!="keyword"&&t.type!="comment.multiline")){var a=t.value,g=n.getLine(U);switch(t.value){case"if":case"unless":case"while":case"until":var m=new RegExp("^\\s*"+t.value);if(!m.test(g))return;var M=this.indentKeywords[a];break;case"when":if(/\sthen\s/.test(g))return;case"elsif":case"rescue":case"ensure":var M=1;break;case"else":var m=new RegExp("^\\s*"+t.value+"\\s*$");if(!m.test(g))return;var M=1;break;default:var M=this.indentKeywords[a]}var O=[a];if(M){var $=M===-1?n.getLine(U-1).length:n.getLine(U).length,b=U,he=[];if(he.push(e.getCurrentTokenRange()),e.step=M===-1?e.stepBackward:e.stepForward,t.type=="comment.multiline"){for(;t=e.step();)if(t.type==="comment.multiline"){if(M==1){if($=6,t.value=="=end")break}else if(t.value=="=begin")break}}else for(;t=e.step();){var Te=!1;if(t.type==="keyword"){var de=M*this.indentKeywords[t.value];switch(g=n.getLine(e.getCurrentTokenRow()),t.value){case"do":for(var Y=e.$tokenIndex-1;Y>=0;Y--){var gt=e.$rowTokens[Y];if(gt&&(gt.value=="while"||gt.value=="until"||gt.value=="for")){de=0;break}}break;case"else":var m=new RegExp("^\\s*"+t.value+"\\s*$");(!m.test(g)||a=="case")&&(de=0,Te=!0);break;case"if":case"unless":case"while":case"until":var m=new RegExp("^\\s*"+t.value);m.test(g)||(de=0,Te=!0);break;case"when":(/\sthen\s/.test(g)||a=="case")&&(de=0,Te=!0)}if(de>0)O.unshift(t.value);else if(de<=0&&Te===!1){if(O.shift(),!O.length&&((a=="while"||a=="until"||a=="for")&&t.value!="do"||t.value=="do"&&M==-1&&de!=0||t.value!="do"))break;de===0&&O.unshift(t.value)}}}if(!t)return null;if(i)return he.push(e.getCurrentTokenRange()),he;var U=e.getCurrentTokenRow();if(M===-1){if(t.type==="comment.multiline")var V=6;else var V=n.getLine(U).length;return new A(U,V,b-1,$)}return new A(b,$,U-1,n.getLine(U-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(p,v,fe){var x=p("../lib/oop"),w=p("./text").Mode,A=p("./ruby_highlight_rules").RubyHighlightRules,c=p("./matching_brace_outdent").MatchingBraceOutdent,h=p("../range").Range,n=p("./folding/ruby").FoldMode,o=function(){this.HighlightRules=A,this.$outdent=new c,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new n,this.indentKeywords=this.foldingRules.indentKeywords};x.inherits(o,w),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(r,i,e){var t=this.$getIndent(i),a=this.getTokenizer().getLineTokens(i,r),g=a.tokens;if(g.length&&g[g.length-1].type=="comment")return t;if(r=="start"){var m=i.match(/^.*[\{\(\[]\s*$/),M=i.match(/^\s*(class|def|module)\s.*$/),O=i.match(/.*do(\s*|\s+\|.*\|\s*)$/),$=i.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(m||M||O||$)&&(t+=e)}return t},this.checkOutdent=function(r,i,e){return/^\s+(end|else|rescue|ensure)$/.test(i+e)||this.$outdent.checkOutdent(i,e)},this.autoOutdent=function(r,i,e){var t=i.getLine(e);if(/}/.test(t))return this.$outdent.autoOutdent(i,e);var a=this.$getIndent(t),g=i.getLine(e-1),m=this.$getIndent(g),M=i.getTabString();m.length<=a.length&&a.slice(-M.length)==M&&i.remove(new h(e,a.length-M.length,e,a.length))},this.getMatching=function(r,i,e){if(i==null){var t=r.selection.lead;e=t.column,i=t.row}var a=r.getTokenAt(i,e);if(a&&a.value in this.indentKeywords)return this.foldingRules.rubyBlock(r,i,e,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(o.prototype),v.Mode=o}),function(){ace.require(["ace/mode/ruby"],function(p){u&&(u.exports=p)})}()}(modeRuby)),modeRuby.exports}requireModeRuby();var themeTwilight={exports:{}},hasRequiredThemeTwilight;function requireThemeTwilight(){return hasRequiredThemeTwilight||(hasRequiredThemeTwilight=1,function(u,f){ace.define("ace/theme/twilight-css",["require","exports","module"],function(p,v,fe){fe.exports=`.ace-twilight .ace_gutter {
989
+ background: #232323;
990
+ color: #E2E2E2
991
+ }
992
+
993
+ .ace-twilight .ace_print-margin {
994
+ width: 1px;
995
+ background: #232323
996
+ }
997
+
998
+ .ace-twilight {
999
+ background-color: #141414;
1000
+ color: #F8F8F8
1001
+ }
1002
+
1003
+ .ace-twilight .ace_cursor {
1004
+ color: #A7A7A7
1005
+ }
1006
+
1007
+ .ace-twilight .ace_marker-layer .ace_selection {
1008
+ background: rgba(221, 240, 255, 0.20)
1009
+ }
1010
+
1011
+ .ace-twilight.ace_multiselect .ace_selection.ace_start {
1012
+ box-shadow: 0 0 3px 0px #141414;
1013
+ }
1014
+
1015
+ .ace-twilight .ace_marker-layer .ace_step {
1016
+ background: rgb(102, 82, 0)
1017
+ }
1018
+
1019
+ .ace-twilight .ace_marker-layer .ace_bracket {
1020
+ margin: -1px 0 0 -1px;
1021
+ border: 1px solid rgba(255, 255, 255, 0.25)
1022
+ }
1023
+
1024
+ .ace-twilight .ace_marker-layer .ace_active-line {
1025
+ background: rgba(255, 255, 255, 0.031)
1026
+ }
1027
+
1028
+ .ace-twilight .ace_gutter-active-line {
1029
+ background-color: rgba(255, 255, 255, 0.031)
1030
+ }
1031
+
1032
+ .ace-twilight .ace_marker-layer .ace_selected-word {
1033
+ border: 1px solid rgba(221, 240, 255, 0.20)
1034
+ }
1035
+
1036
+ .ace-twilight .ace_invisible {
1037
+ color: rgba(255, 255, 255, 0.25)
1038
+ }
1039
+
1040
+ .ace-twilight .ace_keyword,
1041
+ .ace-twilight .ace_meta {
1042
+ color: #CDA869
1043
+ }
1044
+
1045
+ .ace-twilight .ace_constant,
1046
+ .ace-twilight .ace_constant.ace_character,
1047
+ .ace-twilight .ace_constant.ace_character.ace_escape,
1048
+ .ace-twilight .ace_constant.ace_other,
1049
+ .ace-twilight .ace_heading,
1050
+ .ace-twilight .ace_markup.ace_heading,
1051
+ .ace-twilight .ace_support.ace_constant {
1052
+ color: #CF6A4C
1053
+ }
1054
+
1055
+ .ace-twilight .ace_invalid.ace_illegal {
1056
+ color: #F8F8F8;
1057
+ background-color: rgba(86, 45, 86, 0.75)
1058
+ }
1059
+
1060
+ .ace-twilight .ace_invalid.ace_deprecated {
1061
+ text-decoration: underline;
1062
+ font-style: italic;
1063
+ color: #D2A8A1
1064
+ }
1065
+
1066
+ .ace-twilight .ace_support {
1067
+ color: #9B859D
1068
+ }
1069
+
1070
+ .ace-twilight .ace_fold {
1071
+ background-color: #AC885B;
1072
+ border-color: #F8F8F8
1073
+ }
1074
+
1075
+ .ace-twilight .ace_support.ace_function {
1076
+ color: #DAD085
1077
+ }
1078
+
1079
+ .ace-twilight .ace_list,
1080
+ .ace-twilight .ace_markup.ace_list,
1081
+ .ace-twilight .ace_storage {
1082
+ color: #F9EE98
1083
+ }
1084
+
1085
+ .ace-twilight .ace_entity.ace_name.ace_function,
1086
+ .ace-twilight .ace_meta.ace_tag {
1087
+ color: #AC885B
1088
+ }
1089
+
1090
+ .ace-twilight .ace_string {
1091
+ color: #8F9D6A
1092
+ }
1093
+
1094
+ .ace-twilight .ace_string.ace_regexp {
1095
+ color: #E9C062
1096
+ }
1097
+
1098
+ .ace-twilight .ace_comment {
1099
+ font-style: italic;
1100
+ color: #5F5A60
1101
+ }
1102
+
1103
+ .ace-twilight .ace_variable {
1104
+ color: #7587A6
1105
+ }
1106
+
1107
+ .ace-twilight .ace_xml-pe {
1108
+ color: #494949
1109
+ }
1110
+
1111
+ .ace-twilight .ace_indent-guide {
1112
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y
1113
+ }
1114
+
1115
+ .ace-twilight .ace_indent-guide-active {
1116
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
1117
+ }
1118
+ `}),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],function(p,v,fe){v.isDark=!0,v.cssClass="ace-twilight",v.cssText=p("./twilight-css");var x=p("../lib/dom");x.importCssString(v.cssText,v.cssClass,!1)}),function(){ace.require(["ace/theme/twilight"],function(p){u&&(u.exports=p)})}()}(themeTwilight)),themeTwilight.exports}requireThemeTwilight();var rn=Object.defineProperty,on=(u,f,p)=>f in u?rn(u,f,{enumerable:!0,configurable:!0,writable:!0,value:p}):u[f]=p,D=(u,f,p)=>on(u,typeof f!="symbol"?f+"":f,p);function At(u,f){return function(){return u.apply(f,arguments)}}const{toString:cn}=Object.prototype,{getPrototypeOf:Be}=Object,{iterator:Ee,toStringTag:Rt}=Symbol,xe=(u=>f=>{const p=cn.call(f);return u[p]||(u[p]=p.slice(8,-1).toLowerCase())})(Object.create(null)),B=u=>(u=u.toLowerCase(),f=>xe(f)===u),Ae=u=>f=>typeof f===u,{isArray:te}=Array,ee=Ae("undefined");function oe(u){return u!==null&&!ee(u)&&u.constructor!==null&&!ee(u.constructor)&&N(u.constructor.isBuffer)&&u.constructor.isBuffer(u)}const Ot=B("ArrayBuffer");function an(u){let f;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?f=ArrayBuffer.isView(u):f=u&&u.buffer&&Ot(u.buffer),f}const ln=Ae("string"),N=Ae("function"),Ct=Ae("number"),ce=u=>u!==null&&typeof u=="object",un=u=>u===!0||u===!1,ye=u=>{if(xe(u)!=="object")return!1;const f=Be(u);return(f===null||f===Object.prototype||Object.getPrototypeOf(f)===null)&&!(Rt in u)&&!(Ee in u)},hn=u=>{if(!ce(u)||oe(u))return!1;try{return Object.keys(u).length===0&&Object.getPrototypeOf(u)===Object.prototype}catch{return!1}},dn=B("Date"),fn=B("File"),pn=B("Blob"),mn=B("FileList"),gn=u=>ce(u)&&N(u.pipe),bn=u=>{let f;return u&&(typeof FormData=="function"&&u instanceof FormData||N(u.append)&&((f=xe(u))==="formdata"||f==="object"&&N(u.toString)&&u.toString()==="[object FormData]"))},yn=B("URLSearchParams"),[_n,wn,Sn,En]=["ReadableStream","Request","Response","Headers"].map(B),xn=u=>u.trim?u.trim():u.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ae(u,f,{allOwnKeys:p=!1}={}){if(u===null||typeof u>"u")return;let v,fe;if(typeof u!="object"&&(u=[u]),te(u))for(v=0,fe=u.length;v<fe;v++)f.call(null,u[v],v,u);else{if(oe(u))return;const x=p?Object.getOwnPropertyNames(u):Object.keys(u),w=x.length;let A;for(v=0;v<w;v++)A=x[v],f.call(null,u[A],A,u)}}function Tt(u,f){if(oe(u))return null;f=f.toLowerCase();const p=Object.keys(u);let v=p.length,fe;for(;v-- >0;)if(fe=p[v],f===fe.toLowerCase())return fe;return null}const X=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,kt=u=>!ee(u)&&u!==X;function $e(){const{caseless:u,skipUndefined:f}=kt(this)&&this||{},p={},v=(fe,x)=>{const w=u&&Tt(p,x)||x;ye(p[w])&&ye(fe)?p[w]=$e(p[w],fe):ye(fe)?p[w]=$e({},fe):te(fe)?p[w]=fe.slice():(!f||!ee(fe))&&(p[w]=fe)};for(let fe=0,x=arguments.length;fe<x;fe++)arguments[fe]&&ae(arguments[fe],v);return p}const An=(u,f,p,{allOwnKeys:v}={})=>(ae(f,(fe,x)=>{p&&N(fe)?u[x]=At(fe,p):u[x]=fe},{allOwnKeys:v}),u),Rn=u=>(u.charCodeAt(0)===65279&&(u=u.slice(1)),u),On=(u,f,p,v)=>{u.prototype=Object.create(f.prototype,v),u.prototype.constructor=u,Object.defineProperty(u,"super",{value:f.prototype}),p&&Object.assign(u.prototype,p)},Cn=(u,f,p,v)=>{let fe,x,w;const A={};if(f=f||{},u==null)return f;do{for(fe=Object.getOwnPropertyNames(u),x=fe.length;x-- >0;)w=fe[x],(!v||v(w,u,f))&&!A[w]&&(f[w]=u[w],A[w]=!0);u=p!==!1&&Be(u)}while(u&&(!p||p(u,f))&&u!==Object.prototype);return f},Tn=(u,f,p)=>{u=String(u),(p===void 0||p>u.length)&&(p=u.length),p-=f.length;const v=u.indexOf(f,p);return v!==-1&&v===p},kn=u=>{if(!u)return null;if(te(u))return u;let f=u.length;if(!Ct(f))return null;const p=new Array(f);for(;f-- >0;)p[f]=u[f];return p},Nn=(u=>f=>u&&f instanceof u)(typeof Uint8Array<"u"&&Be(Uint8Array)),Pn=(u,f)=>{const p=(u&&u[Ee]).call(u);let v;for(;(v=p.next())&&!v.done;){const fe=v.value;f.call(u,fe[0],fe[1])}},In=(u,f)=>{let p;const v=[];for(;(p=u.exec(f))!==null;)v.push(p);return v},Ln=B("HTMLFormElement"),$n=u=>u.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(f,p,v){return p.toUpperCase()+v}),Ze=(({hasOwnProperty:u})=>(f,p)=>u.call(f,p))(Object.prototype),Fn=B("RegExp"),Nt=(u,f)=>{const p=Object.getOwnPropertyDescriptors(u),v={};ae(p,(fe,x)=>{let w;(w=f(fe,x,u))!==!1&&(v[x]=w||fe)}),Object.defineProperties(u,v)},vn=u=>{Nt(u,(f,p)=>{if(N(u)&&["arguments","caller","callee"].indexOf(p)!==-1)return!1;const v=u[p];if(N(v)){if(f.enumerable=!1,"writable"in f){f.writable=!1;return}f.set||(f.set=()=>{throw Error("Can not rewrite read-only method '"+p+"'")})}})},jn=(u,f)=>{const p={},v=fe=>{fe.forEach(x=>{p[x]=!0})};return te(u)?v(u):v(String(u).split(f)),p},Un=()=>{},Dn=(u,f)=>u!=null&&Number.isFinite(u=+u)?u:f;function qn(u){return!!(u&&N(u.append)&&u[Rt]==="FormData"&&u[Ee])}const Bn=u=>{const f=new Array(10),p=(v,fe)=>{if(ce(v)){if(f.indexOf(v)>=0)return;if(oe(v))return v;if(!("toJSON"in v)){f[fe]=v;const x=te(v)?[]:{};return ae(v,(w,A)=>{const c=p(w,fe+1);!ee(c)&&(x[A]=c)}),f[fe]=void 0,x}}return v};return p(u,0)},Mn=B("AsyncFunction"),Hn=u=>u&&(ce(u)||N(u))&&N(u.then)&&N(u.catch),Pt=((u,f)=>u?setImmediate:f?((p,v)=>(X.addEventListener("message",({source:fe,data:x})=>{fe===X&&x===p&&v.length&&v.shift()()},!1),fe=>{v.push(fe),X.postMessage(p,"*")}))(`axios@${Math.random()}`,[]):p=>setTimeout(p))(typeof setImmediate=="function",N(X.postMessage)),zn=typeof queueMicrotask<"u"?queueMicrotask.bind(X):typeof process<"u"&&process.nextTick||Pt,Vn=u=>u!=null&&N(u[Ee]),l={isArray:te,isArrayBuffer:Ot,isBuffer:oe,isFormData:bn,isArrayBufferView:an,isString:ln,isNumber:Ct,isBoolean:un,isObject:ce,isPlainObject:ye,isEmptyObject:hn,isReadableStream:_n,isRequest:wn,isResponse:Sn,isHeaders:En,isUndefined:ee,isDate:dn,isFile:fn,isBlob:pn,isRegExp:Fn,isFunction:N,isStream:gn,isURLSearchParams:yn,isTypedArray:Nn,isFileList:mn,forEach:ae,merge:$e,extend:An,trim:xn,stripBOM:Rn,inherits:On,toFlatObject:Cn,kindOf:xe,kindOfTest:B,endsWith:Tn,toArray:kn,forEachEntry:Pn,matchAll:In,isHTMLForm:Ln,hasOwnProperty:Ze,hasOwnProp:Ze,reduceDescriptors:Nt,freezeMethods:vn,toObjectSet:jn,toCamelCase:$n,noop:Un,toFiniteNumber:Dn,findKey:Tt,global:X,isContextDefined:kt,isSpecCompliantForm:qn,toJSONObject:Bn,isAsyncFn:Mn,isThenable:Hn,setImmediate:Pt,asap:zn,isIterable:Vn};function _(u,f,p,v,fe){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=u,this.name="AxiosError",f&&(this.code=f),p&&(this.config=p),v&&(this.request=v),fe&&(this.response=fe,this.status=fe.status?fe.status:null)}l.inherits(_,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 It=_.prototype,Lt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(u=>{Lt[u]={value:u}}),Object.defineProperties(_,Lt),Object.defineProperty(It,"isAxiosError",{value:!0}),_.from=(u,f,p,v,fe,x)=>{const w=Object.create(It);l.toFlatObject(u,w,function(h){return h!==Error.prototype},h=>h!=="isAxiosError");const A=u&&u.message?u.message:"Error",c=f==null&&u?u.code:f;return _.call(w,A,c,p,v,fe),u&&w.cause==null&&Object.defineProperty(w,"cause",{value:u,configurable:!0}),w.name=u&&u.name||"Error",x&&Object.assign(w,x),w};const Jn=null;function Fe(u){return l.isPlainObject(u)||l.isArray(u)}function $t(u){return l.endsWith(u,"[]")?u.slice(0,-2):u}function Ye(u,f,p){return u?u.concat(f).map(function(v,fe){return v=$t(v),!p&&fe?"["+v+"]":v}).join(p?".":""):f}function Wn(u){return l.isArray(u)&&!u.some(Fe)}const Kn=l.toFlatObject(l,{},null,function(u){return/^is[A-Z]/.test(u)});function Re(u,f,p){if(!l.isObject(u))throw new TypeError("target must be an object");f=f||new FormData,p=l.toFlatObject(p,{metaTokens:!0,dots:!1,indexes:!1},!1,function(i,e){return!l.isUndefined(e[i])});const v=p.metaTokens,fe=p.visitor||h,x=p.dots,w=p.indexes,A=(p.Blob||typeof Blob<"u"&&Blob)&&l.isSpecCompliantForm(f);if(!l.isFunction(fe))throw new TypeError("visitor must be a function");function c(i){if(i===null)return"";if(l.isDate(i))return i.toISOString();if(l.isBoolean(i))return i.toString();if(!A&&l.isBlob(i))throw new _("Blob is not supported. Use a Buffer instead.");return l.isArrayBuffer(i)||l.isTypedArray(i)?A&&typeof Blob=="function"?new Blob([i]):Buffer.from(i):i}function h(i,e,t){let a=i;if(i&&!t&&typeof i=="object"){if(l.endsWith(e,"{}"))e=v?e:e.slice(0,-2),i=JSON.stringify(i);else if(l.isArray(i)&&Wn(i)||(l.isFileList(i)||l.endsWith(e,"[]"))&&(a=l.toArray(i)))return e=$t(e),a.forEach(function(g,m){!(l.isUndefined(g)||g===null)&&f.append(w===!0?Ye([e],m,x):w===null?e:e+"[]",c(g))}),!1}return Fe(i)?!0:(f.append(Ye(t,e,x),c(i)),!1)}const n=[],o=Object.assign(Kn,{defaultVisitor:h,convertValue:c,isVisitable:Fe});function r(i,e){if(!l.isUndefined(i)){if(n.indexOf(i)!==-1)throw Error("Circular reference detected in "+e.join("."));n.push(i),l.forEach(i,function(t,a){(!(l.isUndefined(t)||t===null)&&fe.call(f,t,l.isString(a)?a.trim():a,e,o))===!0&&r(t,e?e.concat(a):[a])}),n.pop()}}if(!l.isObject(u))throw new TypeError("data must be an object");return r(u),f}function et(u){const f={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(u).replace(/[!'()~]|%20|%00/g,function(p){return f[p]})}function Me(u,f){this._pairs=[],u&&Re(u,this,f)}const Ft=Me.prototype;Ft.append=function(u,f){this._pairs.push([u,f])},Ft.toString=function(u){const f=u?function(p){return u.call(this,p,et)}:et;return this._pairs.map(function(p){return f(p[0])+"="+f(p[1])},"").join("&")};function Xn(u){return encodeURIComponent(u).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function vt(u,f,p){if(!f)return u;const v=p&&p.encode||Xn;l.isFunction(p)&&(p={serialize:p});const fe=p&&p.serialize;let x;if(fe?x=fe(f,p):x=l.isURLSearchParams(f)?f.toString():new Me(f,p).toString(v),x){const w=u.indexOf("#");w!==-1&&(u=u.slice(0,w)),u+=(u.indexOf("?")===-1?"?":"&")+x}return u}class tt{constructor(){this.handlers=[]}use(f,p,v){return this.handlers.push({fulfilled:f,rejected:p,synchronous:v?v.synchronous:!1,runWhen:v?v.runWhen:null}),this.handlers.length-1}eject(f){this.handlers[f]&&(this.handlers[f]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(f){l.forEach(this.handlers,function(p){p!==null&&f(p)})}}const jt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Gn=typeof URLSearchParams<"u"?URLSearchParams:Me,Qn=typeof FormData<"u"?FormData:null,Zn=typeof Blob<"u"?Blob:null,Yn={isBrowser:!0,classes:{URLSearchParams:Gn,FormData:Qn,Blob:Zn},protocols:["http","https","file","blob","url","data"]},He=typeof window<"u"&&typeof document<"u",ve=typeof navigator=="object"&&navigator||void 0,es=He&&(!ve||["ReactNative","NativeScript","NS"].indexOf(ve.product)<0),ts=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ns=He&&window.location.href||"http://localhost",ss=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:He,hasStandardBrowserEnv:es,hasStandardBrowserWebWorkerEnv:ts,navigator:ve,origin:ns},Symbol.toStringTag,{value:"Module"})),k={...ss,...Yn};function rs(u,f){return Re(u,new k.classes.URLSearchParams,{visitor:function(p,v,fe,x){return k.isNode&&l.isBuffer(p)?(this.append(v,p.toString("base64")),!1):x.defaultVisitor.apply(this,arguments)},...f})}function is(u){return l.matchAll(/\w+|\[(\w*)]/g,u).map(f=>f[0]==="[]"?"":f[1]||f[0])}function os(u){const f={},p=Object.keys(u);let v;const fe=p.length;let x;for(v=0;v<fe;v++)x=p[v],f[x]=u[x];return f}function Ut(u){function f(p,v,fe,x){let w=p[x++];if(w==="__proto__")return!0;const A=Number.isFinite(+w),c=x>=p.length;return w=!w&&l.isArray(fe)?fe.length:w,c?(l.hasOwnProp(fe,w)?fe[w]=[fe[w],v]:fe[w]=v,!A):((!fe[w]||!l.isObject(fe[w]))&&(fe[w]=[]),f(p,v,fe[w],x)&&l.isArray(fe[w])&&(fe[w]=os(fe[w])),!A)}if(l.isFormData(u)&&l.isFunction(u.entries)){const p={};return l.forEachEntry(u,(v,fe)=>{f(is(v),fe,p,0)}),p}return null}function cs(u,f,p){if(l.isString(u))try{return(f||JSON.parse)(u),l.trim(u)}catch(v){if(v.name!=="SyntaxError")throw v}return(p||JSON.stringify)(u)}const le={transitional:jt,adapter:["xhr","http","fetch"],transformRequest:[function(u,f){const p=f.getContentType()||"",v=p.indexOf("application/json")>-1,fe=l.isObject(u);if(fe&&l.isHTMLForm(u)&&(u=new FormData(u)),l.isFormData(u))return v?JSON.stringify(Ut(u)):u;if(l.isArrayBuffer(u)||l.isBuffer(u)||l.isStream(u)||l.isFile(u)||l.isBlob(u)||l.isReadableStream(u))return u;if(l.isArrayBufferView(u))return u.buffer;if(l.isURLSearchParams(u))return f.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),u.toString();let x;if(fe){if(p.indexOf("application/x-www-form-urlencoded")>-1)return rs(u,this.formSerializer).toString();if((x=l.isFileList(u))||p.indexOf("multipart/form-data")>-1){const w=this.env&&this.env.FormData;return Re(x?{"files[]":u}:u,w&&new w,this.formSerializer)}}return fe||v?(f.setContentType("application/json",!1),cs(u)):u}],transformResponse:[function(u){const f=this.transitional||le.transitional,p=f&&f.forcedJSONParsing,v=this.responseType==="json";if(l.isResponse(u)||l.isReadableStream(u))return u;if(u&&l.isString(u)&&(p&&!this.responseType||v)){const fe=!(f&&f.silentJSONParsing)&&v;try{return JSON.parse(u,this.parseReviver)}catch(x){if(fe)throw x.name==="SyntaxError"?_.from(x,_.ERR_BAD_RESPONSE,this,null,this.response):x}}return u}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:k.classes.FormData,Blob:k.classes.Blob},validateStatus:function(u){return u>=200&&u<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};l.forEach(["delete","get","head","post","put","patch"],u=>{le.headers[u]={}});const as=l.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ls=u=>{const f={};let p,v,fe;return u&&u.split(`
1119
+ `).forEach(function(x){fe=x.indexOf(":"),p=x.substring(0,fe).trim().toLowerCase(),v=x.substring(fe+1).trim(),!(!p||f[p]&&as[p])&&(p==="set-cookie"?f[p]?f[p].push(v):f[p]=[v]:f[p]=f[p]?f[p]+", "+v:v)}),f},nt=Symbol("internals");function se(u){return u&&String(u).trim().toLowerCase()}function _e(u){return u===!1||u==null?u:l.isArray(u)?u.map(_e):String(u)}function us(u){const f=Object.create(null),p=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let v;for(;v=p.exec(u);)f[v[1]]=v[2];return f}const hs=u=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(u.trim());function Ne(u,f,p,v,fe){if(l.isFunction(v))return v.call(this,f,p);if(fe&&(f=p),!!l.isString(f)){if(l.isString(v))return f.indexOf(v)!==-1;if(l.isRegExp(v))return v.test(f)}}function ds(u){return u.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(f,p,v)=>p.toUpperCase()+v)}function fs(u,f){const p=l.toCamelCase(" "+f);["get","set","has"].forEach(v=>{Object.defineProperty(u,v+p,{value:function(fe,x,w){return this[v].call(this,f,fe,x,w)},configurable:!0})})}let P=class{constructor(u){u&&this.set(u)}set(u,f,p){const v=this;function fe(w,A,c){const h=se(A);if(!h)throw new Error("header name must be a non-empty string");const n=l.findKey(v,h);(!n||v[n]===void 0||c===!0||c===void 0&&v[n]!==!1)&&(v[n||A]=_e(w))}const x=(w,A)=>l.forEach(w,(c,h)=>fe(c,h,A));if(l.isPlainObject(u)||u instanceof this.constructor)x(u,f);else if(l.isString(u)&&(u=u.trim())&&!hs(u))x(ls(u),f);else if(l.isObject(u)&&l.isIterable(u)){let w={},A,c;for(const h of u){if(!l.isArray(h))throw TypeError("Object iterator must return a key-value pair");w[c=h[0]]=(A=w[c])?l.isArray(A)?[...A,h[1]]:[A,h[1]]:h[1]}x(w,f)}else u!=null&&fe(f,u,p);return this}get(u,f){if(u=se(u),u){const p=l.findKey(this,u);if(p){const v=this[p];if(!f)return v;if(f===!0)return us(v);if(l.isFunction(f))return f.call(this,v,p);if(l.isRegExp(f))return f.exec(v);throw new TypeError("parser must be boolean|regexp|function")}}}has(u,f){if(u=se(u),u){const p=l.findKey(this,u);return!!(p&&this[p]!==void 0&&(!f||Ne(this,this[p],p,f)))}return!1}delete(u,f){const p=this;let v=!1;function fe(x){if(x=se(x),x){const w=l.findKey(p,x);w&&(!f||Ne(p,p[w],w,f))&&(delete p[w],v=!0)}}return l.isArray(u)?u.forEach(fe):fe(u),v}clear(u){const f=Object.keys(this);let p=f.length,v=!1;for(;p--;){const fe=f[p];(!u||Ne(this,this[fe],fe,u,!0))&&(delete this[fe],v=!0)}return v}normalize(u){const f=this,p={};return l.forEach(this,(v,fe)=>{const x=l.findKey(p,fe);if(x){f[x]=_e(v),delete f[fe];return}const w=u?ds(fe):String(fe).trim();w!==fe&&delete f[fe],f[w]=_e(v),p[w]=!0}),this}concat(...u){return this.constructor.concat(this,...u)}toJSON(u){const f=Object.create(null);return l.forEach(this,(p,v)=>{p!=null&&p!==!1&&(f[v]=u&&l.isArray(p)?p.join(", "):p)}),f}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([u,f])=>u+": "+f).join(`
1120
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(u){return u instanceof this?u:new this(u)}static concat(u,...f){const p=new this(u);return f.forEach(v=>p.set(v)),p}static accessor(u){const f=(this[nt]=this[nt]={accessors:{}}).accessors,p=this.prototype;function v(fe){const x=se(fe);f[x]||(fs(p,fe),f[x]=!0)}return l.isArray(u)?u.forEach(v):v(u),this}};P.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),l.reduceDescriptors(P.prototype,({value:u},f)=>{let p=f[0].toUpperCase()+f.slice(1);return{get:()=>u,set(v){this[p]=v}}}),l.freezeMethods(P);function Pe(u,f){const p=this||le,v=f||p,fe=P.from(v.headers);let x=v.data;return l.forEach(u,function(w){x=w.call(p,x,fe.normalize(),f?f.status:void 0)}),fe.normalize(),x}function Dt(u){return!!(u&&u.__CANCEL__)}function ne(u,f,p){_.call(this,u??"canceled",_.ERR_CANCELED,f,p),this.name="CanceledError"}l.inherits(ne,_,{__CANCEL__:!0});function qt(u,f,p){const v=p.config.validateStatus;!p.status||!v||v(p.status)?u(p):f(new _("Request failed with status code "+p.status,[_.ERR_BAD_REQUEST,_.ERR_BAD_RESPONSE][Math.floor(p.status/100)-4],p.config,p.request,p))}function ps(u){const f=/^([-+\w]{1,25})(:?\/\/|:)/.exec(u);return f&&f[1]||""}function ms(u,f){u=u||10;const p=new Array(u),v=new Array(u);let fe=0,x=0,w;return f=f!==void 0?f:1e3,function(A){const c=Date.now(),h=v[x];w||(w=c),p[fe]=A,v[fe]=c;let n=x,o=0;for(;n!==fe;)o+=p[n++],n=n%u;if(fe=(fe+1)%u,fe===x&&(x=(x+1)%u),c-w<f)return;const r=h&&c-h;return r?Math.round(o*1e3/r):void 0}}function gs(u,f){let p=0,v=1e3/f,fe,x;const w=(A,c=Date.now())=>{p=c,fe=null,x&&(clearTimeout(x),x=null),u(...A)};return[(...A)=>{const c=Date.now(),h=c-p;h>=v?w(A,c):(fe=A,x||(x=setTimeout(()=>{x=null,w(fe)},v-h)))},()=>fe&&w(fe)]}const Se=(u,f,p=3)=>{let v=0;const fe=ms(50,250);return gs(x=>{const w=x.loaded,A=x.lengthComputable?x.total:void 0,c=w-v,h=fe(c),n=w<=A;v=w;const o={loaded:w,total:A,progress:A?w/A:void 0,bytes:c,rate:h||void 0,estimated:h&&A&&n?(A-w)/h:void 0,event:x,lengthComputable:A!=null,[f?"download":"upload"]:!0};u(o)},p)},st=(u,f)=>{const p=u!=null;return[v=>f[0]({lengthComputable:p,total:u,loaded:v}),f[1]]},rt=u=>(...f)=>l.asap(()=>u(...f)),bs=k.hasStandardBrowserEnv?((u,f)=>p=>(p=new URL(p,k.origin),u.protocol===p.protocol&&u.host===p.host&&(f||u.port===p.port)))(new URL(k.origin),k.navigator&&/(msie|trident)/i.test(k.navigator.userAgent)):()=>!0,ys=k.hasStandardBrowserEnv?{write(u,f,p,v,fe,x,w){if(typeof document>"u")return;const A=[`${u}=${encodeURIComponent(f)}`];l.isNumber(p)&&A.push(`expires=${new Date(p).toUTCString()}`),l.isString(v)&&A.push(`path=${v}`),l.isString(fe)&&A.push(`domain=${fe}`),x===!0&&A.push("secure"),l.isString(w)&&A.push(`SameSite=${w}`),document.cookie=A.join("; ")},read(u){if(typeof document>"u")return null;const f=document.cookie.match(new RegExp("(?:^|; )"+u+"=([^;]*)"));return f?decodeURIComponent(f[1]):null},remove(u){this.write(u,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function _s(u){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(u)}function ws(u,f){return f?u.replace(/\/?\/$/,"")+"/"+f.replace(/^\/+/,""):u}function Bt(u,f,p){let v=!_s(f);return u&&(v||p==!1)?ws(u,f):f}const it=u=>u instanceof P?{...u}:u;function Q(u,f){f=f||{};const p={};function v(h,n,o,r){return l.isPlainObject(h)&&l.isPlainObject(n)?l.merge.call({caseless:r},h,n):l.isPlainObject(n)?l.merge({},n):l.isArray(n)?n.slice():n}function fe(h,n,o,r){if(l.isUndefined(n)){if(!l.isUndefined(h))return v(void 0,h,o,r)}else return v(h,n,o,r)}function x(h,n){if(!l.isUndefined(n))return v(void 0,n)}function w(h,n){if(l.isUndefined(n)){if(!l.isUndefined(h))return v(void 0,h)}else return v(void 0,n)}function A(h,n,o){if(o in f)return v(h,n);if(o in u)return v(void 0,h)}const c={url:x,method:x,data:x,baseURL:w,transformRequest:w,transformResponse:w,paramsSerializer:w,timeout:w,timeoutMessage:w,withCredentials:w,withXSRFToken:w,adapter:w,responseType:w,xsrfCookieName:w,xsrfHeaderName:w,onUploadProgress:w,onDownloadProgress:w,decompress:w,maxContentLength:w,maxBodyLength:w,beforeRedirect:w,transport:w,httpAgent:w,httpsAgent:w,cancelToken:w,socketPath:w,responseEncoding:w,validateStatus:A,headers:(h,n,o)=>fe(it(h),it(n),o,!0)};return l.forEach(Object.keys({...u,...f}),function(h){const n=c[h]||fe,o=n(u[h],f[h],h);l.isUndefined(o)&&n!==A||(p[h]=o)}),p}const Mt=u=>{const f=Q({},u);let{data:p,withXSRFToken:v,xsrfHeaderName:fe,xsrfCookieName:x,headers:w,auth:A}=f;if(f.headers=w=P.from(w),f.url=vt(Bt(f.baseURL,f.url,f.allowAbsoluteUrls),u.params,u.paramsSerializer),A&&w.set("Authorization","Basic "+btoa((A.username||"")+":"+(A.password?unescape(encodeURIComponent(A.password)):""))),l.isFormData(p)){if(k.hasStandardBrowserEnv||k.hasStandardBrowserWebWorkerEnv)w.setContentType(void 0);else if(l.isFunction(p.getHeaders)){const c=p.getHeaders(),h=["content-type","content-length"];Object.entries(c).forEach(([n,o])=>{h.includes(n.toLowerCase())&&w.set(n,o)})}}if(k.hasStandardBrowserEnv&&(v&&l.isFunction(v)&&(v=v(f)),v||v!==!1&&bs(f.url))){const c=fe&&x&&ys.read(x);c&&w.set(fe,c)}return f},Ss=typeof XMLHttpRequest<"u",Es=Ss&&function(u){return new Promise(function(f,p){const v=Mt(u);let fe=v.data;const x=P.from(v.headers).normalize();let{responseType:w,onUploadProgress:A,onDownloadProgress:c}=v,h,n,o,r,i;function e(){r&&r(),i&&i(),v.cancelToken&&v.cancelToken.unsubscribe(h),v.signal&&v.signal.removeEventListener("abort",h)}let t=new XMLHttpRequest;t.open(v.method.toUpperCase(),v.url,!0),t.timeout=v.timeout;function a(){if(!t)return;const m=P.from("getAllResponseHeaders"in t&&t.getAllResponseHeaders()),M={data:!w||w==="text"||w==="json"?t.responseText:t.response,status:t.status,statusText:t.statusText,headers:m,config:u,request:t};qt(function(O){f(O),e()},function(O){p(O),e()},M),t=null}"onloadend"in t?t.onloadend=a:t.onreadystatechange=function(){!t||t.readyState!==4||t.status===0&&!(t.responseURL&&t.responseURL.indexOf("file:")===0)||setTimeout(a)},t.onabort=function(){t&&(p(new _("Request aborted",_.ECONNABORTED,u,t)),t=null)},t.onerror=function(m){const M=m&&m.message?m.message:"Network Error",O=new _(M,_.ERR_NETWORK,u,t);O.event=m||null,p(O),t=null},t.ontimeout=function(){let m=v.timeout?"timeout of "+v.timeout+"ms exceeded":"timeout exceeded";const M=v.transitional||jt;v.timeoutErrorMessage&&(m=v.timeoutErrorMessage),p(new _(m,M.clarifyTimeoutError?_.ETIMEDOUT:_.ECONNABORTED,u,t)),t=null},fe===void 0&&x.setContentType(null),"setRequestHeader"in t&&l.forEach(x.toJSON(),function(m,M){t.setRequestHeader(M,m)}),l.isUndefined(v.withCredentials)||(t.withCredentials=!!v.withCredentials),w&&w!=="json"&&(t.responseType=v.responseType),c&&([o,i]=Se(c,!0),t.addEventListener("progress",o)),A&&t.upload&&([n,r]=Se(A),t.upload.addEventListener("progress",n),t.upload.addEventListener("loadend",r)),(v.cancelToken||v.signal)&&(h=m=>{t&&(p(!m||m.type?new ne(null,u,t):m),t.abort(),t=null)},v.cancelToken&&v.cancelToken.subscribe(h),v.signal&&(v.signal.aborted?h():v.signal.addEventListener("abort",h)));const g=ps(v.url);if(g&&k.protocols.indexOf(g)===-1){p(new _("Unsupported protocol "+g+":",_.ERR_BAD_REQUEST,u));return}t.send(fe||null)})},xs=(u,f)=>{const{length:p}=u=u?u.filter(Boolean):[];if(f||p){let v=new AbortController,fe;const x=function(h){if(!fe){fe=!0,A();const n=h instanceof Error?h:this.reason;v.abort(n instanceof _?n:new ne(n instanceof Error?n.message:n))}};let w=f&&setTimeout(()=>{w=null,x(new _(`timeout ${f} of ms exceeded`,_.ETIMEDOUT))},f);const A=()=>{u&&(w&&clearTimeout(w),w=null,u.forEach(h=>{h.unsubscribe?h.unsubscribe(x):h.removeEventListener("abort",x)}),u=null)};u.forEach(h=>h.addEventListener("abort",x));const{signal:c}=v;return c.unsubscribe=()=>l.asap(A),c}},As=function*(u,f){let p=u.byteLength;if(p<f){yield u;return}let v=0,fe;for(;v<p;)fe=v+f,yield u.slice(v,fe),v=fe},Rs=async function*(u,f){for await(const p of Os(u))yield*As(p,f)},Os=async function*(u){if(u[Symbol.asyncIterator]){yield*u;return}const f=u.getReader();try{for(;;){const{done:p,value:v}=await f.read();if(p)break;yield v}}finally{await f.cancel()}},ot=(u,f,p,v)=>{const fe=Rs(u,f);let x=0,w,A=c=>{w||(w=!0,v&&v(c))};return new ReadableStream({async pull(c){try{const{done:h,value:n}=await fe.next();if(h){A(),c.close();return}let o=n.byteLength;if(p){let r=x+=o;p(r)}c.enqueue(new Uint8Array(n))}catch(h){throw A(h),h}},cancel(c){return A(c),fe.return()}},{highWaterMark:2})},ct=64*1024,{isFunction:pe}=l,Cs=(({Request:u,Response:f})=>({Request:u,Response:f}))(l.global),{ReadableStream:at,TextEncoder:lt}=l.global,ut=(u,...f)=>{try{return!!u(...f)}catch{return!1}},Ts=u=>{u=l.merge.call({skipUndefined:!0},Cs,u);const{fetch:f,Request:p,Response:v}=u,fe=f?pe(f):typeof fetch=="function",x=pe(p),w=pe(v);if(!fe)return!1;const A=fe&&pe(at),c=fe&&(typeof lt=="function"?(e=>t=>e.encode(t))(new lt):async e=>new Uint8Array(await new p(e).arrayBuffer())),h=x&&A&&ut(()=>{let e=!1;const t=new p(k.origin,{body:new at,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),n=w&&A&&ut(()=>l.isReadableStream(new v("").body)),o={stream:n&&(e=>e.body)};fe&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!o[e]&&(o[e]=(t,a)=>{let g=t&&t[e];if(g)return g.call(t);throw new _(`Response type '${e}' is not supported`,_.ERR_NOT_SUPPORT,a)})});const r=async e=>{if(e==null)return 0;if(l.isBlob(e))return e.size;if(l.isSpecCompliantForm(e))return(await new p(k.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(l.isArrayBufferView(e)||l.isArrayBuffer(e))return e.byteLength;if(l.isURLSearchParams(e)&&(e=e+""),l.isString(e))return(await c(e)).byteLength},i=async(e,t)=>l.toFiniteNumber(e.getContentLength())??r(t);return async e=>{let{url:t,method:a,data:g,signal:m,cancelToken:M,timeout:O,onDownloadProgress:$,onUploadProgress:b,responseType:he,headers:Te,withCredentials:de="same-origin",fetchOptions:Y}=Mt(e),gt=f||fetch;he=he?(he+"").toLowerCase():"text";let U=xs([m,M&&M.toAbortSignal()],O),V=null;const C=U&&U.unsubscribe&&(()=>{U.unsubscribe()});let y;try{if(b&&h&&a!=="get"&&a!=="head"&&(y=await i(Te,g))!==0){let yt=new p(t,{method:"POST",body:g,duplex:"half"}),Qt;if(l.isFormData(g)&&(Qt=yt.headers.get("content-type"))&&Te.setContentType(Qt),yt.body){const[bt,Gt]=st(y,Se(rt(b)));g=ot(yt.body,ct,bt,Gt)}}l.isString(de)||(de=de?"include":"omit");const T=x&&"credentials"in p.prototype,ke={...Y,signal:U,method:a.toUpperCase(),headers:Te.normalize().toJSON(),body:g,duplex:"half",credentials:T?de:void 0};V=x&&new p(t,ke);let Qe=await(x?gt(V,Y):gt(t,ke));const Je=n&&(he==="stream"||he==="response");if(n&&($||Je&&C)){const yt={};["status","statusText","headers"].forEach(Yt=>{yt[Yt]=Qe[Yt]});const Qt=l.toFiniteNumber(Qe.headers.get("content-length")),[bt,Gt]=$&&st(Qt,Se(rt($),!0))||[];Qe=new v(ot(Qe.body,ct,bt,()=>{Gt&&Gt(),C&&C()}),yt)}he=he||"text";let mt=await o[l.findKey(o,he)||"text"](Qe,e);return!Je&&C&&C(),await new Promise((yt,Qt)=>{qt(yt,Qt,{data:mt,headers:P.from(Qe.headers),status:Qe.status,statusText:Qe.statusText,config:e,request:V})})}catch(T){throw C&&C(),T&&T.name==="TypeError"&&/Load failed|fetch/i.test(T.message)?Object.assign(new _("Network Error",_.ERR_NETWORK,e,V),{cause:T.cause||T}):_.from(T,T&&T.code,e,V)}}},ks=new Map,Ht=u=>{let f=u&&u.env||{};const{fetch:p,Request:v,Response:fe}=f,x=[v,fe,p];let w=x.length,A=w,c,h,n=ks;for(;A--;)c=x[A],h=n.get(c),h===void 0&&n.set(c,h=A?new Map:Ts(f)),n=h;return h};Ht();const ze={http:Jn,xhr:Es,fetch:{get:Ht}};l.forEach(ze,(u,f)=>{if(u){try{Object.defineProperty(u,"name",{value:f})}catch{}Object.defineProperty(u,"adapterName",{value:f})}});const ht=u=>`- ${u}`,Ns=u=>l.isFunction(u)||u===null||u===!1;function Ps(u,f){u=l.isArray(u)?u:[u];const{length:p}=u;let v,fe;const x={};for(let w=0;w<p;w++){v=u[w];let A;if(fe=v,!Ns(v)&&(fe=ze[(A=String(v)).toLowerCase()],fe===void 0))throw new _(`Unknown adapter '${A}'`);if(fe&&(l.isFunction(fe)||(fe=fe.get(f))))break;x[A||"#"+w]=fe}if(!fe){const w=Object.entries(x).map(([c,h])=>`adapter ${c} `+(h===!1?"is not supported by the environment":"is not available in the build"));let A=p?w.length>1?`since :
1121
+ `+w.map(ht).join(`
1122
+ `):" "+ht(w[0]):"as no adapter specified";throw new _("There is no suitable adapter to dispatch the request "+A,"ERR_NOT_SUPPORT")}return fe}const zt={getAdapter:Ps,adapters:ze};function Ie(u){if(u.cancelToken&&u.cancelToken.throwIfRequested(),u.signal&&u.signal.aborted)throw new ne(null,u)}function dt(u){return Ie(u),u.headers=P.from(u.headers),u.data=Pe.call(u,u.transformRequest),["post","put","patch"].indexOf(u.method)!==-1&&u.headers.setContentType("application/x-www-form-urlencoded",!1),zt.getAdapter(u.adapter||le.adapter,u)(u).then(function(f){return Ie(u),f.data=Pe.call(u,u.transformResponse,f),f.headers=P.from(f.headers),f},function(f){return Dt(f)||(Ie(u),f&&f.response&&(f.response.data=Pe.call(u,u.transformResponse,f.response),f.response.headers=P.from(f.response.headers))),Promise.reject(f)})}const Vt="1.13.1",Oe={};["object","boolean","number","function","string","symbol"].forEach((u,f)=>{Oe[u]=function(p){return typeof p===u||"a"+(f<1?"n ":" ")+u}});const ft={};Oe.transitional=function(u,f,p){function v(fe,x){return"[Axios v"+Vt+"] Transitional option '"+fe+"'"+x+(p?". "+p:"")}return(fe,x,w)=>{if(u===!1)throw new _(v(x," has been removed"+(f?" in "+f:"")),_.ERR_DEPRECATED);return f&&!ft[x]&&(ft[x]=!0,console.warn(v(x," has been deprecated since v"+f+" and will be removed in the near future"))),u?u(fe,x,w):!0}},Oe.spelling=function(u){return(f,p)=>(console.warn(`${p} is likely a misspelling of ${u}`),!0)};function Is(u,f,p){if(typeof u!="object")throw new _("options must be an object",_.ERR_BAD_OPTION_VALUE);const v=Object.keys(u);let fe=v.length;for(;fe-- >0;){const x=v[fe],w=f[x];if(w){const A=u[x],c=A===void 0||w(A,x,u);if(c!==!0)throw new _("option "+x+" must be "+c,_.ERR_BAD_OPTION_VALUE);continue}if(p!==!0)throw new _("Unknown option "+x,_.ERR_BAD_OPTION)}}const we={assertOptions:Is,validators:Oe},H=we.validators;let G=class{constructor(u){this.defaults=u||{},this.interceptors={request:new tt,response:new tt}}async request(u,f){try{return await this._request(u,f)}catch(p){if(p instanceof Error){let v={};Error.captureStackTrace?Error.captureStackTrace(v):v=new Error;const fe=v.stack?v.stack.replace(/^.+\n/,""):"";try{p.stack?fe&&!String(p.stack).endsWith(fe.replace(/^.+\n.+\n/,""))&&(p.stack+=`
1123
+ `+fe):p.stack=fe}catch{}}throw p}}_request(u,f){typeof u=="string"?(f=f||{},f.url=u):f=u||{},f=Q(this.defaults,f);const{transitional:p,paramsSerializer:v,headers:fe}=f;p!==void 0&&we.assertOptions(p,{silentJSONParsing:H.transitional(H.boolean),forcedJSONParsing:H.transitional(H.boolean),clarifyTimeoutError:H.transitional(H.boolean)},!1),v!=null&&(l.isFunction(v)?f.paramsSerializer={serialize:v}:we.assertOptions(v,{encode:H.function,serialize:H.function},!0)),f.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?f.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:f.allowAbsoluteUrls=!0),we.assertOptions(f,{baseUrl:H.spelling("baseURL"),withXsrfToken:H.spelling("withXSRFToken")},!0),f.method=(f.method||this.defaults.method||"get").toLowerCase();let x=fe&&l.merge(fe.common,fe[f.method]);fe&&l.forEach(["delete","get","head","post","put","patch","common"],i=>{delete fe[i]}),f.headers=P.concat(x,fe);const w=[];let A=!0;this.interceptors.request.forEach(function(i){typeof i.runWhen=="function"&&i.runWhen(f)===!1||(A=A&&i.synchronous,w.unshift(i.fulfilled,i.rejected))});const c=[];this.interceptors.response.forEach(function(i){c.push(i.fulfilled,i.rejected)});let h,n=0,o;if(!A){const i=[dt.bind(this),void 0];for(i.unshift(...w),i.push(...c),o=i.length,h=Promise.resolve(f);n<o;)h=h.then(i[n++],i[n++]);return h}o=w.length;let r=f;for(;n<o;){const i=w[n++],e=w[n++];try{r=i(r)}catch(t){e.call(this,t);break}}try{h=dt.call(this,r)}catch(i){return Promise.reject(i)}for(n=0,o=c.length;n<o;)h=h.then(c[n++],c[n++]);return h}getUri(u){u=Q(this.defaults,u);const f=Bt(u.baseURL,u.url,u.allowAbsoluteUrls);return vt(f,u.params,u.paramsSerializer)}};l.forEach(["delete","get","head","options"],function(u){G.prototype[u]=function(f,p){return this.request(Q(p||{},{method:u,url:f,data:(p||{}).data}))}}),l.forEach(["post","put","patch"],function(u){function f(p){return function(v,fe,x){return this.request(Q(x||{},{method:u,headers:p?{"Content-Type":"multipart/form-data"}:{},url:v,data:fe}))}}G.prototype[u]=f(),G.prototype[u+"Form"]=f(!0)});let Ls=class Ai{constructor(f){if(typeof f!="function")throw new TypeError("executor must be a function.");let p;this.promise=new Promise(function(fe){p=fe});const v=this;this.promise.then(fe=>{if(!v._listeners)return;let x=v._listeners.length;for(;x-- >0;)v._listeners[x](fe);v._listeners=null}),this.promise.then=fe=>{let x;const w=new Promise(A=>{v.subscribe(A),x=A}).then(fe);return w.cancel=function(){v.unsubscribe(x)},w},f(function(fe,x,w){v.reason||(v.reason=new ne(fe,x,w),p(v.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(f){if(this.reason){f(this.reason);return}this._listeners?this._listeners.push(f):this._listeners=[f]}unsubscribe(f){if(!this._listeners)return;const p=this._listeners.indexOf(f);p!==-1&&this._listeners.splice(p,1)}toAbortSignal(){const f=new AbortController,p=v=>{f.abort(v)};return this.subscribe(p),f.signal.unsubscribe=()=>this.unsubscribe(p),f.signal}static source(){let f;return{token:new Ai(function(p){f=p}),cancel:f}}};function $s(u){return function(f){return u.apply(null,f)}}function Fs(u){return l.isObject(u)&&u.isAxiosError===!0}const je={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(je).forEach(([u,f])=>{je[f]=u});function Wt(u){const f=new G(u),p=At(G.prototype.request,f);return l.extend(p,G.prototype,f,{allOwnKeys:!0}),l.extend(p,f,null,{allOwnKeys:!0}),p.create=function(v){return Wt(Q(u,v))},p}const R=Wt(le);R.Axios=G,R.CanceledError=ne,R.CancelToken=Ls,R.isCancel=Dt,R.VERSION=Vt,R.toFormData=Re,R.AxiosError=_,R.Cancel=R.CanceledError,R.all=function(u){return Promise.all(u)},R.spread=$s,R.isAxiosError=Fs,R.mergeConfig=Q,R.AxiosHeaders=P,R.formToJSON=u=>Ut(l.isHTMLForm(u)?new FormData(u):u),R.getAdapter=zt.getAdapter,R.HttpStatusCode=je,R.default=R;const{Axios:Qr,AxiosError:Zr,CanceledError:Yr,isCancel:ei,CancelToken:ti,VERSION:ni,all:si,Cancel:ri,isAxiosError:ii,spread:oi,toFormData:ci,AxiosHeaders:ai,HttpStatusCode:li,formToJSON:ui,getAdapter:hi,mergeConfig:di}=R,Ve=R.create({baseURL:location.origin,timeout:6e4,params:{}});Ve.interceptors.response.use(u=>u,u=>{var f,p,v,fe,x,w,A,c,h,n,o;if(u.response){if(u.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(e){e&&OpenC3Auth.setTokens()}),u.response.config.headers["Ignore-Errors"]&&u.response.config.headers["Ignore-Errors"].includes(u.response.status.toString()))return Promise.reject(u);let r=`HTTP ${u.response.status} - `;(f=u.response)!=null&&f.statusText&&(r+=`${u.response.statusText} `),(v=(p=u.response)==null?void 0:p.config)!=null&&v.data&&(r+=`${u.response.config.data} `),(x=(fe=u.response)==null?void 0:fe.data)!=null&&x.message?r+=`${u.response.data.message}`:(A=(w=u.response)==null?void 0:w.data)!=null&&A.exception?r+=`${u.response.data.exception}`:(n=(h=(c=u.response)==null?void 0:c.data)==null?void 0:h.error)!=null&&n.message?(u.response.data.error.class&&(r+=`${u.response.data.error.class} `),r+=`${u.response.data.error.message}`):r+=`${(o=u.response)==null?void 0:o.data}`;const{$cosmosNotify:i}=window;throw i&&i.serious({title:"Network error",body:r}),u}else throw u});const me=async function(u,f,{data:p,params:v={},headers:fe,noAuth:x=!1,noScope:w=!1,onUploadProgress:A=!1}={}){if(!x){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}fe.Authorization=localStorage.openc3Token}return fe.manual=!0,!w&&!v.scope&&(v.scope=window.openc3Scope),Ve({method:u,url:f,data:p,params:v,headers:fe,onUploadProgress:A})},Ue={Accept:"application/json"},pt={...Ue,"Content-Type":"application/json"},fi={get:function(u,{params:f,headers:p=Ue,noScope:v,noAuth:fe,onUploadProgress:x}={}){return me("get",u,{params:f,headers:p,noScope:v,noAuth:fe,onUploadProgress:x})},put:function(u,{data:f,params:p,headers:v=pt,noScope:fe,noAuth:x,onUploadProgress:w}={}){return me("put",u,{data:f,params:p,headers:v,noScope:fe,noAuth:x,onUploadProgress:w})},post:function(u,{data:f,params:p,headers:v=pt,noScope:fe,noAuth:x,onUploadProgress:w}={}){return me("post",u,{data:f,params:p,headers:v,noScope:fe,noAuth:x,onUploadProgress:w})},delete:function(u,{params:f,headers:p=Ue,noScope:v,noAuth:fe,onUploadProgress:x}={}){return me("delete",u,{params:f,headers:p,noScope:v,noAuth:fe,onUploadProgress:x})}};let Ce=()=>({emit(u,...f){for(let p=this.events[u]||[],v=0,fe=p.length;v<fe;v++)p[v](...f)},events:{},on(u,f){var p;return((p=this.events)[u]||(p[u]=[])).push(f),()=>{var v;this.events[u]=(v=this.events[u])==null?void 0:v.filter(fe=>f!==fe)}}});class ue extends Error{constructor(f,p){f instanceof Error?(super(f.message),this.cause=f):super(f),this.reason=p,this.name="ReasonError"}}function Kt(u){return u?`{${Object.keys(u).sort().filter(f=>u[f]!==void 0).map(f=>{let p=JSON.stringify(u[f]);return`${JSON.stringify(f)}:${p}`}).join(",")}}`:""}class Us{constructor(f){this.channel=f,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",f=>{if(f.type==="info"){this._state||(this._state=this.stateFromInfo(f));return}this._state&&(f.type==="join"?this._state[f.id]=f.info:f.type==="leave"&&delete this._state[f.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(f=>f()),this.listeners.length=0}async join(f,p){if(!this._info)return this._info={id:f,info:p},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let f=await this.channel.perform("$presence:leave");return delete this._info,f}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let f=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(f),this._state}finally{delete this._promise}}stateFromInfo(f){return f.records.reduce((p,{id:v,info:fe})=>(p[v]=fe,p),{})}}const W=Symbol("state");class Xt{constructor(f={}){this.emitter=Ce(),this.params=Object.freeze(f),this.presence=new Us(this),this.initialConnect=!0,this[W]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Kt({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[W]}attached(f){if(this.receiver){if(this.receiver!==f)throw Error("Already connected to a different receiver");return!1}return this.receiver=f,!0}connecting(){this[W]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[W]="connected";let f=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:f})):this.emit("connect",{reconnect:!0,restored:f})}restored(){if(this.state==="connected")throw Error("Already connected");this[W]="connected";let f=!0,p=!0;this.initialConnect=!1,this.emit("connect",{reconnect:p,restored:f})}disconnected(f){this.state==="disconnected"||this.state==="closed"||(this[W]="disconnected",this.presence.reset(),this.emit("disconnect",f))}closed(f){this.state!=="closed"&&(this[W]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",f))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(f,p){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,f,p)}async send(f){return this.perform(void 0,f)}async whisper(f){try{await this.perform("$whisper",f)}catch(p){let v=this.receiver?this.receiver.logger:null;v&&v.warn("whisper failed: ",p)}}receive(f,p){this.emit("message",f,p)}on(f,p){return this.emitter.on(f,p)}once(f,p){let v=this.emitter.on(f,(...fe)=>{v(),p(...fe)});return v}emit(f,...p){return this.emitter.emit(f,...p)}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((f,p)=>{let v=[()=>delete this._pendingSubscribe];v.push(this.on("connect",()=>{v.forEach(fe=>fe()),f()})),v.push(this.on("close",fe=>{v.forEach(x=>x()),p(fe||new ue("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class We extends Xt{constructor(f,p){super(p),this.channelId=f}set channelId(f){this._channelId=f}get channelId(){return this._channelId}}D(We,"identifier","__ghost__");const Ws="$pubsub";class De extends Xt{async perform(f,p){if(f.startsWith("$"))return super.perform(f,p);throw Error("not implemented")}}D(De,"identifier",Ws);function ie(u){return pr.test(u)}const pr=/^-?[0-9]+$/;function tn(u){return mr.test(u)}const mr=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function nn(u,f){if(ie(u))return Number.isSafeInteger(Number.parseInt(u,10));const p=Number.parseFloat(u),v=String(p);if(u===v)return!0;const fe=_t(u),x=_t(v);return!!(fe===x||(f==null?void 0:f.approx)===!0&&!ie(u)&&x.length>=14&&fe.startsWith(x.substring(0,14)))}let re=function(u){return u.underflow="underflow",u.overflow="overflow",u.truncate_integer="truncate_integer",u.truncate_float="truncate_float",u}({});function gr(u){if(nn(u,{approx:!1}))return;if(ie(u))return re.truncate_integer;const f=Number.parseFloat(u);return Number.isFinite(f)?f===0?re.underflow:re.truncate_float:re.overflow}function _t(u){const{start:f,end:p}=br(u),v=u.substring(f,p),fe=v.indexOf(".");return fe===-1?v:v.substring(0,fe)+v.substring(fe+1)}function br(u){let f=0;for(u[0]==="-"&&f++;u[f]==="0"||u[f]===".";)f++;let p=u.lastIndexOf("e");for(p===-1&&(p=u.lastIndexOf("E")),p===-1&&(p=u.length);(u[p-1]==="0"||u[p-1]===".")&&p>f;)p--;return{start:f,end:p}}class yr{constructor(f){if(D(this,"isLosslessNumber",!0),!tn(f))throw new Error(`Invalid number (value: "${f}")`);this.value=f}valueOf(){const f=gr(this.value);if(f===void 0||f===re.truncate_float)return Number.parseFloat(this.value);if(ie(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${f} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function _r(u){return u&&typeof u=="object"&&u.isLosslessNumber||!1}function wr(u){return new yr(u)}function Sr(u,f){return Ke({"":u},"",u,f)}function Ke(u,f,p,v){return Array.isArray(p)?v.call(u,f,xr(p,v)):p&&typeof p=="object"&&!_r(p)?v.call(u,f,Er(p,v)):v.call(u,f,p)}function Er(u,f){for(const p of Object.keys(u)){const v=Ke(u,p,u[p],f);v!==void 0?u[p]=v:delete u[p]}return u}function xr(u,f){for(let p=0;p<u.length;p++)u[p]=Ke(u,String(p),u[p],f);return u}function Ar(u,f,p){const v=typeof p=="function"?{parseNumber:p}:p,fe=(v==null?void 0:v.parseNumber)??wr,x=(v==null?void 0:v.onDuplicateKey)??he;let w=0;const A=n();return g(A),M(),f?Sr(A,f):A;function c(){if(u.charCodeAt(w)===Nr){w++,r();const ke={};let Qe=!0;for(;w<u.length&&u.charCodeAt(w)!==St;){Qe?Qe=!1:(t(),r());const Je=w,mt=i();if(mt===void 0){b();return}r(),a();const yt=n();if(yt===void 0){U();return}if(Object.prototype.hasOwnProperty.call(ke,mt)&&!qe(yt,ke[mt])){const Qt=x({key:mt,position:Je+1,oldValue:ke[mt],newValue:yt});Qt!==void 0&&(ke[mt]=Qt)}else ke[mt]=yt}return u.charCodeAt(w)!==St&&Te(),w++,ke}}function h(){if(u.charCodeAt(w)===Pr){w++,r();const ke=[];let Qe=!0;for(;w<u.length&&u.charCodeAt(w)!==Et;){Qe?Qe=!1:t();const Je=n();m(Je),ke.push(Je)}return u.charCodeAt(w)!==Et&&de(),w++,ke}}function n(){r();const ke=i()??e()??c()??h()??o("true",!0)??o("false",!1)??o("null",null);return r(),ke}function o(ke,Qe){if(u.slice(w,w+ke.length)===ke)return w+=ke.length,Qe}function r(){for(;Rr(u.charCodeAt(w));)w++}function i(){if(u.charCodeAt(w)===Le){w++;let ke="";for(;w<u.length&&u.charCodeAt(w)!==Le;){if(u.charCodeAt(w)===kr){const Qe=u[w+1],Je=Tr[Qe];Je!==void 0?(ke+=Je,w++):Qe==="u"?ge(u.charCodeAt(w+2))&&ge(u.charCodeAt(w+3))&&ge(u.charCodeAt(w+4))&&ge(u.charCodeAt(w+5))?(ke+=String.fromCharCode(Number.parseInt(u.slice(w+2,w+6),16)),w+=5):V(w):gt(w)}else Cr(u.charCodeAt(w))?ke+=u[w]:Y(u[w]);w++}return $(),w++,ke}}function e(){const ke=w;if(u.charCodeAt(w)===xt&&(w++,O(ke)),u.charCodeAt(w)===Xe)w++;else if(Or(u.charCodeAt(w)))for(w++;be(u.charCodeAt(w));)w++;if(u.charCodeAt(w)===Dr)for(w++,O(ke);be(u.charCodeAt(w));)w++;if(u.charCodeAt(w)===zr||u.charCodeAt(w)===Hr)for(w++,(u.charCodeAt(w)===xt||u.charCodeAt(w)===vr)&&w++,O(ke);be(u.charCodeAt(w));)w++;if(w>ke)return fe(u.slice(ke,w))}function t(){if(u.charCodeAt(w)!==Ur)throw new SyntaxError(`Comma ',' expected after value ${T()}`);w++}function a(){if(u.charCodeAt(w)!==qr)throw new SyntaxError(`Colon ':' expected after property name ${T()}`);w++}function g(ke){if(ke===void 0)throw new SyntaxError(`JSON value expected ${T()}`)}function m(ke){if(ke===void 0)throw new SyntaxError(`Array item expected ${T()}`)}function M(){if(w<u.length)throw new SyntaxError(`Expected end of input ${T()}`)}function O(ke){if(!be(u.charCodeAt(w))){const Qe=u.slice(ke,w);throw new SyntaxError(`Invalid number '${Qe}', expecting a digit ${T()}`)}}function $(){if(u.charCodeAt(w)!==Le)throw new SyntaxError(`End of string '"' expected ${T()}`)}function b(){throw new SyntaxError(`Quoted object key expected ${T()}`)}function he(ke){let{key:Qe,position:Je}=ke;throw new SyntaxError(`Duplicate key '${Qe}' encountered at position ${Je}`)}function Te(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${T()}`)}function de(){throw new SyntaxError(`Array item or end of array ']' expected ${T()}`)}function Y(ke){throw new SyntaxError(`Invalid character '${ke}' ${C()}`)}function gt(ke){const Qe=u.slice(ke,ke+2);throw new SyntaxError(`Invalid escape character '${Qe}' ${C()}`)}function U(){throw new SyntaxError(`Object value expected after ':' ${C()}`)}function V(ke){const Qe=u.slice(ke,ke+6);throw new SyntaxError(`Invalid unicode character '${Qe}' ${C()}`)}function C(){return`at position ${w}`}function y(){return w<u.length?`but got '${u[w]}'`:"but reached end of input"}function T(){return`${y()} ${C()}`}}function Rr(u){return u===Ir||u===Lr||u===$r||u===Fr}function ge(u){return u>=Xe&&u<=Ge||u>=Br&&u<=Vr||u>=Mr&&u<=Jr}function be(u){return u>=Xe&&u<=Ge}function Or(u){return u>=jr&&u<=Ge}function Cr(u){return u>=32&&u<=1114111}function qe(u,f){return u===f?!0:Array.isArray(u)&&Array.isArray(f)?u.length===f.length&&u.every((p,v)=>qe(p,f[v])):wt(u)&&wt(f)?[...new Set([...Object.keys(u),...Object.keys(f)])].every(p=>qe(u[p],f[p])):!1}function wt(u){return typeof u=="object"&&u!==null}const Tr={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
1124
+ `,r:"\r",t:" "},kr=92,Nr=123,St=125,Pr=91,Et=93,Ir=32,Lr=10,$r=9,Fr=13,Le=34,vr=43,xt=45,Xe=48,jr=49,Ge=57,Ur=44,Dr=46,qr=58,Br=65,Mr=97,Hr=69,zr=101,Vr=70,Jr=102;function sn(u,f,p,v){return fe(u);function fe(c,h){if(Array.isArray(v)){const n=v.find(o=>o.test(c));if(n){const o=n.stringify(c);if(typeof o!="string"||!tn(o))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${o})`);return o}}if(typeof c=="boolean"||typeof c=="number"||typeof c=="string"||c===null||c instanceof Date||c instanceof Boolean||c instanceof Number||c instanceof String)return JSON.stringify(c);if(c!=null&&c.isLosslessNumber||typeof c=="bigint")return c.toString();if(Array.isArray(c))return x(c);if(c&&typeof c=="object")return w(c)}function x(c,h){if(c.length===0)return"[]";let n="[";for(let o=0;o<c.length;o++){const r=c[o];typeof r<"u"&&typeof r!="function"?n+=fe(r):n+="null",o<c.length-1&&(n+=",")}return n+="]",n}function w(c,h){if(typeof c.toJSON=="function")return sn(c.toJSON(),f,p,void 0);const n=Array.isArray(f)?f.map(String):Object.keys(c);if(n.length===0)return"{}";let o=!0,r="{";for(const i of n){const e=c[i];if(A(i,e)){o?o=!1:r+=",";const t=JSON.stringify(i);r+=`${t}:`,r+=fe(e)}}return r+="}",r}function A(c,h){return typeof h<"u"&&typeof h!="function"&&typeof h!="symbol"}}function Wr(u){return ie(u)&&!nn(u)?BigInt(u):parseFloat(u)}class yi{constructor(){D(this,"id",1)}async exec(f,p,v={},fe={},x=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return v.scope=window.openc3Scope,fe.manual=!0,(await Ve.post("/openc3-api/api",{jsonrpc:"2.0",method:f,params:p,id:this.id,keyword_params:v},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...fe},timeout:x,transformRequest:[(w,A)=>sn(w)],transformResponse:[w=>Ar(w,void 0,Wr)]})).data.result}catch(w){let A=new Error;throw w.response?(A.name=w.response.data.error.data.class,A.message=w.response.data.error.data.message,A.object=w.response.data.error):w.request?(A.name="Request error",A.message="Request error, no response received"):A=w,A}}decode_openc3_type(f){if(f!==null&&typeof f=="object"&&f.json_class=="Float"&&f.raw){if(f.raw=="NaN")return NaN;if(f.raw=="Infinity")return 1/0;if(f.raw=="-Infinity")return-1/0}return null}encode_openc3_type(f){return Number.isNaN(f)?{json_class:"Float",raw:"NaN"}:f==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:f==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(f=>{f&&(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(f){return this.exec("set_offline_access",[f])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(f,p,v,fe,x){return this.exec("map_target_to_interface",[f,p],{cmd_only:v,tlm_only:fe,unmap_old:x})}unmap_target_from_interface(f,p,v,fe){return this.exec("unmap_target_from_interface",[f,p],{cmd_only:v,tlm_only:fe})}connect_interface(f,...p){return p.length>0?this.exec("connect_interface",[f,...p]):this.exec("connect_interface",[f])}disconnect_interface(f){return this.exec("disconnect_interface",[f])}interface_cmd(f,p,...v){return this.exec("interface_cmd",[f,p,...v])}interface_target_enable(f,p,v=!1,fe=!1){return this.exec("interface_target_enable",[f,p],{cmd_only:v,tlm_only:fe})}interface_target_disable(f,p,v=!1,fe=!1){return this.exec("interface_target_disable",[f,p],{cmd_only:v,tlm_only:fe})}interface_details(f){return this.exec("interface_details",[f])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(f,p,v,fe,x){return this.exec("map_target_to_router",[f,p],{cmd_only:v,tlm_only:fe,unmap_old:x})}unmap_target_from_router(f,p,v,fe){return this.exec("unmap_target_from_router",[f,p],{cmd_only:v,tlm_only:fe})}connect_router(f){return this.exec("connect_router",[f])}disconnect_router(f){return this.exec("disconnect_router",[f])}router_target_enable(f,p,v=!1,fe=!1){return this.exec("router_target_enable",[f,p],{cmd_only:v,tlm_only:fe})}router_target_disable(f,p,v=!1,fe=!1){return this.exec("router_target_disable",[f,p],{cmd_only:v,tlm_only:fe})}router_details(f){return this.exec("router_details",[f])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(f){return this.exec("get_tlm_cnts",[f])}get_item(f,p,v){return this.exec("get_item",[f,p,v])}get_param(f,p,v){return this.exec("get_param",[f,p,v])}get_parameter(f,p,v){return this.exec("get_param",[f,p,v])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(f){return this.exec("set_limits_set",[f])}get_target(f){return this.exec("get_target",[f])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(f,p){return this.exec("get_tlm",[f,p])}get_telemetry(f,p){return this.exec("get_tlm",[f,p])}get_all_tlm(f){return this.exec("get_all_tlm",[f])}get_all_telemetry(f){return this.exec("get_all_tlm",[f])}get_all_tlm_names(f,p=!1){return this.exec("get_all_tlm_names",[f],{hidden:p})}get_all_telemetry_names(f){return this.exec("get_all_tlm_names",[f])}get_all_tlm_item_names(f){return this.exec("get_all_tlm_item_names",[f])}async get_tlm_packet(f,p,v,fe=30){const x=await this.exec("get_tlm_packet",[f,p],{type:v,stale_time:fe});if(x!=null){let w=x.length,A=null;for(let c=0;c<w;c++)A=this.decode_openc3_type(x[c][1]),A!==null&&(x[c][1]=A)}return x}get_packet_derived_items(f,p){return this.exec("get_packet_derived_items",[f,p])}get_tlm_buffer(f,p){return this.exec("get_tlm_buffer",[f,p])}get_tlm_available(f){return this.exec("get_tlm_available",[f])}async get_tlm_values(f,p=30,v=null,fe=null,x=null){let w={stale_time:p};v!==null&&(w.cache_timeout=v),fe!==null&&(w.start_time=fe.toISOString()),x!==null&&(w.end_time=x.toISOString());const A=await this.exec("get_tlm_values",[f],w,{},1e4);if(A&&A.length>0){let c=A[0].length,h=null;for(let n=0;n<c;n++)h=this.decode_openc3_type(A[0][n]),h!==null&&(A[0][n]=h)}return A}get_limits(f,p,v){return this.exec("get_limits",[f,p,v])}async tlm(f,p,v,fe="CONVERTED"){let x=null;if(p===void 0)x=await this.exec("tlm",[f]);else if(v===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(p))x=await this.exec("tlm",[f],{type:p});else{let A=new Error;throw A.name="TypeError",A.message=`Invalid data type ${p}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,A}else x=await this.exec("tlm",[f,p,v],{type:fe});let w=this.decode_openc3_type(x);return w!==null&&(x=w),x}async inject_tlm(f,p,v=null,fe="CONVERTED"){await this.exec("inject_tlm",[f,p,v],{type:fe})}set_tlm(f,p,v,fe){return this.exec("set_tlm",[f,p,v],{type:fe})}override_tlm(f,p,v,fe){return this.exec("override_tlm",[f,p,v],{type:fe})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(f,p,v,fe){return this.exec("normalize_tlm",[f,p,v],{type:fe})}get_all_cmds(f){return this.exec("get_all_cmds",[f])}get_all_commands(f){return this.exec("get_all_cmds",[f])}get_all_cmd_names(f,p=!1){return this.exec("get_all_cmd_names",[f],{hidden:p})}get_all_command_names(f){return this.exec("get_all_cmd_names",[f])}get_cmd(f,p){return this.exec("get_cmd",[f,p])}get_command(f,p){return this.exec("get_cmd",[f,p])}get_cmd_cnts(f){return this.exec("get_cmd_cnts",[f])}get_cmd_value(f,p,v,fe="CONVERTED"){return this.exec("get_cmd_value",[f,p,v,fe])}get_cmd_buffer(f,p){return this.exec("get_cmd_buffer",[f,p])}_cmd(f,p,v,fe,x,w={}){let A=null;for(let c in fe)Object.prototype.hasOwnProperty.call(fe,c)&&(A=this.encode_openc3_type(fe[c]),A!==null&&(fe[c]=A));return this.exec(f,[p,v,fe],w,x)}get_cmd_hazardous(f,p,v,fe={}){return p===void 0?this.exec("get_cmd_hazardous",f,{},fe):this._cmd("get_cmd_hazardous",f,p,v,fe)}cmd(f,p,v,fe={},x={}){return p===void 0?this.exec("cmd",f,x,fe):this._cmd("cmd",f,p,v,fe,x)}cmd_no_range_check(f,p,v,fe={},x={}){return p===void 0?this.exec("cmd_no_range_check",f,x,fe):this._cmd("cmd_no_range_check",f,p,v,fe,x)}cmd_raw(f,p,v,fe={},x={}){return p===void 0?this.exec("cmd_raw",f,x,fe):this._cmd("cmd_raw",f,p,v,fe,x)}cmd_raw_no_range_check(f,p,v,fe={},x={}){return p===void 0?this.exec("cmd_raw_no_range_check",f,x,fe):this._cmd("cmd_raw_no_range_check",f,p,v,fe,x)}cmd_no_hazardous_check(f,p,v,fe={},x={}){return p===void 0?this.exec("cmd_no_hazardous_check",f,x,fe):this._cmd("cmd_no_hazardous_check",f,p,v,fe,x)}cmd_no_checks(f,p,v,fe={},x={}){return p===void 0?this.exec("cmd_no_checks",f,x,fe):this._cmd("cmd_no_checks",f,p,v,fe,x)}cmd_raw_no_hazardous_check(f,p,v,fe={},x={}){return p===void 0?this.exec("cmd_raw_no_hazardous_check",f,x,fe):this._cmd("cmd_raw_no_hazardous_check",f,p,v,fe,x)}cmd_raw_no_checks(f,p,v,fe={},x={}){return p===void 0?this.exec("cmd_raw_no_checks",f,x,fe):this._cmd("cmd_raw_no_checks",f,p,v,fe,x)}build_cmd(f,p,v,fe={},x={}){return p===void 0?this.exec("build_cmd",f,x,fe):this._cmd("build_cmd",f,p,v,fe,x)}build_command(f,p,v,fe={},x={}){return p===void 0?this.exec("build_cmd",f,x,fe):this._cmd("build_cmd",f,p,v,fe,x)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(f,p){return this.exec("send_raw",[f,p])}list_configs(f){return this.exec("list_configs",[f])}load_config(f,p){return this.exec("load_config",[f,p])}save_config(f,p,v){return this.exec("save_config",[f,p,v])}delete_config(f,p){return this.exec("delete_config",[f,p])}enable_limits(f,p,v){return this.exec("enable_limits",[f,p,v])}disable_limits(f,p,v){return this.exec("disable_limits",[f,p,v])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(f){return this.exec("get_overall_limits_state",[f])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(f,p){return this.exec("get_setting",[f],p)}get_settings(f,p){return this.exec("get_settings",f,p)}set_setting(f,p){return this.exec("set_setting",[f,p])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(f,p){return this.exec("set_setting",[f,p])}get_metrics(){return this.exec("get_metrics",[])}async hashString(f){if(window.isSecureContext){const p=new TextEncoder().encode(f),v=await crypto.subtle.digest("SHA-256",p),fe=new Uint8Array(v);return Array.from(fe).map(x=>x.toString(16).padStart(2,"0")).join("")}}}const _sfc_main={components:{CriticalCmdDialog:N$1,CommandEditor:ie$1,TopBar:j$1,Openc3Screen:Ee$1},mixins:[s],data(){return{title:"Command Sender",editor:null,targetName:"",commandName:"",commandDescription:"",paramList:"",queueName:null,lastTargetName:"",lastCommandName:"",lastParamList:"",lastQueueName:null,ignoreRangeChecks:!1,statesInHex:!1,showIgnoredParams:!1,cmdRaw:!1,disableCommandValidation:!1,interfaces:[],selectedInterface:"",rawCmdFile:null,status:"",history:"",hazardousCommand:"",displaySendHazardous:!1,displayErrorDialog:!1,displaySendRaw:!1,displayCriticalCmd:!1,criticalCmdUuid:null,criticalCmdString:null,criticalCmdUser:null,sendDisabled:!1,api:null,keywords:[],screenTarget:null,screenName:null,screenDefinition:null,screenCount:0}},computed:{menus:function(){return[{label:"Mode",items:[{label:"Ignore Range Checks",checkbox:!0,checked:this.ignoreRangeChecks,command:()=>{this.ignoreRangeChecks=!this.ignoreRangeChecks}},{label:"Display State Values in Hex",checkbox:!0,checked:this.statesInHex,command:()=>{this.statesInHex=!this.statesInHex}},{label:"Show Ignored Parameters",checkbox:!0,checked:this.showIgnoredParams,command:()=>{this.showIgnoredParams=!this.showIgnoredParams,this.$refs.commandEditor.triggerUpdateCmdParams()}},{label:"Disable Parameter Conversions",checkbox:!0,checked:this.cmdRaw,command:()=>{this.cmdRaw=!this.cmdRaw.checked}},{label:"Disable Command Validation",checkbox:!0,checked:this.disableCommandValidation,command:()=>{this.disableCommandValidation=!this.disableCommandValidation}}]}]}},created(){this.api=new yi,this.$route.params.target&&this.$route.params.packet&&this.commandChanged({targetName:this.$route.params.target.toUpperCase(),packetName:this.$route.params.packet.toUpperCase()}),fi.get("/openc3-api/autocomplete/keywords/screen").then(u=>{this.keywords=u.data})},mounted(){this.editor=aceExports.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight"),this.editor.session.setMode("ace/mode/ruby"),this.editor.session.setTabSize(2),this.editor.session.setUseWrapMode(!0),this.editor.setHighlightActiveLine(!1),this.editor.setValue(localStorage.command_sender__history),this.history=this.editor.getValue().trim(),this.editor.clearSelection(),this.editor.focus(),this.editor.setAutoScrollEditorIntoView(!0),this.editor.setOption("maxLines",30),this.editor.setOption("minLines",1),this.editor.container.addEventListener("keydown",u=>{if(u.key==="Enter"){u.preventDefault();let f=this.editor.session.getLine(this.editor.getCursorPosition().row);if(f==="")return;this.queueName=null;const p=f.match(/,\s*queue[:=]\s*"([^"]+)"/);p&&(this.queueName=p[1],console.log("Queue extracted from history:",this.queueName),f=f.replace(/,\s*queue[:=]\s*"[^"]+"/,""));let v=f.indexOf('"'),fe=f.lastIndexOf('"');f=f.substr(v+1,fe-v-1),this.sendCmd(f)}})},beforeUnmount(){this.editor.destroy(),this.editor.container.remove()},methods:{convertToValue(param){if(param.val!==void 0&&param.states&&!this.cmdRaw)return Object.keys(param.states).find(u=>param.states[u].value===param.val);if(typeof param.val!="string")return param.val;let str=param.val,quotesRemoved=this.removeQuotes(str);if(str===quotesRemoved){let upcaseStr=str.toUpperCase();if((param.type==="STRING"||param.type==="BLOCK")&&upcaseStr.startsWith("0X")){let u=upcaseStr.slice(2);u.length%2!==0&&(u="0"+u);let f={json_class:"String",raw:[]};for(let p=0;p<u.length;p+=2){let v=u.charAt(p)+u.charAt(p+1);f.raw.push(parseInt(v,16))}return f}else return upcaseStr==="INFINITY"?1/0:upcaseStr==="-INFINITY"?-1/0:upcaseStr==="NAN"?NaN:this.isFloat(str)?parseFloat(str):this.isInt(str)?Number.isSafeInteger(Number(str))?parseInt(str):BigInt(str):this.isArray(str)?eval(str):str}else return quotesRemoved},commandChanged(u){(this.targetName!==u.targetName||this.commandName!==u.packetName)&&(this.targetName=u.targetName,this.commandName=u.packetName,this.updateScreenInfo(),this.targetName&&this.commandName?this.$router.replace({name:"CommandSender",params:{target:this.targetName,packet:this.commandName}}).catch(f=>{}):this.$router.replace({name:"CommandSender"}).catch(f=>{})),u.queueName!==void 0&&(this.queueName=u.queueName)},updateScreenInfo(){this.targetName&&this.commandName?this.api.get_cmd(this.targetName,this.commandName).then(u=>{if(u.screen)this.loadScreen(u.screen[0],u.screen[1]).then(f=>{this.screenTarget=u.screen[0],this.screenName=u.screen[1],this.screenDefinition=f.data,this.screenCount+=1});else{if(u.related_items){this.screenTarget="LOCAL",this.screenName="CMDSENDER";let f=`SCREEN AUTO AUTO 1.0
1125
+ `;for(const p of u.related_items)f+=`LABELVALUE '${p[0]}' '${p[1]}' '${p[2]}' WITH_UNITS 20
1126
+ `;this.screenDefinition=f}else this.screenTarget=null,this.screenName=null,this.screenDefinition=null;this.screenCount+=1}},u=>{this.displayError("getting command for screen info",u)}):(this.screenTarget=null,this.screenName=null,this.screenDefinition=null,this.screenCount+=1)},createParamList(){let u={};for(const f of this.$refs.commandEditor.getRows())u[f.parameter_name]=this.convertToValue(f);return u},buildCmd(){this.sendCmd(this.targetName,this.commandName,this.createParamList())},sendCmd(u,f,p){this.lastTargetName=u,this.lastCommandName=f,this.lastParamList=p,this.lastQueueName=this.queueName,this.sendDisabled=!0;let v=!1,fe="";this.api.get_cmd_hazardous(u,f,p).then(x=>{if(v=x,v)f===void 0?this.hazardousCommand=u.split(" ").slice(0,2).join(" "):this.hazardousCommand=`${u} ${f}`,this.displaySendHazardous=!0;else{let w,A=this.disableCommandValidation?{validate:!1}:{};this.queueName&&(A.queue=this.queueName),this.cmdRaw?this.ignoreRangeChecks?(fe="cmd_raw_no_range_check",w=this.api.cmd_raw_no_range_check(u,f,p,{"Ignore-Errors":"428"},A)):(fe="cmd_raw",w=this.api.cmd_raw(u,f,p,{"Ignore-Errors":"428 500"},A)):this.ignoreRangeChecks?(fe="cmd_no_range_check",w=this.api.cmd_no_range_check(u,f,p,{"Ignore-Errors":"428"},A)):(fe="cmd",w=this.api.cmd(u,f,p,{"Ignore-Errors":"428 500"},A)),w.then(c=>{this.processCmdResponse(!0,u,f,fe,c)},c=>{this.processCmdResponse(!1,u,f,fe,c)})}},x=>{this.processCmdResponse(!1,u,f,fe,x)})},sendHazardousCmd(){this.displaySendHazardous=!1;let u="",f="",p=this.disableCommandValidation?{validate:!1}:{};this.lastQueueName&&(p.queue=this.lastQueueName),this.cmdRaw?this.ignoreRangeChecks?(f="cmd_raw_no_range_check",u=this.api.cmd_raw_no_checks(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428"},p)):(f="cmd_raw",u=this.api.cmd_raw_no_hazardous_check(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428 500"},p)):this.ignoreRangeChecks?(f="cmd_no_range_check",u=this.api.cmd_no_checks(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428"},p)):(f="cmd",u=this.api.cmd_no_hazardous_check(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428 500"},p)),u.then(v=>{this.processCmdResponse(!0,this.lastTargetName,this.lastCommandName,f,v)},v=>{this.processCmdResponse(!1,this.lastTargetName,this.lastCommandName,f,v)})},cancelHazardousCmd(){this.displaySendHazardous=!1,this.status="Hazardous command not sent",this.sendDisabled=!1},processCmdResponse(u,f,p,v,fe){p===void 0&&([f,p]=f.split(" ").slice(0,2));let x="";if(u){x=`${v}("${fe.target_name} ${fe.cmd_name}`;let w=Object.keys(fe.cmd_params);if(w.length>0){x+=" with ";for(let c=0;c<w.length;c++){let h=w[c],n="";fe.obfuscated_items.includes(h)?n="*****":n=this.convertToString(fe.cmd_params[h]),typeof fe.cmd_params[h]=="string"&&n.charAt(0)!=="'"&&n.charAt(0)!=='"'&&(n=`'${n}'`),x+=h+" "+n,c<w.length-1&&(x+=", ")}}let A=[];if(this.lastQueueName&&(Z.getDefaultScriptingLanguage()==="python"?A.push(`queue="${this.lastQueueName}"`):A.push(`queue: "${this.lastQueueName}"`)),this.disableCommandValidation&&(Z.getDefaultScriptingLanguage()==="python"?A.push("validate=False"):A.push("validate: false")),A.length>0?x+='", '+A.join(", ")+")":x+='")',!this.history.includes(x)){let c=x;this.history.length!==0&&(c+=`
1127
+ ${this.history}`),this.editor.setValue(c),this.editor.moveCursorTo(0,0)}if(x+=" sent.",this.status.includes(x)){let c=this.status.split("sent.");if(c[1].includes("(")){let h=parseInt(c[1].substr(2,c[1].indexOf(")")-2));x=c[0]+"sent. ("+(h+1)+")"}else x+=" (2)"}this.status=x}else{let w="sending "+f+" "+p;this.displayError(w,fe,!0)}this.history=this.editor.getValue(),localStorage.command_sender__history=this.editor.getValue(),this.sendDisabled=!1},clearHistory(){this.editor.setValue(""),this.history="",localStorage.removeItem("command_sender__history")},displayError(u,f,p=!1){this.status=`Error ${u} due to ${f.name}`,f.message&&f.message!==""&&(this.status+=": ",this.status+=f.message),this.status.includes("CriticalCmdError")&&(this.status="Critical Command Queued For Approval"),p&&(f.message.includes("CriticalCmdError")?(this.criticalCmdUuid=f.object.data.instance_variables["@uuid"],this.criticalCmdString=f.object.data.instance_variables["@command"].cmd_string,this.criticalCmdUser=f.object.data.instance_variables["@command"].username,this.displayCriticalCmd=!0):this.displayErrorDialog=!0)},loadScreen(u,f){return fi.get("/openc3-api/screen/"+u+"/"+f,{headers:{Accept:"text/plain"}})},cancelRawCmd(){this.displaySendRaw=!1,this.status="Raw command not sent"}}},_hoisted_1={ref:"editor",class:"editor","data-test":"sender-history"},_hoisted_2={class:"mx-1"},_hoisted_3=["textContent"],_hoisted_4={class:"openc3-yellow"},_hoisted_5={class:"mx-1"};function _sfc_render(u,f,p,v,fe,x){const w=resolveComponent("top-bar"),A=resolveComponent("command-editor"),c=resolveComponent("v-card"),h=resolveComponent("v-col"),n=resolveComponent("v-btn"),o=resolveComponent("v-tooltip"),r=resolveComponent("v-row"),i=resolveComponent("v-card-subtitle"),e=resolveComponent("openc3-screen"),t=resolveComponent("critical-cmd-dialog"),a=resolveComponent("v-spacer"),g=resolveComponent("v-toolbar"),m=resolveComponent("v-card-text"),M=resolveComponent("v-dialog"),O=resolveComponent("v-card-actions"),$=resolveComponent("v-select");return openBlock(),createElementBlock("div",null,[createVNode(w,{menus:x.menus,title:fe.title},null,8,["menus","title"]),createVNode(A,{ref:"commandEditor","initial-target-name":u.$route.params.target,"initial-packet-name":u.$route.params.packet,"send-disabled":fe.sendDisabled,"states-in-hex":fe.statesInHex,"show-ignored-params":fe.showIgnoredParams,"cmd-raw":fe.cmdRaw,onCommandChanged:f[0]||(f[0]=b=>x.commandChanged(b)),onBuildCmd:f[1]||(f[1]=b=>x.buildCmd(b))},null,8,["initial-target-name","initial-packet-name","send-disabled","states-in-hex","show-ignored-params","cmd-raw"]),createVNode(c,{class:"pa-3"},{default:withCtx(()=>[createTextVNode("Status: "+toDisplayString(fe.status),1)]),_:1}),f[22]||(f[22]=createElementVNode("div",{style:{height:"15px"}},null,-1)),createVNode(r,{"no-gutters":""},{default:withCtx(()=>[createVNode(h,{class:"pr-4"},{default:withCtx(()=>[createVNode(c,{class:"pb-2"},{default:withCtx(()=>[createVNode(i,null,{default:withCtx(()=>[createVNode(r,null,{default:withCtx(()=>[createVNode(h,{class:"pt-6"},{default:withCtx(()=>[...f[9]||(f[9]=[createTextVNode(" Editable Command History: (Pressing Enter on the line re-executes the command) ",-1)])]),_:1}),createVNode(h,null,{default:withCtx(()=>[createVNode(o,{"open-delay":600,location:"top"},{activator:withCtx(({props:b})=>[createElementVNode("div",mergeProps(b,{class:"float-right"}),[createVNode(n,{icon:"mdi-delete-sweep",variant:"text","data-test":"clear-history",onClick:x.clearHistory},null,8,["onClick"])],16)]),default:withCtx(()=>[f[10]||(f[10]=createElementVNode("span",null," Clear History ",-1))]),_:1})]),_:1})]),_:1})]),_:1}),createVNode(r,{"no-gutters":"",class:"mt-2 mb-2"},{default:withCtx(()=>[createVNode(h,null,{default:withCtx(()=>[createElementVNode("pre",_hoisted_1,null,512)]),_:1})]),_:1})]),_:1})]),_:1}),fe.screenDefinition?(openBlock(),createBlock(h,{key:0,md:"auto"},{default:withCtx(()=>[createVNode(e,{target:fe.screenTarget,screen:fe.screenName,definition:fe.screenDefinition,keywords:fe.keywords,count:fe.screenCount,"show-close":!1},null,8,["target","screen","definition","keywords","count"])]),_:1})):createCommentVNode("",!0)]),_:1}),f[23]||(f[23]=createElementVNode("div",{style:{height:"15px"}},null,-1)),createVNode(t,{modelValue:fe.displayCriticalCmd,"onUpdate:modelValue":f[2]||(f[2]=b=>fe.displayCriticalCmd=b),uuid:fe.criticalCmdUuid,"cmd-string":fe.criticalCmdString,"cmd-user":fe.criticalCmdUser},null,8,["modelValue","uuid","cmd-string","cmd-user"]),createVNode(M,{modelValue:fe.displayErrorDialog,"onUpdate:modelValue":f[4]||(f[4]=b=>fe.displayErrorDialog=b),"max-width":"600"},{default:withCtx(()=>[createVNode(c,null,{default:withCtx(()=>[createVNode(g,{height:"24"},{default:withCtx(()=>[createVNode(a),f[11]||(f[11]=createElementVNode("span",null," Error ",-1)),createVNode(a)]),_:1}),createVNode(m,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_2,[createVNode(r,{class:"my-2"},{default:withCtx(()=>[createVNode(m,null,{default:withCtx(()=>[createElementVNode("span",{textContent:toDisplayString(fe.status)},null,8,_hoisted_3)]),_:1})]),_:1}),createVNode(r,null,{default:withCtx(()=>[createVNode(a),createVNode(n,{color:"primary","data-test":"error-dialog-ok",onClick:f[3]||(f[3]=b=>fe.displayErrorDialog=!1)},{default:withCtx(()=>[...f[12]||(f[12]=[createTextVNode(" Ok ",-1)])]),_:1})]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"]),createVNode(M,{modelValue:fe.displaySendHazardous,"onUpdate:modelValue":f[5]||(f[5]=b=>fe.displaySendHazardous=b),"max-width":"600",persistent:"",onKeydown:withKeys(x.cancelHazardousCmd,["esc"])},{default:withCtx(()=>[createVNode(c,null,{default:withCtx(()=>[createVNode(g,{height:"24"},{default:withCtx(()=>[createVNode(a),f[13]||(f[13]=createElementVNode("span",null," Hazardous Warning ",-1)),createVNode(a)]),_:1}),createVNode(m,{class:"mt-6"},{default:withCtx(()=>[createTextVNode(" Warning: Command "+toDisplayString(fe.hazardousCommand)+" is Hazardous. Send? ",1),f[14]||(f[14]=createElementVNode("br",null,null,-1)),createElementVNode("span",_hoisted_4," Description: "+toDisplayString(fe.commandDescription),1)]),_:1}),createVNode(O,{class:"px-2"},{default:withCtx(()=>[createVNode(a),createVNode(n,{variant:"outlined",onClick:x.cancelHazardousCmd},{default:withCtx(()=>[...f[15]||(f[15]=[createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),createVNode(n,{variant:"flat",onClick:x.sendHazardousCmd},{default:withCtx(()=>[...f[16]||(f[16]=[createTextVNode(" Send ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"]),createVNode(M,{modelValue:fe.displaySendRaw,"onUpdate:modelValue":f[8]||(f[8]=b=>fe.displaySendRaw=b),"max-width":"600",persistent:"",onKeydown:withKeys(x.cancelRawCmd,["esc"])},{default:withCtx(()=>[createVNode(c,null,{default:withCtx(()=>[createVNode(g,{height:"24"},{default:withCtx(()=>[createVNode(a),f[17]||(f[17]=createElementVNode("span",null," Send Raw ",-1)),createVNode(a)]),_:1}),createVNode(m,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_5,[createVNode(r,{class:"my-2"},{default:withCtx(()=>[createVNode(h,null,{default:withCtx(()=>[...f[18]||(f[18]=[createTextVNode("Interface:",-1)])]),_:1}),createVNode(h,null,{default:withCtx(()=>[createVNode($,{modelValue:fe.selectedInterface,"onUpdate:modelValue":f[6]||(f[6]=b=>fe.selectedInterface=b),variant:"solo","hide-details":"",density:"compact",items:fe.interfaces,"item-title":"label","item-value":"value"},null,8,["modelValue","items"])]),_:1})]),_:1}),createVNode(r,{"no-gutters":""},{default:withCtx(()=>[createVNode(h,null,{default:withCtx(()=>[...f[19]||(f[19]=[createTextVNode("Filename:",-1)])]),_:1}),createVNode(h,null,{default:withCtx(()=>[createElementVNode("input",{type:"file",onChange:f[7]||(f[7]=b=>u.selectRawCmdFile(b))},null,32)]),_:1})]),_:1}),createVNode(r,null,{default:withCtx(()=>[createVNode(a),createVNode(n,{variant:"outlined","data-test":"raw-cancel",onClick:x.cancelRawCmd},{default:withCtx(()=>[...f[20]||(f[20]=[createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),createVNode(n,{class:"bg-primary","data-test":"raw-ok",onClick:u.sendRawCmd},{default:withCtx(()=>[...f[21]||(f[21]=[createTextVNode(" Ok ",-1)])]),_:1},8,["onClick"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])])}const CommandSender=exports("default",_export_sfc(_sfc_main,[["render",_sfc_render],["__scopeId","data-v-ba9d74bc"]]))}}});