openc3-cosmos-tool-cmdsender 6.8.0 → 6.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. checksums.yaml +4 -4
  2. data/tools/cmdsender/ArrayWidget-DLfNWDzN-25f622d30e861b0041db.js +2 -0
  3. data/tools/cmdsender/ArrayplotWidget-CoRsUxHG-12382b56c3a62d81268d.js +1 -0
  4. data/tools/cmdsender/BarColumn-DHP-zQ4R-1f19e419c9fc0b5e2325.js +1 -0
  5. data/tools/cmdsender/BlockWidget-BmHSFvOq-ffd01fde7e072a4e1519.js +2 -0
  6. data/tools/cmdsender/{ButtonWidget-bl_mGFYh-bd3a80c50b3d01aaaff5.js → ButtonWidget-C3ZWRjZZ-3658b69c040de7f78724.js} +2 -2
  7. data/tools/cmdsender/CanvasWidget-CL-XzPF4-32f86cd2020f72ca7b55.js +1 -0
  8. data/tools/cmdsender/CanvasdotWidget-D8Y9DgVE-2e5aace28ea8c8104413.js +1 -0
  9. data/tools/cmdsender/CanvasimageWidget-DHSGK_tD-1cf702923458f84067bb.js +1 -0
  10. data/tools/cmdsender/CanvasimagevalueWidget-Btt_fQfC-f8d53e22fc85f2dca1fe.js +1 -0
  11. data/tools/cmdsender/CanvaslabelWidget-BF_8RTjv-a633541bd16ee71e9eec.js +1 -0
  12. data/tools/cmdsender/CanvaslabelvalueWidget-scbwaujI-5656f52d22b36774474d.js +1 -0
  13. data/tools/cmdsender/CanvaslineWidget-gRvm_-TT-d8b308db18b27a8177d5.js +1 -0
  14. data/tools/cmdsender/CanvaslinevalueWidget-CljziRek-38828a400e35bd685f09.js +1 -0
  15. data/tools/cmdsender/CheckbuttonWidget-BOabI_jE-7de4a680244044506436.js +1 -0
  16. data/tools/cmdsender/ComboboxWidget-BLXNYFiY-4203a77617e41e26f45d.js +1 -0
  17. data/tools/cmdsender/CommandSender-c2c3cbce87aa148e34be.js +1127 -0
  18. data/tools/cmdsender/CriticalCmdDialog-CnNlsHRX-eb2ff0eba1fe61b10098.js +1 -0
  19. data/tools/cmdsender/DateWidget-BTqLCtLS-5aca2baf2e497848a8f8.js +1 -0
  20. data/tools/cmdsender/DetailsDialog-BNCS3QAe-5f07bef4b1e4ad85fd6e.js +1 -0
  21. data/tools/cmdsender/DynamicWidget-CfMtj7H8-ebe9b82dc117c61e0170.js +1 -0
  22. data/tools/cmdsender/FormatvalueWidget-CLYx8qbg-8c7ed74d03fa7f37496b.js +1 -0
  23. data/tools/cmdsender/Graph-BliBYJxD-9bf510fe38f721a89a17.js +1 -0
  24. data/tools/cmdsender/GraphWidget-Cb6Ozf54-1cec3756ce292f5991ab.js +1 -0
  25. data/tools/cmdsender/HorizontalWidget-AY2M01qP-ea2249ce225a09e47b49.js +1 -0
  26. data/tools/cmdsender/HorizontalboxWidget-2MEKvq_C-a10be2e674ec68ae792b.js +1 -0
  27. data/tools/cmdsender/HorizontallineWidget-DgpOPA7q-4d288700a7e7536f1bc0.js +1 -0
  28. data/tools/cmdsender/IframeWidget-UKKUl7k5-be906eb76f2b0d670672.js +1 -0
  29. data/tools/cmdsender/ImageLoader-C-CIL4YD-1e5f8ca87354a669df68.js +1 -0
  30. data/tools/cmdsender/ImageviewerWidget-DhuQH5Io-aa4a8a3e53ccf85fb1b5.js +1 -0
  31. data/tools/cmdsender/LabelWidget-SO9zqcNN-c2936922e4207b83f9b2.js +1 -0
  32. data/tools/cmdsender/LabelledWidget-DWoM5AJ5-2578fd12945fe3ace33e.js +1 -0
  33. data/tools/cmdsender/LabelprogressbarWidget-D3vnkvQZ-ed8368d506db7914cea4.js +1 -0
  34. data/tools/cmdsender/LabelsparklineWidget-DO0T-Jot-e66eb13e86cd18eee2b5.js +1 -0
  35. data/tools/cmdsender/LabelvalueWidget-B6BbNFnk-4971efbad7da88e9579a.js +1 -0
  36. data/tools/cmdsender/LabelvaluedescWidget-CxfL-H9C-c83400ba9bf86aa3541d.js +1 -0
  37. data/tools/cmdsender/LabelvaluelimitsbarWidget-BT5k9mHv-9f5a61501af1065377bf.js +1 -0
  38. data/tools/cmdsender/LabelvaluelimitscolumnWidget-DUbmxh4p-5091d99f17474b41b98e.js +1 -0
  39. data/tools/cmdsender/LabelvaluerangebarWidget-DexAc2UB-77a8434e333fd67f39fa.js +1 -0
  40. data/tools/cmdsender/Layout-Dd6dRf3R-9fa9e9eee9d4990a312e.js +1 -0
  41. data/tools/cmdsender/LedWidget-D1RwHb_V-255d306e006a21235592.js +1 -0
  42. data/tools/cmdsender/LimitsbarWidget-ClOmoV50-da09cec359cfaf0f211f.js +1 -0
  43. data/tools/cmdsender/LimitscolorWidget-CBUoEYKp-932a625ff9c092bd86a8.js +1 -0
  44. data/tools/cmdsender/LimitscolumnWidget-hsHkmY-_-7bac75e133a678b23f1b.js +1 -0
  45. data/tools/cmdsender/LinegraphWidget-CXrKtxOo-cf44e3fe8eed6c318881.js +1 -0
  46. data/tools/cmdsender/MatrixbycolumnsWidget-CsogVU9c-4631712b82dddedc6941.js +1 -0
  47. data/tools/cmdsender/ProgressbarWidget-CO6CEkxP-2ce1771a4846e8a8cf08.js +1 -0
  48. data/tools/cmdsender/RadiobuttonWidget-DrxUclws-770a5f3146efc5032d1b.js +1 -0
  49. data/tools/cmdsender/RadiogroupWidget-DN9C38cg-31cf51aa52ffefd66050.js +1 -0
  50. data/tools/cmdsender/RangebarWidget-5uQTfLMP-7e60c76a2eca0bb75f66.js +1 -0
  51. data/tools/cmdsender/RollupWidget-B0DCULnu-0fd5fadba6c3b796088d.js +1 -0
  52. data/tools/cmdsender/ScrollwindowWidget-BOkZQgtf-3761cd2de16927753fc7.js +1 -0
  53. data/tools/cmdsender/SignalWidget-Cis0Xkea-587dda7c83764be27649.js +1 -0
  54. data/tools/cmdsender/SpacerWidget-CLcqC2Qk-6d8937921d404243eed5.js +1 -0
  55. data/tools/cmdsender/SparklineWidget-CTp83eZ--b86ab4fcd1195736406d.js +1 -0
  56. data/tools/cmdsender/TabbookWidget-uucd-zsX-40158b55e179635f1f12.js +1 -0
  57. data/tools/cmdsender/TargetPacketItemChooser-CXpSx-eA-c0e56e3b26de57ba3ae6.js +1 -0
  58. data/tools/cmdsender/TextboxWidget-C2n38ti5-39b2e9a3da26cecfa990.js +1 -0
  59. data/tools/cmdsender/TextfieldWidget--HTv9ddk-bd20ecc02fad7ae1272a.js +1 -0
  60. data/tools/cmdsender/TimeWidget-CPNVZaUM-1a556d4ad81c0931627a.js +1 -0
  61. data/tools/cmdsender/TitleWidget-Cp0cb6V8-1e935d9763456a67e665.js +1 -0
  62. data/tools/cmdsender/VWidget-DQGJRgAk-e85a66609662da5278e5.js +1 -0
  63. data/tools/cmdsender/ValueWidget-Bk1RFjks-36377dfb44f88d58fef7.js +1 -0
  64. data/tools/cmdsender/ValuelimitsbarWidget-C0HIBYh2-425663e1934f79f395b0.js +1 -0
  65. data/tools/cmdsender/ValuelimitscolumnWidget-BTT90uyX-d981d2f17fd5678449c0.js +1 -0
  66. data/tools/cmdsender/ValuerangebarWidget-CcQw_XK9-6eae3666d09e61ab6e7b.js +1 -0
  67. data/tools/cmdsender/VerticalWidget-CNtFQv3R-f75db01ef87079daca16.js +1 -0
  68. data/tools/cmdsender/VerticalboxWidget-Yxmz1SnU-ab8d172c30511e4200b8.js +1 -0
  69. data/tools/cmdsender/Widget-LsyjS7ZS-8214468518010a07cb13.js +1 -0
  70. data/tools/cmdsender/main-7e8c04b151ea937bf64e.js +1505 -0
  71. data/tools/cmdsender/main.js +1 -1
  72. metadata +71 -68
  73. data/tools/cmdsender/ArrayWidget-j3ncPuPx-f939b74328291df8a5de.js +0 -2
  74. data/tools/cmdsender/ArrayplotWidget-DuLaiGa9-4e423aca38f960d26373.js +0 -1
  75. data/tools/cmdsender/BarColumn-BWJ0Dd4O-4c5640abb9625004d209.js +0 -1
  76. data/tools/cmdsender/BlockWidget-Bf5Dd6Cr-ef35d651764a1f1ded69.js +0 -2
  77. data/tools/cmdsender/CanvasWidget-boDemgx1-c68ac68b01e5a84f0579.js +0 -1
  78. data/tools/cmdsender/CanvasdotWidget-BZBbJcER-f8666166dd26f9b4d0c2.js +0 -1
  79. data/tools/cmdsender/CanvasimageWidget-6ywvT5jd-b960807789b9dcbcc50d.js +0 -1
  80. data/tools/cmdsender/CanvasimagevalueWidget-DjWrA3gX-4074ee5ef0a41f17fddd.js +0 -1
  81. data/tools/cmdsender/CanvaslabelWidget-Bq4V2BQh-78092fbf686162916c1c.js +0 -1
  82. data/tools/cmdsender/CanvaslabelvalueWidget-C8oNcFLi-828de5416d4d6f2f1b68.js +0 -1
  83. data/tools/cmdsender/CanvaslineWidget-nvbL2GoL-c71cc643a6024963a623.js +0 -1
  84. data/tools/cmdsender/CanvaslinevalueWidget-ZACQedKx-6223a4707f27190d998d.js +0 -1
  85. data/tools/cmdsender/CheckbuttonWidget-B82UE8AB-8935020f16d81e86bd39.js +0 -1
  86. data/tools/cmdsender/ComboboxWidget-4OFiSkI6-f0b1e8f3e0b734cb6ad2.js +0 -1
  87. data/tools/cmdsender/CommandSender-c37075627710fdc475ce.js +0 -1127
  88. data/tools/cmdsender/CriticalCmdDialog-FhXDdBn4-5e2871bb9b2ad6ada180.js +0 -1
  89. data/tools/cmdsender/DateWidget-BmwtdirF-c478451d8a9912180a30.js +0 -1
  90. data/tools/cmdsender/DynamicWidget-CfMtj7H8-3b839f85b196e9521a5d.js +0 -1
  91. data/tools/cmdsender/FormatvalueWidget-C8exC3bj-6fc3fa6fb5d3bdeed5f4.js +0 -1
  92. data/tools/cmdsender/GraphWidget-CvzxZYVx-c753dae2d338f42d662c.js +0 -1
  93. data/tools/cmdsender/HorizontalWidget-Ck151zVw-5a9b2cfd6856a7e967b5.js +0 -1
  94. data/tools/cmdsender/HorizontalboxWidget-D3P-cl9V-a538d5bea21494d86a8c.js +0 -1
  95. data/tools/cmdsender/HorizontallineWidget-BE1TjPU8-60179ab7246a142d636c.js +0 -1
  96. data/tools/cmdsender/IframeWidget-BgJCgues-8d275c3925dcaef036ce.js +0 -1
  97. data/tools/cmdsender/ImageLoader-CWn-PLOk-4303aade4f81fd3dfaff.js +0 -1
  98. data/tools/cmdsender/ImageviewerWidget-BlhFZD2f-2f0d71645905d2247b85.js +0 -1
  99. data/tools/cmdsender/LabelWidget-Cwosk4x2-e46f4721f9bfa9b4c642.js +0 -1
  100. data/tools/cmdsender/LabelledWidget-Dl6rAFTQ-326ebac7e9b44c786d55.js +0 -1
  101. data/tools/cmdsender/LabelprogressbarWidget-MuAKesOz-153e98b717f1bb0940e1.js +0 -1
  102. data/tools/cmdsender/LabelsparklineWidget-6LA6Ox3d-126f70696b7ab46a0ca2.js +0 -1
  103. data/tools/cmdsender/LabelvalueWidget-BxAXx-Tf-d87d776b4ee0a755f336.js +0 -1
  104. data/tools/cmdsender/LabelvaluedescWidget-Dwwlnd1g-f01d9e2309195df7c3d0.js +0 -1
  105. data/tools/cmdsender/LabelvaluelimitsbarWidget-Dv8Qk8kK-5fd8eb8da41cf4aa3a95.js +0 -1
  106. data/tools/cmdsender/LabelvaluelimitscolumnWidget-D-_gl6fq-fcc6b42a9b4c29e45e73.js +0 -1
  107. data/tools/cmdsender/LabelvaluerangebarWidget-B3MKT-3Y-a0b64358b0a0958b27fa.js +0 -1
  108. data/tools/cmdsender/Layout-Bkb6VP3e-ebc8fdb14d3b2a3b8fbb.js +0 -1
  109. data/tools/cmdsender/LedWidget-DOuDD8LI-6667a8c3e33737fc95ba.js +0 -1
  110. data/tools/cmdsender/LimitsbarWidget-D1U6SvVL-296c2641a79d9f3cfdbc.js +0 -1
  111. data/tools/cmdsender/LimitscolorWidget-iSMGusqt-864314d19d55c8c4b11a.js +0 -1
  112. data/tools/cmdsender/LimitscolumnWidget-DjxZTt_r-375bbc8160586a53a650.js +0 -1
  113. data/tools/cmdsender/LinegraphWidget-BHKU6zlT-f5a67e90280ecd56e5ff.js +0 -1
  114. data/tools/cmdsender/MatrixbycolumnsWidget-BKO-A2QD-c0d993dadda5d555c9d5.js +0 -1
  115. data/tools/cmdsender/ProgressbarWidget-fbr2qu_N-c63c1c8aad560c8fe9f0.js +0 -1
  116. data/tools/cmdsender/RadiobuttonWidget-DL08zcQT-9a53a941e6fe248a6a8b.js +0 -1
  117. data/tools/cmdsender/RadiogroupWidget-DW9Xpj3c-734245b32d66bdcb0e2a.js +0 -1
  118. data/tools/cmdsender/RangebarWidget-o9q55kjc-b7b0a515ecb909587048.js +0 -1
  119. data/tools/cmdsender/RollupWidget-BHnjj-DF-d5e7f79088ae2defdd32.js +0 -1
  120. data/tools/cmdsender/ScrollwindowWidget-D-QVwztC-296dc5d83bd09c2f7e9b.js +0 -1
  121. data/tools/cmdsender/SignalWidget-CsWuufdx-fcd5aa4329eda73bbc19.js +0 -1
  122. data/tools/cmdsender/SpacerWidget-Di9-qunj-434c8dec966d53c43547.js +0 -1
  123. data/tools/cmdsender/SparklineWidget-B6-zhdPW-f70171404709364118de.js +0 -1
  124. data/tools/cmdsender/TabbookWidget-B1E1_mzA-d5c8d4af992caa015879.js +0 -1
  125. data/tools/cmdsender/TextboxWidget-CBVEXPw_-4ccfa794fc27e17c41e9.js +0 -1
  126. data/tools/cmdsender/TextfieldWidget-DZMHrtQa-cdcf0c0cd90b83a89cd4.js +0 -1
  127. data/tools/cmdsender/TimeWidget-K4MNmJ7J-4ac9a34c4cb89a628f1e.js +0 -1
  128. data/tools/cmdsender/TitleWidget-8IcwweFE-2d09ac632c6319281e1e.js +0 -1
  129. data/tools/cmdsender/VWidget-CoIgX3hM-2a96bb926a22082ef66f.js +0 -1
  130. data/tools/cmdsender/ValueWidget-BvT1ASar-569bf4ee3a869b3a983c.js +0 -1
  131. data/tools/cmdsender/ValuelimitsbarWidget-C5lBnUmB-a57a4387edcb9e00239f.js +0 -1
  132. data/tools/cmdsender/ValuelimitscolumnWidget-DHYI0WBL-9bdaf843078c6c366a0a.js +0 -1
  133. data/tools/cmdsender/ValuerangebarWidget-BSszZhlE-9720c31cb31b04465293.js +0 -1
  134. data/tools/cmdsender/VerticalWidget-1GhgYrC3-2861b7292deac636c9ce.js +0 -1
  135. data/tools/cmdsender/VerticalboxWidget-DYHJqEzd-fbaceb71491dd8a6da8e.js +0 -1
  136. data/tools/cmdsender/Widget-B8t93Oid-343384cb6cc88aad60ee.js +0 -1
  137. data/tools/cmdsender/main-fa50ec9d093e7c784e06.js +0 -1504
@@ -0,0 +1,1127 @@
1
+ System.register(["./main-7e8c04b151ea937bf64e.js","vue","./TargetPacketItemChooser-CXpSx-eA-c0e56e3b26de57ba3ae6.js","./DetailsDialog-BNCS3QAe-5f07bef4b1e4ad85fd6e.js","./CriticalCmdDialog-CnNlsHRX-eb2ff0eba1fe61b10098.js","single-spa","vue-router","vuex","vuetify"],function(exports,module){"use strict";var d,zA,NA,WA,PA,Rk,wA,_export_sfc,resolveComponent,createBlock,openBlock,Teleport,createVNode,withCtx,createElementVNode,toDisplayString,createElementBlock,Fragment,renderList,createTextVNode,mergeProps,createSlots,createCommentVNode,normalizeStyle,withDirectives,vShow,normalizeProps,guardReactiveProps,withModifiers,renderSlot,normalizeClass,E$1,P,N$1;return{setters:[h=>{d=h.d,zA=h.z,NA=h.N,WA=h.W,PA=h.P,Rk=h.R,wA=h.w,_export_sfc=h._},h=>{resolveComponent=h.resolveComponent,createBlock=h.createBlock,openBlock=h.openBlock,Teleport=h.Teleport,createVNode=h.createVNode,withCtx=h.withCtx,createElementVNode=h.createElementVNode,toDisplayString=h.toDisplayString,createElementBlock=h.createElementBlock,Fragment=h.Fragment,renderList=h.renderList,createTextVNode=h.createTextVNode,mergeProps=h.mergeProps,createSlots=h.createSlots,createCommentVNode=h.createCommentVNode,normalizeStyle=h.normalizeStyle,withDirectives=h.withDirectives,vShow=h.vShow,normalizeProps=h.normalizeProps,guardReactiveProps=h.guardReactiveProps,withModifiers=h.withModifiers,renderSlot=h.renderSlot,normalizeClass=h.normalizeClass},h=>{E$1=h.E},h=>{P=h.P},h=>{N$1=h.N},null,null,null,null],execute:function(){var __vite_style__=document.createElement("style");__vite_style__.textContent=`.editor[data-v-294af678]{margin-left:30px;height:50px;width:95%;position:relative;font-size:16px}
2
+ /*$vite$:1*/`,document.head.appendChild(__vite_style__);const I$1="openc3-ace-vim-mode-enabled",E="ace/keyboard/vim",K$2="openc3-ace-default-scripting-language",Z={isVimModeEnabled(){return localStorage.getItem(I$1)==="true"},setVimMode(h){localStorage.setItem(I$1,JSON.stringify(!!h))},toggleVimMode(h){this.isVimModeEnabled()?(h.setKeyboardHandler(null),this.setVimMode(!1)):(h.setKeyboardHandler(E),this.setVimMode(!0)),h.focus()},applyVimModeIfEnabled(h,{saveFn:u}={}){this.isVimModeEnabled()?(h.setKeyboardHandler(E),ace.config.loadModule(E,f=>{f.CodeMirror.Vim.defineEx("write","w",g=>{typeof u=="function"?u():g.ace.execCommand("save")})})):h.setKeyboardHandler(null)},getDefaultScriptingLanguage(){return localStorage.getItem(K$2)||"python"},setDefaultScriptingLanguage(h){(h==="ruby"||h==="python")&&localStorage.setItem(K$2,h)}},z$2={props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(h){return h.replaceAll(" ","-").toLowerCase()},subMenuClick(h){h.command(h),this.$refs.topmenu[0].isActive=!1}},mounted(){document.title=this.title}},F={class:"app-title mr-2"};function J$1(h,u,f,g,ue,A){const S=resolveComponent("v-col"),x=resolveComponent("v-row"),c=resolveComponent("v-icon"),p=resolveComponent("v-btn"),t=resolveComponent("v-divider"),o=resolveComponent("v-list-item-title"),r=resolveComponent("v-list-item"),n=resolveComponent("v-list"),e=resolveComponent("v-menu"),i=resolveComponent("v-radio"),a=resolveComponent("v-list-item-action"),m=resolveComponent("v-radio-group"),v=resolveComponent("v-checkbox");return openBlock(),createBlock(Teleport,{to:"#openc3-menu"},[createVNode(x,{"no-gutters":""},{default:withCtx(()=>[createVNode(S,{"align-self":"end"},{default:withCtx(()=>[createElementVNode("span",F,toDisplayString(f.title),1)]),_:1})]),_:1}),createVNode(x,{dense:"",class:"flex-nowrap"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(f.menus,(k,M)=>(openBlock(),createBlock(e,{ref_for:!0,ref:"topmenu",key:M},{activator:withCtx(({props:C})=>[createVNode(p,mergeProps({ref_for:!0},C,{variant:"outlined",class:"mx-1 menu-button",text:k.label,"data-test":A.formatDT(`${f.title} ${k.label}`)}),{append:withCtx(()=>[createVNode(c,{class:"menu-button-icon"},{default:withCtx(()=>[...u[0]||(u[0]=[createTextVNode(" mdi-menu-down ",-1)])]),_:1})]),_:1},16,["text","data-test"])]),default:withCtx(()=>[createVNode(n,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(k.items,(C,b)=>(openBlock(),createElementBlock(Fragment,null,[C.divider?(openBlock(),createBlock(t,{key:b+"-divider"})):C.subMenu&&C.subMenu.length>0?(openBlock(),createElementBlock("div",{key:b+"-submenu"},[(openBlock(),createBlock(e,{"open-on-hover":"",location:"right",key:b},{activator:withCtx(({props:he})=>[(openBlock(),createBlock(r,mergeProps({ref_for:!0},he,{disabled:C.disabled,key:b}),createSlots({append:withCtx(()=>[createVNode(c,null,{default:withCtx(()=>[...u[1]||(u[1]=[createTextVNode(" mdi-chevron-right ",-1)])]),_:1})]),default:withCtx(()=>[!C.radio&&!C.checkbox?(openBlock(),createBlock(o,{key:0,style:normalizeStyle("cursor: pointer;"+(C.disabled?"opacity: 0.2":""))},{default:withCtx(()=>[createTextVNode(toDisplayString(C.label),1)]),_:2},1032,["style"])):createCommentVNode("",!0)]),_:2},[C.icon?{name:"prepend",fn:withCtx(()=>[createVNode(c,{disabled:C.disabled},{default:withCtx(()=>[createTextVNode(toDisplayString(C.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:withCtx(()=>[createVNode(n,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(C.subMenu,(he,Ce)=>(openBlock(),createBlock(r,{key:Ce,"prepend-icon":he.icon,onClick:X=>A.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))])):C.radioGroup?(openBlock(),createBlock(m,{"model-value":C.value,"onUpdate:modelValue":C.command,key:b+"-radio-group","hide-details":"",density:"compact",class:"ma-0 pa-0"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(C.choices,(he,Ce)=>(openBlock(),createBlock(r,{key:Ce+"-choice"},{default:withCtx(()=>[createVNode(a,{class:"list-action"},{default:withCtx(()=>[createVNode(i,{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=>C.command(C),disabled:C.disabled,"data-test":A.formatDT(`${f.title} ${k.label} ${C.label}`),key:b+"-list"},createSlots({default:withCtx(()=>[C.checkbox?(openBlock(),createBlock(a,{key:0,class:"list-action"},{default:withCtx(()=>[createVNode(v,{modelValue:C.checked,"onUpdate:modelValue":he=>C.checked=he,label:C.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):createCommentVNode("",!0),!C.radio&&!C.checkbox?(openBlock(),createBlock(o,{key:1,style:normalizeStyle("cursor: pointer;"+(C.disabled?"opacity: 0.2":""))},{default:withCtx(()=>[createTextVNode(toDisplayString(C.label),1)]),_:2},1032,["style"])):createCommentVNode("",!0)]),_:2},[C.icon?{name:"prepend",fn:withCtx(()=>[createVNode(c,{icon:C.icon,disabled:C.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["onClick","disabled","data-test"]))],64))),256))]),_:2},1024)]),_:2},1024))),128))]),_:1})])}const j$1=d(z$2,[["render",J$1],["__scopeId","data-v-4d454b93"]]);class Q{constructor(){NA.get("/openc3-api/autocomplete/data/screen").then(u=>{this.autocompleteData=u.data}),this.api=new WA}async getCompletions(u,f,g,ue,A){let S=f.getLine(g.row).slice(0,g.column).trimStart().split(/ (?![^<]*>)/),x=this.autocompleteData;S.length>1&&(x=x.find(t=>t.caption===S[0]));let c={},p=!0;if(x&&x.params){x.params.length==S.length-1&&(p=!1);let t=x.params[S.length-2];if(t["Target name"])x=(await this.api.get_target_names()).reduce((o,r)=>(o[r]=1,o),{});else if(t["Packet name"]){let o=S[S.length-2];x=(await this.api.get_all_tlm(o)).reduce((r,n)=>(r[n.packet_name]=n.description,r),{})}else if(t["Item name"]){let o=S[S.length-3],r=S[S.length-2];x=(await this.api.get_tlm(o,r)).items.reduce((n,e)=>(n[e.name]=e.description,n),{})}else x=t;c=Object.keys(x||{}).map(o=>{let r={value:o+(p?" ":""),command:p&&"startAutocomplete"};return typeof x[o]=="string"&&(r.meta=x[o]),r})}else c=x;A(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 h=new Set,u=[];const f=this.errors.toSorted((g,ue)=>g.lineNumber-ue.lineNumber);for(const g of f){let ue=`At ${g.lineNumber}: (${g.line}) ${g.message}.`;g.usage&&(ue+=` Usage: ${g.usage}`),u.push(ue),h.add(g.message)}return u}return[]},show:{get(){return this.modelValue},set(h){this.$emit("update:modelValue",h)}}},mounted:function(){this.editor=wA.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight");const h=this.buildScreenMode();this.editor.session.setMode(new h),this.editor.session.setTabSize(2),this.editor.session.setUseWrapMode(!0),this.editor.$blockScrolling=1/0,this.editor.setOption("enableBasicAutocompletion",!0),this.editor.setOption("enableLiveAutocompletion",!0),this.editor.completers=[new Q],this.editor.setHighlightActiveLine(!1),this.editor.setValue(this.definition),this.editor.clearSelection(),Z.applyVimModeIfEnabled(this.editor),this.editor.focus()},beforeUnmount(){this.editor.destroy(),this.editor.container.remove()},methods:{toggleVimMode:function(){Z.toggleVimMode(this.editor)},showContextMenu:function(h){this.menuX=h.pageX,this.menuY=h.pageY;let u=this.editor.getCursorPosition(),f=this.editor.session.getTokenAt(u.row,u.column);if(f){let g=f.value.trim();g.includes(" ")?this.docsKeyword=g.split(" ")[0]:this.docsKeyword=g,this.contextMenu=!0}},openDocumentation(){window.open(`${window.location.origin}/tools/staticdocs/docs/configuration/telemetry-screens#${this.docsKeyword.toLowerCase()}`,"_blank")},buildScreenMode(){let h=wA.require("ace/lib/oop"),u=wA.require("ace/mode/text_highlight_rules").TextHighlightRules,f=this.keywords.join("|"),g=function(){this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"\\b\\d+(?:\\.\\d+)?\\b"},{token:"keyword",regex:new RegExp(`^\\s*(${f})\\b`)}]},this.normalizeRules()};h.inherits(g,u);let ue=function(){this.HighlightRules=g},A=wA.require("ace/mode/text").Mode;return h.inherits(ue,A),(function(){this.$id="ace/mode/openc3"}).call(ue.prototype),ue},downloadScreen:function(){const h=new Blob([this.editor.getValue()],{type:"text/plain"}),u=document.createElement("a");u.href=URL.createObjectURL(h),u.setAttribute("download",`${this.screen.toLowerCase()}.txt`),u.click()},loadFile:function(){const h=new FileReader;h.readAsText(this.file);const u=this;h.onload=function(){u.editor.setValue(h.result),u.file=null}},deleteScreen:function(){this.$dialog.confirm("Are you sure you want to delete this screen?!",{okText:"Delete",cancelText:"Cancel"}).then(h=>{this.$emit("delete")})}}},te$1=["textContent"];function ne$1(h,u,f,g,ue,A){const S=resolveComponent("v-btn"),x=resolveComponent("v-spacer"),c=resolveComponent("v-toolbar"),p=resolveComponent("v-row"),t=resolveComponent("v-file-input"),o=resolveComponent("v-list-item-title"),r=resolveComponent("v-list-item"),n=resolveComponent("v-divider"),e=resolveComponent("v-list"),i=resolveComponent("v-menu"),a=resolveComponent("v-card-text"),m=resolveComponent("v-card"),v=resolveComponent("v-dialog");return openBlock(),createBlock(v,{modelValue:A.show,"onUpdate:modelValue":u[5]||(u[5]=k=>A.show=k),persistent:"",width:"75vw"},{default:withCtx(()=>[createVNode(m,null,{default:withCtx(()=>[createVNode(c,{height:"24"},{default:withCtx(()=>[createVNode(S,{class:"mx-2",icon:"mdi-delete",variant:"text",density:"compact","data-test":"delete-screen-icon",onClick:A.deleteScreen},null,8,["onClick"]),createVNode(x),createElementVNode("span",null," Edit Screen: "+toDisplayString(f.target)+" "+toDisplayString(f.screen),1),createVNode(x),createVNode(S,{class:"mx-2",icon:"mdi-download",variant:"text",density:"compact","data-test":"download-screen-icon",onClick:A.downloadScreen},null,8,["onClick"])]),_:1}),createVNode(a,{style:{"max-height":"90vh"}},{default:withCtx(()=>[createVNode(p,{class:"mt-3"},{default:withCtx(()=>[...u[6]||(u[6]=[createTextVNode(" Upload a screen file. ",-1)])]),_:1}),createVNode(p,{"no-gutters":"",align:"center"},{default:withCtx(()=>[createVNode(S,{disabled:!ue.file,color:"primary",class:"mr-3","data-test":"edit-screen-load",onClick:A.loadFile},{default:withCtx(()=>[...u[7]||(u[7]=[createTextVNode(" Load ",-1)])]),_:1},8,["disabled","onClick"]),createVNode(t,{modelValue:ue.file,"onUpdate:modelValue":u[0]||(u[0]=k=>ue.file=k),"truncate-length":"15",accept:".txt",label:"Click to select .txt screen file."},null,8,["modelValue"])]),_:1}),createVNode(p,{class:"mb-2"},{default:withCtx(()=>[...u[8]||(u[8]=[createTextVNode(" Edit the screen definition. ",-1)])]),_:1}),createVNode(p,{class:"mb-2"},{default:withCtx(()=>[createElementVNode("pre",{ref:"editor",class:"editor",onContextmenu:u[1]||(u[1]=withModifiers((...k)=>A.showContextMenu&&A.showContextMenu(...k),["prevent"]))},null,544),createVNode(i,{modelValue:ue.contextMenu,"onUpdate:modelValue":u[2]||(u[2]=k=>ue.contextMenu=k),target:[ue.menuX,ue.menuY]},{default:withCtx(()=>[createVNode(e,null,{default:withCtx(()=>[createVNode(r,{link:""},{default:withCtx(()=>[createVNode(o,{onClick:A.openDocumentation},{default:withCtx(()=>[createTextVNode(toDisplayString(ue.docsKeyword)+" documentation ",1)]),_:1},8,["onClick"])]),_:1}),createVNode(n),createVNode(r,{title:"Toggle Vim mode","prepend-icon":"extras:vim",onClick:A.toggleVimMode},null,8,["onClick"])]),_:1})]),_:1},8,["modelValue","target"])]),_:1}),createVNode(p,{style:{"max-height":"120px","overflow-y":"auto"}},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(A.editErrors,(k,M)=>(openBlock(),createElementBlock("div",{key:M},[createElementVNode("span",{class:"text-red",textContent:toDisplayString(k)},null,8,te$1)]))),128))]),_:1}),createVNode(p,{class:"mt-5"},{default:withCtx(()=>[u[11]||(u[11]=createElementVNode("span",null," Ctrl-space brings up autocomplete. Right click keywords for documentation. ",-1)),createVNode(x),createVNode(S,{class:"mx-2",variant:"outlined","data-test":"edit-screen-cancel",onClick:u[3]||(u[3]=k=>h.$emit("cancel"))},{default:withCtx(()=>[...u[9]||(u[9]=[createTextVNode(" Cancel ",-1)])]),_:1}),createVNode(S,{class:"mx-2",color:"primary","data-test":"edit-screen-save",onClick:u[4]||(u[4]=k=>h.$emit("save",h.editor.getValue()))},{default:withCtx(()=>[...u[10]||(u[10]=[createTextVNode(" Save ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const ie$2=d(ee$1,[["render",ne$1],["__scopeId","data-v-65b25a74"]]),W$1=20,ye$1={components:{EditScreenDialog:ie$2},mixins:[zA],props:{target:{type:String,default:""},screen:{type:String,default:""},definition:{type:String,default:""},keywords:{type:Array,default:()=>[]},initialFloated:{type:Boolean,default:!1},initialTop:{type:Number,default:0},initialLeft:{type:Number,default:0},initialZ:{type:Number,default:0},minZ:{type:Number,default:0},fixFloated:{type:Boolean,default:!1},count:{type:Number,default:0},showClose:{type:Boolean,default:!0},timeZone:{type:String,default:"local"},inline:{type:Boolean,default:!1},playbackMode:{type:String,default:"realtime"},playbackDateTime:{type:Date,default:null}},emits:["close-screen","delete-screen","drag-screen","edit-screen","float-screen","min-max-screen","unfloat-screen"],data(){return{api:null,backup:"",currentDefinition:this.definition,editDialog:!1,expand:!0,configParser:null,currentLayout:null,layoutStack:[],namedWidgets:{},dynamicWidgets:[],width:null,height:null,staleTime:30,cacheTimeout:.1,globalSettings:[],substitute:!1,original_target_name:null,force_substitute:!1,pollingPeriod:1,errors:[],errorDialog:!1,screenKey:null,dragX:0,dragY:0,floated:this.initialFloated,top:this.initialTop,left:this.initialLeft,zIndex:this.initialZ,changeCounter:0,screenItems:[],actualScreenItems:[],screenValues:{},updateCounter:0,updater:null,screenId:Rk.uniqueId("openc3-screen_"),tlmAvailableTimeout:null}},computed:{error:function(){if(this.errorDialog&&this.errors.length>0){let h=new Set,u="";for(const f of this.errors){if(h.has(f.message))continue;let g=`${f.time}: (${f.type}) ${f.message}
3
+ `;u+=g,h.add(f.message)}return u}return null},computedStyle(){var h;let u={};const f=this.width||((h=this.$refs.bar)==null?void 0:h.clientWidth);return this.floated&&(u.position="absolute",u.top=this.top+"px",u.left=this.left+"px",u.width=f+"px"),u}},watch:{count:{handler(h,u){this.currentDefinition=this.definition,this.rerender()}},playbackDateTime:{handler(h,u){this.playbackMode==="playback"&&h&&this.update()}},playbackMode:{handler(h,u){h==="realtime"?this.updateRefreshInterval():(clearInterval(this.updater),this.updater=null)}}},errorCaptured(h,u,f){return this.errors.length<W$1&&(h.usage?this.errors.push({type:"usage",message:h.message,usage:h.usage,line:h.line,lineNumber:h.lineNumber,time:new Date().getTime()}):this.errors.push({type:"error",message:h,time:new Date().getTime()})),!1},created(){this.api=new WA,this.configParser=new PA,this.parseDefinition(),this.screenKey=Math.floor(Math.random()*1e6)},mounted(){this.playbackMode==="realtime"&&this.updateRefreshInterval(),this.floated&&(this.$refs.bar.onmousedown=this.dragMouseDown,this.$refs.bar.parentElement.parentElement.style="z-index: "+this.zIndex)},unmounted(){this.updater!=null&&(clearInterval(this.updater),this.updater=null),this.tlmAvailableTimeout!=null&&(clearTimeout(this.tlmAvailableTimeout),this.tlmAvailableTimeout=null)},methods:{open(h,u){this.$parent.showScreen(h,u)},close(h,u){this.$parent.closeScreenByName(h,u)},closeAll(){this.$parent.closeAll()},clearErrors:function(){this.errors=[]},updateRefreshInterval:function(){let h=this.pollingPeriod*1e3;this.updater&&clearInterval(this.updater),this.updater=setInterval(()=>{this.update()},h)},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,(h,u,f,g)=>{if(h)switch(h){case"SCREEN":this.configParser.verify_num_parameters(3,4,`${h} <Width or AUTO> <Height or AUTO> <Polling Period>`),this.width=parseInt(u[0]),this.height=parseInt(u[1]),this.pollingPeriod=parseFloat(u[2]);break;case"END":this.configParser.verify_num_parameters(0,0,`${h}`),this.layoutStack.pop(),this.currentLayout=this.layoutStack[this.layoutStack.length-1];break;case"STALE_TIME":this.configParser.verify_num_parameters(1,1,`${h} <Time (s)>`),this.staleTime=parseInt(u[0]);break;case"SUBSETTING":this.configParser.verify_num_parameters(3,null,`${h} <Index> <Widget Type> <Widget Settings...>`),u[1]==="RAW"&&(u[1]="RAW__"+u[2].toLowerCase());case"SETTING":this.configParser.verify_num_parameters(2,null,`${h} <Widget Type> <Widget Settings...>`),u[0]==="RAW"&&(u[0]="RAW__"+u[1].toLowerCase()),(this.currentLayout.widgets[this.currentLayout.widgets.length-1]??this.currentLayout).settings.push(u);break;case"GLOBAL_SUBSETTING":this.configParser.verify_num_parameters(3,null,`${h} <Index> <Widget Type> <Widget Settings...>`),u[2]==="RAW"&&(u[2]="RAW__"+u[3].toLowerCase());case"GLOBAL_SETTING":this.configParser.verify_num_parameters(2,null,`${h} <Widget Type> <Widget Settings...>`),u[1]==="RAW"&&(u[1]="RAW__"+u[2].toLowerCase()),this.globalSettings.push(u);break;default:this.processWidget(h,u,f,g);break}}),typeof this.layoutStack[0]>"u"){let h=[],u=[];for(const f of this.dynamicWidgets)h.push(f.name),u.push(f.lineNumber);this.errors.length<W$1&&this.errors.push({type:"usage",message:`Unknown widget! Are these widgets: ${h.join(",")}?`,lineNumber:u.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 h=this.$refs.bar.parentElement.parentElement.parentElement.getBoundingClientRect(),u=this.$refs.bar.getBoundingClientRect();this.top=u.top-h.top-5,this.left=u.left-h.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(h){h=h||window.event,h.preventDefault(),this.dragX=h.clientX,this.dragY=h.clientY,document.onmouseup=this.closeDragElement,document.onmousemove=this.elementDrag},elementDrag:function(h){h=h||window.event,h.preventDefault();let u=this.dragX-h.clientX,f=this.dragY-h.clientY;this.dragX=h.clientX,this.dragY=h.clientY,this.top=this.$refs.bar.offsetTop-f,this.left=this.$refs.bar.offsetLeft-u,this.$emit("drag-screen",[this.floated,this.top,this.left,this.zIndex])},closeDragElement:function(){document.onmouseup=null,document.onmousemove=null},rerender:function(){this.parseDefinition(),this.updateRefreshInterval(),this.screenKey=Math.floor(Math.random()*1e6),this.$nextTick(function(){this.clearErrors(),this.$emit("edit-screen")})},cancelEdit:function(){this.file=null,this.editDialog=!1,this.currentDefinition=this.backup,this.rerender()},saveEdit:function(h){this.editDialog=!1,this.currentDefinition=h,this.rerender(),this.$nextTick(function(){NA.post("/openc3-api/screen/",{data:{scope:window.openc3Scope,target:this.target,screen:this.screen,text:this.currentDefinition}},0)})},deleteScreen:function(){this.editDialog=!1,NA.delete(`/openc3-api/screen/${this.target}/${this.screen}`).then(h=>{this.$emit("delete-screen")})},minMaxTransition:function(){this.expand=!this.expand,this.$emit("min-max-screen")},processWidget:function(h,u,f,g){let ue=null;h==="NAMED_WIDGET"&&(this.configParser.verify_num_parameters(2,null,`${h} <Widget Name> <Widget Type> <Widget Settings... (optional)>`),ue=u[0].toUpperCase(),h=u[1].toUpperCase(),u=u.slice(2,u.length));const A=h.charAt(0).toUpperCase()+h.slice(1).toLowerCase()+"Widget";let S=[];if(S.push(["__SCREEN_ID__",this.screenId]),ue!==null&&S.push(["NAMED_WIDGET",ue]),h==="VERTICAL"||h==="VERTICALBOX"||h==="HORIZONTAL"||h==="HORIZONTALBOX"||h==="MATRIXBYCOLUMNS"||h==="TABBOOK"||h==="TABITEM"||h==="CANVAS"||h==="RADIOGROUP"||h==="SCROLLWINDOW"){const x={type:A,parameters:u,settings:S,screenValues:this.screenValues,screenTimeZone:this.timeZone,widgets:[]};this.layoutStack.push(x),this.currentLayout.widgets.push(x),this.currentLayout=x}else if(this.$options.components[A])this.currentLayout.widgets.push({type:A,target:this.target,parameters:u,settings:S,screenValues:this.screenValues,screenTimeZone:this.timeZone,line:f,lineNumber:g});else{let x={type:"DynamicWidget",target:this.target,parameters:u,settings:S,screenValues:this.screenValues,screenTimeZone:this.timeZone,name:A,line:f,lineNumber:g};this.currentLayout.widgets.push(x),this.dynamicWidgets.push(x)}},applyGlobalSettings:function(h){h.forEach(u=>{this.globalSettings.forEach(f=>{u.type.toLowerCase()===f[0].toLowerCase()+"widget"&&(u.settings.find(g=>g[0]===f[1])||u.settings.push(f.slice(1)))}),u.widgets&&this.applyGlobalSettings(u.widgets)})},update:function(){let h=this.playbackMode==="playback"?this.playbackDateTime:null;this.actualScreenItems.length!==0&&this.api.get_tlm_values(this.actualScreenItems,this.staleTime,this.cacheTimeout,h).then(u=>{u&&u.length>0&&this.updateValues(u)}).catch(u=>{let f=JSON.stringify(u,null,2);this.errors.find(g=>g.message===f)||this.errors.length<W$1&&this.errors.push({type:"error",message:f,time:new Date().getTime()})})},updateValues:function(h){if(this.updateCounter+=1,h.length!=this.screenItems.length||h.length!=this.actualScreenItems.length)console.log(`get_tlm_values mismatch: data.length: ${h.length}, screenItems.length: ${this.screenItems.length}, actualScreenItems.length: ${this.actualScreenItems.length}`,JSON.stringify(h),JSON.stringify(this.screenItems),JSON.stringify(this.actualScreenItems));else for(let u=0;u<h.length;u++)h[u].push(this.updateCounter),this.screenValues[this.screenItems[u]]=h[u]},debouncedUpdateTlmAvailable:function(){this.tlmAvailableTimeout!=null&&clearTimeout(this.tlmAvailableTimeout),this.tlmAvailableTimeout=setTimeout(()=>{this.api.get_tlm_available(this.screenItems).then(h=>{if(this.actualScreenItems=h,this.screenItems.length!=h.length)console.log("Error getting tlm available",this.screenItems,this.actualScreenItems);else for(let u=0;u<this.actualScreenItems.length;u++)if(this.actualScreenItems[u]===null){const f=this.screenItems[u].split("__"),g=this.currentDefinition.split(`
4
+ `),ue=g.findIndex(A=>A.includes(f[0])&&A.includes(f[1])&&A.includes(f[2]))+1;ue>0?this.errors.push({type:"usage",message:`Null for ${f.join(" ")}! Does it exist?`,line:g[ue-1],lineNumber:ue,time:new Date().getTime()}):this.errors.push({type:"error",message:`Null for ${f.join(" ")}! Does it exist?`,time:new Date().getTime()})}}).catch(h=>{console.log("Error getting tlm available",h),this.actualScreenItems=this.screenItems}),this.tlmAvailableTimeout=null},100)},addItem:function(h){this.screenItems.push(h),this.screenValues[h]=[null,null,0],this.debouncedUpdateTlmAvailable()},deleteItem:function(h){let u=this.screenItems.indexOf(h);this.screenItems.splice(u,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(h,u,f,g,ue,A){const S=resolveComponent("v-btn"),x=resolveComponent("v-tooltip"),c=resolveComponent("v-spacer"),p=resolveComponent("v-toolbar"),t=resolveComponent("v-overlay"),o=resolveComponent("vertical-widget"),r=resolveComponent("v-expand-transition"),n=resolveComponent("v-card"),e=resolveComponent("edit-screen-dialog"),i=resolveComponent("v-textarea"),a=resolveComponent("v-card-actions"),m=resolveComponent("v-dialog");return openBlock(),createElementBlock("div",{ref:"bar",style:normalizeStyle(A.computedStyle)},[f.inline?createCommentVNode("",!0):(openBlock(),createBlock(n,{key:0,"min-height":ue.height,"min-width":ue.width,style:{cursor:"default"}},{default:withCtx(()=>[createVNode(p,{height:"24"},{default:withCtx(()=>[withDirectives(createVNode(S,{icon:"mdi-alert",variant:"text",density:"compact","data-test":"error-graph-icon","aria-label":"Show Errors",onClick:u[0]||(u[0]=()=>{ue.errorDialog=!0})},null,512),[[vShow,ue.errors.length!==0]]),createVNode(S,{icon:"mdi-pencil",variant:"text",density:"compact","data-test":"edit-screen-icon","aria-label":"Edit Screen",onClick:A.openEdit},null,8,["onClick"]),f.fixFloated?createCommentVNode("",!0):(openBlock(),createBlock(x,{key:0,"open-delay":600,location:"top"},{activator:withCtx(({props:v})=>[createElementVNode("div",normalizeProps(guardReactiveProps(v)),[createVNode(S,{icon:ue.floated?"mdi-balloon":"mdi-view-grid-outline",variant:"text",density:"compact","data-test":"float-screen-icon","aria-label":ue.floated?"Unfloat Screen":"Float Screen",onClick:A.floatScreen},null,8,["icon","aria-label","onClick"])],16)]),default:withCtx(()=>[createElementVNode("span",null,toDisplayString(ue.floated?"Unfloat Screen":"Float Screen"),1)]),_:1})),ue.floated?(openBlock(),createBlock(x,{key:1,"open-delay":600,location:"top"},{activator:withCtx(({props:v})=>[createElementVNode("div",normalizeProps(guardReactiveProps(v)),[createVNode(S,{icon:"mdi-arrow-up",variant:"text",density:"compact","data-test":"up-screen-icon","aria-label":"Move Screen Up",onClick:A.upScreen},null,8,["onClick"])],16)]),default:withCtx(()=>[u[6]||(u[6]=createElementVNode("span",null," Move Screen Up ",-1))]),_:1})):createCommentVNode("",!0),ue.floated&&ue.zIndex>f.minZ?(openBlock(),createBlock(x,{key:2,"open-delay":600,location:"top"},{activator:withCtx(({props:v})=>[createElementVNode("div",normalizeProps(guardReactiveProps(v)),[createVNode(S,{icon:"mdi-arrow-down",variant:"text",density:"compact","data-test":"down-screen-icon","aria-label":"Move Screen Down",onClick:A.downScreen},null,8,["onClick"])],16)]),default:withCtx(()=>[u[7]||(u[7]=createElementVNode("span",null," Move Screen Down ",-1))]),_:1})):createCommentVNode("",!0),createVNode(c),createElementVNode("span",null,toDisplayString(f.target)+" "+toDisplayString(f.screen),1),createVNode(c),ue.expand?(openBlock(),createBlock(S,{key:3,icon:"mdi-window-minimize",variant:"text",density:"compact","data-test":"minimize-screen-icon","aria-label":"Minimize Screen",onClick:A.minMaxTransition},null,8,["onClick"])):(openBlock(),createBlock(S,{key:4,icon:"mdi-window-maximize",variant:"text",density:"compact","data-test":"maximize-screen-icon","aria-label":"Maximize Screen",onClick:A.minMaxTransition},null,8,["onClick"])),f.showClose?(openBlock(),createBlock(S,{key:5,icon:"mdi-close-box",variant:"text",density:"compact","data-test":"close-screen-icon","aria-label":"Close Screen",onClick:u[1]||(u[1]=v=>h.$emit("close-screen"))})):createCommentVNode("",!0)]),_:1}),ue.editDialog?createCommentVNode("",!0):(openBlock(),createBlock(r,{key:0},{default:withCtx(()=>[withDirectives(createElementVNode("div",_e$1,[createVNode(t,{style:{"pointer-events":"none"},"model-value":ue.errors.length!==0,opacity:"0.8",absolute:"",attach:"","scroll-strategy":"none"},null,8,["model-value"]),(openBlock(),createBlock(o,{key:ue.screenKey,widgets:ue.layoutStack[0].widgets,"screen-values":ue.screenValues,"screen-time-zone":f.timeZone,onAddItem:A.addItem,onDeleteItem:A.deleteItem,onOpen:A.open,onClose:A.close,onCloseAll:A.closeAll},null,8,["widgets","screen-values","screen-time-zone","onAddItem","onDeleteItem","onOpen","onClose","onCloseAll"]))],512),[[vShow,ue.expand]])]),_:1}))]),_:1},8,["min-height","min-width"])),f.inline?(openBlock(),createElementBlock("div",be$1,[createVNode(t,{style:{"pointer-events":"none"},"model-value":ue.errors.length!==0,opacity:"0.8",absolute:"",attach:"","scroll-strategy":"none"},null,8,["model-value"]),withDirectives(createVNode(S,{icon:"mdi-alert",variant:"text",density:"compact","data-test":"error-graph-icon","aria-label":"Show Errors",onClick:u[2]||(u[2]=()=>{ue.errorDialog=!0})},null,512),[[vShow,ue.errors.length!==0]]),(openBlock(),createBlock(o,{key:ue.screenKey,widgets:ue.layoutStack[0].widgets,"screen-values":ue.screenValues,"screen-time-zone":f.timeZone,onAddItem:A.addItem,onDeleteItem:A.deleteItem,onOpen:A.open,onClose:A.close,onCloseAll:A.closeAll},null,8,["widgets","screen-values","screen-time-zone","onAddItem","onDeleteItem","onOpen","onClose","onCloseAll"]))])):createCommentVNode("",!0),ue.editDialog?(openBlock(),createBlock(e,{key:2,modelValue:ue.editDialog,"onUpdate:modelValue":u[3]||(u[3]=v=>ue.editDialog=v),target:f.target,screen:f.screen,definition:ue.currentDefinition,keywords:f.keywords,errors:ue.errors,onSave:A.saveEdit,onCancel:A.cancelEdit,onDelete:A.deleteScreen},null,8,["modelValue","target","screen","definition","keywords","errors","onSave","onCancel","onDelete"])):createCommentVNode("",!0),createVNode(m,{modelValue:ue.errorDialog,"onUpdate:modelValue":u[5]||(u[5]=v=>ue.errorDialog=v),width:"60vw"},{default:withCtx(()=>[createVNode(p,{height:"24"},{default:withCtx(()=>[createVNode(c),createElementVNode("span",null," Screen: "+toDisplayString(f.target)+" "+toDisplayString(f.screen)+" Errors ",1),createVNode(c)]),_:1}),createVNode(n,null,{default:withCtx(()=>[createVNode(i,{class:"errors",readonly:"",rows:"13","model-value":A.error},null,8,["model-value"]),createVNode(a,{class:"pb-5"},{default:withCtx(()=>[createVNode(c),createVNode(S,{variant:"outlined",class:"mr-2",onClick:A.clearErrors},{default:withCtx(()=>[...u[8]||(u[8]=[createTextVNode(" Clear Errors ",-1)])]),_:1},8,["onClick"]),createVNode(S,{variant:"flat",class:"mr-2",onClick:u[4]||(u[4]=v=>ue.errorDialog=!1)},{default:withCtx(()=>[...u[9]||(u[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(h){return!!(/^\s*[-+]?\d*\.\d+\s*$/.test(h)||/^\s*[-+]?(\d+((\.\d+)?)|(\.\d+))[eE][-+]?\d+\s*$/.test(h))},isInt(h){return!!(/^\s*[-+]?\d+\s*$/.test(h)||/^\s*0[xX][\dabcdefABCDEF]+\s*$/.test(h))},isArray(h){return/^\s*\[.*\]\s*$/.test(h)},removeQuotes(h){if(h.length<2)return h;let u=h.charAt(0);if(u!=='"'&&u!=="'")return h;let f=h.charAt(h.length-1);return u!==f?h:h.slice(1,-1)},convertToString(h){let u="";if(Object.prototype.toString.call(h).slice(8,-1)==="Array"){let f=h.length;u="[ ";for(let g=0;g<f;g++)Object.prototype.toString.call(h[g]).slice(8,-1)==="String"?u+='"'+h[g]+'"':u+=h[g],g!==f-1&&(u+=", ");u+=" ]"}else if(Object.prototype.toString.call(h).slice(8,-1)==="Object")if(h.json_class==="String"&&h.raw){u="0x";for(let f of h.raw){let g=f.toString(16).toUpperCase();g.length<2&&(g="0"+g),u+=g}}else h.json_class==="Float"&&h.raw&&(u=h.raw);else u=String(h);return u}}},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(h=>({label:h,...this.states[h]})):null},hazardous(){var h,u;return((u=(h=Object.entries(this.states).find(([f,g])=>g.value===this.modelValue))==null?void 0:h.at(1))==null?void 0:u.hazardous)!==void 0},stateClass(){return this.hazardous?"hazardous mr-4":"mr-4"}},methods:{handleChange(h){this.$emit("update:modelValue",h)}}},L$1={key:1,class:"d-flex align-center"};function H(h,u,f,g,ue,A){const S=resolveComponent("v-text-field"),x=resolveComponent("v-select");return openBlock(),createElementBlock("div",null,[f.states?(openBlock(),createElementBlock("div",L$1,[createVNode(x,{items:A.stateOptions,"model-value":A.selectValue,"item-title":"label",class:normalizeClass(A.stateClass),"hide-details":"",density:"compact",variant:"outlined",placeholder:"Select...","min-width":"120px","data-test":"cmd-param-select","onUpdate:modelValue":A.handleChange},null,8,["items","model-value","class","onUpdate:modelValue"]),createVNode(S,{"model-value":A.stateValue,disabled:"","hide-details":"",density:"compact",variant:"outlined","min-width":"60px","data-test":"cmd-param-value"},null,8,["model-value"])])):(openBlock(),createBlock(S,{key:0,"model-value":A.textFieldValue,"hide-details":"",density:"compact",variant:"filled","data-test":"cmd-param-value","onUpdate:modelValue":A.handleChange},null,8,["model-value","onUpdate:modelValue"]))])}const q=d(j,[["render",H],["__scopeId","data-v-b38d5e7f"]]),z$1={name:"CommandEditor",components:{TargetPacketItemChooser:E$1,CommandParameterEditor:q,DetailsDialog:P},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}},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 WA,this.cmdString?this.processCmdString():(this.targetName=this.initialTargetName,this.commandName=this.initialPacketName,this.updateCmdParams())},methods:{commandChanged(h){(this.targetName!==h.targetName||this.commandName!==h.packetName)&&(this.targetName=h.targetName,this.commandName=h.packetName,this.updateCmdParams()),this.$emit("command-changed",h)},buildCmd(h){this.$emit("build-cmd",h)},showContextMenu(h,u){h.preventDefault(),this.parameterName=u.item.parameter_name,this.contextMenuShown=!1,this.x=h.clientX,this.y=h.clientY,this.$nextTick(()=>{this.contextMenuShown=!0})},updateCmdParams(){this.ignoredParams=[],this.computedRows=[],this.targetName&&this.commandName&&this.api.get_target(this.targetName).then(h=>(this.ignoredParams=h.ignored_parameters,this.api.get_cmd(this.targetName,this.commandName)),h=>{console.error("Error getting ignored parameters:",h)}).then(h=>{h&&(h.items.forEach(u=>{if(!this.reservedItemNames.includes(u.name)&&(!this.ignoredParams.includes(u.name)||this.showIgnoredParams)){let f=u.default;!u.states&&u.data_type==="STRING"&&typeof u.default=="string"&&(f=`'${f}'`),u.required&&(f=null),u.format_string&&u.default&&(f=sprintf(u.format_string,u.default));let g="N/A";u.minimum!=null&&u.maximum!=null&&(u.data_type==="FLOAT"&&(u.minimum<-1e6&&Number.isSafeInteger(u.minimum)&&(u.minimum=u.minimum.toExponential(3)),u.maximum>1e6&&Number.isSafeInteger(u.maximum)&&(u.maximum=u.maximum.toExponential(3))),g=`${u.minimum}..${u.maximum}`),this.computedRows.push({parameter_name:u.name,val:f,states:u.states,description:u.description,range:g,units:u.units,type:u.data_type})}}),this.commandDescription=h.description,this.populateParametersFromParsed())},h=>{console.error("Error getting command parameters:",h)})},triggerUpdateCmdParams(){this.updateCmdParams()},getRows(){return this.computedRows},getCmdString(){let h=`${this.targetName} ${this.commandName}`;if(this.computedRows.length===0)return h;h+=" with";for(const u of this.computedRows){if(u.val===null)throw new Error(`Required parameter ${u.parameter_name} not set`);if(u.val!==null&&u.val!==void 0&&u.val!==""){if(u.states){const g=Object.entries(u.states).find(([,ue])=>ue.value===u.val);if(g){h+=` ${u.parameter_name} '${g[0]}',`;continue}}let f=this.convertToString(u.val);f.includes(" ")&&!this.isArray(f)?h+=` ${u.parameter_name} '${f}',`:h+=` ${u.parameter_name} ${f},`}}return h.slice(0,-1)},parseCmdString(h){const u=h.split(" ");if(u.length<2)return{target:"",command:"",params:{}};if(u.length===2)return{target:u[0],command:u[1],params:{}};if(u[2]!=="with")return{target:"",command:"",params:{}};const f=u[0],g=u[1];let ue={};const A=h.split(" with ")[1];let S=[],x=0,c="";for(let p of A)p==="["?(x++,c+=p):p==="]"?(x--,c+=p):p===","&&x===0?(S.push(c.trim()),c=""):c+=p;c.trim()!==""&&S.push(c.trim());for(let p of S){let t=p.indexOf(" ");if(t>0){let o=p.substring(0,t).trim(),r=p.substring(t+1).trim();ue[o]=r}}return{target:f,command:g,params:ue}},processCmdString(){const h=this.parseCmdString(this.cmdString);h.target&&h.command&&(this.targetName=h.target,this.commandName=h.command,this.parsedParameters=h.params,this.updateCmdParams())},populateParametersFromParsed(){!this.parsedParameters||Object.keys(this.parsedParameters).length===0||this.$nextTick(()=>{setTimeout(()=>{this.computedRows.forEach(h=>{if(this.parsedParameters.hasOwnProperty(h.parameter_name)){const u=this.parsedParameters[h.parameter_name];if(h.states&&typeof u=="string"){const f=Object.keys(h.states).find(g=>g===u||g.toLowerCase()===u.toLowerCase());f?h.val=h.states[f].value:h.val=u}else h.type==="STRING"&&typeof u=="string"?h.val=u.startsWith("'")||u.startsWith('"')?u:`'${u}'`:h.val=u}})},100)})}}},K$1={style:{padding:"10px"}};function G(h,u,f,g,ue,A){const S=resolveComponent("target-packet-item-chooser"),x=resolveComponent("v-spacer"),c=resolveComponent("v-text-field"),p=resolveComponent("v-card-title"),t=resolveComponent("command-parameter-editor"),o=resolveComponent("v-data-table"),r=resolveComponent("v-card"),n=resolveComponent("v-list-item-title"),e=resolveComponent("v-list-item"),i=resolveComponent("v-list"),a=resolveComponent("v-menu"),m=resolveComponent("details-dialog");return openBlock(),createBlock(r,null,{default:withCtx(()=>[createElementVNode("div",K$1,[createVNode(S,{"initial-target-name":ue.targetName,"initial-packet-name":ue.commandName,disabled:f.sendDisabled,"button-text":f.showCommandButton?"Send":null,mode:"cmd",onOnSet:u[0]||(u[0]=v=>A.commandChanged(v)),onAddItem:u[1]||(u[1]=v=>A.buildCmd(v))},null,8,["initial-target-name","initial-packet-name","disabled","button-text"])]),ue.computedRows.length!==0?(openBlock(),createBlock(r,{key:0},{default:withCtx(()=>[createVNode(p,{class:"d-flex align-center justify-content-space-between"},{default:withCtx(()=>[u[5]||(u[5]=createTextVNode(" Parameters ",-1)),createVNode(x),createVNode(c,{modelValue:ue.search,"onUpdate:modelValue":u[2]||(u[2]=v=>ue.search=v),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search"},null,8,["modelValue"])]),_:1}),createVNode(o,{headers:ue.headers,items:ue.computedRows,search:ue.search,"items-per-page":-1,"hide-default-footer":"","multi-sort":"",density:"compact","onContextmenu:row":A.showContextMenu},{"item.val":withCtx(({item:v})=>[renderSlot(h.$slots,"parameter-editor",{item:v,statesInHex:f.statesInHex},()=>[createVNode(t,{modelValue:v.val,"onUpdate:modelValue":k=>v.val=k,states:v.states,"states-in-hex":f.statesInHex},null,8,["modelValue","onUpdate:modelValue","states","states-in-hex"])])]),_:3},8,["headers","items","search","onContextmenu:row"])]),_:3})):createCommentVNode("",!0),createVNode(a,{modelValue:ue.contextMenuShown,"onUpdate:modelValue":u[3]||(u[3]=v=>ue.contextMenuShown=v),target:[ue.x,ue.y]},{default:withCtx(()=>[createVNode(i,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(ue.contextMenuOptions,(v,k)=>(openBlock(),createBlock(e,{key:k,onClick:withModifiers(v.action,["stop"])},{default:withCtx(()=>[createVNode(n,null,{default:withCtx(()=>[createTextVNode(toDisplayString(v.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),createVNode(m,{modelValue:ue.viewDetails,"onUpdate:modelValue":u[4]||(u[4]=v=>ue.viewDetails=v),"target-name":ue.targetName,"packet-name":ue.commandName,"item-name":ue.parameterName,type:"cmd"},null,8,["modelValue","target-name","packet-name","item-name"])]),_:3})}const ie$1=d(z$1,[["render",G]]);var ace$1={exports:{}},hasRequiredAce;function requireAce(){return hasRequiredAce||(hasRequiredAce=1,function(h,u){(function(){var f="ace",g=function(){return this}();!g&&typeof window<"u"&&(g=window);var ue=function(t,o,r){if(typeof t!="string"){ue.original?ue.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(r=o),ue.modules[t]||(ue.payloads[t]=r,ue.modules[t]=null)};ue.modules={},ue.payloads={};var A=function(t,o,r){if(typeof o=="string"){var n=c(t,o);if(n!=null)return r&&r(),n}else if(Object.prototype.toString.call(o)==="[object Array]"){for(var e=[],i=0,a=o.length;i<a;++i){var m=c(t,o[i]);if(m==null&&S.original)return;e.push(m)}return r&&r.apply(null,e)||!0}},S=function(t,o){var r=A("",t,o);return r==null&&S.original?S.original.apply(this,arguments):r},x=function(t,o){if(o.indexOf("!")!==-1){var r=o.split("!");return x(t,r[0])+"!"+x(t,r[1])}if(o.charAt(0)=="."){var n=t.split("/").slice(0,-1).join("/");for(o=n+"/"+o;o.indexOf(".")!==-1&&e!=o;){var e=o;o=o.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return o},c=function(t,o){o=x(t,o);var r=ue.modules[o];if(!r){if(r=ue.payloads[o],typeof r=="function"){var n={},e={id:o,uri:"",exports:n,packaged:!0},i=function(m,v){return A(o,m,v)},a=r(i,n,e);n=a||e.exports,ue.modules[o]=n,delete ue.payloads[o]}r=ue.modules[o]=n||r}return r};function p(t){var o=g;g[t]||(g[t]={}),o=g[t],(!o.define||!o.define.packaged)&&(ue.original=o.define,o.define=ue,o.define.packaged=!0),(!o.require||!o.require.packaged)&&(S.original=o.require,o.require=S,o.require.packaged=!0)}p(f)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(f,g,ue){function A(S,x,c){Object.defineProperty(S,x,{value:c,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||A(String.prototype,"startsWith",function(S,x){return x=x||0,this.lastIndexOf(S,x)===x}),String.prototype.endsWith||A(String.prototype,"endsWith",function(S,x){var c=this;(x===void 0||x>c.length)&&(x=c.length),x-=S.length;var p=c.indexOf(S,x);return p!==-1&&p===x}),String.prototype.repeat||A(String.prototype,"repeat",function(S){for(var x="",c=this;S>0;)S&1&&(x+=c),(S>>=1)&&(c+=c);return x}),String.prototype.includes||A(String.prototype,"includes",function(S,x){return this.indexOf(S,x)!=-1}),Object.assign||(Object.assign=function(S){if(S==null)throw new TypeError("Cannot convert undefined or null to object");for(var x=Object(S),c=1;c<arguments.length;c++){var p=arguments[c];p!=null&&Object.keys(p).forEach(function(t){x[t]=p[t]})}return x}),Object.values||(Object.values=function(S){return Object.keys(S).map(function(x){return S[x]})}),Array.prototype.find||A(Array.prototype,"find",function(S){for(var x=this.length,c=arguments[1],p=0;p<x;p++){var t=this[p];if(S.call(c,t,p,this))return t}}),Array.prototype.findIndex||A(Array.prototype,"findIndex",function(S){for(var x=this.length,c=arguments[1],p=0;p<x;p++){var t=this[p];if(S.call(c,t,p,this))return p}}),Array.prototype.includes||A(Array.prototype,"includes",function(S,x){return this.indexOf(S,x)!=-1}),Array.prototype.fill||A(Array.prototype,"fill",function(S){for(var x=this,c=x.length>>>0,p=arguments[1],t=p>>0,o=t<0?Math.max(c+t,0):Math.min(t,c),r=arguments[2],n=r===void 0?c:r>>0,e=n<0?Math.max(c+n,0):Math.min(n,c);o<e;)x[o]=S,o++;return x}),Array.of||A(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(f,g,ue){f("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(f,g,ue){g.deepCopy=function A(S){if(typeof S!="object"||!S)return S;var x;if(Array.isArray(S)){x=[];for(var c=0;c<S.length;c++)x[c]=A(S[c]);return x}if(Object.prototype.toString.call(S)!=="[object Object]")return S;x={};for(var c in S)x[c]=A(S[c]);return x}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(f,g,ue){g.last=function(x){return x[x.length-1]},g.stringReverse=function(x){return x.split("").reverse().join("")},g.stringRepeat=function(x,c){for(var p="";c>0;)c&1&&(p+=x),(c>>=1)&&(x+=x);return p};var A=/^\s\s*/,S=/\s\s*$/;g.stringTrimLeft=function(x){return x.replace(A,"")},g.stringTrimRight=function(x){return x.replace(S,"")},g.copyObject=function(x){var c={};for(var p in x)c[p]=x[p];return c},g.copyArray=function(x){for(var c=[],p=0,t=x.length;p<t;p++)x[p]&&typeof x[p]=="object"?c[p]=this.copyObject(x[p]):c[p]=x[p];return c},g.deepCopy=f("./deep_copy").deepCopy,g.arrayToMap=function(x){for(var c={},p=0;p<x.length;p++)c[x[p]]=1;return c},g.createMap=function(x){var c=Object.create(null);for(var p in x)c[p]=x[p];return c},g.arrayRemove=function(x,c){for(var p=0;p<=x.length;p++)c===x[p]&&x.splice(p,1)},g.escapeRegExp=function(x){return x.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},g.escapeHTML=function(x){return(""+x).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},g.getMatchOffsets=function(x,c){var p=[];return x.replace(c,function(t){p.push({offset:arguments[arguments.length-2],length:t.length})}),p},g.deferredCall=function(x){var c=null,p=function(){c=null,x()},t=function(o){return t.cancel(),c=setTimeout(p,o||0),t};return t.schedule=t,t.call=function(){return this.cancel(),x(),t},t.cancel=function(){return clearTimeout(c),c=null,t},t.isPending=function(){return c},t},g.delayedCall=function(x,c){var p=null,t=function(){p=null,x()},o=function(r){p==null&&(p=setTimeout(t,r||c))};return o.delay=function(r){p&&clearTimeout(p),p=setTimeout(t,r||c)},o.schedule=o,o.call=function(){this.cancel(),x()},o.cancel=function(){p&&clearTimeout(p),p=null},o.isPending=function(){return p},o},g.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},g.skipEmptyMatch=function(x,c,p){return p&&x.codePointAt(c)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(f,g,ue){g.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},g.getOS=function(){return g.isMac?g.OS.MAC:g.isLinux?g.OS.LINUX:g.OS.WINDOWS};var A=typeof navigator=="object"?navigator:{},S=(/mac|win|linux/i.exec(A.platform)||["other"])[0].toLowerCase(),x=A.userAgent||"",c=A.appName||"";g.isWin=S=="win",g.isMac=S=="mac",g.isLinux=S=="linux",g.isIE=c=="Microsoft Internet Explorer"||c.indexOf("MSAppHost")>=0?parseFloat((x.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((x.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),g.isOldIE=g.isIE&&g.isIE<9,g.isGecko=g.isMozilla=x.match(/ Gecko\/\d+/),g.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",g.isWebKit=parseFloat(x.split("WebKit/")[1])||void 0,g.isChrome=parseFloat(x.split(" Chrome/")[1])||void 0,g.isSafari=parseFloat(x.split(" Safari/")[1])&&!g.isChrome||void 0,g.isEdge=parseFloat(x.split(" Edge/")[1])||void 0,g.isAIR=x.indexOf("AdobeAIR")>=0,g.isAndroid=x.indexOf("Android")>=0,g.isChromeOS=x.indexOf(" CrOS ")>=0,g.isIOS=/iPad|iPhone|iPod/.test(x)&&!window.MSStream,g.isIOS&&(g.isMac=!0),g.isMobile=g.isIOS||g.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(f,g,ue){var A=f("./useragent"),S="http://www.w3.org/1999/xhtml";g.buildDom=function r(n,e,i){if(typeof n=="string"&&n){var a=document.createTextNode(n);return e&&e.appendChild(a),a}if(!Array.isArray(n))return n&&n.appendChild&&e&&e.appendChild(n),n;if(typeof n[0]!="string"||!n[0]){for(var m=[],v=0;v<n.length;v++){var k=r(n[v],e,i);k&&m.push(k)}return m}var M=document.createElement(n[0]),C=n[1],b=1;C&&typeof C=="object"&&!Array.isArray(C)&&(b=2);for(var v=b;v<n.length;v++)r(n[v],M,i);return b==2&&Object.keys(C).forEach(function(he){var Ce=C[he];he==="class"?M.className=Array.isArray(Ce)?Ce.join(" "):Ce:typeof Ce=="function"||he=="value"||he[0]=="$"?M[he]=Ce:he==="ref"?i&&(i[Ce]=M):he==="style"?typeof Ce=="string"&&(M.style.cssText=Ce):Ce!=null&&M.setAttribute(he,Ce)}),e&&e.appendChild(M),M},g.getDocumentHead=function(r){return r||(r=document),r.head||r.getElementsByTagName("head")[0]||r.documentElement},g.createElement=function(r,n){return document.createElementNS?document.createElementNS(n||S,r):document.createElement(r)},g.removeChildren=function(r){r.innerHTML=""},g.createTextNode=function(r,n){var e=n?n.ownerDocument:document;return e.createTextNode(r)},g.createFragment=function(r){var n=r?r.ownerDocument:document;return n.createDocumentFragment()},g.hasCssClass=function(r,n){var e=(r.className+"").split(/\s+/g);return e.indexOf(n)!==-1},g.addCssClass=function(r,n){g.hasCssClass(r,n)||(r.className+=" "+n)},g.removeCssClass=function(r,n){for(var e=r.className.split(/\s+/g);;){var i=e.indexOf(n);if(i==-1)break;e.splice(i,1)}r.className=e.join(" ")},g.toggleCssClass=function(r,n){for(var e=r.className.split(/\s+/g),i=!0;;){var a=e.indexOf(n);if(a==-1)break;i=!1,e.splice(a,1)}return i&&e.push(n),r.className=e.join(" "),i},g.setCssClass=function(r,n,e){e?g.addCssClass(r,n):g.removeCssClass(r,n)},g.hasCssString=function(r,n){var e=0,i;if(n=n||document,i=n.querySelectorAll("style")){for(;e<i.length;)if(i[e++].id===r)return!0}},g.removeElementById=function(r,n){n=n||document,n.getElementById(r)&&n.getElementById(r).remove()};var x,c=[];g.useStrictCSP=function(r){x=r,r==!1?p():c||(c=[])};function p(){var r=c;c=null,r&&r.forEach(function(n){t(n[0],n[1])})}function t(r,n,e){if(!(typeof document>"u")){if(c){if(e)p();else if(e===!1)return c.push([r,n])}if(!x){var i=e;!e||!e.getRootNode?i=document:(i=e.getRootNode(),(!i||i==e)&&(i=document));var a=i.ownerDocument||i;if(n&&g.hasCssString(n,i))return null;n&&(r+=`
5
+ /*# sourceURL=ace/css/`+n+" */");var m=g.createElement("style");m.appendChild(a.createTextNode(r)),n&&(m.id=n),i==a&&(i=g.getDocumentHead(a)),i.insertBefore(m,i.firstChild)}}}if(g.importCssString=t,g.importCssStylsheet=function(r,n){g.buildDom(["link",{rel:"stylesheet",href:r}],g.getDocumentHead(n))},g.scrollbarWidth=function(r){var n=g.createElement("ace_inner");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block";var e=g.createElement("ace_outer"),i=e.style;i.position="absolute",i.left="-10000px",i.overflow="hidden",i.width="200px",i.minWidth="0px",i.height="150px",i.display="block",e.appendChild(n);var a=r&&r.documentElement||document&&document.documentElement;if(!a)return 0;a.appendChild(e);var m=n.offsetWidth;i.overflow="scroll";var v=n.offsetWidth;return m===v&&(v=e.clientWidth),a.removeChild(e),m-v},g.computedStyle=function(r,n){return window.getComputedStyle(r,"")||{}},g.setStyle=function(r,n,e){r[n]!==e&&(r[n]=e)},g.HAS_CSS_ANIMATION=!1,g.HAS_CSS_TRANSFORMS=!1,g.HI_DPI=A.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,A.isChromeOS&&(g.HI_DPI=!1),typeof document<"u"){var o=document.createElement("div");g.HI_DPI&&o.style.transform!==void 0&&(g.HAS_CSS_TRANSFORMS=!0),!A.isEdge&&typeof o.style.animationName<"u"&&(g.HAS_CSS_ANIMATION=!0),o=null}g.HAS_CSS_TRANSFORMS?g.translate=function(r,n,e){r.style.transform="translate("+Math.round(n)+"px, "+Math.round(e)+"px)"}:g.translate=function(r,n,e){r.style.top=Math.round(e)+"px",r.style.left=Math.round(n)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(f,g,ue){/*
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 A=f("./dom");g.get=function(S,x){var c=new XMLHttpRequest;c.open("GET",S,!0),c.onreadystatechange=function(){c.readyState===4&&x(c.responseText)},c.send(null)},g.loadScript=function(S,x){var c=A.getDocumentHead(),p=document.createElement("script");p.src=S,c.appendChild(p),p.onload=p.onreadystatechange=function(t,o){(o||!p.readyState||p.readyState=="loaded"||p.readyState=="complete")&&(p=p.onload=p.onreadystatechange=null,o||x())}},g.qualifyURL=function(S){var x=document.createElement("a");return x.href=S,x.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(f,g,ue){g.inherits=function(A,S){A.super_=S,A.prototype=Object.create(S.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}})},g.mixin=function(A,S){for(var x in S)A[x]=S[x];return A},g.implement=function(A,S){g.mixin(A,S)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(f,g,ue){var A={},S=function(){this.propagationStopped=!0},x=function(){this.defaultPrevented=!0};A._emit=A._dispatchEvent=function(c,p){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var t=this._eventRegistry[c]||[],o=this._defaultHandlers[c];if(!(!t.length&&!o)){(typeof p!="object"||!p)&&(p={}),p.type||(p.type=c),p.stopPropagation||(p.stopPropagation=S),p.preventDefault||(p.preventDefault=x),t=t.slice();for(var r=0;r<t.length&&(t[r](p,this),!p.propagationStopped);r++);if(o&&!p.defaultPrevented)return o(p,this)}},A._signal=function(c,p){var t=(this._eventRegistry||{})[c];if(t){t=t.slice();for(var o=0;o<t.length;o++)t[o](p,this)}},A.once=function(c,p){var t=this;if(this.on(c,function o(){t.off(c,o),p.apply(null,arguments)}),!p)return new Promise(function(o){p=o})},A.setDefaultHandler=function(c,p){var t=this._defaultHandlers;if(t||(t=this._defaultHandlers={_disabled_:{}}),t[c]){var o=t[c],r=t._disabled_[c];r||(t._disabled_[c]=r=[]),r.push(o);var n=r.indexOf(p);n!=-1&&r.splice(n,1)}t[c]=p},A.removeDefaultHandler=function(c,p){var t=this._defaultHandlers;if(t){var o=t._disabled_[c];if(t[c]==p)o&&this.setDefaultHandler(c,o.pop());else if(o){var r=o.indexOf(p);r!=-1&&o.splice(r,1)}}},A.on=A.addEventListener=function(c,p,t){this._eventRegistry=this._eventRegistry||{};var o=this._eventRegistry[c];return o||(o=this._eventRegistry[c]=[]),o.indexOf(p)==-1&&o[t?"unshift":"push"](p),p},A.off=A.removeListener=A.removeEventListener=function(c,p){this._eventRegistry=this._eventRegistry||{};var t=this._eventRegistry[c];if(t){var o=t.indexOf(p);o!==-1&&t.splice(o,1)}},A.removeAllListeners=function(c){c||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[c]=void 0),this._defaultHandlers&&(this._defaultHandlers[c]=void 0)},g.EventEmitter=A}),ace.define("ace/lib/report_error",["require","exports","module"],function(f,g,ue){g.reportError=function(S,x){var c=new Error(S);c.data=x,typeof console=="object"&&console.error&&console.error(c),setTimeout(function(){throw c})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(f,g,ue){var A={"autocomplete.popup.aria-roledescription":"Autocomplete suggestions","autocomplete.popup.aria-label":"Autocomplete suggestions","autocomplete.popup.item.aria-roledescription":"item","autocomplete.loading":"Loading...","editor.scroller.aria-roledescription":"editor","editor.scroller.aria-label":"Editor content, press Enter to start editing, press Escape to exit","editor.gutter.aria-roledescription":"editor gutter","editor.gutter.aria-label":"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit","error-marker.good-state":"Looks good!","prompt.recently-used":"Recently used","prompt.other-commands":"Other commands","prompt.no-matching-commands":"No matching commands","search-box.find.placeholder":"Search for","search-box.find-all.text":"All","search-box.replace.placeholder":"Replace with","search-box.replace-next.text":"Replace","search-box.replace-all.text":"All","search-box.toggle-replace.title":"Toggle Replace mode","search-box.toggle-regexp.title":"RegExp Search","search-box.toggle-case.title":"CaseSensitive Search","search-box.toggle-whole-word.title":"Whole Word Search","search-box.toggle-in-selection.title":"Search In Selection","search-box.search-counter":"$0 of $1","text-input.aria-roledescription":"editor","text-input.aria-label":"Cursor at row $0","gutter.code-folding.range.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.closed.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.open.aria-label":"Toggle code folding, row $0","gutter.code-folding.closed.title":"Unfold code","gutter.code-folding.open.title":"Fold code","gutter.annotation.aria-label.error":"Error, read annotations row $0","gutter.annotation.aria-label.warning":"Warning, read annotations row $0","gutter.annotation.aria-label.info":"Info, read annotations row $0","inline-fold.closed.title":"Unfold code","gutter-tooltip.aria-label.error.singular":"error","gutter-tooltip.aria-label.error.plural":"errors","gutter-tooltip.aria-label.warning.singular":"warning","gutter-tooltip.aria-label.warning.plural":"warnings","gutter-tooltip.aria-label.info.singular":"information message","gutter-tooltip.aria-label.info.plural":"information messages","gutter.annotation.aria-label.security":"Security finding, read annotations row $0","gutter.annotation.aria-label.hint":"Suggestion, read annotations row $0","gutter-tooltip.aria-label.security.singular":"security finding","gutter-tooltip.aria-label.security.plural":"security findings","gutter-tooltip.aria-label.hint.singular":"suggestion","gutter-tooltip.aria-label.hint.plural":"suggestions","editor.tooltip.disable-editing":"Editing is disabled"};g.defaultEnglishMessages=A}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error","ace/lib/default_english_messages"],function(f,g,ue){"no use strict";var A=f("./oop"),S=f("./event_emitter").EventEmitter,x=f("./report_error").reportError,c=f("./default_english_messages").defaultEnglishMessages,p={setOptions:function(e){Object.keys(e).forEach(function(i){this.setOption(i,e[i])},this)},getOptions:function(e){var i={};if(e)Array.isArray(e)||(e=Object.keys(e));else{var a=this.$options;e=Object.keys(a).filter(function(m){return!a[m].hidden})}return e.forEach(function(m){i[m]=this.getOption(m)},this),i},setOption:function(e,i){if(this["$"+e]!==i){var a=this.$options[e];if(!a)return t('misspelled option "'+e+'"');if(a.forwardTo)return this[a.forwardTo]&&this[a.forwardTo].setOption(e,i);a.handlesSet||(this["$"+e]=i),a&&a.set&&a.set.call(this,i)}},getOption:function(e){var i=this.$options[e];return i?i.forwardTo?this[i.forwardTo]&&this[i.forwardTo].getOption(e):i&&i.get?i.get.call(this):this["$"+e]:t('misspelled option "'+e+'"')}};function t(e){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var o,r,n=function(){function e(){this.$defaultOptions={},o=c,r="dollarSigns"}return e.prototype.defineOptions=function(i,a,m){return i.$options||(this.$defaultOptions[a]=i.$options={}),Object.keys(m).forEach(function(v){var k=m[v];typeof k=="string"&&(k={forwardTo:k}),k.name||(k.name=v),i.$options[k.name]=k,"initialValue"in k&&(i["$"+k.name]=k.initialValue)}),A.implement(i,p),this},e.prototype.resetOptions=function(i){Object.keys(i.$options).forEach(function(a){var m=i.$options[a];"value"in m&&i.setOption(a,m.value)})},e.prototype.setDefaultValue=function(i,a,m){if(!i){for(i in this.$defaultOptions)if(this.$defaultOptions[i][a])break;if(!this.$defaultOptions[i][a])return!1}var v=this.$defaultOptions[i]||(this.$defaultOptions[i]={});v[a]&&(v.forwardTo?this.setDefaultValue(v.forwardTo,a,m):v[a].value=m)},e.prototype.setDefaultValues=function(i,a){Object.keys(a).forEach(function(m){this.setDefaultValue(i,m,a[m])},this)},e.prototype.setMessages=function(i,a){o=i,a&&a.placeholders&&(r=a.placeholders)},e.prototype.nls=function(i,a,m){o[i]||(t("No message found for the key '"+i+"' in messages with id "+o.$id+", trying to find a translation for the default string '"+a+"'."),o[a]||t("No message found for the default string '"+a+"' in the provided messages. Falling back to the default English message."));var v=o[i]||o[a]||a;return m&&(r==="dollarSigns"&&(v=v.replace(/\$(\$|[\d]+)/g,function(k,M){return M=="$"?"$":m[M]})),r==="curlyBrackets"&&(v=v.replace(/\{([^\}]+)\}/g,function(k,M){return m[M]}))),v},e}();n.prototype.warn=t,n.prototype.reportError=x,A.implement(n.prototype,S),g.AppConfig=n}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(f,g,ue){ue.exports=`.ace-tm .ace_gutter {
12
+ background: #f0f0f0;
13
+ color: #333;
14
+ }
15
+
16
+ .ace-tm .ace_print-margin {
17
+ width: 1px;
18
+ background: #e8e8e8;
19
+ }
20
+
21
+ .ace-tm .ace_fold {
22
+ background-color: #6B72E6;
23
+ }
24
+
25
+ .ace-tm {
26
+ background-color: #FFFFFF;
27
+ color: black;
28
+ }
29
+
30
+ .ace-tm .ace_cursor {
31
+ color: black;
32
+ }
33
+
34
+ .ace-tm .ace_invisible {
35
+ color: rgb(191, 191, 191);
36
+ }
37
+
38
+ .ace-tm .ace_storage,
39
+ .ace-tm .ace_keyword {
40
+ color: blue;
41
+ }
42
+
43
+ .ace-tm .ace_constant {
44
+ color: rgb(197, 6, 11);
45
+ }
46
+
47
+ .ace-tm .ace_constant.ace_buildin {
48
+ color: rgb(88, 72, 246);
49
+ }
50
+
51
+ .ace-tm .ace_constant.ace_language {
52
+ color: rgb(88, 92, 246);
53
+ }
54
+
55
+ .ace-tm .ace_constant.ace_library {
56
+ color: rgb(6, 150, 14);
57
+ }
58
+
59
+ .ace-tm .ace_invalid {
60
+ background-color: rgba(255, 0, 0, 0.1);
61
+ color: red;
62
+ }
63
+
64
+ .ace-tm .ace_support.ace_function {
65
+ color: rgb(60, 76, 114);
66
+ }
67
+
68
+ .ace-tm .ace_support.ace_constant {
69
+ color: rgb(6, 150, 14);
70
+ }
71
+
72
+ .ace-tm .ace_support.ace_type,
73
+ .ace-tm .ace_support.ace_class {
74
+ color: rgb(109, 121, 222);
75
+ }
76
+
77
+ .ace-tm .ace_keyword.ace_operator {
78
+ color: rgb(104, 118, 135);
79
+ }
80
+
81
+ .ace-tm .ace_string {
82
+ color: rgb(3, 106, 7);
83
+ }
84
+
85
+ .ace-tm .ace_comment {
86
+ color: rgb(76, 136, 107);
87
+ }
88
+
89
+ .ace-tm .ace_comment.ace_doc {
90
+ color: rgb(0, 102, 255);
91
+ }
92
+
93
+ .ace-tm .ace_comment.ace_doc.ace_tag {
94
+ color: rgb(128, 159, 191);
95
+ }
96
+
97
+ .ace-tm .ace_constant.ace_numeric {
98
+ color: rgb(0, 0, 205);
99
+ }
100
+
101
+ .ace-tm .ace_variable {
102
+ color: rgb(49, 132, 149);
103
+ }
104
+
105
+ .ace-tm .ace_xml-pe {
106
+ color: rgb(104, 104, 91);
107
+ }
108
+
109
+ .ace-tm .ace_entity.ace_name.ace_function {
110
+ color: #0000A2;
111
+ }
112
+
113
+
114
+ .ace-tm .ace_heading {
115
+ color: rgb(12, 7, 255);
116
+ }
117
+
118
+ .ace-tm .ace_list {
119
+ color:rgb(185, 6, 144);
120
+ }
121
+
122
+ .ace-tm .ace_meta.ace_tag {
123
+ color:rgb(0, 22, 142);
124
+ }
125
+
126
+ .ace-tm .ace_string.ace_regex {
127
+ color: rgb(255, 0, 0)
128
+ }
129
+
130
+ .ace-tm .ace_marker-layer .ace_selection {
131
+ background: rgb(181, 213, 255);
132
+ }
133
+ .ace-tm.ace_multiselect .ace_selection.ace_start {
134
+ box-shadow: 0 0 3px 0px white;
135
+ }
136
+ .ace-tm .ace_marker-layer .ace_step {
137
+ background: rgb(252, 255, 0);
138
+ }
139
+
140
+ .ace-tm .ace_marker-layer .ace_stack {
141
+ background: rgb(164, 229, 101);
142
+ }
143
+
144
+ .ace-tm .ace_marker-layer .ace_bracket {
145
+ margin: -1px 0 0 -1px;
146
+ border: 1px solid rgb(192, 192, 192);
147
+ }
148
+
149
+ .ace-tm .ace_marker-layer .ace_active-line {
150
+ background: rgba(0, 0, 0, 0.07);
151
+ }
152
+
153
+ .ace-tm .ace_gutter-active-line {
154
+ background-color : #dcdcdc;
155
+ }
156
+
157
+ .ace-tm .ace_marker-layer .ace_selected-word {
158
+ background: rgb(250, 250, 255);
159
+ border: 1px solid rgb(200, 200, 250);
160
+ }
161
+
162
+ .ace-tm .ace_indent-guide {
163
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
164
+ }
165
+
166
+ .ace-tm .ace_indent-guide-active {
167
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
168
+ }
169
+ `}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(f,g,ue){g.isDark=!1,g.cssClass="ace-tm",g.cssText=f("./textmate-css"),g.$id="ace/theme/textmate";var A=f("../lib/dom");A.importCssString(g.cssText,g.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(f,g,ue){"no use strict";var A=f("./lib/lang"),S=f("./lib/net"),x=f("./lib/dom"),c=f("./lib/app_config").AppConfig;ue.exports=g=new c;var p={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};g.get=function(n){if(!p.hasOwnProperty(n))throw new Error("Unknown config key: "+n);return p[n]},g.set=function(n,e){if(p.hasOwnProperty(n))p[n]=e;else if(this.setDefaultValue("",n,e)==!1)throw new Error("Unknown config key: "+n);n=="useStrictCSP"&&x.useStrictCSP(e)},g.all=function(){return A.copyObject(p)},g.$modes={},g.moduleUrl=function(n,e){if(p.$moduleUrls[n])return p.$moduleUrls[n];var i=n.split("/");e=e||i[i.length-2]||"";var a=e=="snippets"?"/":"-",m=i[i.length-1];if(e=="worker"&&a=="-"){var v=new RegExp("^"+e+"[\\-_]|[\\-_]"+e+"$","g");m=m.replace(v,"")}(!m||m==e)&&i.length>1&&(m=i[i.length-2]);var k=p[e+"Path"];return k==null?k=p.basePath:a=="/"&&(e=a=""),k&&k.slice(-1)!="/"&&(k+="/"),k+e+a+m+this.get("suffix")},g.setModuleUrl=function(n,e){return p.$moduleUrls[n]=e};var t=function(n,e){if(n==="ace/theme/textmate"||n==="./theme/textmate")return e(null,f("./theme/textmate"));if(o)return o(n,e);console.error("loader is not configured")},o;g.setLoader=function(n){o=n},g.dynamicModules=Object.create(null),g.$loading={},g.$loaded={},g.loadModule=function(n,e){var i;if(Array.isArray(n))var a=n[0],m=n[1];else if(typeof n=="string")var m=n;var v=function(k){if(k&&!g.$loading[m])return e&&e(k);if(g.$loading[m]||(g.$loading[m]=[]),g.$loading[m].push(e),!(g.$loading[m].length>1)){var M=function(){t(m,function(C,b){b&&(g.$loaded[m]=b),g._emit("load.module",{name:m,module:b});var he=g.$loading[m];g.$loading[m]=null,he.forEach(function(Ce){Ce&&Ce(b)})})};if(!g.get("packaged"))return M();S.loadScript(g.moduleUrl(m,a),M),r()}};if(g.dynamicModules[m])g.dynamicModules[m]().then(function(k){k.default?v(k.default):v(k)});else{try{i=this.$require(m)}catch{}v(i||g.$loaded[m])}},g.$require=function(n){if(typeof ue.require=="function"){var e="require";return ue[e](n)}},g.setModuleLoader=function(n,e){g.dynamicModules[n]=e};var r=function(){!p.basePath&&!p.workerPath&&!p.modePath&&!p.themePath&&!Object.keys(p.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),r=function(){})};g.version="1.43.3"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(f,g,ue){f("./lib/fixoldbrowsers");var A=f("./config");A.setLoader(function(p,t){f([p],function(o){t(null,o)})});var S=function(){return this||typeof window<"u"&&window}();ue.exports=function(p){A.init=x,A.$require=f,p.require=f},x(!0);function x(p){if(!(!S||!S.document)){A.set("packaged",p||f.packaged||ue.packaged||S.define&&(void 0).packaged);var t={},o="",r=document.currentScript||document._currentScript,n=r&&r.ownerDocument||document;r&&r.src&&(o=r.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var e=n.getElementsByTagName("script"),i=0;i<e.length;i++){var a=e[i],m=a.src||a.getAttribute("src");if(m){for(var v=a.attributes,k=0,M=v.length;k<M;k++){var C=v[k];C.name.indexOf("data-ace-")===0&&(t[c(C.name.replace(/^data-ace-/,""))]=C.value)}var b=m.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);b&&(o=b[1])}}o&&(t.base=t.base||o,t.packaged=!0),t.basePath=t.base,t.workerPath=t.workerPath||t.base,t.modePath=t.modePath||t.base,t.themePath=t.themePath||t.base,delete t.base;for(var he in t)typeof t[he]<"u"&&A.set(he,t[he])}}function c(p){return p.replace(/-(.)/g,function(t,o){return o.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(f,g,ue){var A=function(){function S(x,c,p,t){this.start={row:x,column:c},this.end={row:p,column:t}}return S.prototype.isEqual=function(x){return this.start.row===x.start.row&&this.end.row===x.end.row&&this.start.column===x.start.column&&this.end.column===x.end.column},S.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},S.prototype.contains=function(x,c){return this.compare(x,c)==0},S.prototype.compareRange=function(x){var c,p=x.end,t=x.start;return c=this.compare(p.row,p.column),c==1?(c=this.compare(t.row,t.column),c==1?2:c==0?1:0):c==-1?-2:(c=this.compare(t.row,t.column),c==-1?-1:c==1?42:0)},S.prototype.comparePoint=function(x){return this.compare(x.row,x.column)},S.prototype.containsRange=function(x){return this.comparePoint(x.start)==0&&this.comparePoint(x.end)==0},S.prototype.intersects=function(x){var c=this.compareRange(x);return c==-1||c==0||c==1},S.prototype.isEnd=function(x,c){return this.end.row==x&&this.end.column==c},S.prototype.isStart=function(x,c){return this.start.row==x&&this.start.column==c},S.prototype.setStart=function(x,c){typeof x=="object"?(this.start.column=x.column,this.start.row=x.row):(this.start.row=x,this.start.column=c)},S.prototype.setEnd=function(x,c){typeof x=="object"?(this.end.column=x.column,this.end.row=x.row):(this.end.row=x,this.end.column=c)},S.prototype.inside=function(x,c){return this.compare(x,c)==0?!(this.isEnd(x,c)||this.isStart(x,c)):!1},S.prototype.insideStart=function(x,c){return this.compare(x,c)==0?!this.isEnd(x,c):!1},S.prototype.insideEnd=function(x,c){return this.compare(x,c)==0?!this.isStart(x,c):!1},S.prototype.compare=function(x,c){return!this.isMultiLine()&&x===this.start.row?c<this.start.column?-1:c>this.end.column?1:0:x<this.start.row?-1:x>this.end.row?1:this.start.row===x?c>=this.start.column?0:-1:this.end.row===x?c<=this.end.column?0:1:0},S.prototype.compareStart=function(x,c){return this.start.row==x&&this.start.column==c?-1:this.compare(x,c)},S.prototype.compareEnd=function(x,c){return this.end.row==x&&this.end.column==c?1:this.compare(x,c)},S.prototype.compareInside=function(x,c){return this.end.row==x&&this.end.column==c?1:this.start.row==x&&this.start.column==c?-1:this.compare(x,c)},S.prototype.clipRows=function(x,c){if(this.end.row>c)var p={row:c+1,column:0};else if(this.end.row<x)var p={row:x,column:0};if(this.start.row>c)var t={row:c+1,column:0};else if(this.start.row<x)var t={row:x,column:0};return S.fromPoints(t||this.start,p||this.end)},S.prototype.extend=function(x,c){var p=this.compare(x,c);if(p==0)return this;if(p==-1)var t={row:x,column:c};else var o={row:x,column:c};return S.fromPoints(t||this.start,o||this.end)},S.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},S.prototype.isMultiLine=function(){return this.start.row!==this.end.row},S.prototype.clone=function(){return S.fromPoints(this.start,this.end)},S.prototype.collapseRows=function(){return this.end.column==0?new S(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new S(this.start.row,0,this.end.row,0)},S.prototype.toScreenRange=function(x){var c=x.documentToScreenPosition(this.start),p=x.documentToScreenPosition(this.end);return new S(c.row,c.column,p.row,p.column)},S.prototype.moveBy=function(x,c){this.start.row+=x,this.start.column+=c,this.end.row+=x,this.end.column+=c},S}();A.fromPoints=function(S,x){return new A(S.row,S.column,x.row,x.column)},A.comparePoints=function(S,x){return S.row-x.row||S.column-x.column},g.Range=A}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(f,g,ue){for(var A=f("./oop"),S={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},x={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},c=0;c<10;c++)x["Digit"+c]=48+c,x["Numpad"+c]=96+c,S.PRINTABLE_KEYS[48+c]=""+c,S.FUNCTION_KEYS[96+c]="Numpad"+c;for(var c=65;c<91;c++){var p=String.fromCharCode(c+32);x["Key"+p.toUpperCase()]=c,S.PRINTABLE_KEYS[c]=p}for(var c=1;c<13;c++)x["F"+c]=111+c,S.FUNCTION_KEYS[111+c]="F"+c;var t={Shift:16,Control:17,Alt:18,Meta:224};for(var o in t)x[o]=x[o+"Left"]=x[o+"Right"]=t[o];g.$codeToKeyCode=x,S.PRINTABLE_KEYS[173]="-";for(var r in S.FUNCTION_KEYS){var n=S.FUNCTION_KEYS[r].toLowerCase();S[n]=parseInt(r,10)}for(var r in S.PRINTABLE_KEYS){var n=S.PRINTABLE_KEYS[r].toLowerCase();S[n]=parseInt(r,10)}A.mixin(S,S.MODIFIER_KEYS),A.mixin(S,S.PRINTABLE_KEYS),A.mixin(S,S.FUNCTION_KEYS),S.enter=S.return,S.escape=S.esc,S.del=S.delete,function(){for(var e=["cmd","ctrl","alt","shift"],i=Math.pow(2,e.length);i--;)S.KEY_MODS[i]=e.filter(function(a){return i&S.KEY_MODS[a]}).join("-")+"-"}(),S.KEY_MODS[0]="",S.KEY_MODS[-1]="input-",A.mixin(g,S),g.default=g,g.keyCodeToString=function(e){var i=S[e];return typeof i!="string"&&(i=String.fromCharCode(e)),i.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(f,g,ue){var A=f("./keys"),S=f("./useragent"),x=null,c=0,p;function t(){p=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return p={passive:!1},!0}})}catch{}}function o(){return p==null&&t(),p}function r(k,M,C){this.elem=k,this.type=M,this.callback=C}r.prototype.destroy=function(){e(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var n=g.addListener=function(k,M,C,b){k.addEventListener(M,C,o()),b&&b.$toDestroy.push(new r(k,M,C))},e=g.removeListener=function(k,M,C){k.removeEventListener(M,C,o())};g.stopEvent=function(k){return g.stopPropagation(k),g.preventDefault(k),!1},g.stopPropagation=function(k){k.stopPropagation&&k.stopPropagation()},g.preventDefault=function(k){k.preventDefault&&k.preventDefault()},g.getButton=function(k){return k.type=="dblclick"?0:k.type=="contextmenu"||S.isMac&&k.ctrlKey&&!k.altKey&&!k.shiftKey?2:k.button},g.capture=function(k,M,C){var b=k&&k.ownerDocument||document;function he(Ce){M&&M(Ce),C&&C(Ce),e(b,"mousemove",M),e(b,"mouseup",he),e(b,"dragstart",he)}return n(b,"mousemove",M),n(b,"mouseup",he),n(b,"dragstart",he),he},g.addMouseWheelListener=function(k,M,C){n(k,"wheel",function(b){var he=.15,Ce=b.deltaX||0,X=b.deltaY||0;switch(b.deltaMode){case b.DOM_DELTA_PIXEL:b.wheelX=Ce*he,b.wheelY=X*he;break;case b.DOM_DELTA_LINE:var V=15;b.wheelX=Ce*V,b.wheelY=X*V;break;case b.DOM_DELTA_PAGE:var Xe=150;b.wheelX=Ce*Xe,b.wheelY=X*Xe;break}M(b)},C)},g.addMultiMouseDownListener=function(k,M,C,b,he){var Ce=0,X,V,Xe,U={2:"dblclick",3:"tripleclick",4:"quadclick"};function O(w){if(g.getButton(w)!==0?Ce=0:w.detail>1?(Ce++,Ce>4&&(Ce=1)):Ce=1,S.isIE){var y=Math.abs(w.clientX-X)>5||Math.abs(w.clientY-V)>5;(!Xe||y)&&(Ce=1),Xe&&clearTimeout(Xe),Xe=setTimeout(function(){Xe=null},M[Ce-1]||600),Ce==1&&(X=w.clientX,V=w.clientY)}if(w._clicks=Ce,C[b]("mousedown",w),Ce>4)Ce=0;else if(Ce>1)return C[b](U[Ce],w)}Array.isArray(k)||(k=[k]),k.forEach(function(w){n(w,"mousedown",O,he)})};function i(k){return 0|(k.ctrlKey?1:0)|(k.altKey?2:0)|(k.shiftKey?4:0)|(k.metaKey?8:0)}g.getModifierString=function(k){return A.KEY_MODS[i(k)]};function a(k,M,C){var b=i(M);if(!C&&M.code&&(C=A.$codeToKeyCode[M.code]||C),!S.isMac&&x){if(M.getModifierState&&(M.getModifierState("OS")||M.getModifierState("Win"))&&(b|=8),x.altGr)if((3&b)!=3)x.altGr=0;else return;if(C===18||C===17){var he=M.location;if(C===17&&he===1)x[C]==1&&(c=M.timeStamp);else if(C===18&&b===3&&he===2){var Ce=M.timeStamp-c;Ce<50&&(x.altGr=!0)}}}if(C in A.MODIFIER_KEYS&&(C=-1),!(!b&&C===13&&M.location===3&&(k(M,b,-C),M.defaultPrevented))){if(S.isChromeOS&&b&8){if(k(M,b,C),M.defaultPrevented)return;b&=-9}return!b&&!(C in A.FUNCTION_KEYS)&&!(C in A.PRINTABLE_KEYS)?!1:k(M,b,C)}}g.addCommandKeyListener=function(k,M,C){var b=null;n(k,"keydown",function(he){x[he.keyCode]=(x[he.keyCode]||0)+1;var Ce=a(M,he,he.keyCode);return b=he.defaultPrevented,Ce},C),n(k,"keypress",function(he){b&&(he.ctrlKey||he.altKey||he.shiftKey||he.metaKey)&&(g.stopEvent(he),b=null)},C),n(k,"keyup",function(he){x[he.keyCode]=null},C),x||(m(),n(window,"focus",m))};function m(){x=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!S.isOldIE){var v=1;g.nextTick=function(k,M){M=M||window;var C="zero-timeout-message-"+v++,b=function(he){he.data==C&&(g.stopPropagation(he),e(M,"message",b),k())};n(M,"message",b),M.postMessage(C,"*")}}g.$idleBlocked=!1,g.onIdle=function(k,M){return setTimeout(function C(){g.$idleBlocked?setTimeout(C,100):k()},M)},g.$idleBlockId=null,g.blockIdle=function(k){g.$idleBlockId&&clearTimeout(g.$idleBlockId),g.$idleBlocked=!0,g.$idleBlockId=setTimeout(function(){g.$idleBlocked=!1},k||100)},g.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),g.nextFrame?g.nextFrame=g.nextFrame.bind(window):g.nextFrame=function(k){setTimeout(k,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(f,g,ue){var A;ue.exports={lineMode:!1,pasteCancelled:function(){return A&&A>Date.now()-50?!0:A=!1},cancel:function(){A=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(f,g,ue){var A=f("../lib/event"),S=f("../config").nls,x=f("../lib/useragent"),c=f("../lib/dom"),p=f("../lib/lang"),t=f("../clipboard"),o=x.isChrome<18,r=x.isIE,n=x.isChrome>63,e=400,i=f("../lib/keys"),a=i.KEY_MODS,m=x.isIOS,v=m?/\s/:/\n/,k=x.isMobile,M=function(){function C(b,he){var Ce=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="",k||(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"}),A.addListener(this.text,"blur",function(X){Ce.ignoreFocusEvents||(he.onBlur(X),Ce.$isFocused=!1)},he),A.addListener(this.text,"focus",function(X){if(!Ce.ignoreFocusEvents){if(Ce.$isFocused=!0,x.isEdge)try{if(!document.hasFocus())return}catch{}he.onFocus(X),x.isEdge?setTimeout(Ce.resetSelection.bind(Ce)):Ce.resetSelection()}},he),this.$focusScroll=!1,he.on("beforeEndOperation",function(){var X=he.curOp,V=X&&X.command&&X.command.name;if(V!="insertstring"){var Xe=V&&(X.docChanged||X.selectionChanged);Ce.inComposition&&Xe&&(Ce.lastValue=Ce.text.value="",Ce.onCompositionEnd()),Ce.resetSelection()}}),he.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=m?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&he.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,A.addCommandKeyListener(this.text,function(X,V,Xe){if(!Ce.inComposition)return he.onCommandKey(X,V,Xe)},he),A.addListener(this.text,"select",this.onSelect.bind(this),he),A.addListener(this.text,"input",this.onInput.bind(this),he),A.addListener(this.text,"cut",this.onCut.bind(this),he),A.addListener(this.text,"copy",this.onCopy.bind(this),he),A.addListener(this.text,"paste",this.onPaste.bind(this),he),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&A.addListener(b,"keydown",function(X){if(!(x.isMac&&!X.metaKey||!X.ctrlKey))switch(X.keyCode){case 67:Ce.onCopy(X);break;case 86:Ce.onPaste(X);break;case 88:Ce.onCut(X);break}},he),this.syncComposition=p.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),A.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),he),A.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),he),A.addListener(this.text,"keyup",this.onKeyup.bind(this),he),A.addListener(this.text,"keydown",this.syncComposition.bind(this),he),A.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),he),this.closeTimeout,A.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),he),A.addListener(this.text,"mousedown",function(X){X.preventDefault(),Ce.onContextMenuClose()},he),A.addListener(he.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),he),A.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),he),m&&this.addIosSelectionHandler(b,he,this.text)}return C.prototype.addIosSelectionHandler=function(b,he,Ce){var X=this,V=null,Xe=!1;Ce.addEventListener("keydown",function(O){V&&clearTimeout(V),Xe=!0},!0),Ce.addEventListener("keyup",function(O){V=setTimeout(function(){Xe=!1},100)},!0);var U=function(O){if(document.activeElement===Ce&&!(Xe||X.inComposition||he.$mouseHandler.isMousePressed)&&!X.copied){var w=Ce.selectionStart,y=Ce.selectionEnd,T=null,Oe=0;if(w==0?T=i.up:w==1?T=i.home:y>X.lastSelectionEnd&&X.lastValue[y]==`
170
+ `?T=i.end:w<X.lastSelectionStart&&X.lastValue[w-1]==" "?(T=i.left,Oe=a.option):w<X.lastSelectionStart||w==X.lastSelectionStart&&X.lastSelectionEnd!=X.lastSelectionStart&&w==y?T=i.left:y>X.lastSelectionEnd&&X.lastValue.slice(0,y).split(`
171
+ `).length>2?T=i.down:y>X.lastSelectionEnd&&X.lastValue[y-1]==" "?(T=i.right,Oe=a.option):(y>X.lastSelectionEnd||y==X.lastSelectionEnd&&X.lastSelectionEnd!=X.lastSelectionStart&&w==y)&&(T=i.right),w!==y&&(Oe|=a.shift),T){var ze=he.onCommandKey({},Oe,T);if(!ze&&he.commands){T=i.keyCodeToString(T);var ft=he.commands.findKeyCommand(Oe,T);ft&&he.execCommand(ft)}X.lastSelectionStart=w,X.lastSelectionEnd=y,X.resetSelection("")}}};document.addEventListener("selectionchange",U),he.on("destroy",function(){document.removeEventListener("selectionchange",U)})},C.prototype.onContextMenuClose=function(){var b=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){b.tempStyle&&(b.text.style.cssText=b.tempStyle,b.tempStyle=""),b.host.renderer.$isMousePressed=!1,b.host.renderer.$keepTextAreaAtCursor&&b.host.renderer.$moveTextAreaToCursor()},0)},C.prototype.$onContextMenu=function(b){this.host.textInput.onContextMenu(b),this.onContextMenuClose()},C.prototype.onKeyup=function(b){b.keyCode==27&&this.text.value.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},C.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},C.prototype.onCompositionStart=function(b){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){b.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var 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()))}},C.prototype.onCompositionUpdate=function(){if(!(!this.inComposition||!this.host.onCompositionUpdate||this.host.$readOnly)){if(this.commandMode)return this.cancelComposition();if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var b=this.text.value;this.sendText(b),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},C.prototype.onCompositionEnd=function(b){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),b&&this.onInput())},C.prototype.onCut=function(b){this.doCopy(b,!0)},C.prototype.onCopy=function(b){this.doCopy(b,!1)},C.prototype.onPaste=function(b){var he=this.handleClipboardData(b);t.pasteCancelled()||(typeof he=="string"?(he&&this.host.onPaste(he,b),x.isIE&&setTimeout(this.resetSelection),A.preventDefault(b)):(this.text.value="",this.pasted=!0))},C.prototype.doCopy=function(b,he){var Ce=this,X=this.host.getCopyText();if(!X)return A.preventDefault(b);this.handleClipboardData(b,X)?(m&&(this.resetSelection(X),this.copied=X,setTimeout(function(){Ce.copied=!1},10)),he?this.host.onCut():this.host.onCopy(),A.preventDefault(b)):(this.copied=!0,this.text.value=X,this.text.select(),setTimeout(function(){Ce.copied=!1,Ce.resetSelection(),he?Ce.host.onCut():Ce.host.onCopy()}))},C.prototype.handleClipboardData=function(b,he,Ce){var X=b.clipboardData||window.clipboardData;if(!(!X||o)){var V=r||Ce?"Text":"text/plain";try{return he?X.setData(V,he)!==!1:X.getData(V)}catch(Xe){if(!Ce)return this.handleClipboardData(Xe,he,!0)}}},C.prototype.onInput=function(b){if(this.inComposition)return this.onCompositionUpdate();if(b&&b.inputType){if(b.inputType=="historyUndo")return this.host.execCommand("undo");if(b.inputType=="historyRedo")return this.host.execCommand("redo")}var he=this.text.value,Ce=this.sendText(he,!0);(he.length>e+100||v.test(Ce)||k&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},C.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 Ce=this.text.selectionStart,X=this.text.selectionEnd,V=this.lastSelectionStart,Xe=this.lastValue.length-this.lastSelectionEnd,U=b,O=b.length-Ce,w=b.length-X,y=0;V>0&&this.lastValue[y]==b[y];)y++,V--;for(U=U.slice(y),y=1;Xe>0&&this.lastValue.length-y>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-y]==b[b.length-y];)y++,Xe--;O-=y-1,w-=y-1;var T=U.length-y+1;if(T<0&&(V=-T,T=0),U=U.slice(0,T),!he&&!U&&!O&&!V&&!Xe&&!w)return"";this.sendingText=!0;var Oe=!1;return x.isAndroid&&U==". "&&(U=" ",Oe=!0),U&&!V&&!Xe&&!O&&!w||this.commandMode?this.host.onTextInput(U):this.host.onTextInput(U,{extendLeft:V,extendRight:Xe,restoreStart:O,restoreEnd:w}),this.sendingText=!1,this.lastValue=b,this.lastSelectionStart=Ce,this.lastSelectionEnd=X,this.lastRestoreEnd=w,Oe?`
172
+ `:U},C.prototype.onSelect=function(b){var he=this;if(!this.inComposition){var Ce=function(X){return X.selectionStart===0&&X.selectionEnd>=he.lastValue.length&&X.value===he.lastValue&&he.lastValue&&X.selectionEnd!==he.lastSelectionEnd};this.copied?this.copied=!1:Ce(this.text)?(this.host.selectAll(),this.resetSelection()):k&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},C.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 Ce=4,X=4+(b.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=Ce||this.lastSelectionEnd!=X)&&this.text.setSelectionRange(Ce,X),this.lastSelectionStart=Ce,this.lastSelectionEnd=X}},C.prototype.$resetSelection=function(){var b=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var he=0,Ce=0,X="",V=function(ft,pt){for(var gt=pt,Qt=1;Qt<=ft-b.rowStart&&Qt<2*b.numberOfExtraLines+1;Qt++)gt+=b.host.session.getLine(ft-Qt).length+1;return gt};if(this.host.session){var Xe=this.host.selection,U=Xe.getRange(),O=Xe.cursor.row;O===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):O===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(O<this.rowStart-1||O>this.rowEnd+1)&&(this.rowStart=O>this.numberOfExtraLines?O-this.numberOfExtraLines:0,this.rowEnd=O>this.numberOfExtraLines?O+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var w=[],y=this.rowStart;y<=this.rowEnd;y++)w.push(this.host.session.getLine(y));if(X=w.join(`
175
+ `),he=V(U.start.row,U.start.column),Ce=V(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,Ce+=T.length+1,X=T+`
176
+ `+X}else if(U.end.row>this.rowEnd){var Oe=this.host.session.getLine(this.rowEnd+1);Ce=U.end.row>this.rowEnd+1?Oe.length:U.end.column,Ce+=X.length+1,X=X+`
177
+ `+Oe}else k&&O>0&&(X=`
178
+ `+X,Ce+=1,he+=1);X.length>e&&(he<e&&Ce<e?X=X.slice(0,e):(X=`
179
+ `,he==Ce?he=Ce=0:(he=0,Ce=1)));var ze=X+`
180
+
181
+ `;ze!=this.lastValue&&(this.text.value=this.lastValue=ze,this.lastSelectionStart=this.lastSelectionEnd=ze.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=Ce||this.lastSelectionStart!=he||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(he,Ce),this.lastSelectionStart=he,this.lastSelectionEnd=Ce}catch{}this.inComposition=!1}},C.prototype.setHost=function(b){this.host=b},C.prototype.setNumberOfExtraLines=function(b){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,b<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=b},C.prototype.setAriaLabel=function(){var b="";if(this.host.$textInputAriaLabel&&(b+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var he=this.host.session.selection.cursor.row;b+=S("text-input.aria-label","Cursor at row $0",[he+1])}this.text.setAttribute("aria-label",b)},C.prototype.setAriaOptions=function(b){b.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",b.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",b.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),b.role&&this.text.setAttribute("role",b.role),b.setLabel&&(this.text.setAttribute("aria-roledescription",S("text-input.aria-roledescription","editor")),this.setAriaLabel())},C.prototype.focus=function(){var b=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||n||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 Ce=this.text.getBoundingClientRect().top!=0}catch{return}var X=[];if(Ce)for(var V=this.text.parentElement;V&&V.nodeType==1;)X.push(V),V.setAttribute("ace_nocontext","true"),!V.parentElement&&V.getRootNode?V=V.getRootNode().host:V=V.parentElement;this.text.focus({preventScroll:!0}),Ce&&X.forEach(function(Xe){Xe.removeAttribute("ace_nocontext")}),setTimeout(function(){b.text.style.position="",b.text.style.top=="0px"&&(b.text.style.top=he)},0)},C.prototype.blur=function(){this.text.blur()},C.prototype.isFocused=function(){return this.$isFocused},C.prototype.setInputHandler=function(b){this.inputHandler=b},C.prototype.getInputHandler=function(){return this.inputHandler},C.prototype.getElement=function(){return this.text},C.prototype.setCommandMode=function(b){this.commandMode=b,this.text.readOnly=!1},C.prototype.setReadOnly=function(b){this.commandMode||(this.text.readOnly=b)},C.prototype.setCopyWithEmptySelection=function(b){},C.prototype.onContextMenu=function(b){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:b}),this.moveToMouse(b,!0)},C.prototype.moveToMouse=function(b,he){var Ce=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(he?"z-index:100000;":"")+(x.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var X=this.host.container.getBoundingClientRect(),V=c.computedStyle(this.host.container),Xe=X.top+(parseInt(V.borderTopWidth)||0),U=X.left+(parseInt(V.borderLeftWidth)||0),O=X.bottom-Xe-this.text.clientHeight-2,w=function(y){c.translate(Ce.text,y.clientX-U-2,Math.min(y.clientY-Xe-2,O))};w(b),b.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),x.isWin&&A.capture(this.host.container,w,this.onContextMenuClose.bind(this)))},C.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},C}();g.TextInput=M,g.$setUserAgentForTests=function(C,b){k=C,m=b}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(f,g,ue){var A=f("../lib/useragent"),S=0,x=550,c=function(){function o(r){r.$clickSelection=null;var n=r.editor;n.setDefaultHandler("mousedown",this.onMouseDown.bind(r)),n.setDefaultHandler("dblclick",this.onDoubleClick.bind(r)),n.setDefaultHandler("tripleclick",this.onTripleClick.bind(r)),n.setDefaultHandler("quadclick",this.onQuadClick.bind(r)),n.setDefaultHandler("mousewheel",this.onMouseWheel.bind(r));var e=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];e.forEach(function(i){r[i]=this[i]},this),r.selectByLines=this.extendSelectionBy.bind(r,"getLineRange"),r.selectByWords=this.extendSelectionBy.bind(r,"getWordRange")}return o.prototype.onMouseDown=function(r){var n=r.inSelection(),e=r.getDocumentPosition();this.mousedownEvent=r;var i=this.editor,a=r.getButton();if(a!==0){var m=i.getSelectionRange(),v=m.isEmpty();(v||a==1)&&i.selection.moveToPosition(e),a==2&&(i.textInput.onContextMenu(r.domEvent),A.isMozilla||r.preventDefault());return}if(this.mousedownEvent.time=Date.now(),n&&!i.isFocused()&&(i.focus(),this.$focusTimeout&&!this.$clickSelection&&!i.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(r);return}return this.captureMouse(r),this.startSelect(e,r.domEvent._clicks>1),r.preventDefault()},o.prototype.startSelect=function(r,n){r=r||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var e=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?e.selection.selectToPosition(r):n||e.selection.moveToPosition(r),n||this.select(),e.setStyle("ace_selecting"),this.setState("select"))},o.prototype.select=function(){var r,n=this.editor,e=n.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var i=this.$clickSelection.comparePoint(e);if(i==-1)r=this.$clickSelection.end;else if(i==1)r=this.$clickSelection.start;else{var a=t(this.$clickSelection,e);e=a.cursor,r=a.anchor}n.selection.setSelectionAnchor(r.row,r.column)}n.selection.selectToPosition(e),n.renderer.scrollCursorIntoView()},o.prototype.extendSelectionBy=function(r){var n,e=this.editor,i=e.renderer.screenToTextCoordinates(this.x,this.y),a=e.selection[r](i.row,i.column);if(this.$clickSelection){var m=this.$clickSelection.comparePoint(a.start),v=this.$clickSelection.comparePoint(a.end);if(m==-1&&v<=0)n=this.$clickSelection.end,(a.end.row!=i.row||a.end.column!=i.column)&&(i=a.start);else if(v==1&&m>=0)n=this.$clickSelection.start,(a.start.row!=i.row||a.start.column!=i.column)&&(i=a.end);else if(m==-1&&v==1)i=a.end,n=a.start;else{var k=t(this.$clickSelection,i);i=k.cursor,n=k.anchor}e.selection.setSelectionAnchor(n.row,n.column)}e.selection.selectToPosition(i),e.renderer.scrollCursorIntoView()},o.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},o.prototype.focusWait=function(){var r=p(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),n=Date.now();(r>S||n-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},o.prototype.onDoubleClick=function(r){var n=r.getDocumentPosition(),e=this.editor,i=e.session,a=i.getBracketRange(n);a?(a.isEmpty()&&(a.start.column--,a.end.column++),this.setState("select")):(a=e.selection.getWordRange(n.row,n.column),this.setState("selectByWords")),this.$clickSelection=a,this.select()},o.prototype.onTripleClick=function(r){var n=r.getDocumentPosition(),e=this.editor;this.setState("selectByLines");var i=e.getSelectionRange();i.isMultiLine()&&i.contains(n.row,n.column)?(this.$clickSelection=e.selection.getLineRange(i.start.row),this.$clickSelection.end=e.selection.getLineRange(i.end.row).end):this.$clickSelection=e.selection.getLineRange(n.row),this.select()},o.prototype.onQuadClick=function(r){var n=this.editor;n.selectAll(),this.$clickSelection=n.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 n=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var e=this.$lastScroll,i=r.domEvent.timeStamp,a=i-e.t,m=a?r.wheelX/a:e.vx,v=a?r.wheelY/a:e.vy;a<x&&(m=(m+e.vx)/2,v=(v+e.vy)/2);var k=Math.abs(m/v),M=!1;if(k>=1&&n.renderer.isScrollableBy(r.wheelX*r.speed,0)&&(M=!0),k<=1&&n.renderer.isScrollableBy(0,r.wheelY*r.speed)&&(M=!0),M)e.allowed=i;else if(i-e.allowed<x){var C=Math.abs(m)<=1.5*Math.abs(e.vx)&&Math.abs(v)<=1.5*Math.abs(e.vy);C?(M=!0,e.allowed=i):e.allowed=0}if(e.t=i,e.vx=m,e.vy=v,M)return n.renderer.scrollBy(r.wheelX*r.speed,r.wheelY*r.speed),r.stop()}},o}();c.prototype.selectEnd=c.prototype.selectByLinesEnd,c.prototype.selectAllEnd=c.prototype.selectByLinesEnd,c.prototype.selectByWordsEnd=c.prototype.selectByLinesEnd,g.DefaultHandlers=c;function p(o,r,n,e){return Math.sqrt(Math.pow(n-o,2)+Math.pow(e-r,2))}function t(o,r){if(o.start.row==o.end.row)var n=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 n=r.column-4;else var n=2*r.row-o.start.row-o.end.row;return n<0?{cursor:o.start,anchor:o.end}:{cursor:o.end,anchor:o.start}}}),ace.define("ace/lib/scroll",["require","exports","module"],function(f,g,ue){g.preventParentScroll=function(S){S.stopPropagation();var x=S.currentTarget,c=x.scrollHeight>x.clientHeight;c||S.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(f,g,ue){var A=this&&this.__extends||function(){var i=function(a,m){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,k){v.__proto__=k}||function(v,k){for(var M in k)Object.prototype.hasOwnProperty.call(k,M)&&(v[M]=k[M])},i(a,m)};return function(a,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");i(a,m);function v(){this.constructor=a}a.prototype=m===null?Object.create(m):(v.prototype=m.prototype,new v)}}(),S=this&&this.__values||function(i){var a=typeof Symbol=="function"&&Symbol.iterator,m=a&&i[a],v=0;if(m)return m.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&v>=i.length&&(i=void 0),{value:i&&i[v++],done:!i}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")},x=f("./lib/dom");f("./lib/event");var c=f("./range").Range,p=f("./lib/scroll").preventParentScroll,t="ace_tooltip",o=function(){function i(a){this.isOpen=!1,this.$element=null,this.$parentNode=a}return i.prototype.$init=function(){return this.$element=x.createElement("div"),this.$element.className=t,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},i.prototype.getElement=function(){return this.$element||this.$init()},i.prototype.setText=function(a){this.getElement().textContent=a},i.prototype.setHtml=function(a){this.getElement().innerHTML=a},i.prototype.setPosition=function(a,m){var v=this.getElement(),k=v.offsetParent&&v.offsetParent.getBoundingClientRect();v.style.left=a-(k?k.left:0)+"px",v.style.top=m-(k?k.top:0)+"px"},i.prototype.setClassName=function(a){x.addCssClass(this.getElement(),a)},i.prototype.setTheme=function(a){this.$element.className=t+" "+(a.isDark?"ace_dark ":"")+(a.cssClass||"")},i.prototype.show=function(a,m,v){a!=null&&this.setText(a),m!=null&&v!=null&&this.setPosition(m,v),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},i.prototype.hide=function(a){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=t,this.isOpen=!1)},i.prototype.getHeight=function(){return this.getElement().offsetHeight},i.prototype.getWidth=function(){return this.getElement().offsetWidth},i.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},i}(),r=function(){function i(){this.popups=[]}return i.prototype.addPopup=function(a){this.popups.push(a),this.updatePopups()},i.prototype.removePopup=function(a){var m=this.popups.indexOf(a);m!==-1&&(this.popups.splice(m,1),this.updatePopups())},i.prototype.updatePopups=function(){var a,m,v,k;this.popups.sort(function(U,O){return O.priority-U.priority});var M=[];try{for(var C=S(this.popups),b=C.next();!b.done;b=C.next()){var he=b.value,Ce=!0;try{for(var X=(v=void 0,S(M)),V=X.next();!V.done;V=X.next()){var Xe=V.value;if(this.doPopupsOverlap(Xe,he)){Ce=!1;break}}}catch(U){v={error:U}}finally{try{V&&!V.done&&(k=X.return)&&k.call(X)}finally{if(v)throw v.error}}Ce?M.push(he):he.hide()}}catch(U){a={error:U}}finally{try{b&&!b.done&&(m=C.return)&&m.call(C)}finally{if(a)throw a.error}}},i.prototype.doPopupsOverlap=function(a,m){var v=a.getElement().getBoundingClientRect(),k=m.getElement().getBoundingClientRect();return v.left<k.right&&v.right>k.left&&v.top<k.bottom&&v.bottom>k.top},i}(),n=new r;g.popupManager=n,g.Tooltip=o;var e=function(i){A(a,i);function a(m){m===void 0&&(m=document.body);var v=i.call(this,m)||this;v.timeout=void 0,v.lastT=0,v.idleTime=350,v.lastEvent=void 0,v.onMouseOut=v.onMouseOut.bind(v),v.onMouseMove=v.onMouseMove.bind(v),v.waitForHover=v.waitForHover.bind(v),v.hide=v.hide.bind(v);var k=v.getElement();return k.style.whiteSpace="pre-wrap",k.style.pointerEvents="auto",k.addEventListener("mouseout",v.onMouseOut),k.tabIndex=-1,k.addEventListener("blur",(function(){k.contains(document.activeElement)||this.hide()}).bind(v)),k.addEventListener("wheel",p),v}return a.prototype.addToEditor=function(m){m.on("mousemove",this.onMouseMove),m.on("mousedown",this.hide),m.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},a.prototype.removeFromEditor=function(m){m.off("mousemove",this.onMouseMove),m.off("mousedown",this.hide),m.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},a.prototype.onMouseMove=function(m,v){this.lastEvent=m,this.lastT=Date.now();var k=v.$mouseHandler.isMousePressed;if(this.isOpen){var M=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(M.row,M.column)||k||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||k||(this.lastEvent=m,this.timeout=setTimeout(this.waitForHover,this.idleTime))},a.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var m=Date.now()-this.lastT;if(this.idleTime-m>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-m);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},a.prototype.isOutsideOfText=function(m){var v=m.editor,k=m.getDocumentPosition(),M=v.session.getLine(k.row);if(k.column==M.length){var C=v.renderer.pixelToScreenCoordinates(m.clientX,m.clientY),b=v.session.documentToScreenPosition(k.row,k.column);if(b.column!=C.column||b.row!=C.row)return!0}return!1},a.prototype.setDataProvider=function(m){this.$gatherData=m},a.prototype.showForRange=function(m,v,k,M){var C=10;if(!(M&&M!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var b=m.renderer;this.isOpen||(n.addPopup(this),this.$registerCloseEvents(),this.setTheme(b.theme)),this.isOpen=!0,this.addMarker(v,m.session),this.range=c.fromPoints(v.start,v.end);var he=b.textToScreenCoordinates(v.start.row,v.start.column),Ce=b.scroller.getBoundingClientRect();he.pageX<Ce.left&&(he.pageX=Ce.left);var X=this.getElement();X.innerHTML="",X.appendChild(k),X.style.maxHeight="",X.style.display="block";var V=X.clientHeight,Xe=X.clientWidth,U=window.innerHeight-he.pageY-b.lineHeight,O=!0;he.pageY-V<0&&he.pageY<U&&(O=!1),X.style.maxHeight=(O?he.pageY:U)-C+"px",X.style.top=O?"":he.pageY+b.lineHeight+"px",X.style.bottom=O?window.innerHeight-he.pageY+"px":"",X.style.left=Math.min(he.pageX,window.innerWidth-Xe-C)+"px"}},a.prototype.addMarker=function(m,v){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=v,this.marker=v&&v.addMarker(m,"ace_highlight-marker","text")},a.prototype.hide=function(m){!m&&document.activeElement==this.getElement()||m&&m.target&&(m.type!="keydown"||m.ctrlKey||m.metaKey)&&this.$element.contains(m.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,n.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(m){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!m.relatedTarget||this.getElement().contains(m.relatedTarget)||m&&m.currentTarget.contains(m.relatedTarget)||m.relatedTarget.classList.contains("ace_content")||this.hide())},a}(o);g.HoverTooltip=e}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(f,g,ue){var A=this&&this.__extends||function(){var i=function(a,m){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,k){v.__proto__=k}||function(v,k){for(var M in k)Object.prototype.hasOwnProperty.call(k,M)&&(v[M]=k[M])},i(a,m)};return function(a,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");i(a,m);function v(){this.constructor=a}a.prototype=m===null?Object.create(m):(v.prototype=m.prototype,new v)}}(),S=this&&this.__values||function(i){var a=typeof Symbol=="function"&&Symbol.iterator,m=a&&i[a],v=0;if(m)return m.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&v>=i.length&&(i=void 0),{value:i&&i[v++],done:!i}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")},x=f("../lib/dom"),c=f("../lib/event"),p=f("../tooltip").Tooltip,t=f("../config").nls,o=5,r=3;g.GUTTER_TOOLTIP_LEFT_OFFSET=o,g.GUTTER_TOOLTIP_TOP_OFFSET=r;function n(i){var a=i.editor,m=a.renderer.$gutterLayer,v=new e(a,!0);i.editor.setDefaultHandler("guttermousedown",function(Ce){if(!(!a.isFocused()||Ce.getButton()!=0)){var X=m.getRegion(Ce);if(X!="foldWidgets"){var V=Ce.getDocumentPosition().row,Xe=a.session.selection;if(Ce.getShiftKey())Xe.selectTo(V,0);else{if(Ce.domEvent.detail==2)return a.selectAll(),Ce.preventDefault();i.$clickSelection=a.selection.getLineRange(V)}return i.setState("selectByLines"),i.captureMouse(Ce),Ce.preventDefault()}}});var k,M;function C(){var Ce=M.getDocumentPosition().row,X=a.session.getLength();if(Ce==X){var V=a.renderer.pixelToScreenCoordinates(0,M.y).row,Xe=M.$pos;if(V>a.session.documentToScreenRow(Xe.row,Xe.column))return b()}if(v.showTooltip(Ce),!!v.isOpen)if(a.on("mousewheel",b),a.on("changeSession",b),window.addEventListener("keydown",b,!0),i.$tooltipFollowsMouse)he(M);else{var U=M.getGutterRow(),O=m.$lines.get(U);if(O){var w=O.element.querySelector(".ace_gutter_annotation"),y=w.getBoundingClientRect(),T=v.getElement().style;T.left=y.right-o+"px",T.top=y.bottom-r+"px"}else he(M)}}function b(Ce){Ce&&Ce.type==="keydown"&&(Ce.ctrlKey||Ce.metaKey)||Ce&&Ce.type==="mouseout"&&(!Ce.relatedTarget||v.getElement().contains(Ce.relatedTarget))||(k&&(k=clearTimeout(k)),v.isOpen&&(v.hideTooltip(),a.off("mousewheel",b),a.off("changeSession",b),window.removeEventListener("keydown",b,!0)))}function he(Ce){v.setPosition(Ce.x,Ce.y)}i.editor.setDefaultHandler("guttermousemove",function(Ce){var X=Ce.domEvent.target||Ce.domEvent.srcElement;if(x.hasCssClass(X,"ace_fold-widget")||x.hasCssClass(X,"ace_custom-widget"))return b();v.isOpen&&i.$tooltipFollowsMouse&&he(Ce),M=Ce,!k&&(k=setTimeout(function(){k=null,M&&!i.isMousePressed&&C()},50))}),c.addListener(a.renderer.$gutter,"mouseout",function(Ce){M=null,v.isOpen&&(k=setTimeout(function(){k=null,b(Ce)},50))},a)}g.GutterHandler=n;var e=function(i){A(a,i);function a(m,v){v===void 0&&(v=!1);var k=i.call(this,m.container)||this;k.id="gt"+ ++a.$uid,k.editor=m,k.visibleTooltipRow;var M=k.getElement();return M.setAttribute("role","tooltip"),M.setAttribute("id",k.id),M.style.pointerEvents="auto",v&&(k.onMouseOut=k.onMouseOut.bind(k),M.addEventListener("mouseout",k.onMouseOut)),k}return a.prototype.onMouseOut=function(m){this.isOpen&&(!m.relatedTarget||this.getElement().contains(m.relatedTarget)||m&&m.currentTarget.contains(m.relatedTarget)||this.hideTooltip())},a.prototype.setPosition=function(m,v){var k=window.innerWidth||document.documentElement.clientWidth,M=window.innerHeight||document.documentElement.clientHeight,C=this.getWidth(),b=this.getHeight();m+=15,v+=15,m+C>k&&(m-=m+C-k),v+b>M&&(v-=20+b),p.prototype.setPosition.call(this,m,v)},Object.defineProperty(a,"annotationLabels",{get:function(){return{error:{singular:t("gutter-tooltip.aria-label.error.singular","error"),plural:t("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:t("gutter-tooltip.aria-label.security.singular","security finding"),plural:t("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:t("gutter-tooltip.aria-label.warning.singular","warning"),plural:t("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:t("gutter-tooltip.aria-label.info.singular","information message"),plural:t("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:t("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:t("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),a.prototype.showTooltip=function(m){var v,k=this.editor.renderer.$gutterLayer,M=k.$annotations[m],C;M?C={displayText:Array.from(M.displayText),type:Array.from(M.type)}:C={displayText:[],type:[]};var b=k.session.getFoldLine(m);if(b&&k.$showFoldedAnnotations){for(var he={error:[],security:[],warning:[],info:[],hint:[]},Ce={error:1,security:2,warning:3,info:4,hint:5},X,V=m+1;V<=b.end.row;V++)if(k.$annotations[V])for(var Xe=0;Xe<k.$annotations[V].text.length;Xe++){var U=k.$annotations[V].type[Xe];he[U].push(k.$annotations[V].text[Xe]),(!X||Ce[U]<Ce[X])&&(X=U)}if(["error","security","warning"].includes(X)){var O="".concat(a.annotationsToSummaryString(he)," in folded code.");C.displayText.push(O),C.type.push(X+"_fold")}}if(C.displayText.length===0)return this.hideTooltip();for(var w={error:[],security:[],warning:[],info:[],hint:[]},y=k.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",V=0;V<C.displayText.length;V++){var T=x.createElement("span"),Oe=x.createElement("span");(v=Oe.classList).add.apply(v,["ace_".concat(C.type[V]),y]),Oe.setAttribute("aria-label","".concat(a.annotationLabels[C.type[V].replace("_fold","")].singular)),Oe.setAttribute("role","img"),Oe.appendChild(x.createTextNode(" ")),T.appendChild(Oe),T.appendChild(x.createTextNode(C.displayText[V])),T.appendChild(x.createElement("br")),w[C.type[V].replace("_fold","")].push(T)}var ze=this.getElement();x.removeChildren(ze),w.error.forEach(function(pt){return ze.appendChild(pt)}),w.security.forEach(function(pt){return ze.appendChild(pt)}),w.warning.forEach(function(pt){return ze.appendChild(pt)}),w.info.forEach(function(pt){return ze.appendChild(pt)}),w.hint.forEach(function(pt){return ze.appendChild(pt)}),ze.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip"));var ft=this.$findLinkedAnnotationNode(m);ft&&ft.setAttribute("aria-describedby",this.id),this.show(),this.visibleTooltipRow=m,this.editor._signal("showGutterTooltip",this)},a.prototype.$findLinkedAnnotationNode=function(m){var v=this.$findCellByRow(m);if(v){var k=v.element;if(k.childNodes.length>2)return k.childNodes[2]}},a.prototype.$findCellByRow=function(m){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(v){return v.row===m})},a.prototype.hideTooltip=function(){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.hide(),this.visibleTooltipRow!=null){var m=this.$findLinkedAnnotationNode(this.visibleTooltipRow);m&&m.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this)}},a.annotationsToSummaryString=function(m){var v,k,M=[],C=["error","security","warning","info","hint"];try{for(var b=S(C),he=b.next();!he.done;he=b.next()){var Ce=he.value;if(m[Ce].length){var X=m[Ce].length===1?a.annotationLabels[Ce].singular:a.annotationLabels[Ce].plural;M.push("".concat(m[Ce].length," ").concat(X))}}}catch(V){v={error:V}}finally{try{he&&!he.done&&(k=b.return)&&k.call(b)}finally{if(v)throw v.error}}return M.join(", ")},a}(p);e.$uid=0,g.GutterTooltip=e}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(f,g,ue){var A=f("../lib/event"),S=f("../lib/useragent"),x=function(){function c(p,t){this.speed,this.wheelX,this.wheelY,this.domEvent=p,this.editor=t,this.x=this.clientX=p.clientX,this.y=this.clientY=p.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return c.prototype.stopPropagation=function(){A.stopPropagation(this.domEvent),this.propagationStopped=!0},c.prototype.preventDefault=function(){A.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 p=this.getDocumentPosition().row,t=this.editor.session.documentToScreenRow(p,0),o=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return t-o},c.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var p=this.editor,t=p.getSelectionRange();if(t.isEmpty())this.$inSelection=!1;else{var o=this.getDocumentPosition();this.$inSelection=t.contains(o.row,o.column)}return this.$inSelection},c.prototype.getButton=function(){return A.getButton(this.domEvent)},c.prototype.getShiftKey=function(){return this.domEvent.shiftKey},c.prototype.getAccelKey=function(){return S.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},c}();g.MouseEvent=x}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(f,g,ue){var A=f("../lib/dom"),S=f("../lib/event"),x=f("../lib/useragent"),c=200,p=200,t=5;function o(n){var e=n.editor,i=A.createElement("div");i.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",i.textContent=" ";var a=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];a.forEach(function(mt){n[mt]=this[mt]},this),e.on("mousedown",this.onMouseDown.bind(n));var m=e.container,v,k,M,C,b,he,Ce=0,X,V,Xe,U,O;this.onDragStart=function(mt){if(this.cancelDrag||!m.draggable){var Vt=this;return setTimeout(function(){Vt.startSelect(),Vt.captureMouse(mt)},0),mt.preventDefault()}b=e.getSelectionRange();var Gt=mt.dataTransfer;Gt.effectAllowed=e.getReadOnly()?"copy":"copyMove",e.container.appendChild(i),Gt.setDragImage&&Gt.setDragImage(i,0,0),setTimeout(function(){e.container.removeChild(i)}),Gt.clearData(),Gt.setData("Text",e.session.getTextRange()),V=!0,this.setState("drag")},this.onDragEnd=function(mt){if(m.draggable=!1,V=!1,this.setState(null),!e.getReadOnly()){var Vt=mt.dataTransfer.dropEffect;!X&&Vt=="move"&&e.session.remove(e.getSelectionRange()),e.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(mt){if(!(e.getReadOnly()||!gt(mt.dataTransfer)))return k=mt.clientX,M=mt.clientY,v||Oe(),Ce++,mt.dataTransfer.dropEffect=X=Qt(mt),S.preventDefault(mt)},this.onDragOver=function(mt){if(!(e.getReadOnly()||!gt(mt.dataTransfer)))return k=mt.clientX,M=mt.clientY,v||(Oe(),Ce++),ft!==null&&(ft=null),mt.dataTransfer.dropEffect=X=Qt(mt),S.preventDefault(mt)},this.onDragLeave=function(mt){if(Ce--,Ce<=0&&v)return ze(),X=null,S.preventDefault(mt)},this.onDrop=function(mt){if(he){var Vt=mt.dataTransfer;if(V)switch(X){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 Gt=Vt.getData("Text");b={start:he,end:e.session.insert(he,Gt)},e.focus(),X=null}return ze(),S.preventDefault(mt)}},S.addListener(m,"dragstart",this.onDragStart.bind(n),e),S.addListener(m,"dragend",this.onDragEnd.bind(n),e),S.addListener(m,"dragenter",this.onDragEnter.bind(n),e),S.addListener(m,"dragover",this.onDragOver.bind(n),e),S.addListener(m,"dragleave",this.onDragLeave.bind(n),e),S.addListener(m,"drop",this.onDrop.bind(n),e);function w(mt,Vt){var Gt=Date.now(),Yt=!Vt||mt.row!=Vt.row,Zt=!Vt||mt.column!=Vt.column;if(!U||Yt||Zt)e.moveCursorToPosition(mt),U=Gt,O={x:k,y:M};else{var Xt=r(O.x,O.y,k,M);Xt>t?U=null:Gt-U>=p&&(e.renderer.scrollCursorIntoView(),U=null)}}function y(mt,Vt){var Gt=Date.now(),Yt=e.renderer.layerConfig.lineHeight,Zt=e.renderer.layerConfig.characterWidth,Xt=e.renderer.scroller.getBoundingClientRect(),di={x:{left:k-Xt.left,right:Xt.right-k},y:{top:M-Xt.top,bottom:Xt.bottom-M}},sn=Math.min(di.x.left,di.x.right),fi=Math.min(di.y.top,di.y.bottom),pi={row:mt.row,column:mt.column};sn/Zt<=2&&(pi.column+=di.x.left<di.x.right?-3:2),fi/Yt<=1&&(pi.row+=di.y.top<di.y.bottom?-1:1);var vi=mt.row!=pi.row,yi=mt.column!=pi.column,mi=!Vt||mt.row!=Vt.row;vi||yi&&!mi?Xe?Gt-Xe>=c&&e.renderer.scrollCursorIntoView(pi):Xe=Gt:Xe=null}function T(){var mt=he;he=e.renderer.screenToTextCoordinates(k,M),w(he,mt),y(he,mt)}function Oe(){b=e.selection.toOrientedRange(),v=e.session.addMarker(b,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval(C),T(),C=setInterval(T,20),Ce=0,S.addListener(document,"mousemove",pt)}function ze(){clearInterval(C),e.session.removeMarker(v),v=null,e.selection.fromOrientedRange(b),e.isFocused()&&!V&&e.$resetCursorStyle(),b=null,he=null,Ce=0,Xe=null,U=null,S.removeListener(document,"mousemove",pt)}var ft=null;function pt(){ft==null&&(ft=setTimeout(function(){ft!=null&&v&&ze()},20))}function gt(mt){var Vt=mt.types;return!Vt||Array.prototype.some.call(Vt,function(Gt){return Gt=="text/plain"||Gt=="Text"})}function Qt(mt){var Vt=["copy","copymove","all","uninitialized"],Gt=["move","copymove","linkmove","all","uninitialized"],Yt=x.isMac?mt.altKey:mt.ctrlKey,Zt="uninitialized";try{Zt=mt.dataTransfer.effectAllowed.toLowerCase()}catch{}var Xt="none";return Yt&&Vt.indexOf(Zt)>=0?Xt="copy":Gt.indexOf(Zt)>=0?Xt="move":Vt.indexOf(Zt)>=0&&(Xt="copy"),Xt}}(function(){this.dragWait=function(){var n=Date.now()-this.mousedownEvent.time;n>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var n=this.editor.container;n.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(n){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var n=this.editor,e=n.container;e.draggable=!0,n.renderer.$cursorLayer.setBlinking(!1),n.setStyle("ace_dragging");var i=x.isWin?"default":"move";n.renderer.setCursorStyle(i),this.setState("dragReady")},this.onMouseDrag=function(n){var e=this.editor.container;if(x.isIE&&this.state=="dragReady"){var i=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);i>3&&e.dragDrop()}if(this.state==="dragWait"){var i=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);i>0&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(n){if(this.$dragEnabled){this.mousedownEvent=n;var e=this.editor,i=n.inSelection(),a=n.getButton(),m=n.domEvent.detail||1;if(m===1&&a===0&&i){if(n.editor.inMultiSelectMode&&(n.getAccelKey()||n.getShiftKey()))return;this.mousedownEvent.time=Date.now();var v=n.domEvent.target||n.domEvent.srcElement;if("unselectable"in v&&(v.unselectable="on"),e.getDragDelay()){if(x.isWebKit){this.cancelDrag=!0;var k=e.container;k.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(n,this.onMouseDrag.bind(this)),n.defaultPrevented=!0}}}}).call(o.prototype);function r(n,e,i,a){return Math.sqrt(Math.pow(i-n,2)+Math.pow(a-e,2))}g.DragdropHandler=o}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(f,g,ue){var A=f("./mouse_event").MouseEvent,S=f("../lib/event"),x=f("../lib/dom");g.addTouchListeners=function(c,p){var t="scroll",o,r,n,e,i,a,m=0,v,k=0,M=0,C=0,b,he;function Ce(){var w=window.navigator&&window.navigator.clipboard,y=!1,T=function(){var ft=p.getCopyText(),pt=p.session.getUndoManager().hasUndo();he.replaceChild(x.buildDom(y?["span",!ft&&Oe("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],ft&&Oe("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],ft&&Oe("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],w&&Oe("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],pt&&Oe("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],Oe("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],Oe("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),he.firstChild)},Oe=function(ft){return p.commands.canExecute(ft,p)},ze=function(ft){var pt=ft.target.getAttribute("action");if(pt=="more"||!y)return y=!y,T();pt=="paste"?w.readText().then(function(gt){p.execCommand(pt,gt)}):pt&&((pt=="cut"||pt=="copy")&&(w?w.writeText(p.getCopyText()):document.execCommand("copy")),p.execCommand(pt)),he.firstChild.style.display="none",y=!1,pt!="openCommandPalette"&&p.focus()};he=x.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(ft){t="menu",ft.stopPropagation(),ft.preventDefault(),p.textInput.focus()},ontouchend:function(ft){ft.stopPropagation(),ft.preventDefault(),ze(ft)},onclick:ze},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],p.container)}function X(){if(!p.getOption("enableMobileMenu")){he&&V();return}he||Ce();var w=p.selection.cursor,y=p.renderer.textToScreenCoordinates(w.row,w.column),T=p.renderer.textToScreenCoordinates(0,0).pageX,Oe=p.renderer.scrollLeft,ze=p.container.getBoundingClientRect();he.style.top=y.pageY-ze.top-3+"px",y.pageX-ze.left<ze.width-70?(he.style.left="",he.style.right="10px"):(he.style.right="",he.style.left=T+Oe-ze.left+"px"),he.style.display="",he.firstChild.style.display="none",p.on("input",V)}function V(w){he&&(he.style.display="none"),p.off("input",V)}function Xe(){i=null,clearTimeout(i);var w=p.selection.getRange(),y=w.contains(v.row,v.column);(w.isEmpty()||!y)&&(p.selection.moveToPosition(v),p.selection.selectWord()),t="wait",X()}function U(){i=null,clearTimeout(i),p.selection.moveToPosition(v);var w=k>=2?p.selection.getLineRange(v.row):p.session.getBracketRange(v);w&&!w.isEmpty()?p.selection.setRange(w):p.selection.selectWord(),t="wait"}S.addListener(c,"contextmenu",function(w){if(b){var y=p.textInput.getElement();y.focus()}},p),S.addListener(c,"touchstart",function(w){var y=w.touches;if(i||y.length>1){clearTimeout(i),i=null,n=-1,t="zoom";return}b=p.$mouseHandler.isMousePressed=!0;var T=p.renderer.layerConfig.lineHeight,Oe=p.renderer.layerConfig.lineHeight,ze=w.timeStamp;e=ze;var ft=y[0],pt=ft.clientX,gt=ft.clientY;Math.abs(o-pt)+Math.abs(r-gt)>T&&(n=-1),o=w.clientX=pt,r=w.clientY=gt,M=C=0;var Qt=new A(w,p);if(v=Qt.getDocumentPosition(),ze-n<500&&y.length==1&&!m)k++,w.preventDefault(),w.button=0,U();else{k=0;var mt=p.selection.cursor,Vt=p.selection.isEmpty()?mt:p.selection.anchor,Gt=p.renderer.$cursorLayer.getPixelPosition(mt,!0),Yt=p.renderer.$cursorLayer.getPixelPosition(Vt,!0),Zt=p.renderer.scroller.getBoundingClientRect(),Xt=p.renderer.layerConfig.offset,di=p.renderer.scrollLeft,sn=function(vi,yi){return vi=vi/Oe,yi=yi/T-.75,vi*vi+yi*yi};if(w.clientX<Zt.left){t="zoom";return}var fi=sn(w.clientX-Zt.left-Gt.left+di,w.clientY-Zt.top-Gt.top+Xt),pi=sn(w.clientX-Zt.left-Yt.left+di,w.clientY-Zt.top-Yt.top+Xt);fi<3.5&&pi<3.5&&(t=fi>pi?"cursor":"anchor"),pi<3.5?t="anchor":fi<3.5?t="cursor":t="scroll",i=setTimeout(Xe,450)}n=ze},p),S.addListener(c,"touchend",function(w){b=p.$mouseHandler.isMousePressed=!1,a&&clearInterval(a),t=="zoom"?(t="",m=0):i?(p.selection.moveToPosition(v),m=0,X()):t=="scroll"?(O(),V()):X(),clearTimeout(i),i=null},p),S.addListener(c,"touchmove",function(w){i&&(clearTimeout(i),i=null);var y=w.touches;if(!(y.length>1||t=="zoom")){var T=y[0],Oe=o-T.clientX,ze=r-T.clientY;if(t=="wait")if(Oe*Oe+ze*ze>4)t="cursor";else return w.preventDefault();o=T.clientX,r=T.clientY,w.clientX=T.clientX,w.clientY=T.clientY;var ft=w.timeStamp,pt=ft-e;if(e=ft,t=="scroll"){var gt=new A(w,p);gt.speed=1,gt.wheelX=Oe,gt.wheelY=ze,10*Math.abs(Oe)<Math.abs(ze)&&(Oe=0),10*Math.abs(ze)<Math.abs(Oe)&&(ze=0),pt!=0&&(M=Oe/pt,C=ze/pt),p._emit("mousewheel",gt),gt.propagationStopped||(M=C=0)}else{var Qt=new A(w,p),mt=Qt.getDocumentPosition();t=="cursor"?p.selection.moveCursorToPosition(mt):t=="anchor"&&p.selection.setSelectionAnchor(mt.row,mt.column),p.renderer.scrollCursorIntoView(mt),w.preventDefault()}}},p);function O(){m+=60,a=setInterval(function(){m--<=0&&(clearInterval(a),a=null),Math.abs(M)<.01&&(M=0),Math.abs(C)<.01&&(C=0),m<20&&(M=.9*M),m<20&&(C=.9*C);var w=p.session.getScrollTop();p.renderer.scrollBy(10*M,10*C),w==p.session.getScrollTop()&&(m=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(f,g,ue){var A=f("../lib/event"),S=f("../lib/useragent"),x=f("./default_handlers").DefaultHandlers,c=f("./default_gutter_handler").GutterHandler,p=f("./mouse_event").MouseEvent,t=f("./dragdrop_handler").DragdropHandler,o=f("./touch_handler").addTouchListeners,r=f("../config"),n=function(){function e(i){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var a=this;this.editor=i,new x(this),new c(this),new t(this);var m=function(M){var C=!document.hasFocus||!document.hasFocus()||!i.isFocused()&&document.activeElement==(i.textInput&&i.textInput.getElement());C&&window.focus(),i.focus(),setTimeout(function(){i.isFocused()||i.focus()})},v=i.renderer.getMouseEventTarget();A.addListener(v,"click",this.onMouseEvent.bind(this,"click"),i),A.addListener(v,"mousemove",this.onMouseMove.bind(this,"mousemove"),i),A.addMultiMouseDownListener([v,i.renderer.scrollBarV&&i.renderer.scrollBarV.inner,i.renderer.scrollBarH&&i.renderer.scrollBarH.inner,i.textInput&&i.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",i),A.addMouseWheelListener(i.container,this.onMouseWheel.bind(this,"mousewheel"),i),o(i.container,i);var k=i.renderer.$gutter;A.addListener(k,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),i),A.addListener(k,"click",this.onMouseEvent.bind(this,"gutterclick"),i),A.addListener(k,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),i),A.addListener(k,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),i),A.addListener(v,"mousedown",m,i),A.addListener(k,"mousedown",m,i),S.isIE&&i.renderer.scrollBarV&&(A.addListener(i.renderer.scrollBarV.element,"mousedown",m,i),A.addListener(i.renderer.scrollBarH.element,"mousedown",m,i)),i.on("mousemove",function(M){if(!(a.state||a.$dragDelay||!a.$dragEnabled)){var C=i.renderer.screenToTextCoordinates(M.x,M.y),b=i.session.selection.getRange(),he=i.renderer;!b.isEmpty()&&b.insideStart(C.row,C.column)?he.setCursorStyle("default"):he.setCursorStyle("")}},i)}return e.prototype.onMouseEvent=function(i,a){this.editor.session&&this.editor._emit(i,new p(a,this.editor))},e.prototype.onMouseMove=function(i,a){var m=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!m||!m.length||this.editor._emit(i,new p(a,this.editor))},e.prototype.onMouseWheel=function(i,a){var m=new p(a,this.editor);m.speed=this.$scrollSpeed*2,m.wheelX=a.wheelX,m.wheelY=a.wheelY,this.editor._emit(i,m)},e.prototype.setState=function(i){this.state=i},e.prototype.captureMouse=function(i,a){this.x=i.x,this.y=i.y,this.isMousePressed=!0;var m=this.editor,v=this.editor.renderer;v.$isMousePressed=!0;var k=this,M=!0,C=function(V){if(V){if(S.isWebKit&&!V.which&&k.releaseMouse)return k.releaseMouse();k.x=V.clientX,k.y=V.clientY,a&&a(V),k.mouseEvent=new p(V,k.editor),k.$mouseMoved=!0}},b=function(V){m.off("beforeEndOperation",X),M=!1,m.session&&he(),k[k.state+"End"]&&k[k.state+"End"](V),k.state="",k.isMousePressed=v.$isMousePressed=!1,v.$keepTextAreaAtCursor&&v.$moveTextAreaToCursor(),k.$onCaptureMouseMove=k.releaseMouse=null,V&&k.onMouseEvent("mouseup",V),m.endOperation()},he=function(){k[k.state]&&k[k.state](),k.$mouseMoved=!1},Ce=function(){M&&(he(),A.nextFrame(Ce))};if(S.isOldIE&&i.domEvent.type=="dblclick")return setTimeout(function(){b(i)});var X=function(V){k.releaseMouse&&m.curOp.command.name&&m.curOp.selectionChanged&&(k[k.state+"End"]&&k[k.state+"End"](),k.state="",k.releaseMouse())};m.on("beforeEndOperation",X),m.startOperation({command:{name:"mouse"}}),k.$onCaptureMouseMove=C,k.releaseMouse=A.capture(this.editor.container,C,b),Ce()},e.prototype.cancelContextMenu=function(){var i=(function(a){a&&a.domEvent&&a.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",i),a&&a.domEvent&&A.stopEvent(a.domEvent))}).bind(this);setTimeout(i,10),this.editor.on("nativecontextmenu",i)},e.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},e}();n.prototype.releaseMouse=null,r.defineOptions(n.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:S.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),g.MouseHandler=n}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(f,g,ue){var A=f("../lib/dom"),S=function(){function x(c){c.on("click",function(p){var t=p.getDocumentPosition(),o=c.session,r=o.getFoldAt(t.row,t.column,1);r&&(p.getAccelKey()?o.removeFold(r):o.expandFold(r),p.stop());var n=p.domEvent&&p.domEvent.target;n&&A.hasCssClass(n,"ace_inline_button")&&A.hasCssClass(n,"ace_toggle_wrap")&&(o.setOption("wrap",!o.getUseWrapMode()),c.renderer.scrollCursorIntoView())}),c.on("gutterclick",function(p){var t=c.renderer.$gutterLayer.getRegion(p);if(t=="foldWidgets"){var o=p.getDocumentPosition().row,r=c.session;r.foldWidgets&&r.foldWidgets[o]&&c.session.onFoldWidgetClick(o,p),c.isFocused()||c.focus(),p.stop()}}),c.on("gutterdblclick",function(p){var t=c.renderer.$gutterLayer.getRegion(p);if(t=="foldWidgets"){var o=p.getDocumentPosition().row,r=c.session,n=r.getParentFoldRangeData(o,!0),e=n.range||n.firstRange;if(e){o=e.start.row;var i=r.getFoldAt(o,r.getLine(o).length,1);i?r.removeFold(i):(r.addFold("...",e),c.renderer.scrollCursorIntoView({row:e.start.row,column:0}))}p.stop()}})}return x}();g.FoldHandler=S}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(f,g,ue){var A=f("../lib/keys"),S=f("../lib/event"),x=function(){function c(p){this.$editor=p,this.$data={editor:p},this.$handlers=[],this.setDefaultHandler(p.commands)}return c.prototype.setDefaultHandler=function(p){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=p,this.addKeyboardHandler(p,0)},c.prototype.setKeyboardHandler=function(p){var t=this.$handlers;if(t[t.length-1]!=p){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(p,1)}},c.prototype.addKeyboardHandler=function(p,t){if(p){typeof p=="function"&&!p.handleKeyboard&&(p.handleKeyboard=p);var o=this.$handlers.indexOf(p);o!=-1&&this.$handlers.splice(o,1),t==null?this.$handlers.push(p):this.$handlers.splice(t,0,p),o==-1&&p.attach&&p.attach(this.$editor)}},c.prototype.removeKeyboardHandler=function(p){var t=this.$handlers.indexOf(p);return t==-1?!1:(this.$handlers.splice(t,1),p.detach&&p.detach(this.$editor),!0)},c.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},c.prototype.getStatusText=function(){var p=this.$data,t=p.editor;return this.$handlers.map(function(o){return o.getStatusText&&o.getStatusText(t,p)||""}).filter(Boolean).join(" ")},c.prototype.$callKeyboardHandlers=function(p,t,o,r){for(var n,e=!1,i=this.$editor.commands,a=this.$handlers.length;a--&&(n=this.$handlers[a].handleKeyboard(this.$data,p,t,o,r),!(!(!n||!n.command)&&(n.command=="null"?e=!0:e=i.exec(n.command,this.$editor,n.args,r),e&&r&&p!=-1&&n.passEvent!=!0&&n.command.passEvent!=!0&&S.stopEvent(r),e))););return!e&&p==-1&&(n={command:"insertstring"},e=i.exec("insertstring",this.$editor,t)),e&&this.$editor._signal&&this.$editor._signal("keyboardActivity",n),e},c.prototype.onCommandKey=function(p,t,o){var r=A.keyCodeToString(o);return this.$callKeyboardHandlers(t,r,o,p)},c.prototype.onTextInput=function(p){return this.$callKeyboardHandlers(-1,p)},c}();g.KeyBinding=x}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(f,g,ue){var A=0,S=0,x=!1,c=!1,p=!1,t=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],o=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],r=0,n=1,e=0,i=1,a=2,m=3,v=4,k=5,M=6,C=7,b=8,he=9,Ce=10,X=11,V=12,Xe=13,U=14,O=15,w=16,y=17,T=18,Oe=[T,T,T,T,T,T,T,T,T,M,k,M,b,k,T,T,T,T,T,T,T,T,T,T,T,T,T,T,k,k,k,M,b,v,v,X,X,X,v,v,v,v,v,Ce,he,Ce,he,he,a,a,a,a,a,a,a,a,a,a,he,v,v,v,v,v,v,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,v,v,v,v,v,v,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,v,v,v,v,T,T,T,T,T,T,k,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,v,X,X,X,X,v,v,v,v,e,v,v,T,v,v,X,X,a,a,v,e,v,v,v,a,e,v,v,v,v,v],ze=[b,b,b,b,b,b,b,b,b,b,b,T,T,T,e,i,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,b,k,Xe,U,O,w,y,he,X,X,X,X,X,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,he,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,b];function ft(mt,Vt,Gt,Yt){var Zt=A?o:t,Xt=null,di=null,sn=null,fi=0,pi=null,vi=null,yi=-1,mi=null,wi=null,Ci=[];if(!Yt)for(mi=0,Yt=[];mi<Gt;mi++)Yt[mi]=Qt(mt[mi]);for(S=A,x=!1,c=!1,p=!1,wi=0;wi<Gt;wi++){if(Xt=fi,Ci[wi]=di=gt(mt,Yt,Ci,wi),fi=Zt[Xt][di],pi=fi&240,fi&=15,Vt[wi]=sn=Zt[fi][5],pi>0)if(pi==16){for(mi=yi;mi<wi;mi++)Vt[mi]=1;yi=-1}else yi=-1;if(vi=Zt[fi][6],vi)yi==-1&&(yi=wi);else if(yi>-1){for(mi=yi;mi<wi;mi++)Vt[mi]=sn;yi=-1}Yt[wi]==k&&(Vt[wi]=0),S|=sn}if(p){for(mi=0;mi<Gt;mi++)if(Yt[mi]==M){Vt[mi]=A;for(var bi=mi-1;bi>=0&&Yt[bi]==b;bi--)Vt[bi]=A}}}function pt(mt,Vt,Gt){if(!(S<mt)){if(mt==1&&A==n&&!c){Gt.reverse();return}for(var Yt=Gt.length,Zt=0,Xt,di,sn,fi;Zt<Yt;){if(Vt[Zt]>=mt){for(Xt=Zt+1;Xt<Yt&&Vt[Xt]>=mt;)Xt++;for(di=Zt,sn=Xt-1;di<sn;di++,sn--)fi=Gt[di],Gt[di]=Gt[sn],Gt[sn]=fi;Zt=Xt}Zt++}}}function gt(mt,Vt,Gt,Yt){var Zt=Vt[Yt],Xt,di,sn,fi;switch(Zt){case e:case i:x=!1;case v:case m:return Zt;case a:return x?m:a;case C:return x=!0,i;case b:return v;case he:return Yt<1||Yt+1>=Vt.length||(Xt=Gt[Yt-1])!=a&&Xt!=m||(di=Vt[Yt+1])!=a&&di!=m?v:(x&&(di=m),di==Xt?di:v);case Ce:return Xt=Yt>0?Gt[Yt-1]:k,Xt==a&&Yt+1<Vt.length&&Vt[Yt+1]==a?a:v;case X:if(Yt>0&&Gt[Yt-1]==a)return a;if(x)return v;for(fi=Yt+1,sn=Vt.length;fi<sn&&Vt[fi]==X;)fi++;return fi<sn&&Vt[fi]==a?a:v;case V:for(sn=Vt.length,fi=Yt+1;fi<sn&&Vt[fi]==V;)fi++;if(fi<sn){var pi=mt[Yt],vi=pi>=1425&&pi<=2303||pi==64286;if(Xt=Vt[fi],vi&&(Xt==i||Xt==C))return i}return Yt<1||(Xt=Vt[Yt-1])==k?v:Gt[Yt-1];case k:return x=!1,c=!0,A;case M:return p=!0,v;case Xe:case U:case w:case y:case O:x=!1;case T:return v}}function Qt(mt){var Vt=mt.charCodeAt(0),Gt=Vt>>8;return Gt==0?Vt>191?e:Oe[Vt]:Gt==5?/[\u0591-\u05f4]/.test(mt)?i:e:Gt==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(mt)?V:/[\u0660-\u0669\u066b-\u066c]/.test(mt)?m:Vt==1642?X:/[\u06f0-\u06f9]/.test(mt)?a:C:Gt==32&&Vt<=8287?ze[Vt&255]:Gt==254&&Vt>=65136?C:v}g.L=e,g.R=i,g.EN=a,g.ON_R=3,g.AN=4,g.R_H=5,g.B=6,g.RLE=7,g.DOT="·",g.doBidiReorder=function(mt,Vt,Gt){if(mt.length<2)return{};var Yt=mt.split(""),Zt=new Array(Yt.length),Xt=new Array(Yt.length),di=[];A=Gt?n:r,ft(Yt,di,Yt.length,Vt);for(var sn=0;sn<Zt.length;Zt[sn]=sn,sn++);pt(2,di,Zt),pt(1,di,Zt);for(var sn=0;sn<Zt.length-1;sn++)Vt[sn]===m?di[sn]=g.AN:di[sn]===i&&(Vt[sn]>C&&Vt[sn]<Xe||Vt[sn]===v||Vt[sn]===T)?di[sn]=g.ON_R:sn>0&&Yt[sn-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(Yt[sn])&&(di[sn-1]=di[sn]=g.R_H,sn++);Yt[Yt.length-1]===g.DOT&&(di[Yt.length-1]=g.B),Yt[0]==="‫"&&(di[0]=g.RLE);for(var sn=0;sn<Zt.length;sn++)Xt[sn]=di[Zt[sn]];return{logicalFromVisual:Zt,bidiLevels:Xt}},g.hasBidiCharacters=function(mt,Vt){for(var Gt=!1,Yt=0;Yt<mt.length;Yt++)Vt[Yt]=Qt(mt.charAt(Yt)),!Gt&&(Vt[Yt]==i||Vt[Yt]==C||Vt[Yt]==m)&&(Gt=!0);return Gt},g.getVisualFromLogicalIdx=function(mt,Vt){for(var Gt=0;Gt<Vt.logicalFromVisual.length;Gt++)if(Vt.logicalFromVisual[Gt]==mt)return Gt;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(f,g,ue){var A=f("./lib/bidiutil"),S=f("./lib/lang"),x=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,c=function(){function p(t){this.session=t,this.bidiMap={},this.currentRow=null,this.bidiUtil=A,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="‫",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=x.test(t.getValue())}return p.prototype.isBidiRow=function(t,o,r){return this.seenBidi?(t!==this.currentRow&&(this.currentRow=t,this.updateRowLine(o,r),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},p.prototype.onChange=function(t){this.seenBidi?this.currentRow=null:t.action=="insert"&&x.test(t.lines.join(`
182
+ `))&&(this.seenBidi=!0,this.currentRow=null)},p.prototype.getDocumentRow=function(){var t=0,o=this.session.$screenRowCache;if(o.length){var r=this.session.$getRowCacheIndex(o,this.currentRow);r>=0&&(t=this.session.$docRowCache[r])}return t},p.prototype.getSplitIndex=function(){var t=0,o=this.session.$screenRowCache;if(o.length)for(var r,n=this.session.$getRowCacheIndex(o,this.currentRow);this.currentRow-t>0&&(r=this.session.$getRowCacheIndex(o,this.currentRow-t-1),r===n);)n=r,t++;else t=this.currentRow;return t},p.prototype.updateRowLine=function(t,o){t===void 0&&(t=this.getDocumentRow());var r=t===this.session.getLength()-1,n=r?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(t),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var e=this.session.$wrapData[t];e&&(o===void 0&&(o=this.getSplitIndex()),o>0&&e.length?(this.wrapIndent=e.indent,this.wrapOffset=this.wrapIndent*this.charWidths[A.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?n:A.DOT))}else this.line+=this.showInvisibles?n:A.DOT;var i=this.session,a=0,m;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(v,k){return v===" "||i.isFullWidth(v.charCodeAt(0))?(m=v===" "?i.getScreenTabSize(k+a):2,a+=m-1,S.stringRepeat(A.DOT,m)):v}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==A.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},p.prototype.updateBidiMap=function(){var t=[];A.hasBidiCharacters(this.line,t)||this.isRtlDir?this.bidiMap=A.doBidiReorder(this.line,t,this.isRtlDir):this.bidiMap={}},p.prototype.markAsDirty=function(){this.currentRow=null},p.prototype.updateCharacterWidths=function(t){if(this.characterWidth!==t.$characterSize.width){this.fontMetrics=t;var o=this.characterWidth=t.$characterSize.width,r=t.$measureCharWidth("ה");this.charWidths[A.L]=this.charWidths[A.EN]=this.charWidths[A.ON_R]=o,this.charWidths[A.R]=this.charWidths[A.AN]=r,this.charWidths[A.R_H]=r*.45,this.charWidths[A.B]=this.charWidths[A.RLE]=0,this.currentRow=null}},p.prototype.setShowInvisibles=function(t){this.showInvisibles=t,this.currentRow=null},p.prototype.setEolChar=function(t){this.EOL=t},p.prototype.setContentWidth=function(t){this.contentWidth=t},p.prototype.isRtlLine=function(t){return this.$isRtl?!0:t!=null?this.session.getLine(t).charAt(0)==this.RLE:this.isRtlDir},p.prototype.setRtlDirection=function(t,o){for(var r=t.getCursorPosition(),n=t.selection.getSelectionAnchor().row;n<=r.row;n++)!o&&t.session.getLine(n).charAt(0)===t.session.$bidiHandler.RLE?t.session.doc.removeInLine(n,0,1):o&&t.session.getLine(n).charAt(0)!==t.session.$bidiHandler.RLE&&t.session.doc.insert({column:0,row:n},t.session.$bidiHandler.RLE)},p.prototype.getPosLeft=function(t){t-=this.wrapIndent;var o=this.line.charAt(0)===this.RLE?1:0,r=t>o?this.session.getOverwrite()?t:t-1:o,n=A.getVisualFromLogicalIdx(r,this.bidiMap),e=this.bidiMap.bidiLevels,i=0;!this.session.getOverwrite()&&t<=o&&e[n]%2!==0&&n++;for(var a=0;a<n;a++)i+=this.charWidths[e[a]];return!this.session.getOverwrite()&&t>o&&e[n]%2===0&&(i+=this.charWidths[e[n]]),this.wrapIndent&&(i+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(i+=this.rtlLineOffset),i},p.prototype.getSelections=function(t,o){var r=this.bidiMap,n=r.bidiLevels,e,i=[],a=0,m=Math.min(t,o)-this.wrapIndent,v=Math.max(t,o)-this.wrapIndent,k=!1,M=!1,C=0;this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var b,he=0;he<n.length;he++)b=r.logicalFromVisual[he],e=n[he],k=b>=m&&b<v,k&&!M?C=a:!k&&M&&i.push({left:C,width:a-C}),a+=this.charWidths[e],M=k;if(k&&he===n.length&&i.push({left:C,width:a-C}),this.isRtlDir)for(var Ce=0;Ce<i.length;Ce++)i[Ce].left+=this.rtlLineOffset;return i},p.prototype.offsetToCol=function(r){this.isRtlDir&&(r-=this.rtlLineOffset);var o=0,r=Math.max(r,0),n=0,e=0,i=this.bidiMap.bidiLevels,a=this.charWidths[i[e]];for(this.wrapIndent&&(r-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);r>n+a/2;){if(n+=a,e===i.length-1){a=0;break}a=this.charWidths[i[++e]]}return e>0&&i[e-1]%2!==0&&i[e]%2===0?(r<n&&e--,o=this.bidiMap.logicalFromVisual[e]):e>0&&i[e-1]%2===0&&i[e]%2!==0?o=1+(r>n?this.bidiMap.logicalFromVisual[e]:this.bidiMap.logicalFromVisual[e-1]):this.isRtlDir&&e===i.length-1&&a===0&&i[e-1]%2===0||!this.isRtlDir&&e===0&&i[e]%2!==0?o=1+this.bidiMap.logicalFromVisual[e]:(e>0&&i[e-1]%2!==0&&a!==0&&e--,o=this.bidiMap.logicalFromVisual[e]),o===0&&this.isRtlDir&&o++,o+this.wrapIndent},p}();g.BidiHandler=c}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(f,g,ue){var A=f("./lib/oop"),S=f("./lib/lang"),x=f("./lib/event_emitter").EventEmitter,c=f("./range").Range,p=function(){function t(o){this.session=o,this.doc=o.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var r=this;this.cursor.on("change",function(n){r.$cursorChanged=!0,r.$silent||r._emit("changeCursor"),!r.$isEmpty&&!r.$silent&&r._emit("changeSelection"),!r.$keepDesiredColumnOnChange&&n.old.column!=n.value.column&&(r.$desiredColumn=null)}),this.anchor.on("change",function(){r.$anchorChanged=!0,!r.$isEmpty&&!r.$silent&&r._emit("changeSelection")})}return t.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},t.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},t.prototype.getCursor=function(){return this.lead.getPosition()},t.prototype.setAnchor=function(o,r){this.$isEmpty=!1,this.anchor.setPosition(o,r)},t.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},t.prototype.getSelectionLead=function(){return this.lead.getPosition()},t.prototype.isBackwards=function(){var o=this.anchor,r=this.lead;return o.row>r.row||o.row==r.row&&o.column>r.column},t.prototype.getRange=function(){var o=this.anchor,r=this.lead;return this.$isEmpty?c.fromPoints(r,r):this.isBackwards()?c.fromPoints(r,o):c.fromPoints(o,r)},t.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},t.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},t.prototype.setRange=function(o,r){var n=r?o.end:o.start,e=r?o.start:o.end;this.$setSelection(n.row,n.column,e.row,e.column)},t.prototype.$setSelection=function(o,r,n,e){if(!this.$silent){var i=this.$isEmpty,a=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(o,r),this.cursor.setPosition(n,e),this.$isEmpty=!c.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||i!=this.$isEmpty||a)&&this._emit("changeSelection")}},t.prototype.$moveSelection=function(o){var r=this.lead;this.$isEmpty&&this.setSelectionAnchor(r.row,r.column),o.call(this)},t.prototype.selectTo=function(o,r){this.$moveSelection(function(){this.moveCursorTo(o,r)})},t.prototype.selectToPosition=function(o){this.$moveSelection(function(){this.moveCursorToPosition(o)})},t.prototype.moveTo=function(o,r){this.clearSelection(),this.moveCursorTo(o,r)},t.prototype.moveToPosition=function(o){this.clearSelection(),this.moveCursorToPosition(o)},t.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},t.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},t.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},t.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},t.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},t.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},t.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},t.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},t.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},t.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},t.prototype.getWordRange=function(o,r){if(typeof r>"u"){var n=o||this.lead;o=n.row,r=n.column}return this.session.getWordRange(o,r)},t.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},t.prototype.selectAWord=function(){var o=this.getCursor(),r=this.session.getAWordRange(o.row,o.column);this.setSelectionRange(r)},t.prototype.getLineRange=function(o,r){var n=typeof o=="number"?o:this.lead.row,e,i=this.session.getFoldLine(n);return i?(n=i.start.row,e=i.end.row):e=n,r===!0?new c(n,0,e,this.session.getLine(e).length):new c(n,0,e+1,0)},t.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},t.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},t.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},t.prototype.wouldMoveIntoSoftTab=function(o,r,n){var e=o.column,i=o.column+r;return n<0&&(e=o.column-r,i=o.column),this.session.isTabStop(o)&&this.doc.getLine(o.row).slice(e,i).split(" ").length-1==r},t.prototype.moveCursorLeft=function(){var o=this.lead.getPosition(),r;if(r=this.session.getFoldAt(o.row,o.column,-1))this.moveCursorTo(r.start.row,r.start.column);else if(o.column===0)o.row>0&&this.moveCursorTo(o.row-1,this.doc.getLine(o.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(o,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},t.prototype.moveCursorRight=function(){var o=this.lead.getPosition(),r;if(r=this.session.getFoldAt(o.row,o.column,1))this.moveCursorTo(r.end.row,r.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var n=this.session.getTabSize(),o=this.lead;this.wouldMoveIntoSoftTab(o,n,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,n):this.moveCursorBy(0,1)}},t.prototype.moveCursorLineStart=function(){var o=this.lead.row,r=this.lead.column,n=this.session.documentToScreenRow(o,r),e=this.session.screenToDocumentPosition(n,0),i=this.session.getDisplayLine(o,null,e.row,e.column),a=i.match(/^\s*/);a[0].length!=r&&!this.session.$useEmacsStyleLineStart&&(e.column+=a[0].length),this.moveCursorToPosition(e)},t.prototype.moveCursorLineEnd=function(){var o=this.lead,r=this.session.getDocumentLastRowColumnPosition(o.row,o.column);if(this.lead.column==r.column){var n=this.session.getLine(r.row);if(r.column==n.length){var e=n.search(/\s+$/);e>0&&(r.column=e)}}this.moveCursorTo(r.row,r.column)},t.prototype.moveCursorFileEnd=function(){var o=this.doc.getLength()-1,r=this.doc.getLine(o).length;this.moveCursorTo(o,r)},t.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},t.prototype.moveCursorLongWordRight=function(){var o=this.lead.row,r=this.lead.column,n=this.doc.getLine(o),e=n.substring(r);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var i=this.session.getFoldAt(o,r,1);if(i){this.moveCursorTo(i.end.row,i.end.column);return}if(this.session.nonTokenRe.exec(e)&&(r+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,e=n.substring(r)),r>=n.length){this.moveCursorTo(o,n.length),this.moveCursorRight(),o<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(e)&&(r+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(o,r)},t.prototype.moveCursorLongWordLeft=function(){var o=this.lead.row,r=this.lead.column,n;if(n=this.session.getFoldAt(o,r,-1)){this.moveCursorTo(n.start.row,n.start.column);return}var e=this.session.getFoldStringAt(o,r,-1);e==null&&(e=this.doc.getLine(o).substring(0,r));var i=S.stringReverse(e);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(i)&&(r-=this.session.nonTokenRe.lastIndex,i=i.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),r<=0){this.moveCursorTo(o,0),this.moveCursorLeft(),o>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(i)&&(r-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(o,r)},t.prototype.$shortWordEndIndex=function(o){var r=0,n,e=/\s/,i=this.session.tokenRe;if(i.lastIndex=0,this.session.tokenRe.exec(o))r=this.session.tokenRe.lastIndex;else{for(;(n=o[r])&&e.test(n);)r++;if(r<1){for(i.lastIndex=0;(n=o[r])&&!i.test(n);)if(i.lastIndex=0,r++,e.test(n))if(r>2){r--;break}else{for(;(n=o[r])&&e.test(n);)r++;if(r>2)break}}}return i.lastIndex=0,r},t.prototype.moveCursorShortWordRight=function(){var o=this.lead.row,r=this.lead.column,n=this.doc.getLine(o),e=n.substring(r),i=this.session.getFoldAt(o,r,1);if(i)return this.moveCursorTo(i.end.row,i.end.column);if(r==n.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 m=this.$shortWordEndIndex(e);this.moveCursorTo(o,r+m)},t.prototype.moveCursorShortWordLeft=function(){var o=this.lead.row,r=this.lead.column,n;if(n=this.session.getFoldAt(o,r,-1))return this.moveCursorTo(n.start.row,n.start.column);var e=this.session.getLine(o).substring(0,r);if(r===0){do o--,e=this.doc.getLine(o);while(o>0&&/^\s*$/.test(e));r=e.length,/\s+$/.test(e)||(e="")}var i=S.stringReverse(e),a=this.$shortWordEndIndex(i);return this.moveCursorTo(o,r-a)},t.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},t.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},t.prototype.moveCursorBy=function(o,r){var n=this.session.documentToScreenPosition(this.lead.row,this.lead.column),e;if(r===0&&(o!==0&&(this.session.$bidiHandler.isBidiRow(n.row,this.lead.row)?(e=this.session.$bidiHandler.getPosLeft(n.column),n.column=Math.round(e/this.session.$bidiHandler.charWidths[0])):e=n.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column),o!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var i=this.session.lineWidgets[this.lead.row];o<0?o-=i.rowsAbove||0:o>0&&(o+=i.rowCount-(i.rowsAbove||0))}var a=this.session.screenToDocumentPosition(n.row+o,n.column,e);o!==0&&r===0&&a.row===this.lead.row&&(a.column,this.lead.column),this.moveCursorTo(a.row,a.column+r,r===0)},t.prototype.moveCursorToPosition=function(o){this.moveCursorTo(o.row,o.column)},t.prototype.moveCursorTo=function(o,r,n){var e=this.session.getFoldAt(o,r,1);e&&(o=e.start.row,r=e.start.column),this.$keepDesiredColumnOnChange=!0;var i=this.session.getLine(o);/[\uDC00-\uDFFF]/.test(i.charAt(r))&&i.charAt(r-1)&&(this.lead.row==o&&this.lead.column==r+1?r=r-1:r=r+1),this.lead.setPosition(o,r),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},t.prototype.moveCursorToScreen=function(o,r,n){var e=this.session.screenToDocumentPosition(o,r);this.moveCursorTo(e.row,e.column,n)},t.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},t.prototype.fromOrientedRange=function(o){this.setSelectionRange(o,o.cursor==o.start),this.$desiredColumn=o.desiredColumn||this.$desiredColumn},t.prototype.toOrientedRange=function(o){var r=this.getRange();return o?(o.start.column=r.start.column,o.start.row=r.start.row,o.end.column=r.end.column,o.end.row=r.end.row):o=r,o.cursor=this.isBackwards()?o.start:o.end,o.desiredColumn=this.$desiredColumn,o},t.prototype.getRangeOfMovements=function(o){var r=this.getCursor();try{o(this);var n=this.getCursor();return c.fromPoints(r,n)}catch{return c.fromPoints(r,r)}finally{this.moveCursorToPosition(r)}},t.prototype.toJSON=function(){if(this.rangeCount)var o=this.ranges.map(function(r){var n=r.clone();return n.isBackwards=r.cursor==r.start,n});else{var o=this.getRange();o.isBackwards=this.isBackwards()}return o},t.prototype.fromJSON=function(o){if(o.start==null)if(this.rangeList&&o.length>1){this.toSingleRange(o[0]);for(var r=o.length;r--;){var n=c.fromPoints(o[r].start,o[r].end);o[r].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}else o=o[0];this.rangeList&&this.toSingleRange(o),this.setSelectionRange(o,o.isBackwards)},t.prototype.isEqual=function(o){if((o.length||this.rangeCount)&&o.length!=this.rangeCount)return!1;if(!o.length||!this.ranges)return this.getRange().isEqual(o);for(var r=this.ranges.length;r--;)if(!this.ranges[r].isEqual(o[r]))return!1;return!0},t}();p.prototype.setSelectionAnchor=p.prototype.setAnchor,p.prototype.getSelectionAnchor=p.prototype.getAnchor,p.prototype.setSelectionRange=p.prototype.setRange,A.implement(p.prototype,x),g.Selection=p}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(f,g,ue){var A=f("./lib/report_error").reportError,S=2e3,x=function(){function c(p){this.splitRegex,this.states=p,this.regExps={},this.matchMappings={};for(var t in this.states){for(var o=this.states[t],r=[],n=0,e=this.matchMappings[t]={defaultToken:"text"},i="g",a=[],m=0;m<o.length;m++){var v=o[m];if(v.defaultToken&&(e.defaultToken=v.defaultToken),v.caseInsensitive&&i.indexOf("i")===-1&&(i+="i"),v.unicode&&i.indexOf("u")===-1&&(i+="u"),v.regex!=null){v.regex instanceof RegExp&&(v.regex=v.regex.toString().slice(1,-1));var k=v.regex,M=new RegExp("(?:("+k+")|(.))").exec("a").length-2;Array.isArray(v.token)?v.token.length==1||M==1?v.token=v.token[0]:M-1!=v.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:v,groupCount:M-1}),v.token=v.token[0]):(v.tokenArray=v.token,v.token=null,v.onMatch=this.$arrayTokens):typeof v.token=="function"&&!v.onMatch&&(M>1?v.onMatch=this.$applyToken:v.onMatch=v.token),M>1&&(/\\\d/.test(v.regex)?k=v.regex.replace(/\\([0-9]+)/g,function(C,b){return"\\"+(parseInt(b,10)+n+1)}):(M=1,k=this.removeCapturingGroups(v.regex)),!v.splitRegex&&typeof v.token!="string"&&a.push(v)),e[n]=m,n+=M,r.push(k),v.onMatch||(v.onMatch=null)}}r.length||(e[0]=0,r.push("$")),a.forEach(function(C){C.splitRegex=this.createSplitterRegexp(C.regex,i)},this),this.regExps[t]=new RegExp("("+r.join(")|(")+")|($)",i)}}return c.prototype.$setMaxTokenCount=function(p){S=p|0},c.prototype.$applyToken=function(p){var t=this.splitRegex.exec(p).slice(1),o=this.token.apply(this,t);if(typeof o=="string")return[{type:o,value:p}];for(var r=[],n=0,e=o.length;n<e;n++)t[n]&&(r[r.length]={type:o[n],value:t[n]});return r},c.prototype.$arrayTokens=function(p){if(!p)return[];var t=this.splitRegex.exec(p);if(!t)return"text";for(var o=[],r=this.tokenArray,n=0,e=r.length;n<e;n++)t[n+1]&&(o[o.length]={type:r[n],value:t[n+1]});return o},c.prototype.removeCapturingGroups=function(p){var t=p.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(o,r){return r?"(?:":o});return t},c.prototype.createSplitterRegexp=function(p,t){if(p.indexOf("(?=")!=-1){var o=0,r=!1,n={};p.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,i,a,m,v,k){return r?r=v!="]":v?r=!0:m?(o==n.stack&&(n.end=k+1,n.stack=-1),o--):a&&(o++,a.length!=1&&(n.stack=o,n.start=k)),e}),n.end!=null&&/^\)*$/.test(p.substr(n.end))&&(p=p.substring(0,n.start)+p.substr(n.end))}return p.charAt(0)!="^"&&(p="^"+p),p.charAt(p.length-1)!="$"&&(p+="$"),new RegExp(p,(t||"").replace("g",""))},c.prototype.getLineTokens=function(p,t){if(t&&typeof t!="string"){var o=t.slice(0);t=o[0],t==="#tmp"&&(o.shift(),t=o.shift())}else var o=[];var r=t||"start",n=this.states[r];n||(r="start",n=this.states[r]);var e=this.matchMappings[r],i=this.regExps[r];i.lastIndex=0;for(var a,m=[],v=0,k=0,M={type:null,value:""};a=i.exec(p);){var C=e.defaultToken,b=null,he=a[0],Ce=i.lastIndex;if(Ce-he.length>v){var X=p.substring(v,Ce-he.length);M.type==C?M.value+=X:(M.type&&m.push(M),M={type:C,value:X})}for(var V=0;V<a.length-2;V++)if(a[V+1]!==void 0){b=n[e[V]],b.onMatch?C=b.onMatch(he,r,o,p):C=b.token,b.next&&(typeof b.next=="string"?r=b.next:r=b.next(r,o),n=this.states[r],n||(this.reportError("state doesn't exist",r),r="start",n=this.states[r]),e=this.matchMappings[r],v=Ce,i=this.regExps[r],i.lastIndex=Ce),b.consumeLineEnd&&(v=Ce);break}if(he){if(typeof C=="string")(!b||b.merge!==!1)&&M.type===C?M.value+=he:(M.type&&m.push(M),M={type:C,value:he});else if(C){M.type&&m.push(M),M={type:null,value:""};for(var V=0;V<C.length;V++)m.push(C[V])}}if(v==p.length)break;if(v=Ce,k++>S){for(k>2*p.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:p});v<p.length;)M.type&&m.push(M),M={value:p.substring(v,v+=500),type:"overflow"};r="start",o=[];break}}return M.type&&m.push(M),o.length>1&&o[0]!==r&&o.unshift("#tmp",r),{tokens:m,state:o.length?o:r}},c}();x.prototype.reportError=A,g.Tokenizer=x}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(f,g,ue){var A=f("../lib/deep_copy").deepCopy,S;S=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(p,t){if(!t){for(var o in p)this.$rules[o]=p[o];return}for(var o in p){for(var r=p[o],n=0;n<r.length;n++){var e=r[n];(e.next||e.onMatch)&&(typeof e.next=="string"&&e.next.indexOf(t)!==0&&(e.next=t+e.next),e.nextState&&e.nextState.indexOf(t)!==0&&(e.nextState=t+e.nextState))}this.$rules[t+o]=r}},this.getRules=function(){return this.$rules},this.embedRules=function(p,t,o,r,n){var e=typeof p=="function"?new p().getRules():p;if(r)for(var i=0;i<r.length;i++)r[i]=t+r[i];else{r=[];for(var a in e)r.push(t+a)}if(this.addRules(e,t),o)for(var m=Array.prototype[n?"push":"unshift"],i=0;i<r.length;i++)m.apply(this.$rules[r[i]],A(o));this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};var x=function(p,t){return(p!="start"||t.length)&&t.unshift(this.nextState,p),this.nextState},c=function(p,t){return t.shift(),t.shift()||"start"};this.normalizeRules=function(){var p=0,t=this.$rules;function o(r){var n=t[r];n.processed=!0;for(var e=0;e<n.length;e++){var i=n[e],a=null;Array.isArray(i)&&(a=i,i={}),!i.regex&&i.start&&(i.regex=i.start,i.next||(i.next=[]),i.next.push({defaultToken:i.token},{token:i.token+".end",regex:i.end||i.start,next:"pop"}),i.token=i.token+".start",i.push=!0);var m=i.next||i.push;if(m&&Array.isArray(m)){var v=i.stateName;v||(v=i.token,typeof v!="string"&&(v=v[0]||""),t[v]&&(v+=p++)),t[v]=m,i.next=v,o(v)}else m=="pop"&&(i.next=c);if(i.push&&(i.nextState=i.next||i.push,i.next=x,delete i.push),i.rules)for(var k in i.rules)t[k]?t[k].push&&t[k].push.apply(t[k],i.rules[k]):t[k]=i.rules[k];var M=typeof i=="string"?i:i.include;if(M&&(M==="$self"&&(M="start"),Array.isArray(M)?a=M.map(function(b){return t[b]}):a=t[M]),a){var C=[e,1].concat(a);i.noEscape&&(C=C.filter(function(b){return!b.next})),n.splice.apply(n,C),e--}i.keywordMap&&(i.token=this.createKeywordMapper(i.keywordMap,i.defaultToken||"text",i.caseInsensitive),delete i.defaultToken)}}Object.keys(t).forEach(o,this)},this.createKeywordMapper=function(p,t,o,r){var n=Object.create(null);return this.$keywordList=[],Object.keys(p).forEach(function(e){for(var i=p[e],a=i.split(r||"|"),m=a.length;m--;){var v=a[m];this.$keywordList.push(v),o&&(v=v.toLowerCase()),n[v]=e}},this),p=null,o?function(e){return n[e.toLowerCase()]||t}:function(e){return n[e]||t}},this.getKeywords=function(){return this.$keywords}}).call(S.prototype),g.TextHighlightRules=S}),ace.define("ace/mode/behaviour",["require","exports","module"],function(f,g,ue){var A;A=function(){this.$behaviours={}},(function(){this.add=function(S,x,c){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[S]:this.$behaviours[S]={}}this.$behaviours[S][x]=c},this.addBehaviours=function(S){for(var x in S)for(var c in S[x])this.add(x,c,S[x][c])},this.remove=function(S){this.$behaviours&&this.$behaviours[S]&&delete this.$behaviours[S]},this.inherit=function(S,x){if(typeof S=="function")var c=new S().getBehaviours(x);else var c=S.getBehaviours(x);this.addBehaviours(c)},this.getBehaviours=function(S){if(S){for(var x={},c=0;c<S.length;c++)this.$behaviours[S[c]]&&(x[S[c]]=this.$behaviours[S[c]]);return x}else return this.$behaviours}}).call(A.prototype),g.Behaviour=A}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(f,g,ue){var A=f("./range").Range,S=function(){function x(c,p,t){this.$session=c,this.$row=p,this.$rowTokens=c.getTokens(p);var o=c.getTokenAt(p,t);this.$tokenIndex=o?o.index:-1}return x.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},x.prototype.stepForward=function(){this.$tokenIndex+=1;for(var 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]},x.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},x.prototype.getCurrentTokenRow=function(){return this.$row},x.prototype.getCurrentTokenColumn=function(){var c=this.$rowTokens,p=this.$tokenIndex,t=c[p].start;if(t!==void 0)return t;for(t=0;p>0;)p-=1,t+=c[p].value.length;return t},x.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},x.prototype.getCurrentTokenRange=function(){var c=this.$rowTokens[this.$tokenIndex],p=this.getCurrentTokenColumn();return new A(this.$row,p,this.$row,p+c.value.length)},x}();g.TokenIterator=S}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(f,g,ue){var A=f("../../lib/oop"),S=f("../behaviour").Behaviour,x=f("../../token_iterator").TokenIterator,c=f("../../lib/lang"),p=["text","paren.rparen","rparen","paren","punctuation.operator"],t=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],o,r={},n={'"':'"',"'":"'"},e=function(m){var v=-1;if(m.multiSelect&&(v=m.selection.index,r.rangeCount!=m.multiSelect.rangeCount&&(r={rangeCount:m.multiSelect.rangeCount})),r[v])return o=r[v];o=r[v]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},i=function(m,v,k,M){var C=m.end.row-m.start.row;return{text:k+v+M,selection:[0,m.start.column+1,C,m.end.column+(C?0:1)]}},a;a=function(m){m=m||{},this.add("braces","insertion",function(v,k,M,C,b){var he=M.getCursorPosition(),Ce=C.doc.getLine(he.row);if(b=="{"){e(M);var X=M.getSelectionRange(),V=C.doc.getTextRange(X),Xe=C.getTokenAt(he.row,he.column);if(V!==""&&V!=="{"&&M.getWrapBehavioursEnabled())return i(X,V,"{","}");if(Xe&&/(?:string)\.quasi|\.xml/.test(Xe.type)){var U=[/tag\-(?:open|name)/,/attribute\-name/];return U.some(function(ft){return ft.test(Xe.type)})||/(string)\.quasi/.test(Xe.type)&&Xe.value[he.column-Xe.start-1]!=="$"?void 0:(a.recordAutoInsert(M,C,"}"),{text:"{}",selection:[1,1]})}else if(a.isSaneInsertion(M,C))return/[\]\}\)]/.test(Ce[he.column])||M.inMultiSelectMode||m.braces?(a.recordAutoInsert(M,C,"}"),{text:"{}",selection:[1,1]}):(a.recordMaybeInsert(M,C,"{"),{text:"{",selection:[1,1]})}else if(b=="}"){e(M);var O=Ce.substring(he.column,he.column+1);if(O=="}"){var w=C.$findOpeningBracket("}",{column:he.column+1,row:he.row});if(w!==null&&a.isAutoInsertedClosing(he,Ce,b))return a.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(b==`
183
+ `||b==`\r
184
+ `){e(M);var y="";a.isMaybeInsertedClosing(he,Ce)&&(y=c.stringRepeat("}",o.maybeInsertedBrackets),a.clearMaybeInsertedClosing());var O=Ce.substring(he.column,he.column+1);if(O==="}"){var T=C.findMatchingBracket({row:he.row,column:he.column+1},"}");if(!T)return null;var Oe=this.$getIndent(C.getLine(T.row))}else if(y)var Oe=this.$getIndent(Ce);else{a.clearMaybeInsertedClosing();return}var ze=Oe+C.getTabString();return{text:`
185
+ `+ze+`
186
+ `+Oe+y,selection:[1,ze.length,1,ze.length]}}else a.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(v,k,M,C,b){var he=C.doc.getTextRange(b);if(!b.isMultiLine()&&he=="{"){e(M);var Ce=C.doc.getLine(b.start.row),X=Ce.substring(b.end.column,b.end.column+1);if(X=="}")return b.end.column++,b;o.maybeInsertedBrackets--}}),this.add("parens","insertion",function(v,k,M,C,b){if(b=="("){e(M);var he=M.getSelectionRange(),Ce=C.doc.getTextRange(he);if(Ce!==""&&M.getWrapBehavioursEnabled())return i(he,Ce,"(",")");if(a.isSaneInsertion(M,C))return a.recordAutoInsert(M,C,")"),{text:"()",selection:[1,1]}}else if(b==")"){e(M);var X=M.getCursorPosition(),V=C.doc.getLine(X.row),Xe=V.substring(X.column,X.column+1);if(Xe==")"){var U=C.$findOpeningBracket(")",{column:X.column+1,row:X.row});if(U!==null&&a.isAutoInsertedClosing(X,V,b))return a.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(v,k,M,C,b){var he=C.doc.getTextRange(b);if(!b.isMultiLine()&&he=="("){e(M);var Ce=C.doc.getLine(b.start.row),X=Ce.substring(b.start.column+1,b.start.column+2);if(X==")")return b.end.column++,b}}),this.add("brackets","insertion",function(v,k,M,C,b){if(b=="["){e(M);var he=M.getSelectionRange(),Ce=C.doc.getTextRange(he);if(Ce!==""&&M.getWrapBehavioursEnabled())return i(he,Ce,"[","]");if(a.isSaneInsertion(M,C))return a.recordAutoInsert(M,C,"]"),{text:"[]",selection:[1,1]}}else if(b=="]"){e(M);var X=M.getCursorPosition(),V=C.doc.getLine(X.row),Xe=V.substring(X.column,X.column+1);if(Xe=="]"){var U=C.$findOpeningBracket("]",{column:X.column+1,row:X.row});if(U!==null&&a.isAutoInsertedClosing(X,V,b))return a.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(v,k,M,C,b){var he=C.doc.getTextRange(b);if(!b.isMultiLine()&&he=="["){e(M);var Ce=C.doc.getLine(b.start.row),X=Ce.substring(b.start.column+1,b.start.column+2);if(X=="]")return b.end.column++,b}}),this.add("string_dquotes","insertion",function(v,k,M,C,b){var he=C.$mode.$quotes||n;if(b.length==1&&he[b]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(b)!=-1)return;e(M);var Ce=b,X=M.getSelectionRange(),V=C.doc.getTextRange(X);if(V!==""&&(V.length!=1||!he[V])&&M.getWrapBehavioursEnabled())return i(X,V,Ce,Ce);if(!V){var Xe=M.getCursorPosition(),U=C.doc.getLine(Xe.row),O=U.substring(Xe.column-1,Xe.column),w=U.substring(Xe.column,Xe.column+1),y=C.getTokenAt(Xe.row,Xe.column),T=C.getTokenAt(Xe.row,Xe.column+1);if(O=="\\"&&y&&/escape/.test(y.type))return null;var Oe=y&&/string|escape/.test(y.type),ze=!T||/string|escape/.test(T.type),ft;if(w==Ce)ft=Oe!==ze,ft&&/string\.end/.test(T.type)&&(ft=!1);else{if(Oe&&!ze||Oe&&ze)return null;var pt=C.$mode.tokenRe;pt.lastIndex=0;var gt=pt.test(O);pt.lastIndex=0;var Qt=pt.test(w),mt=C.$mode.$pairQuotesAfter,Vt=mt&&mt[Ce]&&mt[Ce].test(O);if(!Vt&&gt||Qt||w&&!/[\s;,.})\]\\]/.test(w))return null;var Gt=U[Xe.column-2];if(O==Ce&&(Gt==Ce||pt.test(Gt)))return null;ft=!0}return{text:ft?Ce+Ce:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(v,k,M,C,b){var he=C.$mode.$quotes||n,Ce=C.doc.getTextRange(b);if(!b.isMultiLine()&&he.hasOwnProperty(Ce)){e(M);var X=C.doc.getLine(b.start.row),V=X.substring(b.start.column+1,b.start.column+2);if(V==Ce)return b.end.column++,b}}),m.closeDocComment!==!1&&this.add("doc comment end","insertion",function(v,k,M,C,b){if(v==="doc-start"&&(b===`
187
+ `||b===`\r
188
+ `)&&M.selection.isEmpty()){var he=M.getCursorPosition();if(he.column===0)return;for(var Ce=C.doc.getLine(he.row),X=C.doc.getLine(he.row+1),V=C.getTokens(he.row),Xe=0,U=0;U<V.length;U++){Xe+=V[U].value.length;var O=V[U];if(Xe>=he.column){if(Xe===he.column){if(!/\.doc/.test(O.type))return;if(/\*\//.test(O.value)){var w=V[U+1];if(!w||!/\.doc/.test(w.type))return}}var y=he.column-(Xe-O.value.length),T=O.value.indexOf("*/"),Oe=O.value.indexOf("/**",T>-1?T+2:0);if(Oe!==-1&&y>Oe&&y<Oe+3||T!==-1&&Oe!==-1&&y>=T&&y<=Oe||!/\.doc/.test(O.type))return;break}}var ze=this.$getIndent(Ce);if(/\s*\*/.test(X))return/^\s*\*/.test(Ce)?{text:b+ze+"* ",selection:[1,2+ze.length,1,2+ze.length]}:{text:b+ze+" * ",selection:[1,3+ze.length,1,3+ze.length]};if(/\/\*\*/.test(Ce.substring(0,he.column)))return{text:b+ze+" * "+b+" "+ze+"*/",selection:[1,4+ze.length,1,4+ze.length]}}})},a.isSaneInsertion=function(m,v){var k=m.getCursorPosition(),M=new x(v,k.row,k.column);if(!this.$matchTokenType(M.getCurrentToken()||"text",p)){if(/[)}\]]/.test(m.session.getLine(k.row)[k.column]))return!0;var C=new x(v,k.row,k.column+1);if(!this.$matchTokenType(C.getCurrentToken()||"text",p))return!1}return M.stepForward(),M.getCurrentTokenRow()!==k.row||this.$matchTokenType(M.getCurrentToken()||"text",t)},a.$matchTokenType=function(m,v){return v.indexOf(m.type||m)>-1},a.recordAutoInsert=function(m,v,k){var M=m.getCursorPosition(),C=v.doc.getLine(M.row);this.isAutoInsertedClosing(M,C,o.autoInsertedLineEnd[0])||(o.autoInsertedBrackets=0),o.autoInsertedRow=M.row,o.autoInsertedLineEnd=k+C.substr(M.column),o.autoInsertedBrackets++},a.recordMaybeInsert=function(m,v,k){var M=m.getCursorPosition(),C=v.doc.getLine(M.row);this.isMaybeInsertedClosing(M,C)||(o.maybeInsertedBrackets=0),o.maybeInsertedRow=M.row,o.maybeInsertedLineStart=C.substr(0,M.column)+k,o.maybeInsertedLineEnd=C.substr(M.column),o.maybeInsertedBrackets++},a.isAutoInsertedClosing=function(m,v,k){return o.autoInsertedBrackets>0&&m.row===o.autoInsertedRow&&k===o.autoInsertedLineEnd[0]&&v.substr(m.column)===o.autoInsertedLineEnd},a.isMaybeInsertedClosing=function(m,v){return o.maybeInsertedBrackets>0&&m.row===o.maybeInsertedRow&&v.substr(m.column)===o.maybeInsertedLineEnd&&v.substr(0,m.column)==o.maybeInsertedLineStart},a.popAutoInsertedClosing=function(){o.autoInsertedLineEnd=o.autoInsertedLineEnd.substr(1),o.autoInsertedBrackets--},a.clearMaybeInsertedClosing=function(){o&&(o.maybeInsertedBrackets=0,o.maybeInsertedRow=-1)},A.inherits(a,S),g.CstyleBehaviour=a}),ace.define("ace/unicode",["require","exports","module"],function(f,g,ue){for(var A=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],S=0,x=[],c=0;c<A.length;c+=2)x.push(S+=A[c]),A[c+1]&&x.push(45,S+=A[c+1]);g.wordChars=String.fromCharCode.apply(null,x)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(f,g,ue){var A=f("../config"),S=f("../tokenizer").Tokenizer,x=f("./text_highlight_rules").TextHighlightRules,c=f("./behaviour/cstyle").CstyleBehaviour,p=f("../unicode"),t=f("../lib/lang"),o=f("../token_iterator").TokenIterator,r=f("../range").Range,n;n=function(){this.HighlightRules=x},(function(){this.$defaultBehaviour=new c,this.tokenRe=new RegExp("^["+p.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+p.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new S(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,i,a,m){var v=i.doc,k=!0,M=!0,C=1/0,b=i.getTabSize(),he=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var V=this.lineCommentStart.map(t.escapeRegExp).join("|"),Ce=this.lineCommentStart[0];else var V=t.escapeRegExp(this.lineCommentStart),Ce=this.lineCommentStart;V=new RegExp("^(\\s*)(?:"+V+") ?"),he=i.getUseSoftTabs();var O=function(Qt,mt){var Vt=Qt.match(V);if(Vt){var Gt=Vt[1].length,Yt=Vt[0].length;!T(Qt,Gt,Yt)&&Vt[0][Yt-1]==" "&&Yt--,v.removeInLine(mt,Gt,Yt)}},y=Ce+" ",U=function(Qt,mt){(!k||/\S/.test(Qt))&&(T(Qt,C,C)?v.insertInLine({row:mt,column:C},y):v.insertInLine({row:mt,column:C},Ce))},w=function(Qt,mt){return V.test(Qt)},T=function(Qt,mt,Vt){for(var Gt=0;mt--&&Qt.charAt(mt)==" ";)Gt++;if(Gt%b!=0)return!1;for(var Gt=0;Qt.charAt(Vt++)==" ";)Gt++;return b>2?Gt%b!=b-1:Gt%b==0}}else{if(!this.blockComment)return!1;var Ce=this.blockComment.start,X=this.blockComment.end,V=new RegExp("^(\\s*)(?:"+t.escapeRegExp(Ce)+")"),Xe=new RegExp("(?:"+t.escapeRegExp(X)+")\\s*$"),U=function(ft,pt){w(ft,pt)||(!k||/\S/.test(ft))&&(v.insertInLine({row:pt,column:ft.length},X),v.insertInLine({row:pt,column:C},Ce))},O=function(ft,pt){var gt;(gt=ft.match(Xe))&&v.removeInLine(pt,ft.length-gt[0].length,ft.length),(gt=ft.match(V))&&v.removeInLine(pt,gt[1].length,gt[0].length)},w=function(ft,pt){if(V.test(ft))return!0;for(var gt=i.getTokens(pt),Qt=0;Qt<gt.length;Qt++)if(gt[Qt].type==="comment")return!0}}function Oe(ft){for(var pt=a;pt<=m;pt++)ft(v.getLine(pt),pt)}var ze=1/0;Oe(function(ft,pt){var gt=ft.search(/\S/);gt!==-1?(gt<C&&(C=gt),M&&!w(ft,pt)&&(M=!1)):ze>ft.length&&(ze=ft.length)}),C==1/0&&(C=ze,k=!1,M=!1),he&&C%b!=0&&(C=Math.floor(C/b)*b),Oe(M?O:U)},this.toggleBlockComment=function(e,i,a,m){var v=this.blockComment;if(v){!v.start&&v[0]&&(v=v[0]);var k=new o(i,m.row,m.column),M=k.getCurrentToken();i.selection;var C=i.selection.toOrientedRange(),b,he;if(M&&/comment/.test(M.type)){for(var Ce,X;M&&/comment/.test(M.type);){var V=M.value.indexOf(v.start);if(V!=-1){var Xe=k.getCurrentTokenRow(),U=k.getCurrentTokenColumn()+V;Ce=new r(Xe,U,Xe,U+v.start.length);break}M=k.stepBackward()}for(var k=new o(i,m.row,m.column),M=k.getCurrentToken();M&&/comment/.test(M.type);){var V=M.value.indexOf(v.end);if(V!=-1){var Xe=k.getCurrentTokenRow(),U=k.getCurrentTokenColumn()+V;X=new r(Xe,U,Xe,U+v.end.length);break}M=k.stepForward()}X&&i.remove(X),Ce&&(i.remove(Ce),b=Ce.start.row,he=-v.start.length)}else he=v.start.length,b=a.start.row,i.insert(a.end,v.end),i.insert(a.start,v.start);C.start.row==b&&(C.start.column+=he),C.end.row==b&&(C.end.column+=he),i.selection.fromOrientedRange(C)}},this.getNextLineIndent=function(e,i,a){return this.$getIndent(i)},this.checkOutdent=function(e,i,a){return!1},this.autoOutdent=function(e,i,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 i in e)if(e[i]){var a=e[i],m=a.prototype.$id,v=A.$modes[m];v||(A.$modes[m]=v=new a),A.$modes[i]||(A.$modes[i]=v),this.$embeds.push(i),this.$modes[i]=v}for(var k=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],M=function(b){(function(he){var Ce=k[b],X=he[Ce];he[k[b]]=function(){return this.$delegator(Ce,arguments,X)}})(C)},C=this,i=0;i<k.length;i++)M(i)},this.$delegator=function(e,i,a){var m=i[0]||"start";if(typeof m!="string"){if(Array.isArray(m[2])){var v=m[2][m[2].length-1],k=this.$modes[v];if(k)return k[e].apply(k,[m[1]].concat([].slice.call(i,1)))}m=m[0]||"start"}for(var M=0;M<this.$embeds.length;M++)if(this.$modes[this.$embeds[M]]){var C=m.split(this.$embeds[M]);if(!C[0]&&C[1]){i[0]=C[1];var k=this.$modes[this.$embeds[M]];return k[e].apply(k,i)}}var b=a.apply(this,i);return a?b:void 0},this.transformAction=function(e,i,a,m,v){if(this.$behaviour){var k=this.$behaviour.getBehaviours();for(var M in k)if(k[M][i]){var C=k[M][i].apply(this,arguments);if(C)return C}}},this.getKeywords=function(e){if(!this.completionKeywords){var i=this.$tokenizer.rules,a=[];for(var m in i)for(var v=i[m],k=0,M=v.length;k<M;k++)if(typeof v[k].token=="string")/keyword|support|storage/.test(v[k].token)&&a.push(v[k].regex);else if(typeof v[k].token=="object"){for(var C=0,b=v[k].token.length;C<b;C++)if(/keyword|support|storage/.test(v[k].token[C])){var m=v[k].regex.match(/\(.+?\)/g)[C];a.push(m.substr(1,m.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,i,a,m){var v=this.$keywordList||this.$createKeywordList();return v.map(function(k){return{name:k,value:k,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(n.prototype),g.Mode=n}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(f,g,ue){var A=f("./lib/dom"),S=function(){function x(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 x.prototype.getRowLength=function(c){var p;return this.lineWidgets?p=this.lineWidgets[c]&&this.lineWidgets[c].rowCount||0:p=0,!this.$useWrapMode||!this.$wrapData[c]?1+p:this.$wrapData[c].length+1+p},x.prototype.$getWidgetScreenLength=function(){var c=0;return this.lineWidgets.forEach(function(p){p&&p.rowCount&&!p.hidden&&(c+=p.rowCount)}),c},x.prototype.$onChangeEditor=function(c){this.attach(c.editor)},x.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)))},x.prototype.detach=function(c){var p=this.editor;if(p){this.editor=null,p.widgetManager=null,p.renderer.off("beforeRender",this.measureWidgets),p.renderer.off("afterRender",this.renderWidgets);var t=this.session.lineWidgets;t&&t.forEach(function(o){o&&o.el&&o.el.parentNode&&(o._inDocument=!1,o.el.parentNode.removeChild(o.el))})}},x.prototype.updateOnFold=function(c,p){var t=p.lineWidgets;if(!(!t||!c.action)){for(var o=c.data,r=o.start.row,n=o.end.row,e=c.action=="add",i=r+1;i<n;i++)t[i]&&(t[i].hidden=e);t[n]&&(e?t[r]?t[n].hidden=e:t[r]=t[n]:(t[r]==t[n]&&(t[r]=void 0),t[n].hidden=e))}},x.prototype.updateOnChange=function(c){var p=this.session.lineWidgets;if(p){var t=c.start.row,o=c.end.row-t;if(o!==0)if(c.action=="remove"){var r=p.splice(t+1,o);!p[t]&&r[r.length-1]&&(p[t]=r.pop()),r.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var n=new Array(o);p[t]&&p[t].column!=null&&c.start.column>p[t].column&&t++,n.unshift(t,0),p.splice.apply(p,n),this.$updateRows()}}},x.prototype.$updateRows=function(){var c=this.session.lineWidgets;if(c){var p=!0;c.forEach(function(t,o){if(t)for(p=!1,t.row=o;t.$oldWidget;)t.$oldWidget.row=o,t=t.$oldWidget}),p&&(this.session.lineWidgets=null)}},x.prototype.$registerLineWidget=function(c){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var p=this.session.lineWidgets[c.row];return p&&(c.$oldWidget=p,p.el&&p.el.parentNode&&(p.el.parentNode.removeChild(p.el),p._inDocument=!1)),this.session.lineWidgets[c.row]=c,c},x.prototype.addLineWidget=function(c){if(this.$registerLineWidget(c),c.session=this.session,!this.editor)return c;var p=this.editor.renderer;c.html&&!c.el&&(c.el=A.createElement("div"),c.el.innerHTML=c.html),c.text&&!c.el&&(c.el=A.createElement("div"),c.el.textContent=c.text),c.el&&(A.addCssClass(c.el,"ace_lineWidgetContainer"),c.className&&A.addCssClass(c.el,c.className),c.el.style.position="absolute",c.el.style.zIndex="5",p.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/p.layerConfig.lineHeight);var t=this.session.getFoldAt(c.row,0);if(c.$fold=t,t){var o=this.session.lineWidgets;c.row==t.end.row&&!o[t.start.row]?o[t.start.row]=c:c.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:c.row}}}),this.$updateRows(),this.renderWidgets(null,p),this.onWidgetChanged(c),c},x.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 p=this.session.lineWidgets[c.row];if(p==c)this.session.lineWidgets[c.row]=c.$oldWidget,c.$oldWidget&&this.onWidgetChanged(c.$oldWidget);else for(;p;){if(p.$oldWidget==c){p.$oldWidget=c.$oldWidget;break}p=p.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:c.row}}}),this.$updateRows()},x.prototype.getWidgetsAtRow=function(c){for(var p=this.session.lineWidgets,t=p&&p[c],o=[];t;)o.push(t),t=t.$oldWidget;return o},x.prototype.onWidgetChanged=function(c){this.session._changedWidgets.push(c),this.editor&&this.editor.renderer.updateFull()},x.prototype.measureWidgets=function(c,p){var t=this.session._changedWidgets,o=p.layerConfig;if(!(!t||!t.length)){for(var r=1/0,n=0;n<t.length;n++){var e=t[n];if(!(!e||!e.el)&&e.session==this.session){if(!e._inDocument){if(this.session.lineWidgets[e.row]!=e)continue;e._inDocument=!0,p.container.appendChild(e.el)}e.h=e.el.offsetHeight,e.fixedWidth||(e.w=e.el.offsetWidth,e.screenWidth=Math.ceil(e.w/o.characterWidth));var i=e.h/o.lineHeight;e.coverLine&&(i-=this.session.getRowLineCount(e.row),i<0&&(i=0)),e.rowCount!=i&&(e.rowCount=i,e.row<r&&(r=e.row))}}r!=1/0&&(this.session._emit("changeFold",{data:{start:{row:r}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},x.prototype.renderWidgets=function(c,p){var t=p.layerConfig,o=this.session.lineWidgets;if(o){for(var r=Math.min(this.firstRow,t.firstRow),n=Math.max(this.lastRow,t.lastRow,o.length);r>0&&!o[r];)r--;this.firstRow=t.firstRow,this.lastRow=t.lastRow,p.$cursorLayer.config=t;for(var e=r;e<=n;e++){var i=o[e];if(!(!i||!i.el)){if(i.hidden){i.el.style.top=-100-(i.pixelHeight||0)+"px";continue}i._inDocument||(i._inDocument=!0,p.container.appendChild(i.el));var a=p.$cursorLayer.getPixelPosition({row:e,column:0},!0).top;i.coverLine||(a+=t.lineHeight*this.session.getRowLineCount(i.row)),i.el.style.top=a-t.offset+"px";var m=i.coverGutter?0:p.gutterWidth;i.fixedWidth||(m-=p.scrollLeft),i.el.style.left=m+"px",i.fullWidth&&i.screenWidth&&(i.el.style.minWidth=t.width+2*t.padding+"px"),i.fixedWidth?i.el.style.right=p.scrollBar.getWidth()+"px":i.el.style.right=""}}}},x}();g.LineWidgets=S}),ace.define("ace/apply_delta",["require","exports","module"],function(f,g,ue){g.applyDelta=function(A,S,x){var c=S.start.row,p=S.start.column,t=A[c]||"";switch(S.action){case"insert":var o=S.lines;if(o.length===1)A[c]=t.substring(0,p)+S.lines[0]+t.substring(p);else{var r=[c,1].concat(S.lines);A.splice.apply(A,r),A[c]=t.substring(0,p)+A[c],A[c+S.lines.length-1]+=t.substring(p)}break;case"remove":var n=S.end.column,e=S.end.row;c===e?A[c]=t.substring(0,p)+t.substring(n):A.splice(c,e-c+1,t.substring(0,p)+A[e].substring(n));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(f,g,ue){var A=f("./lib/oop"),S=f("./lib/event_emitter").EventEmitter,x=function(){function t(o,r,n){this.$onChange=this.onChange.bind(this),this.attach(o),typeof r!="number"?this.setPosition(r.row,r.column):this.setPosition(r,n)}return t.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},t.prototype.getDocument=function(){return this.document},t.prototype.onChange=function(o){if(!(o.start.row==o.end.row&&o.start.row!=this.row)&&!(o.start.row>this.row)){var r=p(o,{row:this.row,column:this.column},this.$insertRight);this.setPosition(r.row,r.column,!0)}},t.prototype.setPosition=function(o,r,n){var e;if(n?e={row:o,column:r}:e=this.$clipPositionToDocument(o,r),!(this.row==e.row&&this.column==e.column)){var i={row:this.row,column:this.column};this.row=e.row,this.column=e.column,this._signal("change",{old:i,value:e})}},t.prototype.detach=function(){this.document.off("change",this.$onChange)},t.prototype.attach=function(o){this.document=o||this.document,this.document.on("change",this.$onChange)},t.prototype.$clipPositionToDocument=function(o,r){var n={};return o>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):o<0?(n.row=0,n.column=0):(n.row=o,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,r))),r<0&&(n.column=0),n},t}();x.prototype.$insertRight=!1,A.implement(x.prototype,S);function c(t,o,r){var n=r?t.column<=o.column:t.column<o.column;return t.row<o.row||t.row==o.row&&n}function p(t,o,r){var n=t.action=="insert",e=(n?1:-1)*(t.end.row-t.start.row),i=(n?1:-1)*(t.end.column-t.start.column),a=t.start,m=n?a:t.end;return c(o,a,r)?{row:o.row,column:o.column}:c(m,o,!r)?{row:o.row+e,column:o.column+(o.row==m.row?i:0)}:{row:a.row,column:a.column}}g.Anchor=x}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(f,g,ue){var A=f("./lib/oop"),S=f("./apply_delta").applyDelta,x=f("./lib/event_emitter").EventEmitter,c=f("./range").Range,p=f("./anchor").Anchor,t=function(){function o(r){this.$lines=[""],r.length===0?this.$lines=[""]:Array.isArray(r)?this.insertMergedLines({row:0,column:0},r):this.insert({row:0,column:0},r)}return o.prototype.setValue=function(r){var n=this.getLength()-1;this.remove(new c(0,0,n,this.getLine(n).length)),this.insert({row:0,column:0},r||"")},o.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},o.prototype.createAnchor=function(r,n){return new p(this,r,n)},o.prototype.$detectNewLine=function(r){var n=r.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=n?n[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,n){return this.$lines.slice(r,n+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 n;if(r.start.row===r.end.row)n=[this.getLine(r.start.row).substring(r.start.column,r.end.column)];else{n=this.getLines(r.start.row,r.end.row),n[0]=(n[0]||"").substring(r.start.column);var e=n.length-1;r.end.row-r.start.row==e&&(n[e]=n[e].substring(0,r.end.column))}return n},o.prototype.insertLines=function(r,n){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(r,n)},o.prototype.removeLines=function(r,n){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(r,n)},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,n){return this.getLength()<=1&&this.$detectNewLine(n),this.insertMergedLines(r,this.$split(n))},o.prototype.insertInLine=function(r,n){var e=this.clippedPos(r.row,r.column),i=this.pos(r.row,r.column+n.length);return this.applyDelta({start:e,end:i,action:"insert",lines:[n]},!0),this.clonePos(i)},o.prototype.clippedPos=function(r,n){var e=this.getLength();r===void 0?r=e:r<0?r=0:r>=e&&(r=e-1,n=void 0);var i=this.getLine(r);return n==null&&(n=i.length),n=Math.min(Math.max(n,0),i.length),{row:r,column:n}},o.prototype.clonePos=function(r){return{row:r.row,column:r.column}},o.prototype.pos=function(r,n){return{row:r,column:n}},o.prototype.$clipPosition=function(r){var n=this.getLength();return r.row>=n?(r.row=Math.max(0,n-1),r.column=this.getLine(n-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,n){r=Math.min(Math.max(r,0),this.getLength());var e=0;r<this.getLength()?(n=n.concat([""]),e=0):(n=[""].concat(n),r--,e=this.$lines[r].length),this.insertMergedLines({row:r,column:e},n)},o.prototype.insertMergedLines=function(r,n){var e=this.clippedPos(r.row,r.column),i={row:e.row+n.length-1,column:(n.length==1?e.column:0)+n[n.length-1].length};return this.applyDelta({start:e,end:i,action:"insert",lines:n}),this.clonePos(i)},o.prototype.remove=function(r){var n=this.clippedPos(r.start.row,r.start.column),e=this.clippedPos(r.end.row,r.end.column);return this.applyDelta({start:n,end:e,action:"remove",lines:this.getLinesForRange({start:n,end:e})}),this.clonePos(n)},o.prototype.removeInLine=function(r,n,e){var i=this.clippedPos(r,n),a=this.clippedPos(r,e);return this.applyDelta({start:i,end:a,action:"remove",lines:this.getLinesForRange({start:i,end:a})},!0),this.clonePos(i)},o.prototype.removeFullLines=function(r,n){r=Math.min(Math.max(0,r),this.getLength()-1),n=Math.min(Math.max(0,n),this.getLength()-1);var e=n==this.getLength()-1&&r>0,i=n<this.getLength()-1,a=e?r-1:r,m=e?this.getLine(a).length:0,v=i?n+1:n,k=i?0:this.getLine(v).length,M=new c(a,m,v,k),C=this.$lines.slice(r,n+1);return this.applyDelta({start:M.start,end:M.end,action:"remove",lines:this.getLinesForRange(M)}),C},o.prototype.removeNewLine=function(r){r<this.getLength()-1&&r>=0&&this.applyDelta({start:this.pos(r,this.getLine(r).length),end:this.pos(r+1,0),action:"remove",lines:["",""]})},o.prototype.replace=function(r,n){if(r instanceof c||(r=c.fromPoints(r.start,r.end)),n.length===0&&r.isEmpty())return r.start;if(n==this.getTextRange(r))return r.end;this.remove(r);var e;return n?e=this.insert(r.start,n):e=r.start,e},o.prototype.applyDeltas=function(r){for(var n=0;n<r.length;n++)this.applyDelta(r[n])},o.prototype.revertDeltas=function(r){for(var n=r.length-1;n>=0;n--)this.revertDelta(r[n])},o.prototype.applyDelta=function(r,n){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):(S(this.$lines,r,n),this._signal("change",r)))},o.prototype.$safeApplyDelta=function(r){var n=this.$lines.length;(r.action=="remove"&&r.start.row<n&&r.end.row<n||r.action=="insert"&&r.start.row<=n)&&this.applyDelta(r)},o.prototype.$splitAndapplyLargeDelta=function(r,n){for(var e=r.lines,i=e.length-n+1,a=r.start.row,m=r.start.column,v=0,k=0;v<i;v=k){k+=n-1;var M=e.slice(v,k);M.push(""),this.applyDelta({start:this.pos(a+v,m),end:this.pos(a+k,m=0),action:r.action,lines:M},!0)}r.lines=e.slice(v),r.start.row=a+v,r.start.column=m,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,n){for(var e=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,a=n||0,m=e.length;a<m;a++)if(r-=e[a].length+i,r<0)return{row:a,column:r+e[a].length+i};return{row:m-1,column:r+e[m-1].length+i}},o.prototype.positionToIndex=function(r,n){for(var e=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,a=0,m=Math.min(r.row,e.length),v=n||0;v<m;++v)a+=e[v].length+i;return a+r.column},o.prototype.$split=function(r){return r.split(/\r\n|\r|\n/)},o}();t.prototype.$autoNewLine="",t.prototype.$newLineMode="auto",A.implement(t.prototype,x),g.Document=t}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(f,g,ue){var A=f("./lib/oop"),S=f("./lib/event_emitter").EventEmitter,x=function(){function c(p,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=p;var o=this;this.$worker=function(){if(o.running){for(var r=new Date,n=o.currentLine,e=-1,i=o.doc,a=n;o.lines[n];)n++;var m=i.getLength(),v=0;for(o.running=!1;n<m;){o.$tokenizeRow(n),e=n;do n++;while(o.lines[n]);if(v++,v%5===0&&new Date-r>20){o.running=setTimeout(o.$worker,20);break}}o.currentLine=n,e==-1&&(e=n),a<=e&&o.fireUpdateEvent(a,e)}}}return c.prototype.setTokenizer=function(p){this.tokenizer=p,this.lines=[],this.states=[],this.start(0)},c.prototype.setDocument=function(p){this.doc=p,this.lines=[],this.states=[],this.stop()},c.prototype.fireUpdateEvent=function(p,t){var o={first:p,last:t};this._signal("update",{data:o})},c.prototype.start=function(p){this.currentLine=Math.min(p||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(p){var t=p.start.row,o=p.end.row-t;if(o===0)this.lines[t]=null;else if(p.action=="remove")this.lines.splice(t,o+1,null),this.states.splice(t,o+1,null);else{var r=Array(o+1);r.unshift(t,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},c.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},c.prototype.getTokens=function(p){return this.lines[p]||this.$tokenizeRow(p)},c.prototype.getState=function(p){return this.currentLine==p&&this.$tokenizeRow(p),this.states[p]||"start"},c.prototype.$tokenizeRow=function(p){var t=this.doc.getLine(p),o=this.states[p-1],r=this.tokenizer.getLineTokens(t,o,p);return this.states[p]+""!=r.state+""?(this.states[p]=r.state,this.lines[p+1]=null,this.currentLine>p+1&&(this.currentLine=p+1)):this.currentLine==p&&(this.currentLine=p+1),this.lines[p]=r.tokens},c.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},c}();A.implement(x.prototype,S),g.BackgroundTokenizer=x}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(f,g,ue){var A=f("./lib/lang"),S=f("./range").Range,x=function(){function c(p,t,o){o===void 0&&(o="text"),this.setRegexp(p),this.clazz=t,this.type=o,this.docLen=0}return c.prototype.setRegexp=function(p){this.regExp+""!=p+""&&(this.regExp=p,this.cache=[])},c.prototype.update=function(p,t,o,r){if(this.regExp){for(var n=r.firstRow,e=r.lastRow,i={},a=o.$editor&&o.$editor.$search,m=a&&a.$isMultilineSearch(o.$editor.getLastSearchOptions()),v=n;v<=e;v++){var k=this.cache[v];if(k==null||o.getValue().length!=this.docLen){if(m){k=[];var M=a.$multiLineForward(o,this.regExp,v,e);if(M){var C=M.endRow<=e?M.endRow-1:e;C>v&&(v=C),k.push(new S(M.startRow,M.startCol,M.endRow,M.endCol))}k.length>this.MAX_RANGES&&(k=k.slice(0,this.MAX_RANGES))}else k=A.getMatchOffsets(o.getLine(v),this.regExp),k.length>this.MAX_RANGES&&(k=k.slice(0,this.MAX_RANGES)),k=k.map(function(X){return new S(v,X.offset,v,X.offset+X.length)});this.cache[v]=k.length?k:""}if(k.length!==0)for(var b=k.length;b--;){var he=k[b].toScreenRange(o),Ce=he.toString();i[Ce]||(i[Ce]=!0,t.drawSingleLineMarker(p,he,this.clazz,r))}}this.docLen=o.getValue().length}},c}();x.prototype.MAX_RANGES=500,g.SearchHighlight=x}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(f,g,ue){var A=function(){function C(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return C.prototype.addSession=function(b){this.$session=b},C.prototype.add=function(b,he,Ce){if(!this.$fromUndo&&b!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),he===!1||!this.lastDeltas){this.lastDeltas=[];var X=this.$undoStack.length;X>this.$undoDepth-1&&this.$undoStack.splice(0,X-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),b.id=this.$rev=++this.$maxRev}(b.action=="remove"||b.action=="insert")&&(this.$lastDelta=b),this.lastDeltas.push(b)}},C.prototype.addSelection=function(b,he){this.selections.push({value:b,rev:he||this.$rev})},C.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},C.prototype.markIgnored=function(b,he){he==null&&(he=this.$rev+1);for(var Ce=this.$undoStack,X=Ce.length;X--;){var V=Ce[X][0];if(V.id<=b)break;V.id<he&&(V.ignore=!0)}this.lastDeltas=null},C.prototype.getSelection=function(b,he){for(var Ce=this.selections,X=Ce.length;X--;){var V=Ce[X];if(V.rev<b)return he&&(V=Ce[X+1]),V}},C.prototype.getRevision=function(){return this.$rev},C.prototype.getDeltas=function(b,he){he==null&&(he=this.$rev+1);for(var Ce=this.$undoStack,X=null,V=0,Xe=Ce.length;Xe--;){var U=Ce[Xe][0];if(U.id<he&&!X&&(X=Xe+1),U.id<=b){V=Xe+1;break}}return Ce.slice(V,X)},C.prototype.getChangedRanges=function(b,he){he==null&&(he=this.$rev+1)},C.prototype.getChangedLines=function(b,he){he==null&&(he=this.$rev+1)},C.prototype.undo=function(b,he){this.lastDeltas=null;var Ce=this.$undoStack;if(S(Ce,Ce.length)){b||(b=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var X=Ce.pop(),V=null;return X&&(V=b.undoChanges(X,he),this.$redoStack.push(X),this.$syncRev()),this.$fromUndo=!1,V}},C.prototype.redo=function(b,he){if(this.lastDeltas=null,b||(b=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var Ce=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);M(this.$redoStack,Ce),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(Xe){Xe[0].id=++this.$maxRev},this)}var X=this.$redoStack.pop(),V=null;return X&&(V=b.redoChanges(X,he),this.$undoStack.push(X),this.$syncRev()),this.$fromUndo=!1,V},C.prototype.$syncRev=function(){var b=this.$undoStack,he=b[b.length-1],Ce=he&&he[0].id||0;this.$redoStackBaseRev=Ce,this.$rev=Ce},C.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},C.prototype.canUndo=function(){return this.$undoStack.length>0},C.prototype.canRedo=function(){return this.$redoStack.length>0},C.prototype.bookmark=function(b){b==null&&(b=this.$rev),this.mark=b},C.prototype.isAtBookmark=function(){return this.$rev===this.mark},C.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},C.prototype.fromJSON=function(b){this.reset(),this.$undoStack=b.$undoStack,this.$redoStack=b.$redoStack},C.prototype.$prettyPrint=function(b){return b?o(b):o(this.$undoStack)+`
195
+ ---
196
+ `+o(this.$redoStack)},C}();A.prototype.hasUndo=A.prototype.canUndo,A.prototype.hasRedo=A.prototype.canRedo,A.prototype.isClean=A.prototype.isAtBookmark,A.prototype.markClean=A.prototype.bookmark;function S(C,b){for(var he=b;he--;){var Ce=C[he];if(Ce&&!Ce[0].ignore){for(;he<b-1;){var X=e(C[he],C[he+1]);C[he]=X[0],C[he+1]=X[1],he++}return!0}}}var x=f("./range").Range,c=x.comparePoints;x.comparePoints;function p(C){return{row:C.row,column:C.column}}function t(C){return{start:p(C.start),end:p(C.end),action:C.action,lines:C.lines.slice()}}function o(C){if(C=C||this,Array.isArray(C))return C.map(o).join(`
197
+ `);var b="";return C.action?(b=C.action=="insert"?"+":"-",b+="["+C.lines+"]"):C.value&&(Array.isArray(C.value)?b=C.value.map(r).join(`
198
+ `):b=r(C.value)),C.start&&(b+=r(C)),(C.id||C.rev)&&(b+=" ("+(C.id||C.rev)+")"),b}function r(C){return C.start.row+":"+C.start.column+"=>"+C.end.row+":"+C.end.column}function n(C,b){var he=C.action=="insert",Ce=b.action=="insert";if(he&&Ce)if(c(b.start,C.end)>=0)a(b,C,-1);else if(c(b.start,C.start)<=0)a(C,b,1);else return null;else if(he&&!Ce)if(c(b.start,C.end)>=0)a(b,C,-1);else if(c(b.end,C.start)<=0)a(C,b,-1);else return null;else if(!he&&Ce)if(c(b.start,C.start)>=0)a(b,C,1);else if(c(b.start,C.start)<=0)a(C,b,1);else return null;else if(!he&&!Ce)if(c(b.start,C.start)>=0)a(b,C,1);else if(c(b.end,C.start)<=0)a(C,b,-1);else return null;return[b,C]}function e(C,b){for(var he=C.length;he--;)for(var Ce=0;Ce<b.length;Ce++)if(!n(C[he],b[Ce])){for(;he<C.length;){for(;Ce--;)n(b[Ce],C[he]);Ce=b.length,he++}return[C,b]}return C.selectionBefore=b.selectionBefore=C.selectionAfter=b.selectionAfter=null,[b,C]}function i(C,b){var he=C.action=="insert",Ce=b.action=="insert";if(he&&Ce)c(C.start,b.start)<0?a(b,C,1):a(C,b,1);else if(he&&!Ce)c(C.start,b.end)>=0?a(C,b,-1):(c(C.start,b.start)<=0||a(C,x.fromPoints(b.start,C.start),-1),a(b,C,1));else if(!he&&Ce)c(b.start,C.end)>=0?a(b,C,-1):(c(b.start,C.start)<=0||a(b,x.fromPoints(C.start,b.start),-1),a(C,b,1));else if(!he&&!Ce)if(c(b.start,C.end)>=0)a(b,C,-1);else if(c(b.end,C.start)<=0)a(C,b,-1);else{var X,V;return c(C.start,b.start)<0&&(X=C,C=v(C,b.start)),c(C.end,b.end)>0&&(V=v(C,b.end)),m(b.end,C.start,C.end,-1),V&&!X&&(C.lines=V.lines,C.start=V.start,C.end=V.end,V=C),[b,X,V].filter(Boolean)}return[b,C]}function a(C,b,he){m(C.start,b.start,b.end,he),m(C.end,b.start,b.end,he)}function m(C,b,he,Ce){C.row==(Ce==1?b:he).row&&(C.column+=Ce*(he.column-b.column)),C.row+=Ce*(he.row-b.row)}function v(C,b){var he=C.lines,Ce=C.end;C.end=p(b);var X=C.end.row-C.start.row,V=he.splice(X,he.length),Xe=X?b.column:b.column-C.start.column;he.push(V[0].substring(0,Xe)),V[0]=V[0].substr(Xe);var U={start:p(b),end:Ce,lines:V,action:C.action};return U}function k(C,b){b=t(b);for(var he=C.length;he--;){for(var Ce=C[he],X=0;X<Ce.length;X++){var V=Ce[X],Xe=i(V,b);b=Xe[0],Xe.length!=2&&(Xe[2]?(Ce.splice(X+1,1,Xe[1],Xe[2]),X++):Xe[1]||(Ce.splice(X,1),X--))}Ce.length||C.splice(he,1)}return C}function M(C,b){for(var he=0;he<b.length;he++)for(var Ce=b[he],X=0;X<Ce.length;X++)k(C,Ce[X])}g.UndoManager=A}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(f,g,ue){var A=f("../range").Range,S=function(){function x(c,p){this.foldData=c,Array.isArray(p)?this.folds=p:p=this.folds=[p];var t=p[p.length-1];this.range=new A(p[0].start.row,p[0].start.column,t.end.row,t.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(o){o.setFoldLine(this)},this)}return x.prototype.shiftRow=function(c){this.start.row+=c,this.end.row+=c,this.folds.forEach(function(p){p.start.row+=c,p.end.row+=c})},x.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(p,t){return-p.range.compareEnd(t.start.row,t.start.column)}),this.range.compareEnd(c.start.row,c.start.column)>0?(this.end.row=c.end.row,this.end.column=c.end.column):this.range.compareStart(c.end.row,c.end.column)<0&&(this.start.row=c.start.row,this.start.column=c.start.column)}else if(c.start.row==this.end.row)this.folds.push(c),this.end.row=c.end.row,this.end.column=c.end.column;else if(c.end.row==this.start.row)this.folds.unshift(c),this.start.row=c.start.row,this.start.column=c.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");c.foldLine=this},x.prototype.containsRow=function(c){return c>=this.start.row&&c<=this.end.row},x.prototype.walk=function(c,p,t){var o=0,r=this.folds,n,e,i,a=!0;p==null&&(p=this.end.row,t=this.end.column);for(var m=0;m<r.length;m++){if(n=r[m],e=n.range.compareStart(p,t),e==-1){c(null,p,t,o,a);return}if(i=c(null,n.start.row,n.start.column,o,a),i=!i&&c(n.placeholder,n.start.row,n.start.column,o),i||e===0)return;a=!n.sameRow,o=n.end.column}c(null,p,t,o,a)},x.prototype.getNextFoldTo=function(c,p){for(var t,o,r=0;r<this.folds.length;r++){if(t=this.folds[r],o=t.range.compareEnd(c,p),o==-1)return{fold:t,kind:"after"};if(o===0)return{fold:t,kind:"inside"}}return null},x.prototype.addRemoveChars=function(c,p,t){var o=this.getNextFoldTo(c,p),r,n;if(o){if(r=o.fold,o.kind=="inside"&&r.start.column!=p&&r.start.row!=c)window.console&&window.console.log(c,p,r);else if(r.start.row==c){n=this.folds;var e=n.indexOf(r);for(e===0&&(this.start.column+=t),e;e<n.length;e++){if(r=n[e],r.start.column+=t,!r.sameRow)return;r.end.column+=t}this.end.column+=t}}},x.prototype.split=function(c,p){var t=this.getNextFoldTo(c,p);if(!t||t.kind=="inside")return null;var o=t.fold,r=this.folds,n=this.foldData,e=r.indexOf(o),i=r[e-1];this.end.row=i.end.row,this.end.column=i.end.column,r=r.splice(e,r.length-e);var a=new x(n,r);return n.splice(n.indexOf(this)+1,0,a),a},x.prototype.merge=function(c){for(var p=c.folds,t=0;t<p.length;t++)this.addFold(p[t]);var o=this.foldData;o.splice(o.indexOf(c),1)},x.prototype.toString=function(){var c=[this.range.toString()+": ["];return this.folds.forEach(function(p){c.push(" "+p.toString())}),c.push("]"),c.join(`
199
+ `)},x.prototype.idxToPosition=function(c){for(var p=0,t=0;t<this.folds.length;t++){var o=this.folds[t];if(c-=o.start.column-p,c<0)return{row:o.start.row,column:o.start.column+c};if(c-=o.placeholder.length,c<0)return o.start;p=o.end.column}return{row:this.end.row,column:this.end.column+c}},x}();g.FoldLine=S}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(f,g,ue){var A=f("./range").Range,S=A.comparePoints,x=function(){function c(){this.ranges=[],this.$bias=1}return c.prototype.pointIndex=function(p,t,o){for(var r=this.ranges,n=o||0;n<r.length;n++){var e=r[n],i=S(p,e.end);if(!(i>0)){var a=S(p,e.start);return i===0?t&&a!==0?-n-2:n:a>0||a===0&&!t?n:-n-1}}return-n-1},c.prototype.add=function(p){var t=!p.isEmpty(),o=this.pointIndex(p.start,t);o<0&&(o=-o-1);var r=this.pointIndex(p.end,t,o);return r<0?r=-r-1:r++,this.ranges.splice(o,r-o,p)},c.prototype.addList=function(p){for(var t=[],o=p.length;o--;)t.push.apply(t,this.add(p[o]));return t},c.prototype.substractPoint=function(p){var t=this.pointIndex(p);if(t>=0)return this.ranges.splice(t,1)},c.prototype.merge=function(){var p=[],t=this.ranges;t=t.sort(function(i,a){return S(i.start,a.start)});for(var o=t[0],r,n=1;n<t.length;n++){r=o,o=t[n];var e=S(r.end,o.start);e<0||e==0&&!r.isEmpty()&&!o.isEmpty()||(S(r.end,o.end)<0&&(r.end.row=o.end.row,r.end.column=o.end.column),t.splice(n,1),p.push(o),o=r,n--)}return this.ranges=t,p},c.prototype.contains=function(p,t){return this.pointIndex({row:p,column:t})>=0},c.prototype.containsPoint=function(p){return this.pointIndex(p)>=0},c.prototype.rangeAtPoint=function(p){var t=this.pointIndex(p);if(t>=0)return this.ranges[t]},c.prototype.clipRows=function(p,t){var o=this.ranges;if(o[0].start.row>t||o[o.length-1].start.row<p)return[];var r=this.pointIndex({row:p,column:0});r<0&&(r=-r-1);var n=this.pointIndex({row:t,column:0},r);n<0&&(n=-n-1);for(var e=[],i=r;i<n;i++)e.push(o[i]);return e},c.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},c.prototype.attach=function(p){this.session&&this.detach(),this.session=p,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(p){for(var t=p.start,o=p.end,r=t.row,n=o.row,e=this.ranges,i=0,a=e.length;i<a;i++){var m=e[i];if(m.end.row>=r)break}if(p.action=="insert")for(var v=n-r,k=-t.column+o.column;i<a;i++){var m=e[i];if(m.start.row>r)break;if(m.start.row==r&&m.start.column>=t.column&&(m.start.column==t.column&&this.$bias<=0||(m.start.column+=k,m.start.row+=v)),m.end.row==r&&m.end.column>=t.column){if(m.end.column==t.column&&this.$bias<0)continue;m.end.column==t.column&&k>0&&i<a-1&&m.end.column>m.start.column&&m.end.column==e[i+1].start.column&&(m.end.column-=k),m.end.column+=k,m.end.row+=v}}else for(var v=r-n,k=t.column-o.column;i<a;i++){var m=e[i];if(m.start.row>n)break;m.end.row<n&&(r<m.end.row||r==m.end.row&&t.column<m.end.column)?(m.end.row=r,m.end.column=t.column):m.end.row==n?m.end.column<=o.column?(v||m.end.column>t.column)&&(m.end.column=t.column,m.end.row=t.row):(m.end.column+=k,m.end.row+=v):m.end.row>n&&(m.end.row+=v),m.start.row<n&&(r<m.start.row||r==m.start.row&&t.column<m.start.column)?(m.start.row=r,m.start.column=t.column):m.start.row==n?m.start.column<=o.column?(v||m.start.column>t.column)&&(m.start.column=t.column,m.start.row=t.row):(m.start.column+=k,m.start.row+=v):m.start.row>n&&(m.start.row+=v)}if(v!=0&&i<a)for(;i<a;i++){var m=e[i];m.start.row+=v,m.end.row+=v}},c}();x.prototype.comparePoints=S,g.RangeList=x}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(f,g,ue){var A=this&&this.__extends||function(){var r=function(n,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,a){i.__proto__=a}||function(i,a){for(var m in a)Object.prototype.hasOwnProperty.call(a,m)&&(i[m]=a[m])},r(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(n,e);function i(){this.constructor=n}n.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)}}(),S=f("../range_list").RangeList,x=function(r){A(n,r);function n(e,i){var a=r.call(this)||this;return a.foldLine=null,a.placeholder=i,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 n.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},n.prototype.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(i){i.setFoldLine(e)})},n.prototype.clone=function(){var e=this.range.clone(),i=new n(e,this.placeholder);return this.subFolds.forEach(function(a){i.subFolds.push(a.clone())}),i.collapseChildren=this.collapseChildren,i},n.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){p(e,this.start);for(var k=e.start.row,M=e.start.column,i=0,a=-1;i<this.subFolds.length&&(a=this.subFolds[i].range.compare(k,M),a==1);i++);var m=this.subFolds[i],v=0;if(a==0){if(m.range.containsRange(e))return m.addSubFold(e);v=1}for(var k=e.range.end.row,M=e.range.end.column,C=i,a=-1;C<this.subFolds.length&&(a=this.subFolds[C].range.compare(k,M),a==1);C++);a==0&&C++;for(var b=this.subFolds.splice(i,C-i,e),he=a==0?b.length-1:b.length,Ce=v;Ce<he;Ce++)e.addSubFold(b[Ce]);return e.setFoldLine(this.foldLine),e}},n.prototype.restoreRange=function(e){return o(e,this.start)},n}(S);function c(r,n){r.row-=n.row,r.row==0&&(r.column-=n.column)}function p(r,n){c(r.start,n),c(r.end,n)}function t(r,n){r.row==0&&(r.column+=n.column),r.row+=n.row}function o(r,n){t(r.start,n),t(r.end,n)}g.Fold=x}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(f,g,ue){var A=f("../range").Range,S=f("./fold_line").FoldLine,x=f("./fold").Fold,c=f("../token_iterator").TokenIterator,p=f("../mouse/mouse_event").MouseEvent;function t(){this.getFoldAt=function(o,r,n){var e=this.getFoldLine(o);if(!e)return null;for(var i=e.folds,a=0;a<i.length;a++){var m=i[a].range;if(m.contains(o,r)){if(n==1&&m.isEnd(o,r)&&!m.isEmpty())continue;if(n==-1&&m.isStart(o,r)&&!m.isEmpty())continue;return i[a]}}},this.getFoldsInRange=function(o){var r=o.start,n=o.end,e=this.$foldData,i=[];r.column+=1,n.column-=1;for(var a=0;a<e.length;a++){var m=e[a].range.compareRange(o);if(m!=2){if(m==-2)break;for(var v=e[a].folds,k=0;k<v.length;k++){var M=v[k];if(m=M.range.compareRange(o),m==-2)break;if(m==2)continue;if(m==42)break;i.push(M)}}}return r.column-=1,n.column+=1,i},this.getFoldsInRangeList=function(o){if(Array.isArray(o)){var r=[];o.forEach(function(n){r=r.concat(this.getFoldsInRange(n))},this)}else var r=this.getFoldsInRange(o);return r},this.getAllFolds=function(){for(var o=[],r=this.$foldData,n=0;n<r.length;n++)for(var e=0;e<r[n].folds.length;e++)o.push(r[n].folds[e]);return o},this.getFoldStringAt=function(o,r,n,e){if(e=e||this.getFoldLine(o),!e)return null;for(var i={end:{column:0}},a,m,v=0;v<e.folds.length;v++){m=e.folds[v];var k=m.range.compareEnd(o,r);if(k==-1){a=this.getLine(m.start.row).substring(i.end.column,m.start.column);break}else if(k===0)return null;i=m}return a||(a=this.getLine(m.start.row).substring(i.end.column)),n==-1?a.substring(0,r-i.end.column):n==1?a.substring(r-i.end.column):a},this.getFoldLine=function(o,r){var n=this.$foldData,e=0;for(r&&(e=n.indexOf(r)),e==-1&&(e=0),e;e<n.length;e++){var i=n[e];if(i.start.row<=o&&i.end.row>=o)return i;if(i.end.row>o)return null}return null},this.getNextFoldLine=function(o,r){var n=this.$foldData,e=0;for(r&&(e=n.indexOf(r)),e==-1&&(e=0),e;e<n.length;e++){var i=n[e];if(i.end.row>=o)return i}return null},this.getFoldedRowCount=function(o,r){for(var n=this.$foldData,e=r-o+1,i=0;i<n.length;i++){var a=n[i],m=a.end.row,v=a.start.row;if(m>=r){v<r&&(v>=o?e-=r-v:e=0);break}else m>=o&&(v>=o?e-=m-v:e-=m-o+1)}return e},this.$addFoldLine=function(o){return this.$foldData.push(o),this.$foldData.sort(function(r,n){return r.start.row-n.start.row}),o},this.addFold=function(o,r){var n=this.$foldData,e=!1,i;o instanceof x?i=o:(i=new x(r,o),i.collapseChildren=r.collapseChildren),this.$clipRangeToDocument(i.range);var a=i.start.row,m=i.start.column,v=i.end.row,k=i.end.column,M=this.getFoldAt(a,m,1),C=this.getFoldAt(v,k,-1);if(M&&C==M)return M.addSubFold(i);M&&!M.range.isStart(a,m)&&this.removeFold(M),C&&!C.range.isEnd(v,k)&&this.removeFold(C);var b=this.getFoldsInRange(i.range);b.length>0&&(this.removeFolds(b),i.collapseChildren||b.forEach(function(V){i.addSubFold(V)}));for(var he=0;he<n.length;he++){var Ce=n[he];if(v==Ce.start.row){Ce.addFold(i),e=!0;break}else if(a==Ce.end.row){if(Ce.addFold(i),e=!0,!i.sameRow){var X=n[he+1];if(X&&X.start.row==v){Ce.merge(X);break}}break}else if(v<=Ce.start.row)break}return e||(Ce=this.$addFoldLine(new S(this.$foldData,i))),this.$useWrapMode?this.$updateWrapData(Ce.start.row,Ce.start.row):this.$updateRowLengthCache(Ce.start.row,Ce.start.row),this.$modified=!0,this._signal("changeFold",{data:i,action:"add"}),i},this.addFolds=function(o){o.forEach(function(r){this.addFold(r)},this)},this.removeFold=function(o){var r=o.foldLine,n=r.start.row,e=r.end.row,i=this.$foldData,a=r.folds;if(a.length==1)i.splice(i.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 m=r.split(o.start.row,o.start.column);a=m.folds,a.shift(),m.start.row=a[0].start.row,m.start.column=a[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(n,e):this.$updateRowLengthCache(n,e)),this.$modified=!0,this._signal("changeFold",{data:o,action:"remove"})},this.removeFolds=function(o){for(var r=[],n=0;n<o.length;n++)r.push(o[n]);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 n,e;if(o==null)n=new A(0,0,this.getLength(),0),r==null&&(r=!0);else if(typeof o=="number")n=new A(o,0,o,this.getLine(o).length);else if("row"in o)n=A.fromPoints(o,o);else{if(Array.isArray(o))return e=[],o.forEach(function(a){e=e.concat(this.unfold(a))},this),e;n=o}e=this.getFoldsInRangeList(n);for(var i=e;e.length==1&&A.comparePoints(e[0].start,n.start)<0&&A.comparePoints(e[0].end,n.end)>0;)this.expandFolds(e),e=this.getFoldsInRangeList(n);if(r!=!1?this.removeFolds(e):this.expandFolds(e),i.length)return i},this.isRowFolded=function(o,r){return!!this.getFoldLine(o,r)},this.getRowFoldEnd=function(o,r){var n=this.getFoldLine(o,r);return n?n.end.row:o},this.getRowFoldStart=function(o,r){var n=this.getFoldLine(o,r);return n?n.start.row:o},this.getFoldDisplayLine=function(o,r,n,e,i){e==null&&(e=o.start.row),i==null&&(i=0),r==null&&(r=o.end.row),n==null&&(n=this.getLine(r).length);var a=this.doc,m="";return o.walk(function(v,k,M,C){if(!(k<e)){if(k==e){if(M<i)return;C=Math.max(i,C)}v!=null?m+=v:m+=a.getLine(k).substring(C,M)}},r,n),m},this.getDisplayLine=function(o,r,n,e){var i=this.getFoldLine(o);if(i)return this.getFoldDisplayLine(i,o,r,n,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 n=r.folds.map(function(e){return e.clone()});return new S(o,n)}),o},this.toggleFold=function(o){var r=this.selection,n=r.getRange(),e,i;if(n.isEmpty()){var a=n.start;if(e=this.getFoldAt(a.row,a.column),e){this.expandFold(e);return}else if(o){var m=this.getFoldLine(a.row);m&&this.expandFolds(m.folds);return}else(i=this.findMatchingBracket(a))?n.comparePoint(i)==1?n.end=i:(n.start=i,n.start.column++,n.end.column--):(i=this.findMatchingBracket({row:a.row,column:a.column+1}))?(n.comparePoint(i)==1?n.end=i:n.start=i,n.start.column++):n=this.getCommentFoldRange(a.row,a.column)||n}else{var v=this.getFoldsInRange(n);if(o&&v.length){this.expandFolds(v);return}else v.length==1&&(e=v[0])}if(e||(e=this.getFoldAt(n.start.row,n.start.column)),e&&e.range.toString()==n.toString()){this.expandFold(e);return}var k="...";if(!n.isMultiLine()){if(k=this.getTextRange(n),k.length<4)return;k=k.trim().substring(0,2)+".."}this.addFold(k,n)},this.getCommentFoldRange=function(o,r,n){var e=new c(this,o,r),i=e.getCurrentToken(),a=i&&i.type;if(i&&/^comment|string/.test(a)){a=a.match(/comment|string/)[0],a=="comment"&&(a+="|doc-start|\\.doc");var m=new RegExp(a),v=new A;if(n!=1){do i=e.stepBackward();while(i&&m.test(i.type));i=e.stepForward()}v.start.row=e.getCurrentTokenRow(),v.start.column=e.getCurrentTokenColumn()+i.value.length,e=new c(this,o,r);var k=this.getState(e.$row);if(n!=-1){var M=-1;do if(i=e.stepForward(),M==-1){var C=this.getState(e.$row);k.toString()!==C.toString()&&(M=e.$row)}else if(e.$row>M)break;while(i&&m.test(i.type));i=e.stepBackward()}else i=e.getCurrentToken();return v.end.row=e.getCurrentTokenRow(),v.end.column=e.getCurrentTokenColumn(),v.start.row==v.end.row&&v.start.column>v.end.column?void 0:v}},this.foldAll=function(o,r,n,e){n==null&&(n=1e5);var i=this.foldWidgets;if(i){r=r||this.getLength(),o=o||0;for(var a=o;a<r;a++)if(i[a]==null&&(i[a]=this.getFoldWidget(a)),i[a]=="start"&&!(e&&!e(a))){var m=this.getFoldWidgetRange(a);m&&m.isMultiLine()&&m.end.row<=r&&m.start.row>=o&&(a=m.end.row,m.collapseChildren=n,this.addFold("...",m))}}},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 n=o.getTokens(r),e=0;e<n.length;e++){var i=n[e];if(!(i.type=="text"&&/^\s+$/.test(i.value)))return!!/comment/.test(i.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(o){if(!this.$foldStyles[o])throw new Error("invalid fold style: "+o+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=o){this.$foldStyle=o,o=="manual"&&this.unfold();var r=this.$foldMode;this.$setFolding(null),this.$setFolding(r)}},this.$setFolding=function(o){if(this.$foldMode!=o){if(this.$foldMode=o,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!o||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=o.getFoldWidget.bind(o,this,this.$foldStyle),this.getFoldWidgetRange=o.getFoldWidgetRange.bind(o,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(o,r){var n=this.foldWidgets;if(!n||r&&n[o])return{};for(var e=o-1,i;e>=0;){var a=n[e];if(a==null&&(a=n[e]=this.getFoldWidget(e)),a=="start"){var m=this.getFoldWidgetRange(e);if(i||(i=m),m&&m.end.row>=o)break}e--}return{range:e!==-1&&m,firstRange:i}},this.onFoldWidgetClick=function(o,r){r instanceof p&&(r=r.domEvent);var n={children:r.shiftKey,all:r.ctrlKey||r.metaKey,siblings:r.altKey},e=this.$toggleFoldWidget(o,n);if(!e){var i=r.target||r.srcElement;i&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid")}},this.$toggleFoldWidget=function(o,r){if(this.getFoldWidget){var n=this.getFoldWidget(o),e=this.getLine(o),i=n==="end"?-1:1,a=this.getFoldAt(o,i===-1?0:e.length,i);if(a)return r.children||r.all?this.removeFold(a):this.expandFold(a),a;var m=this.getFoldWidgetRange(o,!0);if(m&&!m.isMultiLine()&&(a=this.getFoldAt(m.start.row,m.start.column,1),a&&m.isEqual(a.range)))return this.removeFold(a),a;if(r.siblings){var v=this.getParentFoldRangeData(o);if(v.range)var k=v.range.start.row+1,M=v.range.end.row;this.foldAll(k,M,r.all?1e4:0)}else r.children?(M=m?m.end.row:this.getLength(),this.foldAll(o+1,M,r.all?1e4:0)):m&&(r.all&&(m.collapseChildren=1e4),this.addFold("...",m));return m}},this.toggleFoldWidget=function(o){var r=this.selection.getCursor().row;r=this.getRowFoldStart(r);var n=this.$toggleFoldWidget(r,{});if(!n){var e=this.getParentFoldRangeData(r,!0);if(n=e.range||e.firstRange,n){r=n.start.row;var i=this.getFoldAt(r,this.getLine(r).length,1);i?this.removeFold(i):this.addFold("...",n)}}},this.updateFoldWidgets=function(o){var r=o.start.row,n=o.end.row-r;if(n===0)this.foldWidgets[r]=null;else if(o.action=="remove")this.foldWidgets.splice(r,n+1,null);else{var e=Array(n+1);e.unshift(r,1),this.foldWidgets.splice.apply(this.foldWidgets,e)}},this.tokenizerUpdateFoldWidgets=function(o){var r=o.data;r.first!=r.last&&this.foldWidgets.length>r.first&&this.foldWidgets.splice(r.first,this.foldWidgets.length)}}g.Folding=t}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(f,g,ue){var A=f("../token_iterator").TokenIterator,S=f("../range").Range;function x(){this.findMatchingBracket=function(c,p){if(c.column==0)return null;var t=p||this.getLine(c.row).charAt(c.column-1);if(t=="")return null;var o=t.match(/([\(\[\{])|([\)\]\}])/);return o?o[1]?this.$findClosingBracket(o[1],c):this.$findOpeningBracket(o[2],c):null},this.getBracketRange=function(c){var p=this.getLine(c.row),t=!0,o,r=p.charAt(c.column-1),n=r&&r.match(/([\(\[\{])|([\)\]\}])/);if(n||(r=p.charAt(c.column),c={row:c.row,column:c.column+1},n=r&&r.match(/([\(\[\{])|([\)\]\}])/),t=!1),!n)return null;if(n[1]){var e=this.$findClosingBracket(n[1],c);if(!e)return null;o=S.fromPoints(c,e),t||(o.end.column++,o.start.column--),o.cursor=o.end}else{var e=this.$findOpeningBracket(n[2],c);if(!e)return null;o=S.fromPoints(e,c),t||(o.start.column++,o.end.column--),o.cursor=o.start}return o},this.getMatchingBracketRanges=function(c,p){var t=this.getLine(c.row),o=/([\(\[\{])|([\)\]\}])/,r=!p&&t.charAt(c.column-1),n=r&&r.match(o);if(n||(r=(p===void 0||p)&&t.charAt(c.column),c={row:c.row,column:c.column+1},n=r&&r.match(o)),!n)return null;var e=new S(c.row,c.column-1,c.row,c.column),i=n[1]?this.$findClosingBracket(n[1],c):this.$findOpeningBracket(n[2],c);if(!i)return[e];var a=new S(i.row,i.column,i.row,i.column+1);return[e,a]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(c,p,t){var o=this.$brackets[c],r=1,n=new A(this,p.row,p.column),e=n.getCurrentToken();if(e||(e=n.stepForward()),!!e){t||(t=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var i=p.column-n.getCurrentTokenColumn()-2,a=e.value;;){for(;i>=0;){var m=a.charAt(i);if(m==o){if(r-=1,r==0)return{row:n.getCurrentTokenRow(),column:i+n.getCurrentTokenColumn()}}else m==c&&(r+=1);i-=1}do e=n.stepBackward();while(e&&!t.test(e.type));if(e==null)break;a=e.value,i=a.length-1}return null}},this.$findClosingBracket=function(c,p,t){var o=this.$brackets[c],r=1,n=new A(this,p.row,p.column),e=n.getCurrentToken();if(e||(e=n.stepForward()),!!e){t||(t=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var i=p.column-n.getCurrentTokenColumn();;){for(var a=e.value,m=a.length;i<m;){var v=a.charAt(i);if(v==o){if(r-=1,r==0)return{row:n.getCurrentTokenRow(),column:i+n.getCurrentTokenColumn()}}else v==c&&(r+=1);i+=1}do e=n.stepForward();while(e&&!t.test(e.type));if(e==null)break;i=0}return null}},this.getMatchingTags=function(c){var p=new A(this,c.row,c.column),t=this.$findTagName(p);if(t){var o=p.stepBackward();return o.value==="<"?this.$findClosingTag(p,t):this.$findOpeningTag(p,t)}},this.$findTagName=function(c){var p=c.getCurrentToken(),t=!1,o=!1;if(p&&p.type.indexOf("tag-name")===-1)do o?p=c.stepBackward():p=c.stepForward(),p&&(p.value==="/>"?o=!0:p.type.indexOf("tag-name")!==-1&&(t=!0));while(p&&!t);return p},this.$findClosingTag=function(c,p){var t,o=p.value,r=p.value,n=0,e=new S(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);p=c.stepForward();var i=new S(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+p.value.length),a=!1;do{if(t=p,t.type.indexOf("tag-close")!==-1&&!a){var m=new S(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);a=!0}if(p=c.stepForward(),p){if(p.value===">"&&!a){var m=new S(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);a=!0}if(p.type.indexOf("tag-name")!==-1){if(o=p.value,r===o){if(t.value==="<")n++;else if(t.value==="</"&&(n--,n<0)){c.stepBackward();var v=new S(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+2);p=c.stepForward();var k=new S(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+p.value.length);if(p.type.indexOf("tag-close")===-1&&(p=c.stepForward()),p&&p.value===">")var M=new S(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);else return}}}else if(r===o&&p.value==="/>"&&(n--,n<0))var v=new S(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+2),k=v,M=k,m=new S(i.end.row,i.end.column,i.end.row,i.end.column+1)}}while(p&&n>=0);if(e&&m&&v&&M&&i&&k)return{openTag:new S(e.start.row,e.start.column,m.end.row,m.end.column),closeTag:new S(v.start.row,v.start.column,M.end.row,M.end.column),openTagName:i,closeTagName:k}},this.$findOpeningTag=function(c,p){var t=c.getCurrentToken(),o=p.value,r=0,n=c.getCurrentTokenRow(),e=c.getCurrentTokenColumn(),i=e+2,a=new S(n,e,n,i);c.stepForward();var m=new S(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+p.value.length);if(p.type.indexOf("tag-close")===-1&&(p=c.stepForward()),!(!p||p.value!==">")){var v=new S(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);c.stepBackward(),c.stepBackward();do if(p=t,n=c.getCurrentTokenRow(),e=c.getCurrentTokenColumn(),i=e+p.value.length,t=c.stepBackward(),p){if(p.type.indexOf("tag-name")!==-1){if(o===p.value)if(t.value==="<"){if(r++,r>0){var k=new S(n,e,n,i),M=new S(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);do p=c.stepForward();while(p&&p.value!==">");var C=new S(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1)}}else t.value==="</"&&r--}else if(p.value==="/>"){for(var b=0,he=t;he;){if(he.type.indexOf("tag-name")!==-1&&he.value===o){r--;break}else if(he.value==="<")break;he=c.stepBackward(),b++}for(var Ce=0;Ce<b;Ce++)c.stepForward()}}while(t&&r<=0);if(M&&C&&a&&v&&k&&m)return{openTag:new S(M.start.row,M.start.column,C.end.row,C.end.column),closeTag:new S(a.start.row,a.start.column,v.end.row,v.end.column),openTagName:k,closeTagName:m}}}}g.BracketMatch=x}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/line_widgets","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(f,g,ue){var A=f("./lib/oop"),S=f("./lib/lang"),x=f("./bidihandler").BidiHandler,c=f("./config"),p=f("./lib/event_emitter").EventEmitter,t=f("./selection").Selection,o=f("./mode/text").Mode,r=f("./range").Range,n=f("./line_widgets").LineWidgets,e=f("./document").Document,i=f("./background_tokenizer").BackgroundTokenizer,a=f("./search_highlight").SearchHighlight,m=f("./undomanager").UndoManager,v=function(){function U(O,w){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$editor=null,this.prevOp={},this.$foldData=[],this.id="session"+ ++U.$uid,this.$foldData.toString=function(){return this.join(`
200
+ `)},this.$gutterCustomWidgets={},this.bgTokenizer=new i(new o().getTokenizer(),this);var y=this;this.bgTokenizer.on("update",function(T){y._signal("tokenizerUpdate",T)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof O!="object"||!O.getLine)&&(O=new e(O)),this.setDocument(O),this.selection=new t(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new x(this),c.resetOptions(this),this.setMode(w),c._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return U.prototype.$initOperationListeners=function(){var O=this;this.curOp=null,this.on("change",function(){O.curOp||(O.startOperation(),O.curOp.selectionBefore=O.$lastSel),O.curOp.docChanged=!0},!0),this.on("changeSelection",function(){O.curOp||(O.startOperation(),O.curOp.selectionBefore=O.$lastSel),O.curOp.selectionChanged=!0},!0),this.$operationResetTimer=S.delayedCall(this.endOperation.bind(this,!0))},U.prototype.startOperation=function(O){if(this.curOp){if(!O||this.curOp.command)return;this.prevOp=this.curOp}O||(O={}),this.$operationResetTimer.schedule(),this.curOp={command:O.command||{},args:O.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",O)},U.prototype.endOperation=function(O){if(this.curOp){if(O&&O.returnValue===!1){this.curOp=null,this._signal("endOperation",O);return}if(O==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var w=this.selection.toJSON();this.curOp.selectionAfter=w,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(w),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",O)}},U.prototype.setDocument=function(O){this.doc&&this.doc.off("change",this.$onChange),this.doc=O,O.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},U.prototype.getDocument=function(){return this.doc},Object.defineProperty(U.prototype,"widgetManager",{get:function(){var O=new n(this);return this.widgetManager=O,this.$editor&&O.attach(this.$editor),O},set:function(O){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:O})},enumerable:!1,configurable:!0}),U.prototype.$resetRowCache=function(O){if(!O){this.$docRowCache=[],this.$screenRowCache=[];return}var w=this.$docRowCache.length,y=this.$getRowCacheIndex(this.$docRowCache,O)+1;w>y&&(this.$docRowCache.splice(y,w),this.$screenRowCache.splice(y,w))},U.prototype.$getRowCacheIndex=function(O,w){for(var y=0,T=O.length-1;y<=T;){var Oe=y+T>>1,ze=O[Oe];if(w>ze)y=Oe+1;else if(w<ze)T=Oe-1;else return Oe}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(O){var w=O.data;this.$resetRowCache(w.start.row)},U.prototype.onChange=function(O){this.$modified=!0,this.$bidiHandler.onChange(O),this.$resetRowCache(O.start.row);var w=this.$updateInternalDataOnChange(O);!this.$fromUndo&&this.$undoManager&&(w&&w.length&&(this.$undoManager.add({action:"removeFolds",folds:w},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(O,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(O),this._signal("change",O)},U.prototype.onSelectionChange=function(){this._signal("changeSelection")},U.prototype.setValue=function(O){this.doc.setValue(O),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},U.fromJSON=function(O){typeof O=="string"&&(O=JSON.parse(O));var w=new m;w.$undoStack=O.history.undo,w.$redoStack=O.history.redo,w.mark=O.history.mark,w.$rev=O.history.rev;var y=new U(O.value);return O.folds.forEach(function(T){y.addFold("...",r.fromPoints(T.start,T.end))}),y.setAnnotations(O.annotations),y.setBreakpoints(O.breakpoints),y.setMode(O.mode),y.setScrollLeft(O.scrollLeft),y.setScrollTop(O.scrollTop),y.setUndoManager(w),y.selection.fromJSON(O.selection),y},U.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(O){return O.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},U.prototype.toString=function(){return this.doc.getValue()},U.prototype.getSelection=function(){return this.selection},U.prototype.getState=function(O){return this.bgTokenizer.getState(O)},U.prototype.getTokens=function(O){return this.bgTokenizer.getTokens(O)},U.prototype.getTokenAt=function(O,w){var y=this.bgTokenizer.getTokens(O),T,Oe=0;if(w==null){var ze=y.length-1;Oe=this.getLine(O).length}else for(var ze=0;ze<y.length&&(Oe+=y[ze].value.length,!(Oe>=w));ze++);return T=y[ze],T?(T.index=ze,T.start=Oe-T.value.length,T):null},U.prototype.setUndoManager=function(O){if(this.$undoManager=O,this.$informUndoManager&&this.$informUndoManager.cancel(),O){var w=this;O.addSession(this),this.$syncInformUndoManager=function(){w.$informUndoManager.cancel(),w.mergeUndoDeltas=!1},this.$informUndoManager=S.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()?S.stringRepeat(" ",this.getTabSize()):" "},U.prototype.setUseSoftTabs=function(O){this.setOption("useSoftTabs",O)},U.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},U.prototype.setTabSize=function(O){this.setOption("tabSize",O)},U.prototype.getTabSize=function(){return this.$tabSize},U.prototype.isTabStop=function(O){return this.$useSoftTabs&&O.column%this.$tabSize===0},U.prototype.setNavigateWithinSoftTabs=function(O){this.setOption("navigateWithinSoftTabs",O)},U.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},U.prototype.setOverwrite=function(O){this.setOption("overwrite",O)},U.prototype.getOverwrite=function(){return this.$overwrite},U.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},U.prototype.addGutterDecoration=function(O,w){this.$decorations[O]||(this.$decorations[O]=""),this.$decorations[O]+=" "+w,this._signal("changeBreakpoint",{})},U.prototype.removeGutterCustomWidget=function(O){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(O)},U.prototype.addGutterCustomWidget=function(O,w){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(O,w)},U.prototype.removeGutterDecoration=function(O,w){this.$decorations[O]=(this.$decorations[O]||"").replace(" "+w,""),this._signal("changeBreakpoint",{})},U.prototype.getBreakpoints=function(){return this.$breakpoints},U.prototype.setBreakpoints=function(O){this.$breakpoints=[];for(var w=0;w<O.length;w++)this.$breakpoints[O[w]]="ace_breakpoint";this._signal("changeBreakpoint",{})},U.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},U.prototype.setBreakpoint=function(O,w){w===void 0&&(w="ace_breakpoint"),w?this.$breakpoints[O]=w:delete this.$breakpoints[O],this._signal("changeBreakpoint",{})},U.prototype.clearBreakpoint=function(O){delete this.$breakpoints[O],this._signal("changeBreakpoint",{})},U.prototype.addMarker=function(O,w,y,T){var Oe=this.$markerId++,ze={range:O,type:y||"line",renderer:typeof y=="function"?y:null,clazz:w,inFront:!!T,id:Oe};return T?(this.$frontMarkers[Oe]=ze,this._signal("changeFrontMarker")):(this.$backMarkers[Oe]=ze,this._signal("changeBackMarker")),Oe},U.prototype.addDynamicMarker=function(O,w){if(O.update){var y=this.$markerId++;return O.id=y,O.inFront=!!w,w?(this.$frontMarkers[y]=O,this._signal("changeFrontMarker")):(this.$backMarkers[y]=O,this._signal("changeBackMarker")),O}},U.prototype.removeMarker=function(O){var w=this.$frontMarkers[O]||this.$backMarkers[O];if(w){var y=w.inFront?this.$frontMarkers:this.$backMarkers;delete y[O],this._signal(w.inFront?"changeFrontMarker":"changeBackMarker")}},U.prototype.getMarkers=function(O){return O?this.$frontMarkers:this.$backMarkers},U.prototype.highlight=function(O){if(!this.$searchHighlight){var w=new a(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(w)}this.$searchHighlight.setRegexp(O)},U.prototype.highlightLines=function(O,w,y,T){typeof w!="number"&&(y=w,w=O),y||(y="ace_step");var Oe=new r(O,0,w,1/0);return Oe.id=this.addMarker(Oe,y,"fullLine",T),Oe},U.prototype.setAnnotations=function(O){this.$annotations=O,this._signal("changeAnnotation",{})},U.prototype.getAnnotations=function(){return this.$annotations||[]},U.prototype.clearAnnotations=function(){this.setAnnotations([])},U.prototype.$detectNewLine=function(O){var w=O.match(/^.*?(\r?\n)/m);w?this.$autoNewLine=w[1]:this.$autoNewLine=`
201
+ `},U.prototype.getWordRange=function(O,w){var y=this.getLine(O),T=!1;if(w>0&&(T=!!y.charAt(w-1).match(this.tokenRe)),T||(T=!!y.charAt(w).match(this.tokenRe)),T)var Oe=this.tokenRe;else if(/^\s+$/.test(y.slice(w-1,w+1)))var Oe=/\s/;else var Oe=this.nonTokenRe;var ze=w;if(ze>0){do ze--;while(ze>=0&&y.charAt(ze).match(Oe));ze++}for(var ft=w;ft<y.length&&y.charAt(ft).match(Oe);)ft++;return new r(O,ze,O,ft)},U.prototype.getAWordRange=function(O,w){for(var y=this.getWordRange(O,w),T=this.getLine(y.end.row);T.charAt(y.end.column).match(/[ \t]/);)y.end.column+=1;return y},U.prototype.setNewLineMode=function(O){this.doc.setNewLineMode(O)},U.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},U.prototype.setUseWorker=function(O){this.setOption("useWorker",O)},U.prototype.getUseWorker=function(){return this.$useWorker},U.prototype.onReloadTokenizer=function(O){var w=O.data;this.bgTokenizer.start(w.first),this._signal("tokenizerUpdate",O)},U.prototype.setMode=function(O,w){if(O&&typeof O=="object"){if(O.getTokenizer)return this.$onChangeMode(O);var y=O,T=y.path}else T=O||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new o),this.$modes[T]&&!y){this.$onChangeMode(this.$modes[T]),w&&w();return}this.$modeId=T,c.loadModule(["mode",T],(function(Oe){if(!this.destroyed){if(this.$modeId!==T)return w&&w();this.$modes[T]&&!y?this.$onChangeMode(this.$modes[T]):Oe&&Oe.Mode&&(Oe=new Oe.Mode(y),y||(this.$modes[T]=Oe,Oe.$id=T),this.$onChangeMode(Oe)),w&&w()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},U.prototype.$onChangeMode=function(O,w){if(w||(this.$modeId=O.$id),this.$mode!==O){var y=this.$mode;this.$mode=O,this.$stopWorker(),this.$useWorker&&this.$startWorker();var T=O.getTokenizer();if(T.on!==void 0){var Oe=this.onReloadTokenizer.bind(this);T.on("update",Oe)}this.bgTokenizer.setTokenizer(T),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=O.tokenRe,this.nonTokenRe=O.nonTokenRe,w||(O.attachToSession&&O.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(O.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:y,mode:O}))}},U.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},U.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(O){c.warn("Could not load worker",O),this.$worker=null}},U.prototype.getMode=function(){return this.$mode},U.prototype.setScrollTop=function(O){this.$scrollTop===O||isNaN(O)||(this.$scrollTop=O,this._signal("changeScrollTop",O))},U.prototype.getScrollTop=function(){return this.$scrollTop},U.prototype.setScrollLeft=function(O){this.$scrollLeft===O||isNaN(O)||(this.$scrollLeft=O,this._signal("changeScrollLeft",O))},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 O=0;return this.lineWidgets.forEach(function(w){w&&w.screenWidth>O&&(O=w.screenWidth)}),this.lineWidgetWidth=O},U.prototype.$computeWidth=function(O){if(this.$modified||O){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var w=this.doc.getAllLines(),y=this.$rowLengthCache,T=0,Oe=0,ze=this.$foldData[Oe],ft=ze?ze.start.row:1/0,pt=w.length,gt=0;gt<pt;gt++){if(gt>ft){if(gt=ze.end.row+1,gt>=pt)break;ze=this.$foldData[Oe++],ft=ze?ze.start.row:1/0}y[gt]==null&&(y[gt]=this.$getStringScreenWidth(w[gt])[0]),y[gt]>T&&(T=y[gt])}this.screenWidth=T}},U.prototype.getLine=function(O){return this.doc.getLine(O)},U.prototype.getLines=function(O,w){return this.doc.getLines(O,w)},U.prototype.getLength=function(){return this.doc.getLength()},U.prototype.getTextRange=function(O){return this.doc.getTextRange(O||this.selection.getRange())},U.prototype.insert=function(O,w){return this.doc.insert(O,w)},U.prototype.remove=function(O){return this.doc.remove(O)},U.prototype.removeFullLines=function(O,w){return this.doc.removeFullLines(O,w)},U.prototype.undoChanges=function(O,w){if(O.length){this.$fromUndo=!0;for(var y=O.length-1;y!=-1;y--){var T=O[y];T.action=="insert"||T.action=="remove"?this.doc.revertDelta(T):T.folds&&this.addFolds(T.folds)}!w&&this.$undoSelect&&(O.selectionBefore?this.selection.fromJSON(O.selectionBefore):this.selection.setRange(this.$getUndoSelection(O,!0))),this.$fromUndo=!1}},U.prototype.redoChanges=function(O,w){if(O.length){this.$fromUndo=!0;for(var y=0;y<O.length;y++){var T=O[y];(T.action=="insert"||T.action=="remove")&&this.doc.$safeApplyDelta(T)}!w&&this.$undoSelect&&(O.selectionAfter?this.selection.fromJSON(O.selectionAfter):this.selection.setRange(this.$getUndoSelection(O,!1))),this.$fromUndo=!1}},U.prototype.setUndoSelect=function(O){this.$undoSelect=O},U.prototype.$getUndoSelection=function(O,w){function y(pt){return w?pt.action!=="insert":pt.action==="insert"}for(var T,Oe,ze=0;ze<O.length;ze++){var ft=O[ze];if(ft.start){if(!T){y(ft)?T=r.fromPoints(ft.start,ft.end):T=r.fromPoints(ft.start,ft.start);continue}y(ft)?(Oe=ft.start,T.compare(Oe.row,Oe.column)==-1&&T.setStart(Oe),Oe=ft.end,T.compare(Oe.row,Oe.column)==1&&T.setEnd(Oe)):(Oe=ft.start,T.compare(Oe.row,Oe.column)==-1&&(T=r.fromPoints(ft.start,ft.start)))}}return T},U.prototype.replace=function(O,w){return this.doc.replace(O,w)},U.prototype.moveText=function(O,w,y){var T=this.getTextRange(O),Oe=this.getFoldsInRange(O),ze=r.fromPoints(w,w);if(!y){this.remove(O);var ft=O.start.row-O.end.row,pt=ft?-O.end.column:O.start.column-O.end.column;pt&&(ze.start.row==O.end.row&&ze.start.column>O.end.column&&(ze.start.column+=pt),ze.end.row==O.end.row&&ze.end.column>O.end.column&&(ze.end.column+=pt)),ft&&ze.start.row>=O.end.row&&(ze.start.row+=ft,ze.end.row+=ft)}if(ze.end=this.insert(ze.start,T),Oe.length){var gt=O.start,Qt=ze.start,ft=Qt.row-gt.row,pt=Qt.column-gt.column;this.addFolds(Oe.map(function(Gt){return Gt=Gt.clone(),Gt.start.row==gt.row&&(Gt.start.column+=pt),Gt.end.row==gt.row&&(Gt.end.column+=pt),Gt.start.row+=ft,Gt.end.row+=ft,Gt}))}return ze},U.prototype.indentRows=function(O,w,y){y=y.replace(/\t/g,this.getTabString());for(var T=O;T<=w;T++)this.doc.insertInLine({row:T,column:0},y)},U.prototype.outdentRows=function(O){for(var w=O.collapseRows(),y=new r(0,0,0,0),T=this.getTabSize(),Oe=w.start.row;Oe<=w.end.row;++Oe){var ze=this.getLine(Oe);y.start.row=Oe,y.end.row=Oe;for(var ft=0;ft<T&&ze.charAt(ft)==" ";++ft);ft<T&&ze.charAt(ft)==" "?(y.start.column=ft,y.end.column=ft+1):(y.start.column=0,y.end.column=ft),this.remove(y)}},U.prototype.$moveLines=function(O,w,y){if(O=this.getRowFoldStart(O),w=this.getRowFoldEnd(w),y<0){var T=this.getRowFoldStart(O+y);if(T<0)return 0;var Oe=T-O}else if(y>0){var T=this.getRowFoldEnd(w+y);if(T>this.doc.getLength()-1)return 0;var Oe=T-w}else{O=this.$clipRowToDocument(O),w=this.$clipRowToDocument(w);var Oe=w-O+1}var ze=new r(O,0,w,Number.MAX_VALUE),ft=this.getFoldsInRange(ze).map(function(gt){return gt=gt.clone(),gt.start.row+=Oe,gt.end.row+=Oe,gt}),pt=y==0?this.doc.getLines(O,w):this.doc.removeFullLines(O,w);return this.doc.insertFullLines(O+Oe,pt),ft.length&&this.addFolds(ft),Oe},U.prototype.moveLinesUp=function(O,w){return this.$moveLines(O,w,-1)},U.prototype.moveLinesDown=function(O,w){return this.$moveLines(O,w,1)},U.prototype.duplicateLines=function(O,w){return this.$moveLines(O,w,0)},U.prototype.$clipRowToDocument=function(O){return Math.max(0,Math.min(O,this.doc.getLength()-1))},U.prototype.$clipColumnToRow=function(O,w){return w<0?0:Math.min(this.doc.getLine(O).length,w)},U.prototype.$clipPositionToDocument=function(O,w){if(w=Math.max(0,w),O<0)O=0,w=0;else{var y=this.doc.getLength();O>=y?(O=y-1,w=this.doc.getLine(y-1).length):w=Math.min(this.doc.getLine(O).length,w)}return{row:O,column:w}},U.prototype.$clipRangeToDocument=function(O){O.start.row<0?(O.start.row=0,O.start.column=0):O.start.column=this.$clipColumnToRow(O.start.row,O.start.column);var w=this.doc.getLength()-1;return O.end.row>w?(O.end.row=w,O.end.column=this.doc.getLine(w).length):O.end.column=this.$clipColumnToRow(O.end.row,O.end.column),O},U.prototype.setUseWrapMode=function(O){if(O!=this.$useWrapMode){if(this.$useWrapMode=O,this.$modified=!0,this.$resetRowCache(0),O){var w=this.getLength();this.$wrapData=Array(w),this.$updateWrapData(0,w-1)}this._signal("changeWrapMode")}},U.prototype.getUseWrapMode=function(){return this.$useWrapMode},U.prototype.setWrapLimitRange=function(O,w){(this.$wrapLimitRange.min!==O||this.$wrapLimitRange.max!==w)&&(this.$wrapLimitRange={min:O,max:w},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},U.prototype.adjustWrapLimit=function(O,w){var y=this.$wrapLimitRange;y.max<0&&(y={min:w,max:w});var T=this.$constrainWrapLimit(O,y.min,y.max);return T!=this.$wrapLimit&&T>1?(this.$wrapLimit=T,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},U.prototype.$constrainWrapLimit=function(O,w,y){return w&&(O=Math.max(w,O)),y&&(O=Math.min(y,O)),O},U.prototype.getWrapLimit=function(){return this.$wrapLimit},U.prototype.setWrapLimit=function(O){this.setWrapLimitRange(O,O)},U.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},U.prototype.$updateInternalDataOnChange=function(O){var w=this.$useWrapMode,y=O.action,T=O.start,Oe=O.end,ze=T.row,ft=Oe.row,pt=ft-ze,gt=null;if(this.$updating=!0,pt!=0)if(y==="remove"){this[w?"$wrapData":"$rowLengthCache"].splice(ze,pt);var Qt=this.$foldData;gt=this.getFoldsInRange(O),this.removeFolds(gt);var mt=this.getFoldLine(Oe.row),Vt=0;if(mt){mt.addRemoveChars(Oe.row,Oe.column,T.column-Oe.column),mt.shiftRow(-pt);var Gt=this.getFoldLine(ze);Gt&&Gt!==mt&&(Gt.merge(mt),mt=Gt),Vt=Qt.indexOf(mt)+1}for(Vt;Vt<Qt.length;Vt++){var mt=Qt[Vt];mt.start.row>=Oe.row&&mt.shiftRow(-pt)}ft=ze}else{var Yt=Array(pt);Yt.unshift(ze,0);var Zt=w?this.$wrapData:this.$rowLengthCache;Zt.splice.apply(Zt,Yt);var Qt=this.$foldData,mt=this.getFoldLine(ze),Vt=0;if(mt){var Xt=mt.range.compareInside(T.row,T.column);Xt==0?(mt=mt.split(T.row,T.column),mt&&(mt.shiftRow(pt),mt.addRemoveChars(ft,0,Oe.column-T.column))):Xt==-1&&(mt.addRemoveChars(ze,0,Oe.column-T.column),mt.shiftRow(pt)),Vt=Qt.indexOf(mt)+1}for(Vt;Vt<Qt.length;Vt++){var mt=Qt[Vt];mt.start.row>=ze&&mt.shiftRow(pt)}}else{pt=Math.abs(O.start.column-O.end.column),y==="remove"&&(gt=this.getFoldsInRange(O),this.removeFolds(gt),pt=-pt);var mt=this.getFoldLine(ze);mt&&mt.addRemoveChars(ze,T.column,pt)}return w&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,w?this.$updateWrapData(ze,ft):this.$updateRowLengthCache(ze,ft),gt},U.prototype.$updateRowLengthCache=function(O,w){this.$rowLengthCache[O]=null,this.$rowLengthCache[w]=null},U.prototype.$updateWrapData=function(O,w){var y=this.doc.getAllLines(),T=this.getTabSize(),Oe=this.$wrapData,ze=this.$wrapLimit,ft,pt,gt=O;for(w=Math.min(w,y.length-1);gt<=w;)pt=this.getFoldLine(gt,pt),pt?(ft=[],pt.walk((function(Qt,mt,Vt,Gt){var Yt;if(Qt!=null){Yt=this.$getDisplayTokens(Qt,ft.length),Yt[0]=C;for(var Zt=1;Zt<Yt.length;Zt++)Yt[Zt]=b}else Yt=this.$getDisplayTokens(y[mt].substring(Gt,Vt),ft.length);ft=ft.concat(Yt)}).bind(this),pt.end.row,y[pt.end.row].length+1),Oe[pt.start.row]=this.$computeWrapSplits(ft,ze,T),gt=pt.end.row+1):(ft=this.$getDisplayTokens(y[gt]),Oe[gt]=this.$computeWrapSplits(ft,ze,T),gt++)},U.prototype.$computeWrapSplits=function(O,w,y){if(O.length==0)return[];var T=[],Oe=O.length,ze=0,ft=0,pt=this.$wrapAsCode,gt=this.$indentedSoftWrap,Qt=w<=Math.max(2*y,8)||gt===!1?0:Math.floor(w/2);function mt(){var Xt=0;if(Qt===0)return Xt;if(gt)for(var di=0;di<O.length;di++){var sn=O[di];if(sn==Ce)Xt+=1;else if(sn==X)Xt+=y;else{if(sn==V)continue;break}}return pt&&gt!==!1&&(Xt+=y),Math.min(Xt,Qt)}function Vt(Xt){for(var di=Xt-ze,sn=ze;sn<Xt;sn++){var fi=O[sn];(fi===12||fi===2)&&(di-=1)}T.length||(Gt=mt(),T.indent=Gt),ft+=di,T.push(ft),ze=Xt}for(var Gt=0;Oe-ze>w-Gt;){var Yt=ze+w-Gt;if(O[Yt-1]>=Ce&&O[Yt]>=Ce){Vt(Yt);continue}if(O[Yt]==C||O[Yt]==b){for(Yt;Yt!=ze-1&&O[Yt]!=C;Yt--);if(Yt>ze){Vt(Yt);continue}for(Yt=ze+w,Yt;Yt<O.length&&O[Yt]==b;Yt++);if(Yt==O.length)break;Vt(Yt);continue}for(var Zt=Math.max(Yt-(w-(w>>2)),ze-1);Yt>Zt&&O[Yt]<C;)Yt--;if(pt){for(;Yt>Zt&&O[Yt]<C;)Yt--;for(;Yt>Zt&&O[Yt]==he;)Yt--}else for(;Yt>Zt&&O[Yt]<Ce;)Yt--;if(Yt>Zt){Vt(++Yt);continue}Yt=ze+w,O[Yt]==M&&Yt--,Vt(Yt-Gt)}return T},U.prototype.$getDisplayTokens=function(O,w){var y=[],T;w=w||0;for(var Oe=0;Oe<O.length;Oe++){var ze=O.charCodeAt(Oe);if(ze==9){T=this.getScreenTabSize(y.length+w),y.push(X);for(var ft=1;ft<T;ft++)y.push(V)}else ze==32?y.push(Ce):ze>39&&ze<48||ze>57&&ze<64?y.push(he):ze>=4352&&Xe(ze)?y.push(k,M):y.push(k)}return y},U.prototype.$getStringScreenWidth=function(O,w,y){if(w==0)return[0,0];w==null&&(w=1/0),y=y||0;var T,Oe;for(Oe=0;Oe<O.length&&(T=O.charCodeAt(Oe),T==9?y+=this.getScreenTabSize(y):T>=4352&&Xe(T)?y+=2:y+=1,!(y>w));Oe++);return[y,Oe]},U.prototype.getRowLength=function(O){var w=1;return this.lineWidgets&&(w+=this.lineWidgets[O]&&this.lineWidgets[O].rowCount||0),!this.$useWrapMode||!this.$wrapData[O]?w:this.$wrapData[O].length+w},U.prototype.getRowLineCount=function(O){return!this.$useWrapMode||!this.$wrapData[O]?1:this.$wrapData[O].length+1},U.prototype.getRowWrapIndent=function(O){if(this.$useWrapMode){var w=this.screenToDocumentPosition(O,Number.MAX_VALUE),y=this.$wrapData[w.row];return y.length&&y[0]<w.column?y.indent:0}else return 0},U.prototype.getScreenLastRowColumn=function(O){var w=this.screenToDocumentPosition(O,Number.MAX_VALUE);return this.documentToScreenColumn(w.row,w.column)},U.prototype.getDocumentLastRowColumn=function(O,w){var y=this.documentToScreenRow(O,w);return this.getScreenLastRowColumn(y)},U.prototype.getDocumentLastRowColumnPosition=function(O,w){var y=this.documentToScreenRow(O,w);return this.screenToDocumentPosition(y,Number.MAX_VALUE/10)},U.prototype.getRowSplitData=function(O){if(this.$useWrapMode)return this.$wrapData[O]},U.prototype.getScreenTabSize=function(O){return this.$tabSize-(O%this.$tabSize|0)},U.prototype.screenToDocumentRow=function(O,w){return this.screenToDocumentPosition(O,w).row},U.prototype.screenToDocumentColumn=function(O,w){return this.screenToDocumentPosition(O,w).column},U.prototype.screenToDocumentPosition=function(O,w,y){if(O<0)return{row:0,column:0};var T,Oe=0,ze=0,ft,pt=0,gt=0,Qt=this.$screenRowCache,mt=this.$getRowCacheIndex(Qt,O),Vt=Qt.length;if(Vt&&mt>=0)var pt=Qt[mt],Oe=this.$docRowCache[mt],Gt=O>Qt[Vt-1];else var Gt=!Vt;for(var Yt=this.getLength()-1,Zt=this.getNextFoldLine(Oe),Xt=Zt?Zt.start.row:1/0;pt<=O&&(gt=this.getRowLength(Oe),!(pt+gt>O||Oe>=Yt));)pt+=gt,Oe++,Oe>Xt&&(Oe=Zt.end.row+1,Zt=this.getNextFoldLine(Oe,Zt),Xt=Zt?Zt.start.row:1/0),Gt&&(this.$docRowCache.push(Oe),this.$screenRowCache.push(pt));if(Zt&&Zt.start.row<=Oe)T=this.getFoldDisplayLine(Zt),Oe=Zt.start.row;else{if(pt+gt<=O||Oe>Yt)return{row:Yt,column:this.getLine(Yt).length};T=this.getLine(Oe),Zt=null}var di=0,sn=Math.floor(O-pt);if(this.$useWrapMode){var fi=this.$wrapData[Oe];fi&&(ft=fi[sn],sn>0&&fi.length&&(di=fi.indent,ze=fi[sn-1]||fi[fi.length-1],T=T.substring(ze)))}return y!==void 0&&this.$bidiHandler.isBidiRow(pt+sn,Oe,sn)&&(w=this.$bidiHandler.offsetToCol(y)),ze+=this.$getStringScreenWidth(T,w-di)[1],this.$useWrapMode&&ze>=ft&&(ze=ft-1),Zt?Zt.idxToPosition(ze):{row:Oe,column:ze}},U.prototype.documentToScreenPosition=function(O,w){if(typeof w>"u")var y=this.$clipPositionToDocument(O.row,O.column);else y=this.$clipPositionToDocument(O,w);O=y.row,w=y.column;var T=0,Oe=null,ze=null;ze=this.getFoldAt(O,w,1),ze&&(O=ze.start.row,w=ze.start.column);var ft,pt=0,gt=this.$docRowCache,Qt=this.$getRowCacheIndex(gt,O),mt=gt.length;if(mt&&Qt>=0)var pt=gt[Qt],T=this.$screenRowCache[Qt],Vt=O>gt[mt-1];else var Vt=!mt;for(var Gt=this.getNextFoldLine(pt),Yt=Gt?Gt.start.row:1/0;pt<O;){if(pt>=Yt){if(ft=Gt.end.row+1,ft>O)break;Gt=this.getNextFoldLine(ft,Gt),Yt=Gt?Gt.start.row:1/0}else ft=pt+1;T+=this.getRowLength(pt),pt=ft,Vt&&(this.$docRowCache.push(pt),this.$screenRowCache.push(T))}var Zt="";Gt&&pt>=Yt?(Zt=this.getFoldDisplayLine(Gt,O,w),Oe=Gt.start.row):(Zt=this.getLine(O).substring(0,w),Oe=O);var Xt=0;if(this.$useWrapMode){var di=this.$wrapData[Oe];if(di){for(var sn=0;Zt.length>=di[sn];)T++,sn++;Zt=Zt.substring(di[sn-1]||0,Zt.length),Xt=sn>0?di.indent:0}}return this.lineWidgets&&this.lineWidgets[pt]&&this.lineWidgets[pt].rowsAbove&&(T+=this.lineWidgets[pt].rowsAbove),{row:T,column:Xt+this.$getStringScreenWidth(Zt)[0]}},U.prototype.documentToScreenColumn=function(O,w){return this.documentToScreenPosition(O,w).column},U.prototype.documentToScreenRow=function(O,w){return this.documentToScreenPosition(O,w).row},U.prototype.getScreenLength=function(){var O=0,w=null;if(this.$useWrapMode)for(var Oe=this.$wrapData.length,ze=0,T=0,w=this.$foldData[T++],ft=w?w.start.row:1/0;ze<Oe;){var pt=this.$wrapData[ze];O+=pt?pt.length+1:1,ze++,ze>ft&&(ze=w.end.row+1,w=this.$foldData[T++],ft=w?w.start.row:1/0)}else{O=this.getLength();for(var y=this.$foldData,T=0;T<y.length;T++)w=y[T],O-=w.end.row-w.start.row}return this.lineWidgets&&(O+=this.$getWidgetScreenLength()),O},U.prototype.$setFontMetrics=function(O){this.$enableVarChar&&(this.$getStringScreenWidth=function(w,y,T){if(y===0)return[0,0];y||(y=1/0),T=T||0;var Oe,ze;for(ze=0;ze<w.length&&(Oe=w.charAt(ze),Oe===" "?T+=this.getScreenTabSize(T):T+=O.getCharacterWidth(Oe),!(T>y));ze++);return[T,ze]})},U.prototype.getPrecedingCharacter=function(){var O=this.selection.getCursor();if(O.column===0)return O.row===0?"":this.doc.getNewLineCharacter();var w=this.getLine(O.row);return w[O.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}();v.$uid=0,v.prototype.$modes=c.$modes,v.prototype.getValue=v.prototype.toString,v.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},v.prototype.$overwrite=!1,v.prototype.$mode=null,v.prototype.$modeId=null,v.prototype.$scrollTop=0,v.prototype.$scrollLeft=0,v.prototype.$wrapLimit=80,v.prototype.$useWrapMode=!1,v.prototype.$wrapLimitRange={min:null,max:null},v.prototype.lineWidgets=null,v.prototype.isFullWidth=Xe,A.implement(v.prototype,p);var k=1,M=2,C=3,b=4,he=9,Ce=10,X=11,V=12;function Xe(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}f("./edit_session/folding").Folding.call(v.prototype),f("./edit_session/bracket_match").BracketMatch.call(v.prototype),c.defineOptions(v.prototype,"session",{wrap:{set:function(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 O=typeof U=="number"?U:null;this.setWrapLimitRange(O,O),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(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}}),g.EditSession=v}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(f,g,ue){var A=f("./lib/lang"),S=f("./lib/oop"),x=f("./range").Range,c=function(){function r(){this.$options={}}return r.prototype.set=function(n){return S.mixin(this.$options,n),this},r.prototype.getOptions=function(){return A.copyObject(this.$options)},r.prototype.setOptions=function(n){this.$options=n},r.prototype.find=function(n){var e=this.$options,i=this.$matchIterator(n,e);if(!i)return!1;var a=null;return i.forEach(function(m,v,k,M){return a=new x(m,v,k,M),v==M&&e.start&&e.start.start&&e.skipCurrent!=!1&&a.isEqual(e.start)?(a=null,!1):!0}),a},r.prototype.findAll=function(n){var e=this.$options;if(!e.needle)return[];this.$assembleRegExp(e);var i=e.range,a=i?n.getLines(i.start.row,i.end.row):n.doc.getAllLines(),m=[],v=e.re;if(e.$isMultiLine){var k=v.length,M=a.length-k,C;e:for(var b=v.offset||0;b<=M;b++){for(var he=0;he<k;he++)if(a[b+he].search(v[he])==-1)continue e;var Ce=a[b],X=a[b+k-1],V=Ce.length-Ce.match(v[0])[0].length,Xe=X.match(v[k-1])[0].length;C&&C.end.row===b&&C.end.column>V||(m.push(C=new x(b,V,b+k-1,Xe)),k>2&&(b=b+k-2))}}else for(var U,O=0;O<a.length;O++)if(this.$isMultilineSearch(e)){var w=a.length-1;if(U=this.$multiLineForward(n,v,O,w),U){var y=U.endRow<=w?U.endRow-1:w;y>O&&(O=y),m.push(new x(U.startRow,U.startCol,U.endRow,U.endCol))}}else{U=A.getMatchOffsets(a[O],v);for(var he=0;he<U.length;he++){var T=U[he];m.push(new x(O,T.offset,O,T.offset+T.length))}}if(i){for(var Oe=i.start.column,ze=i.end.column,O=0,he=m.length-1;O<he&&m[O].start.column<Oe&&m[O].start.row==0;)O++;for(var ft=i.end.row-i.start.row;O<he&&m[he].end.column>ze&&m[he].end.row==ft;)he--;for(m=m.slice(O,he+1),O=0,he=m.length;O<he;O++)m[O].start.row+=i.start.row,m[O].end.row+=i.start.row}return m},r.prototype.parseReplaceString=function(n){for(var e={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},i="",a=0,m=n.length;a<m;a++){var v=n.charCodeAt(a);if(v===e.Backslash){if(a++,a>=m){i+="\\";break}var k=n.charCodeAt(a);switch(k){case e.Backslash:i+="\\";break;case e.n:i+=`
202
+ `;break;case e.t:i+=" ";break}continue}if(v===e.DollarSign){if(a++,a>=m){i+="$";break}var M=n.charCodeAt(a);if(M===e.DollarSign){i+="$$";continue}if(M===e.Digit0||M===e.Ampersand){i+="$&";continue}if(e.Digit1<=M&&M<=e.Digit9){i+="$"+n[a];continue}}i+=n[a]}return i||n},r.prototype.replace=function(n,e){var i=this.$options,a=this.$assembleRegExp(i);if(i.$isMultiLine)return e;if(a){var m=this.$isMultilineSearch(i);m&&(n=n.replace(/\r\n|\r|\n/g,`
203
+ `));var v=a.exec(n);if(!v||!m&&v[0].length!=n.length)return null;if(e=i.regExp?this.parseReplaceString(e):e.replace(/\$/g,"$$$$"),e=n.replace(a,e),i.preserveCase){e=e.split("");for(var k=Math.min(n.length,n.length);k--;){var M=n[k];M&&M.toLowerCase()!=M?e[k]=e[k].toUpperCase():e[k]=e[k].toLowerCase()}e=e.join("")}return e}},r.prototype.$assembleRegExp=function(n,e){if(n.needle instanceof RegExp)return n.re=n.needle;var i=n.needle;if(!n.needle)return n.re=!1;n.regExp||(i=A.escapeRegExp(i));var a=n.caseSensitive?"gm":"gmi";try{new RegExp(i,"u"),n.$supportsUnicodeFlag=!0,a+="u"}catch{n.$supportsUnicodeFlag=!1}if(n.wholeWord&&(i=p(i,n)),n.$isMultiLine=!e&&/[\n\r]/.test(i),n.$isMultiLine)return n.re=this.$assembleMultilineRegExp(i,a);try{var m=new RegExp(i,a)}catch{m=!1}return n.re=m},r.prototype.$assembleMultilineRegExp=function(n,e){for(var i=n.replace(/\r\n|\r|\n/g,`$
204
+ ^`).split(`
205
+ `),a=[],m=0;m<i.length;m++)try{a.push(new RegExp(i[m],e))}catch{return!1}return a},r.prototype.$isMultilineSearch=function(n){return n.re&&/\\r\\n|\\r|\\n/.test(n.re.source)&&n.regExp&&!n.$isMultiLine},r.prototype.$multiLineForward=function(n,e,i,a){for(var m,v=o(n,i),k=i;k<=a;){for(var M=0;M<v&&!(k>a);M++){var C=n.getLine(k++);m=m==null?C:m+`
206
+ `+C}var b=e.exec(m);if(e.lastIndex=0,b){var he=m.slice(0,b.index).split(`
207
+ `),Ce=b[0].split(`
208
+ `),X=i+he.length-1,V=he[he.length-1].length,Xe=X+Ce.length-1,U=Ce.length==1?V+Ce[0].length:Ce[Ce.length-1].length;return{startRow:X,startCol:V,endRow:Xe,endCol:U}}}return null},r.prototype.$multiLineBackward=function(n,e,i,a,m){for(var v,k=o(n,a),M=n.getLine(a).length-i,C=a;C>=m;){for(var b=0;b<k&&C>=m;b++){var he=n.getLine(C--);v=v==null?he:he+`
209
+ `+v}var Ce=t(v,e,M);if(Ce){var X=v.slice(0,Ce.index).split(`
210
+ `),V=Ce[0].split(`
211
+ `),Xe=C+X.length,U=X[X.length-1].length,O=Xe+V.length-1,w=V.length==1?U+V[0].length:V[V.length-1].length;return{startRow:Xe,startCol:U,endRow:O,endCol:w}}}return null},r.prototype.$matchIterator=function(n,e){var i=this.$assembleRegExp(e);if(!i)return!1;var a=this.$isMultilineSearch(e),m=this.$multiLineForward,v=this.$multiLineBackward,k=e.backwards==!0,M=e.skipCurrent!=!1,C=i.unicode,b=e.range,he=e.start;he||(he=b?b[k?"end":"start"]:n.selection.getRange()),he.start&&(he=he[M!=k?"end":"start"]);var Ce=b?b.start.row:0,X=b?b.end.row:n.getLength()-1;if(k)var V=function(O){var w=he.row;if(!U(w,he.column,O)){for(w--;w>=Ce;w--)if(U(w,Number.MAX_VALUE,O))return;if(e.wrap!=!1){for(w=X,Ce=he.row;w>=Ce;w--)if(U(w,Number.MAX_VALUE,O))return}}};else var V=function(w){var y=he.row;if(!U(y,he.column,w)){for(y=y+1;y<=X;y++)if(U(y,0,w))return;if(e.wrap!=!1){for(y=Ce,X=he.row;y<=X;y++)if(U(y,0,w))return}}};if(e.$isMultiLine)var Xe=i.length,U=function(O,w,y){var T=k?O-Xe+1:O;if(!(T<0||T+Xe>n.getLength())){var Oe=n.getLine(T),ze=Oe.search(i[0]);if(!(!k&&ze<w||ze===-1)){for(var ft=1;ft<Xe;ft++)if(Oe=n.getLine(T+ft),Oe.search(i[ft])==-1)return;var pt=Oe.match(i[Xe-1])[0].length;if(!(k&&pt>w)&&y(T,ze,T+Xe-1,pt))return!0}}};else if(k)var U=function(w,y,T){if(a){var Oe=v(n,i,y,w,Ce);if(!Oe)return!1;if(T(Oe.startRow,Oe.startCol,Oe.endRow,Oe.endCol))return!0}else{var ze=n.getLine(w),ft=[],pt,gt=0;for(i.lastIndex=0;pt=i.exec(ze);){var Qt=pt[0].length;if(gt=pt.index,!Qt){if(gt>=ze.length)break;i.lastIndex=gt+=A.skipEmptyMatch(ze,gt,C)}if(pt.index+Qt>y)break;ft.push(pt.index,Qt)}for(var mt=ft.length-1;mt>=0;mt-=2){var Vt=ft[mt-1],Qt=ft[mt];if(T(w,Vt,w,Vt+Qt))return!0}}};else var U=function(w,y,T){if(i.lastIndex=y,a){var Oe=m(n,i,w,X);if(Oe){var ze=Oe.endRow<=X?Oe.endRow-1:X;ze>w&&(w=ze)}if(!Oe)return!1;if(T(Oe.startRow,Oe.startCol,Oe.endRow,Oe.endCol))return!0}else for(var ft=n.getLine(w),pt,gt;gt=i.exec(ft);){var Qt=gt[0].length;if(pt=gt.index,T(w,pt,w,pt+Qt))return!0;if(!Qt&&(i.lastIndex=pt+=A.skipEmptyMatch(ft,pt,C),pt>=ft.length))return!1}};return{forEach:V}},r}();function p(r,n){var e=A.supportsLookbehind();function i(k,M){M===void 0&&(M=!0);var C=e&&n.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return C.test(k)||n.regExp?e&&n.$supportsUnicodeFlag?M?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var a=Array.from(r),m=a[0],v=a[a.length-1];return i(m)+r+i(v,!1)}function t(r,n,e){for(var i=null,a=0;a<=r.length;){n.lastIndex=a;var m=n.exec(r);if(!m)break;var v=m.index+m[0].length;if(v>r.length-e)break;(!i||v>i.index+i[0].length)&&(i=m),a=m.index+1}return i}function o(r,n){var e=5e3,i={row:n,column:0},a=r.doc.positionToIndex(i),m=a+e,v=r.doc.indexToPosition(m),k=v.row;return k+1}g.Search=c}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(f,g,ue){var A=this&&this.__extends||function(){var r=function(n,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,a){i.__proto__=a}||function(i,a){for(var m in a)Object.prototype.hasOwnProperty.call(a,m)&&(i[m]=a[m])},r(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(n,e);function i(){this.constructor=n}n.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)}}(),S=f("../lib/keys"),x=f("../lib/useragent"),c=S.KEY_MODS,p=function(){function r(n,e){this.$init(n,e,!1)}return r.prototype.$init=function(n,e,i){this.platform=e||(x.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(n),this.$singleCommand=i},r.prototype.addCommand=function(n){this.commands[n.name]&&this.removeCommand(n),this.commands[n.name]=n,n.bindKey&&this._buildKeyHash(n)},r.prototype.removeCommand=function(n,e){var i=n&&(typeof n=="string"?n:n.name);n=this.commands[i],e||delete this.commands[i];var a=this.commandKeyBinding;for(var m in a){var v=a[m];if(v==n)delete a[m];else if(Array.isArray(v)){var k=v.indexOf(n);k!=-1&&(v.splice(k,1),v.length==1&&(a[m]=v[0]))}}},r.prototype.bindKey=function(n,e,i){if(typeof n=="object"&&n&&(i==null&&(i=n.position),n=n[this.platform]),!!n){if(typeof e=="function")return this.addCommand({exec:e,bindKey:n,name:e.name||n});n.split("|").forEach(function(a){var m="";if(a.indexOf(" ")!=-1){var v=a.split(/\s+/);a=v.pop(),v.forEach(function(C){var b=this.parseKeys(C),he=c[b.hashId]+b.key;m+=(m?" ":"")+he,this._addCommandToBinding(m,"chainKeys")},this),m+=" "}var k=this.parseKeys(a),M=c[k.hashId]+k.key;this._addCommandToBinding(m+M,e,i)},this)}},r.prototype._addCommandToBinding=function(n,e,i){var a=this.commandKeyBinding,m;if(!e)delete a[n];else if(!a[n]||this.$singleCommand)a[n]=e;else{Array.isArray(a[n])?(m=a[n].indexOf(e))!=-1&&a[n].splice(m,1):a[n]=[a[n]],typeof i!="number"&&(i=t(e));var v=a[n];for(m=0;m<v.length;m++){var k=v[m],M=t(k);if(M>i)break}v.splice(m,0,e)}},r.prototype.addCommands=function(n){n&&Object.keys(n).forEach(function(e){var i=n[e];if(i){if(typeof i=="string")return this.bindKey(i,e);typeof i=="function"&&(i={exec:i}),typeof i=="object"&&(i.name||(i.name=e),this.addCommand(i))}},this)},r.prototype.removeCommands=function(n){Object.keys(n).forEach(function(e){this.removeCommand(n[e])},this)},r.prototype.bindKeys=function(n){Object.keys(n).forEach(function(e){this.bindKey(e,n[e])},this)},r.prototype._buildKeyHash=function(n){this.bindKey(n.bindKey,n)},r.prototype.parseKeys=function(n){var e=n.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(M){return M}),i=e.pop(),a=S[i];if(S.FUNCTION_KEYS[a])i=S.FUNCTION_KEYS[a].toLowerCase();else if(e.length){if(e.length==1&&e[0]=="shift")return{key:i.toUpperCase(),hashId:-1}}else return{key:i,hashId:-1};for(var m=0,v=e.length;v--;){var k=S.KEY_MODS[e[v]];if(k==null)return typeof console<"u"&&console.error("invalid modifier "+e[v]+" in "+n),!1;m|=k}return{key:i,hashId:m}},r.prototype.findKeyCommand=function(n,e){var i=c[n]+e;return this.commandKeyBinding[i]},r.prototype.handleKeyboard=function(n,e,i,a){if(!(a<0)){var m=c[e]+i,v=this.commandKeyBinding[m];return n.$keyChain&&(n.$keyChain+=" "+m,v=this.commandKeyBinding[n.$keyChain]||v),v&&(v=="chainKeys"||v[v.length-1]=="chainKeys")?(n.$keyChain=n.$keyChain||m,{command:"null"}):(n.$keyChain&&((!e||e==4)&&i.length==1?n.$keyChain=n.$keyChain.slice(0,-m.length-1):(e==-1||a>0)&&(n.$keyChain="")),{command:v})}},r.prototype.getStatusText=function(n,e){return e.$keyChain||""},r}();function t(r){return typeof r=="object"&&r.bindKey&&r.bindKey.position||(r.isDefault?-100:0)}var o=function(r){A(n,r);function n(e,i){var a=r.call(this,e,i)||this;return a.$singleCommand=!0,a}return n}(p);o.call=function(r,n,e){p.prototype.$init.call(r,n,e,!0)},p.call=function(r,n,e){p.prototype.$init.call(r,n,e,!1)},g.HashHandler=o,g.MultiHashHandler=p}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(f,g,ue){var A=this&&this.__extends||function(){var t=function(o,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,e){n.__proto__=e}||function(n,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])},t(o,r)};return function(o,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(o,r);function n(){this.constructor=o}o.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),S=f("../lib/oop"),x=f("../keyboard/hash_handler").MultiHashHandler,c=f("../lib/event_emitter").EventEmitter,p=function(t){A(o,t);function o(r,n){var e=t.call(this,n,r)||this;return e.byName=e.commands,e.setDefaultHandler("exec",function(i){return i.args?i.command.exec(i.editor,i.args,i.event,!1):i.command.exec(i.editor,{},i.event,!0)}),e}return o.prototype.exec=function(r,n,e){if(Array.isArray(r)){for(var i=r.length;i--;)if(this.exec(r[i],n,e))return!0;return!1}typeof r=="string"&&(r=this.commands[r]);var a={editor:n,command:r,args:e};return this.canExecute(r,n)?(a.returnValue=this._emit("exec",a),this._signal("afterExec",a),a.returnValue!==!1):(this._signal("commandUnavailable",a),!1)},o.prototype.canExecute=function(r,n){return typeof r=="string"&&(r=this.commands[r]),!(!r||n&&n.$readOnly&&!r.readOnly||this.$checkCommandState!=!1&&r.isAvailable&&!r.isAvailable(n))},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(n){this.macro.push([n.command,n.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(n){typeof n=="string"?this.exec(n,r):this.exec(n[0],r,n[1])},this)}finally{this.$inReplay=!1}}},o.prototype.trimMacro=function(r){return r.map(function(n){return typeof n[0]!="string"&&(n[0]=n[0].name),n[1]||(n=n[0]),n})},o}(x);S.implement(p.prototype,c),g.CommandManager=p}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(f,g,ue){var A=f("../lib/lang"),S=f("../config"),x=f("../range").Range;function c(t,o){return{win:t,mac:o}}g.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:c("Ctrl-,","Command-,"),exec:function(t){S.loadModule("ace/ext/settings_menu",function(o){o.init(t),t.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:c("Alt-E","F4"),exec:function(t){S.loadModule("ace/ext/error_marker",function(o){o.showErrorMarker(t,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:c("Alt-Shift-E","Shift-F4"),exec:function(t){S.loadModule("ace/ext/error_marker",function(o){o.showErrorMarker(t,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:c("Ctrl-A","Command-A"),exec:function(t){t.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:c(null,"Ctrl-L"),exec:function(t){t.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:c("Ctrl-L","Command-L"),exec:function(t,o){typeof o=="number"&&!isNaN(o)&&t.gotoLine(o),t.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:c("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(t){t.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:c("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(t){t.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:c("F2","F2"),exec:function(t){t.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:c("Alt-F2","Alt-F2"),exec:function(t){t.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:c(null,"Ctrl-Command-Option-0"),exec:function(t){t.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:c(null,"Ctrl-Command-Option-0"),exec:function(t){t.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:c("Alt-0","Command-Option-0"),exec:function(t){t.session.foldAll(),t.session.unfold(t.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:c("Alt-Shift-0","Command-Option-Shift-0"),exec:function(t){t.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:c("Ctrl-K","Command-G"),exec:function(t){t.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:c("Ctrl-Shift-K","Command-Shift-G"),exec:function(t){t.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:c("Alt-K","Ctrl-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:c("Alt-Shift-K","Ctrl-Shift-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:c("Ctrl-F","Command-F"),exec:function(t){S.loadModule("ace/ext/searchbox",function(o){o.Search(t)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(t){t.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:c("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(t){t.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:c("Ctrl-Home","Command-Home|Command-Up"),exec:function(t){t.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:c("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(t){t.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:c("Up","Up|Ctrl-P"),exec:function(t,o){t.navigateUp(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:c("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(t){t.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:c("Ctrl-End","Command-End|Command-Down"),exec:function(t){t.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:c("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(t){t.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:c("Down","Down|Ctrl-N"),exec:function(t,o){t.navigateDown(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:c("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(t){t.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:c("Ctrl-Left","Option-Left"),exec:function(t){t.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:c("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:c("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(t){t.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:c("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(t){t.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:c("Left","Left|Ctrl-B"),exec:function(t,o){t.navigateLeft(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:c("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(t){t.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:c("Ctrl-Right","Option-Right"),exec:function(t){t.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:c("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:c("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(t){t.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:c("Shift-Right","Shift-Right"),exec:function(t){t.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:c("Right","Right|Ctrl-F"),exec:function(t,o){t.navigateRight(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(t){t.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:c(null,"Option-PageDown"),exec:function(t){t.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:c("PageDown","PageDown|Ctrl-V"),exec:function(t){t.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(t){t.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:c(null,"Option-PageUp"),exec:function(t){t.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(t){t.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:c("Ctrl-Up",null),exec:function(t){t.renderer.scrollBy(0,-2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:c("Ctrl-Down",null),exec:function(t){t.renderer.scrollBy(0,2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:c("Ctrl-Alt-E","Command-Option-E"),exec:function(t){t.commands.toggleRecording(t)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:c("Ctrl-Shift-E","Command-Shift-E"),exec:function(t){t.commands.replay(t)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:c("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(t){t.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:c("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(t){t.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:c("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(t){t.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:c(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(t){},readOnly:!0},{name:"cut",description:"Cut",exec:function(t){var o=t.$copyWithEmptySelection&&t.selection.isEmpty(),r=o?t.selection.getLineRange():t.selection.getRange();t._emit("cut",r),r.isEmpty()||t.session.remove(r),t.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(t,o){t.$handlePaste(o)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:c("Ctrl-D","Command-D"),exec:function(t){t.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:c("Ctrl-Shift-D","Command-Shift-D"),exec:function(t){t.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:c("Ctrl-Alt-S","Command-Alt-S"),exec:function(t){t.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:c("Ctrl-/","Command-/"),exec:function(t){t.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:c("Ctrl-Shift-/","Command-Shift-/"),exec:function(t){t.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:c("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(t){t.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:c("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(t){t.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:c("Ctrl-H","Command-Option-F"),exec:function(t){S.loadModule("ace/ext/searchbox",function(o){o.Search(t,!0)})}},{name:"undo",description:"Undo",bindKey:c("Ctrl-Z","Command-Z"),exec:function(t){t.undo()}},{name:"redo",description:"Redo",bindKey:c("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(t){t.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:c("Alt-Shift-Up","Command-Option-Up"),exec:function(t){t.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:c("Alt-Up","Option-Up"),exec:function(t){t.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:c("Alt-Shift-Down","Command-Option-Down"),exec:function(t){t.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:c("Alt-Down","Option-Down"),exec:function(t){t.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:c("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(t){t.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:c("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(t){t.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:c("Shift-Delete",null),exec:function(t){if(t.selection.isEmpty())t.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:c("Alt-Backspace","Command-Backspace"),exec:function(t){t.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:c("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(t){t.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:c("Ctrl-Shift-Backspace",null),exec:function(t){var o=t.selection.getRange();o.start.column=0,t.session.remove(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:c("Ctrl-Shift-Delete",null),exec:function(t){var o=t.selection.getRange();o.end.column=Number.MAX_VALUE,t.session.remove(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:c("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(t){t.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:c("Ctrl-Delete","Alt-Delete"),exec:function(t){t.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:c("Shift-Tab","Shift-Tab"),exec:function(t){t.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:c("Tab","Tab"),exec:function(t){t.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:c("Ctrl-[","Ctrl-["),exec:function(t){t.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:c("Ctrl-]","Ctrl-]"),exec:function(t){t.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(t,o){t.insert(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(t,o){t.insert(A.stringRepeat(o.text||"",o.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:c(null,"Ctrl-O"),exec:function(t){t.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:c("Alt-Shift-X","Ctrl-T"),exec:function(t){t.transposeLetters()},multiSelectAction:function(t){t.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:c("Ctrl-U","Ctrl-U"),exec:function(t){t.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:c("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(t){t.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:c(null,null),exec:function(t){t.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:c("Ctrl-Shift-L","Command-Shift-L"),exec:function(t){var o=t.selection.getRange();o.start.column=o.end.column=0,o.end.row++,t.selection.setRange(o,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:c("Ctrl+F3","F3"),exec:function(t){t.openLink()}},{name:"joinlines",description:"Join lines",bindKey:c(null,null),exec:function(t){for(var o=t.selection.isBackwards(),r=o?t.selection.getSelectionLead():t.selection.getSelectionAnchor(),n=o?t.selection.getSelectionAnchor():t.selection.getSelectionLead(),e=t.session.doc.getLine(r.row).length,i=t.session.doc.getTextRange(t.selection.getRange()),a=i.replace(/\n\s*/," ").length,m=t.session.doc.getLine(r.row),v=r.row+1;v<=n.row+1;v++){var k=A.stringTrimLeft(A.stringTrimRight(t.session.doc.getLine(v)));k.length!==0&&(k=" "+k),m+=k}n.row+1<t.session.doc.getLength()-1&&(m+=t.session.doc.getNewLineCharacter()),t.clearSelection(),t.session.doc.replace(new x(r.row,0,n.row+2,0),m),a>0?(t.selection.moveCursorTo(r.row,r.column),t.selection.selectTo(r.row,r.column+a)):(e=t.session.doc.getLine(r.row).length>e?e+1:e,t.selection.moveCursorTo(r.row,e))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:c(null,null),exec:function(t){var o=t.session.doc.getLength()-1,r=t.session.doc.getLine(o).length,n=t.selection.rangeList.ranges,e=[];n.length<1&&(n=[t.selection.getRange()]);for(var i=0;i<n.length;i++)i==n.length-1&&(n[i].end.row===o&&n[i].end.column===r||e.push(new x(n[i].end.row,n[i].end.column,o,r))),i===0?n[i].start.row===0&&n[i].start.column===0||e.push(new x(0,0,n[i].start.row,n[i].start.column)):e.push(new x(n[i-1].end.row,n[i-1].end.column,n[i].start.row,n[i].start.column));t.exitMultiSelectMode(),t.clearSelection();for(var i=0;i<e.length;i++)t.selection.addRange(e[i],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(t){t.selection.clearSelection(),t.navigateLineEnd(),t.insert(`
212
+ `)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(t){t.selection.clearSelection();var o=t.getCursorPosition();t.selection.moveTo(o.row-1,Number.MAX_VALUE),t.insert(`
213
+ `),o.row===0&&t.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(t){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),t.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:c("F1","F1"),exec:function(t){t.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:c(null,null),exec:function(t){t.prompt({$type:"modes"})},readOnly:!0}];for(var p=1;p<9;p++)g.commands.push({name:"foldToLevel"+p,description:"Fold To Level "+p,level:p,exec:function(t){t.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(f,g,ue){var A=f("../lib/keys"),S=f("../mouse/default_gutter_handler").GutterTooltip,x=function(){function p(t){this.editor=t,this.gutterLayer=t.renderer.$gutterLayer,this.element=t.renderer.$gutter,this.lines=t.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new S(this.editor)}return p.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))},p.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))},p.prototype.$onGutterKeyDown=function(t){if(this.annotationTooltip.isOpen){t.preventDefault(),t.keyCode===A.escape&&this.annotationTooltip.hideTooltip();return}if(t.target===this.element){if(t.keyCode!=A.enter)return;t.preventDefault();var o=this.editor.getCursorPosition().row;this.editor.isRowVisible(o)||this.editor.scrollToLine(o,!0,!0),setTimeout((function(){var r=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),n=this.$findNearestFoldLaneWidget(r),e=this.$findNearestAnnotation(r);if(!(n===null&&e===null)){var i=this.$findClosestNumber(n,e,r);if(i===n)if(this.activeLane="fold",this.activeRowIndex=n,this.$isCustomWidgetVisible(n)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=e,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(t),setTimeout((function(){this.editor._signal("gutterkeydown",new c(t,this))}).bind(this),10)},p.prototype.$handleGutterKeyboardInteraction=function(t){if(t.keyCode===A.tab){t.preventDefault();return}if(t.keyCode===A.escape){t.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(t.keyCode===A.up){switch(t.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(t.keyCode===A.down){switch(t.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(t.keyCode===A.left){t.preventDefault(),this.$switchLane("annotation");return}if(t.keyCode===A.right){t.preventDefault(),this.$switchLane("fold");return}if(t.keyCode===A.enter||t.keyCode===A.space){switch(t.preventDefault(),this.activeLane){case"fold":var o=this.$rowIndexToRow(this.activeRowIndex),r=this.editor.session.$gutterCustomWidgets[o];if(r)r.callbacks&&r.callbacks.onClick&&r.callbacks.onClick(t,o);else if(this.gutterLayer.session.foldWidgets[o]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),t),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==o&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(o),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var n=this.lines.cells[this.activeRowIndex].element.childNodes[2],e=n.getBoundingClientRect(),i=this.annotationTooltip.getElement().style;i.left=e.right+"px",i.top=e.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},p.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},p.prototype.$isFoldWidgetVisible=function(t){var o=this.editor.isRowFullyVisible(this.$rowIndexToRow(t)),r=this.$getFoldWidget(t).style.display!=="none";return o&&r},p.prototype.$isCustomWidgetVisible=function(t){var o=this.editor.isRowFullyVisible(this.$rowIndexToRow(t)),r=!!this.$getCustomWidget(t);return o&&r},p.prototype.$isAnnotationVisible=function(t){var o=this.editor.isRowFullyVisible(this.$rowIndexToRow(t)),r=this.$getAnnotation(t).style.display!=="none";return o&&r},p.prototype.$getFoldWidget=function(t){var o=this.lines.get(t),r=o.element;return r.childNodes[1]},p.prototype.$getCustomWidget=function(t){var o=this.lines.get(t),r=o.element;return r.childNodes[3]},p.prototype.$getAnnotation=function(t){var o=this.lines.get(t),r=o.element;return r.childNodes[2]},p.prototype.$findNearestFoldLaneWidget=function(t){if(this.$isCustomWidgetVisible(t)||this.$isFoldWidgetVisible(t))return t;for(var o=0;t-o>0||t+o<this.lines.getLength()-1;){if(o++,t-o>=0&&this.$isCustomWidgetVisible(t-o))return t-o;if(t+o<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(t+o))return t+o;if(t-o>=0&&this.$isFoldWidgetVisible(t-o))return t-o;if(t+o<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(t+o))return t+o}return null},p.prototype.$findNearestAnnotation=function(t){if(this.$isAnnotationVisible(t))return t;for(var o=0;t-o>0||t+o<this.lines.getLength()-1;){if(o++,t-o>=0&&this.$isAnnotationVisible(t-o))return t-o;if(t+o<=this.lines.getLength()-1&&this.$isAnnotationVisible(t+o))return t+o}return null},p.prototype.$focusFoldWidget=function(t){if(t!=null){var o=this.$getFoldWidget(t);o.classList.add(this.editor.renderer.keyboardFocusClassName),o.focus()}},p.prototype.$focusCustomWidget=function(t){if(t!=null){var o=this.$getCustomWidget(t);o&&(o.classList.add(this.editor.renderer.keyboardFocusClassName),o.focus())}},p.prototype.$focusAnnotation=function(t){if(t!=null){var o=this.$getAnnotation(t);o.classList.add(this.editor.renderer.keyboardFocusClassName),o.focus()}},p.prototype.$blurFoldWidget=function(t){var o=this.$getFoldWidget(t);o.classList.remove(this.editor.renderer.keyboardFocusClassName),o.blur()},p.prototype.$blurCustomWidget=function(t){var o=this.$getCustomWidget(t);o&&(o.classList.remove(this.editor.renderer.keyboardFocusClassName),o.blur())},p.prototype.$blurAnnotation=function(t){var o=this.$getAnnotation(t);o.classList.remove(this.editor.renderer.keyboardFocusClassName),o.blur()},p.prototype.$moveFoldWidgetUp=function(){for(var t=this.activeRowIndex;t>0;)if(t--,this.$isFoldWidgetVisible(t)||this.$isCustomWidgetVisible(t)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=t,this.$isFoldWidgetVisible(t)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},p.prototype.$moveFoldWidgetDown=function(){for(var t=this.activeRowIndex;t<this.lines.getLength()-1;)if(t++,this.$isFoldWidgetVisible(t)||this.$isCustomWidgetVisible(t)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=t,this.$isFoldWidgetVisible(t)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},p.prototype.$moveAnnotationUp=function(){for(var t=this.activeRowIndex;t>0;)if(t--,this.$isAnnotationVisible(t)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=t,this.$focusAnnotation(this.activeRowIndex);return}},p.prototype.$moveAnnotationDown=function(){for(var t=this.activeRowIndex;t<this.lines.getLength()-1;)if(t++,this.$isAnnotationVisible(t)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=t,this.$focusAnnotation(this.activeRowIndex);return}},p.prototype.$findClosestNumber=function(t,o,r){return t===null?o:o===null||Math.abs(r-t)<=Math.abs(r-o)?t:o},p.prototype.$switchLane=function(t){switch(t){case"annotation":if(this.activeLane==="annotation")break;var o=this.$findNearestAnnotation(this.activeRowIndex);if(o==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=o,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var r=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(r===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=r,this.$isCustomWidgetVisible(r)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},p.prototype.$rowIndexToRow=function(t){var o=this.lines.get(t);return o?o.row:null},p.prototype.$rowToRowIndex=function(t){for(var o=0;o<this.lines.getLength();o++){var r=this.lines.get(o);if(r.row==t)return o}return null},p}();g.GutterKeyboardHandler=x;var c=function(){function p(t,o){this.gutterKeyboardHandler=o,this.domEvent=t}return p.prototype.getKey=function(){return A.keyCodeToString(this.domEvent.keyCode)},p.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},p.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},p.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},p}();g.GutterKeyboardEvent=c}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys","ace/lib/event","ace/tooltip"],function(f,g,ue){var A=this&&this.__values||function(w){var y=typeof Symbol=="function"&&Symbol.iterator,T=y&&w[y],Oe=0;if(T)return T.call(w);if(w&&typeof w.length=="number")return{next:function(){return w&&Oe>=w.length&&(w=void 0),{value:w&&w[Oe++],done:!w}}};throw new TypeError(y?"Object is not iterable.":"Symbol.iterator is not defined.")},S=f("./lib/oop"),x=f("./lib/dom"),c=f("./lib/lang"),p=f("./lib/useragent"),t=f("./keyboard/textinput").TextInput,o=f("./mouse/mouse_handler").MouseHandler,r=f("./mouse/fold_handler").FoldHandler,n=f("./keyboard/keybinding").KeyBinding,e=f("./edit_session").EditSession,i=f("./search").Search,a=f("./range").Range,m=f("./lib/event_emitter").EventEmitter,v=f("./commands/command_manager").CommandManager,k=f("./commands/default_commands").commands,M=f("./config"),C=f("./token_iterator").TokenIterator,b=f("./keyboard/gutter_handler").GutterKeyboardHandler,he=f("./config").nls,Ce=f("./clipboard"),X=f("./lib/keys"),V=f("./lib/event"),Xe=f("./tooltip").HoverTooltip,U=function(){function w(y,T,Oe){this.id="editor"+ ++w.$uid,this.session,this.$toDestroy=[];var ze=y.getContainerElement();this.container=ze,this.renderer=y,this.commands=new v(p.isMac?"mac":"win",k),typeof document=="object"&&(this.textInput=new t(y.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new o(this),new r(this)),this.keyBinding=new n(this),this.$search=new i().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(ft,pt){pt._$emitInputEvent.schedule(31)}),this.setSession(T||Oe&&Oe.session||new e("")),M.resetOptions(this),Oe&&this.setOptions(Oe),M._signal("editor",this)}return w.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},w.prototype.startOperation=function(y){this.session.startOperation(y)},w.prototype.endOperation=function(y){this.session.endOperation(y)},w.prototype.onStartOperation=function(y){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,y||(this.previousCommand=null)},w.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,Oe=T&&T.scrollIntoView;if(Oe){switch(Oe){case"center-animate":Oe="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var ze=this.selection.getRange(),ft=this.renderer.layerConfig;(ze.start.row>=ft.lastRow||ze.end.row<=ft.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}Oe=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},w.prototype.$historyTracker=function(y){if(this.$mergeUndoDeltas){var T=this.prevOp,Oe=this.$mergeableCommands,ze=T.command&&y.command.name==T.command.name;if(y.command.name=="insertstring"){var ft=y.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),ze=ze&&this.mergeNextCommand&&(!/\s/.test(ft)||/\s/.test(T.args)),this.mergeNextCommand=!0}else ze=ze&&Oe.indexOf(y.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(ze=!1),ze?this.session.mergeUndoDeltas=!0:Oe.indexOf(y.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},w.prototype.setKeyboardHandler=function(y,T){if(y&&typeof y=="string"&&y!="ace"){this.$keybindingId=y;var Oe=this;M.loadModule(["keybinding",y],function(ze){Oe.$keybindingId==y&&Oe.keyBinding.setKeyboardHandler(ze&&ze.handler),T&&T()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(y),T&&T()},w.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},w.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 Oe=this.session.getSelection();Oe.off("changeCursor",this.$onCursorChange),Oe.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()}},w.prototype.getSession=function(){return this.session},w.prototype.setValue=function(y,T){return this.session.doc.setValue(y),T?T==1?this.navigateFileEnd():T==-1&&this.navigateFileStart():this.selectAll(),y},w.prototype.getValue=function(){return this.session.getValue()},w.prototype.getSelection=function(){return this.selection},w.prototype.resize=function(y){this.renderer.onResize(y)},w.prototype.setTheme=function(y,T){this.renderer.setTheme(y,T)},w.prototype.getTheme=function(){return this.renderer.getTheme()},w.prototype.setStyle=function(y,T){this.renderer.setStyle(y,T)},w.prototype.unsetStyle=function(y){this.renderer.unsetStyle(y)},w.prototype.getFontSize=function(){return this.getOption("fontSize")||x.computedStyle(this.container).fontSize},w.prototype.setFontSize=function(y){this.setOption("fontSize",y)},w.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(Gt){T.removeMarker(Gt)}),T.$bracketHighlight=null);var Oe=y.getCursorPosition(),ze=y.getKeyboardHandler(),ft=ze&&ze.$getDirectionForHighlight&&ze.$getDirectionForHighlight(y),pt=T.getMatchingBracketRanges(Oe,ft);if(!pt){var gt=new C(T,Oe.row,Oe.column),Qt=gt.getCurrentToken();if(Qt&&/\b(?:tag-open|tag-name)/.test(Qt.type)){var mt=T.getMatchingTags(Oe);mt&&(pt=[mt.openTagName.isEmpty()?mt.openTag:mt.openTagName,mt.closeTagName.isEmpty()?mt.closeTag:mt.closeTagName])}}if(!pt&&T.$mode.getMatching&&(pt=T.$mode.getMatching(y.session)),!pt){y.getHighlightIndentGuides()&&y.renderer.$textLayer.$highlightIndentGuide();return}var Vt="ace_bracket";Array.isArray(pt)?pt.length==1&&(Vt="ace_error_bracket"):pt=[pt],pt.length==2&&(a.comparePoints(pt[0].end,pt[1].start)==0?pt=[a.fromPoints(pt[0].start,pt[1].end)]:a.comparePoints(pt[0].start,pt[1].end)==0&&(pt=[a.fromPoints(pt[1].start,pt[0].end)])),T.$bracketHighlight={ranges:pt,markerIds:pt.map(function(Gt){return T.addMarker(Gt,Vt,"text")})},y.getHighlightIndentGuides()&&y.renderer.$textLayer.$highlightIndentGuide()}},50)}},w.prototype.focus=function(){this.textInput.focus()},w.prototype.isFocused=function(){return this.textInput.isFocused()},w.prototype.blur=function(){this.textInput.blur()},w.prototype.onFocus=function(y){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",y))},w.prototype.onBlur=function(y){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",y))},w.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},w.prototype.onDocumentChange=function(y){var T=this.session.$useWrapMode,Oe=y.start.row==y.end.row?y.end.row:1/0;this.renderer.updateLines(y.start.row,Oe,T),this._signal("change",y),this.$cursorChange()},w.prototype.onTokenizerUpdate=function(y){var T=y.data;this.renderer.updateLines(T.first,T.last)},w.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},w.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},w.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},w.prototype.$updateHighlightActiveLine=function(){var 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 Oe=new a(T.row,T.column,T.row,1/0);Oe.id=y.addMarker(Oe,"ace_active-line","screenLine"),y.$highlightLineMarker=Oe}else T&&(y.$highlightLineMarker.start.row=T.row,y.$highlightLineMarker.end.row=T.row,y.$highlightLineMarker.start.column=T.column,y._signal("changeBackMarker"))},w.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 Oe=this.selection.getRange(),ze=this.getSelectionStyle();T.$selectionMarker=T.addMarker(Oe,"ace_selection",ze)}var ft=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(ft),this._signal("changeSelection")},w.prototype.$getSelectionHighLightRegexp=function(){var y=this.session,T=this.getSelectionRange();if(!(T.isEmpty()||T.isMultiLine())){var Oe=T.start.column,ze=T.end.column,ft=y.getLine(T.start.row),pt=ft.substring(Oe,ze);if(!(pt.length>5e3||!/[\w\d]/.test(pt))){var gt=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:pt}),Qt=ft.substring(Oe-1,ze+1);if(gt.test(Qt))return gt}}},w.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},w.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},w.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},w.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},w.prototype.onChangeMode=function(y){this.renderer.updateText(),this._emit("changeMode",y)},w.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},w.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},w.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},w.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},w.prototype.getCopyText=function(){var y=this.getSelectedText(),T=this.session.doc.getNewLineCharacter(),Oe=!1;if(!y&&this.$copyWithEmptySelection){Oe=!0;for(var ze=this.selection.getAllRanges(),ft=0;ft<ze.length;ft++){var pt=ze[ft];ft&&ze[ft-1].start.row==pt.start.row||(y+=this.session.getLine(pt.start.row)+T)}}var gt={text:y};return this._signal("copy",gt),Ce.lineMode=Oe?gt.text:!1,gt.text},w.prototype.onCopy=function(){this.commands.exec("copy",this)},w.prototype.onCut=function(){this.commands.exec("cut",this)},w.prototype.onPaste=function(y,T){var Oe={text:y,event:T};this.commands.exec("paste",this,Oe)},w.prototype.$handlePaste=function(y){typeof y=="string"&&(y={text:y}),this._signal("paste",y);var T=y.text,Oe=T===Ce.lineMode,ze=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)Oe?ze.insert({row:this.selection.lead.row,column:0},T):this.insert(T);else if(Oe)this.selection.rangeList.ranges.forEach(function(Vt){ze.insert({row:Vt.start.row,column:0},T)});else{var ft=T.split(/\r\n|\r|\n/),pt=this.selection.rangeList.ranges,gt=ft.length==2&&(!ft[0]||!ft[1]);if(ft.length!=pt.length||gt)return this.commands.exec("insertstring",this,T);for(var Qt=pt.length;Qt--;){var mt=pt[Qt];mt.isEmpty()||ze.remove(mt),ze.insert(mt.start,ft[Qt])}}},w.prototype.execCommand=function(y,T){return this.commands.exec(y,this,T)},w.prototype.insert=function(y,T){var Oe=this.session,ze=Oe.getMode(),ft=this.getCursorPosition();if(this.getBehavioursEnabled()&&!T){var pt=ze.transformAction(Oe.getState(ft.row),"insertion",this,Oe,y);pt&&(y!==pt.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),y=pt.text)}if(y==" "&&(y=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&y.indexOf(`
214
+ `)==-1){var gt=a.fromPoints(ft,ft);gt.end.column+=y.length,this.session.remove(gt)}}else{var gt=this.getSelectionRange();ft=this.session.remove(gt),this.clearSelection()}if(y==`
215
+ `||y==`\r
216
+ `){var Gt=Oe.getLine(ft.row);if(ft.column>Gt.search(/\S|$/)){var Qt=Gt.substr(ft.column).search(/\S|$/);Oe.doc.removeInLine(ft.row,ft.column,ft.column+Qt)}}this.clearSelection();var mt=ft.column,Vt=Oe.getState(ft.row),Gt=Oe.getLine(ft.row),Yt=ze.checkOutdent(Vt,Gt,y);if(Oe.insert(ft,y),pt&&pt.selection&&(pt.selection.length==2?this.selection.setSelectionRange(new a(ft.row,mt+pt.selection[0],ft.row,mt+pt.selection[1])):this.selection.setSelectionRange(new a(ft.row+pt.selection[0],pt.selection[1],ft.row+pt.selection[2],pt.selection[3]))),this.$enableAutoIndent){if(Oe.getDocument().isNewLine(y)){var Zt=ze.getNextLineIndent(Vt,Gt.slice(0,ft.column),Oe.getTabString());Oe.insert({row:ft.row+1,column:0},Zt)}Yt&&ze.autoOutdent(Vt,Oe,ft.row)}},w.prototype.autoIndent=function(){for(var y=this.session,T=y.getMode(),Oe=this.selection.isEmpty()?[new a(0,0,y.doc.getLength()-1,0)]:this.selection.getAllRanges(),ze="",ft="",pt="",gt=y.getTabString(),Qt=0;Qt<Oe.length;Qt++)for(var mt=Oe[Qt].start.row,Vt=Oe[Qt].end.row,Gt=mt;Gt<=Vt;Gt++){Gt>0&&(ze=y.getState(Gt-1),ft=y.getLine(Gt-1),pt=T.getNextLineIndent(ze,ft,gt));var Yt=y.getLine(Gt),Zt=T.$getIndent(Yt);if(pt!==Zt){if(Zt.length>0){var Xt=new a(Gt,0,Gt,Zt.length);y.remove(Xt)}pt.length>0&&y.insert({row:Gt,column:0},pt)}T.autoOutdent(ze,y,Gt)}},w.prototype.onTextInput=function(y,T){if(!T)return this.keyBinding.onTextInput(y);this.startOperation({command:{name:"insertstring"}});var Oe=this.applyComposition.bind(this,y,T);this.selection.rangeCount?this.forEachSelection(Oe):Oe(),this.endOperation()},w.prototype.applyComposition=function(y,T){if(T.extendLeft||T.extendRight){var Oe=this.selection.getRange();Oe.start.column-=T.extendLeft,Oe.end.column+=T.extendRight,Oe.start.column<0&&(Oe.start.row--,Oe.start.column+=this.session.getLine(Oe.start.row).length+1),this.selection.setRange(Oe),!y&&!Oe.isEmpty()&&this.remove()}if((y||!this.selection.isEmpty())&&this.insert(y,!0),T.restoreStart||T.restoreEnd){var Oe=this.selection.getRange();Oe.start.column-=T.restoreStart,Oe.end.column-=T.restoreEnd,this.selection.setRange(Oe)}},w.prototype.onCommandKey=function(y,T,Oe){return this.keyBinding.onCommandKey(y,T,Oe)},w.prototype.setOverwrite=function(y){this.session.setOverwrite(y)},w.prototype.getOverwrite=function(){return this.session.getOverwrite()},w.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},w.prototype.setScrollSpeed=function(y){this.setOption("scrollSpeed",y)},w.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},w.prototype.setDragDelay=function(y){this.setOption("dragDelay",y)},w.prototype.getDragDelay=function(){return this.getOption("dragDelay")},w.prototype.setSelectionStyle=function(y){this.setOption("selectionStyle",y)},w.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},w.prototype.setHighlightActiveLine=function(y){this.setOption("highlightActiveLine",y)},w.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},w.prototype.setHighlightGutterLine=function(y){this.setOption("highlightGutterLine",y)},w.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},w.prototype.setHighlightSelectedWord=function(y){this.setOption("highlightSelectedWord",y)},w.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},w.prototype.setAnimatedScroll=function(y){this.renderer.setAnimatedScroll(y)},w.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},w.prototype.setShowInvisibles=function(y){this.renderer.setShowInvisibles(y)},w.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},w.prototype.setDisplayIndentGuides=function(y){this.renderer.setDisplayIndentGuides(y)},w.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},w.prototype.setHighlightIndentGuides=function(y){this.renderer.setHighlightIndentGuides(y)},w.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},w.prototype.setShowPrintMargin=function(y){this.renderer.setShowPrintMargin(y)},w.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},w.prototype.setPrintMarginColumn=function(y){this.renderer.setPrintMarginColumn(y)},w.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},w.prototype.setReadOnly=function(y){this.setOption("readOnly",y)},w.prototype.getReadOnly=function(){return this.getOption("readOnly")},w.prototype.setBehavioursEnabled=function(y){this.setOption("behavioursEnabled",y)},w.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},w.prototype.setWrapBehavioursEnabled=function(y){this.setOption("wrapBehavioursEnabled",y)},w.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},w.prototype.setShowFoldWidgets=function(y){this.setOption("showFoldWidgets",y)},w.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},w.prototype.setFadeFoldWidgets=function(y){this.setOption("fadeFoldWidgets",y)},w.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},w.prototype.remove=function(y){this.selection.isEmpty()&&(y=="left"?this.selection.selectLeft():this.selection.selectRight());var T=this.getSelectionRange();if(this.getBehavioursEnabled()){var Oe=this.session,ze=Oe.getState(T.start.row),ft=Oe.getMode().transformAction(ze,"deletion",this,Oe,T);if(T.end.column===0){var pt=Oe.getTextRange(T);if(pt[pt.length-1]==`
217
+ `){var gt=Oe.getLine(T.end.row);/^\s+$/.test(gt)&&(T.end.column=gt.length)}}ft&&(T=ft)}this.session.remove(T),this.clearSelection()},w.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},w.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},w.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},w.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var 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()},w.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var y=this.getCursorPosition();this.insert(`
218
+ `),this.moveCursorToPosition(y)},w.prototype.setGhostText=function(y,T){this.renderer.setGhostText(y,T)},w.prototype.removeGhostText=function(){this.renderer.removeGhostText()},w.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var y=this.getCursorPosition(),T=y.column;if(T!==0){var Oe=this.session.getLine(y.row),ze,ft;T<Oe.length?(ze=Oe.charAt(T)+Oe.charAt(T-1),ft=new a(y.row,T-1,y.row,T+1)):(ze=Oe.charAt(T-1)+Oe.charAt(T-2),ft=new a(y.row,T-2,y.row,T)),this.session.replace(ft,ze),this.session.selection.moveToPosition(ft.end)}}},w.prototype.toLowerCase=function(){var y=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var T=this.getSelectionRange(),Oe=this.session.getTextRange(T);this.session.replace(T,Oe.toLowerCase()),this.selection.setSelectionRange(y)},w.prototype.toUpperCase=function(){var y=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var T=this.getSelectionRange(),Oe=this.session.getTextRange(T);this.session.replace(T,Oe.toUpperCase()),this.selection.setSelectionRange(y)},w.prototype.indent=function(){var y=this.session,T=this.getSelectionRange();if(T.start.row<T.end.row){var Oe=this.$getSelectedRows();y.indentRows(Oe.first,Oe.last," ");return}else if(T.start.column<T.end.column){var ze=y.getTextRange(T);if(!/^\s+$/.test(ze)){var Oe=this.$getSelectedRows();y.indentRows(Oe.first,Oe.last," ");return}}var ft=y.getLine(T.start.row),pt=T.start,gt=y.getTabSize(),Qt=y.documentToScreenColumn(pt.row,pt.column);if(this.session.getUseSoftTabs())var mt=gt-Qt%gt,Vt=c.stringRepeat(" ",mt);else{for(var mt=Qt%gt;ft[T.start.column-1]==" "&&mt;)T.start.column--,mt--;this.selection.setSelectionRange(T),Vt=" "}return this.insert(Vt)},w.prototype.blockIndent=function(){var y=this.$getSelectedRows();this.session.indentRows(y.first,y.last," ")},w.prototype.blockOutdent=function(){var y=this.session.getSelection();this.session.outdentRows(y.getRange())},w.prototype.sortLines=function(){for(var y=this.$getSelectedRows(),T=this.session,Oe=[],ze=y.first;ze<=y.last;ze++)Oe.push(T.getLine(ze));Oe.sort(function(gt,Qt){return gt.toLowerCase()<Qt.toLowerCase()?-1:gt.toLowerCase()>Qt.toLowerCase()?1:0});for(var ft=new a(0,0,0,0),ze=y.first;ze<=y.last;ze++){var pt=T.getLine(ze);ft.start.row=ze,ft.end.row=ze,ft.end.column=pt.length,T.replace(ft,Oe[ze-y.first])}},w.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)},w.prototype.toggleBlockComment=function(){var y=this.getCursorPosition(),T=this.session.getState(y.row),Oe=this.getSelectionRange();this.session.getMode().toggleBlockComment(T,this.session,Oe,y)},w.prototype.getNumberAt=function(y,T){var Oe=/[\-]?[0-9]+(?:\.[0-9]+)?/g;Oe.lastIndex=0;for(var ze=this.session.getLine(y);Oe.lastIndex<T;){var ft=Oe.exec(ze);if(ft.index<=T&&ft.index+ft[0].length>=T){var pt={value:ft[0],start:ft.index,end:ft.index+ft[0].length};return pt}}return null},w.prototype.modifyNumber=function(y){var T=this.selection.getCursor().row,Oe=this.selection.getCursor().column,ze=new a(T,Oe-1,T,Oe),ft=this.session.getTextRange(ze);if(!isNaN(parseFloat(ft))&&isFinite(ft)){var pt=this.getNumberAt(T,Oe);if(pt){var gt=pt.value.indexOf(".")>=0?pt.start+pt.value.indexOf(".")+1:pt.end,Qt=pt.start+pt.value.length-gt,mt=parseFloat(pt.value);mt*=Math.pow(10,Qt),gt!==pt.end&&Oe<gt?y*=Math.pow(10,pt.end-Oe-1):y*=Math.pow(10,pt.end-Oe),mt+=y,mt/=Math.pow(10,Qt);var Vt=mt.toFixed(Qt),Gt=new a(T,pt.start,T,pt.end);this.session.replace(Gt,Vt),this.moveCursorTo(T,Math.max(pt.start+1,Oe+Vt.length-pt.value.length))}}else this.toggleWord()},w.prototype.toggleWord=function(){var y=this.selection.getCursor().row,T=this.selection.getCursor().column;this.selection.selectWord();var Oe=this.getSelectedText(),ze=this.selection.getWordRange().start.column,ft=Oe.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),pt=T-ze-1;pt<0&&(pt=0);var gt=0,Qt=0,mt=this;Oe.match(/[A-Za-z0-9_]+/)&&ft.forEach(function(pi,vi){Qt=gt+pi.length,pt>=gt&&pt<=Qt&&(Oe=pi,mt.selection.clearSelection(),mt.moveCursorTo(y,gt+ze),mt.selection.selectTo(y,Qt+ze)),gt=Qt});for(var Vt=this.$toggleWordPairs,Gt,Yt=0;Yt<Vt.length;Yt++)for(var Zt=Vt[Yt],Xt=0;Xt<=1;Xt++){var di=+!Xt,sn=Oe.match(new RegExp("^\\s?_?("+c.escapeRegExp(Zt[Xt])+")\\s?$","i"));if(sn){var fi=Oe.match(new RegExp("([_]|^|\\s)("+c.escapeRegExp(sn[1])+")($|\\s)","g"));fi&&(Gt=Oe.replace(new RegExp(c.escapeRegExp(Zt[Xt]),"i"),function(pi){var vi=Zt[di];return pi.toUpperCase()==pi?vi=vi.toUpperCase():pi.charAt(0).toUpperCase()==pi.charAt(0)&&(vi=vi.substr(0,0)+Zt[di].charAt(0).toUpperCase()+vi.substr(1)),vi}),this.insert(Gt),Gt="")}}},w.prototype.findLinkAt=function(y,T){var Oe,ze,ft=this.session.getLine(y),pt=ft.split(/((?:https?|ftp):\/\/[\S]+)/),gt=T;gt<0&&(gt=0);var Qt=0,mt=0,Vt;try{for(var Gt=A(pt),Yt=Gt.next();!Yt.done;Yt=Gt.next()){var Zt=Yt.value;if(mt=Qt+Zt.length,gt>=Qt&&gt<=mt&&Zt.match(/((?:https?|ftp):\/\/[\S]+)/)){Vt=Zt.replace(/[\s:.,'";}\]]+$/,"");break}Qt=mt}}catch(Xt){Oe={error:Xt}}finally{try{Yt&&!Yt.done&&(ze=Gt.return)&&ze.call(Gt)}finally{if(Oe)throw Oe.error}}return Vt},w.prototype.openLink=function(){var y=this.selection.getCursor(),T=this.findLinkAt(y.row,y.column);return T&&window.open(T,"_blank"),T!=null},w.prototype.removeLines=function(){var y=this.$getSelectedRows();this.session.removeFullLines(y.first,y.last),this.clearSelection()},w.prototype.duplicateSelection=function(){var y=this.selection,T=this.session,Oe=y.getRange(),ze=y.isBackwards();if(Oe.isEmpty()){var ft=Oe.start.row;T.duplicateLines(ft,ft)}else{var pt=ze?Oe.start:Oe.end,gt=T.insert(pt,T.getTextRange(Oe));Oe.start=pt,Oe.end=gt,y.setSelectionRange(Oe,ze)}},w.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},w.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},w.prototype.moveText=function(y,T,Oe){return this.session.moveText(y,T,Oe)},w.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},w.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},w.prototype.$moveLines=function(y,T){var Oe,ze,ft=this.selection;if(!ft.inMultiSelectMode||this.inVirtualSelectionMode){var pt=ft.toOrientedRange();Oe=this.$getSelectedRows(pt),ze=this.session.$moveLines(Oe.first,Oe.last,T?0:y),T&&y==-1&&(ze=0),pt.moveBy(ze,0),ft.fromOrientedRange(pt)}else{var gt=ft.rangeList.ranges;ft.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var Qt=0,mt=0,Vt=gt.length,Gt=0;Gt<Vt;Gt++){var Yt=Gt;gt[Gt].moveBy(Qt,0),Oe=this.$getSelectedRows(gt[Gt]);for(var Zt=Oe.first,Xt=Oe.last;++Gt<Vt;){mt&&gt[Gt].moveBy(mt,0);var di=this.$getSelectedRows(gt[Gt]);if(T&&di.first!=Xt)break;if(!T&&di.first>Xt+1)break;Xt=di.last}for(Gt--,Qt=this.session.$moveLines(Zt,Xt,T?0:y),T&&y==-1&&(Yt=Gt+1);Yt<=Gt;)gt[Yt].moveBy(Qt,0),Yt++;T||(Qt=0),mt+=Qt}ft.fromOrientedRange(ft.ranges[0]),ft.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},w.prototype.$getSelectedRows=function(y){return y=(y||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(y.start.row),last:this.session.getRowFoldEnd(y.end.row)}},w.prototype.onCompositionStart=function(y){this.renderer.showComposition(y)},w.prototype.onCompositionUpdate=function(y){this.renderer.setCompositionText(y)},w.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},w.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},w.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},w.prototype.isRowVisible=function(y){return y>=this.getFirstVisibleRow()&&y<=this.getLastVisibleRow()},w.prototype.isRowFullyVisible=function(y){return y>=this.renderer.getFirstFullyVisibleRow()&&y<=this.renderer.getLastFullyVisibleRow()},w.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},w.prototype.$moveByPage=function(y,T){var Oe=this.renderer,ze=this.renderer.layerConfig,ft=y*Math.floor(ze.height/ze.lineHeight);T===!0?this.selection.$moveSelection(function(){this.moveCursorBy(ft,0)}):T===!1&&(this.selection.moveCursorBy(ft,0),this.selection.clearSelection());var pt=Oe.scrollTop;Oe.scrollBy(0,ft*ze.lineHeight),T!=null&&Oe.scrollCursorIntoView(null,.5),Oe.animateScrolling(pt)},w.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},w.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},w.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},w.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},w.prototype.scrollPageDown=function(){this.$moveByPage(1)},w.prototype.scrollPageUp=function(){this.$moveByPage(-1)},w.prototype.scrollToRow=function(y){this.renderer.scrollToRow(y)},w.prototype.scrollToLine=function(y,T,Oe,ze){this.renderer.scrollToLine(y,T,Oe,ze)},w.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)},w.prototype.getCursorPosition=function(){return this.selection.getCursor()},w.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},w.prototype.getSelectionRange=function(){return this.selection.getRange()},w.prototype.selectAll=function(){this.selection.selectAll()},w.prototype.clearSelection=function(){this.selection.clearSelection()},w.prototype.moveCursorTo=function(y,T){this.selection.moveCursorTo(y,T)},w.prototype.moveCursorToPosition=function(y){this.selection.moveCursorToPosition(y)},w.prototype.jumpToMatching=function(y,T){var Oe=this.getCursorPosition(),ze=new C(this.session,Oe.row,Oe.column),ft=ze.getCurrentToken(),pt=0;ft&&ft.type.indexOf("tag-name")!==-1&&(ft=ze.stepBackward());var gt=ft||ze.stepForward();if(gt){var Qt,mt=!1,Vt={},Gt=Oe.column-gt.start,Yt,Zt={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(gt.value.match(/[{}()\[\]]/g)){for(;Gt<gt.value.length&&!mt;Gt++)if(Zt[gt.value[Gt]])switch(Yt=Zt[gt.value[Gt]]+"."+gt.type.replace("rparen","lparen"),isNaN(Vt[Yt])&&(Vt[Yt]=0),gt.value[Gt]){case"(":case"[":case"{":Vt[Yt]++;break;case")":case"]":case"}":Vt[Yt]--,Vt[Yt]===-1&&(Qt="bracket",mt=!0);break}}else gt.type.indexOf("tag-name")!==-1&&(isNaN(Vt[gt.value])&&(Vt[gt.value]=0),ft.value==="<"&&pt>1?Vt[gt.value]++:ft.value==="</"&&Vt[gt.value]--,Vt[gt.value]===-1&&(Qt="tag",mt=!0));mt||(ft=gt,pt++,gt=ze.stepForward(),Gt=0)}while(gt&&!mt);if(Qt){var Xt,di;if(Qt==="bracket")Xt=this.session.getBracketRange(Oe),Xt||(Xt=new a(ze.getCurrentTokenRow(),ze.getCurrentTokenColumn()+Gt-1,ze.getCurrentTokenRow(),ze.getCurrentTokenColumn()+Gt-1),di=Xt.start,(T||di.row===Oe.row&&Math.abs(di.column-Oe.column)<2)&&(Xt=this.session.getBracketRange(di)));else if(Qt==="tag"){if(!gt||gt.type.indexOf("tag-name")===-1)return;if(Xt=new a(ze.getCurrentTokenRow(),ze.getCurrentTokenColumn()-2,ze.getCurrentTokenRow(),ze.getCurrentTokenColumn()-2),Xt.compare(Oe.row,Oe.column)===0){var sn=this.session.getMatchingTags(Oe);sn&&(sn.openTag.contains(Oe.row,Oe.column)?(Xt=sn.closeTag,di=Xt.start):(Xt=sn.openTag,sn.closeTag.start.row===Oe.row&&sn.closeTag.start.column===Oe.column?di=Xt.end:di=Xt.start))}di=di||Xt.start}di=Xt&&Xt.cursor||di,di&&(y?Xt&&T?this.selection.setRange(Xt):Xt&&Xt.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(di.row,di.column):this.selection.moveTo(di.row,di.column))}}},w.prototype.gotoLine=function(y,T,Oe){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,Oe)},w.prototype.navigateTo=function(y,T){this.selection.moveTo(y,T)},w.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)},w.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)},w.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()},w.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()},w.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},w.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},w.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},w.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},w.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},w.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},w.prototype.replace=function(y,T){T&&this.$search.set(T);var Oe=this.$search.find(this.session),ze=0;return Oe&&(this.$tryReplace(Oe,y)&&(ze=1),this.selection.setSelectionRange(Oe),this.renderer.scrollSelectionIntoView(Oe.start,Oe.end)),ze},w.prototype.replaceAll=function(y,T){T&&this.$search.set(T);var Oe=this.$search.findAll(this.session),ze=0;if(!Oe.length)return ze;var ft=this.getSelectionRange();this.selection.moveTo(0,0);for(var pt=Oe.length-1;pt>=0;--pt)this.$tryReplace(Oe[pt],y)&&ze++;return this.selection.setSelectionRange(ft),ze},w.prototype.$tryReplace=function(y,T){var Oe=this.session.getTextRange(y);return T=this.$search.replace(Oe,T),T!==null?(y.end=this.session.replace(y,T),y):null},w.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},w.prototype.find=function(y,T,Oe){T||(T={}),typeof y=="string"||y instanceof RegExp?T.needle=y:typeof y=="object"&&S.mixin(T,y);var ze=this.selection.getRange();T.needle==null&&(y=this.session.getTextRange(ze)||this.$search.$options.needle,y||(ze=this.session.getWordRange(ze.start.row,ze.start.column),y=this.session.getTextRange(ze)),this.$search.set({needle:y})),this.$search.set(T),T.start||this.$search.set({start:ze});var ft=this.$search.find(this.session);if(T.preventScroll)return ft;if(ft)return this.revealRange(ft,Oe),ft;T.backwards?ze.start=ze.end:ze.end=ze.start,this.selection.setRange(ze)},w.prototype.findNext=function(y,T){this.find({skipCurrent:!0,backwards:!1},y,T)},w.prototype.findPrevious=function(y,T){this.find(y,{skipCurrent:!0,backwards:!0},T)},w.prototype.revealRange=function(y,T){this.session.unfold(y),this.selection.setSelectionRange(y);var Oe=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(y.start,y.end,.5),T!==!1&&this.renderer.animateScrolling(Oe)},w.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},w.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},w.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(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()},w.prototype.setAutoScrollEditorIntoView=function(y){if(y){var T,Oe=this,ze=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var ft=this.$scrollAnchor;ft.style.cssText="position:absolute",this.container.insertBefore(ft,this.container.firstChild);var pt=this.on("changeSelection",function(){ze=!0}),gt=this.renderer.on("beforeRender",function(){ze&&(T=Oe.renderer.container.getBoundingClientRect())}),Qt=this.renderer.on("afterRender",function(){if(ze&&T&&(Oe.isFocused()||Oe.searchBox&&Oe.searchBox.isFocused())){var mt=Oe.renderer,Vt=mt.$cursorLayer.$pixelPos,Gt=mt.layerConfig,Yt=Vt.top-Gt.offset;Vt.top>=0&&Yt+T.top<0?ze=!0:Vt.top<Gt.height&&Vt.top+T.top+Gt.lineHeight>window.innerHeight?ze=!1:ze=null,ze!=null&&(ft.style.top=Yt+"px",ft.style.left=Vt.left+"px",ft.style.height=Gt.lineHeight+"px",ft.scrollIntoView(ze)),ze=T=null}});this.setAutoScrollEditorIntoView=function(mt){mt||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",pt),this.renderer.off("afterRender",Qt),this.renderer.off("beforeRender",gt))}}},w.prototype.$resetCursorStyle=function(){var y=this.$cursorStyle||"ace",T=this.renderer.$cursorLayer;T&&(T.setSmoothBlinking(/smooth/.test(y)),T.isBlinking=!this.$readOnly&&y!="wide",x.setCssClass(T.element,"ace_slim-cursors",/slim/.test(y)))},w.prototype.prompt=function(y,T,Oe){var ze=this;M.loadModule("ace/ext/prompt",function(ft){ft.prompt(ze,y,T,Oe)})},w}();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"],["&&","||"],["==","!="]],S.implement(U.prototype,m),M.defineOptions(U.prototype,"editor",{selectionStyle:{set:function(w){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:w})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(w){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(w){var y=this;if(this.textInput.setReadOnly(w),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(Oe){var ze=!1;if(Oe&&Oe.type=="keydown"){if(Oe&&Oe.key&&!Oe.ctrlKey&&!Oe.metaKey&&(Oe.key==" "&&Oe.preventDefault(),ze=Oe.key.length==1),!ze)return}else Oe&&Oe.type!=="exec"&&(ze=!0);if(ze){y.hoverTooltip||(y.hoverTooltip=new Xe);var ft=x.createElement("div");ft.textContent=he("editor.tooltip.disable-editing","Editing is disabled"),y.hoverTooltip.isOpen||y.hoverTooltip.showForRange(y,y.getSelectionRange(),ft)}else y.hoverTooltip&&y.hoverTooltip.isOpen&&y.hoverTooltip.hide()});var T=this.textInput.getElement();w?(V.addListener(T,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(V.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(w){this.textInput.setCopyWithEmptySelection(w)},initialValue:!1},cursorStyle:{set:function(w){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(w){this.setAutoScrollEditorIntoView(w)}},keyboardHandler:{set:function(w){this.setKeyboardHandler(w)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(w){this.session.setValue(w)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(w){this.setSession(w)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(w){this.renderer.$gutterLayer.setShowLineNumbers(w),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),w&&this.$relativeLineNumbers?O.attach(this):O.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(w){this.$showLineNumbers&&w?O.attach(this):O.detach(this)}},placeholder:{set:function(w){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),x.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),x.addCssClass(this.container,"ace_hasPlaceholder");var T=x.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(w){var y={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(ze){ze.blur(),ze.renderer.scroller.focus()},readOnly:!0},T=function(ze){if(ze.target==this.renderer.scroller&&ze.keyCode===X.enter){ze.preventDefault();var ft=this.getCursorPosition().row;this.isRowVisible(ft)||this.scrollToLine(ft,!0,!0),this.focus()}},Oe;w?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(p.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),Oe||(Oe=new b(this)),Oe.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),Oe&&Oe.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(w){this.$textInputAriaLabel=w},initialValue:""},enableMobileMenu:{set:function(w){this.$enableMobileMenu=w},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var O={getText:function(w,y){return(Math.abs(w.selection.lead.row-y)||y+1+(y<9?"·":""))+""},getWidth:function(w,y,T){return Math.max(y.toString().length,(T.lastRow+1).toString().length,2)*T.characterWidth},update:function(w,y){y.renderer.$loop.schedule(y.renderer.CHANGE_GUTTER)},attach:function(w){w.renderer.$gutterLayer.$renderer=this,w.on("changeSelection",this.update),this.update(null,w)},detach:function(w){w.renderer.$gutterLayer.$renderer==this&&(w.renderer.$gutterLayer.$renderer=null),w.off("changeSelection",this.update),this.update(null,w)}};g.Editor=U}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(f,g,ue){var A=f("../lib/dom"),S=function(){function x(c,p){this.element=c,this.canvasHeight=p||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return x.prototype.moveContainer=function(c){A.translate(this.element,0,-(c.firstRowScreen*c.lineHeight%this.canvasHeight)-c.offset*this.$offsetCoefficient)},x.prototype.pageChanged=function(c,p){return Math.floor(c.firstRowScreen*c.lineHeight/this.canvasHeight)!==Math.floor(p.firstRowScreen*p.lineHeight/this.canvasHeight)},x.prototype.computeLineTop=function(c,p,t){var o=p.firstRowScreen*p.lineHeight,r=Math.floor(o/this.canvasHeight),n=t.documentToScreenRow(c,0)*p.lineHeight;return n-r*this.canvasHeight},x.prototype.computeLineHeight=function(c,p,t){return p.lineHeight*t.getRowLineCount(c)},x.prototype.getLength=function(){return this.cells.length},x.prototype.get=function(c){return this.cells[c]},x.prototype.shift=function(){this.$cacheCell(this.cells.shift())},x.prototype.pop=function(){this.$cacheCell(this.cells.pop())},x.prototype.push=function(c){if(Array.isArray(c)){this.cells.push.apply(this.cells,c);for(var p=A.createFragment(this.element),t=0;t<c.length;t++)p.appendChild(c[t].element);this.element.appendChild(p)}else this.cells.push(c),this.element.appendChild(c.element)},x.prototype.unshift=function(c){if(Array.isArray(c)){this.cells.unshift.apply(this.cells,c);for(var p=A.createFragment(this.element),t=0;t<c.length;t++)p.appendChild(c[t].element);this.element.firstChild?this.element.insertBefore(p,this.element.firstChild):this.element.appendChild(p)}else this.cells.unshift(c),this.element.insertAdjacentElement("afterbegin",c.element)},x.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},x.prototype.$cacheCell=function(c){c&&(c.element.remove(),this.cellCache.push(c))},x.prototype.createCell=function(c,p,t,o){var r=this.cellCache.pop();if(!r){var n=A.createElement("div");o&&o(n),this.element.appendChild(n),r={element:n,text:"",row:c}}return r.row=c,r},x}();g.Lines=S}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(f,g,ue){var A=f("../lib/dom"),S=f("../lib/oop"),x=f("../lib/lang"),c=f("../lib/event_emitter").EventEmitter,p=f("./lines").Lines,t=f("../config").nls,o=function(){function n(e){this.element=A.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 p(this.element),this.$lines.$offsetCoefficient=1}return n.prototype.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},n.prototype.addGutterDecoration=function(e,i){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,i)},n.prototype.removeGutterDecoration=function(e,i){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,i)},n.prototype.setAnnotations=function(e){this.$annotations=[];for(var i=0;i<e.length;i++){var a=e[i],m=a.row,v=this.$annotations[m];v||(v=this.$annotations[m]={text:[],type:[],displayText:[]});var k=a.text,M=a.text,C=a.type;k=k?x.escapeHTML(k):a.html||"",M=M||a.html||"",v.text.indexOf(k)===-1&&(v.text.push(k),v.type.push(C),v.displayText.push(M));var b=a.className;b?v.className=b:C==="error"?v.className=" ace_error":C==="security"&&!/\bace_error\b/.test(v.className)?v.className=" ace_security":C==="warning"&&!/\bace_(error|security)\b/.test(v.className)?v.className=" ace_warning":C==="info"&&!v.className?v.className=" ace_info":C==="hint"&&!v.className&&(v.className=" ace_hint")}},n.prototype.$updateAnnotations=function(e){if(this.$annotations.length){var i=e.start.row,a=e.end.row-i;if(a!==0)if(e.action=="remove")this.$annotations.splice(i,a+1,null);else{var m=new Array(a+1);m.unshift(i,1),this.$annotations.splice.apply(this.$annotations,m)}}},n.prototype.update=function(e){this.config=e;var i=this.session,a=e.firstRow,m=Math.min(e.lastRow+e.gutterOffset,i.getLength()-1);this.oldLastRow=m,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var v=i.getNextFoldLine(a),k=v?v.start.row:1/0,M=null,C=-1,b=a;;){if(b>k&&(b=v.end.row+1,v=i.getNextFoldLine(b,v),k=v?v.start.row:1/0),b>m){for(;this.$lines.getLength()>C+1;)this.$lines.pop();break}M=this.$lines.get(++C),M?M.row=b:(M=this.$lines.createCell(b,e,this.session,r),this.$lines.push(M)),this.$renderCell(M,e,v,b),b++}this._signal("afterRender"),this.$updateGutterWidth(e)},n.prototype.$updateGutterWidth=function(e){var i=this.session,a=i.gutterRenderer||this.$renderer,m=i.$firstLineNumber,v=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||i.$useWrapMode)&&(v=i.getLength()+m-1);var k=a?a.getWidth(i,v,e):v.toString().length*e.characterWidth,M=this.$padding||this.$computePadding();k+=M.left+M.right,k!==this.gutterWidth&&!isNaN(k)&&(this.gutterWidth=k,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",k))},n.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},n.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!(this.$cursorCell&&this.$cursorCell.row==e)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var i=this.$lines.cells;this.$cursorCell=null;for(var a=0;a<i.length;a++){var m=i[a];if(m.row>=this.$cursorRow){if(m.row>this.$cursorRow){var v=this.session.getFoldLine(this.$cursorRow);if(a>0&&v&&v.start.row==i[a-1].row)m=i[a-1];else break}m.element.className="ace_gutter-active-line "+m.element.className,this.$cursorCell=m;break}}}}},n.prototype.scrollLines=function(e){var i=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(i,e))return this.update(e);this.$lines.moveContainer(e);var a=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),m=this.oldLastRow;if(this.oldLastRow=a,!i||m<e.firstRow)return this.update(e);if(a<i.firstRow)return this.update(e);if(i.firstRow<e.firstRow)for(var v=this.session.getFoldedRowCount(i.firstRow,e.firstRow-1);v>0;v--)this.$lines.shift();if(m>a)for(var v=this.session.getFoldedRowCount(a+1,m);v>0;v--)this.$lines.pop();e.firstRow<i.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,i.firstRow-1)),a>m&&this.$lines.push(this.$renderLines(e,m+1,a)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},n.prototype.$renderLines=function(e,i,a){for(var m=[],v=i,k=this.session.getNextFoldLine(v),M=k?k.start.row:1/0;v>M&&(v=k.end.row+1,k=this.session.getNextFoldLine(v,k),M=k?k.start.row:1/0),!(v>a);){var C=this.$lines.createCell(v,e,this.session,r);this.$renderCell(C,e,k,v),m.push(C),v++}return m},n.prototype.$renderCell=function(e,i,a,m){var v=e.element,k=this.session,M=v.childNodes[0],C=v.childNodes[1],b=v.childNodes[2],he=v.childNodes[3],Ce=b.firstChild,X=k.$firstLineNumber,V=k.$breakpoints,Xe=k.$decorations,U=k.gutterRenderer||this.$renderer,O=this.$showFoldWidgets&&k.foldWidgets,w=a?a.start.row:Number.MAX_VALUE,y=i.lineHeight+"px",T=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",Oe=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",ze=(U?U.getText(k,m):m+X).toString();if(this.$highlightGutterLine&&(m==this.$cursorRow||a&&m<this.$cursorRow&&m>=w&&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)),V[m]&&(T+=V[m]),Xe[m]&&(T+=Xe[m]),this.$annotations[m]&&m!==w&&(T+=this.$annotations[m].className),O){var ft=O[m];ft==null&&(ft=O[m]=k.getFoldWidget(m))}if(ft){var pt="ace_fold-widget ace_"+ft,gt=ft=="start"&&m==w&&m<a.end.row;if(gt){pt+=" ace_closed";for(var Qt="",mt=!1,Vt=m+1;Vt<=a.end.row;Vt++)if(this.$annotations[Vt]){if(this.$annotations[Vt].className===" ace_error"){mt=!0,Qt=" ace_error_fold";break}this.$annotations[Vt].className===" ace_security"?(mt=!0,Qt=" ace_security_fold"):this.$annotations[Vt].className===" ace_warning"&&Qt!==" ace_security_fold"&&(mt=!0,Qt=" ace_warning_fold")}T+=Qt}else pt+=" ace_open";C.className!=pt&&(C.className=pt),A.setStyle(C.style,"height",y),A.setStyle(C.style,"display","inline-block"),C.setAttribute("role","button"),C.setAttribute("tabindex","-1");var Gt=k.getFoldWidgetRange(m);Gt?C.setAttribute("aria-label",t("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[Gt.start.row+1,Gt.end.row+1])):a?C.setAttribute("aria-label",t("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[a.start.row+1,a.end.row+1])):C.setAttribute("aria-label",t("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[m+1])),gt?(C.setAttribute("aria-expanded","false"),C.setAttribute("title",t("gutter.code-folding.closed.title","Unfold code"))):(C.setAttribute("aria-expanded","true"),C.setAttribute("title",t("gutter.code-folding.open.title","Fold code")))}else C&&(A.setStyle(C.style,"display","none"),C.setAttribute("tabindex","0"),C.removeAttribute("role"),C.removeAttribute("aria-label"));var Yt=this.session.$gutterCustomWidgets[m];if(Yt?this.$addCustomWidget(m,Yt,e):he&&this.$removeCustomWidget(m,e),mt&&this.$showFoldedAnnotations){b.className="ace_gutter_annotation",Ce.className=Oe,Ce.className+=Qt,A.setStyle(Ce.style,"height",y),A.setStyle(b.style,"display","block"),A.setStyle(b.style,"height",y);var Zt;switch(Qt){case" ace_error_fold":Zt=t("gutter.annotation.aria-label.error","Error, read annotations row $0",[ze]);break;case" ace_security_fold":Zt=t("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[ze]);break;case" ace_warning_fold":Zt=t("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[ze]);break}b.setAttribute("aria-label",Zt),b.setAttribute("tabindex","-1"),b.setAttribute("role","button")}else if(this.$annotations[m]){b.className="ace_gutter_annotation",Ce.className=Oe,this.$useSvgGutterIcons?Ce.className+=this.$annotations[m].className:v.classList.add(this.$annotations[m].className.replace(" ","")),A.setStyle(Ce.style,"height",y),A.setStyle(b.style,"display","block"),A.setStyle(b.style,"height",y);var Zt;switch(this.$annotations[m].className){case" ace_error":Zt=t("gutter.annotation.aria-label.error","Error, read annotations row $0",[ze]);break;case" ace_security":Zt=t("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[ze]);break;case" ace_warning":Zt=t("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[ze]);break;case" ace_info":Zt=t("gutter.annotation.aria-label.info","Info, read annotations row $0",[ze]);break;case" ace_hint":Zt=t("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[ze]);break}b.setAttribute("aria-label",Zt),b.setAttribute("tabindex","-1"),b.setAttribute("role","button")}else A.setStyle(b.style,"display","none"),b.removeAttribute("aria-label"),b.removeAttribute("role"),b.setAttribute("tabindex","0");return ze!==M.data&&(M.data=ze),v.className!=T&&(v.className=T),A.setStyle(e.element.style,"height",this.$lines.computeLineHeight(m,i,k)+"px"),A.setStyle(e.element.style,"top",this.$lines.computeLineTop(m,i,k)+"px"),e.text=ze,b.style.display==="none"&&C.style.display==="none"&&!Yt?e.element.setAttribute("aria-hidden",!0):e.element.setAttribute("aria-hidden",!1),e},n.prototype.setHighlightGutterLine=function(e){this.$highlightGutterLine=e},n.prototype.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},n.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},n.prototype.setShowFoldWidgets=function(e){e?A.addCssClass(this.element,"ace_folding-enabled"):A.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},n.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},n.prototype.$hideFoldWidget=function(e,i){var a=i||this.$getGutterCell(e);if(a&&a.element){var m=a.element.childNodes[1];m&&A.setStyle(m.style,"display","none")}},n.prototype.$showFoldWidget=function(e,i){var a=i||this.$getGutterCell(e);if(a&&a.element){var m=a.element.childNodes[1];m&&this.session.foldWidgets&&this.session.foldWidgets[a.row]&&A.setStyle(m.style,"display","inline-block")}},n.prototype.$getGutterCell=function(e){var i=this.$lines.cells,a=this.session.documentToScreenRow(e,0);return i[e-this.config.firstRowScreen-(e-a)]},n.prototype.$addCustomWidget=function(e,i,a){var m=i.className,v=i.label,k=i.title,M=i.callbacks;this.session.$gutterCustomWidgets[e]={className:m,label:v,title:k,callbacks:M},this.$hideFoldWidget(e,a);var C=a||this.$getGutterCell(e);if(C&&C.element){var b=C.element.querySelector(".ace_custom-widget");b&&b.remove(),b=A.createElement("span"),b.className="ace_custom-widget ".concat(m),b.setAttribute("tabindex","-1"),b.setAttribute("role","button"),b.setAttribute("aria-label",v),b.setAttribute("title",k),A.setStyle(b.style,"display","inline-block"),A.setStyle(b.style,"height","inherit"),M&&M.onClick&&b.addEventListener("click",function(he){M.onClick(he,e),he.stopPropagation()}),C.element.appendChild(b)}},n.prototype.$removeCustomWidget=function(e,i){delete this.session.$gutterCustomWidgets[e],this.$showFoldWidget(e,i);var a=i||this.$getGutterCell(e);if(a&&a.element){var m=a.element.querySelector(".ace_custom-widget");m&&a.element.removeChild(m)}},n.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=A.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},n.prototype.getRegion=function(e){var i=this.$padding||this.$computePadding(),a=this.element.getBoundingClientRect();if(e.x<i.left+a.left)return"markers";if(this.$showFoldWidgets&&e.x>a.right-i.right)return"foldWidgets"},n}();o.prototype.$fixedWidth=!1,o.prototype.$highlightGutterLine=!0,o.prototype.$renderer="",o.prototype.$showLineNumbers=!0,o.prototype.$showFoldWidgets=!0,S.implement(o.prototype,c);function r(n){var e=document.createTextNode("");n.appendChild(e);var i=A.createElement("span");n.appendChild(i);var a=A.createElement("span");n.appendChild(a);var m=A.createElement("span");return a.appendChild(m),n}g.Gutter=o}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(f,g,ue){var A=f("../range").Range,S=f("../lib/dom"),x=function(){function p(t){this.element=S.createElement("div"),this.element.className="ace_layer ace_marker-layer",t.appendChild(this.element)}return p.prototype.setPadding=function(t){this.$padding=t},p.prototype.setSession=function(t){this.session=t},p.prototype.setMarkers=function(t){this.markers=t},p.prototype.elt=function(t,o){var r=this.i!=-1&&this.element.childNodes[this.i];r?this.i++:(r=document.createElement("div"),this.element.appendChild(r),this.i=-1),r.style.cssText=o,r.className=t},p.prototype.update=function(t){if(t){this.config=t,this.i=0;var o;for(var r in this.markers){var n=this.markers[r];if(!n.range){n.update(o,this,this.session,t);continue}var e=n.range.clipRows(t.firstRow,t.lastRow);if(!e.isEmpty())if(e=e.toScreenRange(this.session),n.renderer){var i=this.$getTop(e.start.row,t),a=this.$padding+e.start.column*t.characterWidth;n.renderer(o,e,a,i,t)}else n.type=="fullLine"?this.drawFullLineMarker(o,e,n.clazz,t):n.type=="screenLine"?this.drawScreenLineMarker(o,e,n.clazz,t):e.isMultiLine()?n.type=="text"?this.drawTextMarker(o,e,n.clazz,t):this.drawMultiLineMarker(o,e,n.clazz,t):this.drawSingleLineMarker(o,e,n.clazz+" ace_start ace_br15",t)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},p.prototype.$getTop=function(t,o){return(t-o.firstRowScreen)*o.lineHeight},p.prototype.drawTextMarker=function(t,o,r,n,e){for(var i=this.session,a=o.start.row,m=o.end.row,v=a,k=0,M=0,C=i.getScreenLastRowColumn(v),b=new A(v,o.start.column,v,M);v<=m;v++)b.start.row=b.end.row=v,b.start.column=v==a?o.start.column:i.getRowWrapIndent(v),b.end.column=C,k=M,M=C,C=v+1<m?i.getScreenLastRowColumn(v+1):v==m?0:o.end.column,this.drawSingleLineMarker(t,b,r+(v==a?" ace_start":"")+" ace_br"+c(v==a||v==a+1&&o.start.column,k<M,M>C,v==m),n,v==m?0:1,e)},p.prototype.drawMultiLineMarker=function(t,o,r,n,e){var i=this.$padding,a=n.lineHeight,m=this.$getTop(o.start.row,n),v=i+o.start.column*n.characterWidth;if(e=e||"",this.session.$bidiHandler.isBidiRow(o.start.row)){var k=o.clone();k.end.row=k.start.row,k.end.column=this.session.getLine(k.start.row).length,this.drawBidiSingleLineMarker(t,k,r+" ace_br1 ace_start",n,null,e)}else this.elt(r+" ace_br1 ace_start","height:"+a+"px;right:"+i+"px;top:"+m+"px;left:"+v+"px;"+(e||""));if(this.session.$bidiHandler.isBidiRow(o.end.row)){var k=o.clone();k.start.row=k.end.row,k.start.column=0,this.drawBidiSingleLineMarker(t,k,r+" ace_br12",n,null,e)}else{m=this.$getTop(o.end.row,n);var M=o.end.column*n.characterWidth;this.elt(r+" ace_br12","height:"+a+"px;width:"+M+"px;top:"+m+"px;left:"+i+"px;"+(e||""))}if(a=(o.end.row-o.start.row-1)*n.lineHeight,!(a<=0)){m=this.$getTop(o.start.row+1,n);var C=(o.start.column?1:0)|(o.end.column?0:8);this.elt(r+(C?" ace_br"+C:""),"height:"+a+"px;right:"+i+"px;top:"+m+"px;left:"+i+"px;"+(e||""))}},p.prototype.drawSingleLineMarker=function(t,o,r,n,e,i){if(this.session.$bidiHandler.isBidiRow(o.start.row))return this.drawBidiSingleLineMarker(t,o,r,n,e,i);var a=n.lineHeight,m=(o.end.column+(e||0)-o.start.column)*n.characterWidth,v=this.$getTop(o.start.row,n),k=this.$padding+o.start.column*n.characterWidth;this.elt(r,"height:"+a+"px;width:"+m+"px;top:"+v+"px;left:"+k+"px;"+(i||""))},p.prototype.drawBidiSingleLineMarker=function(t,o,r,n,e,i){var a=n.lineHeight,m=this.$getTop(o.start.row,n),v=this.$padding,k=this.session.$bidiHandler.getSelections(o.start.column,o.end.column);k.forEach(function(M){this.elt(r,"height:"+a+"px;width:"+(M.width+(e||0))+"px;top:"+m+"px;left:"+(v+M.left)+"px;"+(i||""))},this)},p.prototype.drawFullLineMarker=function(t,o,r,n,e){var i=this.$getTop(o.start.row,n),a=n.lineHeight;o.start.row!=o.end.row&&(a+=this.$getTop(o.end.row,n)-i),this.elt(r,"height:"+a+"px;top:"+i+"px;left:0;right:0;"+(e||""))},p.prototype.drawScreenLineMarker=function(t,o,r,n,e){var i=this.$getTop(o.start.row,n),a=n.lineHeight;this.elt(r,"height:"+a+"px;top:"+i+"px;left:0;right:0;"+(e||""))},p}();x.prototype.$padding=0;function c(p,t,o,r){return(p?1:0)|(t?2:0)|(o?4:0)|(r?8:0)}g.Marker=x}),ace.define("ace/layer/text_util",["require","exports","module"],function(f,g,ue){var A=new Set(["text","rparen","lparen"]);g.isTextToken=function(S){return A.has(S)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(f,g,ue){var A=f("../lib/oop"),S=f("../lib/dom"),x=f("../lib/lang"),c=f("./lines").Lines,p=f("../lib/event_emitter").EventEmitter,t=f("../config").nls,o=f("./text_util").isTextToken,r=function(){function n(e){this.dom=S,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new c(this.element)}return n.prototype.$updateEolChar=function(){var e=this.session.doc,i=e.getNewLineCharacter()==`
219
+ `&&e.getNewLineMode()!="windows",a=i?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=a)return this.EOL_CHAR=a,!0},n.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},n.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},n.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},n.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",(function(i){this._signal("changeCharacterSize",i)}).bind(this)),this.$pollSizeChanges()},n.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},n.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},n.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString()},n.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)},n.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},n.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides===e?!1:(this.$highlightIndentGuides=e,e)},n.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var i=this.$tabStrings=[0],a=1;a<e+1;a++)if(this.showTabs){var m=this.dom.createElement("span");m.className="ace_invisible ace_invisible_tab",m.textContent=x.stringRepeat(this.TAB_CHAR,a),i.push(m)}else i.push(this.dom.createTextNode(x.stringRepeat(" ",a),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var v="ace_indent-guide",k=this.showSpaces?" ace_invisible ace_invisible_space":"",M=this.showSpaces?x.stringRepeat(this.SPACE_CHAR,this.tabSize):x.stringRepeat(" ",this.tabSize),C=this.showTabs?" ace_invisible ace_invisible_tab":"",b=this.showTabs?x.stringRepeat(this.TAB_CHAR,this.tabSize):M,m=this.dom.createElement("span");m.className=v+k,m.textContent=M,this.$tabStrings[" "]=m;var m=this.dom.createElement("span");m.className=v+C,m.textContent=b,this.$tabStrings[" "]=m}},n.prototype.updateLines=function(e,i,a){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var m=Math.max(i,e.firstRow),v=Math.min(a,e.lastRow),k=this.element.childNodes,M=0,b=e.firstRow;b<m;b++){var he=this.session.getFoldLine(b);if(he)if(he.containsRow(m)){m=he.start.row;break}else b=he.end.row;M++}for(var C=!1,b=m,he=this.session.getNextFoldLine(b),Ce=he?he.start.row:1/0;b>Ce&&(b=he.end.row+1,he=this.session.getNextFoldLine(b,he),Ce=he?he.start.row:1/0),!(b>v);){var X=k[M++];if(X){this.dom.removeChildren(X),this.$renderLine(X,b,b==Ce?he:!1),C&&(X.style.top=this.$lines.computeLineTop(b,e,this.session)+"px");var V=e.lineHeight*this.session.getRowLength(b)+"px";X.style.height!=V&&(C=!0,X.style.height=V)}b++}if(C)for(;M<this.$lines.cells.length;){var Xe=this.$lines.cells[M++];Xe.element.style.top=this.$lines.computeLineTop(Xe.row,e,this.session)+"px"}},n.prototype.scrollLines=function(e){var i=this.config;if(this.config=e,this.$lines.pageChanged(i,e))return this.update(e);this.$lines.moveContainer(e);var a=e.lastRow,m=i?i.lastRow:-1;if(!i||m<e.firstRow)return this.update(e);if(a<i.firstRow)return this.update(e);if(!i||i.lastRow<e.firstRow)return this.update(e);if(e.lastRow<i.firstRow)return this.update(e);if(i.firstRow<e.firstRow)for(var v=this.session.getFoldedRowCount(i.firstRow,e.firstRow-1);v>0;v--)this.$lines.shift();if(i.lastRow>e.lastRow)for(var v=this.session.getFoldedRowCount(e.lastRow+1,i.lastRow);v>0;v--)this.$lines.pop();e.firstRow<i.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,i.firstRow-1)),e.lastRow>i.lastRow&&this.$lines.push(this.$renderLinesFragment(e,i.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},n.prototype.$renderLinesFragment=function(e,i,a){for(var m=[],v=i,k=this.session.getNextFoldLine(v),M=k?k.start.row:1/0;v>M&&(v=k.end.row+1,k=this.session.getNextFoldLine(v,k),M=k?k.start.row:1/0),!(v>a);){var C=this.$lines.createCell(v,e,this.session),b=C.element;this.dom.removeChildren(b),S.setStyle(b.style,"height",this.$lines.computeLineHeight(v,e,this.session)+"px"),S.setStyle(b.style,"top",this.$lines.computeLineTop(v,e,this.session)+"px"),this.$renderLine(b,v,v==M?k:!1),this.$useLineGroups()?b.className="ace_line_group":b.className="ace_line",m.push(C),v++}return m},n.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var i=e.firstRow,a=e.lastRow,m=this.$lines;m.getLength();)m.pop();m.push(this.$renderLinesFragment(e,i,a))},n.prototype.$renderToken=function(e,i,a,m){for(var v=this,k=/(\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,M=this.dom.createFragment(this.element),C,b=0;C=k.exec(m);){var he=C[1],Ce=C[2],X=C[3],V=C[4],Xe=C[5];if(!(!v.showSpaces&&Ce)){var U=b!=C.index?m.slice(b,C.index):"";if(b=C.index+C[0].length,U&&M.appendChild(this.dom.createTextNode(U,this.element)),he){var O=v.session.getScreenTabSize(i+C.index),w=v.$tabStrings[O].cloneNode(!0);w.charCount=1,M.appendChild(w),i+=O-1}else if(Ce)if(v.showSpaces){var y=this.dom.createElement("span");y.className="ace_invisible ace_invisible_space",y.textContent=x.stringRepeat(v.SPACE_CHAR,Ce.length),M.appendChild(y)}else M.appendChild(this.dom.createTextNode(Ce,this.element));else if(X){var y=this.dom.createElement("span");y.className="ace_invisible ace_invisible_space ace_invalid",y.textContent=x.stringRepeat(v.SPACE_CHAR,X.length),M.appendChild(y)}else if(V){i+=1;var y=this.dom.createElement("span");y.style.width=v.config.characterWidth*2+"px",y.className=v.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",y.textContent=v.showSpaces?v.SPACE_CHAR:V,M.appendChild(y)}else if(Xe){i+=1;var y=this.dom.createElement("span");y.style.width=v.config.characterWidth*2+"px",y.className="ace_cjk",y.textContent=Xe,M.appendChild(y)}}}if(M.appendChild(this.dom.createTextNode(b?m.slice(b):m,this.element)),o(a.type))e.appendChild(M);else{var T="ace_"+a.type.replace(/\./g," ace_"),y=this.dom.createElement("span");a.type=="fold"&&(y.style.width=a.value.length*this.config.characterWidth+"px",y.setAttribute("title",t("inline-fold.closed.title","Unfold code"))),y.className=T,y.appendChild(M),e.appendChild(y)}return i+m.length},n.prototype.renderIndentGuide=function(e,i,a){var m=i.search(this.$indentGuideRe);if(m<=0||m>=a)return i;if(i[0]==" "){m-=m%this.tabSize;for(var v=m/this.tabSize,k=0;k<v;k++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),i.substr(m)}else if(i[0]==" "){for(var k=0;k<m;k++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),i.substr(m)}return this.$highlightIndentGuide(),i},n.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var e=this.session.doc.$lines;if(e){var i=this.session.selection.getCursor(),a=/^\s*/.exec(this.session.doc.getLine(i.row))[0].length,m=Math.floor(a/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:m,start:i.row};var v=this.session.$bracketHighlight;if(v){for(var k=this.session.$bracketHighlight.ranges,M=0;M<k.length;M++)if(i.row!==k[M].start.row){this.$highlightIndentGuideMarker.end=k[M].start.row+1,i.row>k[M].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&e[i.row]!==""&&i.column===e[i.row].length){this.$highlightIndentGuideMarker.dir=1;for(var M=i.row+1;M<e.length;M++){var C=e[M],b=/^\s*/.exec(C)[0].length;if(C!==""&&(this.$highlightIndentGuideMarker.end=M,b<=a))break}}this.$renderHighlightIndentGuide()}}},n.prototype.$clearActiveIndentGuide=function(){for(var e=this.element.querySelectorAll(".ace_indent-guide-active"),i=0;i<e.length;i++)e[i].classList.remove("ace_indent-guide-active")},n.prototype.$setIndentGuideActive=function(e,i){var a=this.session.doc.getLine(e.row);if(a!==""){var m=e.element;if(e.element.classList&&e.element.classList.contains("ace_line_group"))if(e.element.childNodes.length>0)m=e.element.childNodes[0];else return;var v=m.childNodes;if(v){var k=v[i-1];k&&k.classList&&k.classList.contains("ace_indent-guide")&&k.classList.add("ace_indent-guide-active")}}},n.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var i=this.$highlightIndentGuideMarker.indentLevel;if(i!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var a=0;a<e.length;a++){var m=e[a];if(this.$highlightIndentGuideMarker.end&&m.row>=this.$highlightIndentGuideMarker.start+1){if(m.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(m,i)}}else for(var a=e.length-1;a>=0;a--){var m=e[a];if(this.$highlightIndentGuideMarker.end&&m.row<this.$highlightIndentGuideMarker.start){if(m.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(m,i)}}}},n.prototype.$createLineElement=function(e){var i=this.dom.createElement("div");return i.className="ace_line",i.style.height=this.config.lineHeight+"px",i},n.prototype.$renderWrappedLine=function(e,i,a){var m=0,v=0,k=a[0],M=0,C=this.$createLineElement();e.appendChild(C);for(var b=0;b<i.length;b++){var he=i[b],Ce=he.value;if(b==0&&this.displayIndentGuides){if(m=Ce.length,Ce=this.renderIndentGuide(C,Ce,k),!Ce)continue;m-=Ce.length}if(m+Ce.length<k)M=this.$renderToken(C,M,he,Ce),m+=Ce.length;else{for(;m+Ce.length>=k;){M=this.$renderToken(C,M,he,Ce.substring(0,k-m)),Ce=Ce.substring(k-m),m=k,C=this.$createLineElement(),e.appendChild(C);var X=this.dom.createTextNode(x.stringRepeat(" ",a.indent),this.element);X.charCount=0,C.appendChild(X),v++,M=0,k=a[v]||Number.MAX_VALUE}Ce.length!=0&&(m+=Ce.length,M=this.$renderToken(C,M,he,Ce))}}a[a.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(C,M,null,"",!0)},n.prototype.$renderSimpleLine=function(e,i){for(var a=0,m=0;m<i.length;m++){var v=i[m],k=v.value;if(!(m==0&&this.displayIndentGuides&&(k=this.renderIndentGuide(e,k),!k))){if(a+k.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,a,v,k);a=this.$renderToken(e,a,v,k)}}},n.prototype.$renderOverflowMessage=function(e,i,a,m,v){a&&this.$renderToken(e,i,a,m.slice(0,this.MAX_LINE_LENGTH-i));var k=this.dom.createElement("span");k.className="ace_inline_button ace_keyword ace_toggle_wrap",k.textContent=v?"<hide>":"<click to see more...>",e.appendChild(k)},n.prototype.$renderLine=function(e,i,a){if(!a&&a!=!1&&(a=this.session.getFoldLine(i)),a)var m=this.$getFoldLineTokens(i,a);else var m=this.session.getTokens(i);var v=e;if(m.length){var k=this.session.getRowSplitData(i);if(k&&k.length){this.$renderWrappedLine(e,m,k);var v=e.lastChild}else{var v=e;this.$useLineGroups()&&(v=this.$createLineElement(),e.appendChild(v)),this.$renderSimpleLine(v,m)}}else this.$useLineGroups()&&(v=this.$createLineElement(),e.appendChild(v));if(this.showEOL&&v){a&&(i=a.end.row);var M=this.dom.createElement("span");M.className="ace_invisible ace_invisible_eol",M.textContent=i==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,v.appendChild(M)}},n.prototype.$getFoldLineTokens=function(e,i){var a=this.session,m=[];function v(M,C,b){for(var he=0,Ce=0;Ce+M[he].value.length<C;)if(Ce+=M[he].value.length,he++,he==M.length)return;if(Ce!=C){var X=M[he].value.substring(C-Ce);X.length>b-C&&(X=X.substring(0,b-C)),m.push({type:M[he].type,value:X}),Ce=C+X.length,he+=1}for(;Ce<b&&he<M.length;){var X=M[he].value;X.length+Ce>b?m.push({type:M[he].type,value:X.substring(0,b-Ce)}):m.push(M[he]),Ce+=X.length,he+=1}}var k=a.getTokens(e);return i.walk(function(M,C,b,he,Ce){M!=null?m.push({type:"fold",value:M}):(Ce&&(k=a.getTokens(C)),k.length&&v(k,he,b))},i.end.row,this.session.getLine(i.end.row).length),m},n.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},n}();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,A.implement(r.prototype,p),g.Text=r}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(f,g,ue){var A=f("../lib/dom"),S=function(){function x(c){this.element=A.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(),A.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return x.prototype.$updateOpacity=function(c){for(var p=this.cursors,t=p.length;t--;)A.setStyle(p[t].style,"opacity",c?"":"0")},x.prototype.$startCssAnimation=function(){for(var c=this.cursors,p=c.length;p--;)c[p].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&A.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},x.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,A.removeCssClass(this.element,"ace_animate-blinking")},x.prototype.setPadding=function(c){this.$padding=c},x.prototype.setSession=function(c){this.session=c},x.prototype.setBlinking=function(c){c!=this.isBlinking&&(this.isBlinking=c,this.restartTimer())},x.prototype.setBlinkInterval=function(c){c!=this.blinkInterval&&(this.blinkInterval=c,this.restartTimer())},x.prototype.setSmoothBlinking=function(c){c!=this.smoothBlinking&&(this.smoothBlinking=c,A.setCssClass(this.element,"ace_smooth-blinking",c),this.$updateCursors(!0),this.restartTimer())},x.prototype.addCursor=function(){var c=A.createElement("div");return c.className="ace_cursor",this.element.appendChild(c),this.cursors.push(c),c},x.prototype.removeCursor=function(){if(this.cursors.length>1){var c=this.cursors.pop();return c.parentNode.removeChild(c),c}},x.prototype.hideCursor=function(){this.isVisible=!1,A.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},x.prototype.showCursor=function(){this.isVisible=!0,A.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},x.prototype.restartTimer=function(){var c=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,A.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&&A.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),A.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var p=(function(){this.timeoutId=setTimeout(function(){c(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){c(!0),p()},this.blinkInterval),p()}},x.prototype.getPixelPosition=function(c,p){if(!this.config||!this.session)return{left:0,top:0};c||(c=this.session.selection.getCursor());var t=this.session.documentToScreenPosition(c),o=this.$padding+(this.session.$bidiHandler.isBidiRow(t.row,c.row)?this.session.$bidiHandler.getPosLeft(t.column):t.column*this.config.characterWidth),r=(t.row-(p?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:o,top:r}},x.prototype.isCursorInView=function(c,p){return c.top>=0&&c.top<p.maxHeight},x.prototype.update=function(c){this.config=c;var p=this.session.$selectionMarkers,t=0,o=0;(p===void 0||p.length===0)&&(p=[{cursor:null}]);for(var t=0,r=p.length;t<r;t++){var n=this.getPixelPosition(p[t].cursor,!0);if(!((n.top>c.height+c.offset||n.top<0)&&t>1)){var e=this.cursors[o++]||this.addCursor(),i=e.style;this.drawCursor?this.drawCursor(e,n,c,p[t],this.session):this.isCursorInView(n,c)?(A.setStyle(i,"display","block"),A.translate(e,n.left,n.top),A.setStyle(i,"width",Math.round(c.characterWidth)+"px"),A.setStyle(i,"height",c.lineHeight+"px")):A.setStyle(i,"display","none")}}for(;this.cursors.length>o;)this.removeCursor();var a=this.session.getOverwrite();this.$setOverwrite(a),this.$pixelPos=n,this.restartTimer()},x.prototype.$setOverwrite=function(c){c!=this.overwrite&&(this.overwrite=c,c?A.addCssClass(this.element,"ace_overwrite-cursors"):A.removeCssClass(this.element,"ace_overwrite-cursors"))},x.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},x}();S.prototype.$padding=0,S.prototype.drawCursor=null,g.Cursor=S}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(f,g,ue){var A=this&&this.__extends||function(){var e=function(i,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,v){m.__proto__=v}||function(m,v){for(var k in v)Object.prototype.hasOwnProperty.call(v,k)&&(m[k]=v[k])},e(i,a)};return function(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");e(i,a);function m(){this.constructor=i}i.prototype=a===null?Object.create(a):(m.prototype=a.prototype,new m)}}(),S=f("./lib/oop"),x=f("./lib/dom"),c=f("./lib/event"),p=f("./lib/event_emitter").EventEmitter,t=32768,o=function(){function e(i,a){this.element=x.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+a,this.inner=x.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),i.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,c.addListener(this.element,"scroll",this.onScroll.bind(this)),c.addListener(this.element,"mousedown",c.preventDefault)}return e.prototype.setVisible=function(i){this.element.style.display=i?"":"none",this.isVisible=i,this.coeff=1},e}();S.implement(o.prototype,p);var r=function(e){A(i,e);function i(a,m){var v=e.call(this,a,"-v")||this;return v.scrollTop=0,v.scrollHeight=0,m.$scrollbarWidth=v.width=x.scrollbarWidth(a.ownerDocument),v.inner.style.width=v.element.style.width=(v.width||15)+5+"px",v.$minWidth=0,v}return i.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},i.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},i.prototype.setHeight=function(a){this.element.style.height=a+"px"},i.prototype.setScrollHeight=function(a){this.scrollHeight=a,a>t?(this.coeff=t/a,a=t):this.coeff!=1&&(this.coeff=1),this.inner.style.height=a+"px"},i.prototype.setScrollTop=function(a){this.scrollTop!=a&&(this.skipEvent=!0,this.scrollTop=a,this.element.scrollTop=a*this.coeff)},i}(o);r.prototype.setInnerHeight=r.prototype.setScrollHeight;var n=function(e){A(i,e);function i(a,m){var v=e.call(this,a,"-h")||this;return v.scrollLeft=0,v.height=m.$scrollbarWidth,v.inner.style.height=v.element.style.height=(v.height||15)+5+"px",v}return i.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},i.prototype.getHeight=function(){return this.isVisible?this.height:0},i.prototype.setWidth=function(a){this.element.style.width=a+"px"},i.prototype.setInnerWidth=function(a){this.inner.style.width=a+"px"},i.prototype.setScrollWidth=function(a){this.inner.style.width=a+"px"},i.prototype.setScrollLeft=function(a){this.scrollLeft!=a&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=a)},i}(o);g.ScrollBar=r,g.ScrollBarV=r,g.ScrollBarH=n,g.VScrollBar=r,g.HScrollBar=n}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(f,g,ue){var A=this&&this.__extends||function(){var n=function(e,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,m){a.__proto__=m}||function(a,m){for(var v in m)Object.prototype.hasOwnProperty.call(m,v)&&(a[v]=m[v])},n(e,i)};return function(e,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");n(e,i);function a(){this.constructor=e}e.prototype=i===null?Object.create(i):(a.prototype=i.prototype,new a)}}(),S=f("./lib/oop"),x=f("./lib/dom"),c=f("./lib/event"),p=f("./lib/event_emitter").EventEmitter;x.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
220
+ position: absolute;
221
+ background: rgba(128, 128, 128, 0.6);
222
+ -moz-box-sizing: border-box;
223
+ box-sizing: border-box;
224
+ border: 1px solid #bbb;
225
+ border-radius: 2px;
226
+ z-index: 8;
227
+ }
228
+ .ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
229
+ position: absolute;
230
+ z-index: 6;
231
+ background: none;
232
+ overflow: hidden!important;
233
+ }
234
+ .ace_editor>.ace_sb-v {
235
+ z-index: 6;
236
+ right: 0;
237
+ top: 0;
238
+ width: 12px;
239
+ }
240
+ .ace_editor>.ace_sb-v div {
241
+ z-index: 8;
242
+ right: 0;
243
+ width: 100%;
244
+ }
245
+ .ace_editor>.ace_sb-h {
246
+ bottom: 0;
247
+ left: 0;
248
+ height: 12px;
249
+ }
250
+ .ace_editor>.ace_sb-h div {
251
+ bottom: 0;
252
+ height: 100%;
253
+ }
254
+ .ace_editor>.ace_sb_grabbed {
255
+ z-index: 8;
256
+ background: #000;
257
+ }`,"ace_scrollbar.css",!1);var t=function(){function n(e,i){this.element=x.createElement("div"),this.element.className="ace_sb"+i,this.inner=x.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,c.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return n.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},n}();S.implement(t.prototype,p);var o=function(n){A(e,n);function e(i,a){var m=n.call(this,i,"-v")||this;return m.scrollTop=0,m.scrollHeight=0,m.parent=i,m.width=m.VScrollWidth,m.renderer=a,m.inner.style.width=m.element.style.width=(m.width||15)+"px",m.$minWidth=0,m}return e.prototype.onMouseDown=function(i,a){if(i==="mousedown"&&!(c.getButton(a)!==0||a.detail===2)){if(a.target===this.inner){var m=this,v=a.clientY,k=function(V){v=V.clientY},M=function(){clearInterval(Ce)},C=a.clientY,b=this.thumbTop,he=function(){if(v!==void 0){var V=m.scrollTopFromThumbTop(b+v-C);V!==m.scrollTop&&m._emit("scroll",{data:V})}};c.capture(this.inner,k,M);var Ce=setInterval(he,20);return c.preventDefault(a)}var X=a.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(X)}),c.preventDefault(a)}},e.prototype.getHeight=function(){return this.height},e.prototype.scrollTopFromThumbTop=function(i){var a=i*(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(i){this.height=Math.max(0,i),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},e.prototype.setScrollHeight=function(i,a){this.pageHeight===i&&!a||(this.pageHeight=i,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},e.prototype.setScrollTop=function(i){this.scrollTop=i,i<0&&(i=0),this.thumbTop=i*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},e}(t);o.prototype.setInnerHeight=o.prototype.setScrollHeight;var r=function(n){A(e,n);function e(i,a){var m=n.call(this,i,"-h")||this;return m.scrollLeft=0,m.scrollWidth=0,m.height=m.HScrollHeight,m.inner.style.height=m.element.style.height=(m.height||12)+"px",m.renderer=a,m}return e.prototype.onMouseDown=function(i,a){if(i==="mousedown"&&!(c.getButton(a)!==0||a.detail===2)){if(a.target===this.inner){var m=this,v=a.clientX,k=function(V){v=V.clientX},M=function(){clearInterval(Ce)},C=a.clientX,b=this.thumbLeft,he=function(){if(v!==void 0){var V=m.scrollLeftFromThumbLeft(b+v-C);V!==m.scrollLeft&&m._emit("scroll",{data:V})}};c.capture(this.inner,k,M);var Ce=setInterval(he,20);return c.preventDefault(a)}var X=a.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(X)}),c.preventDefault(a)}},e.prototype.getHeight=function(){return this.isVisible?this.height:0},e.prototype.scrollLeftFromThumbLeft=function(i){var a=i*(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(i){this.width=Math.max(0,i),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},e.prototype.setScrollWidth=function(i,a){this.pageWidth===i&&!a||(this.pageWidth=i,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},e.prototype.setScrollLeft=function(i){this.scrollLeft=i,i<0&&(i=0),this.thumbLeft=i*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},e}(t);r.prototype.setInnerWidth=r.prototype.setScrollWidth,g.ScrollBar=o,g.ScrollBarV=o,g.ScrollBarH=r,g.VScrollBar=o,g.HScrollBar=r}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(f,g,ue){var A=f("./lib/event"),S=function(){function x(c,p){this.onRender=c,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=p||window;var t=this;this._flush=function(o){t.pending=!1;var r=t.changes;if(r&&(A.blockIdle(100),t.changes=0,t.onRender(r)),t.changes){if(t.$recursionLimit--<0)return;t.schedule()}else t.$recursionLimit=2}}return x.prototype.schedule=function(c){this.changes=this.changes|c,this.changes&&!this.pending&&(A.nextFrame(this._flush),this.pending=!0)},x.prototype.clear=function(c){var p=this.changes;return this.changes=0,p},x}();g.RenderLoop=S}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(f,g,ue){var A=f("../lib/oop"),S=f("../lib/dom"),x=f("../lib/lang"),c=f("../lib/event"),p=f("../lib/useragent"),t=f("../lib/event_emitter").EventEmitter,o=512,r=typeof ResizeObserver=="function",n=200,e=function(){function i(a){this.el=S.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=S.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=S.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),a.appendChild(this.el),this.$measureNode.textContent=x.stringRepeat("X",o),this.$characterSize={width:0,height:0},r?this.$addObserver():this.checkForSizeChanges()}return i.prototype.$setMeasureNodeStyles=function(a,m){a.width=a.height="auto",a.left=a.top="0px",a.visibility="hidden",a.position="absolute",a.whiteSpace="pre",p.isIE<8?a["font-family"]="inherit":a.font="inherit",a.overflow=m?"hidden":"visible"},i.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 m=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=a,this.charSizes=Object.create(null),this.allowBoldFonts=m&&m.width===a.width&&m.height===a.height,this._emit("changeCharacterSize",{data:a})}},i.prototype.$addObserver=function(){var a=this;this.$observer=new window.ResizeObserver(function(m){a.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},i.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var a=this;return this.$pollSizeChangesTimer=c.onIdle(function m(){a.checkForSizeChanges(),c.onIdle(m,500)},500)},i.prototype.setPolling=function(a){a?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},i.prototype.$measureSizes=function(a){var m={height:(a||this.$measureNode).clientHeight,width:(a||this.$measureNode).clientWidth/o};return m.width===0||m.height===0?null:m},i.prototype.$measureCharWidth=function(a){this.$main.textContent=x.stringRepeat(a,o);var m=this.$main.getBoundingClientRect();return m.width/o},i.prototype.getCharacterWidth=function(a){var m=this.charSizes[a];return m===void 0&&(m=this.charSizes[a]=this.$measureCharWidth(a)/this.$characterSize.width),m},i.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},i.prototype.$getZoom=function(a){return!a||!a.parentElement?1:(Number(window.getComputedStyle(a).zoom)||1)*this.$getZoom(a.parentElement)},i.prototype.$initTransformMeasureNodes=function(){var a=function(m,v){return["div",{style:"position: absolute;top:"+m+"px;left:"+v+"px;"}]};this.els=S.buildDom([a(0,0),a(n,0),a(0,n),a(n,n)],this.el)},i.prototype.transformCoordinates=function(a,m){if(a){var v=this.$getZoom(this.el);a=b(1/v,a)}function k(pt,gt,Qt){var mt=pt[1]*gt[0]-pt[0]*gt[1];return[(-gt[1]*Qt[0]+gt[0]*Qt[1])/mt,(+pt[1]*Qt[0]-pt[0]*Qt[1])/mt]}function M(pt,gt){return[pt[0]-gt[0],pt[1]-gt[1]]}function C(pt,gt){return[pt[0]+gt[0],pt[1]+gt[1]]}function b(pt,gt){return[pt*gt[0],pt*gt[1]]}this.els||this.$initTransformMeasureNodes();function he(pt){var gt=pt.getBoundingClientRect();return[gt.left,gt.top]}var Ce=he(this.els[0]),X=he(this.els[1]),V=he(this.els[2]),Xe=he(this.els[3]),U=k(M(Xe,X),M(Xe,V),M(C(X,V),C(Xe,Ce))),O=b(1+U[0],M(X,Ce)),w=b(1+U[1],M(V,Ce));if(m){var y=m,T=U[0]*y[0]/n+U[1]*y[1]/n+1,Oe=C(b(y[0],O),b(y[1],w));return C(b(1/T/n,Oe),Ce)}var ze=M(a,Ce),ft=k(M(O,b(U[0],ze)),M(w,b(U[1],ze)),ze);return b(n,ft)},i}();e.prototype.$characterSize={width:0,height:0},A.implement(e.prototype,t),g.FontMetrics=e}),ace.define("ace/css/editor-css",["require","exports","module"],function(f,g,ue){ue.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: absolute;
709
+ z-index: 999999;
710
+ box-sizing: border-box;
711
+ cursor: default;
712
+ white-space: pre-wrap;
713
+ word-wrap: break-word;
714
+ line-height: normal;
715
+ font-style: normal;
716
+ font-weight: normal;
717
+ letter-spacing: normal;
718
+ pointer-events: none;
719
+ overflow: auto;
720
+ max-width: min(33em, 66vw);
721
+ overscroll-behavior: contain;
722
+ }
723
+ .ace_tooltip pre {
724
+ white-space: pre-wrap;
725
+ }
726
+
727
+ .ace_tooltip.ace_dark {
728
+ background-color: #636363;
729
+ color: #fff;
730
+ }
731
+
732
+ .ace_tooltip:focus {
733
+ outline: 1px solid #5E9ED6;
734
+ }
735
+
736
+ .ace_icon {
737
+ display: inline-block;
738
+ width: 18px;
739
+ vertical-align: top;
740
+ }
741
+
742
+ .ace_icon_svg {
743
+ display: inline-block;
744
+ width: 12px;
745
+ vertical-align: top;
746
+ -webkit-mask-repeat: no-repeat;
747
+ -webkit-mask-size: 12px;
748
+ -webkit-mask-position: center;
749
+ }
750
+
751
+ .ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
752
+ padding-right: 13px;
753
+ }
754
+
755
+ .ace_fold-widget, .ace_custom-widget {
756
+ box-sizing: border-box;
757
+
758
+ margin: 0 -12px 0 1px;
759
+ display: none;
760
+ width: 11px;
761
+ vertical-align: top;
762
+
763
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
764
+ background-repeat: no-repeat;
765
+ background-position: center;
766
+
767
+ border-radius: 3px;
768
+
769
+ border: 1px solid transparent;
770
+ cursor: pointer;
771
+ pointer-events: auto;
772
+ }
773
+
774
+ .ace_custom-widget {
775
+ background: none;
776
+ }
777
+
778
+ .ace_folding-enabled .ace_fold-widget {
779
+ display: inline-block;
780
+ }
781
+
782
+ .ace_fold-widget.ace_end {
783
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
784
+ }
785
+
786
+ .ace_fold-widget.ace_closed {
787
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
788
+ }
789
+
790
+ .ace_fold-widget:hover {
791
+ border: 1px solid rgba(0, 0, 0, 0.3);
792
+ background-color: rgba(255, 255, 255, 0.2);
793
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
794
+ }
795
+
796
+ .ace_fold-widget:active {
797
+ border: 1px solid rgba(0, 0, 0, 0.4);
798
+ background-color: rgba(0, 0, 0, 0.05);
799
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
800
+ }
801
+ /**
802
+ * Dark version for fold widgets
803
+ */
804
+ .ace_dark .ace_fold-widget {
805
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
806
+ }
807
+ .ace_dark .ace_fold-widget.ace_end {
808
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
809
+ }
810
+ .ace_dark .ace_fold-widget.ace_closed {
811
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
812
+ }
813
+ .ace_dark .ace_fold-widget:hover {
814
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
815
+ background-color: rgba(255, 255, 255, 0.1);
816
+ }
817
+ .ace_dark .ace_fold-widget:active {
818
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
819
+ }
820
+
821
+ .ace_inline_button {
822
+ border: 1px solid lightgray;
823
+ display: inline-block;
824
+ margin: -1px 8px;
825
+ padding: 0 5px;
826
+ pointer-events: auto;
827
+ cursor: pointer;
828
+ }
829
+ .ace_inline_button:hover {
830
+ border-color: gray;
831
+ background: rgba(200,200,200,0.2);
832
+ display: inline-block;
833
+ pointer-events: auto;
834
+ }
835
+
836
+ .ace_fold-widget.ace_invalid {
837
+ background-color: #FFB4B4;
838
+ border-color: #DE5555;
839
+ }
840
+
841
+ .ace_fade-fold-widgets .ace_fold-widget {
842
+ transition: opacity 0.4s ease 0.05s;
843
+ opacity: 0;
844
+ }
845
+
846
+ .ace_fade-fold-widgets:hover .ace_fold-widget {
847
+ transition: opacity 0.05s ease 0.05s;
848
+ opacity:1;
849
+ }
850
+
851
+ .ace_underline {
852
+ text-decoration: underline;
853
+ }
854
+
855
+ .ace_bold {
856
+ font-weight: bold;
857
+ }
858
+
859
+ .ace_nobold .ace_bold {
860
+ font-weight: normal;
861
+ }
862
+
863
+ .ace_italic {
864
+ font-style: italic;
865
+ }
866
+
867
+
868
+ .ace_error-marker {
869
+ background-color: rgba(255, 0, 0,0.2);
870
+ position: absolute;
871
+ z-index: 9;
872
+ }
873
+
874
+ .ace_highlight-marker {
875
+ background-color: rgba(255, 255, 0,0.2);
876
+ position: absolute;
877
+ z-index: 8;
878
+ }
879
+
880
+ .ace_mobile-menu {
881
+ position: absolute;
882
+ line-height: 1.5;
883
+ border-radius: 4px;
884
+ -ms-user-select: none;
885
+ -moz-user-select: none;
886
+ -webkit-user-select: none;
887
+ user-select: none;
888
+ background: white;
889
+ box-shadow: 1px 3px 2px grey;
890
+ border: 1px solid #dcdcdc;
891
+ color: black;
892
+ }
893
+ .ace_dark > .ace_mobile-menu {
894
+ background: #333;
895
+ color: #ccc;
896
+ box-shadow: 1px 3px 2px grey;
897
+ border: 1px solid #444;
898
+
899
+ }
900
+ .ace_mobile-button {
901
+ padding: 2px;
902
+ cursor: pointer;
903
+ overflow: hidden;
904
+ }
905
+ .ace_mobile-button:hover {
906
+ background-color: #eee;
907
+ opacity:1;
908
+ }
909
+ .ace_mobile-button:active {
910
+ background-color: #ddd;
911
+ }
912
+
913
+ .ace_placeholder {
914
+ position: relative;
915
+ font-family: arial;
916
+ transform: scale(0.9);
917
+ transform-origin: left;
918
+ white-space: pre;
919
+ opacity: 0.7;
920
+ margin: 0 10px;
921
+ z-index: 1;
922
+ }
923
+
924
+ .ace_ghost_text {
925
+ opacity: 0.5;
926
+ font-style: italic;
927
+ }
928
+
929
+ .ace_ghost_text_container > div {
930
+ white-space: pre;
931
+ }
932
+
933
+ .ghost_text_line_wrapped::after {
934
+ content: "↩";
935
+ position: absolute;
936
+ }
937
+
938
+ .ace_lineWidgetContainer.ace_ghost_text {
939
+ margin: 0px 4px
940
+ }
941
+
942
+ .ace_screenreader-only {
943
+ position:absolute;
944
+ left:-10000px;
945
+ top:auto;
946
+ width:1px;
947
+ height:1px;
948
+ overflow:hidden;
949
+ }
950
+
951
+ .ace_hidden_token {
952
+ display: none;
953
+ }`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(f,g,ue){var A=f("../lib/dom"),S=f("../lib/oop"),x=f("../lib/event_emitter").EventEmitter,c=function(){function p(t,o){this.renderer=o,this.pixelRatio=1,this.maxHeight=o.layerConfig.maxHeight,this.lineHeight=o.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},this.setScrollBarV(t)}return p.prototype.$createCanvas=function(){this.canvas=A.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},p.prototype.setScrollBarV=function(t){this.$createCanvas(),this.scrollbarV=t,t.element.appendChild(this.canvas),this.setDimensions()},p.prototype.$updateDecorators=function(t){if(typeof this.canvas.getContext!="function")return;var o=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(t);var r=this.canvas.getContext("2d");function n(O,w){return O.priority<w.priority?-1:O.priority>w.priority?1:0}var e=this.renderer.session.$annotations;if(r.clearRect(0,0,this.canvas.width,this.canvas.height),e){var i={info:1,warning:2,error:3};e.forEach(function(O){O.priority=i[O.type]||null}),e=e.sort(n);for(var a=0;a<e.length;a++){var m=e[a].row,v=this.getVerticalOffsetForRow(m),k=v+this.lineHeight,M=Math.round(this.heightRatio*v),C=Math.round(this.heightRatio*k),b=Math.round((M+C)/2),he=C-b;he<this.halfMinDecorationHeight&&(he=this.halfMinDecorationHeight),b-he<0&&(b=he),b+he>this.canvasHeight&&(b=this.canvasHeight-he);var Ce=b-he,X=b+he,V=X-Ce;r.fillStyle=o[e[a].type]||null,r.fillRect(0,Ce,Math.round(this.oneZoneWidth-1),V)}}var Xe=this.renderer.session.selection.getCursor();if(Xe){var U=Math.round(this.getVerticalOffsetForRow(Xe.row)*this.heightRatio);r.fillStyle="rgba(0, 0, 0, 0.5)",r.fillRect(0,U,this.canvasWidth,2)}},p.prototype.getVerticalOffsetForRow=function(t){t=t|0;var o=this.renderer.session.documentToScreenRow(t,0)*this.lineHeight;return o},p.prototype.setDimensions=function(t){t=t||this.renderer.layerConfig,this.maxHeight=t.maxHeight,this.lineHeight=t.lineHeight,this.canvasHeight=t.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight},p.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},p.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},p}();S.implement(c.prototype,x),g.Decorator=c}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(f,g,ue){var A=f("./lib/oop"),S=f("./lib/dom"),x=f("./lib/lang"),c=f("./config"),p=f("./layer/gutter").Gutter,t=f("./layer/marker").Marker,o=f("./layer/text").Text,r=f("./layer/cursor").Cursor,n=f("./scrollbar").HScrollBar,e=f("./scrollbar").VScrollBar,i=f("./scrollbar_custom").HScrollBar,a=f("./scrollbar_custom").VScrollBar,m=f("./renderloop").RenderLoop,v=f("./layer/font_metrics").FontMetrics,k=f("./lib/event_emitter").EventEmitter,M=f("./css/editor-css"),C=f("./layer/decorators").Decorator,b=f("./lib/useragent"),he=f("./layer/text_util").isTextToken;S.importCssString(M,"ace_editor.css",!1);var Ce=function(){function X(V,Xe){var U=this;this.container=V||S.createElement("div"),S.addCssClass(this.container,"ace_editor"),S.HI_DPI&&S.addCssClass(this.container,"ace_hidpi"),this.setTheme(Xe),c.get("useStrictCSP")==null&&c.set("useStrictCSP",!1),this.$gutter=S.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=S.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=S.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new p(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new t(this.content);var O=this.$textLayer=new o(this.content);this.canvas=O.element,this.$markerFront=new t(this.content),this.$cursorLayer=new r(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new e(this.container,this),this.scrollBarH=new n(this.container,this),this.scrollBarV.on("scroll",function(w){U.$scrollAnimation||U.session.setScrollTop(w.data-U.scrollMargin.top)}),this.scrollBarH.on("scroll",function(w){U.$scrollAnimation||U.session.setScrollLeft(w.data-U.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new v(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(w){U.updateCharacterSize(),U.onResize(!0,U.gutterWidth,U.$size.width,U.$size.height),U._signal("changeCharacterSize",w)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!b.isIOS,this.$loop=new m(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 X.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),S.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},X.prototype.setSession=function(V){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=V,V&&this.scrollMargin.top&&V.getScrollTop()<=0&&V.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(V),this.$markerBack.setSession(V),this.$markerFront.setSession(V),this.$gutterLayer.setSession(V),this.$textLayer.setSession(V),V&&(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))},X.prototype.updateLines=function(V,Xe,U){if(Xe===void 0&&(Xe=1/0),this.$changedLines?(this.$changedLines.firstRow>V&&(this.$changedLines.firstRow=V),this.$changedLines.lastRow<Xe&&(this.$changedLines.lastRow=Xe)):this.$changedLines={firstRow:V,lastRow:Xe},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)},X.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},X.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},X.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},X.prototype.updateFull=function(V){V?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},X.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},X.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},X.prototype.onResize=function(V,Xe,U,O){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=V?1:0;var w=this.container;O||(O=w.clientHeight||w.scrollHeight),!O&&this.$maxLines&&this.lineHeight>1&&(!w.style.height||w.style.height=="0px")&&(w.style.height="1px",O=w.clientHeight||w.scrollHeight),U||(U=w.clientWidth||w.scrollWidth);var y=this.$updateCachedSize(V,Xe,U,O);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!U&&!O)return this.resizing=0;V&&(this.$gutterLayer.$padding=null),V?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)}},X.prototype.$updateCachedSize=function(V,Xe,U,O){O-=this.$extraHeight||0;var w=0,y=this.$size,T={width:y.width,height:y.height,scrollerHeight:y.scrollerHeight,scrollerWidth:y.scrollerWidth};if(O&&(V||y.height!=O)&&(y.height=O,w|=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",w=w|this.CHANGE_SCROLL),U&&(V||y.width!=U)){w|=this.CHANGE_SIZE,y.width=U,Xe==null&&(Xe=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=Xe,S.setStyle(this.scrollBarH.element.style,"left",Xe+"px"),S.setStyle(this.scroller.style,"left",Xe+this.margin.left+"px"),y.scrollerWidth=Math.max(0,U-Xe-this.scrollBarV.getWidth()-this.margin.h),S.setStyle(this.$gutter.style,"left",this.margin.left+"px");var Oe=this.scrollBarV.getWidth()+"px";S.setStyle(this.scrollBarH.element.style,"right",Oe),S.setStyle(this.scroller.style,"right",Oe),S.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(y.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||V)&&(w|=this.CHANGE_FULL)}return y.$dirty=!U||!O,w&&this._signal("resize",T),w},X.prototype.onGutterResize=function(V){var Xe=this.$showGutter?V:0;Xe!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,Xe,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()},X.prototype.adjustWrapLimit=function(){var V=this.$size.scrollerWidth-this.$padding*2,Xe=Math.floor(V/this.characterWidth);return this.session.adjustWrapLimit(Xe,this.$showPrintMargin&&this.$printMarginColumn)},X.prototype.setAnimatedScroll=function(V){this.setOption("animatedScroll",V)},X.prototype.getAnimatedScroll=function(){return this.$animatedScroll},X.prototype.setShowInvisibles=function(V){this.setOption("showInvisibles",V),this.session.$bidiHandler.setShowInvisibles(V)},X.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},X.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},X.prototype.setDisplayIndentGuides=function(V){this.setOption("displayIndentGuides",V)},X.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},X.prototype.setHighlightIndentGuides=function(V){this.setOption("highlightIndentGuides",V)},X.prototype.setShowPrintMargin=function(V){this.setOption("showPrintMargin",V)},X.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},X.prototype.setPrintMarginColumn=function(V){this.setOption("printMarginColumn",V)},X.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},X.prototype.getShowGutter=function(){return this.getOption("showGutter")},X.prototype.setShowGutter=function(V){return this.setOption("showGutter",V)},X.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},X.prototype.setFadeFoldWidgets=function(V){this.setOption("fadeFoldWidgets",V)},X.prototype.setHighlightGutterLine=function(V){this.setOption("highlightGutterLine",V)},X.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},X.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var V=S.createElement("div");V.className="ace_layer ace_print-margin-layer",this.$printMarginEl=S.createElement("div"),this.$printMarginEl.className="ace_print-margin",V.appendChild(this.$printMarginEl),this.content.insertBefore(V,this.content.firstChild)}var Xe=this.$printMarginEl.style;Xe.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",Xe.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},X.prototype.getContainerElement=function(){return this.container},X.prototype.getMouseEventTarget=function(){return this.scroller},X.prototype.getTextAreaContainer=function(){return this.container},X.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var V=this.textarea.style,Xe=this.$composition;if(!this.$keepTextAreaAtCursor&&!Xe){S.translate(this.textarea,-100,0);return}var U=this.$cursorLayer.$pixelPos;if(U){Xe&&Xe.markerRange&&(U=this.$cursorLayer.getPixelPosition(Xe.markerRange.start,!0));var O=this.layerConfig,w=U.top,y=U.left;w-=O.offset;var T=Xe&&Xe.useTextareaForIME||b.isMobile?this.lineHeight:1;if(w<0||w>O.height-T){S.translate(this.textarea,0,0);return}var Oe=1,ze=this.$size.height-T;if(!Xe)w+=this.lineHeight;else if(Xe.useTextareaForIME){var ft=this.textarea.value;Oe=this.characterWidth*this.session.$getStringScreenWidth(ft)[0]}else w+=this.lineHeight+2;y-=this.scrollLeft,y>this.$size.scrollerWidth-Oe&&(y=this.$size.scrollerWidth-Oe),y+=this.gutterWidth+this.margin.left,S.setStyle(V,"height",T+"px"),S.setStyle(V,"width",Oe+"px"),S.translate(this.textarea,Math.min(y,this.$size.scrollerWidth-Oe),Math.min(w,ze))}}},X.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},X.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},X.prototype.getLastFullyVisibleRow=function(){var V=this.layerConfig,Xe=V.lastRow,U=this.session.documentToScreenRow(Xe,0)*V.lineHeight;return U-this.session.getScrollTop()>V.height-V.lineHeight?Xe-1:Xe},X.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},X.prototype.setPadding=function(V){this.$padding=V,this.$textLayer.setPadding(V),this.$cursorLayer.setPadding(V),this.$markerFront.setPadding(V),this.$markerBack.setPadding(V),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},X.prototype.setScrollMargin=function(V,Xe,U,O){var w=this.scrollMargin;w.top=V|0,w.bottom=Xe|0,w.right=O|0,w.left=U|0,w.v=w.top+w.bottom,w.h=w.left+w.right,w.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-w.top),this.updateFull()},X.prototype.setMargin=function(V,Xe,U,O){var w=this.margin;w.top=V|0,w.bottom=Xe|0,w.right=O|0,w.left=U|0,w.v=w.top+w.bottom,w.h=w.left+w.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},X.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},X.prototype.setHScrollBarAlwaysVisible=function(V){this.setOption("hScrollBarAlwaysVisible",V)},X.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},X.prototype.setVScrollBarAlwaysVisible=function(V){this.setOption("vScrollBarAlwaysVisible",V)},X.prototype.$updateScrollBarV=function(){var V=this.layerConfig.maxHeight,Xe=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(V-=(Xe-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>V-Xe&&(V=this.scrollTop+Xe,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(V+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},X.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},X.prototype.freeze=function(){this.$frozen=!0},X.prototype.unfreeze=function(){this.$frozen=!1},X.prototype.$renderChanges=function(V,Xe){if(this.$changes&&(V|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!V&&!Xe){this.$changes|=V;return}if(this.$size.$dirty)return this.$changes|=V,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",V),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var U=this.layerConfig;if(V&this.CHANGE_FULL||V&this.CHANGE_SIZE||V&this.CHANGE_TEXT||V&this.CHANGE_LINES||V&this.CHANGE_SCROLL||V&this.CHANGE_H_SCROLL){if(V|=this.$computeLayerConfig()|this.$loop.clear(),U.firstRow!=this.layerConfig.firstRow&&U.firstRowScreen==this.layerConfig.firstRowScreen){var O=this.scrollTop+(U.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;O>0&&(this.scrollTop=O,V=V|this.CHANGE_SCROLL,V|=this.$computeLayerConfig()|this.$loop.clear())}U=this.layerConfig,this.$updateScrollBarV(),V&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),S.translate(this.content,-this.scrollLeft,-U.offset);var w=U.width+2*this.$padding+"px",y=U.minHeight+"px";S.setStyle(this.content.style,"width",w),S.setStyle(this.content.style,"height",y)}if(V&this.CHANGE_H_SCROLL&&(S.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)),V&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",V);return}if(V&this.CHANGE_SCROLL){this.$changedLines=null,V&this.CHANGE_TEXT||V&this.CHANGE_LINES?this.$textLayer.update(U):this.$textLayer.scrollLines(U),this.$showGutter&&(V&this.CHANGE_GUTTER||V&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",V);return}V&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(U),this.$showGutter&&this.$gutterLayer.update(U),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(U)):V&this.CHANGE_LINES?((this.$updateLines()||V&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(U),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(U)):V&this.CHANGE_TEXT||V&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(U),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(U)):V&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(U),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(U)),V&this.CHANGE_CURSOR&&(this.$cursorLayer.update(U),this.$moveTextAreaToCursor()),V&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(U),V&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(U),this._signal("afterRender",V)},X.prototype.$autosize=function(){var V=this.session.getScreenLength()*this.lineHeight,Xe=this.$maxLines*this.lineHeight,U=Math.min(Xe,Math.max((this.$minLines||1)*this.lineHeight,V))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(U+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&U>this.$maxPixelHeight&&(U=this.$maxPixelHeight);var O=U<=2*this.lineHeight,w=!O&&V>Xe;if(U!=this.desiredHeight||this.$size.height!=this.desiredHeight||w!=this.$vScroll){w!=this.$vScroll&&(this.$vScroll=w,this.scrollBarV.setVisible(w));var y=this.container.clientWidth;this.container.style.height=U+"px",this.$updateCachedSize(!0,this.$gutterWidth,y,U),this.desiredHeight=U,this._signal("autosize")}},X.prototype.$computeLayerConfig=function(){var V=this.session,Xe=this.$size,U=Xe.height<=2*this.lineHeight,O=this.session.getScreenLength(),w=O*this.lineHeight,y=this.$getLongestLine(),T=!U&&(this.$hScrollBarAlwaysVisible||Xe.scrollerWidth-y-2*this.$padding<0),Oe=this.$horizScroll!==T;Oe&&(this.$horizScroll=T,this.scrollBarH.setVisible(T));var ze=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),U=Xe.height<=2*this.lineHeight);var ft=Xe.scrollerHeight+this.lineHeight,pt=!this.$maxLines&&this.$scrollPastEnd?(Xe.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;w+=pt;var gt=this.scrollMargin;this.session.setScrollTop(Math.max(-gt.top,Math.min(this.scrollTop,w-Xe.scrollerHeight+gt.bottom))),this.session.setScrollLeft(Math.max(-gt.left,Math.min(this.scrollLeft,y+2*this.$padding-Xe.scrollerWidth+gt.right)));var Qt=!U&&(this.$vScrollBarAlwaysVisible||Xe.scrollerHeight-w+pt<0||this.scrollTop>gt.top),mt=ze!==Qt;mt&&(this.$vScroll=Qt,this.scrollBarV.setVisible(Qt));var Vt=this.scrollTop%this.lineHeight,Gt=Math.ceil(ft/this.lineHeight)-1,Yt=Math.max(0,Math.round((this.scrollTop-Vt)/this.lineHeight)),Zt=Yt+Gt,Xt,di,sn=this.lineHeight;Yt=V.screenToDocumentRow(Yt,0);var fi=V.getFoldLine(Yt);fi&&(Yt=fi.start.row),Xt=V.documentToScreenRow(Yt,0),di=V.getRowLength(Yt)*sn,Zt=Math.min(V.screenToDocumentRow(Zt,0),V.getLength()-1),ft=Xe.scrollerHeight+V.getRowLength(Zt)*sn+di,Vt=this.scrollTop-Xt*sn,Vt<0&&Xt>0&&(Xt=Math.max(0,Xt+Math.floor(Vt/sn)),Vt=this.scrollTop-Xt*sn);var pi=0;return(this.layerConfig.width!=y||Oe)&&(pi=this.CHANGE_H_SCROLL),(Oe||mt)&&(pi|=this.$updateCachedSize(!0,this.gutterWidth,Xe.width,Xe.height),this._signal("scrollbarVisibilityChanged"),mt&&(y=this.$getLongestLine())),this.layerConfig={width:y,padding:this.$padding,firstRow:Yt,firstRowScreen:Xt,lastRow:Zt,lineHeight:sn,characterWidth:this.characterWidth,minHeight:ft,maxHeight:w,offset:Vt,gutterOffset:sn?Math.max(0,Math.ceil((Vt+Xe.height-Xe.scrollerHeight)/sn)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(y-this.$padding),pi},X.prototype.$updateLines=function(){if(this.$changedLines){var V=this.$changedLines.firstRow,Xe=this.$changedLines.lastRow;this.$changedLines=null;var U=this.layerConfig;if(!(V>U.lastRow+1)&&!(Xe<U.firstRow)){if(Xe===1/0){this.$showGutter&&this.$gutterLayer.update(U),this.$textLayer.update(U);return}return this.$textLayer.updateLines(U,V,Xe),!0}}},X.prototype.$getLongestLine=function(){var V=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(V+=1),this.$textLayer&&V>this.$textLayer.MAX_LINE_LENGTH&&(V=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(V*this.characterWidth))},X.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},X.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},X.prototype.addGutterDecoration=function(V,Xe){this.$gutterLayer.addGutterDecoration(V,Xe)},X.prototype.removeGutterDecoration=function(V,Xe){this.$gutterLayer.removeGutterDecoration(V,Xe)},X.prototype.updateBreakpoints=function(V){this._rows=V,this.$loop.schedule(this.CHANGE_GUTTER)},X.prototype.setAnnotations=function(V){this.$gutterLayer.setAnnotations(V),this.$loop.schedule(this.CHANGE_GUTTER)},X.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},X.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},X.prototype.showCursor=function(){this.$cursorLayer.showCursor()},X.prototype.scrollSelectionIntoView=function(V,Xe,U){this.scrollCursorIntoView(V,U),this.scrollCursorIntoView(Xe,U)},X.prototype.scrollCursorIntoView=function(V,Xe,U){if(this.$size.scrollerHeight!==0){var O=this.$cursorLayer.getPixelPosition(V),w=O.left,y=O.top,T=U&&U.top||0,Oe=U&&U.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var ze=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;ze+T>y?(Xe&&ze+T>y+this.lineHeight&&(y-=Xe*this.$size.scrollerHeight),y===0&&(y=-this.scrollMargin.top),this.session.setScrollTop(y)):ze+this.$size.scrollerHeight-Oe<y+this.lineHeight&&(Xe&&ze+this.$size.scrollerHeight-Oe<y-this.lineHeight&&(y+=Xe*this.$size.scrollerHeight),this.session.setScrollTop(y+this.lineHeight+Oe-this.$size.scrollerHeight));var ft=this.scrollLeft,pt=2*this.layerConfig.characterWidth;w-pt<ft?(w-=pt,w<this.$padding+pt&&(w=-this.scrollMargin.left),this.session.setScrollLeft(w)):(w+=pt,ft+this.$size.scrollerWidth<w+this.characterWidth?this.session.setScrollLeft(Math.round(w+this.characterWidth-this.$size.scrollerWidth)):ft<=this.$padding&&w-ft<this.characterWidth&&this.session.setScrollLeft(0))}},X.prototype.getScrollTop=function(){return this.session.getScrollTop()},X.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},X.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},X.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},X.prototype.scrollToRow=function(V){this.session.setScrollTop(V*this.lineHeight)},X.prototype.alignCursor=function(V,Xe){typeof V=="number"&&(V={row:V,column:0});var U=this.$cursorLayer.getPixelPosition(V),O=this.$size.scrollerHeight-this.lineHeight,w=U.top-O*(Xe||0);return this.session.setScrollTop(w),w},X.prototype.$calcSteps=function(V,Xe){var U=0,O=this.STEPS,w=[],y=function(T,Oe,ze){return ze*(Math.pow(T-1,3)+1)+Oe};for(U=0;U<O;++U)w.push(y(U/this.STEPS,V,Xe-V));return w},X.prototype.scrollToLine=function(V,Xe,U,O){var w=this.$cursorLayer.getPixelPosition({row:V,column:0}),y=w.top;Xe&&(y-=this.$size.scrollerHeight/2);var T=this.scrollTop;this.session.setScrollTop(y),U!==!1&&this.animateScrolling(T,O)},X.prototype.animateScrolling=function(V,Xe){var U=this.scrollTop;if(!this.$animatedScroll)return;var O=this;if(V==U)return;if(this.$scrollAnimation){var w=this.$scrollAnimation.steps;if(w.length&&(V=w[0],V==U))return}var y=O.$calcSteps(V,U);this.$scrollAnimation={from:V,to:U,steps:y},clearInterval(this.$timer),O.session.setScrollTop(y.shift()),O.session.$scrollTop=U;function T(){O.$timer=clearInterval(O.$timer),O.$scrollAnimation=null,O.$stopAnimation=!1,Xe&&Xe()}this.$timer=setInterval(function(){if(O.$stopAnimation){T();return}if(!O.session)return clearInterval(O.$timer);y.length?(O.session.setScrollTop(y.shift()),O.session.$scrollTop=U):U!=null?(O.session.$scrollTop=-1,O.session.setScrollTop(U),U=null):T()},10)},X.prototype.scrollToY=function(V){this.scrollTop!==V&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=V)},X.prototype.scrollToX=function(V){this.scrollLeft!==V&&(this.scrollLeft=V),this.$loop.schedule(this.CHANGE_H_SCROLL)},X.prototype.scrollTo=function(V,Xe){this.session.setScrollTop(Xe),this.session.setScrollLeft(V)},X.prototype.scrollBy=function(V,Xe){Xe&&this.session.setScrollTop(this.session.getScrollTop()+Xe),V&&this.session.setScrollLeft(this.session.getScrollLeft()+V)},X.prototype.isScrollableBy=function(V,Xe){if(Xe<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||Xe>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||V<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||V>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},X.prototype.pixelToScreenCoordinates=function(V,Xe){var U;if(this.$hasCssTransforms){U={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([V,Xe]);V=O[1]-this.gutterWidth-this.margin.left,Xe=O[0]}else U=this.scroller.getBoundingClientRect();var w=V+this.scrollLeft-U.left-this.$padding,y=w/this.characterWidth,T=Math.floor((Xe+this.scrollTop-U.top)/this.lineHeight),Oe=this.$blockCursor?Math.floor(y):Math.round(y);return{row:T,column:Oe,side:y-Oe>0?1:-1,offsetX:w}},X.prototype.screenToTextCoordinates=function(V,Xe){var U;if(this.$hasCssTransforms){U={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([V,Xe]);V=O[1]-this.gutterWidth-this.margin.left,Xe=O[0]}else U=this.scroller.getBoundingClientRect();var w=V+this.scrollLeft-U.left-this.$padding,y=w/this.characterWidth,T=this.$blockCursor?Math.floor(y):Math.round(y),Oe=Math.floor((Xe+this.scrollTop-U.top)/this.lineHeight);return this.session.screenToDocumentPosition(Oe,Math.max(T,0),w)},X.prototype.textToScreenCoordinates=function(V,Xe){var U=this.scroller.getBoundingClientRect(),O=this.session.documentToScreenPosition(V,Xe),w=this.$padding+(this.session.$bidiHandler.isBidiRow(O.row,V)?this.session.$bidiHandler.getPosLeft(O.column):Math.round(O.column*this.characterWidth)),y=O.row*this.lineHeight;return{pageX:U.left+w-this.scrollLeft,pageY:U.top+y-this.scrollTop}},X.prototype.visualizeFocus=function(){S.addCssClass(this.container,"ace_focus")},X.prototype.visualizeBlur=function(){S.removeCssClass(this.container,"ace_focus")},X.prototype.showComposition=function(V){this.$composition=V,V.cssText||(V.cssText=this.textarea.style.cssText),V.useTextareaForIME==null&&(V.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(S.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):V.markerId=this.session.addMarker(V.markerRange,"ace_composition_marker","text")},X.prototype.setCompositionText=function(V){var Xe=this.session.selection.cursor;this.addToken(V,"composition_placeholder",Xe.row,Xe.column),this.$moveTextAreaToCursor()},X.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),S.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var V=this.session.selection.cursor;this.removeExtraToken(V.row,V.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},X.prototype.setGhostText=function(V,Xe){var U=this.session.selection.cursor,O=Xe||{row:U.row,column:U.column};this.removeGhostText();var w=this.$calculateWrappedTextChunks(V,O);this.addToken(w[0].text,"ghost_text",O.row,O.column),this.$ghostText={text:V,position:{row:O.row,column:O.column}};var y=S.createElement("div");if(w.length>1){var T=this.hideTokensAfterPosition(O.row,O.column),Oe;w.slice(1).forEach(function(mt){var Vt=S.createElement("div"),Gt=S.createElement("span");Gt.className="ace_ghost_text",mt.wrapped&&(Vt.className="ghost_text_line_wrapped"),mt.text.length===0&&(mt.text=" "),Gt.appendChild(S.createTextNode(mt.text)),Vt.appendChild(Gt),y.appendChild(Vt),Oe=Vt}),T.forEach(function(mt){var Vt=S.createElement("span");he(mt.type)||(Vt.className="ace_"+mt.type.replace(/\./g," ace_")),Vt.appendChild(S.createTextNode(mt.value)),Oe.appendChild(Vt)}),this.$ghostTextWidget={el:y,row:O.row,column:O.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var ze=this.$cursorLayer.getPixelPosition(O,!0),ft=this.container,pt=ft.getBoundingClientRect().height,gt=w.length*this.lineHeight,Qt=gt<pt-ze.top;if(Qt)return;gt<pt?this.scrollBy(0,(w.length-1)*this.lineHeight):this.scrollToRow(O.row)}},X.prototype.$calculateWrappedTextChunks=function(V,Xe){var U=this.$size.scrollerWidth-this.$padding*2,O=Math.floor(U/this.characterWidth)-2;O=O<=0?60:O;for(var w=V.split(/\r?\n/),y=[],T=0;T<w.length;T++){var Oe=this.session.$getDisplayTokens(w[T],Xe.column),ze=this.session.$computeWrapSplits(Oe,O,this.session.$tabSize);if(ze.length>0){var ft=0;ze.push(w[T].length);for(var pt=0;pt<ze.length;pt++){var gt=w[T].slice(ft,ze[pt]);y.push({text:gt,wrapped:!0}),ft=ze[pt]}}else y.push({text:w[T],wrapped:!1})}return y},X.prototype.removeGhostText=function(){if(this.$ghostText){var V=this.$ghostText.position;this.removeExtraToken(V.row,V.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},X.prototype.addToken=function(V,Xe,U,O){var w=this.session;w.bgTokenizer.lines[U]=null;var y={type:Xe,value:V},T=w.getTokens(U);if(O==null||!T.length)T.push(y);else for(var Oe=0,ze=0;ze<T.length;ze++){var ft=T[ze];if(Oe+=ft.value.length,O<=Oe){var pt=ft.value.length-(Oe-O),gt=ft.value.slice(0,pt),Qt=ft.value.slice(pt);T.splice(ze,1,{type:ft.type,value:gt},y,{type:ft.type,value:Qt});break}}this.updateLines(U,U)},X.prototype.hideTokensAfterPosition=function(V,Xe){for(var U=this.session.getTokens(V),O=0,w=!1,y=[],T=0;T<U.length;T++){var Oe=U[T];if(O+=Oe.value.length,Oe.type!=="ghost_text"){if(w){y.push({type:Oe.type,value:Oe.value}),Oe.type="hidden_token";continue}O===Xe&&(w=!0)}}return this.updateLines(V,V),y},X.prototype.removeExtraToken=function(V,Xe){this.session.bgTokenizer.lines[V]=null,this.updateLines(V,V)},X.prototype.setTheme=function(V,Xe){var U=this;if(this.$themeId=V,U._dispatchEvent("themeChange",{theme:V}),!V||typeof V=="string"){var O=V||this.$options.theme.initialValue;c.loadModule(["theme",O],w)}else w(V);function w(y){if(U.$themeId!=V)return Xe&&Xe();if(!y||!y.cssClass)throw new Error("couldn't load module "+V+" or it didn't call define");y.$id&&(U.$themeId=y.$id),S.importCssString(y.cssText,y.cssClass,U.container),U.theme&&S.removeCssClass(U.container,U.theme.cssClass);var T="padding"in y?y.padding:"padding"in(U.theme||{})?4:U.$padding;U.$padding&&T!=U.$padding&&U.setPadding(T),U.$theme=y.cssClass,U.theme=y,S.addCssClass(U.container,y.cssClass),S.setCssClass(U.container,"ace_dark",y.isDark),U.$size&&(U.$size.width=0,U.$updateSizeAsync()),U._dispatchEvent("themeLoaded",{theme:y}),Xe&&Xe(),b.isSafari&&U.scroller&&(U.scroller.style.background="red",U.scroller.style.background="")}},X.prototype.getTheme=function(){return this.$themeId},X.prototype.setStyle=function(V,Xe){S.setCssClass(this.container,V,Xe!==!1)},X.prototype.unsetStyle=function(V){S.removeCssClass(this.container,V)},X.prototype.setCursorStyle=function(V){S.setStyle(this.scroller.style,"cursor",V)},X.prototype.setMouseCursor=function(V){S.setStyle(this.scroller.style,"cursor",V)},X.prototype.attachToShadowRoot=function(){S.importCssString(M,"ace_editor.css",this.container)},X.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},X.prototype.$updateCustomScrollbar=function(V){var Xe=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),V===!0?(this.scrollBarV=new a(this.container,this),this.scrollBarH=new i(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(U){Xe.$scrollAnimation||Xe.session.setScrollTop(U.data-Xe.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(U){Xe.$scrollAnimation||Xe.session.setScrollLeft(U.data-Xe.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new C(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new e(this.container,this),this.scrollBarH=new n(this.container,this),this.scrollBarV.addEventListener("scroll",function(U){Xe.$scrollAnimation||Xe.session.setScrollTop(U.data-Xe.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(U){Xe.$scrollAnimation||Xe.session.setScrollLeft(U.data-Xe.scrollMargin.left)}))},X.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var V=this;this.$resizeTimer=x.delayedCall(function(){V.destroyed||V.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(Xe){var U=Xe[0].contentRect.width,O=Xe[0].contentRect.height;Math.abs(V.$size.width-U)>1||Math.abs(V.$size.height-O)>1?V.$resizeTimer.delay():V.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},X}();Ce.prototype.CHANGE_CURSOR=1,Ce.prototype.CHANGE_MARKER=2,Ce.prototype.CHANGE_GUTTER=4,Ce.prototype.CHANGE_SCROLL=8,Ce.prototype.CHANGE_LINES=16,Ce.prototype.CHANGE_TEXT=32,Ce.prototype.CHANGE_SIZE=64,Ce.prototype.CHANGE_MARKER_BACK=128,Ce.prototype.CHANGE_MARKER_FRONT=256,Ce.prototype.CHANGE_FULL=512,Ce.prototype.CHANGE_H_SCROLL=1024,Ce.prototype.$changes=0,Ce.prototype.$padding=null,Ce.prototype.$frozen=!1,Ce.prototype.STEPS=8,A.implement(Ce.prototype,k),c.defineOptions(Ce.prototype,"renderer",{useResizeObserver:{set:function(X){!X&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):X&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(X){this.$textLayer.setShowInvisibles(X)&&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(X){typeof X=="number"&&(this.$printMarginColumn=X),this.$showPrintMargin=!!X,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(X){this.$gutter.style.display=X?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(X){this.$gutterLayer.$useSvgGutterIcons=X},initialValue:!1},showFoldedAnnotations:{set:function(X){this.$gutterLayer.$showFoldedAnnotations=X},initialValue:!1},fadeFoldWidgets:{set:function(X){S.setCssClass(this.$gutter,"ace_fade-fold-widgets",X)},initialValue:!1},showFoldWidgets:{set:function(X){this.$gutterLayer.setShowFoldWidgets(X),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(X){this.$textLayer.setDisplayIndentGuides(X)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(X){this.$textLayer.setHighlightIndentGuides(X)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(X){this.$gutterLayer.setHighlightGutterLine(X),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(X){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(X){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(X){typeof X=="number"&&(X=X+"px"),this.container.style.fontSize=X,this.updateFontSize()},initialValue:12},fontFamily:{set:function(X){this.container.style.fontFamily=X,this.updateFontSize()}},maxLines:{set:function(X){this.updateFull()}},minLines:{set:function(X){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(X){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(X){X=+X||0,this.$scrollPastEnd!=X&&(this.$scrollPastEnd=X,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(X){this.$gutterLayer.$fixedWidth=!!X,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(X){this.$updateCustomScrollbar(X)},initialValue:!1},theme:{set:function(X){this.setTheme(X)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!b.isMobile&&!b.isIE}}),g.VirtualRenderer=Ce}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(f,g,ue){var A=f("../lib/oop"),S=f("../lib/net"),x=f("../lib/event_emitter").EventEmitter,c=f("../config");function p(n){var e="importScripts('"+S.qualifyURL(n)+"');";try{return new Blob([e],{type:"application/javascript"})}catch{var i=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,a=new i;return a.append(e),a.getBlob("application/javascript")}}function t(n){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(c.get("loadWorkerFromBlob")){var e=p(n),i=window.URL||window.webkitURL,a=i.createObjectURL(e);return new Worker(a)}return new Worker(n)}var o=function(n){n.postMessage||(n=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=n,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(){A.implement(this,x),this.$createWorkerFromOldConfig=function(n,e,i,a,m){if(f.nameToUrl&&!f.toUrl&&(f.toUrl=f.nameToUrl),c.get("packaged")||!f.toUrl)a=a||c.moduleUrl(e,"worker");else{var v=this.$normalizePath;a=a||v(f.toUrl("ace/worker/worker.js",null,"_"));var k={};n.forEach(function(M){k[M]=v(f.toUrl(M,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=t(a),m&&this.send("importScripts",m),this.$worker.postMessage({init:!0,tlns:k,module:e,classname:i}),this.$worker},this.onMessage=function(n){var e=n.data;switch(e.type){case"event":this._signal(e.name,{data:e.data});break;case"call":var i=this.callbacks[e.id];i&&(i(e.data),delete this.callbacks[e.id]);break;case"error":this.reportError(e.data);break;case"log":window.console&&console.log&&console.log.apply(console,e.data);break}},this.reportError=function(n){window.console&&console.error&&console.error(n)},this.$normalizePath=function(n){return S.qualifyURL(n)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(n){n.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(n,e){this.$worker.postMessage({command:n,args:e})},this.call=function(n,e,i){if(i){var a=this.callbackId++;this.callbacks[a]=i,e.push(a)}this.send(n,e)},this.emit=function(n,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:n,data:{data:e.data}})}catch(i){console.error(i.stack)}},this.attachToDocument=function(n){this.$doc&&this.terminate(),this.$doc=n,this.call("setValue",[n.getValue()]),n.on("change",this.changeListener,!0)},this.changeListener=function(n){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),n.action=="insert"?this.deltaQueue.push(n.start,n.lines):this.deltaQueue.push(n.start,n.end)},this.$sendDeltaQueue=function(){var n=this.deltaQueue;n&&(this.deltaQueue=null,n.length>50&&n.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:n}))}}).call(o.prototype);var r=function(n,e,i){var a=null,m=!1,v=Object.create(x),k=[],M=new o({messageBuffer:k,terminate:function(){},postMessage:function(b){k.push(b),a&&(m?setTimeout(C):C())}});M.setEmitSync=function(b){m=b};var C=function(){var b=k.shift();b.command?a[b.command].apply(a,b.args):b.event&&v._signal(b.event,b.data)};return v.postMessage=function(b){M.onMessage({data:b})},v.callback=function(b,he){this.postMessage({type:"call",id:he,data:b})},v.emit=function(b,he){this.postMessage({type:"event",name:b,data:he})},c.loadModule(["worker",e],function(b){for(a=new b[i](v);k.length;)C()}),M};g.UIWorkerClient=r,g.WorkerClient=o,g.createWorker=t}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(f,g,ue){var A=f("./range").Range,S=f("./lib/event_emitter").EventEmitter,x=f("./lib/oop"),c=function(){function p(t,o,r,n,e,i){var a=this;this.length=o,this.session=t,this.doc=t.getDocument(),this.mainClass=e,this.othersClass=i,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=n,this.$onCursorChange=function(){setTimeout(function(){a.onCursorChange()})},this.$pos=r;var m=t.getUndoManager().$undoStack||t.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=m.length,this.setup(),t.selection.on("changeCursor",this.$onCursorChange)}return p.prototype.setup=function(){var t=this,o=this.doc,r=this.session;this.selectionBefore=r.selection.toJSON(),r.selection.inMultiSelectMode&&r.selection.toSingleRange(),this.pos=o.createAnchor(this.$pos.row,this.$pos.column);var n=this.pos;n.$insertRight=!0,n.detach(),n.markerId=r.addMarker(new A(n.row,n.column,n.row,n.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(e){var i=o.createAnchor(e.row,e.column);i.$insertRight=!0,i.detach(),t.others.push(i)}),r.setUndoSelect(!1)},p.prototype.showOtherMarkers=function(){if(!this.othersActive){var t=this.session,o=this;this.othersActive=!0,this.others.forEach(function(r){r.markerId=t.addMarker(new A(r.row,r.column,r.row,r.column+o.length),o.othersClass,null,!1)})}},p.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var t=0;t<this.others.length;t++)this.session.removeMarker(this.others[t].markerId)}},p.prototype.onUpdate=function(t){if(this.$updating)return this.updateAnchors(t);var o=t;if(o.start.row===o.end.row&&o.start.row===this.pos.row){this.$updating=!0;var r=t.action==="insert"?o.end.column-o.start.column:o.start.column-o.end.column,n=o.start.column>=this.pos.column&&o.start.column<=this.pos.column+this.length+1,e=o.start.column-this.pos.column;if(this.updateAnchors(t),n&&(this.length+=r),n&&!this.session.$fromUndo){if(t.action==="insert")for(var i=this.others.length-1;i>=0;i--){var a=this.others[i],m={row:a.row,column:a.column+e};this.doc.insertMergedLines(m,t.lines)}else if(t.action==="remove")for(var i=this.others.length-1;i>=0;i--){var a=this.others[i],m={row:a.row,column:a.column+e};this.doc.remove(new A(m.row,m.column,m.row,m.column-r))}}this.$updating=!1,this.updateMarkers()}},p.prototype.updateAnchors=function(t){this.pos.onChange(t);for(var o=this.others.length;o--;)this.others[o].onChange(t);this.updateMarkers()},p.prototype.updateMarkers=function(){if(!this.$updating){var t=this,o=this.session,r=function(e,i){o.removeMarker(e.markerId),e.markerId=o.addMarker(new A(e.row,e.column,e.row,e.column+t.length),i,null,!1)};r(this.pos,this.mainClass);for(var n=this.others.length;n--;)r(this.others[n],this.othersClass)}},p.prototype.onCursorChange=function(t){if(!(this.$updating||!this.session)){var o=this.session.selection.getCursor();o.row===this.pos.row&&o.column>=this.pos.column&&o.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",t)):(this.hideOtherMarkers(),this._emit("cursorLeave",t))}},p.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},p.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var t=this.session.getUndoManager(),o=(t.$undoStack||t.$undostack).length-this.$undoStackDepth,r=0;r<o;r++)t.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},p}();x.implement(c.prototype,S),g.PlaceHolder=c}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(f,g,ue){var A=f("../lib/event"),S=f("../lib/useragent");function x(p,t){return p.row==t.row&&p.column==t.column}function c(p){var t=p.domEvent,o=t.altKey,r=t.shiftKey,n=t.ctrlKey,e=p.getAccelKey(),i=p.getButton();if(n&&S.isMac&&(i=t.button),p.editor.inMultiSelectMode&&i==2){p.editor.textInput.onContextMenu(p.domEvent);return}if(!n&&!o&&!e){i===0&&p.editor.inMultiSelectMode&&p.editor.exitMultiSelectMode();return}if(i===0){var a=p.editor,m=a.selection,v=a.inMultiSelectMode,k=p.getDocumentPosition(),M=m.getCursor(),C=p.inSelection()||m.isEmpty()&&x(k,M),b=p.x,he=p.y,Ce=function(gt){b=gt.clientX,he=gt.clientY},X=a.session,V=a.renderer.pixelToScreenCoordinates(b,he),Xe=V,U;if(a.$mouseHandler.$enableJumpToDef)n&&o||e&&o?U=r?"block":"add":o&&a.$blockSelectEnabled&&(U="block");else if(e&&!o){if(U="add",!v&&r)return}else o&&a.$blockSelectEnabled&&(U="block");if(U&&S.isMac&&t.ctrlKey&&a.$mouseHandler.cancelContextMenu(),U=="add"){if(!v&&C)return;if(!v){var O=m.toOrientedRange();a.addSelectionMarker(O)}var w=m.rangeList.rangeAtPoint(k);a.inVirtualSelectionMode=!0,r&&(w=null,O=m.ranges[0]||O,a.removeSelectionMarker(O)),a.once("mouseup",function(){var gt=m.toOrientedRange();w&&gt.isEmpty()&&x(w.cursor,gt.cursor)?m.substractPoint(gt.cursor):(r?m.substractPoint(O.cursor):O&&(a.removeSelectionMarker(O),m.addRange(O)),m.addRange(gt)),a.inVirtualSelectionMode=!1})}else if(U=="block"){p.stop(),a.inVirtualSelectionMode=!0;var y,T=[],Oe=function(){var gt=a.renderer.pixelToScreenCoordinates(b,he),Qt=X.screenToDocumentPosition(gt.row,gt.column,gt.offsetX);x(Xe,gt)&&x(Qt,m.lead)||(Xe=gt,a.selection.moveToPosition(Qt),a.renderer.scrollCursorIntoView(),a.removeSelectionMarkers(T),T=m.rectangularRangeBlock(Xe,V),a.$mouseHandler.$clickSelection&&T.length==1&&T[0].isEmpty()&&(T[0]=a.$mouseHandler.$clickSelection.clone()),T.forEach(a.addSelectionMarker,a),a.updateSelectionMarkers())};v&&!e?m.toSingleRange():!v&&e&&(y=m.toOrientedRange(),a.addSelectionMarker(y)),r?V=X.documentToScreenPosition(m.lead):m.moveToPosition(k),Xe={row:-1,column:-1};var ze=function(gt){Oe(),clearInterval(pt),a.removeSelectionMarkers(T),T.length||(T=[m.toOrientedRange()]),y&&(a.removeSelectionMarker(y),m.toSingleRange(y));for(var Qt=0;Qt<T.length;Qt++)m.addRange(T[Qt]);a.inVirtualSelectionMode=!1,a.$mouseHandler.$clickSelection=null},ft=Oe;A.capture(a.container,Ce,ze);var pt=setInterval(function(){ft()},20);return p.preventDefault()}}}g.onMouseDown=c}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(f,g,ue){g.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(S){S.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(S){S.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(S){S.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(S){S.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(S){S.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(S){S.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(S){S.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(S){S.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(S){S.multiSelect.rangeCount>1?S.multiSelect.joinSelections():S.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(S){S.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(S){S.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(S){S.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],g.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(S){S.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(S){return S&&S.inMultiSelectMode}}];var A=f("../keyboard/hash_handler").HashHandler;g.keyboardHandler=new A(g.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(f,g,ue){var A=f("./range_list").RangeList,S=f("./range").Range,x=f("./selection").Selection,c=f("./mouse/multi_select_handler").onMouseDown,p=f("./lib/event"),t=f("./lib/lang"),o=f("./commands/multi_select_commands");g.commands=o.defaultCommands.concat(o.multiSelectCommands);var r=f("./search").Search,n=new r;function e(M,C,b){return n.$options.wrap=!0,n.$options.needle=C,n.$options.backwards=b==-1,n.find(M)}var i=f("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(i.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(M,C){if(M){if(!this.inMultiSelectMode&&this.rangeCount===0){var b=this.toOrientedRange();if(this.rangeList.add(b),this.rangeList.add(M),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),C||this.fromOrientedRange(M);this.rangeList.removeAll(),this.rangeList.add(b),this.$onAddRange(b)}M.cursor||(M.cursor=M.end);var he=this.rangeList.add(M);return this.$onAddRange(M),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)),C||this.fromOrientedRange(M)}},this.toSingleRange=function(M){M=M||this.ranges[0];var C=this.rangeList.removeAll();C.length&&this.$onRemoveRange(C),M&&this.fromOrientedRange(M)},this.substractPoint=function(M){var C=this.rangeList.substractPoint(M);if(C)return this.$onRemoveRange(C),C[0]},this.mergeOverlappingRanges=function(){var M=this.rangeList.merge();M.length&&this.$onRemoveRange(M)},this.$onAddRange=function(M){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(M),this._signal("addRange",{range:M})},this.$onRemoveRange=function(M){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var C=this.rangeList.ranges.pop();M.push(C),this.rangeCount=0}for(var b=M.length;b--;){var he=this.ranges.indexOf(M[b]);this.ranges.splice(he,1)}this._signal("removeRange",{ranges:M}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),C=C||this.ranges[0],C&&!C.isEqual(this.getRange())&&this.fromOrientedRange(C)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new A,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var M=this.ranges.length?this.ranges:[this.getRange()],C=[],b=0;b<M.length;b++){var he=M[b],Ce=he.start.row,X=he.end.row;if(Ce===X)C.push(he.clone());else{for(C.push(new S(Ce,he.start.column,Ce,this.session.getLine(Ce).length));++Ce<X;)C.push(this.getLineRange(Ce,!0));C.push(new S(X,0,X,he.end.column))}b==0&&!this.isBackwards()&&(C=C.reverse())}this.toSingleRange();for(var b=C.length;b--;)this.addRange(C[b])},this.joinSelections=function(){var M=this.rangeList.ranges,C=M[M.length-1],b=S.fromPoints(M[0].start,C.end);this.toSingleRange(),this.setSelectionRange(b,C.cursor==C.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var M=this.rangeList.ranges,C=M[M.length-1],b=S.fromPoints(M[0].start,C.end);this.toSingleRange(),this.setSelectionRange(b,C.cursor==C.start)}else{var he=this.session.documentToScreenPosition(this.cursor),Ce=this.session.documentToScreenPosition(this.anchor),X=this.rectangularRangeBlock(he,Ce);X.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(M,C,b){var he=[],Ce=M.column<C.column;if(Ce)var X=M.column,V=C.column,Xe=M.offsetX,U=C.offsetX;else var X=C.column,V=M.column,Xe=C.offsetX,U=M.offsetX;var O=M.row<C.row;if(O)var w=M.row,y=C.row;else var w=C.row,y=M.row;X<0&&(X=0),w<0&&(w=0),w==y&&(b=!0);for(var T,Oe=w;Oe<=y;Oe++){var ze=S.fromPoints(this.session.screenToDocumentPosition(Oe,X,Xe),this.session.screenToDocumentPosition(Oe,V,U));if(ze.isEmpty()){if(T&&m(ze.end,T))break;T=ze.end}ze.cursor=Ce?ze.start:ze.end,he.push(ze)}if(O&&he.reverse(),!b){for(var ft=he.length-1;he[ft].isEmpty()&&ft>0;)ft--;if(ft>0)for(var pt=0;he[pt].isEmpty();)pt++;for(var gt=ft;gt>=pt;gt--)he[gt].isEmpty()&&he.splice(gt,1)}return he}}).call(x.prototype);var a=f("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(M){M.cursor||(M.cursor=M.end);var C=this.getSelectionStyle();return M.marker=this.session.addMarker(M,"ace_selection",C),this.session.$selectionMarkers.push(M),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,M},this.removeSelectionMarker=function(M){if(M.marker){this.session.removeMarker(M.marker);var C=this.session.$selectionMarkers.indexOf(M);C!=-1&&this.session.$selectionMarkers.splice(C,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(M){for(var C=this.session.$selectionMarkers,b=M.length;b--;){var he=M[b];if(he.marker){this.session.removeMarker(he.marker);var Ce=C.indexOf(he);Ce!=-1&&C.splice(Ce,1)}}this.session.selectionMarkerCount=C.length},this.$onAddRange=function(M){this.addSelectionMarker(M.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(M){this.removeSelectionMarkers(M.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(M){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(M){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(M){var C=M.command,b=M.editor;if(b.multiSelect){if(C.multiSelectAction)C.multiSelectAction=="forEach"?he=b.forEachSelection(C,M.args):C.multiSelectAction=="forEachLine"?he=b.forEachSelection(C,M.args,!0):C.multiSelectAction=="single"?(b.exitMultiSelectMode(),he=C.exec(b,M.args||{})):he=C.multiSelectAction(b,M.args||{});else{var he=C.exec(b,M.args||{});b.multiSelect.addRange(b.multiSelect.toOrientedRange()),b.multiSelect.mergeOverlappingRanges()}return he}},this.forEachSelection=function(M,C,b){if(!this.inVirtualSelectionMode){var he=b&&b.keepOrder,Ce=b==!0||b&&b.$byLines,X=this.session,V=this.selection,Xe=V.rangeList,U=(he?V:Xe).ranges,O;if(!U.length)return M.exec?M.exec(this,C||{}):M(this,C||{});var w=V._eventRegistry;V._eventRegistry={};var y=new x(X);this.inVirtualSelectionMode=!0;for(var T=U.length;T--;){if(Ce)for(;T>0&&U[T].start.row==U[T-1].end.row;)T--;y.fromOrientedRange(U[T]),y.index=T,this.selection=X.selection=y;var Oe=M.exec?M.exec(this,C||{}):M(this,C||{});!O&&Oe!==void 0&&(O=Oe),y.toOrientedRange(U[T])}y.detach(),this.selection=X.selection=V,this.inVirtualSelectionMode=!1,V._eventRegistry=w,V.mergeOverlappingRanges(),V.ranges[0]&&V.fromOrientedRange(V.ranges[0]);var ze=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),ze&&ze.from==ze.to&&this.renderer.animateScrolling(ze.from),O}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var M="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var C=this.multiSelect.rangeList.ranges,b=[],he=0;he<C.length;he++)b.push(this.session.getTextRange(C[he]));var Ce=this.session.getDocument().getNewLineCharacter();M=b.join(Ce),M.length==(b.length-1)*Ce.length&&(M="")}else this.selection.isEmpty()||(M=this.session.getTextRange(this.getSelectionRange()));return M},this.$checkMultiselectChange=function(M,C){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var b=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&C==this.multiSelect.anchor)return;var he=C==this.multiSelect.anchor?b.cursor==b.start?b.end:b.start:b.cursor;he.row!=C.row||this.session.$clipPositionToDocument(he.row,he.column).column!=C.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(M,C,b){if(C=C||{},C.needle=M||C.needle,C.needle==null){var he=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();C.needle=this.session.getTextRange(he)}this.$search.set(C);var Ce=this.$search.findAll(this.session);if(!Ce.length)return 0;var X=this.multiSelect;b||X.toSingleRange(Ce[0]);for(var V=Ce.length;V--;)X.addRange(Ce[V],!0);return he&&X.rangeList.rangeAtPoint(he.start)&&X.addRange(he,!0),Ce.length},this.selectMoreLines=function(M,C){var b=this.selection.toOrientedRange(),he=b.cursor==b.end,Ce=this.session.documentToScreenPosition(b.cursor);this.selection.$desiredColumn&&(Ce.column=this.selection.$desiredColumn);var X=this.session.screenToDocumentPosition(Ce.row+M,Ce.column);if(b.isEmpty())var Xe=X;else var V=this.session.documentToScreenPosition(he?b.end:b.start),Xe=this.session.screenToDocumentPosition(V.row+M,V.column);if(he){var U=S.fromPoints(X,Xe);U.cursor=U.start}else{var U=S.fromPoints(Xe,X);U.cursor=U.end}if(U.desiredColumn=Ce.column,!this.selection.inMultiSelectMode)this.selection.addRange(b);else if(C)var O=b.cursor;this.selection.addRange(U),O&&this.selection.substractPoint(O)},this.transposeSelections=function(M){for(var C=this.session,b=C.multiSelect,he=b.ranges,Ce=he.length;Ce--;){var X=he[Ce];if(X.isEmpty()){var V=C.getWordRange(X.start.row,X.start.column);X.start.row=V.start.row,X.start.column=V.start.column,X.end.row=V.end.row,X.end.column=V.end.column}}b.mergeOverlappingRanges();for(var Xe=[],Ce=he.length;Ce--;){var X=he[Ce];Xe.unshift(C.getTextRange(X))}M<0?Xe.unshift(Xe.pop()):Xe.push(Xe.shift());for(var Ce=he.length;Ce--;){var X=he[Ce],U=X.clone();C.replace(X,Xe[Ce]),X.start.row=U.start.row,X.start.column=U.start.column}b.fromOrientedRange(b.ranges[0])},this.selectMore=function(M,C,b){var he=this.session,Ce=he.multiSelect,X=Ce.toOrientedRange();if(!(X.isEmpty()&&(X=he.getWordRange(X.start.row,X.start.column),X.cursor=M==-1?X.start:X.end,this.multiSelect.addRange(X),b))){var V=he.getTextRange(X),Xe=e(he,V,M);Xe&&(Xe.cursor=M==-1?Xe.start:Xe.end,this.session.unfold(Xe),this.multiSelect.addRange(Xe),this.renderer.scrollCursorIntoView(null,.5)),C&&this.multiSelect.substractPoint(X.cursor)}},this.alignCursors=function(){var M=this.session,C=M.multiSelect,b=C.ranges,he=-1,Ce=b.filter(function(ft){if(ft.cursor.row==he)return!0;he=ft.cursor.row});if(!b.length||Ce.length==b.length-1){var X=this.selection.getRange(),V=X.start.row,Xe=X.end.row,U=V==Xe;if(U){var O=this.session.getLength(),w;do w=this.session.getLine(Xe);while(/[=:]/.test(w)&&++Xe<O);do w=this.session.getLine(V);while(/[=:]/.test(w)&&--V>0);V<0&&(V=0),Xe>=O&&(Xe=O-1)}var y=this.session.removeFullLines(V,Xe);y=this.$reAlignText(y,U),this.session.insert({row:V,column:0},y.join(`
954
+ `)+`
955
+ `),U||(X.start.column=0,X.end.column=y[y.length-1].length),this.selection.setRange(X)}else{Ce.forEach(function(ft){C.substractPoint(ft.cursor)});var T=0,Oe=1/0,ze=b.map(function(ft){var pt=ft.cursor,gt=M.getLine(pt.row),Qt=gt.substr(pt.column).search(/\S/g);return Qt==-1&&(Qt=0),pt.column>T&&(T=pt.column),Qt<Oe&&(Oe=Qt),Qt});b.forEach(function(ft,pt){var gt=ft.cursor,Qt=T-gt.column,mt=ze[pt]-Oe;Qt>mt?M.insert(gt,t.stringRepeat(" ",Qt-mt)):M.remove(new S(gt.row,gt.column,gt.row,gt.column-Qt+mt)),ft.start.column=ft.end.column=T,ft.start.row=ft.end.row=gt.row,ft.cursor=ft.end}),C.fromOrientedRange(b[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(M,C){var b=!0,he=!0,Ce,X,V;return M.map(function(y){var T=y.match(/(\s*)(.*?)(\s*)([=:].*)/);return T?Ce==null?(Ce=T[1].length,X=T[2].length,V=T[3].length,T):(Ce+X+V!=T[1].length+T[2].length+T[3].length&&(he=!1),Ce!=T[1].length&&(b=!1),Ce>T[1].length&&(Ce=T[1].length),X<T[2].length&&(X=T[2].length),V>T[3].length&&(V=T[3].length),T):[y]}).map(C?U:b?he?O:U:w);function Xe(y){return t.stringRepeat(" ",y)}function U(y){return y[2]?Xe(Ce)+y[2]+Xe(X-y[2].length+V)+y[4].replace(/^([=:])\s+/,"$1 "):y[0]}function O(y){return y[2]?Xe(Ce+X-y[2].length)+y[2]+Xe(V)+y[4].replace(/^([=:])\s+/,"$1 "):y[0]}function w(y){return y[2]?Xe(Ce)+y[2]+Xe(V)+y[4].replace(/^([=:])\s+/,"$1 "):y[0]}}}).call(a.prototype);function m(M,C){return M.row==C.row&&M.column==C.column}g.onSessionChange=function(M){var C=M.session;C&&!C.multiSelect&&(C.$selectionMarkers=[],C.selection.$initRangeList(),C.multiSelect=C.selection),this.multiSelect=C&&C.multiSelect;var b=M.oldSession;b&&(b.multiSelect.off("addRange",this.$onAddRange),b.multiSelect.off("removeRange",this.$onRemoveRange),b.multiSelect.off("multiSelect",this.$onMultiSelect),b.multiSelect.off("singleSelect",this.$onSingleSelect),b.multiSelect.lead.off("change",this.$checkMultiselectChange),b.multiSelect.anchor.off("change",this.$checkMultiselectChange)),C&&(C.multiSelect.on("addRange",this.$onAddRange),C.multiSelect.on("removeRange",this.$onRemoveRange),C.multiSelect.on("multiSelect",this.$onMultiSelect),C.multiSelect.on("singleSelect",this.$onSingleSelect),C.multiSelect.lead.on("change",this.$checkMultiselectChange),C.multiSelect.anchor.on("change",this.$checkMultiselectChange)),C&&this.inMultiSelectMode!=C.selection.inMultiSelectMode&&(C.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function v(M){M.$multiselectOnSessionChange||(M.$onAddRange=M.$onAddRange.bind(M),M.$onRemoveRange=M.$onRemoveRange.bind(M),M.$onMultiSelect=M.$onMultiSelect.bind(M),M.$onSingleSelect=M.$onSingleSelect.bind(M),M.$multiselectOnSessionChange=g.onSessionChange.bind(M),M.$checkMultiselectChange=M.$checkMultiselectChange.bind(M),M.$multiselectOnSessionChange(M),M.on("changeSession",M.$multiselectOnSessionChange),M.on("mousedown",c),M.commands.addCommands(o.defaultCommands),k(M))}function k(M){if(!M.textInput)return;var C=M.textInput.getElement(),b=!1;p.addListener(C,"keydown",function(Ce){var X=Ce.keyCode==18&&!(Ce.ctrlKey||Ce.shiftKey||Ce.metaKey);M.$blockSelectEnabled&&X?b||(M.renderer.setMouseCursor("crosshair"),b=!0):b&&he()},M),p.addListener(C,"keyup",he,M),p.addListener(C,"blur",he,M);function he(Ce){b&&(M.renderer.setMouseCursor(""),b=!1)}}g.MultiSelect=v,f("./config").defineOptions(a.prototype,"editor",{enableMultiselect:{set:function(M){v(this),M?this.on("mousedown",c):this.off("mousedown",c)},value:!0},enableBlockSelect:{set:function(M){this.$blockSelectEnabled=M},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(f,g,ue){var A=f("../../range").Range,S=g.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(x,c,p){var t=x.getLine(p);return this.foldingStartMarker.test(t)?"start":c=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(t)?"end":""},this.getFoldWidgetRange=function(x,c,p){return null},this.indentationBlock=function(x,c,p){var t=/\S/,o=x.getLine(c),r=o.search(t);if(r!=-1){for(var n=p||o.length,e=x.getLength(),i=c,a=c;++c<e;){var m=x.getLine(c).search(t);if(m!=-1){if(m<=r){var v=x.getTokenAt(c,0);if(!v||v.type!=="string")break}a=c}}if(a>i){var k=x.getLine(a).length;return new A(i,n,a,k)}}},this.openingBracketBlock=function(x,c,p,t,o){var r={row:p,column:t+1},n=x.$findClosingBracket(c,r,o);if(n){var e=x.foldWidgets[n.row];return e==null&&(e=x.getFoldWidget(n.row)),e=="start"&&n.row>r.row&&(n.row--,n.column=x.getLine(n.row).length),A.fromPoints(r,n)}},this.closingBracketBlock=function(x,c,p,t,o){var r={row:p,column:t},n=x.$findOpeningBracket(c,r);if(n)return n.column++,r.column--,A.fromPoints(n,r)}}).call(S.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(f,g,ue){var A=f("../lib/dom"),S=f("../range").Range,x=f("../config").nls;function c(t,o,r){for(var n=0,e=t.length-1;n<=e;){var i=n+e>>1,a=r(o,t[i]);if(a>0)n=i+1;else if(a<0)e=i-1;else return i}return-(n+1)}function p(t,o,r){var n=t.getAnnotations().sort(S.comparePoints);if(n.length){var e=c(n,{row:o,column:-1},S.comparePoints);e<0&&(e=-e-1),e>=n.length?e=r>0?0:n.length-1:e===0&&r<0&&(e=n.length-1);var i=n[e];if(!(!i||!r)){if(i.row===o){do i=n[e+=r];while(i&&i.row===o);if(!i)return n.slice()}var a=[];o=i.row;do a[r<0?"unshift":"push"](i),i=n[e+=r];while(i&&i.row==o);return a.length&&a}}}g.showErrorMarker=function(t,o){var r=t.session,n=t.getCursorPosition(),e=n.row,i=r.widgetManager.getWidgetsAtRow(e).filter(function(Ce){return Ce.type=="errorMarker"})[0];i?i.destroy():e-=o;var a=p(r,e,o),m;if(a){var v=a[0];n.column=(v.pos&&typeof v.column!="number"?v.pos.sc:v.column)||0,n.row=v.row,m=t.renderer.$gutterLayer.$annotations[n.row]}else{if(i)return;m={displayText:[x("error-marker.good-state","Looks good!")],className:"ace_ok"}}t.session.unfold(n.row),t.selection.moveToPosition(n);var k={row:n.row,fixedWidth:!0,coverGutter:!0,el:A.createElement("div"),type:"errorMarker"},M=k.el.appendChild(A.createElement("div")),C=k.el.appendChild(A.createElement("div"));C.className="error_widget_arrow "+m.className;var b=t.renderer.$cursorLayer.getPixelPosition(n).left;C.style.left=b+t.renderer.gutterWidth-5+"px",k.el.className="error_widget_wrapper",M.className="error_widget "+m.className,m.displayText.forEach(function(Ce,X){M.appendChild(A.createTextNode(Ce)),X<m.displayText.length-1&&M.appendChild(A.createElement("br"))}),M.appendChild(A.createElement("div"));var he=function(Ce,X,V){if(X===0&&(V==="esc"||V==="return"))return k.destroy(),{command:"null"}};k.destroy=function(){t.$mouseHandler.isMousePressed||(t.keyBinding.removeKeyboardHandler(he),r.widgetManager.removeLineWidget(k),t.off("changeSelection",k.destroy),t.off("changeSession",k.destroy),t.off("mouseup",k.destroy),t.off("change",k.destroy))},t.keyBinding.addKeyboardHandler(he),t.on("changeSelection",k.destroy),t.on("changeSession",k.destroy),t.on("mouseup",k.destroy),t.on("change",k.destroy),t.session.widgetManager.addLineWidget(k),k.el.onmousedown=t.focus.bind(t),t.renderer.scrollCursorIntoView(null,.5,{bottom:k.el.offsetHeight})},A.importCssString(`
956
+ .error_widget_wrapper {
957
+ background: inherit;
958
+ color: inherit;
959
+ border:none
960
+ }
961
+ .error_widget {
962
+ border-top: solid 2px;
963
+ border-bottom: solid 2px;
964
+ margin: 5px 0;
965
+ padding: 10px 40px;
966
+ white-space: pre-wrap;
967
+ }
968
+ .error_widget.ace_error, .error_widget_arrow.ace_error{
969
+ border-color: #ff5a5a
970
+ }
971
+ .error_widget.ace_warning, .error_widget_arrow.ace_warning{
972
+ border-color: #F1D817
973
+ }
974
+ .error_widget.ace_info, .error_widget_arrow.ace_info{
975
+ border-color: #5a5a5a
976
+ }
977
+ .error_widget.ace_ok, .error_widget_arrow.ace_ok{
978
+ border-color: #5aaa5a
979
+ }
980
+ .error_widget_arrow {
981
+ position: absolute;
982
+ border: solid 5px;
983
+ border-top-color: transparent!important;
984
+ border-right-color: transparent!important;
985
+ border-left-color: transparent!important;
986
+ top: -5px;
987
+ }
988
+ `,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(f,g,ue){f("./loader_build")(g);var A=f("./lib/dom"),S=f("./range").Range,x=f("./editor").Editor,c=f("./edit_session").EditSession,p=f("./undomanager").UndoManager,t=f("./virtual_renderer").VirtualRenderer;f("./worker/worker_client"),f("./keyboard/hash_handler"),f("./placeholder"),f("./multi_select"),f("./mode/folding/fold_mode"),f("./theme/textmate"),f("./ext/error_marker"),g.config=f("./config"),g.edit=function(r,n){if(typeof r=="string"){var e=r;if(r=document.getElementById(e),!r)throw new Error("ace.edit can't find div #"+e)}if(r&&r.env&&r.env.editor instanceof x)return r.env.editor;var i="";if(r&&/input|textarea/i.test(r.tagName)){var a=r;i=a.value,r=A.createElement("pre"),a.parentNode.replaceChild(r,a)}else r&&(i=r.textContent,r.innerHTML="");var m=g.createEditSession(i),v=new x(new t(r),m,n),k={document:m,editor:v,onResize:v.resize.bind(v,null)};return a&&(k.textarea=a),v.on("destroy",function(){k.editor.container.env=null}),v.container.env=v.env=k,v},g.createEditSession=function(r,n){var e=new c(r,n);return e.setUndoManager(new p),e},g.Range=S,g.Editor=x,g.EditSession=c,g.UndoManager=p,g.VirtualRenderer=t;var o=g.config.version;g.version=o}),function(){ace.require(["ace/ace"],function(f){f&&(f.config.init(!0),f.define=ace.define);var g=function(){return this}();!g&&typeof window<"u"&&(g=window),!g&&typeof self<"u"&&(g=self),g.ace||(g.ace=f);for(var ue in f)f.hasOwnProperty(ue)&&(g.ace[ue]=f[ue]);g.ace.default=g.ace,h&&(h.exports=g.ace)})}()}(ace$1)),ace$1.exports}var aceExports=requireAce(),modeRuby={exports:{}},hasRequiredModeRuby;function requireModeRuby(){return hasRequiredModeRuby||(hasRequiredModeRuby=1,function(h,u){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(f,g,ue){var A=f("../lib/oop"),S=f("./text_highlight_rules").TextHighlightRules,x=g.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};g.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},g.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},g.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var c=g.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},p=g.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},t=g.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},o=g.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},r=g.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},n=g.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},e=g.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},i=g.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},a=function(){var m="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|private_class_method|remove_method|undef_method",v="alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|__ENCODING__|prepend",k="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",M="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",C=this.$keywords=this.createKeywordMapper({keyword:v,"constant.language":k,"variable.language":M,"support.function":m,"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(Ce,X,V){V.length&&(V=[]);var Xe=Ce[Ce.length-1];return V.unshift(Xe,X),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(Ce,X,V){V.length&&(V=[]);var Xe=Ce[Ce.length-1];return V.unshift(Xe,X),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(Ce,X,V){V.length&&(V=[]);var Xe=Ce[Ce.length-1];return V.unshift(Xe,X),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(Ce,X,V){V.length&&(V=[]);var Xe=Ce[Ce.length-1];return V.unshift(Xe,X),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(Ce,X,V){V.length&&(V=[]);var Xe=Ce[Ce.length-1];return V.unshift(Xe,X),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},i,{token:"variable.global",regex:"[$][a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]*"},{token:["punctuation.operator","support.function"],regex:/(\.)([a-zA-Z_\d]+)(?=\()/},{token:["punctuation.operator","identifier"],regex:/(\.)([a-zA-Z_][a-zA-Z_\d]*)/},{token:"string.character",regex:"\\B\\?(?:"+b+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},r,n,x,c,e,p,t,o,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:C,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(Ce,X,V){var Xe=Ce[2]=="-"||Ce[2]=="~"?"indentedHeredoc":"heredoc",U=Ce.split(this.splitRegex);return V.push(Xe,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(Ce,X,V){return Ce===V[1]?(V.shift(),V.shift(),this.next=V[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(Ce,X,V){return Ce===V[1]?(V.shift(),V.shift(),this.next=V[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(Ce,X){return X[0]==="heredoc"||X[0]==="indentedHeredoc"?X[0]:Ce}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(Ce,X,V){return this.next="",Ce=="}"&&V.length>1&&V[1]!="start"&&(V.shift(),this.next=V.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(Ce,X,V){return V.length&&Ce===V[0]?(V.unshift(Ce,X),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(Ce,X,V){return V.length&&Ce===he[V[0]]?(V.shift(),this.next=V.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(Ce,X,V){return V.length&&Ce===V[0]?(V.unshift(Ce,X),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(Ce,X,V){return V.length&&Ce===he[V[0]]?(V.shift(),this.next=V.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(Ce,X,V){return V.length&&Ce===V[0]?(V.unshift(Ce,X),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(Ce,X,V){return V.length&&Ce===he[V[0]]?(V.shift(),this.next=V.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(Ce,X,V){return V.length&&Ce===V[0]?(V.unshift(Ce,X),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(Ce,X,V){return V.length&&Ce===he[V[0]]?(V.shift(),this.next=V.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(Ce,X,V){return V.length&&Ce===V[0]?(V.unshift(Ce,X),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(Ce,X,V){return V.length&&Ce[0]===he[V[0]]?(V.shift(),this.next=V.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()};A.inherits(a,S),g.RubyHighlightRules=a}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(f,g,ue){var A=f("../range").Range,S=function(){};(function(){this.checkOutdent=function(x,c){return/^\s+$/.test(x)?/^\s*\}/.test(c):!1},this.autoOutdent=function(x,c){var p=x.getLine(c),t=p.match(/^(\s*\})/);if(!t)return 0;var o=t[1].length,r=x.findMatchingBracket({row:c,column:o});if(!r||r.row==c)return 0;var n=this.$getIndent(x.getLine(r.row));x.replace(new A(c,0,c,o-1),n)},this.$getIndent=function(x){return x.match(/^\s*/)[0]}}).call(S.prototype),g.MatchingBraceOutdent=S}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(f,g,ue){var A=f("../../lib/oop"),S=f("./fold_mode").FoldMode,x=f("../../range").Range,c=f("../../token_iterator").TokenIterator,p=g.FoldMode=function(){};A.inherits(p,S),(function(){this.indentKeywords={class:1,def:1,module:1,do:1,unless:1,if:1,while:1,for:1,until:1,begin:1,else:0,elsif:0,rescue:0,ensure:0,when:0,end:-1,case:1,"=begin":1,"=end":-1},this.foldingStartMarker=/(?:\s|^)(def|do|while|class|unless|module|if|for|until|begin|else|elsif|case|rescue|ensure|when)\b|({\s*$)|(=begin)/,this.foldingStopMarker=/(=end(?=$|\s.*$))|(^\s*})|\b(end)\b/,this.getFoldWidget=function(t,o,r){var n=t.getLine(r),e=this.foldingStartMarker.test(n),i=this.foldingStopMarker.test(n);if(e&&!i){var a=n.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(n)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(n)===!1)||a[1]=="when"&&/\sthen\s/.test(n)===!0)return;if(t.getTokenAt(r,a.index+2).type==="keyword")return"start"}else if(!a[3]||t.getTokenAt(r,a.index+1).type==="comment.multiline")return"start"}if(o!="markbeginend"||!i||e&&i)return"";var a=n.match(this.foldingStopMarker);if(a[3]==="end"){if(t.getTokenAt(r,a.index+1).type==="keyword")return"end"}else if(!a[1]||t.getTokenAt(r,a.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(t,o,r){var n=t.doc.getLine(r),e=this.foldingStartMarker.exec(n);if(e)return e[1]||e[3]?this.rubyBlock(t,r,e.index+2):this.openingBracketBlock(t,"{",r,e.index);var e=this.foldingStopMarker.exec(n);if(e)return e[3]==="end"&&t.getTokenAt(r,e.index+1).type==="keyword"?this.rubyBlock(t,r,e.index+1):e[1]==="=end"&&t.getTokenAt(r,e.index+1).type==="comment.multiline"?this.rubyBlock(t,r,e.index+1):this.closingBracketBlock(t,"}",r,e.index+e[0].length)},this.rubyBlock=function(t,U,r,n){var e=new c(t,U,r),i=e.getCurrentToken();if(!(!i||i.type!="keyword"&&i.type!="comment.multiline")){var a=i.value,m=t.getLine(U);switch(i.value){case"if":case"unless":case"while":case"until":var v=new RegExp("^\\s*"+i.value);if(!v.test(m))return;var k=this.indentKeywords[a];break;case"when":if(/\sthen\s/.test(m))return;case"elsif":case"rescue":case"ensure":var k=1;break;case"else":var v=new RegExp("^\\s*"+i.value+"\\s*$");if(!v.test(m))return;var k=1;break;default:var k=this.indentKeywords[a]}var M=[a];if(k){var C=k===-1?t.getLine(U-1).length:t.getLine(U).length,b=U,he=[];if(he.push(e.getCurrentTokenRange()),e.step=k===-1?e.stepBackward:e.stepForward,i.type=="comment.multiline"){for(;i=e.step();)if(i.type==="comment.multiline"){if(k==1){if(C=6,i.value=="=end")break}else if(i.value=="=begin")break}}else for(;i=e.step();){var Ce=!1;if(i.type==="keyword"){var X=k*this.indentKeywords[i.value];switch(m=t.getLine(e.getCurrentTokenRow()),i.value){case"do":for(var V=e.$tokenIndex-1;V>=0;V--){var Xe=e.$rowTokens[V];if(Xe&&(Xe.value=="while"||Xe.value=="until"||Xe.value=="for")){X=0;break}}break;case"else":var v=new RegExp("^\\s*"+i.value+"\\s*$");(!v.test(m)||a=="case")&&(X=0,Ce=!0);break;case"if":case"unless":case"while":case"until":var v=new RegExp("^\\s*"+i.value);v.test(m)||(X=0,Ce=!0);break;case"when":(/\sthen\s/.test(m)||a=="case")&&(X=0,Ce=!0)}if(X>0)M.unshift(i.value);else if(X<=0&&Ce===!1){if(M.shift(),!M.length&&((a=="while"||a=="until"||a=="for")&&i.value!="do"||i.value=="do"&&k==-1&&X!=0||i.value!="do"))break;X===0&&M.unshift(i.value)}}}if(!i)return null;if(n)return he.push(e.getCurrentTokenRange()),he;var U=e.getCurrentTokenRow();if(k===-1){if(i.type==="comment.multiline")var O=6;else var O=t.getLine(U).length;return new x(U,O,b-1,C)}return new x(b,C,U-1,t.getLine(U-1).length)}}}}).call(p.prototype)}),ace.define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/ruby"],function(f,g,ue){var A=f("../lib/oop"),S=f("./text").Mode,x=f("./ruby_highlight_rules").RubyHighlightRules,c=f("./matching_brace_outdent").MatchingBraceOutdent,p=f("../range").Range,t=f("./folding/ruby").FoldMode,o=function(){this.HighlightRules=x,this.$outdent=new c,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new t,this.indentKeywords=this.foldingRules.indentKeywords};A.inherits(o,S),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(r,n,e){var i=this.$getIndent(n),a=this.getTokenizer().getLineTokens(n,r),m=a.tokens;if(m.length&&m[m.length-1].type=="comment")return i;if(r=="start"){var v=n.match(/^.*[\{\(\[]\s*$/),k=n.match(/^\s*(class|def|module)\s.*$/),M=n.match(/.*do(\s*|\s+\|.*\|\s*)$/),C=n.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(v||k||M||C)&&(i+=e)}return i},this.checkOutdent=function(r,n,e){return/^\s+(end|else|rescue|ensure)$/.test(n+e)||this.$outdent.checkOutdent(n,e)},this.autoOutdent=function(r,n,e){var i=n.getLine(e);if(/}/.test(i))return this.$outdent.autoOutdent(n,e);var a=this.$getIndent(i),m=n.getLine(e-1),v=this.$getIndent(m),k=n.getTabString();v.length<=a.length&&a.slice(-k.length)==k&&n.remove(new p(e,a.length-k.length,e,a.length))},this.getMatching=function(r,n,e){if(n==null){var i=r.selection.lead;e=i.column,n=i.row}var a=r.getTokenAt(n,e);if(a&&a.value in this.indentKeywords)return this.foldingRules.rubyBlock(r,n,e,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(o.prototype),g.Mode=o}),function(){ace.require(["ace/mode/ruby"],function(f){h&&(h.exports=f)})}()}(modeRuby)),modeRuby.exports}requireModeRuby();var themeTwilight={exports:{}},hasRequiredThemeTwilight;function requireThemeTwilight(){return hasRequiredThemeTwilight||(hasRequiredThemeTwilight=1,function(h,u){ace.define("ace/theme/twilight-css",["require","exports","module"],function(f,g,ue){ue.exports=`.ace-twilight .ace_gutter {
989
+ background: #232323;
990
+ color: #E2E2E2
991
+ }
992
+
993
+ .ace-twilight .ace_print-margin {
994
+ width: 1px;
995
+ background: #232323
996
+ }
997
+
998
+ .ace-twilight {
999
+ background-color: #141414;
1000
+ color: #F8F8F8
1001
+ }
1002
+
1003
+ .ace-twilight .ace_cursor {
1004
+ color: #A7A7A7
1005
+ }
1006
+
1007
+ .ace-twilight .ace_marker-layer .ace_selection {
1008
+ background: rgba(221, 240, 255, 0.20)
1009
+ }
1010
+
1011
+ .ace-twilight.ace_multiselect .ace_selection.ace_start {
1012
+ box-shadow: 0 0 3px 0px #141414;
1013
+ }
1014
+
1015
+ .ace-twilight .ace_marker-layer .ace_step {
1016
+ background: rgb(102, 82, 0)
1017
+ }
1018
+
1019
+ .ace-twilight .ace_marker-layer .ace_bracket {
1020
+ margin: -1px 0 0 -1px;
1021
+ border: 1px solid rgba(255, 255, 255, 0.25)
1022
+ }
1023
+
1024
+ .ace-twilight .ace_marker-layer .ace_active-line {
1025
+ background: rgba(255, 255, 255, 0.031)
1026
+ }
1027
+
1028
+ .ace-twilight .ace_gutter-active-line {
1029
+ background-color: rgba(255, 255, 255, 0.031)
1030
+ }
1031
+
1032
+ .ace-twilight .ace_marker-layer .ace_selected-word {
1033
+ border: 1px solid rgba(221, 240, 255, 0.20)
1034
+ }
1035
+
1036
+ .ace-twilight .ace_invisible {
1037
+ color: rgba(255, 255, 255, 0.25)
1038
+ }
1039
+
1040
+ .ace-twilight .ace_keyword,
1041
+ .ace-twilight .ace_meta {
1042
+ color: #CDA869
1043
+ }
1044
+
1045
+ .ace-twilight .ace_constant,
1046
+ .ace-twilight .ace_constant.ace_character,
1047
+ .ace-twilight .ace_constant.ace_character.ace_escape,
1048
+ .ace-twilight .ace_constant.ace_other,
1049
+ .ace-twilight .ace_heading,
1050
+ .ace-twilight .ace_markup.ace_heading,
1051
+ .ace-twilight .ace_support.ace_constant {
1052
+ color: #CF6A4C
1053
+ }
1054
+
1055
+ .ace-twilight .ace_invalid.ace_illegal {
1056
+ color: #F8F8F8;
1057
+ background-color: rgba(86, 45, 86, 0.75)
1058
+ }
1059
+
1060
+ .ace-twilight .ace_invalid.ace_deprecated {
1061
+ text-decoration: underline;
1062
+ font-style: italic;
1063
+ color: #D2A8A1
1064
+ }
1065
+
1066
+ .ace-twilight .ace_support {
1067
+ color: #9B859D
1068
+ }
1069
+
1070
+ .ace-twilight .ace_fold {
1071
+ background-color: #AC885B;
1072
+ border-color: #F8F8F8
1073
+ }
1074
+
1075
+ .ace-twilight .ace_support.ace_function {
1076
+ color: #DAD085
1077
+ }
1078
+
1079
+ .ace-twilight .ace_list,
1080
+ .ace-twilight .ace_markup.ace_list,
1081
+ .ace-twilight .ace_storage {
1082
+ color: #F9EE98
1083
+ }
1084
+
1085
+ .ace-twilight .ace_entity.ace_name.ace_function,
1086
+ .ace-twilight .ace_meta.ace_tag {
1087
+ color: #AC885B
1088
+ }
1089
+
1090
+ .ace-twilight .ace_string {
1091
+ color: #8F9D6A
1092
+ }
1093
+
1094
+ .ace-twilight .ace_string.ace_regexp {
1095
+ color: #E9C062
1096
+ }
1097
+
1098
+ .ace-twilight .ace_comment {
1099
+ font-style: italic;
1100
+ color: #5F5A60
1101
+ }
1102
+
1103
+ .ace-twilight .ace_variable {
1104
+ color: #7587A6
1105
+ }
1106
+
1107
+ .ace-twilight .ace_xml-pe {
1108
+ color: #494949
1109
+ }
1110
+
1111
+ .ace-twilight .ace_indent-guide {
1112
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y
1113
+ }
1114
+
1115
+ .ace-twilight .ace_indent-guide-active {
1116
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
1117
+ }
1118
+ `}),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],function(f,g,ue){g.isDark=!0,g.cssClass="ace-twilight",g.cssText=f("./twilight-css");var A=f("../lib/dom");A.importCssString(g.cssText,g.cssClass,!1)}),function(){ace.require(["ace/theme/twilight"],function(f){h&&(h.exports=f)})}()}(themeTwilight)),themeTwilight.exports}requireThemeTwilight();var rn=Object.defineProperty,on=(h,u,f)=>u in h?rn(h,u,{enumerable:!0,configurable:!0,writable:!0,value:f}):h[u]=f,$=(h,u,f)=>on(h,typeof u!="symbol"?u+"":u,f);function St(h,u){return function(){return h.apply(u,arguments)}}const{toString:cn}=Object.prototype,{getPrototypeOf:qe}=Object,{iterator:we,toStringTag:xt}=Symbol,Ee=(h=>u=>{const f=cn.call(u);return h[f]||(h[f]=f.slice(8,-1).toLowerCase())})(Object.create(null)),D=h=>(h=h.toLowerCase(),u=>Ee(u)===h),Se=h=>u=>typeof u===h,{isArray:ee}=Array,Y=Se("undefined");function ie(h){return h!==null&&!Y(h)&&h.constructor!==null&&!Y(h.constructor)&&I(h.constructor.isBuffer)&&h.constructor.isBuffer(h)}const At=D("ArrayBuffer");function an(h){let u;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?u=ArrayBuffer.isView(h):u=h&&h.buffer&&At(h.buffer),u}const ln=Se("string"),I=Se("function"),Rt=Se("number"),oe=h=>h!==null&&typeof h=="object",un=h=>h===!0||h===!1,ge=h=>{if(Ee(h)!=="object")return!1;const u=qe(h);return(u===null||u===Object.prototype||Object.getPrototypeOf(u)===null)&&!(xt in h)&&!(we in h)},hn=h=>{if(!oe(h)||ie(h))return!1;try{return Object.keys(h).length===0&&Object.getPrototypeOf(h)===Object.prototype}catch{return!1}},dn=D("Date"),fn=D("File"),pn=D("Blob"),mn=D("FileList"),gn=h=>oe(h)&&I(h.pipe),bn=h=>{let u;return h&&(typeof FormData=="function"&&h instanceof FormData||I(h.append)&&((u=Ee(h))==="formdata"||u==="object"&&I(h.toString)&&h.toString()==="[object FormData]"))},yn=D("URLSearchParams"),[_n,wn,En,Sn]=["ReadableStream","Request","Response","Headers"].map(D),xn=h=>h.trim?h.trim():h.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ce(h,u,{allOwnKeys:f=!1}={}){if(h===null||typeof h>"u")return;let g,ue;if(typeof h!="object"&&(h=[h]),ee(h))for(g=0,ue=h.length;g<ue;g++)u.call(null,h[g],g,h);else{if(ie(h))return;const A=f?Object.getOwnPropertyNames(h):Object.keys(h),S=A.length;let x;for(g=0;g<S;g++)x=A[g],u.call(null,h[x],x,h)}}function Ot(h,u){if(ie(h))return null;u=u.toLowerCase();const f=Object.keys(h);let g=f.length,ue;for(;g-- >0;)if(ue=f[g],u===ue.toLowerCase())return ue;return null}const J=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ct=h=>!Y(h)&&h!==J;function Ie(){const{caseless:h,skipUndefined:u}=Ct(this)&&this||{},f={},g=(ue,A)=>{const S=h&&Ot(f,A)||A;ge(f[S])&&ge(ue)?f[S]=Ie(f[S],ue):ge(ue)?f[S]=Ie({},ue):ee(ue)?f[S]=ue.slice():(!u||!Y(ue))&&(f[S]=ue)};for(let ue=0,A=arguments.length;ue<A;ue++)arguments[ue]&&ce(arguments[ue],g);return f}const An=(h,u,f,{allOwnKeys:g}={})=>(ce(u,(ue,A)=>{f&&I(ue)?h[A]=St(ue,f):h[A]=ue},{allOwnKeys:g}),h),Rn=h=>(h.charCodeAt(0)===65279&&(h=h.slice(1)),h),On=(h,u,f,g)=>{h.prototype=Object.create(u.prototype,g),h.prototype.constructor=h,Object.defineProperty(h,"super",{value:u.prototype}),f&&Object.assign(h.prototype,f)},Cn=(h,u,f,g)=>{let ue,A,S;const x={};if(u=u||{},h==null)return u;do{for(ue=Object.getOwnPropertyNames(h),A=ue.length;A-- >0;)S=ue[A],(!g||g(S,h,u))&&!x[S]&&(u[S]=h[S],x[S]=!0);h=f!==!1&&qe(h)}while(h&&(!f||f(h,u))&&h!==Object.prototype);return u},Tn=(h,u,f)=>{h=String(h),(f===void 0||f>h.length)&&(f=h.length),f-=u.length;const g=h.indexOf(u,f);return g!==-1&&g===f},kn=h=>{if(!h)return null;if(ee(h))return h;let u=h.length;if(!Rt(u))return null;const f=new Array(u);for(;u-- >0;)f[u]=h[u];return f},Nn=(h=>u=>h&&u instanceof h)(typeof Uint8Array<"u"&&qe(Uint8Array)),Pn=(h,u)=>{const f=(h&&h[we]).call(h);let g;for(;(g=f.next())&&!g.done;){const ue=g.value;u.call(h,ue[0],ue[1])}},In=(h,u)=>{let f;const g=[];for(;(f=h.exec(u))!==null;)g.push(f);return g},Ln=D("HTMLFormElement"),jn=h=>h.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(u,f,g){return f.toUpperCase()+g}),Ge=(({hasOwnProperty:h})=>(u,f)=>h.call(u,f))(Object.prototype),Fn=D("RegExp"),Tt=(h,u)=>{const f=Object.getOwnPropertyDescriptors(h),g={};ce(f,(ue,A)=>{let S;(S=u(ue,A,h))!==!1&&(g[A]=S||ue)}),Object.defineProperties(h,g)},vn=h=>{Tt(h,(u,f)=>{if(I(h)&&["arguments","caller","callee"].indexOf(f)!==-1)return!1;const g=h[f];if(I(g)){if(u.enumerable=!1,"writable"in u){u.writable=!1;return}u.set||(u.set=()=>{throw Error("Can not rewrite read-only method '"+f+"'")})}})},$n=(h,u)=>{const f={},g=ue=>{ue.forEach(A=>{f[A]=!0})};return ee(h)?g(h):g(String(h).split(u)),f},Un=()=>{},Dn=(h,u)=>h!=null&&Number.isFinite(h=+h)?h:u;function qn(h){return!!(h&&I(h.append)&&h[xt]==="FormData"&&h[we])}const Bn=h=>{const u=new Array(10),f=(g,ue)=>{if(oe(g)){if(u.indexOf(g)>=0)return;if(ie(g))return g;if(!("toJSON"in g)){u[ue]=g;const A=ee(g)?[]:{};return ce(g,(S,x)=>{const c=f(S,ue+1);!Y(c)&&(A[x]=c)}),u[ue]=void 0,A}}return g};return f(h,0)},Mn=D("AsyncFunction"),Hn=h=>h&&(oe(h)||I(h))&&I(h.then)&&I(h.catch),kt=((h,u)=>h?setImmediate:u?((f,g)=>(J.addEventListener("message",({source:ue,data:A})=>{ue===J&&A===f&&g.length&&g.shift()()},!1),ue=>{g.push(ue),J.postMessage(f,"*")}))(`axios@${Math.random()}`,[]):f=>setTimeout(f))(typeof setImmediate=="function",I(J.postMessage)),zn=typeof queueMicrotask<"u"?queueMicrotask.bind(J):typeof process<"u"&&process.nextTick||kt,Vn=h=>h!=null&&I(h[we]),l={isArray:ee,isArrayBuffer:At,isBuffer:ie,isFormData:bn,isArrayBufferView:an,isString:ln,isNumber:Rt,isBoolean:un,isObject:oe,isPlainObject:ge,isEmptyObject:hn,isReadableStream:_n,isRequest:wn,isResponse:En,isHeaders:Sn,isUndefined:Y,isDate:dn,isFile:fn,isBlob:pn,isRegExp:Fn,isFunction:I,isStream:gn,isURLSearchParams:yn,isTypedArray:Nn,isFileList:mn,forEach:ce,merge:Ie,extend:An,trim:xn,stripBOM:Rn,inherits:On,toFlatObject:Cn,kindOf:Ee,kindOfTest:D,endsWith:Tn,toArray:kn,forEachEntry:Pn,matchAll:In,isHTMLForm:Ln,hasOwnProperty:Ge,hasOwnProp:Ge,reduceDescriptors:Tt,freezeMethods:vn,toObjectSet:$n,toCamelCase:jn,noop:Un,toFiniteNumber:Dn,findKey:Ot,global:J,isContextDefined:Ct,isSpecCompliantForm:qn,toJSONObject:Bn,isAsyncFn:Mn,isThenable:Hn,setImmediate:kt,asap:zn,isIterable:Vn};function _(h,u,f,g,ue){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=h,this.name="AxiosError",u&&(this.code=u),f&&(this.config=f),g&&(this.request=g),ue&&(this.response=ue,this.status=ue.status?ue.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 Nt=_.prototype,Pt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(h=>{Pt[h]={value:h}}),Object.defineProperties(_,Pt),Object.defineProperty(Nt,"isAxiosError",{value:!0}),_.from=(h,u,f,g,ue,A)=>{const S=Object.create(Nt);l.toFlatObject(h,S,function(p){return p!==Error.prototype},p=>p!=="isAxiosError");const x=h&&h.message?h.message:"Error",c=u==null&&h?h.code:u;return _.call(S,x,c,f,g,ue),h&&S.cause==null&&Object.defineProperty(S,"cause",{value:h,configurable:!0}),S.name=h&&h.name||"Error",A&&Object.assign(S,A),S};const Jn=null;function Le(h){return l.isPlainObject(h)||l.isArray(h)}function It(h){return l.endsWith(h,"[]")?h.slice(0,-2):h}function Qe(h,u,f){return h?h.concat(u).map(function(g,ue){return g=It(g),!f&&ue?"["+g+"]":g}).join(f?".":""):u}function Wn(h){return l.isArray(h)&&!h.some(Le)}const Kn=l.toFlatObject(l,{},null,function(h){return/^is[A-Z]/.test(h)});function xe(h,u,f){if(!l.isObject(h))throw new TypeError("target must be an object");u=u||new FormData,f=l.toFlatObject(f,{metaTokens:!0,dots:!1,indexes:!1},!1,function(n,e){return!l.isUndefined(e[n])});const g=f.metaTokens,ue=f.visitor||p,A=f.dots,S=f.indexes,x=(f.Blob||typeof Blob<"u"&&Blob)&&l.isSpecCompliantForm(u);if(!l.isFunction(ue))throw new TypeError("visitor must be a function");function c(n){if(n===null)return"";if(l.isDate(n))return n.toISOString();if(l.isBoolean(n))return n.toString();if(!x&&l.isBlob(n))throw new _("Blob is not supported. Use a Buffer instead.");return l.isArrayBuffer(n)||l.isTypedArray(n)?x&&typeof Blob=="function"?new Blob([n]):Buffer.from(n):n}function p(n,e,i){let a=n;if(n&&!i&&typeof n=="object"){if(l.endsWith(e,"{}"))e=g?e:e.slice(0,-2),n=JSON.stringify(n);else if(l.isArray(n)&&Wn(n)||(l.isFileList(n)||l.endsWith(e,"[]"))&&(a=l.toArray(n)))return e=It(e),a.forEach(function(m,v){!(l.isUndefined(m)||m===null)&&u.append(S===!0?Qe([e],v,A):S===null?e:e+"[]",c(m))}),!1}return Le(n)?!0:(u.append(Qe(i,e,A),c(n)),!1)}const t=[],o=Object.assign(Kn,{defaultVisitor:p,convertValue:c,isVisitable:Le});function r(n,e){if(!l.isUndefined(n)){if(t.indexOf(n)!==-1)throw Error("Circular reference detected in "+e.join("."));t.push(n),l.forEach(n,function(i,a){(!(l.isUndefined(i)||i===null)&&ue.call(u,i,l.isString(a)?a.trim():a,e,o))===!0&&r(i,e?e.concat(a):[a])}),t.pop()}}if(!l.isObject(h))throw new TypeError("data must be an object");return r(h),u}function Ze(h){const u={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(h).replace(/[!'()~]|%20|%00/g,function(f){return u[f]})}function Be(h,u){this._pairs=[],h&&xe(h,this,u)}const Lt=Be.prototype;Lt.append=function(h,u){this._pairs.push([h,u])},Lt.toString=function(h){const u=h?function(f){return h.call(this,f,Ze)}:Ze;return this._pairs.map(function(f){return u(f[0])+"="+u(f[1])},"").join("&")};function Xn(h){return encodeURIComponent(h).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function jt(h,u,f){if(!u)return h;const g=f&&f.encode||Xn;l.isFunction(f)&&(f={serialize:f});const ue=f&&f.serialize;let A;if(ue?A=ue(u,f):A=l.isURLSearchParams(u)?u.toString():new Be(u,f).toString(g),A){const S=h.indexOf("#");S!==-1&&(h=h.slice(0,S)),h+=(h.indexOf("?")===-1?"?":"&")+A}return h}class Ye{constructor(){this.handlers=[]}use(u,f,g){return this.handlers.push({fulfilled:u,rejected:f,synchronous:g?g.synchronous:!1,runWhen:g?g.runWhen:null}),this.handlers.length-1}eject(u){this.handlers[u]&&(this.handlers[u]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(u){l.forEach(this.handlers,function(f){f!==null&&u(f)})}}const Ft={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Gn=typeof URLSearchParams<"u"?URLSearchParams:Be,Qn=typeof FormData<"u"?FormData:null,Zn=typeof Blob<"u"?Blob:null,Yn={isBrowser:!0,classes:{URLSearchParams:Gn,FormData:Qn,Blob:Zn},protocols:["http","https","file","blob","url","data"]},Me=typeof window<"u"&&typeof document<"u",je=typeof navigator=="object"&&navigator||void 0,es=Me&&(!je||["ReactNative","NativeScript","NS"].indexOf(je.product)<0),ts=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ns=Me&&window.location.href||"http://localhost",ss=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Me,hasStandardBrowserEnv:es,hasStandardBrowserWebWorkerEnv:ts,navigator:je,origin:ns},Symbol.toStringTag,{value:"Module"})),N={...ss,...Yn};function rs(h,u){return xe(h,new N.classes.URLSearchParams,{visitor:function(f,g,ue,A){return N.isNode&&l.isBuffer(f)?(this.append(g,f.toString("base64")),!1):A.defaultVisitor.apply(this,arguments)},...u})}function is(h){return l.matchAll(/\w+|\[(\w*)]/g,h).map(u=>u[0]==="[]"?"":u[1]||u[0])}function os(h){const u={},f=Object.keys(h);let g;const ue=f.length;let A;for(g=0;g<ue;g++)A=f[g],u[A]=h[A];return u}function vt(h){function u(f,g,ue,A){let S=f[A++];if(S==="__proto__")return!0;const x=Number.isFinite(+S),c=A>=f.length;return S=!S&&l.isArray(ue)?ue.length:S,c?(l.hasOwnProp(ue,S)?ue[S]=[ue[S],g]:ue[S]=g,!x):((!ue[S]||!l.isObject(ue[S]))&&(ue[S]=[]),u(f,g,ue[S],A)&&l.isArray(ue[S])&&(ue[S]=os(ue[S])),!x)}if(l.isFormData(h)&&l.isFunction(h.entries)){const f={};return l.forEachEntry(h,(g,ue)=>{u(is(g),ue,f,0)}),f}return null}function cs(h,u,f){if(l.isString(h))try{return(u||JSON.parse)(h),l.trim(h)}catch(g){if(g.name!=="SyntaxError")throw g}return(f||JSON.stringify)(h)}const ae={transitional:Ft,adapter:["xhr","http","fetch"],transformRequest:[function(h,u){const f=u.getContentType()||"",g=f.indexOf("application/json")>-1,ue=l.isObject(h);if(ue&&l.isHTMLForm(h)&&(h=new FormData(h)),l.isFormData(h))return g?JSON.stringify(vt(h)):h;if(l.isArrayBuffer(h)||l.isBuffer(h)||l.isStream(h)||l.isFile(h)||l.isBlob(h)||l.isReadableStream(h))return h;if(l.isArrayBufferView(h))return h.buffer;if(l.isURLSearchParams(h))return u.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),h.toString();let A;if(ue){if(f.indexOf("application/x-www-form-urlencoded")>-1)return rs(h,this.formSerializer).toString();if((A=l.isFileList(h))||f.indexOf("multipart/form-data")>-1){const S=this.env&&this.env.FormData;return xe(A?{"files[]":h}:h,S&&new S,this.formSerializer)}}return ue||g?(u.setContentType("application/json",!1),cs(h)):h}],transformResponse:[function(h){const u=this.transitional||ae.transitional,f=u&&u.forcedJSONParsing,g=this.responseType==="json";if(l.isResponse(h)||l.isReadableStream(h))return h;if(h&&l.isString(h)&&(f&&!this.responseType||g)){const ue=!(u&&u.silentJSONParsing)&&g;try{return JSON.parse(h,this.parseReviver)}catch(A){if(ue)throw A.name==="SyntaxError"?_.from(A,_.ERR_BAD_RESPONSE,this,null,this.response):A}}return h}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:N.classes.FormData,Blob:N.classes.Blob},validateStatus:function(h){return h>=200&&h<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};l.forEach(["delete","get","head","post","put","patch"],h=>{ae.headers[h]={}});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=h=>{const u={};let f,g,ue;return h&&h.split(`
1119
+ `).forEach(function(A){ue=A.indexOf(":"),f=A.substring(0,ue).trim().toLowerCase(),g=A.substring(ue+1).trim(),!(!f||u[f]&&as[f])&&(f==="set-cookie"?u[f]?u[f].push(g):u[f]=[g]:u[f]=u[f]?u[f]+", "+g:g)}),u},et=Symbol("internals");function ne(h){return h&&String(h).trim().toLowerCase()}function be(h){return h===!1||h==null?h:l.isArray(h)?h.map(be):String(h)}function us(h){const u=Object.create(null),f=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let g;for(;g=f.exec(h);)u[g[1]]=g[2];return u}const hs=h=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(h.trim());function Te(h,u,f,g,ue){if(l.isFunction(g))return g.call(this,u,f);if(ue&&(u=f),!!l.isString(u)){if(l.isString(g))return u.indexOf(g)!==-1;if(l.isRegExp(g))return g.test(u)}}function ds(h){return h.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(u,f,g)=>f.toUpperCase()+g)}function fs(h,u){const f=l.toCamelCase(" "+u);["get","set","has"].forEach(g=>{Object.defineProperty(h,g+f,{value:function(ue,A,S){return this[g].call(this,u,ue,A,S)},configurable:!0})})}let L=class{constructor(h){h&&this.set(h)}set(h,u,f){const g=this;function ue(S,x,c){const p=ne(x);if(!p)throw new Error("header name must be a non-empty string");const t=l.findKey(g,p);(!t||g[t]===void 0||c===!0||c===void 0&&g[t]!==!1)&&(g[t||x]=be(S))}const A=(S,x)=>l.forEach(S,(c,p)=>ue(c,p,x));if(l.isPlainObject(h)||h instanceof this.constructor)A(h,u);else if(l.isString(h)&&(h=h.trim())&&!hs(h))A(ls(h),u);else if(l.isObject(h)&&l.isIterable(h)){let S={},x,c;for(const p of h){if(!l.isArray(p))throw TypeError("Object iterator must return a key-value pair");S[c=p[0]]=(x=S[c])?l.isArray(x)?[...x,p[1]]:[x,p[1]]:p[1]}A(S,u)}else h!=null&&ue(u,h,f);return this}get(h,u){if(h=ne(h),h){const f=l.findKey(this,h);if(f){const g=this[f];if(!u)return g;if(u===!0)return us(g);if(l.isFunction(u))return u.call(this,g,f);if(l.isRegExp(u))return u.exec(g);throw new TypeError("parser must be boolean|regexp|function")}}}has(h,u){if(h=ne(h),h){const f=l.findKey(this,h);return!!(f&&this[f]!==void 0&&(!u||Te(this,this[f],f,u)))}return!1}delete(h,u){const f=this;let g=!1;function ue(A){if(A=ne(A),A){const S=l.findKey(f,A);S&&(!u||Te(f,f[S],S,u))&&(delete f[S],g=!0)}}return l.isArray(h)?h.forEach(ue):ue(h),g}clear(h){const u=Object.keys(this);let f=u.length,g=!1;for(;f--;){const ue=u[f];(!h||Te(this,this[ue],ue,h,!0))&&(delete this[ue],g=!0)}return g}normalize(h){const u=this,f={};return l.forEach(this,(g,ue)=>{const A=l.findKey(f,ue);if(A){u[A]=be(g),delete u[ue];return}const S=h?ds(ue):String(ue).trim();S!==ue&&delete u[ue],u[S]=be(g),f[S]=!0}),this}concat(...h){return this.constructor.concat(this,...h)}toJSON(h){const u=Object.create(null);return l.forEach(this,(f,g)=>{f!=null&&f!==!1&&(u[g]=h&&l.isArray(f)?f.join(", "):f)}),u}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([h,u])=>h+": "+u).join(`
1120
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(h){return h instanceof this?h:new this(h)}static concat(h,...u){const f=new this(h);return u.forEach(g=>f.set(g)),f}static accessor(h){const u=(this[et]=this[et]={accessors:{}}).accessors,f=this.prototype;function g(ue){const A=ne(ue);u[A]||(fs(f,ue),u[A]=!0)}return l.isArray(h)?h.forEach(g):g(h),this}};L.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),l.reduceDescriptors(L.prototype,({value:h},u)=>{let f=u[0].toUpperCase()+u.slice(1);return{get:()=>h,set(g){this[f]=g}}}),l.freezeMethods(L);function ke(h,u){const f=this||ae,g=u||f,ue=L.from(g.headers);let A=g.data;return l.forEach(h,function(S){A=S.call(f,A,ue.normalize(),u?u.status:void 0)}),ue.normalize(),A}function $t(h){return!!(h&&h.__CANCEL__)}function te(h,u,f){_.call(this,h??"canceled",_.ERR_CANCELED,u,f),this.name="CanceledError"}l.inherits(te,_,{__CANCEL__:!0});function Ut(h,u,f){const g=f.config.validateStatus;!f.status||!g||g(f.status)?h(f):u(new _("Request failed with status code "+f.status,[_.ERR_BAD_REQUEST,_.ERR_BAD_RESPONSE][Math.floor(f.status/100)-4],f.config,f.request,f))}function ps(h){const u=/^([-+\w]{1,25})(:?\/\/|:)/.exec(h);return u&&u[1]||""}function ms(h,u){h=h||10;const f=new Array(h),g=new Array(h);let ue=0,A=0,S;return u=u!==void 0?u:1e3,function(x){const c=Date.now(),p=g[A];S||(S=c),f[ue]=x,g[ue]=c;let t=A,o=0;for(;t!==ue;)o+=f[t++],t=t%h;if(ue=(ue+1)%h,ue===A&&(A=(A+1)%h),c-S<u)return;const r=p&&c-p;return r?Math.round(o*1e3/r):void 0}}function gs(h,u){let f=0,g=1e3/u,ue,A;const S=(x,c=Date.now())=>{f=c,ue=null,A&&(clearTimeout(A),A=null),h(...x)};return[(...x)=>{const c=Date.now(),p=c-f;p>=g?S(x,c):(ue=x,A||(A=setTimeout(()=>{A=null,S(ue)},g-p)))},()=>ue&&S(ue)]}const _e=(h,u,f=3)=>{let g=0;const ue=ms(50,250);return gs(A=>{const S=A.loaded,x=A.lengthComputable?A.total:void 0,c=S-g,p=ue(c),t=S<=x;g=S;const o={loaded:S,total:x,progress:x?S/x:void 0,bytes:c,rate:p||void 0,estimated:p&&x&&t?(x-S)/p:void 0,event:A,lengthComputable:x!=null,[u?"download":"upload"]:!0};h(o)},f)},tt=(h,u)=>{const f=h!=null;return[g=>u[0]({lengthComputable:f,total:h,loaded:g}),u[1]]},nt=h=>(...u)=>l.asap(()=>h(...u)),bs=N.hasStandardBrowserEnv?((h,u)=>f=>(f=new URL(f,N.origin),h.protocol===f.protocol&&h.host===f.host&&(u||h.port===f.port)))(new URL(N.origin),N.navigator&&/(msie|trident)/i.test(N.navigator.userAgent)):()=>!0,ys=N.hasStandardBrowserEnv?{write(h,u,f,g,ue,A){const S=[h+"="+encodeURIComponent(u)];l.isNumber(f)&&S.push("expires="+new Date(f).toGMTString()),l.isString(g)&&S.push("path="+g),l.isString(ue)&&S.push("domain="+ue),A===!0&&S.push("secure"),document.cookie=S.join("; ")},read(h){const u=document.cookie.match(new RegExp("(^|;\\s*)("+h+")=([^;]*)"));return u?decodeURIComponent(u[3]):null},remove(h){this.write(h,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function _s(h){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(h)}function ws(h,u){return u?h.replace(/\/?\/$/,"")+"/"+u.replace(/^\/+/,""):h}function Dt(h,u,f){let g=!_s(u);return h&&(g||f==!1)?ws(h,u):u}const st=h=>h instanceof L?{...h}:h;function K(h,u){u=u||{};const f={};function g(p,t,o,r){return l.isPlainObject(p)&&l.isPlainObject(t)?l.merge.call({caseless:r},p,t):l.isPlainObject(t)?l.merge({},t):l.isArray(t)?t.slice():t}function ue(p,t,o,r){if(l.isUndefined(t)){if(!l.isUndefined(p))return g(void 0,p,o,r)}else return g(p,t,o,r)}function A(p,t){if(!l.isUndefined(t))return g(void 0,t)}function S(p,t){if(l.isUndefined(t)){if(!l.isUndefined(p))return g(void 0,p)}else return g(void 0,t)}function x(p,t,o){if(o in u)return g(p,t);if(o in h)return g(void 0,p)}const c={url:A,method:A,data:A,baseURL:S,transformRequest:S,transformResponse:S,paramsSerializer:S,timeout:S,timeoutMessage:S,withCredentials:S,withXSRFToken:S,adapter:S,responseType:S,xsrfCookieName:S,xsrfHeaderName:S,onUploadProgress:S,onDownloadProgress:S,decompress:S,maxContentLength:S,maxBodyLength:S,beforeRedirect:S,transport:S,httpAgent:S,httpsAgent:S,cancelToken:S,socketPath:S,responseEncoding:S,validateStatus:x,headers:(p,t,o)=>ue(st(p),st(t),o,!0)};return l.forEach(Object.keys({...h,...u}),function(p){const t=c[p]||ue,o=t(h[p],u[p],p);l.isUndefined(o)&&t!==x||(f[p]=o)}),f}const qt=h=>{const u=K({},h);let{data:f,withXSRFToken:g,xsrfHeaderName:ue,xsrfCookieName:A,headers:S,auth:x}=u;if(u.headers=S=L.from(S),u.url=jt(Dt(u.baseURL,u.url,u.allowAbsoluteUrls),h.params,h.paramsSerializer),x&&S.set("Authorization","Basic "+btoa((x.username||"")+":"+(x.password?unescape(encodeURIComponent(x.password)):""))),l.isFormData(f)){if(N.hasStandardBrowserEnv||N.hasStandardBrowserWebWorkerEnv)S.setContentType(void 0);else if(l.isFunction(f.getHeaders)){const c=f.getHeaders(),p=["content-type","content-length"];Object.entries(c).forEach(([t,o])=>{p.includes(t.toLowerCase())&&S.set(t,o)})}}if(N.hasStandardBrowserEnv&&(g&&l.isFunction(g)&&(g=g(u)),g||g!==!1&&bs(u.url))){const c=ue&&A&&ys.read(A);c&&S.set(ue,c)}return u},Es=typeof XMLHttpRequest<"u",Ss=Es&&function(h){return new Promise(function(u,f){const g=qt(h);let ue=g.data;const A=L.from(g.headers).normalize();let{responseType:S,onUploadProgress:x,onDownloadProgress:c}=g,p,t,o,r,n;function e(){r&&r(),n&&n(),g.cancelToken&&g.cancelToken.unsubscribe(p),g.signal&&g.signal.removeEventListener("abort",p)}let i=new XMLHttpRequest;i.open(g.method.toUpperCase(),g.url,!0),i.timeout=g.timeout;function a(){if(!i)return;const v=L.from("getAllResponseHeaders"in i&&i.getAllResponseHeaders()),k={data:!S||S==="text"||S==="json"?i.responseText:i.response,status:i.status,statusText:i.statusText,headers:v,config:h,request:i};Ut(function(M){u(M),e()},function(M){f(M),e()},k),i=null}"onloadend"in i?i.onloadend=a:i.onreadystatechange=function(){!i||i.readyState!==4||i.status===0&&!(i.responseURL&&i.responseURL.indexOf("file:")===0)||setTimeout(a)},i.onabort=function(){i&&(f(new _("Request aborted",_.ECONNABORTED,h,i)),i=null)},i.onerror=function(v){const k=v&&v.message?v.message:"Network Error",M=new _(k,_.ERR_NETWORK,h,i);M.event=v||null,f(M),i=null},i.ontimeout=function(){let v=g.timeout?"timeout of "+g.timeout+"ms exceeded":"timeout exceeded";const k=g.transitional||Ft;g.timeoutErrorMessage&&(v=g.timeoutErrorMessage),f(new _(v,k.clarifyTimeoutError?_.ETIMEDOUT:_.ECONNABORTED,h,i)),i=null},ue===void 0&&A.setContentType(null),"setRequestHeader"in i&&l.forEach(A.toJSON(),function(v,k){i.setRequestHeader(k,v)}),l.isUndefined(g.withCredentials)||(i.withCredentials=!!g.withCredentials),S&&S!=="json"&&(i.responseType=g.responseType),c&&([o,n]=_e(c,!0),i.addEventListener("progress",o)),x&&i.upload&&([t,r]=_e(x),i.upload.addEventListener("progress",t),i.upload.addEventListener("loadend",r)),(g.cancelToken||g.signal)&&(p=v=>{i&&(f(!v||v.type?new te(null,h,i):v),i.abort(),i=null)},g.cancelToken&&g.cancelToken.subscribe(p),g.signal&&(g.signal.aborted?p():g.signal.addEventListener("abort",p)));const m=ps(g.url);if(m&&N.protocols.indexOf(m)===-1){f(new _("Unsupported protocol "+m+":",_.ERR_BAD_REQUEST,h));return}i.send(ue||null)})},xs=(h,u)=>{const{length:f}=h=h?h.filter(Boolean):[];if(u||f){let g=new AbortController,ue;const A=function(p){if(!ue){ue=!0,x();const t=p instanceof Error?p:this.reason;g.abort(t instanceof _?t:new te(t instanceof Error?t.message:t))}};let S=u&&setTimeout(()=>{S=null,A(new _(`timeout ${u} of ms exceeded`,_.ETIMEDOUT))},u);const x=()=>{h&&(S&&clearTimeout(S),S=null,h.forEach(p=>{p.unsubscribe?p.unsubscribe(A):p.removeEventListener("abort",A)}),h=null)};h.forEach(p=>p.addEventListener("abort",A));const{signal:c}=g;return c.unsubscribe=()=>l.asap(x),c}},As=function*(h,u){let f=h.byteLength;if(f<u){yield h;return}let g=0,ue;for(;g<f;)ue=g+u,yield h.slice(g,ue),g=ue},Rs=async function*(h,u){for await(const f of Os(h))yield*As(f,u)},Os=async function*(h){if(h[Symbol.asyncIterator]){yield*h;return}const u=h.getReader();try{for(;;){const{done:f,value:g}=await u.read();if(f)break;yield g}}finally{await u.cancel()}},rt=(h,u,f,g)=>{const ue=Rs(h,u);let A=0,S,x=c=>{S||(S=!0,g&&g(c))};return new ReadableStream({async pull(c){try{const{done:p,value:t}=await ue.next();if(p){x(),c.close();return}let o=t.byteLength;if(f){let r=A+=o;f(r)}c.enqueue(new Uint8Array(t))}catch(p){throw x(p),p}},cancel(c){return x(c),ue.return()}},{highWaterMark:2})},it=64*1024,{isFunction:de}=l,Bt=(({fetch:h,Request:u,Response:f})=>({fetch:h,Request:u,Response:f}))(l.global),{ReadableStream:ot,TextEncoder:ct}=l.global,at=(h,...u)=>{try{return!!h(...u)}catch{return!1}},Cs=h=>{const{fetch:u,Request:f,Response:g}=Object.assign({},Bt,h),ue=de(u),A=de(f),S=de(g);if(!ue)return!1;const x=ue&&de(ot),c=ue&&(typeof ct=="function"?(e=>i=>e.encode(i))(new ct):async e=>new Uint8Array(await new f(e).arrayBuffer())),p=A&&x&&at(()=>{let e=!1;const i=new f(N.origin,{body:new ot,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!i}),t=S&&x&&at(()=>l.isReadableStream(new g("").body)),o={stream:t&&(e=>e.body)};ue&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!o[e]&&(o[e]=(i,a)=>{let m=i&&i[e];if(m)return m.call(i);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 f(N.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(l.isArrayBufferView(e)||l.isArrayBuffer(e))return e.byteLength;if(l.isURLSearchParams(e)&&(e=e+""),l.isString(e))return(await c(e)).byteLength},n=async(e,i)=>l.toFiniteNumber(e.getContentLength())??r(i);return async e=>{let{url:i,method:a,data:m,signal:v,cancelToken:k,timeout:M,onDownloadProgress:C,onUploadProgress:b,responseType:he,headers:Ce,withCredentials:X="same-origin",fetchOptions:V}=qt(e);he=he?(he+"").toLowerCase():"text";let Xe=xs([v,k&&k.toAbortSignal()],M),U=null;const O=Xe&&Xe.unsubscribe&&(()=>{Xe.unsubscribe()});let w;try{if(b&&p&&a!=="get"&&a!=="head"&&(w=await n(Ce,m))!==0){let pt=new f(i,{method:"POST",body:m,duplex:"half"}),gt;if(l.isFormData(m)&&(gt=pt.headers.get("content-type"))&&Ce.setContentType(gt),pt.body){const[Qt,mt]=tt(w,_e(nt(b)));m=rt(pt.body,it,Qt,mt)}}l.isString(X)||(X=X?"include":"omit");const y=A&&"credentials"in f.prototype,T={...V,signal:Xe,method:a.toUpperCase(),headers:Ce.normalize().toJSON(),body:m,duplex:"half",credentials:y?X:void 0};U=A&&new f(i,T);let Oe=await(A?u(U,V):u(i,T));const ze=t&&(he==="stream"||he==="response");if(t&&(C||ze&&O)){const pt={};["status","statusText","headers"].forEach(Vt=>{pt[Vt]=Oe[Vt]});const gt=l.toFiniteNumber(Oe.headers.get("content-length")),[Qt,mt]=C&&tt(gt,_e(nt(C),!0))||[];Oe=new g(rt(Oe.body,it,Qt,()=>{mt&&mt(),O&&O()}),pt)}he=he||"text";let ft=await o[l.findKey(o,he)||"text"](Oe,e);return!ze&&O&&O(),await new Promise((pt,gt)=>{Ut(pt,gt,{data:ft,headers:L.from(Oe.headers),status:Oe.status,statusText:Oe.statusText,config:e,request:U})})}catch(y){throw O&&O(),y&&y.name==="TypeError"&&/Load failed|fetch/i.test(y.message)?Object.assign(new _("Network Error",_.ERR_NETWORK,e,U),{cause:y.cause||y}):_.from(y,y&&y.code,e,U)}}},Ts=new Map,Mt=h=>{let u=l.merge.call({skipUndefined:!0},Bt,h?h.env:null);const{fetch:f,Request:g,Response:ue}=u,A=[g,ue,f];let S=A.length,x=S,c,p,t=Ts;for(;x--;)c=A[x],p=t.get(c),p===void 0&&t.set(c,p=x?new Map:Cs(u)),t=p;return p};Mt();const Fe={http:Jn,xhr:Ss,fetch:{get:Mt}};l.forEach(Fe,(h,u)=>{if(h){try{Object.defineProperty(h,"name",{value:u})}catch{}Object.defineProperty(h,"adapterName",{value:u})}});const lt=h=>`- ${h}`,ks=h=>l.isFunction(h)||h===null||h===!1,Ht={getAdapter:(h,u)=>{h=l.isArray(h)?h:[h];const{length:f}=h;let g,ue;const A={};for(let S=0;S<f;S++){g=h[S];let x;if(ue=g,!ks(g)&&(ue=Fe[(x=String(g)).toLowerCase()],ue===void 0))throw new _(`Unknown adapter '${x}'`);if(ue&&(l.isFunction(ue)||(ue=ue.get(u))))break;A[x||"#"+S]=ue}if(!ue){const S=Object.entries(A).map(([c,p])=>`adapter ${c} `+(p===!1?"is not supported by the environment":"is not available in the build"));let x=f?S.length>1?`since :
1121
+ `+S.map(lt).join(`
1122
+ `):" "+lt(S[0]):"as no adapter specified";throw new _("There is no suitable adapter to dispatch the request "+x,"ERR_NOT_SUPPORT")}return ue},adapters:Fe};function Ne(h){if(h.cancelToken&&h.cancelToken.throwIfRequested(),h.signal&&h.signal.aborted)throw new te(null,h)}function ut(h){return Ne(h),h.headers=L.from(h.headers),h.data=ke.call(h,h.transformRequest),["post","put","patch"].indexOf(h.method)!==-1&&h.headers.setContentType("application/x-www-form-urlencoded",!1),Ht.getAdapter(h.adapter||ae.adapter,h)(h).then(function(u){return Ne(h),u.data=ke.call(h,h.transformResponse,u),u.headers=L.from(u.headers),u},function(u){return $t(u)||(Ne(h),u&&u.response&&(u.response.data=ke.call(h,h.transformResponse,u.response),u.response.headers=L.from(u.response.headers))),Promise.reject(u)})}const zt="1.12.0",Ae={};["object","boolean","number","function","string","symbol"].forEach((h,u)=>{Ae[h]=function(f){return typeof f===h||"a"+(u<1?"n ":" ")+h}});const ht={};Ae.transitional=function(h,u,f){function g(ue,A){return"[Axios v"+zt+"] Transitional option '"+ue+"'"+A+(f?". "+f:"")}return(ue,A,S)=>{if(h===!1)throw new _(g(A," has been removed"+(u?" in "+u:"")),_.ERR_DEPRECATED);return u&&!ht[A]&&(ht[A]=!0,console.warn(g(A," has been deprecated since v"+u+" and will be removed in the near future"))),h?h(ue,A,S):!0}},Ae.spelling=function(h){return(u,f)=>(console.warn(`${f} is likely a misspelling of ${h}`),!0)};function Ns(h,u,f){if(typeof h!="object")throw new _("options must be an object",_.ERR_BAD_OPTION_VALUE);const g=Object.keys(h);let ue=g.length;for(;ue-- >0;){const A=g[ue],S=u[A];if(S){const x=h[A],c=x===void 0||S(x,A,h);if(c!==!0)throw new _("option "+A+" must be "+c,_.ERR_BAD_OPTION_VALUE);continue}if(f!==!0)throw new _("Unknown option "+A,_.ERR_BAD_OPTION)}}const ye={assertOptions:Ns,validators:Ae},B=ye.validators;let W=class{constructor(h){this.defaults=h||{},this.interceptors={request:new Ye,response:new Ye}}async request(h,u){try{return await this._request(h,u)}catch(f){if(f instanceof Error){let g={};Error.captureStackTrace?Error.captureStackTrace(g):g=new Error;const ue=g.stack?g.stack.replace(/^.+\n/,""):"";try{f.stack?ue&&!String(f.stack).endsWith(ue.replace(/^.+\n.+\n/,""))&&(f.stack+=`
1123
+ `+ue):f.stack=ue}catch{}}throw f}}_request(h,u){typeof h=="string"?(u=u||{},u.url=h):u=h||{},u=K(this.defaults,u);const{transitional:f,paramsSerializer:g,headers:ue}=u;f!==void 0&&ye.assertOptions(f,{silentJSONParsing:B.transitional(B.boolean),forcedJSONParsing:B.transitional(B.boolean),clarifyTimeoutError:B.transitional(B.boolean)},!1),g!=null&&(l.isFunction(g)?u.paramsSerializer={serialize:g}:ye.assertOptions(g,{encode:B.function,serialize:B.function},!0)),u.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?u.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:u.allowAbsoluteUrls=!0),ye.assertOptions(u,{baseUrl:B.spelling("baseURL"),withXsrfToken:B.spelling("withXSRFToken")},!0),u.method=(u.method||this.defaults.method||"get").toLowerCase();let A=ue&&l.merge(ue.common,ue[u.method]);ue&&l.forEach(["delete","get","head","post","put","patch","common"],n=>{delete ue[n]}),u.headers=L.concat(A,ue);const S=[];let x=!0;this.interceptors.request.forEach(function(n){typeof n.runWhen=="function"&&n.runWhen(u)===!1||(x=x&&n.synchronous,S.unshift(n.fulfilled,n.rejected))});const c=[];this.interceptors.response.forEach(function(n){c.push(n.fulfilled,n.rejected)});let p,t=0,o;if(!x){const n=[ut.bind(this),void 0];for(n.unshift(...S),n.push(...c),o=n.length,p=Promise.resolve(u);t<o;)p=p.then(n[t++],n[t++]);return p}o=S.length;let r=u;for(t=0;t<o;){const n=S[t++],e=S[t++];try{r=n(r)}catch(i){e.call(this,i);break}}try{p=ut.call(this,r)}catch(n){return Promise.reject(n)}for(t=0,o=c.length;t<o;)p=p.then(c[t++],c[t++]);return p}getUri(h){h=K(this.defaults,h);const u=Dt(h.baseURL,h.url,h.allowAbsoluteUrls);return jt(u,h.params,h.paramsSerializer)}};l.forEach(["delete","get","head","options"],function(h){W.prototype[h]=function(u,f){return this.request(K(f||{},{method:h,url:u,data:(f||{}).data}))}}),l.forEach(["post","put","patch"],function(h){function u(f){return function(g,ue,A){return this.request(K(A||{},{method:h,headers:f?{"Content-Type":"multipart/form-data"}:{},url:g,data:ue}))}}W.prototype[h]=u(),W.prototype[h+"Form"]=u(!0)});let Ps=class Si{constructor(u){if(typeof u!="function")throw new TypeError("executor must be a function.");let f;this.promise=new Promise(function(ue){f=ue});const g=this;this.promise.then(ue=>{if(!g._listeners)return;let A=g._listeners.length;for(;A-- >0;)g._listeners[A](ue);g._listeners=null}),this.promise.then=ue=>{let A;const S=new Promise(x=>{g.subscribe(x),A=x}).then(ue);return S.cancel=function(){g.unsubscribe(A)},S},u(function(ue,A,S){g.reason||(g.reason=new te(ue,A,S),f(g.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(u){if(this.reason){u(this.reason);return}this._listeners?this._listeners.push(u):this._listeners=[u]}unsubscribe(u){if(!this._listeners)return;const f=this._listeners.indexOf(u);f!==-1&&this._listeners.splice(f,1)}toAbortSignal(){const u=new AbortController,f=g=>{u.abort(g)};return this.subscribe(f),u.signal.unsubscribe=()=>this.unsubscribe(f),u.signal}static source(){let u;return{token:new Si(function(f){u=f}),cancel:u}}};function Is(h){return function(u){return h.apply(null,u)}}function Ls(h){return l.isObject(h)&&h.isAxiosError===!0}const ve={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ve).forEach(([h,u])=>{ve[u]=h});function Jt(h){const u=new W(h),f=St(W.prototype.request,u);return l.extend(f,W.prototype,u,{allOwnKeys:!0}),l.extend(f,u,null,{allOwnKeys:!0}),f.create=function(g){return Jt(K(h,g))},f}const R=Jt(ae);R.Axios=W,R.CanceledError=te,R.CancelToken=Ps,R.isCancel=$t,R.VERSION=zt,R.toFormData=xe,R.AxiosError=_,R.Cancel=R.CanceledError,R.all=function(h){return Promise.all(h)},R.spread=Is,R.isAxiosError=Ls,R.mergeConfig=K,R.AxiosHeaders=L,R.formToJSON=h=>vt(l.isHTMLForm(h)?new FormData(h):h),R.getAdapter=Ht.getAdapter,R.HttpStatusCode=ve,R.default=R;const{Axios:Xr,AxiosError:Gr,CanceledError:Qr,isCancel:Zr,CancelToken:Yr,VERSION:ei,all:ti,Cancel:ni,isAxiosError:si,spread:ri,toFormData:ii,AxiosHeaders:oi,HttpStatusCode:ci,formToJSON:ai,getAdapter:li,mergeConfig:ui}=R,He=R.create({baseURL:location.origin,timeout:6e4,params:{}});He.interceptors.response.use(h=>h,h=>{var u,f,g,ue,A,S,x,c,p,t,o;if(h.response){if(h.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(e){e&&OpenC3Auth.setTokens()}),h.response.config.headers["Ignore-Errors"]&&h.response.config.headers["Ignore-Errors"].includes(h.response.status.toString()))return Promise.reject(h);let r=`HTTP ${h.response.status} - `;(u=h.response)!=null&&u.statusText&&(r+=`${h.response.statusText} `),(g=(f=h.response)==null?void 0:f.config)!=null&&g.data&&(r+=`${h.response.config.data} `),(A=(ue=h.response)==null?void 0:ue.data)!=null&&A.message?r+=`${h.response.data.message}`:(x=(S=h.response)==null?void 0:S.data)!=null&&x.exception?r+=`${h.response.data.exception}`:(t=(p=(c=h.response)==null?void 0:c.data)==null?void 0:p.error)!=null&&t.message?(h.response.data.error.class&&(r+=`${h.response.data.error.class} `),r+=`${h.response.data.error.message}`):r+=`${(o=h.response)==null?void 0:o.data}`;const{$cosmosNotify:n}=window;throw n&&n.serious({title:"Network error",body:r}),h}else throw h});const fe=async function(h,u,{data:f,params:g={},headers:ue,noAuth:A=!1,noScope:S=!1,onUploadProgress:x=!1}={}){if(!A){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}ue.Authorization=localStorage.openc3Token}return ue.manual=!0,!S&&!g.scope&&(g.scope=window.openc3Scope),He({method:h,url:u,data:f,params:g,headers:ue,onUploadProgress:x})},$e={Accept:"application/json"},dt={...$e,"Content-Type":"application/json"},hi={get:function(h,{params:u,headers:f=$e,noScope:g,noAuth:ue,onUploadProgress:A}={}){return fe("get",h,{params:u,headers:f,noScope:g,noAuth:ue,onUploadProgress:A})},put:function(h,{data:u,params:f,headers:g=dt,noScope:ue,noAuth:A,onUploadProgress:S}={}){return fe("put",h,{data:u,params:f,headers:g,noScope:ue,noAuth:A,onUploadProgress:S})},post:function(h,{data:u,params:f,headers:g=dt,noScope:ue,noAuth:A,onUploadProgress:S}={}){return fe("post",h,{data:u,params:f,headers:g,noScope:ue,noAuth:A,onUploadProgress:S})},delete:function(h,{params:u,headers:f=$e,noScope:g,noAuth:ue,onUploadProgress:A}={}){return fe("delete",h,{params:u,headers:f,noScope:g,noAuth:ue,onUploadProgress:A})}};let Re=()=>({emit(h,...u){for(let f=this.events[h]||[],g=0,ue=f.length;g<ue;g++)f[g](...u)},events:{},on(h,u){var f;return((f=this.events)[h]||(f[h]=[])).push(u),()=>{var g;this.events[h]=(g=this.events[h])==null?void 0:g.filter(ue=>u!==ue)}}});class le extends Error{constructor(u,f){u instanceof Error?(super(u.message),this.cause=u):super(u),this.reason=f,this.name="ReasonError"}}function Wt(h){return h?`{${Object.keys(h).sort().filter(u=>h[u]!==void 0).map(u=>{let f=JSON.stringify(h[u]);return`${JSON.stringify(u)}:${f}`}).join(",")}}`:""}class vs{constructor(u){this.channel=u,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",u=>{if(u.type==="info"){this._state||(this._state=this.stateFromInfo(u));return}this._state&&(u.type==="join"?this._state[u.id]=u.info:u.type==="leave"&&delete this._state[u.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(u=>u()),this.listeners.length=0}async join(u,f){if(!this._info)return this._info={id:u,info:f},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let u=await this.channel.perform("$presence:leave");return delete this._info,u}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let u=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(u),this._state}finally{delete this._promise}}stateFromInfo(u){return u.records.reduce((f,{id:g,info:ue})=>(f[g]=ue,f),{})}}const z=Symbol("state");class Kt{constructor(u={}){this.emitter=Re(),this.params=Object.freeze(u),this.presence=new vs(this),this.initialConnect=!0,this[z]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Wt({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[z]}attached(u){if(this.receiver){if(this.receiver!==u)throw Error("Already connected to a different receiver");return!1}return this.receiver=u,!0}connecting(){this[z]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[z]="connected";let u=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:u})):this.emit("connect",{reconnect:!0,restored:u})}restored(){if(this.state==="connected")throw Error("Already connected");this[z]="connected";let u=!0,f=!0;this.initialConnect=!1,this.emit("connect",{reconnect:f,restored:u})}disconnected(u){this.state==="disconnected"||this.state==="closed"||(this[z]="disconnected",this.presence.reset(),this.emit("disconnect",u))}closed(u){this.state!=="closed"&&(this[z]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",u))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(u,f){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,u,f)}async send(u){return this.perform(void 0,u)}async whisper(u){try{await this.perform("$whisper",u)}catch(f){let g=this.receiver?this.receiver.logger:null;g&&g.warn("whisper failed: ",f)}}receive(u,f){this.emit("message",u,f)}on(u,f){return this.emitter.on(u,f)}once(u,f){let g=this.emitter.on(u,(...ue)=>{g(),f(...ue)});return g}emit(u,...f){return this.emitter.emit(u,...f)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((u,f)=>{let g=[()=>delete this._pendingSubscribe];g.push(this.on("connect",()=>{g.forEach(ue=>ue()),u()})),g.push(this.on("close",ue=>{g.forEach(A=>A()),f(ue||new le("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class Ve extends Kt{constructor(u,f){super(f),this.channelId=u}set channelId(u){this._channelId=u}get channelId(){return this._channelId}}$(Ve,"identifier","__ghost__");const Vs="$pubsub";class Ue extends Kt{async perform(u,f){if(u.startsWith("$"))return super.perform(u,f);throw Error("not implemented")}}$(Ue,"identifier",Vs);function re(h){return dr.test(h)}const dr=/^-?[0-9]+$/;function en(h){return fr.test(h)}const fr=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function tn(h,u){if(re(h))return Number.isSafeInteger(Number.parseInt(h,10));const f=Number.parseFloat(h),g=String(f);if(h===g)return!0;const ue=bt(h),A=bt(g);return!!(ue===A||(u==null?void 0:u.approx)===!0&&!re(h)&&A.length>=14&&ue.startsWith(A.substring(0,14)))}let se=function(h){return h.underflow="underflow",h.overflow="overflow",h.truncate_integer="truncate_integer",h.truncate_float="truncate_float",h}({});function pr(h){if(tn(h,{approx:!1}))return;if(re(h))return se.truncate_integer;const u=Number.parseFloat(h);return Number.isFinite(u)?u===0?se.underflow:se.truncate_float:se.overflow}function bt(h){const{start:u,end:f}=mr(h),g=h.substring(u,f),ue=g.indexOf(".");return ue===-1?g:g.substring(0,ue)+g.substring(ue+1)}function mr(h){let u=0;for(h[0]==="-"&&u++;h[u]==="0"||h[u]===".";)u++;let f=h.lastIndexOf("e");for(f===-1&&(f=h.lastIndexOf("E")),f===-1&&(f=h.length);(h[f-1]==="0"||h[f-1]===".")&&f>u;)f--;return{start:u,end:f}}class gr{constructor(u){if($(this,"isLosslessNumber",!0),!en(u))throw new Error(`Invalid number (value: "${u}")`);this.value=u}valueOf(){const u=pr(this.value);if(u===void 0||u===se.truncate_float)return Number.parseFloat(this.value);if(re(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${u} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function br(h){return h&&typeof h=="object"&&h.isLosslessNumber||!1}function yr(h){return new gr(h)}function _r(h,u){return Je({"":h},"",h,u)}function Je(h,u,f,g){return Array.isArray(f)?g.call(h,u,Er(f,g)):f&&typeof f=="object"&&!br(f)?g.call(h,u,wr(f,g)):g.call(h,u,f)}function wr(h,u){for(const f of Object.keys(h)){const g=Je(h,f,h[f],u);g!==void 0?h[f]=g:delete h[f]}return h}function Er(h,u){for(let f=0;f<h.length;f++)h[f]=Je(h,String(f),h[f],u);return h}function Sr(h,u){let f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:yr,g=0;const ue=x();return e(ue),a(),u?_r(ue,u):ue;function A(){if(h.charCodeAt(g)===Tr){g++,p();const w={};let y=!0;for(;g<h.length&&h.charCodeAt(g)!==_t;){y?y=!1:(r(),p());const T=g,Oe=t();if(Oe===void 0){k();return}p(),n();const ze=x();if(ze===void 0){X();return}Object.prototype.hasOwnProperty.call(w,Oe)&&!De(ze,w[Oe])&&M(Oe,T+1),w[Oe]=ze}return h.charCodeAt(g)!==_t&&C(),g++,w}}function S(){if(h.charCodeAt(g)===kr){g++,p();const w=[];let y=!0;for(;g<h.length&&h.charCodeAt(g)!==wt;){y?y=!1:r();const T=x();i(T),w.push(T)}return h.charCodeAt(g)!==wt&&b(),g++,w}}function x(){p();const w=t()??o()??A()??S()??c("true",!0)??c("false",!1)??c("null",null);return p(),w}function c(w,y){if(h.slice(g,g+w.length)===w)return g+=w.length,y}function p(){for(;xr(h.charCodeAt(g));)g++}function t(){if(h.charCodeAt(g)===Pe){g++;let w="";for(;g<h.length&&h.charCodeAt(g)!==Pe;){if(h.charCodeAt(g)===Cr){const y=h[g+1],T=Or[y];T!==void 0?(w+=T,g++):y==="u"?pe(h.charCodeAt(g+2))&&pe(h.charCodeAt(g+3))&&pe(h.charCodeAt(g+4))&&pe(h.charCodeAt(g+5))?(w+=String.fromCharCode(Number.parseInt(h.slice(g+2,g+6),16)),g+=5):V(g):Ce(g)}else Rr(h.charCodeAt(g))?w+=h[g]:he(h[g]);g++}return v(),g++,w}}function o(){const w=g;if(h.charCodeAt(g)===Et&&(g++,m(w)),h.charCodeAt(g)===We)g++;else if(Ar(h.charCodeAt(g)))for(g++;me(h.charCodeAt(g));)g++;if(h.charCodeAt(g)===$r)for(g++,m(w);me(h.charCodeAt(g));)g++;if(h.charCodeAt(g)===Mr||h.charCodeAt(g)===Br)for(g++,(h.charCodeAt(g)===Et||h.charCodeAt(g)===jr)&&g++,m(w);me(h.charCodeAt(g));)g++;if(g>w)return f(h.slice(w,g))}function r(){if(h.charCodeAt(g)!==vr)throw new SyntaxError(`Comma ',' expected after value ${O()}`);g++}function n(){if(h.charCodeAt(g)!==Ur)throw new SyntaxError(`Colon ':' expected after property name ${O()}`);g++}function e(w){if(w===void 0)throw new SyntaxError(`JSON value expected ${O()}`)}function i(w){if(w===void 0)throw new SyntaxError(`Array item expected ${O()}`)}function a(){if(g<h.length)throw new SyntaxError(`Expected end of input ${O()}`)}function m(w){if(!me(h.charCodeAt(g))){const y=h.slice(w,g);throw new SyntaxError(`Invalid number '${y}', expecting a digit ${O()}`)}}function v(){if(h.charCodeAt(g)!==Pe)throw new SyntaxError(`End of string '"' expected ${O()}`)}function k(){throw new SyntaxError(`Quoted object key expected ${O()}`)}function M(w,y){throw new SyntaxError(`Duplicate key '${w}' encountered at position ${y}`)}function C(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${O()}`)}function b(){throw new SyntaxError(`Array item or end of array ']' expected ${O()}`)}function he(w){throw new SyntaxError(`Invalid character '${w}' ${Xe()}`)}function Ce(w){const y=h.slice(w,w+2);throw new SyntaxError(`Invalid escape character '${y}' ${Xe()}`)}function X(){throw new SyntaxError(`Object value expected after ':' ${Xe()}`)}function V(w){const y=h.slice(w,w+6);throw new SyntaxError(`Invalid unicode character '${y}' ${Xe()}`)}function Xe(){return`at position ${g}`}function U(){return g<h.length?`but got '${h[g]}'`:"but reached end of input"}function O(){return`${U()} ${Xe()}`}}function xr(h){return h===Nr||h===Pr||h===Ir||h===Lr}function pe(h){return h>=We&&h<=Ke||h>=Dr&&h<=Hr||h>=qr&&h<=zr}function me(h){return h>=We&&h<=Ke}function Ar(h){return h>=Fr&&h<=Ke}function Rr(h){return h>=32&&h<=1114111}function De(h,u){return h===u?!0:Array.isArray(h)&&Array.isArray(u)?h.length===u.length&&h.every((f,g)=>De(f,u[g])):yt(h)&&yt(u)?[...new Set([...Object.keys(h),...Object.keys(u)])].every(f=>De(h[f],u[f])):!1}function yt(h){return typeof h=="object"&&h!==null}const Or={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
1124
+ `,r:"\r",t:" "},Cr=92,Tr=123,_t=125,kr=91,wt=93,Nr=32,Pr=10,Ir=9,Lr=13,Pe=34,jr=43,Et=45,We=48,Fr=49,Ke=57,vr=44,$r=46,Ur=58,Dr=65,qr=97,Br=69,Mr=101,Hr=70,zr=102;function nn(h,u,f,g){return ue(h);function ue(c,p){if(Array.isArray(g)){const t=g.find(o=>o.test(c));if(t){const o=t.stringify(c);if(typeof o!="string"||!en(o))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${o})`);return o}}if(typeof c=="boolean"||typeof c=="number"||typeof c=="string"||c===null||c instanceof Date||c instanceof Boolean||c instanceof Number||c instanceof String)return JSON.stringify(c);if(c!=null&&c.isLosslessNumber||typeof c=="bigint")return c.toString();if(Array.isArray(c))return A(c);if(c&&typeof c=="object")return S(c)}function A(c,p){if(c.length===0)return"[]";let t="[";for(let o=0;o<c.length;o++){const r=c[o];typeof r<"u"&&typeof r!="function"?t+=ue(r):t+="null",o<c.length-1&&(t+=",")}return t+="]",t}function S(c,p){if(typeof c.toJSON=="function")return nn(c.toJSON(),u,f,void 0);const t=Array.isArray(u)?u.map(String):Object.keys(c);if(t.length===0)return"{}";let o=!0,r="{";for(const n of t){const e=c[n];if(x(n,e)){o?o=!1:r+=",";const i=JSON.stringify(n);r+=`${i}:`,r+=ue(e)}}return r+="}",r}function x(c,p){return typeof p<"u"&&typeof p!="function"&&typeof p!="symbol"}}function Vr(h){return re(h)&&!tn(h)?BigInt(h):parseFloat(h)}class gi{constructor(){$(this,"id",1)}async exec(u,f,g={},ue={},A=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return g.scope=window.openc3Scope,ue.manual=!0,(await He.post("/openc3-api/api",{jsonrpc:"2.0",method:u,params:f,id:this.id,keyword_params:g},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...ue},timeout:A,transformRequest:[(S,x)=>nn(S)],transformResponse:[S=>Sr(S,void 0,Vr)]})).data.result}catch(S){let x=new Error;throw S.response?(x.name=S.response.data.error.data.class,x.message=S.response.data.error.data.message,x.object=S.response.data.error):S.request?(x.name="Request error",x.message="Request error, no response received"):x=S,x}}decode_openc3_type(u){if(u!==null&&typeof u=="object"&&u.json_class=="Float"&&u.raw){if(u.raw=="NaN")return NaN;if(u.raw=="Infinity")return 1/0;if(u.raw=="-Infinity")return-1/0}return null}encode_openc3_type(u){return Number.isNaN(u)?{json_class:"Float",raw:"NaN"}:u==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:u==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(u=>{u&&(localStorage.openc3OfflineToken?this.set_offline_access(localStorage.openc3OfflineToken).then(()=>{delete localStorage.openc3OfflineToken}):OpenC3Auth.getOfflineAccess())})}offline_access_needed(){return this.exec("offline_access_needed",[])}set_offline_access(u){return this.exec("set_offline_access",[u])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(u,f,g,ue,A){return this.exec("map_target_to_interface",[u,f],{cmd_only:g,tlm_only:ue,unmap_old:A})}unmap_target_from_interface(u,f,g,ue){return this.exec("unmap_target_from_interface",[u,f],{cmd_only:g,tlm_only:ue})}connect_interface(u,...f){return f.length>0?this.exec("connect_interface",[u,...f]):this.exec("connect_interface",[u])}disconnect_interface(u){return this.exec("disconnect_interface",[u])}interface_cmd(u,f,...g){return this.exec("interface_cmd",[u,f,...g])}interface_target_enable(u,f,g=!1,ue=!1){return this.exec("interface_target_enable",[u,f],{cmd_only:g,tlm_only:ue})}interface_target_disable(u,f,g=!1,ue=!1){return this.exec("interface_target_disable",[u,f],{cmd_only:g,tlm_only:ue})}interface_details(u){return this.exec("interface_details",[u])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(u,f,g,ue,A){return this.exec("map_target_to_router",[u,f],{cmd_only:g,tlm_only:ue,unmap_old:A})}unmap_target_from_router(u,f,g,ue){return this.exec("unmap_target_from_router",[u,f],{cmd_only:g,tlm_only:ue})}connect_router(u){return this.exec("connect_router",[u])}disconnect_router(u){return this.exec("disconnect_router",[u])}router_target_enable(u,f,g=!1,ue=!1){return this.exec("router_target_enable",[u,f],{cmd_only:g,tlm_only:ue})}router_target_disable(u,f,g=!1,ue=!1){return this.exec("router_target_disable",[u,f],{cmd_only:g,tlm_only:ue})}router_details(u){return this.exec("router_details",[u])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(u){return this.exec("get_tlm_cnts",[u])}get_item(u,f,g){return this.exec("get_item",[u,f,g])}get_param(u,f,g){return this.exec("get_param",[u,f,g])}get_parameter(u,f,g){return this.exec("get_param",[u,f,g])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(u){return this.exec("set_limits_set",[u])}get_target(u){return this.exec("get_target",[u])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(u,f){return this.exec("get_tlm",[u,f])}get_telemetry(u,f){return this.exec("get_tlm",[u,f])}get_all_tlm(u){return this.exec("get_all_tlm",[u])}get_all_telemetry(u){return this.exec("get_all_tlm",[u])}get_all_tlm_names(u,f=!1){return this.exec("get_all_tlm_names",[u],{hidden:f})}get_all_telemetry_names(u){return this.exec("get_all_tlm_names",[u])}get_all_tlm_item_names(u){return this.exec("get_all_tlm_item_names",[u])}async get_tlm_packet(u,f,g,ue=30){const A=await this.exec("get_tlm_packet",[u,f],{type:g,stale_time:ue});if(A!=null){let S=A.length,x=null;for(let c=0;c<S;c++)x=this.decode_openc3_type(A[c][1]),x!==null&&(A[c][1]=x)}return A}get_packet_derived_items(u,f){return this.exec("get_packet_derived_items",[u,f])}get_tlm_buffer(u,f){return this.exec("get_tlm_buffer",[u,f])}get_tlm_available(u){return this.exec("get_tlm_available",[u])}async get_tlm_values(u,f=30,g=null,ue=null,A=null){let S={stale_time:f};g!==null&&(S.cache_timeout=g),ue!==null&&(S.start_time=ue.toISOString()),A!==null&&(S.end_time=A.toISOString());const x=await this.exec("get_tlm_values",[u],S,{},1e4);if(x&&x.length>0){let c=x[0].length,p=null;for(let t=0;t<c;t++)p=this.decode_openc3_type(x[0][t]),p!==null&&(x[0][t]=p)}return x}get_limits(u,f,g){return this.exec("get_limits",[u,f,g])}async tlm(u,f,g,ue="CONVERTED"){let A=null;if(f===void 0)A=await this.exec("tlm",[u]);else if(g===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(f))A=await this.exec("tlm",[u],{type:f});else{let x=new Error;throw x.name="TypeError",x.message=`Invalid data type ${f}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,x}else A=await this.exec("tlm",[u,f,g],{type:ue});let S=this.decode_openc3_type(A);return S!==null&&(A=S),A}async inject_tlm(u,f,g=null,ue="CONVERTED"){await this.exec("inject_tlm",[u,f,g],{type:ue})}set_tlm(u,f,g,ue){return this.exec("set_tlm",[u,f,g],{type:ue})}override_tlm(u,f,g,ue){return this.exec("override_tlm",[u,f,g],{type:ue})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(u,f,g,ue){return this.exec("normalize_tlm",[u,f,g],{type:ue})}get_all_cmds(u){return this.exec("get_all_cmds",[u])}get_all_commands(u){return this.exec("get_all_cmds",[u])}get_all_cmd_names(u,f=!1){return this.exec("get_all_cmd_names",[u],{hidden:f})}get_all_command_names(u){return this.exec("get_all_cmd_names",[u])}get_cmd(u,f){return this.exec("get_cmd",[u,f])}get_command(u,f){return this.exec("get_cmd",[u,f])}get_cmd_cnts(u){return this.exec("get_cmd_cnts",[u])}get_cmd_value(u,f,g,ue="CONVERTED"){return this.exec("get_cmd_value",[u,f,g,ue])}get_cmd_buffer(u,f){return this.exec("get_cmd_buffer",[u,f])}_cmd(u,f,g,ue,A,S={}){let x=null;for(let c in ue)Object.prototype.hasOwnProperty.call(ue,c)&&(x=this.encode_openc3_type(ue[c]),x!==null&&(ue[c]=x));return this.exec(u,[f,g,ue],S,A)}get_cmd_hazardous(u,f,g,ue={}){return f===void 0?this.exec("get_cmd_hazardous",u,{},ue):this._cmd("get_cmd_hazardous",u,f,g,ue)}cmd(u,f,g,ue={},A={}){return f===void 0?this.exec("cmd",u,{},ue):this._cmd("cmd",u,f,g,ue,A)}cmd_no_range_check(u,f,g,ue={},A={}){return f===void 0?this.exec("cmd_no_range_check",u,{},ue,A):this._cmd("cmd_no_range_check",u,f,g,ue,A)}cmd_raw(u,f,g,ue={},A={}){return f===void 0?this.exec("cmd_raw",u,{},ue,A):this._cmd("cmd_raw",u,f,g,ue,A)}cmd_raw_no_range_check(u,f,g,ue={},A={}){return f===void 0?this.exec("cmd_raw_no_range_check",u,{},ue,A):this._cmd("cmd_raw_no_range_check",u,f,g,ue,A)}cmd_no_hazardous_check(u,f,g,ue={},A={}){return f===void 0?this.exec("cmd_no_hazardous_check",u,{},ue,A):this._cmd("cmd_no_hazardous_check",u,f,g,ue,A)}cmd_no_checks(u,f,g,ue={},A={}){return f===void 0?this.exec("cmd_no_checks",u,{},ue,A):this._cmd("cmd_no_checks",u,f,g,ue,A)}cmd_raw_no_hazardous_check(u,f,g,ue={},A={}){return f===void 0?this.exec("cmd_raw_no_hazardous_check",u,{},ue,A):this._cmd("cmd_raw_no_hazardous_check",u,f,g,ue,A)}cmd_raw_no_checks(u,f,g,ue={},A={}){return f===void 0?this.exec("cmd_raw_no_checks",u,{},ue,A):this._cmd("cmd_raw_no_checks",u,f,g,ue,A)}build_cmd(u,f,g,ue={},A={}){return f===void 0?this.exec("build_cmd",u):this._cmd("build_cmd",u,f,g,ue,A)}build_command(u,f,g,ue={},A={}){return f===void 0?this.exec("build_cmd",u):this._cmd("build_cmd",u,f,g,ue,A)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(u,f){return this.exec("send_raw",[u,f])}list_configs(u){return this.exec("list_configs",[u])}load_config(u,f){return this.exec("load_config",[u,f])}save_config(u,f,g){return this.exec("save_config",[u,f,g])}delete_config(u,f){return this.exec("delete_config",[u,f])}enable_limits(u,f,g){return this.exec("enable_limits",[u,f,g])}disable_limits(u,f,g){return this.exec("disable_limits",[u,f,g])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(u){return this.exec("get_overall_limits_state",[u])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(u,f){return this.exec("get_setting",[u],f)}get_settings(u,f){return this.exec("get_settings",u,f)}set_setting(u,f){return this.exec("set_setting",[u,f])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(u,f){return this.exec("set_setting",[u,f])}get_metrics(){return this.exec("get_metrics",[])}async hashString(u){if(window.isSecureContext){const f=new TextEncoder().encode(u),g=await crypto.subtle.digest("SHA-256",f),ue=new Uint8Array(g);return Array.from(ue).map(A=>A.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:"",lastTargetName:"",lastCommandName:"",lastParamList:"",ignoreRangeChecks:!1,statesInHex:!1,showIgnoredParams:!1,cmdRaw:!1,disableCommandValidation:!1,interfaces:[],selectedInterface:"",rawCmdFile:null,status:"",history:"",hazardousCommand:"",displaySendHazardous:!1,displayErrorDialog:!1,displaySendRaw:!1,displayCriticalCmd:!1,criticalCmdUuid:null,criticalCmdString:null,criticalCmdUser:null,sendDisabled:!1,api:null,keywords:[],screenTarget:null,screenName:null,screenDefinition:null,screenCount:0}},computed:{menus:function(){return[{label:"Mode",items:[{label:"Ignore Range Checks",checkbox:!0,checked:this.ignoreRangeChecks,command:()=>{this.ignoreRangeChecks=!this.ignoreRangeChecks}},{label:"Display State Values in Hex",checkbox:!0,checked:this.statesInHex,command:()=>{this.statesInHex=!this.statesInHex}},{label:"Show Ignored Parameters",checkbox:!0,checked:this.showIgnoredParams,command:()=>{this.showIgnoredParams=!this.showIgnoredParams,this.$refs.commandEditor.triggerUpdateCmdParams()}},{label:"Disable Parameter Conversions",checkbox:!0,checked:this.cmdRaw,command:()=>{this.cmdRaw=!this.cmdRaw.checked}},{label:"Disable Command Validation",checkbox:!0,checked:this.disableCommandValidation,command:()=>{this.disableCommandValidation=!this.disableCommandValidation}}]}]}},created(){this.api=new gi,this.$route.params.target&&this.$route.params.packet&&this.commandChanged({targetName:this.$route.params.target.toUpperCase(),packetName:this.$route.params.packet.toUpperCase()}),hi.get("/openc3-api/autocomplete/keywords/screen").then(h=>{this.keywords=h.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",h=>{if(h.key==="Enter"){h.preventDefault();let u=this.editor.session.getLine(this.editor.getCursorPosition().row);if(u==="")return;let f=u.indexOf('"'),g=u.lastIndexOf('"');u=u.substr(f+1,g-f-1),this.sendCmd(u)}})},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(h=>param.states[h].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 h=upcaseStr.slice(2);h.length%2!==0&&(h="0"+h);let u={json_class:"String",raw:[]};for(let f=0;f<h.length;f+=2){let g=h.charAt(f)+h.charAt(f+1);u.raw.push(parseInt(g,16))}return u}else return upcaseStr==="INFINITY"?1/0:upcaseStr==="-INFINITY"?-1/0:upcaseStr==="NAN"?NaN:this.isFloat(str)?parseFloat(str):this.isInt(str)?Number.isSafeInteger(Number(str))?parseInt(str):BigInt(str):this.isArray(str)?eval(str):str}else return quotesRemoved},commandChanged(h){(this.targetName!==h.targetName||this.commandName!==h.packetName)&&(this.targetName=h.targetName,this.commandName=h.packetName,this.updateScreenInfo(),this.targetName&&this.commandName?this.$router.replace({name:"CommandSender",params:{target:this.targetName,packet:this.commandName}}).catch(u=>{}):this.$router.replace({name:"CommandSender"}).catch(u=>{}))},updateScreenInfo(){this.targetName&&this.commandName?this.api.get_cmd(this.targetName,this.commandName).then(h=>{if(h.screen)this.loadScreen(h.screen[0],h.screen[1]).then(u=>{this.screenTarget=h.screen[0],this.screenName=h.screen[1],this.screenDefinition=u.data,this.screenCount+=1});else{if(h.related_items){this.screenTarget="LOCAL",this.screenName="CMDSENDER";let u=`SCREEN AUTO AUTO 1.0
1125
+ `;for(const f of h.related_items)u+=`LABELVALUE '${f[0]}' '${f[1]}' '${f[2]}' WITH_UNITS 20
1126
+ `;this.screenDefinition=u}else this.screenTarget=null,this.screenName=null,this.screenDefinition=null;this.screenCount+=1}},h=>{this.displayError("getting command for screen info",h)}):(this.screenTarget=null,this.screenName=null,this.screenDefinition=null,this.screenCount+=1)},createParamList(){let h={};for(const u of this.$refs.commandEditor.getRows())h[u.parameter_name]=this.convertToValue(u);return h},buildCmd(){this.sendCmd(this.targetName,this.commandName,this.createParamList())},sendCmd(h,u,f){this.lastTargetName=h,this.lastCommandName=u,this.lastParamList=f,this.sendDisabled=!0;let g=!1,ue="";this.api.get_cmd_hazardous(h,u,f).then(A=>{if(g=A,g)u===void 0?this.hazardousCommand=h.split(" ").slice(0,2).join(" "):this.hazardousCommand=`${h} ${u}`,this.displaySendHazardous=!0;else{let S,x=this.disableCommandValidation?{validate:!1}:{};this.cmdRaw?this.ignoreRangeChecks?(ue="cmd_raw_no_range_check",S=this.api.cmd_raw_no_range_check(h,u,f,{"Ignore-Errors":"428"},x)):(ue="cmd_raw",S=this.api.cmd_raw(h,u,f,{"Ignore-Errors":"428 500"},x)):this.ignoreRangeChecks?(ue="cmd_no_range_check",S=this.api.cmd_no_range_check(h,u,f,{"Ignore-Errors":"428"},x)):(ue="cmd",S=this.api.cmd(h,u,f,{"Ignore-Errors":"428 500"},x)),S.then(c=>{this.processCmdResponse(!0,h,u,ue,c)},c=>{this.processCmdResponse(!1,h,u,ue,c)})}},A=>{this.processCmdResponse(!1,h,u,ue,A)})},sendHazardousCmd(){this.displaySendHazardous=!1;let h="",u="",f=this.disableCommandValidation?{validate:!1}:{};this.cmdRaw?this.ignoreRangeChecks?(u="cmd_raw_no_range_check",h=this.api.cmd_raw_no_checks(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428"},f)):(u="cmd_raw",h=this.api.cmd_raw_no_hazardous_check(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428 500"},f)):this.ignoreRangeChecks?(u="cmd_no_range_check",h=this.api.cmd_no_checks(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428"},f)):(u="cmd",h=this.api.cmd_no_hazardous_check(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428 500"},f)),h.then(g=>{this.processCmdResponse(!0,this.lastTargetName,this.lastCommandName,u,g)},g=>{this.processCmdResponse(!1,this.lastTargetName,this.lastCommandName,u,g)})},cancelHazardousCmd(){this.displaySendHazardous=!1,this.status="Hazardous command not sent",this.sendDisabled=!1},processCmdResponse(h,u,f,g,ue){f===void 0&&([u,f]=u.split(" ").slice(0,2));let A="";if(h){A=`${g}("${ue.target_name} ${ue.cmd_name}`;let S=Object.keys(ue.cmd_params);if(S.length>0){A+=" with ";for(let x=0;x<S.length;x++){let c=S[x],p="";ue.obfuscated_items.includes(c)?p="*****":p=this.convertToString(ue.cmd_params[c]),typeof ue.cmd_params[c]=="string"&&p.charAt(0)!=="'"&&p.charAt(0)!=='"'&&(p=`'${p}'`),A+=c+" "+p,x<S.length-1&&(A+=", ")}}if(this.disableCommandValidation?Z.getDefaultScriptingLanguage()==="python"?A+='", validate=False)':A+='", validate: false)':A+='")',!this.history.includes(A)){let x=A;this.history.length!==0&&(x+=`
1127
+ ${this.history}`),this.editor.setValue(x),this.editor.moveCursorTo(0,0)}if(A+=" sent.",this.status.includes(A)){let x=this.status.split("sent.");if(x[1].includes("(")){let c=parseInt(x[1].substr(2,x[1].indexOf(")")-2));A=x[0]+"sent. ("+(c+1)+")"}else A+=" (2)"}this.status=A}else{let S="sending "+u+" "+f;this.displayError(S,ue,!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(h,u,f=!1){this.status=`Error ${h} due to ${u.name}`,u.message&&u.message!==""&&(this.status+=": ",this.status+=u.message),this.status.includes("CriticalCmdError")&&(this.status="Critical Command Queued For Approval"),f&&(u.message.includes("CriticalCmdError")?(this.criticalCmdUuid=u.object.data.instance_variables["@uuid"],this.criticalCmdString=u.object.data.instance_variables["@command"].cmd_string,this.criticalCmdUser=u.object.data.instance_variables["@command"].username,this.displayCriticalCmd=!0):this.displayErrorDialog=!0)},loadScreen(h,u){return hi.get("/openc3-api/screen/"+h+"/"+u,{headers:{Accept:"text/plain"}})}}},_hoisted_1={ref:"editor",class:"editor","data-test":"sender-history"},_hoisted_2={class:"mx-1"},_hoisted_3=["textContent"],_hoisted_4={class:"openc3-yellow"},_hoisted_5={class:"mx-1"};function _sfc_render(h,u,f,g,ue,A){const S=resolveComponent("top-bar"),x=resolveComponent("command-editor"),c=resolveComponent("v-card"),p=resolveComponent("v-col"),t=resolveComponent("v-btn"),o=resolveComponent("v-tooltip"),r=resolveComponent("v-row"),n=resolveComponent("v-card-subtitle"),e=resolveComponent("openc3-screen"),i=resolveComponent("critical-cmd-dialog"),a=resolveComponent("v-spacer"),m=resolveComponent("v-toolbar"),v=resolveComponent("v-card-text"),k=resolveComponent("v-dialog"),M=resolveComponent("v-card-actions"),C=resolveComponent("v-select");return openBlock(),createElementBlock("div",null,[createVNode(S,{menus:A.menus,title:ue.title},null,8,["menus","title"]),createVNode(x,{ref:"commandEditor","initial-target-name":h.$route.params.target,"initial-packet-name":h.$route.params.packet,"send-disabled":ue.sendDisabled,"states-in-hex":ue.statesInHex,"show-ignored-params":ue.showIgnoredParams,"cmd-raw":ue.cmdRaw,onCommandChanged:u[0]||(u[0]=b=>A.commandChanged(b)),onBuildCmd:u[1]||(u[1]=b=>A.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(ue.status),1)]),_:1}),u[22]||(u[22]=createElementVNode("div",{style:{height:"15px"}},null,-1)),createVNode(r,{"no-gutters":""},{default:withCtx(()=>[createVNode(p,{class:"pr-4"},{default:withCtx(()=>[createVNode(c,{class:"pb-2"},{default:withCtx(()=>[createVNode(n,null,{default:withCtx(()=>[createVNode(r,null,{default:withCtx(()=>[createVNode(p,{class:"pt-6"},{default:withCtx(()=>[...u[9]||(u[9]=[createTextVNode(" Editable Command History: (Pressing Enter on the line re-executes the command) ",-1)])]),_:1}),createVNode(p,null,{default:withCtx(()=>[createVNode(o,{"open-delay":600,location:"top"},{activator:withCtx(({props:b})=>[createElementVNode("div",mergeProps(b,{class:"float-right"}),[createVNode(t,{icon:"mdi-delete-sweep",variant:"text","data-test":"clear-history",onClick:A.clearHistory},null,8,["onClick"])],16)]),default:withCtx(()=>[u[10]||(u[10]=createElementVNode("span",null," Clear History ",-1))]),_:1})]),_:1})]),_:1})]),_:1}),createVNode(r,{"no-gutters":"",class:"mt-2 mb-2"},{default:withCtx(()=>[createVNode(p,null,{default:withCtx(()=>[createElementVNode("pre",_hoisted_1,null,512)]),_:1})]),_:1})]),_:1})]),_:1}),ue.screenDefinition?(openBlock(),createBlock(p,{key:0,md:"auto"},{default:withCtx(()=>[createVNode(e,{target:ue.screenTarget,screen:ue.screenName,definition:ue.screenDefinition,keywords:ue.keywords,count:ue.screenCount,"show-close":!1},null,8,["target","screen","definition","keywords","count"])]),_:1})):createCommentVNode("",!0)]),_:1}),u[23]||(u[23]=createElementVNode("div",{style:{height:"15px"}},null,-1)),createVNode(i,{modelValue:ue.displayCriticalCmd,"onUpdate:modelValue":u[2]||(u[2]=b=>ue.displayCriticalCmd=b),uuid:ue.criticalCmdUuid,"cmd-string":ue.criticalCmdString,"cmd-user":ue.criticalCmdUser},null,8,["modelValue","uuid","cmd-string","cmd-user"]),createVNode(k,{modelValue:ue.displayErrorDialog,"onUpdate:modelValue":u[4]||(u[4]=b=>ue.displayErrorDialog=b),"max-width":"600"},{default:withCtx(()=>[createVNode(c,null,{default:withCtx(()=>[createVNode(m,{height:"24"},{default:withCtx(()=>[createVNode(a),u[11]||(u[11]=createElementVNode("span",null," Error ",-1)),createVNode(a)]),_:1}),createVNode(v,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_2,[createVNode(r,{class:"my-2"},{default:withCtx(()=>[createVNode(v,null,{default:withCtx(()=>[createElementVNode("span",{textContent:toDisplayString(ue.status)},null,8,_hoisted_3)]),_:1})]),_:1}),createVNode(r,null,{default:withCtx(()=>[createVNode(a),createVNode(t,{color:"primary","data-test":"error-dialog-ok",onClick:u[3]||(u[3]=b=>ue.displayErrorDialog=!1)},{default:withCtx(()=>[...u[12]||(u[12]=[createTextVNode(" Ok ",-1)])]),_:1})]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"]),createVNode(k,{modelValue:ue.displaySendHazardous,"onUpdate:modelValue":u[5]||(u[5]=b=>ue.displaySendHazardous=b),"max-width":"600"},{default:withCtx(()=>[createVNode(c,null,{default:withCtx(()=>[createVNode(m,{height:"24"},{default:withCtx(()=>[createVNode(a),u[13]||(u[13]=createElementVNode("span",null," Hazardous Warning ",-1)),createVNode(a)]),_:1}),createVNode(v,{class:"mt-6"},{default:withCtx(()=>[createTextVNode(" Warning: Command "+toDisplayString(ue.hazardousCommand)+" is Hazardous. Send? ",1),u[14]||(u[14]=createElementVNode("br",null,null,-1)),createElementVNode("span",_hoisted_4," Description: "+toDisplayString(ue.commandDescription),1)]),_:1}),createVNode(M,{class:"px-2"},{default:withCtx(()=>[createVNode(a),createVNode(t,{variant:"outlined",onClick:A.cancelHazardousCmd},{default:withCtx(()=>[...u[15]||(u[15]=[createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),createVNode(t,{variant:"flat",onClick:A.sendHazardousCmd},{default:withCtx(()=>[...u[16]||(u[16]=[createTextVNode(" Send ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),createVNode(k,{modelValue:ue.displaySendRaw,"onUpdate:modelValue":u[8]||(u[8]=b=>ue.displaySendRaw=b),"max-width":"600"},{default:withCtx(()=>[createVNode(c,null,{default:withCtx(()=>[createVNode(m,{height:"24"},{default:withCtx(()=>[createVNode(a),u[17]||(u[17]=createElementVNode("span",null," Send Raw ",-1)),createVNode(a)]),_:1}),createVNode(v,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_5,[createVNode(r,{class:"my-2"},{default:withCtx(()=>[createVNode(p,null,{default:withCtx(()=>[...u[18]||(u[18]=[createTextVNode("Interface:",-1)])]),_:1}),createVNode(p,null,{default:withCtx(()=>[createVNode(C,{modelValue:ue.selectedInterface,"onUpdate:modelValue":u[6]||(u[6]=b=>ue.selectedInterface=b),variant:"solo","hide-details":"",density:"compact",items:ue.interfaces,"item-title":"label","item-value":"value"},null,8,["modelValue","items"])]),_:1})]),_:1}),createVNode(r,{"no-gutters":""},{default:withCtx(()=>[createVNode(p,null,{default:withCtx(()=>[...u[19]||(u[19]=[createTextVNode("Filename:",-1)])]),_:1}),createVNode(p,null,{default:withCtx(()=>[createElementVNode("input",{type:"file",onChange:u[7]||(u[7]=b=>h.selectRawCmdFile(b))},null,32)]),_:1})]),_:1}),createVNode(r,null,{default:withCtx(()=>[createVNode(a),createVNode(t,{variant:"outlined","data-test":"raw-cancel",onClick:h.cancelRawCmd},{default:withCtx(()=>[...u[20]||(u[20]=[createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),createVNode(t,{class:"bg-primary","data-test":"raw-ok",onClick:h.sendRawCmd},{default:withCtx(()=>[...u[21]||(u[21]=[createTextVNode(" Ok ",-1)])]),_:1},8,["onClick"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"])])}const CommandSender=exports("default",_export_sfc(_sfc_main,[["render",_sfc_render],["__scopeId","data-v-294af678"]]))}}});