openc3-cosmos-tool-cmdsender 6.0.0 → 6.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/tools/cmdsender/ArrayWidget-BTxChSds-bfafcb1e282209bae9b8.js +2 -0
  3. data/tools/cmdsender/BarColumn-Cdu3OoMa-abf26d8ecccbc20014fa.js +1 -0
  4. data/tools/cmdsender/BlockWidget-PmjzrkXF-f77b1a3b85a63474970b.js +2 -0
  5. data/tools/cmdsender/{ButtonWidget-CKyBBv6m-6364e961031fb424242e.js → ButtonWidget-nwDlOBJT-5d2233c4dd6b7fbc6a0e.js} +2 -2
  6. data/tools/cmdsender/CanvasWidget-BL8930eT-767b3cc61c3248e3bfde.js +1 -0
  7. data/tools/cmdsender/CanvasdotWidget-VCf1fL-G-a7cd286a4fff2a5c3a3a.js +1 -0
  8. data/tools/cmdsender/CanvasimageWidget-BIw7Wbf2-8e7b9b767c12e0edb2e1.js +1 -0
  9. data/tools/cmdsender/CanvasimagevalueWidget-CE3Dj5bH-9b935cbb5d68af8412cd.js +1 -0
  10. data/tools/cmdsender/CanvaslabelWidget-DWmb356h-5fc6134785489e31d1e3.js +1 -0
  11. data/tools/cmdsender/CanvaslabelvalueWidget-CI3yYwFs-3a88d85b06479d994308.js +1 -0
  12. data/tools/cmdsender/CanvaslineWidget-COeapH3P-ceedeb91f76c5c159259.js +1 -0
  13. data/tools/cmdsender/CanvaslinevalueWidget-CI-Bbzfi-37e7e6b12aa2a1235f5f.js +1 -0
  14. data/tools/cmdsender/CheckbuttonWidget-BQhggcZ2-68fba4651ecafd573779.js +1 -0
  15. data/tools/cmdsender/ComboboxWidget-BzsbOv54-97af9800f87899870f36.js +1 -0
  16. data/tools/cmdsender/CommandSender-91f6b4e2ba1f0f0e74f3.js +1109 -0
  17. data/tools/cmdsender/{CriticalCmdDialog-BzoO1Mw_-7299829c5253b39104cb.js → CriticalCmdDialog-BjoqcWTu-7066b9cf6e6bf2144279.js} +1 -1
  18. data/tools/cmdsender/DateWidget-B5R_9rA8-7bc966f31f48f2f10fb2.js +1 -0
  19. data/tools/cmdsender/{DetailsDialog-EWjtBjle-91cf88ec81aca5f7f102.js → DetailsDialog-DLRMqetn-5d64bdc67b9b5e43bbb7.js} +1 -1
  20. data/tools/cmdsender/DynamicWidget-m9EliUR2-5fdc39e4237c90463f9e.js +1 -0
  21. data/tools/cmdsender/FormatvalueWidget-DZkRJce8-48d4f370b30c434d4138.js +1 -0
  22. data/tools/cmdsender/GraphWidget-amwxyH1r-57c0bb46f7944b5f8b21.js +1 -0
  23. data/tools/cmdsender/HorizontalWidget-CirtfuL8-130ee0de3779a46e336f.js +1 -0
  24. data/tools/cmdsender/HorizontalboxWidget-CyTDt2nl-90bce91cb40b2088123a.js +1 -0
  25. data/tools/cmdsender/HorizontallineWidget-BdlNB951-7d56517b135d013a58d1.js +1 -0
  26. data/tools/cmdsender/IframeWidget-DnJmCrCA-74a9d8024841f127285f.js +1 -0
  27. data/tools/cmdsender/{ImageLoader-CDLQopxJ-4c3bf06f2394935888d1.js → ImageLoader-CpcR6tPi-ec9fe1d8bae683498eeb.js} +1 -1
  28. data/tools/cmdsender/ImageviewerWidget-DIkmb_C9-a97b74157aa8507d0e8d.js +1 -0
  29. data/tools/cmdsender/LabelWidget-BDsypYho-5842eba381f322880b6a.js +1 -0
  30. data/tools/cmdsender/LabelledWidget-DjturGl5-75f7971d9a3a88f889e9.js +1 -0
  31. data/tools/cmdsender/LabelprogressbarWidget-RADJGLj3-28cfb5802ac44d80181c.js +1 -0
  32. data/tools/cmdsender/LabelsparklineWidget-BlJoICxu-3626aed85c602d73cbb4.js +1 -0
  33. data/tools/cmdsender/LabelvalueWidget-DVWJqnlY-2b9ef3a4d6c1afb83f58.js +1 -0
  34. data/tools/cmdsender/LabelvaluedescWidget-CsUP7J4U-cc8102a5929bef7a04d9.js +1 -0
  35. data/tools/cmdsender/LabelvaluelimitsbarWidget-Blj1QXV8-75674a72a5b16dcb65c6.js +1 -0
  36. data/tools/cmdsender/LabelvaluelimitscolumnWidget-CvCo-uCe-7b694e6ee492bcd00865.js +1 -0
  37. data/tools/cmdsender/LabelvaluerangebarWidget-DpcXhlfF-2097027f1df8fc82e2b5.js +1 -0
  38. data/tools/cmdsender/{Layout-klOVw-YN-5258887ddded63d92c90.js → Layout-C1HoM4Kl-509835ae46afcc2761f8.js} +1 -1
  39. data/tools/cmdsender/LedWidget-B_K2e5tq-f2e610278ed4d8752dd8.js +1 -0
  40. data/tools/cmdsender/LimitsbarWidget-DXbqsi4J-7d0a6c9ba1aeb18ca24f.js +1 -0
  41. data/tools/cmdsender/LimitscolorWidget-Ckmuw0YX-7fdbaf3d646ca8102dbb.js +1 -0
  42. data/tools/cmdsender/LimitscolumnWidget-BfY4su5U-f98080008ba9c0d58db9.js +1 -0
  43. data/tools/cmdsender/LinegraphWidget-y-Qy9P0R-2db99d29a1db81efba15.js +1 -0
  44. data/tools/cmdsender/MatrixbycolumnsWidget-BTBColrs-948d20ae04aa2860a35f.js +1 -0
  45. data/tools/cmdsender/ProgressbarWidget-DpA_-vy9-40ccbf5aab4901aca30a.js +1 -0
  46. data/tools/cmdsender/RadiobuttonWidget-BO8zpgwW-41d417347486d74f2782.js +1 -0
  47. data/tools/cmdsender/RadiogroupWidget-Oy7V4S-V-2324de2e8229dd9e6d4d.js +1 -0
  48. data/tools/cmdsender/RangebarWidget-DHS7S3vI-2646fb7ece1a2359286e.js +1 -0
  49. data/tools/cmdsender/RollupWidget-CTk9Kjwr-c4784121fdb0a9e93f9d.js +1 -0
  50. data/tools/cmdsender/ScrollwindowWidget-DD0TOW6s-53516999264c91d321c5.js +1 -0
  51. data/tools/cmdsender/SignalWidget-CC33KMTW-9cc4302103a346ccdece.js +1 -0
  52. data/tools/cmdsender/SpacerWidget-BnJe_Hq6-73082f990f99edf7455d.js +1 -0
  53. data/tools/cmdsender/SparklineWidget-DMvMQCPm-222d2d2f47670c53df2f.js +1 -0
  54. data/tools/cmdsender/TabbookWidget-B3w0JtWe-aede92a386581335c5ab.js +1 -0
  55. data/tools/cmdsender/TextboxWidget-D2f0-eol-40b07e8bf056122463a2.js +1 -0
  56. data/tools/cmdsender/TextfieldWidget-DXSdgqVP-d29c84adc9e8a449cab7.js +1 -0
  57. data/tools/cmdsender/TimeWidget-DvrRaEMz-c96d8216e966349903aa.js +1 -0
  58. data/tools/cmdsender/TitleWidget-DqViFQl--cbcf777e58e4b0254010.js +1 -0
  59. data/tools/cmdsender/{VWidget-Dmqf_jKM-4eabf4760e3b6f5e10b6.js → VWidget-02CG-3Av-67baf40d925167b6126a.js} +1 -1
  60. data/tools/cmdsender/ValueWidget-KLYY8L8U-29b03c814f71a0ec3a4e.js +1 -0
  61. data/tools/cmdsender/ValuelimitsbarWidget-SR8XNZFB-22b8d75beaf705e14f20.js +1 -0
  62. data/tools/cmdsender/ValuelimitscolumnWidget-xYZSp6YZ-4c6f2cec5915bd085c50.js +1 -0
  63. data/tools/cmdsender/ValuerangebarWidget-B6M02a9d-d4c7c7aa11904e031ed7.js +1 -0
  64. data/tools/cmdsender/VerticalWidget-z6xUM-ql-7b86828842d1aba0e3bc.js +1 -0
  65. data/tools/cmdsender/VerticalboxWidget-3a9cVsW--46cface9417db41fad42.js +1 -0
  66. data/tools/cmdsender/{Widget-orNSvnOh-d8c2fbf4a342bb2dc82a.js → Widget-C4QVI4IH-b4ca8b1098cb75567491.js} +1 -1
  67. data/tools/cmdsender/{main-da5f80eb5643ef8690b1.js → main-d60a87535d79453f428d.js} +31 -31
  68. data/tools/cmdsender/main.js +1 -1
  69. metadata +68 -68
  70. data/tools/cmdsender/ArrayWidget-By62tXtU-ef1b996df6e28e34c43b.js +0 -2
  71. data/tools/cmdsender/BarColumn-Dm3D1Lhp-61f707e75a11029c0e9b.js +0 -1
  72. data/tools/cmdsender/BlockWidget-CrT45ode-348c3ddc56416a2146ab.js +0 -2
  73. data/tools/cmdsender/CanvasWidget-PqkppHC7-fd79bd4b7029026acc5c.js +0 -1
  74. data/tools/cmdsender/CanvasdotWidget-BUbJgM2d-fa194d6394bd024c8c98.js +0 -1
  75. data/tools/cmdsender/CanvasimageWidget-DPVBY7mi-f0142b21f0fd88139b85.js +0 -1
  76. data/tools/cmdsender/CanvasimagevalueWidget-GX37zzNc-62b424af2b9d98e27ca5.js +0 -1
  77. data/tools/cmdsender/CanvaslabelWidget-P2_Y6Edw-b1e977b4b7759d576b2f.js +0 -1
  78. data/tools/cmdsender/CanvaslabelvalueWidget-Cuas1i9P-1d3918f6f84adfff0120.js +0 -1
  79. data/tools/cmdsender/CanvaslineWidget-BYOYgPya-e27cccd187a4ac905e59.js +0 -1
  80. data/tools/cmdsender/CanvaslinevalueWidget-3cVJMFo7-3577f5c9be34f37ff633.js +0 -1
  81. data/tools/cmdsender/CheckbuttonWidget-B3wgSMuB-d628399d9f46a9124cf4.js +0 -1
  82. data/tools/cmdsender/ComboboxWidget-Dzr4Scvf-80abf76befb1d2223300.js +0 -1
  83. data/tools/cmdsender/CommandSender-da769df0c665acc1ae58.js +0 -1109
  84. data/tools/cmdsender/DateWidget-BWh76Ibb-c0656ca3fd2db9656784.js +0 -1
  85. data/tools/cmdsender/DynamicWidget-m9EliUR2-3ed383238855e9d89b65.js +0 -1
  86. data/tools/cmdsender/FormatvalueWidget-Rk0_eeIm-b88e60c978fbcb4abfc1.js +0 -1
  87. data/tools/cmdsender/GraphWidget-LqekkNDr-2595500f5dc44b5a1fd4.js +0 -1
  88. data/tools/cmdsender/HorizontalWidget-BcfJ24Zn-7df1a9c1a9406fee3bc4.js +0 -1
  89. data/tools/cmdsender/HorizontalboxWidget-CQy1Hv9E-cb7847c9da6a2eb1b325.js +0 -1
  90. data/tools/cmdsender/HorizontallineWidget-BdlNB951-13449b3286fb177db656.js +0 -1
  91. data/tools/cmdsender/IframeWidget-BBaDrRLo-205665c65325fc71e124.js +0 -1
  92. data/tools/cmdsender/ImageviewerWidget-BgO3Pq6I-0883370ad21501128eb7.js +0 -1
  93. data/tools/cmdsender/LabelWidget-B_C6lKOE-19e071c13acf72487206.js +0 -1
  94. data/tools/cmdsender/LabelledWidget-B_UGivhr-69437ddf1d915a331241.js +0 -1
  95. data/tools/cmdsender/LabelprogressbarWidget-BJWCmsYC-302c84efb6e5b94e45ef.js +0 -1
  96. data/tools/cmdsender/LabelsparklineWidget-DILCIh3q-f175d1ebf16bcb26b559.js +0 -1
  97. data/tools/cmdsender/LabelvalueWidget-CCZd1NXE-1e7c14b0cd1e2f34caab.js +0 -1
  98. data/tools/cmdsender/LabelvaluedescWidget-Bsllq8W6-e24fb554e1c7f60256b2.js +0 -1
  99. data/tools/cmdsender/LabelvaluelimitsbarWidget-BV-cfaD--1b7c02f3f4a64d0b20fc.js +0 -1
  100. data/tools/cmdsender/LabelvaluelimitscolumnWidget-DwA0eRBw-a36c733c1a100b9ef2cb.js +0 -1
  101. data/tools/cmdsender/LabelvaluerangebarWidget-3GDJz3dj-5edf485853463cdd7bdc.js +0 -1
  102. data/tools/cmdsender/LedWidget-BAt02s0J-ee955f5837eb08c8c5b8.js +0 -1
  103. data/tools/cmdsender/LimitsbarWidget-JJiyzZjb-deabf599a5f021fb6643.js +0 -1
  104. data/tools/cmdsender/LimitscolorWidget-CYzXKbYd-fc74784cfd9fbce0d9b0.js +0 -1
  105. data/tools/cmdsender/LimitscolumnWidget-Cd76tBo7-5899f502fe0a778ce00f.js +0 -1
  106. data/tools/cmdsender/LinegraphWidget-DWRtO6Ej-2886f1ae49e4fe604ab4.js +0 -1
  107. data/tools/cmdsender/MatrixbycolumnsWidget-cwsyjNV2-fa7489fb9bcce39d54b3.js +0 -1
  108. data/tools/cmdsender/ProgressbarWidget-CYDziFej-78fe983908f2d55b8506.js +0 -1
  109. data/tools/cmdsender/RadiobuttonWidget-U6jcQZoD-28e2f2e59de016f7a467.js +0 -1
  110. data/tools/cmdsender/RadiogroupWidget-HTPJnsB0-673ba05cc1221683c64a.js +0 -1
  111. data/tools/cmdsender/RangebarWidget-DW0FJK6y-15a1d235dab1f5389508.js +0 -1
  112. data/tools/cmdsender/RollupWidget-B2qrx55f-e7877648fd0f7ebeaea7.js +0 -1
  113. data/tools/cmdsender/ScrollwindowWidget-CwIDxgO6-22c14acbcc8ae1aed916.js +0 -1
  114. data/tools/cmdsender/SignalWidget-Bosa3AbW-b3cc82444c17e3494e4d.js +0 -1
  115. data/tools/cmdsender/SpacerWidget-DYAlt5mt-79646b208c68ad086279.js +0 -1
  116. data/tools/cmdsender/SparklineWidget-CDrVXOFV-a2a5cd9bc98f09e6f5c4.js +0 -1
  117. data/tools/cmdsender/TabbookWidget-DDdlzCkv-b28195cb05ace2609c5f.js +0 -1
  118. data/tools/cmdsender/TextboxWidget-5euFelEq-198962282d99de2627fa.js +0 -1
  119. data/tools/cmdsender/TextfieldWidget-BFripYeh-36195e3160240dab144f.js +0 -1
  120. data/tools/cmdsender/TimeWidget-BBSbsUYJ-b8771bc53294d10f60d5.js +0 -1
  121. data/tools/cmdsender/TitleWidget-p8cjo-Bs-2538cd241465b2ac8f9c.js +0 -1
  122. data/tools/cmdsender/ValueWidget-CZh7JWwT-67ae55abc70e2d6939b1.js +0 -1
  123. data/tools/cmdsender/ValuelimitsbarWidget-DU7ybswC-fc8834eac88586459180.js +0 -1
  124. data/tools/cmdsender/ValuelimitscolumnWidget-DMw-h5jM-d23e707bc9df0603b509.js +0 -1
  125. data/tools/cmdsender/ValuerangebarWidget-DPpofDpA-6eac85aa54ece67d19f2.js +0 -1
  126. data/tools/cmdsender/VerticalWidget-Ch7VAEmz-eb59265f50227b17e04e.js +0 -1
  127. data/tools/cmdsender/VerticalboxWidget-DYx-TFT4-5edc625784a41f39e567.js +0 -1
@@ -0,0 +1,1109 @@
1
+ System.register(["./main-d60a87535d79453f428d.js","vue","./DetailsDialog-DLRMqetn-5d64bdc67b9b5e43bbb7.js","./CriticalCmdDialog-BjoqcWTu-7066b9cf6e6bf2144279.js","vue-router","single-spa","vuex","vuetify"],function(exports,module){"use strict";var s,_export_sfc,et$1,$e$1,resolveComponent,openBlock,createBlock,Teleport,createVNode,withCtx,createElementVNode,toDisplayString,createElementBlock,Fragment,renderList,mergeProps,createTextVNode,createSlots,normalizeStyle,createCommentVNode,normalizeClass,withModifiers,P$1,N;return{setters:[x=>{s=x.s,_export_sfc=x._,et$1=x.e,$e$1=x.$},x=>{resolveComponent=x.resolveComponent,openBlock=x.openBlock,createBlock=x.createBlock,Teleport=x.Teleport,createVNode=x.createVNode,withCtx=x.withCtx,createElementVNode=x.createElementVNode,toDisplayString=x.toDisplayString,createElementBlock=x.createElementBlock,Fragment=x.Fragment,renderList=x.renderList,mergeProps=x.mergeProps,createTextVNode=x.createTextVNode,createSlots=x.createSlots,normalizeStyle=x.normalizeStyle,createCommentVNode=x.createCommentVNode,normalizeClass=x.normalizeClass,withModifiers=x.withModifiers},x=>{P$1=x.P},x=>{N=x.N},null,null,null,null],execute:function(){var __vite_style__=document.createElement("style");__vite_style__.textContent=`.container[data-v-b19a55d5] .v-select__selections{width:auto}.v-overflow-btn[data-v-b19a55d5]{margin-top:0}.container[data-v-b19a55d5]{padding:0}.hazardous[data-v-b19a55d5] .v-select__selection-text{color:#ffdc00!important}.editor[data-v-dda0eae4]{margin-left:30px;height:50px;width:95%;position:relative;font-size:16px}
2
+ /*$vite$:1*/`,document.head.appendChild(__vite_style__);const I$1={props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(x){return x.replaceAll(" ","-").toLowerCase()},subMenuClick(x){x.command(x),this.$refs.topmenu[0].isActive=!1}},mounted(){document.title=this.title}},P={class:"app-title mr-2"};function q$1(x,b,p,m,Gn,Q){const R=resolveComponent("v-col"),M=resolveComponent("v-row"),l=resolveComponent("v-icon"),u=resolveComponent("v-btn"),o=resolveComponent("v-divider"),i=resolveComponent("v-list-item-title"),r=resolveComponent("v-list-item"),t=resolveComponent("v-list"),e=resolveComponent("v-menu"),n=resolveComponent("v-radio"),a=resolveComponent("v-list-item-action"),d=resolveComponent("v-radio-group"),f=resolveComponent("v-checkbox");return openBlock(),createBlock(Teleport,{to:"#openc3-menu"},[createVNode(M,{"no-gutters":""},{default:withCtx(()=>[createVNode(R,{"align-self":"end"},{default:withCtx(()=>[createElementVNode("span",P,toDisplayString(p.title),1)]),_:1})]),_:1}),createVNode(M,{dense:"",class:"flex-nowrap"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(p.menus,(xe,F)=>(openBlock(),createBlock(e,{ref_for:!0,ref:"topmenu",key:F},{activator:withCtx(({props:_})=>[createVNode(u,mergeProps({ref_for:!0},_,{variant:"outlined",class:"mx-1 menu-button",text:xe.label,"data-test":Q.formatDT(`${p.title} ${xe.label}`)}),{append:withCtx(()=>[createVNode(l,{class:"menu-button-icon"},{default:withCtx(()=>b[0]||(b[0]=[createTextVNode(" mdi-menu-down ")])),_:1})]),_:2},1040,["text","data-test"])]),default:withCtx(()=>[createVNode(t,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(xe.items,(_,S)=>(openBlock(),createElementBlock(Fragment,null,[_.divider?(openBlock(),createBlock(o,{key:S+"-divider"})):_.subMenu&&_.subMenu.length>0?(openBlock(),createElementBlock("div",{key:S+"-submenu"},[(openBlock(),createBlock(e,{"open-on-hover":"",location:"right",key:S},{activator:withCtx(({props:Ae})=>[(openBlock(),createBlock(r,mergeProps({ref_for:!0},Ae,{disabled:_.disabled,key:S}),createSlots({append:withCtx(()=>[createVNode(l,null,{default:withCtx(()=>b[1]||(b[1]=[createTextVNode(" mdi-chevron-right ")])),_:1})]),default:withCtx(()=>[!_.radio&&!_.checkbox?(openBlock(),createBlock(i,{key:0,style:normalizeStyle("cursor: pointer;"+(_.disabled?"opacity: 0.2":""))},{default:withCtx(()=>[createTextVNode(toDisplayString(_.label),1)]),_:2},1032,["style"])):createCommentVNode("",!0)]),_:2},[_.icon?{name:"prepend",fn:withCtx(()=>[createVNode(l,{disabled:_.disabled},{default:withCtx(()=>[createTextVNode(toDisplayString(_.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:withCtx(()=>[createVNode(t,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(_.subMenu,(Ae,Vn)=>(openBlock(),createBlock(r,{key:Vn,"prepend-icon":Ae.icon,onClick:Me=>Q.subMenuClick(Ae)},{default:withCtx(()=>[createVNode(i,null,{default:withCtx(()=>[createTextVNode(toDisplayString(Ae.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):_.radioGroup?(openBlock(),createBlock(d,{"model-value":_.value,"onUpdate:modelValue":_.command,key:S+"-radio-group","hide-details":"",density:"compact",class:"ma-0 pa-0"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(_.choices,(Ae,Vn)=>(openBlock(),createBlock(r,{key:Vn+"-choice"},{default:withCtx(()=>[createVNode(a,{class:"list-action"},{default:withCtx(()=>[createVNode(n,{color:"secondary",label:Ae.label,value:Ae.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(openBlock(),createBlock(r,{onClick:Ae=>_.command(_),disabled:_.disabled,"data-test":Q.formatDT(`${p.title} ${xe.label} ${_.label}`),key:S+"-list"},createSlots({default:withCtx(()=>[_.checkbox?(openBlock(),createBlock(a,{key:0,class:"list-action"},{default:withCtx(()=>[createVNode(f,{modelValue:_.checked,"onUpdate:modelValue":Ae=>_.checked=Ae,label:_.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):createCommentVNode("",!0),!_.radio&&!_.checkbox?(openBlock(),createBlock(i,{key:1,style:normalizeStyle("cursor: pointer;"+(_.disabled?"opacity: 0.2":""))},{default:withCtx(()=>[createTextVNode(toDisplayString(_.label),1)]),_:2},1032,["style"])):createCommentVNode("",!0)]),_:2},[_.icon?{name:"prepend",fn:withCtx(()=>[createVNode(l,{icon:_.icon,disabled:_.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["onClick","disabled","data-test"]))],64))),256))]),_:2},1024)]),_:2},1024))),128))]),_:1})])}const W=s(I$1,[["render",q$1],["__scopeId","data-v-4d454b93"]]);var sprintf$1={},hasRequiredSprintf;function requireSprintf(){return hasRequiredSprintf||(hasRequiredSprintf=1,function(x){(function(){var b={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function p(M){return Gn(R(M),arguments)}function m(M,l){return p.apply(null,[M].concat(l||[]))}function Gn(M,l){var u=1,o=M.length,i,r="",t,e,n,a,d,f,xe,F;for(t=0;t<o;t++)if(typeof M[t]=="string")r+=M[t];else if(typeof M[t]=="object"){if(n=M[t],n.keys)for(i=l[u],e=0;e<n.keys.length;e++){if(i==null)throw new Error(p('[sprintf] Cannot access property "%s" of undefined value "%s"',n.keys[e],n.keys[e-1]));i=i[n.keys[e]]}else n.param_no?i=l[n.param_no]:i=l[u++];if(b.not_type.test(n.type)&&b.not_primitive.test(n.type)&&i instanceof Function&&(i=i()),b.numeric_arg.test(n.type)&&typeof i!="number"&&isNaN(i))throw new TypeError(p("[sprintf] expecting number but found %T",i));switch(b.number.test(n.type)&&(xe=i>=0),n.type){case"b":i=parseInt(i,10).toString(2);break;case"c":i=String.fromCharCode(parseInt(i,10));break;case"d":case"i":i=parseInt(i,10);break;case"j":i=JSON.stringify(i,null,n.width?parseInt(n.width):0);break;case"e":i=n.precision?parseFloat(i).toExponential(n.precision):parseFloat(i).toExponential();break;case"f":i=n.precision?parseFloat(i).toFixed(n.precision):parseFloat(i);break;case"g":i=n.precision?String(Number(i.toPrecision(n.precision))):parseFloat(i);break;case"o":i=(parseInt(i,10)>>>0).toString(8);break;case"s":i=String(i),i=n.precision?i.substring(0,n.precision):i;break;case"t":i=String(!!i),i=n.precision?i.substring(0,n.precision):i;break;case"T":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=n.precision?i.substring(0,n.precision):i;break;case"u":i=parseInt(i,10)>>>0;break;case"v":i=i.valueOf(),i=n.precision?i.substring(0,n.precision):i;break;case"x":i=(parseInt(i,10)>>>0).toString(16);break;case"X":i=(parseInt(i,10)>>>0).toString(16).toUpperCase();break}b.json.test(n.type)?r+=i:(b.number.test(n.type)&&(!xe||n.sign)?(F=xe?"+":"-",i=i.toString().replace(b.sign,"")):F="",d=n.pad_char?n.pad_char==="0"?"0":n.pad_char.charAt(1):" ",f=n.width-(F+i).length,a=n.width&&f>0?d.repeat(f):"",r+=n.align?F+i+a:d==="0"?F+a+i:a+F+i)}return r}var Q=Object.create(null);function R(M){if(Q[M])return Q[M];for(var l=M,u,o=[],i=0;l;){if((u=b.text.exec(l))!==null)o.push(u[0]);else if((u=b.modulo.exec(l))!==null)o.push("%");else if((u=b.placeholder.exec(l))!==null){if(u[2]){i|=1;var r=[],t=u[2],e=[];if((e=b.key.exec(t))!==null)for(r.push(e[1]);(t=t.substring(e[0].length))!=="";)if((e=b.key_access.exec(t))!==null)r.push(e[1]);else if((e=b.index_access.exec(t))!==null)r.push(e[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");u[2]=r}else i|=2;if(i===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");o.push({placeholder:u[0],param_no:u[1],keys:u[2],sign:u[3],pad_char:u[4],align:u[5],width:u[6],precision:u[7],type:u[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");l=l.substring(u[0].length)}return Q[M]=o}x.sprintf=p,x.vsprintf=m,typeof window<"u"&&(window.sprintf=p,window.vsprintf=m)})()}(sprintf$1)),sprintf$1}requireSprintf();var ace$1={exports:{}},hasRequiredAce;function requireAce(){return hasRequiredAce||(hasRequiredAce=1,function(x,b){(function(){var p="ace",m=function(){return this}();!m&&typeof window<"u"&&(m=window);var Gn=function(o,i,r){if(typeof o!="string"){Gn.original?Gn.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(r=i),Gn.modules[o]||(Gn.payloads[o]=r,Gn.modules[o]=null)};Gn.modules={},Gn.payloads={};var Q=function(o,i,r){if(typeof i=="string"){var t=l(o,i);if(t!=null)return r&&r(),t}else if(Object.prototype.toString.call(i)==="[object Array]"){for(var e=[],n=0,a=i.length;n<a;++n){var d=l(o,i[n]);if(d==null&&R.original)return;e.push(d)}return r&&r.apply(null,e)||!0}},R=function(o,i){var r=Q("",o,i);return r==null&&R.original?R.original.apply(this,arguments):r},M=function(o,i){if(i.indexOf("!")!==-1){var r=i.split("!");return M(o,r[0])+"!"+M(o,r[1])}if(i.charAt(0)=="."){var t=o.split("/").slice(0,-1).join("/");for(i=t+"/"+i;i.indexOf(".")!==-1&&e!=i;){var e=i;i=i.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return i},l=function(o,i){i=M(o,i);var r=Gn.modules[i];if(!r){if(r=Gn.payloads[i],typeof r=="function"){var t={},e={id:i,uri:"",exports:t,packaged:!0},n=function(d,f){return Q(i,d,f)},a=r(n,t,e);t=a||e.exports,Gn.modules[i]=t,delete Gn.payloads[i]}r=Gn.modules[i]=t||r}return r};function u(o){var i=m;m[o]||(m[o]={}),i=m[o],(!i.define||!i.define.packaged)&&(Gn.original=i.define,i.define=Gn,i.define.packaged=!0),(!i.require||!i.require.packaged)&&(R.original=i.require,i.require=R,i.require.packaged=!0)}u(p)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(p,m,Gn){function Q(R,M,l){Object.defineProperty(R,M,{value:l,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||Q(String.prototype,"startsWith",function(R,M){return M=M||0,this.lastIndexOf(R,M)===M}),String.prototype.endsWith||Q(String.prototype,"endsWith",function(R,M){var l=this;(M===void 0||M>l.length)&&(M=l.length),M-=R.length;var u=l.indexOf(R,M);return u!==-1&&u===M}),String.prototype.repeat||Q(String.prototype,"repeat",function(R){for(var M="",l=this;R>0;)R&1&&(M+=l),(R>>=1)&&(l+=l);return M}),String.prototype.includes||Q(String.prototype,"includes",function(R,M){return this.indexOf(R,M)!=-1}),Object.assign||(Object.assign=function(R){if(R==null)throw new TypeError("Cannot convert undefined or null to object");for(var M=Object(R),l=1;l<arguments.length;l++){var u=arguments[l];u!=null&&Object.keys(u).forEach(function(o){M[o]=u[o]})}return M}),Object.values||(Object.values=function(R){return Object.keys(R).map(function(M){return R[M]})}),Array.prototype.find||Q(Array.prototype,"find",function(R){for(var M=this.length,l=arguments[1],u=0;u<M;u++){var o=this[u];if(R.call(l,o,u,this))return o}}),Array.prototype.findIndex||Q(Array.prototype,"findIndex",function(R){for(var M=this.length,l=arguments[1],u=0;u<M;u++){var o=this[u];if(R.call(l,o,u,this))return u}}),Array.prototype.includes||Q(Array.prototype,"includes",function(R,M){return this.indexOf(R,M)!=-1}),Array.prototype.fill||Q(Array.prototype,"fill",function(R){for(var M=this,l=M.length>>>0,u=arguments[1],o=u>>0,i=o<0?Math.max(l+o,0):Math.min(o,l),r=arguments[2],t=r===void 0?l:r>>0,e=t<0?Math.max(l+t,0):Math.min(t,l);i<e;)M[i]=R,i++;return M}),Array.of||Q(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(p,m,Gn){p("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(p,m,Gn){m.deepCopy=function Q(R){if(typeof R!="object"||!R)return R;var M;if(Array.isArray(R)){M=[];for(var l=0;l<R.length;l++)M[l]=Q(R[l]);return M}if(Object.prototype.toString.call(R)!=="[object Object]")return R;M={};for(var l in R)M[l]=Q(R[l]);return M}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(p,m,Gn){m.last=function(M){return M[M.length-1]},m.stringReverse=function(M){return M.split("").reverse().join("")},m.stringRepeat=function(M,l){for(var u="";l>0;)l&1&&(u+=M),(l>>=1)&&(M+=M);return u};var Q=/^\s\s*/,R=/\s\s*$/;m.stringTrimLeft=function(M){return M.replace(Q,"")},m.stringTrimRight=function(M){return M.replace(R,"")},m.copyObject=function(M){var l={};for(var u in M)l[u]=M[u];return l},m.copyArray=function(M){for(var l=[],u=0,o=M.length;u<o;u++)M[u]&&typeof M[u]=="object"?l[u]=this.copyObject(M[u]):l[u]=M[u];return l},m.deepCopy=p("./deep_copy").deepCopy,m.arrayToMap=function(M){for(var l={},u=0;u<M.length;u++)l[M[u]]=1;return l},m.createMap=function(M){var l=Object.create(null);for(var u in M)l[u]=M[u];return l},m.arrayRemove=function(M,l){for(var u=0;u<=M.length;u++)l===M[u]&&M.splice(u,1)},m.escapeRegExp=function(M){return M.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},m.escapeHTML=function(M){return(""+M).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},m.getMatchOffsets=function(M,l){var u=[];return M.replace(l,function(o){u.push({offset:arguments[arguments.length-2],length:o.length})}),u},m.deferredCall=function(M){var l=null,u=function(){l=null,M()},o=function(i){return o.cancel(),l=setTimeout(u,i||0),o};return o.schedule=o,o.call=function(){return this.cancel(),M(),o},o.cancel=function(){return clearTimeout(l),l=null,o},o.isPending=function(){return l},o},m.delayedCall=function(M,l){var u=null,o=function(){u=null,M()},i=function(r){u==null&&(u=setTimeout(o,r||l))};return i.delay=function(r){u&&clearTimeout(u),u=setTimeout(o,r||l)},i.schedule=i,i.call=function(){this.cancel(),M()},i.cancel=function(){u&&clearTimeout(u),u=null},i.isPending=function(){return u},i},m.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},m.skipEmptyMatch=function(M,l,u){return u&&M.codePointAt(l)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(p,m,Gn){m.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},m.getOS=function(){return m.isMac?m.OS.MAC:m.isLinux?m.OS.LINUX:m.OS.WINDOWS};var Q=typeof navigator=="object"?navigator:{},R=(/mac|win|linux/i.exec(Q.platform)||["other"])[0].toLowerCase(),M=Q.userAgent||"",l=Q.appName||"";m.isWin=R=="win",m.isMac=R=="mac",m.isLinux=R=="linux",m.isIE=l=="Microsoft Internet Explorer"||l.indexOf("MSAppHost")>=0?parseFloat((M.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((M.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),m.isOldIE=m.isIE&&m.isIE<9,m.isGecko=m.isMozilla=M.match(/ Gecko\/\d+/),m.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",m.isWebKit=parseFloat(M.split("WebKit/")[1])||void 0,m.isChrome=parseFloat(M.split(" Chrome/")[1])||void 0,m.isSafari=parseFloat(M.split(" Safari/")[1])&&!m.isChrome||void 0,m.isEdge=parseFloat(M.split(" Edge/")[1])||void 0,m.isAIR=M.indexOf("AdobeAIR")>=0,m.isAndroid=M.indexOf("Android")>=0,m.isChromeOS=M.indexOf(" CrOS ")>=0,m.isIOS=/iPad|iPhone|iPod/.test(M)&&!window.MSStream,m.isIOS&&(m.isMac=!0),m.isMobile=m.isIOS||m.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(p,m,Gn){var Q=p("./useragent"),R="http://www.w3.org/1999/xhtml";m.buildDom=function r(t,e,n){if(typeof t=="string"&&t){var a=document.createTextNode(t);return e&&e.appendChild(a),a}if(!Array.isArray(t))return t&&t.appendChild&&e&&e.appendChild(t),t;if(typeof t[0]!="string"||!t[0]){for(var d=[],f=0;f<t.length;f++){var xe=r(t[f],e,n);xe&&d.push(xe)}return d}var F=document.createElement(t[0]),_=t[1],S=1;_&&typeof _=="object"&&!Array.isArray(_)&&(S=2);for(var f=S;f<t.length;f++)r(t[f],F,n);return S==2&&Object.keys(_).forEach(function(Ae){var Vn=_[Ae];Ae==="class"?F.className=Array.isArray(Vn)?Vn.join(" "):Vn:typeof Vn=="function"||Ae=="value"||Ae[0]=="$"?F[Ae]=Vn:Ae==="ref"?n&&(n[Vn]=F):Ae==="style"?typeof Vn=="string"&&(F.style.cssText=Vn):Vn!=null&&F.setAttribute(Ae,Vn)}),e&&e.appendChild(F),F},m.getDocumentHead=function(r){return r||(r=document),r.head||r.getElementsByTagName("head")[0]||r.documentElement},m.createElement=function(r,t){return document.createElementNS?document.createElementNS(t||R,r):document.createElement(r)},m.removeChildren=function(r){r.innerHTML=""},m.createTextNode=function(r,t){var e=t?t.ownerDocument:document;return e.createTextNode(r)},m.createFragment=function(r){var t=r?r.ownerDocument:document;return t.createDocumentFragment()},m.hasCssClass=function(r,t){var e=(r.className+"").split(/\s+/g);return e.indexOf(t)!==-1},m.addCssClass=function(r,t){m.hasCssClass(r,t)||(r.className+=" "+t)},m.removeCssClass=function(r,t){for(var e=r.className.split(/\s+/g);;){var n=e.indexOf(t);if(n==-1)break;e.splice(n,1)}r.className=e.join(" ")},m.toggleCssClass=function(r,t){for(var e=r.className.split(/\s+/g),n=!0;;){var a=e.indexOf(t);if(a==-1)break;n=!1,e.splice(a,1)}return n&&e.push(t),r.className=e.join(" "),n},m.setCssClass=function(r,t,e){e?m.addCssClass(r,t):m.removeCssClass(r,t)},m.hasCssString=function(r,t){var e=0,n;if(t=t||document,n=t.querySelectorAll("style")){for(;e<n.length;)if(n[e++].id===r)return!0}},m.removeElementById=function(r,t){t=t||document,t.getElementById(r)&&t.getElementById(r).remove()};var M,l=[];m.useStrictCSP=function(r){M=r,r==!1?u():l||(l=[])};function u(){var r=l;l=null,r&&r.forEach(function(t){o(t[0],t[1])})}function o(r,t,e){if(!(typeof document>"u")){if(l){if(e)u();else if(e===!1)return l.push([r,t])}if(!M){var n=e;!e||!e.getRootNode?n=document:(n=e.getRootNode(),(!n||n==e)&&(n=document));var a=n.ownerDocument||n;if(t&&m.hasCssString(t,n))return null;t&&(r+=`
3
+ /*# sourceURL=ace/css/`+t+" */");var d=m.createElement("style");d.appendChild(a.createTextNode(r)),t&&(d.id=t),n==a&&(n=m.getDocumentHead(a)),n.insertBefore(d,n.firstChild)}}}if(m.importCssString=o,m.importCssStylsheet=function(r,t){m.buildDom(["link",{rel:"stylesheet",href:r}],m.getDocumentHead(t))},m.scrollbarWidth=function(r){var t=m.createElement("ace_inner");t.style.width="100%",t.style.minWidth="0px",t.style.height="200px",t.style.display="block";var e=m.createElement("ace_outer"),n=e.style;n.position="absolute",n.left="-10000px",n.overflow="hidden",n.width="200px",n.minWidth="0px",n.height="150px",n.display="block",e.appendChild(t);var a=r&&r.documentElement||document&&document.documentElement;if(!a)return 0;a.appendChild(e);var d=t.offsetWidth;n.overflow="scroll";var f=t.offsetWidth;return d===f&&(f=e.clientWidth),a.removeChild(e),d-f},m.computedStyle=function(r,t){return window.getComputedStyle(r,"")||{}},m.setStyle=function(r,t,e){r[t]!==e&&(r[t]=e)},m.HAS_CSS_ANIMATION=!1,m.HAS_CSS_TRANSFORMS=!1,m.HI_DPI=Q.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,Q.isChromeOS&&(m.HI_DPI=!1),typeof document<"u"){var i=document.createElement("div");m.HI_DPI&&i.style.transform!==void 0&&(m.HAS_CSS_TRANSFORMS=!0),!Q.isEdge&&typeof i.style.animationName<"u"&&(m.HAS_CSS_ANIMATION=!0),i=null}m.HAS_CSS_TRANSFORMS?m.translate=function(r,t,e){r.style.transform="translate("+Math.round(t)+"px, "+Math.round(e)+"px)"}:m.translate=function(r,t,e){r.style.top=Math.round(e)+"px",r.style.left=Math.round(t)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(p,m,Gn){/*
4
+ * based on code from:
5
+ *
6
+ * @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
7
+ * Available via the MIT or new BSD license.
8
+ * see: http://github.com/jrburke/requirejs for details
9
+ */var Q=p("./dom");m.get=function(R,M){var l=new XMLHttpRequest;l.open("GET",R,!0),l.onreadystatechange=function(){l.readyState===4&&M(l.responseText)},l.send(null)},m.loadScript=function(R,M){var l=Q.getDocumentHead(),u=document.createElement("script");u.src=R,l.appendChild(u),u.onload=u.onreadystatechange=function(o,i){(i||!u.readyState||u.readyState=="loaded"||u.readyState=="complete")&&(u=u.onload=u.onreadystatechange=null,i||M())}},m.qualifyURL=function(R){var M=document.createElement("a");return M.href=R,M.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(p,m,Gn){m.inherits=function(Q,R){Q.super_=R,Q.prototype=Object.create(R.prototype,{constructor:{value:Q,enumerable:!1,writable:!0,configurable:!0}})},m.mixin=function(Q,R){for(var M in R)Q[M]=R[M];return Q},m.implement=function(Q,R){m.mixin(Q,R)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(p,m,Gn){var Q={},R=function(){this.propagationStopped=!0},M=function(){this.defaultPrevented=!0};Q._emit=Q._dispatchEvent=function(l,u){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var o=this._eventRegistry[l]||[],i=this._defaultHandlers[l];if(!(!o.length&&!i)){(typeof u!="object"||!u)&&(u={}),u.type||(u.type=l),u.stopPropagation||(u.stopPropagation=R),u.preventDefault||(u.preventDefault=M),o=o.slice();for(var r=0;r<o.length&&(o[r](u,this),!u.propagationStopped);r++);if(i&&!u.defaultPrevented)return i(u,this)}},Q._signal=function(l,u){var o=(this._eventRegistry||{})[l];if(o){o=o.slice();for(var i=0;i<o.length;i++)o[i](u,this)}},Q.once=function(l,u){var o=this;if(this.on(l,function i(){o.off(l,i),u.apply(null,arguments)}),!u)return new Promise(function(i){u=i})},Q.setDefaultHandler=function(l,u){var o=this._defaultHandlers;if(o||(o=this._defaultHandlers={_disabled_:{}}),o[l]){var i=o[l],r=o._disabled_[l];r||(o._disabled_[l]=r=[]),r.push(i);var t=r.indexOf(u);t!=-1&&r.splice(t,1)}o[l]=u},Q.removeDefaultHandler=function(l,u){var o=this._defaultHandlers;if(o){var i=o._disabled_[l];if(o[l]==u)i&&this.setDefaultHandler(l,i.pop());else if(i){var r=i.indexOf(u);r!=-1&&i.splice(r,1)}}},Q.on=Q.addEventListener=function(l,u,o){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[l];return i||(i=this._eventRegistry[l]=[]),i.indexOf(u)==-1&&i[o?"unshift":"push"](u),u},Q.off=Q.removeListener=Q.removeEventListener=function(l,u){this._eventRegistry=this._eventRegistry||{};var o=this._eventRegistry[l];if(o){var i=o.indexOf(u);i!==-1&&o.splice(i,1)}},Q.removeAllListeners=function(l){l||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[l]=void 0),this._defaultHandlers&&(this._defaultHandlers[l]=void 0)},m.EventEmitter=Q}),ace.define("ace/lib/report_error",["require","exports","module"],function(p,m,Gn){m.reportError=function(R,M){var l=new Error(R);l.data=M,typeof console=="object"&&console.error&&console.error(l),setTimeout(function(){throw l})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(p,m,Gn){var Q={"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","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"};m.defaultEnglishMessages=Q}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error","ace/lib/default_english_messages"],function(p,m,Gn){"no use strict";var Q=p("./oop"),R=p("./event_emitter").EventEmitter,M=p("./report_error").reportError,l=p("./default_english_messages").defaultEnglishMessages,u={setOptions:function(e){Object.keys(e).forEach(function(n){this.setOption(n,e[n])},this)},getOptions:function(e){var n={};if(e)Array.isArray(e)||(n=e,e=Object.keys(n));else{var a=this.$options;e=Object.keys(a).filter(function(d){return!a[d].hidden})}return e.forEach(function(d){n[d]=this.getOption(d)},this),n},setOption:function(e,n){if(this["$"+e]!==n){var a=this.$options[e];if(!a)return o('misspelled option "'+e+'"');if(a.forwardTo)return this[a.forwardTo]&&this[a.forwardTo].setOption(e,n);a.handlesSet||(this["$"+e]=n),a&&a.set&&a.set.call(this,n)}},getOption:function(e){var n=this.$options[e];return n?n.forwardTo?this[n.forwardTo]&&this[n.forwardTo].getOption(e):n&&n.get?n.get.call(this):this["$"+e]:o('misspelled option "'+e+'"')}};function o(e){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var i,r,t=function(){function e(){this.$defaultOptions={},i=l,r="dollarSigns"}return e.prototype.defineOptions=function(n,a,d){return n.$options||(this.$defaultOptions[a]=n.$options={}),Object.keys(d).forEach(function(f){var xe=d[f];typeof xe=="string"&&(xe={forwardTo:xe}),xe.name||(xe.name=f),n.$options[xe.name]=xe,"initialValue"in xe&&(n["$"+xe.name]=xe.initialValue)}),Q.implement(n,u),this},e.prototype.resetOptions=function(n){Object.keys(n.$options).forEach(function(a){var d=n.$options[a];"value"in d&&n.setOption(a,d.value)})},e.prototype.setDefaultValue=function(n,a,d){if(!n){for(n in this.$defaultOptions)if(this.$defaultOptions[n][a])break;if(!this.$defaultOptions[n][a])return!1}var f=this.$defaultOptions[n]||(this.$defaultOptions[n]={});f[a]&&(f.forwardTo?this.setDefaultValue(f.forwardTo,a,d):f[a].value=d)},e.prototype.setDefaultValues=function(n,a){Object.keys(a).forEach(function(d){this.setDefaultValue(n,d,a[d])},this)},e.prototype.setMessages=function(n,a){i=n,a&&a.placeholders&&(r=a.placeholders)},e.prototype.nls=function(n,a,d){i[n]||(o("No message found for the key '"+n+"' in messages with id "+i.$id+", trying to find a translation for the default string '"+a+"'."),i[a]||o("No message found for the default string '"+a+"' in the provided messages. Falling back to the default English message."));var f=i[n]||i[a]||a;return d&&(r==="dollarSigns"&&(f=f.replace(/\$(\$|[\d]+)/g,function(xe,F){return F=="$"?"$":d[F]})),r==="curlyBrackets"&&(f=f.replace(/\{([^\}]+)\}/g,function(xe,F){return d[F]}))),f},e}();t.prototype.warn=o,t.prototype.reportError=M,Q.implement(t.prototype,R),m.AppConfig=t}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(p,m,Gn){Gn.exports=`.ace-tm .ace_gutter {
10
+ background: #f0f0f0;
11
+ color: #333;
12
+ }
13
+
14
+ .ace-tm .ace_print-margin {
15
+ width: 1px;
16
+ background: #e8e8e8;
17
+ }
18
+
19
+ .ace-tm .ace_fold {
20
+ background-color: #6B72E6;
21
+ }
22
+
23
+ .ace-tm {
24
+ background-color: #FFFFFF;
25
+ color: black;
26
+ }
27
+
28
+ .ace-tm .ace_cursor {
29
+ color: black;
30
+ }
31
+
32
+ .ace-tm .ace_invisible {
33
+ color: rgb(191, 191, 191);
34
+ }
35
+
36
+ .ace-tm .ace_storage,
37
+ .ace-tm .ace_keyword {
38
+ color: blue;
39
+ }
40
+
41
+ .ace-tm .ace_constant {
42
+ color: rgb(197, 6, 11);
43
+ }
44
+
45
+ .ace-tm .ace_constant.ace_buildin {
46
+ color: rgb(88, 72, 246);
47
+ }
48
+
49
+ .ace-tm .ace_constant.ace_language {
50
+ color: rgb(88, 92, 246);
51
+ }
52
+
53
+ .ace-tm .ace_constant.ace_library {
54
+ color: rgb(6, 150, 14);
55
+ }
56
+
57
+ .ace-tm .ace_invalid {
58
+ background-color: rgba(255, 0, 0, 0.1);
59
+ color: red;
60
+ }
61
+
62
+ .ace-tm .ace_support.ace_function {
63
+ color: rgb(60, 76, 114);
64
+ }
65
+
66
+ .ace-tm .ace_support.ace_constant {
67
+ color: rgb(6, 150, 14);
68
+ }
69
+
70
+ .ace-tm .ace_support.ace_type,
71
+ .ace-tm .ace_support.ace_class {
72
+ color: rgb(109, 121, 222);
73
+ }
74
+
75
+ .ace-tm .ace_keyword.ace_operator {
76
+ color: rgb(104, 118, 135);
77
+ }
78
+
79
+ .ace-tm .ace_string {
80
+ color: rgb(3, 106, 7);
81
+ }
82
+
83
+ .ace-tm .ace_comment {
84
+ color: rgb(76, 136, 107);
85
+ }
86
+
87
+ .ace-tm .ace_comment.ace_doc {
88
+ color: rgb(0, 102, 255);
89
+ }
90
+
91
+ .ace-tm .ace_comment.ace_doc.ace_tag {
92
+ color: rgb(128, 159, 191);
93
+ }
94
+
95
+ .ace-tm .ace_constant.ace_numeric {
96
+ color: rgb(0, 0, 205);
97
+ }
98
+
99
+ .ace-tm .ace_variable {
100
+ color: rgb(49, 132, 149);
101
+ }
102
+
103
+ .ace-tm .ace_xml-pe {
104
+ color: rgb(104, 104, 91);
105
+ }
106
+
107
+ .ace-tm .ace_entity.ace_name.ace_function {
108
+ color: #0000A2;
109
+ }
110
+
111
+
112
+ .ace-tm .ace_heading {
113
+ color: rgb(12, 7, 255);
114
+ }
115
+
116
+ .ace-tm .ace_list {
117
+ color:rgb(185, 6, 144);
118
+ }
119
+
120
+ .ace-tm .ace_meta.ace_tag {
121
+ color:rgb(0, 22, 142);
122
+ }
123
+
124
+ .ace-tm .ace_string.ace_regex {
125
+ color: rgb(255, 0, 0)
126
+ }
127
+
128
+ .ace-tm .ace_marker-layer .ace_selection {
129
+ background: rgb(181, 213, 255);
130
+ }
131
+ .ace-tm.ace_multiselect .ace_selection.ace_start {
132
+ box-shadow: 0 0 3px 0px white;
133
+ }
134
+ .ace-tm .ace_marker-layer .ace_step {
135
+ background: rgb(252, 255, 0);
136
+ }
137
+
138
+ .ace-tm .ace_marker-layer .ace_stack {
139
+ background: rgb(164, 229, 101);
140
+ }
141
+
142
+ .ace-tm .ace_marker-layer .ace_bracket {
143
+ margin: -1px 0 0 -1px;
144
+ border: 1px solid rgb(192, 192, 192);
145
+ }
146
+
147
+ .ace-tm .ace_marker-layer .ace_active-line {
148
+ background: rgba(0, 0, 0, 0.07);
149
+ }
150
+
151
+ .ace-tm .ace_gutter-active-line {
152
+ background-color : #dcdcdc;
153
+ }
154
+
155
+ .ace-tm .ace_marker-layer .ace_selected-word {
156
+ background: rgb(250, 250, 255);
157
+ border: 1px solid rgb(200, 200, 250);
158
+ }
159
+
160
+ .ace-tm .ace_indent-guide {
161
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
162
+ }
163
+
164
+ .ace-tm .ace_indent-guide-active {
165
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
166
+ }
167
+ `}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(p,m,Gn){m.isDark=!1,m.cssClass="ace-tm",m.cssText=p("./textmate-css"),m.$id="ace/theme/textmate";var Q=p("../lib/dom");Q.importCssString(m.cssText,m.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(p,m,Gn){"no use strict";var Q=p("./lib/lang"),R=p("./lib/net"),M=p("./lib/dom"),l=p("./lib/app_config").AppConfig;Gn.exports=m=new l;var u={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};m.get=function(t){if(!u.hasOwnProperty(t))throw new Error("Unknown config key: "+t);return u[t]},m.set=function(t,e){if(u.hasOwnProperty(t))u[t]=e;else if(this.setDefaultValue("",t,e)==!1)throw new Error("Unknown config key: "+t);t=="useStrictCSP"&&M.useStrictCSP(e)},m.all=function(){return Q.copyObject(u)},m.$modes={},m.moduleUrl=function(t,e){if(u.$moduleUrls[t])return u.$moduleUrls[t];var n=t.split("/");e=e||n[n.length-2]||"";var a=e=="snippets"?"/":"-",d=n[n.length-1];if(e=="worker"&&a=="-"){var f=new RegExp("^"+e+"[\\-_]|[\\-_]"+e+"$","g");d=d.replace(f,"")}(!d||d==e)&&n.length>1&&(d=n[n.length-2]);var xe=u[e+"Path"];return xe==null?xe=u.basePath:a=="/"&&(e=a=""),xe&&xe.slice(-1)!="/"&&(xe+="/"),xe+e+a+d+this.get("suffix")},m.setModuleUrl=function(t,e){return u.$moduleUrls[t]=e};var o=function(t,e){if(t==="ace/theme/textmate"||t==="./theme/textmate")return e(null,p("./theme/textmate"));if(i)return i(t,e);console.error("loader is not configured")},i;m.setLoader=function(t){i=t},m.dynamicModules=Object.create(null),m.$loading={},m.$loaded={},m.loadModule=function(t,e){var n;if(Array.isArray(t))var a=t[0],d=t[1];else if(typeof t=="string")var d=t;var f=function(xe){if(xe&&!m.$loading[d])return e&&e(xe);if(m.$loading[d]||(m.$loading[d]=[]),m.$loading[d].push(e),!(m.$loading[d].length>1)){var F=function(){o(d,function(_,S){S&&(m.$loaded[d]=S),m._emit("load.module",{name:d,module:S});var Ae=m.$loading[d];m.$loading[d]=null,Ae.forEach(function(Vn){Vn&&Vn(S)})})};if(!m.get("packaged"))return F();R.loadScript(m.moduleUrl(d,a),F),r()}};if(m.dynamicModules[d])m.dynamicModules[d]().then(function(xe){xe.default?f(xe.default):f(xe)});else{try{n=this.$require(d)}catch{}f(n||m.$loaded[d])}},m.$require=function(t){if(typeof Gn.require=="function"){var e="require";return Gn[e](t)}},m.setModuleLoader=function(t,e){m.dynamicModules[t]=e};var r=function(){!u.basePath&&!u.workerPath&&!u.modePath&&!u.themePath&&!Object.keys(u.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),r=function(){})};m.version="1.37.0"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(p,m,Gn){p("./lib/fixoldbrowsers");var Q=p("./config");Q.setLoader(function(u,o){p([u],function(i){o(null,i)})});var R=function(){return this||typeof window<"u"&&window}();Gn.exports=function(u){Q.init=M,Q.$require=p,u.require=p},M(!0);function M(u){if(!(!R||!R.document)){Q.set("packaged",u||p.packaged||Gn.packaged||R.define&&(void 0).packaged);var o={},i="",r=document.currentScript||document._currentScript,t=r&&r.ownerDocument||document;r&&r.src&&(i=r.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var e=t.getElementsByTagName("script"),n=0;n<e.length;n++){var a=e[n],d=a.src||a.getAttribute("src");if(d){for(var f=a.attributes,xe=0,F=f.length;xe<F;xe++){var _=f[xe];_.name.indexOf("data-ace-")===0&&(o[l(_.name.replace(/^data-ace-/,""))]=_.value)}var S=d.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);S&&(i=S[1])}}i&&(o.base=o.base||i,o.packaged=!0),o.basePath=o.base,o.workerPath=o.workerPath||o.base,o.modePath=o.modePath||o.base,o.themePath=o.themePath||o.base,delete o.base;for(var Ae in o)typeof o[Ae]<"u"&&Q.set(Ae,o[Ae])}}function l(u){return u.replace(/-(.)/g,function(o,i){return i.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(p,m,Gn){var Q=function(){function R(M,l,u,o){this.start={row:M,column:l},this.end={row:u,column:o}}return R.prototype.isEqual=function(M){return this.start.row===M.start.row&&this.end.row===M.end.row&&this.start.column===M.start.column&&this.end.column===M.end.column},R.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},R.prototype.contains=function(M,l){return this.compare(M,l)==0},R.prototype.compareRange=function(M){var l,u=M.end,o=M.start;return l=this.compare(u.row,u.column),l==1?(l=this.compare(o.row,o.column),l==1?2:l==0?1:0):l==-1?-2:(l=this.compare(o.row,o.column),l==-1?-1:l==1?42:0)},R.prototype.comparePoint=function(M){return this.compare(M.row,M.column)},R.prototype.containsRange=function(M){return this.comparePoint(M.start)==0&&this.comparePoint(M.end)==0},R.prototype.intersects=function(M){var l=this.compareRange(M);return l==-1||l==0||l==1},R.prototype.isEnd=function(M,l){return this.end.row==M&&this.end.column==l},R.prototype.isStart=function(M,l){return this.start.row==M&&this.start.column==l},R.prototype.setStart=function(M,l){typeof M=="object"?(this.start.column=M.column,this.start.row=M.row):(this.start.row=M,this.start.column=l)},R.prototype.setEnd=function(M,l){typeof M=="object"?(this.end.column=M.column,this.end.row=M.row):(this.end.row=M,this.end.column=l)},R.prototype.inside=function(M,l){return this.compare(M,l)==0?!(this.isEnd(M,l)||this.isStart(M,l)):!1},R.prototype.insideStart=function(M,l){return this.compare(M,l)==0?!this.isEnd(M,l):!1},R.prototype.insideEnd=function(M,l){return this.compare(M,l)==0?!this.isStart(M,l):!1},R.prototype.compare=function(M,l){return!this.isMultiLine()&&M===this.start.row?l<this.start.column?-1:l>this.end.column?1:0:M<this.start.row?-1:M>this.end.row?1:this.start.row===M?l>=this.start.column?0:-1:this.end.row===M?l<=this.end.column?0:1:0},R.prototype.compareStart=function(M,l){return this.start.row==M&&this.start.column==l?-1:this.compare(M,l)},R.prototype.compareEnd=function(M,l){return this.end.row==M&&this.end.column==l?1:this.compare(M,l)},R.prototype.compareInside=function(M,l){return this.end.row==M&&this.end.column==l?1:this.start.row==M&&this.start.column==l?-1:this.compare(M,l)},R.prototype.clipRows=function(M,l){if(this.end.row>l)var u={row:l+1,column:0};else if(this.end.row<M)var u={row:M,column:0};if(this.start.row>l)var o={row:l+1,column:0};else if(this.start.row<M)var o={row:M,column:0};return R.fromPoints(o||this.start,u||this.end)},R.prototype.extend=function(M,l){var u=this.compare(M,l);if(u==0)return this;if(u==-1)var o={row:M,column:l};else var i={row:M,column:l};return R.fromPoints(o||this.start,i||this.end)},R.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},R.prototype.isMultiLine=function(){return this.start.row!==this.end.row},R.prototype.clone=function(){return R.fromPoints(this.start,this.end)},R.prototype.collapseRows=function(){return this.end.column==0?new R(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new R(this.start.row,0,this.end.row,0)},R.prototype.toScreenRange=function(M){var l=M.documentToScreenPosition(this.start),u=M.documentToScreenPosition(this.end);return new R(l.row,l.column,u.row,u.column)},R.prototype.moveBy=function(M,l){this.start.row+=M,this.start.column+=l,this.end.row+=M,this.end.column+=l},R}();Q.fromPoints=function(R,M){return new Q(R.row,R.column,M.row,M.column)},Q.comparePoints=function(R,M){return R.row-M.row||R.column-M.column},m.Range=Q}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(p,m,Gn){for(var Q=p("./oop"),R={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:"*"}},M={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},l=0;l<10;l++)M["Digit"+l]=48+l,M["Numpad"+l]=96+l,R.PRINTABLE_KEYS[48+l]=""+l,R.FUNCTION_KEYS[96+l]="Numpad"+l;for(var l=65;l<91;l++){var u=String.fromCharCode(l+32);M["Key"+u.toUpperCase()]=l,R.PRINTABLE_KEYS[l]=u}for(var l=1;l<13;l++)M["F"+l]=111+l,R.FUNCTION_KEYS[111+l]="F"+l;var o={Shift:16,Control:17,Alt:18,Meta:224};for(var i in o)M[i]=M[i+"Left"]=M[i+"Right"]=o[i];m.$codeToKeyCode=M,R.PRINTABLE_KEYS[173]="-";for(var r in R.FUNCTION_KEYS){var t=R.FUNCTION_KEYS[r].toLowerCase();R[t]=parseInt(r,10)}for(var r in R.PRINTABLE_KEYS){var t=R.PRINTABLE_KEYS[r].toLowerCase();R[t]=parseInt(r,10)}Q.mixin(R,R.MODIFIER_KEYS),Q.mixin(R,R.PRINTABLE_KEYS),Q.mixin(R,R.FUNCTION_KEYS),R.enter=R.return,R.escape=R.esc,R.del=R.delete,function(){for(var e=["cmd","ctrl","alt","shift"],n=Math.pow(2,e.length);n--;)R.KEY_MODS[n]=e.filter(function(a){return n&R.KEY_MODS[a]}).join("-")+"-"}(),R.KEY_MODS[0]="",R.KEY_MODS[-1]="input-",Q.mixin(m,R),m.default=m,m.keyCodeToString=function(e){var n=R[e];return typeof n!="string"&&(n=String.fromCharCode(e)),n.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(p,m,Gn){var Q=p("./keys"),R=p("./useragent"),M=null,l=0,u;function o(){u=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return u={passive:!1},!0}})}catch{}}function i(){return u==null&&o(),u}function r(xe,F,_){this.elem=xe,this.type=F,this.callback=_}r.prototype.destroy=function(){e(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var t=m.addListener=function(xe,F,_,S){xe.addEventListener(F,_,i()),S&&S.$toDestroy.push(new r(xe,F,_))},e=m.removeListener=function(xe,F,_){xe.removeEventListener(F,_,i())};m.stopEvent=function(xe){return m.stopPropagation(xe),m.preventDefault(xe),!1},m.stopPropagation=function(xe){xe.stopPropagation&&xe.stopPropagation()},m.preventDefault=function(xe){xe.preventDefault&&xe.preventDefault()},m.getButton=function(xe){return xe.type=="dblclick"?0:xe.type=="contextmenu"||R.isMac&&xe.ctrlKey&&!xe.altKey&&!xe.shiftKey?2:xe.button},m.capture=function(xe,F,_){var S=xe&&xe.ownerDocument||document;function Ae(Vn){F&&F(Vn),_&&_(Vn),e(S,"mousemove",F),e(S,"mouseup",Ae),e(S,"dragstart",Ae)}return t(S,"mousemove",F),t(S,"mouseup",Ae),t(S,"dragstart",Ae),Ae},m.addMouseWheelListener=function(xe,F,_){t(xe,"wheel",function(S){var Ae=.15,Vn=S.deltaX||0,Me=S.deltaY||0;switch(S.deltaMode){case S.DOM_DELTA_PIXEL:S.wheelX=Vn*Ae,S.wheelY=Me*Ae;break;case S.DOM_DELTA_LINE:var oe=15;S.wheelX=Vn*oe,S.wheelY=Me*oe;break;case S.DOM_DELTA_PAGE:var Yn=150;S.wheelX=Vn*Yn,S.wheelY=Me*Yn;break}F(S)},_)},m.addMultiMouseDownListener=function(xe,F,_,S,Ae){var Vn=0,Me,oe,Yn,y={2:"dblclick",3:"tripleclick",4:"quadclick"};function h(w){if(m.getButton(w)!==0?Vn=0:w.detail>1?(Vn++,Vn>4&&(Vn=1)):Vn=1,R.isIE){var J=Math.abs(w.clientX-Me)>5||Math.abs(w.clientY-oe)>5;(!Yn||J)&&(Vn=1),Yn&&clearTimeout(Yn),Yn=setTimeout(function(){Yn=null},F[Vn-1]||600),Vn==1&&(Me=w.clientX,oe=w.clientY)}if(w._clicks=Vn,_[S]("mousedown",w),Vn>4)Vn=0;else if(Vn>1)return _[S](y[Vn],w)}Array.isArray(xe)||(xe=[xe]),xe.forEach(function(w){t(w,"mousedown",h,Ae)})};function n(xe){return 0|(xe.ctrlKey?1:0)|(xe.altKey?2:0)|(xe.shiftKey?4:0)|(xe.metaKey?8:0)}m.getModifierString=function(xe){return Q.KEY_MODS[n(xe)]};function a(xe,F,_){var S=n(F);if(!_&&F.code&&(_=Q.$codeToKeyCode[F.code]||_),!R.isMac&&M){if(F.getModifierState&&(F.getModifierState("OS")||F.getModifierState("Win"))&&(S|=8),M.altGr)if((3&S)!=3)M.altGr=0;else return;if(_===18||_===17){var Ae=F.location;if(_===17&&Ae===1)M[_]==1&&(l=F.timeStamp);else if(_===18&&S===3&&Ae===2){var Vn=F.timeStamp-l;Vn<50&&(M.altGr=!0)}}}if(_ in Q.MODIFIER_KEYS&&(_=-1),!(!S&&_===13&&F.location===3&&(xe(F,S,-_),F.defaultPrevented))){if(R.isChromeOS&&S&8){if(xe(F,S,_),F.defaultPrevented)return;S&=-9}return!S&&!(_ in Q.FUNCTION_KEYS)&&!(_ in Q.PRINTABLE_KEYS)?!1:xe(F,S,_)}}m.addCommandKeyListener=function(xe,F,_){var S=null;t(xe,"keydown",function(Ae){M[Ae.keyCode]=(M[Ae.keyCode]||0)+1;var Vn=a(F,Ae,Ae.keyCode);return S=Ae.defaultPrevented,Vn},_),t(xe,"keypress",function(Ae){S&&(Ae.ctrlKey||Ae.altKey||Ae.shiftKey||Ae.metaKey)&&(m.stopEvent(Ae),S=null)},_),t(xe,"keyup",function(Ae){M[Ae.keyCode]=null},_),M||(d(),t(window,"focus",d))};function d(){M=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!R.isOldIE){var f=1;m.nextTick=function(xe,F){F=F||window;var _="zero-timeout-message-"+f++,S=function(Ae){Ae.data==_&&(m.stopPropagation(Ae),e(F,"message",S),xe())};t(F,"message",S),F.postMessage(_,"*")}}m.$idleBlocked=!1,m.onIdle=function(xe,F){return setTimeout(function _(){m.$idleBlocked?setTimeout(_,100):xe()},F)},m.$idleBlockId=null,m.blockIdle=function(xe){m.$idleBlockId&&clearTimeout(m.$idleBlockId),m.$idleBlocked=!0,m.$idleBlockId=setTimeout(function(){m.$idleBlocked=!1},xe||100)},m.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),m.nextFrame?m.nextFrame=m.nextFrame.bind(window):m.nextFrame=function(xe){setTimeout(xe,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(p,m,Gn){var Q;Gn.exports={lineMode:!1,pasteCancelled:function(){return Q&&Q>Date.now()-50?!0:Q=!1},cancel:function(){Q=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(p,m,Gn){var Q=p("../lib/event"),R=p("../config").nls,M=p("../lib/useragent"),l=p("../lib/dom"),u=p("../lib/lang"),o=p("../clipboard"),i=M.isChrome<18,r=M.isIE,t=M.isChrome>63,e=400,n=p("../lib/keys"),a=n.KEY_MODS,d=M.isIOS,f=d?/\s/:/\n/,xe=M.isMobile,F;F=function(_,S){var Ae=l.createElement("textarea");Ae.className="ace_text-input",Ae.setAttribute("wrap","off"),Ae.setAttribute("autocorrect","off"),Ae.setAttribute("autocapitalize","off"),Ae.setAttribute("spellcheck","false"),Ae.style.opacity="0",_.insertBefore(Ae,_.firstChild);var Vn=!1,Me=!1,oe=!1,Yn=!1,y="";xe||(Ae.style.fontSize="1px");var h=!1,w=!1,J="",He=0,Kn=0,Qn=0,Zn=Number.MAX_SAFE_INTEGER,Xn=Number.MIN_SAFE_INTEGER,ei=0;try{var ri=document.activeElement===Ae}catch{}this.setNumberOfExtraLines=function(oi){if(Zn=Number.MAX_SAFE_INTEGER,Xn=Number.MIN_SAFE_INTEGER,oi<0){ei=0;return}ei=oi},this.setAriaLabel=function(){var oi="";if(S.$textInputAriaLabel&&(oi+="".concat(S.$textInputAriaLabel,", ")),S.session){var hi=S.session.selection.cursor.row;oi+=R("text-input.aria-label","Cursor at row $0",[hi+1])}Ae.setAttribute("aria-label",oi)},this.setAriaOptions=function(oi){oi.activeDescendant?(Ae.setAttribute("aria-haspopup","true"),Ae.setAttribute("aria-autocomplete",oi.inline?"both":"list"),Ae.setAttribute("aria-activedescendant",oi.activeDescendant)):(Ae.setAttribute("aria-haspopup","false"),Ae.setAttribute("aria-autocomplete","both"),Ae.removeAttribute("aria-activedescendant")),oi.role&&Ae.setAttribute("role",oi.role),oi.setLabel&&(Ae.setAttribute("aria-roledescription",R("text-input.aria-roledescription","editor")),this.setAriaLabel())},this.setAriaOptions({role:"textbox"}),Q.addListener(Ae,"blur",function(oi){w||(S.onBlur(oi),ri=!1)},S),Q.addListener(Ae,"focus",function(oi){if(!w){if(ri=!0,M.isEdge)try{if(!document.hasFocus())return}catch{}S.onFocus(oi),M.isEdge?setTimeout(ti):ti()}},S),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:S.renderer.enableKeyboardAccessibility}),y||t||this.$focusScroll=="browser")return Ae.focus({preventScroll:!0});var oi=Ae.style.top;Ae.style.position="fixed",Ae.style.top="0px";try{var hi=Ae.getBoundingClientRect().top!=0}catch{return}var di=[];if(hi)for(var fi=Ae.parentElement;fi&&fi.nodeType==1;)di.push(fi),fi.setAttribute("ace_nocontext","true"),!fi.parentElement&&fi.getRootNode?fi=fi.getRootNode().host:fi=fi.parentElement;Ae.focus({preventScroll:!0}),hi&&di.forEach(function(gi){gi.removeAttribute("ace_nocontext")}),setTimeout(function(){Ae.style.position="",Ae.style.top=="0px"&&(Ae.style.top=oi)},0)},this.blur=function(){Ae.blur()},this.isFocused=function(){return ri},S.on("beforeEndOperation",function(){var oi=S.curOp,hi=oi&&oi.command&&oi.command.name;if(hi!="insertstring"){var di=hi&&(oi.docChanged||oi.selectionChanged);oe&&di&&(J=Ae.value="",ki()),ti()}}),S.on("changeSelection",this.setAriaLabel);var Jn=function(oi,hi){for(var di=hi,fi=1;fi<=oi-Zn&&fi<2*ei+1;fi++)di+=S.session.getLine(oi-fi).length+1;return di},ti=d?function(oi){if(!(!ri||Vn&&!oi||Yn)){oi||(oi="");var hi=`
168
+ ab`+oi+`cde fg
169
+ `;hi!=Ae.value&&(Ae.value=J=hi);var di=4,fi=4+(oi.length||(S.selection.isEmpty()?0:1));(He!=di||Kn!=fi)&&Ae.setSelectionRange(di,fi),He=di,Kn=fi}}:function(){if(!(oe||Yn)&&!(!ri&&!li)){oe=!0;var oi=0,hi=0,di="";if(S.session){var fi=S.selection,gi=fi.getRange(),wi=fi.cursor.row;wi===Xn+1?(Zn=Xn+1,Xn=Zn+2*ei):wi===Zn-1?(Xn=Zn-1,Zn=Xn-2*ei):(wi<Zn-1||wi>Xn+1)&&(Zn=wi>ei?wi-ei:0,Xn=wi>ei?wi+ei:2*ei);for(var Ci=[],bi=Zn;bi<=Xn;bi++)Ci.push(S.session.getLine(bi));if(di=Ci.join(`
170
+ `),oi=Jn(gi.start.row,gi.start.column),hi=Jn(gi.end.row,gi.end.column),gi.start.row<Zn){var yi=S.session.getLine(Zn-1);oi=gi.start.row<Zn-1?0:oi,hi+=yi.length+1,di=yi+`
171
+ `+di}else if(gi.end.row>Xn){var pi=S.session.getLine(Xn+1);hi=gi.end.row>Xn+1?pi.length:gi.end.column,hi+=di.length+1,di=di+`
172
+ `+pi}else xe&&wi>0&&(di=`
173
+ `+di,hi+=1,oi+=1);di.length>e&&(oi<e&&hi<e?di=di.slice(0,e):(di=`
174
+ `,oi==hi?oi=hi=0:(oi=0,hi=1)));var _i=di+`
175
+
176
+ `;_i!=J&&(Ae.value=J=_i,He=Kn=_i.length)}if(li&&(He=Ae.selectionStart,Kn=Ae.selectionEnd),Kn!=hi||He!=oi||Ae.selectionEnd!=Kn)try{Ae.setSelectionRange(oi,hi),He=oi,Kn=hi}catch{}oe=!1}};this.resetSelection=ti,ri&&S.onFocus();var ii=function(oi){return oi.selectionStart===0&&oi.selectionEnd>=J.length&&oi.value===J&&J&&oi.selectionEnd!==Kn},ni=function(oi){oe||(Vn?Vn=!1:ii(Ae)?(S.selectAll(),ti()):xe&&Ae.selectionStart!=He&&ti())},si=null;this.setInputHandler=function(oi){si=oi},this.getInputHandler=function(){return si};var li=!1,ci=function(oi,hi){if(li&&(li=!1),Me)return ti(),oi&&S.onPaste(oi),Me=!1,"";for(var di=Ae.selectionStart,fi=Ae.selectionEnd,gi=He,wi=J.length-Kn,Ci=oi,bi=oi.length-di,yi=oi.length-fi,pi=0;gi>0&&J[pi]==oi[pi];)pi++,gi--;for(Ci=Ci.slice(pi),pi=1;wi>0&&J.length-pi>He-1&&J[J.length-pi]==oi[oi.length-pi];)pi++,wi--;bi-=pi-1,yi-=pi-1;var _i=Ci.length-pi+1;if(_i<0&&(gi=-_i,_i=0),Ci=Ci.slice(0,_i),!hi&&!Ci&&!bi&&!gi&&!wi&&!yi)return"";Yn=!0;var Mi=!1;return M.isAndroid&&Ci==". "&&(Ci=" ",Mi=!0),Ci&&!gi&&!wi&&!bi&&!yi||h?S.onTextInput(Ci):S.onTextInput(Ci,{extendLeft:gi,extendRight:wi,restoreStart:bi,restoreEnd:yi}),Yn=!1,J=oi,He=di,Kn=fi,Qn=yi,Mi?`
177
+ `:Ci},ai=function(oi){if(oe)return Ai();if(oi&&oi.inputType){if(oi.inputType=="historyUndo")return S.execCommand("undo");if(oi.inputType=="historyRedo")return S.execCommand("redo")}var hi=Ae.value,di=ci(hi,!0);(hi.length>e+100||f.test(di)||xe&&He<1&&He==Kn)&&ti()},ui=function(oi,hi,di){var fi=oi.clipboardData||window.clipboardData;if(!(!fi||i)){var gi=r||di?"Text":"text/plain";try{return hi?fi.setData(gi,hi)!==!1:fi.getData(gi)}catch(wi){if(!di)return ui(wi,hi,!0)}}},mi=function(oi,hi){var di=S.getCopyText();if(!di)return Q.preventDefault(oi);ui(oi,di)?(d&&(ti(di),Vn=di,setTimeout(function(){Vn=!1},10)),hi?S.onCut():S.onCopy(),Q.preventDefault(oi)):(Vn=!0,Ae.value=di,Ae.select(),setTimeout(function(){Vn=!1,ti(),hi?S.onCut():S.onCopy()}))},Si=function(oi){mi(oi,!0)},$i=function(oi){mi(oi,!1)},vi=function(oi){var hi=ui(oi);o.pasteCancelled()||(typeof hi=="string"?(hi&&S.onPaste(hi,oi),M.isIE&&setTimeout(ti),Q.preventDefault(oi)):(Ae.value="",Me=!0))};Q.addCommandKeyListener(Ae,function(oi,hi,di){if(!oe)return S.onCommandKey(oi,hi,di)},S),Q.addListener(Ae,"select",ni,S),Q.addListener(Ae,"input",ai,S),Q.addListener(Ae,"cut",Si,S),Q.addListener(Ae,"copy",$i,S),Q.addListener(Ae,"paste",vi,S),(!("oncut"in Ae)||!("oncopy"in Ae)||!("onpaste"in Ae))&&Q.addListener(_,"keydown",function(oi){if(!(M.isMac&&!oi.metaKey||!oi.ctrlKey))switch(oi.keyCode){case 67:$i(oi);break;case 86:vi(oi);break;case 88:Si(oi);break}},S);var xi=function(oi){if(!(oe||!S.onCompositionStart||S.$readOnly)&&(oe={},!h)){oi.data&&(oe.useTextareaForIME=!1),setTimeout(Ai,0),S._signal("compositionStart"),S.on("mousedown",Li);var hi=S.getSelectionRange();hi.end.row=hi.start.row,hi.end.column=hi.start.column,oe.markerRange=hi,oe.selectionStart=He,S.onCompositionStart(oe),oe.useTextareaForIME?(J=Ae.value="",He=0,Kn=0):(Ae.msGetInputContext&&(oe.context=Ae.msGetInputContext()),Ae.getInputContext&&(oe.context=Ae.getInputContext()))}},Ai=function(){if(!(!oe||!S.onCompositionUpdate||S.$readOnly)){if(h)return Li();if(oe.useTextareaForIME)S.onCompositionUpdate(Ae.value);else{var oi=Ae.value;ci(oi),oe.markerRange&&(oe.context&&(oe.markerRange.start.column=oe.selectionStart=oe.context.compositionStartOffset),oe.markerRange.end.column=oe.markerRange.start.column+Kn-oe.selectionStart+Qn)}}},ki=function(oi){!S.onCompositionEnd||S.$readOnly||(oe=!1,S.onCompositionEnd(),S.off("mousedown",Li),oi&&ai())};function Li(){w=!0,Ae.blur(),Ae.focus(),w=!1}var Ii=u.delayedCall(Ai,50).schedule.bind(null,null);function Oi(oi){oi.keyCode==27&&Ae.value.length<Ae.selectionStart&&(oe||(J=Ae.value),He=Kn=-1,ti()),Ii()}Q.addListener(Ae,"compositionstart",xi,S),Q.addListener(Ae,"compositionupdate",Ai,S),Q.addListener(Ae,"keyup",Oi,S),Q.addListener(Ae,"keydown",Ii,S),Q.addListener(Ae,"compositionend",ki,S),this.getElement=function(){return Ae},this.setCommandMode=function(oi){h=oi,Ae.readOnly=!1},this.setReadOnly=function(oi){h||(Ae.readOnly=oi)},this.setCopyWithEmptySelection=function(oi){},this.onContextMenu=function(oi){li=!0,ti(),S._emit("nativecontextmenu",{target:S,domEvent:oi}),this.moveToMouse(oi,!0)},this.moveToMouse=function(oi,hi){y||(y=Ae.style.cssText),Ae.style.cssText=(hi?"z-index:100000;":"")+(M.isIE?"opacity:0.1;":"")+"text-indent: -"+(He+Kn)*S.renderer.characterWidth*.5+"px;";var di=S.container.getBoundingClientRect(),fi=l.computedStyle(S.container),gi=di.top+(parseInt(fi.borderTopWidth)||0),wi=di.left+(parseInt(di.borderLeftWidth)||0),Ci=di.bottom-gi-Ae.clientHeight-2,bi=function(yi){l.translate(Ae,yi.clientX-wi-2,Math.min(yi.clientY-gi-2,Ci))};bi(oi),oi.type=="mousedown"&&(S.renderer.$isMousePressed=!0,clearTimeout(Ei),M.isWin&&Q.capture(S.container,bi,Ti))},this.onContextMenuClose=Ti;var Ei;function Ti(){clearTimeout(Ei),Ei=setTimeout(function(){y&&(Ae.style.cssText=y,y=""),S.renderer.$isMousePressed=!1,S.renderer.$keepTextAreaAtCursor&&S.renderer.$moveTextAreaToCursor()},0)}var Ri=function(oi){S.textInput.onContextMenu(oi),Ti()};Q.addListener(Ae,"mouseup",Ri,S),Q.addListener(Ae,"mousedown",function(oi){oi.preventDefault(),Ti()},S),Q.addListener(S.renderer.scroller,"contextmenu",Ri,S),Q.addListener(Ae,"contextmenu",Ri,S),d&&Di(_,S,Ae);function Di(oi,hi,di){var fi=null,gi=!1;di.addEventListener("keydown",function(Ci){fi&&clearTimeout(fi),gi=!0},!0),di.addEventListener("keyup",function(Ci){fi=setTimeout(function(){gi=!1},100)},!0);var wi=function(Ci){if(document.activeElement===di&&!(gi||oe||hi.$mouseHandler.isMousePressed)&&!Vn){var bi=di.selectionStart,yi=di.selectionEnd,pi=null,_i=0;if(bi==0?pi=n.up:bi==1?pi=n.home:yi>Kn&&J[yi]==`
178
+ `?pi=n.end:bi<He&&J[bi-1]==" "?(pi=n.left,_i=a.option):bi<He||bi==He&&Kn!=He&&bi==yi?pi=n.left:yi>Kn&&J.slice(0,yi).split(`
179
+ `).length>2?pi=n.down:yi>Kn&&J[yi-1]==" "?(pi=n.right,_i=a.option):(yi>Kn||yi==Kn&&Kn!=He&&bi==yi)&&(pi=n.right),bi!==yi&&(_i|=a.shift),pi){var Mi=hi.onCommandKey({},_i,pi);if(!Mi&&hi.commands){pi=n.keyCodeToString(pi);var Ni=hi.commands.findKeyCommand(_i,pi);Ni&&hi.execCommand(Ni)}He=bi,Kn=yi,ti("")}}};document.addEventListener("selectionchange",wi),hi.on("destroy",function(){document.removeEventListener("selectionchange",wi)})}this.destroy=function(){Ae.parentElement&&Ae.parentElement.removeChild(Ae)}},m.TextInput=F,m.$setUserAgentForTests=function(_,S){xe=_,d=S}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(p,m,Gn){var Q=p("../lib/useragent"),R=0,M=550,l=function(){function i(r){r.$clickSelection=null;var t=r.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(r)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(r)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(r)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(r)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(r));var e=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];e.forEach(function(n){r[n]=this[n]},this),r.selectByLines=this.extendSelectionBy.bind(r,"getLineRange"),r.selectByWords=this.extendSelectionBy.bind(r,"getWordRange")}return i.prototype.onMouseDown=function(r){var t=r.inSelection(),e=r.getDocumentPosition();this.mousedownEvent=r;var n=this.editor,a=r.getButton();if(a!==0){var d=n.getSelectionRange(),f=d.isEmpty();(f||a==1)&&n.selection.moveToPosition(e),a==2&&(n.textInput.onContextMenu(r.domEvent),Q.isMozilla||r.preventDefault());return}if(this.mousedownEvent.time=Date.now(),t&&!n.isFocused()&&(n.focus(),this.$focusTimeout&&!this.$clickSelection&&!n.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(r);return}return this.captureMouse(r),this.startSelect(e,r.domEvent._clicks>1),r.preventDefault()},i.prototype.startSelect=function(r,t){r=r||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var e=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?e.selection.selectToPosition(r):t||e.selection.moveToPosition(r),t||this.select(),e.setStyle("ace_selecting"),this.setState("select"))},i.prototype.select=function(){var r,t=this.editor,e=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var n=this.$clickSelection.comparePoint(e);if(n==-1)r=this.$clickSelection.end;else if(n==1)r=this.$clickSelection.start;else{var a=o(this.$clickSelection,e);e=a.cursor,r=a.anchor}t.selection.setSelectionAnchor(r.row,r.column)}t.selection.selectToPosition(e),t.renderer.scrollCursorIntoView()},i.prototype.extendSelectionBy=function(r){var t,e=this.editor,n=e.renderer.screenToTextCoordinates(this.x,this.y),a=e.selection[r](n.row,n.column);if(this.$clickSelection){var d=this.$clickSelection.comparePoint(a.start),f=this.$clickSelection.comparePoint(a.end);if(d==-1&&f<=0)t=this.$clickSelection.end,(a.end.row!=n.row||a.end.column!=n.column)&&(n=a.start);else if(f==1&&d>=0)t=this.$clickSelection.start,(a.start.row!=n.row||a.start.column!=n.column)&&(n=a.end);else if(d==-1&&f==1)n=a.end,t=a.start;else{var xe=o(this.$clickSelection,n);n=xe.cursor,t=xe.anchor}e.selection.setSelectionAnchor(t.row,t.column)}e.selection.selectToPosition(n),e.renderer.scrollCursorIntoView()},i.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},i.prototype.focusWait=function(){var r=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(r>R||t-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},i.prototype.onDoubleClick=function(r){var t=r.getDocumentPosition(),e=this.editor,n=e.session,a=n.getBracketRange(t);a?(a.isEmpty()&&(a.start.column--,a.end.column++),this.setState("select")):(a=e.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=a,this.select()},i.prototype.onTripleClick=function(r){var t=r.getDocumentPosition(),e=this.editor;this.setState("selectByLines");var n=e.getSelectionRange();n.isMultiLine()&&n.contains(t.row,t.column)?(this.$clickSelection=e.selection.getLineRange(n.start.row),this.$clickSelection.end=e.selection.getLineRange(n.end.row).end):this.$clickSelection=e.selection.getLineRange(t.row),this.select()},i.prototype.onQuadClick=function(r){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},i.prototype.onMouseWheel=function(r){if(!r.getAccelKey()){r.getShiftKey()&&r.wheelY&&!r.wheelX&&(r.wheelX=r.wheelY,r.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var e=this.$lastScroll,n=r.domEvent.timeStamp,a=n-e.t,d=a?r.wheelX/a:e.vx,f=a?r.wheelY/a:e.vy;a<M&&(d=(d+e.vx)/2,f=(f+e.vy)/2);var xe=Math.abs(d/f),F=!1;if(xe>=1&&t.renderer.isScrollableBy(r.wheelX*r.speed,0)&&(F=!0),xe<=1&&t.renderer.isScrollableBy(0,r.wheelY*r.speed)&&(F=!0),F)e.allowed=n;else if(n-e.allowed<M){var _=Math.abs(d)<=1.5*Math.abs(e.vx)&&Math.abs(f)<=1.5*Math.abs(e.vy);_?(F=!0,e.allowed=n):e.allowed=0}if(e.t=n,e.vx=d,e.vy=f,F)return t.renderer.scrollBy(r.wheelX*r.speed,r.wheelY*r.speed),r.stop()}},i}();l.prototype.selectEnd=l.prototype.selectByLinesEnd,l.prototype.selectAllEnd=l.prototype.selectByLinesEnd,l.prototype.selectByWordsEnd=l.prototype.selectByLinesEnd,m.DefaultHandlers=l;function u(i,r,t,e){return Math.sqrt(Math.pow(t-i,2)+Math.pow(e-r,2))}function o(i,r){if(i.start.row==i.end.row)var t=2*r.column-i.start.column-i.end.column;else if(i.start.row==i.end.row-1&&!i.start.column&&!i.end.column)var t=r.column-4;else var t=2*r.row-i.start.row-i.end.row;return t<0?{cursor:i.start,anchor:i.end}:{cursor:i.end,anchor:i.start}}}),ace.define("ace/lib/scroll",["require","exports","module"],function(p,m,Gn){m.preventParentScroll=function(R){R.stopPropagation();var M=R.currentTarget,l=M.scrollHeight>M.clientHeight;l||R.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(p,m,Gn){var Q=this&&this.__extends||function(){var n=function(a,d){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,xe){f.__proto__=xe}||function(f,xe){for(var F in xe)Object.prototype.hasOwnProperty.call(xe,F)&&(f[F]=xe[F])},n(a,d)};return function(a,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");n(a,d);function f(){this.constructor=a}a.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}}(),R=this&&this.__values||function(n){var a=typeof Symbol=="function"&&Symbol.iterator,d=a&&n[a],f=0;if(d)return d.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&f>=n.length&&(n=void 0),{value:n&&n[f++],done:!n}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")},M=p("./lib/dom");p("./lib/event");var l=p("./range").Range,u=p("./lib/scroll").preventParentScroll,o="ace_tooltip",i=function(){function n(a){this.isOpen=!1,this.$element=null,this.$parentNode=a}return n.prototype.$init=function(){return this.$element=M.createElement("div"),this.$element.className=o,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},n.prototype.getElement=function(){return this.$element||this.$init()},n.prototype.setText=function(a){this.getElement().textContent=a},n.prototype.setHtml=function(a){this.getElement().innerHTML=a},n.prototype.setPosition=function(a,d){this.getElement().style.left=a+"px",this.getElement().style.top=d+"px"},n.prototype.setClassName=function(a){M.addCssClass(this.getElement(),a)},n.prototype.setTheme=function(a){this.$element.className=o+" "+(a.isDark?"ace_dark ":"")+(a.cssClass||"")},n.prototype.show=function(a,d,f){a!=null&&this.setText(a),d!=null&&f!=null&&this.setPosition(d,f),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},n.prototype.hide=function(a){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=o,this.isOpen=!1)},n.prototype.getHeight=function(){return this.getElement().offsetHeight},n.prototype.getWidth=function(){return this.getElement().offsetWidth},n.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},n}(),r=function(){function n(){this.popups=[]}return n.prototype.addPopup=function(a){this.popups.push(a),this.updatePopups()},n.prototype.removePopup=function(a){var d=this.popups.indexOf(a);d!==-1&&(this.popups.splice(d,1),this.updatePopups())},n.prototype.updatePopups=function(){var a,d,f,xe;this.popups.sort(function(y,h){return h.priority-y.priority});var F=[];try{for(var _=R(this.popups),S=_.next();!S.done;S=_.next()){var Ae=S.value,Vn=!0;try{for(var Me=(f=void 0,R(F)),oe=Me.next();!oe.done;oe=Me.next()){var Yn=oe.value;if(this.doPopupsOverlap(Yn,Ae)){Vn=!1;break}}}catch(y){f={error:y}}finally{try{oe&&!oe.done&&(xe=Me.return)&&xe.call(Me)}finally{if(f)throw f.error}}Vn?F.push(Ae):Ae.hide()}}catch(y){a={error:y}}finally{try{S&&!S.done&&(d=_.return)&&d.call(_)}finally{if(a)throw a.error}}},n.prototype.doPopupsOverlap=function(a,d){var f=a.getElement().getBoundingClientRect(),xe=d.getElement().getBoundingClientRect();return f.left<xe.right&&f.right>xe.left&&f.top<xe.bottom&&f.bottom>xe.top},n}(),t=new r;m.popupManager=t,m.Tooltip=i;var e=function(n){Q(a,n);function a(d){d===void 0&&(d=document.body);var f=n.call(this,d)||this;f.timeout=void 0,f.lastT=0,f.idleTime=350,f.lastEvent=void 0,f.onMouseOut=f.onMouseOut.bind(f),f.onMouseMove=f.onMouseMove.bind(f),f.waitForHover=f.waitForHover.bind(f),f.hide=f.hide.bind(f);var xe=f.getElement();return xe.style.whiteSpace="pre-wrap",xe.style.pointerEvents="auto",xe.addEventListener("mouseout",f.onMouseOut),xe.tabIndex=-1,xe.addEventListener("blur",(function(){xe.contains(document.activeElement)||this.hide()}).bind(f)),xe.addEventListener("wheel",u),f}return a.prototype.addToEditor=function(d){d.on("mousemove",this.onMouseMove),d.on("mousedown",this.hide),d.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},a.prototype.removeFromEditor=function(d){d.off("mousemove",this.onMouseMove),d.off("mousedown",this.hide),d.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},a.prototype.onMouseMove=function(d,f){this.lastEvent=d,this.lastT=Date.now();var xe=f.$mouseHandler.isMousePressed;if(this.isOpen){var F=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(F.row,F.column)||xe||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||xe||(this.lastEvent=d,this.timeout=setTimeout(this.waitForHover,this.idleTime))},a.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var d=Date.now()-this.lastT;if(this.idleTime-d>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-d);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},a.prototype.isOutsideOfText=function(d){var f=d.editor,xe=d.getDocumentPosition(),F=f.session.getLine(xe.row);if(xe.column==F.length){var _=f.renderer.pixelToScreenCoordinates(d.clientX,d.clientY),S=f.session.documentToScreenPosition(xe.row,xe.column);if(S.column!=_.column||S.row!=_.row)return!0}return!1},a.prototype.setDataProvider=function(d){this.$gatherData=d},a.prototype.showForRange=function(d,f,xe,F){var _=10;if(!(F&&F!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var S=d.renderer;this.isOpen||(t.addPopup(this),this.$registerCloseEvents(),this.setTheme(S.theme)),this.isOpen=!0,this.addMarker(f,d.session),this.range=l.fromPoints(f.start,f.end);var Ae=S.textToScreenCoordinates(f.start.row,f.start.column),Vn=S.scroller.getBoundingClientRect();Ae.pageX<Vn.left&&(Ae.pageX=Vn.left);var Me=this.getElement();Me.innerHTML="",Me.appendChild(xe),Me.style.maxHeight="",Me.style.display="block";var oe=Me.clientHeight,Yn=Me.clientWidth,y=window.innerHeight-Ae.pageY-S.lineHeight,h=!0;Ae.pageY-oe<0&&Ae.pageY<y&&(h=!1),Me.style.maxHeight=(h?Ae.pageY:y)-_+"px",Me.style.top=h?"":Ae.pageY+S.lineHeight+"px",Me.style.bottom=h?window.innerHeight-Ae.pageY+"px":"",Me.style.left=Math.min(Ae.pageX,window.innerWidth-Yn-_)+"px"}},a.prototype.addMarker=function(d,f){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=f,this.marker=f&&f.addMarker(d,"ace_highlight-marker","text")},a.prototype.hide=function(d){!d&&document.activeElement==this.getElement()||d&&d.target&&(d.type!="keydown"||d.ctrlKey||d.metaKey)&&this.$element.contains(d.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,t.removePopup(this)))},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(d){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!d.relatedTarget||this.getElement().contains(d.relatedTarget)||d&&d.currentTarget.contains(d.relatedTarget)||d.relatedTarget.classList.contains("ace_content")||this.hide())},a}(i);m.HoverTooltip=e}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config","ace/lib/lang"],function(p,m,Gn){var Q=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,d){a.__proto__=d}||function(a,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(a[f]=d[f])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function a(){this.constructor=e}e.prototype=n===null?Object.create(n):(a.prototype=n.prototype,new a)}}(),R=this&&this.__values||function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],a=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&a>=t.length&&(t=void 0),{value:t&&t[a++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},M=p("../lib/dom"),l=p("../lib/event"),u=p("../tooltip").Tooltip,o=p("../config").nls;p("../lib/lang");function i(t){var e=t.editor,n=e.renderer.$gutterLayer,a=new r(e);t.editor.setDefaultHandler("guttermousedown",function(S){if(!(!e.isFocused()||S.getButton()!=0)){var Ae=n.getRegion(S);if(Ae!="foldWidgets"){var Vn=S.getDocumentPosition().row,Me=e.session.selection;if(S.getShiftKey())Me.selectTo(Vn,0);else{if(S.domEvent.detail==2)return e.selectAll(),S.preventDefault();t.$clickSelection=e.selection.getLineRange(Vn)}return t.setState("selectByLines"),t.captureMouse(S),S.preventDefault()}}});var d,f;function xe(){var S=f.getDocumentPosition().row,Ae=e.session.getLength();if(S==Ae){var Vn=e.renderer.pixelToScreenCoordinates(0,f.y).row,Me=f.$pos;if(Vn>e.session.documentToScreenRow(Me.row,Me.column))return F()}if(a.showTooltip(S),!!a.isOpen)if(e.on("mousewheel",F),t.$tooltipFollowsMouse)_(f);else{var oe=f.getGutterRow(),Yn=n.$lines.get(oe);if(Yn){var y=Yn.element.querySelector(".ace_gutter_annotation"),h=y.getBoundingClientRect(),w=a.getElement().style;w.left=h.right+"px",w.top=h.bottom+"px"}else _(f)}}function F(){d&&(d=clearTimeout(d)),a.isOpen&&(a.hideTooltip(),e.off("mousewheel",F))}function _(S){a.setPosition(S.x,S.y)}t.editor.setDefaultHandler("guttermousemove",function(S){var Ae=S.domEvent.target||S.domEvent.srcElement;if(M.hasCssClass(Ae,"ace_fold-widget"))return F();a.isOpen&&t.$tooltipFollowsMouse&&_(S),f=S,!d&&(d=setTimeout(function(){d=null,f&&!t.isMousePressed?xe():F()},50))}),l.addListener(e.renderer.$gutter,"mouseout",function(S){f=null,!(!a.isOpen||d)&&(d=setTimeout(function(){d=null,F()},50))},e),e.on("changeSession",F),e.on("input",F)}m.GutterHandler=i;var r=function(t){Q(e,t);function e(n){var a=t.call(this,n.container)||this;return a.editor=n,a}return e.prototype.setPosition=function(n,a){var d=window.innerWidth||document.documentElement.clientWidth,f=window.innerHeight||document.documentElement.clientHeight,xe=this.getWidth(),F=this.getHeight();n+=15,a+=15,n+xe>d&&(n-=n+xe-d),a+F>f&&(a-=20+F),u.prototype.setPosition.call(this,n,a)},Object.defineProperty(e,"annotationLabels",{get:function(){return{error:{singular:o("gutter-tooltip.aria-label.error.singular","error"),plural:o("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:o("gutter-tooltip.aria-label.security.singular","security finding"),plural:o("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:o("gutter-tooltip.aria-label.warning.singular","warning"),plural:o("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:o("gutter-tooltip.aria-label.info.singular","information message"),plural:o("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:o("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:o("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),e.prototype.showTooltip=function(n){var a,d=this.editor.renderer.$gutterLayer,f=d.$annotations[n],xe;f?xe={displayText:Array.from(f.displayText),type:Array.from(f.type)}:xe={displayText:[],type:[]};var F=d.session.getFoldLine(n);if(F&&d.$showFoldedAnnotations){for(var _={error:[],security:[],warning:[],info:[],hint:[]},S={error:1,security:2,warning:3,info:4,hint:5},Ae,Vn=n+1;Vn<=F.end.row;Vn++)if(d.$annotations[Vn])for(var Me=0;Me<d.$annotations[Vn].text.length;Me++){var oe=d.$annotations[Vn].type[Me];_[oe].push(d.$annotations[Vn].text[Me]),(!Ae||S[oe]<S[Ae])&&(Ae=oe)}if(["error","security","warning"].includes(Ae)){var Yn="".concat(e.annotationsToSummaryString(_)," in folded code.");xe.displayText.push(Yn),xe.type.push(Ae+"_fold")}}if(xe.displayText.length===0)return this.hide();for(var y={error:[],security:[],warning:[],info:[],hint:[]},h=d.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",Vn=0;Vn<xe.displayText.length;Vn++){var w=M.createElement("span"),J=M.createElement("span");(a=J.classList).add.apply(a,["ace_".concat(xe.type[Vn]),h]),J.setAttribute("aria-label","".concat(e.annotationLabels[xe.type[Vn].replace("_fold","")].singular)),J.setAttribute("role","img"),J.appendChild(M.createTextNode(" ")),w.appendChild(J),w.appendChild(M.createTextNode(xe.displayText[Vn])),w.appendChild(M.createElement("br")),y[xe.type[Vn].replace("_fold","")].push(w)}var He=this.getElement();M.removeChildren(He),y.error.forEach(function(Kn){return He.appendChild(Kn)}),y.security.forEach(function(Kn){return He.appendChild(Kn)}),y.warning.forEach(function(Kn){return He.appendChild(Kn)}),y.info.forEach(function(Kn){return He.appendChild(Kn)}),y.hint.forEach(function(Kn){return He.appendChild(Kn)}),He.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.editor._signal("showGutterTooltip",this)},e.prototype.hideTooltip=function(){this.$element.removeAttribute("aria-live"),this.hide(),this.editor._signal("hideGutterTooltip",this)},e.annotationsToSummaryString=function(n){var a,d,f=[],xe=["error","security","warning","info","hint"];try{for(var F=R(xe),_=F.next();!_.done;_=F.next()){var S=_.value;if(n[S].length){var Ae=n[S].length===1?e.annotationLabels[S].singular:e.annotationLabels[S].plural;f.push("".concat(n[S].length," ").concat(Ae))}}}catch(Vn){a={error:Vn}}finally{try{_&&!_.done&&(d=F.return)&&d.call(F)}finally{if(a)throw a.error}}return f.join(", ")},e}(u);m.GutterTooltip=r}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(p,m,Gn){var Q=p("../lib/event"),R=p("../lib/useragent"),M=function(){function l(u,o){this.speed,this.wheelX,this.wheelY,this.domEvent=u,this.editor=o,this.x=this.clientX=u.clientX,this.y=this.clientY=u.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return l.prototype.stopPropagation=function(){Q.stopPropagation(this.domEvent),this.propagationStopped=!0},l.prototype.preventDefault=function(){Q.preventDefault(this.domEvent),this.defaultPrevented=!0},l.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},l.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},l.prototype.getGutterRow=function(){var u=this.getDocumentPosition().row,o=this.editor.session.documentToScreenRow(u,0),i=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return o-i},l.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var u=this.editor,o=u.getSelectionRange();if(o.isEmpty())this.$inSelection=!1;else{var i=this.getDocumentPosition();this.$inSelection=o.contains(i.row,i.column)}return this.$inSelection},l.prototype.getButton=function(){return Q.getButton(this.domEvent)},l.prototype.getShiftKey=function(){return this.domEvent.shiftKey},l.prototype.getAccelKey=function(){return R.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},l}();m.MouseEvent=M}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(p,m,Gn){var Q=p("../lib/dom"),R=p("../lib/event"),M=p("../lib/useragent"),l=200,u=200,o=5;function i(t){var e=t.editor,n=Q.createElement("div");n.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",n.textContent=" ";var a=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];a.forEach(function(Jn){t[Jn]=this[Jn]},this),e.on("mousedown",this.onMouseDown.bind(t));var d=e.container,f,xe,F,_,S,Ae,Vn=0,Me,oe,Yn,y,h;this.onDragStart=function(Jn){if(this.cancelDrag||!d.draggable){var ti=this;return setTimeout(function(){ti.startSelect(),ti.captureMouse(Jn)},0),Jn.preventDefault()}S=e.getSelectionRange();var ii=Jn.dataTransfer;ii.effectAllowed=e.getReadOnly()?"copy":"copyMove",e.container.appendChild(n),ii.setDragImage&&ii.setDragImage(n,0,0),setTimeout(function(){e.container.removeChild(n)}),ii.clearData(),ii.setData("Text",e.session.getTextRange()),oe=!0,this.setState("drag")},this.onDragEnd=function(Jn){if(d.draggable=!1,oe=!1,this.setState(null),!e.getReadOnly()){var ti=Jn.dataTransfer.dropEffect;!Me&&ti=="move"&&e.session.remove(e.getSelectionRange()),e.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(Jn){if(!(e.getReadOnly()||!ei(Jn.dataTransfer)))return xe=Jn.clientX,F=Jn.clientY,f||Kn(),Vn++,Jn.dataTransfer.dropEffect=Me=ri(Jn),R.preventDefault(Jn)},this.onDragOver=function(Jn){if(!(e.getReadOnly()||!ei(Jn.dataTransfer)))return xe=Jn.clientX,F=Jn.clientY,f||(Kn(),Vn++),Zn!==null&&(Zn=null),Jn.dataTransfer.dropEffect=Me=ri(Jn),R.preventDefault(Jn)},this.onDragLeave=function(Jn){if(Vn--,Vn<=0&&f)return Qn(),Me=null,R.preventDefault(Jn)},this.onDrop=function(Jn){if(Ae){var ti=Jn.dataTransfer;if(oe)switch(Me){case"move":S.contains(Ae.row,Ae.column)?S={start:Ae,end:Ae}:S=e.moveText(S,Ae);break;case"copy":S=e.moveText(S,Ae,!0);break}else{var ii=ti.getData("Text");S={start:Ae,end:e.session.insert(Ae,ii)},e.focus(),Me=null}return Qn(),R.preventDefault(Jn)}},R.addListener(d,"dragstart",this.onDragStart.bind(t),e),R.addListener(d,"dragend",this.onDragEnd.bind(t),e),R.addListener(d,"dragenter",this.onDragEnter.bind(t),e),R.addListener(d,"dragover",this.onDragOver.bind(t),e),R.addListener(d,"dragleave",this.onDragLeave.bind(t),e),R.addListener(d,"drop",this.onDrop.bind(t),e);function w(Jn,ti){var ii=Date.now(),ni=!ti||Jn.row!=ti.row,si=!ti||Jn.column!=ti.column;if(!y||ni||si)e.moveCursorToPosition(Jn),y=ii,h={x:xe,y:F};else{var li=r(h.x,h.y,xe,F);li>o?y=null:ii-y>=u&&(e.renderer.scrollCursorIntoView(),y=null)}}function J(Jn,ti){var ii=Date.now(),ni=e.renderer.layerConfig.lineHeight,si=e.renderer.layerConfig.characterWidth,li=e.renderer.scroller.getBoundingClientRect(),ci={x:{left:xe-li.left,right:li.right-xe},y:{top:F-li.top,bottom:li.bottom-F}},ai=Math.min(ci.x.left,ci.x.right),ui=Math.min(ci.y.top,ci.y.bottom),mi={row:Jn.row,column:Jn.column};ai/si<=2&&(mi.column+=ci.x.left<ci.x.right?-3:2),ui/ni<=1&&(mi.row+=ci.y.top<ci.y.bottom?-1:1);var Si=Jn.row!=mi.row,$i=Jn.column!=mi.column,vi=!ti||Jn.row!=ti.row;Si||$i&&!vi?Yn?ii-Yn>=l&&e.renderer.scrollCursorIntoView(mi):Yn=ii:Yn=null}function He(){var Jn=Ae;Ae=e.renderer.screenToTextCoordinates(xe,F),w(Ae,Jn),J(Ae,Jn)}function Kn(){S=e.selection.toOrientedRange(),f=e.session.addMarker(S,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval(_),He(),_=setInterval(He,20),Vn=0,R.addListener(document,"mousemove",Xn)}function Qn(){clearInterval(_),e.session.removeMarker(f),f=null,e.selection.fromOrientedRange(S),e.isFocused()&&!oe&&e.$resetCursorStyle(),S=null,Ae=null,Vn=0,Yn=null,y=null,R.removeListener(document,"mousemove",Xn)}var Zn=null;function Xn(){Zn==null&&(Zn=setTimeout(function(){Zn!=null&&f&&Qn()},20))}function ei(Jn){var ti=Jn.types;return!ti||Array.prototype.some.call(ti,function(ii){return ii=="text/plain"||ii=="Text"})}function ri(Jn){var ti=["copy","copymove","all","uninitialized"],ii=["move","copymove","linkmove","all","uninitialized"],ni=M.isMac?Jn.altKey:Jn.ctrlKey,si="uninitialized";try{si=Jn.dataTransfer.effectAllowed.toLowerCase()}catch{}var li="none";return ni&&ti.indexOf(si)>=0?li="copy":ii.indexOf(si)>=0?li="move":ti.indexOf(si)>=0&&(li="copy"),li}}(function(){this.dragWait=function(){var t=Date.now()-this.mousedownEvent.time;t>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var t=this.editor.container;t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(t){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var t=this.editor,e=t.container;e.draggable=!0,t.renderer.$cursorLayer.setBlinking(!1),t.setStyle("ace_dragging");var n=M.isWin?"default":"move";t.renderer.setCursorStyle(n),this.setState("dragReady")},this.onMouseDrag=function(t){var e=this.editor.container;if(M.isIE&&this.state=="dragReady"){var n=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>3&&e.dragDrop()}if(this.state==="dragWait"){var n=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>0&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(t){if(this.$dragEnabled){this.mousedownEvent=t;var e=this.editor,n=t.inSelection(),a=t.getButton(),d=t.domEvent.detail||1;if(d===1&&a===0&&n){if(t.editor.inMultiSelectMode&&(t.getAccelKey()||t.getShiftKey()))return;this.mousedownEvent.time=Date.now();var f=t.domEvent.target||t.domEvent.srcElement;if("unselectable"in f&&(f.unselectable="on"),e.getDragDelay()){if(M.isWebKit){this.cancelDrag=!0;var xe=e.container;xe.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(t,this.onMouseDrag.bind(this)),t.defaultPrevented=!0}}}}).call(i.prototype);function r(t,e,n,a){return Math.sqrt(Math.pow(n-t,2)+Math.pow(a-e,2))}m.DragdropHandler=i}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(p,m,Gn){var Q=p("./mouse_event").MouseEvent,R=p("../lib/event"),M=p("../lib/dom");m.addTouchListeners=function(l,u){var o="scroll",i,r,t,e,n,a,d=0,f,xe=0,F=0,_=0,S,Ae;function Vn(){var w=window.navigator&&window.navigator.clipboard,J=!1,He=function(){var Zn=u.getCopyText(),Xn=u.session.getUndoManager().hasUndo();Ae.replaceChild(M.buildDom(J?["span",!Zn&&Kn("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],Zn&&Kn("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],Zn&&Kn("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],w&&Kn("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],Xn&&Kn("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],Kn("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],Kn("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),Ae.firstChild)},Kn=function(Zn){return u.commands.canExecute(Zn,u)},Qn=function(Zn){var Xn=Zn.target.getAttribute("action");if(Xn=="more"||!J)return J=!J,He();Xn=="paste"?w.readText().then(function(ei){u.execCommand(Xn,ei)}):Xn&&((Xn=="cut"||Xn=="copy")&&(w?w.writeText(u.getCopyText()):document.execCommand("copy")),u.execCommand(Xn)),Ae.firstChild.style.display="none",J=!1,Xn!="openCommandPalette"&&u.focus()};Ae=M.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(Zn){o="menu",Zn.stopPropagation(),Zn.preventDefault(),u.textInput.focus()},ontouchend:function(Zn){Zn.stopPropagation(),Zn.preventDefault(),Qn(Zn)},onclick:Qn},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],u.container)}function Me(){if(!u.getOption("enableMobileMenu")){Ae&&oe();return}Ae||Vn();var w=u.selection.cursor,J=u.renderer.textToScreenCoordinates(w.row,w.column),He=u.renderer.textToScreenCoordinates(0,0).pageX,Kn=u.renderer.scrollLeft,Qn=u.container.getBoundingClientRect();Ae.style.top=J.pageY-Qn.top-3+"px",J.pageX-Qn.left<Qn.width-70?(Ae.style.left="",Ae.style.right="10px"):(Ae.style.right="",Ae.style.left=He+Kn-Qn.left+"px"),Ae.style.display="",Ae.firstChild.style.display="none",u.on("input",oe)}function oe(w){Ae&&(Ae.style.display="none"),u.off("input",oe)}function Yn(){n=null,clearTimeout(n);var w=u.selection.getRange(),J=w.contains(f.row,f.column);(w.isEmpty()||!J)&&(u.selection.moveToPosition(f),u.selection.selectWord()),o="wait",Me()}function y(){n=null,clearTimeout(n),u.selection.moveToPosition(f);var w=xe>=2?u.selection.getLineRange(f.row):u.session.getBracketRange(f);w&&!w.isEmpty()?u.selection.setRange(w):u.selection.selectWord(),o="wait"}R.addListener(l,"contextmenu",function(w){if(S){var J=u.textInput.getElement();J.focus()}},u),R.addListener(l,"touchstart",function(w){var J=w.touches;if(n||J.length>1){clearTimeout(n),n=null,t=-1,o="zoom";return}S=u.$mouseHandler.isMousePressed=!0;var He=u.renderer.layerConfig.lineHeight,Kn=u.renderer.layerConfig.lineHeight,Qn=w.timeStamp;e=Qn;var Zn=J[0],Xn=Zn.clientX,ei=Zn.clientY;Math.abs(i-Xn)+Math.abs(r-ei)>He&&(t=-1),i=w.clientX=Xn,r=w.clientY=ei,F=_=0;var ri=new Q(w,u);if(f=ri.getDocumentPosition(),Qn-t<500&&J.length==1&&!d)xe++,w.preventDefault(),w.button=0,y();else{xe=0;var Jn=u.selection.cursor,ti=u.selection.isEmpty()?Jn:u.selection.anchor,ii=u.renderer.$cursorLayer.getPixelPosition(Jn,!0),ni=u.renderer.$cursorLayer.getPixelPosition(ti,!0),si=u.renderer.scroller.getBoundingClientRect(),li=u.renderer.layerConfig.offset,ci=u.renderer.scrollLeft,ai=function(Si,$i){return Si=Si/Kn,$i=$i/He-.75,Si*Si+$i*$i};if(w.clientX<si.left){o="zoom";return}var ui=ai(w.clientX-si.left-ii.left+ci,w.clientY-si.top-ii.top+li),mi=ai(w.clientX-si.left-ni.left+ci,w.clientY-si.top-ni.top+li);ui<3.5&&mi<3.5&&(o=ui>mi?"cursor":"anchor"),mi<3.5?o="anchor":ui<3.5?o="cursor":o="scroll",n=setTimeout(Yn,450)}t=Qn},u),R.addListener(l,"touchend",function(w){S=u.$mouseHandler.isMousePressed=!1,a&&clearInterval(a),o=="zoom"?(o="",d=0):n?(u.selection.moveToPosition(f),d=0,Me()):o=="scroll"?(h(),oe()):Me(),clearTimeout(n),n=null},u),R.addListener(l,"touchmove",function(w){n&&(clearTimeout(n),n=null);var J=w.touches;if(!(J.length>1||o=="zoom")){var He=J[0],Kn=i-He.clientX,Qn=r-He.clientY;if(o=="wait")if(Kn*Kn+Qn*Qn>4)o="cursor";else return w.preventDefault();i=He.clientX,r=He.clientY,w.clientX=He.clientX,w.clientY=He.clientY;var Zn=w.timeStamp,Xn=Zn-e;if(e=Zn,o=="scroll"){var ei=new Q(w,u);ei.speed=1,ei.wheelX=Kn,ei.wheelY=Qn,10*Math.abs(Kn)<Math.abs(Qn)&&(Kn=0),10*Math.abs(Qn)<Math.abs(Kn)&&(Qn=0),Xn!=0&&(F=Kn/Xn,_=Qn/Xn),u._emit("mousewheel",ei),ei.propagationStopped||(F=_=0)}else{var ri=new Q(w,u),Jn=ri.getDocumentPosition();o=="cursor"?u.selection.moveCursorToPosition(Jn):o=="anchor"&&u.selection.setSelectionAnchor(Jn.row,Jn.column),u.renderer.scrollCursorIntoView(Jn),w.preventDefault()}}},u);function h(){d+=60,a=setInterval(function(){d--<=0&&(clearInterval(a),a=null),Math.abs(F)<.01&&(F=0),Math.abs(_)<.01&&(_=0),d<20&&(F=.9*F),d<20&&(_=.9*_);var w=u.session.getScrollTop();u.renderer.scrollBy(10*F,10*_),w==u.session.getScrollTop()&&(d=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(p,m,Gn){var Q=p("../lib/event"),R=p("../lib/useragent"),M=p("./default_handlers").DefaultHandlers,l=p("./default_gutter_handler").GutterHandler,u=p("./mouse_event").MouseEvent,o=p("./dragdrop_handler").DragdropHandler,i=p("./touch_handler").addTouchListeners,r=p("../config"),t=function(){function e(n){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var a=this;this.editor=n,new M(this),new l(this),new o(this);var d=function(F){var _=!document.hasFocus||!document.hasFocus()||!n.isFocused()&&document.activeElement==(n.textInput&&n.textInput.getElement());_&&window.focus(),n.focus(),setTimeout(function(){n.isFocused()||n.focus()})},f=n.renderer.getMouseEventTarget();Q.addListener(f,"click",this.onMouseEvent.bind(this,"click"),n),Q.addListener(f,"mousemove",this.onMouseMove.bind(this,"mousemove"),n),Q.addMultiMouseDownListener([f,n.renderer.scrollBarV&&n.renderer.scrollBarV.inner,n.renderer.scrollBarH&&n.renderer.scrollBarH.inner,n.textInput&&n.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",n),Q.addMouseWheelListener(n.container,this.onMouseWheel.bind(this,"mousewheel"),n),i(n.container,n);var xe=n.renderer.$gutter;Q.addListener(xe,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),n),Q.addListener(xe,"click",this.onMouseEvent.bind(this,"gutterclick"),n),Q.addListener(xe,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),n),Q.addListener(xe,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),n),Q.addListener(f,"mousedown",d,n),Q.addListener(xe,"mousedown",d,n),R.isIE&&n.renderer.scrollBarV&&(Q.addListener(n.renderer.scrollBarV.element,"mousedown",d,n),Q.addListener(n.renderer.scrollBarH.element,"mousedown",d,n)),n.on("mousemove",function(F){if(!(a.state||a.$dragDelay||!a.$dragEnabled)){var _=n.renderer.screenToTextCoordinates(F.x,F.y),S=n.session.selection.getRange(),Ae=n.renderer;!S.isEmpty()&&S.insideStart(_.row,_.column)?Ae.setCursorStyle("default"):Ae.setCursorStyle("")}},n)}return e.prototype.onMouseEvent=function(n,a){this.editor.session&&this.editor._emit(n,new u(a,this.editor))},e.prototype.onMouseMove=function(n,a){var d=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!d||!d.length||this.editor._emit(n,new u(a,this.editor))},e.prototype.onMouseWheel=function(n,a){var d=new u(a,this.editor);d.speed=this.$scrollSpeed*2,d.wheelX=a.wheelX,d.wheelY=a.wheelY,this.editor._emit(n,d)},e.prototype.setState=function(n){this.state=n},e.prototype.captureMouse=function(n,a){this.x=n.x,this.y=n.y,this.isMousePressed=!0;var d=this.editor,f=this.editor.renderer;f.$isMousePressed=!0;var xe=this,F=function(Me){if(Me){if(R.isWebKit&&!Me.which&&xe.releaseMouse)return xe.releaseMouse();xe.x=Me.clientX,xe.y=Me.clientY,a&&a(Me),xe.mouseEvent=new u(Me,xe.editor),xe.$mouseMoved=!0}},_=function(Me){d.off("beforeEndOperation",Ae),clearInterval(Vn),d.session&&S(),xe[xe.state+"End"]&&xe[xe.state+"End"](Me),xe.state="",xe.isMousePressed=f.$isMousePressed=!1,f.$keepTextAreaAtCursor&&f.$moveTextAreaToCursor(),xe.$onCaptureMouseMove=xe.releaseMouse=null,Me&&xe.onMouseEvent("mouseup",Me),d.endOperation()},S=function(){xe[xe.state]&&xe[xe.state](),xe.$mouseMoved=!1};if(R.isOldIE&&n.domEvent.type=="dblclick")return setTimeout(function(){_(n)});var Ae=function(Me){xe.releaseMouse&&d.curOp.command.name&&d.curOp.selectionChanged&&(xe[xe.state+"End"]&&xe[xe.state+"End"](),xe.state="",xe.releaseMouse())};d.on("beforeEndOperation",Ae),d.startOperation({command:{name:"mouse"}}),xe.$onCaptureMouseMove=F,xe.releaseMouse=Q.capture(this.editor.container,F,_);var Vn=setInterval(S,20)},e.prototype.cancelContextMenu=function(){var n=(function(a){a&&a.domEvent&&a.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",n),a&&a.domEvent&&Q.stopEvent(a.domEvent))}).bind(this);setTimeout(n,10),this.editor.on("nativecontextmenu",n)},e.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},e}();t.prototype.releaseMouse=null,r.defineOptions(t.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:R.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),m.MouseHandler=t}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(p,m,Gn){var Q=p("../lib/dom"),R=function(){function M(l){l.on("click",function(u){var o=u.getDocumentPosition(),i=l.session,r=i.getFoldAt(o.row,o.column,1);r&&(u.getAccelKey()?i.removeFold(r):i.expandFold(r),u.stop());var t=u.domEvent&&u.domEvent.target;t&&Q.hasCssClass(t,"ace_inline_button")&&Q.hasCssClass(t,"ace_toggle_wrap")&&(i.setOption("wrap",!i.getUseWrapMode()),l.renderer.scrollCursorIntoView())}),l.on("gutterclick",function(u){var o=l.renderer.$gutterLayer.getRegion(u);if(o=="foldWidgets"){var i=u.getDocumentPosition().row,r=l.session;r.foldWidgets&&r.foldWidgets[i]&&l.session.onFoldWidgetClick(i,u),l.isFocused()||l.focus(),u.stop()}}),l.on("gutterdblclick",function(u){var o=l.renderer.$gutterLayer.getRegion(u);if(o=="foldWidgets"){var i=u.getDocumentPosition().row,r=l.session,t=r.getParentFoldRangeData(i,!0),e=t.range||t.firstRange;if(e){i=e.start.row;var n=r.getFoldAt(i,r.getLine(i).length,1);n?r.removeFold(n):(r.addFold("...",e),l.renderer.scrollCursorIntoView({row:e.start.row,column:0}))}u.stop()}})}return M}();m.FoldHandler=R}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(p,m,Gn){var Q=p("../lib/keys"),R=p("../lib/event"),M=function(){function l(u){this.$editor=u,this.$data={editor:u},this.$handlers=[],this.setDefaultHandler(u.commands)}return l.prototype.setDefaultHandler=function(u){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=u,this.addKeyboardHandler(u,0)},l.prototype.setKeyboardHandler=function(u){var o=this.$handlers;if(o[o.length-1]!=u){for(;o[o.length-1]&&o[o.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(o[o.length-1]);this.addKeyboardHandler(u,1)}},l.prototype.addKeyboardHandler=function(u,o){if(u){typeof u=="function"&&!u.handleKeyboard&&(u.handleKeyboard=u);var i=this.$handlers.indexOf(u);i!=-1&&this.$handlers.splice(i,1),o==null?this.$handlers.push(u):this.$handlers.splice(o,0,u),i==-1&&u.attach&&u.attach(this.$editor)}},l.prototype.removeKeyboardHandler=function(u){var o=this.$handlers.indexOf(u);return o==-1?!1:(this.$handlers.splice(o,1),u.detach&&u.detach(this.$editor),!0)},l.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},l.prototype.getStatusText=function(){var u=this.$data,o=u.editor;return this.$handlers.map(function(i){return i.getStatusText&&i.getStatusText(o,u)||""}).filter(Boolean).join(" ")},l.prototype.$callKeyboardHandlers=function(u,o,i,r){for(var t,e=!1,n=this.$editor.commands,a=this.$handlers.length;a--&&(t=this.$handlers[a].handleKeyboard(this.$data,u,o,i,r),!(!(!t||!t.command)&&(t.command=="null"?e=!0:e=n.exec(t.command,this.$editor,t.args,r),e&&r&&u!=-1&&t.passEvent!=!0&&t.command.passEvent!=!0&&R.stopEvent(r),e))););return!e&&u==-1&&(t={command:"insertstring"},e=n.exec("insertstring",this.$editor,o)),e&&this.$editor._signal&&this.$editor._signal("keyboardActivity",t),e},l.prototype.onCommandKey=function(u,o,i){var r=Q.keyCodeToString(i);return this.$callKeyboardHandlers(o,r,i,u)},l.prototype.onTextInput=function(u){return this.$callKeyboardHandlers(-1,u)},l}();m.KeyBinding=M}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(p,m,Gn){var Q=0,R=0,M=!1,l=!1,u=!1,o=[[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]],i=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],r=0,t=1,e=0,n=1,a=2,d=3,f=4,xe=5,F=6,_=7,S=8,Ae=9,Vn=10,Me=11,oe=12,Yn=13,y=14,h=15,w=16,J=17,He=18,Kn=[He,He,He,He,He,He,He,He,He,F,xe,F,S,xe,He,He,He,He,He,He,He,He,He,He,He,He,He,He,xe,xe,xe,F,S,f,f,Me,Me,Me,f,f,f,f,f,Vn,Ae,Vn,Ae,Ae,a,a,a,a,a,a,a,a,a,a,Ae,f,f,f,f,f,f,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,f,f,f,f,f,f,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,f,f,f,f,He,He,He,He,He,He,xe,He,He,He,He,He,He,He,He,He,He,He,He,He,He,He,He,He,He,He,He,He,He,He,He,He,He,Ae,f,Me,Me,Me,Me,f,f,f,f,e,f,f,He,f,f,Me,Me,a,a,f,e,f,f,f,a,e,f,f,f,f,f],Qn=[S,S,S,S,S,S,S,S,S,S,S,He,He,He,e,n,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,S,xe,Yn,y,h,w,J,Ae,Me,Me,Me,Me,Me,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,Ae,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,S];function Zn(Jn,ti,ii,ni){var si=Q?i:o,li=null,ci=null,ai=null,ui=0,mi=null,Si=null,$i=-1,vi=null,xi=null,Ai=[];if(!ni)for(vi=0,ni=[];vi<ii;vi++)ni[vi]=ri(Jn[vi]);for(R=Q,M=!1,l=!1,u=!1,xi=0;xi<ii;xi++){if(li=ui,Ai[xi]=ci=ei(Jn,ni,Ai,xi),ui=si[li][ci],mi=ui&240,ui&=15,ti[xi]=ai=si[ui][5],mi>0)if(mi==16){for(vi=$i;vi<xi;vi++)ti[vi]=1;$i=-1}else $i=-1;if(Si=si[ui][6],Si)$i==-1&&($i=xi);else if($i>-1){for(vi=$i;vi<xi;vi++)ti[vi]=ai;$i=-1}ni[xi]==xe&&(ti[xi]=0),R|=ai}if(u){for(vi=0;vi<ii;vi++)if(ni[vi]==F){ti[vi]=Q;for(var ki=vi-1;ki>=0&&ni[ki]==S;ki--)ti[ki]=Q}}}function Xn(Jn,ti,ii){if(!(R<Jn)){if(Jn==1&&Q==t&&!l){ii.reverse();return}for(var ni=ii.length,si=0,li,ci,ai,ui;si<ni;){if(ti[si]>=Jn){for(li=si+1;li<ni&&ti[li]>=Jn;)li++;for(ci=si,ai=li-1;ci<ai;ci++,ai--)ui=ii[ci],ii[ci]=ii[ai],ii[ai]=ui;si=li}si++}}}function ei(Jn,ti,ii,ni){var si=ti[ni],li,ci,ai,ui;switch(si){case e:case n:M=!1;case f:case d:return si;case a:return M?d:a;case _:return M=!0,n;case S:return f;case Ae:return ni<1||ni+1>=ti.length||(li=ii[ni-1])!=a&&li!=d||(ci=ti[ni+1])!=a&&ci!=d?f:(M&&(ci=d),ci==li?ci:f);case Vn:return li=ni>0?ii[ni-1]:xe,li==a&&ni+1<ti.length&&ti[ni+1]==a?a:f;case Me:if(ni>0&&ii[ni-1]==a)return a;if(M)return f;for(ui=ni+1,ai=ti.length;ui<ai&&ti[ui]==Me;)ui++;return ui<ai&&ti[ui]==a?a:f;case oe:for(ai=ti.length,ui=ni+1;ui<ai&&ti[ui]==oe;)ui++;if(ui<ai){var mi=Jn[ni],Si=mi>=1425&&mi<=2303||mi==64286;if(li=ti[ui],Si&&(li==n||li==_))return n}return ni<1||(li=ti[ni-1])==xe?f:ii[ni-1];case xe:return M=!1,l=!0,Q;case F:return u=!0,f;case Yn:case y:case w:case J:case h:M=!1;case He:return f}}function ri(Jn){var ti=Jn.charCodeAt(0),ii=ti>>8;return ii==0?ti>191?e:Kn[ti]:ii==5?/[\u0591-\u05f4]/.test(Jn)?n:e:ii==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(Jn)?oe:/[\u0660-\u0669\u066b-\u066c]/.test(Jn)?d:ti==1642?Me:/[\u06f0-\u06f9]/.test(Jn)?a:_:ii==32&&ti<=8287?Qn[ti&255]:ii==254&&ti>=65136?_:f}m.L=e,m.R=n,m.EN=a,m.ON_R=3,m.AN=4,m.R_H=5,m.B=6,m.RLE=7,m.DOT="·",m.doBidiReorder=function(Jn,ti,ii){if(Jn.length<2)return{};var ni=Jn.split(""),si=new Array(ni.length),li=new Array(ni.length),ci=[];Q=ii?t:r,Zn(ni,ci,ni.length,ti);for(var ai=0;ai<si.length;si[ai]=ai,ai++);Xn(2,ci,si),Xn(1,ci,si);for(var ai=0;ai<si.length-1;ai++)ti[ai]===d?ci[ai]=m.AN:ci[ai]===n&&(ti[ai]>_&&ti[ai]<Yn||ti[ai]===f||ti[ai]===He)?ci[ai]=m.ON_R:ai>0&&ni[ai-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ni[ai])&&(ci[ai-1]=ci[ai]=m.R_H,ai++);ni[ni.length-1]===m.DOT&&(ci[ni.length-1]=m.B),ni[0]==="‫"&&(ci[0]=m.RLE);for(var ai=0;ai<si.length;ai++)li[ai]=ci[si[ai]];return{logicalFromVisual:si,bidiLevels:li}},m.hasBidiCharacters=function(Jn,ti){for(var ii=!1,ni=0;ni<Jn.length;ni++)ti[ni]=ri(Jn.charAt(ni)),!ii&&(ti[ni]==n||ti[ni]==_||ti[ni]==d)&&(ii=!0);return ii},m.getVisualFromLogicalIdx=function(Jn,ti){for(var ii=0;ii<ti.logicalFromVisual.length;ii++)if(ti.logicalFromVisual[ii]==Jn)return ii;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(p,m,Gn){var Q=p("./lib/bidiutil"),R=p("./lib/lang"),M=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,l=function(){function u(o){this.session=o,this.bidiMap={},this.currentRow=null,this.bidiUtil=Q,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=M.test(o.getValue())}return u.prototype.isBidiRow=function(o,i,r){return this.seenBidi?(o!==this.currentRow&&(this.currentRow=o,this.updateRowLine(i,r),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},u.prototype.onChange=function(o){this.seenBidi?this.currentRow=null:o.action=="insert"&&M.test(o.lines.join(`
180
+ `))&&(this.seenBidi=!0,this.currentRow=null)},u.prototype.getDocumentRow=function(){var o=0,i=this.session.$screenRowCache;if(i.length){var r=this.session.$getRowCacheIndex(i,this.currentRow);r>=0&&(o=this.session.$docRowCache[r])}return o},u.prototype.getSplitIndex=function(){var o=0,i=this.session.$screenRowCache;if(i.length)for(var r,t=this.session.$getRowCacheIndex(i,this.currentRow);this.currentRow-o>0&&(r=this.session.$getRowCacheIndex(i,this.currentRow-o-1),r===t);)t=r,o++;else o=this.currentRow;return o},u.prototype.updateRowLine=function(o,i){o===void 0&&(o=this.getDocumentRow());var r=o===this.session.getLength()-1,t=r?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(o),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var e=this.session.$wrapData[o];e&&(i===void 0&&(i=this.getSplitIndex()),i>0&&e.length?(this.wrapIndent=e.indent,this.wrapOffset=this.wrapIndent*this.charWidths[Q.L],this.line=i<e.length?this.line.substring(e[i-1],e[i]):this.line.substring(e[e.length-1])):this.line=this.line.substring(0,e[i]),i==e.length&&(this.line+=this.showInvisibles?t:Q.DOT))}else this.line+=this.showInvisibles?t:Q.DOT;var n=this.session,a=0,d;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(f,xe){return f===" "||n.isFullWidth(f.charCodeAt(0))?(d=f===" "?n.getScreenTabSize(xe+a):2,a+=d-1,R.stringRepeat(Q.DOT,d)):f}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==Q.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},u.prototype.updateBidiMap=function(){var o=[];Q.hasBidiCharacters(this.line,o)||this.isRtlDir?this.bidiMap=Q.doBidiReorder(this.line,o,this.isRtlDir):this.bidiMap={}},u.prototype.markAsDirty=function(){this.currentRow=null},u.prototype.updateCharacterWidths=function(o){if(this.characterWidth!==o.$characterSize.width){this.fontMetrics=o;var i=this.characterWidth=o.$characterSize.width,r=o.$measureCharWidth("ה");this.charWidths[Q.L]=this.charWidths[Q.EN]=this.charWidths[Q.ON_R]=i,this.charWidths[Q.R]=this.charWidths[Q.AN]=r,this.charWidths[Q.R_H]=r*.45,this.charWidths[Q.B]=this.charWidths[Q.RLE]=0,this.currentRow=null}},u.prototype.setShowInvisibles=function(o){this.showInvisibles=o,this.currentRow=null},u.prototype.setEolChar=function(o){this.EOL=o},u.prototype.setContentWidth=function(o){this.contentWidth=o},u.prototype.isRtlLine=function(o){return this.$isRtl?!0:o!=null?this.session.getLine(o).charAt(0)==this.RLE:this.isRtlDir},u.prototype.setRtlDirection=function(o,i){for(var r=o.getCursorPosition(),t=o.selection.getSelectionAnchor().row;t<=r.row;t++)!i&&o.session.getLine(t).charAt(0)===o.session.$bidiHandler.RLE?o.session.doc.removeInLine(t,0,1):i&&o.session.getLine(t).charAt(0)!==o.session.$bidiHandler.RLE&&o.session.doc.insert({column:0,row:t},o.session.$bidiHandler.RLE)},u.prototype.getPosLeft=function(o){o-=this.wrapIndent;var i=this.line.charAt(0)===this.RLE?1:0,r=o>i?this.session.getOverwrite()?o:o-1:i,t=Q.getVisualFromLogicalIdx(r,this.bidiMap),e=this.bidiMap.bidiLevels,n=0;!this.session.getOverwrite()&&o<=i&&e[t]%2!==0&&t++;for(var a=0;a<t;a++)n+=this.charWidths[e[a]];return!this.session.getOverwrite()&&o>i&&e[t]%2===0&&(n+=this.charWidths[e[t]]),this.wrapIndent&&(n+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(n+=this.rtlLineOffset),n},u.prototype.getSelections=function(o,i){var r=this.bidiMap,t=r.bidiLevels,e,n=[],a=0,d=Math.min(o,i)-this.wrapIndent,f=Math.max(o,i)-this.wrapIndent,xe=!1,F=!1,_=0;this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var S,Ae=0;Ae<t.length;Ae++)S=r.logicalFromVisual[Ae],e=t[Ae],xe=S>=d&&S<f,xe&&!F?_=a:!xe&&F&&n.push({left:_,width:a-_}),a+=this.charWidths[e],F=xe;if(xe&&Ae===t.length&&n.push({left:_,width:a-_}),this.isRtlDir)for(var Vn=0;Vn<n.length;Vn++)n[Vn].left+=this.rtlLineOffset;return n},u.prototype.offsetToCol=function(r){this.isRtlDir&&(r-=this.rtlLineOffset);var i=0,r=Math.max(r,0),t=0,e=0,n=this.bidiMap.bidiLevels,a=this.charWidths[n[e]];for(this.wrapIndent&&(r-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);r>t+a/2;){if(t+=a,e===n.length-1){a=0;break}a=this.charWidths[n[++e]]}return e>0&&n[e-1]%2!==0&&n[e]%2===0?(r<t&&e--,i=this.bidiMap.logicalFromVisual[e]):e>0&&n[e-1]%2===0&&n[e]%2!==0?i=1+(r>t?this.bidiMap.logicalFromVisual[e]:this.bidiMap.logicalFromVisual[e-1]):this.isRtlDir&&e===n.length-1&&a===0&&n[e-1]%2===0||!this.isRtlDir&&e===0&&n[e]%2!==0?i=1+this.bidiMap.logicalFromVisual[e]:(e>0&&n[e-1]%2!==0&&a!==0&&e--,i=this.bidiMap.logicalFromVisual[e]),i===0&&this.isRtlDir&&i++,i+this.wrapIndent},u}();m.BidiHandler=l}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(p,m,Gn){var Q=p("./lib/oop"),R=p("./lib/lang"),M=p("./lib/event_emitter").EventEmitter,l=p("./range").Range,u=function(){function o(i){this.session=i,this.doc=i.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var r=this;this.cursor.on("change",function(t){r.$cursorChanged=!0,r.$silent||r._emit("changeCursor"),!r.$isEmpty&&!r.$silent&&r._emit("changeSelection"),!r.$keepDesiredColumnOnChange&&t.old.column!=t.value.column&&(r.$desiredColumn=null)}),this.anchor.on("change",function(){r.$anchorChanged=!0,!r.$isEmpty&&!r.$silent&&r._emit("changeSelection")})}return o.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},o.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},o.prototype.getCursor=function(){return this.lead.getPosition()},o.prototype.setAnchor=function(i,r){this.$isEmpty=!1,this.anchor.setPosition(i,r)},o.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},o.prototype.getSelectionLead=function(){return this.lead.getPosition()},o.prototype.isBackwards=function(){var i=this.anchor,r=this.lead;return i.row>r.row||i.row==r.row&&i.column>r.column},o.prototype.getRange=function(){var i=this.anchor,r=this.lead;return this.$isEmpty?l.fromPoints(r,r):this.isBackwards()?l.fromPoints(r,i):l.fromPoints(i,r)},o.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},o.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},o.prototype.setRange=function(i,r){var t=r?i.end:i.start,e=r?i.start:i.end;this.$setSelection(t.row,t.column,e.row,e.column)},o.prototype.$setSelection=function(i,r,t,e){if(!this.$silent){var n=this.$isEmpty,a=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(i,r),this.cursor.setPosition(t,e),this.$isEmpty=!l.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||n!=this.$isEmpty||a)&&this._emit("changeSelection")}},o.prototype.$moveSelection=function(i){var r=this.lead;this.$isEmpty&&this.setSelectionAnchor(r.row,r.column),i.call(this)},o.prototype.selectTo=function(i,r){this.$moveSelection(function(){this.moveCursorTo(i,r)})},o.prototype.selectToPosition=function(i){this.$moveSelection(function(){this.moveCursorToPosition(i)})},o.prototype.moveTo=function(i,r){this.clearSelection(),this.moveCursorTo(i,r)},o.prototype.moveToPosition=function(i){this.clearSelection(),this.moveCursorToPosition(i)},o.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},o.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},o.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},o.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},o.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},o.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},o.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},o.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},o.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},o.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},o.prototype.getWordRange=function(i,r){if(typeof r>"u"){var t=i||this.lead;i=t.row,r=t.column}return this.session.getWordRange(i,r)},o.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},o.prototype.selectAWord=function(){var i=this.getCursor(),r=this.session.getAWordRange(i.row,i.column);this.setSelectionRange(r)},o.prototype.getLineRange=function(i,r){var t=typeof i=="number"?i:this.lead.row,e,n=this.session.getFoldLine(t);return n?(t=n.start.row,e=n.end.row):e=t,r===!0?new l(t,0,e,this.session.getLine(e).length):new l(t,0,e+1,0)},o.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},o.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},o.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},o.prototype.wouldMoveIntoSoftTab=function(i,r,t){var e=i.column,n=i.column+r;return t<0&&(e=i.column-r,n=i.column),this.session.isTabStop(i)&&this.doc.getLine(i.row).slice(e,n).split(" ").length-1==r},o.prototype.moveCursorLeft=function(){var i=this.lead.getPosition(),r;if(r=this.session.getFoldAt(i.row,i.column,-1))this.moveCursorTo(r.start.row,r.start.column);else if(i.column===0)i.row>0&&this.moveCursorTo(i.row-1,this.doc.getLine(i.row-1).length);else{var t=this.session.getTabSize();this.wouldMoveIntoSoftTab(i,t,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-t):this.moveCursorBy(0,-1)}},o.prototype.moveCursorRight=function(){var i=this.lead.getPosition(),r;if(r=this.session.getFoldAt(i.row,i.column,1))this.moveCursorTo(r.end.row,r.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var t=this.session.getTabSize(),i=this.lead;this.wouldMoveIntoSoftTab(i,t,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,t):this.moveCursorBy(0,1)}},o.prototype.moveCursorLineStart=function(){var i=this.lead.row,r=this.lead.column,t=this.session.documentToScreenRow(i,r),e=this.session.screenToDocumentPosition(t,0),n=this.session.getDisplayLine(i,null,e.row,e.column),a=n.match(/^\s*/);a[0].length!=r&&!this.session.$useEmacsStyleLineStart&&(e.column+=a[0].length),this.moveCursorToPosition(e)},o.prototype.moveCursorLineEnd=function(){var i=this.lead,r=this.session.getDocumentLastRowColumnPosition(i.row,i.column);if(this.lead.column==r.column){var t=this.session.getLine(r.row);if(r.column==t.length){var e=t.search(/\s+$/);e>0&&(r.column=e)}}this.moveCursorTo(r.row,r.column)},o.prototype.moveCursorFileEnd=function(){var i=this.doc.getLength()-1,r=this.doc.getLine(i).length;this.moveCursorTo(i,r)},o.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},o.prototype.moveCursorLongWordRight=function(){var i=this.lead.row,r=this.lead.column,t=this.doc.getLine(i),e=t.substring(r);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var n=this.session.getFoldAt(i,r,1);if(n){this.moveCursorTo(n.end.row,n.end.column);return}if(this.session.nonTokenRe.exec(e)&&(r+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,e=t.substring(r)),r>=t.length){this.moveCursorTo(i,t.length),this.moveCursorRight(),i<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(e)&&(r+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(i,r)},o.prototype.moveCursorLongWordLeft=function(){var i=this.lead.row,r=this.lead.column,t;if(t=this.session.getFoldAt(i,r,-1)){this.moveCursorTo(t.start.row,t.start.column);return}var e=this.session.getFoldStringAt(i,r,-1);e==null&&(e=this.doc.getLine(i).substring(0,r));var n=R.stringReverse(e);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(n)&&(r-=this.session.nonTokenRe.lastIndex,n=n.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),r<=0){this.moveCursorTo(i,0),this.moveCursorLeft(),i>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(n)&&(r-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(i,r)},o.prototype.$shortWordEndIndex=function(i){var r=0,t,e=/\s/,n=this.session.tokenRe;if(n.lastIndex=0,this.session.tokenRe.exec(i))r=this.session.tokenRe.lastIndex;else{for(;(t=i[r])&&e.test(t);)r++;if(r<1){for(n.lastIndex=0;(t=i[r])&&!n.test(t);)if(n.lastIndex=0,r++,e.test(t))if(r>2){r--;break}else{for(;(t=i[r])&&e.test(t);)r++;if(r>2)break}}}return n.lastIndex=0,r},o.prototype.moveCursorShortWordRight=function(){var i=this.lead.row,r=this.lead.column,t=this.doc.getLine(i),e=t.substring(r),n=this.session.getFoldAt(i,r,1);if(n)return this.moveCursorTo(n.end.row,n.end.column);if(r==t.length){var a=this.doc.getLength();do i++,e=this.doc.getLine(i);while(i<a&&/^\s*$/.test(e));/^\s+/.test(e)||(e=""),r=0}var d=this.$shortWordEndIndex(e);this.moveCursorTo(i,r+d)},o.prototype.moveCursorShortWordLeft=function(){var i=this.lead.row,r=this.lead.column,t;if(t=this.session.getFoldAt(i,r,-1))return this.moveCursorTo(t.start.row,t.start.column);var e=this.session.getLine(i).substring(0,r);if(r===0){do i--,e=this.doc.getLine(i);while(i>0&&/^\s*$/.test(e));r=e.length,/\s+$/.test(e)||(e="")}var n=R.stringReverse(e),a=this.$shortWordEndIndex(n);return this.moveCursorTo(i,r-a)},o.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},o.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},o.prototype.moveCursorBy=function(i,r){var t=this.session.documentToScreenPosition(this.lead.row,this.lead.column),e;if(r===0&&(i!==0&&(this.session.$bidiHandler.isBidiRow(t.row,this.lead.row)?(e=this.session.$bidiHandler.getPosLeft(t.column),t.column=Math.round(e/this.session.$bidiHandler.charWidths[0])):e=t.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?t.column=this.$desiredColumn:this.$desiredColumn=t.column),i!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var n=this.session.lineWidgets[this.lead.row];i<0?i-=n.rowsAbove||0:i>0&&(i+=n.rowCount-(n.rowsAbove||0))}var a=this.session.screenToDocumentPosition(t.row+i,t.column,e);i!==0&&r===0&&a.row===this.lead.row&&(a.column,this.lead.column),this.moveCursorTo(a.row,a.column+r,r===0)},o.prototype.moveCursorToPosition=function(i){this.moveCursorTo(i.row,i.column)},o.prototype.moveCursorTo=function(i,r,t){var e=this.session.getFoldAt(i,r,1);e&&(i=e.start.row,r=e.start.column),this.$keepDesiredColumnOnChange=!0;var n=this.session.getLine(i);/[\uDC00-\uDFFF]/.test(n.charAt(r))&&n.charAt(r-1)&&(this.lead.row==i&&this.lead.column==r+1?r=r-1:r=r+1),this.lead.setPosition(i,r),this.$keepDesiredColumnOnChange=!1,t||(this.$desiredColumn=null)},o.prototype.moveCursorToScreen=function(i,r,t){var e=this.session.screenToDocumentPosition(i,r);this.moveCursorTo(e.row,e.column,t)},o.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},o.prototype.fromOrientedRange=function(i){this.setSelectionRange(i,i.cursor==i.start),this.$desiredColumn=i.desiredColumn||this.$desiredColumn},o.prototype.toOrientedRange=function(i){var r=this.getRange();return i?(i.start.column=r.start.column,i.start.row=r.start.row,i.end.column=r.end.column,i.end.row=r.end.row):i=r,i.cursor=this.isBackwards()?i.start:i.end,i.desiredColumn=this.$desiredColumn,i},o.prototype.getRangeOfMovements=function(i){var r=this.getCursor();try{i(this);var t=this.getCursor();return l.fromPoints(r,t)}catch{return l.fromPoints(r,r)}finally{this.moveCursorToPosition(r)}},o.prototype.toJSON=function(){if(this.rangeCount)var i=this.ranges.map(function(r){var t=r.clone();return t.isBackwards=r.cursor==r.start,t});else{var i=this.getRange();i.isBackwards=this.isBackwards()}return i},o.prototype.fromJSON=function(i){if(i.start==null)if(this.rangeList&&i.length>1){this.toSingleRange(i[0]);for(var r=i.length;r--;){var t=l.fromPoints(i[r].start,i[r].end);i[r].isBackwards&&(t.cursor=t.start),this.addRange(t,!0)}return}else i=i[0];this.rangeList&&this.toSingleRange(i),this.setSelectionRange(i,i.isBackwards)},o.prototype.isEqual=function(i){if((i.length||this.rangeCount)&&i.length!=this.rangeCount)return!1;if(!i.length||!this.ranges)return this.getRange().isEqual(i);for(var r=this.ranges.length;r--;)if(!this.ranges[r].isEqual(i[r]))return!1;return!0},o}();u.prototype.setSelectionAnchor=u.prototype.setAnchor,u.prototype.getSelectionAnchor=u.prototype.getAnchor,u.prototype.setSelectionRange=u.prototype.setRange,Q.implement(u.prototype,M),m.Selection=u}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(p,m,Gn){var Q=p("./lib/report_error").reportError,R=2e3,M=function(){function l(u){this.splitRegex,this.states=u,this.regExps={},this.matchMappings={};for(var o in this.states){for(var i=this.states[o],r=[],t=0,e=this.matchMappings[o]={defaultToken:"text"},n="g",a=[],d=0;d<i.length;d++){var f=i[d];if(f.defaultToken&&(e.defaultToken=f.defaultToken),f.caseInsensitive&&n.indexOf("i")===-1&&(n+="i"),f.unicode&&n.indexOf("u")===-1&&(n+="u"),f.regex!=null){f.regex instanceof RegExp&&(f.regex=f.regex.toString().slice(1,-1));var xe=f.regex,F=new RegExp("(?:("+xe+")|(.))").exec("a").length-2;Array.isArray(f.token)?f.token.length==1||F==1?f.token=f.token[0]:F-1!=f.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:f,groupCount:F-1}),f.token=f.token[0]):(f.tokenArray=f.token,f.token=null,f.onMatch=this.$arrayTokens):typeof f.token=="function"&&!f.onMatch&&(F>1?f.onMatch=this.$applyToken:f.onMatch=f.token),F>1&&(/\\\d/.test(f.regex)?xe=f.regex.replace(/\\([0-9]+)/g,function(_,S){return"\\"+(parseInt(S,10)+t+1)}):(F=1,xe=this.removeCapturingGroups(f.regex)),!f.splitRegex&&typeof f.token!="string"&&a.push(f)),e[t]=d,t+=F,r.push(xe),f.onMatch||(f.onMatch=null)}}r.length||(e[0]=0,r.push("$")),a.forEach(function(_){_.splitRegex=this.createSplitterRegexp(_.regex,n)},this),this.regExps[o]=new RegExp("("+r.join(")|(")+")|($)",n)}}return l.prototype.$setMaxTokenCount=function(u){R=u|0},l.prototype.$applyToken=function(u){var o=this.splitRegex.exec(u).slice(1),i=this.token.apply(this,o);if(typeof i=="string")return[{type:i,value:u}];for(var r=[],t=0,e=i.length;t<e;t++)o[t]&&(r[r.length]={type:i[t],value:o[t]});return r},l.prototype.$arrayTokens=function(u){if(!u)return[];var o=this.splitRegex.exec(u);if(!o)return"text";for(var i=[],r=this.tokenArray,t=0,e=r.length;t<e;t++)o[t+1]&&(i[i.length]={type:r[t],value:o[t+1]});return i},l.prototype.removeCapturingGroups=function(u){var o=u.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(i,r){return r?"(?:":i});return o},l.prototype.createSplitterRegexp=function(u,o){if(u.indexOf("(?=")!=-1){var i=0,r=!1,t={};u.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,n,a,d,f,xe){return r?r=f!="]":f?r=!0:d?(i==t.stack&&(t.end=xe+1,t.stack=-1),i--):a&&(i++,a.length!=1&&(t.stack=i,t.start=xe)),e}),t.end!=null&&/^\)*$/.test(u.substr(t.end))&&(u=u.substring(0,t.start)+u.substr(t.end))}return u.charAt(0)!="^"&&(u="^"+u),u.charAt(u.length-1)!="$"&&(u+="$"),new RegExp(u,(o||"").replace("g",""))},l.prototype.getLineTokens=function(u,o){if(o&&typeof o!="string"){var i=o.slice(0);o=i[0],o==="#tmp"&&(i.shift(),o=i.shift())}else var i=[];var r=o||"start",t=this.states[r];t||(r="start",t=this.states[r]);var e=this.matchMappings[r],n=this.regExps[r];n.lastIndex=0;for(var a,d=[],f=0,xe=0,F={type:null,value:""};a=n.exec(u);){var _=e.defaultToken,S=null,Ae=a[0],Vn=n.lastIndex;if(Vn-Ae.length>f){var Me=u.substring(f,Vn-Ae.length);F.type==_?F.value+=Me:(F.type&&d.push(F),F={type:_,value:Me})}for(var oe=0;oe<a.length-2;oe++)if(a[oe+1]!==void 0){S=t[e[oe]],S.onMatch?_=S.onMatch(Ae,r,i,u):_=S.token,S.next&&(typeof S.next=="string"?r=S.next:r=S.next(r,i),t=this.states[r],t||(this.reportError("state doesn't exist",r),r="start",t=this.states[r]),e=this.matchMappings[r],f=Vn,n=this.regExps[r],n.lastIndex=Vn),S.consumeLineEnd&&(f=Vn);break}if(Ae){if(typeof _=="string")(!S||S.merge!==!1)&&F.type===_?F.value+=Ae:(F.type&&d.push(F),F={type:_,value:Ae});else if(_){F.type&&d.push(F),F={type:null,value:""};for(var oe=0;oe<_.length;oe++)d.push(_[oe])}}if(f==u.length)break;if(f=Vn,xe++>R){for(xe>2*u.length&&this.reportError("infinite loop with in ace tokenizer",{startState:o,line:u});f<u.length;)F.type&&d.push(F),F={value:u.substring(f,f+=500),type:"overflow"};r="start",i=[];break}}return F.type&&d.push(F),i.length>1&&i[0]!==r&&i.unshift("#tmp",r),{tokens:d,state:i.length?i:r}},l}();M.prototype.reportError=Q,m.Tokenizer=M}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(p,m,Gn){var Q=p("../lib/deep_copy").deepCopy,R;R=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(u,o){if(!o){for(var i in u)this.$rules[i]=u[i];return}for(var i in u){for(var r=u[i],t=0;t<r.length;t++){var e=r[t];(e.next||e.onMatch)&&(typeof e.next=="string"&&e.next.indexOf(o)!==0&&(e.next=o+e.next),e.nextState&&e.nextState.indexOf(o)!==0&&(e.nextState=o+e.nextState))}this.$rules[o+i]=r}},this.getRules=function(){return this.$rules},this.embedRules=function(u,o,i,r,t){var e=typeof u=="function"?new u().getRules():u;if(r)for(var n=0;n<r.length;n++)r[n]=o+r[n];else{r=[];for(var a in e)r.push(o+a)}if(this.addRules(e,o),i)for(var d=Array.prototype[t?"push":"unshift"],n=0;n<r.length;n++)d.apply(this.$rules[r[n]],Q(i));this.$embeds||(this.$embeds=[]),this.$embeds.push(o)},this.getEmbeds=function(){return this.$embeds};var M=function(u,o){return(u!="start"||o.length)&&o.unshift(this.nextState,u),this.nextState},l=function(u,o){return o.shift(),o.shift()||"start"};this.normalizeRules=function(){var u=0,o=this.$rules;function i(r){var t=o[r];t.processed=!0;for(var e=0;e<t.length;e++){var n=t[e],a=null;Array.isArray(n)&&(a=n,n={}),!n.regex&&n.start&&(n.regex=n.start,n.next||(n.next=[]),n.next.push({defaultToken:n.token},{token:n.token+".end",regex:n.end||n.start,next:"pop"}),n.token=n.token+".start",n.push=!0);var d=n.next||n.push;if(d&&Array.isArray(d)){var f=n.stateName;f||(f=n.token,typeof f!="string"&&(f=f[0]||""),o[f]&&(f+=u++)),o[f]=d,n.next=f,i(f)}else d=="pop"&&(n.next=l);if(n.push&&(n.nextState=n.next||n.push,n.next=M,delete n.push),n.rules)for(var xe in n.rules)o[xe]?o[xe].push&&o[xe].push.apply(o[xe],n.rules[xe]):o[xe]=n.rules[xe];var F=typeof n=="string"?n:n.include;if(F&&(F==="$self"&&(F="start"),Array.isArray(F)?a=F.map(function(S){return o[S]}):a=o[F]),a){var _=[e,1].concat(a);n.noEscape&&(_=_.filter(function(S){return!S.next})),t.splice.apply(t,_),e--}n.keywordMap&&(n.token=this.createKeywordMapper(n.keywordMap,n.defaultToken||"text",n.caseInsensitive),delete n.defaultToken)}}Object.keys(o).forEach(i,this)},this.createKeywordMapper=function(u,o,i,r){var t=Object.create(null);return this.$keywordList=[],Object.keys(u).forEach(function(e){for(var n=u[e],a=n.split(r||"|"),d=a.length;d--;){var f=a[d];this.$keywordList.push(f),i&&(f=f.toLowerCase()),t[f]=e}},this),u=null,i?function(e){return t[e.toLowerCase()]||o}:function(e){return t[e]||o}},this.getKeywords=function(){return this.$keywords}}).call(R.prototype),m.TextHighlightRules=R}),ace.define("ace/mode/behaviour",["require","exports","module"],function(p,m,Gn){var Q;Q=function(){this.$behaviours={}},(function(){this.add=function(R,M,l){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[R]:this.$behaviours[R]={}}this.$behaviours[R][M]=l},this.addBehaviours=function(R){for(var M in R)for(var l in R[M])this.add(M,l,R[M][l])},this.remove=function(R){this.$behaviours&&this.$behaviours[R]&&delete this.$behaviours[R]},this.inherit=function(R,M){if(typeof R=="function")var l=new R().getBehaviours(M);else var l=R.getBehaviours(M);this.addBehaviours(l)},this.getBehaviours=function(R){if(R){for(var M={},l=0;l<R.length;l++)this.$behaviours[R[l]]&&(M[R[l]]=this.$behaviours[R[l]]);return M}else return this.$behaviours}}).call(Q.prototype),m.Behaviour=Q}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(p,m,Gn){var Q=p("./range").Range,R=function(){function M(l,u,o){this.$session=l,this.$row=u,this.$rowTokens=l.getTokens(u);var i=l.getTokenAt(u,o);this.$tokenIndex=i?i.index:-1}return M.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]},M.prototype.stepForward=function(){this.$tokenIndex+=1;for(var l;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,l||(l=this.$session.getLength()),this.$row>=l)return this.$row=l-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},M.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},M.prototype.getCurrentTokenRow=function(){return this.$row},M.prototype.getCurrentTokenColumn=function(){var l=this.$rowTokens,u=this.$tokenIndex,o=l[u].start;if(o!==void 0)return o;for(o=0;u>0;)u-=1,o+=l[u].value.length;return o},M.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},M.prototype.getCurrentTokenRange=function(){var l=this.$rowTokens[this.$tokenIndex],u=this.getCurrentTokenColumn();return new Q(this.$row,u,this.$row,u+l.value.length)},M}();m.TokenIterator=R}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(p,m,Gn){var Q=p("../../lib/oop"),R=p("../behaviour").Behaviour,M=p("../../token_iterator").TokenIterator,l=p("../../lib/lang"),u=["text","paren.rparen","rparen","paren","punctuation.operator"],o=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],i,r={},t={'"':'"',"'":"'"},e=function(d){var f=-1;if(d.multiSelect&&(f=d.selection.index,r.rangeCount!=d.multiSelect.rangeCount&&(r={rangeCount:d.multiSelect.rangeCount})),r[f])return i=r[f];i=r[f]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},n=function(d,f,xe,F){var _=d.end.row-d.start.row;return{text:xe+f+F,selection:[0,d.start.column+1,_,d.end.column+(_?0:1)]}},a;a=function(d){d=d||{},this.add("braces","insertion",function(f,xe,F,_,S){var Ae=F.getCursorPosition(),Vn=_.doc.getLine(Ae.row);if(S=="{"){e(F);var Me=F.getSelectionRange(),oe=_.doc.getTextRange(Me),Yn=_.getTokenAt(Ae.row,Ae.column);if(oe!==""&&oe!=="{"&&F.getWrapBehavioursEnabled())return n(Me,oe,"{","}");if(Yn&&/(?:string)\.quasi|\.xml/.test(Yn.type)){var y=[/tag\-(?:open|name)/,/attribute\-name/];return y.some(function(Zn){return Zn.test(Yn.type)})||/(string)\.quasi/.test(Yn.type)&&Yn.value[Ae.column-Yn.start-1]!=="$"?void 0:(a.recordAutoInsert(F,_,"}"),{text:"{}",selection:[1,1]})}else if(a.isSaneInsertion(F,_))return/[\]\}\)]/.test(Vn[Ae.column])||F.inMultiSelectMode||d.braces?(a.recordAutoInsert(F,_,"}"),{text:"{}",selection:[1,1]}):(a.recordMaybeInsert(F,_,"{"),{text:"{",selection:[1,1]})}else if(S=="}"){e(F);var h=Vn.substring(Ae.column,Ae.column+1);if(h=="}"){var w=_.$findOpeningBracket("}",{column:Ae.column+1,row:Ae.row});if(w!==null&&a.isAutoInsertedClosing(Ae,Vn,S))return a.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(S==`
181
+ `||S==`\r
182
+ `){e(F);var J="";a.isMaybeInsertedClosing(Ae,Vn)&&(J=l.stringRepeat("}",i.maybeInsertedBrackets),a.clearMaybeInsertedClosing());var h=Vn.substring(Ae.column,Ae.column+1);if(h==="}"){var He=_.findMatchingBracket({row:Ae.row,column:Ae.column+1},"}");if(!He)return null;var Kn=this.$getIndent(_.getLine(He.row))}else if(J)var Kn=this.$getIndent(Vn);else{a.clearMaybeInsertedClosing();return}var Qn=Kn+_.getTabString();return{text:`
183
+ `+Qn+`
184
+ `+Kn+J,selection:[1,Qn.length,1,Qn.length]}}else a.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(f,xe,F,_,S){var Ae=_.doc.getTextRange(S);if(!S.isMultiLine()&&Ae=="{"){e(F);var Vn=_.doc.getLine(S.start.row),Me=Vn.substring(S.end.column,S.end.column+1);if(Me=="}")return S.end.column++,S;i.maybeInsertedBrackets--}}),this.add("parens","insertion",function(f,xe,F,_,S){if(S=="("){e(F);var Ae=F.getSelectionRange(),Vn=_.doc.getTextRange(Ae);if(Vn!==""&&F.getWrapBehavioursEnabled())return n(Ae,Vn,"(",")");if(a.isSaneInsertion(F,_))return a.recordAutoInsert(F,_,")"),{text:"()",selection:[1,1]}}else if(S==")"){e(F);var Me=F.getCursorPosition(),oe=_.doc.getLine(Me.row),Yn=oe.substring(Me.column,Me.column+1);if(Yn==")"){var y=_.$findOpeningBracket(")",{column:Me.column+1,row:Me.row});if(y!==null&&a.isAutoInsertedClosing(Me,oe,S))return a.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(f,xe,F,_,S){var Ae=_.doc.getTextRange(S);if(!S.isMultiLine()&&Ae=="("){e(F);var Vn=_.doc.getLine(S.start.row),Me=Vn.substring(S.start.column+1,S.start.column+2);if(Me==")")return S.end.column++,S}}),this.add("brackets","insertion",function(f,xe,F,_,S){if(S=="["){e(F);var Ae=F.getSelectionRange(),Vn=_.doc.getTextRange(Ae);if(Vn!==""&&F.getWrapBehavioursEnabled())return n(Ae,Vn,"[","]");if(a.isSaneInsertion(F,_))return a.recordAutoInsert(F,_,"]"),{text:"[]",selection:[1,1]}}else if(S=="]"){e(F);var Me=F.getCursorPosition(),oe=_.doc.getLine(Me.row),Yn=oe.substring(Me.column,Me.column+1);if(Yn=="]"){var y=_.$findOpeningBracket("]",{column:Me.column+1,row:Me.row});if(y!==null&&a.isAutoInsertedClosing(Me,oe,S))return a.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(f,xe,F,_,S){var Ae=_.doc.getTextRange(S);if(!S.isMultiLine()&&Ae=="["){e(F);var Vn=_.doc.getLine(S.start.row),Me=Vn.substring(S.start.column+1,S.start.column+2);if(Me=="]")return S.end.column++,S}}),this.add("string_dquotes","insertion",function(f,xe,F,_,S){var Ae=_.$mode.$quotes||t;if(S.length==1&&Ae[S]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(S)!=-1)return;e(F);var Vn=S,Me=F.getSelectionRange(),oe=_.doc.getTextRange(Me);if(oe!==""&&(oe.length!=1||!Ae[oe])&&F.getWrapBehavioursEnabled())return n(Me,oe,Vn,Vn);if(!oe){var Yn=F.getCursorPosition(),y=_.doc.getLine(Yn.row),h=y.substring(Yn.column-1,Yn.column),w=y.substring(Yn.column,Yn.column+1),J=_.getTokenAt(Yn.row,Yn.column),He=_.getTokenAt(Yn.row,Yn.column+1);if(h=="\\"&&J&&/escape/.test(J.type))return null;var Kn=J&&/string|escape/.test(J.type),Qn=!He||/string|escape/.test(He.type),Zn;if(w==Vn)Zn=Kn!==Qn,Zn&&/string\.end/.test(He.type)&&(Zn=!1);else{if(Kn&&!Qn||Kn&&Qn)return null;var Xn=_.$mode.tokenRe;Xn.lastIndex=0;var ei=Xn.test(h);Xn.lastIndex=0;var ri=Xn.test(w),Jn=_.$mode.$pairQuotesAfter,ti=Jn&&Jn[Vn]&&Jn[Vn].test(h);if(!ti&&ei||ri||w&&!/[\s;,.})\]\\]/.test(w))return null;var ii=y[Yn.column-2];if(h==Vn&&(ii==Vn||Xn.test(ii)))return null;Zn=!0}return{text:Zn?Vn+Vn:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(f,xe,F,_,S){var Ae=_.$mode.$quotes||t,Vn=_.doc.getTextRange(S);if(!S.isMultiLine()&&Ae.hasOwnProperty(Vn)){e(F);var Me=_.doc.getLine(S.start.row),oe=Me.substring(S.start.column+1,S.start.column+2);if(oe==Vn)return S.end.column++,S}}),d.closeDocComment!==!1&&this.add("doc comment end","insertion",function(f,xe,F,_,S){if(f==="doc-start"&&(S===`
185
+ `||S===`\r
186
+ `)&&F.selection.isEmpty()){var Ae=F.getCursorPosition();if(Ae.column===0)return;for(var Vn=_.doc.getLine(Ae.row),Me=_.doc.getLine(Ae.row+1),oe=_.getTokens(Ae.row),Yn=0,y=0;y<oe.length;y++){Yn+=oe[y].value.length;var h=oe[y];if(Yn>=Ae.column){if(Yn===Ae.column){if(!/\.doc/.test(h.type))return;if(/\*\//.test(h.value)){var w=oe[y+1];if(!w||!/\.doc/.test(w.type))return}}var J=Ae.column-(Yn-h.value.length),He=h.value.indexOf("*/"),Kn=h.value.indexOf("/**",He>-1?He+2:0);if(Kn!==-1&&J>Kn&&J<Kn+3||He!==-1&&Kn!==-1&&J>=He&&J<=Kn||!/\.doc/.test(h.type))return;break}}var Qn=this.$getIndent(Vn);if(/\s*\*/.test(Me))return/^\s*\*/.test(Vn)?{text:S+Qn+"* ",selection:[1,2+Qn.length,1,2+Qn.length]}:{text:S+Qn+" * ",selection:[1,3+Qn.length,1,3+Qn.length]};if(/\/\*\*/.test(Vn.substring(0,Ae.column)))return{text:S+Qn+" * "+S+" "+Qn+"*/",selection:[1,4+Qn.length,1,4+Qn.length]}}})},a.isSaneInsertion=function(d,f){var xe=d.getCursorPosition(),F=new M(f,xe.row,xe.column);if(!this.$matchTokenType(F.getCurrentToken()||"text",u)){if(/[)}\]]/.test(d.session.getLine(xe.row)[xe.column]))return!0;var _=new M(f,xe.row,xe.column+1);if(!this.$matchTokenType(_.getCurrentToken()||"text",u))return!1}return F.stepForward(),F.getCurrentTokenRow()!==xe.row||this.$matchTokenType(F.getCurrentToken()||"text",o)},a.$matchTokenType=function(d,f){return f.indexOf(d.type||d)>-1},a.recordAutoInsert=function(d,f,xe){var F=d.getCursorPosition(),_=f.doc.getLine(F.row);this.isAutoInsertedClosing(F,_,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=F.row,i.autoInsertedLineEnd=xe+_.substr(F.column),i.autoInsertedBrackets++},a.recordMaybeInsert=function(d,f,xe){var F=d.getCursorPosition(),_=f.doc.getLine(F.row);this.isMaybeInsertedClosing(F,_)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=F.row,i.maybeInsertedLineStart=_.substr(0,F.column)+xe,i.maybeInsertedLineEnd=_.substr(F.column),i.maybeInsertedBrackets++},a.isAutoInsertedClosing=function(d,f,xe){return i.autoInsertedBrackets>0&&d.row===i.autoInsertedRow&&xe===i.autoInsertedLineEnd[0]&&f.substr(d.column)===i.autoInsertedLineEnd},a.isMaybeInsertedClosing=function(d,f){return i.maybeInsertedBrackets>0&&d.row===i.maybeInsertedRow&&f.substr(d.column)===i.maybeInsertedLineEnd&&f.substr(0,d.column)==i.maybeInsertedLineStart},a.popAutoInsertedClosing=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},a.clearMaybeInsertedClosing=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},Q.inherits(a,R),m.CstyleBehaviour=a}),ace.define("ace/unicode",["require","exports","module"],function(p,m,Gn){for(var Q=[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],R=0,M=[],l=0;l<Q.length;l+=2)M.push(R+=Q[l]),Q[l+1]&&M.push(45,R+=Q[l+1]);m.wordChars=String.fromCharCode.apply(null,M)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(p,m,Gn){var Q=p("../config"),R=p("../tokenizer").Tokenizer,M=p("./text_highlight_rules").TextHighlightRules,l=p("./behaviour/cstyle").CstyleBehaviour,u=p("../unicode"),o=p("../lib/lang"),i=p("../token_iterator").TokenIterator,r=p("../range").Range,t;t=function(){this.HighlightRules=M},(function(){this.$defaultBehaviour=new l,this.tokenRe=new RegExp("^["+u.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+u.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new R(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,n,a,d){var f=n.doc,xe=!0,F=!0,_=1/0,S=n.getTabSize(),Ae=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var oe=this.lineCommentStart.map(o.escapeRegExp).join("|"),Vn=this.lineCommentStart[0];else var oe=o.escapeRegExp(this.lineCommentStart),Vn=this.lineCommentStart;oe=new RegExp("^(\\s*)(?:"+oe+") ?"),Ae=n.getUseSoftTabs();var h=function(ri,Jn){var ti=ri.match(oe);if(ti){var ii=ti[1].length,ni=ti[0].length;!He(ri,ii,ni)&&ti[0][ni-1]==" "&&ni--,f.removeInLine(Jn,ii,ni)}},J=Vn+" ",y=function(ri,Jn){(!xe||/\S/.test(ri))&&(He(ri,_,_)?f.insertInLine({row:Jn,column:_},J):f.insertInLine({row:Jn,column:_},Vn))},w=function(ri,Jn){return oe.test(ri)},He=function(ri,Jn,ti){for(var ii=0;Jn--&&ri.charAt(Jn)==" ";)ii++;if(ii%S!=0)return!1;for(var ii=0;ri.charAt(ti++)==" ";)ii++;return S>2?ii%S!=S-1:ii%S==0}}else{if(!this.blockComment)return!1;var Vn=this.blockComment.start,Me=this.blockComment.end,oe=new RegExp("^(\\s*)(?:"+o.escapeRegExp(Vn)+")"),Yn=new RegExp("(?:"+o.escapeRegExp(Me)+")\\s*$"),y=function(Zn,Xn){w(Zn,Xn)||(!xe||/\S/.test(Zn))&&(f.insertInLine({row:Xn,column:Zn.length},Me),f.insertInLine({row:Xn,column:_},Vn))},h=function(Zn,Xn){var ei;(ei=Zn.match(Yn))&&f.removeInLine(Xn,Zn.length-ei[0].length,Zn.length),(ei=Zn.match(oe))&&f.removeInLine(Xn,ei[1].length,ei[0].length)},w=function(Zn,Xn){if(oe.test(Zn))return!0;for(var ei=n.getTokens(Xn),ri=0;ri<ei.length;ri++)if(ei[ri].type==="comment")return!0}}function Kn(Zn){for(var Xn=a;Xn<=d;Xn++)Zn(f.getLine(Xn),Xn)}var Qn=1/0;Kn(function(Zn,Xn){var ei=Zn.search(/\S/);ei!==-1?(ei<_&&(_=ei),F&&!w(Zn,Xn)&&(F=!1)):Qn>Zn.length&&(Qn=Zn.length)}),_==1/0&&(_=Qn,xe=!1,F=!1),Ae&&_%S!=0&&(_=Math.floor(_/S)*S),Kn(F?h:y)},this.toggleBlockComment=function(e,n,a,d){var f=this.blockComment;if(f){!f.start&&f[0]&&(f=f[0]);var xe=new i(n,d.row,d.column),F=xe.getCurrentToken();n.selection;var _=n.selection.toOrientedRange(),S,Ae;if(F&&/comment/.test(F.type)){for(var Vn,Me;F&&/comment/.test(F.type);){var oe=F.value.indexOf(f.start);if(oe!=-1){var Yn=xe.getCurrentTokenRow(),y=xe.getCurrentTokenColumn()+oe;Vn=new r(Yn,y,Yn,y+f.start.length);break}F=xe.stepBackward()}for(var xe=new i(n,d.row,d.column),F=xe.getCurrentToken();F&&/comment/.test(F.type);){var oe=F.value.indexOf(f.end);if(oe!=-1){var Yn=xe.getCurrentTokenRow(),y=xe.getCurrentTokenColumn()+oe;Me=new r(Yn,y,Yn,y+f.end.length);break}F=xe.stepForward()}Me&&n.remove(Me),Vn&&(n.remove(Vn),S=Vn.start.row,Ae=-f.start.length)}else Ae=f.start.length,S=a.start.row,n.insert(a.end,f.end),n.insert(a.start,f.start);_.start.row==S&&(_.start.column+=Ae),_.end.row==S&&(_.end.column+=Ae),n.selection.fromOrientedRange(_)}},this.getNextLineIndent=function(e,n,a){return this.$getIndent(n)},this.checkOutdent=function(e,n,a){return!1},this.autoOutdent=function(e,n,a){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){this.$embeds=[],this.$modes={};for(var n in e)if(e[n]){var a=e[n],d=a.prototype.$id,f=Q.$modes[d];f||(Q.$modes[d]=f=new a),Q.$modes[n]||(Q.$modes[n]=f),this.$embeds.push(n),this.$modes[n]=f}for(var xe=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],F=function(S){(function(Ae){var Vn=xe[S],Me=Ae[Vn];Ae[xe[S]]=function(){return this.$delegator(Vn,arguments,Me)}})(_)},_=this,n=0;n<xe.length;n++)F(n)},this.$delegator=function(e,n,a){var d=n[0]||"start";if(typeof d!="string"){if(Array.isArray(d[2])){var f=d[2][d[2].length-1],xe=this.$modes[f];if(xe)return xe[e].apply(xe,[d[1]].concat([].slice.call(n,1)))}d=d[0]||"start"}for(var F=0;F<this.$embeds.length;F++)if(this.$modes[this.$embeds[F]]){var _=d.split(this.$embeds[F]);if(!_[0]&&_[1]){n[0]=_[1];var xe=this.$modes[this.$embeds[F]];return xe[e].apply(xe,n)}}var S=a.apply(this,n);return a?S:void 0},this.transformAction=function(e,n,a,d,f){if(this.$behaviour){var xe=this.$behaviour.getBehaviours();for(var F in xe)if(xe[F][n]){var _=xe[F][n].apply(this,arguments);if(_)return _}}},this.getKeywords=function(e){if(!this.completionKeywords){var n=this.$tokenizer.rules,a=[];for(var d in n)for(var f=n[d],xe=0,F=f.length;xe<F;xe++)if(typeof f[xe].token=="string")/keyword|support|storage/.test(f[xe].token)&&a.push(f[xe].regex);else if(typeof f[xe].token=="object"){for(var _=0,S=f[xe].token.length;_<S;_++)if(/keyword|support|storage/.test(f[xe].token[_])){var d=f[xe].regex.match(/\(.+?\)/g)[_];a.push(d.substr(1,d.length-2))}}this.completionKeywords=a}return e?a.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,n,a,d){var f=this.$keywordList||this.$createKeywordList();return f.map(function(xe){return{name:xe,value:xe,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(t.prototype),m.Mode=t}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(p,m,Gn){var Q=p("./lib/dom"),R=function(){function M(l){this.session=l,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 M.prototype.getRowLength=function(l){var u;return this.lineWidgets?u=this.lineWidgets[l]&&this.lineWidgets[l].rowCount||0:u=0,!this.$useWrapMode||!this.$wrapData[l]?1+u:this.$wrapData[l].length+1+u},M.prototype.$getWidgetScreenLength=function(){var l=0;return this.lineWidgets.forEach(function(u){u&&u.rowCount&&!u.hidden&&(l+=u.rowCount)}),l},M.prototype.$onChangeEditor=function(l){this.attach(l.editor)},M.prototype.attach=function(l){l&&l.widgetManager&&l.widgetManager!=this&&l.widgetManager.detach(),this.editor!=l&&(this.detach(),this.editor=l,l&&(l.widgetManager=this,l.renderer.on("beforeRender",this.measureWidgets),l.renderer.on("afterRender",this.renderWidgets)))},M.prototype.detach=function(l){var u=this.editor;if(u){this.editor=null,u.widgetManager=null,u.renderer.off("beforeRender",this.measureWidgets),u.renderer.off("afterRender",this.renderWidgets);var o=this.session.lineWidgets;o&&o.forEach(function(i){i&&i.el&&i.el.parentNode&&(i._inDocument=!1,i.el.parentNode.removeChild(i.el))})}},M.prototype.updateOnFold=function(l,u){var o=u.lineWidgets;if(!(!o||!l.action)){for(var i=l.data,r=i.start.row,t=i.end.row,e=l.action=="add",n=r+1;n<t;n++)o[n]&&(o[n].hidden=e);o[t]&&(e?o[r]?o[t].hidden=e:o[r]=o[t]:(o[r]==o[t]&&(o[r]=void 0),o[t].hidden=e))}},M.prototype.updateOnChange=function(l){var u=this.session.lineWidgets;if(u){var o=l.start.row,i=l.end.row-o;if(i!==0)if(l.action=="remove"){var r=u.splice(o+1,i);!u[o]&&r[r.length-1]&&(u[o]=r.pop()),r.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var t=new Array(i);u[o]&&u[o].column!=null&&l.start.column>u[o].column&&o++,t.unshift(o,0),u.splice.apply(u,t),this.$updateRows()}}},M.prototype.$updateRows=function(){var l=this.session.lineWidgets;if(l){var u=!0;l.forEach(function(o,i){if(o)for(u=!1,o.row=i;o.$oldWidget;)o.$oldWidget.row=i,o=o.$oldWidget}),u&&(this.session.lineWidgets=null)}},M.prototype.$registerLineWidget=function(l){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var u=this.session.lineWidgets[l.row];return u&&(l.$oldWidget=u,u.el&&u.el.parentNode&&(u.el.parentNode.removeChild(u.el),u._inDocument=!1)),this.session.lineWidgets[l.row]=l,l},M.prototype.addLineWidget=function(l){if(this.$registerLineWidget(l),l.session=this.session,!this.editor)return l;var u=this.editor.renderer;l.html&&!l.el&&(l.el=Q.createElement("div"),l.el.innerHTML=l.html),l.text&&!l.el&&(l.el=Q.createElement("div"),l.el.textContent=l.text),l.el&&(Q.addCssClass(l.el,"ace_lineWidgetContainer"),l.className&&Q.addCssClass(l.el,l.className),l.el.style.position="absolute",l.el.style.zIndex="5",u.container.appendChild(l.el),l._inDocument=!0,l.coverGutter||(l.el.style.zIndex="3"),l.pixelHeight==null&&(l.pixelHeight=l.el.offsetHeight)),l.rowCount==null&&(l.rowCount=l.pixelHeight/u.layerConfig.lineHeight);var o=this.session.getFoldAt(l.row,0);if(l.$fold=o,o){var i=this.session.lineWidgets;l.row==o.end.row&&!i[o.start.row]?i[o.start.row]=l:l.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:l.row}}}),this.$updateRows(),this.renderWidgets(null,u),this.onWidgetChanged(l),l},M.prototype.removeLineWidget=function(l){if(l._inDocument=!1,l.session=null,l.el&&l.el.parentNode&&l.el.parentNode.removeChild(l.el),l.editor&&l.editor.destroy)try{l.editor.destroy()}catch{}if(this.session.lineWidgets){var u=this.session.lineWidgets[l.row];if(u==l)this.session.lineWidgets[l.row]=l.$oldWidget,l.$oldWidget&&this.onWidgetChanged(l.$oldWidget);else for(;u;){if(u.$oldWidget==l){u.$oldWidget=l.$oldWidget;break}u=u.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:l.row}}}),this.$updateRows()},M.prototype.getWidgetsAtRow=function(l){for(var u=this.session.lineWidgets,o=u&&u[l],i=[];o;)i.push(o),o=o.$oldWidget;return i},M.prototype.onWidgetChanged=function(l){this.session._changedWidgets.push(l),this.editor&&this.editor.renderer.updateFull()},M.prototype.measureWidgets=function(l,u){var o=this.session._changedWidgets,i=u.layerConfig;if(!(!o||!o.length)){for(var r=1/0,t=0;t<o.length;t++){var e=o[t];if(!(!e||!e.el)&&e.session==this.session){if(!e._inDocument){if(this.session.lineWidgets[e.row]!=e)continue;e._inDocument=!0,u.container.appendChild(e.el)}e.h=e.el.offsetHeight,e.fixedWidth||(e.w=e.el.offsetWidth,e.screenWidth=Math.ceil(e.w/i.characterWidth));var n=e.h/i.lineHeight;e.coverLine&&(n-=this.session.getRowLineCount(e.row),n<0&&(n=0)),e.rowCount!=n&&(e.rowCount=n,e.row<r&&(r=e.row))}}r!=1/0&&(this.session._emit("changeFold",{data:{start:{row:r}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},M.prototype.renderWidgets=function(l,u){var o=u.layerConfig,i=this.session.lineWidgets;if(i){for(var r=Math.min(this.firstRow,o.firstRow),t=Math.max(this.lastRow,o.lastRow,i.length);r>0&&!i[r];)r--;this.firstRow=o.firstRow,this.lastRow=o.lastRow,u.$cursorLayer.config=o;for(var e=r;e<=t;e++){var n=i[e];if(!(!n||!n.el)){if(n.hidden){n.el.style.top=-100-(n.pixelHeight||0)+"px";continue}n._inDocument||(n._inDocument=!0,u.container.appendChild(n.el));var a=u.$cursorLayer.getPixelPosition({row:e,column:0},!0).top;n.coverLine||(a+=o.lineHeight*this.session.getRowLineCount(n.row)),n.el.style.top=a-o.offset+"px";var d=n.coverGutter?0:u.gutterWidth;n.fixedWidth||(d-=u.scrollLeft),n.el.style.left=d+"px",n.fullWidth&&n.screenWidth&&(n.el.style.minWidth=o.width+2*o.padding+"px"),n.fixedWidth?n.el.style.right=u.scrollBar.getWidth()+"px":n.el.style.right=""}}}},M}();m.LineWidgets=R}),ace.define("ace/apply_delta",["require","exports","module"],function(p,m,Gn){m.applyDelta=function(Q,R,M){var l=R.start.row,u=R.start.column,o=Q[l]||"";switch(R.action){case"insert":var i=R.lines;if(i.length===1)Q[l]=o.substring(0,u)+R.lines[0]+o.substring(u);else{var r=[l,1].concat(R.lines);Q.splice.apply(Q,r),Q[l]=o.substring(0,u)+Q[l],Q[l+R.lines.length-1]+=o.substring(u)}break;case"remove":var t=R.end.column,e=R.end.row;l===e?Q[l]=o.substring(0,u)+o.substring(t):Q.splice(l,e-l+1,o.substring(0,u)+Q[e].substring(t));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(p,m,Gn){var Q=p("./lib/oop"),R=p("./lib/event_emitter").EventEmitter,M=function(){function o(i,r,t){this.$onChange=this.onChange.bind(this),this.attach(i),typeof r!="number"?this.setPosition(r.row,r.column):this.setPosition(r,t)}return o.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},o.prototype.getDocument=function(){return this.document},o.prototype.onChange=function(i){if(!(i.start.row==i.end.row&&i.start.row!=this.row)&&!(i.start.row>this.row)){var r=u(i,{row:this.row,column:this.column},this.$insertRight);this.setPosition(r.row,r.column,!0)}},o.prototype.setPosition=function(i,r,t){var e;if(t?e={row:i,column:r}:e=this.$clipPositionToDocument(i,r),!(this.row==e.row&&this.column==e.column)){var n={row:this.row,column:this.column};this.row=e.row,this.column=e.column,this._signal("change",{old:n,value:e})}},o.prototype.detach=function(){this.document.off("change",this.$onChange)},o.prototype.attach=function(i){this.document=i||this.document,this.document.on("change",this.$onChange)},o.prototype.$clipPositionToDocument=function(i,r){var t={};return i>=this.document.getLength()?(t.row=Math.max(0,this.document.getLength()-1),t.column=this.document.getLine(t.row).length):i<0?(t.row=0,t.column=0):(t.row=i,t.column=Math.min(this.document.getLine(t.row).length,Math.max(0,r))),r<0&&(t.column=0),t},o}();M.prototype.$insertRight=!1,Q.implement(M.prototype,R);function l(o,i,r){var t=r?o.column<=i.column:o.column<i.column;return o.row<i.row||o.row==i.row&&t}function u(o,i,r){var t=o.action=="insert",e=(t?1:-1)*(o.end.row-o.start.row),n=(t?1:-1)*(o.end.column-o.start.column),a=o.start,d=t?a:o.end;return l(i,a,r)?{row:i.row,column:i.column}:l(d,i,!r)?{row:i.row+e,column:i.column+(i.row==d.row?n:0)}:{row:a.row,column:a.column}}m.Anchor=M}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(p,m,Gn){var Q=p("./lib/oop"),R=p("./apply_delta").applyDelta,M=p("./lib/event_emitter").EventEmitter,l=p("./range").Range,u=p("./anchor").Anchor,o=function(){function i(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 i.prototype.setValue=function(r){var t=this.getLength()-1;this.remove(new l(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},r||"")},i.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},i.prototype.createAnchor=function(r,t){return new u(this,r,t)},i.prototype.$detectNewLine=function(r){var t=r.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:`
187
+ `,this._signal("changeNewLineMode")},i.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
188
+ `;case"unix":return`
189
+ `;default:return this.$autoNewLine||`
190
+ `}},i.prototype.setNewLineMode=function(r){this.$newLineMode!==r&&(this.$newLineMode=r,this._signal("changeNewLineMode"))},i.prototype.getNewLineMode=function(){return this.$newLineMode},i.prototype.isNewLine=function(r){return r==`\r
191
+ `||r=="\r"||r==`
192
+ `},i.prototype.getLine=function(r){return this.$lines[r]||""},i.prototype.getLines=function(r,t){return this.$lines.slice(r,t+1)},i.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},i.prototype.getLength=function(){return this.$lines.length},i.prototype.getTextRange=function(r){return this.getLinesForRange(r).join(this.getNewLineCharacter())},i.prototype.getLinesForRange=function(r){var t;if(r.start.row===r.end.row)t=[this.getLine(r.start.row).substring(r.start.column,r.end.column)];else{t=this.getLines(r.start.row,r.end.row),t[0]=(t[0]||"").substring(r.start.column);var e=t.length-1;r.end.row-r.start.row==e&&(t[e]=t[e].substring(0,r.end.column))}return t},i.prototype.insertLines=function(r,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(r,t)},i.prototype.removeLines=function(r,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(r,t)},i.prototype.insertNewLine=function(r){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(r,["",""])},i.prototype.insert=function(r,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(r,this.$split(t))},i.prototype.insertInLine=function(r,t){var e=this.clippedPos(r.row,r.column),n=this.pos(r.row,r.column+t.length);return this.applyDelta({start:e,end:n,action:"insert",lines:[t]},!0),this.clonePos(n)},i.prototype.clippedPos=function(r,t){var e=this.getLength();r===void 0?r=e:r<0?r=0:r>=e&&(r=e-1,t=void 0);var n=this.getLine(r);return t==null&&(t=n.length),t=Math.min(Math.max(t,0),n.length),{row:r,column:t}},i.prototype.clonePos=function(r){return{row:r.row,column:r.column}},i.prototype.pos=function(r,t){return{row:r,column:t}},i.prototype.$clipPosition=function(r){var t=this.getLength();return r.row>=t?(r.row=Math.max(0,t-1),r.column=this.getLine(t-1).length):(r.row=Math.max(0,r.row),r.column=Math.min(Math.max(r.column,0),this.getLine(r.row).length)),r},i.prototype.insertFullLines=function(r,t){r=Math.min(Math.max(r,0),this.getLength());var e=0;r<this.getLength()?(t=t.concat([""]),e=0):(t=[""].concat(t),r--,e=this.$lines[r].length),this.insertMergedLines({row:r,column:e},t)},i.prototype.insertMergedLines=function(r,t){var e=this.clippedPos(r.row,r.column),n={row:e.row+t.length-1,column:(t.length==1?e.column:0)+t[t.length-1].length};return this.applyDelta({start:e,end:n,action:"insert",lines:t}),this.clonePos(n)},i.prototype.remove=function(r){var t=this.clippedPos(r.start.row,r.start.column),e=this.clippedPos(r.end.row,r.end.column);return this.applyDelta({start:t,end:e,action:"remove",lines:this.getLinesForRange({start:t,end:e})}),this.clonePos(t)},i.prototype.removeInLine=function(r,t,e){var n=this.clippedPos(r,t),a=this.clippedPos(r,e);return this.applyDelta({start:n,end:a,action:"remove",lines:this.getLinesForRange({start:n,end:a})},!0),this.clonePos(n)},i.prototype.removeFullLines=function(r,t){r=Math.min(Math.max(0,r),this.getLength()-1),t=Math.min(Math.max(0,t),this.getLength()-1);var e=t==this.getLength()-1&&r>0,n=t<this.getLength()-1,a=e?r-1:r,d=e?this.getLine(a).length:0,f=n?t+1:t,xe=n?0:this.getLine(f).length,F=new l(a,d,f,xe),_=this.$lines.slice(r,t+1);return this.applyDelta({start:F.start,end:F.end,action:"remove",lines:this.getLinesForRange(F)}),_},i.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:["",""]})},i.prototype.replace=function(r,t){if(r instanceof l||(r=l.fromPoints(r.start,r.end)),t.length===0&&r.isEmpty())return r.start;if(t==this.getTextRange(r))return r.end;this.remove(r);var e;return t?e=this.insert(r.start,t):e=r.start,e},i.prototype.applyDeltas=function(r){for(var t=0;t<r.length;t++)this.applyDelta(r[t])},i.prototype.revertDeltas=function(r){for(var t=r.length-1;t>=0;t--)this.revertDelta(r[t])},i.prototype.applyDelta=function(r,t){var e=r.action=="insert";(e?r.lines.length<=1&&!r.lines[0]:!l.comparePoints(r.start,r.end))||(e&&r.lines.length>2e4?this.$splitAndapplyLargeDelta(r,2e4):(R(this.$lines,r,t),this._signal("change",r)))},i.prototype.$safeApplyDelta=function(r){var t=this.$lines.length;(r.action=="remove"&&r.start.row<t&&r.end.row<t||r.action=="insert"&&r.start.row<=t)&&this.applyDelta(r)},i.prototype.$splitAndapplyLargeDelta=function(r,t){for(var e=r.lines,n=e.length-t+1,a=r.start.row,d=r.start.column,f=0,xe=0;f<n;f=xe){xe+=t-1;var F=e.slice(f,xe);F.push(""),this.applyDelta({start:this.pos(a+f,d),end:this.pos(a+xe,d=0),action:r.action,lines:F},!0)}r.lines=e.slice(f),r.start.row=a+f,r.start.column=d,this.applyDelta(r,!0)},i.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()})},i.prototype.indexToPosition=function(r,t){for(var e=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,a=t||0,d=e.length;a<d;a++)if(r-=e[a].length+n,r<0)return{row:a,column:r+e[a].length+n};return{row:d-1,column:r+e[d-1].length+n}},i.prototype.positionToIndex=function(r,t){for(var e=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,a=0,d=Math.min(r.row,e.length),f=t||0;f<d;++f)a+=e[f].length+n;return a+r.column},i.prototype.$split=function(r){return r.split(/\r\n|\r|\n/)},i}();o.prototype.$autoNewLine="",o.prototype.$newLineMode="auto",Q.implement(o.prototype,M),m.Document=o}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(p,m,Gn){var Q=p("./lib/oop"),R=p("./lib/event_emitter").EventEmitter,M=function(){function l(u,o){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=u;var i=this;this.$worker=function(){if(i.running){for(var r=new Date,t=i.currentLine,e=-1,n=i.doc,a=t;i.lines[t];)t++;var d=n.getLength(),f=0;for(i.running=!1;t<d;){i.$tokenizeRow(t),e=t;do t++;while(i.lines[t]);if(f++,f%5===0&&new Date-r>20){i.running=setTimeout(i.$worker,20);break}}i.currentLine=t,e==-1&&(e=t),a<=e&&i.fireUpdateEvent(a,e)}}}return l.prototype.setTokenizer=function(u){this.tokenizer=u,this.lines=[],this.states=[],this.start(0)},l.prototype.setDocument=function(u){this.doc=u,this.lines=[],this.states=[],this.stop()},l.prototype.fireUpdateEvent=function(u,o){var i={first:u,last:o};this._signal("update",{data:i})},l.prototype.start=function(u){this.currentLine=Math.min(u||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},l.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},l.prototype.$updateOnChange=function(u){var o=u.start.row,i=u.end.row-o;if(i===0)this.lines[o]=null;else if(u.action=="remove")this.lines.splice(o,i+1,null),this.states.splice(o,i+1,null);else{var r=Array(i+1);r.unshift(o,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(o,this.currentLine,this.doc.getLength()),this.stop()},l.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},l.prototype.getTokens=function(u){return this.lines[u]||this.$tokenizeRow(u)},l.prototype.getState=function(u){return this.currentLine==u&&this.$tokenizeRow(u),this.states[u]||"start"},l.prototype.$tokenizeRow=function(u){var o=this.doc.getLine(u),i=this.states[u-1],r=this.tokenizer.getLineTokens(o,i,u);return this.states[u]+""!=r.state+""?(this.states[u]=r.state,this.lines[u+1]=null,this.currentLine>u+1&&(this.currentLine=u+1)):this.currentLine==u&&(this.currentLine=u+1),this.lines[u]=r.tokens},l.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},l}();Q.implement(M.prototype,R),m.BackgroundTokenizer=M}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(p,m,Gn){var Q=p("./lib/lang"),R=p("./range").Range,M=function(){function l(u,o,i){i===void 0&&(i="text"),this.setRegexp(u),this.clazz=o,this.type=i}return l.prototype.setRegexp=function(u){this.regExp+""!=u+""&&(this.regExp=u,this.cache=[])},l.prototype.update=function(u,o,i,r){if(this.regExp)for(var t=r.firstRow,e=r.lastRow,n={},a=t;a<=e;a++){var d=this.cache[a];d==null&&(d=Q.getMatchOffsets(i.getLine(a),this.regExp),d.length>this.MAX_RANGES&&(d=d.slice(0,this.MAX_RANGES)),d=d.map(function(_){return new R(a,_.offset,a,_.offset+_.length)}),this.cache[a]=d.length?d:"");for(var f=d.length;f--;){var xe=d[f].toScreenRange(i),F=xe.toString();n[F]||(n[F]=!0,o.drawSingleLineMarker(u,xe,this.clazz,r))}}},l}();M.prototype.MAX_RANGES=500,m.SearchHighlight=M}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(p,m,Gn){var Q=function(){function _(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return _.prototype.addSession=function(S){this.$session=S},_.prototype.add=function(S,Ae,Vn){if(!this.$fromUndo&&S!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),Ae===!1||!this.lastDeltas){this.lastDeltas=[];var Me=this.$undoStack.length;Me>this.$undoDepth-1&&this.$undoStack.splice(0,Me-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),S.id=this.$rev=++this.$maxRev}(S.action=="remove"||S.action=="insert")&&(this.$lastDelta=S),this.lastDeltas.push(S)}},_.prototype.addSelection=function(S,Ae){this.selections.push({value:S,rev:Ae||this.$rev})},_.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},_.prototype.markIgnored=function(S,Ae){Ae==null&&(Ae=this.$rev+1);for(var Vn=this.$undoStack,Me=Vn.length;Me--;){var oe=Vn[Me][0];if(oe.id<=S)break;oe.id<Ae&&(oe.ignore=!0)}this.lastDeltas=null},_.prototype.getSelection=function(S,Ae){for(var Vn=this.selections,Me=Vn.length;Me--;){var oe=Vn[Me];if(oe.rev<S)return Ae&&(oe=Vn[Me+1]),oe}},_.prototype.getRevision=function(){return this.$rev},_.prototype.getDeltas=function(S,Ae){Ae==null&&(Ae=this.$rev+1);for(var Vn=this.$undoStack,Me=null,oe=0,Yn=Vn.length;Yn--;){var y=Vn[Yn][0];if(y.id<Ae&&!Me&&(Me=Yn+1),y.id<=S){oe=Yn+1;break}}return Vn.slice(oe,Me)},_.prototype.getChangedRanges=function(S,Ae){Ae==null&&(Ae=this.$rev+1)},_.prototype.getChangedLines=function(S,Ae){Ae==null&&(Ae=this.$rev+1)},_.prototype.undo=function(S,Ae){this.lastDeltas=null;var Vn=this.$undoStack;if(R(Vn,Vn.length)){S||(S=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var Me=Vn.pop(),oe=null;return Me&&(oe=S.undoChanges(Me,Ae),this.$redoStack.push(Me),this.$syncRev()),this.$fromUndo=!1,oe}},_.prototype.redo=function(S,Ae){if(this.lastDeltas=null,S||(S=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var Vn=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);F(this.$redoStack,Vn),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(Yn){Yn[0].id=++this.$maxRev},this)}var Me=this.$redoStack.pop(),oe=null;return Me&&(oe=S.redoChanges(Me,Ae),this.$undoStack.push(Me),this.$syncRev()),this.$fromUndo=!1,oe},_.prototype.$syncRev=function(){var S=this.$undoStack,Ae=S[S.length-1],Vn=Ae&&Ae[0].id||0;this.$redoStackBaseRev=Vn,this.$rev=Vn},_.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},_.prototype.canUndo=function(){return this.$undoStack.length>0},_.prototype.canRedo=function(){return this.$redoStack.length>0},_.prototype.bookmark=function(S){S==null&&(S=this.$rev),this.mark=S},_.prototype.isAtBookmark=function(){return this.$rev===this.mark},_.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},_.prototype.fromJSON=function(S){this.reset(),this.$undoStack=S.$undoStack,this.$redoStack=S.$redoStack},_.prototype.$prettyPrint=function(S){return S?i(S):i(this.$undoStack)+`
193
+ ---
194
+ `+i(this.$redoStack)},_}();Q.prototype.hasUndo=Q.prototype.canUndo,Q.prototype.hasRedo=Q.prototype.canRedo,Q.prototype.isClean=Q.prototype.isAtBookmark,Q.prototype.markClean=Q.prototype.bookmark;function R(_,S){for(var Ae=S;Ae--;){var Vn=_[Ae];if(Vn&&!Vn[0].ignore){for(;Ae<S-1;){var Me=e(_[Ae],_[Ae+1]);_[Ae]=Me[0],_[Ae+1]=Me[1],Ae++}return!0}}}var M=p("./range").Range,l=M.comparePoints;M.comparePoints;function u(_){return{row:_.row,column:_.column}}function o(_){return{start:u(_.start),end:u(_.end),action:_.action,lines:_.lines.slice()}}function i(_){if(_=_||this,Array.isArray(_))return _.map(i).join(`
195
+ `);var S="";return _.action?(S=_.action=="insert"?"+":"-",S+="["+_.lines+"]"):_.value&&(Array.isArray(_.value)?S=_.value.map(r).join(`
196
+ `):S=r(_.value)),_.start&&(S+=r(_)),(_.id||_.rev)&&(S+=" ("+(_.id||_.rev)+")"),S}function r(_){return _.start.row+":"+_.start.column+"=>"+_.end.row+":"+_.end.column}function t(_,S){var Ae=_.action=="insert",Vn=S.action=="insert";if(Ae&&Vn)if(l(S.start,_.end)>=0)a(S,_,-1);else if(l(S.start,_.start)<=0)a(_,S,1);else return null;else if(Ae&&!Vn)if(l(S.start,_.end)>=0)a(S,_,-1);else if(l(S.end,_.start)<=0)a(_,S,-1);else return null;else if(!Ae&&Vn)if(l(S.start,_.start)>=0)a(S,_,1);else if(l(S.start,_.start)<=0)a(_,S,1);else return null;else if(!Ae&&!Vn)if(l(S.start,_.start)>=0)a(S,_,1);else if(l(S.end,_.start)<=0)a(_,S,-1);else return null;return[S,_]}function e(_,S){for(var Ae=_.length;Ae--;)for(var Vn=0;Vn<S.length;Vn++)if(!t(_[Ae],S[Vn])){for(;Ae<_.length;){for(;Vn--;)t(S[Vn],_[Ae]);Vn=S.length,Ae++}return[_,S]}return _.selectionBefore=S.selectionBefore=_.selectionAfter=S.selectionAfter=null,[S,_]}function n(_,S){var Ae=_.action=="insert",Vn=S.action=="insert";if(Ae&&Vn)l(_.start,S.start)<0?a(S,_,1):a(_,S,1);else if(Ae&&!Vn)l(_.start,S.end)>=0?a(_,S,-1):(l(_.start,S.start)<=0||a(_,M.fromPoints(S.start,_.start),-1),a(S,_,1));else if(!Ae&&Vn)l(S.start,_.end)>=0?a(S,_,-1):(l(S.start,_.start)<=0||a(S,M.fromPoints(_.start,S.start),-1),a(_,S,1));else if(!Ae&&!Vn)if(l(S.start,_.end)>=0)a(S,_,-1);else if(l(S.end,_.start)<=0)a(_,S,-1);else{var Me,oe;return l(_.start,S.start)<0&&(Me=_,_=f(_,S.start)),l(_.end,S.end)>0&&(oe=f(_,S.end)),d(S.end,_.start,_.end,-1),oe&&!Me&&(_.lines=oe.lines,_.start=oe.start,_.end=oe.end,oe=_),[S,Me,oe].filter(Boolean)}return[S,_]}function a(_,S,Ae){d(_.start,S.start,S.end,Ae),d(_.end,S.start,S.end,Ae)}function d(_,S,Ae,Vn){_.row==(Vn==1?S:Ae).row&&(_.column+=Vn*(Ae.column-S.column)),_.row+=Vn*(Ae.row-S.row)}function f(_,S){var Ae=_.lines,Vn=_.end;_.end=u(S);var Me=_.end.row-_.start.row,oe=Ae.splice(Me,Ae.length),Yn=Me?S.column:S.column-_.start.column;Ae.push(oe[0].substring(0,Yn)),oe[0]=oe[0].substr(Yn);var y={start:u(S),end:Vn,lines:oe,action:_.action};return y}function xe(_,S){S=o(S);for(var Ae=_.length;Ae--;){for(var Vn=_[Ae],Me=0;Me<Vn.length;Me++){var oe=Vn[Me],Yn=n(oe,S);S=Yn[0],Yn.length!=2&&(Yn[2]?(Vn.splice(Me+1,1,Yn[1],Yn[2]),Me++):Yn[1]||(Vn.splice(Me,1),Me--))}Vn.length||_.splice(Ae,1)}return _}function F(_,S){for(var Ae=0;Ae<S.length;Ae++)for(var Vn=S[Ae],Me=0;Me<Vn.length;Me++)xe(_,Vn[Me])}m.UndoManager=Q}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(p,m,Gn){var Q=p("../range").Range,R=function(){function M(l,u){this.foldData=l,Array.isArray(u)?this.folds=u:u=this.folds=[u];var o=u[u.length-1];this.range=new Q(u[0].start.row,u[0].start.column,o.end.row,o.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(i){i.setFoldLine(this)},this)}return M.prototype.shiftRow=function(l){this.start.row+=l,this.end.row+=l,this.folds.forEach(function(u){u.start.row+=l,u.end.row+=l})},M.prototype.addFold=function(l){if(l.sameRow){if(l.start.row<this.startRow||l.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(l),this.folds.sort(function(u,o){return-u.range.compareEnd(o.start.row,o.start.column)}),this.range.compareEnd(l.start.row,l.start.column)>0?(this.end.row=l.end.row,this.end.column=l.end.column):this.range.compareStart(l.end.row,l.end.column)<0&&(this.start.row=l.start.row,this.start.column=l.start.column)}else if(l.start.row==this.end.row)this.folds.push(l),this.end.row=l.end.row,this.end.column=l.end.column;else if(l.end.row==this.start.row)this.folds.unshift(l),this.start.row=l.start.row,this.start.column=l.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");l.foldLine=this},M.prototype.containsRow=function(l){return l>=this.start.row&&l<=this.end.row},M.prototype.walk=function(l,u,o){var i=0,r=this.folds,t,e,n,a=!0;u==null&&(u=this.end.row,o=this.end.column);for(var d=0;d<r.length;d++){if(t=r[d],e=t.range.compareStart(u,o),e==-1){l(null,u,o,i,a);return}if(n=l(null,t.start.row,t.start.column,i,a),n=!n&&l(t.placeholder,t.start.row,t.start.column,i),n||e===0)return;a=!t.sameRow,i=t.end.column}l(null,u,o,i,a)},M.prototype.getNextFoldTo=function(l,u){for(var o,i,r=0;r<this.folds.length;r++){if(o=this.folds[r],i=o.range.compareEnd(l,u),i==-1)return{fold:o,kind:"after"};if(i===0)return{fold:o,kind:"inside"}}return null},M.prototype.addRemoveChars=function(l,u,o){var i=this.getNextFoldTo(l,u),r,t;if(i){if(r=i.fold,i.kind=="inside"&&r.start.column!=u&&r.start.row!=l)window.console&&window.console.log(l,u,r);else if(r.start.row==l){t=this.folds;var e=t.indexOf(r);for(e===0&&(this.start.column+=o),e;e<t.length;e++){if(r=t[e],r.start.column+=o,!r.sameRow)return;r.end.column+=o}this.end.column+=o}}},M.prototype.split=function(l,u){var o=this.getNextFoldTo(l,u);if(!o||o.kind=="inside")return null;var i=o.fold,r=this.folds,t=this.foldData,e=r.indexOf(i),n=r[e-1];this.end.row=n.end.row,this.end.column=n.end.column,r=r.splice(e,r.length-e);var a=new M(t,r);return t.splice(t.indexOf(this)+1,0,a),a},M.prototype.merge=function(l){for(var u=l.folds,o=0;o<u.length;o++)this.addFold(u[o]);var i=this.foldData;i.splice(i.indexOf(l),1)},M.prototype.toString=function(){var l=[this.range.toString()+": ["];return this.folds.forEach(function(u){l.push(" "+u.toString())}),l.push("]"),l.join(`
197
+ `)},M.prototype.idxToPosition=function(l){for(var u=0,o=0;o<this.folds.length;o++){var i=this.folds[o];if(l-=i.start.column-u,l<0)return{row:i.start.row,column:i.start.column+l};if(l-=i.placeholder.length,l<0)return i.start;u=i.end.column}return{row:this.end.row,column:this.end.column+l}},M}();m.FoldLine=R}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(p,m,Gn){var Q=p("./range").Range,R=Q.comparePoints,M=function(){function l(){this.ranges=[],this.$bias=1}return l.prototype.pointIndex=function(u,o,i){for(var r=this.ranges,t=i||0;t<r.length;t++){var e=r[t],n=R(u,e.end);if(!(n>0)){var a=R(u,e.start);return n===0?o&&a!==0?-t-2:t:a>0||a===0&&!o?t:-t-1}}return-t-1},l.prototype.add=function(u){var o=!u.isEmpty(),i=this.pointIndex(u.start,o);i<0&&(i=-i-1);var r=this.pointIndex(u.end,o,i);return r<0?r=-r-1:r++,this.ranges.splice(i,r-i,u)},l.prototype.addList=function(u){for(var o=[],i=u.length;i--;)o.push.apply(o,this.add(u[i]));return o},l.prototype.substractPoint=function(u){var o=this.pointIndex(u);if(o>=0)return this.ranges.splice(o,1)},l.prototype.merge=function(){var u=[],o=this.ranges;o=o.sort(function(n,a){return R(n.start,a.start)});for(var i=o[0],r,t=1;t<o.length;t++){r=i,i=o[t];var e=R(r.end,i.start);e<0||e==0&&!r.isEmpty()&&!i.isEmpty()||(R(r.end,i.end)<0&&(r.end.row=i.end.row,r.end.column=i.end.column),o.splice(t,1),u.push(i),i=r,t--)}return this.ranges=o,u},l.prototype.contains=function(u,o){return this.pointIndex({row:u,column:o})>=0},l.prototype.containsPoint=function(u){return this.pointIndex(u)>=0},l.prototype.rangeAtPoint=function(u){var o=this.pointIndex(u);if(o>=0)return this.ranges[o]},l.prototype.clipRows=function(u,o){var i=this.ranges;if(i[0].start.row>o||i[i.length-1].start.row<u)return[];var r=this.pointIndex({row:u,column:0});r<0&&(r=-r-1);var t=this.pointIndex({row:o,column:0},r);t<0&&(t=-t-1);for(var e=[],n=r;n<t;n++)e.push(i[n]);return e},l.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},l.prototype.attach=function(u){this.session&&this.detach(),this.session=u,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},l.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},l.prototype.$onChange=function(u){for(var o=u.start,i=u.end,r=o.row,t=i.row,e=this.ranges,n=0,a=e.length;n<a;n++){var d=e[n];if(d.end.row>=r)break}if(u.action=="insert")for(var f=t-r,xe=-o.column+i.column;n<a;n++){var d=e[n];if(d.start.row>r)break;if(d.start.row==r&&d.start.column>=o.column&&(d.start.column==o.column&&this.$bias<=0||(d.start.column+=xe,d.start.row+=f)),d.end.row==r&&d.end.column>=o.column){if(d.end.column==o.column&&this.$bias<0)continue;d.end.column==o.column&&xe>0&&n<a-1&&d.end.column>d.start.column&&d.end.column==e[n+1].start.column&&(d.end.column-=xe),d.end.column+=xe,d.end.row+=f}}else for(var f=r-t,xe=o.column-i.column;n<a;n++){var d=e[n];if(d.start.row>t)break;d.end.row<t&&(r<d.end.row||r==d.end.row&&o.column<d.end.column)?(d.end.row=r,d.end.column=o.column):d.end.row==t?d.end.column<=i.column?(f||d.end.column>o.column)&&(d.end.column=o.column,d.end.row=o.row):(d.end.column+=xe,d.end.row+=f):d.end.row>t&&(d.end.row+=f),d.start.row<t&&(r<d.start.row||r==d.start.row&&o.column<d.start.column)?(d.start.row=r,d.start.column=o.column):d.start.row==t?d.start.column<=i.column?(f||d.start.column>o.column)&&(d.start.column=o.column,d.start.row=o.row):(d.start.column+=xe,d.start.row+=f):d.start.row>t&&(d.start.row+=f)}if(f!=0&&n<a)for(;n<a;n++){var d=e[n];d.start.row+=f,d.end.row+=f}},l}();M.prototype.comparePoints=R,m.RangeList=M}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(p,m,Gn){var Q=this&&this.__extends||function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(n[d]=a[d])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),R=p("../range_list").RangeList,M=function(r){Q(t,r);function t(e,n){var a=r.call(this)||this;return a.foldLine=null,a.placeholder=n,a.range=e,a.start=e.start,a.end=e.end,a.sameRow=e.start.row==e.end.row,a.subFolds=a.ranges=[],a}return t.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},t.prototype.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(n){n.setFoldLine(e)})},t.prototype.clone=function(){var e=this.range.clone(),n=new t(e,this.placeholder);return this.subFolds.forEach(function(a){n.subFolds.push(a.clone())}),n.collapseChildren=this.collapseChildren,n},t.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){u(e,this.start);for(var xe=e.start.row,F=e.start.column,n=0,a=-1;n<this.subFolds.length&&(a=this.subFolds[n].range.compare(xe,F),a==1);n++);var d=this.subFolds[n],f=0;if(a==0){if(d.range.containsRange(e))return d.addSubFold(e);f=1}for(var xe=e.range.end.row,F=e.range.end.column,_=n,a=-1;_<this.subFolds.length&&(a=this.subFolds[_].range.compare(xe,F),a==1);_++);a==0&&_++;for(var S=this.subFolds.splice(n,_-n,e),Ae=a==0?S.length-1:S.length,Vn=f;Vn<Ae;Vn++)e.addSubFold(S[Vn]);return e.setFoldLine(this.foldLine),e}},t.prototype.restoreRange=function(e){return i(e,this.start)},t}(R);function l(r,t){r.row-=t.row,r.row==0&&(r.column-=t.column)}function u(r,t){l(r.start,t),l(r.end,t)}function o(r,t){r.row==0&&(r.column+=t.column),r.row+=t.row}function i(r,t){o(r.start,t),o(r.end,t)}m.Fold=M}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(p,m,Gn){var Q=p("../range").Range,R=p("./fold_line").FoldLine,M=p("./fold").Fold,l=p("../token_iterator").TokenIterator,u=p("../mouse/mouse_event").MouseEvent;function o(){this.getFoldAt=function(i,r,t){var e=this.getFoldLine(i);if(!e)return null;for(var n=e.folds,a=0;a<n.length;a++){var d=n[a].range;if(d.contains(i,r)){if(t==1&&d.isEnd(i,r)&&!d.isEmpty())continue;if(t==-1&&d.isStart(i,r)&&!d.isEmpty())continue;return n[a]}}},this.getFoldsInRange=function(i){var r=i.start,t=i.end,e=this.$foldData,n=[];r.column+=1,t.column-=1;for(var a=0;a<e.length;a++){var d=e[a].range.compareRange(i);if(d!=2){if(d==-2)break;for(var f=e[a].folds,xe=0;xe<f.length;xe++){var F=f[xe];if(d=F.range.compareRange(i),d==-2)break;if(d==2)continue;if(d==42)break;n.push(F)}}}return r.column-=1,t.column+=1,n},this.getFoldsInRangeList=function(i){if(Array.isArray(i)){var r=[];i.forEach(function(t){r=r.concat(this.getFoldsInRange(t))},this)}else var r=this.getFoldsInRange(i);return r},this.getAllFolds=function(){for(var i=[],r=this.$foldData,t=0;t<r.length;t++)for(var e=0;e<r[t].folds.length;e++)i.push(r[t].folds[e]);return i},this.getFoldStringAt=function(i,r,t,e){if(e=e||this.getFoldLine(i),!e)return null;for(var n={end:{column:0}},a,d,f=0;f<e.folds.length;f++){d=e.folds[f];var xe=d.range.compareEnd(i,r);if(xe==-1){a=this.getLine(d.start.row).substring(n.end.column,d.start.column);break}else if(xe===0)return null;n=d}return a||(a=this.getLine(d.start.row).substring(n.end.column)),t==-1?a.substring(0,r-n.end.column):t==1?a.substring(r-n.end.column):a},this.getFoldLine=function(i,r){var t=this.$foldData,e=0;for(r&&(e=t.indexOf(r)),e==-1&&(e=0),e;e<t.length;e++){var n=t[e];if(n.start.row<=i&&n.end.row>=i)return n;if(n.end.row>i)return null}return null},this.getNextFoldLine=function(i,r){var t=this.$foldData,e=0;for(r&&(e=t.indexOf(r)),e==-1&&(e=0),e;e<t.length;e++){var n=t[e];if(n.end.row>=i)return n}return null},this.getFoldedRowCount=function(i,r){for(var t=this.$foldData,e=r-i+1,n=0;n<t.length;n++){var a=t[n],d=a.end.row,f=a.start.row;if(d>=r){f<r&&(f>=i?e-=r-f:e=0);break}else d>=i&&(f>=i?e-=d-f:e-=d-i+1)}return e},this.$addFoldLine=function(i){return this.$foldData.push(i),this.$foldData.sort(function(r,t){return r.start.row-t.start.row}),i},this.addFold=function(i,r){var t=this.$foldData,e=!1,n;i instanceof M?n=i:(n=new M(r,i),n.collapseChildren=r.collapseChildren),this.$clipRangeToDocument(n.range);var a=n.start.row,d=n.start.column,f=n.end.row,xe=n.end.column,F=this.getFoldAt(a,d,1),_=this.getFoldAt(f,xe,-1);if(F&&_==F)return F.addSubFold(n);F&&!F.range.isStart(a,d)&&this.removeFold(F),_&&!_.range.isEnd(f,xe)&&this.removeFold(_);var S=this.getFoldsInRange(n.range);S.length>0&&(this.removeFolds(S),n.collapseChildren||S.forEach(function(oe){n.addSubFold(oe)}));for(var Ae=0;Ae<t.length;Ae++){var Vn=t[Ae];if(f==Vn.start.row){Vn.addFold(n),e=!0;break}else if(a==Vn.end.row){if(Vn.addFold(n),e=!0,!n.sameRow){var Me=t[Ae+1];if(Me&&Me.start.row==f){Vn.merge(Me);break}}break}else if(f<=Vn.start.row)break}return e||(Vn=this.$addFoldLine(new R(this.$foldData,n))),this.$useWrapMode?this.$updateWrapData(Vn.start.row,Vn.start.row):this.$updateRowLengthCache(Vn.start.row,Vn.start.row),this.$modified=!0,this._signal("changeFold",{data:n,action:"add"}),n},this.addFolds=function(i){i.forEach(function(r){this.addFold(r)},this)},this.removeFold=function(i){var r=i.foldLine,t=r.start.row,e=r.end.row,n=this.$foldData,a=r.folds;if(a.length==1)n.splice(n.indexOf(r),1);else if(r.range.isEnd(i.end.row,i.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(i.start.row,i.start.column))a.shift(),r.start.row=a[0].start.row,r.start.column=a[0].start.column;else if(i.sameRow)a.splice(a.indexOf(i),1);else{var d=r.split(i.start.row,i.start.column);a=d.folds,a.shift(),d.start.row=a[0].start.row,d.start.column=a[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(t,e):this.$updateRowLengthCache(t,e)),this.$modified=!0,this._signal("changeFold",{data:i,action:"remove"})},this.removeFolds=function(i){for(var r=[],t=0;t<i.length;t++)r.push(i[t]);r.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(i){this.removeFold(i),i.subFolds.forEach(function(r){i.restoreRange(r),this.addFold(r)},this),i.collapseChildren>0&&this.foldAll(i.start.row+1,i.end.row,i.collapseChildren-1),i.subFolds=[]},this.expandFolds=function(i){i.forEach(function(r){this.expandFold(r)},this)},this.unfold=function(i,r){var t,e;if(i==null)t=new Q(0,0,this.getLength(),0),r==null&&(r=!0);else if(typeof i=="number")t=new Q(i,0,i,this.getLine(i).length);else if("row"in i)t=Q.fromPoints(i,i);else{if(Array.isArray(i))return e=[],i.forEach(function(a){e=e.concat(this.unfold(a))},this),e;t=i}e=this.getFoldsInRangeList(t);for(var n=e;e.length==1&&Q.comparePoints(e[0].start,t.start)<0&&Q.comparePoints(e[0].end,t.end)>0;)this.expandFolds(e),e=this.getFoldsInRangeList(t);if(r!=!1?this.removeFolds(e):this.expandFolds(e),n.length)return n},this.isRowFolded=function(i,r){return!!this.getFoldLine(i,r)},this.getRowFoldEnd=function(i,r){var t=this.getFoldLine(i,r);return t?t.end.row:i},this.getRowFoldStart=function(i,r){var t=this.getFoldLine(i,r);return t?t.start.row:i},this.getFoldDisplayLine=function(i,r,t,e,n){e==null&&(e=i.start.row),n==null&&(n=0),r==null&&(r=i.end.row),t==null&&(t=this.getLine(r).length);var a=this.doc,d="";return i.walk(function(f,xe,F,_){if(!(xe<e)){if(xe==e){if(F<n)return;_=Math.max(n,_)}f!=null?d+=f:d+=a.getLine(xe).substring(_,F)}},r,t),d},this.getDisplayLine=function(i,r,t,e){var n=this.getFoldLine(i);if(n)return this.getFoldDisplayLine(n,i,r,t,e);var a;return a=this.doc.getLine(i),a.substring(e||0,r||a.length)},this.$cloneFoldData=function(){var i=[];return i=this.$foldData.map(function(r){var t=r.folds.map(function(e){return e.clone()});return new R(i,t)}),i},this.toggleFold=function(i){var r=this.selection,t=r.getRange(),e,n;if(t.isEmpty()){var a=t.start;if(e=this.getFoldAt(a.row,a.column),e){this.expandFold(e);return}else(n=this.findMatchingBracket(a))?t.comparePoint(n)==1?t.end=n:(t.start=n,t.start.column++,t.end.column--):(n=this.findMatchingBracket({row:a.row,column:a.column+1}))?(t.comparePoint(n)==1?t.end=n:t.start=n,t.start.column++):t=this.getCommentFoldRange(a.row,a.column)||t}else{var d=this.getFoldsInRange(t);if(i&&d.length){this.expandFolds(d);return}else d.length==1&&(e=d[0])}if(e||(e=this.getFoldAt(t.start.row,t.start.column)),e&&e.range.toString()==t.toString()){this.expandFold(e);return}var f="...";if(!t.isMultiLine()){if(f=this.getTextRange(t),f.length<4)return;f=f.trim().substring(0,2)+".."}this.addFold(f,t)},this.getCommentFoldRange=function(i,r,t){var e=new l(this,i,r),n=e.getCurrentToken(),a=n&&n.type;if(n&&/^comment|string/.test(a)){a=a.match(/comment|string/)[0],a=="comment"&&(a+="|doc-start|\\.doc");var d=new RegExp(a),f=new Q;if(t!=1){do n=e.stepBackward();while(n&&d.test(n.type));n=e.stepForward()}f.start.row=e.getCurrentTokenRow(),f.start.column=e.getCurrentTokenColumn()+n.value.length,e=new l(this,i,r);var xe=this.getState(e.$row);if(t!=-1){var F=-1;do if(n=e.stepForward(),F==-1){var _=this.getState(e.$row);xe.toString()!==_.toString()&&(F=e.$row)}else if(e.$row>F)break;while(n&&d.test(n.type));n=e.stepBackward()}else n=e.getCurrentToken();return f.end.row=e.getCurrentTokenRow(),f.end.column=e.getCurrentTokenColumn(),f}},this.foldAll=function(i,r,t,e){t==null&&(t=1e5);var n=this.foldWidgets;if(n){r=r||this.getLength(),i=i||0;for(var a=i;a<r;a++)if(n[a]==null&&(n[a]=this.getFoldWidget(a)),n[a]=="start"&&!(e&&!e(a))){var d=this.getFoldWidgetRange(a);d&&d.isMultiLine()&&d.end.row<=r&&d.start.row>=i&&(a=d.end.row,d.collapseChildren=t,this.addFold("...",d))}}},this.foldToLevel=function(i){for(this.foldAll();i-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var i=this;this.foldAll(null,null,null,function(r){for(var t=i.getTokens(r),e=0;e<t.length;e++){var n=t[e];if(!(n.type=="text"&&/^\s+$/.test(n.value)))return!!/comment/.test(n.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(i){if(!this.$foldStyles[i])throw new Error("invalid fold style: "+i+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=i){this.$foldStyle=i,i=="manual"&&this.unfold();var r=this.$foldMode;this.$setFolding(null),this.$setFolding(r)}},this.$setFolding=function(i){if(this.$foldMode!=i){if(this.$foldMode=i,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!i||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=i.getFoldWidget.bind(i,this,this.$foldStyle),this.getFoldWidgetRange=i.getFoldWidgetRange.bind(i,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(i,r){var t=this.foldWidgets;if(!t||r&&t[i])return{};for(var e=i-1,n;e>=0;){var a=t[e];if(a==null&&(a=t[e]=this.getFoldWidget(e)),a=="start"){var d=this.getFoldWidgetRange(e);if(n||(n=d),d&&d.end.row>=i)break}e--}return{range:e!==-1&&d,firstRange:n}},this.onFoldWidgetClick=function(i,r){r instanceof u&&(r=r.domEvent);var t={children:r.shiftKey,all:r.ctrlKey||r.metaKey,siblings:r.altKey},e=this.$toggleFoldWidget(i,t);if(!e){var n=r.target||r.srcElement;n&&/ace_fold-widget/.test(n.className)&&(n.className+=" ace_invalid")}},this.$toggleFoldWidget=function(i,r){if(this.getFoldWidget){var t=this.getFoldWidget(i),e=this.getLine(i),n=t==="end"?-1:1,a=this.getFoldAt(i,n===-1?0:e.length,n);if(a)return r.children||r.all?this.removeFold(a):this.expandFold(a),a;var d=this.getFoldWidgetRange(i,!0);if(d&&!d.isMultiLine()&&(a=this.getFoldAt(d.start.row,d.start.column,1),a&&d.isEqual(a.range)))return this.removeFold(a),a;if(r.siblings){var f=this.getParentFoldRangeData(i);if(f.range)var xe=f.range.start.row+1,F=f.range.end.row;this.foldAll(xe,F,r.all?1e4:0)}else r.children?(F=d?d.end.row:this.getLength(),this.foldAll(i+1,F,r.all?1e4:0)):d&&(r.all&&(d.collapseChildren=1e4),this.addFold("...",d));return d}},this.toggleFoldWidget=function(i){var r=this.selection.getCursor().row;r=this.getRowFoldStart(r);var t=this.$toggleFoldWidget(r,{});if(!t){var e=this.getParentFoldRangeData(r,!0);if(t=e.range||e.firstRange,t){r=t.start.row;var n=this.getFoldAt(r,this.getLine(r).length,1);n?this.removeFold(n):this.addFold("...",t)}}},this.updateFoldWidgets=function(i){var r=i.start.row,t=i.end.row-r;if(t===0)this.foldWidgets[r]=null;else if(i.action=="remove")this.foldWidgets.splice(r,t+1,null);else{var e=Array(t+1);e.unshift(r,1),this.foldWidgets.splice.apply(this.foldWidgets,e)}},this.tokenizerUpdateFoldWidgets=function(i){var r=i.data;r.first!=r.last&&this.foldWidgets.length>r.first&&this.foldWidgets.splice(r.first,this.foldWidgets.length)}}m.Folding=o}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(p,m,Gn){var Q=p("../token_iterator").TokenIterator,R=p("../range").Range;function M(){this.findMatchingBracket=function(l,u){if(l.column==0)return null;var o=u||this.getLine(l.row).charAt(l.column-1);if(o=="")return null;var i=o.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],l):this.$findOpeningBracket(i[2],l):null},this.getBracketRange=function(l){var u=this.getLine(l.row),o=!0,i,r=u.charAt(l.column-1),t=r&&r.match(/([\(\[\{])|([\)\]\}])/);if(t||(r=u.charAt(l.column),l={row:l.row,column:l.column+1},t=r&&r.match(/([\(\[\{])|([\)\]\}])/),o=!1),!t)return null;if(t[1]){var e=this.$findClosingBracket(t[1],l);if(!e)return null;i=R.fromPoints(l,e),o||(i.end.column++,i.start.column--),i.cursor=i.end}else{var e=this.$findOpeningBracket(t[2],l);if(!e)return null;i=R.fromPoints(e,l),o||(i.start.column++,i.end.column--),i.cursor=i.start}return i},this.getMatchingBracketRanges=function(l,u){var o=this.getLine(l.row),i=/([\(\[\{])|([\)\]\}])/,r=!u&&o.charAt(l.column-1),t=r&&r.match(i);if(t||(r=(u===void 0||u)&&o.charAt(l.column),l={row:l.row,column:l.column+1},t=r&&r.match(i)),!t)return null;var e=new R(l.row,l.column-1,l.row,l.column),n=t[1]?this.$findClosingBracket(t[1],l):this.$findOpeningBracket(t[2],l);if(!n)return[e];var a=new R(n.row,n.column,n.row,n.column+1);return[e,a]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(l,u,o){var i=this.$brackets[l],r=1,t=new Q(this,u.row,u.column),e=t.getCurrentToken();if(e||(e=t.stepForward()),!!e){o||(o=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var n=u.column-t.getCurrentTokenColumn()-2,a=e.value;;){for(;n>=0;){var d=a.charAt(n);if(d==i){if(r-=1,r==0)return{row:t.getCurrentTokenRow(),column:n+t.getCurrentTokenColumn()}}else d==l&&(r+=1);n-=1}do e=t.stepBackward();while(e&&!o.test(e.type));if(e==null)break;a=e.value,n=a.length-1}return null}},this.$findClosingBracket=function(l,u,o){var i=this.$brackets[l],r=1,t=new Q(this,u.row,u.column),e=t.getCurrentToken();if(e||(e=t.stepForward()),!!e){o||(o=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var n=u.column-t.getCurrentTokenColumn();;){for(var a=e.value,d=a.length;n<d;){var f=a.charAt(n);if(f==i){if(r-=1,r==0)return{row:t.getCurrentTokenRow(),column:n+t.getCurrentTokenColumn()}}else f==l&&(r+=1);n+=1}do e=t.stepForward();while(e&&!o.test(e.type));if(e==null)break;n=0}return null}},this.getMatchingTags=function(l){var u=new Q(this,l.row,l.column),o=this.$findTagName(u);if(o){var i=u.stepBackward();return i.value==="<"?this.$findClosingTag(u,o):this.$findOpeningTag(u,o)}},this.$findTagName=function(l){var u=l.getCurrentToken(),o=!1,i=!1;if(u&&u.type.indexOf("tag-name")===-1)do i?u=l.stepBackward():u=l.stepForward(),u&&(u.value==="/>"?i=!0:u.type.indexOf("tag-name")!==-1&&(o=!0));while(u&&!o);return u},this.$findClosingTag=function(l,u){var o,i=u.value,r=u.value,t=0,e=new R(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);u=l.stepForward();var n=new R(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+u.value.length),a=!1;do{if(o=u,o.type.indexOf("tag-close")!==-1&&!a){var d=new R(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);a=!0}if(u=l.stepForward(),u){if(u.value===">"&&!a){var d=new R(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);a=!0}if(u.type.indexOf("tag-name")!==-1){if(i=u.value,r===i){if(o.value==="<")t++;else if(o.value==="</"&&(t--,t<0)){l.stepBackward();var f=new R(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+2);u=l.stepForward();var xe=new R(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+u.value.length);if(u.type.indexOf("tag-close")===-1&&(u=l.stepForward()),u&&u.value===">")var F=new R(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);else return}}}else if(r===i&&u.value==="/>"&&(t--,t<0))var f=new R(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+2),xe=f,F=xe,d=new R(n.end.row,n.end.column,n.end.row,n.end.column+1)}}while(u&&t>=0);if(e&&d&&f&&F&&n&&xe)return{openTag:new R(e.start.row,e.start.column,d.end.row,d.end.column),closeTag:new R(f.start.row,f.start.column,F.end.row,F.end.column),openTagName:n,closeTagName:xe}},this.$findOpeningTag=function(l,u){var o=l.getCurrentToken(),i=u.value,r=0,t=l.getCurrentTokenRow(),e=l.getCurrentTokenColumn(),n=e+2,a=new R(t,e,t,n);l.stepForward();var d=new R(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+u.value.length);if(u.type.indexOf("tag-close")===-1&&(u=l.stepForward()),!(!u||u.value!==">")){var f=new R(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);l.stepBackward(),l.stepBackward();do if(u=o,t=l.getCurrentTokenRow(),e=l.getCurrentTokenColumn(),n=e+u.value.length,o=l.stepBackward(),u){if(u.type.indexOf("tag-name")!==-1){if(i===u.value)if(o.value==="<"){if(r++,r>0){var xe=new R(t,e,t,n),F=new R(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);do u=l.stepForward();while(u&&u.value!==">");var _=new R(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1)}}else o.value==="</"&&r--}else if(u.value==="/>"){for(var S=0,Ae=o;Ae;){if(Ae.type.indexOf("tag-name")!==-1&&Ae.value===i){r--;break}else if(Ae.value==="<")break;Ae=l.stepBackward(),S++}for(var Vn=0;Vn<S;Vn++)l.stepForward()}}while(o&&r<=0);if(F&&_&&a&&f&&xe&&d)return{openTag:new R(F.start.row,F.start.column,_.end.row,_.end.column),closeTag:new R(a.start.row,a.start.column,f.end.row,f.end.column),openTagName:xe,closeTagName:d}}}}m.BracketMatch=M}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/line_widgets","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(p,m,Gn){var Q=p("./lib/oop"),R=p("./lib/lang"),M=p("./bidihandler").BidiHandler,l=p("./config"),u=p("./lib/event_emitter").EventEmitter,o=p("./selection").Selection,i=p("./mode/text").Mode,r=p("./range").Range,t=p("./line_widgets").LineWidgets,e=p("./document").Document,n=p("./background_tokenizer").BackgroundTokenizer,a=p("./search_highlight").SearchHighlight,d=p("./undomanager").UndoManager,f=function(){function y(h,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"+ ++y.$uid,this.$foldData.toString=function(){return this.join(`
198
+ `)},this.bgTokenizer=new n(new i().getTokenizer(),this);var J=this;this.bgTokenizer.on("update",function(He){J._signal("tokenizerUpdate",He)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof h!="object"||!h.getLine)&&(h=new e(h)),this.setDocument(h),this.selection=new o(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new M(this),l.resetOptions(this),this.setMode(w),l._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return y.prototype.$initOperationListeners=function(){var h=this;this.curOp=null,this.on("change",function(){h.curOp||(h.startOperation(),h.curOp.selectionBefore=h.$lastSel),h.curOp.docChanged=!0},!0),this.on("changeSelection",function(){h.curOp||(h.startOperation(),h.curOp.selectionBefore=h.$lastSel),h.curOp.selectionChanged=!0},!0),this.$operationResetTimer=R.delayedCall(this.endOperation.bind(this,!0))},y.prototype.startOperation=function(h){if(this.curOp){if(!h||this.curOp.command)return;this.prevOp=this.curOp}h||(h={}),this.$operationResetTimer.schedule(),this.curOp={command:h.command||{},args:h.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",h)},y.prototype.endOperation=function(h){if(this.curOp){if(h&&h.returnValue===!1){this.curOp=null,this._signal("endOperation",h);return}if(h==!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",h)}},y.prototype.setDocument=function(h){this.doc&&this.doc.off("change",this.$onChange),this.doc=h,h.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},y.prototype.getDocument=function(){return this.doc},Object.defineProperty(y.prototype,"widgetManager",{get:function(){var h=new t(this);return this.widgetManager=h,this.$editor&&h.attach(this.$editor),h},set:function(h){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:h})},enumerable:!1,configurable:!0}),y.prototype.$resetRowCache=function(h){if(!h){this.$docRowCache=[],this.$screenRowCache=[];return}var w=this.$docRowCache.length,J=this.$getRowCacheIndex(this.$docRowCache,h)+1;w>J&&(this.$docRowCache.splice(J,w),this.$screenRowCache.splice(J,w))},y.prototype.$getRowCacheIndex=function(h,w){for(var J=0,He=h.length-1;J<=He;){var Kn=J+He>>1,Qn=h[Kn];if(w>Qn)J=Kn+1;else if(w<Qn)He=Kn-1;else return Kn}return J-1},y.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},y.prototype.onChangeFold=function(h){var w=h.data;this.$resetRowCache(w.start.row)},y.prototype.onChange=function(h){this.$modified=!0,this.$bidiHandler.onChange(h),this.$resetRowCache(h.start.row);var w=this.$updateInternalDataOnChange(h);!this.$fromUndo&&this.$undoManager&&(w&&w.length&&(this.$undoManager.add({action:"removeFolds",folds:w},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(h,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(h),this._signal("change",h)},y.prototype.onSelectionChange=function(){this._signal("changeSelection")},y.prototype.setValue=function(h){this.doc.setValue(h),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},y.fromJSON=function(h){typeof h=="string"&&(h=JSON.parse(h));var w=new d;w.$undoStack=h.history.undo,w.$redoStack=h.history.redo,w.mark=h.history.mark,w.$rev=h.history.rev;var J=new y(h.value);return h.folds.forEach(function(He){J.addFold("...",r.fromPoints(He.start,He.end))}),J.setAnnotations(h.annotations),J.setBreakpoints(h.breakpoints),J.setMode(h.mode),J.setScrollLeft(h.scrollLeft),J.setScrollTop(h.scrollTop),J.setUndoManager(w),J.selection.fromJSON(h.selection),J},y.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(h){return h.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},y.prototype.toString=function(){return this.doc.getValue()},y.prototype.getSelection=function(){return this.selection},y.prototype.getState=function(h){return this.bgTokenizer.getState(h)},y.prototype.getTokens=function(h){return this.bgTokenizer.getTokens(h)},y.prototype.getTokenAt=function(h,w){var J=this.bgTokenizer.getTokens(h),He,Kn=0;if(w==null){var Qn=J.length-1;Kn=this.getLine(h).length}else for(var Qn=0;Qn<J.length&&(Kn+=J[Qn].value.length,!(Kn>=w));Qn++);return He=J[Qn],He?(He.index=Qn,He.start=Kn-He.value.length,He):null},y.prototype.setUndoManager=function(h){if(this.$undoManager=h,this.$informUndoManager&&this.$informUndoManager.cancel(),h){var w=this;h.addSession(this),this.$syncInformUndoManager=function(){w.$informUndoManager.cancel(),w.mergeUndoDeltas=!1},this.$informUndoManager=R.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},y.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},y.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},y.prototype.getTabString=function(){return this.getUseSoftTabs()?R.stringRepeat(" ",this.getTabSize()):" "},y.prototype.setUseSoftTabs=function(h){this.setOption("useSoftTabs",h)},y.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},y.prototype.setTabSize=function(h){this.setOption("tabSize",h)},y.prototype.getTabSize=function(){return this.$tabSize},y.prototype.isTabStop=function(h){return this.$useSoftTabs&&h.column%this.$tabSize===0},y.prototype.setNavigateWithinSoftTabs=function(h){this.setOption("navigateWithinSoftTabs",h)},y.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},y.prototype.setOverwrite=function(h){this.setOption("overwrite",h)},y.prototype.getOverwrite=function(){return this.$overwrite},y.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},y.prototype.addGutterDecoration=function(h,w){this.$decorations[h]||(this.$decorations[h]=""),this.$decorations[h]+=" "+w,this._signal("changeBreakpoint",{})},y.prototype.removeGutterDecoration=function(h,w){this.$decorations[h]=(this.$decorations[h]||"").replace(" "+w,""),this._signal("changeBreakpoint",{})},y.prototype.getBreakpoints=function(){return this.$breakpoints},y.prototype.setBreakpoints=function(h){this.$breakpoints=[];for(var w=0;w<h.length;w++)this.$breakpoints[h[w]]="ace_breakpoint";this._signal("changeBreakpoint",{})},y.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},y.prototype.setBreakpoint=function(h,w){w===void 0&&(w="ace_breakpoint"),w?this.$breakpoints[h]=w:delete this.$breakpoints[h],this._signal("changeBreakpoint",{})},y.prototype.clearBreakpoint=function(h){delete this.$breakpoints[h],this._signal("changeBreakpoint",{})},y.prototype.addMarker=function(h,w,J,He){var Kn=this.$markerId++,Qn={range:h,type:J||"line",renderer:typeof J=="function"?J:null,clazz:w,inFront:!!He,id:Kn};return He?(this.$frontMarkers[Kn]=Qn,this._signal("changeFrontMarker")):(this.$backMarkers[Kn]=Qn,this._signal("changeBackMarker")),Kn},y.prototype.addDynamicMarker=function(h,w){if(h.update){var J=this.$markerId++;return h.id=J,h.inFront=!!w,w?(this.$frontMarkers[J]=h,this._signal("changeFrontMarker")):(this.$backMarkers[J]=h,this._signal("changeBackMarker")),h}},y.prototype.removeMarker=function(h){var w=this.$frontMarkers[h]||this.$backMarkers[h];if(w){var J=w.inFront?this.$frontMarkers:this.$backMarkers;delete J[h],this._signal(w.inFront?"changeFrontMarker":"changeBackMarker")}},y.prototype.getMarkers=function(h){return h?this.$frontMarkers:this.$backMarkers},y.prototype.highlight=function(h){if(!this.$searchHighlight){var w=new a(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(w)}this.$searchHighlight.setRegexp(h)},y.prototype.highlightLines=function(h,w,J,He){typeof w!="number"&&(J=w,w=h),J||(J="ace_step");var Kn=new r(h,0,w,1/0);return Kn.id=this.addMarker(Kn,J,"fullLine",He),Kn},y.prototype.setAnnotations=function(h){this.$annotations=h,this._signal("changeAnnotation",{})},y.prototype.getAnnotations=function(){return this.$annotations||[]},y.prototype.clearAnnotations=function(){this.setAnnotations([])},y.prototype.$detectNewLine=function(h){var w=h.match(/^.*?(\r?\n)/m);w?this.$autoNewLine=w[1]:this.$autoNewLine=`
199
+ `},y.prototype.getWordRange=function(h,w){var J=this.getLine(h),He=!1;if(w>0&&(He=!!J.charAt(w-1).match(this.tokenRe)),He||(He=!!J.charAt(w).match(this.tokenRe)),He)var Kn=this.tokenRe;else if(/^\s+$/.test(J.slice(w-1,w+1)))var Kn=/\s/;else var Kn=this.nonTokenRe;var Qn=w;if(Qn>0){do Qn--;while(Qn>=0&&J.charAt(Qn).match(Kn));Qn++}for(var Zn=w;Zn<J.length&&J.charAt(Zn).match(Kn);)Zn++;return new r(h,Qn,h,Zn)},y.prototype.getAWordRange=function(h,w){for(var J=this.getWordRange(h,w),He=this.getLine(J.end.row);He.charAt(J.end.column).match(/[ \t]/);)J.end.column+=1;return J},y.prototype.setNewLineMode=function(h){this.doc.setNewLineMode(h)},y.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},y.prototype.setUseWorker=function(h){this.setOption("useWorker",h)},y.prototype.getUseWorker=function(){return this.$useWorker},y.prototype.onReloadTokenizer=function(h){var w=h.data;this.bgTokenizer.start(w.first),this._signal("tokenizerUpdate",h)},y.prototype.setMode=function(h,w){if(h&&typeof h=="object"){if(h.getTokenizer)return this.$onChangeMode(h);var J=h,He=J.path}else He=h||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new i),this.$modes[He]&&!J){this.$onChangeMode(this.$modes[He]),w&&w();return}this.$modeId=He,l.loadModule(["mode",He],(function(Kn){if(this.$modeId!==He)return w&&w();this.$modes[He]&&!J?this.$onChangeMode(this.$modes[He]):Kn&&Kn.Mode&&(Kn=new Kn.Mode(J),J||(this.$modes[He]=Kn,Kn.$id=He),this.$onChangeMode(Kn)),w&&w()}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},y.prototype.$onChangeMode=function(h,w){if(w||(this.$modeId=h.$id),this.$mode!==h){var J=this.$mode;this.$mode=h,this.$stopWorker(),this.$useWorker&&this.$startWorker();var He=h.getTokenizer();if(He.on!==void 0){var Kn=this.onReloadTokenizer.bind(this);He.on("update",Kn)}this.bgTokenizer.setTokenizer(He),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=h.tokenRe,this.nonTokenRe=h.nonTokenRe,w||(h.attachToSession&&h.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(h.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:J,mode:h}))}},y.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},y.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(h){l.warn("Could not load worker",h),this.$worker=null}},y.prototype.getMode=function(){return this.$mode},y.prototype.setScrollTop=function(h){this.$scrollTop===h||isNaN(h)||(this.$scrollTop=h,this._signal("changeScrollTop",h))},y.prototype.getScrollTop=function(){return this.$scrollTop},y.prototype.setScrollLeft=function(h){this.$scrollLeft===h||isNaN(h)||(this.$scrollLeft=h,this._signal("changeScrollLeft",h))},y.prototype.getScrollLeft=function(){return this.$scrollLeft},y.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},y.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var h=0;return this.lineWidgets.forEach(function(w){w&&w.screenWidth>h&&(h=w.screenWidth)}),this.lineWidgetWidth=h},y.prototype.$computeWidth=function(h){if(this.$modified||h){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var w=this.doc.getAllLines(),J=this.$rowLengthCache,He=0,Kn=0,Qn=this.$foldData[Kn],Zn=Qn?Qn.start.row:1/0,Xn=w.length,ei=0;ei<Xn;ei++){if(ei>Zn){if(ei=Qn.end.row+1,ei>=Xn)break;Qn=this.$foldData[Kn++],Zn=Qn?Qn.start.row:1/0}J[ei]==null&&(J[ei]=this.$getStringScreenWidth(w[ei])[0]),J[ei]>He&&(He=J[ei])}this.screenWidth=He}},y.prototype.getLine=function(h){return this.doc.getLine(h)},y.prototype.getLines=function(h,w){return this.doc.getLines(h,w)},y.prototype.getLength=function(){return this.doc.getLength()},y.prototype.getTextRange=function(h){return this.doc.getTextRange(h||this.selection.getRange())},y.prototype.insert=function(h,w){return this.doc.insert(h,w)},y.prototype.remove=function(h){return this.doc.remove(h)},y.prototype.removeFullLines=function(h,w){return this.doc.removeFullLines(h,w)},y.prototype.undoChanges=function(h,w){if(h.length){this.$fromUndo=!0;for(var J=h.length-1;J!=-1;J--){var He=h[J];He.action=="insert"||He.action=="remove"?this.doc.revertDelta(He):He.folds&&this.addFolds(He.folds)}!w&&this.$undoSelect&&(h.selectionBefore?this.selection.fromJSON(h.selectionBefore):this.selection.setRange(this.$getUndoSelection(h,!0))),this.$fromUndo=!1}},y.prototype.redoChanges=function(h,w){if(h.length){this.$fromUndo=!0;for(var J=0;J<h.length;J++){var He=h[J];(He.action=="insert"||He.action=="remove")&&this.doc.$safeApplyDelta(He)}!w&&this.$undoSelect&&(h.selectionAfter?this.selection.fromJSON(h.selectionAfter):this.selection.setRange(this.$getUndoSelection(h,!1))),this.$fromUndo=!1}},y.prototype.setUndoSelect=function(h){this.$undoSelect=h},y.prototype.$getUndoSelection=function(h,w){function J(Xn){return w?Xn.action!=="insert":Xn.action==="insert"}for(var He,Kn,Qn=0;Qn<h.length;Qn++){var Zn=h[Qn];if(Zn.start){if(!He){J(Zn)?He=r.fromPoints(Zn.start,Zn.end):He=r.fromPoints(Zn.start,Zn.start);continue}J(Zn)?(Kn=Zn.start,He.compare(Kn.row,Kn.column)==-1&&He.setStart(Kn),Kn=Zn.end,He.compare(Kn.row,Kn.column)==1&&He.setEnd(Kn)):(Kn=Zn.start,He.compare(Kn.row,Kn.column)==-1&&(He=r.fromPoints(Zn.start,Zn.start)))}}return He},y.prototype.replace=function(h,w){return this.doc.replace(h,w)},y.prototype.moveText=function(h,w,J){var He=this.getTextRange(h),Kn=this.getFoldsInRange(h),Qn=r.fromPoints(w,w);if(!J){this.remove(h);var Zn=h.start.row-h.end.row,Xn=Zn?-h.end.column:h.start.column-h.end.column;Xn&&(Qn.start.row==h.end.row&&Qn.start.column>h.end.column&&(Qn.start.column+=Xn),Qn.end.row==h.end.row&&Qn.end.column>h.end.column&&(Qn.end.column+=Xn)),Zn&&Qn.start.row>=h.end.row&&(Qn.start.row+=Zn,Qn.end.row+=Zn)}if(Qn.end=this.insert(Qn.start,He),Kn.length){var ei=h.start,ri=Qn.start,Zn=ri.row-ei.row,Xn=ri.column-ei.column;this.addFolds(Kn.map(function(ii){return ii=ii.clone(),ii.start.row==ei.row&&(ii.start.column+=Xn),ii.end.row==ei.row&&(ii.end.column+=Xn),ii.start.row+=Zn,ii.end.row+=Zn,ii}))}return Qn},y.prototype.indentRows=function(h,w,J){J=J.replace(/\t/g,this.getTabString());for(var He=h;He<=w;He++)this.doc.insertInLine({row:He,column:0},J)},y.prototype.outdentRows=function(h){for(var w=h.collapseRows(),J=new r(0,0,0,0),He=this.getTabSize(),Kn=w.start.row;Kn<=w.end.row;++Kn){var Qn=this.getLine(Kn);J.start.row=Kn,J.end.row=Kn;for(var Zn=0;Zn<He&&Qn.charAt(Zn)==" ";++Zn);Zn<He&&Qn.charAt(Zn)==" "?(J.start.column=Zn,J.end.column=Zn+1):(J.start.column=0,J.end.column=Zn),this.remove(J)}},y.prototype.$moveLines=function(h,w,J){if(h=this.getRowFoldStart(h),w=this.getRowFoldEnd(w),J<0){var He=this.getRowFoldStart(h+J);if(He<0)return 0;var Kn=He-h}else if(J>0){var He=this.getRowFoldEnd(w+J);if(He>this.doc.getLength()-1)return 0;var Kn=He-w}else{h=this.$clipRowToDocument(h),w=this.$clipRowToDocument(w);var Kn=w-h+1}var Qn=new r(h,0,w,Number.MAX_VALUE),Zn=this.getFoldsInRange(Qn).map(function(ei){return ei=ei.clone(),ei.start.row+=Kn,ei.end.row+=Kn,ei}),Xn=J==0?this.doc.getLines(h,w):this.doc.removeFullLines(h,w);return this.doc.insertFullLines(h+Kn,Xn),Zn.length&&this.addFolds(Zn),Kn},y.prototype.moveLinesUp=function(h,w){return this.$moveLines(h,w,-1)},y.prototype.moveLinesDown=function(h,w){return this.$moveLines(h,w,1)},y.prototype.duplicateLines=function(h,w){return this.$moveLines(h,w,0)},y.prototype.$clipRowToDocument=function(h){return Math.max(0,Math.min(h,this.doc.getLength()-1))},y.prototype.$clipColumnToRow=function(h,w){return w<0?0:Math.min(this.doc.getLine(h).length,w)},y.prototype.$clipPositionToDocument=function(h,w){if(w=Math.max(0,w),h<0)h=0,w=0;else{var J=this.doc.getLength();h>=J?(h=J-1,w=this.doc.getLine(J-1).length):w=Math.min(this.doc.getLine(h).length,w)}return{row:h,column:w}},y.prototype.$clipRangeToDocument=function(h){h.start.row<0?(h.start.row=0,h.start.column=0):h.start.column=this.$clipColumnToRow(h.start.row,h.start.column);var w=this.doc.getLength()-1;return h.end.row>w?(h.end.row=w,h.end.column=this.doc.getLine(w).length):h.end.column=this.$clipColumnToRow(h.end.row,h.end.column),h},y.prototype.setUseWrapMode=function(h){if(h!=this.$useWrapMode){if(this.$useWrapMode=h,this.$modified=!0,this.$resetRowCache(0),h){var w=this.getLength();this.$wrapData=Array(w),this.$updateWrapData(0,w-1)}this._signal("changeWrapMode")}},y.prototype.getUseWrapMode=function(){return this.$useWrapMode},y.prototype.setWrapLimitRange=function(h,w){(this.$wrapLimitRange.min!==h||this.$wrapLimitRange.max!==w)&&(this.$wrapLimitRange={min:h,max:w},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},y.prototype.adjustWrapLimit=function(h,w){var J=this.$wrapLimitRange;J.max<0&&(J={min:w,max:w});var He=this.$constrainWrapLimit(h,J.min,J.max);return He!=this.$wrapLimit&&He>1?(this.$wrapLimit=He,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},y.prototype.$constrainWrapLimit=function(h,w,J){return w&&(h=Math.max(w,h)),J&&(h=Math.min(J,h)),h},y.prototype.getWrapLimit=function(){return this.$wrapLimit},y.prototype.setWrapLimit=function(h){this.setWrapLimitRange(h,h)},y.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},y.prototype.$updateInternalDataOnChange=function(h){var w=this.$useWrapMode,J=h.action,He=h.start,Kn=h.end,Qn=He.row,Zn=Kn.row,Xn=Zn-Qn,ei=null;if(this.$updating=!0,Xn!=0)if(J==="remove"){this[w?"$wrapData":"$rowLengthCache"].splice(Qn,Xn);var ri=this.$foldData;ei=this.getFoldsInRange(h),this.removeFolds(ei);var Jn=this.getFoldLine(Kn.row),ti=0;if(Jn){Jn.addRemoveChars(Kn.row,Kn.column,He.column-Kn.column),Jn.shiftRow(-Xn);var ii=this.getFoldLine(Qn);ii&&ii!==Jn&&(ii.merge(Jn),Jn=ii),ti=ri.indexOf(Jn)+1}for(ti;ti<ri.length;ti++){var Jn=ri[ti];Jn.start.row>=Kn.row&&Jn.shiftRow(-Xn)}Zn=Qn}else{var ni=Array(Xn);ni.unshift(Qn,0);var si=w?this.$wrapData:this.$rowLengthCache;si.splice.apply(si,ni);var ri=this.$foldData,Jn=this.getFoldLine(Qn),ti=0;if(Jn){var li=Jn.range.compareInside(He.row,He.column);li==0?(Jn=Jn.split(He.row,He.column),Jn&&(Jn.shiftRow(Xn),Jn.addRemoveChars(Zn,0,Kn.column-He.column))):li==-1&&(Jn.addRemoveChars(Qn,0,Kn.column-He.column),Jn.shiftRow(Xn)),ti=ri.indexOf(Jn)+1}for(ti;ti<ri.length;ti++){var Jn=ri[ti];Jn.start.row>=Qn&&Jn.shiftRow(Xn)}}else{Xn=Math.abs(h.start.column-h.end.column),J==="remove"&&(ei=this.getFoldsInRange(h),this.removeFolds(ei),Xn=-Xn);var Jn=this.getFoldLine(Qn);Jn&&Jn.addRemoveChars(Qn,He.column,Xn)}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(Qn,Zn):this.$updateRowLengthCache(Qn,Zn),ei},y.prototype.$updateRowLengthCache=function(h,w){this.$rowLengthCache[h]=null,this.$rowLengthCache[w]=null},y.prototype.$updateWrapData=function(h,w){var J=this.doc.getAllLines(),He=this.getTabSize(),Kn=this.$wrapData,Qn=this.$wrapLimit,Zn,Xn,ei=h;for(w=Math.min(w,J.length-1);ei<=w;)Xn=this.getFoldLine(ei,Xn),Xn?(Zn=[],Xn.walk((function(ri,Jn,ti,ii){var ni;if(ri!=null){ni=this.$getDisplayTokens(ri,Zn.length),ni[0]=_;for(var si=1;si<ni.length;si++)ni[si]=S}else ni=this.$getDisplayTokens(J[Jn].substring(ii,ti),Zn.length);Zn=Zn.concat(ni)}).bind(this),Xn.end.row,J[Xn.end.row].length+1),Kn[Xn.start.row]=this.$computeWrapSplits(Zn,Qn,He),ei=Xn.end.row+1):(Zn=this.$getDisplayTokens(J[ei]),Kn[ei]=this.$computeWrapSplits(Zn,Qn,He),ei++)},y.prototype.$computeWrapSplits=function(h,w,J){if(h.length==0)return[];var He=[],Kn=h.length,Qn=0,Zn=0,Xn=this.$wrapAsCode,ei=this.$indentedSoftWrap,ri=w<=Math.max(2*J,8)||ei===!1?0:Math.floor(w/2);function Jn(){var li=0;if(ri===0)return li;if(ei)for(var ci=0;ci<h.length;ci++){var ai=h[ci];if(ai==Vn)li+=1;else if(ai==Me)li+=J;else{if(ai==oe)continue;break}}return Xn&&ei!==!1&&(li+=J),Math.min(li,ri)}function ti(li){for(var ci=li-Qn,ai=Qn;ai<li;ai++){var ui=h[ai];(ui===12||ui===2)&&(ci-=1)}He.length||(ii=Jn(),He.indent=ii),Zn+=ci,He.push(Zn),Qn=li}for(var ii=0;Kn-Qn>w-ii;){var ni=Qn+w-ii;if(h[ni-1]>=Vn&&h[ni]>=Vn){ti(ni);continue}if(h[ni]==_||h[ni]==S){for(ni;ni!=Qn-1&&h[ni]!=_;ni--);if(ni>Qn){ti(ni);continue}for(ni=Qn+w,ni;ni<h.length&&h[ni]==S;ni++);if(ni==h.length)break;ti(ni);continue}for(var si=Math.max(ni-(w-(w>>2)),Qn-1);ni>si&&h[ni]<_;)ni--;if(Xn){for(;ni>si&&h[ni]<_;)ni--;for(;ni>si&&h[ni]==Ae;)ni--}else for(;ni>si&&h[ni]<Vn;)ni--;if(ni>si){ti(++ni);continue}ni=Qn+w,h[ni]==F&&ni--,ti(ni-ii)}return He},y.prototype.$getDisplayTokens=function(h,w){var J=[],He;w=w||0;for(var Kn=0;Kn<h.length;Kn++){var Qn=h.charCodeAt(Kn);if(Qn==9){He=this.getScreenTabSize(J.length+w),J.push(Me);for(var Zn=1;Zn<He;Zn++)J.push(oe)}else Qn==32?J.push(Vn):Qn>39&&Qn<48||Qn>57&&Qn<64?J.push(Ae):Qn>=4352&&Yn(Qn)?J.push(xe,F):J.push(xe)}return J},y.prototype.$getStringScreenWidth=function(h,w,J){if(w==0)return[0,0];w==null&&(w=1/0),J=J||0;var He,Kn;for(Kn=0;Kn<h.length&&(He=h.charCodeAt(Kn),He==9?J+=this.getScreenTabSize(J):He>=4352&&Yn(He)?J+=2:J+=1,!(J>w));Kn++);return[J,Kn]},y.prototype.getRowLength=function(h){var w=1;return this.lineWidgets&&(w+=this.lineWidgets[h]&&this.lineWidgets[h].rowCount||0),!this.$useWrapMode||!this.$wrapData[h]?w:this.$wrapData[h].length+w},y.prototype.getRowLineCount=function(h){return!this.$useWrapMode||!this.$wrapData[h]?1:this.$wrapData[h].length+1},y.prototype.getRowWrapIndent=function(h){if(this.$useWrapMode){var w=this.screenToDocumentPosition(h,Number.MAX_VALUE),J=this.$wrapData[w.row];return J.length&&J[0]<w.column?J.indent:0}else return 0},y.prototype.getScreenLastRowColumn=function(h){var w=this.screenToDocumentPosition(h,Number.MAX_VALUE);return this.documentToScreenColumn(w.row,w.column)},y.prototype.getDocumentLastRowColumn=function(h,w){var J=this.documentToScreenRow(h,w);return this.getScreenLastRowColumn(J)},y.prototype.getDocumentLastRowColumnPosition=function(h,w){var J=this.documentToScreenRow(h,w);return this.screenToDocumentPosition(J,Number.MAX_VALUE/10)},y.prototype.getRowSplitData=function(h){if(this.$useWrapMode)return this.$wrapData[h]},y.prototype.getScreenTabSize=function(h){return this.$tabSize-(h%this.$tabSize|0)},y.prototype.screenToDocumentRow=function(h,w){return this.screenToDocumentPosition(h,w).row},y.prototype.screenToDocumentColumn=function(h,w){return this.screenToDocumentPosition(h,w).column},y.prototype.screenToDocumentPosition=function(h,w,J){if(h<0)return{row:0,column:0};var He,Kn=0,Qn=0,Zn,Xn=0,ei=0,ri=this.$screenRowCache,Jn=this.$getRowCacheIndex(ri,h),ti=ri.length;if(ti&&Jn>=0)var Xn=ri[Jn],Kn=this.$docRowCache[Jn],ii=h>ri[ti-1];else var ii=!ti;for(var ni=this.getLength()-1,si=this.getNextFoldLine(Kn),li=si?si.start.row:1/0;Xn<=h&&(ei=this.getRowLength(Kn),!(Xn+ei>h||Kn>=ni));)Xn+=ei,Kn++,Kn>li&&(Kn=si.end.row+1,si=this.getNextFoldLine(Kn,si),li=si?si.start.row:1/0),ii&&(this.$docRowCache.push(Kn),this.$screenRowCache.push(Xn));if(si&&si.start.row<=Kn)He=this.getFoldDisplayLine(si),Kn=si.start.row;else{if(Xn+ei<=h||Kn>ni)return{row:ni,column:this.getLine(ni).length};He=this.getLine(Kn),si=null}var ci=0,ai=Math.floor(h-Xn);if(this.$useWrapMode){var ui=this.$wrapData[Kn];ui&&(Zn=ui[ai],ai>0&&ui.length&&(ci=ui.indent,Qn=ui[ai-1]||ui[ui.length-1],He=He.substring(Qn)))}return J!==void 0&&this.$bidiHandler.isBidiRow(Xn+ai,Kn,ai)&&(w=this.$bidiHandler.offsetToCol(J)),Qn+=this.$getStringScreenWidth(He,w-ci)[1],this.$useWrapMode&&Qn>=Zn&&(Qn=Zn-1),si?si.idxToPosition(Qn):{row:Kn,column:Qn}},y.prototype.documentToScreenPosition=function(h,w){if(typeof w>"u")var J=this.$clipPositionToDocument(h.row,h.column);else J=this.$clipPositionToDocument(h,w);h=J.row,w=J.column;var He=0,Kn=null,Qn=null;Qn=this.getFoldAt(h,w,1),Qn&&(h=Qn.start.row,w=Qn.start.column);var Zn,Xn=0,ei=this.$docRowCache,ri=this.$getRowCacheIndex(ei,h),Jn=ei.length;if(Jn&&ri>=0)var Xn=ei[ri],He=this.$screenRowCache[ri],ti=h>ei[Jn-1];else var ti=!Jn;for(var ii=this.getNextFoldLine(Xn),ni=ii?ii.start.row:1/0;Xn<h;){if(Xn>=ni){if(Zn=ii.end.row+1,Zn>h)break;ii=this.getNextFoldLine(Zn,ii),ni=ii?ii.start.row:1/0}else Zn=Xn+1;He+=this.getRowLength(Xn),Xn=Zn,ti&&(this.$docRowCache.push(Xn),this.$screenRowCache.push(He))}var si="";ii&&Xn>=ni?(si=this.getFoldDisplayLine(ii,h,w),Kn=ii.start.row):(si=this.getLine(h).substring(0,w),Kn=h);var li=0;if(this.$useWrapMode){var ci=this.$wrapData[Kn];if(ci){for(var ai=0;si.length>=ci[ai];)He++,ai++;si=si.substring(ci[ai-1]||0,si.length),li=ai>0?ci.indent:0}}return this.lineWidgets&&this.lineWidgets[Xn]&&this.lineWidgets[Xn].rowsAbove&&(He+=this.lineWidgets[Xn].rowsAbove),{row:He,column:li+this.$getStringScreenWidth(si)[0]}},y.prototype.documentToScreenColumn=function(h,w){return this.documentToScreenPosition(h,w).column},y.prototype.documentToScreenRow=function(h,w){return this.documentToScreenPosition(h,w).row},y.prototype.getScreenLength=function(){var h=0,w=null;if(this.$useWrapMode)for(var Kn=this.$wrapData.length,Qn=0,He=0,w=this.$foldData[He++],Zn=w?w.start.row:1/0;Qn<Kn;){var Xn=this.$wrapData[Qn];h+=Xn?Xn.length+1:1,Qn++,Qn>Zn&&(Qn=w.end.row+1,w=this.$foldData[He++],Zn=w?w.start.row:1/0)}else{h=this.getLength();for(var J=this.$foldData,He=0;He<J.length;He++)w=J[He],h-=w.end.row-w.start.row}return this.lineWidgets&&(h+=this.$getWidgetScreenLength()),h},y.prototype.$setFontMetrics=function(h){this.$enableVarChar&&(this.$getStringScreenWidth=function(w,J,He){if(J===0)return[0,0];J||(J=1/0),He=He||0;var Kn,Qn;for(Qn=0;Qn<w.length&&(Kn=w.charAt(Qn),Kn===" "?He+=this.getScreenTabSize(He):He+=h.getCharacterWidth(Kn),!(He>J));Qn++);return[He,Qn]})},y.prototype.getPrecedingCharacter=function(){var h=this.selection.getCursor();if(h.column===0)return h.row===0?"":this.doc.getNewLineCharacter();var w=this.getLine(h.row);return w[h.column-1]},y.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()},y}();f.$uid=0,f.prototype.$modes=l.$modes,f.prototype.getValue=f.prototype.toString,f.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},f.prototype.$overwrite=!1,f.prototype.$mode=null,f.prototype.$modeId=null,f.prototype.$scrollTop=0,f.prototype.$scrollLeft=0,f.prototype.$wrapLimit=80,f.prototype.$useWrapMode=!1,f.prototype.$wrapLimitRange={min:null,max:null},f.prototype.lineWidgets=null,f.prototype.isFullWidth=Yn,Q.implement(f.prototype,u);var xe=1,F=2,_=3,S=4,Ae=9,Vn=10,Me=11,oe=12;function Yn(y){return y<4352?!1:y>=4352&&y<=4447||y>=4515&&y<=4519||y>=4602&&y<=4607||y>=9001&&y<=9002||y>=11904&&y<=11929||y>=11931&&y<=12019||y>=12032&&y<=12245||y>=12272&&y<=12283||y>=12288&&y<=12350||y>=12353&&y<=12438||y>=12441&&y<=12543||y>=12549&&y<=12589||y>=12593&&y<=12686||y>=12688&&y<=12730||y>=12736&&y<=12771||y>=12784&&y<=12830||y>=12832&&y<=12871||y>=12880&&y<=13054||y>=13056&&y<=19903||y>=19968&&y<=42124||y>=42128&&y<=42182||y>=43360&&y<=43388||y>=44032&&y<=55203||y>=55216&&y<=55238||y>=55243&&y<=55291||y>=63744&&y<=64255||y>=65040&&y<=65049||y>=65072&&y<=65106||y>=65108&&y<=65126||y>=65128&&y<=65131||y>=65281&&y<=65376||y>=65504&&y<=65510}p("./edit_session/folding").Folding.call(f.prototype),p("./edit_session/bracket_match").BracketMatch.call(f.prototype),l.defineOptions(f.prototype,"session",{wrap:{set:function(y){if(!y||y=="off"?y=!1:y=="free"?y=!0:y=="printMargin"?y=-1:typeof y=="string"&&(y=parseInt(y,10)||!1),this.$wrap!=y)if(this.$wrap=y,!y)this.setUseWrapMode(!1);else{var h=typeof y=="number"?y:null;this.setWrapLimitRange(h,h),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(y){y=y=="auto"?this.$mode.type!="text":y!="text",y!=this.$wrapAsCode&&(this.$wrapAsCode=y,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(y){this.$useWorker=y,this.$stopWorker(),y&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(y){y=parseInt(y),y>0&&this.$tabSize!==y&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=y,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(y){this.setFoldStyle(y)},handlesSet:!0},overwrite:{set:function(y){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(y){this.doc.setNewLineMode(y)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(y){this.setMode(y)},get:function(){return this.$modeId},handlesSet:!0}}),m.EditSession=f}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(p,m,Gn){var Q=p("./lib/lang"),R=p("./lib/oop"),M=p("./range").Range,l=function(){function o(){this.$options={}}return o.prototype.set=function(i){return R.mixin(this.$options,i),this},o.prototype.getOptions=function(){return Q.copyObject(this.$options)},o.prototype.setOptions=function(i){this.$options=i},o.prototype.find=function(i){var r=this.$options,t=this.$matchIterator(i,r);if(!t)return!1;var e=null;return t.forEach(function(n,a,d,f){return e=new M(n,a,d,f),a==f&&r.start&&r.start.start&&r.skipCurrent!=!1&&e.isEqual(r.start)?(e=null,!1):!0}),e},o.prototype.findAll=function(i){var r=this.$options;if(!r.needle)return[];this.$assembleRegExp(r);var t=r.range,e=t?i.getLines(t.start.row,t.end.row):i.doc.getAllLines(),n=[],a=r.re;if(r.$isMultiLine){var d=a.length,f=e.length-d,xe;e:for(var F=a.offset||0;F<=f;F++){for(var _=0;_<d;_++)if(e[F+_].search(a[_])==-1)continue e;var S=e[F],Ae=e[F+d-1],Vn=S.length-S.match(a[0])[0].length,Me=Ae.match(a[d-1])[0].length;xe&&xe.end.row===F&&xe.end.column>Vn||(n.push(xe=new M(F,Vn,F+d-1,Me)),d>2&&(F=F+d-2))}}else for(var oe=0;oe<e.length;oe++)for(var Yn=Q.getMatchOffsets(e[oe],a),_=0;_<Yn.length;_++){var y=Yn[_];n.push(new M(oe,y.offset,oe,y.offset+y.length))}if(t){for(var h=t.start.column,w=t.end.column,oe=0,_=n.length-1;oe<_&&n[oe].start.column<h&&n[oe].start.row==0;)oe++;for(var J=t.end.row-t.start.row;oe<_&&n[_].end.column>w&&n[_].end.row==J;)_--;for(n=n.slice(oe,_+1),oe=0,_=n.length;oe<_;oe++)n[oe].start.row+=t.start.row,n[oe].end.row+=t.start.row}return n},o.prototype.replace=function(i,r){var t=this.$options,e=this.$assembleRegExp(t);if(t.$isMultiLine)return r;if(e){var n=e.exec(i);if(!n||n[0].length!=i.length)return null;if(t.regExp||(r=r.replace(/\$/g,"$$$$")),r=i.replace(e,r),t.preserveCase){r=r.split("");for(var a=Math.min(i.length,i.length);a--;){var d=i[a];d&&d.toLowerCase()!=d?r[a]=r[a].toUpperCase():r[a]=r[a].toLowerCase()}r=r.join("")}return r}},o.prototype.$assembleRegExp=function(i,r){if(i.needle instanceof RegExp)return i.re=i.needle;var t=i.needle;if(!i.needle)return i.re=!1;i.regExp||(t=Q.escapeRegExp(t));var e=i.caseSensitive?"gm":"gmi";try{new RegExp(t,"u"),i.$supportsUnicodeFlag=!0,e+="u"}catch{i.$supportsUnicodeFlag=!1}if(i.wholeWord&&(t=u(t,i)),i.$isMultiLine=!r&&/[\n\r]/.test(t),i.$isMultiLine)return i.re=this.$assembleMultilineRegExp(t,e);try{var n=new RegExp(t,e)}catch{n=!1}return i.re=n},o.prototype.$assembleMultilineRegExp=function(i,r){for(var t=i.replace(/\r\n|\r|\n/g,`$
200
+ ^`).split(`
201
+ `),e=[],n=0;n<t.length;n++)try{e.push(new RegExp(t[n],r))}catch{return!1}return e},o.prototype.$matchIterator=function(i,r){var t=this.$assembleRegExp(r);if(!t)return!1;var e=r.backwards==!0,n=r.skipCurrent!=!1,a=t.unicode,d=r.range,f=r.start;f||(f=d?d[e?"end":"start"]:i.selection.getRange()),f.start&&(f=f[n!=e?"end":"start"]);var xe=d?d.start.row:0,F=d?d.end.row:i.getLength()-1;if(e)var _=function(Vn){var Me=f.row;if(!Ae(Me,f.column,Vn)){for(Me--;Me>=xe;Me--)if(Ae(Me,Number.MAX_VALUE,Vn))return;if(r.wrap!=!1){for(Me=F,xe=f.row;Me>=xe;Me--)if(Ae(Me,Number.MAX_VALUE,Vn))return}}};else var _=function(Me){var oe=f.row;if(!Ae(oe,f.column,Me)){for(oe=oe+1;oe<=F;oe++)if(Ae(oe,0,Me))return;if(r.wrap!=!1){for(oe=xe,F=f.row;oe<=F;oe++)if(Ae(oe,0,Me))return}}};if(r.$isMultiLine)var S=t.length,Ae=function(Vn,Me,oe){var Yn=e?Vn-S+1:Vn;if(!(Yn<0||Yn+S>i.getLength())){var y=i.getLine(Yn),h=y.search(t[0]);if(!(!e&&h<Me||h===-1)){for(var w=1;w<S;w++)if(y=i.getLine(Yn+w),y.search(t[w])==-1)return;var J=y.match(t[S-1])[0].length;if(!(e&&J>Me)&&oe(Yn,h,Yn+S-1,J))return!0}}};else if(e)var Ae=function(Me,oe,Yn){var y=i.getLine(Me),h=[],w,J=0;for(t.lastIndex=0;w=t.exec(y);){var He=w[0].length;if(J=w.index,!He){if(J>=y.length)break;t.lastIndex=J+=Q.skipEmptyMatch(y,J,a)}if(w.index+He>oe)break;h.push(w.index,He)}for(var Kn=h.length-1;Kn>=0;Kn-=2){var Qn=h[Kn-1],He=h[Kn];if(Yn(Me,Qn,Me,Qn+He))return!0}};else var Ae=function(Me,oe,Yn){var y=i.getLine(Me),h,w;for(t.lastIndex=oe;w=t.exec(y);){var J=w[0].length;if(h=w.index,Yn(Me,h,Me,h+J))return!0;if(!J&&(t.lastIndex=h+=Q.skipEmptyMatch(y,h,a),h>=y.length))return!1}};return{forEach:_}},o}();function u(o,i){var r=Q.supportsLookbehind();function t(d,f){f===void 0&&(f=!0);var xe=r&&i.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return xe.test(d)||i.regExp?r&&i.$supportsUnicodeFlag?f?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var e=Array.from(o),n=e[0],a=e[e.length-1];return t(n)+o+t(a,!1)}m.Search=l}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(p,m,Gn){var Q=this&&this.__extends||function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(n[d]=a[d])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),R=p("../lib/keys"),M=p("../lib/useragent"),l=R.KEY_MODS,u=function(){function r(t,e){this.$init(t,e,!1)}return r.prototype.$init=function(t,e,n){this.platform=e||(M.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(t),this.$singleCommand=n},r.prototype.addCommand=function(t){this.commands[t.name]&&this.removeCommand(t),this.commands[t.name]=t,t.bindKey&&this._buildKeyHash(t)},r.prototype.removeCommand=function(t,e){var n=t&&(typeof t=="string"?t:t.name);t=this.commands[n],e||delete this.commands[n];var a=this.commandKeyBinding;for(var d in a){var f=a[d];if(f==t)delete a[d];else if(Array.isArray(f)){var xe=f.indexOf(t);xe!=-1&&(f.splice(xe,1),f.length==1&&(a[d]=f[0]))}}},r.prototype.bindKey=function(t,e,n){if(typeof t=="object"&&t&&(n==null&&(n=t.position),t=t[this.platform]),!!t){if(typeof e=="function")return this.addCommand({exec:e,bindKey:t,name:e.name||t});t.split("|").forEach(function(a){var d="";if(a.indexOf(" ")!=-1){var f=a.split(/\s+/);a=f.pop(),f.forEach(function(_){var S=this.parseKeys(_),Ae=l[S.hashId]+S.key;d+=(d?" ":"")+Ae,this._addCommandToBinding(d,"chainKeys")},this),d+=" "}var xe=this.parseKeys(a),F=l[xe.hashId]+xe.key;this._addCommandToBinding(d+F,e,n)},this)}},r.prototype._addCommandToBinding=function(t,e,n){var a=this.commandKeyBinding,d;if(!e)delete a[t];else if(!a[t]||this.$singleCommand)a[t]=e;else{Array.isArray(a[t])?(d=a[t].indexOf(e))!=-1&&a[t].splice(d,1):a[t]=[a[t]],typeof n!="number"&&(n=o(e));var f=a[t];for(d=0;d<f.length;d++){var xe=f[d],F=o(xe);if(F>n)break}f.splice(d,0,e)}},r.prototype.addCommands=function(t){t&&Object.keys(t).forEach(function(e){var n=t[e];if(n){if(typeof n=="string")return this.bindKey(n,e);typeof n=="function"&&(n={exec:n}),typeof n=="object"&&(n.name||(n.name=e),this.addCommand(n))}},this)},r.prototype.removeCommands=function(t){Object.keys(t).forEach(function(e){this.removeCommand(t[e])},this)},r.prototype.bindKeys=function(t){Object.keys(t).forEach(function(e){this.bindKey(e,t[e])},this)},r.prototype._buildKeyHash=function(t){this.bindKey(t.bindKey,t)},r.prototype.parseKeys=function(t){var e=t.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(F){return F}),n=e.pop(),a=R[n];if(R.FUNCTION_KEYS[a])n=R.FUNCTION_KEYS[a].toLowerCase();else if(e.length){if(e.length==1&&e[0]=="shift")return{key:n.toUpperCase(),hashId:-1}}else return{key:n,hashId:-1};for(var d=0,f=e.length;f--;){var xe=R.KEY_MODS[e[f]];if(xe==null)return typeof console<"u"&&console.error("invalid modifier "+e[f]+" in "+t),!1;d|=xe}return{key:n,hashId:d}},r.prototype.findKeyCommand=function(t,e){var n=l[t]+e;return this.commandKeyBinding[n]},r.prototype.handleKeyboard=function(t,e,n,a){if(!(a<0)){var d=l[e]+n,f=this.commandKeyBinding[d];return t.$keyChain&&(t.$keyChain+=" "+d,f=this.commandKeyBinding[t.$keyChain]||f),f&&(f=="chainKeys"||f[f.length-1]=="chainKeys")?(t.$keyChain=t.$keyChain||d,{command:"null"}):(t.$keyChain&&((!e||e==4)&&n.length==1?t.$keyChain=t.$keyChain.slice(0,-d.length-1):(e==-1||a>0)&&(t.$keyChain="")),{command:f})}},r.prototype.getStatusText=function(t,e){return e.$keyChain||""},r}();function o(r){return typeof r=="object"&&r.bindKey&&r.bindKey.position||(r.isDefault?-100:0)}var i=function(r){Q(t,r);function t(e,n){var a=r.call(this,e,n)||this;return a.$singleCommand=!0,a}return t}(u);i.call=function(r,t,e){u.prototype.$init.call(r,t,e,!0)},u.call=function(r,t,e){u.prototype.$init.call(r,t,e,!1)},m.HashHandler=i,m.MultiHashHandler=u}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(p,m,Gn){var Q=this&&this.__extends||function(){var o=function(i,r){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(i,r)};return function(i,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");o(i,r);function t(){this.constructor=i}i.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}(),R=p("../lib/oop"),M=p("../keyboard/hash_handler").MultiHashHandler,l=p("../lib/event_emitter").EventEmitter,u=function(o){Q(i,o);function i(r,t){var e=o.call(this,t,r)||this;return e.byName=e.commands,e.setDefaultHandler("exec",function(n){return n.args?n.command.exec(n.editor,n.args,n.event,!1):n.command.exec(n.editor,{},n.event,!0)}),e}return i.prototype.exec=function(r,t,e){if(Array.isArray(r)){for(var n=r.length;n--;)if(this.exec(r[n],t,e))return!0;return!1}if(typeof r=="string"&&(r=this.commands[r]),!this.canExecute(r,t))return!1;var a={editor:t,command:r,args:e};return a.returnValue=this._emit("exec",a),this._signal("afterExec",a),a.returnValue!==!1},i.prototype.canExecute=function(r,t){return typeof r=="string"&&(r=this.commands[r]),!(!r||t&&t.$readOnly&&!r.readOnly||this.$checkCommandState!=!1&&r.isAvailable&&!r.isAvailable(t))},i.prototype.toggleRecording=function(r){if(!this.$inReplay)return r&&r._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(t){this.macro.push([t.command,t.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},i.prototype.replay=function(r){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(r);try{this.$inReplay=!0,this.macro.forEach(function(t){typeof t=="string"?this.exec(t,r):this.exec(t[0],r,t[1])},this)}finally{this.$inReplay=!1}}},i.prototype.trimMacro=function(r){return r.map(function(t){return typeof t[0]!="string"&&(t[0]=t[0].name),t[1]||(t=t[0]),t})},i}(M);R.implement(u.prototype,l),m.CommandManager=u}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(p,m,Gn){var Q=p("../lib/lang"),R=p("../config"),M=p("../range").Range;function l(o,i){return{win:o,mac:i}}m.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:l("Ctrl-,","Command-,"),exec:function(o){R.loadModule("ace/ext/settings_menu",function(i){i.init(o),o.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:l("Alt-E","F4"),exec:function(o){R.loadModule("ace/ext/error_marker",function(i){i.showErrorMarker(o,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:l("Alt-Shift-E","Shift-F4"),exec:function(o){R.loadModule("ace/ext/error_marker",function(i){i.showErrorMarker(o,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:l("Ctrl-A","Command-A"),exec:function(o){o.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:l(null,"Ctrl-L"),exec:function(o){o.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:l("Ctrl-L","Command-L"),exec:function(o,i){typeof i=="number"&&!isNaN(i)&&o.gotoLine(i),o.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:l("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(o){o.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:l("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(o){o.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:l("F2","F2"),exec:function(o){o.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:l("Alt-F2","Alt-F2"),exec:function(o){o.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:l(null,"Ctrl-Command-Option-0"),exec:function(o){o.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:l(null,"Ctrl-Command-Option-0"),exec:function(o){o.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:l("Alt-0","Command-Option-0"),exec:function(o){o.session.foldAll(),o.session.unfold(o.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:l("Alt-Shift-0","Command-Option-Shift-0"),exec:function(o){o.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:l("Ctrl-K","Command-G"),exec:function(o){o.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:l("Ctrl-Shift-K","Command-Shift-G"),exec:function(o){o.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:l("Alt-K","Ctrl-G"),exec:function(o){o.selection.isEmpty()?o.selection.selectWord():o.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:l("Alt-Shift-K","Ctrl-Shift-G"),exec:function(o){o.selection.isEmpty()?o.selection.selectWord():o.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:l("Ctrl-F","Command-F"),exec:function(o){R.loadModule("ace/ext/searchbox",function(i){i.Search(o)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(o){o.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:l("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(o){o.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:l("Ctrl-Home","Command-Home|Command-Up"),exec:function(o){o.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:l("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(o){o.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:l("Up","Up|Ctrl-P"),exec:function(o,i){o.navigateUp(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:l("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(o){o.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:l("Ctrl-End","Command-End|Command-Down"),exec:function(o){o.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:l("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(o){o.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:l("Down","Down|Ctrl-N"),exec:function(o,i){o.navigateDown(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:l("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(o){o.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:l("Ctrl-Left","Option-Left"),exec:function(o){o.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:l("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(o){o.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:l("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(o){o.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:l("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(o){o.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:l("Left","Left|Ctrl-B"),exec:function(o,i){o.navigateLeft(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:l("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(o){o.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:l("Ctrl-Right","Option-Right"),exec:function(o){o.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:l("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(o){o.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:l("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(o){o.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:l("Shift-Right","Shift-Right"),exec:function(o){o.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:l("Right","Right|Ctrl-F"),exec:function(o,i){o.navigateRight(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(o){o.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:l(null,"Option-PageDown"),exec:function(o){o.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:l("PageDown","PageDown|Ctrl-V"),exec:function(o){o.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(o){o.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:l(null,"Option-PageUp"),exec:function(o){o.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(o){o.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:l("Ctrl-Up",null),exec:function(o){o.renderer.scrollBy(0,-2*o.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:l("Ctrl-Down",null),exec:function(o){o.renderer.scrollBy(0,2*o.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(o){o.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(o){o.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:l("Ctrl-Alt-E","Command-Option-E"),exec:function(o){o.commands.toggleRecording(o)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:l("Ctrl-Shift-E","Command-Shift-E"),exec:function(o){o.commands.replay(o)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:l("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(o){o.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:l("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(o){o.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:l("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(o){o.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:l(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(o){},readOnly:!0},{name:"cut",description:"Cut",exec:function(o){var i=o.$copyWithEmptySelection&&o.selection.isEmpty(),r=i?o.selection.getLineRange():o.selection.getRange();o._emit("cut",r),r.isEmpty()||o.session.remove(r),o.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(o,i){o.$handlePaste(i)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:l("Ctrl-D","Command-D"),exec:function(o){o.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:l("Ctrl-Shift-D","Command-Shift-D"),exec:function(o){o.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:l("Ctrl-Alt-S","Command-Alt-S"),exec:function(o){o.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:l("Ctrl-/","Command-/"),exec:function(o){o.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:l("Ctrl-Shift-/","Command-Shift-/"),exec:function(o){o.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:l("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(o){o.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:l("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(o){o.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:l("Ctrl-H","Command-Option-F"),exec:function(o){R.loadModule("ace/ext/searchbox",function(i){i.Search(o,!0)})}},{name:"undo",description:"Undo",bindKey:l("Ctrl-Z","Command-Z"),exec:function(o){o.undo()}},{name:"redo",description:"Redo",bindKey:l("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(o){o.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:l("Alt-Shift-Up","Command-Option-Up"),exec:function(o){o.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:l("Alt-Up","Option-Up"),exec:function(o){o.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:l("Alt-Shift-Down","Command-Option-Down"),exec:function(o){o.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:l("Alt-Down","Option-Down"),exec:function(o){o.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:l("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(o){o.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:l("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(o){o.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:l("Shift-Delete",null),exec:function(o){if(o.selection.isEmpty())o.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:l("Alt-Backspace","Command-Backspace"),exec:function(o){o.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:l("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(o){o.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:l("Ctrl-Shift-Backspace",null),exec:function(o){var i=o.selection.getRange();i.start.column=0,o.session.remove(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:l("Ctrl-Shift-Delete",null),exec:function(o){var i=o.selection.getRange();i.end.column=Number.MAX_VALUE,o.session.remove(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:l("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(o){o.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:l("Ctrl-Delete","Alt-Delete"),exec:function(o){o.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:l("Shift-Tab","Shift-Tab"),exec:function(o){o.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:l("Tab","Tab"),exec:function(o){o.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:l("Ctrl-[","Ctrl-["),exec:function(o){o.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:l("Ctrl-]","Ctrl-]"),exec:function(o){o.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(o,i){o.insert(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(o,i){o.insert(Q.stringRepeat(i.text||"",i.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:l(null,"Ctrl-O"),exec:function(o){o.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:l("Alt-Shift-X","Ctrl-T"),exec:function(o){o.transposeLetters()},multiSelectAction:function(o){o.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:l("Ctrl-U","Ctrl-U"),exec:function(o){o.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:l("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(o){o.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:l(null,null),exec:function(o){o.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:l("Ctrl-Shift-L","Command-Shift-L"),exec:function(o){var i=o.selection.getRange();i.start.column=i.end.column=0,i.end.row++,o.selection.setRange(i,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:l("Ctrl+F3","F3"),exec:function(o){o.openLink()}},{name:"joinlines",description:"Join lines",bindKey:l(null,null),exec:function(o){for(var i=o.selection.isBackwards(),r=i?o.selection.getSelectionLead():o.selection.getSelectionAnchor(),t=i?o.selection.getSelectionAnchor():o.selection.getSelectionLead(),e=o.session.doc.getLine(r.row).length,n=o.session.doc.getTextRange(o.selection.getRange()),a=n.replace(/\n\s*/," ").length,d=o.session.doc.getLine(r.row),f=r.row+1;f<=t.row+1;f++){var xe=Q.stringTrimLeft(Q.stringTrimRight(o.session.doc.getLine(f)));xe.length!==0&&(xe=" "+xe),d+=xe}t.row+1<o.session.doc.getLength()-1&&(d+=o.session.doc.getNewLineCharacter()),o.clearSelection(),o.session.doc.replace(new M(r.row,0,t.row+2,0),d),a>0?(o.selection.moveCursorTo(r.row,r.column),o.selection.selectTo(r.row,r.column+a)):(e=o.session.doc.getLine(r.row).length>e?e+1:e,o.selection.moveCursorTo(r.row,e))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:l(null,null),exec:function(o){var i=o.session.doc.getLength()-1,r=o.session.doc.getLine(i).length,t=o.selection.rangeList.ranges,e=[];t.length<1&&(t=[o.selection.getRange()]);for(var n=0;n<t.length;n++)n==t.length-1&&(t[n].end.row===i&&t[n].end.column===r||e.push(new M(t[n].end.row,t[n].end.column,i,r))),n===0?t[n].start.row===0&&t[n].start.column===0||e.push(new M(0,0,t[n].start.row,t[n].start.column)):e.push(new M(t[n-1].end.row,t[n-1].end.column,t[n].start.row,t[n].start.column));o.exitMultiSelectMode(),o.clearSelection();for(var n=0;n<e.length;n++)o.selection.addRange(e[n],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(o){o.selection.clearSelection(),o.navigateLineEnd(),o.insert(`
202
+ `)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(o){o.selection.clearSelection();var i=o.getCursorPosition();o.selection.moveTo(i.row-1,Number.MAX_VALUE),o.insert(`
203
+ `),i.row===0&&o.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(o){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),o.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:l("F1","F1"),exec:function(o){o.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:l(null,null),exec:function(o){o.prompt({$type:"modes"})},readOnly:!0}];for(var u=1;u<9;u++)m.commands.push({name:"foldToLevel"+u,description:"Fold To Level "+u,level:u,exec:function(o){o.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(p,m,Gn){var Q=p("../lib/keys"),R=p("../mouse/default_gutter_handler").GutterTooltip,M=function(){function u(o){this.editor=o,this.gutterLayer=o.renderer.$gutterLayer,this.element=o.renderer.$gutter,this.lines=o.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new R(this.editor)}return u.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},u.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},u.prototype.$onGutterKeyDown=function(o){if(this.annotationTooltip.isOpen){o.preventDefault(),o.keyCode===Q.escape&&this.annotationTooltip.hideTooltip();return}if(o.target===this.element){if(o.keyCode!=Q.enter)return;o.preventDefault();var i=this.editor.getCursorPosition().row;this.editor.isRowVisible(i)||this.editor.scrollToLine(i,!0,!0),setTimeout((function(){var r=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),t=this.$findNearestFoldWidget(r),e=this.$findNearestAnnotation(r);if(!(t===null&&e===null)){if(t===null&&e!==null){this.activeRowIndex=e,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(t!==null&&e===null){this.activeRowIndex=t,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(e-r)<Math.abs(t-r)){this.activeRowIndex=e,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}else{this.activeRowIndex=t,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(o),setTimeout((function(){this.editor._signal("gutterkeydown",new l(o,this))}).bind(this),10)},u.prototype.$handleGutterKeyboardInteraction=function(o){if(o.keyCode===Q.tab){o.preventDefault();return}if(o.keyCode===Q.escape){o.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(o.keyCode===Q.up){switch(o.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(o.keyCode===Q.down){switch(o.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(o.keyCode===Q.left){o.preventDefault(),this.$switchLane("annotation");return}if(o.keyCode===Q.right){o.preventDefault(),this.$switchLane("fold");return}if(o.keyCode===Q.enter||o.keyCode===Q.space){switch(o.preventDefault(),this.activeLane){case"fold":if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="start"){var i=this.$rowIndexToRow(this.activeRowIndex);this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),o),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==i&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(i),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var r=this.lines.cells[this.activeRowIndex].element.childNodes[2],t=r.getBoundingClientRect(),e=this.annotationTooltip.getElement().style;e.left=t.right+"px",e.top=t.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},u.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},u.prototype.$isFoldWidgetVisible=function(o){var i=this.editor.isRowFullyVisible(this.$rowIndexToRow(o)),r=this.$getFoldWidget(o).style.display!=="none";return i&&r},u.prototype.$isAnnotationVisible=function(o){var i=this.editor.isRowFullyVisible(this.$rowIndexToRow(o)),r=this.$getAnnotation(o).style.display!=="none";return i&&r},u.prototype.$getFoldWidget=function(o){var i=this.lines.get(o),r=i.element;return r.childNodes[1]},u.prototype.$getAnnotation=function(o){var i=this.lines.get(o),r=i.element;return r.childNodes[2]},u.prototype.$findNearestFoldWidget=function(o){if(this.$isFoldWidgetVisible(o))return o;for(var i=0;o-i>0||o+i<this.lines.getLength()-1;){if(i++,o-i>=0&&this.$isFoldWidgetVisible(o-i))return o-i;if(o+i<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(o+i))return o+i}return null},u.prototype.$findNearestAnnotation=function(o){if(this.$isAnnotationVisible(o))return o;for(var i=0;o-i>0||o+i<this.lines.getLength()-1;){if(i++,o-i>=0&&this.$isAnnotationVisible(o-i))return o-i;if(o+i<=this.lines.getLength()-1&&this.$isAnnotationVisible(o+i))return o+i}return null},u.prototype.$focusFoldWidget=function(o){if(o!=null){var i=this.$getFoldWidget(o);i.classList.add(this.editor.renderer.keyboardFocusClassName),i.focus()}},u.prototype.$focusAnnotation=function(o){if(o!=null){var i=this.$getAnnotation(o);i.classList.add(this.editor.renderer.keyboardFocusClassName),i.focus()}},u.prototype.$blurFoldWidget=function(o){var i=this.$getFoldWidget(o);i.classList.remove(this.editor.renderer.keyboardFocusClassName),i.blur()},u.prototype.$blurAnnotation=function(o){var i=this.$getAnnotation(o);i.classList.remove(this.editor.renderer.keyboardFocusClassName),i.blur()},u.prototype.$moveFoldWidgetUp=function(){for(var o=this.activeRowIndex;o>0;)if(o--,this.$isFoldWidgetVisible(o)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=o,this.$focusFoldWidget(this.activeRowIndex);return}},u.prototype.$moveFoldWidgetDown=function(){for(var o=this.activeRowIndex;o<this.lines.getLength()-1;)if(o++,this.$isFoldWidgetVisible(o)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=o,this.$focusFoldWidget(this.activeRowIndex);return}},u.prototype.$moveAnnotationUp=function(){for(var o=this.activeRowIndex;o>0;)if(o--,this.$isAnnotationVisible(o)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=o,this.$focusAnnotation(this.activeRowIndex);return}},u.prototype.$moveAnnotationDown=function(){for(var o=this.activeRowIndex;o<this.lines.getLength()-1;)if(o++,this.$isAnnotationVisible(o)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=o,this.$focusAnnotation(this.activeRowIndex);return}},u.prototype.$switchLane=function(o){switch(o){case"annotation":if(this.activeLane==="annotation")break;var i=this.$findNearestAnnotation(this.activeRowIndex);if(i==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=i,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var r=this.$findNearestFoldWidget(this.activeRowIndex);if(r==null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=r,this.$focusFoldWidget(this.activeRowIndex);break}},u.prototype.$rowIndexToRow=function(o){var i=this.lines.get(o);return i?i.row:null},u.prototype.$rowToRowIndex=function(o){for(var i=0;i<this.lines.getLength();i++){var r=this.lines.get(i);if(r.row==o)return i}return null},u}();m.GutterKeyboardHandler=M;var l=function(){function u(o,i){this.gutterKeyboardHandler=i,this.domEvent=o}return u.prototype.getKey=function(){return Q.keyCodeToString(this.domEvent.keyCode)},u.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},u.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},u.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},u}();m.GutterKeyboardEvent=l}),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"],function(p,m,Gn){var Q=this&&this.__values||function(y){var h=typeof Symbol=="function"&&Symbol.iterator,w=h&&y[h],J=0;if(w)return w.call(y);if(y&&typeof y.length=="number")return{next:function(){return y&&J>=y.length&&(y=void 0),{value:y&&y[J++],done:!y}}};throw new TypeError(h?"Object is not iterable.":"Symbol.iterator is not defined.")},R=p("./lib/oop"),M=p("./lib/dom"),l=p("./lib/lang"),u=p("./lib/useragent"),o=p("./keyboard/textinput").TextInput,i=p("./mouse/mouse_handler").MouseHandler,r=p("./mouse/fold_handler").FoldHandler,t=p("./keyboard/keybinding").KeyBinding,e=p("./edit_session").EditSession,n=p("./search").Search,a=p("./range").Range,d=p("./lib/event_emitter").EventEmitter,f=p("./commands/command_manager").CommandManager,xe=p("./commands/default_commands").commands,F=p("./config"),_=p("./token_iterator").TokenIterator,S=p("./keyboard/gutter_handler").GutterKeyboardHandler,Ae=p("./config").nls,Vn=p("./clipboard"),Me=p("./lib/keys"),oe=function(){function y(h,w,J){this.session,this.$toDestroy=[];var He=h.getContainerElement();this.container=He,this.renderer=h,this.id="editor"+ ++y.$uid,this.commands=new f(u.isMac?"mac":"win",xe),typeof document=="object"&&(this.textInput=new o(h.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new i(this),new r(this)),this.keyBinding=new t(this),this.$search=new n().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=l.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(Kn,Qn){Qn._$emitInputEvent.schedule(31)}),this.setSession(w||J&&J.session||new e("")),F.resetOptions(this),J&&this.setOptions(J),F._signal("editor",this)}return y.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},y.prototype.startOperation=function(h){this.session.startOperation(h)},y.prototype.endOperation=function(h){this.session.endOperation(h)},y.prototype.onStartOperation=function(h){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,h||(this.previousCommand=null)},y.prototype.onEndOperation=function(h){if(this.curOp&&this.session){if(h&&h.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var w=this.curOp.command,J=w&&w.scrollIntoView;if(J){switch(J){case"center-animate":J="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var He=this.selection.getRange(),Kn=this.renderer.layerConfig;(He.start.row>=Kn.lastRow||He.end.row<=Kn.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}J=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},y.prototype.$historyTracker=function(h){if(this.$mergeUndoDeltas){var w=this.prevOp,J=this.$mergeableCommands,He=w.command&&h.command.name==w.command.name;if(h.command.name=="insertstring"){var Kn=h.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),He=He&&this.mergeNextCommand&&(!/\s/.test(Kn)||/\s/.test(w.args)),this.mergeNextCommand=!0}else He=He&&J.indexOf(h.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(He=!1),He?this.session.mergeUndoDeltas=!0:J.indexOf(h.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},y.prototype.setKeyboardHandler=function(h,w){if(h&&typeof h=="string"&&h!="ace"){this.$keybindingId=h;var J=this;F.loadModule(["keybinding",h],function(He){J.$keybindingId==h&&J.keyBinding.setKeyboardHandler(He&&He.handler),w&&w()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(h),w&&w()},y.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},y.prototype.setSession=function(h){if(this.session!=h){this.curOp&&this.endOperation(),this.curOp={};var w=this.session;if(w){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 J=this.session.getSelection();J.off("changeCursor",this.$onCursorChange),J.off("changeSelection",this.$onSelectionChange)}this.session=h,h?(this.$onDocumentChange=this.onDocumentChange.bind(this),h.on("change",this.$onDocumentChange),this.renderer.setSession(h),this.$onChangeMode=this.onChangeMode.bind(this),h.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),h.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),h.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),h.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),h.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),h.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=h.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(h)),this._signal("changeSession",{session:h,oldSession:w}),this.curOp=null,w&&w._signal("changeEditor",{oldEditor:this}),w&&(w.$editor=null),h&&h._signal("changeEditor",{editor:this}),h&&(h.$editor=this),h&&!h.destroyed&&h.bgTokenizer.scheduleStart()}},y.prototype.getSession=function(){return this.session},y.prototype.setValue=function(h,w){return this.session.doc.setValue(h),w?w==1?this.navigateFileEnd():w==-1&&this.navigateFileStart():this.selectAll(),h},y.prototype.getValue=function(){return this.session.getValue()},y.prototype.getSelection=function(){return this.selection},y.prototype.resize=function(h){this.renderer.onResize(h)},y.prototype.setTheme=function(h,w){this.renderer.setTheme(h,w)},y.prototype.getTheme=function(){return this.renderer.getTheme()},y.prototype.setStyle=function(h){this.renderer.setStyle(h)},y.prototype.unsetStyle=function(h){this.renderer.unsetStyle(h)},y.prototype.getFontSize=function(){return this.getOption("fontSize")||M.computedStyle(this.container).fontSize},y.prototype.setFontSize=function(h){this.setOption("fontSize",h)},y.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var h=this;this.$highlightPending=!0,setTimeout(function(){h.$highlightPending=!1;var w=h.session;if(!(!w||w.destroyed)){w.$bracketHighlight&&(w.$bracketHighlight.markerIds.forEach(function(Jn){w.removeMarker(Jn)}),w.$bracketHighlight=null);var J=h.getCursorPosition(),He=h.getKeyboardHandler(),Kn=He&&He.$getDirectionForHighlight&&He.$getDirectionForHighlight(h),Qn=w.getMatchingBracketRanges(J,Kn);if(!Qn){var Zn=new _(w,J.row,J.column),Xn=Zn.getCurrentToken();if(Xn&&/\b(?:tag-open|tag-name)/.test(Xn.type)){var ei=w.getMatchingTags(J);ei&&(Qn=[ei.openTagName.isEmpty()?ei.openTag:ei.openTagName,ei.closeTagName.isEmpty()?ei.closeTag:ei.closeTagName])}}if(!Qn&&w.$mode.getMatching&&(Qn=w.$mode.getMatching(h.session)),!Qn){h.getHighlightIndentGuides()&&h.renderer.$textLayer.$highlightIndentGuide();return}var ri="ace_bracket";Array.isArray(Qn)?Qn.length==1&&(ri="ace_error_bracket"):Qn=[Qn],Qn.length==2&&(a.comparePoints(Qn[0].end,Qn[1].start)==0?Qn=[a.fromPoints(Qn[0].start,Qn[1].end)]:a.comparePoints(Qn[0].start,Qn[1].end)==0&&(Qn=[a.fromPoints(Qn[1].start,Qn[0].end)])),w.$bracketHighlight={ranges:Qn,markerIds:Qn.map(function(Jn){return w.addMarker(Jn,ri,"text")})},h.getHighlightIndentGuides()&&h.renderer.$textLayer.$highlightIndentGuide()}},50)}},y.prototype.focus=function(){this.textInput.focus()},y.prototype.isFocused=function(){return this.textInput.isFocused()},y.prototype.blur=function(){this.textInput.blur()},y.prototype.onFocus=function(h){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",h))},y.prototype.onBlur=function(h){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",h))},y.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},y.prototype.onDocumentChange=function(h){var w=this.session.$useWrapMode,J=h.start.row==h.end.row?h.end.row:1/0;this.renderer.updateLines(h.start.row,J,w),this._signal("change",h),this.$cursorChange()},y.prototype.onTokenizerUpdate=function(h){var w=h.data;this.renderer.updateLines(w.first,w.last)},y.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},y.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},y.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},y.prototype.$updateHighlightActiveLine=function(){var h=this.getSession(),w;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(w=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(w=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(w=!1)),h.$highlightLineMarker&&!w)h.removeMarker(h.$highlightLineMarker.id),h.$highlightLineMarker=null;else if(!h.$highlightLineMarker&&w){var J=new a(w.row,w.column,w.row,1/0);J.id=h.addMarker(J,"ace_active-line","screenLine"),h.$highlightLineMarker=J}else w&&(h.$highlightLineMarker.start.row=w.row,h.$highlightLineMarker.end.row=w.row,h.$highlightLineMarker.start.column=w.column,h._signal("changeBackMarker"))},y.prototype.onSelectionChange=function(h){var w=this.session;if(w.$selectionMarker&&w.removeMarker(w.$selectionMarker),w.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var J=this.selection.getRange(),He=this.getSelectionStyle();w.$selectionMarker=w.addMarker(J,"ace_selection",He)}var Kn=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(Kn),this._signal("changeSelection")},y.prototype.$getSelectionHighLightRegexp=function(){var h=this.session,w=this.getSelectionRange();if(!(w.isEmpty()||w.isMultiLine())){var J=w.start.column,He=w.end.column,Kn=h.getLine(w.start.row),Qn=Kn.substring(J,He);if(!(Qn.length>5e3||!/[\w\d]/.test(Qn))){var Zn=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:Qn}),Xn=Kn.substring(J-1,He+1);if(Zn.test(Xn))return Zn}}},y.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},y.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},y.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},y.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},y.prototype.onChangeMode=function(h){this.renderer.updateText(),this._emit("changeMode",h)},y.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},y.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},y.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},y.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},y.prototype.getCopyText=function(){var h=this.getSelectedText(),w=this.session.doc.getNewLineCharacter(),J=!1;if(!h&&this.$copyWithEmptySelection){J=!0;for(var He=this.selection.getAllRanges(),Kn=0;Kn<He.length;Kn++){var Qn=He[Kn];Kn&&He[Kn-1].start.row==Qn.start.row||(h+=this.session.getLine(Qn.start.row)+w)}}var Zn={text:h};return this._signal("copy",Zn),Vn.lineMode=J?Zn.text:!1,Zn.text},y.prototype.onCopy=function(){this.commands.exec("copy",this)},y.prototype.onCut=function(){this.commands.exec("cut",this)},y.prototype.onPaste=function(h,w){var J={text:h,event:w};this.commands.exec("paste",this,J)},y.prototype.$handlePaste=function(h){typeof h=="string"&&(h={text:h}),this._signal("paste",h);var w=h.text,J=w===Vn.lineMode,He=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)J?He.insert({row:this.selection.lead.row,column:0},w):this.insert(w);else if(J)this.selection.rangeList.ranges.forEach(function(ri){He.insert({row:ri.start.row,column:0},w)});else{var Kn=w.split(/\r\n|\r|\n/),Qn=this.selection.rangeList.ranges,Zn=Kn.length==2&&(!Kn[0]||!Kn[1]);if(Kn.length!=Qn.length||Zn)return this.commands.exec("insertstring",this,w);for(var Xn=Qn.length;Xn--;){var ei=Qn[Xn];ei.isEmpty()||He.remove(ei),He.insert(ei.start,Kn[Xn])}}},y.prototype.execCommand=function(h,w){return this.commands.exec(h,this,w)},y.prototype.insert=function(h,w){var J=this.session,He=J.getMode(),Kn=this.getCursorPosition();if(this.getBehavioursEnabled()&&!w){var Qn=He.transformAction(J.getState(Kn.row),"insertion",this,J,h);Qn&&(h!==Qn.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),h=Qn.text)}if(h==" "&&(h=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&h.indexOf(`
204
+ `)==-1){var Zn=a.fromPoints(Kn,Kn);Zn.end.column+=h.length,this.session.remove(Zn)}}else{var Zn=this.getSelectionRange();Kn=this.session.remove(Zn),this.clearSelection()}if(h==`
205
+ `||h==`\r
206
+ `){var Jn=J.getLine(Kn.row);if(Kn.column>Jn.search(/\S|$/)){var Xn=Jn.substr(Kn.column).search(/\S|$/);J.doc.removeInLine(Kn.row,Kn.column,Kn.column+Xn)}}this.clearSelection();var ei=Kn.column,ri=J.getState(Kn.row),Jn=J.getLine(Kn.row),ti=He.checkOutdent(ri,Jn,h);if(J.insert(Kn,h),Qn&&Qn.selection&&(Qn.selection.length==2?this.selection.setSelectionRange(new a(Kn.row,ei+Qn.selection[0],Kn.row,ei+Qn.selection[1])):this.selection.setSelectionRange(new a(Kn.row+Qn.selection[0],Qn.selection[1],Kn.row+Qn.selection[2],Qn.selection[3]))),this.$enableAutoIndent){if(J.getDocument().isNewLine(h)){var ii=He.getNextLineIndent(ri,Jn.slice(0,Kn.column),J.getTabString());J.insert({row:Kn.row+1,column:0},ii)}ti&&He.autoOutdent(ri,J,Kn.row)}},y.prototype.autoIndent=function(){for(var h=this.session,w=h.getMode(),J=this.selection.isEmpty()?[new a(0,0,h.doc.getLength()-1,0)]:this.selection.getAllRanges(),He="",Kn="",Qn="",Zn=h.getTabString(),Xn=0;Xn<J.length;Xn++)for(var ei=J[Xn].start.row,ri=J[Xn].end.row,Jn=ei;Jn<=ri;Jn++){Jn>0&&(He=h.getState(Jn-1),Kn=h.getLine(Jn-1),Qn=w.getNextLineIndent(He,Kn,Zn));var ti=h.getLine(Jn),ii=w.$getIndent(ti);if(Qn!==ii){if(ii.length>0){var ni=new a(Jn,0,Jn,ii.length);h.remove(ni)}Qn.length>0&&h.insert({row:Jn,column:0},Qn)}w.autoOutdent(He,h,Jn)}},y.prototype.onTextInput=function(h,w){if(!w)return this.keyBinding.onTextInput(h);this.startOperation({command:{name:"insertstring"}});var J=this.applyComposition.bind(this,h,w);this.selection.rangeCount?this.forEachSelection(J):J(),this.endOperation()},y.prototype.applyComposition=function(h,w){if(w.extendLeft||w.extendRight){var J=this.selection.getRange();J.start.column-=w.extendLeft,J.end.column+=w.extendRight,J.start.column<0&&(J.start.row--,J.start.column+=this.session.getLine(J.start.row).length+1),this.selection.setRange(J),!h&&!J.isEmpty()&&this.remove()}if((h||!this.selection.isEmpty())&&this.insert(h,!0),w.restoreStart||w.restoreEnd){var J=this.selection.getRange();J.start.column-=w.restoreStart,J.end.column-=w.restoreEnd,this.selection.setRange(J)}},y.prototype.onCommandKey=function(h,w,J){return this.keyBinding.onCommandKey(h,w,J)},y.prototype.setOverwrite=function(h){this.session.setOverwrite(h)},y.prototype.getOverwrite=function(){return this.session.getOverwrite()},y.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},y.prototype.setScrollSpeed=function(h){this.setOption("scrollSpeed",h)},y.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},y.prototype.setDragDelay=function(h){this.setOption("dragDelay",h)},y.prototype.getDragDelay=function(){return this.getOption("dragDelay")},y.prototype.setSelectionStyle=function(h){this.setOption("selectionStyle",h)},y.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},y.prototype.setHighlightActiveLine=function(h){this.setOption("highlightActiveLine",h)},y.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},y.prototype.setHighlightGutterLine=function(h){this.setOption("highlightGutterLine",h)},y.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},y.prototype.setHighlightSelectedWord=function(h){this.setOption("highlightSelectedWord",h)},y.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},y.prototype.setAnimatedScroll=function(h){this.renderer.setAnimatedScroll(h)},y.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},y.prototype.setShowInvisibles=function(h){this.renderer.setShowInvisibles(h)},y.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},y.prototype.setDisplayIndentGuides=function(h){this.renderer.setDisplayIndentGuides(h)},y.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},y.prototype.setHighlightIndentGuides=function(h){this.renderer.setHighlightIndentGuides(h)},y.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},y.prototype.setShowPrintMargin=function(h){this.renderer.setShowPrintMargin(h)},y.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},y.prototype.setPrintMarginColumn=function(h){this.renderer.setPrintMarginColumn(h)},y.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},y.prototype.setReadOnly=function(h){this.setOption("readOnly",h)},y.prototype.getReadOnly=function(){return this.getOption("readOnly")},y.prototype.setBehavioursEnabled=function(h){this.setOption("behavioursEnabled",h)},y.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},y.prototype.setWrapBehavioursEnabled=function(h){this.setOption("wrapBehavioursEnabled",h)},y.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},y.prototype.setShowFoldWidgets=function(h){this.setOption("showFoldWidgets",h)},y.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},y.prototype.setFadeFoldWidgets=function(h){this.setOption("fadeFoldWidgets",h)},y.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},y.prototype.remove=function(h){this.selection.isEmpty()&&(h=="left"?this.selection.selectLeft():this.selection.selectRight());var w=this.getSelectionRange();if(this.getBehavioursEnabled()){var J=this.session,He=J.getState(w.start.row),Kn=J.getMode().transformAction(He,"deletion",this,J,w);if(w.end.column===0){var Qn=J.getTextRange(w);if(Qn[Qn.length-1]==`
207
+ `){var Zn=J.getLine(w.end.row);/^\s+$/.test(Zn)&&(w.end.column=Zn.length)}}Kn&&(w=Kn)}this.session.remove(w),this.clearSelection()},y.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},y.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},y.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},y.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var h=this.getSelectionRange();h.start.column==h.end.column&&h.start.row==h.end.row&&(h.end.column=0,h.end.row++),this.session.remove(h),this.clearSelection()},y.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var h=this.getCursorPosition();this.insert(`
208
+ `),this.moveCursorToPosition(h)},y.prototype.setGhostText=function(h,w){this.renderer.setGhostText(h,w)},y.prototype.removeGhostText=function(){this.renderer.removeGhostText()},y.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var h=this.getCursorPosition(),w=h.column;if(w!==0){var J=this.session.getLine(h.row),He,Kn;w<J.length?(He=J.charAt(w)+J.charAt(w-1),Kn=new a(h.row,w-1,h.row,w+1)):(He=J.charAt(w-1)+J.charAt(w-2),Kn=new a(h.row,w-2,h.row,w)),this.session.replace(Kn,He),this.session.selection.moveToPosition(Kn.end)}}},y.prototype.toLowerCase=function(){var h=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var w=this.getSelectionRange(),J=this.session.getTextRange(w);this.session.replace(w,J.toLowerCase()),this.selection.setSelectionRange(h)},y.prototype.toUpperCase=function(){var h=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var w=this.getSelectionRange(),J=this.session.getTextRange(w);this.session.replace(w,J.toUpperCase()),this.selection.setSelectionRange(h)},y.prototype.indent=function(){var h=this.session,w=this.getSelectionRange();if(w.start.row<w.end.row){var J=this.$getSelectedRows();h.indentRows(J.first,J.last," ");return}else if(w.start.column<w.end.column){var He=h.getTextRange(w);if(!/^\s+$/.test(He)){var J=this.$getSelectedRows();h.indentRows(J.first,J.last," ");return}}var Kn=h.getLine(w.start.row),Qn=w.start,Zn=h.getTabSize(),Xn=h.documentToScreenColumn(Qn.row,Qn.column);if(this.session.getUseSoftTabs())var ei=Zn-Xn%Zn,ri=l.stringRepeat(" ",ei);else{for(var ei=Xn%Zn;Kn[w.start.column-1]==" "&&ei;)w.start.column--,ei--;this.selection.setSelectionRange(w),ri=" "}return this.insert(ri)},y.prototype.blockIndent=function(){var h=this.$getSelectedRows();this.session.indentRows(h.first,h.last," ")},y.prototype.blockOutdent=function(){var h=this.session.getSelection();this.session.outdentRows(h.getRange())},y.prototype.sortLines=function(){for(var h=this.$getSelectedRows(),w=this.session,J=[],He=h.first;He<=h.last;He++)J.push(w.getLine(He));J.sort(function(Zn,Xn){return Zn.toLowerCase()<Xn.toLowerCase()?-1:Zn.toLowerCase()>Xn.toLowerCase()?1:0});for(var Kn=new a(0,0,0,0),He=h.first;He<=h.last;He++){var Qn=w.getLine(He);Kn.start.row=He,Kn.end.row=He,Kn.end.column=Qn.length,w.replace(Kn,J[He-h.first])}},y.prototype.toggleCommentLines=function(){var h=this.session.getState(this.getCursorPosition().row),w=this.$getSelectedRows();this.session.getMode().toggleCommentLines(h,this.session,w.first,w.last)},y.prototype.toggleBlockComment=function(){var h=this.getCursorPosition(),w=this.session.getState(h.row),J=this.getSelectionRange();this.session.getMode().toggleBlockComment(w,this.session,J,h)},y.prototype.getNumberAt=function(h,w){var J=/[\-]?[0-9]+(?:\.[0-9]+)?/g;J.lastIndex=0;for(var He=this.session.getLine(h);J.lastIndex<w;){var Kn=J.exec(He);if(Kn.index<=w&&Kn.index+Kn[0].length>=w){var Qn={value:Kn[0],start:Kn.index,end:Kn.index+Kn[0].length};return Qn}}return null},y.prototype.modifyNumber=function(h){var w=this.selection.getCursor().row,J=this.selection.getCursor().column,He=new a(w,J-1,w,J),Kn=this.session.getTextRange(He);if(!isNaN(parseFloat(Kn))&&isFinite(Kn)){var Qn=this.getNumberAt(w,J);if(Qn){var Zn=Qn.value.indexOf(".")>=0?Qn.start+Qn.value.indexOf(".")+1:Qn.end,Xn=Qn.start+Qn.value.length-Zn,ei=parseFloat(Qn.value);ei*=Math.pow(10,Xn),Zn!==Qn.end&&J<Zn?h*=Math.pow(10,Qn.end-J-1):h*=Math.pow(10,Qn.end-J),ei+=h,ei/=Math.pow(10,Xn);var ri=ei.toFixed(Xn),Jn=new a(w,Qn.start,w,Qn.end);this.session.replace(Jn,ri),this.moveCursorTo(w,Math.max(Qn.start+1,J+ri.length-Qn.value.length))}}else this.toggleWord()},y.prototype.toggleWord=function(){var h=this.selection.getCursor().row,w=this.selection.getCursor().column;this.selection.selectWord();var J=this.getSelectedText(),He=this.selection.getWordRange().start.column,Kn=J.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),Qn=w-He-1;Qn<0&&(Qn=0);var Zn=0,Xn=0,ei=this;J.match(/[A-Za-z0-9_]+/)&&Kn.forEach(function(ai,ui){Xn=Zn+ai.length,Qn>=Zn&&Qn<=Xn&&(J=ai,ei.selection.clearSelection(),ei.moveCursorTo(h,Zn+He),ei.selection.selectTo(h,Xn+He)),Zn=Xn});for(var ri=this.$toggleWordPairs,Jn,ti=0;ti<ri.length;ti++)for(var ii=ri[ti],ni=0;ni<=1;ni++){var si=+!ni,li=J.match(new RegExp("^\\s?_?("+l.escapeRegExp(ii[ni])+")\\s?$","i"));if(li){var ci=J.match(new RegExp("([_]|^|\\s)("+l.escapeRegExp(li[1])+")($|\\s)","g"));ci&&(Jn=J.replace(new RegExp(l.escapeRegExp(ii[ni]),"i"),function(ai){var ui=ii[si];return ai.toUpperCase()==ai?ui=ui.toUpperCase():ai.charAt(0).toUpperCase()==ai.charAt(0)&&(ui=ui.substr(0,0)+ii[si].charAt(0).toUpperCase()+ui.substr(1)),ui}),this.insert(Jn),Jn="")}}},y.prototype.findLinkAt=function(h,w){var J,He,Kn=this.session.getLine(h),Qn=Kn.split(/((?:https?|ftp):\/\/[\S]+)/),Zn=w;Zn<0&&(Zn=0);var Xn=0,ei=0,ri;try{for(var Jn=Q(Qn),ti=Jn.next();!ti.done;ti=Jn.next()){var ii=ti.value;if(ei=Xn+ii.length,Zn>=Xn&&Zn<=ei&&ii.match(/((?:https?|ftp):\/\/[\S]+)/)){ri=ii.replace(/[\s:.,'";}\]]+$/,"");break}Xn=ei}}catch(ni){J={error:ni}}finally{try{ti&&!ti.done&&(He=Jn.return)&&He.call(Jn)}finally{if(J)throw J.error}}return ri},y.prototype.openLink=function(){var h=this.selection.getCursor(),w=this.findLinkAt(h.row,h.column);return w&&window.open(w,"_blank"),w!=null},y.prototype.removeLines=function(){var h=this.$getSelectedRows();this.session.removeFullLines(h.first,h.last),this.clearSelection()},y.prototype.duplicateSelection=function(){var h=this.selection,w=this.session,J=h.getRange(),He=h.isBackwards();if(J.isEmpty()){var Kn=J.start.row;w.duplicateLines(Kn,Kn)}else{var Qn=He?J.start:J.end,Zn=w.insert(Qn,w.getTextRange(J));J.start=Qn,J.end=Zn,h.setSelectionRange(J,He)}},y.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},y.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},y.prototype.moveText=function(h,w,J){return this.session.moveText(h,w,J)},y.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},y.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},y.prototype.$moveLines=function(h,w){var J,He,Kn=this.selection;if(!Kn.inMultiSelectMode||this.inVirtualSelectionMode){var Qn=Kn.toOrientedRange();J=this.$getSelectedRows(Qn),He=this.session.$moveLines(J.first,J.last,w?0:h),w&&h==-1&&(He=0),Qn.moveBy(He,0),Kn.fromOrientedRange(Qn)}else{var Zn=Kn.rangeList.ranges;Kn.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var Xn=0,ei=0,ri=Zn.length,Jn=0;Jn<ri;Jn++){var ti=Jn;Zn[Jn].moveBy(Xn,0),J=this.$getSelectedRows(Zn[Jn]);for(var ii=J.first,ni=J.last;++Jn<ri;){ei&&Zn[Jn].moveBy(ei,0);var si=this.$getSelectedRows(Zn[Jn]);if(w&&si.first!=ni)break;if(!w&&si.first>ni+1)break;ni=si.last}for(Jn--,Xn=this.session.$moveLines(ii,ni,w?0:h),w&&h==-1&&(ti=Jn+1);ti<=Jn;)Zn[ti].moveBy(Xn,0),ti++;w||(Xn=0),ei+=Xn}Kn.fromOrientedRange(Kn.ranges[0]),Kn.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},y.prototype.$getSelectedRows=function(h){return h=(h||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(h.start.row),last:this.session.getRowFoldEnd(h.end.row)}},y.prototype.onCompositionStart=function(h){this.renderer.showComposition(h)},y.prototype.onCompositionUpdate=function(h){this.renderer.setCompositionText(h)},y.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},y.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},y.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},y.prototype.isRowVisible=function(h){return h>=this.getFirstVisibleRow()&&h<=this.getLastVisibleRow()},y.prototype.isRowFullyVisible=function(h){return h>=this.renderer.getFirstFullyVisibleRow()&&h<=this.renderer.getLastFullyVisibleRow()},y.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},y.prototype.$moveByPage=function(h,w){var J=this.renderer,He=this.renderer.layerConfig,Kn=h*Math.floor(He.height/He.lineHeight);w===!0?this.selection.$moveSelection(function(){this.moveCursorBy(Kn,0)}):w===!1&&(this.selection.moveCursorBy(Kn,0),this.selection.clearSelection());var Qn=J.scrollTop;J.scrollBy(0,Kn*He.lineHeight),w!=null&&J.scrollCursorIntoView(null,.5),J.animateScrolling(Qn)},y.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},y.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},y.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},y.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},y.prototype.scrollPageDown=function(){this.$moveByPage(1)},y.prototype.scrollPageUp=function(){this.$moveByPage(-1)},y.prototype.scrollToRow=function(h){this.renderer.scrollToRow(h)},y.prototype.scrollToLine=function(h,w,J,He){this.renderer.scrollToLine(h,w,J,He)},y.prototype.centerSelection=function(){var h=this.getSelectionRange(),w={row:Math.floor(h.start.row+(h.end.row-h.start.row)/2),column:Math.floor(h.start.column+(h.end.column-h.start.column)/2)};this.renderer.alignCursor(w,.5)},y.prototype.getCursorPosition=function(){return this.selection.getCursor()},y.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},y.prototype.getSelectionRange=function(){return this.selection.getRange()},y.prototype.selectAll=function(){this.selection.selectAll()},y.prototype.clearSelection=function(){this.selection.clearSelection()},y.prototype.moveCursorTo=function(h,w){this.selection.moveCursorTo(h,w)},y.prototype.moveCursorToPosition=function(h){this.selection.moveCursorToPosition(h)},y.prototype.jumpToMatching=function(h,w){var J=this.getCursorPosition(),He=new _(this.session,J.row,J.column),Kn=He.getCurrentToken(),Qn=0;Kn&&Kn.type.indexOf("tag-name")!==-1&&(Kn=He.stepBackward());var Zn=Kn||He.stepForward();if(Zn){var Xn,ei=!1,ri={},Jn=J.column-Zn.start,ti,ii={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(Zn.value.match(/[{}()\[\]]/g)){for(;Jn<Zn.value.length&&!ei;Jn++)if(ii[Zn.value[Jn]])switch(ti=ii[Zn.value[Jn]]+"."+Zn.type.replace("rparen","lparen"),isNaN(ri[ti])&&(ri[ti]=0),Zn.value[Jn]){case"(":case"[":case"{":ri[ti]++;break;case")":case"]":case"}":ri[ti]--,ri[ti]===-1&&(Xn="bracket",ei=!0);break}}else Zn.type.indexOf("tag-name")!==-1&&(isNaN(ri[Zn.value])&&(ri[Zn.value]=0),Kn.value==="<"&&Qn>1?ri[Zn.value]++:Kn.value==="</"&&ri[Zn.value]--,ri[Zn.value]===-1&&(Xn="tag",ei=!0));ei||(Kn=Zn,Qn++,Zn=He.stepForward(),Jn=0)}while(Zn&&!ei);if(Xn){var ni,si;if(Xn==="bracket")ni=this.session.getBracketRange(J),ni||(ni=new a(He.getCurrentTokenRow(),He.getCurrentTokenColumn()+Jn-1,He.getCurrentTokenRow(),He.getCurrentTokenColumn()+Jn-1),si=ni.start,(w||si.row===J.row&&Math.abs(si.column-J.column)<2)&&(ni=this.session.getBracketRange(si)));else if(Xn==="tag"){if(!Zn||Zn.type.indexOf("tag-name")===-1)return;if(ni=new a(He.getCurrentTokenRow(),He.getCurrentTokenColumn()-2,He.getCurrentTokenRow(),He.getCurrentTokenColumn()-2),ni.compare(J.row,J.column)===0){var li=this.session.getMatchingTags(J);li&&(li.openTag.contains(J.row,J.column)?(ni=li.closeTag,si=ni.start):(ni=li.openTag,li.closeTag.start.row===J.row&&li.closeTag.start.column===J.column?si=ni.end:si=ni.start))}si=si||ni.start}si=ni&&ni.cursor||si,si&&(h?ni&&w?this.selection.setRange(ni):ni&&ni.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(si.row,si.column):this.selection.moveTo(si.row,si.column))}}},y.prototype.gotoLine=function(h,w,J){this.selection.clearSelection(),this.session.unfold({row:h-1,column:w||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(h-1,w||0),this.isRowFullyVisible(h-1)||this.scrollToLine(h-1,!0,J)},y.prototype.navigateTo=function(h,w){this.selection.moveTo(h,w)},y.prototype.navigateUp=function(h){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var w=this.selection.anchor.getPosition();return this.moveCursorToPosition(w)}this.selection.clearSelection(),this.selection.moveCursorBy(-h||-1,0)},y.prototype.navigateDown=function(h){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var w=this.selection.anchor.getPosition();return this.moveCursorToPosition(w)}this.selection.clearSelection(),this.selection.moveCursorBy(h||1,0)},y.prototype.navigateLeft=function(h){if(this.selection.isEmpty())for(h=h||1;h--;)this.selection.moveCursorLeft();else{var w=this.getSelectionRange().start;this.moveCursorToPosition(w)}this.clearSelection()},y.prototype.navigateRight=function(h){if(this.selection.isEmpty())for(h=h||1;h--;)this.selection.moveCursorRight();else{var w=this.getSelectionRange().end;this.moveCursorToPosition(w)}this.clearSelection()},y.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},y.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},y.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},y.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},y.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},y.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},y.prototype.replace=function(h,w){w&&this.$search.set(w);var J=this.$search.find(this.session),He=0;return J&&(this.$tryReplace(J,h)&&(He=1),this.selection.setSelectionRange(J),this.renderer.scrollSelectionIntoView(J.start,J.end)),He},y.prototype.replaceAll=function(h,w){w&&this.$search.set(w);var J=this.$search.findAll(this.session),He=0;if(!J.length)return He;var Kn=this.getSelectionRange();this.selection.moveTo(0,0);for(var Qn=J.length-1;Qn>=0;--Qn)this.$tryReplace(J[Qn],h)&&He++;return this.selection.setSelectionRange(Kn),He},y.prototype.$tryReplace=function(h,w){var J=this.session.getTextRange(h);return w=this.$search.replace(J,w),w!==null?(h.end=this.session.replace(h,w),h):null},y.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},y.prototype.find=function(h,w,J){w||(w={}),typeof h=="string"||h instanceof RegExp?w.needle=h:typeof h=="object"&&R.mixin(w,h);var He=this.selection.getRange();w.needle==null&&(h=this.session.getTextRange(He)||this.$search.$options.needle,h||(He=this.session.getWordRange(He.start.row,He.start.column),h=this.session.getTextRange(He)),this.$search.set({needle:h})),this.$search.set(w),w.start||this.$search.set({start:He});var Kn=this.$search.find(this.session);if(w.preventScroll)return Kn;if(Kn)return this.revealRange(Kn,J),Kn;w.backwards?He.start=He.end:He.end=He.start,this.selection.setRange(He)},y.prototype.findNext=function(h,w){this.find({skipCurrent:!0,backwards:!1},h,w)},y.prototype.findPrevious=function(h,w){this.find(h,{skipCurrent:!0,backwards:!0},w)},y.prototype.revealRange=function(h,w){this.session.unfold(h),this.selection.setSelectionRange(h);var J=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(h.start,h.end,.5),w!==!1&&this.renderer.animateScrolling(J)},y.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},y.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},y.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(h){h.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},y.prototype.setAutoScrollEditorIntoView=function(h){if(h){var w,J=this,He=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var Kn=this.$scrollAnchor;Kn.style.cssText="position:absolute",this.container.insertBefore(Kn,this.container.firstChild);var Qn=this.on("changeSelection",function(){He=!0}),Zn=this.renderer.on("beforeRender",function(){He&&(w=J.renderer.container.getBoundingClientRect())}),Xn=this.renderer.on("afterRender",function(){if(He&&w&&(J.isFocused()||J.searchBox&&J.searchBox.isFocused())){var ei=J.renderer,ri=ei.$cursorLayer.$pixelPos,Jn=ei.layerConfig,ti=ri.top-Jn.offset;ri.top>=0&&ti+w.top<0?He=!0:ri.top<Jn.height&&ri.top+w.top+Jn.lineHeight>window.innerHeight?He=!1:He=null,He!=null&&(Kn.style.top=ti+"px",Kn.style.left=ri.left+"px",Kn.style.height=Jn.lineHeight+"px",Kn.scrollIntoView(He)),He=w=null}});this.setAutoScrollEditorIntoView=function(ei){ei||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",Qn),this.renderer.off("afterRender",Xn),this.renderer.off("beforeRender",Zn))}}},y.prototype.$resetCursorStyle=function(){var h=this.$cursorStyle||"ace",w=this.renderer.$cursorLayer;w&&(w.setSmoothBlinking(/smooth/.test(h)),w.isBlinking=!this.$readOnly&&h!="wide",M.setCssClass(w.element,"ace_slim-cursors",/slim/.test(h)))},y.prototype.prompt=function(h,w,J){var He=this;F.loadModule("ace/ext/prompt",function(Kn){Kn.prompt(He,h,w,J)})},y}();oe.$uid=0,oe.prototype.curOp=null,oe.prototype.prevOp={},oe.prototype.$mergeableCommands=["backspace","del","insertstring"],oe.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"],["&&","||"],["==","!="]],R.implement(oe.prototype,d),F.defineOptions(oe.prototype,"editor",{selectionStyle:{set:function(y){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:y})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(y){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(y){this.textInput.setReadOnly(y),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(y){this.textInput.setCopyWithEmptySelection(y)},initialValue:!1},cursorStyle:{set:function(y){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(y){this.setAutoScrollEditorIntoView(y)}},keyboardHandler:{set:function(y){this.setKeyboardHandler(y)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(y){this.session.setValue(y)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(y){this.setSession(y)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(y){this.renderer.$gutterLayer.setShowLineNumbers(y),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),y&&this.$relativeLineNumbers?Yn.attach(this):Yn.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(y){this.$showLineNumbers&&y?Yn.attach(this):Yn.detach(this)}},placeholder:{set:function(y){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var h=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(h&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),M.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!h&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),M.addCssClass(this.container,"ace_hasPlaceholder");var w=M.createElement("div");w.className="ace_placeholder",w.textContent=this.$placeholder||"",this.renderer.placeholderNode=w,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!h&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(y){var h={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(He){He.blur(),He.renderer.scroller.focus()},readOnly:!0},w=function(He){if(He.target==this.renderer.scroller&&He.keyCode===Me.enter){He.preventDefault();var Kn=this.getCursorPosition().row;this.isRowVisible(Kn)||this.scrollToLine(Kn,!0,!0),this.focus()}},J;y?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(u.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",Ae("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",Ae("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",w.bind(this)),this.commands.addCommand(h),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",Ae("editor.gutter.aria-roledescription","editor")),this.renderer.$gutter.setAttribute("aria-label",Ae("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),J||(J=new S(this)),J.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",w.bind(this)),this.commands.removeCommand(h),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),J&&J.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(y){this.$textInputAriaLabel=y},initialValue:""},enableMobileMenu:{set:function(y){this.$enableMobileMenu=y},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var Yn={getText:function(y,h){return(Math.abs(y.selection.lead.row-h)||h+1+(h<9?"·":""))+""},getWidth:function(y,h,w){return Math.max(h.toString().length,(w.lastRow+1).toString().length,2)*w.characterWidth},update:function(y,h){h.renderer.$loop.schedule(h.renderer.CHANGE_GUTTER)},attach:function(y){y.renderer.$gutterLayer.$renderer=this,y.on("changeSelection",this.update),this.update(null,y)},detach:function(y){y.renderer.$gutterLayer.$renderer==this&&(y.renderer.$gutterLayer.$renderer=null),y.off("changeSelection",this.update),this.update(null,y)}};m.Editor=oe}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(p,m,Gn){var Q=p("../lib/dom"),R=function(){function M(l,u){this.element=l,this.canvasHeight=u||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return M.prototype.moveContainer=function(l){Q.translate(this.element,0,-(l.firstRowScreen*l.lineHeight%this.canvasHeight)-l.offset*this.$offsetCoefficient)},M.prototype.pageChanged=function(l,u){return Math.floor(l.firstRowScreen*l.lineHeight/this.canvasHeight)!==Math.floor(u.firstRowScreen*u.lineHeight/this.canvasHeight)},M.prototype.computeLineTop=function(l,u,o){var i=u.firstRowScreen*u.lineHeight,r=Math.floor(i/this.canvasHeight),t=o.documentToScreenRow(l,0)*u.lineHeight;return t-r*this.canvasHeight},M.prototype.computeLineHeight=function(l,u,o){return u.lineHeight*o.getRowLineCount(l)},M.prototype.getLength=function(){return this.cells.length},M.prototype.get=function(l){return this.cells[l]},M.prototype.shift=function(){this.$cacheCell(this.cells.shift())},M.prototype.pop=function(){this.$cacheCell(this.cells.pop())},M.prototype.push=function(l){if(Array.isArray(l)){this.cells.push.apply(this.cells,l);for(var u=Q.createFragment(this.element),o=0;o<l.length;o++)u.appendChild(l[o].element);this.element.appendChild(u)}else this.cells.push(l),this.element.appendChild(l.element)},M.prototype.unshift=function(l){if(Array.isArray(l)){this.cells.unshift.apply(this.cells,l);for(var u=Q.createFragment(this.element),o=0;o<l.length;o++)u.appendChild(l[o].element);this.element.firstChild?this.element.insertBefore(u,this.element.firstChild):this.element.appendChild(u)}else this.cells.unshift(l),this.element.insertAdjacentElement("afterbegin",l.element)},M.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},M.prototype.$cacheCell=function(l){l&&(l.element.remove(),this.cellCache.push(l))},M.prototype.createCell=function(l,u,o,i){var r=this.cellCache.pop();if(!r){var t=Q.createElement("div");i&&i(t),this.element.appendChild(t),r={element:t,text:"",row:l}}return r.row=l,r},M}();m.Lines=R}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(p,m,Gn){var Q=p("../lib/dom"),R=p("../lib/oop"),M=p("../lib/lang"),l=p("../lib/event_emitter").EventEmitter,u=p("./lines").Lines,o=p("../config").nls,i=function(){function t(e){this.element=Q.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new u(this.element),this.$lines.$offsetCoefficient=1}return t.prototype.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},t.prototype.addGutterDecoration=function(e,n){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,n)},t.prototype.removeGutterDecoration=function(e,n){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,n)},t.prototype.setAnnotations=function(e){this.$annotations=[];for(var n=0;n<e.length;n++){var a=e[n],d=a.row,f=this.$annotations[d];f||(f=this.$annotations[d]={text:[],type:[],displayText:[]});var xe=a.text,F=a.text,_=a.type;xe=xe?M.escapeHTML(xe):a.html||"",F=F||a.html||"",f.text.indexOf(xe)===-1&&(f.text.push(xe),f.type.push(_),f.displayText.push(F));var S=a.className;S?f.className=S:_==="error"?f.className=" ace_error":_==="security"&&!/\bace_error\b/.test(f.className)?f.className=" ace_security":_==="warning"&&!/\bace_(error|security)\b/.test(f.className)?f.className=" ace_warning":_==="info"&&!f.className?f.className=" ace_info":_==="hint"&&!f.className&&(f.className=" ace_hint")}},t.prototype.$updateAnnotations=function(e){if(this.$annotations.length){var n=e.start.row,a=e.end.row-n;if(a!==0)if(e.action=="remove")this.$annotations.splice(n,a+1,null);else{var d=new Array(a+1);d.unshift(n,1),this.$annotations.splice.apply(this.$annotations,d)}}},t.prototype.update=function(e){this.config=e;var n=this.session,a=e.firstRow,d=Math.min(e.lastRow+e.gutterOffset,n.getLength()-1);this.oldLastRow=d,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var f=n.getNextFoldLine(a),xe=f?f.start.row:1/0,F=null,_=-1,S=a;;){if(S>xe&&(S=f.end.row+1,f=n.getNextFoldLine(S,f),xe=f?f.start.row:1/0),S>d){for(;this.$lines.getLength()>_+1;)this.$lines.pop();break}F=this.$lines.get(++_),F?F.row=S:(F=this.$lines.createCell(S,e,this.session,r),this.$lines.push(F)),this.$renderCell(F,e,f,S),S++}this._signal("afterRender"),this.$updateGutterWidth(e)},t.prototype.$updateGutterWidth=function(e){var n=this.session,a=n.gutterRenderer||this.$renderer,d=n.$firstLineNumber,f=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||n.$useWrapMode)&&(f=n.getLength()+d-1);var xe=a?a.getWidth(n,f,e):f.toString().length*e.characterWidth,F=this.$padding||this.$computePadding();xe+=F.left+F.right,xe!==this.gutterWidth&&!isNaN(xe)&&(this.gutterWidth=xe,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",xe))},t.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},t.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!(this.$cursorCell&&this.$cursorCell.row==e)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var n=this.$lines.cells;this.$cursorCell=null;for(var a=0;a<n.length;a++){var d=n[a];if(d.row>=this.$cursorRow){if(d.row>this.$cursorRow){var f=this.session.getFoldLine(this.$cursorRow);if(a>0&&f&&f.start.row==n[a-1].row)d=n[a-1];else break}d.element.className="ace_gutter-active-line "+d.element.className,this.$cursorCell=d;break}}}}},t.prototype.scrollLines=function(e){var n=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(n,e))return this.update(e);this.$lines.moveContainer(e);var a=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),d=this.oldLastRow;if(this.oldLastRow=a,!n||d<e.firstRow)return this.update(e);if(a<n.firstRow)return this.update(e);if(n.firstRow<e.firstRow)for(var f=this.session.getFoldedRowCount(n.firstRow,e.firstRow-1);f>0;f--)this.$lines.shift();if(d>a)for(var f=this.session.getFoldedRowCount(a+1,d);f>0;f--)this.$lines.pop();e.firstRow<n.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,n.firstRow-1)),a>d&&this.$lines.push(this.$renderLines(e,d+1,a)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},t.prototype.$renderLines=function(e,n,a){for(var d=[],f=n,xe=this.session.getNextFoldLine(f),F=xe?xe.start.row:1/0;f>F&&(f=xe.end.row+1,xe=this.session.getNextFoldLine(f,xe),F=xe?xe.start.row:1/0),!(f>a);){var _=this.$lines.createCell(f,e,this.session,r);this.$renderCell(_,e,xe,f),d.push(_),f++}return d},t.prototype.$renderCell=function(e,n,a,d){var f=e.element,xe=this.session,F=f.childNodes[0],_=f.childNodes[1],S=f.childNodes[2],Ae=S.firstChild,Vn=xe.$firstLineNumber,Me=xe.$breakpoints,oe=xe.$decorations,Yn=xe.gutterRenderer||this.$renderer,y=this.$showFoldWidgets&&xe.foldWidgets,h=a?a.start.row:Number.MAX_VALUE,w=n.lineHeight+"px",J=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",He=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",Kn=(Yn?Yn.getText(xe,d):d+Vn).toString();if(this.$highlightGutterLine&&(d==this.$cursorRow||a&&d<this.$cursorRow&&d>=h&&this.$cursorRow<=a.end.row)&&(J+="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)),Me[d]&&(J+=Me[d]),oe[d]&&(J+=oe[d]),this.$annotations[d]&&d!==h&&(J+=this.$annotations[d].className),y){var Qn=y[d];Qn==null&&(Qn=y[d]=xe.getFoldWidget(d))}if(Qn){var Zn="ace_fold-widget ace_"+Qn,Xn=Qn=="start"&&d==h&&d<a.end.row;if(Xn){Zn+=" ace_closed";for(var ei="",ri=!1,Jn=d+1;Jn<=a.end.row;Jn++)if(this.$annotations[Jn]){if(this.$annotations[Jn].className===" ace_error"){ri=!0,ei=" ace_error_fold";break}this.$annotations[Jn].className===" ace_security"?(ri=!0,ei=" ace_security_fold"):this.$annotations[Jn].className===" ace_warning"&&ei!==" ace_security_fold"&&(ri=!0,ei=" ace_warning_fold")}J+=ei}else Zn+=" ace_open";_.className!=Zn&&(_.className=Zn),Q.setStyle(_.style,"height",w),Q.setStyle(_.style,"display","inline-block"),_.setAttribute("role","button"),_.setAttribute("tabindex","-1");var ti=xe.getFoldWidgetRange(d);ti?_.setAttribute("aria-label",o("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[ti.start.row+1,ti.end.row+1])):a?_.setAttribute("aria-label",o("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[a.start.row+1,a.end.row+1])):_.setAttribute("aria-label",o("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[d+1])),Xn?(_.setAttribute("aria-expanded","false"),_.setAttribute("title",o("gutter.code-folding.closed.title","Unfold code"))):(_.setAttribute("aria-expanded","true"),_.setAttribute("title",o("gutter.code-folding.open.title","Fold code")))}else _&&(Q.setStyle(_.style,"display","none"),_.setAttribute("tabindex","0"),_.removeAttribute("role"),_.removeAttribute("aria-label"));if(ri&&this.$showFoldedAnnotations){S.className="ace_gutter_annotation",Ae.className=He,Ae.className+=ei,Q.setStyle(Ae.style,"height",w),Q.setStyle(S.style,"display","block"),Q.setStyle(S.style,"height",w);var ii;switch(ei){case" ace_error_fold":ii=o("gutter.annotation.aria-label.error","Error, read annotations row $0",[Kn]);break;case" ace_security_fold":ii=o("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[Kn]);break;case" ace_warning_fold":ii=o("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[Kn]);break}S.setAttribute("aria-label",ii),S.setAttribute("tabindex","-1"),S.setAttribute("role","button")}else if(this.$annotations[d]){S.className="ace_gutter_annotation",Ae.className=He,this.$useSvgGutterIcons?Ae.className+=this.$annotations[d].className:f.classList.add(this.$annotations[d].className.replace(" ","")),Q.setStyle(Ae.style,"height",w),Q.setStyle(S.style,"display","block"),Q.setStyle(S.style,"height",w);var ii;switch(this.$annotations[d].className){case" ace_error":ii=o("gutter.annotation.aria-label.error","Error, read annotations row $0",[Kn]);break;case" ace_security":ii=o("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[Kn]);break;case" ace_warning":ii=o("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[Kn]);break;case" ace_info":ii=o("gutter.annotation.aria-label.info","Info, read annotations row $0",[Kn]);break;case" ace_hint":ii=o("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[Kn]);break}S.setAttribute("aria-label",ii),S.setAttribute("tabindex","-1"),S.setAttribute("role","button")}else Q.setStyle(S.style,"display","none"),S.removeAttribute("aria-label"),S.removeAttribute("role"),S.setAttribute("tabindex","0");return Kn!==F.data&&(F.data=Kn),f.className!=J&&(f.className=J),Q.setStyle(e.element.style,"height",this.$lines.computeLineHeight(d,n,xe)+"px"),Q.setStyle(e.element.style,"top",this.$lines.computeLineTop(d,n,xe)+"px"),e.text=Kn,S.style.display==="none"&&_.style.display==="none"?e.element.setAttribute("aria-hidden",!0):e.element.setAttribute("aria-hidden",!1),e},t.prototype.setHighlightGutterLine=function(e){this.$highlightGutterLine=e},t.prototype.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},t.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},t.prototype.setShowFoldWidgets=function(e){e?Q.addCssClass(this.element,"ace_folding-enabled"):Q.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},t.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},t.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=Q.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(e.borderLeftWidth)||0)+(parseInt(e.paddingLeft)||0)+1,this.$padding.right=(parseInt(e.borderRightWidth)||0)+(parseInt(e.paddingRight)||0),this.$padding},t.prototype.getRegion=function(e){var n=this.$padding||this.$computePadding(),a=this.element.getBoundingClientRect();if(e.x<n.left+a.left)return"markers";if(this.$showFoldWidgets&&e.x>a.right-n.right)return"foldWidgets"},t}();i.prototype.$fixedWidth=!1,i.prototype.$highlightGutterLine=!0,i.prototype.$renderer="",i.prototype.$showLineNumbers=!0,i.prototype.$showFoldWidgets=!0,R.implement(i.prototype,l);function r(t){var e=document.createTextNode("");t.appendChild(e);var n=Q.createElement("span");t.appendChild(n);var a=Q.createElement("span");t.appendChild(a);var d=Q.createElement("span");return a.appendChild(d),t}m.Gutter=i}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(p,m,Gn){var Q=p("../range").Range,R=p("../lib/dom"),M=function(){function u(o){this.element=R.createElement("div"),this.element.className="ace_layer ace_marker-layer",o.appendChild(this.element)}return u.prototype.setPadding=function(o){this.$padding=o},u.prototype.setSession=function(o){this.session=o},u.prototype.setMarkers=function(o){this.markers=o},u.prototype.elt=function(o,i){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=i,r.className=o},u.prototype.update=function(o){if(o){this.config=o,this.i=0;var i;for(var r in this.markers){var t=this.markers[r];if(!t.range){t.update(i,this,this.session,o);continue}var e=t.range.clipRows(o.firstRow,o.lastRow);if(!e.isEmpty())if(e=e.toScreenRange(this.session),t.renderer){var n=this.$getTop(e.start.row,o),a=this.$padding+e.start.column*o.characterWidth;t.renderer(i,e,a,n,o)}else t.type=="fullLine"?this.drawFullLineMarker(i,e,t.clazz,o):t.type=="screenLine"?this.drawScreenLineMarker(i,e,t.clazz,o):e.isMultiLine()?t.type=="text"?this.drawTextMarker(i,e,t.clazz,o):this.drawMultiLineMarker(i,e,t.clazz,o):this.drawSingleLineMarker(i,e,t.clazz+" ace_start ace_br15",o)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},u.prototype.$getTop=function(o,i){return(o-i.firstRowScreen)*i.lineHeight},u.prototype.drawTextMarker=function(o,i,r,t,e){for(var n=this.session,a=i.start.row,d=i.end.row,f=a,xe=0,F=0,_=n.getScreenLastRowColumn(f),S=new Q(f,i.start.column,f,F);f<=d;f++)S.start.row=S.end.row=f,S.start.column=f==a?i.start.column:n.getRowWrapIndent(f),S.end.column=_,xe=F,F=_,_=f+1<d?n.getScreenLastRowColumn(f+1):f==d?0:i.end.column,this.drawSingleLineMarker(o,S,r+(f==a?" ace_start":"")+" ace_br"+l(f==a||f==a+1&&i.start.column,xe<F,F>_,f==d),t,f==d?0:1,e)},u.prototype.drawMultiLineMarker=function(o,i,r,t,e){var n=this.$padding,a=t.lineHeight,d=this.$getTop(i.start.row,t),f=n+i.start.column*t.characterWidth;if(e=e||"",this.session.$bidiHandler.isBidiRow(i.start.row)){var xe=i.clone();xe.end.row=xe.start.row,xe.end.column=this.session.getLine(xe.start.row).length,this.drawBidiSingleLineMarker(o,xe,r+" ace_br1 ace_start",t,null,e)}else this.elt(r+" ace_br1 ace_start","height:"+a+"px;right:"+n+"px;top:"+d+"px;left:"+f+"px;"+(e||""));if(this.session.$bidiHandler.isBidiRow(i.end.row)){var xe=i.clone();xe.start.row=xe.end.row,xe.start.column=0,this.drawBidiSingleLineMarker(o,xe,r+" ace_br12",t,null,e)}else{d=this.$getTop(i.end.row,t);var F=i.end.column*t.characterWidth;this.elt(r+" ace_br12","height:"+a+"px;width:"+F+"px;top:"+d+"px;left:"+n+"px;"+(e||""))}if(a=(i.end.row-i.start.row-1)*t.lineHeight,!(a<=0)){d=this.$getTop(i.start.row+1,t);var _=(i.start.column?1:0)|(i.end.column?0:8);this.elt(r+(_?" ace_br"+_:""),"height:"+a+"px;right:"+n+"px;top:"+d+"px;left:"+n+"px;"+(e||""))}},u.prototype.drawSingleLineMarker=function(o,i,r,t,e,n){if(this.session.$bidiHandler.isBidiRow(i.start.row))return this.drawBidiSingleLineMarker(o,i,r,t,e,n);var a=t.lineHeight,d=(i.end.column+(e||0)-i.start.column)*t.characterWidth,f=this.$getTop(i.start.row,t),xe=this.$padding+i.start.column*t.characterWidth;this.elt(r,"height:"+a+"px;width:"+d+"px;top:"+f+"px;left:"+xe+"px;"+(n||""))},u.prototype.drawBidiSingleLineMarker=function(o,i,r,t,e,n){var a=t.lineHeight,d=this.$getTop(i.start.row,t),f=this.$padding,xe=this.session.$bidiHandler.getSelections(i.start.column,i.end.column);xe.forEach(function(F){this.elt(r,"height:"+a+"px;width:"+(F.width+(e||0))+"px;top:"+d+"px;left:"+(f+F.left)+"px;"+(n||""))},this)},u.prototype.drawFullLineMarker=function(o,i,r,t,e){var n=this.$getTop(i.start.row,t),a=t.lineHeight;i.start.row!=i.end.row&&(a+=this.$getTop(i.end.row,t)-n),this.elt(r,"height:"+a+"px;top:"+n+"px;left:0;right:0;"+(e||""))},u.prototype.drawScreenLineMarker=function(o,i,r,t,e){var n=this.$getTop(i.start.row,t),a=t.lineHeight;this.elt(r,"height:"+a+"px;top:"+n+"px;left:0;right:0;"+(e||""))},u}();M.prototype.$padding=0;function l(u,o,i,r){return(u?1:0)|(o?2:0)|(i?4:0)|(r?8:0)}m.Marker=M}),ace.define("ace/layer/text_util",["require","exports","module"],function(p,m,Gn){var Q=new Set(["text","rparen","lparen"]);m.isTextToken=function(R){return Q.has(R)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(p,m,Gn){var Q=p("../lib/oop"),R=p("../lib/dom"),M=p("../lib/lang"),l=p("./lines").Lines,u=p("../lib/event_emitter").EventEmitter,o=p("../config").nls,i=p("./text_util").isTextToken,r=function(){function t(e){this.dom=R,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 l(this.element)}return t.prototype.$updateEolChar=function(){var e=this.session.doc,n=e.getNewLineCharacter()==`
209
+ `&&e.getNewLineMode()!="windows",a=n?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=a)return this.EOL_CHAR=a,!0},t.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},t.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},t.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},t.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",(function(n){this._signal("changeCharacterSize",n)}).bind(this)),this.$pollSizeChanges()},t.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},t.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},t.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString()},t.prototype.setShowInvisibles=function(e){return this.showInvisibles==e?!1:(this.showInvisibles=e,typeof e=="string"?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},t.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},t.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides===e?!1:(this.$highlightIndentGuides=e,e)},t.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var n=this.$tabStrings=[0],a=1;a<e+1;a++)if(this.showTabs){var d=this.dom.createElement("span");d.className="ace_invisible ace_invisible_tab",d.textContent=M.stringRepeat(this.TAB_CHAR,a),n.push(d)}else n.push(this.dom.createTextNode(M.stringRepeat(" ",a),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var f="ace_indent-guide",xe=this.showSpaces?" ace_invisible ace_invisible_space":"",F=this.showSpaces?M.stringRepeat(this.SPACE_CHAR,this.tabSize):M.stringRepeat(" ",this.tabSize),_=this.showTabs?" ace_invisible ace_invisible_tab":"",S=this.showTabs?M.stringRepeat(this.TAB_CHAR,this.tabSize):F,d=this.dom.createElement("span");d.className=f+xe,d.textContent=F,this.$tabStrings[" "]=d;var d=this.dom.createElement("span");d.className=f+_,d.textContent=S,this.$tabStrings[" "]=d}},t.prototype.updateLines=function(e,n,a){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var d=Math.max(n,e.firstRow),f=Math.min(a,e.lastRow),xe=this.element.childNodes,F=0,S=e.firstRow;S<d;S++){var Ae=this.session.getFoldLine(S);if(Ae)if(Ae.containsRow(d)){d=Ae.start.row;break}else S=Ae.end.row;F++}for(var _=!1,S=d,Ae=this.session.getNextFoldLine(S),Vn=Ae?Ae.start.row:1/0;S>Vn&&(S=Ae.end.row+1,Ae=this.session.getNextFoldLine(S,Ae),Vn=Ae?Ae.start.row:1/0),!(S>f);){var Me=xe[F++];if(Me){this.dom.removeChildren(Me),this.$renderLine(Me,S,S==Vn?Ae:!1),_&&(Me.style.top=this.$lines.computeLineTop(S,e,this.session)+"px");var oe=e.lineHeight*this.session.getRowLength(S)+"px";Me.style.height!=oe&&(_=!0,Me.style.height=oe)}S++}if(_)for(;F<this.$lines.cells.length;){var Yn=this.$lines.cells[F++];Yn.element.style.top=this.$lines.computeLineTop(Yn.row,e,this.session)+"px"}},t.prototype.scrollLines=function(e){var n=this.config;if(this.config=e,this.$lines.pageChanged(n,e))return this.update(e);this.$lines.moveContainer(e);var a=e.lastRow,d=n?n.lastRow:-1;if(!n||d<e.firstRow)return this.update(e);if(a<n.firstRow)return this.update(e);if(!n||n.lastRow<e.firstRow)return this.update(e);if(e.lastRow<n.firstRow)return this.update(e);if(n.firstRow<e.firstRow)for(var f=this.session.getFoldedRowCount(n.firstRow,e.firstRow-1);f>0;f--)this.$lines.shift();if(n.lastRow>e.lastRow)for(var f=this.session.getFoldedRowCount(e.lastRow+1,n.lastRow);f>0;f--)this.$lines.pop();e.firstRow<n.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,n.firstRow-1)),e.lastRow>n.lastRow&&this.$lines.push(this.$renderLinesFragment(e,n.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},t.prototype.$renderLinesFragment=function(e,n,a){for(var d=[],f=n,xe=this.session.getNextFoldLine(f),F=xe?xe.start.row:1/0;f>F&&(f=xe.end.row+1,xe=this.session.getNextFoldLine(f,xe),F=xe?xe.start.row:1/0),!(f>a);){var _=this.$lines.createCell(f,e,this.session),S=_.element;this.dom.removeChildren(S),R.setStyle(S.style,"height",this.$lines.computeLineHeight(f,e,this.session)+"px"),R.setStyle(S.style,"top",this.$lines.computeLineTop(f,e,this.session)+"px"),this.$renderLine(S,f,f==F?xe:!1),this.$useLineGroups()?S.className="ace_line_group":S.className="ace_line",d.push(_),f++}return d},t.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var n=e.firstRow,a=e.lastRow,d=this.$lines;d.getLength();)d.pop();d.push(this.$renderLinesFragment(e,n,a))},t.prototype.$renderToken=function(e,n,a,d){for(var f=this,xe=/(\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,F=this.dom.createFragment(this.element),_,S=0;_=xe.exec(d);){var Ae=_[1],Vn=_[2],Me=_[3],oe=_[4],Yn=_[5];if(!(!f.showSpaces&&Vn)){var y=S!=_.index?d.slice(S,_.index):"";if(S=_.index+_[0].length,y&&F.appendChild(this.dom.createTextNode(y,this.element)),Ae){var h=f.session.getScreenTabSize(n+_.index);F.appendChild(f.$tabStrings[h].cloneNode(!0)),n+=h-1}else if(Vn)if(f.showSpaces){var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_space",w.textContent=M.stringRepeat(f.SPACE_CHAR,Vn.length),F.appendChild(w)}else F.appendChild(this.dom.createTextNode(Vn,this.element));else if(Me){var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_space ace_invalid",w.textContent=M.stringRepeat(f.SPACE_CHAR,Me.length),F.appendChild(w)}else if(oe){n+=1;var w=this.dom.createElement("span");w.style.width=f.config.characterWidth*2+"px",w.className=f.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",w.textContent=f.showSpaces?f.SPACE_CHAR:oe,F.appendChild(w)}else if(Yn){n+=1;var w=this.dom.createElement("span");w.style.width=f.config.characterWidth*2+"px",w.className="ace_cjk",w.textContent=Yn,F.appendChild(w)}}}if(F.appendChild(this.dom.createTextNode(S?d.slice(S):d,this.element)),i(a.type))e.appendChild(F);else{var J="ace_"+a.type.replace(/\./g," ace_"),w=this.dom.createElement("span");a.type=="fold"&&(w.style.width=a.value.length*this.config.characterWidth+"px",w.setAttribute("title",o("inline-fold.closed.title","Unfold code"))),w.className=J,w.appendChild(F),e.appendChild(w)}return n+d.length},t.prototype.renderIndentGuide=function(e,n,a){var d=n.search(this.$indentGuideRe);if(d<=0||d>=a)return n;if(n[0]==" "){d-=d%this.tabSize;for(var f=d/this.tabSize,xe=0;xe<f;xe++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),n.substr(d)}else if(n[0]==" "){for(var xe=0;xe<d;xe++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),n.substr(d)}return this.$highlightIndentGuide(),n},t.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var e=this.session.doc.$lines;if(e){var n=this.session.selection.getCursor(),a=/^\s*/.exec(this.session.doc.getLine(n.row))[0].length,d=Math.floor(a/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:d,start:n.row};var f=this.session.$bracketHighlight;if(f){for(var xe=this.session.$bracketHighlight.ranges,F=0;F<xe.length;F++)if(n.row!==xe[F].start.row){this.$highlightIndentGuideMarker.end=xe[F].start.row,n.row>xe[F].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&e[n.row]!==""&&n.column===e[n.row].length){this.$highlightIndentGuideMarker.dir=1;for(var F=n.row+1;F<e.length;F++){var _=e[F],S=/^\s*/.exec(_)[0].length;if(_!==""&&(this.$highlightIndentGuideMarker.end=F,S<=a))break}}this.$renderHighlightIndentGuide()}}},t.prototype.$clearActiveIndentGuide=function(){for(var e=this.$lines.cells,n=0;n<e.length;n++){var a=e[n],d=a.element.childNodes;if(d.length>0){for(var f=0;f<d.length;f++)if(d[f].classList&&d[f].classList.contains("ace_indent-guide-active")){d[f].classList.remove("ace_indent-guide-active");break}}}},t.prototype.$setIndentGuideActive=function(e,n){var a=this.session.doc.getLine(e.row);if(a!==""){var d=e.element.childNodes;if(d){var f=d[n-1];f&&f.classList&&f.classList.contains("ace_indent-guide")&&f.classList.add("ace_indent-guide-active")}}},t.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var n=this.$highlightIndentGuideMarker.indentLevel;if(n!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var a=0;a<e.length;a++){var d=e[a];if(this.$highlightIndentGuideMarker.end&&d.row>=this.$highlightIndentGuideMarker.start+1){if(d.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(d,n)}}else for(var a=e.length-1;a>=0;a--){var d=e[a];if(this.$highlightIndentGuideMarker.end&&d.row<this.$highlightIndentGuideMarker.start){if(d.row<=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(d,n)}}}},t.prototype.$createLineElement=function(e){var n=this.dom.createElement("div");return n.className="ace_line",n.style.height=this.config.lineHeight+"px",n},t.prototype.$renderWrappedLine=function(e,n,a){var d=0,f=0,xe=a[0],F=0,_=this.$createLineElement();e.appendChild(_);for(var S=0;S<n.length;S++){var Ae=n[S],Vn=Ae.value;if(S==0&&this.displayIndentGuides){if(d=Vn.length,Vn=this.renderIndentGuide(_,Vn,xe),!Vn)continue;d-=Vn.length}if(d+Vn.length<xe)F=this.$renderToken(_,F,Ae,Vn),d+=Vn.length;else{for(;d+Vn.length>=xe;)F=this.$renderToken(_,F,Ae,Vn.substring(0,xe-d)),Vn=Vn.substring(xe-d),d=xe,_=this.$createLineElement(),e.appendChild(_),_.appendChild(this.dom.createTextNode(M.stringRepeat(" ",a.indent),this.element)),f++,F=0,xe=a[f]||Number.MAX_VALUE;Vn.length!=0&&(d+=Vn.length,F=this.$renderToken(_,F,Ae,Vn))}}a[a.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(_,F,null,"",!0)},t.prototype.$renderSimpleLine=function(e,n){for(var a=0,d=0;d<n.length;d++){var f=n[d],xe=f.value;if(!(d==0&&this.displayIndentGuides&&(xe=this.renderIndentGuide(e,xe),!xe))){if(a+xe.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,a,f,xe);a=this.$renderToken(e,a,f,xe)}}},t.prototype.$renderOverflowMessage=function(e,n,a,d,f){a&&this.$renderToken(e,n,a,d.slice(0,this.MAX_LINE_LENGTH-n));var xe=this.dom.createElement("span");xe.className="ace_inline_button ace_keyword ace_toggle_wrap",xe.textContent=f?"<hide>":"<click to see more...>",e.appendChild(xe)},t.prototype.$renderLine=function(e,n,a){if(!a&&a!=!1&&(a=this.session.getFoldLine(n)),a)var d=this.$getFoldLineTokens(n,a);else var d=this.session.getTokens(n);var f=e;if(d.length){var xe=this.session.getRowSplitData(n);if(xe&&xe.length){this.$renderWrappedLine(e,d,xe);var f=e.lastChild}else{var f=e;this.$useLineGroups()&&(f=this.$createLineElement(),e.appendChild(f)),this.$renderSimpleLine(f,d)}}else this.$useLineGroups()&&(f=this.$createLineElement(),e.appendChild(f));if(this.showEOL&&f){a&&(n=a.end.row);var F=this.dom.createElement("span");F.className="ace_invisible ace_invisible_eol",F.textContent=n==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,f.appendChild(F)}},t.prototype.$getFoldLineTokens=function(e,n){var a=this.session,d=[];function f(F,_,S){for(var Ae=0,Vn=0;Vn+F[Ae].value.length<_;)if(Vn+=F[Ae].value.length,Ae++,Ae==F.length)return;if(Vn!=_){var Me=F[Ae].value.substring(_-Vn);Me.length>S-_&&(Me=Me.substring(0,S-_)),d.push({type:F[Ae].type,value:Me}),Vn=_+Me.length,Ae+=1}for(;Vn<S&&Ae<F.length;){var Me=F[Ae].value;Me.length+Vn>S?d.push({type:F[Ae].type,value:Me.substring(0,S-Vn)}):d.push(F[Ae]),Vn+=Me.length,Ae+=1}}var xe=a.getTokens(e);return n.walk(function(F,_,S,Ae,Vn){F!=null?d.push({type:"fold",value:F}):(Vn&&(xe=a.getTokens(_)),xe.length&&f(xe,Ae,S))},n.end.row,this.session.getLine(n.end.row).length),d},t.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},t}();r.prototype.EOF_CHAR="¶",r.prototype.EOL_CHAR_LF="¬",r.prototype.EOL_CHAR_CRLF="¤",r.prototype.EOL_CHAR=r.prototype.EOL_CHAR_LF,r.prototype.TAB_CHAR="—",r.prototype.SPACE_CHAR="·",r.prototype.$padding=0,r.prototype.MAX_LINE_LENGTH=1e4,r.prototype.showInvisibles=!1,r.prototype.showSpaces=!1,r.prototype.showTabs=!1,r.prototype.showEOL=!1,r.prototype.displayIndentGuides=!0,r.prototype.$highlightIndentGuides=!0,r.prototype.$tabStrings=[],r.prototype.destroy={},r.prototype.onChangeTabSize=r.prototype.$computeTabString,Q.implement(r.prototype,u),m.Text=r}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(p,m,Gn){var Q=p("../lib/dom"),R=function(){function M(l){this.element=Q.createElement("div"),this.element.className="ace_layer ace_cursor-layer",l.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),Q.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return M.prototype.$updateOpacity=function(l){for(var u=this.cursors,o=u.length;o--;)Q.setStyle(u[o].style,"opacity",l?"":"0")},M.prototype.$startCssAnimation=function(){for(var l=this.cursors,u=l.length;u--;)l[u].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&Q.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},M.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,Q.removeCssClass(this.element,"ace_animate-blinking")},M.prototype.setPadding=function(l){this.$padding=l},M.prototype.setSession=function(l){this.session=l},M.prototype.setBlinking=function(l){l!=this.isBlinking&&(this.isBlinking=l,this.restartTimer())},M.prototype.setBlinkInterval=function(l){l!=this.blinkInterval&&(this.blinkInterval=l,this.restartTimer())},M.prototype.setSmoothBlinking=function(l){l!=this.smoothBlinking&&(this.smoothBlinking=l,Q.setCssClass(this.element,"ace_smooth-blinking",l),this.$updateCursors(!0),this.restartTimer())},M.prototype.addCursor=function(){var l=Q.createElement("div");return l.className="ace_cursor",this.element.appendChild(l),this.cursors.push(l),l},M.prototype.removeCursor=function(){if(this.cursors.length>1){var l=this.cursors.pop();return l.parentNode.removeChild(l),l}},M.prototype.hideCursor=function(){this.isVisible=!1,Q.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},M.prototype.showCursor=function(){this.isVisible=!0,Q.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},M.prototype.restartTimer=function(){var l=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,Q.removeCssClass(this.element,"ace_smooth-blinking")),l(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&Q.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),Q.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var u=(function(){this.timeoutId=setTimeout(function(){l(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){l(!0),u()},this.blinkInterval),u()}},M.prototype.getPixelPosition=function(l,u){if(!this.config||!this.session)return{left:0,top:0};l||(l=this.session.selection.getCursor());var o=this.session.documentToScreenPosition(l),i=this.$padding+(this.session.$bidiHandler.isBidiRow(o.row,l.row)?this.session.$bidiHandler.getPosLeft(o.column):o.column*this.config.characterWidth),r=(o.row-(u?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:i,top:r}},M.prototype.isCursorInView=function(l,u){return l.top>=0&&l.top<u.maxHeight},M.prototype.update=function(l){this.config=l;var u=this.session.$selectionMarkers,o=0,i=0;(u===void 0||u.length===0)&&(u=[{cursor:null}]);for(var o=0,r=u.length;o<r;o++){var t=this.getPixelPosition(u[o].cursor,!0);if(!((t.top>l.height+l.offset||t.top<0)&&o>1)){var e=this.cursors[i++]||this.addCursor(),n=e.style;this.drawCursor?this.drawCursor(e,t,l,u[o],this.session):this.isCursorInView(t,l)?(Q.setStyle(n,"display","block"),Q.translate(e,t.left,t.top),Q.setStyle(n,"width",Math.round(l.characterWidth)+"px"),Q.setStyle(n,"height",l.lineHeight+"px")):Q.setStyle(n,"display","none")}}for(;this.cursors.length>i;)this.removeCursor();var a=this.session.getOverwrite();this.$setOverwrite(a),this.$pixelPos=t,this.restartTimer()},M.prototype.$setOverwrite=function(l){l!=this.overwrite&&(this.overwrite=l,l?Q.addCssClass(this.element,"ace_overwrite-cursors"):Q.removeCssClass(this.element,"ace_overwrite-cursors"))},M.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},M}();R.prototype.$padding=0,R.prototype.drawCursor=null,m.Cursor=R}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(p,m,Gn){var Q=this&&this.__extends||function(){var e=function(n,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var xe in f)Object.prototype.hasOwnProperty.call(f,xe)&&(d[xe]=f[xe])},e(n,a)};return function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");e(n,a);function d(){this.constructor=n}n.prototype=a===null?Object.create(a):(d.prototype=a.prototype,new d)}}(),R=p("./lib/oop"),M=p("./lib/dom"),l=p("./lib/event"),u=p("./lib/event_emitter").EventEmitter,o=32768,i=function(){function e(n,a){this.element=M.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+a,this.inner=M.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),n.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,l.addListener(this.element,"scroll",this.onScroll.bind(this)),l.addListener(this.element,"mousedown",l.preventDefault)}return e.prototype.setVisible=function(n){this.element.style.display=n?"":"none",this.isVisible=n,this.coeff=1},e}();R.implement(i.prototype,u);var r=function(e){Q(n,e);function n(a,d){var f=e.call(this,a,"-v")||this;return f.scrollTop=0,f.scrollHeight=0,d.$scrollbarWidth=f.width=M.scrollbarWidth(a.ownerDocument),f.inner.style.width=f.element.style.width=(f.width||15)+5+"px",f.$minWidth=0,f}return n.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var a=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-a)/(this.coeff-a)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},n.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},n.prototype.setHeight=function(a){this.element.style.height=a+"px"},n.prototype.setScrollHeight=function(a){this.scrollHeight=a,a>o?(this.coeff=o/a,a=o):this.coeff!=1&&(this.coeff=1),this.inner.style.height=a+"px"},n.prototype.setScrollTop=function(a){this.scrollTop!=a&&(this.skipEvent=!0,this.scrollTop=a,this.element.scrollTop=a*this.coeff)},n}(i);r.prototype.setInnerHeight=r.prototype.setScrollHeight;var t=function(e){Q(n,e);function n(a,d){var f=e.call(this,a,"-h")||this;return f.scrollLeft=0,f.height=d.$scrollbarWidth,f.inner.style.height=f.element.style.height=(f.height||15)+5+"px",f}return n.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},n.prototype.getHeight=function(){return this.isVisible?this.height:0},n.prototype.setWidth=function(a){this.element.style.width=a+"px"},n.prototype.setInnerWidth=function(a){this.inner.style.width=a+"px"},n.prototype.setScrollWidth=function(a){this.inner.style.width=a+"px"},n.prototype.setScrollLeft=function(a){this.scrollLeft!=a&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=a)},n}(i);m.ScrollBar=r,m.ScrollBarV=r,m.ScrollBarH=t,m.VScrollBar=r,m.HScrollBar=t}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(p,m,Gn){var Q=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,d){a.__proto__=d}||function(a,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(a[f]=d[f])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function a(){this.constructor=e}e.prototype=n===null?Object.create(n):(a.prototype=n.prototype,new a)}}(),R=p("./lib/oop"),M=p("./lib/dom"),l=p("./lib/event"),u=p("./lib/event_emitter").EventEmitter;M.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
210
+ position: absolute;
211
+ background: rgba(128, 128, 128, 0.6);
212
+ -moz-box-sizing: border-box;
213
+ box-sizing: border-box;
214
+ border: 1px solid #bbb;
215
+ border-radius: 2px;
216
+ z-index: 8;
217
+ }
218
+ .ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
219
+ position: absolute;
220
+ z-index: 6;
221
+ background: none;
222
+ overflow: hidden!important;
223
+ }
224
+ .ace_editor>.ace_sb-v {
225
+ z-index: 6;
226
+ right: 0;
227
+ top: 0;
228
+ width: 12px;
229
+ }
230
+ .ace_editor>.ace_sb-v div {
231
+ z-index: 8;
232
+ right: 0;
233
+ width: 100%;
234
+ }
235
+ .ace_editor>.ace_sb-h {
236
+ bottom: 0;
237
+ left: 0;
238
+ height: 12px;
239
+ }
240
+ .ace_editor>.ace_sb-h div {
241
+ bottom: 0;
242
+ height: 100%;
243
+ }
244
+ .ace_editor>.ace_sb_grabbed {
245
+ z-index: 8;
246
+ background: #000;
247
+ }`,"ace_scrollbar.css",!1);var o=function(){function t(e,n){this.element=M.createElement("div"),this.element.className="ace_sb"+n,this.inner=M.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,l.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return t.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},t}();R.implement(o.prototype,u);var i=function(t){Q(e,t);function e(n,a){var d=t.call(this,n,"-v")||this;return d.scrollTop=0,d.scrollHeight=0,d.parent=n,d.width=d.VScrollWidth,d.renderer=a,d.inner.style.width=d.element.style.width=(d.width||15)+"px",d.$minWidth=0,d}return e.prototype.onMouseDown=function(n,a){if(n==="mousedown"&&!(l.getButton(a)!==0||a.detail===2)){if(a.target===this.inner){var d=this,f=a.clientY,xe=function(oe){f=oe.clientY},F=function(){clearInterval(Vn)},_=a.clientY,S=this.thumbTop,Ae=function(){if(f!==void 0){var oe=d.scrollTopFromThumbTop(S+f-_);oe!==d.scrollTop&&d._emit("scroll",{data:oe})}};l.capture(this.inner,xe,F);var Vn=setInterval(Ae,20);return l.preventDefault(a)}var Me=a.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(Me)}),l.preventDefault(a)}},e.prototype.getHeight=function(){return this.height},e.prototype.scrollTopFromThumbTop=function(n){var a=n*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return a=a>>0,a<0?a=0:a>this.pageHeight-this.viewHeight&&(a=this.pageHeight-this.viewHeight),a},e.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},e.prototype.setHeight=function(n){this.height=Math.max(0,n),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},e.prototype.setScrollHeight=function(n,a){this.pageHeight===n&&!a||(this.pageHeight=n,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},e.prototype.setScrollTop=function(n){this.scrollTop=n,n<0&&(n=0),this.thumbTop=n*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},e}(o);i.prototype.setInnerHeight=i.prototype.setScrollHeight;var r=function(t){Q(e,t);function e(n,a){var d=t.call(this,n,"-h")||this;return d.scrollLeft=0,d.scrollWidth=0,d.height=d.HScrollHeight,d.inner.style.height=d.element.style.height=(d.height||12)+"px",d.renderer=a,d}return e.prototype.onMouseDown=function(n,a){if(n==="mousedown"&&!(l.getButton(a)!==0||a.detail===2)){if(a.target===this.inner){var d=this,f=a.clientX,xe=function(oe){f=oe.clientX},F=function(){clearInterval(Vn)},_=a.clientX,S=this.thumbLeft,Ae=function(){if(f!==void 0){var oe=d.scrollLeftFromThumbLeft(S+f-_);oe!==d.scrollLeft&&d._emit("scroll",{data:oe})}};l.capture(this.inner,xe,F);var Vn=setInterval(Ae,20);return l.preventDefault(a)}var Me=a.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(Me)}),l.preventDefault(a)}},e.prototype.getHeight=function(){return this.isVisible?this.height:0},e.prototype.scrollLeftFromThumbLeft=function(n){var a=n*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return a=a>>0,a<0?a=0:a>this.pageWidth-this.viewWidth&&(a=this.pageWidth-this.viewWidth),a},e.prototype.setWidth=function(n){this.width=Math.max(0,n),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},e.prototype.setScrollWidth=function(n,a){this.pageWidth===n&&!a||(this.pageWidth=n,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},e.prototype.setScrollLeft=function(n){this.scrollLeft=n,n<0&&(n=0),this.thumbLeft=n*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},e}(o);r.prototype.setInnerWidth=r.prototype.setScrollWidth,m.ScrollBar=i,m.ScrollBarV=i,m.ScrollBarH=r,m.VScrollBar=i,m.HScrollBar=r}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(p,m,Gn){var Q=p("./lib/event"),R=function(){function M(l,u){this.onRender=l,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=u||window;var o=this;this._flush=function(i){o.pending=!1;var r=o.changes;if(r&&(Q.blockIdle(100),o.changes=0,o.onRender(r)),o.changes){if(o.$recursionLimit--<0)return;o.schedule()}else o.$recursionLimit=2}}return M.prototype.schedule=function(l){this.changes=this.changes|l,this.changes&&!this.pending&&(Q.nextFrame(this._flush),this.pending=!0)},M.prototype.clear=function(l){var u=this.changes;return this.changes=0,u},M}();m.RenderLoop=R}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(p,m,Gn){var Q=p("../lib/oop"),R=p("../lib/dom"),M=p("../lib/lang"),l=p("../lib/event"),u=p("../lib/useragent"),o=p("../lib/event_emitter").EventEmitter,i=512,r=typeof ResizeObserver=="function",t=200,e=function(){function n(a){this.el=R.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=R.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=R.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),a.appendChild(this.el),this.$measureNode.textContent=M.stringRepeat("X",i),this.$characterSize={width:0,height:0},r?this.$addObserver():this.checkForSizeChanges()}return n.prototype.$setMeasureNodeStyles=function(a,d){a.width=a.height="auto",a.left=a.top="0px",a.visibility="hidden",a.position="absolute",a.whiteSpace="pre",u.isIE<8?a["font-family"]="inherit":a.font="inherit",a.overflow=d?"hidden":"visible"},n.prototype.checkForSizeChanges=function(a){if(a===void 0&&(a=this.$measureSizes()),a&&(this.$characterSize.width!==a.width||this.$characterSize.height!==a.height)){this.$measureNode.style.fontWeight="bold";var d=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=a,this.charSizes=Object.create(null),this.allowBoldFonts=d&&d.width===a.width&&d.height===a.height,this._emit("changeCharacterSize",{data:a})}},n.prototype.$addObserver=function(){var a=this;this.$observer=new window.ResizeObserver(function(d){a.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},n.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var a=this;return this.$pollSizeChangesTimer=l.onIdle(function d(){a.checkForSizeChanges(),l.onIdle(d,500)},500)},n.prototype.setPolling=function(a){a?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},n.prototype.$measureSizes=function(a){var d={height:(a||this.$measureNode).clientHeight,width:(a||this.$measureNode).clientWidth/i};return d.width===0||d.height===0?null:d},n.prototype.$measureCharWidth=function(a){this.$main.textContent=M.stringRepeat(a,i);var d=this.$main.getBoundingClientRect();return d.width/i},n.prototype.getCharacterWidth=function(a){var d=this.charSizes[a];return d===void 0&&(d=this.charSizes[a]=this.$measureCharWidth(a)/this.$characterSize.width),d},n.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},n.prototype.$getZoom=function(a){return!a||!a.parentElement?1:(Number(window.getComputedStyle(a).zoom)||1)*this.$getZoom(a.parentElement)},n.prototype.$initTransformMeasureNodes=function(){var a=function(d,f){return["div",{style:"position: absolute;top:"+d+"px;left:"+f+"px;"}]};this.els=R.buildDom([a(0,0),a(t,0),a(0,t),a(t,t)],this.el)},n.prototype.transformCoordinates=function(a,d){if(a){var f=this.$getZoom(this.el);a=S(1/f,a)}function xe(Xn,ei,ri){var Jn=Xn[1]*ei[0]-Xn[0]*ei[1];return[(-ei[1]*ri[0]+ei[0]*ri[1])/Jn,(+Xn[1]*ri[0]-Xn[0]*ri[1])/Jn]}function F(Xn,ei){return[Xn[0]-ei[0],Xn[1]-ei[1]]}function _(Xn,ei){return[Xn[0]+ei[0],Xn[1]+ei[1]]}function S(Xn,ei){return[Xn*ei[0],Xn*ei[1]]}this.els||this.$initTransformMeasureNodes();function Ae(Xn){var ei=Xn.getBoundingClientRect();return[ei.left,ei.top]}var Vn=Ae(this.els[0]),Me=Ae(this.els[1]),oe=Ae(this.els[2]),Yn=Ae(this.els[3]),y=xe(F(Yn,Me),F(Yn,oe),F(_(Me,oe),_(Yn,Vn))),h=S(1+y[0],F(Me,Vn)),w=S(1+y[1],F(oe,Vn));if(d){var J=d,He=y[0]*J[0]/t+y[1]*J[1]/t+1,Kn=_(S(J[0],h),S(J[1],w));return _(S(1/He/t,Kn),Vn)}var Qn=F(a,Vn),Zn=xe(F(h,S(y[0],Qn)),F(w,S(y[1],Qn)),Qn);return S(t,Zn)},n}();e.prototype.$characterSize={width:0,height:0},Q.implement(e.prototype,o),m.FontMetrics=e}),ace.define("ace/css/editor-css",["require","exports","module"],function(p,m,Gn){Gn.exports=`
248
+ .ace_br1 {border-top-left-radius : 3px;}
249
+ .ace_br2 {border-top-right-radius : 3px;}
250
+ .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
251
+ .ace_br4 {border-bottom-right-radius: 3px;}
252
+ .ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
253
+ .ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
254
+ .ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
255
+ .ace_br8 {border-bottom-left-radius : 3px;}
256
+ .ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
257
+ .ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
258
+ .ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
259
+ .ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
260
+ .ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
261
+ .ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
262
+ .ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
263
+
264
+
265
+ .ace_editor {
266
+ position: relative;
267
+ overflow: hidden;
268
+ padding: 0;
269
+ font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
270
+ direction: ltr;
271
+ text-align: left;
272
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
273
+ forced-color-adjust: none;
274
+ }
275
+
276
+ .ace_scroller {
277
+ position: absolute;
278
+ overflow: hidden;
279
+ top: 0;
280
+ bottom: 0;
281
+ background-color: inherit;
282
+ -ms-user-select: none;
283
+ -moz-user-select: none;
284
+ -webkit-user-select: none;
285
+ user-select: none;
286
+ cursor: text;
287
+ }
288
+
289
+ .ace_content {
290
+ position: absolute;
291
+ box-sizing: border-box;
292
+ min-width: 100%;
293
+ contain: style size layout;
294
+ font-variant-ligatures: no-common-ligatures;
295
+ }
296
+
297
+ .ace_keyboard-focus:focus {
298
+ box-shadow: inset 0 0 0 2px #5E9ED6;
299
+ outline: none;
300
+ }
301
+
302
+ .ace_dragging .ace_scroller:before{
303
+ position: absolute;
304
+ top: 0;
305
+ left: 0;
306
+ right: 0;
307
+ bottom: 0;
308
+ content: '';
309
+ background: rgba(250, 250, 250, 0.01);
310
+ z-index: 1000;
311
+ }
312
+ .ace_dragging.ace_dark .ace_scroller:before{
313
+ background: rgba(0, 0, 0, 0.01);
314
+ }
315
+
316
+ .ace_gutter {
317
+ position: absolute;
318
+ overflow : hidden;
319
+ width: auto;
320
+ top: 0;
321
+ bottom: 0;
322
+ left: 0;
323
+ cursor: default;
324
+ z-index: 4;
325
+ -ms-user-select: none;
326
+ -moz-user-select: none;
327
+ -webkit-user-select: none;
328
+ user-select: none;
329
+ contain: style size layout;
330
+ }
331
+
332
+ .ace_gutter-active-line {
333
+ position: absolute;
334
+ left: 0;
335
+ right: 0;
336
+ }
337
+
338
+ .ace_scroller.ace_scroll-left:after {
339
+ content: "";
340
+ position: absolute;
341
+ top: 0;
342
+ right: 0;
343
+ bottom: 0;
344
+ left: 0;
345
+ box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
346
+ pointer-events: none;
347
+ }
348
+
349
+ .ace_gutter-cell, .ace_gutter-cell_svg-icons {
350
+ position: absolute;
351
+ top: 0;
352
+ left: 0;
353
+ right: 0;
354
+ padding-left: 19px;
355
+ padding-right: 6px;
356
+ background-repeat: no-repeat;
357
+ }
358
+
359
+ .ace_gutter-cell_svg-icons .ace_gutter_annotation {
360
+ margin-left: -14px;
361
+ float: left;
362
+ }
363
+
364
+ .ace_gutter-cell .ace_gutter_annotation {
365
+ margin-left: -19px;
366
+ float: left;
367
+ }
368
+
369
+ .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 {
370
+ 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==");
371
+ background-repeat: no-repeat;
372
+ background-position: 2px center;
373
+ }
374
+
375
+ .ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
376
+ 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==");
377
+ background-repeat: no-repeat;
378
+ background-position: 2px center;
379
+ }
380
+
381
+ .ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
382
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
383
+ background-repeat: no-repeat;
384
+ background-position: 2px center;
385
+ }
386
+
387
+ .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 {
388
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
389
+ }
390
+
391
+ .ace_icon_svg.ace_error {
392
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
393
+ background-color: crimson;
394
+ }
395
+ .ace_icon_svg.ace_security {
396
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
397
+ background-color: crimson;
398
+ }
399
+ .ace_icon_svg.ace_warning {
400
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
401
+ background-color: darkorange;
402
+ }
403
+ .ace_icon_svg.ace_info {
404
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
405
+ background-color: royalblue;
406
+ }
407
+ .ace_icon_svg.ace_hint {
408
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
409
+ background-color: silver;
410
+ }
411
+
412
+ .ace_icon_svg.ace_error_fold {
413
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
414
+ background-color: crimson;
415
+ }
416
+ .ace_icon_svg.ace_security_fold {
417
+ -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
418
+ background-color: crimson;
419
+ }
420
+ .ace_icon_svg.ace_warning_fold {
421
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
422
+ background-color: darkorange;
423
+ }
424
+
425
+ .ace_scrollbar {
426
+ contain: strict;
427
+ position: absolute;
428
+ right: 0;
429
+ bottom: 0;
430
+ z-index: 6;
431
+ }
432
+
433
+ .ace_scrollbar-inner {
434
+ position: absolute;
435
+ cursor: text;
436
+ left: 0;
437
+ top: 0;
438
+ }
439
+
440
+ .ace_scrollbar-v{
441
+ overflow-x: hidden;
442
+ overflow-y: scroll;
443
+ top: 0;
444
+ }
445
+
446
+ .ace_scrollbar-h {
447
+ overflow-x: scroll;
448
+ overflow-y: hidden;
449
+ left: 0;
450
+ }
451
+
452
+ .ace_print-margin {
453
+ position: absolute;
454
+ height: 100%;
455
+ }
456
+
457
+ .ace_text-input {
458
+ position: absolute;
459
+ z-index: 0;
460
+ width: 0.5em;
461
+ height: 1em;
462
+ opacity: 0;
463
+ background: transparent;
464
+ -moz-appearance: none;
465
+ appearance: none;
466
+ border: none;
467
+ resize: none;
468
+ outline: none;
469
+ overflow: hidden;
470
+ font: inherit;
471
+ padding: 0 1px;
472
+ margin: 0 -1px;
473
+ contain: strict;
474
+ -ms-user-select: text;
475
+ -moz-user-select: text;
476
+ -webkit-user-select: text;
477
+ user-select: text;
478
+ /*with \`pre-line\` chrome inserts &nbsp; instead of space*/
479
+ white-space: pre!important;
480
+ }
481
+ .ace_text-input.ace_composition {
482
+ background: transparent;
483
+ color: inherit;
484
+ z-index: 1000;
485
+ opacity: 1;
486
+ }
487
+ .ace_composition_placeholder { color: transparent }
488
+ .ace_composition_marker {
489
+ border-bottom: 1px solid;
490
+ position: absolute;
491
+ border-radius: 0;
492
+ margin-top: 1px;
493
+ }
494
+
495
+ [ace_nocontext=true] {
496
+ transform: none!important;
497
+ filter: none!important;
498
+ clip-path: none!important;
499
+ mask : none!important;
500
+ contain: none!important;
501
+ perspective: none!important;
502
+ mix-blend-mode: initial!important;
503
+ z-index: auto;
504
+ }
505
+
506
+ .ace_layer {
507
+ z-index: 1;
508
+ position: absolute;
509
+ overflow: hidden;
510
+ /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
511
+ word-wrap: normal;
512
+ white-space: pre;
513
+ height: 100%;
514
+ width: 100%;
515
+ box-sizing: border-box;
516
+ /* setting pointer-events: auto; on node under the mouse, which changes
517
+ during scroll, will break mouse wheel scrolling in Safari */
518
+ pointer-events: none;
519
+ }
520
+
521
+ .ace_gutter-layer {
522
+ position: relative;
523
+ width: auto;
524
+ text-align: right;
525
+ pointer-events: auto;
526
+ height: 1000000px;
527
+ contain: style size layout;
528
+ }
529
+
530
+ .ace_text-layer {
531
+ font: inherit !important;
532
+ position: absolute;
533
+ height: 1000000px;
534
+ width: 1000000px;
535
+ contain: style size layout;
536
+ }
537
+
538
+ .ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
539
+ contain: style size layout;
540
+ position: absolute;
541
+ top: 0;
542
+ left: 0;
543
+ right: 0;
544
+ }
545
+
546
+ .ace_hidpi .ace_text-layer,
547
+ .ace_hidpi .ace_gutter-layer,
548
+ .ace_hidpi .ace_content,
549
+ .ace_hidpi .ace_gutter {
550
+ contain: strict;
551
+ }
552
+ .ace_hidpi .ace_text-layer > .ace_line,
553
+ .ace_hidpi .ace_text-layer > .ace_line_group {
554
+ contain: strict;
555
+ }
556
+
557
+ .ace_cjk {
558
+ display: inline-block;
559
+ text-align: center;
560
+ }
561
+
562
+ .ace_cursor-layer {
563
+ z-index: 4;
564
+ }
565
+
566
+ .ace_cursor {
567
+ z-index: 4;
568
+ position: absolute;
569
+ box-sizing: border-box;
570
+ border-left: 2px solid;
571
+ /* workaround for smooth cursor repaintng whole screen in chrome */
572
+ transform: translatez(0);
573
+ }
574
+
575
+ .ace_multiselect .ace_cursor {
576
+ border-left-width: 1px;
577
+ }
578
+
579
+ .ace_slim-cursors .ace_cursor {
580
+ border-left-width: 1px;
581
+ }
582
+
583
+ .ace_overwrite-cursors .ace_cursor {
584
+ border-left-width: 0;
585
+ border-bottom: 1px solid;
586
+ }
587
+
588
+ .ace_hidden-cursors .ace_cursor {
589
+ opacity: 0.2;
590
+ }
591
+
592
+ .ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
593
+ opacity: 0;
594
+ }
595
+
596
+ .ace_smooth-blinking .ace_cursor {
597
+ transition: opacity 0.18s;
598
+ }
599
+
600
+ .ace_animate-blinking .ace_cursor {
601
+ animation-duration: 1000ms;
602
+ animation-timing-function: step-end;
603
+ animation-name: blink-ace-animate;
604
+ animation-iteration-count: infinite;
605
+ }
606
+
607
+ .ace_animate-blinking.ace_smooth-blinking .ace_cursor {
608
+ animation-duration: 1000ms;
609
+ animation-timing-function: ease-in-out;
610
+ animation-name: blink-ace-animate-smooth;
611
+ }
612
+
613
+ @keyframes blink-ace-animate {
614
+ from, to { opacity: 1; }
615
+ 60% { opacity: 0; }
616
+ }
617
+
618
+ @keyframes blink-ace-animate-smooth {
619
+ from, to { opacity: 1; }
620
+ 45% { opacity: 1; }
621
+ 60% { opacity: 0; }
622
+ 85% { opacity: 0; }
623
+ }
624
+
625
+ .ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
626
+ position: absolute;
627
+ z-index: 3;
628
+ }
629
+
630
+ .ace_marker-layer .ace_selection {
631
+ position: absolute;
632
+ z-index: 5;
633
+ }
634
+
635
+ .ace_marker-layer .ace_bracket {
636
+ position: absolute;
637
+ z-index: 6;
638
+ }
639
+
640
+ .ace_marker-layer .ace_error_bracket {
641
+ position: absolute;
642
+ border-bottom: 1px solid #DE5555;
643
+ border-radius: 0;
644
+ }
645
+
646
+ .ace_marker-layer .ace_active-line {
647
+ position: absolute;
648
+ z-index: 2;
649
+ }
650
+
651
+ .ace_marker-layer .ace_selected-word {
652
+ position: absolute;
653
+ z-index: 4;
654
+ box-sizing: border-box;
655
+ }
656
+
657
+ .ace_line .ace_fold {
658
+ box-sizing: border-box;
659
+
660
+ display: inline-block;
661
+ height: 11px;
662
+ margin-top: -2px;
663
+ vertical-align: middle;
664
+
665
+ background-image:
666
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
667
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
668
+ background-repeat: no-repeat, repeat-x;
669
+ background-position: center center, top left;
670
+ color: transparent;
671
+
672
+ border: 1px solid black;
673
+ border-radius: 2px;
674
+
675
+ cursor: pointer;
676
+ pointer-events: auto;
677
+ }
678
+
679
+ .ace_dark .ace_fold {
680
+ }
681
+
682
+ .ace_fold:hover{
683
+ background-image:
684
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
685
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
686
+ }
687
+
688
+ .ace_tooltip {
689
+ background-color: #f5f5f5;
690
+ border: 1px solid gray;
691
+ border-radius: 1px;
692
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
693
+ color: black;
694
+ max-width: 100%;
695
+ padding: 3px 4px;
696
+ position: fixed;
697
+ z-index: 999999;
698
+ box-sizing: border-box;
699
+ cursor: default;
700
+ white-space: pre-wrap;
701
+ word-wrap: break-word;
702
+ line-height: normal;
703
+ font-style: normal;
704
+ font-weight: normal;
705
+ letter-spacing: normal;
706
+ pointer-events: none;
707
+ overflow: auto;
708
+ max-width: min(60em, 66vw);
709
+ overscroll-behavior: contain;
710
+ }
711
+ .ace_tooltip pre {
712
+ white-space: pre-wrap;
713
+ }
714
+
715
+ .ace_tooltip.ace_dark {
716
+ background-color: #636363;
717
+ color: #fff;
718
+ }
719
+
720
+ .ace_tooltip:focus {
721
+ outline: 1px solid #5E9ED6;
722
+ }
723
+
724
+ .ace_icon {
725
+ display: inline-block;
726
+ width: 18px;
727
+ vertical-align: top;
728
+ }
729
+
730
+ .ace_icon_svg {
731
+ display: inline-block;
732
+ width: 12px;
733
+ vertical-align: top;
734
+ -webkit-mask-repeat: no-repeat;
735
+ -webkit-mask-size: 12px;
736
+ -webkit-mask-position: center;
737
+ }
738
+
739
+ .ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
740
+ padding-right: 13px;
741
+ }
742
+
743
+ .ace_fold-widget {
744
+ box-sizing: border-box;
745
+
746
+ margin: 0 -12px 0 1px;
747
+ display: none;
748
+ width: 11px;
749
+ vertical-align: top;
750
+
751
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
752
+ background-repeat: no-repeat;
753
+ background-position: center;
754
+
755
+ border-radius: 3px;
756
+
757
+ border: 1px solid transparent;
758
+ cursor: pointer;
759
+ }
760
+
761
+ .ace_folding-enabled .ace_fold-widget {
762
+ display: inline-block;
763
+ }
764
+
765
+ .ace_fold-widget.ace_end {
766
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
767
+ }
768
+
769
+ .ace_fold-widget.ace_closed {
770
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
771
+ }
772
+
773
+ .ace_fold-widget:hover {
774
+ border: 1px solid rgba(0, 0, 0, 0.3);
775
+ background-color: rgba(255, 255, 255, 0.2);
776
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
777
+ }
778
+
779
+ .ace_fold-widget:active {
780
+ border: 1px solid rgba(0, 0, 0, 0.4);
781
+ background-color: rgba(0, 0, 0, 0.05);
782
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
783
+ }
784
+ /**
785
+ * Dark version for fold widgets
786
+ */
787
+ .ace_dark .ace_fold-widget {
788
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
789
+ }
790
+ .ace_dark .ace_fold-widget.ace_end {
791
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
792
+ }
793
+ .ace_dark .ace_fold-widget.ace_closed {
794
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
795
+ }
796
+ .ace_dark .ace_fold-widget:hover {
797
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
798
+ background-color: rgba(255, 255, 255, 0.1);
799
+ }
800
+ .ace_dark .ace_fold-widget:active {
801
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
802
+ }
803
+
804
+ .ace_inline_button {
805
+ border: 1px solid lightgray;
806
+ display: inline-block;
807
+ margin: -1px 8px;
808
+ padding: 0 5px;
809
+ pointer-events: auto;
810
+ cursor: pointer;
811
+ }
812
+ .ace_inline_button:hover {
813
+ border-color: gray;
814
+ background: rgba(200,200,200,0.2);
815
+ display: inline-block;
816
+ pointer-events: auto;
817
+ }
818
+
819
+ .ace_fold-widget.ace_invalid {
820
+ background-color: #FFB4B4;
821
+ border-color: #DE5555;
822
+ }
823
+
824
+ .ace_fade-fold-widgets .ace_fold-widget {
825
+ transition: opacity 0.4s ease 0.05s;
826
+ opacity: 0;
827
+ }
828
+
829
+ .ace_fade-fold-widgets:hover .ace_fold-widget {
830
+ transition: opacity 0.05s ease 0.05s;
831
+ opacity:1;
832
+ }
833
+
834
+ .ace_underline {
835
+ text-decoration: underline;
836
+ }
837
+
838
+ .ace_bold {
839
+ font-weight: bold;
840
+ }
841
+
842
+ .ace_nobold .ace_bold {
843
+ font-weight: normal;
844
+ }
845
+
846
+ .ace_italic {
847
+ font-style: italic;
848
+ }
849
+
850
+
851
+ .ace_error-marker {
852
+ background-color: rgba(255, 0, 0,0.2);
853
+ position: absolute;
854
+ z-index: 9;
855
+ }
856
+
857
+ .ace_highlight-marker {
858
+ background-color: rgba(255, 255, 0,0.2);
859
+ position: absolute;
860
+ z-index: 8;
861
+ }
862
+
863
+ .ace_mobile-menu {
864
+ position: absolute;
865
+ line-height: 1.5;
866
+ border-radius: 4px;
867
+ -ms-user-select: none;
868
+ -moz-user-select: none;
869
+ -webkit-user-select: none;
870
+ user-select: none;
871
+ background: white;
872
+ box-shadow: 1px 3px 2px grey;
873
+ border: 1px solid #dcdcdc;
874
+ color: black;
875
+ }
876
+ .ace_dark > .ace_mobile-menu {
877
+ background: #333;
878
+ color: #ccc;
879
+ box-shadow: 1px 3px 2px grey;
880
+ border: 1px solid #444;
881
+
882
+ }
883
+ .ace_mobile-button {
884
+ padding: 2px;
885
+ cursor: pointer;
886
+ overflow: hidden;
887
+ }
888
+ .ace_mobile-button:hover {
889
+ background-color: #eee;
890
+ opacity:1;
891
+ }
892
+ .ace_mobile-button:active {
893
+ background-color: #ddd;
894
+ }
895
+
896
+ .ace_placeholder {
897
+ position: relative;
898
+ font-family: arial;
899
+ transform: scale(0.9);
900
+ transform-origin: left;
901
+ white-space: pre;
902
+ opacity: 0.7;
903
+ margin: 0 10px;
904
+ z-index: 1;
905
+ }
906
+
907
+ .ace_ghost_text {
908
+ opacity: 0.5;
909
+ font-style: italic;
910
+ }
911
+
912
+ .ace_ghost_text_container > div {
913
+ white-space: pre;
914
+ }
915
+
916
+ .ghost_text_line_wrapped::after {
917
+ content: "↩";
918
+ position: absolute;
919
+ }
920
+
921
+ .ace_lineWidgetContainer.ace_ghost_text {
922
+ margin: 0px 4px
923
+ }
924
+
925
+ .ace_screenreader-only {
926
+ position:absolute;
927
+ left:-10000px;
928
+ top:auto;
929
+ width:1px;
930
+ height:1px;
931
+ overflow:hidden;
932
+ }
933
+
934
+ .ace_hidden_token {
935
+ display: none;
936
+ }`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(p,m,Gn){var Q=p("../lib/dom"),R=p("../lib/oop"),M=p("../lib/event_emitter").EventEmitter,l=function(){function u(o,i){this.canvas=Q.createElement("canvas"),this.renderer=i,this.pixelRatio=1,this.maxHeight=i.layerConfig.maxHeight,this.lineHeight=i.layerConfig.lineHeight,this.canvasHeight=o.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=o.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},o.element.appendChild(this.canvas)}return u.prototype.$updateDecorators=function(o){var i=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(o){this.maxHeight=o.maxHeight,this.lineHeight=o.lineHeight,this.canvasHeight=o.height;var r=(o.lastRow+1)*this.lineHeight;r<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight}var t=this.canvas.getContext("2d");function e(Yn,y){return Yn.priority<y.priority?-1:Yn.priority>y.priority?1:0}var n=this.renderer.session.$annotations;if(t.clearRect(0,0,this.canvas.width,this.canvas.height),n){var a={info:1,warning:2,error:3};n.forEach(function(Yn){Yn.priority=a[Yn.type]||null}),n=n.sort(e);for(var d=this.renderer.session.$foldData,f=0;f<n.length;f++){var xe=n[f].row,F=this.compensateFoldRows(xe,d),_=Math.round((xe-F)*this.lineHeight*this.heightRatio),S=Math.round((xe-F)*this.lineHeight*this.heightRatio),Ae=Math.round(((xe-F)*this.lineHeight+this.lineHeight)*this.heightRatio),Vn=Ae-S;if(Vn<this.minDecorationHeight){var Me=(S+Ae)/2|0;Me<this.halfMinDecorationHeight?Me=this.halfMinDecorationHeight:Me+this.halfMinDecorationHeight>this.canvasHeight&&(Me=this.canvasHeight-this.halfMinDecorationHeight),S=Math.round(Me-this.halfMinDecorationHeight),Ae=Math.round(Me+this.halfMinDecorationHeight)}t.fillStyle=i[n[f].type]||null,t.fillRect(0,_,this.canvasWidth,Ae-S)}}var oe=this.renderer.session.selection.getCursor();if(oe){var F=this.compensateFoldRows(oe.row,d),_=Math.round((oe.row-F)*this.lineHeight*this.heightRatio);t.fillStyle="rgba(0, 0, 0, 0.5)",t.fillRect(0,_,this.canvasWidth,2)}},u.prototype.compensateFoldRows=function(o,i){var r=0;if(i&&i.length>0)for(var t=0;t<i.length;t++)o>i[t].start.row&&o<i[t].end.row?r+=o-i[t].start.row:o>=i[t].end.row&&(r+=i[t].end.row-i[t].start.row);return r},u}();R.implement(l.prototype,M),m.Decorator=l}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(p,m,Gn){var Q=p("./lib/oop"),R=p("./lib/dom"),M=p("./lib/lang"),l=p("./config"),u=p("./layer/gutter").Gutter,o=p("./layer/marker").Marker,i=p("./layer/text").Text,r=p("./layer/cursor").Cursor,t=p("./scrollbar").HScrollBar,e=p("./scrollbar").VScrollBar,n=p("./scrollbar_custom").HScrollBar,a=p("./scrollbar_custom").VScrollBar,d=p("./renderloop").RenderLoop,f=p("./layer/font_metrics").FontMetrics,xe=p("./lib/event_emitter").EventEmitter,F=p("./css/editor-css"),_=p("./layer/decorators").Decorator,S=p("./lib/useragent"),Ae=p("./layer/text_util").isTextToken;R.importCssString(F,"ace_editor.css",!1);var Vn=function(){function Me(oe,Yn){var y=this;this.container=oe||R.createElement("div"),R.addCssClass(this.container,"ace_editor"),R.HI_DPI&&R.addCssClass(this.container,"ace_hidpi"),this.setTheme(Yn),l.get("useStrictCSP")==null&&l.set("useStrictCSP",!1),this.$gutter=R.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=R.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=R.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new u(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new o(this.content);var h=this.$textLayer=new i(this.content);this.canvas=h.element,this.$markerFront=new o(this.content),this.$cursorLayer=new r(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new e(this.container,this),this.scrollBarH=new t(this.container,this),this.scrollBarV.on("scroll",function(w){y.$scrollAnimation||y.session.setScrollTop(w.data-y.scrollMargin.top)}),this.scrollBarH.on("scroll",function(w){y.$scrollAnimation||y.session.setScrollLeft(w.data-y.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new f(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(w){y.updateCharacterSize(),y.onResize(!0,y.gutterWidth,y.$size.width,y.$size.height),y._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=!S.isIOS,this.$loop=new d(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),l.resetOptions(this),l._signal("renderer",this)}return Me.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(),R.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},Me.prototype.setSession=function(oe){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=oe,oe&&this.scrollMargin.top&&oe.getScrollTop()<=0&&oe.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(oe),this.$markerBack.setSession(oe),this.$markerFront.setSession(oe),this.$gutterLayer.setSession(oe),this.$textLayer.setSession(oe),oe&&(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))},Me.prototype.updateLines=function(oe,Yn,y){if(Yn===void 0&&(Yn=1/0),this.$changedLines?(this.$changedLines.firstRow>oe&&(this.$changedLines.firstRow=oe),this.$changedLines.lastRow<Yn&&(this.$changedLines.lastRow=Yn)):this.$changedLines={firstRow:oe,lastRow:Yn},this.$changedLines.lastRow<this.layerConfig.firstRow)if(y)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},Me.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},Me.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},Me.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},Me.prototype.updateFull=function(oe){oe?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},Me.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},Me.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},Me.prototype.onResize=function(oe,Yn,y,h){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=oe?1:0;var w=this.container;h||(h=w.clientHeight||w.scrollHeight),!h&&this.$maxLines&&this.lineHeight>1&&(!w.style.height||w.style.height=="0px")&&(w.style.height="1px",h=w.clientHeight||w.scrollHeight),y||(y=w.clientWidth||w.scrollWidth);var J=this.$updateCachedSize(oe,Yn,y,h);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!y&&!h)return this.resizing=0;oe&&(this.$gutterLayer.$padding=null),oe?this.$renderChanges(J|this.$changes,!0):this.$loop.schedule(J|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},Me.prototype.$updateCachedSize=function(oe,Yn,y,h){h-=this.$extraHeight||0;var w=0,J=this.$size,He={width:J.width,height:J.height,scrollerHeight:J.scrollerHeight,scrollerWidth:J.scrollerWidth};if(h&&(oe||J.height!=h)&&(J.height=h,w|=this.CHANGE_SIZE,J.scrollerHeight=J.height,this.$horizScroll&&(J.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(J.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",w=w|this.CHANGE_SCROLL),y&&(oe||J.width!=y)){w|=this.CHANGE_SIZE,J.width=y,Yn==null&&(Yn=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=Yn,R.setStyle(this.scrollBarH.element.style,"left",Yn+"px"),R.setStyle(this.scroller.style,"left",Yn+this.margin.left+"px"),J.scrollerWidth=Math.max(0,y-Yn-this.scrollBarV.getWidth()-this.margin.h),R.setStyle(this.$gutter.style,"left",this.margin.left+"px");var Kn=this.scrollBarV.getWidth()+"px";R.setStyle(this.scrollBarH.element.style,"right",Kn),R.setStyle(this.scroller.style,"right",Kn),R.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(J.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||oe)&&(w|=this.CHANGE_FULL)}return J.$dirty=!y||!h,w&&this._signal("resize",He),w},Me.prototype.onGutterResize=function(oe){var Yn=this.$showGutter?oe:0;Yn!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,Yn,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()},Me.prototype.adjustWrapLimit=function(){var oe=this.$size.scrollerWidth-this.$padding*2,Yn=Math.floor(oe/this.characterWidth);return this.session.adjustWrapLimit(Yn,this.$showPrintMargin&&this.$printMarginColumn)},Me.prototype.setAnimatedScroll=function(oe){this.setOption("animatedScroll",oe)},Me.prototype.getAnimatedScroll=function(){return this.$animatedScroll},Me.prototype.setShowInvisibles=function(oe){this.setOption("showInvisibles",oe),this.session.$bidiHandler.setShowInvisibles(oe)},Me.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},Me.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},Me.prototype.setDisplayIndentGuides=function(oe){this.setOption("displayIndentGuides",oe)},Me.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},Me.prototype.setHighlightIndentGuides=function(oe){this.setOption("highlightIndentGuides",oe)},Me.prototype.setShowPrintMargin=function(oe){this.setOption("showPrintMargin",oe)},Me.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},Me.prototype.setPrintMarginColumn=function(oe){this.setOption("printMarginColumn",oe)},Me.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},Me.prototype.getShowGutter=function(){return this.getOption("showGutter")},Me.prototype.setShowGutter=function(oe){return this.setOption("showGutter",oe)},Me.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},Me.prototype.setFadeFoldWidgets=function(oe){this.setOption("fadeFoldWidgets",oe)},Me.prototype.setHighlightGutterLine=function(oe){this.setOption("highlightGutterLine",oe)},Me.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},Me.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var oe=R.createElement("div");oe.className="ace_layer ace_print-margin-layer",this.$printMarginEl=R.createElement("div"),this.$printMarginEl.className="ace_print-margin",oe.appendChild(this.$printMarginEl),this.content.insertBefore(oe,this.content.firstChild)}var Yn=this.$printMarginEl.style;Yn.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",Yn.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},Me.prototype.getContainerElement=function(){return this.container},Me.prototype.getMouseEventTarget=function(){return this.scroller},Me.prototype.getTextAreaContainer=function(){return this.container},Me.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var oe=this.textarea.style,Yn=this.$composition;if(!this.$keepTextAreaAtCursor&&!Yn){R.translate(this.textarea,-100,0);return}var y=this.$cursorLayer.$pixelPos;if(y){Yn&&Yn.markerRange&&(y=this.$cursorLayer.getPixelPosition(Yn.markerRange.start,!0));var h=this.layerConfig,w=y.top,J=y.left;w-=h.offset;var He=Yn&&Yn.useTextareaForIME||S.isMobile?this.lineHeight:1;if(w<0||w>h.height-He){R.translate(this.textarea,0,0);return}var Kn=1,Qn=this.$size.height-He;if(!Yn)w+=this.lineHeight;else if(Yn.useTextareaForIME){var Zn=this.textarea.value;Kn=this.characterWidth*this.session.$getStringScreenWidth(Zn)[0]}else w+=this.lineHeight+2;J-=this.scrollLeft,J>this.$size.scrollerWidth-Kn&&(J=this.$size.scrollerWidth-Kn),J+=this.gutterWidth+this.margin.left,R.setStyle(oe,"height",He+"px"),R.setStyle(oe,"width",Kn+"px"),R.translate(this.textarea,Math.min(J,this.$size.scrollerWidth-Kn),Math.min(w,Qn))}}},Me.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},Me.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},Me.prototype.getLastFullyVisibleRow=function(){var oe=this.layerConfig,Yn=oe.lastRow,y=this.session.documentToScreenRow(Yn,0)*oe.lineHeight;return y-this.session.getScrollTop()>oe.height-oe.lineHeight?Yn-1:Yn},Me.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},Me.prototype.setPadding=function(oe){this.$padding=oe,this.$textLayer.setPadding(oe),this.$cursorLayer.setPadding(oe),this.$markerFront.setPadding(oe),this.$markerBack.setPadding(oe),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},Me.prototype.setScrollMargin=function(oe,Yn,y,h){var w=this.scrollMargin;w.top=oe|0,w.bottom=Yn|0,w.right=h|0,w.left=y|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()},Me.prototype.setMargin=function(oe,Yn,y,h){var w=this.margin;w.top=oe|0,w.bottom=Yn|0,w.right=h|0,w.left=y|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()},Me.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},Me.prototype.setHScrollBarAlwaysVisible=function(oe){this.setOption("hScrollBarAlwaysVisible",oe)},Me.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},Me.prototype.setVScrollBarAlwaysVisible=function(oe){this.setOption("vScrollBarAlwaysVisible",oe)},Me.prototype.$updateScrollBarV=function(){var oe=this.layerConfig.maxHeight,Yn=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(oe-=(Yn-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>oe-Yn&&(oe=this.scrollTop+Yn,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(oe+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},Me.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},Me.prototype.freeze=function(){this.$frozen=!0},Me.prototype.unfreeze=function(){this.$frozen=!1},Me.prototype.$renderChanges=function(oe,Yn){if(this.$changes&&(oe|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!oe&&!Yn){this.$changes|=oe;return}if(this.$size.$dirty)return this.$changes|=oe,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",oe),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var y=this.layerConfig;if(oe&this.CHANGE_FULL||oe&this.CHANGE_SIZE||oe&this.CHANGE_TEXT||oe&this.CHANGE_LINES||oe&this.CHANGE_SCROLL||oe&this.CHANGE_H_SCROLL){if(oe|=this.$computeLayerConfig()|this.$loop.clear(),y.firstRow!=this.layerConfig.firstRow&&y.firstRowScreen==this.layerConfig.firstRowScreen){var h=this.scrollTop+(y.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;h>0&&(this.scrollTop=h,oe=oe|this.CHANGE_SCROLL,oe|=this.$computeLayerConfig()|this.$loop.clear())}y=this.layerConfig,this.$updateScrollBarV(),oe&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),R.translate(this.content,-this.scrollLeft,-y.offset);var w=y.width+2*this.$padding+"px",J=y.minHeight+"px";R.setStyle(this.content.style,"width",w),R.setStyle(this.content.style,"height",J)}if(oe&this.CHANGE_H_SCROLL&&(R.translate(this.content,-this.scrollLeft,-y.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),oe&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(y),this.$showGutter&&this.$gutterLayer.update(y),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(y),this.$markerBack.update(y),this.$markerFront.update(y),this.$cursorLayer.update(y),this.$moveTextAreaToCursor(),this._signal("afterRender",oe);return}if(oe&this.CHANGE_SCROLL){this.$changedLines=null,oe&this.CHANGE_TEXT||oe&this.CHANGE_LINES?this.$textLayer.update(y):this.$textLayer.scrollLines(y),this.$showGutter&&(oe&this.CHANGE_GUTTER||oe&this.CHANGE_LINES?this.$gutterLayer.update(y):this.$gutterLayer.scrollLines(y)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(y),this.$markerBack.update(y),this.$markerFront.update(y),this.$cursorLayer.update(y),this.$moveTextAreaToCursor(),this._signal("afterRender",oe);return}oe&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(y),this.$showGutter&&this.$gutterLayer.update(y),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(y)):oe&this.CHANGE_LINES?((this.$updateLines()||oe&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(y),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(y)):oe&this.CHANGE_TEXT||oe&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(y),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(y)):oe&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(y),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(y)),oe&this.CHANGE_CURSOR&&(this.$cursorLayer.update(y),this.$moveTextAreaToCursor()),oe&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(y),oe&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(y),this._signal("afterRender",oe)},Me.prototype.$autosize=function(){var oe=this.session.getScreenLength()*this.lineHeight,Yn=this.$maxLines*this.lineHeight,y=Math.min(Yn,Math.max((this.$minLines||1)*this.lineHeight,oe))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(y+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&y>this.$maxPixelHeight&&(y=this.$maxPixelHeight);var h=y<=2*this.lineHeight,w=!h&&oe>Yn;if(y!=this.desiredHeight||this.$size.height!=this.desiredHeight||w!=this.$vScroll){w!=this.$vScroll&&(this.$vScroll=w,this.scrollBarV.setVisible(w));var J=this.container.clientWidth;this.container.style.height=y+"px",this.$updateCachedSize(!0,this.$gutterWidth,J,y),this.desiredHeight=y,this._signal("autosize")}},Me.prototype.$computeLayerConfig=function(){var oe=this.session,Yn=this.$size,y=Yn.height<=2*this.lineHeight,h=this.session.getScreenLength(),w=h*this.lineHeight,J=this.$getLongestLine(),He=!y&&(this.$hScrollBarAlwaysVisible||Yn.scrollerWidth-J-2*this.$padding<0),Kn=this.$horizScroll!==He;Kn&&(this.$horizScroll=He,this.scrollBarH.setVisible(He));var Qn=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var Zn=Yn.scrollerHeight+this.lineHeight,Xn=!this.$maxLines&&this.$scrollPastEnd?(Yn.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;w+=Xn;var ei=this.scrollMargin;this.session.setScrollTop(Math.max(-ei.top,Math.min(this.scrollTop,w-Yn.scrollerHeight+ei.bottom))),this.session.setScrollLeft(Math.max(-ei.left,Math.min(this.scrollLeft,J+2*this.$padding-Yn.scrollerWidth+ei.right)));var ri=!y&&(this.$vScrollBarAlwaysVisible||Yn.scrollerHeight-w+Xn<0||this.scrollTop>ei.top),Jn=Qn!==ri;Jn&&(this.$vScroll=ri,this.scrollBarV.setVisible(ri));var ti=this.scrollTop%this.lineHeight,ii=Math.ceil(Zn/this.lineHeight)-1,ni=Math.max(0,Math.round((this.scrollTop-ti)/this.lineHeight)),si=ni+ii,li,ci,ai=this.lineHeight;ni=oe.screenToDocumentRow(ni,0);var ui=oe.getFoldLine(ni);ui&&(ni=ui.start.row),li=oe.documentToScreenRow(ni,0),ci=oe.getRowLength(ni)*ai,si=Math.min(oe.screenToDocumentRow(si,0),oe.getLength()-1),Zn=Yn.scrollerHeight+oe.getRowLength(si)*ai+ci,ti=this.scrollTop-li*ai;var mi=0;return(this.layerConfig.width!=J||Kn)&&(mi=this.CHANGE_H_SCROLL),(Kn||Jn)&&(mi|=this.$updateCachedSize(!0,this.gutterWidth,Yn.width,Yn.height),this._signal("scrollbarVisibilityChanged"),Jn&&(J=this.$getLongestLine())),this.layerConfig={width:J,padding:this.$padding,firstRow:ni,firstRowScreen:li,lastRow:si,lineHeight:ai,characterWidth:this.characterWidth,minHeight:Zn,maxHeight:w,offset:ti,gutterOffset:ai?Math.max(0,Math.ceil((ti+Yn.height-Yn.scrollerHeight)/ai)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(J-this.$padding),mi},Me.prototype.$updateLines=function(){if(this.$changedLines){var oe=this.$changedLines.firstRow,Yn=this.$changedLines.lastRow;this.$changedLines=null;var y=this.layerConfig;if(!(oe>y.lastRow+1)&&!(Yn<y.firstRow)){if(Yn===1/0){this.$showGutter&&this.$gutterLayer.update(y),this.$textLayer.update(y);return}return this.$textLayer.updateLines(y,oe,Yn),!0}}},Me.prototype.$getLongestLine=function(){var oe=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(oe+=1),this.$textLayer&&oe>this.$textLayer.MAX_LINE_LENGTH&&(oe=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(oe*this.characterWidth))},Me.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},Me.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},Me.prototype.addGutterDecoration=function(oe,Yn){this.$gutterLayer.addGutterDecoration(oe,Yn)},Me.prototype.removeGutterDecoration=function(oe,Yn){this.$gutterLayer.removeGutterDecoration(oe,Yn)},Me.prototype.updateBreakpoints=function(oe){this._rows=oe,this.$loop.schedule(this.CHANGE_GUTTER)},Me.prototype.setAnnotations=function(oe){this.$gutterLayer.setAnnotations(oe),this.$loop.schedule(this.CHANGE_GUTTER)},Me.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},Me.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},Me.prototype.showCursor=function(){this.$cursorLayer.showCursor()},Me.prototype.scrollSelectionIntoView=function(oe,Yn,y){this.scrollCursorIntoView(oe,y),this.scrollCursorIntoView(Yn,y)},Me.prototype.scrollCursorIntoView=function(oe,Yn,y){if(this.$size.scrollerHeight!==0){var h=this.$cursorLayer.getPixelPosition(oe),w=h.left,J=h.top,He=y&&y.top||0,Kn=y&&y.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var Qn=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;Qn+He>J?(Yn&&Qn+He>J+this.lineHeight&&(J-=Yn*this.$size.scrollerHeight),J===0&&(J=-this.scrollMargin.top),this.session.setScrollTop(J)):Qn+this.$size.scrollerHeight-Kn<J+this.lineHeight&&(Yn&&Qn+this.$size.scrollerHeight-Kn<J-this.lineHeight&&(J+=Yn*this.$size.scrollerHeight),this.session.setScrollTop(J+this.lineHeight+Kn-this.$size.scrollerHeight));var Zn=this.scrollLeft,Xn=2*this.layerConfig.characterWidth;w-Xn<Zn?(w-=Xn,w<this.$padding+Xn&&(w=-this.scrollMargin.left),this.session.setScrollLeft(w)):(w+=Xn,Zn+this.$size.scrollerWidth<w+this.characterWidth?this.session.setScrollLeft(Math.round(w+this.characterWidth-this.$size.scrollerWidth)):Zn<=this.$padding&&w-Zn<this.characterWidth&&this.session.setScrollLeft(0))}},Me.prototype.getScrollTop=function(){return this.session.getScrollTop()},Me.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},Me.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},Me.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},Me.prototype.scrollToRow=function(oe){this.session.setScrollTop(oe*this.lineHeight)},Me.prototype.alignCursor=function(oe,Yn){typeof oe=="number"&&(oe={row:oe,column:0});var y=this.$cursorLayer.getPixelPosition(oe),h=this.$size.scrollerHeight-this.lineHeight,w=y.top-h*(Yn||0);return this.session.setScrollTop(w),w},Me.prototype.$calcSteps=function(oe,Yn){var y=0,h=this.STEPS,w=[],J=function(He,Kn,Qn){return Qn*(Math.pow(He-1,3)+1)+Kn};for(y=0;y<h;++y)w.push(J(y/this.STEPS,oe,Yn-oe));return w},Me.prototype.scrollToLine=function(oe,Yn,y,h){var w=this.$cursorLayer.getPixelPosition({row:oe,column:0}),J=w.top;Yn&&(J-=this.$size.scrollerHeight/2);var He=this.scrollTop;this.session.setScrollTop(J),y!==!1&&this.animateScrolling(He,h)},Me.prototype.animateScrolling=function(oe,Yn){var y=this.scrollTop;if(!this.$animatedScroll)return;var h=this;if(oe==y)return;if(this.$scrollAnimation){var w=this.$scrollAnimation.steps;if(w.length&&(oe=w[0],oe==y))return}var J=h.$calcSteps(oe,y);this.$scrollAnimation={from:oe,to:y,steps:J},clearInterval(this.$timer),h.session.setScrollTop(J.shift()),h.session.$scrollTop=y;function He(){h.$timer=clearInterval(h.$timer),h.$scrollAnimation=null,h.$stopAnimation=!1,Yn&&Yn()}this.$timer=setInterval(function(){if(h.$stopAnimation){He();return}if(!h.session)return clearInterval(h.$timer);J.length?(h.session.setScrollTop(J.shift()),h.session.$scrollTop=y):y!=null?(h.session.$scrollTop=-1,h.session.setScrollTop(y),y=null):He()},10)},Me.prototype.scrollToY=function(oe){this.scrollTop!==oe&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=oe)},Me.prototype.scrollToX=function(oe){this.scrollLeft!==oe&&(this.scrollLeft=oe),this.$loop.schedule(this.CHANGE_H_SCROLL)},Me.prototype.scrollTo=function(oe,Yn){this.session.setScrollTop(Yn),this.session.setScrollLeft(oe)},Me.prototype.scrollBy=function(oe,Yn){Yn&&this.session.setScrollTop(this.session.getScrollTop()+Yn),oe&&this.session.setScrollLeft(this.session.getScrollLeft()+oe)},Me.prototype.isScrollableBy=function(oe,Yn){if(Yn<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||Yn>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||oe<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||oe>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},Me.prototype.pixelToScreenCoordinates=function(oe,Yn){var y;if(this.$hasCssTransforms){y={top:0,left:0};var h=this.$fontMetrics.transformCoordinates([oe,Yn]);oe=h[1]-this.gutterWidth-this.margin.left,Yn=h[0]}else y=this.scroller.getBoundingClientRect();var w=oe+this.scrollLeft-y.left-this.$padding,J=w/this.characterWidth,He=Math.floor((Yn+this.scrollTop-y.top)/this.lineHeight),Kn=this.$blockCursor?Math.floor(J):Math.round(J);return{row:He,column:Kn,side:J-Kn>0?1:-1,offsetX:w}},Me.prototype.screenToTextCoordinates=function(oe,Yn){var y;if(this.$hasCssTransforms){y={top:0,left:0};var h=this.$fontMetrics.transformCoordinates([oe,Yn]);oe=h[1]-this.gutterWidth-this.margin.left,Yn=h[0]}else y=this.scroller.getBoundingClientRect();var w=oe+this.scrollLeft-y.left-this.$padding,J=w/this.characterWidth,He=this.$blockCursor?Math.floor(J):Math.round(J),Kn=Math.floor((Yn+this.scrollTop-y.top)/this.lineHeight);return this.session.screenToDocumentPosition(Kn,Math.max(He,0),w)},Me.prototype.textToScreenCoordinates=function(oe,Yn){var y=this.scroller.getBoundingClientRect(),h=this.session.documentToScreenPosition(oe,Yn),w=this.$padding+(this.session.$bidiHandler.isBidiRow(h.row,oe)?this.session.$bidiHandler.getPosLeft(h.column):Math.round(h.column*this.characterWidth)),J=h.row*this.lineHeight;return{pageX:y.left+w-this.scrollLeft,pageY:y.top+J-this.scrollTop}},Me.prototype.visualizeFocus=function(){R.addCssClass(this.container,"ace_focus")},Me.prototype.visualizeBlur=function(){R.removeCssClass(this.container,"ace_focus")},Me.prototype.showComposition=function(oe){this.$composition=oe,oe.cssText||(oe.cssText=this.textarea.style.cssText),oe.useTextareaForIME==null&&(oe.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(R.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):oe.markerId=this.session.addMarker(oe.markerRange,"ace_composition_marker","text")},Me.prototype.setCompositionText=function(oe){var Yn=this.session.selection.cursor;this.addToken(oe,"composition_placeholder",Yn.row,Yn.column),this.$moveTextAreaToCursor()},Me.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),R.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var oe=this.session.selection.cursor;this.removeExtraToken(oe.row,oe.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},Me.prototype.setGhostText=function(oe,Yn){var y=this.session.selection.cursor,h=Yn||{row:y.row,column:y.column};this.removeGhostText();var w=this.$calculateWrappedTextChunks(oe,h);this.addToken(w[0].text,"ghost_text",h.row,h.column),this.$ghostText={text:oe,position:{row:h.row,column:h.column}};var J=R.createElement("div");if(w.length>1){var He=this.hideTokensAfterPosition(h.row,h.column),Kn;w.slice(1).forEach(function(Jn){var ti=R.createElement("div"),ii=R.createElement("span");ii.className="ace_ghost_text",Jn.wrapped&&(ti.className="ghost_text_line_wrapped"),Jn.text.length===0&&(Jn.text=" "),ii.appendChild(R.createTextNode(Jn.text)),ti.appendChild(ii),J.appendChild(ti),Kn=ti}),He.forEach(function(Jn){var ti=R.createElement("span");Ae(Jn.type)||(ti.className="ace_"+Jn.type.replace(/\./g," ace_")),ti.appendChild(R.createTextNode(Jn.value)),Kn.appendChild(ti)}),this.$ghostTextWidget={el:J,row:h.row,column:h.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var Qn=this.$cursorLayer.getPixelPosition(h,!0),Zn=this.container,Xn=Zn.getBoundingClientRect().height,ei=w.length*this.lineHeight,ri=ei<Xn-Qn.top;if(ri)return;ei<Xn?this.scrollBy(0,(w.length-1)*this.lineHeight):this.scrollToRow(h.row)}},Me.prototype.$calculateWrappedTextChunks=function(oe,Yn){var y=this.$size.scrollerWidth-this.$padding*2,h=Math.floor(y/this.characterWidth)-2;h=h<=0?60:h;for(var w=oe.split(/\r?\n/),J=[],He=0;He<w.length;He++){var Kn=this.session.$getDisplayTokens(w[He],Yn.column),Qn=this.session.$computeWrapSplits(Kn,h,this.session.$tabSize);if(Qn.length>0){var Zn=0;Qn.push(w[He].length);for(var Xn=0;Xn<Qn.length;Xn++){var ei=w[He].slice(Zn,Qn[Xn]);J.push({text:ei,wrapped:!0}),Zn=Qn[Xn]}}else J.push({text:w[He],wrapped:!1})}return J},Me.prototype.removeGhostText=function(){if(this.$ghostText){var oe=this.$ghostText.position;this.removeExtraToken(oe.row,oe.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},Me.prototype.addToken=function(oe,Yn,y,h){var w=this.session;w.bgTokenizer.lines[y]=null;var J={type:Yn,value:oe},He=w.getTokens(y);if(h==null||!He.length)He.push(J);else for(var Kn=0,Qn=0;Qn<He.length;Qn++){var Zn=He[Qn];if(Kn+=Zn.value.length,h<=Kn){var Xn=Zn.value.length-(Kn-h),ei=Zn.value.slice(0,Xn),ri=Zn.value.slice(Xn);He.splice(Qn,1,{type:Zn.type,value:ei},J,{type:Zn.type,value:ri});break}}this.updateLines(y,y)},Me.prototype.hideTokensAfterPosition=function(oe,Yn){for(var y=this.session.getTokens(oe),h=0,w=!1,J=[],He=0;He<y.length;He++){var Kn=y[He];if(h+=Kn.value.length,Kn.type!=="ghost_text"){if(w){J.push({type:Kn.type,value:Kn.value}),Kn.type="hidden_token";continue}h===Yn&&(w=!0)}}return this.updateLines(oe,oe),J},Me.prototype.removeExtraToken=function(oe,Yn){this.session.bgTokenizer.lines[oe]=null,this.updateLines(oe,oe)},Me.prototype.setTheme=function(oe,Yn){var y=this;if(this.$themeId=oe,y._dispatchEvent("themeChange",{theme:oe}),!oe||typeof oe=="string"){var h=oe||this.$options.theme.initialValue;l.loadModule(["theme",h],w)}else w(oe);function w(J){if(y.$themeId!=oe)return Yn&&Yn();if(!J||!J.cssClass)throw new Error("couldn't load module "+oe+" or it didn't call define");J.$id&&(y.$themeId=J.$id),R.importCssString(J.cssText,J.cssClass,y.container),y.theme&&R.removeCssClass(y.container,y.theme.cssClass);var He="padding"in J?J.padding:"padding"in(y.theme||{})?4:y.$padding;y.$padding&&He!=y.$padding&&y.setPadding(He),y.$theme=J.cssClass,y.theme=J,R.addCssClass(y.container,J.cssClass),R.setCssClass(y.container,"ace_dark",J.isDark),y.$size&&(y.$size.width=0,y.$updateSizeAsync()),y._dispatchEvent("themeLoaded",{theme:J}),Yn&&Yn(),S.isSafari&&y.scroller&&(y.scroller.style.background="red",y.scroller.style.background="")}},Me.prototype.getTheme=function(){return this.$themeId},Me.prototype.setStyle=function(oe,Yn){R.setCssClass(this.container,oe,Yn!==!1)},Me.prototype.unsetStyle=function(oe){R.removeCssClass(this.container,oe)},Me.prototype.setCursorStyle=function(oe){R.setStyle(this.scroller.style,"cursor",oe)},Me.prototype.setMouseCursor=function(oe){R.setStyle(this.scroller.style,"cursor",oe)},Me.prototype.attachToShadowRoot=function(){R.importCssString(F,"ace_editor.css",this.container)},Me.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},Me.prototype.$updateCustomScrollbar=function(oe){var Yn=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,oe===!0?(this.scrollBarV=new a(this.container,this),this.scrollBarH=new n(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(y){Yn.$scrollAnimation||Yn.session.setScrollTop(y.data-Yn.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(y){Yn.$scrollAnimation||Yn.session.setScrollLeft(y.data-Yn.scrollMargin.left)}),this.$scrollDecorator=new _(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new e(this.container,this),this.scrollBarH=new t(this.container,this),this.scrollBarV.addEventListener("scroll",function(y){Yn.$scrollAnimation||Yn.session.setScrollTop(y.data-Yn.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(y){Yn.$scrollAnimation||Yn.session.setScrollLeft(y.data-Yn.scrollMargin.left)}))},Me.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var oe=this;this.$resizeTimer=M.delayedCall(function(){oe.destroyed||oe.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(Yn){var y=Yn[0].contentRect.width,h=Yn[0].contentRect.height;Math.abs(oe.$size.width-y)>1||Math.abs(oe.$size.height-h)>1?oe.$resizeTimer.delay():oe.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},Me}();Vn.prototype.CHANGE_CURSOR=1,Vn.prototype.CHANGE_MARKER=2,Vn.prototype.CHANGE_GUTTER=4,Vn.prototype.CHANGE_SCROLL=8,Vn.prototype.CHANGE_LINES=16,Vn.prototype.CHANGE_TEXT=32,Vn.prototype.CHANGE_SIZE=64,Vn.prototype.CHANGE_MARKER_BACK=128,Vn.prototype.CHANGE_MARKER_FRONT=256,Vn.prototype.CHANGE_FULL=512,Vn.prototype.CHANGE_H_SCROLL=1024,Vn.prototype.$changes=0,Vn.prototype.$padding=null,Vn.prototype.$frozen=!1,Vn.prototype.STEPS=8,Q.implement(Vn.prototype,xe),l.defineOptions(Vn.prototype,"renderer",{useResizeObserver:{set:function(Me){!Me&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):Me&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(Me){this.$textLayer.setShowInvisibles(Me)&&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(Me){typeof Me=="number"&&(this.$printMarginColumn=Me),this.$showPrintMargin=!!Me,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(Me){this.$gutter.style.display=Me?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(Me){this.$gutterLayer.$useSvgGutterIcons=Me},initialValue:!1},showFoldedAnnotations:{set:function(Me){this.$gutterLayer.$showFoldedAnnotations=Me},initialValue:!1},fadeFoldWidgets:{set:function(Me){R.setCssClass(this.$gutter,"ace_fade-fold-widgets",Me)},initialValue:!1},showFoldWidgets:{set:function(Me){this.$gutterLayer.setShowFoldWidgets(Me),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(Me){this.$textLayer.setDisplayIndentGuides(Me)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(Me){this.$textLayer.setHighlightIndentGuides(Me)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(Me){this.$gutterLayer.setHighlightGutterLine(Me),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(Me){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(Me){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(Me){typeof Me=="number"&&(Me=Me+"px"),this.container.style.fontSize=Me,this.updateFontSize()},initialValue:12},fontFamily:{set:function(Me){this.container.style.fontFamily=Me,this.updateFontSize()}},maxLines:{set:function(Me){this.updateFull()}},minLines:{set:function(Me){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(Me){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(Me){Me=+Me||0,this.$scrollPastEnd!=Me&&(this.$scrollPastEnd=Me,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(Me){this.$gutterLayer.$fixedWidth=!!Me,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(Me){this.$updateCustomScrollbar(Me)},initialValue:!1},theme:{set:function(Me){this.setTheme(Me)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!S.isMobile&&!S.isIE}}),m.VirtualRenderer=Vn}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(p,m,Gn){var Q=p("../lib/oop"),R=p("../lib/net"),M=p("../lib/event_emitter").EventEmitter,l=p("../config");function u(t){var e="importScripts('"+R.qualifyURL(t)+"');";try{return new Blob([e],{type:"application/javascript"})}catch{var n=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,a=new n;return a.append(e),a.getBlob("application/javascript")}}function o(t){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(l.get("loadWorkerFromBlob")){var e=u(t),n=window.URL||window.webkitURL,a=n.createObjectURL(e);return new Worker(a)}return new Worker(t)}var i=function(t){t.postMessage||(t=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=t,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){Q.implement(this,M),this.$createWorkerFromOldConfig=function(t,e,n,a,d){if(p.nameToUrl&&!p.toUrl&&(p.toUrl=p.nameToUrl),l.get("packaged")||!p.toUrl)a=a||l.moduleUrl(e,"worker");else{var f=this.$normalizePath;a=a||f(p.toUrl("ace/worker/worker.js",null,"_"));var xe={};t.forEach(function(F){xe[F]=f(p.toUrl(F,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=o(a),d&&this.send("importScripts",d),this.$worker.postMessage({init:!0,tlns:xe,module:e,classname:n}),this.$worker},this.onMessage=function(t){var e=t.data;switch(e.type){case"event":this._signal(e.name,{data:e.data});break;case"call":var n=this.callbacks[e.id];n&&(n(e.data),delete this.callbacks[e.id]);break;case"error":this.reportError(e.data);break;case"log":window.console&&console.log&&console.log.apply(console,e.data);break}},this.reportError=function(t){window.console&&console.error&&console.error(t)},this.$normalizePath=function(t){return R.qualifyURL(t)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(t){t.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(t,e){this.$worker.postMessage({command:t,args:e})},this.call=function(t,e,n){if(n){var a=this.callbackId++;this.callbacks[a]=n,e.push(a)}this.send(t,e)},this.emit=function(t,e){try{e.data&&e.data.err&&(e.data.err={message:e.data.err.message,stack:e.data.err.stack,code:e.data.err.code}),this.$worker&&this.$worker.postMessage({event:t,data:{data:e.data}})}catch(n){console.error(n.stack)}},this.attachToDocument=function(t){this.$doc&&this.terminate(),this.$doc=t,this.call("setValue",[t.getValue()]),t.on("change",this.changeListener,!0)},this.changeListener=function(t){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),t.action=="insert"?this.deltaQueue.push(t.start,t.lines):this.deltaQueue.push(t.start,t.end)},this.$sendDeltaQueue=function(){var t=this.deltaQueue;t&&(this.deltaQueue=null,t.length>50&&t.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:t}))}}).call(i.prototype);var r=function(t,e,n){var a=null,d=!1,f=Object.create(M),xe=[],F=new i({messageBuffer:xe,terminate:function(){},postMessage:function(S){xe.push(S),a&&(d?setTimeout(_):_())}});F.setEmitSync=function(S){d=S};var _=function(){var S=xe.shift();S.command?a[S.command].apply(a,S.args):S.event&&f._signal(S.event,S.data)};return f.postMessage=function(S){F.onMessage({data:S})},f.callback=function(S,Ae){this.postMessage({type:"call",id:Ae,data:S})},f.emit=function(S,Ae){this.postMessage({type:"event",name:S,data:Ae})},l.loadModule(["worker",e],function(S){for(a=new S[n](f);xe.length;)_()}),F};m.UIWorkerClient=r,m.WorkerClient=i,m.createWorker=o}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(p,m,Gn){var Q=p("./range").Range,R=p("./lib/event_emitter").EventEmitter,M=p("./lib/oop"),l=function(){function u(o,i,r,t,e,n){var a=this;this.length=i,this.session=o,this.doc=o.getDocument(),this.mainClass=e,this.othersClass=n,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=t,this.$onCursorChange=function(){setTimeout(function(){a.onCursorChange()})},this.$pos=r;var d=o.getUndoManager().$undoStack||o.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=d.length,this.setup(),o.selection.on("changeCursor",this.$onCursorChange)}return u.prototype.setup=function(){var o=this,i=this.doc,r=this.session;this.selectionBefore=r.selection.toJSON(),r.selection.inMultiSelectMode&&r.selection.toSingleRange(),this.pos=i.createAnchor(this.$pos.row,this.$pos.column);var t=this.pos;t.$insertRight=!0,t.detach(),t.markerId=r.addMarker(new Q(t.row,t.column,t.row,t.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(e){var n=i.createAnchor(e.row,e.column);n.$insertRight=!0,n.detach(),o.others.push(n)}),r.setUndoSelect(!1)},u.prototype.showOtherMarkers=function(){if(!this.othersActive){var o=this.session,i=this;this.othersActive=!0,this.others.forEach(function(r){r.markerId=o.addMarker(new Q(r.row,r.column,r.row,r.column+i.length),i.othersClass,null,!1)})}},u.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var o=0;o<this.others.length;o++)this.session.removeMarker(this.others[o].markerId)}},u.prototype.onUpdate=function(o){if(this.$updating)return this.updateAnchors(o);var i=o;if(i.start.row===i.end.row&&i.start.row===this.pos.row){this.$updating=!0;var r=o.action==="insert"?i.end.column-i.start.column:i.start.column-i.end.column,t=i.start.column>=this.pos.column&&i.start.column<=this.pos.column+this.length+1,e=i.start.column-this.pos.column;if(this.updateAnchors(o),t&&(this.length+=r),t&&!this.session.$fromUndo){if(o.action==="insert")for(var n=this.others.length-1;n>=0;n--){var a=this.others[n],d={row:a.row,column:a.column+e};this.doc.insertMergedLines(d,o.lines)}else if(o.action==="remove")for(var n=this.others.length-1;n>=0;n--){var a=this.others[n],d={row:a.row,column:a.column+e};this.doc.remove(new Q(d.row,d.column,d.row,d.column-r))}}this.$updating=!1,this.updateMarkers()}},u.prototype.updateAnchors=function(o){this.pos.onChange(o);for(var i=this.others.length;i--;)this.others[i].onChange(o);this.updateMarkers()},u.prototype.updateMarkers=function(){if(!this.$updating){var o=this,i=this.session,r=function(e,n){i.removeMarker(e.markerId),e.markerId=i.addMarker(new Q(e.row,e.column,e.row,e.column+o.length),n,null,!1)};r(this.pos,this.mainClass);for(var t=this.others.length;t--;)r(this.others[t],this.othersClass)}},u.prototype.onCursorChange=function(o){if(!(this.$updating||!this.session)){var i=this.session.selection.getCursor();i.row===this.pos.row&&i.column>=this.pos.column&&i.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",o)):(this.hideOtherMarkers(),this._emit("cursorLeave",o))}},u.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},u.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var o=this.session.getUndoManager(),i=(o.$undoStack||o.$undostack).length-this.$undoStackDepth,r=0;r<i;r++)o.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},u}();M.implement(l.prototype,R),m.PlaceHolder=l}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(p,m,Gn){var Q=p("../lib/event"),R=p("../lib/useragent");function M(u,o){return u.row==o.row&&u.column==o.column}function l(u){var o=u.domEvent,i=o.altKey,r=o.shiftKey,t=o.ctrlKey,e=u.getAccelKey(),n=u.getButton();if(t&&R.isMac&&(n=o.button),u.editor.inMultiSelectMode&&n==2){u.editor.textInput.onContextMenu(u.domEvent);return}if(!t&&!i&&!e){n===0&&u.editor.inMultiSelectMode&&u.editor.exitMultiSelectMode();return}if(n===0){var a=u.editor,d=a.selection,f=a.inMultiSelectMode,xe=u.getDocumentPosition(),F=d.getCursor(),_=u.inSelection()||d.isEmpty()&&M(xe,F),S=u.x,Ae=u.y,Vn=function(ei){S=ei.clientX,Ae=ei.clientY},Me=a.session,oe=a.renderer.pixelToScreenCoordinates(S,Ae),Yn=oe,y;if(a.$mouseHandler.$enableJumpToDef)t&&i||e&&i?y=r?"block":"add":i&&a.$blockSelectEnabled&&(y="block");else if(e&&!i){if(y="add",!f&&r)return}else i&&a.$blockSelectEnabled&&(y="block");if(y&&R.isMac&&o.ctrlKey&&a.$mouseHandler.cancelContextMenu(),y=="add"){if(!f&&_)return;if(!f){var h=d.toOrientedRange();a.addSelectionMarker(h)}var w=d.rangeList.rangeAtPoint(xe);a.inVirtualSelectionMode=!0,r&&(w=null,h=d.ranges[0]||h,a.removeSelectionMarker(h)),a.once("mouseup",function(){var ei=d.toOrientedRange();w&&ei.isEmpty()&&M(w.cursor,ei.cursor)?d.substractPoint(ei.cursor):(r?d.substractPoint(h.cursor):h&&(a.removeSelectionMarker(h),d.addRange(h)),d.addRange(ei)),a.inVirtualSelectionMode=!1})}else if(y=="block"){u.stop(),a.inVirtualSelectionMode=!0;var J,He=[],Kn=function(){var ei=a.renderer.pixelToScreenCoordinates(S,Ae),ri=Me.screenToDocumentPosition(ei.row,ei.column,ei.offsetX);M(Yn,ei)&&M(ri,d.lead)||(Yn=ei,a.selection.moveToPosition(ri),a.renderer.scrollCursorIntoView(),a.removeSelectionMarkers(He),He=d.rectangularRangeBlock(Yn,oe),a.$mouseHandler.$clickSelection&&He.length==1&&He[0].isEmpty()&&(He[0]=a.$mouseHandler.$clickSelection.clone()),He.forEach(a.addSelectionMarker,a),a.updateSelectionMarkers())};f&&!e?d.toSingleRange():!f&&e&&(J=d.toOrientedRange(),a.addSelectionMarker(J)),r?oe=Me.documentToScreenPosition(d.lead):d.moveToPosition(xe),Yn={row:-1,column:-1};var Qn=function(ei){Kn(),clearInterval(Xn),a.removeSelectionMarkers(He),He.length||(He=[d.toOrientedRange()]),J&&(a.removeSelectionMarker(J),d.toSingleRange(J));for(var ri=0;ri<He.length;ri++)d.addRange(He[ri]);a.inVirtualSelectionMode=!1,a.$mouseHandler.$clickSelection=null},Zn=Kn;Q.capture(a.container,Vn,Qn);var Xn=setInterval(function(){Zn()},20);return u.preventDefault()}}}m.onMouseDown=l}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(p,m,Gn){m.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(R){R.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(R){R.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(R){R.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(R){R.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(R){R.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(R){R.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(R){R.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(R){R.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(R){R.multiSelect.rangeCount>1?R.multiSelect.joinSelections():R.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(R){R.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(R){R.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(R){R.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],m.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(R){R.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(R){return R&&R.inMultiSelectMode}}];var Q=p("../keyboard/hash_handler").HashHandler;m.keyboardHandler=new Q(m.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(p,m,Gn){var Q=p("./range_list").RangeList,R=p("./range").Range,M=p("./selection").Selection,l=p("./mouse/multi_select_handler").onMouseDown,u=p("./lib/event"),o=p("./lib/lang"),i=p("./commands/multi_select_commands");m.commands=i.defaultCommands.concat(i.multiSelectCommands);var r=p("./search").Search,t=new r;function e(F,_,S){return t.$options.wrap=!0,t.$options.needle=_,t.$options.backwards=S==-1,t.find(F)}var n=p("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(n.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(F,_){if(F){if(!this.inMultiSelectMode&&this.rangeCount===0){var S=this.toOrientedRange();if(this.rangeList.add(S),this.rangeList.add(F),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),_||this.fromOrientedRange(F);this.rangeList.removeAll(),this.rangeList.add(S),this.$onAddRange(S)}F.cursor||(F.cursor=F.end);var Ae=this.rangeList.add(F);return this.$onAddRange(F),Ae.length&&this.$onRemoveRange(Ae),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),_||this.fromOrientedRange(F)}},this.toSingleRange=function(F){F=F||this.ranges[0];var _=this.rangeList.removeAll();_.length&&this.$onRemoveRange(_),F&&this.fromOrientedRange(F)},this.substractPoint=function(F){var _=this.rangeList.substractPoint(F);if(_)return this.$onRemoveRange(_),_[0]},this.mergeOverlappingRanges=function(){var F=this.rangeList.merge();F.length&&this.$onRemoveRange(F)},this.$onAddRange=function(F){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(F),this._signal("addRange",{range:F})},this.$onRemoveRange=function(F){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var _=this.rangeList.ranges.pop();F.push(_),this.rangeCount=0}for(var S=F.length;S--;){var Ae=this.ranges.indexOf(F[S]);this.ranges.splice(Ae,1)}this._signal("removeRange",{ranges:F}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),_=_||this.ranges[0],_&&!_.isEqual(this.getRange())&&this.fromOrientedRange(_)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new Q,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var F=this.ranges.length?this.ranges:[this.getRange()],_=[],S=0;S<F.length;S++){var Ae=F[S],Vn=Ae.start.row,Me=Ae.end.row;if(Vn===Me)_.push(Ae.clone());else{for(_.push(new R(Vn,Ae.start.column,Vn,this.session.getLine(Vn).length));++Vn<Me;)_.push(this.getLineRange(Vn,!0));_.push(new R(Me,0,Me,Ae.end.column))}S==0&&!this.isBackwards()&&(_=_.reverse())}this.toSingleRange();for(var S=_.length;S--;)this.addRange(_[S])},this.joinSelections=function(){var F=this.rangeList.ranges,_=F[F.length-1],S=R.fromPoints(F[0].start,_.end);this.toSingleRange(),this.setSelectionRange(S,_.cursor==_.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var F=this.rangeList.ranges,_=F[F.length-1],S=R.fromPoints(F[0].start,_.end);this.toSingleRange(),this.setSelectionRange(S,_.cursor==_.start)}else{var Ae=this.session.documentToScreenPosition(this.cursor),Vn=this.session.documentToScreenPosition(this.anchor),Me=this.rectangularRangeBlock(Ae,Vn);Me.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(F,_,S){var Ae=[],Vn=F.column<_.column;if(Vn)var Me=F.column,oe=_.column,Yn=F.offsetX,y=_.offsetX;else var Me=_.column,oe=F.column,Yn=_.offsetX,y=F.offsetX;var h=F.row<_.row;if(h)var w=F.row,J=_.row;else var w=_.row,J=F.row;Me<0&&(Me=0),w<0&&(w=0),w==J&&(S=!0);for(var He,Kn=w;Kn<=J;Kn++){var Qn=R.fromPoints(this.session.screenToDocumentPosition(Kn,Me,Yn),this.session.screenToDocumentPosition(Kn,oe,y));if(Qn.isEmpty()){if(He&&d(Qn.end,He))break;He=Qn.end}Qn.cursor=Vn?Qn.start:Qn.end,Ae.push(Qn)}if(h&&Ae.reverse(),!S){for(var Zn=Ae.length-1;Ae[Zn].isEmpty()&&Zn>0;)Zn--;if(Zn>0)for(var Xn=0;Ae[Xn].isEmpty();)Xn++;for(var ei=Zn;ei>=Xn;ei--)Ae[ei].isEmpty()&&Ae.splice(ei,1)}return Ae}}).call(M.prototype);var a=p("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(F){F.cursor||(F.cursor=F.end);var _=this.getSelectionStyle();return F.marker=this.session.addMarker(F,"ace_selection",_),this.session.$selectionMarkers.push(F),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,F},this.removeSelectionMarker=function(F){if(F.marker){this.session.removeMarker(F.marker);var _=this.session.$selectionMarkers.indexOf(F);_!=-1&&this.session.$selectionMarkers.splice(_,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(F){for(var _=this.session.$selectionMarkers,S=F.length;S--;){var Ae=F[S];if(Ae.marker){this.session.removeMarker(Ae.marker);var Vn=_.indexOf(Ae);Vn!=-1&&_.splice(Vn,1)}}this.session.selectionMarkerCount=_.length},this.$onAddRange=function(F){this.addSelectionMarker(F.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(F){this.removeSelectionMarkers(F.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(F){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(i.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(F){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(i.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(F){var _=F.command,S=F.editor;if(S.multiSelect){if(_.multiSelectAction)_.multiSelectAction=="forEach"?Ae=S.forEachSelection(_,F.args):_.multiSelectAction=="forEachLine"?Ae=S.forEachSelection(_,F.args,!0):_.multiSelectAction=="single"?(S.exitMultiSelectMode(),Ae=_.exec(S,F.args||{})):Ae=_.multiSelectAction(S,F.args||{});else{var Ae=_.exec(S,F.args||{});S.multiSelect.addRange(S.multiSelect.toOrientedRange()),S.multiSelect.mergeOverlappingRanges()}return Ae}},this.forEachSelection=function(F,_,S){if(!this.inVirtualSelectionMode){var Ae=S&&S.keepOrder,Vn=S==!0||S&&S.$byLines,Me=this.session,oe=this.selection,Yn=oe.rangeList,y=(Ae?oe:Yn).ranges,h;if(!y.length)return F.exec?F.exec(this,_||{}):F(this,_||{});var w=oe._eventRegistry;oe._eventRegistry={};var J=new M(Me);this.inVirtualSelectionMode=!0;for(var He=y.length;He--;){if(Vn)for(;He>0&&y[He].start.row==y[He-1].end.row;)He--;J.fromOrientedRange(y[He]),J.index=He,this.selection=Me.selection=J;var Kn=F.exec?F.exec(this,_||{}):F(this,_||{});!h&&Kn!==void 0&&(h=Kn),J.toOrientedRange(y[He])}J.detach(),this.selection=Me.selection=oe,this.inVirtualSelectionMode=!1,oe._eventRegistry=w,oe.mergeOverlappingRanges(),oe.ranges[0]&&oe.fromOrientedRange(oe.ranges[0]);var Qn=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),Qn&&Qn.from==Qn.to&&this.renderer.animateScrolling(Qn.from),h}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var F="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var _=this.multiSelect.rangeList.ranges,S=[],Ae=0;Ae<_.length;Ae++)S.push(this.session.getTextRange(_[Ae]));var Vn=this.session.getDocument().getNewLineCharacter();F=S.join(Vn),F.length==(S.length-1)*Vn.length&&(F="")}else this.selection.isEmpty()||(F=this.session.getTextRange(this.getSelectionRange()));return F},this.$checkMultiselectChange=function(F,_){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var S=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&_==this.multiSelect.anchor)return;var Ae=_==this.multiSelect.anchor?S.cursor==S.start?S.end:S.start:S.cursor;Ae.row!=_.row||this.session.$clipPositionToDocument(Ae.row,Ae.column).column!=_.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(F,_,S){if(_=_||{},_.needle=F||_.needle,_.needle==null){var Ae=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();_.needle=this.session.getTextRange(Ae)}this.$search.set(_);var Vn=this.$search.findAll(this.session);if(!Vn.length)return 0;var Me=this.multiSelect;S||Me.toSingleRange(Vn[0]);for(var oe=Vn.length;oe--;)Me.addRange(Vn[oe],!0);return Ae&&Me.rangeList.rangeAtPoint(Ae.start)&&Me.addRange(Ae,!0),Vn.length},this.selectMoreLines=function(F,_){var S=this.selection.toOrientedRange(),Ae=S.cursor==S.end,Vn=this.session.documentToScreenPosition(S.cursor);this.selection.$desiredColumn&&(Vn.column=this.selection.$desiredColumn);var Me=this.session.screenToDocumentPosition(Vn.row+F,Vn.column);if(S.isEmpty())var Yn=Me;else var oe=this.session.documentToScreenPosition(Ae?S.end:S.start),Yn=this.session.screenToDocumentPosition(oe.row+F,oe.column);if(Ae){var y=R.fromPoints(Me,Yn);y.cursor=y.start}else{var y=R.fromPoints(Yn,Me);y.cursor=y.end}if(y.desiredColumn=Vn.column,!this.selection.inMultiSelectMode)this.selection.addRange(S);else if(_)var h=S.cursor;this.selection.addRange(y),h&&this.selection.substractPoint(h)},this.transposeSelections=function(F){for(var _=this.session,S=_.multiSelect,Ae=S.ranges,Vn=Ae.length;Vn--;){var Me=Ae[Vn];if(Me.isEmpty()){var oe=_.getWordRange(Me.start.row,Me.start.column);Me.start.row=oe.start.row,Me.start.column=oe.start.column,Me.end.row=oe.end.row,Me.end.column=oe.end.column}}S.mergeOverlappingRanges();for(var Yn=[],Vn=Ae.length;Vn--;){var Me=Ae[Vn];Yn.unshift(_.getTextRange(Me))}F<0?Yn.unshift(Yn.pop()):Yn.push(Yn.shift());for(var Vn=Ae.length;Vn--;){var Me=Ae[Vn],y=Me.clone();_.replace(Me,Yn[Vn]),Me.start.row=y.start.row,Me.start.column=y.start.column}S.fromOrientedRange(S.ranges[0])},this.selectMore=function(F,_,S){var Ae=this.session,Vn=Ae.multiSelect,Me=Vn.toOrientedRange();if(!(Me.isEmpty()&&(Me=Ae.getWordRange(Me.start.row,Me.start.column),Me.cursor=F==-1?Me.start:Me.end,this.multiSelect.addRange(Me),S))){var oe=Ae.getTextRange(Me),Yn=e(Ae,oe,F);Yn&&(Yn.cursor=F==-1?Yn.start:Yn.end,this.session.unfold(Yn),this.multiSelect.addRange(Yn),this.renderer.scrollCursorIntoView(null,.5)),_&&this.multiSelect.substractPoint(Me.cursor)}},this.alignCursors=function(){var F=this.session,_=F.multiSelect,S=_.ranges,Ae=-1,Vn=S.filter(function(Zn){if(Zn.cursor.row==Ae)return!0;Ae=Zn.cursor.row});if(!S.length||Vn.length==S.length-1){var Me=this.selection.getRange(),oe=Me.start.row,Yn=Me.end.row,y=oe==Yn;if(y){var h=this.session.getLength(),w;do w=this.session.getLine(Yn);while(/[=:]/.test(w)&&++Yn<h);do w=this.session.getLine(oe);while(/[=:]/.test(w)&&--oe>0);oe<0&&(oe=0),Yn>=h&&(Yn=h-1)}var J=this.session.removeFullLines(oe,Yn);J=this.$reAlignText(J,y),this.session.insert({row:oe,column:0},J.join(`
937
+ `)+`
938
+ `),y||(Me.start.column=0,Me.end.column=J[J.length-1].length),this.selection.setRange(Me)}else{Vn.forEach(function(Zn){_.substractPoint(Zn.cursor)});var He=0,Kn=1/0,Qn=S.map(function(Zn){var Xn=Zn.cursor,ei=F.getLine(Xn.row),ri=ei.substr(Xn.column).search(/\S/g);return ri==-1&&(ri=0),Xn.column>He&&(He=Xn.column),ri<Kn&&(Kn=ri),ri});S.forEach(function(Zn,Xn){var ei=Zn.cursor,ri=He-ei.column,Jn=Qn[Xn]-Kn;ri>Jn?F.insert(ei,o.stringRepeat(" ",ri-Jn)):F.remove(new R(ei.row,ei.column,ei.row,ei.column-ri+Jn)),Zn.start.column=Zn.end.column=He,Zn.start.row=Zn.end.row=ei.row,Zn.cursor=Zn.end}),_.fromOrientedRange(S[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(F,_){var S=!0,Ae=!0,Vn,Me,oe;return F.map(function(J){var He=J.match(/(\s*)(.*?)(\s*)([=:].*)/);return He?Vn==null?(Vn=He[1].length,Me=He[2].length,oe=He[3].length,He):(Vn+Me+oe!=He[1].length+He[2].length+He[3].length&&(Ae=!1),Vn!=He[1].length&&(S=!1),Vn>He[1].length&&(Vn=He[1].length),Me<He[2].length&&(Me=He[2].length),oe>He[3].length&&(oe=He[3].length),He):[J]}).map(_?y:S?Ae?h:y:w);function Yn(J){return o.stringRepeat(" ",J)}function y(J){return J[2]?Yn(Vn)+J[2]+Yn(Me-J[2].length+oe)+J[4].replace(/^([=:])\s+/,"$1 "):J[0]}function h(J){return J[2]?Yn(Vn+Me-J[2].length)+J[2]+Yn(oe)+J[4].replace(/^([=:])\s+/,"$1 "):J[0]}function w(J){return J[2]?Yn(Vn)+J[2]+Yn(oe)+J[4].replace(/^([=:])\s+/,"$1 "):J[0]}}}).call(a.prototype);function d(F,_){return F.row==_.row&&F.column==_.column}m.onSessionChange=function(F){var _=F.session;_&&!_.multiSelect&&(_.$selectionMarkers=[],_.selection.$initRangeList(),_.multiSelect=_.selection),this.multiSelect=_&&_.multiSelect;var S=F.oldSession;S&&(S.multiSelect.off("addRange",this.$onAddRange),S.multiSelect.off("removeRange",this.$onRemoveRange),S.multiSelect.off("multiSelect",this.$onMultiSelect),S.multiSelect.off("singleSelect",this.$onSingleSelect),S.multiSelect.lead.off("change",this.$checkMultiselectChange),S.multiSelect.anchor.off("change",this.$checkMultiselectChange)),_&&(_.multiSelect.on("addRange",this.$onAddRange),_.multiSelect.on("removeRange",this.$onRemoveRange),_.multiSelect.on("multiSelect",this.$onMultiSelect),_.multiSelect.on("singleSelect",this.$onSingleSelect),_.multiSelect.lead.on("change",this.$checkMultiselectChange),_.multiSelect.anchor.on("change",this.$checkMultiselectChange)),_&&this.inMultiSelectMode!=_.selection.inMultiSelectMode&&(_.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function f(F){F.$multiselectOnSessionChange||(F.$onAddRange=F.$onAddRange.bind(F),F.$onRemoveRange=F.$onRemoveRange.bind(F),F.$onMultiSelect=F.$onMultiSelect.bind(F),F.$onSingleSelect=F.$onSingleSelect.bind(F),F.$multiselectOnSessionChange=m.onSessionChange.bind(F),F.$checkMultiselectChange=F.$checkMultiselectChange.bind(F),F.$multiselectOnSessionChange(F),F.on("changeSession",F.$multiselectOnSessionChange),F.on("mousedown",l),F.commands.addCommands(i.defaultCommands),xe(F))}function xe(F){if(!F.textInput)return;var _=F.textInput.getElement(),S=!1;u.addListener(_,"keydown",function(Vn){var Me=Vn.keyCode==18&&!(Vn.ctrlKey||Vn.shiftKey||Vn.metaKey);F.$blockSelectEnabled&&Me?S||(F.renderer.setMouseCursor("crosshair"),S=!0):S&&Ae()},F),u.addListener(_,"keyup",Ae,F),u.addListener(_,"blur",Ae,F);function Ae(Vn){S&&(F.renderer.setMouseCursor(""),S=!1)}}m.MultiSelect=f,p("./config").defineOptions(a.prototype,"editor",{enableMultiselect:{set:function(F){f(this),F?this.on("mousedown",l):this.off("mousedown",l)},value:!0},enableBlockSelect:{set:function(F){this.$blockSelectEnabled=F},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(p,m,Gn){var Q=p("../../range").Range,R=m.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(M,l,u){var o=M.getLine(u);return this.foldingStartMarker.test(o)?"start":l=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(o)?"end":""},this.getFoldWidgetRange=function(M,l,u){return null},this.indentationBlock=function(M,l,u){var o=/\S/,i=M.getLine(l),r=i.search(o);if(r!=-1){for(var t=u||i.length,e=M.getLength(),n=l,a=l;++l<e;){var d=M.getLine(l).search(o);if(d!=-1){if(d<=r){var f=M.getTokenAt(l,0);if(!f||f.type!=="string")break}a=l}}if(a>n){var xe=M.getLine(a).length;return new Q(n,t,a,xe)}}},this.openingBracketBlock=function(M,l,u,o,i){var r={row:u,column:o+1},t=M.$findClosingBracket(l,r,i);if(t){var e=M.foldWidgets[t.row];return e==null&&(e=M.getFoldWidget(t.row)),e=="start"&&t.row>r.row&&(t.row--,t.column=M.getLine(t.row).length),Q.fromPoints(r,t)}},this.closingBracketBlock=function(M,l,u,o,i){var r={row:u,column:o},t=M.$findOpeningBracket(l,r);if(t)return t.column++,r.column--,Q.fromPoints(t,r)}}).call(R.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(p,m,Gn){var Q=p("../lib/dom"),R=p("../range").Range,M=p("../config").nls;function l(o,i,r){for(var t=0,e=o.length-1;t<=e;){var n=t+e>>1,a=r(i,o[n]);if(a>0)t=n+1;else if(a<0)e=n-1;else return n}return-(t+1)}function u(o,i,r){var t=o.getAnnotations().sort(R.comparePoints);if(t.length){var e=l(t,{row:i,column:-1},R.comparePoints);e<0&&(e=-e-1),e>=t.length?e=r>0?0:t.length-1:e===0&&r<0&&(e=t.length-1);var n=t[e];if(!(!n||!r)){if(n.row===i){do n=t[e+=r];while(n&&n.row===i);if(!n)return t.slice()}var a=[];i=n.row;do a[r<0?"unshift":"push"](n),n=t[e+=r];while(n&&n.row==i);return a.length&&a}}}m.showErrorMarker=function(o,i){var r=o.session,t=o.getCursorPosition(),e=t.row,n=r.widgetManager.getWidgetsAtRow(e).filter(function(Vn){return Vn.type=="errorMarker"})[0];n?n.destroy():e-=i;var a=u(r,e,i),d;if(a){var f=a[0];t.column=(f.pos&&typeof f.column!="number"?f.pos.sc:f.column)||0,t.row=f.row,d=o.renderer.$gutterLayer.$annotations[t.row]}else{if(n)return;d={displayText:[M("error-marker.good-state","Looks good!")],className:"ace_ok"}}o.session.unfold(t.row),o.selection.moveToPosition(t);var xe={row:t.row,fixedWidth:!0,coverGutter:!0,el:Q.createElement("div"),type:"errorMarker"},F=xe.el.appendChild(Q.createElement("div")),_=xe.el.appendChild(Q.createElement("div"));_.className="error_widget_arrow "+d.className;var S=o.renderer.$cursorLayer.getPixelPosition(t).left;_.style.left=S+o.renderer.gutterWidth-5+"px",xe.el.className="error_widget_wrapper",F.className="error_widget "+d.className,d.displayText.forEach(function(Vn,Me){F.appendChild(Q.createTextNode(Vn)),Me<d.displayText.length-1&&F.appendChild(Q.createElement("br"))}),F.appendChild(Q.createElement("div"));var Ae=function(Vn,Me,oe){if(Me===0&&(oe==="esc"||oe==="return"))return xe.destroy(),{command:"null"}};xe.destroy=function(){o.$mouseHandler.isMousePressed||(o.keyBinding.removeKeyboardHandler(Ae),r.widgetManager.removeLineWidget(xe),o.off("changeSelection",xe.destroy),o.off("changeSession",xe.destroy),o.off("mouseup",xe.destroy),o.off("change",xe.destroy))},o.keyBinding.addKeyboardHandler(Ae),o.on("changeSelection",xe.destroy),o.on("changeSession",xe.destroy),o.on("mouseup",xe.destroy),o.on("change",xe.destroy),o.session.widgetManager.addLineWidget(xe),xe.el.onmousedown=o.focus.bind(o),o.renderer.scrollCursorIntoView(null,.5,{bottom:xe.el.offsetHeight})},Q.importCssString(`
939
+ .error_widget_wrapper {
940
+ background: inherit;
941
+ color: inherit;
942
+ border:none
943
+ }
944
+ .error_widget {
945
+ border-top: solid 2px;
946
+ border-bottom: solid 2px;
947
+ margin: 5px 0;
948
+ padding: 10px 40px;
949
+ white-space: pre-wrap;
950
+ }
951
+ .error_widget.ace_error, .error_widget_arrow.ace_error{
952
+ border-color: #ff5a5a
953
+ }
954
+ .error_widget.ace_warning, .error_widget_arrow.ace_warning{
955
+ border-color: #F1D817
956
+ }
957
+ .error_widget.ace_info, .error_widget_arrow.ace_info{
958
+ border-color: #5a5a5a
959
+ }
960
+ .error_widget.ace_ok, .error_widget_arrow.ace_ok{
961
+ border-color: #5aaa5a
962
+ }
963
+ .error_widget_arrow {
964
+ position: absolute;
965
+ border: solid 5px;
966
+ border-top-color: transparent!important;
967
+ border-right-color: transparent!important;
968
+ border-left-color: transparent!important;
969
+ top: -5px;
970
+ }
971
+ `,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(p,m,Gn){p("./loader_build")(m);var Q=p("./lib/dom"),R=p("./range").Range,M=p("./editor").Editor,l=p("./edit_session").EditSession,u=p("./undomanager").UndoManager,o=p("./virtual_renderer").VirtualRenderer;p("./worker/worker_client"),p("./keyboard/hash_handler"),p("./placeholder"),p("./multi_select"),p("./mode/folding/fold_mode"),p("./theme/textmate"),p("./ext/error_marker"),m.config=p("./config"),m.edit=function(r,t){if(typeof r=="string"){var e=r;if(r=document.getElementById(e),!r)throw new Error("ace.edit can't find div #"+e)}if(r&&r.env&&r.env.editor instanceof M)return r.env.editor;var n="";if(r&&/input|textarea/i.test(r.tagName)){var a=r;n=a.value,r=Q.createElement("pre"),a.parentNode.replaceChild(r,a)}else r&&(n=r.textContent,r.innerHTML="");var d=m.createEditSession(n),f=new M(new o(r),d,t),xe={document:d,editor:f,onResize:f.resize.bind(f,null)};return a&&(xe.textarea=a),f.on("destroy",function(){xe.editor.container.env=null}),f.container.env=f.env=xe,f},m.createEditSession=function(r,t){var e=new l(r,t);return e.setUndoManager(new u),e},m.Range=R,m.Editor=M,m.EditSession=l,m.UndoManager=u,m.VirtualRenderer=o;var i=m.config.version;m.version=i}),function(){ace.require(["ace/ace"],function(p){p&&(p.config.init(!0),p.define=ace.define);var m=function(){return this}();!m&&typeof window<"u"&&(m=window),!m&&typeof self<"u"&&(m=self),m.ace||(m.ace=p);for(var Gn in p)p.hasOwnProperty(Gn)&&(m.ace[Gn]=p[Gn]);m.ace.default=m.ace,x.exports=m.ace})}()}(ace$1)),ace$1.exports}var aceExports=requireAce(),modeRuby={exports:{}},hasRequiredModeRuby;function requireModeRuby(){return hasRequiredModeRuby||(hasRequiredModeRuby=1,function(x,b){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(p,m,Gn){var Q=p("../lib/oop"),R=p("./text_highlight_rules").TextHighlightRules,M=m.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};m.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},m.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},m.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var l=m.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},u=m.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},o=m.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},i=m.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},r=m.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},t=m.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},e=m.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},n=m.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},a=function(){var d="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",f="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",xe="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",F="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",_=this.$keywords=this.createKeywordMapper({keyword:f,"constant.language":xe,"variable.language":F,"support.function":d,"invalid.deprecated":"debugger"},"identifier"),S=`\\\\(?: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})*})`,Ae={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};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:S},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:S},{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(Vn,Me,oe){oe.length&&(oe=[]);var Yn=Vn[Vn.length-1];return oe.unshift(Yn,Me),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(Vn,Me,oe){oe.length&&(oe=[]);var Yn=Vn[Vn.length-1];return oe.unshift(Yn,Me),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(Vn,Me,oe){oe.length&&(oe=[]);var Yn=Vn[Vn.length-1];return oe.unshift(Yn,Me),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(Vn,Me,oe){oe.length&&(oe=[]);var Yn=Vn[Vn.length-1];return oe.unshift(Yn,Me),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(Vn,Me,oe){oe.length&&(oe=[]);var Yn=Vn[Vn.length-1];return oe.unshift(Yn,Me),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},n,{token:"variable.global",regex:"[$][a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]*"},{token:["punctuation.operator","support.function"],regex:/(\.)([a-zA-Z_\d]+)(?=\()/},{token:["punctuation.operator","identifier"],regex:/(\.)([a-zA-Z_][a-zA-Z_\d]*)/},{token:"string.character",regex:"\\B\\?(?:"+S+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},r,t,M,l,e,u,o,i,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:_,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(Vn,Me,oe){var Yn=Vn[2]=="-"||Vn[2]=="~"?"indentedHeredoc":"heredoc",y=Vn.split(this.splitRegex);return oe.push(Yn,y[3]),[{type:"constant",value:y[1]},{type:"string",value:y[2]},{type:"support.class",value:y[3]},{type:"string",value:y[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(Vn,Me,oe){return Vn===oe[1]?(oe.shift(),oe.shift(),this.next=oe[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(Vn,Me,oe){return Vn===oe[1]?(oe.shift(),oe.shift(),this.next=oe[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(Vn,Me){return Me[0]==="heredoc"||Me[0]==="indentedHeredoc"?Me[0]:Vn}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(Vn,Me,oe){return this.next="",Vn=="}"&&oe.length>1&&oe[1]!="start"&&(oe.shift(),this.next=oe.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(Vn,Me,oe){return oe.length&&Vn===oe[0]?(oe.unshift(Vn,Me),this.token):"string"}},{token:"constant.language.escape",regex:S},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(Vn,Me,oe){return oe.length&&Vn===Ae[oe[0]]?(oe.shift(),this.next=oe.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(Vn,Me,oe){return oe.length&&Vn===oe[0]?(oe.unshift(Vn,Me),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(Vn,Me,oe){return oe.length&&Vn===Ae[oe[0]]?(oe.shift(),this.next=oe.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(Vn,Me,oe){return oe.length&&Vn===oe[0]?(oe.unshift(Vn,Me),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(Vn,Me,oe){return oe.length&&Vn===Ae[oe[0]]?(oe.shift(),this.next=oe.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(Vn,Me,oe){return oe.length&&Vn===oe[0]?(oe.unshift(Vn,Me),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:S},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(Vn,Me,oe){return oe.length&&Vn===Ae[oe[0]]?(oe.shift(),this.next=oe.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(Vn,Me,oe){return oe.length&&Vn===oe[0]?(oe.unshift(Vn,Me),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(Vn,Me,oe){return oe.length&&Vn[0]===Ae[oe[0]]?(oe.shift(),this.next=oe.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()};Q.inherits(a,R),m.RubyHighlightRules=a}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(p,m,Gn){var Q=p("../range").Range,R=function(){};(function(){this.checkOutdent=function(M,l){return/^\s+$/.test(M)?/^\s*\}/.test(l):!1},this.autoOutdent=function(M,l){var u=M.getLine(l),o=u.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,r=M.findMatchingBracket({row:l,column:i});if(!r||r.row==l)return 0;var t=this.$getIndent(M.getLine(r.row));M.replace(new Q(l,0,l,i-1),t)},this.$getIndent=function(M){return M.match(/^\s*/)[0]}}).call(R.prototype),m.MatchingBraceOutdent=R}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(p,m,Gn){var Q=p("../../lib/oop"),R=p("./fold_mode").FoldMode,M=p("../../range").Range,l=p("../../token_iterator").TokenIterator,u=m.FoldMode=function(){};Q.inherits(u,R),(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(o,i,r){var t=o.getLine(r),e=this.foldingStartMarker.test(t),n=this.foldingStopMarker.test(t);if(e&&!n){var a=t.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(t)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(t)===!1)||a[1]=="when"&&/\sthen\s/.test(t)===!0)return;if(o.getTokenAt(r,a.index+2).type==="keyword")return"start"}else if(!a[3]||o.getTokenAt(r,a.index+1).type==="comment.multiline")return"start"}if(i!="markbeginend"||!n||e&&n)return"";var a=t.match(this.foldingStopMarker);if(a[3]==="end"){if(o.getTokenAt(r,a.index+1).type==="keyword")return"end"}else if(!a[1]||o.getTokenAt(r,a.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(o,i,r){var t=o.doc.getLine(r),e=this.foldingStartMarker.exec(t);if(e)return e[1]||e[3]?this.rubyBlock(o,r,e.index+2):this.openingBracketBlock(o,"{",r,e.index);var e=this.foldingStopMarker.exec(t);if(e)return e[3]==="end"&&o.getTokenAt(r,e.index+1).type==="keyword"?this.rubyBlock(o,r,e.index+1):e[1]==="=end"&&o.getTokenAt(r,e.index+1).type==="comment.multiline"?this.rubyBlock(o,r,e.index+1):this.closingBracketBlock(o,"}",r,e.index+e[0].length)},this.rubyBlock=function(o,y,r,t){var e=new l(o,y,r),n=e.getCurrentToken();if(!(!n||n.type!="keyword"&&n.type!="comment.multiline")){var a=n.value,d=o.getLine(y);switch(n.value){case"if":case"unless":case"while":case"until":var f=new RegExp("^\\s*"+n.value);if(!f.test(d))return;var xe=this.indentKeywords[a];break;case"when":if(/\sthen\s/.test(d))return;case"elsif":case"rescue":case"ensure":var xe=1;break;case"else":var f=new RegExp("^\\s*"+n.value+"\\s*$");if(!f.test(d))return;var xe=1;break;default:var xe=this.indentKeywords[a]}var F=[a];if(xe){var _=xe===-1?o.getLine(y-1).length:o.getLine(y).length,S=y,Ae=[];if(Ae.push(e.getCurrentTokenRange()),e.step=xe===-1?e.stepBackward:e.stepForward,n.type=="comment.multiline"){for(;n=e.step();)if(n.type==="comment.multiline"){if(xe==1){if(_=6,n.value=="=end")break}else if(n.value=="=begin")break}}else for(;n=e.step();){var Vn=!1;if(n.type==="keyword"){var Me=xe*this.indentKeywords[n.value];switch(d=o.getLine(e.getCurrentTokenRow()),n.value){case"do":for(var oe=e.$tokenIndex-1;oe>=0;oe--){var Yn=e.$rowTokens[oe];if(Yn&&(Yn.value=="while"||Yn.value=="until"||Yn.value=="for")){Me=0;break}}break;case"else":var f=new RegExp("^\\s*"+n.value+"\\s*$");(!f.test(d)||a=="case")&&(Me=0,Vn=!0);break;case"if":case"unless":case"while":case"until":var f=new RegExp("^\\s*"+n.value);f.test(d)||(Me=0,Vn=!0);break;case"when":(/\sthen\s/.test(d)||a=="case")&&(Me=0,Vn=!0)}if(Me>0)F.unshift(n.value);else if(Me<=0&&Vn===!1){if(F.shift(),!F.length&&((a=="while"||a=="until"||a=="for")&&n.value!="do"||n.value=="do"&&xe==-1&&Me!=0||n.value!="do"))break;Me===0&&F.unshift(n.value)}}}if(!n)return null;if(t)return Ae.push(e.getCurrentTokenRange()),Ae;var y=e.getCurrentTokenRow();if(xe===-1){if(n.type==="comment.multiline")var h=6;else var h=o.getLine(y).length;return new M(y,h,S-1,_)}return new M(S,_,y-1,o.getLine(y-1).length)}}}}).call(u.prototype)}),ace.define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/ruby"],function(p,m,Gn){var Q=p("../lib/oop"),R=p("./text").Mode,M=p("./ruby_highlight_rules").RubyHighlightRules,l=p("./matching_brace_outdent").MatchingBraceOutdent,u=p("../range").Range,o=p("./folding/ruby").FoldMode,i=function(){this.HighlightRules=M,this.$outdent=new l,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new o,this.indentKeywords=this.foldingRules.indentKeywords};Q.inherits(i,R),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(r,t,e){var n=this.$getIndent(t),a=this.getTokenizer().getLineTokens(t,r),d=a.tokens;if(d.length&&d[d.length-1].type=="comment")return n;if(r=="start"){var f=t.match(/^.*[\{\(\[]\s*$/),xe=t.match(/^\s*(class|def|module)\s.*$/),F=t.match(/.*do(\s*|\s+\|.*\|\s*)$/),_=t.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(f||xe||F||_)&&(n+=e)}return n},this.checkOutdent=function(r,t,e){return/^\s+(end|else|rescue|ensure)$/.test(t+e)||this.$outdent.checkOutdent(t,e)},this.autoOutdent=function(r,t,e){var n=t.getLine(e);if(/}/.test(n))return this.$outdent.autoOutdent(t,e);var a=this.$getIndent(n),d=t.getLine(e-1),f=this.$getIndent(d),xe=t.getTabString();f.length<=a.length&&a.slice(-xe.length)==xe&&t.remove(new u(e,a.length-xe.length,e,a.length))},this.getMatching=function(r,t,e){if(t==null){var n=r.selection.lead;e=n.column,t=n.row}var a=r.getTokenAt(t,e);if(a&&a.value in this.indentKeywords)return this.foldingRules.rubyBlock(r,t,e,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(i.prototype),m.Mode=i}),function(){ace.require(["ace/mode/ruby"],function(p){x.exports=p})}()}(modeRuby)),modeRuby.exports}requireModeRuby();var themeTwilight={exports:{}},hasRequiredThemeTwilight;function requireThemeTwilight(){return hasRequiredThemeTwilight||(hasRequiredThemeTwilight=1,function(x,b){ace.define("ace/theme/twilight-css",["require","exports","module"],function(p,m,Gn){Gn.exports=`.ace-twilight .ace_gutter {
972
+ background: #232323;
973
+ color: #E2E2E2
974
+ }
975
+
976
+ .ace-twilight .ace_print-margin {
977
+ width: 1px;
978
+ background: #232323
979
+ }
980
+
981
+ .ace-twilight {
982
+ background-color: #141414;
983
+ color: #F8F8F8
984
+ }
985
+
986
+ .ace-twilight .ace_cursor {
987
+ color: #A7A7A7
988
+ }
989
+
990
+ .ace-twilight .ace_marker-layer .ace_selection {
991
+ background: rgba(221, 240, 255, 0.20)
992
+ }
993
+
994
+ .ace-twilight.ace_multiselect .ace_selection.ace_start {
995
+ box-shadow: 0 0 3px 0px #141414;
996
+ }
997
+
998
+ .ace-twilight .ace_marker-layer .ace_step {
999
+ background: rgb(102, 82, 0)
1000
+ }
1001
+
1002
+ .ace-twilight .ace_marker-layer .ace_bracket {
1003
+ margin: -1px 0 0 -1px;
1004
+ border: 1px solid rgba(255, 255, 255, 0.25)
1005
+ }
1006
+
1007
+ .ace-twilight .ace_marker-layer .ace_active-line {
1008
+ background: rgba(255, 255, 255, 0.031)
1009
+ }
1010
+
1011
+ .ace-twilight .ace_gutter-active-line {
1012
+ background-color: rgba(255, 255, 255, 0.031)
1013
+ }
1014
+
1015
+ .ace-twilight .ace_marker-layer .ace_selected-word {
1016
+ border: 1px solid rgba(221, 240, 255, 0.20)
1017
+ }
1018
+
1019
+ .ace-twilight .ace_invisible {
1020
+ color: rgba(255, 255, 255, 0.25)
1021
+ }
1022
+
1023
+ .ace-twilight .ace_keyword,
1024
+ .ace-twilight .ace_meta {
1025
+ color: #CDA869
1026
+ }
1027
+
1028
+ .ace-twilight .ace_constant,
1029
+ .ace-twilight .ace_constant.ace_character,
1030
+ .ace-twilight .ace_constant.ace_character.ace_escape,
1031
+ .ace-twilight .ace_constant.ace_other,
1032
+ .ace-twilight .ace_heading,
1033
+ .ace-twilight .ace_markup.ace_heading,
1034
+ .ace-twilight .ace_support.ace_constant {
1035
+ color: #CF6A4C
1036
+ }
1037
+
1038
+ .ace-twilight .ace_invalid.ace_illegal {
1039
+ color: #F8F8F8;
1040
+ background-color: rgba(86, 45, 86, 0.75)
1041
+ }
1042
+
1043
+ .ace-twilight .ace_invalid.ace_deprecated {
1044
+ text-decoration: underline;
1045
+ font-style: italic;
1046
+ color: #D2A8A1
1047
+ }
1048
+
1049
+ .ace-twilight .ace_support {
1050
+ color: #9B859D
1051
+ }
1052
+
1053
+ .ace-twilight .ace_fold {
1054
+ background-color: #AC885B;
1055
+ border-color: #F8F8F8
1056
+ }
1057
+
1058
+ .ace-twilight .ace_support.ace_function {
1059
+ color: #DAD085
1060
+ }
1061
+
1062
+ .ace-twilight .ace_list,
1063
+ .ace-twilight .ace_markup.ace_list,
1064
+ .ace-twilight .ace_storage {
1065
+ color: #F9EE98
1066
+ }
1067
+
1068
+ .ace-twilight .ace_entity.ace_name.ace_function,
1069
+ .ace-twilight .ace_meta.ace_tag {
1070
+ color: #AC885B
1071
+ }
1072
+
1073
+ .ace-twilight .ace_string {
1074
+ color: #8F9D6A
1075
+ }
1076
+
1077
+ .ace-twilight .ace_string.ace_regexp {
1078
+ color: #E9C062
1079
+ }
1080
+
1081
+ .ace-twilight .ace_comment {
1082
+ font-style: italic;
1083
+ color: #5F5A60
1084
+ }
1085
+
1086
+ .ace-twilight .ace_variable {
1087
+ color: #7587A6
1088
+ }
1089
+
1090
+ .ace-twilight .ace_xml-pe {
1091
+ color: #494949
1092
+ }
1093
+
1094
+ .ace-twilight .ace_indent-guide {
1095
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y
1096
+ }
1097
+
1098
+ .ace-twilight .ace_indent-guide-active {
1099
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
1100
+ }
1101
+ `}),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],function(p,m,Gn){m.isDark=!0,m.cssClass="ace-twilight",m.cssText=p("./twilight-css");var Q=p("../lib/dom");Q.importCssString(m.cssText,m.cssClass,!1)}),function(){ace.require(["ace/theme/twilight"],function(p){x.exports=p})}()}(themeTwilight)),themeTwilight.exports}requireThemeTwilight();var pt=Object.defineProperty,mt=(x,b,p)=>b in x?pt(x,b,{enumerable:!0,configurable:!0,writable:!0,value:p}):x[b]=p,D=(x,b,p)=>mt(x,b+"",p);function $e(x,b){return function(){return x.apply(b,arguments)}}const{toString:gt}=Object.prototype,{getPrototypeOf:ye}=Object,ee=(x=>b=>{const p=gt.call(b);return x[p]||(x[p]=p.slice(8,-1).toLowerCase())})(Object.create(null)),C=x=>(x=x.toLowerCase(),b=>ee(b)===x),te=x=>b=>typeof b===x,{isArray:B}=Array,H=te("undefined");function _t(x){return x!==null&&!H(x)&&x.constructor!==null&&!H(x.constructor)&&O(x.constructor.isBuffer)&&x.constructor.isBuffer(x)}const ze=C("ArrayBuffer");function bt(x){let b;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?b=ArrayBuffer.isView(x):b=x&&x.buffer&&ze(x.buffer),b}const yt=te("string"),O=te("function"),We=te("number"),ne=x=>x!==null&&typeof x=="object",wt=x=>x===!0||x===!1,G=x=>{if(ee(x)!=="object")return!1;const b=ye(x);return(b===null||b===Object.prototype||Object.getPrototypeOf(b)===null)&&!(Symbol.toStringTag in x)&&!(Symbol.iterator in x)},St=C("Date"),Et=C("File"),Rt=C("Blob"),At=C("FileList"),xt=x=>ne(x)&&O(x.pipe),Tt=x=>{let b;return x&&(typeof FormData=="function"&&x instanceof FormData||O(x.append)&&((b=ee(x))==="formdata"||b==="object"&&O(x.toString)&&x.toString()==="[object FormData]"))},Ot=C("URLSearchParams"),[Ct,kt,Nt,Pt]=["ReadableStream","Request","Response","Headers"].map(C),Dt=x=>x.trim?x.trim():x.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function $(x,b,{allOwnKeys:p=!1}={}){if(x===null||typeof x>"u")return;let m,Gn;if(typeof x!="object"&&(x=[x]),B(x))for(m=0,Gn=x.length;m<Gn;m++)b.call(null,x[m],m,x);else{const Q=p?Object.getOwnPropertyNames(x):Object.keys(x),R=Q.length;let M;for(m=0;m<R;m++)M=Q[m],b.call(null,x[M],M,x)}}function Ve(x,b){b=b.toLowerCase();const p=Object.keys(x);let m=p.length,Gn;for(;m-- >0;)if(Gn=p[m],b===Gn.toLowerCase())return Gn;return null}const L=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Je=x=>!H(x)&&x!==L;function fe(){const{caseless:x}=Je(this)&&this||{},b={},p=(m,Gn)=>{const Q=x&&Ve(b,Gn)||Gn;G(b[Q])&&G(m)?b[Q]=fe(b[Q],m):G(m)?b[Q]=fe({},m):B(m)?b[Q]=m.slice():b[Q]=m};for(let m=0,Gn=arguments.length;m<Gn;m++)arguments[m]&&$(arguments[m],p);return b}const Ft=(x,b,p,{allOwnKeys:m}={})=>($(b,(Gn,Q)=>{p&&O(Gn)?x[Q]=$e(Gn,p):x[Q]=Gn},{allOwnKeys:m}),x),Lt=x=>(x.charCodeAt(0)===65279&&(x=x.slice(1)),x),Ut=(x,b,p,m)=>{x.prototype=Object.create(b.prototype,m),x.prototype.constructor=x,Object.defineProperty(x,"super",{value:b.prototype}),p&&Object.assign(x.prototype,p)},jt=(x,b,p,m)=>{let Gn,Q,R;const M={};if(b=b||{},x==null)return b;do{for(Gn=Object.getOwnPropertyNames(x),Q=Gn.length;Q-- >0;)R=Gn[Q],(!m||m(R,x,b))&&!M[R]&&(b[R]=x[R],M[R]=!0);x=p!==!1&&ye(x)}while(x&&(!p||p(x,b))&&x!==Object.prototype);return b},Bt=(x,b,p)=>{x=String(x),(p===void 0||p>x.length)&&(p=x.length),p-=b.length;const m=x.indexOf(b,p);return m!==-1&&m===p},vt=x=>{if(!x)return null;if(B(x))return x;let b=x.length;if(!We(b))return null;const p=new Array(b);for(;b-- >0;)p[b]=x[b];return p},It=(x=>b=>x&&b instanceof x)(typeof Uint8Array<"u"&&ye(Uint8Array)),qt=(x,b)=>{const p=(x&&x[Symbol.iterator]).call(x);let m;for(;(m=p.next())&&!m.done;){const Gn=m.value;b.call(x,Gn[0],Gn[1])}},Mt=(x,b)=>{let p;const m=[];for(;(p=x.exec(b))!==null;)m.push(p);return m},Ht=C("HTMLFormElement"),$t=x=>x.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(b,p,m){return p.toUpperCase()+m}),Te=(({hasOwnProperty:x})=>(b,p)=>x.call(b,p))(Object.prototype),zt=C("RegExp"),Ge=(x,b)=>{const p=Object.getOwnPropertyDescriptors(x),m={};$(p,(Gn,Q)=>{let R;(R=b(Gn,Q,x))!==!1&&(m[Q]=R||Gn)}),Object.defineProperties(x,m)},Wt=x=>{Ge(x,(b,p)=>{if(O(x)&&["arguments","caller","callee"].indexOf(p)!==-1)return!1;const m=x[p];if(O(m)){if(b.enumerable=!1,"writable"in b){b.writable=!1;return}b.set||(b.set=()=>{throw Error("Can not rewrite read-only method '"+p+"'")})}})},Vt=(x,b)=>{const p={},m=Gn=>{Gn.forEach(Q=>{p[Q]=!0})};return B(x)?m(x):m(String(x).split(b)),p},Jt=()=>{},Gt=(x,b)=>x!=null&&Number.isFinite(x=+x)?x:b,ce="abcdefghijklmnopqrstuvwxyz",Oe="0123456789",Ke={DIGIT:Oe,ALPHA:ce,ALPHA_DIGIT:ce+ce.toUpperCase()+Oe},Kt=(x=16,b=Ke.ALPHA_DIGIT)=>{let p="";const{length:m}=b;for(;x--;)p+=b[Math.random()*m|0];return p};function Xt(x){return!!(x&&O(x.append)&&x[Symbol.toStringTag]==="FormData"&&x[Symbol.iterator])}const Qt=x=>{const b=new Array(10),p=(m,Gn)=>{if(ne(m)){if(b.indexOf(m)>=0)return;if(!("toJSON"in m)){b[Gn]=m;const Q=B(m)?[]:{};return $(m,(R,M)=>{const l=p(R,Gn+1);!H(l)&&(Q[M]=l)}),b[Gn]=void 0,Q}}return m};return p(x,0)},Yt=C("AsyncFunction"),Zt=x=>x&&(ne(x)||O(x))&&O(x.then)&&O(x.catch),Xe=((x,b)=>x?setImmediate:b?((p,m)=>(L.addEventListener("message",({source:Gn,data:Q})=>{Gn===L&&Q===p&&m.length&&m.shift()()},!1),Gn=>{m.push(Gn),L.postMessage(p,"*")}))(`axios@${Math.random()}`,[]):p=>setTimeout(p))(typeof setImmediate=="function",O(L.postMessage)),en=typeof queueMicrotask<"u"?queueMicrotask.bind(L):typeof process<"u"&&process.nextTick||Xe,c={isArray:B,isArrayBuffer:ze,isBuffer:_t,isFormData:Tt,isArrayBufferView:bt,isString:yt,isNumber:We,isBoolean:wt,isObject:ne,isPlainObject:G,isReadableStream:Ct,isRequest:kt,isResponse:Nt,isHeaders:Pt,isUndefined:H,isDate:St,isFile:Et,isBlob:Rt,isRegExp:zt,isFunction:O,isStream:xt,isURLSearchParams:Ot,isTypedArray:It,isFileList:At,forEach:$,merge:fe,extend:Ft,trim:Dt,stripBOM:Lt,inherits:Ut,toFlatObject:jt,kindOf:ee,kindOfTest:C,endsWith:Bt,toArray:vt,forEachEntry:qt,matchAll:Mt,isHTMLForm:Ht,hasOwnProperty:Te,hasOwnProp:Te,reduceDescriptors:Ge,freezeMethods:Wt,toObjectSet:Vt,toCamelCase:$t,noop:Jt,toFiniteNumber:Gt,findKey:Ve,global:L,isContextDefined:Je,ALPHABET:Ke,generateString:Kt,isSpecCompliantForm:Xt,toJSONObject:Qt,isAsyncFn:Yt,isThenable:Zt,setImmediate:Xe,asap:en};function g(x,b,p,m,Gn){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=x,this.name="AxiosError",b&&(this.code=b),p&&(this.config=p),m&&(this.request=m),Gn&&(this.response=Gn,this.status=Gn.status?Gn.status:null)}c.inherits(g,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:c.toJSONObject(this.config),code:this.code,status:this.status}}});const Qe=g.prototype,Ye={};["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(x=>{Ye[x]={value:x}}),Object.defineProperties(g,Ye),Object.defineProperty(Qe,"isAxiosError",{value:!0}),g.from=(x,b,p,m,Gn,Q)=>{const R=Object.create(Qe);return c.toFlatObject(x,R,function(M){return M!==Error.prototype},M=>M!=="isAxiosError"),g.call(R,x.message,b,p,m,Gn),R.cause=x,R.name=x.name,Q&&Object.assign(R,Q),R};const tn=null;function de(x){return c.isPlainObject(x)||c.isArray(x)}function Ze(x){return c.endsWith(x,"[]")?x.slice(0,-2):x}function Ce(x,b,p){return x?x.concat(b).map(function(m,Gn){return m=Ze(m),!p&&Gn?"["+m+"]":m}).join(p?".":""):b}function nn(x){return c.isArray(x)&&!x.some(de)}const sn=c.toFlatObject(c,{},null,function(x){return/^is[A-Z]/.test(x)});function se(x,b,p){if(!c.isObject(x))throw new TypeError("target must be an object");b=b||new FormData,p=c.toFlatObject(p,{metaTokens:!0,dots:!1,indexes:!1},!1,function(t,e){return!c.isUndefined(e[t])});const m=p.metaTokens,Gn=p.visitor||u,Q=p.dots,R=p.indexes,M=(p.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(b);if(!c.isFunction(Gn))throw new TypeError("visitor must be a function");function l(t){if(t===null)return"";if(c.isDate(t))return t.toISOString();if(!M&&c.isBlob(t))throw new g("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(t)||c.isTypedArray(t)?M&&typeof Blob=="function"?new Blob([t]):Buffer.from(t):t}function u(t,e,n){let a=t;if(t&&!n&&typeof t=="object"){if(c.endsWith(e,"{}"))e=m?e:e.slice(0,-2),t=JSON.stringify(t);else if(c.isArray(t)&&nn(t)||(c.isFileList(t)||c.endsWith(e,"[]"))&&(a=c.toArray(t)))return e=Ze(e),a.forEach(function(d,f){!(c.isUndefined(d)||d===null)&&b.append(R===!0?Ce([e],f,Q):R===null?e:e+"[]",l(d))}),!1}return de(t)?!0:(b.append(Ce(n,e,Q),l(t)),!1)}const o=[],i=Object.assign(sn,{defaultVisitor:u,convertValue:l,isVisitable:de});function r(t,e){if(!c.isUndefined(t)){if(o.indexOf(t)!==-1)throw Error("Circular reference detected in "+e.join("."));o.push(t),c.forEach(t,function(n,a){(!(c.isUndefined(n)||n===null)&&Gn.call(b,n,c.isString(a)?a.trim():a,e,i))===!0&&r(n,e?e.concat(a):[a])}),o.pop()}}if(!c.isObject(x))throw new TypeError("data must be an object");return r(x),b}function ke(x){const b={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(x).replace(/[!'()~]|%20|%00/g,function(p){return b[p]})}function we(x,b){this._pairs=[],x&&se(x,this,b)}const et=we.prototype;et.append=function(x,b){this._pairs.push([x,b])},et.toString=function(x){const b=x?function(p){return x.call(this,p,ke)}:ke;return this._pairs.map(function(p){return b(p[0])+"="+b(p[1])},"").join("&")};function rn(x){return encodeURIComponent(x).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function tt(x,b,p){if(!b)return x;const m=p&&p.encode||rn;c.isFunction(p)&&(p={serialize:p});const Gn=p&&p.serialize;let Q;if(Gn?Q=Gn(b,p):Q=c.isURLSearchParams(b)?b.toString():new we(b,p).toString(m),Q){const R=x.indexOf("#");R!==-1&&(x=x.slice(0,R)),x+=(x.indexOf("?")===-1?"?":"&")+Q}return x}class Ne{constructor(){this.handlers=[]}use(b,p,m){return this.handlers.push({fulfilled:b,rejected:p,synchronous:m?m.synchronous:!1,runWhen:m?m.runWhen:null}),this.handlers.length-1}eject(b){this.handlers[b]&&(this.handlers[b]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(b){c.forEach(this.handlers,function(p){p!==null&&b(p)})}}const nt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},on=typeof URLSearchParams<"u"?URLSearchParams:we,cn=typeof FormData<"u"?FormData:null,an=typeof Blob<"u"?Blob:null,ln={isBrowser:!0,classes:{URLSearchParams:on,FormData:cn,Blob:an},protocols:["http","https","file","blob","url","data"]},Se=typeof window<"u"&&typeof document<"u",he=typeof navigator=="object"&&navigator||void 0,un=Se&&(!he||["ReactNative","NativeScript","NS"].indexOf(he.product)<0),fn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",dn=Se&&window.location.href||"http://localhost",hn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Se,hasStandardBrowserEnv:un,hasStandardBrowserWebWorkerEnv:fn,navigator:he,origin:dn},Symbol.toStringTag,{value:"Module"})),A={...hn,...ln};function pn(x,b){return se(x,new A.classes.URLSearchParams,Object.assign({visitor:function(p,m,Gn,Q){return A.isNode&&c.isBuffer(p)?(this.append(m,p.toString("base64")),!1):Q.defaultVisitor.apply(this,arguments)}},b))}function mn(x){return c.matchAll(/\w+|\[(\w*)]/g,x).map(b=>b[0]==="[]"?"":b[1]||b[0])}function gn(x){const b={},p=Object.keys(x);let m;const Gn=p.length;let Q;for(m=0;m<Gn;m++)Q=p[m],b[Q]=x[Q];return b}function st(x){function b(p,m,Gn,Q){let R=p[Q++];if(R==="__proto__")return!0;const M=Number.isFinite(+R),l=Q>=p.length;return R=!R&&c.isArray(Gn)?Gn.length:R,l?(c.hasOwnProp(Gn,R)?Gn[R]=[Gn[R],m]:Gn[R]=m,!M):((!Gn[R]||!c.isObject(Gn[R]))&&(Gn[R]=[]),b(p,m,Gn[R],Q)&&c.isArray(Gn[R])&&(Gn[R]=gn(Gn[R])),!M)}if(c.isFormData(x)&&c.isFunction(x.entries)){const p={};return c.forEachEntry(x,(m,Gn)=>{b(mn(m),Gn,p,0)}),p}return null}function _n(x,b,p){if(c.isString(x))try{return(b||JSON.parse)(x),c.trim(x)}catch(m){if(m.name!=="SyntaxError")throw m}return(0,JSON.stringify)(x)}const z={transitional:nt,adapter:["xhr","http","fetch"],transformRequest:[function(x,b){const p=b.getContentType()||"",m=p.indexOf("application/json")>-1,Gn=c.isObject(x);if(Gn&&c.isHTMLForm(x)&&(x=new FormData(x)),c.isFormData(x))return m?JSON.stringify(st(x)):x;if(c.isArrayBuffer(x)||c.isBuffer(x)||c.isStream(x)||c.isFile(x)||c.isBlob(x)||c.isReadableStream(x))return x;if(c.isArrayBufferView(x))return x.buffer;if(c.isURLSearchParams(x))return b.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),x.toString();let Q;if(Gn){if(p.indexOf("application/x-www-form-urlencoded")>-1)return pn(x,this.formSerializer).toString();if((Q=c.isFileList(x))||p.indexOf("multipart/form-data")>-1){const R=this.env&&this.env.FormData;return se(Q?{"files[]":x}:x,R&&new R,this.formSerializer)}}return Gn||m?(b.setContentType("application/json",!1),_n(x)):x}],transformResponse:[function(x){const b=this.transitional||z.transitional,p=b&&b.forcedJSONParsing,m=this.responseType==="json";if(c.isResponse(x)||c.isReadableStream(x))return x;if(x&&c.isString(x)&&(p&&!this.responseType||m)){const Gn=!(b&&b.silentJSONParsing)&&m;try{return JSON.parse(x)}catch(Q){if(Gn)throw Q.name==="SyntaxError"?g.from(Q,g.ERR_BAD_RESPONSE,this,null,this.response):Q}}return x}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:A.classes.FormData,Blob:A.classes.Blob},validateStatus:function(x){return x>=200&&x<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],x=>{z.headers[x]={}});const bn=c.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"]),yn=x=>{const b={};let p,m,Gn;return x&&x.split(`
1102
+ `).forEach(function(Q){Gn=Q.indexOf(":"),p=Q.substring(0,Gn).trim().toLowerCase(),m=Q.substring(Gn+1).trim(),!(!p||b[p]&&bn[p])&&(p==="set-cookie"?b[p]?b[p].push(m):b[p]=[m]:b[p]=b[p]?b[p]+", "+m:m)}),b},Pe=Symbol("internals");function I(x){return x&&String(x).trim().toLowerCase()}function K(x){return x===!1||x==null?x:c.isArray(x)?x.map(K):String(x)}function wn(x){const b=Object.create(null),p=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let m;for(;m=p.exec(x);)b[m[1]]=m[2];return b}const Sn=x=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(x.trim());function ae(x,b,p,m,Gn){if(c.isFunction(m))return m.call(this,b,p);if(Gn&&(b=p),!!c.isString(b)){if(c.isString(m))return b.indexOf(m)!==-1;if(c.isRegExp(m))return m.test(b)}}function En(x){return x.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(b,p,m)=>p.toUpperCase()+m)}function Rn(x,b){const p=c.toCamelCase(" "+b);["get","set","has"].forEach(m=>{Object.defineProperty(x,m+p,{value:function(Gn,Q,R){return this[m].call(this,b,Gn,Q,R)},configurable:!0})})}class T{constructor(b){b&&this.set(b)}set(b,p,m){const Gn=this;function Q(M,l,u){const o=I(l);if(!o)throw new Error("header name must be a non-empty string");const i=c.findKey(Gn,o);(!i||Gn[i]===void 0||u===!0||u===void 0&&Gn[i]!==!1)&&(Gn[i||l]=K(M))}const R=(M,l)=>c.forEach(M,(u,o)=>Q(u,o,l));if(c.isPlainObject(b)||b instanceof this.constructor)R(b,p);else if(c.isString(b)&&(b=b.trim())&&!Sn(b))R(yn(b),p);else if(c.isHeaders(b))for(const[M,l]of b.entries())Q(l,M,m);else b!=null&&Q(p,b,m);return this}get(b,p){if(b=I(b),b){const m=c.findKey(this,b);if(m){const Gn=this[m];if(!p)return Gn;if(p===!0)return wn(Gn);if(c.isFunction(p))return p.call(this,Gn,m);if(c.isRegExp(p))return p.exec(Gn);throw new TypeError("parser must be boolean|regexp|function")}}}has(b,p){if(b=I(b),b){const m=c.findKey(this,b);return!!(m&&this[m]!==void 0&&(!p||ae(this,this[m],m,p)))}return!1}delete(b,p){const m=this;let Gn=!1;function Q(R){if(R=I(R),R){const M=c.findKey(m,R);M&&(!p||ae(m,m[M],M,p))&&(delete m[M],Gn=!0)}}return c.isArray(b)?b.forEach(Q):Q(b),Gn}clear(b){const p=Object.keys(this);let m=p.length,Gn=!1;for(;m--;){const Q=p[m];(!b||ae(this,this[Q],Q,b,!0))&&(delete this[Q],Gn=!0)}return Gn}normalize(b){const p=this,m={};return c.forEach(this,(Gn,Q)=>{const R=c.findKey(m,Q);if(R){p[R]=K(Gn),delete p[Q];return}const M=b?En(Q):String(Q).trim();M!==Q&&delete p[Q],p[M]=K(Gn),m[M]=!0}),this}concat(...b){return this.constructor.concat(this,...b)}toJSON(b){const p=Object.create(null);return c.forEach(this,(m,Gn)=>{m!=null&&m!==!1&&(p[Gn]=b&&c.isArray(m)?m.join(", "):m)}),p}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([b,p])=>b+": "+p).join(`
1103
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(b){return b instanceof this?b:new this(b)}static concat(b,...p){const m=new this(b);return p.forEach(Gn=>m.set(Gn)),m}static accessor(b){const p=(this[Pe]=this[Pe]={accessors:{}}).accessors,m=this.prototype;function Gn(Q){const R=I(Q);p[R]||(Rn(m,Q),p[R]=!0)}return c.isArray(b)?b.forEach(Gn):Gn(b),this}}T.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),c.reduceDescriptors(T.prototype,({value:x},b)=>{let p=b[0].toUpperCase()+b.slice(1);return{get:()=>x,set(m){this[p]=m}}}),c.freezeMethods(T);function le(x,b){const p=this||z,m=b||p,Gn=T.from(m.headers);let Q=m.data;return c.forEach(x,function(R){Q=R.call(p,Q,Gn.normalize(),b?b.status:void 0)}),Gn.normalize(),Q}function rt(x){return!!(x&&x.__CANCEL__)}function v(x,b,p){g.call(this,x??"canceled",g.ERR_CANCELED,b,p),this.name="CanceledError"}c.inherits(v,g,{__CANCEL__:!0});function it(x,b,p){const m=p.config.validateStatus;!p.status||!m||m(p.status)?x(p):b(new g("Request failed with status code "+p.status,[g.ERR_BAD_REQUEST,g.ERR_BAD_RESPONSE][Math.floor(p.status/100)-4],p.config,p.request,p))}function An(x){const b=/^([-+\w]{1,25})(:?\/\/|:)/.exec(x);return b&&b[1]||""}function xn(x,b){x=x||10;const p=new Array(x),m=new Array(x);let Gn=0,Q=0,R;return b=b!==void 0?b:1e3,function(M){const l=Date.now(),u=m[Q];R||(R=l),p[Gn]=M,m[Gn]=l;let o=Q,i=0;for(;o!==Gn;)i+=p[o++],o=o%x;if(Gn=(Gn+1)%x,Gn===Q&&(Q=(Q+1)%x),l-R<b)return;const r=u&&l-u;return r?Math.round(i*1e3/r):void 0}}function Tn(x,b){let p=0,m=1e3/b,Gn,Q;const R=(M,l=Date.now())=>{p=l,Gn=null,Q&&(clearTimeout(Q),Q=null),x.apply(null,M)};return[(...M)=>{const l=Date.now(),u=l-p;u>=m?R(M,l):(Gn=M,Q||(Q=setTimeout(()=>{Q=null,R(Gn)},m-u)))},()=>Gn&&R(Gn)]}const Y=(x,b,p=3)=>{let m=0;const Gn=xn(50,250);return Tn(Q=>{const R=Q.loaded,M=Q.lengthComputable?Q.total:void 0,l=R-m,u=Gn(l),o=R<=M;m=R;const i={loaded:R,total:M,progress:M?R/M:void 0,bytes:l,rate:u||void 0,estimated:u&&M&&o?(M-R)/u:void 0,event:Q,lengthComputable:M!=null,[b?"download":"upload"]:!0};x(i)},p)},De=(x,b)=>{const p=x!=null;return[m=>b[0]({lengthComputable:p,total:x,loaded:m}),b[1]]},Fe=x=>(...b)=>c.asap(()=>x(...b)),On=A.hasStandardBrowserEnv?((x,b)=>p=>(p=new URL(p,A.origin),x.protocol===p.protocol&&x.host===p.host&&(b||x.port===p.port)))(new URL(A.origin),A.navigator&&/(msie|trident)/i.test(A.navigator.userAgent)):()=>!0,Cn=A.hasStandardBrowserEnv?{write(x,b,p,m,Gn,Q){const R=[x+"="+encodeURIComponent(b)];c.isNumber(p)&&R.push("expires="+new Date(p).toGMTString()),c.isString(m)&&R.push("path="+m),c.isString(Gn)&&R.push("domain="+Gn),Q===!0&&R.push("secure"),document.cookie=R.join("; ")},read(x){const b=document.cookie.match(new RegExp("(^|;\\s*)("+x+")=([^;]*)"));return b?decodeURIComponent(b[3]):null},remove(x){this.write(x,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function kn(x){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(x)}function Nn(x,b){return b?x.replace(/\/?\/$/,"")+"/"+b.replace(/^\/+/,""):x}function ot(x,b){return x&&!kn(b)?Nn(x,b):b}const Le=x=>x instanceof T?{...x}:x;function j(x,b){b=b||{};const p={};function m(u,o,i,r){return c.isPlainObject(u)&&c.isPlainObject(o)?c.merge.call({caseless:r},u,o):c.isPlainObject(o)?c.merge({},o):c.isArray(o)?o.slice():o}function Gn(u,o,i,r){if(c.isUndefined(o)){if(!c.isUndefined(u))return m(void 0,u,i,r)}else return m(u,o,i,r)}function Q(u,o){if(!c.isUndefined(o))return m(void 0,o)}function R(u,o){if(c.isUndefined(o)){if(!c.isUndefined(u))return m(void 0,u)}else return m(void 0,o)}function M(u,o,i){if(i in b)return m(u,o);if(i in x)return m(void 0,u)}const l={url:Q,method:Q,data:Q,baseURL:R,transformRequest:R,transformResponse:R,paramsSerializer:R,timeout:R,timeoutMessage:R,withCredentials:R,withXSRFToken:R,adapter:R,responseType:R,xsrfCookieName:R,xsrfHeaderName:R,onUploadProgress:R,onDownloadProgress:R,decompress:R,maxContentLength:R,maxBodyLength:R,beforeRedirect:R,transport:R,httpAgent:R,httpsAgent:R,cancelToken:R,socketPath:R,responseEncoding:R,validateStatus:M,headers:(u,o,i)=>Gn(Le(u),Le(o),i,!0)};return c.forEach(Object.keys(Object.assign({},x,b)),function(u){const o=l[u]||Gn,i=o(x[u],b[u],u);c.isUndefined(i)&&o!==M||(p[u]=i)}),p}const ct=x=>{const b=j({},x);let{data:p,withXSRFToken:m,xsrfHeaderName:Gn,xsrfCookieName:Q,headers:R,auth:M}=b;b.headers=R=T.from(R),b.url=tt(ot(b.baseURL,b.url),x.params,x.paramsSerializer),M&&R.set("Authorization","Basic "+btoa((M.username||"")+":"+(M.password?unescape(encodeURIComponent(M.password)):"")));let l;if(c.isFormData(p)){if(A.hasStandardBrowserEnv||A.hasStandardBrowserWebWorkerEnv)R.setContentType(void 0);else if((l=R.getContentType())!==!1){const[u,...o]=l?l.split(";").map(i=>i.trim()).filter(Boolean):[];R.setContentType([u||"multipart/form-data",...o].join("; "))}}if(A.hasStandardBrowserEnv&&(m&&c.isFunction(m)&&(m=m(b)),m||m!==!1&&On(b.url))){const u=Gn&&Q&&Cn.read(Q);u&&R.set(Gn,u)}return b},Pn=typeof XMLHttpRequest<"u",Dn=Pn&&function(x){return new Promise(function(b,p){const m=ct(x);let Gn=m.data;const Q=T.from(m.headers).normalize();let{responseType:R,onUploadProgress:M,onDownloadProgress:l}=m,u,o,i,r,t;function e(){r&&r(),t&&t(),m.cancelToken&&m.cancelToken.unsubscribe(u),m.signal&&m.signal.removeEventListener("abort",u)}let n=new XMLHttpRequest;n.open(m.method.toUpperCase(),m.url,!0),n.timeout=m.timeout;function a(){if(!n)return;const f=T.from("getAllResponseHeaders"in n&&n.getAllResponseHeaders()),xe={data:!R||R==="text"||R==="json"?n.responseText:n.response,status:n.status,statusText:n.statusText,headers:f,config:x,request:n};it(function(F){b(F),e()},function(F){p(F),e()},xe),n=null}"onloadend"in n?n.onloadend=a:n.onreadystatechange=function(){!n||n.readyState!==4||n.status===0&&!(n.responseURL&&n.responseURL.indexOf("file:")===0)||setTimeout(a)},n.onabort=function(){n&&(p(new g("Request aborted",g.ECONNABORTED,x,n)),n=null)},n.onerror=function(){p(new g("Network Error",g.ERR_NETWORK,x,n)),n=null},n.ontimeout=function(){let f=m.timeout?"timeout of "+m.timeout+"ms exceeded":"timeout exceeded";const xe=m.transitional||nt;m.timeoutErrorMessage&&(f=m.timeoutErrorMessage),p(new g(f,xe.clarifyTimeoutError?g.ETIMEDOUT:g.ECONNABORTED,x,n)),n=null},Gn===void 0&&Q.setContentType(null),"setRequestHeader"in n&&c.forEach(Q.toJSON(),function(f,xe){n.setRequestHeader(xe,f)}),c.isUndefined(m.withCredentials)||(n.withCredentials=!!m.withCredentials),R&&R!=="json"&&(n.responseType=m.responseType),l&&([i,t]=Y(l,!0),n.addEventListener("progress",i)),M&&n.upload&&([o,r]=Y(M),n.upload.addEventListener("progress",o),n.upload.addEventListener("loadend",r)),(m.cancelToken||m.signal)&&(u=f=>{n&&(p(!f||f.type?new v(null,x,n):f),n.abort(),n=null)},m.cancelToken&&m.cancelToken.subscribe(u),m.signal&&(m.signal.aborted?u():m.signal.addEventListener("abort",u)));const d=An(m.url);if(d&&A.protocols.indexOf(d)===-1){p(new g("Unsupported protocol "+d+":",g.ERR_BAD_REQUEST,x));return}n.send(Gn||null)})},Fn=(x,b)=>{const{length:p}=x=x?x.filter(Boolean):[];if(b||p){let m=new AbortController,Gn;const Q=function(u){if(!Gn){Gn=!0,M();const o=u instanceof Error?u:this.reason;m.abort(o instanceof g?o:new v(o instanceof Error?o.message:o))}};let R=b&&setTimeout(()=>{R=null,Q(new g(`timeout ${b} of ms exceeded`,g.ETIMEDOUT))},b);const M=()=>{x&&(R&&clearTimeout(R),R=null,x.forEach(u=>{u.unsubscribe?u.unsubscribe(Q):u.removeEventListener("abort",Q)}),x=null)};x.forEach(u=>u.addEventListener("abort",Q));const{signal:l}=m;return l.unsubscribe=()=>c.asap(M),l}},Ln=function*(x,b){let p=x.byteLength;if(p<b){yield x;return}let m=0,Gn;for(;m<p;)Gn=m+b,yield x.slice(m,Gn),m=Gn},Un=async function*(x,b){for await(const p of jn(x))yield*Ln(p,b)},jn=async function*(x){if(x[Symbol.asyncIterator]){yield*x;return}const b=x.getReader();try{for(;;){const{done:p,value:m}=await b.read();if(p)break;yield m}}finally{await b.cancel()}},Ue=(x,b,p,m)=>{const Gn=Un(x,b);let Q=0,R,M=l=>{R||(R=!0,m&&m(l))};return new ReadableStream({async pull(l){try{const{done:u,value:o}=await Gn.next();if(u){M(),l.close();return}let i=o.byteLength;if(p){let r=Q+=i;p(r)}l.enqueue(new Uint8Array(o))}catch(u){throw M(u),u}},cancel(l){return M(l),Gn.return()}},{highWaterMark:2})},re=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",at=re&&typeof ReadableStream=="function",Bn=re&&(typeof TextEncoder=="function"?(x=>b=>x.encode(b))(new TextEncoder):async x=>new Uint8Array(await new Response(x).arrayBuffer())),lt=(x,...b)=>{try{return!!x(...b)}catch{return!1}},vn=at&&lt(()=>{let x=!1;const b=new Request(A.origin,{body:new ReadableStream,method:"POST",get duplex(){return x=!0,"half"}}).headers.has("Content-Type");return x&&!b}),je=64*1024,pe=at&&lt(()=>c.isReadableStream(new Response("").body)),Z={stream:pe&&(x=>x.body)};re&&(x=>{["text","arrayBuffer","blob","formData","stream"].forEach(b=>{!Z[b]&&(Z[b]=c.isFunction(x[b])?p=>p[b]():(p,m)=>{throw new g(`Response type '${b}' is not supported`,g.ERR_NOT_SUPPORT,m)})})})(new Response);const In=async x=>{if(x==null)return 0;if(c.isBlob(x))return x.size;if(c.isSpecCompliantForm(x))return(await new Request(A.origin,{method:"POST",body:x}).arrayBuffer()).byteLength;if(c.isArrayBufferView(x)||c.isArrayBuffer(x))return x.byteLength;if(c.isURLSearchParams(x)&&(x=x+""),c.isString(x))return(await Bn(x)).byteLength},qn=async(x,b)=>c.toFiniteNumber(x.getContentLength())??In(b),Mn=re&&(async x=>{let{url:b,method:p,data:m,signal:Gn,cancelToken:Q,timeout:R,onDownloadProgress:M,onUploadProgress:l,responseType:u,headers:o,withCredentials:i="same-origin",fetchOptions:r}=ct(x);u=u?(u+"").toLowerCase():"text";let t=Fn([Gn,Q&&Q.toAbortSignal()],R),e;const n=t&&t.unsubscribe&&(()=>{t.unsubscribe()});let a;try{if(l&&vn&&p!=="get"&&p!=="head"&&(a=await qn(o,m))!==0){let _=new Request(b,{method:"POST",body:m,duplex:"half"}),S;if(c.isFormData(m)&&(S=_.headers.get("content-type"))&&o.setContentType(S),_.body){const[Ae,Vn]=De(a,Y(Fe(l)));m=Ue(_.body,je,Ae,Vn)}}c.isString(i)||(i=i?"include":"omit");const d="credentials"in Request.prototype;e=new Request(b,{...r,signal:t,method:p.toUpperCase(),headers:o.normalize().toJSON(),body:m,duplex:"half",credentials:d?i:void 0});let f=await fetch(e);const xe=pe&&(u==="stream"||u==="response");if(pe&&(M||xe&&n)){const _={};["status","statusText","headers"].forEach(Me=>{_[Me]=f[Me]});const S=c.toFiniteNumber(f.headers.get("content-length")),[Ae,Vn]=M&&De(S,Y(Fe(M),!0))||[];f=new Response(Ue(f.body,je,Ae,()=>{Vn&&Vn(),n&&n()}),_)}u=u||"text";let F=await Z[c.findKey(Z,u)||"text"](f,x);return!xe&&n&&n(),await new Promise((_,S)=>{it(_,S,{data:F,headers:T.from(f.headers),status:f.status,statusText:f.statusText,config:x,request:e})})}catch(d){throw n&&n(),d&&d.name==="TypeError"&&/fetch/i.test(d.message)?Object.assign(new g("Network Error",g.ERR_NETWORK,x,e),{cause:d.cause||d}):g.from(d,d&&d.code,x,e)}}),me={http:tn,xhr:Dn,fetch:Mn};c.forEach(me,(x,b)=>{if(x){try{Object.defineProperty(x,"name",{value:b})}catch{}Object.defineProperty(x,"adapterName",{value:b})}});const Be=x=>`- ${x}`,Hn=x=>c.isFunction(x)||x===null||x===!1,ut={getAdapter:x=>{x=c.isArray(x)?x:[x];const{length:b}=x;let p,m;const Gn={};for(let Q=0;Q<b;Q++){p=x[Q];let R;if(m=p,!Hn(p)&&(m=me[(R=String(p)).toLowerCase()],m===void 0))throw new g(`Unknown adapter '${R}'`);if(m)break;Gn[R||"#"+Q]=m}if(!m){const Q=Object.entries(Gn).map(([M,l])=>`adapter ${M} `+(l===!1?"is not supported by the environment":"is not available in the build"));let R=b?Q.length>1?`since :
1104
+ `+Q.map(Be).join(`
1105
+ `):" "+Be(Q[0]):"as no adapter specified";throw new g("There is no suitable adapter to dispatch the request "+R,"ERR_NOT_SUPPORT")}return m},adapters:me};function ue(x){if(x.cancelToken&&x.cancelToken.throwIfRequested(),x.signal&&x.signal.aborted)throw new v(null,x)}function ve(x){return ue(x),x.headers=T.from(x.headers),x.data=le.call(x,x.transformRequest),["post","put","patch"].indexOf(x.method)!==-1&&x.headers.setContentType("application/x-www-form-urlencoded",!1),ut.getAdapter(x.adapter||z.adapter)(x).then(function(b){return ue(x),b.data=le.call(x,x.transformResponse,b),b.headers=T.from(b.headers),b},function(b){return rt(b)||(ue(x),b&&b.response&&(b.response.data=le.call(x,x.transformResponse,b.response),b.response.headers=T.from(b.response.headers))),Promise.reject(b)})}const ft="1.7.9",ie={};["object","boolean","number","function","string","symbol"].forEach((x,b)=>{ie[x]=function(p){return typeof p===x||"a"+(b<1?"n ":" ")+x}});const Ie={};ie.transitional=function(x,b,p){function m(Gn,Q){return"[Axios v"+ft+"] Transitional option '"+Gn+"'"+Q+(p?". "+p:"")}return(Gn,Q,R)=>{if(x===!1)throw new g(m(Q," has been removed"+(b?" in "+b:"")),g.ERR_DEPRECATED);return b&&!Ie[Q]&&(Ie[Q]=!0,console.warn(m(Q," has been deprecated since v"+b+" and will be removed in the near future"))),x?x(Gn,Q,R):!0}},ie.spelling=function(x){return(b,p)=>(console.warn(`${p} is likely a misspelling of ${x}`),!0)};function $n(x,b,p){if(typeof x!="object")throw new g("options must be an object",g.ERR_BAD_OPTION_VALUE);const m=Object.keys(x);let Gn=m.length;for(;Gn-- >0;){const Q=m[Gn],R=b[Q];if(R){const M=x[Q],l=M===void 0||R(M,Q,x);if(l!==!0)throw new g("option "+Q+" must be "+l,g.ERR_BAD_OPTION_VALUE);continue}if(p!==!0)throw new g("Unknown option "+Q,g.ERR_BAD_OPTION)}}const X={assertOptions:$n,validators:ie},k=X.validators;class U{constructor(b){this.defaults=b,this.interceptors={request:new Ne,response:new Ne}}async request(b,p){try{return await this._request(b,p)}catch(m){if(m instanceof Error){let Gn={};Error.captureStackTrace?Error.captureStackTrace(Gn):Gn=new Error;const Q=Gn.stack?Gn.stack.replace(/^.+\n/,""):"";try{m.stack?Q&&!String(m.stack).endsWith(Q.replace(/^.+\n.+\n/,""))&&(m.stack+=`
1106
+ `+Q):m.stack=Q}catch{}}throw m}}_request(b,p){typeof b=="string"?(p=p||{},p.url=b):p=b||{},p=j(this.defaults,p);const{transitional:m,paramsSerializer:Gn,headers:Q}=p;m!==void 0&&X.assertOptions(m,{silentJSONParsing:k.transitional(k.boolean),forcedJSONParsing:k.transitional(k.boolean),clarifyTimeoutError:k.transitional(k.boolean)},!1),Gn!=null&&(c.isFunction(Gn)?p.paramsSerializer={serialize:Gn}:X.assertOptions(Gn,{encode:k.function,serialize:k.function},!0)),X.assertOptions(p,{baseUrl:k.spelling("baseURL"),withXsrfToken:k.spelling("withXSRFToken")},!0),p.method=(p.method||this.defaults.method||"get").toLowerCase();let R=Q&&c.merge(Q.common,Q[p.method]);Q&&c.forEach(["delete","get","head","post","put","patch","common"],e=>{delete Q[e]}),p.headers=T.concat(R,Q);const M=[];let l=!0;this.interceptors.request.forEach(function(e){typeof e.runWhen=="function"&&e.runWhen(p)===!1||(l=l&&e.synchronous,M.unshift(e.fulfilled,e.rejected))});const u=[];this.interceptors.response.forEach(function(e){u.push(e.fulfilled,e.rejected)});let o,i=0,r;if(!l){const e=[ve.bind(this),void 0];for(e.unshift.apply(e,M),e.push.apply(e,u),r=e.length,o=Promise.resolve(p);i<r;)o=o.then(e[i++],e[i++]);return o}r=M.length;let t=p;for(i=0;i<r;){const e=M[i++],n=M[i++];try{t=e(t)}catch(a){n.call(this,a);break}}try{o=ve.call(this,t)}catch(e){return Promise.reject(e)}for(i=0,r=u.length;i<r;)o=o.then(u[i++],u[i++]);return o}getUri(b){b=j(this.defaults,b);const p=ot(b.baseURL,b.url);return tt(p,b.params,b.paramsSerializer)}}c.forEach(["delete","get","head","options"],function(x){U.prototype[x]=function(b,p){return this.request(j(p||{},{method:x,url:b,data:(p||{}).data}))}}),c.forEach(["post","put","patch"],function(x){function b(p){return function(m,Gn,Q){return this.request(j(Q||{},{method:x,headers:p?{"Content-Type":"multipart/form-data"}:{},url:m,data:Gn}))}}U.prototype[x]=b(),U.prototype[x+"Form"]=b(!0)});class Ee{constructor(b){if(typeof b!="function")throw new TypeError("executor must be a function.");let p;this.promise=new Promise(function(Gn){p=Gn});const m=this;this.promise.then(Gn=>{if(!m._listeners)return;let Q=m._listeners.length;for(;Q-- >0;)m._listeners[Q](Gn);m._listeners=null}),this.promise.then=Gn=>{let Q;const R=new Promise(M=>{m.subscribe(M),Q=M}).then(Gn);return R.cancel=function(){m.unsubscribe(Q)},R},b(function(Gn,Q,R){m.reason||(m.reason=new v(Gn,Q,R),p(m.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(b){if(this.reason){b(this.reason);return}this._listeners?this._listeners.push(b):this._listeners=[b]}unsubscribe(b){if(!this._listeners)return;const p=this._listeners.indexOf(b);p!==-1&&this._listeners.splice(p,1)}toAbortSignal(){const b=new AbortController,p=m=>{b.abort(m)};return this.subscribe(p),b.signal.unsubscribe=()=>this.unsubscribe(p),b.signal}static source(){let b;return{token:new Ee(function(p){b=p}),cancel:b}}}function zn(x){return function(b){return x.apply(null,b)}}function Wn(x){return c.isObject(x)&&x.isAxiosError===!0}const ge={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(ge).forEach(([x,b])=>{ge[b]=x});function dt(x){const b=new U(x),p=$e(U.prototype.request,b);return c.extend(p,U.prototype,b,{allOwnKeys:!0}),c.extend(p,b,null,{allOwnKeys:!0}),p.create=function(m){return dt(j(x,m))},p}const E=dt(z);E.Axios=U,E.CanceledError=v,E.CancelToken=Ee,E.isCancel=rt,E.VERSION=ft,E.toFormData=se,E.AxiosError=g,E.Cancel=E.CanceledError,E.all=function(x){return Promise.all(x)},E.spread=zn,E.isAxiosError=Wn,E.mergeConfig=j,E.AxiosHeaders=T,E.formToJSON=x=>st(c.isHTMLForm(x)?new FormData(x):x),E.getAdapter=ut.getAdapter,E.HttpStatusCode=ge,E.default=E;const Re=E.create({baseURL:location.origin,timeout:6e4,params:{}});Re.interceptors.response.use(x=>x,x=>{var b,p,m,Gn,Q,R,M,l,u,o,i;if(x.response){if(x.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(e){e&&OpenC3Auth.setTokens()}),x.response.config.headers["Ignore-Errors"]&&x.response.config.headers["Ignore-Errors"].includes(x.response.status.toString()))return Promise.reject(x);let r=`HTTP ${x.response.status} - `;(b=x.response)!=null&&b.statusText&&(r+=`${x.response.statusText} `),(m=(p=x.response)==null?void 0:p.config)!=null&&m.data&&(r+=`${x.response.config.data} `),(Q=(Gn=x.response)==null?void 0:Gn.data)!=null&&Q.message?r+=`${x.response.data.message}`:(M=(R=x.response)==null?void 0:R.data)!=null&&M.exception?r+=`${x.response.data.exception}`:(o=(u=(l=x.response)==null?void 0:l.data)==null?void 0:u.error)!=null&&o.message?(x.response.data.error.class&&(r+=`${x.response.data.error.class} `),r+=`${x.response.data.error.message}`):r+=`${(i=x.response)==null?void 0:i.data}`;const{$cosmosNotify:t}=window;throw t&&t.serious({title:"Network error",body:r}),x}else throw x});const V=async function(x,b,{data:p,params:m={},headers:Gn,noAuth:Q=!1,noScope:R=!1,onUploadProgress:M=!1}={}){if(!Q){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}Gn.Authorization=localStorage.openc3Token}return Gn.manual=!0,!R&&!m.scope&&(m.scope=window.openc3Scope),Re({method:x,url:b,data:p,params:m,headers:Gn,onUploadProgress:M})},_e={Accept:"application/json"},qe={..._e,"Content-Type":"application/json"},ns={get:function(x,{params:b,headers:p=_e,noScope:m,noAuth:Gn,onUploadProgress:Q}={}){return V("get",x,{params:b,headers:p,noScope:m,noAuth:Gn,onUploadProgress:Q})},put:function(x,{data:b,params:p,headers:m=qe,noScope:Gn,noAuth:Q,onUploadProgress:R}={}){return V("put",x,{data:b,params:p,headers:m,noScope:Gn,noAuth:Q,onUploadProgress:R})},post:function(x,{data:b,params:p,headers:m=qe,noScope:Gn,noAuth:Q,onUploadProgress:R}={}){return V("post",x,{data:b,params:p,headers:m,noScope:Gn,noAuth:Q,onUploadProgress:R})},delete:function(x,{params:b,headers:p=_e,noScope:m,noAuth:Gn,onUploadProgress:Q}={}){return V("delete",x,{params:b,headers:p,noScope:m,noAuth:Gn,onUploadProgress:Q})}};var ht={message_types:{welcome:"welcome",disconnect:"disconnect",ping:"ping",confirmation:"confirm_subscription",rejection:"reject_subscription"},disconnect_reasons:{unauthorized:"unauthorized",invalid_request:"invalid_request",server_restart:"server_restart",remote:"remote"},default_mount_path:"/cable",protocols:["actioncable-v1-json","actioncable-unsupported"]};const{message_types:q,protocols:be}=ht;be.slice(0,be.length-1);class is{constructor(){D(this,"id",1)}async exec(b,p,m={},Gn={},Q=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return m.scope=window.openc3Scope,Gn.manual=!0,(await Re.post("/openc3-api/api",{jsonrpc:"2.0",method:b,params:p,id:this.id,keyword_params:m},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...Gn},timeout:Q})).data.result}catch(R){let M=new Error;throw R.response?(M.name=R.response.data.error.data.class,M.message=R.response.data.error.data.message,M.object=R.response.data.error):R.request?(M.name="Request error",M.message="Request error, no response received"):M.name="Unknown error",M}}decode_openc3_type(b){if(b!==null&&typeof b=="object"&&b.json_class=="Float"&&b.raw){if(b.raw=="NaN")return NaN;if(b.raw=="Infinity")return 1/0;if(b.raw=="-Infinity")return-1/0}return null}encode_openc3_type(b){return Number.isNaN(b)?{json_class:"Float",raw:"NaN"}:b==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:b==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(b=>{b&&(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(b){return this.exec("set_offline_access",[b])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(b,p){return this.exec("map_target_to_interface",[b,p])}connect_interface(b,...p){return p.length>0?this.exec("connect_interface",[b,...p]):this.exec("connect_interface",[b])}disconnect_interface(b){return this.exec("disconnect_interface",[b])}interface_cmd(b,p,...m){return this.exec("interface_cmd",[b,p,...m])}get_all_router_info(){return this.exec("get_all_router_info",[])}connect_router(b){return this.exec("connect_router",[b])}disconnect_router(b){return this.exec("disconnect_router",[b])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(b){return this.exec("get_tlm_cnts",[b])}get_item(b,p,m){return this.exec("get_item",[b,p,m])}get_param(b,p,m){return this.exec("get_param",[b,p,m])}get_parameter(b,p,m){return this.exec("get_param",[b,p,m])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(b){return this.exec("set_limits_set",[b])}get_target(b){return this.exec("get_target",[b])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(b,p){return this.exec("get_tlm",[b,p])}get_telemetry(b,p){return this.exec("get_tlm",[b,p])}get_all_tlm(b){return this.exec("get_all_tlm",[b])}get_all_telemetry(b){return this.exec("get_all_tlm",[b])}get_all_tlm_names(b,p=!1){return this.exec("get_all_tlm_names",[b],{hidden:p})}get_all_telemetry_names(b){return this.exec("get_all_tlm_names",[b])}async get_tlm_packet(b,p,m,Gn=30){const Q=await this.exec("get_tlm_packet",[b,p],{type:m,stale_time:Gn});if(Q!=null){let R=Q.length,M=null;for(let l=0;l<R;l++)M=this.decode_openc3_type(Q[l][1]),M!==null&&(Q[l][1]=M)}return Q}get_packet_derived_items(b,p){return this.exec("get_packet_derived_items",[b,p])}get_tlm_buffer(b,p){return this.exec("get_tlm_buffer",[b,p])}async get_tlm_values(b,p=30,m=null){let Gn={stale_time:p};m!==null&&(Gn.cache_timeout=m);const Q=await this.exec("get_tlm_values",[b],Gn,{},1e4);let R=Q[0].length,M=null;for(let l=0;l<R;l++)M=this.decode_openc3_type(Q[0][l]),M!==null&&(Q[0][l]=M);return Q}get_limits(b,p,m){return this.exec("get_limits",[b,p,m])}async tlm(b,p,m,Gn="CONVERTED"){let Q=null;if(p===void 0)Q=await this.exec("tlm",[b]);else if(m===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(p))Q=await this.exec("tlm",[b],{type:p});else{let M=new Error;throw M.name="TypeError",M.message=`Invalid data type ${p}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,M}else Q=await this.exec("tlm",[b,p,m],{type:Gn});let R=this.decode_openc3_type(Q);return R!==null&&(Q=R),Q}async inject_tlm(b,p,m=null,Gn="CONVERTED"){data=await this.exec("inject_tlm",[b,p,m],{type:Gn})}set_tlm(b,p,m,Gn){return this.exec("set_tlm",[b,p,m],{type:Gn})}override_tlm(b,p,m,Gn){return this.exec("override_tlm",[b,p,m],{type:Gn})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(b,p,m,Gn){return this.exec("normalize_tlm",[b,p,m],{type:Gn})}get_all_cmds(b){return this.exec("get_all_cmds",[b])}get_all_commands(b){return this.exec("get_all_cmds",[b])}get_all_cmd_names(b,p=!1){return this.exec("get_all_cmd_names",[b],{hidden:p})}get_all_command_names(b){return this.exec("get_all_cmd_names",[b])}get_cmd(b,p){return this.exec("get_cmd",[b,p])}get_command(b,p){return this.exec("get_cmd",[b,p])}get_cmd_cnts(b){return this.exec("get_cmd_cnts",[b])}get_cmd_value(b,p,m,Gn="CONVERTED"){return this.exec("get_cmd_value",[b,p,m,Gn])}get_cmd_buffer(b,p){return this.exec("get_cmd_buffer",[b,p])}_cmd(b,p,m,Gn,Q){let R=null;for(let M in Gn)Object.prototype.hasOwnProperty.call(Gn,M)&&(R=this.encode_openc3_type(Gn[M]),R!==null&&(Gn[M]=R));return this.exec(b,[p,m,Gn],{},Q)}get_cmd_hazardous(b,p,m,Gn={}){return p===void 0?this.exec("get_cmd_hazardous",b,{},Gn):this._cmd("get_cmd_hazardous",b,p,m,Gn)}cmd(b,p,m,Gn={}){return p===void 0?this.exec("cmd",b,{},Gn):this._cmd("cmd",b,p,m,Gn)}cmd_no_range_check(b,p,m,Gn={}){return p===void 0?this.exec("cmd_no_range_check",b,{},Gn):this._cmd("cmd_no_range_check",b,p,m,Gn)}cmd_raw(b,p,m,Gn={}){return p===void 0?this.exec("cmd_raw",b,{},Gn):this._cmd("cmd_raw",b,p,m,Gn)}cmd_raw_no_range_check(b,p,m,Gn={}){return p===void 0?this.exec("cmd_raw_no_range_check",b,{},Gn):this._cmd("cmd_raw_no_range_check",b,p,m,Gn)}cmd_no_hazardous_check(b,p,m,Gn={}){return p===void 0?this.exec("cmd_no_hazardous_check",b,{},Gn):this._cmd("cmd_no_hazardous_check",b,p,m,Gn)}cmd_no_checks(b,p,m,Gn={}){return p===void 0?this.exec("cmd_no_checks",b,{},Gn):this._cmd("cmd_no_checks",b,p,m,Gn)}cmd_raw_no_hazardous_check(b,p,m,Gn={}){return p===void 0?this.exec("cmd_raw_no_hazardous_check",b,{},Gn):this._cmd("cmd_raw_no_hazardous_check",b,p,m,Gn)}cmd_raw_no_checks(b,p,m,Gn={}){return p===void 0?this.exec("cmd_raw_no_checks",b,{},Gn):this._cmd("cmd_raw_no_checks",b,p,m,Gn)}build_cmd(b,p,m){return p===void 0?this.exec("build_cmd",b):this._cmd("build_cmd",b,p,m)}build_command(b,p,m){return p===void 0?this.exec("build_cmd",b):this._cmd("build_cmd",b,p,m)}get_interface_names(){return this.exec("get_interface_names",[])}send_raw(b,p){return this.exec("send_raw",[b,p])}list_configs(b){return this.exec("list_configs",[b])}load_config(b,p){return this.exec("load_config",[b,p])}save_config(b,p,m){return this.exec("save_config",[b,p,m])}delete_config(b,p){return this.exec("delete_config",[b,p])}enable_limits(b,p,m){return this.exec("enable_limits",[b,p,m])}disable_limits(b,p,m){return this.exec("disable_limits",[b,p,m])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(b){return this.exec("get_overall_limits_state",[b])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(b){return this.exec("get_setting",[b])}get_settings(b){return this.exec("get_settings",b)}set_setting(b,p){return this.exec("set_setting",[b,p])}save_setting(b,p){return this.exec("set_setting",[b,p])}get_metrics(){return this.exec("get_metrics",[])}async hashString(b){if(window.isSecureContext){const p=new TextEncoder().encode(b),m=await crypto.subtle.digest("SHA-256",p),Gn=new Uint8Array(m);return Array.from(Gn).map(Q=>Q.toString(16).padStart(2,"0")).join("")}}}const Utilities={methods:{isFloat(x){return!!(/^\s*[-+]?\d*\.\d+\s*$/.test(x)||/^\s*[-+]?(\d+((\.\d+)?)|(\.\d+))[eE][-+]?\d+\s*$/.test(x))},isInt(x){return!!(/^\s*[-+]?\d+\s*$/.test(x)||/^\s*0[xX][\dabcdefABCDEF]+\s*$/.test(x))},isArray(x){return!!/^\s*\[.*\]\s*$/.test(x)},removeQuotes(x){if(x.length<2)return x;var b=x.charAt(0);if(b!=='"'&&b!=="'")return x;var p=x.charAt(x.length-1);return b!==p?x:x.slice(1,-1)},convertToString(x){var b=0,p="";if(Object.prototype.toString.call(x).slice(8,-1)==="Array"){var m=x.length;for(p="[ ",b=0;b<m;b++)Object.prototype.toString.call(x[b]).slice(8,-1)==="String"?p+='"'+x[b]+'"':p+=x[b],b!==m-1&&(p+=", ");p+=" ]"}else if(Object.prototype.toString.call(x).slice(8,-1)==="Object")if(x.json_class==="String"&&x.raw)for(p="0x",b=0;b<x.raw.length;b++){var Gn=x.raw[b].toString(16).toUpperCase();Gn.length<2&&(Gn="0"+Gn),p+=Gn}else x.json_class==="Float"&&x.raw&&(p=x.raw);else p=String(x);return p}}},_sfc_main$1={mixins:[Utilities],props:{modelValue:{type:[String,Number],default:void 0},states:{type:Object,default:()=>null},statesInHex:{type:Boolean,default:!1}},computed:{textFieldValue(){return this.convertToString(this.modelValue)},stateValue(){return this.statesInHex?"0x"+this.modelValue.toString(16):this.modelValue},selectValue(){return this.modelValue===""?null:this.modelValue},stateOptions(){return this.states?Object.keys(this.states).map(x=>({label:x,...this.states[x]})):null},hazardous(){var x,b;return((b=(x=Object.entries(this.states).find(([p,m])=>m.value===this.modelValue))==null?void 0:x.at(1))==null?void 0:b.hazardous)!==void 0},stateClass(){return this.hazardous?"hazardous mr-4":"mr-4"}},methods:{handleChange(x){this.$emit("update:modelValue",x)}}},_hoisted_1$1={key:1,class:"d-flex align-center"};function _sfc_render$1(x,b,p,m,Gn,Q){const R=resolveComponent("v-text-field"),M=resolveComponent("v-select");return openBlock(),createElementBlock("div",null,[p.states?(openBlock(),createElementBlock("div",_hoisted_1$1,[createVNode(M,{items:Q.stateOptions,"model-value":Q.selectValue,"onUpdate:modelValue":Q.handleChange,"item-title":"label",class:normalizeClass(Q.stateClass),"hide-details":"",density:"compact",variant:"outlined",placeholder:"Select...","min-width":"120px","data-test":"cmd-param-select"},null,8,["items","model-value","onUpdate:modelValue","class"]),createVNode(R,{"model-value":Q.stateValue,disabled:"","hide-details":"",density:"compact",variant:"outlined","min-width":"60px","data-test":"cmd-param-value"},null,8,["model-value"])])):(openBlock(),createBlock(R,{key:0,"model-value":Q.textFieldValue,"onUpdate:modelValue":Q.handleChange,"hide-details":"",density:"compact",variant:"filled","data-test":"cmd-param-value"},null,8,["model-value","onUpdate:modelValue"]))])}const CommandParameterEditor=_export_sfc(_sfc_main$1,[["render",_sfc_render$1],["__scopeId","data-v-b19a55d5"]]),_sfc_main={mixins:[Utilities],components:{DetailsDialog:P$1,CriticalCmdDialog:N,TargetPacketItemChooser:et$1,CommandParameterEditor,TopBar:W,Openc3Screen:$e$1},data(){return{title:"Command Sender",search:"",headers:[{title:"Name",value:"parameter_name"},{title:"Value or State",value:"val"},{title:"Units",value:"units"},{title:"Range",value:"range"},{title:"Description",value:"description"}],editor:null,targetName:"",commandName:"",paramList:"",lastTargetName:"",lastCommandName:"",lastParamList:"",ignoreRangeChecks:!1,statesInHex:!1,showIgnoredParams:!1,cmdRaw:!1,ignoredParams:[],rows:[],interfaces:[],selectedInterface:"",rawCmdFile:null,status:"",history:"",hazardousCommand:"",displaySendHazardous:!1,displayErrorDialog:!1,displaySendRaw:!1,displayCriticalCmd:!1,criticalCmdUuid:null,criticalCmdString:null,criticalCmdUser:null,sendDisabled:!1,api:null,viewDetails:!1,contextMenuShown:!1,parameterName:"",reservedItemNames:[],x:0,y:0,contextMenuOptions:[{title:"Details",action:()=>{this.contextMenuShown=!1,this.viewDetails=!0}}],keywords:[],screenTarget:null,screenName:null,screenDefinition:null,screenCount:0}},computed:{menus:function(){return[{label:"Mode",items:[{label:"Ignore Range Checks",checkbox:!0,checked:this.ignoreRangeChecks,command:()=>{this.ignoreRangeChecks=!this.ignoreRangeChecks}},{label:"Display State Values in Hex",checkbox:!0,checked:this.statesInHex,command:()=>{this.statesInHex=!this.statesInHex}},{label:"Show Ignored Parameters",checkbox:!0,checked:this.showIgnoredParams,command:()=>{this.showIgnoredParams=!this.showIgnoredParams,this.updateCmdParams()}},{label:"Disable Parameter Conversions",checkbox:!0,checked:this.cmdRaw,command:()=>{this.cmdRaw=!this.cmdRaw.checked}}]}]}},created(){ns.get("/openc3-api/autocomplete/reserved-item-names").then(x=>{this.reservedItemNames=x.data}),this.api=new is,this.$route.params.target&&this.$route.params.packet&&this.commandChanged({targetName:this.$route.params.target.toUpperCase(),packetName:this.$route.params.packet.toUpperCase()}),ns.get("/openc3-api/autocomplete/keywords/screen").then(x=>{this.keywords=x.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",x=>{if(x.key==="Enter"){x.preventDefault();let b=this.editor.session.getLine(this.editor.getCursorPosition().row);if(b==="")return;let p=b.indexOf('"'),m=b.lastIndexOf('"');b=b.substr(p+1,m-p-1),this.sendCmd(b)}})},beforeUnmount(){this.editor.destroy(),this.editor.container.remove()},methods:{showContextMenu(x,b){x.preventDefault(),this.parameterName=b.item.parameter_name,this.contextMenuShown=!1,this.x=x.clientX,this.y=x.clientY,this.$nextTick(()=>{this.contextMenuShown=!0})},convertToValue(param){if(param.val!==void 0&&param.states&&!this.cmdRaw)return Object.keys(param.states).find(x=>param.states[x].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 x=upcaseStr.slice(2);x.length%2!==0&&(x="0"+x);let b={json_class:"String",raw:[]};for(let p=0;p<x.length;p+=2){let m=x.charAt(p)+x.charAt(p+1);b.raw.push(parseInt(m,16))}return b}else return upcaseStr==="INFINITY"?1/0:upcaseStr==="-INFINITY"?-1/0:upcaseStr==="NAN"?NaN:this.isFloat(str)?parseFloat(str):this.isInt(str)?parseInt(str):this.isArray(str)?eval(str):str}else return quotesRemoved},commandChanged(x){(this.targetName!==x.targetName||this.commandName!==x.packetName)&&(this.targetName=x.targetName,this.commandName=x.packetName,this.sendDisabled===!1&&this.updateCmdParams(),this.$router.replace({name:"CommandSender",params:{target:this.targetName,packet:this.commandName}}).catch(b=>{}))},updateCmdParams(){this.sendDisabled=!0,this.ignoredParams=[],this.rows=[],this.api.get_target(this.targetName).then(x=>(this.ignoredParams=x.ignored_parameters,this.api.get_cmd(this.targetName,this.commandName)),x=>{this.displayError("getting ignored parameters",x),this.sendDisabled=!1}).then(x=>{if(x.items.forEach(b=>{if(!this.reservedItemNames.includes(b.name)&&(!this.ignoredParams.includes(b.name)||this.showIgnoredParams)){let p=b.default;!b.states&&b.data_type==="STRING"&&typeof b.default=="string"&&(p=`'${p}'`),b.required&&(p=""),b.format_string&&(p=sprintf(b.format_string,b.default));let m="N/A";b.minimum!=null&&b.maximum!=null&&(b.data_type==="FLOAT"&&(b.minimum<-1e6&&(b.minimum=b.minimum.toExponential(3)),b.maximum>1e6&&(b.maximum=b.maximum.toExponential(3))),m=`${b.minimum}..${b.maximum}`),this.rows.push({parameter_name:b.name,val:p,states:b.states,description:b.description,range:m,units:b.units,type:b.data_type})}}),x.screen)this.loadScreen(x.screen[0],x.screen[1]).then(b=>{this.screenTarget=x.screen[0],this.screenName=x.screen[1],this.screenDefinition=b.data,this.screenCount+=1});else{if(x.related_items){this.screenTarget="LOCAL",this.screenName="CMDSENDER";let b=`SCREEN AUTO AUTO 1.0
1107
+ `;for(const p of x.related_items)b+=`LABELVALUE '${p[0]}' '${p[1]}' '${p[2]}' WITH_UNITS 20
1108
+ `;this.screenDefinition=b}else this.screenTarget=null,this.screenName=null,this.screenDefinition=null;this.screenCount+=1}this.sendDisabled=!1,this.status=""},x=>{this.displayError("getting command parameters",x),this.sendDisabled=!1})},createParamList(){let x={};for(const b of this.rows)x[b.parameter_name]=this.convertToValue(b);return x},buildCmd(){this.sendCmd(this.targetName,this.commandName,this.createParamList())},sendCmd(x,b,p){this.lastTargetName=x,this.lastCommandName=b,this.lastParamList=p,this.sendDisabled=!0;let m=!1,Gn="";this.api.get_cmd_hazardous(x,b,p).then(Q=>{if(m=Q,m)b===void 0?this.hazardousCommand=x.split(" ").slice(0,2).join(" "):this.hazardousCommand=`${x} ${b}`,this.displaySendHazardous=!0;else{let R;this.cmdRaw?this.ignoreRangeChecks?(Gn="cmd_raw_no_range_check",R=this.api.cmd_raw_no_range_check(x,b,p,{"Ignore-Errors":"428"})):(Gn="cmd_raw",R=this.api.cmd_raw(x,b,p,{"Ignore-Errors":"428 500"})):this.ignoreRangeChecks?(Gn="cmd_no_range_check",R=this.api.cmd_no_range_check(x,b,p,{"Ignore-Errors":"428"})):(Gn="cmd",R=this.api.cmd(x,b,p,{"Ignore-Errors":"428 500"})),R.then(M=>{this.processCmdResponse(!0,x,b,Gn,M)},M=>{this.processCmdResponse(!1,x,b,Gn,M)})}},Q=>{this.processCmdResponse(!1,x,b,Gn,Q)})},sendHazardousCmd(){this.displaySendHazardous=!1;let x="",b="";this.cmdRaw?this.ignoreRangeChecks?(b="cmd_raw_no_range_check",x=this.api.cmd_raw_no_checks(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428"})):(b="cmd_raw",x=this.api.cmd_raw_no_hazardous_check(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428 500"})):this.ignoreRangeChecks?(b="cmd_no_range_check",x=this.api.cmd_no_checks(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428"})):(b="cmd",x=this.api.cmd_no_hazardous_check(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428 500"})),x.then(p=>{this.processCmdResponse(!0,this.lastTargetName,this.lastCommandName,b,p)},p=>{this.processCmdResponse(!1,this.lastTargetName,this.lastCommandName,b,p)})},cancelHazardousCmd(){this.displaySendHazardous=!1,this.status="Hazardous command not sent",this.sendDisabled=!1},processCmdResponse(x,b,p,m,Gn){p===void 0&&([b,p]=b.split(" ").slice(0,2));let Q="";if(x){Q=`${m}("${Gn[0]} ${Gn[1]}`;let R=Object.keys(Gn[2]);if(R.length>0){Q+=" with ";for(let M=0;M<R.length;M++){let l=R[M],u=this.convertToString(Gn[2][l]);typeof Gn[2][l]=="string"&&u.charAt(0)!=="'"&&u.charAt(0)!=='"'&&(u=`'${u}'`),Q+=l+" "+u,M<R.length-1&&(Q+=", ")}}if(Q+='")',!this.history.includes(Q)){let M=Q;this.history.length!==0&&(M+=`
1109
+ ${this.history}`),this.editor.setValue(M),this.editor.moveCursorTo(0,0)}if(Q+=" sent.",this.status.includes(Q)){let M=this.status.split("sent.");if(M[1].includes("(")){let l=parseInt(M[1].substr(2,M[1].indexOf(")")-2));Q=M[0]+"sent. ("+(l+1)+")"}else Q+=" (2)"}this.status=Q}else{let R="sending "+b+" "+p;this.displayError(R,Gn,!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(x,b,p=!1){this.status=`Error ${x} due to ${b.name}`,b.message&&b.message!==""&&(this.status+=": ",this.status+=b.message),this.status.includes("CriticalCmdError")&&(this.status="Critical Command Queued For Approval"),p&&(b.message.includes("CriticalCmdError")?(this.criticalCmdUuid=b.object.data.instance_variables["@uuid"],this.criticalCmdString=b.object.data.instance_variables["@cmd_string"],this.criticalCmdUser=b.object.data.instance_variables["@username"],this.displayCriticalCmd=!0):this.displayErrorDialog=!0)},loadScreen(x,b){return ns.get("/openc3-api/screen/"+x+"/"+b,{headers:{Accept:"text/plain"}})}}},_hoisted_1={style:{padding:"10px"}},_hoisted_2={class:"pa-3"},_hoisted_3={ref:"editor",class:"editor","data-test":"sender-history"},_hoisted_4={class:"mx-1"},_hoisted_5=["textContent"],_hoisted_6={class:"mx-1"};function _sfc_render(x,b,p,m,Gn,Q){const R=resolveComponent("top-bar"),M=resolveComponent("target-packet-item-chooser"),l=resolveComponent("v-spacer"),u=resolveComponent("v-text-field"),o=resolveComponent("v-card-title"),i=resolveComponent("command-parameter-editor"),r=resolveComponent("v-data-table"),t=resolveComponent("v-card"),e=resolveComponent("v-col"),n=resolveComponent("v-btn"),a=resolveComponent("v-tooltip"),d=resolveComponent("v-row"),f=resolveComponent("v-card-subtitle"),xe=resolveComponent("openc3-screen"),F=resolveComponent("v-list-item-title"),_=resolveComponent("v-list-item"),S=resolveComponent("v-list"),Ae=resolveComponent("v-menu"),Vn=resolveComponent("details-dialog"),Me=resolveComponent("critical-cmd-dialog"),oe=resolveComponent("v-toolbar"),Yn=resolveComponent("v-card-text"),y=resolveComponent("v-dialog"),h=resolveComponent("v-card-actions"),w=resolveComponent("v-select");return openBlock(),createElementBlock("div",null,[createVNode(R,{menus:Q.menus,title:Gn.title},null,8,["menus","title"]),createVNode(t,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_1,[createVNode(M,{"initial-target-name":this.$route.params.target,"initial-packet-name":this.$route.params.packet,onOnSet:b[0]||(b[0]=J=>Q.commandChanged(J)),onAddItem:b[1]||(b[1]=J=>Q.buildCmd(J)),disabled:Gn.sendDisabled,"button-text":"Send",mode:"cmd"},null,8,["initial-target-name","initial-packet-name","disabled"])]),Gn.rows.length!==0?(openBlock(),createBlock(t,{key:0},{default:withCtx(()=>[createVNode(o,{class:"d-flex align-center justify-content-space-between"},{default:withCtx(()=>[b[12]||(b[12]=createTextVNode(" Parameters ")),createVNode(l),createVNode(u,{modelValue:Gn.search,"onUpdate:modelValue":b[2]||(b[2]=J=>Gn.search=J),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search"},null,8,["modelValue"])]),_:1}),createVNode(r,{headers:Gn.headers,items:Gn.rows,search:Gn.search,"items-per-page":-1,"hide-default-footer":"","multi-sort":"",density:"compact","onContextmenu:row":Q.showContextMenu},{"item.val":withCtx(({item:J})=>[createVNode(i,{modelValue:J.val,"onUpdate:modelValue":He=>J.val=He,states:J.states,"states-in-hex":Gn.statesInHex},null,8,["modelValue","onUpdate:modelValue","states","states-in-hex"])]),_:1},8,["headers","items","search","onContextmenu:row"])]),_:1})):createCommentVNode("",!0),createElementVNode("div",_hoisted_2,"Status: "+toDisplayString(Gn.status),1)]),_:1}),b[25]||(b[25]=createElementVNode("div",{style:{height:"15px"}},null,-1)),createVNode(d,{"no-gutters":""},{default:withCtx(()=>[createVNode(e,{class:"pr-4"},{default:withCtx(()=>[createVNode(t,{class:"pb-2"},{default:withCtx(()=>[createVNode(f,null,{default:withCtx(()=>[createVNode(d,null,{default:withCtx(()=>[createVNode(e,{class:"pt-6"},{default:withCtx(()=>b[13]||(b[13]=[createTextVNode(" Editable Command History: (Pressing Enter on the line re-executes the command) ")])),_:1}),createVNode(e,null,{default:withCtx(()=>[createVNode(a,{location:"top"},{activator:withCtx(({props:J})=>[createElementVNode("div",mergeProps(J,{class:"float-right"}),[createVNode(n,{icon:"mdi-delete",variant:"text","data-test":"clear-history",onClick:Q.clearHistory},null,8,["onClick"])],16)]),default:withCtx(()=>[b[14]||(b[14]=createElementVNode("span",null," Clear History ",-1))]),_:1})]),_:1})]),_:1})]),_:1}),createVNode(d,{"no-gutters":"",class:"mt-2 mb-2"},{default:withCtx(()=>[createVNode(e,null,{default:withCtx(()=>[createElementVNode("pre",_hoisted_3,null,512)]),_:1})]),_:1})]),_:1})]),_:1}),Gn.screenDefinition?(openBlock(),createBlock(e,{key:0,md:"auto"},{default:withCtx(()=>[createVNode(xe,{target:Gn.screenTarget,screen:Gn.screenName,definition:Gn.screenDefinition,keywords:Gn.keywords,count:Gn.screenCount,showClose:!1},null,8,["target","screen","definition","keywords","count"])]),_:1})):createCommentVNode("",!0)]),_:1}),b[26]||(b[26]=createElementVNode("div",{style:{height:"15px"}},null,-1)),createVNode(Ae,{modelValue:Gn.contextMenuShown,"onUpdate:modelValue":b[3]||(b[3]=J=>Gn.contextMenuShown=J),target:[Gn.x,Gn.y]},{default:withCtx(()=>[createVNode(S,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(Gn.contextMenuOptions,(J,He)=>(openBlock(),createBlock(_,{key:He,onClick:withModifiers(J.action,["stop"])},{default:withCtx(()=>[createVNode(F,null,{default:withCtx(()=>[createTextVNode(toDisplayString(J.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),createVNode(Vn,{"target-name":Gn.targetName,"packet-name":Gn.commandName,"item-name":Gn.parameterName,type:"cmd",modelValue:Gn.viewDetails,"onUpdate:modelValue":b[4]||(b[4]=J=>Gn.viewDetails=J)},null,8,["target-name","packet-name","item-name","modelValue"]),createVNode(Me,{uuid:Gn.criticalCmdUuid,cmdString:Gn.criticalCmdString,cmdUser:Gn.criticalCmdUser,modelValue:Gn.displayCriticalCmd,"onUpdate:modelValue":b[5]||(b[5]=J=>Gn.displayCriticalCmd=J)},null,8,["uuid","cmdString","cmdUser","modelValue"]),createVNode(y,{modelValue:Gn.displayErrorDialog,"onUpdate:modelValue":b[7]||(b[7]=J=>Gn.displayErrorDialog=J),"max-width":"600"},{default:withCtx(()=>[createVNode(t,null,{default:withCtx(()=>[createVNode(oe,{height:"24"},{default:withCtx(()=>[createVNode(l),b[15]||(b[15]=createElementVNode("span",null," Error ",-1)),createVNode(l)]),_:1}),createVNode(Yn,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_4,[createVNode(d,{class:"my-2"},{default:withCtx(()=>[createVNode(Yn,null,{default:withCtx(()=>[createElementVNode("span",{textContent:toDisplayString(Gn.status)},null,8,_hoisted_5)]),_:1})]),_:1}),createVNode(d,null,{default:withCtx(()=>[createVNode(l),createVNode(n,{onClick:b[6]||(b[6]=J=>Gn.displayErrorDialog=!1),color:"primary","data-test":"error-dialog-ok"},{default:withCtx(()=>b[16]||(b[16]=[createTextVNode(" Ok ")])),_:1})]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"]),createVNode(y,{modelValue:Gn.displaySendHazardous,"onUpdate:modelValue":b[8]||(b[8]=J=>Gn.displaySendHazardous=J),"max-width":"600"},{default:withCtx(()=>[createVNode(t,null,{default:withCtx(()=>[createVNode(oe,{height:"24"},{default:withCtx(()=>[createVNode(l),b[17]||(b[17]=createElementVNode("span",null," Hazardous Warning ",-1)),createVNode(l)]),_:1}),createVNode(Yn,{class:"mt-6"},{default:withCtx(()=>[createTextVNode(" Warning: Command "+toDisplayString(Gn.hazardousCommand)+" is Hazardous. Send? ",1)]),_:1}),createVNode(h,{class:"px-2"},{default:withCtx(()=>[createVNode(l),createVNode(n,{onClick:Q.cancelHazardousCmd,variant:"outlined"},{default:withCtx(()=>b[18]||(b[18]=[createTextVNode(" Cancel ")])),_:1},8,["onClick"]),createVNode(n,{onClick:Q.sendHazardousCmd,variant:"flat"},{default:withCtx(()=>b[19]||(b[19]=[createTextVNode(" Send ")])),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),createVNode(y,{modelValue:Gn.displaySendRaw,"onUpdate:modelValue":b[11]||(b[11]=J=>Gn.displaySendRaw=J),"max-width":"600"},{default:withCtx(()=>[createVNode(t,null,{default:withCtx(()=>[createVNode(oe,{height:"24"},{default:withCtx(()=>[createVNode(l),b[20]||(b[20]=createElementVNode("span",null," Send Raw ",-1)),createVNode(l)]),_:1}),createVNode(Yn,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_6,[createVNode(d,{class:"my-2"},{default:withCtx(()=>[createVNode(e,null,{default:withCtx(()=>b[21]||(b[21]=[createTextVNode("Interface:")])),_:1}),createVNode(e,null,{default:withCtx(()=>[createVNode(w,{variant:"solo","hide-details":"",density:"compact",items:Gn.interfaces,"item-title":"label","item-value":"value",modelValue:Gn.selectedInterface,"onUpdate:modelValue":b[9]||(b[9]=J=>Gn.selectedInterface=J)},null,8,["items","modelValue"])]),_:1})]),_:1}),createVNode(d,{"no-gutters":""},{default:withCtx(()=>[createVNode(e,null,{default:withCtx(()=>b[22]||(b[22]=[createTextVNode("Filename:")])),_:1}),createVNode(e,null,{default:withCtx(()=>[createElementVNode("input",{type:"file",onChange:b[10]||(b[10]=J=>x.selectRawCmdFile(J))},null,32)]),_:1})]),_:1}),createVNode(d,null,{default:withCtx(()=>[createVNode(l),createVNode(n,{onClick:x.cancelRawCmd,variant:"outlined","data-test":"raw-cancel"},{default:withCtx(()=>b[23]||(b[23]=[createTextVNode(" Cancel ")])),_:1},8,["onClick"]),createVNode(n,{onClick:x.sendRawCmd,class:"bg-primary","data-test":"raw-ok"},{default:withCtx(()=>b[24]||(b[24]=[createTextVNode(" Ok ")])),_:1},8,["onClick"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"])])}const CommandSender=exports("default",_export_sfc(_sfc_main,[["render",_sfc_render],["__scopeId","data-v-dda0eae4"]]))}}});