openc3-cosmos-tool-cmdsender 6.2.0 → 6.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/tools/cmdsender/{ArrayWidget-BxEO5hEG-e292cd394e06541f76de.js → ArrayWidget-BxEO5hEG-8511e4632def6a0e74b7.js} +1 -1
  3. data/tools/cmdsender/{ArrayplotWidget-B_VPoV4v-1a0d77bd0259d0ccdd8e.js → ArrayplotWidget-B_VPoV4v-9b829b41a8f487fb7b12.js} +1 -1
  4. data/tools/cmdsender/{BarColumn-C9dkpg2O-655c584840e856abd2ac.js → BarColumn-C9dkpg2O-aa1fe2fc4c19fed67b11.js} +1 -1
  5. data/tools/cmdsender/{BlockWidget-CuefOin6-add9963ff5c56450a4de.js → BlockWidget-CuefOin6-497752ff088a5e4a71b1.js} +1 -1
  6. data/tools/cmdsender/{ButtonWidget-B6HM0Doo-d3a73e40bcee2e25babe.js → ButtonWidget-B6HM0Doo-9eef9437e89fc7d566d8.js} +1 -1
  7. data/tools/cmdsender/{CanvasWidget-DZQGG-yQ-ba9329af3776abeb3cb4.js → CanvasWidget-DZQGG-yQ-6f8d1eed4d7420b4cd98.js} +1 -1
  8. data/tools/cmdsender/{CanvasdotWidget-6wuCSnw_-9607ac7c3429f2ecd29f.js → CanvasdotWidget-6wuCSnw_-306dd0fa7ce42d15ccbd.js} +1 -1
  9. data/tools/cmdsender/{CanvasimageWidget-mhcPpAuN-f6d21c10e06cefd09170.js → CanvasimageWidget-mhcPpAuN-db7941af0abdafaecd57.js} +1 -1
  10. data/tools/cmdsender/{CanvasimagevalueWidget-Cx-dH8Gc-611c25cf1b79658920ee.js → CanvasimagevalueWidget-Cx-dH8Gc-1c0a3533fe2f607a3234.js} +1 -1
  11. data/tools/cmdsender/{CanvaslabelWidget-CQZCeohU-d44c20faa16c0f2aff35.js → CanvaslabelWidget-CQZCeohU-6e39beedda52e5c2d25a.js} +1 -1
  12. data/tools/cmdsender/{CanvaslabelvalueWidget-CwmYDCjr-5dda23658fae19ea1738.js → CanvaslabelvalueWidget-CwmYDCjr-a009af3a8722dd4f4447.js} +1 -1
  13. data/tools/cmdsender/{CanvaslineWidget-nTP3fJB4-7642784dbc7c3ef79d30.js → CanvaslineWidget-nTP3fJB4-8b39a30e693c6cd7eb2b.js} +1 -1
  14. data/tools/cmdsender/{CanvaslinevalueWidget-C3sJnjLQ-640912d4a1479d502b20.js → CanvaslinevalueWidget-C3sJnjLQ-c3dc637242976749695f.js} +1 -1
  15. data/tools/cmdsender/{CheckbuttonWidget-5-8YDsQL-eafad0e6f2925f86b27f.js → CheckbuttonWidget-5-8YDsQL-2803bfd3516eeb9617d1.js} +1 -1
  16. data/tools/cmdsender/{ComboboxWidget-DzBL8h9f-f4f0aacbc2b2aebd0fe2.js → ComboboxWidget-DzBL8h9f-f96f8a3bc7f821570df0.js} +1 -1
  17. data/tools/cmdsender/CommandSender-d9af5675184352ee7274.js +1110 -0
  18. data/tools/cmdsender/{CriticalCmdDialog-DLEasFsx-4743e1b222e3c6833b62.js → CriticalCmdDialog-DLEasFsx-f4e2db6e24c0580ef3ee.js} +1 -1
  19. data/tools/cmdsender/{DateWidget-CW7Od7lB-4a762a02778350badaeb.js → DateWidget-CW7Od7lB-940431a9ea835ba7cc65.js} +1 -1
  20. data/tools/cmdsender/{DetailsDialog-BvbziA7Y-e53132fa1f043c6d5d17.js → DetailsDialog-BvbziA7Y-b48fa056579987bcf8ba.js} +1 -1
  21. data/tools/cmdsender/{DynamicWidget-gFSYxzvT-d44614869b8730b1d489.js → DynamicWidget-gFSYxzvT-5fbc8fc72ac73db20201.js} +1 -1
  22. data/tools/cmdsender/{FormatvalueWidget-CGpnTqVH-2bd0c6893ae1a31a2b93.js → FormatvalueWidget-CGpnTqVH-7ef749e37941026c2c34.js} +1 -1
  23. data/tools/cmdsender/{Graph-3rkhFP3G-d88d7f4159658081bfb2.js → Graph-3rkhFP3G-45b6ca2bdae879df831e.js} +1 -1
  24. data/tools/cmdsender/{GraphWidget-Dycey-mj-17ac78fc0bc55693068d.js → GraphWidget-Dycey-mj-b621f9bf00bc75906d63.js} +1 -1
  25. data/tools/cmdsender/{HorizontalWidget-D31NRWy5-5f5b07ba5ec4990b83b3.js → HorizontalWidget-D31NRWy5-82c892a1c05216707c7d.js} +1 -1
  26. data/tools/cmdsender/{HorizontalboxWidget-Br8dSVHD-a7e89e31fef2abbdbe12.js → HorizontalboxWidget-Br8dSVHD-63f6a1740519706585f9.js} +1 -1
  27. data/tools/cmdsender/{HorizontallineWidget-CbxREBYI-cd04dd0c5654804f5c08.js → HorizontallineWidget-CbxREBYI-e678a9f10c8c8a8eaba4.js} +1 -1
  28. data/tools/cmdsender/{IframeWidget-Ctj8OIcG-e936129ed9852a029057.js → IframeWidget-Ctj8OIcG-b6856f4090d5e10b41bf.js} +1 -1
  29. data/tools/cmdsender/{ImageLoader-BrNrCBvi-5ddae0a694e8437488d1.js → ImageLoader-BrNrCBvi-c97344e328e58754bd19.js} +1 -1
  30. data/tools/cmdsender/{ImageviewerWidget-XrsqxmLo-bbfb4d6b1bce3d1a837e.js → ImageviewerWidget-XrsqxmLo-dffa54da77dc2d7dc6fc.js} +1 -1
  31. data/tools/cmdsender/{LabelWidget-t7I87dp7-19a634e37b26eb1a2401.js → LabelWidget-t7I87dp7-e8fdb08179dd33ec7624.js} +1 -1
  32. data/tools/cmdsender/{LabelledWidget-C7TDf92M-d9edcc3cb434953e81bf.js → LabelledWidget-C7TDf92M-92655815689de7829201.js} +1 -1
  33. data/tools/cmdsender/{LabelprogressbarWidget-wwLURt1u-1e2c525e5700f799d413.js → LabelprogressbarWidget-wwLURt1u-c1584edc2c65358bc1dc.js} +1 -1
  34. data/tools/cmdsender/{LabelsparklineWidget-B3awLUyP-f7bd7faec0e6c2238022.js → LabelsparklineWidget-B3awLUyP-37a417e4ad53bda1e560.js} +1 -1
  35. data/tools/cmdsender/{LabelvalueWidget-Zx_yHCtl-dc267651da66e6e50ba8.js → LabelvalueWidget-Zx_yHCtl-66bd678c498af762d592.js} +1 -1
  36. data/tools/cmdsender/{LabelvaluedescWidget-BBSBh4vI-5acb30c1f78d05a85a7c.js → LabelvaluedescWidget-BBSBh4vI-39f763d890fa98687c76.js} +1 -1
  37. data/tools/cmdsender/{LabelvaluelimitsbarWidget-CZueHYWG-457dca9b68adc07c3492.js → LabelvaluelimitsbarWidget-CZueHYWG-b5ef59aaa1328581fe23.js} +1 -1
  38. data/tools/cmdsender/{LabelvaluelimitscolumnWidget-BTvzyQMq-3250b3c9e11691736f4d.js → LabelvaluelimitscolumnWidget-BTvzyQMq-e5b56cbc9464126c792f.js} +1 -1
  39. data/tools/cmdsender/{LabelvaluerangebarWidget-BhYTBgDq-fb4a3df233ddc438321e.js → LabelvaluerangebarWidget-BhYTBgDq-da2cbdcbf420ddda2d97.js} +1 -1
  40. data/tools/cmdsender/{Layout-Bh7VzCZd-4bf59b26cf70aa6033a5.js → Layout-Bh7VzCZd-3825a88ccc81fa7692a5.js} +1 -1
  41. data/tools/cmdsender/{LedWidget-CxJjJBBS-ec03a6822fd0435f0ebc.js → LedWidget-CxJjJBBS-e45ddd225d0eeb153b7a.js} +1 -1
  42. data/tools/cmdsender/{LimitsbarWidget-Djui0IpK-84ca66bc6ab3348bd9bb.js → LimitsbarWidget-Djui0IpK-9b2934313d2ad9fba22d.js} +1 -1
  43. data/tools/cmdsender/{LimitscolorWidget-DdmvKzmx-18d72f6a7114b5ee3f23.js → LimitscolorWidget-DdmvKzmx-2293f6228f7000ddf5ec.js} +1 -1
  44. data/tools/cmdsender/{LimitscolumnWidget-Cc19IEjq-70d8a8e1c66704d40c32.js → LimitscolumnWidget-Cc19IEjq-1441eeb3aaf6e544896d.js} +1 -1
  45. data/tools/cmdsender/{LinegraphWidget-BtieJxeL-8566b0d974bc9233b040.js → LinegraphWidget-BtieJxeL-caaeb9bff1314849a503.js} +1 -1
  46. data/tools/cmdsender/{MatrixbycolumnsWidget-DnExVRF8-615891aa37c400c7cd72.js → MatrixbycolumnsWidget-DnExVRF8-d3c0e7c0b0fdf82886b8.js} +1 -1
  47. data/tools/cmdsender/{ProgressbarWidget-DIfqhHRE-d065ff0eb7a4024e6e80.js → ProgressbarWidget-DIfqhHRE-d8342f82e4bec4ac5bab.js} +1 -1
  48. data/tools/cmdsender/{RadiobuttonWidget-QzIkNP7m-6328fc17af09db6dfb2c.js → RadiobuttonWidget-QzIkNP7m-8fc36a7f1d6fcd90869a.js} +1 -1
  49. data/tools/cmdsender/{RadiogroupWidget-Ci9sCX39-6b20412663063ab0f2e9.js → RadiogroupWidget-Ci9sCX39-d4c4bd1790022ea4dea0.js} +1 -1
  50. data/tools/cmdsender/{RangebarWidget-CN0YuHqy-c0ed493ec80ca243b3a7.js → RangebarWidget-CN0YuHqy-e08da056086a7bcedbbb.js} +1 -1
  51. data/tools/cmdsender/{RollupWidget-y4jBtJB2-445f97b7c2a4d4a934b6.js → RollupWidget-y4jBtJB2-5d95dbec09685bf333d9.js} +1 -1
  52. data/tools/cmdsender/{ScrollwindowWidget-CBzYk4Y3-eec2ca221ef4121ee0cc.js → ScrollwindowWidget-CBzYk4Y3-8b3c992c45c19cdb56c0.js} +1 -1
  53. data/tools/cmdsender/{SignalWidget-DQ5Uc2uV-79784d20c0df0aa9fd21.js → SignalWidget-DQ5Uc2uV-d9484191a375d5bed432.js} +1 -1
  54. data/tools/cmdsender/{SpacerWidget-6rsc_dSM-d23bf5233c3a2ed20176.js → SpacerWidget-6rsc_dSM-ab9e4fb5dbc6302ea54e.js} +1 -1
  55. data/tools/cmdsender/{SparklineWidget-CZtvu2ss-c3b8b4eeb71650afd4a5.js → SparklineWidget-CZtvu2ss-5da82bae33660e026616.js} +1 -1
  56. data/tools/cmdsender/{TabbookWidget-DNALU0jl-45f7dceb480df8136443.js → TabbookWidget-DNALU0jl-bf6235c98306dd323110.js} +1 -1
  57. data/tools/cmdsender/{TextboxWidget-5hqPj74D-563b12dba930d77e1c7a.js → TextboxWidget-5hqPj74D-9560d6865b4baf243c2b.js} +1 -1
  58. data/tools/cmdsender/{TextfieldWidget-Df0ANSiU-b4494a292a0a076ec53a.js → TextfieldWidget-Df0ANSiU-7acb3b498bf616306f21.js} +1 -1
  59. data/tools/cmdsender/{TimeWidget-C6XQMUG2-df46f6add56cf276d4f2.js → TimeWidget-C6XQMUG2-e72f1c45296943261d2f.js} +1 -1
  60. data/tools/cmdsender/{TitleWidget-B9SPUlbW-1f3b9c29b1a2bef6f0b6.js → TitleWidget-B9SPUlbW-21f44d6b6e202c99fb2f.js} +1 -1
  61. data/tools/cmdsender/{VWidget-C4spAawK-203c6724ec32d32864f6.js → VWidget-C4spAawK-fa358645d8a61d47a915.js} +1 -1
  62. data/tools/cmdsender/{ValueWidget-D4RrYVEK-131a421a7f3577c4442b.js → ValueWidget-D4RrYVEK-24f42b6d1af4c1fdc7c5.js} +1 -1
  63. data/tools/cmdsender/{ValuelimitsbarWidget-Bc9_Vj_f-92a033d9b5314d37b583.js → ValuelimitsbarWidget-Bc9_Vj_f-a5875c9121402411a4e8.js} +1 -1
  64. data/tools/cmdsender/{ValuelimitscolumnWidget-DHKIL7sf-5aa971419ab19d3ba2b6.js → ValuelimitscolumnWidget-DHKIL7sf-a10b568eb9f616f37ee7.js} +1 -1
  65. data/tools/cmdsender/{ValuerangebarWidget-CecQRIok-3e405e4e62053b15016e.js → ValuerangebarWidget-CecQRIok-f0e68b04979762f2e4a8.js} +1 -1
  66. data/tools/cmdsender/{VerticalWidget-D8jUFxjS-4abf0ac7038ad860b8ce.js → VerticalWidget-D8jUFxjS-d3e6e91831cd5aecc0e4.js} +1 -1
  67. data/tools/cmdsender/{VerticalboxWidget-B4eGUSYH-c0512a7a6bff1006f4c7.js → VerticalboxWidget-B4eGUSYH-1805e70e7b22eaf8338a.js} +1 -1
  68. data/tools/cmdsender/{Widget-fRCERxGf-814f662a338ec2db1d40.js → Widget-fRCERxGf-aafc740c50474cca197f.js} +1 -1
  69. data/tools/cmdsender/{main-e46ad9d0824cec6a855d.js → main-ca3bfa60574c4c3a32e6.js} +62 -62
  70. data/tools/cmdsender/main.js +1 -1
  71. metadata +70 -70
  72. data/tools/cmdsender/CommandSender-2b190b4afc9b6e12e6f3.js +0 -1110
@@ -1,1110 +0,0 @@
1
- System.register(["./main-e46ad9d0824cec6a855d.js","vue","./CriticalCmdDialog-DLEasFsx-4743e1b222e3c6833b62.js","./DetailsDialog-BvbziA7Y-e53132fa1f043c6d5d17.js","vue-router","single-spa","vuex","vuetify"],function(exports,module){"use strict";var s,_export_sfc,et$1,tt$1,resolveComponent,createBlock,openBlock,Teleport,createVNode,withCtx,createElementVNode,toDisplayString,createElementBlock,Fragment,renderList,createTextVNode,mergeProps,createSlots,createCommentVNode,normalizeStyle,normalizeClass,withModifiers,N$1,P$1;return{setters:[p=>{s=p.s,_export_sfc=p._,et$1=p.e,tt$1=p.t},p=>{resolveComponent=p.resolveComponent,createBlock=p.createBlock,openBlock=p.openBlock,Teleport=p.Teleport,createVNode=p.createVNode,withCtx=p.withCtx,createElementVNode=p.createElementVNode,toDisplayString=p.toDisplayString,createElementBlock=p.createElementBlock,Fragment=p.Fragment,renderList=p.renderList,createTextVNode=p.createTextVNode,mergeProps=p.mergeProps,createSlots=p.createSlots,createCommentVNode=p.createCommentVNode,normalizeStyle=p.normalizeStyle,normalizeClass=p.normalizeClass,withModifiers=p.withModifiers},p=>{N$1=p.N},p=>{P$1=p.P},null,null,null,null],execute:function(){var __vite_style__=document.createElement("style");__vite_style__.textContent=`.container[data-v-b19a55d5] .v-select__selections{width:auto}.v-overflow-btn[data-v-b19a55d5]{margin-top:0}.container[data-v-b19a55d5]{padding:0}.hazardous[data-v-b19a55d5] .v-select__selection-text{color:#ffdc00!important}.editor[data-v-b7ab1f82]{margin-left:30px;height:50px;width:95%;position:relative;font-size:16px}
2
- /*$vite$:1*/`,document.head.appendChild(__vite_style__);const I={props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(p){return p.replaceAll(" ","-").toLowerCase()},subMenuClick(p){p.command(p),this.$refs.topmenu[0].isActive=!1}},mounted(){document.title=this.title}},P={class:"app-title mr-2"};function q(p,w,d,g,J,L){const A=resolveComponent("v-col"),k=resolveComponent("v-row"),a=resolveComponent("v-icon"),u=resolveComponent("v-btn"),r=resolveComponent("v-divider"),i=resolveComponent("v-list-item-title"),o=resolveComponent("v-list-item"),t=resolveComponent("v-list"),e=resolveComponent("v-menu"),n=resolveComponent("v-radio"),c=resolveComponent("v-list-item-action"),f=resolveComponent("v-radio-group"),m=resolveComponent("v-checkbox");return openBlock(),createBlock(Teleport,{to:"#openc3-menu"},[createVNode(k,{"no-gutters":""},{default:withCtx(()=>[createVNode(A,{"align-self":"end"},{default:withCtx(()=>[createElementVNode("span",P,toDisplayString(d.title),1)]),_:1})]),_:1}),createVNode(k,{dense:"",class:"flex-nowrap"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(d.menus,(D,M)=>(openBlock(),createBlock(e,{ref_for:!0,ref:"topmenu",key:M},{activator:withCtx(({props:x})=>[createVNode(u,mergeProps({ref_for:!0},x,{variant:"outlined",class:"mx-1 menu-button",text:D.label,"data-test":L.formatDT(`${d.title} ${D.label}`)}),{append:withCtx(()=>[createVNode(a,{class:"menu-button-icon"},{default:withCtx(()=>w[0]||(w[0]=[createTextVNode(" mdi-menu-down ")])),_:1})]),_:2},1040,["text","data-test"])]),default:withCtx(()=>[createVNode(t,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(D.items,(x,_)=>(openBlock(),createElementBlock(Fragment,null,[x.divider?(openBlock(),createBlock(r,{key:_+"-divider"})):x.subMenu&&x.subMenu.length>0?(openBlock(),createElementBlock("div",{key:_+"-submenu"},[(openBlock(),createBlock(e,{"open-on-hover":"",location:"right",key:_},{activator:withCtx(({props:U})=>[(openBlock(),createBlock(o,mergeProps({ref_for:!0},U,{disabled:x.disabled,key:_}),createSlots({append:withCtx(()=>[createVNode(a,null,{default:withCtx(()=>w[1]||(w[1]=[createTextVNode(" mdi-chevron-right ")])),_:1})]),default:withCtx(()=>[!x.radio&&!x.checkbox?(openBlock(),createBlock(i,{key:0,style:normalizeStyle("cursor: pointer;"+(x.disabled?"opacity: 0.2":""))},{default:withCtx(()=>[createTextVNode(toDisplayString(x.label),1)]),_:2},1032,["style"])):createCommentVNode("",!0)]),_:2},[x.icon?{name:"prepend",fn:withCtx(()=>[createVNode(a,{disabled:x.disabled},{default:withCtx(()=>[createTextVNode(toDisplayString(x.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:withCtx(()=>[createVNode(t,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(x.subMenu,(U,se)=>(openBlock(),createBlock(o,{key:se,"prepend-icon":U.icon,onClick:X=>L.subMenuClick(U)},{default:withCtx(()=>[createVNode(i,null,{default:withCtx(()=>[createTextVNode(toDisplayString(U.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):x.radioGroup?(openBlock(),createBlock(f,{"model-value":x.value,"onUpdate:modelValue":x.command,key:_+"-radio-group","hide-details":"",density:"compact",class:"ma-0 pa-0"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(x.choices,(U,se)=>(openBlock(),createBlock(o,{key:se+"-choice"},{default:withCtx(()=>[createVNode(c,{class:"list-action"},{default:withCtx(()=>[createVNode(n,{color:"secondary",label:U.label,value:U.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(openBlock(),createBlock(o,{onClick:U=>x.command(x),disabled:x.disabled,"data-test":L.formatDT(`${d.title} ${D.label} ${x.label}`),key:_+"-list"},createSlots({default:withCtx(()=>[x.checkbox?(openBlock(),createBlock(c,{key:0,class:"list-action"},{default:withCtx(()=>[createVNode(m,{modelValue:x.checked,"onUpdate:modelValue":U=>x.checked=U,label:x.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):createCommentVNode("",!0),!x.radio&&!x.checkbox?(openBlock(),createBlock(i,{key:1,style:normalizeStyle("cursor: pointer;"+(x.disabled?"opacity: 0.2":""))},{default:withCtx(()=>[createTextVNode(toDisplayString(x.label),1)]),_:2},1032,["style"])):createCommentVNode("",!0)]),_:2},[x.icon?{name:"prepend",fn:withCtx(()=>[createVNode(a,{icon:x.icon,disabled:x.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,[["render",q],["__scopeId","data-v-4d454b93"]]);var sprintf$1={},hasRequiredSprintf;function requireSprintf(){return hasRequiredSprintf||(hasRequiredSprintf=1,function(p){(function(){var w={not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function d(k){return J(A(k),arguments)}function g(k,a){return d.apply(null,[k].concat(a||[]))}function J(k,a){var u=1,r=k.length,i,o="",t,e,n,c,f,m,D,M;for(t=0;t<r;t++)if(typeof k[t]=="string")o+=k[t];else if(typeof k[t]=="object"){if(n=k[t],n.keys)for(i=a[u],e=0;e<n.keys.length;e++){if(i==null)throw new Error(d('[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=a[n.param_no]:i=a[u++];if(w.not_type.test(n.type)&&w.not_primitive.test(n.type)&&i instanceof Function&&(i=i()),w.numeric_arg.test(n.type)&&typeof i!="number"&&isNaN(i))throw new TypeError(d("[sprintf] expecting number but found %T",i));switch(w.number.test(n.type)&&(D=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}w.json.test(n.type)?o+=i:(w.number.test(n.type)&&(!D||n.sign)?(M=D?"+":"-",i=i.toString().replace(w.sign,"")):M="",f=n.pad_char?n.pad_char==="0"?"0":n.pad_char.charAt(1):" ",m=n.width-(M+i).length,c=n.width&&m>0?f.repeat(m):"",o+=n.align?M+i+c:f==="0"?M+c+i:c+M+i)}return o}var L=Object.create(null);function A(k){if(L[k])return L[k];for(var a=k,u,r=[],i=0;a;){if((u=w.text.exec(a))!==null)r.push(u[0]);else if((u=w.modulo.exec(a))!==null)r.push("%");else if((u=w.placeholder.exec(a))!==null){if(u[2]){i|=1;var o=[],t=u[2],e=[];if((e=w.key.exec(t))!==null)for(o.push(e[1]);(t=t.substring(e[0].length))!=="";)if((e=w.key_access.exec(t))!==null)o.push(e[1]);else if((e=w.index_access.exec(t))!==null)o.push(e[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");u[2]=o}else i|=2;if(i===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:u[0],param_no:u[1],keys:u[2],sign:u[3],pad_char:u[4],align:u[5],width:u[6],precision:u[7],type:u[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");a=a.substring(u[0].length)}return L[k]=r}p.sprintf=d,p.vsprintf=g,typeof window<"u"&&(window.sprintf=d,window.vsprintf=g)})()}(sprintf$1)),sprintf$1}requireSprintf();var ace$1={exports:{}},hasRequiredAce;function requireAce(){return hasRequiredAce||(hasRequiredAce=1,function(p,w){(function(){var d="ace",g=function(){return this}();!g&&typeof window<"u"&&(g=window);var J=function(r,i,o){if(typeof r!="string"){J.original?J.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(o=i),J.modules[r]||(J.payloads[r]=o,J.modules[r]=null)};J.modules={},J.payloads={};var L=function(r,i,o){if(typeof i=="string"){var t=a(r,i);if(t!=null)return o&&o(),t}else if(Object.prototype.toString.call(i)==="[object Array]"){for(var e=[],n=0,c=i.length;n<c;++n){var f=a(r,i[n]);if(f==null&&A.original)return;e.push(f)}return o&&o.apply(null,e)||!0}},A=function(r,i){var o=L("",r,i);return o==null&&A.original?A.original.apply(this,arguments):o},k=function(r,i){if(i.indexOf("!")!==-1){var o=i.split("!");return k(r,o[0])+"!"+k(r,o[1])}if(i.charAt(0)=="."){var t=r.split("/").slice(0,-1).join("/");for(i=t+"/"+i;i.indexOf(".")!==-1&&e!=i;){var e=i;i=i.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return i},a=function(r,i){i=k(r,i);var o=J.modules[i];if(!o){if(o=J.payloads[i],typeof o=="function"){var t={},e={id:i,uri:"",exports:t,packaged:!0},n=function(f,m){return L(i,f,m)},c=o(n,t,e);t=c||e.exports,J.modules[i]=t,delete J.payloads[i]}o=J.modules[i]=t||o}return o};function u(r){var i=g;g[r]||(g[r]={}),i=g[r],(!i.define||!i.define.packaged)&&(J.original=i.define,i.define=J,i.define.packaged=!0),(!i.require||!i.require.packaged)&&(A.original=i.require,i.require=A,i.require.packaged=!0)}u(d)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(d,g,J){function L(A,k,a){Object.defineProperty(A,k,{value:a,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||L(String.prototype,"startsWith",function(A,k){return k=k||0,this.lastIndexOf(A,k)===k}),String.prototype.endsWith||L(String.prototype,"endsWith",function(A,k){var a=this;(k===void 0||k>a.length)&&(k=a.length),k-=A.length;var u=a.indexOf(A,k);return u!==-1&&u===k}),String.prototype.repeat||L(String.prototype,"repeat",function(A){for(var k="",a=this;A>0;)A&1&&(k+=a),(A>>=1)&&(a+=a);return k}),String.prototype.includes||L(String.prototype,"includes",function(A,k){return this.indexOf(A,k)!=-1}),Object.assign||(Object.assign=function(A){if(A==null)throw new TypeError("Cannot convert undefined or null to object");for(var k=Object(A),a=1;a<arguments.length;a++){var u=arguments[a];u!=null&&Object.keys(u).forEach(function(r){k[r]=u[r]})}return k}),Object.values||(Object.values=function(A){return Object.keys(A).map(function(k){return A[k]})}),Array.prototype.find||L(Array.prototype,"find",function(A){for(var k=this.length,a=arguments[1],u=0;u<k;u++){var r=this[u];if(A.call(a,r,u,this))return r}}),Array.prototype.findIndex||L(Array.prototype,"findIndex",function(A){for(var k=this.length,a=arguments[1],u=0;u<k;u++){var r=this[u];if(A.call(a,r,u,this))return u}}),Array.prototype.includes||L(Array.prototype,"includes",function(A,k){return this.indexOf(A,k)!=-1}),Array.prototype.fill||L(Array.prototype,"fill",function(A){for(var k=this,a=k.length>>>0,u=arguments[1],r=u>>0,i=r<0?Math.max(a+r,0):Math.min(r,a),o=arguments[2],t=o===void 0?a:o>>0,e=t<0?Math.max(a+t,0):Math.min(t,a);i<e;)k[i]=A,i++;return k}),Array.of||L(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(d,g,J){d("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(d,g,J){g.deepCopy=function L(A){if(typeof A!="object"||!A)return A;var k;if(Array.isArray(A)){k=[];for(var a=0;a<A.length;a++)k[a]=L(A[a]);return k}if(Object.prototype.toString.call(A)!=="[object Object]")return A;k={};for(var a in A)k[a]=L(A[a]);return k}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(d,g,J){g.last=function(k){return k[k.length-1]},g.stringReverse=function(k){return k.split("").reverse().join("")},g.stringRepeat=function(k,a){for(var u="";a>0;)a&1&&(u+=k),(a>>=1)&&(k+=k);return u};var L=/^\s\s*/,A=/\s\s*$/;g.stringTrimLeft=function(k){return k.replace(L,"")},g.stringTrimRight=function(k){return k.replace(A,"")},g.copyObject=function(k){var a={};for(var u in k)a[u]=k[u];return a},g.copyArray=function(k){for(var a=[],u=0,r=k.length;u<r;u++)k[u]&&typeof k[u]=="object"?a[u]=this.copyObject(k[u]):a[u]=k[u];return a},g.deepCopy=d("./deep_copy").deepCopy,g.arrayToMap=function(k){for(var a={},u=0;u<k.length;u++)a[k[u]]=1;return a},g.createMap=function(k){var a=Object.create(null);for(var u in k)a[u]=k[u];return a},g.arrayRemove=function(k,a){for(var u=0;u<=k.length;u++)a===k[u]&&k.splice(u,1)},g.escapeRegExp=function(k){return k.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},g.escapeHTML=function(k){return(""+k).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},g.getMatchOffsets=function(k,a){var u=[];return k.replace(a,function(r){u.push({offset:arguments[arguments.length-2],length:r.length})}),u},g.deferredCall=function(k){var a=null,u=function(){a=null,k()},r=function(i){return r.cancel(),a=setTimeout(u,i||0),r};return r.schedule=r,r.call=function(){return this.cancel(),k(),r},r.cancel=function(){return clearTimeout(a),a=null,r},r.isPending=function(){return a},r},g.delayedCall=function(k,a){var u=null,r=function(){u=null,k()},i=function(o){u==null&&(u=setTimeout(r,o||a))};return i.delay=function(o){u&&clearTimeout(u),u=setTimeout(r,o||a)},i.schedule=i,i.call=function(){this.cancel(),k()},i.cancel=function(){u&&clearTimeout(u),u=null},i.isPending=function(){return u},i},g.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},g.skipEmptyMatch=function(k,a,u){return u&&k.codePointAt(a)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(d,g,J){g.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},g.getOS=function(){return g.isMac?g.OS.MAC:g.isLinux?g.OS.LINUX:g.OS.WINDOWS};var L=typeof navigator=="object"?navigator:{},A=(/mac|win|linux/i.exec(L.platform)||["other"])[0].toLowerCase(),k=L.userAgent||"",a=L.appName||"";g.isWin=A=="win",g.isMac=A=="mac",g.isLinux=A=="linux",g.isIE=a=="Microsoft Internet Explorer"||a.indexOf("MSAppHost")>=0?parseFloat((k.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((k.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),g.isOldIE=g.isIE&&g.isIE<9,g.isGecko=g.isMozilla=k.match(/ Gecko\/\d+/),g.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",g.isWebKit=parseFloat(k.split("WebKit/")[1])||void 0,g.isChrome=parseFloat(k.split(" Chrome/")[1])||void 0,g.isSafari=parseFloat(k.split(" Safari/")[1])&&!g.isChrome||void 0,g.isEdge=parseFloat(k.split(" Edge/")[1])||void 0,g.isAIR=k.indexOf("AdobeAIR")>=0,g.isAndroid=k.indexOf("Android")>=0,g.isChromeOS=k.indexOf(" CrOS ")>=0,g.isIOS=/iPad|iPhone|iPod/.test(k)&&!window.MSStream,g.isIOS&&(g.isMac=!0),g.isMobile=g.isIOS||g.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(d,g,J){var L=d("./useragent"),A="http://www.w3.org/1999/xhtml";g.buildDom=function o(t,e,n){if(typeof t=="string"&&t){var c=document.createTextNode(t);return e&&e.appendChild(c),c}if(!Array.isArray(t))return t&&t.appendChild&&e&&e.appendChild(t),t;if(typeof t[0]!="string"||!t[0]){for(var f=[],m=0;m<t.length;m++){var D=o(t[m],e,n);D&&f.push(D)}return f}var M=document.createElement(t[0]),x=t[1],_=1;x&&typeof x=="object"&&!Array.isArray(x)&&(_=2);for(var m=_;m<t.length;m++)o(t[m],M,n);return _==2&&Object.keys(x).forEach(function(U){var se=x[U];U==="class"?M.className=Array.isArray(se)?se.join(" "):se:typeof se=="function"||U=="value"||U[0]=="$"?M[U]=se:U==="ref"?n&&(n[se]=M):U==="style"?typeof se=="string"&&(M.style.cssText=se):se!=null&&M.setAttribute(U,se)}),e&&e.appendChild(M),M},g.getDocumentHead=function(o){return o||(o=document),o.head||o.getElementsByTagName("head")[0]||o.documentElement},g.createElement=function(o,t){return document.createElementNS?document.createElementNS(t||A,o):document.createElement(o)},g.removeChildren=function(o){o.innerHTML=""},g.createTextNode=function(o,t){var e=t?t.ownerDocument:document;return e.createTextNode(o)},g.createFragment=function(o){var t=o?o.ownerDocument:document;return t.createDocumentFragment()},g.hasCssClass=function(o,t){var e=(o.className+"").split(/\s+/g);return e.indexOf(t)!==-1},g.addCssClass=function(o,t){g.hasCssClass(o,t)||(o.className+=" "+t)},g.removeCssClass=function(o,t){for(var e=o.className.split(/\s+/g);;){var n=e.indexOf(t);if(n==-1)break;e.splice(n,1)}o.className=e.join(" ")},g.toggleCssClass=function(o,t){for(var e=o.className.split(/\s+/g),n=!0;;){var c=e.indexOf(t);if(c==-1)break;n=!1,e.splice(c,1)}return n&&e.push(t),o.className=e.join(" "),n},g.setCssClass=function(o,t,e){e?g.addCssClass(o,t):g.removeCssClass(o,t)},g.hasCssString=function(o,t){var e=0,n;if(t=t||document,n=t.querySelectorAll("style")){for(;e<n.length;)if(n[e++].id===o)return!0}},g.removeElementById=function(o,t){t=t||document,t.getElementById(o)&&t.getElementById(o).remove()};var k,a=[];g.useStrictCSP=function(o){k=o,o==!1?u():a||(a=[])};function u(){var o=a;a=null,o&&o.forEach(function(t){r(t[0],t[1])})}function r(o,t,e){if(!(typeof document>"u")){if(a){if(e)u();else if(e===!1)return a.push([o,t])}if(!k){var n=e;!e||!e.getRootNode?n=document:(n=e.getRootNode(),(!n||n==e)&&(n=document));var c=n.ownerDocument||n;if(t&&g.hasCssString(t,n))return null;t&&(o+=`
3
- /*# sourceURL=ace/css/`+t+" */");var f=g.createElement("style");f.appendChild(c.createTextNode(o)),t&&(f.id=t),n==c&&(n=g.getDocumentHead(c)),n.insertBefore(f,n.firstChild)}}}if(g.importCssString=r,g.importCssStylsheet=function(o,t){g.buildDom(["link",{rel:"stylesheet",href:o}],g.getDocumentHead(t))},g.scrollbarWidth=function(o){var t=g.createElement("ace_inner");t.style.width="100%",t.style.minWidth="0px",t.style.height="200px",t.style.display="block";var e=g.createElement("ace_outer"),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 c=o&&o.documentElement||document&&document.documentElement;if(!c)return 0;c.appendChild(e);var f=t.offsetWidth;n.overflow="scroll";var m=t.offsetWidth;return f===m&&(m=e.clientWidth),c.removeChild(e),f-m},g.computedStyle=function(o,t){return window.getComputedStyle(o,"")||{}},g.setStyle=function(o,t,e){o[t]!==e&&(o[t]=e)},g.HAS_CSS_ANIMATION=!1,g.HAS_CSS_TRANSFORMS=!1,g.HI_DPI=L.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,L.isChromeOS&&(g.HI_DPI=!1),typeof document<"u"){var i=document.createElement("div");g.HI_DPI&&i.style.transform!==void 0&&(g.HAS_CSS_TRANSFORMS=!0),!L.isEdge&&typeof i.style.animationName<"u"&&(g.HAS_CSS_ANIMATION=!0),i=null}g.HAS_CSS_TRANSFORMS?g.translate=function(o,t,e){o.style.transform="translate("+Math.round(t)+"px, "+Math.round(e)+"px)"}:g.translate=function(o,t,e){o.style.top=Math.round(e)+"px",o.style.left=Math.round(t)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(d,g,J){/*
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 L=d("./dom");g.get=function(A,k){var a=new XMLHttpRequest;a.open("GET",A,!0),a.onreadystatechange=function(){a.readyState===4&&k(a.responseText)},a.send(null)},g.loadScript=function(A,k){var a=L.getDocumentHead(),u=document.createElement("script");u.src=A,a.appendChild(u),u.onload=u.onreadystatechange=function(r,i){(i||!u.readyState||u.readyState=="loaded"||u.readyState=="complete")&&(u=u.onload=u.onreadystatechange=null,i||k())}},g.qualifyURL=function(A){var k=document.createElement("a");return k.href=A,k.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(d,g,J){g.inherits=function(L,A){L.super_=A,L.prototype=Object.create(A.prototype,{constructor:{value:L,enumerable:!1,writable:!0,configurable:!0}})},g.mixin=function(L,A){for(var k in A)L[k]=A[k];return L},g.implement=function(L,A){g.mixin(L,A)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(d,g,J){var L={},A=function(){this.propagationStopped=!0},k=function(){this.defaultPrevented=!0};L._emit=L._dispatchEvent=function(a,u){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var r=this._eventRegistry[a]||[],i=this._defaultHandlers[a];if(!(!r.length&&!i)){(typeof u!="object"||!u)&&(u={}),u.type||(u.type=a),u.stopPropagation||(u.stopPropagation=A),u.preventDefault||(u.preventDefault=k),r=r.slice();for(var o=0;o<r.length&&(r[o](u,this),!u.propagationStopped);o++);if(i&&!u.defaultPrevented)return i(u,this)}},L._signal=function(a,u){var r=(this._eventRegistry||{})[a];if(r){r=r.slice();for(var i=0;i<r.length;i++)r[i](u,this)}},L.once=function(a,u){var r=this;if(this.on(a,function i(){r.off(a,i),u.apply(null,arguments)}),!u)return new Promise(function(i){u=i})},L.setDefaultHandler=function(a,u){var r=this._defaultHandlers;if(r||(r=this._defaultHandlers={_disabled_:{}}),r[a]){var i=r[a],o=r._disabled_[a];o||(r._disabled_[a]=o=[]),o.push(i);var t=o.indexOf(u);t!=-1&&o.splice(t,1)}r[a]=u},L.removeDefaultHandler=function(a,u){var r=this._defaultHandlers;if(r){var i=r._disabled_[a];if(r[a]==u)i&&this.setDefaultHandler(a,i.pop());else if(i){var o=i.indexOf(u);o!=-1&&i.splice(o,1)}}},L.on=L.addEventListener=function(a,u,r){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[a];return i||(i=this._eventRegistry[a]=[]),i.indexOf(u)==-1&&i[r?"unshift":"push"](u),u},L.off=L.removeListener=L.removeEventListener=function(a,u){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[a];if(r){var i=r.indexOf(u);i!==-1&&r.splice(i,1)}},L.removeAllListeners=function(a){a||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[a]=void 0),this._defaultHandlers&&(this._defaultHandlers[a]=void 0)},g.EventEmitter=L}),ace.define("ace/lib/report_error",["require","exports","module"],function(d,g,J){g.reportError=function(A,k){var a=new Error(A);a.data=k,typeof console=="object"&&console.error&&console.error(a),setTimeout(function(){throw a})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(d,g,J){var L={"autocomplete.popup.aria-roledescription":"Autocomplete suggestions","autocomplete.popup.aria-label":"Autocomplete suggestions","autocomplete.popup.item.aria-roledescription":"item","autocomplete.loading":"Loading...","editor.scroller.aria-roledescription":"editor","editor.scroller.aria-label":"Editor content, press Enter to start editing, press Escape to exit","editor.gutter.aria-roledescription":"editor gutter","editor.gutter.aria-label":"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit","error-marker.good-state":"Looks good!","prompt.recently-used":"Recently used","prompt.other-commands":"Other commands","prompt.no-matching-commands":"No matching commands","search-box.find.placeholder":"Search for","search-box.find-all.text":"All","search-box.replace.placeholder":"Replace with","search-box.replace-next.text":"Replace","search-box.replace-all.text":"All","search-box.toggle-replace.title":"Toggle Replace mode","search-box.toggle-regexp.title":"RegExp Search","search-box.toggle-case.title":"CaseSensitive Search","search-box.toggle-whole-word.title":"Whole Word Search","search-box.toggle-in-selection.title":"Search In Selection","search-box.search-counter":"$0 of $1","text-input.aria-roledescription":"editor","text-input.aria-label":"Cursor at row $0","gutter.code-folding.range.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.closed.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.open.aria-label":"Toggle code folding, row $0","gutter.code-folding.closed.title":"Unfold code","gutter.code-folding.open.title":"Fold code","gutter.annotation.aria-label.error":"Error, read annotations row $0","gutter.annotation.aria-label.warning":"Warning, read annotations row $0","gutter.annotation.aria-label.info":"Info, read annotations row $0","inline-fold.closed.title":"Unfold code","gutter-tooltip.aria-label.error.singular":"error","gutter-tooltip.aria-label.error.plural":"errors","gutter-tooltip.aria-label.warning.singular":"warning","gutter-tooltip.aria-label.warning.plural":"warnings","gutter-tooltip.aria-label.info.singular":"information message","gutter-tooltip.aria-label.info.plural":"information messages","gutter.annotation.aria-label.security":"Security finding, read annotations row $0","gutter.annotation.aria-label.hint":"Suggestion, read annotations row $0","gutter-tooltip.aria-label.security.singular":"security finding","gutter-tooltip.aria-label.security.plural":"security findings","gutter-tooltip.aria-label.hint.singular":"suggestion","gutter-tooltip.aria-label.hint.plural":"suggestions"};g.defaultEnglishMessages=L}),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(d,g,J){"no use strict";var L=d("./oop"),A=d("./event_emitter").EventEmitter,k=d("./report_error").reportError,a=d("./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 c=this.$options;e=Object.keys(c).filter(function(f){return!c[f].hidden})}return e.forEach(function(f){n[f]=this.getOption(f)},this),n},setOption:function(e,n){if(this["$"+e]!==n){var c=this.$options[e];if(!c)return r('misspelled option "'+e+'"');if(c.forwardTo)return this[c.forwardTo]&&this[c.forwardTo].setOption(e,n);c.handlesSet||(this["$"+e]=n),c&&c.set&&c.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]:r('misspelled option "'+e+'"')}};function r(e){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var i,o,t=function(){function e(){this.$defaultOptions={},i=a,o="dollarSigns"}return e.prototype.defineOptions=function(n,c,f){return n.$options||(this.$defaultOptions[c]=n.$options={}),Object.keys(f).forEach(function(m){var D=f[m];typeof D=="string"&&(D={forwardTo:D}),D.name||(D.name=m),n.$options[D.name]=D,"initialValue"in D&&(n["$"+D.name]=D.initialValue)}),L.implement(n,u),this},e.prototype.resetOptions=function(n){Object.keys(n.$options).forEach(function(c){var f=n.$options[c];"value"in f&&n.setOption(c,f.value)})},e.prototype.setDefaultValue=function(n,c,f){if(!n){for(n in this.$defaultOptions)if(this.$defaultOptions[n][c])break;if(!this.$defaultOptions[n][c])return!1}var m=this.$defaultOptions[n]||(this.$defaultOptions[n]={});m[c]&&(m.forwardTo?this.setDefaultValue(m.forwardTo,c,f):m[c].value=f)},e.prototype.setDefaultValues=function(n,c){Object.keys(c).forEach(function(f){this.setDefaultValue(n,f,c[f])},this)},e.prototype.setMessages=function(n,c){i=n,c&&c.placeholders&&(o=c.placeholders)},e.prototype.nls=function(n,c,f){i[n]||(r("No message found for the key '"+n+"' in messages with id "+i.$id+", trying to find a translation for the default string '"+c+"'."),i[c]||r("No message found for the default string '"+c+"' in the provided messages. Falling back to the default English message."));var m=i[n]||i[c]||c;return f&&(o==="dollarSigns"&&(m=m.replace(/\$(\$|[\d]+)/g,function(D,M){return M=="$"?"$":f[M]})),o==="curlyBrackets"&&(m=m.replace(/\{([^\}]+)\}/g,function(D,M){return f[M]}))),m},e}();t.prototype.warn=r,t.prototype.reportError=k,L.implement(t.prototype,A),g.AppConfig=t}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(d,g,J){J.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(d,g,J){g.isDark=!1,g.cssClass="ace-tm",g.cssText=d("./textmate-css"),g.$id="ace/theme/textmate";var L=d("../lib/dom");L.importCssString(g.cssText,g.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(d,g,J){"no use strict";var L=d("./lib/lang"),A=d("./lib/net"),k=d("./lib/dom"),a=d("./lib/app_config").AppConfig;J.exports=g=new a;var u={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};g.get=function(t){if(!u.hasOwnProperty(t))throw new Error("Unknown config key: "+t);return u[t]},g.set=function(t,e){if(u.hasOwnProperty(t))u[t]=e;else if(this.setDefaultValue("",t,e)==!1)throw new Error("Unknown config key: "+t);t=="useStrictCSP"&&k.useStrictCSP(e)},g.all=function(){return L.copyObject(u)},g.$modes={},g.moduleUrl=function(t,e){if(u.$moduleUrls[t])return u.$moduleUrls[t];var n=t.split("/");e=e||n[n.length-2]||"";var c=e=="snippets"?"/":"-",f=n[n.length-1];if(e=="worker"&&c=="-"){var m=new RegExp("^"+e+"[\\-_]|[\\-_]"+e+"$","g");f=f.replace(m,"")}(!f||f==e)&&n.length>1&&(f=n[n.length-2]);var D=u[e+"Path"];return D==null?D=u.basePath:c=="/"&&(e=c=""),D&&D.slice(-1)!="/"&&(D+="/"),D+e+c+f+this.get("suffix")},g.setModuleUrl=function(t,e){return u.$moduleUrls[t]=e};var r=function(t,e){if(t==="ace/theme/textmate"||t==="./theme/textmate")return e(null,d("./theme/textmate"));if(i)return i(t,e);console.error("loader is not configured")},i;g.setLoader=function(t){i=t},g.dynamicModules=Object.create(null),g.$loading={},g.$loaded={},g.loadModule=function(t,e){var n;if(Array.isArray(t))var c=t[0],f=t[1];else if(typeof t=="string")var f=t;var m=function(D){if(D&&!g.$loading[f])return e&&e(D);if(g.$loading[f]||(g.$loading[f]=[]),g.$loading[f].push(e),!(g.$loading[f].length>1)){var M=function(){r(f,function(x,_){_&&(g.$loaded[f]=_),g._emit("load.module",{name:f,module:_});var U=g.$loading[f];g.$loading[f]=null,U.forEach(function(se){se&&se(_)})})};if(!g.get("packaged"))return M();A.loadScript(g.moduleUrl(f,c),M),o()}};if(g.dynamicModules[f])g.dynamicModules[f]().then(function(D){D.default?m(D.default):m(D)});else{try{n=this.$require(f)}catch{}m(n||g.$loaded[f])}},g.$require=function(t){if(typeof J.require=="function"){var e="require";return J[e](t)}},g.setModuleLoader=function(t,e){g.dynamicModules[t]=e};var o=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"),o=function(){})};g.version="1.38.0"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(d,g,J){d("./lib/fixoldbrowsers");var L=d("./config");L.setLoader(function(u,r){d([u],function(i){r(null,i)})});var A=function(){return this||typeof window<"u"&&window}();J.exports=function(u){L.init=k,L.$require=d,u.require=d},k(!0);function k(u){if(!(!A||!A.document)){L.set("packaged",u||d.packaged||J.packaged||A.define&&(void 0).packaged);var r={},i="",o=document.currentScript||document._currentScript,t=o&&o.ownerDocument||document;o&&o.src&&(i=o.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var e=t.getElementsByTagName("script"),n=0;n<e.length;n++){var c=e[n],f=c.src||c.getAttribute("src");if(f){for(var m=c.attributes,D=0,M=m.length;D<M;D++){var x=m[D];x.name.indexOf("data-ace-")===0&&(r[a(x.name.replace(/^data-ace-/,""))]=x.value)}var _=f.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);_&&(i=_[1])}}i&&(r.base=r.base||i,r.packaged=!0),r.basePath=r.base,r.workerPath=r.workerPath||r.base,r.modePath=r.modePath||r.base,r.themePath=r.themePath||r.base,delete r.base;for(var U in r)typeof r[U]<"u"&&L.set(U,r[U])}}function a(u){return u.replace(/-(.)/g,function(r,i){return i.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(d,g,J){var L=function(){function A(k,a,u,r){this.start={row:k,column:a},this.end={row:u,column:r}}return A.prototype.isEqual=function(k){return this.start.row===k.start.row&&this.end.row===k.end.row&&this.start.column===k.start.column&&this.end.column===k.end.column},A.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},A.prototype.contains=function(k,a){return this.compare(k,a)==0},A.prototype.compareRange=function(k){var a,u=k.end,r=k.start;return a=this.compare(u.row,u.column),a==1?(a=this.compare(r.row,r.column),a==1?2:a==0?1:0):a==-1?-2:(a=this.compare(r.row,r.column),a==-1?-1:a==1?42:0)},A.prototype.comparePoint=function(k){return this.compare(k.row,k.column)},A.prototype.containsRange=function(k){return this.comparePoint(k.start)==0&&this.comparePoint(k.end)==0},A.prototype.intersects=function(k){var a=this.compareRange(k);return a==-1||a==0||a==1},A.prototype.isEnd=function(k,a){return this.end.row==k&&this.end.column==a},A.prototype.isStart=function(k,a){return this.start.row==k&&this.start.column==a},A.prototype.setStart=function(k,a){typeof k=="object"?(this.start.column=k.column,this.start.row=k.row):(this.start.row=k,this.start.column=a)},A.prototype.setEnd=function(k,a){typeof k=="object"?(this.end.column=k.column,this.end.row=k.row):(this.end.row=k,this.end.column=a)},A.prototype.inside=function(k,a){return this.compare(k,a)==0?!(this.isEnd(k,a)||this.isStart(k,a)):!1},A.prototype.insideStart=function(k,a){return this.compare(k,a)==0?!this.isEnd(k,a):!1},A.prototype.insideEnd=function(k,a){return this.compare(k,a)==0?!this.isStart(k,a):!1},A.prototype.compare=function(k,a){return!this.isMultiLine()&&k===this.start.row?a<this.start.column?-1:a>this.end.column?1:0:k<this.start.row?-1:k>this.end.row?1:this.start.row===k?a>=this.start.column?0:-1:this.end.row===k?a<=this.end.column?0:1:0},A.prototype.compareStart=function(k,a){return this.start.row==k&&this.start.column==a?-1:this.compare(k,a)},A.prototype.compareEnd=function(k,a){return this.end.row==k&&this.end.column==a?1:this.compare(k,a)},A.prototype.compareInside=function(k,a){return this.end.row==k&&this.end.column==a?1:this.start.row==k&&this.start.column==a?-1:this.compare(k,a)},A.prototype.clipRows=function(k,a){if(this.end.row>a)var u={row:a+1,column:0};else if(this.end.row<k)var u={row:k,column:0};if(this.start.row>a)var r={row:a+1,column:0};else if(this.start.row<k)var r={row:k,column:0};return A.fromPoints(r||this.start,u||this.end)},A.prototype.extend=function(k,a){var u=this.compare(k,a);if(u==0)return this;if(u==-1)var r={row:k,column:a};else var i={row:k,column:a};return A.fromPoints(r||this.start,i||this.end)},A.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},A.prototype.isMultiLine=function(){return this.start.row!==this.end.row},A.prototype.clone=function(){return A.fromPoints(this.start,this.end)},A.prototype.collapseRows=function(){return this.end.column==0?new A(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new A(this.start.row,0,this.end.row,0)},A.prototype.toScreenRange=function(k){var a=k.documentToScreenPosition(this.start),u=k.documentToScreenPosition(this.end);return new A(a.row,a.column,u.row,u.column)},A.prototype.moveBy=function(k,a){this.start.row+=k,this.start.column+=a,this.end.row+=k,this.end.column+=a},A}();L.fromPoints=function(A,k){return new L(A.row,A.column,k.row,k.column)},L.comparePoints=function(A,k){return A.row-k.row||A.column-k.column},g.Range=L}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(d,g,J){for(var L=d("./oop"),A={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:"*"}},k={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},a=0;a<10;a++)k["Digit"+a]=48+a,k["Numpad"+a]=96+a,A.PRINTABLE_KEYS[48+a]=""+a,A.FUNCTION_KEYS[96+a]="Numpad"+a;for(var a=65;a<91;a++){var u=String.fromCharCode(a+32);k["Key"+u.toUpperCase()]=a,A.PRINTABLE_KEYS[a]=u}for(var a=1;a<13;a++)k["F"+a]=111+a,A.FUNCTION_KEYS[111+a]="F"+a;var r={Shift:16,Control:17,Alt:18,Meta:224};for(var i in r)k[i]=k[i+"Left"]=k[i+"Right"]=r[i];g.$codeToKeyCode=k,A.PRINTABLE_KEYS[173]="-";for(var o in A.FUNCTION_KEYS){var t=A.FUNCTION_KEYS[o].toLowerCase();A[t]=parseInt(o,10)}for(var o in A.PRINTABLE_KEYS){var t=A.PRINTABLE_KEYS[o].toLowerCase();A[t]=parseInt(o,10)}L.mixin(A,A.MODIFIER_KEYS),L.mixin(A,A.PRINTABLE_KEYS),L.mixin(A,A.FUNCTION_KEYS),A.enter=A.return,A.escape=A.esc,A.del=A.delete,function(){for(var e=["cmd","ctrl","alt","shift"],n=Math.pow(2,e.length);n--;)A.KEY_MODS[n]=e.filter(function(c){return n&A.KEY_MODS[c]}).join("-")+"-"}(),A.KEY_MODS[0]="",A.KEY_MODS[-1]="input-",L.mixin(g,A),g.default=g,g.keyCodeToString=function(e){var n=A[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(d,g,J){var L=d("./keys"),A=d("./useragent"),k=null,a=0,u;function r(){u=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return u={passive:!1},!0}})}catch{}}function i(){return u==null&&r(),u}function o(D,M,x){this.elem=D,this.type=M,this.callback=x}o.prototype.destroy=function(){e(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var t=g.addListener=function(D,M,x,_){D.addEventListener(M,x,i()),_&&_.$toDestroy.push(new o(D,M,x))},e=g.removeListener=function(D,M,x){D.removeEventListener(M,x,i())};g.stopEvent=function(D){return g.stopPropagation(D),g.preventDefault(D),!1},g.stopPropagation=function(D){D.stopPropagation&&D.stopPropagation()},g.preventDefault=function(D){D.preventDefault&&D.preventDefault()},g.getButton=function(D){return D.type=="dblclick"?0:D.type=="contextmenu"||A.isMac&&D.ctrlKey&&!D.altKey&&!D.shiftKey?2:D.button},g.capture=function(D,M,x){var _=D&&D.ownerDocument||document;function U(se){M&&M(se),x&&x(se),e(_,"mousemove",M),e(_,"mouseup",U),e(_,"dragstart",U)}return t(_,"mousemove",M),t(_,"mouseup",U),t(_,"dragstart",U),U},g.addMouseWheelListener=function(D,M,x){t(D,"wheel",function(_){var U=.15,se=_.deltaX||0,X=_.deltaY||0;switch(_.deltaMode){case _.DOM_DELTA_PIXEL:_.wheelX=se*U,_.wheelY=X*U;break;case _.DOM_DELTA_LINE:var O=15;_.wheelX=se*O,_.wheelY=X*O;break;case _.DOM_DELTA_PAGE:var _e=150;_.wheelX=se*_e,_.wheelY=X*_e;break}M(_)},x)},g.addMultiMouseDownListener=function(D,M,x,_,U){var se=0,X,O,_e,S={2:"dblclick",3:"tripleclick",4:"quadclick"};function h(b){if(g.getButton(b)!==0?se=0:b.detail>1?(se++,se>4&&(se=1)):se=1,A.isIE){var E=Math.abs(b.clientX-X)>5||Math.abs(b.clientY-O)>5;(!_e||E)&&(se=1),_e&&clearTimeout(_e),_e=setTimeout(function(){_e=null},M[se-1]||600),se==1&&(X=b.clientX,O=b.clientY)}if(b._clicks=se,x[_]("mousedown",b),se>4)se=0;else if(se>1)return x[_](S[se],b)}Array.isArray(D)||(D=[D]),D.forEach(function(b){t(b,"mousedown",h,U)})};function n(D){return 0|(D.ctrlKey?1:0)|(D.altKey?2:0)|(D.shiftKey?4:0)|(D.metaKey?8:0)}g.getModifierString=function(D){return L.KEY_MODS[n(D)]};function c(D,M,x){var _=n(M);if(!x&&M.code&&(x=L.$codeToKeyCode[M.code]||x),!A.isMac&&k){if(M.getModifierState&&(M.getModifierState("OS")||M.getModifierState("Win"))&&(_|=8),k.altGr)if((3&_)!=3)k.altGr=0;else return;if(x===18||x===17){var U=M.location;if(x===17&&U===1)k[x]==1&&(a=M.timeStamp);else if(x===18&&_===3&&U===2){var se=M.timeStamp-a;se<50&&(k.altGr=!0)}}}if(x in L.MODIFIER_KEYS&&(x=-1),!(!_&&x===13&&M.location===3&&(D(M,_,-x),M.defaultPrevented))){if(A.isChromeOS&&_&8){if(D(M,_,x),M.defaultPrevented)return;_&=-9}return!_&&!(x in L.FUNCTION_KEYS)&&!(x in L.PRINTABLE_KEYS)?!1:D(M,_,x)}}g.addCommandKeyListener=function(D,M,x){var _=null;t(D,"keydown",function(U){k[U.keyCode]=(k[U.keyCode]||0)+1;var se=c(M,U,U.keyCode);return _=U.defaultPrevented,se},x),t(D,"keypress",function(U){_&&(U.ctrlKey||U.altKey||U.shiftKey||U.metaKey)&&(g.stopEvent(U),_=null)},x),t(D,"keyup",function(U){k[U.keyCode]=null},x),k||(f(),t(window,"focus",f))};function f(){k=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!A.isOldIE){var m=1;g.nextTick=function(D,M){M=M||window;var x="zero-timeout-message-"+m++,_=function(U){U.data==x&&(g.stopPropagation(U),e(M,"message",_),D())};t(M,"message",_),M.postMessage(x,"*")}}g.$idleBlocked=!1,g.onIdle=function(D,M){return setTimeout(function x(){g.$idleBlocked?setTimeout(x,100):D()},M)},g.$idleBlockId=null,g.blockIdle=function(D){g.$idleBlockId&&clearTimeout(g.$idleBlockId),g.$idleBlocked=!0,g.$idleBlockId=setTimeout(function(){g.$idleBlocked=!1},D||100)},g.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),g.nextFrame?g.nextFrame=g.nextFrame.bind(window):g.nextFrame=function(D){setTimeout(D,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(d,g,J){var L;J.exports={lineMode:!1,pasteCancelled:function(){return L&&L>Date.now()-50?!0:L=!1},cancel:function(){L=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(d,g,J){var L=d("../lib/event"),A=d("../config").nls,k=d("../lib/useragent"),a=d("../lib/dom"),u=d("../lib/lang"),r=d("../clipboard"),i=k.isChrome<18,o=k.isIE,t=k.isChrome>63,e=400,n=d("../lib/keys"),c=n.KEY_MODS,f=k.isIOS,m=f?/\s/:/\n/,D=k.isMobile,M;M=function(x,_){var U=a.createElement("textarea");U.className="ace_text-input",U.setAttribute("wrap","off"),U.setAttribute("autocorrect","off"),U.setAttribute("autocapitalize","off"),U.setAttribute("spellcheck","false"),U.style.opacity="0",x.insertBefore(U,x.firstChild);var se=!1,X=!1,O=!1,_e=!1,S="";D||(U.style.fontSize="1px");var h=!1,b=!1,E="",j=0,we=0,Ee=0,qe=Number.MAX_SAFE_INTEGER,at=Number.MIN_SAFE_INTEGER,ct=0;try{var Ht=document.activeElement===U}catch{}this.setNumberOfExtraLines=function(zt){if(qe=Number.MAX_SAFE_INTEGER,at=Number.MIN_SAFE_INTEGER,zt<0){ct=0;return}ct=zt},this.setAriaLabel=function(){var zt="";if(_.$textInputAriaLabel&&(zt+="".concat(_.$textInputAriaLabel,", ")),_.session){var fi=_.session.selection.cursor.row;zt+=A("text-input.aria-label","Cursor at row $0",[fi+1])}U.setAttribute("aria-label",zt)},this.setAriaOptions=function(zt){zt.activeDescendant?(U.setAttribute("aria-haspopup","true"),U.setAttribute("aria-autocomplete",zt.inline?"both":"list"),U.setAttribute("aria-activedescendant",zt.activeDescendant)):(U.setAttribute("aria-haspopup","false"),U.setAttribute("aria-autocomplete","both"),U.removeAttribute("aria-activedescendant")),zt.role&&U.setAttribute("role",zt.role),zt.setLabel&&(U.setAttribute("aria-roledescription",A("text-input.aria-roledescription","editor")),this.setAriaLabel())},this.setAriaOptions({role:"textbox"}),L.addListener(U,"blur",function(zt){b||(_.onBlur(zt),Ht=!1)},_),L.addListener(U,"focus",function(zt){if(!b){if(Ht=!0,k.isEdge)try{if(!document.hasFocus())return}catch{}_.onFocus(zt),k.isEdge?setTimeout(ut):ut()}},_),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:_.renderer.enableKeyboardAccessibility}),S||t||this.$focusScroll=="browser")return U.focus({preventScroll:!0});var zt=U.style.top;U.style.position="fixed",U.style.top="0px";try{var fi=U.getBoundingClientRect().top!=0}catch{return}var pi=[];if(fi)for(var vi=U.parentElement;vi&&vi.nodeType==1;)pi.push(vi),vi.setAttribute("ace_nocontext","true"),!vi.parentElement&&vi.getRootNode?vi=vi.getRootNode().host:vi=vi.parentElement;U.focus({preventScroll:!0}),fi&&pi.forEach(function(yi){yi.removeAttribute("ace_nocontext")}),setTimeout(function(){U.style.position="",U.style.top=="0px"&&(U.style.top=zt)},0)},this.blur=function(){U.blur()},this.isFocused=function(){return Ht},_.on("beforeEndOperation",function(){var zt=_.curOp,fi=zt&&zt.command&&zt.command.name;if(fi!="insertstring"){var pi=fi&&(zt.docChanged||zt.selectionChanged);O&&pi&&(E=U.value="",Li()),ut()}}),_.on("changeSelection",this.setAriaLabel);var lt=function(zt,fi){for(var pi=fi,vi=1;vi<=zt-qe&&vi<2*ct+1;vi++)pi+=_.session.getLine(zt-vi).length+1;return pi},ut=f?function(zt){if(!(!Ht||se&&!zt||_e)){zt||(zt="");var fi=`
168
- ab`+zt+`cde fg
169
- `;fi!=U.value&&(U.value=E=fi);var pi=4,vi=4+(zt.length||(_.selection.isEmpty()?0:1));(j!=pi||we!=vi)&&U.setSelectionRange(pi,vi),j=pi,we=vi}}:function(){if(!(O||_e)&&!(!Ht&&!hi)){O=!0;var zt=0,fi=0,pi="";if(_.session){var vi=_.selection,yi=vi.getRange(),Si=vi.cursor.row;Si===at+1?(qe=at+1,at=qe+2*ct):Si===qe-1?(at=qe-1,qe=at-2*ct):(Si<qe-1||Si>at+1)&&(qe=Si>ct?Si-ct:0,at=Si>ct?Si+ct:2*ct);for(var xi=[],_i=qe;_i<=at;_i++)xi.push(_.session.getLine(_i));if(pi=xi.join(`
170
- `),zt=lt(yi.start.row,yi.start.column),fi=lt(yi.end.row,yi.end.column),yi.start.row<qe){var $i=_.session.getLine(qe-1);zt=yi.start.row<qe-1?0:zt,fi+=$i.length+1,pi=$i+`
171
- `+pi}else if(yi.end.row>at){var wi=_.session.getLine(at+1);fi=yi.end.row>at+1?wi.length:yi.end.column,fi+=pi.length+1,pi=pi+`
172
- `+wi}else D&&Si>0&&(pi=`
173
- `+pi,fi+=1,zt+=1);pi.length>e&&(zt<e&&fi<e?pi=pi.slice(0,e):(pi=`
174
- `,zt==fi?zt=fi=0:(zt=0,fi=1)));var Mi=pi+`
175
-
176
- `;Mi!=E&&(U.value=E=Mi,j=we=Mi.length)}if(hi&&(j=U.selectionStart,we=U.selectionEnd),we!=fi||j!=zt||U.selectionEnd!=we)try{U.setSelectionRange(zt,fi),j=zt,we=fi}catch{}O=!1}};this.resetSelection=ut,Ht&&_.onFocus();var Wt=function(zt){return zt.selectionStart===0&&zt.selectionEnd>=E.length&&zt.value===E&&E&&zt.selectionEnd!==we},Dt=function(zt){O||(se?se=!1:Wt(U)?(_.selectAll(),ut()):D&&U.selectionStart!=j&&ut())},Vt=null;this.setInputHandler=function(zt){Vt=zt},this.getInputHandler=function(){return Vt};var hi=!1,di=function(zt,fi){if(hi&&(hi=!1),X)return ut(),zt&&_.onPaste(zt),X=!1,"";for(var pi=U.selectionStart,vi=U.selectionEnd,yi=j,Si=E.length-we,xi=zt,_i=zt.length-pi,$i=zt.length-vi,wi=0;yi>0&&E[wi]==zt[wi];)wi++,yi--;for(xi=xi.slice(wi),wi=1;Si>0&&E.length-wi>j-1&&E[E.length-wi]==zt[zt.length-wi];)wi++,Si--;_i-=wi-1,$i-=wi-1;var Mi=xi.length-wi+1;if(Mi<0&&(yi=-Mi,Mi=0),xi=xi.slice(0,Mi),!fi&&!xi&&!_i&&!yi&&!Si&&!$i)return"";_e=!0;var Ri=!1;return k.isAndroid&&xi==". "&&(xi=" ",Ri=!0),xi&&!yi&&!Si&&!_i&&!$i||h?_.onTextInput(xi):_.onTextInput(xi,{extendLeft:yi,extendRight:Si,restoreStart:_i,restoreEnd:$i}),_e=!1,E=zt,j=pi,we=vi,Ee=$i,Ri?`
177
- `:xi},Jt=function(zt){if(O)return Ei();if(zt&&zt.inputType){if(zt.inputType=="historyUndo")return _.execCommand("undo");if(zt.inputType=="historyRedo")return _.execCommand("redo")}var fi=U.value,pi=di(fi,!0);(fi.length>e+100||m.test(pi)||D&&j<1&&j==we)&&ut()},gi=function(zt,fi,pi){var vi=zt.clipboardData||window.clipboardData;if(!(!vi||i)){var yi=o||pi?"Text":"text/plain";try{return fi?vi.setData(yi,fi)!==!1:vi.getData(yi)}catch(Si){if(!pi)return gi(Si,fi,!0)}}},bi=function(zt,fi){var pi=_.getCopyText();if(!pi)return L.preventDefault(zt);gi(zt,pi)?(f&&(ut(pi),se=pi,setTimeout(function(){se=!1},10)),fi?_.onCut():_.onCopy(),L.preventDefault(zt)):(se=!0,U.value=pi,U.select(),setTimeout(function(){se=!1,ut(),fi?_.onCut():_.onCopy()}))},ki=function(zt){bi(zt,!0)},Ai=function(zt){bi(zt,!1)},Ci=function(zt){var fi=gi(zt);r.pasteCancelled()||(typeof fi=="string"?(fi&&_.onPaste(fi,zt),k.isIE&&setTimeout(ut),L.preventDefault(zt)):(U.value="",X=!0))};L.addCommandKeyListener(U,function(zt,fi,pi){if(!O)return _.onCommandKey(zt,fi,pi)},_),L.addListener(U,"select",Dt,_),L.addListener(U,"input",Jt,_),L.addListener(U,"cut",ki,_),L.addListener(U,"copy",Ai,_),L.addListener(U,"paste",Ci,_),(!("oncut"in U)||!("oncopy"in U)||!("onpaste"in U))&&L.addListener(x,"keydown",function(zt){if(!(k.isMac&&!zt.metaKey||!zt.ctrlKey))switch(zt.keyCode){case 67:Ai(zt);break;case 86:Ci(zt);break;case 88:ki(zt);break}},_);var Ti=function(zt){if(!(O||!_.onCompositionStart||_.$readOnly)&&(O={},!h)){zt.data&&(O.useTextareaForIME=!1),setTimeout(Ei,0),_._signal("compositionStart"),_.on("mousedown",Ni);var fi=_.getSelectionRange();fi.end.row=fi.start.row,fi.end.column=fi.start.column,O.markerRange=fi,O.selectionStart=j,_.onCompositionStart(O),O.useTextareaForIME?(E=U.value="",j=0,we=0):(U.msGetInputContext&&(O.context=U.msGetInputContext()),U.getInputContext&&(O.context=U.getInputContext()))}},Ei=function(){if(!(!O||!_.onCompositionUpdate||_.$readOnly)){if(h)return Ni();if(O.useTextareaForIME)_.onCompositionUpdate(U.value);else{var zt=U.value;di(zt),O.markerRange&&(O.context&&(O.markerRange.start.column=O.selectionStart=O.context.compositionStartOffset),O.markerRange.end.column=O.markerRange.start.column+we-O.selectionStart+Ee)}}},Li=function(zt){!_.onCompositionEnd||_.$readOnly||(O=!1,_.onCompositionEnd(),_.off("mousedown",Ni),zt&&Jt())};function Ni(){b=!0,U.blur(),U.focus(),b=!1}var Fi=u.delayedCall(Ei,50).schedule.bind(null,null);function Hi(zt){zt.keyCode==27&&U.value.length<U.selectionStart&&(O||(E=U.value),j=we=-1,ut()),Fi()}L.addListener(U,"compositionstart",Ti,_),L.addListener(U,"compositionupdate",Ei,_),L.addListener(U,"keyup",Hi,_),L.addListener(U,"keydown",Fi,_),L.addListener(U,"compositionend",Li,_),this.getElement=function(){return U},this.setCommandMode=function(zt){h=zt,U.readOnly=!1},this.setReadOnly=function(zt){h||(U.readOnly=zt)},this.setCopyWithEmptySelection=function(zt){},this.onContextMenu=function(zt){hi=!0,ut(),_._emit("nativecontextmenu",{target:_,domEvent:zt}),this.moveToMouse(zt,!0)},this.moveToMouse=function(zt,fi){S||(S=U.style.cssText),U.style.cssText=(fi?"z-index:100000;":"")+(k.isIE?"opacity:0.1;":"")+"text-indent: -"+(j+we)*_.renderer.characterWidth*.5+"px;";var pi=_.container.getBoundingClientRect(),vi=a.computedStyle(_.container),yi=pi.top+(parseInt(vi.borderTopWidth)||0),Si=pi.left+(parseInt(vi.borderLeftWidth)||0),xi=pi.bottom-yi-U.clientHeight-2,_i=function($i){a.translate(U,$i.clientX-Si-2,Math.min($i.clientY-yi-2,xi))};_i(zt),zt.type=="mousedown"&&(_.renderer.$isMousePressed=!0,clearTimeout(Oi),k.isWin&&L.capture(_.container,_i,Ii))},this.onContextMenuClose=Ii;var Oi;function Ii(){clearTimeout(Oi),Oi=setTimeout(function(){S&&(U.style.cssText=S,S=""),_.renderer.$isMousePressed=!1,_.renderer.$keepTextAreaAtCursor&&_.renderer.$moveTextAreaToCursor()},0)}var Di=function(zt){_.textInput.onContextMenu(zt),Ii()};L.addListener(U,"mouseup",Di,_),L.addListener(U,"mousedown",function(zt){zt.preventDefault(),Ii()},_),L.addListener(_.renderer.scroller,"contextmenu",Di,_),L.addListener(U,"contextmenu",Di,_),f&&zi(x,_,U);function zi(zt,fi,pi){var vi=null,yi=!1;pi.addEventListener("keydown",function(xi){vi&&clearTimeout(vi),yi=!0},!0),pi.addEventListener("keyup",function(xi){vi=setTimeout(function(){yi=!1},100)},!0);var Si=function(xi){if(document.activeElement===pi&&!(yi||O||fi.$mouseHandler.isMousePressed)&&!se){var _i=pi.selectionStart,$i=pi.selectionEnd,wi=null,Mi=0;if(_i==0?wi=n.up:_i==1?wi=n.home:$i>we&&E[$i]==`
178
- `?wi=n.end:_i<j&&E[_i-1]==" "?(wi=n.left,Mi=c.option):_i<j||_i==j&&we!=j&&_i==$i?wi=n.left:$i>we&&E.slice(0,$i).split(`
179
- `).length>2?wi=n.down:$i>we&&E[$i-1]==" "?(wi=n.right,Mi=c.option):($i>we||$i==we&&we!=j&&_i==$i)&&(wi=n.right),_i!==$i&&(Mi|=c.shift),wi){var Ri=fi.onCommandKey({},Mi,wi);if(!Ri&&fi.commands){wi=n.keyCodeToString(wi);var Bi=fi.commands.findKeyCommand(Mi,wi);Bi&&fi.execCommand(Bi)}j=_i,we=$i,ut("")}}};document.addEventListener("selectionchange",Si),fi.on("destroy",function(){document.removeEventListener("selectionchange",Si)})}this.destroy=function(){U.parentElement&&U.parentElement.removeChild(U)}},g.TextInput=M,g.$setUserAgentForTests=function(x,_){D=x,f=_}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(d,g,J){var L=d("../lib/useragent"),A=0,k=550,a=function(){function i(o){o.$clickSelection=null;var t=o.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(o)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(o)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(o)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(o)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(o));var e=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];e.forEach(function(n){o[n]=this[n]},this),o.selectByLines=this.extendSelectionBy.bind(o,"getLineRange"),o.selectByWords=this.extendSelectionBy.bind(o,"getWordRange")}return i.prototype.onMouseDown=function(o){var t=o.inSelection(),e=o.getDocumentPosition();this.mousedownEvent=o;var n=this.editor,c=o.getButton();if(c!==0){var f=n.getSelectionRange(),m=f.isEmpty();(m||c==1)&&n.selection.moveToPosition(e),c==2&&(n.textInput.onContextMenu(o.domEvent),L.isMozilla||o.preventDefault());return}if(this.mousedownEvent.time=Date.now(),t&&!n.isFocused()&&(n.focus(),this.$focusTimeout&&!this.$clickSelection&&!n.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(o);return}return this.captureMouse(o),this.startSelect(e,o.domEvent._clicks>1),o.preventDefault()},i.prototype.startSelect=function(o,t){o=o||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var e=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?e.selection.selectToPosition(o):t||e.selection.moveToPosition(o),t||this.select(),e.setStyle("ace_selecting"),this.setState("select"))},i.prototype.select=function(){var o,t=this.editor,e=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var n=this.$clickSelection.comparePoint(e);if(n==-1)o=this.$clickSelection.end;else if(n==1)o=this.$clickSelection.start;else{var c=r(this.$clickSelection,e);e=c.cursor,o=c.anchor}t.selection.setSelectionAnchor(o.row,o.column)}t.selection.selectToPosition(e),t.renderer.scrollCursorIntoView()},i.prototype.extendSelectionBy=function(o){var t,e=this.editor,n=e.renderer.screenToTextCoordinates(this.x,this.y),c=e.selection[o](n.row,n.column);if(this.$clickSelection){var f=this.$clickSelection.comparePoint(c.start),m=this.$clickSelection.comparePoint(c.end);if(f==-1&&m<=0)t=this.$clickSelection.end,(c.end.row!=n.row||c.end.column!=n.column)&&(n=c.start);else if(m==1&&f>=0)t=this.$clickSelection.start,(c.start.row!=n.row||c.start.column!=n.column)&&(n=c.end);else if(f==-1&&m==1)n=c.end,t=c.start;else{var D=r(this.$clickSelection,n);n=D.cursor,t=D.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 o=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(o>A||t-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},i.prototype.onDoubleClick=function(o){var t=o.getDocumentPosition(),e=this.editor,n=e.session,c=n.getBracketRange(t);c?(c.isEmpty()&&(c.start.column--,c.end.column++),this.setState("select")):(c=e.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=c,this.select()},i.prototype.onTripleClick=function(o){var t=o.getDocumentPosition(),e=this.editor;this.setState("selectByLines");var n=e.getSelectionRange();n.isMultiLine()&&n.contains(t.row,t.column)?(this.$clickSelection=e.selection.getLineRange(n.start.row),this.$clickSelection.end=e.selection.getLineRange(n.end.row).end):this.$clickSelection=e.selection.getLineRange(t.row),this.select()},i.prototype.onQuadClick=function(o){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},i.prototype.onMouseWheel=function(o){if(!o.getAccelKey()){o.getShiftKey()&&o.wheelY&&!o.wheelX&&(o.wheelX=o.wheelY,o.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var e=this.$lastScroll,n=o.domEvent.timeStamp,c=n-e.t,f=c?o.wheelX/c:e.vx,m=c?o.wheelY/c:e.vy;c<k&&(f=(f+e.vx)/2,m=(m+e.vy)/2);var D=Math.abs(f/m),M=!1;if(D>=1&&t.renderer.isScrollableBy(o.wheelX*o.speed,0)&&(M=!0),D<=1&&t.renderer.isScrollableBy(0,o.wheelY*o.speed)&&(M=!0),M)e.allowed=n;else if(n-e.allowed<k){var x=Math.abs(f)<=1.5*Math.abs(e.vx)&&Math.abs(m)<=1.5*Math.abs(e.vy);x?(M=!0,e.allowed=n):e.allowed=0}if(e.t=n,e.vx=f,e.vy=m,M)return t.renderer.scrollBy(o.wheelX*o.speed,o.wheelY*o.speed),o.stop()}},i}();a.prototype.selectEnd=a.prototype.selectByLinesEnd,a.prototype.selectAllEnd=a.prototype.selectByLinesEnd,a.prototype.selectByWordsEnd=a.prototype.selectByLinesEnd,g.DefaultHandlers=a;function u(i,o,t,e){return Math.sqrt(Math.pow(t-i,2)+Math.pow(e-o,2))}function r(i,o){if(i.start.row==i.end.row)var t=2*o.column-i.start.column-i.end.column;else if(i.start.row==i.end.row-1&&!i.start.column&&!i.end.column)var t=o.column-4;else var t=2*o.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(d,g,J){g.preventParentScroll=function(A){A.stopPropagation();var k=A.currentTarget,a=k.scrollHeight>k.clientHeight;a||A.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(d,g,J){var L=this&&this.__extends||function(){var n=function(c,f){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,D){m.__proto__=D}||function(m,D){for(var M in D)Object.prototype.hasOwnProperty.call(D,M)&&(m[M]=D[M])},n(c,f)};return function(c,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");n(c,f);function m(){this.constructor=c}c.prototype=f===null?Object.create(f):(m.prototype=f.prototype,new m)}}(),A=this&&this.__values||function(n){var c=typeof Symbol=="function"&&Symbol.iterator,f=c&&n[c],m=0;if(f)return f.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&m>=n.length&&(n=void 0),{value:n&&n[m++],done:!n}}};throw new TypeError(c?"Object is not iterable.":"Symbol.iterator is not defined.")},k=d("./lib/dom");d("./lib/event");var a=d("./range").Range,u=d("./lib/scroll").preventParentScroll,r="ace_tooltip",i=function(){function n(c){this.isOpen=!1,this.$element=null,this.$parentNode=c}return n.prototype.$init=function(){return this.$element=k.createElement("div"),this.$element.className=r,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(c){this.getElement().textContent=c},n.prototype.setHtml=function(c){this.getElement().innerHTML=c},n.prototype.setPosition=function(c,f){this.getElement().style.left=c+"px",this.getElement().style.top=f+"px"},n.prototype.setClassName=function(c){k.addCssClass(this.getElement(),c)},n.prototype.setTheme=function(c){this.$element.className=r+" "+(c.isDark?"ace_dark ":"")+(c.cssClass||"")},n.prototype.show=function(c,f,m){c!=null&&this.setText(c),f!=null&&m!=null&&this.setPosition(f,m),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},n.prototype.hide=function(c){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=r,this.isOpen=!1)},n.prototype.getHeight=function(){return this.getElement().offsetHeight},n.prototype.getWidth=function(){return this.getElement().offsetWidth},n.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},n}(),o=function(){function n(){this.popups=[]}return n.prototype.addPopup=function(c){this.popups.push(c),this.updatePopups()},n.prototype.removePopup=function(c){var f=this.popups.indexOf(c);f!==-1&&(this.popups.splice(f,1),this.updatePopups())},n.prototype.updatePopups=function(){var c,f,m,D;this.popups.sort(function(S,h){return h.priority-S.priority});var M=[];try{for(var x=A(this.popups),_=x.next();!_.done;_=x.next()){var U=_.value,se=!0;try{for(var X=(m=void 0,A(M)),O=X.next();!O.done;O=X.next()){var _e=O.value;if(this.doPopupsOverlap(_e,U)){se=!1;break}}}catch(S){m={error:S}}finally{try{O&&!O.done&&(D=X.return)&&D.call(X)}finally{if(m)throw m.error}}se?M.push(U):U.hide()}}catch(S){c={error:S}}finally{try{_&&!_.done&&(f=x.return)&&f.call(x)}finally{if(c)throw c.error}}},n.prototype.doPopupsOverlap=function(c,f){var m=c.getElement().getBoundingClientRect(),D=f.getElement().getBoundingClientRect();return m.left<D.right&&m.right>D.left&&m.top<D.bottom&&m.bottom>D.top},n}(),t=new o;g.popupManager=t,g.Tooltip=i;var e=function(n){L(c,n);function c(f){f===void 0&&(f=document.body);var m=n.call(this,f)||this;m.timeout=void 0,m.lastT=0,m.idleTime=350,m.lastEvent=void 0,m.onMouseOut=m.onMouseOut.bind(m),m.onMouseMove=m.onMouseMove.bind(m),m.waitForHover=m.waitForHover.bind(m),m.hide=m.hide.bind(m);var D=m.getElement();return D.style.whiteSpace="pre-wrap",D.style.pointerEvents="auto",D.addEventListener("mouseout",m.onMouseOut),D.tabIndex=-1,D.addEventListener("blur",(function(){D.contains(document.activeElement)||this.hide()}).bind(m)),D.addEventListener("wheel",u),m}return c.prototype.addToEditor=function(f){f.on("mousemove",this.onMouseMove),f.on("mousedown",this.hide),f.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},c.prototype.removeFromEditor=function(f){f.off("mousemove",this.onMouseMove),f.off("mousedown",this.hide),f.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},c.prototype.onMouseMove=function(f,m){this.lastEvent=f,this.lastT=Date.now();var D=m.$mouseHandler.isMousePressed;if(this.isOpen){var M=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(M.row,M.column)||D||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||D||(this.lastEvent=f,this.timeout=setTimeout(this.waitForHover,this.idleTime))},c.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var f=Date.now()-this.lastT;if(this.idleTime-f>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-f);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},c.prototype.isOutsideOfText=function(f){var m=f.editor,D=f.getDocumentPosition(),M=m.session.getLine(D.row);if(D.column==M.length){var x=m.renderer.pixelToScreenCoordinates(f.clientX,f.clientY),_=m.session.documentToScreenPosition(D.row,D.column);if(_.column!=x.column||_.row!=x.row)return!0}return!1},c.prototype.setDataProvider=function(f){this.$gatherData=f},c.prototype.showForRange=function(f,m,D,M){var x=10;if(!(M&&M!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var _=f.renderer;this.isOpen||(t.addPopup(this),this.$registerCloseEvents(),this.setTheme(_.theme)),this.isOpen=!0,this.addMarker(m,f.session),this.range=a.fromPoints(m.start,m.end);var U=_.textToScreenCoordinates(m.start.row,m.start.column),se=_.scroller.getBoundingClientRect();U.pageX<se.left&&(U.pageX=se.left);var X=this.getElement();X.innerHTML="",X.appendChild(D),X.style.maxHeight="",X.style.display="block";var O=X.clientHeight,_e=X.clientWidth,S=window.innerHeight-U.pageY-_.lineHeight,h=!0;U.pageY-O<0&&U.pageY<S&&(h=!1),X.style.maxHeight=(h?U.pageY:S)-x+"px",X.style.top=h?"":U.pageY+_.lineHeight+"px",X.style.bottom=h?window.innerHeight-U.pageY+"px":"",X.style.left=Math.min(U.pageX,window.innerWidth-_e-x)+"px"}},c.prototype.addMarker=function(f,m){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=m,this.marker=m&&m.addMarker(f,"ace_highlight-marker","text")},c.prototype.hide=function(f){!f&&document.activeElement==this.getElement()||f&&f.target&&(f.type!="keydown"||f.ctrlKey||f.metaKey)&&this.$element.contains(f.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,t.removePopup(this)))},c.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},c.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},c.prototype.onMouseOut=function(f){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!f.relatedTarget||this.getElement().contains(f.relatedTarget)||f&&f.currentTarget.contains(f.relatedTarget)||f.relatedTarget.classList.contains("ace_content")||this.hide())},c}(i);g.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(d,g,J){var L=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,f){c.__proto__=f}||function(c,f){for(var m in f)Object.prototype.hasOwnProperty.call(f,m)&&(c[m]=f[m])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function c(){this.constructor=e}e.prototype=n===null?Object.create(n):(c.prototype=n.prototype,new c)}}(),A=this&&this.__values||function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],c=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&c>=t.length&&(t=void 0),{value:t&&t[c++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},k=d("../lib/dom"),a=d("../lib/event"),u=d("../tooltip").Tooltip,r=d("../config").nls;d("../lib/lang");function i(t){var e=t.editor,n=e.renderer.$gutterLayer,c=new o(e);t.editor.setDefaultHandler("guttermousedown",function(_){if(!(!e.isFocused()||_.getButton()!=0)){var U=n.getRegion(_);if(U!="foldWidgets"){var se=_.getDocumentPosition().row,X=e.session.selection;if(_.getShiftKey())X.selectTo(se,0);else{if(_.domEvent.detail==2)return e.selectAll(),_.preventDefault();t.$clickSelection=e.selection.getLineRange(se)}return t.setState("selectByLines"),t.captureMouse(_),_.preventDefault()}}});var f,m;function D(){var _=m.getDocumentPosition().row,U=e.session.getLength();if(_==U){var se=e.renderer.pixelToScreenCoordinates(0,m.y).row,X=m.$pos;if(se>e.session.documentToScreenRow(X.row,X.column))return M()}if(c.showTooltip(_),!!c.isOpen)if(e.on("mousewheel",M),t.$tooltipFollowsMouse)x(m);else{var O=m.getGutterRow(),_e=n.$lines.get(O);if(_e){var S=_e.element.querySelector(".ace_gutter_annotation"),h=S.getBoundingClientRect(),b=c.getElement().style;b.left=h.right+"px",b.top=h.bottom+"px"}else x(m)}}function M(){f&&(f=clearTimeout(f)),c.isOpen&&(c.hideTooltip(),e.off("mousewheel",M))}function x(_){c.setPosition(_.x,_.y)}t.editor.setDefaultHandler("guttermousemove",function(_){var U=_.domEvent.target||_.domEvent.srcElement;if(k.hasCssClass(U,"ace_fold-widget"))return M();c.isOpen&&t.$tooltipFollowsMouse&&x(_),m=_,!f&&(f=setTimeout(function(){f=null,m&&!t.isMousePressed?D():M()},50))}),a.addListener(e.renderer.$gutter,"mouseout",function(_){m=null,!(!c.isOpen||f)&&(f=setTimeout(function(){f=null,M()},50))},e),e.on("changeSession",M),e.on("input",M)}g.GutterHandler=i;var o=function(t){L(e,t);function e(n){var c=t.call(this,n.container)||this;return c.editor=n,c.visibleTooltipRow,c}return e.prototype.setPosition=function(n,c){var f=window.innerWidth||document.documentElement.clientWidth,m=window.innerHeight||document.documentElement.clientHeight,D=this.getWidth(),M=this.getHeight();n+=15,c+=15,n+D>f&&(n-=n+D-f),c+M>m&&(c-=20+M),u.prototype.setPosition.call(this,n,c)},Object.defineProperty(e,"annotationLabels",{get:function(){return{error:{singular:r("gutter-tooltip.aria-label.error.singular","error"),plural:r("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:r("gutter-tooltip.aria-label.security.singular","security finding"),plural:r("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:r("gutter-tooltip.aria-label.warning.singular","warning"),plural:r("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:r("gutter-tooltip.aria-label.info.singular","information message"),plural:r("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:r("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:r("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),e.prototype.showTooltip=function(n){var c,f=this.editor.renderer.$gutterLayer,m=f.$annotations[n],D;m?D={displayText:Array.from(m.displayText),type:Array.from(m.type)}:D={displayText:[],type:[]};var M=f.session.getFoldLine(n);if(M&&f.$showFoldedAnnotations){for(var x={error:[],security:[],warning:[],info:[],hint:[]},_={error:1,security:2,warning:3,info:4,hint:5},U,se=n+1;se<=M.end.row;se++)if(f.$annotations[se])for(var X=0;X<f.$annotations[se].text.length;X++){var O=f.$annotations[se].type[X];x[O].push(f.$annotations[se].text[X]),(!U||_[O]<_[U])&&(U=O)}if(["error","security","warning"].includes(U)){var _e="".concat(e.annotationsToSummaryString(x)," in folded code.");D.displayText.push(_e),D.type.push(U+"_fold")}}if(D.displayText.length===0)return this.hideTooltip();for(var S={error:[],security:[],warning:[],info:[],hint:[]},h=f.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",se=0;se<D.displayText.length;se++){var b=k.createElement("span"),E=k.createElement("span");(c=E.classList).add.apply(c,["ace_".concat(D.type[se]),h]),E.setAttribute("aria-label","".concat(e.annotationLabels[D.type[se].replace("_fold","")].singular)),E.setAttribute("role","img"),E.appendChild(k.createTextNode(" ")),b.appendChild(E),b.appendChild(k.createTextNode(D.displayText[se])),b.appendChild(k.createElement("br")),S[D.type[se].replace("_fold","")].push(b)}var j=this.getElement();k.removeChildren(j),S.error.forEach(function(we){return j.appendChild(we)}),S.security.forEach(function(we){return j.appendChild(we)}),S.warning.forEach(function(we){return j.appendChild(we)}),S.info.forEach(function(we){return j.appendChild(we)}),S.hint.forEach(function(we){return j.appendChild(we)}),j.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.visibleTooltipRow=n,this.editor._signal("showGutterTooltip",this)},e.prototype.hideTooltip=function(){this.isOpen&&(this.$element.removeAttribute("aria-live"),this.hide(),this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this))},e.annotationsToSummaryString=function(n){var c,f,m=[],D=["error","security","warning","info","hint"];try{for(var M=A(D),x=M.next();!x.done;x=M.next()){var _=x.value;if(n[_].length){var U=n[_].length===1?e.annotationLabels[_].singular:e.annotationLabels[_].plural;m.push("".concat(n[_].length," ").concat(U))}}}catch(se){c={error:se}}finally{try{x&&!x.done&&(f=M.return)&&f.call(M)}finally{if(c)throw c.error}}return m.join(", ")},e}(u);g.GutterTooltip=o}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(d,g,J){var L=d("../lib/event"),A=d("../lib/useragent"),k=function(){function a(u,r){this.speed,this.wheelX,this.wheelY,this.domEvent=u,this.editor=r,this.x=this.clientX=u.clientX,this.y=this.clientY=u.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return a.prototype.stopPropagation=function(){L.stopPropagation(this.domEvent),this.propagationStopped=!0},a.prototype.preventDefault=function(){L.preventDefault(this.domEvent),this.defaultPrevented=!0},a.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},a.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},a.prototype.getGutterRow=function(){var u=this.getDocumentPosition().row,r=this.editor.session.documentToScreenRow(u,0),i=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return r-i},a.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var u=this.editor,r=u.getSelectionRange();if(r.isEmpty())this.$inSelection=!1;else{var i=this.getDocumentPosition();this.$inSelection=r.contains(i.row,i.column)}return this.$inSelection},a.prototype.getButton=function(){return L.getButton(this.domEvent)},a.prototype.getShiftKey=function(){return this.domEvent.shiftKey},a.prototype.getAccelKey=function(){return A.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},a}();g.MouseEvent=k}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(d,g,J){var L=d("../lib/dom"),A=d("../lib/event"),k=d("../lib/useragent"),a=200,u=200,r=5;function i(t){var e=t.editor,n=L.createElement("div");n.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",n.textContent=" ";var c=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];c.forEach(function(lt){t[lt]=this[lt]},this),e.on("mousedown",this.onMouseDown.bind(t));var f=e.container,m,D,M,x,_,U,se=0,X,O,_e,S,h;this.onDragStart=function(lt){if(this.cancelDrag||!f.draggable){var ut=this;return setTimeout(function(){ut.startSelect(),ut.captureMouse(lt)},0),lt.preventDefault()}_=e.getSelectionRange();var Wt=lt.dataTransfer;Wt.effectAllowed=e.getReadOnly()?"copy":"copyMove",e.container.appendChild(n),Wt.setDragImage&&Wt.setDragImage(n,0,0),setTimeout(function(){e.container.removeChild(n)}),Wt.clearData(),Wt.setData("Text",e.session.getTextRange()),O=!0,this.setState("drag")},this.onDragEnd=function(lt){if(f.draggable=!1,O=!1,this.setState(null),!e.getReadOnly()){var ut=lt.dataTransfer.dropEffect;!X&&ut=="move"&&e.session.remove(e.getSelectionRange()),e.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(lt){if(!(e.getReadOnly()||!ct(lt.dataTransfer)))return D=lt.clientX,M=lt.clientY,m||we(),se++,lt.dataTransfer.dropEffect=X=Ht(lt),A.preventDefault(lt)},this.onDragOver=function(lt){if(!(e.getReadOnly()||!ct(lt.dataTransfer)))return D=lt.clientX,M=lt.clientY,m||(we(),se++),qe!==null&&(qe=null),lt.dataTransfer.dropEffect=X=Ht(lt),A.preventDefault(lt)},this.onDragLeave=function(lt){if(se--,se<=0&&m)return Ee(),X=null,A.preventDefault(lt)},this.onDrop=function(lt){if(U){var ut=lt.dataTransfer;if(O)switch(X){case"move":_.contains(U.row,U.column)?_={start:U,end:U}:_=e.moveText(_,U);break;case"copy":_=e.moveText(_,U,!0);break}else{var Wt=ut.getData("Text");_={start:U,end:e.session.insert(U,Wt)},e.focus(),X=null}return Ee(),A.preventDefault(lt)}},A.addListener(f,"dragstart",this.onDragStart.bind(t),e),A.addListener(f,"dragend",this.onDragEnd.bind(t),e),A.addListener(f,"dragenter",this.onDragEnter.bind(t),e),A.addListener(f,"dragover",this.onDragOver.bind(t),e),A.addListener(f,"dragleave",this.onDragLeave.bind(t),e),A.addListener(f,"drop",this.onDrop.bind(t),e);function b(lt,ut){var Wt=Date.now(),Dt=!ut||lt.row!=ut.row,Vt=!ut||lt.column!=ut.column;if(!S||Dt||Vt)e.moveCursorToPosition(lt),S=Wt,h={x:D,y:M};else{var hi=o(h.x,h.y,D,M);hi>r?S=null:Wt-S>=u&&(e.renderer.scrollCursorIntoView(),S=null)}}function E(lt,ut){var Wt=Date.now(),Dt=e.renderer.layerConfig.lineHeight,Vt=e.renderer.layerConfig.characterWidth,hi=e.renderer.scroller.getBoundingClientRect(),di={x:{left:D-hi.left,right:hi.right-D},y:{top:M-hi.top,bottom:hi.bottom-M}},Jt=Math.min(di.x.left,di.x.right),gi=Math.min(di.y.top,di.y.bottom),bi={row:lt.row,column:lt.column};Jt/Vt<=2&&(bi.column+=di.x.left<di.x.right?-3:2),gi/Dt<=1&&(bi.row+=di.y.top<di.y.bottom?-1:1);var ki=lt.row!=bi.row,Ai=lt.column!=bi.column,Ci=!ut||lt.row!=ut.row;ki||Ai&&!Ci?_e?Wt-_e>=a&&e.renderer.scrollCursorIntoView(bi):_e=Wt:_e=null}function j(){var lt=U;U=e.renderer.screenToTextCoordinates(D,M),b(U,lt),E(U,lt)}function we(){_=e.selection.toOrientedRange(),m=e.session.addMarker(_,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval(x),j(),x=setInterval(j,20),se=0,A.addListener(document,"mousemove",at)}function Ee(){clearInterval(x),e.session.removeMarker(m),m=null,e.selection.fromOrientedRange(_),e.isFocused()&&!O&&e.$resetCursorStyle(),_=null,U=null,se=0,_e=null,S=null,A.removeListener(document,"mousemove",at)}var qe=null;function at(){qe==null&&(qe=setTimeout(function(){qe!=null&&m&&Ee()},20))}function ct(lt){var ut=lt.types;return!ut||Array.prototype.some.call(ut,function(Wt){return Wt=="text/plain"||Wt=="Text"})}function Ht(lt){var ut=["copy","copymove","all","uninitialized"],Wt=["move","copymove","linkmove","all","uninitialized"],Dt=k.isMac?lt.altKey:lt.ctrlKey,Vt="uninitialized";try{Vt=lt.dataTransfer.effectAllowed.toLowerCase()}catch{}var hi="none";return Dt&&ut.indexOf(Vt)>=0?hi="copy":Wt.indexOf(Vt)>=0?hi="move":ut.indexOf(Vt)>=0&&(hi="copy"),hi}}(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=k.isWin?"default":"move";t.renderer.setCursorStyle(n),this.setState("dragReady")},this.onMouseDrag=function(t){var e=this.editor.container;if(k.isIE&&this.state=="dragReady"){var n=o(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>3&&e.dragDrop()}if(this.state==="dragWait"){var n=o(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>0&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(t){if(this.$dragEnabled){this.mousedownEvent=t;var e=this.editor,n=t.inSelection(),c=t.getButton(),f=t.domEvent.detail||1;if(f===1&&c===0&&n){if(t.editor.inMultiSelectMode&&(t.getAccelKey()||t.getShiftKey()))return;this.mousedownEvent.time=Date.now();var m=t.domEvent.target||t.domEvent.srcElement;if("unselectable"in m&&(m.unselectable="on"),e.getDragDelay()){if(k.isWebKit){this.cancelDrag=!0;var D=e.container;D.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(t,this.onMouseDrag.bind(this)),t.defaultPrevented=!0}}}}).call(i.prototype);function o(t,e,n,c){return Math.sqrt(Math.pow(n-t,2)+Math.pow(c-e,2))}g.DragdropHandler=i}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(d,g,J){var L=d("./mouse_event").MouseEvent,A=d("../lib/event"),k=d("../lib/dom");g.addTouchListeners=function(a,u){var r="scroll",i,o,t,e,n,c,f=0,m,D=0,M=0,x=0,_,U;function se(){var b=window.navigator&&window.navigator.clipboard,E=!1,j=function(){var qe=u.getCopyText(),at=u.session.getUndoManager().hasUndo();U.replaceChild(k.buildDom(E?["span",!qe&&we("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],qe&&we("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],qe&&we("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],b&&we("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],at&&we("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],we("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],we("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),U.firstChild)},we=function(qe){return u.commands.canExecute(qe,u)},Ee=function(qe){var at=qe.target.getAttribute("action");if(at=="more"||!E)return E=!E,j();at=="paste"?b.readText().then(function(ct){u.execCommand(at,ct)}):at&&((at=="cut"||at=="copy")&&(b?b.writeText(u.getCopyText()):document.execCommand("copy")),u.execCommand(at)),U.firstChild.style.display="none",E=!1,at!="openCommandPalette"&&u.focus()};U=k.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(qe){r="menu",qe.stopPropagation(),qe.preventDefault(),u.textInput.focus()},ontouchend:function(qe){qe.stopPropagation(),qe.preventDefault(),Ee(qe)},onclick:Ee},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],u.container)}function X(){if(!u.getOption("enableMobileMenu")){U&&O();return}U||se();var b=u.selection.cursor,E=u.renderer.textToScreenCoordinates(b.row,b.column),j=u.renderer.textToScreenCoordinates(0,0).pageX,we=u.renderer.scrollLeft,Ee=u.container.getBoundingClientRect();U.style.top=E.pageY-Ee.top-3+"px",E.pageX-Ee.left<Ee.width-70?(U.style.left="",U.style.right="10px"):(U.style.right="",U.style.left=j+we-Ee.left+"px"),U.style.display="",U.firstChild.style.display="none",u.on("input",O)}function O(b){U&&(U.style.display="none"),u.off("input",O)}function _e(){n=null,clearTimeout(n);var b=u.selection.getRange(),E=b.contains(m.row,m.column);(b.isEmpty()||!E)&&(u.selection.moveToPosition(m),u.selection.selectWord()),r="wait",X()}function S(){n=null,clearTimeout(n),u.selection.moveToPosition(m);var b=D>=2?u.selection.getLineRange(m.row):u.session.getBracketRange(m);b&&!b.isEmpty()?u.selection.setRange(b):u.selection.selectWord(),r="wait"}A.addListener(a,"contextmenu",function(b){if(_){var E=u.textInput.getElement();E.focus()}},u),A.addListener(a,"touchstart",function(b){var E=b.touches;if(n||E.length>1){clearTimeout(n),n=null,t=-1,r="zoom";return}_=u.$mouseHandler.isMousePressed=!0;var j=u.renderer.layerConfig.lineHeight,we=u.renderer.layerConfig.lineHeight,Ee=b.timeStamp;e=Ee;var qe=E[0],at=qe.clientX,ct=qe.clientY;Math.abs(i-at)+Math.abs(o-ct)>j&&(t=-1),i=b.clientX=at,o=b.clientY=ct,M=x=0;var Ht=new L(b,u);if(m=Ht.getDocumentPosition(),Ee-t<500&&E.length==1&&!f)D++,b.preventDefault(),b.button=0,S();else{D=0;var lt=u.selection.cursor,ut=u.selection.isEmpty()?lt:u.selection.anchor,Wt=u.renderer.$cursorLayer.getPixelPosition(lt,!0),Dt=u.renderer.$cursorLayer.getPixelPosition(ut,!0),Vt=u.renderer.scroller.getBoundingClientRect(),hi=u.renderer.layerConfig.offset,di=u.renderer.scrollLeft,Jt=function(ki,Ai){return ki=ki/we,Ai=Ai/j-.75,ki*ki+Ai*Ai};if(b.clientX<Vt.left){r="zoom";return}var gi=Jt(b.clientX-Vt.left-Wt.left+di,b.clientY-Vt.top-Wt.top+hi),bi=Jt(b.clientX-Vt.left-Dt.left+di,b.clientY-Vt.top-Dt.top+hi);gi<3.5&&bi<3.5&&(r=gi>bi?"cursor":"anchor"),bi<3.5?r="anchor":gi<3.5?r="cursor":r="scroll",n=setTimeout(_e,450)}t=Ee},u),A.addListener(a,"touchend",function(b){_=u.$mouseHandler.isMousePressed=!1,c&&clearInterval(c),r=="zoom"?(r="",f=0):n?(u.selection.moveToPosition(m),f=0,X()):r=="scroll"?(h(),O()):X(),clearTimeout(n),n=null},u),A.addListener(a,"touchmove",function(b){n&&(clearTimeout(n),n=null);var E=b.touches;if(!(E.length>1||r=="zoom")){var j=E[0],we=i-j.clientX,Ee=o-j.clientY;if(r=="wait")if(we*we+Ee*Ee>4)r="cursor";else return b.preventDefault();i=j.clientX,o=j.clientY,b.clientX=j.clientX,b.clientY=j.clientY;var qe=b.timeStamp,at=qe-e;if(e=qe,r=="scroll"){var ct=new L(b,u);ct.speed=1,ct.wheelX=we,ct.wheelY=Ee,10*Math.abs(we)<Math.abs(Ee)&&(we=0),10*Math.abs(Ee)<Math.abs(we)&&(Ee=0),at!=0&&(M=we/at,x=Ee/at),u._emit("mousewheel",ct),ct.propagationStopped||(M=x=0)}else{var Ht=new L(b,u),lt=Ht.getDocumentPosition();r=="cursor"?u.selection.moveCursorToPosition(lt):r=="anchor"&&u.selection.setSelectionAnchor(lt.row,lt.column),u.renderer.scrollCursorIntoView(lt),b.preventDefault()}}},u);function h(){f+=60,c=setInterval(function(){f--<=0&&(clearInterval(c),c=null),Math.abs(M)<.01&&(M=0),Math.abs(x)<.01&&(x=0),f<20&&(M=.9*M),f<20&&(x=.9*x);var b=u.session.getScrollTop();u.renderer.scrollBy(10*M,10*x),b==u.session.getScrollTop()&&(f=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(d,g,J){var L=d("../lib/event"),A=d("../lib/useragent"),k=d("./default_handlers").DefaultHandlers,a=d("./default_gutter_handler").GutterHandler,u=d("./mouse_event").MouseEvent,r=d("./dragdrop_handler").DragdropHandler,i=d("./touch_handler").addTouchListeners,o=d("../config"),t=function(){function e(n){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var c=this;this.editor=n,new k(this),new a(this),new r(this);var f=function(M){var x=!document.hasFocus||!document.hasFocus()||!n.isFocused()&&document.activeElement==(n.textInput&&n.textInput.getElement());x&&window.focus(),n.focus(),setTimeout(function(){n.isFocused()||n.focus()})},m=n.renderer.getMouseEventTarget();L.addListener(m,"click",this.onMouseEvent.bind(this,"click"),n),L.addListener(m,"mousemove",this.onMouseMove.bind(this,"mousemove"),n),L.addMultiMouseDownListener([m,n.renderer.scrollBarV&&n.renderer.scrollBarV.inner,n.renderer.scrollBarH&&n.renderer.scrollBarH.inner,n.textInput&&n.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",n),L.addMouseWheelListener(n.container,this.onMouseWheel.bind(this,"mousewheel"),n),i(n.container,n);var D=n.renderer.$gutter;L.addListener(D,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),n),L.addListener(D,"click",this.onMouseEvent.bind(this,"gutterclick"),n),L.addListener(D,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),n),L.addListener(D,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),n),L.addListener(m,"mousedown",f,n),L.addListener(D,"mousedown",f,n),A.isIE&&n.renderer.scrollBarV&&(L.addListener(n.renderer.scrollBarV.element,"mousedown",f,n),L.addListener(n.renderer.scrollBarH.element,"mousedown",f,n)),n.on("mousemove",function(M){if(!(c.state||c.$dragDelay||!c.$dragEnabled)){var x=n.renderer.screenToTextCoordinates(M.x,M.y),_=n.session.selection.getRange(),U=n.renderer;!_.isEmpty()&&_.insideStart(x.row,x.column)?U.setCursorStyle("default"):U.setCursorStyle("")}},n)}return e.prototype.onMouseEvent=function(n,c){this.editor.session&&this.editor._emit(n,new u(c,this.editor))},e.prototype.onMouseMove=function(n,c){var f=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!f||!f.length||this.editor._emit(n,new u(c,this.editor))},e.prototype.onMouseWheel=function(n,c){var f=new u(c,this.editor);f.speed=this.$scrollSpeed*2,f.wheelX=c.wheelX,f.wheelY=c.wheelY,this.editor._emit(n,f)},e.prototype.setState=function(n){this.state=n},e.prototype.captureMouse=function(n,c){this.x=n.x,this.y=n.y,this.isMousePressed=!0;var f=this.editor,m=this.editor.renderer;m.$isMousePressed=!0;var D=this,M=function(X){if(X){if(A.isWebKit&&!X.which&&D.releaseMouse)return D.releaseMouse();D.x=X.clientX,D.y=X.clientY,c&&c(X),D.mouseEvent=new u(X,D.editor),D.$mouseMoved=!0}},x=function(X){f.off("beforeEndOperation",U),clearInterval(se),f.session&&_(),D[D.state+"End"]&&D[D.state+"End"](X),D.state="",D.isMousePressed=m.$isMousePressed=!1,m.$keepTextAreaAtCursor&&m.$moveTextAreaToCursor(),D.$onCaptureMouseMove=D.releaseMouse=null,X&&D.onMouseEvent("mouseup",X),f.endOperation()},_=function(){D[D.state]&&D[D.state](),D.$mouseMoved=!1};if(A.isOldIE&&n.domEvent.type=="dblclick")return setTimeout(function(){x(n)});var U=function(X){D.releaseMouse&&f.curOp.command.name&&f.curOp.selectionChanged&&(D[D.state+"End"]&&D[D.state+"End"](),D.state="",D.releaseMouse())};f.on("beforeEndOperation",U),f.startOperation({command:{name:"mouse"}}),D.$onCaptureMouseMove=M,D.releaseMouse=L.capture(this.editor.container,M,x);var se=setInterval(_,20)},e.prototype.cancelContextMenu=function(){var n=(function(c){c&&c.domEvent&&c.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",n),c&&c.domEvent&&L.stopEvent(c.domEvent))}).bind(this);setTimeout(n,10),this.editor.on("nativecontextmenu",n)},e.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},e}();t.prototype.releaseMouse=null,o.defineOptions(t.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:A.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),g.MouseHandler=t}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(d,g,J){var L=d("../lib/dom"),A=function(){function k(a){a.on("click",function(u){var r=u.getDocumentPosition(),i=a.session,o=i.getFoldAt(r.row,r.column,1);o&&(u.getAccelKey()?i.removeFold(o):i.expandFold(o),u.stop());var t=u.domEvent&&u.domEvent.target;t&&L.hasCssClass(t,"ace_inline_button")&&L.hasCssClass(t,"ace_toggle_wrap")&&(i.setOption("wrap",!i.getUseWrapMode()),a.renderer.scrollCursorIntoView())}),a.on("gutterclick",function(u){var r=a.renderer.$gutterLayer.getRegion(u);if(r=="foldWidgets"){var i=u.getDocumentPosition().row,o=a.session;o.foldWidgets&&o.foldWidgets[i]&&a.session.onFoldWidgetClick(i,u),a.isFocused()||a.focus(),u.stop()}}),a.on("gutterdblclick",function(u){var r=a.renderer.$gutterLayer.getRegion(u);if(r=="foldWidgets"){var i=u.getDocumentPosition().row,o=a.session,t=o.getParentFoldRangeData(i,!0),e=t.range||t.firstRange;if(e){i=e.start.row;var n=o.getFoldAt(i,o.getLine(i).length,1);n?o.removeFold(n):(o.addFold("...",e),a.renderer.scrollCursorIntoView({row:e.start.row,column:0}))}u.stop()}})}return k}();g.FoldHandler=A}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(d,g,J){var L=d("../lib/keys"),A=d("../lib/event"),k=function(){function a(u){this.$editor=u,this.$data={editor:u},this.$handlers=[],this.setDefaultHandler(u.commands)}return a.prototype.setDefaultHandler=function(u){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=u,this.addKeyboardHandler(u,0)},a.prototype.setKeyboardHandler=function(u){var r=this.$handlers;if(r[r.length-1]!=u){for(;r[r.length-1]&&r[r.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(r[r.length-1]);this.addKeyboardHandler(u,1)}},a.prototype.addKeyboardHandler=function(u,r){if(u){typeof u=="function"&&!u.handleKeyboard&&(u.handleKeyboard=u);var i=this.$handlers.indexOf(u);i!=-1&&this.$handlers.splice(i,1),r==null?this.$handlers.push(u):this.$handlers.splice(r,0,u),i==-1&&u.attach&&u.attach(this.$editor)}},a.prototype.removeKeyboardHandler=function(u){var r=this.$handlers.indexOf(u);return r==-1?!1:(this.$handlers.splice(r,1),u.detach&&u.detach(this.$editor),!0)},a.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},a.prototype.getStatusText=function(){var u=this.$data,r=u.editor;return this.$handlers.map(function(i){return i.getStatusText&&i.getStatusText(r,u)||""}).filter(Boolean).join(" ")},a.prototype.$callKeyboardHandlers=function(u,r,i,o){for(var t,e=!1,n=this.$editor.commands,c=this.$handlers.length;c--&&(t=this.$handlers[c].handleKeyboard(this.$data,u,r,i,o),!(!(!t||!t.command)&&(t.command=="null"?e=!0:e=n.exec(t.command,this.$editor,t.args,o),e&&o&&u!=-1&&t.passEvent!=!0&&t.command.passEvent!=!0&&A.stopEvent(o),e))););return!e&&u==-1&&(t={command:"insertstring"},e=n.exec("insertstring",this.$editor,r)),e&&this.$editor._signal&&this.$editor._signal("keyboardActivity",t),e},a.prototype.onCommandKey=function(u,r,i){var o=L.keyCodeToString(i);return this.$callKeyboardHandlers(r,o,i,u)},a.prototype.onTextInput=function(u){return this.$callKeyboardHandlers(-1,u)},a}();g.KeyBinding=k}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(d,g,J){var L=0,A=0,k=!1,a=!1,u=!1,r=[[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]],o=0,t=1,e=0,n=1,c=2,f=3,m=4,D=5,M=6,x=7,_=8,U=9,se=10,X=11,O=12,_e=13,S=14,h=15,b=16,E=17,j=18,we=[j,j,j,j,j,j,j,j,j,M,D,M,_,D,j,j,j,j,j,j,j,j,j,j,j,j,j,j,D,D,D,M,_,m,m,X,X,X,m,m,m,m,m,se,U,se,U,U,c,c,c,c,c,c,c,c,c,c,U,m,m,m,m,m,m,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,m,m,m,m,m,m,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,m,m,m,m,j,j,j,j,j,j,D,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,j,U,m,X,X,X,X,m,m,m,m,e,m,m,j,m,m,X,X,c,c,m,e,m,m,m,c,e,m,m,m,m,m],Ee=[_,_,_,_,_,_,_,_,_,_,_,j,j,j,e,n,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,_,D,_e,S,h,b,E,U,X,X,X,X,X,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,U,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,_];function qe(lt,ut,Wt,Dt){var Vt=L?i:r,hi=null,di=null,Jt=null,gi=0,bi=null,ki=null,Ai=-1,Ci=null,Ti=null,Ei=[];if(!Dt)for(Ci=0,Dt=[];Ci<Wt;Ci++)Dt[Ci]=Ht(lt[Ci]);for(A=L,k=!1,a=!1,u=!1,Ti=0;Ti<Wt;Ti++){if(hi=gi,Ei[Ti]=di=ct(lt,Dt,Ei,Ti),gi=Vt[hi][di],bi=gi&240,gi&=15,ut[Ti]=Jt=Vt[gi][5],bi>0)if(bi==16){for(Ci=Ai;Ci<Ti;Ci++)ut[Ci]=1;Ai=-1}else Ai=-1;if(ki=Vt[gi][6],ki)Ai==-1&&(Ai=Ti);else if(Ai>-1){for(Ci=Ai;Ci<Ti;Ci++)ut[Ci]=Jt;Ai=-1}Dt[Ti]==D&&(ut[Ti]=0),A|=Jt}if(u){for(Ci=0;Ci<Wt;Ci++)if(Dt[Ci]==M){ut[Ci]=L;for(var Li=Ci-1;Li>=0&&Dt[Li]==_;Li--)ut[Li]=L}}}function at(lt,ut,Wt){if(!(A<lt)){if(lt==1&&L==t&&!a){Wt.reverse();return}for(var Dt=Wt.length,Vt=0,hi,di,Jt,gi;Vt<Dt;){if(ut[Vt]>=lt){for(hi=Vt+1;hi<Dt&&ut[hi]>=lt;)hi++;for(di=Vt,Jt=hi-1;di<Jt;di++,Jt--)gi=Wt[di],Wt[di]=Wt[Jt],Wt[Jt]=gi;Vt=hi}Vt++}}}function ct(lt,ut,Wt,Dt){var Vt=ut[Dt],hi,di,Jt,gi;switch(Vt){case e:case n:k=!1;case m:case f:return Vt;case c:return k?f:c;case x:return k=!0,n;case _:return m;case U:return Dt<1||Dt+1>=ut.length||(hi=Wt[Dt-1])!=c&&hi!=f||(di=ut[Dt+1])!=c&&di!=f?m:(k&&(di=f),di==hi?di:m);case se:return hi=Dt>0?Wt[Dt-1]:D,hi==c&&Dt+1<ut.length&&ut[Dt+1]==c?c:m;case X:if(Dt>0&&Wt[Dt-1]==c)return c;if(k)return m;for(gi=Dt+1,Jt=ut.length;gi<Jt&&ut[gi]==X;)gi++;return gi<Jt&&ut[gi]==c?c:m;case O:for(Jt=ut.length,gi=Dt+1;gi<Jt&&ut[gi]==O;)gi++;if(gi<Jt){var bi=lt[Dt],ki=bi>=1425&&bi<=2303||bi==64286;if(hi=ut[gi],ki&&(hi==n||hi==x))return n}return Dt<1||(hi=ut[Dt-1])==D?m:Wt[Dt-1];case D:return k=!1,a=!0,L;case M:return u=!0,m;case _e:case S:case b:case E:case h:k=!1;case j:return m}}function Ht(lt){var ut=lt.charCodeAt(0),Wt=ut>>8;return Wt==0?ut>191?e:we[ut]:Wt==5?/[\u0591-\u05f4]/.test(lt)?n:e:Wt==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(lt)?O:/[\u0660-\u0669\u066b-\u066c]/.test(lt)?f:ut==1642?X:/[\u06f0-\u06f9]/.test(lt)?c:x:Wt==32&&ut<=8287?Ee[ut&255]:Wt==254&&ut>=65136?x:m}g.L=e,g.R=n,g.EN=c,g.ON_R=3,g.AN=4,g.R_H=5,g.B=6,g.RLE=7,g.DOT="·",g.doBidiReorder=function(lt,ut,Wt){if(lt.length<2)return{};var Dt=lt.split(""),Vt=new Array(Dt.length),hi=new Array(Dt.length),di=[];L=Wt?t:o,qe(Dt,di,Dt.length,ut);for(var Jt=0;Jt<Vt.length;Vt[Jt]=Jt,Jt++);at(2,di,Vt),at(1,di,Vt);for(var Jt=0;Jt<Vt.length-1;Jt++)ut[Jt]===f?di[Jt]=g.AN:di[Jt]===n&&(ut[Jt]>x&&ut[Jt]<_e||ut[Jt]===m||ut[Jt]===j)?di[Jt]=g.ON_R:Jt>0&&Dt[Jt-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(Dt[Jt])&&(di[Jt-1]=di[Jt]=g.R_H,Jt++);Dt[Dt.length-1]===g.DOT&&(di[Dt.length-1]=g.B),Dt[0]==="‫"&&(di[0]=g.RLE);for(var Jt=0;Jt<Vt.length;Jt++)hi[Jt]=di[Vt[Jt]];return{logicalFromVisual:Vt,bidiLevels:hi}},g.hasBidiCharacters=function(lt,ut){for(var Wt=!1,Dt=0;Dt<lt.length;Dt++)ut[Dt]=Ht(lt.charAt(Dt)),!Wt&&(ut[Dt]==n||ut[Dt]==x||ut[Dt]==f)&&(Wt=!0);return Wt},g.getVisualFromLogicalIdx=function(lt,ut){for(var Wt=0;Wt<ut.logicalFromVisual.length;Wt++)if(ut.logicalFromVisual[Wt]==lt)return Wt;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(d,g,J){var L=d("./lib/bidiutil"),A=d("./lib/lang"),k=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,a=function(){function u(r){this.session=r,this.bidiMap={},this.currentRow=null,this.bidiUtil=L,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=k.test(r.getValue())}return u.prototype.isBidiRow=function(r,i,o){return this.seenBidi?(r!==this.currentRow&&(this.currentRow=r,this.updateRowLine(i,o),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},u.prototype.onChange=function(r){this.seenBidi?this.currentRow=null:r.action=="insert"&&k.test(r.lines.join(`
180
- `))&&(this.seenBidi=!0,this.currentRow=null)},u.prototype.getDocumentRow=function(){var r=0,i=this.session.$screenRowCache;if(i.length){var o=this.session.$getRowCacheIndex(i,this.currentRow);o>=0&&(r=this.session.$docRowCache[o])}return r},u.prototype.getSplitIndex=function(){var r=0,i=this.session.$screenRowCache;if(i.length)for(var o,t=this.session.$getRowCacheIndex(i,this.currentRow);this.currentRow-r>0&&(o=this.session.$getRowCacheIndex(i,this.currentRow-r-1),o===t);)t=o,r++;else r=this.currentRow;return r},u.prototype.updateRowLine=function(r,i){r===void 0&&(r=this.getDocumentRow());var o=r===this.session.getLength()-1,t=o?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(r),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var e=this.session.$wrapData[r];e&&(i===void 0&&(i=this.getSplitIndex()),i>0&&e.length?(this.wrapIndent=e.indent,this.wrapOffset=this.wrapIndent*this.charWidths[L.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:L.DOT))}else this.line+=this.showInvisibles?t:L.DOT;var n=this.session,c=0,f;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(m,D){return m===" "||n.isFullWidth(m.charCodeAt(0))?(f=m===" "?n.getScreenTabSize(D+c):2,c+=f-1,A.stringRepeat(L.DOT,f)):m}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==L.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 r=[];L.hasBidiCharacters(this.line,r)||this.isRtlDir?this.bidiMap=L.doBidiReorder(this.line,r,this.isRtlDir):this.bidiMap={}},u.prototype.markAsDirty=function(){this.currentRow=null},u.prototype.updateCharacterWidths=function(r){if(this.characterWidth!==r.$characterSize.width){this.fontMetrics=r;var i=this.characterWidth=r.$characterSize.width,o=r.$measureCharWidth("ה");this.charWidths[L.L]=this.charWidths[L.EN]=this.charWidths[L.ON_R]=i,this.charWidths[L.R]=this.charWidths[L.AN]=o,this.charWidths[L.R_H]=o*.45,this.charWidths[L.B]=this.charWidths[L.RLE]=0,this.currentRow=null}},u.prototype.setShowInvisibles=function(r){this.showInvisibles=r,this.currentRow=null},u.prototype.setEolChar=function(r){this.EOL=r},u.prototype.setContentWidth=function(r){this.contentWidth=r},u.prototype.isRtlLine=function(r){return this.$isRtl?!0:r!=null?this.session.getLine(r).charAt(0)==this.RLE:this.isRtlDir},u.prototype.setRtlDirection=function(r,i){for(var o=r.getCursorPosition(),t=r.selection.getSelectionAnchor().row;t<=o.row;t++)!i&&r.session.getLine(t).charAt(0)===r.session.$bidiHandler.RLE?r.session.doc.removeInLine(t,0,1):i&&r.session.getLine(t).charAt(0)!==r.session.$bidiHandler.RLE&&r.session.doc.insert({column:0,row:t},r.session.$bidiHandler.RLE)},u.prototype.getPosLeft=function(r){r-=this.wrapIndent;var i=this.line.charAt(0)===this.RLE?1:0,o=r>i?this.session.getOverwrite()?r:r-1:i,t=L.getVisualFromLogicalIdx(o,this.bidiMap),e=this.bidiMap.bidiLevels,n=0;!this.session.getOverwrite()&&r<=i&&e[t]%2!==0&&t++;for(var c=0;c<t;c++)n+=this.charWidths[e[c]];return!this.session.getOverwrite()&&r>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(r,i){var o=this.bidiMap,t=o.bidiLevels,e,n=[],c=0,f=Math.min(r,i)-this.wrapIndent,m=Math.max(r,i)-this.wrapIndent,D=!1,M=!1,x=0;this.wrapIndent&&(c+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var _,U=0;U<t.length;U++)_=o.logicalFromVisual[U],e=t[U],D=_>=f&&_<m,D&&!M?x=c:!D&&M&&n.push({left:x,width:c-x}),c+=this.charWidths[e],M=D;if(D&&U===t.length&&n.push({left:x,width:c-x}),this.isRtlDir)for(var se=0;se<n.length;se++)n[se].left+=this.rtlLineOffset;return n},u.prototype.offsetToCol=function(o){this.isRtlDir&&(o-=this.rtlLineOffset);var i=0,o=Math.max(o,0),t=0,e=0,n=this.bidiMap.bidiLevels,c=this.charWidths[n[e]];for(this.wrapIndent&&(o-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);o>t+c/2;){if(t+=c,e===n.length-1){c=0;break}c=this.charWidths[n[++e]]}return e>0&&n[e-1]%2!==0&&n[e]%2===0?(o<t&&e--,i=this.bidiMap.logicalFromVisual[e]):e>0&&n[e-1]%2===0&&n[e]%2!==0?i=1+(o>t?this.bidiMap.logicalFromVisual[e]:this.bidiMap.logicalFromVisual[e-1]):this.isRtlDir&&e===n.length-1&&c===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&&c!==0&&e--,i=this.bidiMap.logicalFromVisual[e]),i===0&&this.isRtlDir&&i++,i+this.wrapIndent},u}();g.BidiHandler=a}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(d,g,J){var L=d("./lib/oop"),A=d("./lib/lang"),k=d("./lib/event_emitter").EventEmitter,a=d("./range").Range,u=function(){function r(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 o=this;this.cursor.on("change",function(t){o.$cursorChanged=!0,o.$silent||o._emit("changeCursor"),!o.$isEmpty&&!o.$silent&&o._emit("changeSelection"),!o.$keepDesiredColumnOnChange&&t.old.column!=t.value.column&&(o.$desiredColumn=null)}),this.anchor.on("change",function(){o.$anchorChanged=!0,!o.$isEmpty&&!o.$silent&&o._emit("changeSelection")})}return r.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},r.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},r.prototype.getCursor=function(){return this.lead.getPosition()},r.prototype.setAnchor=function(i,o){this.$isEmpty=!1,this.anchor.setPosition(i,o)},r.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},r.prototype.getSelectionLead=function(){return this.lead.getPosition()},r.prototype.isBackwards=function(){var i=this.anchor,o=this.lead;return i.row>o.row||i.row==o.row&&i.column>o.column},r.prototype.getRange=function(){var i=this.anchor,o=this.lead;return this.$isEmpty?a.fromPoints(o,o):this.isBackwards()?a.fromPoints(o,i):a.fromPoints(i,o)},r.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},r.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},r.prototype.setRange=function(i,o){var t=o?i.end:i.start,e=o?i.start:i.end;this.$setSelection(t.row,t.column,e.row,e.column)},r.prototype.$setSelection=function(i,o,t,e){if(!this.$silent){var n=this.$isEmpty,c=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(i,o),this.cursor.setPosition(t,e),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||n!=this.$isEmpty||c)&&this._emit("changeSelection")}},r.prototype.$moveSelection=function(i){var o=this.lead;this.$isEmpty&&this.setSelectionAnchor(o.row,o.column),i.call(this)},r.prototype.selectTo=function(i,o){this.$moveSelection(function(){this.moveCursorTo(i,o)})},r.prototype.selectToPosition=function(i){this.$moveSelection(function(){this.moveCursorToPosition(i)})},r.prototype.moveTo=function(i,o){this.clearSelection(),this.moveCursorTo(i,o)},r.prototype.moveToPosition=function(i){this.clearSelection(),this.moveCursorToPosition(i)},r.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},r.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},r.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},r.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},r.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},r.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},r.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},r.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},r.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},r.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},r.prototype.getWordRange=function(i,o){if(typeof o>"u"){var t=i||this.lead;i=t.row,o=t.column}return this.session.getWordRange(i,o)},r.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},r.prototype.selectAWord=function(){var i=this.getCursor(),o=this.session.getAWordRange(i.row,i.column);this.setSelectionRange(o)},r.prototype.getLineRange=function(i,o){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,o===!0?new a(t,0,e,this.session.getLine(e).length):new a(t,0,e+1,0)},r.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},r.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},r.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},r.prototype.wouldMoveIntoSoftTab=function(i,o,t){var e=i.column,n=i.column+o;return t<0&&(e=i.column-o,n=i.column),this.session.isTabStop(i)&&this.doc.getLine(i.row).slice(e,n).split(" ").length-1==o},r.prototype.moveCursorLeft=function(){var i=this.lead.getPosition(),o;if(o=this.session.getFoldAt(i.row,i.column,-1))this.moveCursorTo(o.start.row,o.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)}},r.prototype.moveCursorRight=function(){var i=this.lead.getPosition(),o;if(o=this.session.getFoldAt(i.row,i.column,1))this.moveCursorTo(o.end.row,o.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var t=this.session.getTabSize(),i=this.lead;this.wouldMoveIntoSoftTab(i,t,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,t):this.moveCursorBy(0,1)}},r.prototype.moveCursorLineStart=function(){var i=this.lead.row,o=this.lead.column,t=this.session.documentToScreenRow(i,o),e=this.session.screenToDocumentPosition(t,0),n=this.session.getDisplayLine(i,null,e.row,e.column),c=n.match(/^\s*/);c[0].length!=o&&!this.session.$useEmacsStyleLineStart&&(e.column+=c[0].length),this.moveCursorToPosition(e)},r.prototype.moveCursorLineEnd=function(){var i=this.lead,o=this.session.getDocumentLastRowColumnPosition(i.row,i.column);if(this.lead.column==o.column){var t=this.session.getLine(o.row);if(o.column==t.length){var e=t.search(/\s+$/);e>0&&(o.column=e)}}this.moveCursorTo(o.row,o.column)},r.prototype.moveCursorFileEnd=function(){var i=this.doc.getLength()-1,o=this.doc.getLine(i).length;this.moveCursorTo(i,o)},r.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},r.prototype.moveCursorLongWordRight=function(){var i=this.lead.row,o=this.lead.column,t=this.doc.getLine(i),e=t.substring(o);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var n=this.session.getFoldAt(i,o,1);if(n){this.moveCursorTo(n.end.row,n.end.column);return}if(this.session.nonTokenRe.exec(e)&&(o+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,e=t.substring(o)),o>=t.length){this.moveCursorTo(i,t.length),this.moveCursorRight(),i<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(e)&&(o+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(i,o)},r.prototype.moveCursorLongWordLeft=function(){var i=this.lead.row,o=this.lead.column,t;if(t=this.session.getFoldAt(i,o,-1)){this.moveCursorTo(t.start.row,t.start.column);return}var e=this.session.getFoldStringAt(i,o,-1);e==null&&(e=this.doc.getLine(i).substring(0,o));var n=A.stringReverse(e);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(n)&&(o-=this.session.nonTokenRe.lastIndex,n=n.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),o<=0){this.moveCursorTo(i,0),this.moveCursorLeft(),i>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(n)&&(o-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(i,o)},r.prototype.$shortWordEndIndex=function(i){var o=0,t,e=/\s/,n=this.session.tokenRe;if(n.lastIndex=0,this.session.tokenRe.exec(i))o=this.session.tokenRe.lastIndex;else{for(;(t=i[o])&&e.test(t);)o++;if(o<1){for(n.lastIndex=0;(t=i[o])&&!n.test(t);)if(n.lastIndex=0,o++,e.test(t))if(o>2){o--;break}else{for(;(t=i[o])&&e.test(t);)o++;if(o>2)break}}}return n.lastIndex=0,o},r.prototype.moveCursorShortWordRight=function(){var i=this.lead.row,o=this.lead.column,t=this.doc.getLine(i),e=t.substring(o),n=this.session.getFoldAt(i,o,1);if(n)return this.moveCursorTo(n.end.row,n.end.column);if(o==t.length){var c=this.doc.getLength();do i++,e=this.doc.getLine(i);while(i<c&&/^\s*$/.test(e));/^\s+/.test(e)||(e=""),o=0}var f=this.$shortWordEndIndex(e);this.moveCursorTo(i,o+f)},r.prototype.moveCursorShortWordLeft=function(){var i=this.lead.row,o=this.lead.column,t;if(t=this.session.getFoldAt(i,o,-1))return this.moveCursorTo(t.start.row,t.start.column);var e=this.session.getLine(i).substring(0,o);if(o===0){do i--,e=this.doc.getLine(i);while(i>0&&/^\s*$/.test(e));o=e.length,/\s+$/.test(e)||(e="")}var n=A.stringReverse(e),c=this.$shortWordEndIndex(n);return this.moveCursorTo(i,o-c)},r.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},r.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},r.prototype.moveCursorBy=function(i,o){var t=this.session.documentToScreenPosition(this.lead.row,this.lead.column),e;if(o===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 c=this.session.screenToDocumentPosition(t.row+i,t.column,e);i!==0&&o===0&&c.row===this.lead.row&&(c.column,this.lead.column),this.moveCursorTo(c.row,c.column+o,o===0)},r.prototype.moveCursorToPosition=function(i){this.moveCursorTo(i.row,i.column)},r.prototype.moveCursorTo=function(i,o,t){var e=this.session.getFoldAt(i,o,1);e&&(i=e.start.row,o=e.start.column),this.$keepDesiredColumnOnChange=!0;var n=this.session.getLine(i);/[\uDC00-\uDFFF]/.test(n.charAt(o))&&n.charAt(o-1)&&(this.lead.row==i&&this.lead.column==o+1?o=o-1:o=o+1),this.lead.setPosition(i,o),this.$keepDesiredColumnOnChange=!1,t||(this.$desiredColumn=null)},r.prototype.moveCursorToScreen=function(i,o,t){var e=this.session.screenToDocumentPosition(i,o);this.moveCursorTo(e.row,e.column,t)},r.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},r.prototype.fromOrientedRange=function(i){this.setSelectionRange(i,i.cursor==i.start),this.$desiredColumn=i.desiredColumn||this.$desiredColumn},r.prototype.toOrientedRange=function(i){var o=this.getRange();return i?(i.start.column=o.start.column,i.start.row=o.start.row,i.end.column=o.end.column,i.end.row=o.end.row):i=o,i.cursor=this.isBackwards()?i.start:i.end,i.desiredColumn=this.$desiredColumn,i},r.prototype.getRangeOfMovements=function(i){var o=this.getCursor();try{i(this);var t=this.getCursor();return a.fromPoints(o,t)}catch{return a.fromPoints(o,o)}finally{this.moveCursorToPosition(o)}},r.prototype.toJSON=function(){if(this.rangeCount)var i=this.ranges.map(function(o){var t=o.clone();return t.isBackwards=o.cursor==o.start,t});else{var i=this.getRange();i.isBackwards=this.isBackwards()}return i},r.prototype.fromJSON=function(i){if(i.start==null)if(this.rangeList&&i.length>1){this.toSingleRange(i[0]);for(var o=i.length;o--;){var t=a.fromPoints(i[o].start,i[o].end);i[o].isBackwards&&(t.cursor=t.start),this.addRange(t,!0)}return}else i=i[0];this.rangeList&&this.toSingleRange(i),this.setSelectionRange(i,i.isBackwards)},r.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 o=this.ranges.length;o--;)if(!this.ranges[o].isEqual(i[o]))return!1;return!0},r}();u.prototype.setSelectionAnchor=u.prototype.setAnchor,u.prototype.getSelectionAnchor=u.prototype.getAnchor,u.prototype.setSelectionRange=u.prototype.setRange,L.implement(u.prototype,k),g.Selection=u}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(d,g,J){var L=d("./lib/report_error").reportError,A=2e3,k=function(){function a(u){this.splitRegex,this.states=u,this.regExps={},this.matchMappings={};for(var r in this.states){for(var i=this.states[r],o=[],t=0,e=this.matchMappings[r]={defaultToken:"text"},n="g",c=[],f=0;f<i.length;f++){var m=i[f];if(m.defaultToken&&(e.defaultToken=m.defaultToken),m.caseInsensitive&&n.indexOf("i")===-1&&(n+="i"),m.unicode&&n.indexOf("u")===-1&&(n+="u"),m.regex!=null){m.regex instanceof RegExp&&(m.regex=m.regex.toString().slice(1,-1));var D=m.regex,M=new RegExp("(?:("+D+")|(.))").exec("a").length-2;Array.isArray(m.token)?m.token.length==1||M==1?m.token=m.token[0]:M-1!=m.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:m,groupCount:M-1}),m.token=m.token[0]):(m.tokenArray=m.token,m.token=null,m.onMatch=this.$arrayTokens):typeof m.token=="function"&&!m.onMatch&&(M>1?m.onMatch=this.$applyToken:m.onMatch=m.token),M>1&&(/\\\d/.test(m.regex)?D=m.regex.replace(/\\([0-9]+)/g,function(x,_){return"\\"+(parseInt(_,10)+t+1)}):(M=1,D=this.removeCapturingGroups(m.regex)),!m.splitRegex&&typeof m.token!="string"&&c.push(m)),e[t]=f,t+=M,o.push(D),m.onMatch||(m.onMatch=null)}}o.length||(e[0]=0,o.push("$")),c.forEach(function(x){x.splitRegex=this.createSplitterRegexp(x.regex,n)},this),this.regExps[r]=new RegExp("("+o.join(")|(")+")|($)",n)}}return a.prototype.$setMaxTokenCount=function(u){A=u|0},a.prototype.$applyToken=function(u){var r=this.splitRegex.exec(u).slice(1),i=this.token.apply(this,r);if(typeof i=="string")return[{type:i,value:u}];for(var o=[],t=0,e=i.length;t<e;t++)r[t]&&(o[o.length]={type:i[t],value:r[t]});return o},a.prototype.$arrayTokens=function(u){if(!u)return[];var r=this.splitRegex.exec(u);if(!r)return"text";for(var i=[],o=this.tokenArray,t=0,e=o.length;t<e;t++)r[t+1]&&(i[i.length]={type:o[t],value:r[t+1]});return i},a.prototype.removeCapturingGroups=function(u){var r=u.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(i,o){return o?"(?:":i});return r},a.prototype.createSplitterRegexp=function(u,r){if(u.indexOf("(?=")!=-1){var i=0,o=!1,t={};u.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,n,c,f,m,D){return o?o=m!="]":m?o=!0:f?(i==t.stack&&(t.end=D+1,t.stack=-1),i--):c&&(i++,c.length!=1&&(t.stack=i,t.start=D)),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,(r||"").replace("g",""))},a.prototype.getLineTokens=function(u,r){if(r&&typeof r!="string"){var i=r.slice(0);r=i[0],r==="#tmp"&&(i.shift(),r=i.shift())}else var i=[];var o=r||"start",t=this.states[o];t||(o="start",t=this.states[o]);var e=this.matchMappings[o],n=this.regExps[o];n.lastIndex=0;for(var c,f=[],m=0,D=0,M={type:null,value:""};c=n.exec(u);){var x=e.defaultToken,_=null,U=c[0],se=n.lastIndex;if(se-U.length>m){var X=u.substring(m,se-U.length);M.type==x?M.value+=X:(M.type&&f.push(M),M={type:x,value:X})}for(var O=0;O<c.length-2;O++)if(c[O+1]!==void 0){_=t[e[O]],_.onMatch?x=_.onMatch(U,o,i,u):x=_.token,_.next&&(typeof _.next=="string"?o=_.next:o=_.next(o,i),t=this.states[o],t||(this.reportError("state doesn't exist",o),o="start",t=this.states[o]),e=this.matchMappings[o],m=se,n=this.regExps[o],n.lastIndex=se),_.consumeLineEnd&&(m=se);break}if(U){if(typeof x=="string")(!_||_.merge!==!1)&&M.type===x?M.value+=U:(M.type&&f.push(M),M={type:x,value:U});else if(x){M.type&&f.push(M),M={type:null,value:""};for(var O=0;O<x.length;O++)f.push(x[O])}}if(m==u.length)break;if(m=se,D++>A){for(D>2*u.length&&this.reportError("infinite loop with in ace tokenizer",{startState:r,line:u});m<u.length;)M.type&&f.push(M),M={value:u.substring(m,m+=500),type:"overflow"};o="start",i=[];break}}return M.type&&f.push(M),i.length>1&&i[0]!==o&&i.unshift("#tmp",o),{tokens:f,state:i.length?i:o}},a}();k.prototype.reportError=L,g.Tokenizer=k}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(d,g,J){var L=d("../lib/deep_copy").deepCopy,A;A=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(u,r){if(!r){for(var i in u)this.$rules[i]=u[i];return}for(var i in u){for(var o=u[i],t=0;t<o.length;t++){var e=o[t];(e.next||e.onMatch)&&(typeof e.next=="string"&&e.next.indexOf(r)!==0&&(e.next=r+e.next),e.nextState&&e.nextState.indexOf(r)!==0&&(e.nextState=r+e.nextState))}this.$rules[r+i]=o}},this.getRules=function(){return this.$rules},this.embedRules=function(u,r,i,o,t){var e=typeof u=="function"?new u().getRules():u;if(o)for(var n=0;n<o.length;n++)o[n]=r+o[n];else{o=[];for(var c in e)o.push(r+c)}if(this.addRules(e,r),i)for(var f=Array.prototype[t?"push":"unshift"],n=0;n<o.length;n++)f.apply(this.$rules[o[n]],L(i));this.$embeds||(this.$embeds=[]),this.$embeds.push(r)},this.getEmbeds=function(){return this.$embeds};var k=function(u,r){return(u!="start"||r.length)&&r.unshift(this.nextState,u),this.nextState},a=function(u,r){return r.shift(),r.shift()||"start"};this.normalizeRules=function(){var u=0,r=this.$rules;function i(o){var t=r[o];t.processed=!0;for(var e=0;e<t.length;e++){var n=t[e],c=null;Array.isArray(n)&&(c=n,n={}),!n.regex&&n.start&&(n.regex=n.start,n.next||(n.next=[]),n.next.push({defaultToken:n.token},{token:n.token+".end",regex:n.end||n.start,next:"pop"}),n.token=n.token+".start",n.push=!0);var f=n.next||n.push;if(f&&Array.isArray(f)){var m=n.stateName;m||(m=n.token,typeof m!="string"&&(m=m[0]||""),r[m]&&(m+=u++)),r[m]=f,n.next=m,i(m)}else f=="pop"&&(n.next=a);if(n.push&&(n.nextState=n.next||n.push,n.next=k,delete n.push),n.rules)for(var D in n.rules)r[D]?r[D].push&&r[D].push.apply(r[D],n.rules[D]):r[D]=n.rules[D];var M=typeof n=="string"?n:n.include;if(M&&(M==="$self"&&(M="start"),Array.isArray(M)?c=M.map(function(_){return r[_]}):c=r[M]),c){var x=[e,1].concat(c);n.noEscape&&(x=x.filter(function(_){return!_.next})),t.splice.apply(t,x),e--}n.keywordMap&&(n.token=this.createKeywordMapper(n.keywordMap,n.defaultToken||"text",n.caseInsensitive),delete n.defaultToken)}}Object.keys(r).forEach(i,this)},this.createKeywordMapper=function(u,r,i,o){var t=Object.create(null);return this.$keywordList=[],Object.keys(u).forEach(function(e){for(var n=u[e],c=n.split(o||"|"),f=c.length;f--;){var m=c[f];this.$keywordList.push(m),i&&(m=m.toLowerCase()),t[m]=e}},this),u=null,i?function(e){return t[e.toLowerCase()]||r}:function(e){return t[e]||r}},this.getKeywords=function(){return this.$keywords}}).call(A.prototype),g.TextHighlightRules=A}),ace.define("ace/mode/behaviour",["require","exports","module"],function(d,g,J){var L;L=function(){this.$behaviours={}},(function(){this.add=function(A,k,a){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[A]:this.$behaviours[A]={}}this.$behaviours[A][k]=a},this.addBehaviours=function(A){for(var k in A)for(var a in A[k])this.add(k,a,A[k][a])},this.remove=function(A){this.$behaviours&&this.$behaviours[A]&&delete this.$behaviours[A]},this.inherit=function(A,k){if(typeof A=="function")var a=new A().getBehaviours(k);else var a=A.getBehaviours(k);this.addBehaviours(a)},this.getBehaviours=function(A){if(A){for(var k={},a=0;a<A.length;a++)this.$behaviours[A[a]]&&(k[A[a]]=this.$behaviours[A[a]]);return k}else return this.$behaviours}}).call(L.prototype),g.Behaviour=L}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(d,g,J){var L=d("./range").Range,A=function(){function k(a,u,r){this.$session=a,this.$row=u,this.$rowTokens=a.getTokens(u);var i=a.getTokenAt(u,r);this.$tokenIndex=i?i.index:-1}return k.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]},k.prototype.stepForward=function(){this.$tokenIndex+=1;for(var a;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,a||(a=this.$session.getLength()),this.$row>=a)return this.$row=a-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},k.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},k.prototype.getCurrentTokenRow=function(){return this.$row},k.prototype.getCurrentTokenColumn=function(){var a=this.$rowTokens,u=this.$tokenIndex,r=a[u].start;if(r!==void 0)return r;for(r=0;u>0;)u-=1,r+=a[u].value.length;return r},k.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},k.prototype.getCurrentTokenRange=function(){var a=this.$rowTokens[this.$tokenIndex],u=this.getCurrentTokenColumn();return new L(this.$row,u,this.$row,u+a.value.length)},k}();g.TokenIterator=A}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(d,g,J){var L=d("../../lib/oop"),A=d("../behaviour").Behaviour,k=d("../../token_iterator").TokenIterator,a=d("../../lib/lang"),u=["text","paren.rparen","rparen","paren","punctuation.operator"],r=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],i,o={},t={'"':'"',"'":"'"},e=function(f){var m=-1;if(f.multiSelect&&(m=f.selection.index,o.rangeCount!=f.multiSelect.rangeCount&&(o={rangeCount:f.multiSelect.rangeCount})),o[m])return i=o[m];i=o[m]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},n=function(f,m,D,M){var x=f.end.row-f.start.row;return{text:D+m+M,selection:[0,f.start.column+1,x,f.end.column+(x?0:1)]}},c;c=function(f){f=f||{},this.add("braces","insertion",function(m,D,M,x,_){var U=M.getCursorPosition(),se=x.doc.getLine(U.row);if(_=="{"){e(M);var X=M.getSelectionRange(),O=x.doc.getTextRange(X),_e=x.getTokenAt(U.row,U.column);if(O!==""&&O!=="{"&&M.getWrapBehavioursEnabled())return n(X,O,"{","}");if(_e&&/(?:string)\.quasi|\.xml/.test(_e.type)){var S=[/tag\-(?:open|name)/,/attribute\-name/];return S.some(function(qe){return qe.test(_e.type)})||/(string)\.quasi/.test(_e.type)&&_e.value[U.column-_e.start-1]!=="$"?void 0:(c.recordAutoInsert(M,x,"}"),{text:"{}",selection:[1,1]})}else if(c.isSaneInsertion(M,x))return/[\]\}\)]/.test(se[U.column])||M.inMultiSelectMode||f.braces?(c.recordAutoInsert(M,x,"}"),{text:"{}",selection:[1,1]}):(c.recordMaybeInsert(M,x,"{"),{text:"{",selection:[1,1]})}else if(_=="}"){e(M);var h=se.substring(U.column,U.column+1);if(h=="}"){var b=x.$findOpeningBracket("}",{column:U.column+1,row:U.row});if(b!==null&&c.isAutoInsertedClosing(U,se,_))return c.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(_==`
181
- `||_==`\r
182
- `){e(M);var E="";c.isMaybeInsertedClosing(U,se)&&(E=a.stringRepeat("}",i.maybeInsertedBrackets),c.clearMaybeInsertedClosing());var h=se.substring(U.column,U.column+1);if(h==="}"){var j=x.findMatchingBracket({row:U.row,column:U.column+1},"}");if(!j)return null;var we=this.$getIndent(x.getLine(j.row))}else if(E)var we=this.$getIndent(se);else{c.clearMaybeInsertedClosing();return}var Ee=we+x.getTabString();return{text:`
183
- `+Ee+`
184
- `+we+E,selection:[1,Ee.length,1,Ee.length]}}else c.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(m,D,M,x,_){var U=x.doc.getTextRange(_);if(!_.isMultiLine()&&U=="{"){e(M);var se=x.doc.getLine(_.start.row),X=se.substring(_.end.column,_.end.column+1);if(X=="}")return _.end.column++,_;i.maybeInsertedBrackets--}}),this.add("parens","insertion",function(m,D,M,x,_){if(_=="("){e(M);var U=M.getSelectionRange(),se=x.doc.getTextRange(U);if(se!==""&&M.getWrapBehavioursEnabled())return n(U,se,"(",")");if(c.isSaneInsertion(M,x))return c.recordAutoInsert(M,x,")"),{text:"()",selection:[1,1]}}else if(_==")"){e(M);var X=M.getCursorPosition(),O=x.doc.getLine(X.row),_e=O.substring(X.column,X.column+1);if(_e==")"){var S=x.$findOpeningBracket(")",{column:X.column+1,row:X.row});if(S!==null&&c.isAutoInsertedClosing(X,O,_))return c.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(m,D,M,x,_){var U=x.doc.getTextRange(_);if(!_.isMultiLine()&&U=="("){e(M);var se=x.doc.getLine(_.start.row),X=se.substring(_.start.column+1,_.start.column+2);if(X==")")return _.end.column++,_}}),this.add("brackets","insertion",function(m,D,M,x,_){if(_=="["){e(M);var U=M.getSelectionRange(),se=x.doc.getTextRange(U);if(se!==""&&M.getWrapBehavioursEnabled())return n(U,se,"[","]");if(c.isSaneInsertion(M,x))return c.recordAutoInsert(M,x,"]"),{text:"[]",selection:[1,1]}}else if(_=="]"){e(M);var X=M.getCursorPosition(),O=x.doc.getLine(X.row),_e=O.substring(X.column,X.column+1);if(_e=="]"){var S=x.$findOpeningBracket("]",{column:X.column+1,row:X.row});if(S!==null&&c.isAutoInsertedClosing(X,O,_))return c.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(m,D,M,x,_){var U=x.doc.getTextRange(_);if(!_.isMultiLine()&&U=="["){e(M);var se=x.doc.getLine(_.start.row),X=se.substring(_.start.column+1,_.start.column+2);if(X=="]")return _.end.column++,_}}),this.add("string_dquotes","insertion",function(m,D,M,x,_){var U=x.$mode.$quotes||t;if(_.length==1&&U[_]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(_)!=-1)return;e(M);var se=_,X=M.getSelectionRange(),O=x.doc.getTextRange(X);if(O!==""&&(O.length!=1||!U[O])&&M.getWrapBehavioursEnabled())return n(X,O,se,se);if(!O){var _e=M.getCursorPosition(),S=x.doc.getLine(_e.row),h=S.substring(_e.column-1,_e.column),b=S.substring(_e.column,_e.column+1),E=x.getTokenAt(_e.row,_e.column),j=x.getTokenAt(_e.row,_e.column+1);if(h=="\\"&&E&&/escape/.test(E.type))return null;var we=E&&/string|escape/.test(E.type),Ee=!j||/string|escape/.test(j.type),qe;if(b==se)qe=we!==Ee,qe&&/string\.end/.test(j.type)&&(qe=!1);else{if(we&&!Ee||we&&Ee)return null;var at=x.$mode.tokenRe;at.lastIndex=0;var ct=at.test(h);at.lastIndex=0;var Ht=at.test(b),lt=x.$mode.$pairQuotesAfter,ut=lt&&lt[se]&&lt[se].test(h);if(!ut&&ct||Ht||b&&!/[\s;,.})\]\\]/.test(b))return null;var Wt=S[_e.column-2];if(h==se&&(Wt==se||at.test(Wt)))return null;qe=!0}return{text:qe?se+se:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(m,D,M,x,_){var U=x.$mode.$quotes||t,se=x.doc.getTextRange(_);if(!_.isMultiLine()&&U.hasOwnProperty(se)){e(M);var X=x.doc.getLine(_.start.row),O=X.substring(_.start.column+1,_.start.column+2);if(O==se)return _.end.column++,_}}),f.closeDocComment!==!1&&this.add("doc comment end","insertion",function(m,D,M,x,_){if(m==="doc-start"&&(_===`
185
- `||_===`\r
186
- `)&&M.selection.isEmpty()){var U=M.getCursorPosition();if(U.column===0)return;for(var se=x.doc.getLine(U.row),X=x.doc.getLine(U.row+1),O=x.getTokens(U.row),_e=0,S=0;S<O.length;S++){_e+=O[S].value.length;var h=O[S];if(_e>=U.column){if(_e===U.column){if(!/\.doc/.test(h.type))return;if(/\*\//.test(h.value)){var b=O[S+1];if(!b||!/\.doc/.test(b.type))return}}var E=U.column-(_e-h.value.length),j=h.value.indexOf("*/"),we=h.value.indexOf("/**",j>-1?j+2:0);if(we!==-1&&E>we&&E<we+3||j!==-1&&we!==-1&&E>=j&&E<=we||!/\.doc/.test(h.type))return;break}}var Ee=this.$getIndent(se);if(/\s*\*/.test(X))return/^\s*\*/.test(se)?{text:_+Ee+"* ",selection:[1,2+Ee.length,1,2+Ee.length]}:{text:_+Ee+" * ",selection:[1,3+Ee.length,1,3+Ee.length]};if(/\/\*\*/.test(se.substring(0,U.column)))return{text:_+Ee+" * "+_+" "+Ee+"*/",selection:[1,4+Ee.length,1,4+Ee.length]}}})},c.isSaneInsertion=function(f,m){var D=f.getCursorPosition(),M=new k(m,D.row,D.column);if(!this.$matchTokenType(M.getCurrentToken()||"text",u)){if(/[)}\]]/.test(f.session.getLine(D.row)[D.column]))return!0;var x=new k(m,D.row,D.column+1);if(!this.$matchTokenType(x.getCurrentToken()||"text",u))return!1}return M.stepForward(),M.getCurrentTokenRow()!==D.row||this.$matchTokenType(M.getCurrentToken()||"text",r)},c.$matchTokenType=function(f,m){return m.indexOf(f.type||f)>-1},c.recordAutoInsert=function(f,m,D){var M=f.getCursorPosition(),x=m.doc.getLine(M.row);this.isAutoInsertedClosing(M,x,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=M.row,i.autoInsertedLineEnd=D+x.substr(M.column),i.autoInsertedBrackets++},c.recordMaybeInsert=function(f,m,D){var M=f.getCursorPosition(),x=m.doc.getLine(M.row);this.isMaybeInsertedClosing(M,x)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=M.row,i.maybeInsertedLineStart=x.substr(0,M.column)+D,i.maybeInsertedLineEnd=x.substr(M.column),i.maybeInsertedBrackets++},c.isAutoInsertedClosing=function(f,m,D){return i.autoInsertedBrackets>0&&f.row===i.autoInsertedRow&&D===i.autoInsertedLineEnd[0]&&m.substr(f.column)===i.autoInsertedLineEnd},c.isMaybeInsertedClosing=function(f,m){return i.maybeInsertedBrackets>0&&f.row===i.maybeInsertedRow&&m.substr(f.column)===i.maybeInsertedLineEnd&&m.substr(0,f.column)==i.maybeInsertedLineStart},c.popAutoInsertedClosing=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},c.clearMaybeInsertedClosing=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},L.inherits(c,A),g.CstyleBehaviour=c}),ace.define("ace/unicode",["require","exports","module"],function(d,g,J){for(var L=[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],A=0,k=[],a=0;a<L.length;a+=2)k.push(A+=L[a]),L[a+1]&&k.push(45,A+=L[a+1]);g.wordChars=String.fromCharCode.apply(null,k)}),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(d,g,J){var L=d("../config"),A=d("../tokenizer").Tokenizer,k=d("./text_highlight_rules").TextHighlightRules,a=d("./behaviour/cstyle").CstyleBehaviour,u=d("../unicode"),r=d("../lib/lang"),i=d("../token_iterator").TokenIterator,o=d("../range").Range,t;t=function(){this.HighlightRules=k},(function(){this.$defaultBehaviour=new a,this.tokenRe=new RegExp("^["+u.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+u.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new A(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,n,c,f){var m=n.doc,D=!0,M=!0,x=1/0,_=n.getTabSize(),U=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var O=this.lineCommentStart.map(r.escapeRegExp).join("|"),se=this.lineCommentStart[0];else var O=r.escapeRegExp(this.lineCommentStart),se=this.lineCommentStart;O=new RegExp("^(\\s*)(?:"+O+") ?"),U=n.getUseSoftTabs();var h=function(Ht,lt){var ut=Ht.match(O);if(ut){var Wt=ut[1].length,Dt=ut[0].length;!j(Ht,Wt,Dt)&&ut[0][Dt-1]==" "&&Dt--,m.removeInLine(lt,Wt,Dt)}},E=se+" ",S=function(Ht,lt){(!D||/\S/.test(Ht))&&(j(Ht,x,x)?m.insertInLine({row:lt,column:x},E):m.insertInLine({row:lt,column:x},se))},b=function(Ht,lt){return O.test(Ht)},j=function(Ht,lt,ut){for(var Wt=0;lt--&&Ht.charAt(lt)==" ";)Wt++;if(Wt%_!=0)return!1;for(var Wt=0;Ht.charAt(ut++)==" ";)Wt++;return _>2?Wt%_!=_-1:Wt%_==0}}else{if(!this.blockComment)return!1;var se=this.blockComment.start,X=this.blockComment.end,O=new RegExp("^(\\s*)(?:"+r.escapeRegExp(se)+")"),_e=new RegExp("(?:"+r.escapeRegExp(X)+")\\s*$"),S=function(qe,at){b(qe,at)||(!D||/\S/.test(qe))&&(m.insertInLine({row:at,column:qe.length},X),m.insertInLine({row:at,column:x},se))},h=function(qe,at){var ct;(ct=qe.match(_e))&&m.removeInLine(at,qe.length-ct[0].length,qe.length),(ct=qe.match(O))&&m.removeInLine(at,ct[1].length,ct[0].length)},b=function(qe,at){if(O.test(qe))return!0;for(var ct=n.getTokens(at),Ht=0;Ht<ct.length;Ht++)if(ct[Ht].type==="comment")return!0}}function we(qe){for(var at=c;at<=f;at++)qe(m.getLine(at),at)}var Ee=1/0;we(function(qe,at){var ct=qe.search(/\S/);ct!==-1?(ct<x&&(x=ct),M&&!b(qe,at)&&(M=!1)):Ee>qe.length&&(Ee=qe.length)}),x==1/0&&(x=Ee,D=!1,M=!1),U&&x%_!=0&&(x=Math.floor(x/_)*_),we(M?h:S)},this.toggleBlockComment=function(e,n,c,f){var m=this.blockComment;if(m){!m.start&&m[0]&&(m=m[0]);var D=new i(n,f.row,f.column),M=D.getCurrentToken();n.selection;var x=n.selection.toOrientedRange(),_,U;if(M&&/comment/.test(M.type)){for(var se,X;M&&/comment/.test(M.type);){var O=M.value.indexOf(m.start);if(O!=-1){var _e=D.getCurrentTokenRow(),S=D.getCurrentTokenColumn()+O;se=new o(_e,S,_e,S+m.start.length);break}M=D.stepBackward()}for(var D=new i(n,f.row,f.column),M=D.getCurrentToken();M&&/comment/.test(M.type);){var O=M.value.indexOf(m.end);if(O!=-1){var _e=D.getCurrentTokenRow(),S=D.getCurrentTokenColumn()+O;X=new o(_e,S,_e,S+m.end.length);break}M=D.stepForward()}X&&n.remove(X),se&&(n.remove(se),_=se.start.row,U=-m.start.length)}else U=m.start.length,_=c.start.row,n.insert(c.end,m.end),n.insert(c.start,m.start);x.start.row==_&&(x.start.column+=U),x.end.row==_&&(x.end.column+=U),n.selection.fromOrientedRange(x)}},this.getNextLineIndent=function(e,n,c){return this.$getIndent(n)},this.checkOutdent=function(e,n,c){return!1},this.autoOutdent=function(e,n,c){},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 c=e[n],f=c.prototype.$id,m=L.$modes[f];m||(L.$modes[f]=m=new c),L.$modes[n]||(L.$modes[n]=m),this.$embeds.push(n),this.$modes[n]=m}for(var D=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],M=function(_){(function(U){var se=D[_],X=U[se];U[D[_]]=function(){return this.$delegator(se,arguments,X)}})(x)},x=this,n=0;n<D.length;n++)M(n)},this.$delegator=function(e,n,c){var f=n[0]||"start";if(typeof f!="string"){if(Array.isArray(f[2])){var m=f[2][f[2].length-1],D=this.$modes[m];if(D)return D[e].apply(D,[f[1]].concat([].slice.call(n,1)))}f=f[0]||"start"}for(var M=0;M<this.$embeds.length;M++)if(this.$modes[this.$embeds[M]]){var x=f.split(this.$embeds[M]);if(!x[0]&&x[1]){n[0]=x[1];var D=this.$modes[this.$embeds[M]];return D[e].apply(D,n)}}var _=c.apply(this,n);return c?_:void 0},this.transformAction=function(e,n,c,f,m){if(this.$behaviour){var D=this.$behaviour.getBehaviours();for(var M in D)if(D[M][n]){var x=D[M][n].apply(this,arguments);if(x)return x}}},this.getKeywords=function(e){if(!this.completionKeywords){var n=this.$tokenizer.rules,c=[];for(var f in n)for(var m=n[f],D=0,M=m.length;D<M;D++)if(typeof m[D].token=="string")/keyword|support|storage/.test(m[D].token)&&c.push(m[D].regex);else if(typeof m[D].token=="object"){for(var x=0,_=m[D].token.length;x<_;x++)if(/keyword|support|storage/.test(m[D].token[x])){var f=m[D].regex.match(/\(.+?\)/g)[x];c.push(f.substr(1,f.length-2))}}this.completionKeywords=c}return e?c.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,n,c,f){var m=this.$keywordList||this.$createKeywordList();return m.map(function(D){return{name:D,value:D,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(t.prototype),g.Mode=t}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(d,g,J){var L=d("./lib/dom"),A=function(){function k(a){this.session=a,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return k.prototype.getRowLength=function(a){var u;return this.lineWidgets?u=this.lineWidgets[a]&&this.lineWidgets[a].rowCount||0:u=0,!this.$useWrapMode||!this.$wrapData[a]?1+u:this.$wrapData[a].length+1+u},k.prototype.$getWidgetScreenLength=function(){var a=0;return this.lineWidgets.forEach(function(u){u&&u.rowCount&&!u.hidden&&(a+=u.rowCount)}),a},k.prototype.$onChangeEditor=function(a){this.attach(a.editor)},k.prototype.attach=function(a){a&&a.widgetManager&&a.widgetManager!=this&&a.widgetManager.detach(),this.editor!=a&&(this.detach(),this.editor=a,a&&(a.widgetManager=this,a.renderer.on("beforeRender",this.measureWidgets),a.renderer.on("afterRender",this.renderWidgets)))},k.prototype.detach=function(a){var u=this.editor;if(u){this.editor=null,u.widgetManager=null,u.renderer.off("beforeRender",this.measureWidgets),u.renderer.off("afterRender",this.renderWidgets);var r=this.session.lineWidgets;r&&r.forEach(function(i){i&&i.el&&i.el.parentNode&&(i._inDocument=!1,i.el.parentNode.removeChild(i.el))})}},k.prototype.updateOnFold=function(a,u){var r=u.lineWidgets;if(!(!r||!a.action)){for(var i=a.data,o=i.start.row,t=i.end.row,e=a.action=="add",n=o+1;n<t;n++)r[n]&&(r[n].hidden=e);r[t]&&(e?r[o]?r[t].hidden=e:r[o]=r[t]:(r[o]==r[t]&&(r[o]=void 0),r[t].hidden=e))}},k.prototype.updateOnChange=function(a){var u=this.session.lineWidgets;if(u){var r=a.start.row,i=a.end.row-r;if(i!==0)if(a.action=="remove"){var o=u.splice(r+1,i);!u[r]&&o[o.length-1]&&(u[r]=o.pop()),o.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var t=new Array(i);u[r]&&u[r].column!=null&&a.start.column>u[r].column&&r++,t.unshift(r,0),u.splice.apply(u,t),this.$updateRows()}}},k.prototype.$updateRows=function(){var a=this.session.lineWidgets;if(a){var u=!0;a.forEach(function(r,i){if(r)for(u=!1,r.row=i;r.$oldWidget;)r.$oldWidget.row=i,r=r.$oldWidget}),u&&(this.session.lineWidgets=null)}},k.prototype.$registerLineWidget=function(a){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var u=this.session.lineWidgets[a.row];return u&&(a.$oldWidget=u,u.el&&u.el.parentNode&&(u.el.parentNode.removeChild(u.el),u._inDocument=!1)),this.session.lineWidgets[a.row]=a,a},k.prototype.addLineWidget=function(a){if(this.$registerLineWidget(a),a.session=this.session,!this.editor)return a;var u=this.editor.renderer;a.html&&!a.el&&(a.el=L.createElement("div"),a.el.innerHTML=a.html),a.text&&!a.el&&(a.el=L.createElement("div"),a.el.textContent=a.text),a.el&&(L.addCssClass(a.el,"ace_lineWidgetContainer"),a.className&&L.addCssClass(a.el,a.className),a.el.style.position="absolute",a.el.style.zIndex="5",u.container.appendChild(a.el),a._inDocument=!0,a.coverGutter||(a.el.style.zIndex="3"),a.pixelHeight==null&&(a.pixelHeight=a.el.offsetHeight)),a.rowCount==null&&(a.rowCount=a.pixelHeight/u.layerConfig.lineHeight);var r=this.session.getFoldAt(a.row,0);if(a.$fold=r,r){var i=this.session.lineWidgets;a.row==r.end.row&&!i[r.start.row]?i[r.start.row]=a:a.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows(),this.renderWidgets(null,u),this.onWidgetChanged(a),a},k.prototype.removeLineWidget=function(a){if(a._inDocument=!1,a.session=null,a.el&&a.el.parentNode&&a.el.parentNode.removeChild(a.el),a.editor&&a.editor.destroy)try{a.editor.destroy()}catch{}if(this.session.lineWidgets){var u=this.session.lineWidgets[a.row];if(u==a)this.session.lineWidgets[a.row]=a.$oldWidget,a.$oldWidget&&this.onWidgetChanged(a.$oldWidget);else for(;u;){if(u.$oldWidget==a){u.$oldWidget=a.$oldWidget;break}u=u.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows()},k.prototype.getWidgetsAtRow=function(a){for(var u=this.session.lineWidgets,r=u&&u[a],i=[];r;)i.push(r),r=r.$oldWidget;return i},k.prototype.onWidgetChanged=function(a){this.session._changedWidgets.push(a),this.editor&&this.editor.renderer.updateFull()},k.prototype.measureWidgets=function(a,u){var r=this.session._changedWidgets,i=u.layerConfig;if(!(!r||!r.length)){for(var o=1/0,t=0;t<r.length;t++){var e=r[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<o&&(o=e.row))}}o!=1/0&&(this.session._emit("changeFold",{data:{start:{row:o}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},k.prototype.renderWidgets=function(a,u){var r=u.layerConfig,i=this.session.lineWidgets;if(i){for(var o=Math.min(this.firstRow,r.firstRow),t=Math.max(this.lastRow,r.lastRow,i.length);o>0&&!i[o];)o--;this.firstRow=r.firstRow,this.lastRow=r.lastRow,u.$cursorLayer.config=r;for(var e=o;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 c=u.$cursorLayer.getPixelPosition({row:e,column:0},!0).top;n.coverLine||(c+=r.lineHeight*this.session.getRowLineCount(n.row)),n.el.style.top=c-r.offset+"px";var f=n.coverGutter?0:u.gutterWidth;n.fixedWidth||(f-=u.scrollLeft),n.el.style.left=f+"px",n.fullWidth&&n.screenWidth&&(n.el.style.minWidth=r.width+2*r.padding+"px"),n.fixedWidth?n.el.style.right=u.scrollBar.getWidth()+"px":n.el.style.right=""}}}},k}();g.LineWidgets=A}),ace.define("ace/apply_delta",["require","exports","module"],function(d,g,J){g.applyDelta=function(L,A,k){var a=A.start.row,u=A.start.column,r=L[a]||"";switch(A.action){case"insert":var i=A.lines;if(i.length===1)L[a]=r.substring(0,u)+A.lines[0]+r.substring(u);else{var o=[a,1].concat(A.lines);L.splice.apply(L,o),L[a]=r.substring(0,u)+L[a],L[a+A.lines.length-1]+=r.substring(u)}break;case"remove":var t=A.end.column,e=A.end.row;a===e?L[a]=r.substring(0,u)+r.substring(t):L.splice(a,e-a+1,r.substring(0,u)+L[e].substring(t));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(d,g,J){var L=d("./lib/oop"),A=d("./lib/event_emitter").EventEmitter,k=function(){function r(i,o,t){this.$onChange=this.onChange.bind(this),this.attach(i),typeof o!="number"?this.setPosition(o.row,o.column):this.setPosition(o,t)}return r.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},r.prototype.getDocument=function(){return this.document},r.prototype.onChange=function(i){if(!(i.start.row==i.end.row&&i.start.row!=this.row)&&!(i.start.row>this.row)){var o=u(i,{row:this.row,column:this.column},this.$insertRight);this.setPosition(o.row,o.column,!0)}},r.prototype.setPosition=function(i,o,t){var e;if(t?e={row:i,column:o}:e=this.$clipPositionToDocument(i,o),!(this.row==e.row&&this.column==e.column)){var n={row:this.row,column:this.column};this.row=e.row,this.column=e.column,this._signal("change",{old:n,value:e})}},r.prototype.detach=function(){this.document.off("change",this.$onChange)},r.prototype.attach=function(i){this.document=i||this.document,this.document.on("change",this.$onChange)},r.prototype.$clipPositionToDocument=function(i,o){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,o))),o<0&&(t.column=0),t},r}();k.prototype.$insertRight=!1,L.implement(k.prototype,A);function a(r,i,o){var t=o?r.column<=i.column:r.column<i.column;return r.row<i.row||r.row==i.row&&t}function u(r,i,o){var t=r.action=="insert",e=(t?1:-1)*(r.end.row-r.start.row),n=(t?1:-1)*(r.end.column-r.start.column),c=r.start,f=t?c:r.end;return a(i,c,o)?{row:i.row,column:i.column}:a(f,i,!o)?{row:i.row+e,column:i.column+(i.row==f.row?n:0)}:{row:c.row,column:c.column}}g.Anchor=k}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(d,g,J){var L=d("./lib/oop"),A=d("./apply_delta").applyDelta,k=d("./lib/event_emitter").EventEmitter,a=d("./range").Range,u=d("./anchor").Anchor,r=function(){function i(o){this.$lines=[""],o.length===0?this.$lines=[""]:Array.isArray(o)?this.insertMergedLines({row:0,column:0},o):this.insert({row:0,column:0},o)}return i.prototype.setValue=function(o){var t=this.getLength()-1;this.remove(new a(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},o||"")},i.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},i.prototype.createAnchor=function(o,t){return new u(this,o,t)},i.prototype.$detectNewLine=function(o){var t=o.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(o){this.$newLineMode!==o&&(this.$newLineMode=o,this._signal("changeNewLineMode"))},i.prototype.getNewLineMode=function(){return this.$newLineMode},i.prototype.isNewLine=function(o){return o==`\r
191
- `||o=="\r"||o==`
192
- `},i.prototype.getLine=function(o){return this.$lines[o]||""},i.prototype.getLines=function(o,t){return this.$lines.slice(o,t+1)},i.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},i.prototype.getLength=function(){return this.$lines.length},i.prototype.getTextRange=function(o){return this.getLinesForRange(o).join(this.getNewLineCharacter())},i.prototype.getLinesForRange=function(o){var t;if(o.start.row===o.end.row)t=[this.getLine(o.start.row).substring(o.start.column,o.end.column)];else{t=this.getLines(o.start.row,o.end.row),t[0]=(t[0]||"").substring(o.start.column);var e=t.length-1;o.end.row-o.start.row==e&&(t[e]=t[e].substring(0,o.end.column))}return t},i.prototype.insertLines=function(o,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(o,t)},i.prototype.removeLines=function(o,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(o,t)},i.prototype.insertNewLine=function(o){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(o,["",""])},i.prototype.insert=function(o,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(o,this.$split(t))},i.prototype.insertInLine=function(o,t){var e=this.clippedPos(o.row,o.column),n=this.pos(o.row,o.column+t.length);return this.applyDelta({start:e,end:n,action:"insert",lines:[t]},!0),this.clonePos(n)},i.prototype.clippedPos=function(o,t){var e=this.getLength();o===void 0?o=e:o<0?o=0:o>=e&&(o=e-1,t=void 0);var n=this.getLine(o);return t==null&&(t=n.length),t=Math.min(Math.max(t,0),n.length),{row:o,column:t}},i.prototype.clonePos=function(o){return{row:o.row,column:o.column}},i.prototype.pos=function(o,t){return{row:o,column:t}},i.prototype.$clipPosition=function(o){var t=this.getLength();return o.row>=t?(o.row=Math.max(0,t-1),o.column=this.getLine(t-1).length):(o.row=Math.max(0,o.row),o.column=Math.min(Math.max(o.column,0),this.getLine(o.row).length)),o},i.prototype.insertFullLines=function(o,t){o=Math.min(Math.max(o,0),this.getLength());var e=0;o<this.getLength()?(t=t.concat([""]),e=0):(t=[""].concat(t),o--,e=this.$lines[o].length),this.insertMergedLines({row:o,column:e},t)},i.prototype.insertMergedLines=function(o,t){var e=this.clippedPos(o.row,o.column),n={row:e.row+t.length-1,column:(t.length==1?e.column:0)+t[t.length-1].length};return this.applyDelta({start:e,end:n,action:"insert",lines:t}),this.clonePos(n)},i.prototype.remove=function(o){var t=this.clippedPos(o.start.row,o.start.column),e=this.clippedPos(o.end.row,o.end.column);return this.applyDelta({start:t,end:e,action:"remove",lines:this.getLinesForRange({start:t,end:e})}),this.clonePos(t)},i.prototype.removeInLine=function(o,t,e){var n=this.clippedPos(o,t),c=this.clippedPos(o,e);return this.applyDelta({start:n,end:c,action:"remove",lines:this.getLinesForRange({start:n,end:c})},!0),this.clonePos(n)},i.prototype.removeFullLines=function(o,t){o=Math.min(Math.max(0,o),this.getLength()-1),t=Math.min(Math.max(0,t),this.getLength()-1);var e=t==this.getLength()-1&&o>0,n=t<this.getLength()-1,c=e?o-1:o,f=e?this.getLine(c).length:0,m=n?t+1:t,D=n?0:this.getLine(m).length,M=new a(c,f,m,D),x=this.$lines.slice(o,t+1);return this.applyDelta({start:M.start,end:M.end,action:"remove",lines:this.getLinesForRange(M)}),x},i.prototype.removeNewLine=function(o){o<this.getLength()-1&&o>=0&&this.applyDelta({start:this.pos(o,this.getLine(o).length),end:this.pos(o+1,0),action:"remove",lines:["",""]})},i.prototype.replace=function(o,t){if(o instanceof a||(o=a.fromPoints(o.start,o.end)),t.length===0&&o.isEmpty())return o.start;if(t==this.getTextRange(o))return o.end;this.remove(o);var e;return t?e=this.insert(o.start,t):e=o.start,e},i.prototype.applyDeltas=function(o){for(var t=0;t<o.length;t++)this.applyDelta(o[t])},i.prototype.revertDeltas=function(o){for(var t=o.length-1;t>=0;t--)this.revertDelta(o[t])},i.prototype.applyDelta=function(o,t){var e=o.action=="insert";(e?o.lines.length<=1&&!o.lines[0]:!a.comparePoints(o.start,o.end))||(e&&o.lines.length>2e4?this.$splitAndapplyLargeDelta(o,2e4):(A(this.$lines,o,t),this._signal("change",o)))},i.prototype.$safeApplyDelta=function(o){var t=this.$lines.length;(o.action=="remove"&&o.start.row<t&&o.end.row<t||o.action=="insert"&&o.start.row<=t)&&this.applyDelta(o)},i.prototype.$splitAndapplyLargeDelta=function(o,t){for(var e=o.lines,n=e.length-t+1,c=o.start.row,f=o.start.column,m=0,D=0;m<n;m=D){D+=t-1;var M=e.slice(m,D);M.push(""),this.applyDelta({start:this.pos(c+m,f),end:this.pos(c+D,f=0),action:o.action,lines:M},!0)}o.lines=e.slice(m),o.start.row=c+m,o.start.column=f,this.applyDelta(o,!0)},i.prototype.revertDelta=function(o){this.$safeApplyDelta({start:this.clonePos(o.start),end:this.clonePos(o.end),action:o.action=="insert"?"remove":"insert",lines:o.lines.slice()})},i.prototype.indexToPosition=function(o,t){for(var e=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,c=t||0,f=e.length;c<f;c++)if(o-=e[c].length+n,o<0)return{row:c,column:o+e[c].length+n};return{row:f-1,column:o+e[f-1].length+n}},i.prototype.positionToIndex=function(o,t){for(var e=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,c=0,f=Math.min(o.row,e.length),m=t||0;m<f;++m)c+=e[m].length+n;return c+o.column},i.prototype.$split=function(o){return o.split(/\r\n|\r|\n/)},i}();r.prototype.$autoNewLine="",r.prototype.$newLineMode="auto",L.implement(r.prototype,k),g.Document=r}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(d,g,J){var L=d("./lib/oop"),A=d("./lib/event_emitter").EventEmitter,k=function(){function a(u,r){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=u;var i=this;this.$worker=function(){if(i.running){for(var o=new Date,t=i.currentLine,e=-1,n=i.doc,c=t;i.lines[t];)t++;var f=n.getLength(),m=0;for(i.running=!1;t<f;){i.$tokenizeRow(t),e=t;do t++;while(i.lines[t]);if(m++,m%5===0&&new Date-o>20){i.running=setTimeout(i.$worker,20);break}}i.currentLine=t,e==-1&&(e=t),c<=e&&i.fireUpdateEvent(c,e)}}}return a.prototype.setTokenizer=function(u){this.tokenizer=u,this.lines=[],this.states=[],this.start(0)},a.prototype.setDocument=function(u){this.doc=u,this.lines=[],this.states=[],this.stop()},a.prototype.fireUpdateEvent=function(u,r){var i={first:u,last:r};this._signal("update",{data:i})},a.prototype.start=function(u){this.currentLine=Math.min(u||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},a.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},a.prototype.$updateOnChange=function(u){var r=u.start.row,i=u.end.row-r;if(i===0)this.lines[r]=null;else if(u.action=="remove")this.lines.splice(r,i+1,null),this.states.splice(r,i+1,null);else{var o=Array(i+1);o.unshift(r,1),this.lines.splice.apply(this.lines,o),this.states.splice.apply(this.states,o)}this.currentLine=Math.min(r,this.currentLine,this.doc.getLength()),this.stop()},a.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},a.prototype.getTokens=function(u){return this.lines[u]||this.$tokenizeRow(u)},a.prototype.getState=function(u){return this.currentLine==u&&this.$tokenizeRow(u),this.states[u]||"start"},a.prototype.$tokenizeRow=function(u){var r=this.doc.getLine(u),i=this.states[u-1],o=this.tokenizer.getLineTokens(r,i,u);return this.states[u]+""!=o.state+""?(this.states[u]=o.state,this.lines[u+1]=null,this.currentLine>u+1&&(this.currentLine=u+1)):this.currentLine==u&&(this.currentLine=u+1),this.lines[u]=o.tokens},a.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},a}();L.implement(k.prototype,A),g.BackgroundTokenizer=k}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(d,g,J){var L=d("./lib/lang"),A=d("./range").Range,k=function(){function a(u,r,i){i===void 0&&(i="text"),this.setRegexp(u),this.clazz=r,this.type=i}return a.prototype.setRegexp=function(u){this.regExp+""!=u+""&&(this.regExp=u,this.cache=[])},a.prototype.update=function(u,r,i,o){if(this.regExp)for(var t=o.firstRow,e=o.lastRow,n={},c=t;c<=e;c++){var f=this.cache[c];f==null&&(f=L.getMatchOffsets(i.getLine(c),this.regExp),f.length>this.MAX_RANGES&&(f=f.slice(0,this.MAX_RANGES)),f=f.map(function(x){return new A(c,x.offset,c,x.offset+x.length)}),this.cache[c]=f.length?f:"");for(var m=f.length;m--;){var D=f[m].toScreenRange(i),M=D.toString();n[M]||(n[M]=!0,r.drawSingleLineMarker(u,D,this.clazz,o))}}},a}();k.prototype.MAX_RANGES=500,g.SearchHighlight=k}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(d,g,J){var L=function(){function x(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return x.prototype.addSession=function(_){this.$session=_},x.prototype.add=function(_,U,se){if(!this.$fromUndo&&_!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),U===!1||!this.lastDeltas){this.lastDeltas=[];var X=this.$undoStack.length;X>this.$undoDepth-1&&this.$undoStack.splice(0,X-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),_.id=this.$rev=++this.$maxRev}(_.action=="remove"||_.action=="insert")&&(this.$lastDelta=_),this.lastDeltas.push(_)}},x.prototype.addSelection=function(_,U){this.selections.push({value:_,rev:U||this.$rev})},x.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},x.prototype.markIgnored=function(_,U){U==null&&(U=this.$rev+1);for(var se=this.$undoStack,X=se.length;X--;){var O=se[X][0];if(O.id<=_)break;O.id<U&&(O.ignore=!0)}this.lastDeltas=null},x.prototype.getSelection=function(_,U){for(var se=this.selections,X=se.length;X--;){var O=se[X];if(O.rev<_)return U&&(O=se[X+1]),O}},x.prototype.getRevision=function(){return this.$rev},x.prototype.getDeltas=function(_,U){U==null&&(U=this.$rev+1);for(var se=this.$undoStack,X=null,O=0,_e=se.length;_e--;){var S=se[_e][0];if(S.id<U&&!X&&(X=_e+1),S.id<=_){O=_e+1;break}}return se.slice(O,X)},x.prototype.getChangedRanges=function(_,U){U==null&&(U=this.$rev+1)},x.prototype.getChangedLines=function(_,U){U==null&&(U=this.$rev+1)},x.prototype.undo=function(_,U){this.lastDeltas=null;var se=this.$undoStack;if(A(se,se.length)){_||(_=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var X=se.pop(),O=null;return X&&(O=_.undoChanges(X,U),this.$redoStack.push(X),this.$syncRev()),this.$fromUndo=!1,O}},x.prototype.redo=function(_,U){if(this.lastDeltas=null,_||(_=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var se=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);M(this.$redoStack,se),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(_e){_e[0].id=++this.$maxRev},this)}var X=this.$redoStack.pop(),O=null;return X&&(O=_.redoChanges(X,U),this.$undoStack.push(X),this.$syncRev()),this.$fromUndo=!1,O},x.prototype.$syncRev=function(){var _=this.$undoStack,U=_[_.length-1],se=U&&U[0].id||0;this.$redoStackBaseRev=se,this.$rev=se},x.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=[]},x.prototype.canUndo=function(){return this.$undoStack.length>0},x.prototype.canRedo=function(){return this.$redoStack.length>0},x.prototype.bookmark=function(_){_==null&&(_=this.$rev),this.mark=_},x.prototype.isAtBookmark=function(){return this.$rev===this.mark},x.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},x.prototype.fromJSON=function(_){this.reset(),this.$undoStack=_.$undoStack,this.$redoStack=_.$redoStack},x.prototype.$prettyPrint=function(_){return _?i(_):i(this.$undoStack)+`
193
- ---
194
- `+i(this.$redoStack)},x}();L.prototype.hasUndo=L.prototype.canUndo,L.prototype.hasRedo=L.prototype.canRedo,L.prototype.isClean=L.prototype.isAtBookmark,L.prototype.markClean=L.prototype.bookmark;function A(x,_){for(var U=_;U--;){var se=x[U];if(se&&!se[0].ignore){for(;U<_-1;){var X=e(x[U],x[U+1]);x[U]=X[0],x[U+1]=X[1],U++}return!0}}}var k=d("./range").Range,a=k.comparePoints;k.comparePoints;function u(x){return{row:x.row,column:x.column}}function r(x){return{start:u(x.start),end:u(x.end),action:x.action,lines:x.lines.slice()}}function i(x){if(x=x||this,Array.isArray(x))return x.map(i).join(`
195
- `);var _="";return x.action?(_=x.action=="insert"?"+":"-",_+="["+x.lines+"]"):x.value&&(Array.isArray(x.value)?_=x.value.map(o).join(`
196
- `):_=o(x.value)),x.start&&(_+=o(x)),(x.id||x.rev)&&(_+=" ("+(x.id||x.rev)+")"),_}function o(x){return x.start.row+":"+x.start.column+"=>"+x.end.row+":"+x.end.column}function t(x,_){var U=x.action=="insert",se=_.action=="insert";if(U&&se)if(a(_.start,x.end)>=0)c(_,x,-1);else if(a(_.start,x.start)<=0)c(x,_,1);else return null;else if(U&&!se)if(a(_.start,x.end)>=0)c(_,x,-1);else if(a(_.end,x.start)<=0)c(x,_,-1);else return null;else if(!U&&se)if(a(_.start,x.start)>=0)c(_,x,1);else if(a(_.start,x.start)<=0)c(x,_,1);else return null;else if(!U&&!se)if(a(_.start,x.start)>=0)c(_,x,1);else if(a(_.end,x.start)<=0)c(x,_,-1);else return null;return[_,x]}function e(x,_){for(var U=x.length;U--;)for(var se=0;se<_.length;se++)if(!t(x[U],_[se])){for(;U<x.length;){for(;se--;)t(_[se],x[U]);se=_.length,U++}return[x,_]}return x.selectionBefore=_.selectionBefore=x.selectionAfter=_.selectionAfter=null,[_,x]}function n(x,_){var U=x.action=="insert",se=_.action=="insert";if(U&&se)a(x.start,_.start)<0?c(_,x,1):c(x,_,1);else if(U&&!se)a(x.start,_.end)>=0?c(x,_,-1):(a(x.start,_.start)<=0||c(x,k.fromPoints(_.start,x.start),-1),c(_,x,1));else if(!U&&se)a(_.start,x.end)>=0?c(_,x,-1):(a(_.start,x.start)<=0||c(_,k.fromPoints(x.start,_.start),-1),c(x,_,1));else if(!U&&!se)if(a(_.start,x.end)>=0)c(_,x,-1);else if(a(_.end,x.start)<=0)c(x,_,-1);else{var X,O;return a(x.start,_.start)<0&&(X=x,x=m(x,_.start)),a(x.end,_.end)>0&&(O=m(x,_.end)),f(_.end,x.start,x.end,-1),O&&!X&&(x.lines=O.lines,x.start=O.start,x.end=O.end,O=x),[_,X,O].filter(Boolean)}return[_,x]}function c(x,_,U){f(x.start,_.start,_.end,U),f(x.end,_.start,_.end,U)}function f(x,_,U,se){x.row==(se==1?_:U).row&&(x.column+=se*(U.column-_.column)),x.row+=se*(U.row-_.row)}function m(x,_){var U=x.lines,se=x.end;x.end=u(_);var X=x.end.row-x.start.row,O=U.splice(X,U.length),_e=X?_.column:_.column-x.start.column;U.push(O[0].substring(0,_e)),O[0]=O[0].substr(_e);var S={start:u(_),end:se,lines:O,action:x.action};return S}function D(x,_){_=r(_);for(var U=x.length;U--;){for(var se=x[U],X=0;X<se.length;X++){var O=se[X],_e=n(O,_);_=_e[0],_e.length!=2&&(_e[2]?(se.splice(X+1,1,_e[1],_e[2]),X++):_e[1]||(se.splice(X,1),X--))}se.length||x.splice(U,1)}return x}function M(x,_){for(var U=0;U<_.length;U++)for(var se=_[U],X=0;X<se.length;X++)D(x,se[X])}g.UndoManager=L}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(d,g,J){var L=d("../range").Range,A=function(){function k(a,u){this.foldData=a,Array.isArray(u)?this.folds=u:u=this.folds=[u];var r=u[u.length-1];this.range=new L(u[0].start.row,u[0].start.column,r.end.row,r.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(i){i.setFoldLine(this)},this)}return k.prototype.shiftRow=function(a){this.start.row+=a,this.end.row+=a,this.folds.forEach(function(u){u.start.row+=a,u.end.row+=a})},k.prototype.addFold=function(a){if(a.sameRow){if(a.start.row<this.startRow||a.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(a),this.folds.sort(function(u,r){return-u.range.compareEnd(r.start.row,r.start.column)}),this.range.compareEnd(a.start.row,a.start.column)>0?(this.end.row=a.end.row,this.end.column=a.end.column):this.range.compareStart(a.end.row,a.end.column)<0&&(this.start.row=a.start.row,this.start.column=a.start.column)}else if(a.start.row==this.end.row)this.folds.push(a),this.end.row=a.end.row,this.end.column=a.end.column;else if(a.end.row==this.start.row)this.folds.unshift(a),this.start.row=a.start.row,this.start.column=a.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");a.foldLine=this},k.prototype.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},k.prototype.walk=function(a,u,r){var i=0,o=this.folds,t,e,n,c=!0;u==null&&(u=this.end.row,r=this.end.column);for(var f=0;f<o.length;f++){if(t=o[f],e=t.range.compareStart(u,r),e==-1){a(null,u,r,i,c);return}if(n=a(null,t.start.row,t.start.column,i,c),n=!n&&a(t.placeholder,t.start.row,t.start.column,i),n||e===0)return;c=!t.sameRow,i=t.end.column}a(null,u,r,i,c)},k.prototype.getNextFoldTo=function(a,u){for(var r,i,o=0;o<this.folds.length;o++){if(r=this.folds[o],i=r.range.compareEnd(a,u),i==-1)return{fold:r,kind:"after"};if(i===0)return{fold:r,kind:"inside"}}return null},k.prototype.addRemoveChars=function(a,u,r){var i=this.getNextFoldTo(a,u),o,t;if(i){if(o=i.fold,i.kind=="inside"&&o.start.column!=u&&o.start.row!=a)window.console&&window.console.log(a,u,o);else if(o.start.row==a){t=this.folds;var e=t.indexOf(o);for(e===0&&(this.start.column+=r),e;e<t.length;e++){if(o=t[e],o.start.column+=r,!o.sameRow)return;o.end.column+=r}this.end.column+=r}}},k.prototype.split=function(a,u){var r=this.getNextFoldTo(a,u);if(!r||r.kind=="inside")return null;var i=r.fold,o=this.folds,t=this.foldData,e=o.indexOf(i),n=o[e-1];this.end.row=n.end.row,this.end.column=n.end.column,o=o.splice(e,o.length-e);var c=new k(t,o);return t.splice(t.indexOf(this)+1,0,c),c},k.prototype.merge=function(a){for(var u=a.folds,r=0;r<u.length;r++)this.addFold(u[r]);var i=this.foldData;i.splice(i.indexOf(a),1)},k.prototype.toString=function(){var a=[this.range.toString()+": ["];return this.folds.forEach(function(u){a.push(" "+u.toString())}),a.push("]"),a.join(`
197
- `)},k.prototype.idxToPosition=function(a){for(var u=0,r=0;r<this.folds.length;r++){var i=this.folds[r];if(a-=i.start.column-u,a<0)return{row:i.start.row,column:i.start.column+a};if(a-=i.placeholder.length,a<0)return i.start;u=i.end.column}return{row:this.end.row,column:this.end.column+a}},k}();g.FoldLine=A}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(d,g,J){var L=d("./range").Range,A=L.comparePoints,k=function(){function a(){this.ranges=[],this.$bias=1}return a.prototype.pointIndex=function(u,r,i){for(var o=this.ranges,t=i||0;t<o.length;t++){var e=o[t],n=A(u,e.end);if(!(n>0)){var c=A(u,e.start);return n===0?r&&c!==0?-t-2:t:c>0||c===0&&!r?t:-t-1}}return-t-1},a.prototype.add=function(u){var r=!u.isEmpty(),i=this.pointIndex(u.start,r);i<0&&(i=-i-1);var o=this.pointIndex(u.end,r,i);return o<0?o=-o-1:o++,this.ranges.splice(i,o-i,u)},a.prototype.addList=function(u){for(var r=[],i=u.length;i--;)r.push.apply(r,this.add(u[i]));return r},a.prototype.substractPoint=function(u){var r=this.pointIndex(u);if(r>=0)return this.ranges.splice(r,1)},a.prototype.merge=function(){var u=[],r=this.ranges;r=r.sort(function(n,c){return A(n.start,c.start)});for(var i=r[0],o,t=1;t<r.length;t++){o=i,i=r[t];var e=A(o.end,i.start);e<0||e==0&&!o.isEmpty()&&!i.isEmpty()||(A(o.end,i.end)<0&&(o.end.row=i.end.row,o.end.column=i.end.column),r.splice(t,1),u.push(i),i=o,t--)}return this.ranges=r,u},a.prototype.contains=function(u,r){return this.pointIndex({row:u,column:r})>=0},a.prototype.containsPoint=function(u){return this.pointIndex(u)>=0},a.prototype.rangeAtPoint=function(u){var r=this.pointIndex(u);if(r>=0)return this.ranges[r]},a.prototype.clipRows=function(u,r){var i=this.ranges;if(i[0].start.row>r||i[i.length-1].start.row<u)return[];var o=this.pointIndex({row:u,column:0});o<0&&(o=-o-1);var t=this.pointIndex({row:r,column:0},o);t<0&&(t=-t-1);for(var e=[],n=o;n<t;n++)e.push(i[n]);return e},a.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},a.prototype.attach=function(u){this.session&&this.detach(),this.session=u,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},a.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},a.prototype.$onChange=function(u){for(var r=u.start,i=u.end,o=r.row,t=i.row,e=this.ranges,n=0,c=e.length;n<c;n++){var f=e[n];if(f.end.row>=o)break}if(u.action=="insert")for(var m=t-o,D=-r.column+i.column;n<c;n++){var f=e[n];if(f.start.row>o)break;if(f.start.row==o&&f.start.column>=r.column&&(f.start.column==r.column&&this.$bias<=0||(f.start.column+=D,f.start.row+=m)),f.end.row==o&&f.end.column>=r.column){if(f.end.column==r.column&&this.$bias<0)continue;f.end.column==r.column&&D>0&&n<c-1&&f.end.column>f.start.column&&f.end.column==e[n+1].start.column&&(f.end.column-=D),f.end.column+=D,f.end.row+=m}}else for(var m=o-t,D=r.column-i.column;n<c;n++){var f=e[n];if(f.start.row>t)break;f.end.row<t&&(o<f.end.row||o==f.end.row&&r.column<f.end.column)?(f.end.row=o,f.end.column=r.column):f.end.row==t?f.end.column<=i.column?(m||f.end.column>r.column)&&(f.end.column=r.column,f.end.row=r.row):(f.end.column+=D,f.end.row+=m):f.end.row>t&&(f.end.row+=m),f.start.row<t&&(o<f.start.row||o==f.start.row&&r.column<f.start.column)?(f.start.row=o,f.start.column=r.column):f.start.row==t?f.start.column<=i.column?(m||f.start.column>r.column)&&(f.start.column=r.column,f.start.row=r.row):(f.start.column+=D,f.start.row+=m):f.start.row>t&&(f.start.row+=m)}if(m!=0&&n<c)for(;n<c;n++){var f=e[n];f.start.row+=m,f.end.row+=m}},a}();k.prototype.comparePoints=A,g.RangeList=k}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(d,g,J){var L=this&&this.__extends||function(){var o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,c){n.__proto__=c}||function(n,c){for(var f in c)Object.prototype.hasOwnProperty.call(c,f)&&(n[f]=c[f])},o(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");o(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),A=d("../range_list").RangeList,k=function(o){L(t,o);function t(e,n){var c=o.call(this)||this;return c.foldLine=null,c.placeholder=n,c.range=e,c.start=e.start,c.end=e.end,c.sameRow=e.start.row==e.end.row,c.subFolds=c.ranges=[],c}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(c){n.subFolds.push(c.clone())}),n.collapseChildren=this.collapseChildren,n},t.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){u(e,this.start);for(var D=e.start.row,M=e.start.column,n=0,c=-1;n<this.subFolds.length&&(c=this.subFolds[n].range.compare(D,M),c==1);n++);var f=this.subFolds[n],m=0;if(c==0){if(f.range.containsRange(e))return f.addSubFold(e);m=1}for(var D=e.range.end.row,M=e.range.end.column,x=n,c=-1;x<this.subFolds.length&&(c=this.subFolds[x].range.compare(D,M),c==1);x++);c==0&&x++;for(var _=this.subFolds.splice(n,x-n,e),U=c==0?_.length-1:_.length,se=m;se<U;se++)e.addSubFold(_[se]);return e.setFoldLine(this.foldLine),e}},t.prototype.restoreRange=function(e){return i(e,this.start)},t}(A);function a(o,t){o.row-=t.row,o.row==0&&(o.column-=t.column)}function u(o,t){a(o.start,t),a(o.end,t)}function r(o,t){o.row==0&&(o.column+=t.column),o.row+=t.row}function i(o,t){r(o.start,t),r(o.end,t)}g.Fold=k}),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(d,g,J){var L=d("../range").Range,A=d("./fold_line").FoldLine,k=d("./fold").Fold,a=d("../token_iterator").TokenIterator,u=d("../mouse/mouse_event").MouseEvent;function r(){this.getFoldAt=function(i,o,t){var e=this.getFoldLine(i);if(!e)return null;for(var n=e.folds,c=0;c<n.length;c++){var f=n[c].range;if(f.contains(i,o)){if(t==1&&f.isEnd(i,o)&&!f.isEmpty())continue;if(t==-1&&f.isStart(i,o)&&!f.isEmpty())continue;return n[c]}}},this.getFoldsInRange=function(i){var o=i.start,t=i.end,e=this.$foldData,n=[];o.column+=1,t.column-=1;for(var c=0;c<e.length;c++){var f=e[c].range.compareRange(i);if(f!=2){if(f==-2)break;for(var m=e[c].folds,D=0;D<m.length;D++){var M=m[D];if(f=M.range.compareRange(i),f==-2)break;if(f==2)continue;if(f==42)break;n.push(M)}}}return o.column-=1,t.column+=1,n},this.getFoldsInRangeList=function(i){if(Array.isArray(i)){var o=[];i.forEach(function(t){o=o.concat(this.getFoldsInRange(t))},this)}else var o=this.getFoldsInRange(i);return o},this.getAllFolds=function(){for(var i=[],o=this.$foldData,t=0;t<o.length;t++)for(var e=0;e<o[t].folds.length;e++)i.push(o[t].folds[e]);return i},this.getFoldStringAt=function(i,o,t,e){if(e=e||this.getFoldLine(i),!e)return null;for(var n={end:{column:0}},c,f,m=0;m<e.folds.length;m++){f=e.folds[m];var D=f.range.compareEnd(i,o);if(D==-1){c=this.getLine(f.start.row).substring(n.end.column,f.start.column);break}else if(D===0)return null;n=f}return c||(c=this.getLine(f.start.row).substring(n.end.column)),t==-1?c.substring(0,o-n.end.column):t==1?c.substring(o-n.end.column):c},this.getFoldLine=function(i,o){var t=this.$foldData,e=0;for(o&&(e=t.indexOf(o)),e==-1&&(e=0),e;e<t.length;e++){var n=t[e];if(n.start.row<=i&&n.end.row>=i)return n;if(n.end.row>i)return null}return null},this.getNextFoldLine=function(i,o){var t=this.$foldData,e=0;for(o&&(e=t.indexOf(o)),e==-1&&(e=0),e;e<t.length;e++){var n=t[e];if(n.end.row>=i)return n}return null},this.getFoldedRowCount=function(i,o){for(var t=this.$foldData,e=o-i+1,n=0;n<t.length;n++){var c=t[n],f=c.end.row,m=c.start.row;if(f>=o){m<o&&(m>=i?e-=o-m:e=0);break}else f>=i&&(m>=i?e-=f-m:e-=f-i+1)}return e},this.$addFoldLine=function(i){return this.$foldData.push(i),this.$foldData.sort(function(o,t){return o.start.row-t.start.row}),i},this.addFold=function(i,o){var t=this.$foldData,e=!1,n;i instanceof k?n=i:(n=new k(o,i),n.collapseChildren=o.collapseChildren),this.$clipRangeToDocument(n.range);var c=n.start.row,f=n.start.column,m=n.end.row,D=n.end.column,M=this.getFoldAt(c,f,1),x=this.getFoldAt(m,D,-1);if(M&&x==M)return M.addSubFold(n);M&&!M.range.isStart(c,f)&&this.removeFold(M),x&&!x.range.isEnd(m,D)&&this.removeFold(x);var _=this.getFoldsInRange(n.range);_.length>0&&(this.removeFolds(_),n.collapseChildren||_.forEach(function(O){n.addSubFold(O)}));for(var U=0;U<t.length;U++){var se=t[U];if(m==se.start.row){se.addFold(n),e=!0;break}else if(c==se.end.row){if(se.addFold(n),e=!0,!n.sameRow){var X=t[U+1];if(X&&X.start.row==m){se.merge(X);break}}break}else if(m<=se.start.row)break}return e||(se=this.$addFoldLine(new A(this.$foldData,n))),this.$useWrapMode?this.$updateWrapData(se.start.row,se.start.row):this.$updateRowLengthCache(se.start.row,se.start.row),this.$modified=!0,this._signal("changeFold",{data:n,action:"add"}),n},this.addFolds=function(i){i.forEach(function(o){this.addFold(o)},this)},this.removeFold=function(i){var o=i.foldLine,t=o.start.row,e=o.end.row,n=this.$foldData,c=o.folds;if(c.length==1)n.splice(n.indexOf(o),1);else if(o.range.isEnd(i.end.row,i.end.column))c.pop(),o.end.row=c[c.length-1].end.row,o.end.column=c[c.length-1].end.column;else if(o.range.isStart(i.start.row,i.start.column))c.shift(),o.start.row=c[0].start.row,o.start.column=c[0].start.column;else if(i.sameRow)c.splice(c.indexOf(i),1);else{var f=o.split(i.start.row,i.start.column);c=f.folds,c.shift(),f.start.row=c[0].start.row,f.start.column=c[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 o=[],t=0;t<i.length;t++)o.push(i[t]);o.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(i){this.removeFold(i),i.subFolds.forEach(function(o){i.restoreRange(o),this.addFold(o)},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(o){this.expandFold(o)},this)},this.unfold=function(i,o){var t,e;if(i==null)t=new L(0,0,this.getLength(),0),o==null&&(o=!0);else if(typeof i=="number")t=new L(i,0,i,this.getLine(i).length);else if("row"in i)t=L.fromPoints(i,i);else{if(Array.isArray(i))return e=[],i.forEach(function(c){e=e.concat(this.unfold(c))},this),e;t=i}e=this.getFoldsInRangeList(t);for(var n=e;e.length==1&&L.comparePoints(e[0].start,t.start)<0&&L.comparePoints(e[0].end,t.end)>0;)this.expandFolds(e),e=this.getFoldsInRangeList(t);if(o!=!1?this.removeFolds(e):this.expandFolds(e),n.length)return n},this.isRowFolded=function(i,o){return!!this.getFoldLine(i,o)},this.getRowFoldEnd=function(i,o){var t=this.getFoldLine(i,o);return t?t.end.row:i},this.getRowFoldStart=function(i,o){var t=this.getFoldLine(i,o);return t?t.start.row:i},this.getFoldDisplayLine=function(i,o,t,e,n){e==null&&(e=i.start.row),n==null&&(n=0),o==null&&(o=i.end.row),t==null&&(t=this.getLine(o).length);var c=this.doc,f="";return i.walk(function(m,D,M,x){if(!(D<e)){if(D==e){if(M<n)return;x=Math.max(n,x)}m!=null?f+=m:f+=c.getLine(D).substring(x,M)}},o,t),f},this.getDisplayLine=function(i,o,t,e){var n=this.getFoldLine(i);if(n)return this.getFoldDisplayLine(n,i,o,t,e);var c;return c=this.doc.getLine(i),c.substring(e||0,o||c.length)},this.$cloneFoldData=function(){var i=[];return i=this.$foldData.map(function(o){var t=o.folds.map(function(e){return e.clone()});return new A(i,t)}),i},this.toggleFold=function(i){var o=this.selection,t=o.getRange(),e,n;if(t.isEmpty()){var c=t.start;if(e=this.getFoldAt(c.row,c.column),e){this.expandFold(e);return}else(n=this.findMatchingBracket(c))?t.comparePoint(n)==1?t.end=n:(t.start=n,t.start.column++,t.end.column--):(n=this.findMatchingBracket({row:c.row,column:c.column+1}))?(t.comparePoint(n)==1?t.end=n:t.start=n,t.start.column++):t=this.getCommentFoldRange(c.row,c.column)||t}else{var f=this.getFoldsInRange(t);if(i&&f.length){this.expandFolds(f);return}else f.length==1&&(e=f[0])}if(e||(e=this.getFoldAt(t.start.row,t.start.column)),e&&e.range.toString()==t.toString()){this.expandFold(e);return}var m="...";if(!t.isMultiLine()){if(m=this.getTextRange(t),m.length<4)return;m=m.trim().substring(0,2)+".."}this.addFold(m,t)},this.getCommentFoldRange=function(i,o,t){var e=new a(this,i,o),n=e.getCurrentToken(),c=n&&n.type;if(n&&/^comment|string/.test(c)){c=c.match(/comment|string/)[0],c=="comment"&&(c+="|doc-start|\\.doc");var f=new RegExp(c),m=new L;if(t!=1){do n=e.stepBackward();while(n&&f.test(n.type));n=e.stepForward()}m.start.row=e.getCurrentTokenRow(),m.start.column=e.getCurrentTokenColumn()+n.value.length,e=new a(this,i,o);var D=this.getState(e.$row);if(t!=-1){var M=-1;do if(n=e.stepForward(),M==-1){var x=this.getState(e.$row);D.toString()!==x.toString()&&(M=e.$row)}else if(e.$row>M)break;while(n&&f.test(n.type));n=e.stepBackward()}else n=e.getCurrentToken();return m.end.row=e.getCurrentTokenRow(),m.end.column=e.getCurrentTokenColumn(),m}},this.foldAll=function(i,o,t,e){t==null&&(t=1e5);var n=this.foldWidgets;if(n){o=o||this.getLength(),i=i||0;for(var c=i;c<o;c++)if(n[c]==null&&(n[c]=this.getFoldWidget(c)),n[c]=="start"&&!(e&&!e(c))){var f=this.getFoldWidgetRange(c);f&&f.isMultiLine()&&f.end.row<=o&&f.start.row>=i&&(c=f.end.row,f.collapseChildren=t,this.addFold("...",f))}}},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(o){for(var t=i.getTokens(o),e=0;e<t.length;e++){var n=t[e];if(!(n.type=="text"&&/^\s+$/.test(n.value)))return!!/comment/.test(n.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(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 o=this.$foldMode;this.$setFolding(null),this.$setFolding(o)}},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,o){var t=this.foldWidgets;if(!t||o&&t[i])return{};for(var e=i-1,n;e>=0;){var c=t[e];if(c==null&&(c=t[e]=this.getFoldWidget(e)),c=="start"){var f=this.getFoldWidgetRange(e);if(n||(n=f),f&&f.end.row>=i)break}e--}return{range:e!==-1&&f,firstRange:n}},this.onFoldWidgetClick=function(i,o){o instanceof u&&(o=o.domEvent);var t={children:o.shiftKey,all:o.ctrlKey||o.metaKey,siblings:o.altKey},e=this.$toggleFoldWidget(i,t);if(!e){var n=o.target||o.srcElement;n&&/ace_fold-widget/.test(n.className)&&(n.className+=" ace_invalid")}},this.$toggleFoldWidget=function(i,o){if(this.getFoldWidget){var t=this.getFoldWidget(i),e=this.getLine(i),n=t==="end"?-1:1,c=this.getFoldAt(i,n===-1?0:e.length,n);if(c)return o.children||o.all?this.removeFold(c):this.expandFold(c),c;var f=this.getFoldWidgetRange(i,!0);if(f&&!f.isMultiLine()&&(c=this.getFoldAt(f.start.row,f.start.column,1),c&&f.isEqual(c.range)))return this.removeFold(c),c;if(o.siblings){var m=this.getParentFoldRangeData(i);if(m.range)var D=m.range.start.row+1,M=m.range.end.row;this.foldAll(D,M,o.all?1e4:0)}else o.children?(M=f?f.end.row:this.getLength(),this.foldAll(i+1,M,o.all?1e4:0)):f&&(o.all&&(f.collapseChildren=1e4),this.addFold("...",f));return f}},this.toggleFoldWidget=function(i){var o=this.selection.getCursor().row;o=this.getRowFoldStart(o);var t=this.$toggleFoldWidget(o,{});if(!t){var e=this.getParentFoldRangeData(o,!0);if(t=e.range||e.firstRange,t){o=t.start.row;var n=this.getFoldAt(o,this.getLine(o).length,1);n?this.removeFold(n):this.addFold("...",t)}}},this.updateFoldWidgets=function(i){var o=i.start.row,t=i.end.row-o;if(t===0)this.foldWidgets[o]=null;else if(i.action=="remove")this.foldWidgets.splice(o,t+1,null);else{var e=Array(t+1);e.unshift(o,1),this.foldWidgets.splice.apply(this.foldWidgets,e)}},this.tokenizerUpdateFoldWidgets=function(i){var o=i.data;o.first!=o.last&&this.foldWidgets.length>o.first&&this.foldWidgets.splice(o.first,this.foldWidgets.length)}}g.Folding=r}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(d,g,J){var L=d("../token_iterator").TokenIterator,A=d("../range").Range;function k(){this.findMatchingBracket=function(a,u){if(a.column==0)return null;var r=u||this.getLine(a.row).charAt(a.column-1);if(r=="")return null;var i=r.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],a):this.$findOpeningBracket(i[2],a):null},this.getBracketRange=function(a){var u=this.getLine(a.row),r=!0,i,o=u.charAt(a.column-1),t=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(t||(o=u.charAt(a.column),a={row:a.row,column:a.column+1},t=o&&o.match(/([\(\[\{])|([\)\]\}])/),r=!1),!t)return null;if(t[1]){var e=this.$findClosingBracket(t[1],a);if(!e)return null;i=A.fromPoints(a,e),r||(i.end.column++,i.start.column--),i.cursor=i.end}else{var e=this.$findOpeningBracket(t[2],a);if(!e)return null;i=A.fromPoints(e,a),r||(i.start.column++,i.end.column--),i.cursor=i.start}return i},this.getMatchingBracketRanges=function(a,u){var r=this.getLine(a.row),i=/([\(\[\{])|([\)\]\}])/,o=!u&&r.charAt(a.column-1),t=o&&o.match(i);if(t||(o=(u===void 0||u)&&r.charAt(a.column),a={row:a.row,column:a.column+1},t=o&&o.match(i)),!t)return null;var e=new A(a.row,a.column-1,a.row,a.column),n=t[1]?this.$findClosingBracket(t[1],a):this.$findOpeningBracket(t[2],a);if(!n)return[e];var c=new A(n.row,n.column,n.row,n.column+1);return[e,c]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(a,u,r){var i=this.$brackets[a],o=1,t=new L(this,u.row,u.column),e=t.getCurrentToken();if(e||(e=t.stepForward()),!!e){r||(r=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,c=e.value;;){for(;n>=0;){var f=c.charAt(n);if(f==i){if(o-=1,o==0)return{row:t.getCurrentTokenRow(),column:n+t.getCurrentTokenColumn()}}else f==a&&(o+=1);n-=1}do e=t.stepBackward();while(e&&!r.test(e.type));if(e==null)break;c=e.value,n=c.length-1}return null}},this.$findClosingBracket=function(a,u,r){var i=this.$brackets[a],o=1,t=new L(this,u.row,u.column),e=t.getCurrentToken();if(e||(e=t.stepForward()),!!e){r||(r=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 c=e.value,f=c.length;n<f;){var m=c.charAt(n);if(m==i){if(o-=1,o==0)return{row:t.getCurrentTokenRow(),column:n+t.getCurrentTokenColumn()}}else m==a&&(o+=1);n+=1}do e=t.stepForward();while(e&&!r.test(e.type));if(e==null)break;n=0}return null}},this.getMatchingTags=function(a){var u=new L(this,a.row,a.column),r=this.$findTagName(u);if(r){var i=u.stepBackward();return i.value==="<"?this.$findClosingTag(u,r):this.$findOpeningTag(u,r)}},this.$findTagName=function(a){var u=a.getCurrentToken(),r=!1,i=!1;if(u&&u.type.indexOf("tag-name")===-1)do i?u=a.stepBackward():u=a.stepForward(),u&&(u.value==="/>"?i=!0:u.type.indexOf("tag-name")!==-1&&(r=!0));while(u&&!r);return u},this.$findClosingTag=function(a,u){var r,i=u.value,o=u.value,t=0,e=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);u=a.stepForward();var n=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+u.value.length),c=!1;do{if(r=u,r.type.indexOf("tag-close")!==-1&&!c){var f=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);c=!0}if(u=a.stepForward(),u){if(u.value===">"&&!c){var f=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);c=!0}if(u.type.indexOf("tag-name")!==-1){if(i=u.value,o===i){if(r.value==="<")t++;else if(r.value==="</"&&(t--,t<0)){a.stepBackward();var m=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2);u=a.stepForward();var D=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+u.value.length);if(u.type.indexOf("tag-close")===-1&&(u=a.stepForward()),u&&u.value===">")var M=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);else return}}}else if(o===i&&u.value==="/>"&&(t--,t<0))var m=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2),D=m,M=D,f=new A(n.end.row,n.end.column,n.end.row,n.end.column+1)}}while(u&&t>=0);if(e&&f&&m&&M&&n&&D)return{openTag:new A(e.start.row,e.start.column,f.end.row,f.end.column),closeTag:new A(m.start.row,m.start.column,M.end.row,M.end.column),openTagName:n,closeTagName:D}},this.$findOpeningTag=function(a,u){var r=a.getCurrentToken(),i=u.value,o=0,t=a.getCurrentTokenRow(),e=a.getCurrentTokenColumn(),n=e+2,c=new A(t,e,t,n);a.stepForward();var f=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+u.value.length);if(u.type.indexOf("tag-close")===-1&&(u=a.stepForward()),!(!u||u.value!==">")){var m=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);a.stepBackward(),a.stepBackward();do if(u=r,t=a.getCurrentTokenRow(),e=a.getCurrentTokenColumn(),n=e+u.value.length,r=a.stepBackward(),u){if(u.type.indexOf("tag-name")!==-1){if(i===u.value)if(r.value==="<"){if(o++,o>0){var D=new A(t,e,t,n),M=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);do u=a.stepForward();while(u&&u.value!==">");var x=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1)}}else r.value==="</"&&o--}else if(u.value==="/>"){for(var _=0,U=r;U;){if(U.type.indexOf("tag-name")!==-1&&U.value===i){o--;break}else if(U.value==="<")break;U=a.stepBackward(),_++}for(var se=0;se<_;se++)a.stepForward()}}while(r&&o<=0);if(M&&x&&c&&m&&D&&f)return{openTag:new A(M.start.row,M.start.column,x.end.row,x.end.column),closeTag:new A(c.start.row,c.start.column,m.end.row,m.end.column),openTagName:D,closeTagName:f}}}}g.BracketMatch=k}),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(d,g,J){var L=d("./lib/oop"),A=d("./lib/lang"),k=d("./bidihandler").BidiHandler,a=d("./config"),u=d("./lib/event_emitter").EventEmitter,r=d("./selection").Selection,i=d("./mode/text").Mode,o=d("./range").Range,t=d("./line_widgets").LineWidgets,e=d("./document").Document,n=d("./background_tokenizer").BackgroundTokenizer,c=d("./search_highlight").SearchHighlight,f=d("./undomanager").UndoManager,m=function(){function S(h,b){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"+ ++S.$uid,this.$foldData.toString=function(){return this.join(`
198
- `)},this.bgTokenizer=new n(new i().getTokenizer(),this);var E=this;this.bgTokenizer.on("update",function(j){E._signal("tokenizerUpdate",j)}),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 r(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new k(this),a.resetOptions(this),this.setMode(b),a._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return S.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=A.delayedCall(this.endOperation.bind(this,!0))},S.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)},S.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 b=this.selection.toJSON();this.curOp.selectionAfter=b,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(b),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",h)}},S.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()},S.prototype.getDocument=function(){return this.doc},Object.defineProperty(S.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}),S.prototype.$resetRowCache=function(h){if(!h){this.$docRowCache=[],this.$screenRowCache=[];return}var b=this.$docRowCache.length,E=this.$getRowCacheIndex(this.$docRowCache,h)+1;b>E&&(this.$docRowCache.splice(E,b),this.$screenRowCache.splice(E,b))},S.prototype.$getRowCacheIndex=function(h,b){for(var E=0,j=h.length-1;E<=j;){var we=E+j>>1,Ee=h[we];if(b>Ee)E=we+1;else if(b<Ee)j=we-1;else return we}return E-1},S.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},S.prototype.onChangeFold=function(h){var b=h.data;this.$resetRowCache(b.start.row)},S.prototype.onChange=function(h){this.$modified=!0,this.$bidiHandler.onChange(h),this.$resetRowCache(h.start.row);var b=this.$updateInternalDataOnChange(h);!this.$fromUndo&&this.$undoManager&&(b&&b.length&&(this.$undoManager.add({action:"removeFolds",folds:b},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)},S.prototype.onSelectionChange=function(){this._signal("changeSelection")},S.prototype.setValue=function(h){this.doc.setValue(h),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},S.fromJSON=function(h){typeof h=="string"&&(h=JSON.parse(h));var b=new f;b.$undoStack=h.history.undo,b.$redoStack=h.history.redo,b.mark=h.history.mark,b.$rev=h.history.rev;var E=new S(h.value);return h.folds.forEach(function(j){E.addFold("...",o.fromPoints(j.start,j.end))}),E.setAnnotations(h.annotations),E.setBreakpoints(h.breakpoints),E.setMode(h.mode),E.setScrollLeft(h.scrollLeft),E.setScrollTop(h.scrollTop),E.setUndoManager(b),E.selection.fromJSON(h.selection),E},S.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()}},S.prototype.toString=function(){return this.doc.getValue()},S.prototype.getSelection=function(){return this.selection},S.prototype.getState=function(h){return this.bgTokenizer.getState(h)},S.prototype.getTokens=function(h){return this.bgTokenizer.getTokens(h)},S.prototype.getTokenAt=function(h,b){var E=this.bgTokenizer.getTokens(h),j,we=0;if(b==null){var Ee=E.length-1;we=this.getLine(h).length}else for(var Ee=0;Ee<E.length&&(we+=E[Ee].value.length,!(we>=b));Ee++);return j=E[Ee],j?(j.index=Ee,j.start=we-j.value.length,j):null},S.prototype.setUndoManager=function(h){if(this.$undoManager=h,this.$informUndoManager&&this.$informUndoManager.cancel(),h){var b=this;h.addSession(this),this.$syncInformUndoManager=function(){b.$informUndoManager.cancel(),b.mergeUndoDeltas=!1},this.$informUndoManager=A.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},S.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},S.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},S.prototype.getTabString=function(){return this.getUseSoftTabs()?A.stringRepeat(" ",this.getTabSize()):" "},S.prototype.setUseSoftTabs=function(h){this.setOption("useSoftTabs",h)},S.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},S.prototype.setTabSize=function(h){this.setOption("tabSize",h)},S.prototype.getTabSize=function(){return this.$tabSize},S.prototype.isTabStop=function(h){return this.$useSoftTabs&&h.column%this.$tabSize===0},S.prototype.setNavigateWithinSoftTabs=function(h){this.setOption("navigateWithinSoftTabs",h)},S.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},S.prototype.setOverwrite=function(h){this.setOption("overwrite",h)},S.prototype.getOverwrite=function(){return this.$overwrite},S.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},S.prototype.addGutterDecoration=function(h,b){this.$decorations[h]||(this.$decorations[h]=""),this.$decorations[h]+=" "+b,this._signal("changeBreakpoint",{})},S.prototype.removeGutterDecoration=function(h,b){this.$decorations[h]=(this.$decorations[h]||"").replace(" "+b,""),this._signal("changeBreakpoint",{})},S.prototype.getBreakpoints=function(){return this.$breakpoints},S.prototype.setBreakpoints=function(h){this.$breakpoints=[];for(var b=0;b<h.length;b++)this.$breakpoints[h[b]]="ace_breakpoint";this._signal("changeBreakpoint",{})},S.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},S.prototype.setBreakpoint=function(h,b){b===void 0&&(b="ace_breakpoint"),b?this.$breakpoints[h]=b:delete this.$breakpoints[h],this._signal("changeBreakpoint",{})},S.prototype.clearBreakpoint=function(h){delete this.$breakpoints[h],this._signal("changeBreakpoint",{})},S.prototype.addMarker=function(h,b,E,j){var we=this.$markerId++,Ee={range:h,type:E||"line",renderer:typeof E=="function"?E:null,clazz:b,inFront:!!j,id:we};return j?(this.$frontMarkers[we]=Ee,this._signal("changeFrontMarker")):(this.$backMarkers[we]=Ee,this._signal("changeBackMarker")),we},S.prototype.addDynamicMarker=function(h,b){if(h.update){var E=this.$markerId++;return h.id=E,h.inFront=!!b,b?(this.$frontMarkers[E]=h,this._signal("changeFrontMarker")):(this.$backMarkers[E]=h,this._signal("changeBackMarker")),h}},S.prototype.removeMarker=function(h){var b=this.$frontMarkers[h]||this.$backMarkers[h];if(b){var E=b.inFront?this.$frontMarkers:this.$backMarkers;delete E[h],this._signal(b.inFront?"changeFrontMarker":"changeBackMarker")}},S.prototype.getMarkers=function(h){return h?this.$frontMarkers:this.$backMarkers},S.prototype.highlight=function(h){if(!this.$searchHighlight){var b=new c(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(b)}this.$searchHighlight.setRegexp(h)},S.prototype.highlightLines=function(h,b,E,j){typeof b!="number"&&(E=b,b=h),E||(E="ace_step");var we=new o(h,0,b,1/0);return we.id=this.addMarker(we,E,"fullLine",j),we},S.prototype.setAnnotations=function(h){this.$annotations=h,this._signal("changeAnnotation",{})},S.prototype.getAnnotations=function(){return this.$annotations||[]},S.prototype.clearAnnotations=function(){this.setAnnotations([])},S.prototype.$detectNewLine=function(h){var b=h.match(/^.*?(\r?\n)/m);b?this.$autoNewLine=b[1]:this.$autoNewLine=`
199
- `},S.prototype.getWordRange=function(h,b){var E=this.getLine(h),j=!1;if(b>0&&(j=!!E.charAt(b-1).match(this.tokenRe)),j||(j=!!E.charAt(b).match(this.tokenRe)),j)var we=this.tokenRe;else if(/^\s+$/.test(E.slice(b-1,b+1)))var we=/\s/;else var we=this.nonTokenRe;var Ee=b;if(Ee>0){do Ee--;while(Ee>=0&&E.charAt(Ee).match(we));Ee++}for(var qe=b;qe<E.length&&E.charAt(qe).match(we);)qe++;return new o(h,Ee,h,qe)},S.prototype.getAWordRange=function(h,b){for(var E=this.getWordRange(h,b),j=this.getLine(E.end.row);j.charAt(E.end.column).match(/[ \t]/);)E.end.column+=1;return E},S.prototype.setNewLineMode=function(h){this.doc.setNewLineMode(h)},S.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},S.prototype.setUseWorker=function(h){this.setOption("useWorker",h)},S.prototype.getUseWorker=function(){return this.$useWorker},S.prototype.onReloadTokenizer=function(h){var b=h.data;this.bgTokenizer.start(b.first),this._signal("tokenizerUpdate",h)},S.prototype.setMode=function(h,b){if(h&&typeof h=="object"){if(h.getTokenizer)return this.$onChangeMode(h);var E=h,j=E.path}else j=h||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new i),this.$modes[j]&&!E){this.$onChangeMode(this.$modes[j]),b&&b();return}this.$modeId=j,a.loadModule(["mode",j],(function(we){if(!this.destroyed){if(this.$modeId!==j)return b&&b();this.$modes[j]&&!E?this.$onChangeMode(this.$modes[j]):we&&we.Mode&&(we=new we.Mode(E),E||(this.$modes[j]=we,we.$id=j),this.$onChangeMode(we)),b&&b()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},S.prototype.$onChangeMode=function(h,b){if(b||(this.$modeId=h.$id),this.$mode!==h){var E=this.$mode;this.$mode=h,this.$stopWorker(),this.$useWorker&&this.$startWorker();var j=h.getTokenizer();if(j.on!==void 0){var we=this.onReloadTokenizer.bind(this);j.on("update",we)}this.bgTokenizer.setTokenizer(j),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=h.tokenRe,this.nonTokenRe=h.nonTokenRe,b||(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:E,mode:h}))}},S.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},S.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(h){a.warn("Could not load worker",h),this.$worker=null}},S.prototype.getMode=function(){return this.$mode},S.prototype.setScrollTop=function(h){this.$scrollTop===h||isNaN(h)||(this.$scrollTop=h,this._signal("changeScrollTop",h))},S.prototype.getScrollTop=function(){return this.$scrollTop},S.prototype.setScrollLeft=function(h){this.$scrollLeft===h||isNaN(h)||(this.$scrollLeft=h,this._signal("changeScrollLeft",h))},S.prototype.getScrollLeft=function(){return this.$scrollLeft},S.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},S.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var h=0;return this.lineWidgets.forEach(function(b){b&&b.screenWidth>h&&(h=b.screenWidth)}),this.lineWidgetWidth=h},S.prototype.$computeWidth=function(h){if(this.$modified||h){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var b=this.doc.getAllLines(),E=this.$rowLengthCache,j=0,we=0,Ee=this.$foldData[we],qe=Ee?Ee.start.row:1/0,at=b.length,ct=0;ct<at;ct++){if(ct>qe){if(ct=Ee.end.row+1,ct>=at)break;Ee=this.$foldData[we++],qe=Ee?Ee.start.row:1/0}E[ct]==null&&(E[ct]=this.$getStringScreenWidth(b[ct])[0]),E[ct]>j&&(j=E[ct])}this.screenWidth=j}},S.prototype.getLine=function(h){return this.doc.getLine(h)},S.prototype.getLines=function(h,b){return this.doc.getLines(h,b)},S.prototype.getLength=function(){return this.doc.getLength()},S.prototype.getTextRange=function(h){return this.doc.getTextRange(h||this.selection.getRange())},S.prototype.insert=function(h,b){return this.doc.insert(h,b)},S.prototype.remove=function(h){return this.doc.remove(h)},S.prototype.removeFullLines=function(h,b){return this.doc.removeFullLines(h,b)},S.prototype.undoChanges=function(h,b){if(h.length){this.$fromUndo=!0;for(var E=h.length-1;E!=-1;E--){var j=h[E];j.action=="insert"||j.action=="remove"?this.doc.revertDelta(j):j.folds&&this.addFolds(j.folds)}!b&&this.$undoSelect&&(h.selectionBefore?this.selection.fromJSON(h.selectionBefore):this.selection.setRange(this.$getUndoSelection(h,!0))),this.$fromUndo=!1}},S.prototype.redoChanges=function(h,b){if(h.length){this.$fromUndo=!0;for(var E=0;E<h.length;E++){var j=h[E];(j.action=="insert"||j.action=="remove")&&this.doc.$safeApplyDelta(j)}!b&&this.$undoSelect&&(h.selectionAfter?this.selection.fromJSON(h.selectionAfter):this.selection.setRange(this.$getUndoSelection(h,!1))),this.$fromUndo=!1}},S.prototype.setUndoSelect=function(h){this.$undoSelect=h},S.prototype.$getUndoSelection=function(h,b){function E(at){return b?at.action!=="insert":at.action==="insert"}for(var j,we,Ee=0;Ee<h.length;Ee++){var qe=h[Ee];if(qe.start){if(!j){E(qe)?j=o.fromPoints(qe.start,qe.end):j=o.fromPoints(qe.start,qe.start);continue}E(qe)?(we=qe.start,j.compare(we.row,we.column)==-1&&j.setStart(we),we=qe.end,j.compare(we.row,we.column)==1&&j.setEnd(we)):(we=qe.start,j.compare(we.row,we.column)==-1&&(j=o.fromPoints(qe.start,qe.start)))}}return j},S.prototype.replace=function(h,b){return this.doc.replace(h,b)},S.prototype.moveText=function(h,b,E){var j=this.getTextRange(h),we=this.getFoldsInRange(h),Ee=o.fromPoints(b,b);if(!E){this.remove(h);var qe=h.start.row-h.end.row,at=qe?-h.end.column:h.start.column-h.end.column;at&&(Ee.start.row==h.end.row&&Ee.start.column>h.end.column&&(Ee.start.column+=at),Ee.end.row==h.end.row&&Ee.end.column>h.end.column&&(Ee.end.column+=at)),qe&&Ee.start.row>=h.end.row&&(Ee.start.row+=qe,Ee.end.row+=qe)}if(Ee.end=this.insert(Ee.start,j),we.length){var ct=h.start,Ht=Ee.start,qe=Ht.row-ct.row,at=Ht.column-ct.column;this.addFolds(we.map(function(Wt){return Wt=Wt.clone(),Wt.start.row==ct.row&&(Wt.start.column+=at),Wt.end.row==ct.row&&(Wt.end.column+=at),Wt.start.row+=qe,Wt.end.row+=qe,Wt}))}return Ee},S.prototype.indentRows=function(h,b,E){E=E.replace(/\t/g,this.getTabString());for(var j=h;j<=b;j++)this.doc.insertInLine({row:j,column:0},E)},S.prototype.outdentRows=function(h){for(var b=h.collapseRows(),E=new o(0,0,0,0),j=this.getTabSize(),we=b.start.row;we<=b.end.row;++we){var Ee=this.getLine(we);E.start.row=we,E.end.row=we;for(var qe=0;qe<j&&Ee.charAt(qe)==" ";++qe);qe<j&&Ee.charAt(qe)==" "?(E.start.column=qe,E.end.column=qe+1):(E.start.column=0,E.end.column=qe),this.remove(E)}},S.prototype.$moveLines=function(h,b,E){if(h=this.getRowFoldStart(h),b=this.getRowFoldEnd(b),E<0){var j=this.getRowFoldStart(h+E);if(j<0)return 0;var we=j-h}else if(E>0){var j=this.getRowFoldEnd(b+E);if(j>this.doc.getLength()-1)return 0;var we=j-b}else{h=this.$clipRowToDocument(h),b=this.$clipRowToDocument(b);var we=b-h+1}var Ee=new o(h,0,b,Number.MAX_VALUE),qe=this.getFoldsInRange(Ee).map(function(ct){return ct=ct.clone(),ct.start.row+=we,ct.end.row+=we,ct}),at=E==0?this.doc.getLines(h,b):this.doc.removeFullLines(h,b);return this.doc.insertFullLines(h+we,at),qe.length&&this.addFolds(qe),we},S.prototype.moveLinesUp=function(h,b){return this.$moveLines(h,b,-1)},S.prototype.moveLinesDown=function(h,b){return this.$moveLines(h,b,1)},S.prototype.duplicateLines=function(h,b){return this.$moveLines(h,b,0)},S.prototype.$clipRowToDocument=function(h){return Math.max(0,Math.min(h,this.doc.getLength()-1))},S.prototype.$clipColumnToRow=function(h,b){return b<0?0:Math.min(this.doc.getLine(h).length,b)},S.prototype.$clipPositionToDocument=function(h,b){if(b=Math.max(0,b),h<0)h=0,b=0;else{var E=this.doc.getLength();h>=E?(h=E-1,b=this.doc.getLine(E-1).length):b=Math.min(this.doc.getLine(h).length,b)}return{row:h,column:b}},S.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 b=this.doc.getLength()-1;return h.end.row>b?(h.end.row=b,h.end.column=this.doc.getLine(b).length):h.end.column=this.$clipColumnToRow(h.end.row,h.end.column),h},S.prototype.setUseWrapMode=function(h){if(h!=this.$useWrapMode){if(this.$useWrapMode=h,this.$modified=!0,this.$resetRowCache(0),h){var b=this.getLength();this.$wrapData=Array(b),this.$updateWrapData(0,b-1)}this._signal("changeWrapMode")}},S.prototype.getUseWrapMode=function(){return this.$useWrapMode},S.prototype.setWrapLimitRange=function(h,b){(this.$wrapLimitRange.min!==h||this.$wrapLimitRange.max!==b)&&(this.$wrapLimitRange={min:h,max:b},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},S.prototype.adjustWrapLimit=function(h,b){var E=this.$wrapLimitRange;E.max<0&&(E={min:b,max:b});var j=this.$constrainWrapLimit(h,E.min,E.max);return j!=this.$wrapLimit&&j>1?(this.$wrapLimit=j,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},S.prototype.$constrainWrapLimit=function(h,b,E){return b&&(h=Math.max(b,h)),E&&(h=Math.min(E,h)),h},S.prototype.getWrapLimit=function(){return this.$wrapLimit},S.prototype.setWrapLimit=function(h){this.setWrapLimitRange(h,h)},S.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},S.prototype.$updateInternalDataOnChange=function(h){var b=this.$useWrapMode,E=h.action,j=h.start,we=h.end,Ee=j.row,qe=we.row,at=qe-Ee,ct=null;if(this.$updating=!0,at!=0)if(E==="remove"){this[b?"$wrapData":"$rowLengthCache"].splice(Ee,at);var Ht=this.$foldData;ct=this.getFoldsInRange(h),this.removeFolds(ct);var lt=this.getFoldLine(we.row),ut=0;if(lt){lt.addRemoveChars(we.row,we.column,j.column-we.column),lt.shiftRow(-at);var Wt=this.getFoldLine(Ee);Wt&&Wt!==lt&&(Wt.merge(lt),lt=Wt),ut=Ht.indexOf(lt)+1}for(ut;ut<Ht.length;ut++){var lt=Ht[ut];lt.start.row>=we.row&&lt.shiftRow(-at)}qe=Ee}else{var Dt=Array(at);Dt.unshift(Ee,0);var Vt=b?this.$wrapData:this.$rowLengthCache;Vt.splice.apply(Vt,Dt);var Ht=this.$foldData,lt=this.getFoldLine(Ee),ut=0;if(lt){var hi=lt.range.compareInside(j.row,j.column);hi==0?(lt=lt.split(j.row,j.column),lt&&(lt.shiftRow(at),lt.addRemoveChars(qe,0,we.column-j.column))):hi==-1&&(lt.addRemoveChars(Ee,0,we.column-j.column),lt.shiftRow(at)),ut=Ht.indexOf(lt)+1}for(ut;ut<Ht.length;ut++){var lt=Ht[ut];lt.start.row>=Ee&&lt.shiftRow(at)}}else{at=Math.abs(h.start.column-h.end.column),E==="remove"&&(ct=this.getFoldsInRange(h),this.removeFolds(ct),at=-at);var lt=this.getFoldLine(Ee);lt&&lt.addRemoveChars(Ee,j.column,at)}return b&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,b?this.$updateWrapData(Ee,qe):this.$updateRowLengthCache(Ee,qe),ct},S.prototype.$updateRowLengthCache=function(h,b){this.$rowLengthCache[h]=null,this.$rowLengthCache[b]=null},S.prototype.$updateWrapData=function(h,b){var E=this.doc.getAllLines(),j=this.getTabSize(),we=this.$wrapData,Ee=this.$wrapLimit,qe,at,ct=h;for(b=Math.min(b,E.length-1);ct<=b;)at=this.getFoldLine(ct,at),at?(qe=[],at.walk((function(Ht,lt,ut,Wt){var Dt;if(Ht!=null){Dt=this.$getDisplayTokens(Ht,qe.length),Dt[0]=x;for(var Vt=1;Vt<Dt.length;Vt++)Dt[Vt]=_}else Dt=this.$getDisplayTokens(E[lt].substring(Wt,ut),qe.length);qe=qe.concat(Dt)}).bind(this),at.end.row,E[at.end.row].length+1),we[at.start.row]=this.$computeWrapSplits(qe,Ee,j),ct=at.end.row+1):(qe=this.$getDisplayTokens(E[ct]),we[ct]=this.$computeWrapSplits(qe,Ee,j),ct++)},S.prototype.$computeWrapSplits=function(h,b,E){if(h.length==0)return[];var j=[],we=h.length,Ee=0,qe=0,at=this.$wrapAsCode,ct=this.$indentedSoftWrap,Ht=b<=Math.max(2*E,8)||ct===!1?0:Math.floor(b/2);function lt(){var hi=0;if(Ht===0)return hi;if(ct)for(var di=0;di<h.length;di++){var Jt=h[di];if(Jt==se)hi+=1;else if(Jt==X)hi+=E;else{if(Jt==O)continue;break}}return at&&ct!==!1&&(hi+=E),Math.min(hi,Ht)}function ut(hi){for(var di=hi-Ee,Jt=Ee;Jt<hi;Jt++){var gi=h[Jt];(gi===12||gi===2)&&(di-=1)}j.length||(Wt=lt(),j.indent=Wt),qe+=di,j.push(qe),Ee=hi}for(var Wt=0;we-Ee>b-Wt;){var Dt=Ee+b-Wt;if(h[Dt-1]>=se&&h[Dt]>=se){ut(Dt);continue}if(h[Dt]==x||h[Dt]==_){for(Dt;Dt!=Ee-1&&h[Dt]!=x;Dt--);if(Dt>Ee){ut(Dt);continue}for(Dt=Ee+b,Dt;Dt<h.length&&h[Dt]==_;Dt++);if(Dt==h.length)break;ut(Dt);continue}for(var Vt=Math.max(Dt-(b-(b>>2)),Ee-1);Dt>Vt&&h[Dt]<x;)Dt--;if(at){for(;Dt>Vt&&h[Dt]<x;)Dt--;for(;Dt>Vt&&h[Dt]==U;)Dt--}else for(;Dt>Vt&&h[Dt]<se;)Dt--;if(Dt>Vt){ut(++Dt);continue}Dt=Ee+b,h[Dt]==M&&Dt--,ut(Dt-Wt)}return j},S.prototype.$getDisplayTokens=function(h,b){var E=[],j;b=b||0;for(var we=0;we<h.length;we++){var Ee=h.charCodeAt(we);if(Ee==9){j=this.getScreenTabSize(E.length+b),E.push(X);for(var qe=1;qe<j;qe++)E.push(O)}else Ee==32?E.push(se):Ee>39&&Ee<48||Ee>57&&Ee<64?E.push(U):Ee>=4352&&_e(Ee)?E.push(D,M):E.push(D)}return E},S.prototype.$getStringScreenWidth=function(h,b,E){if(b==0)return[0,0];b==null&&(b=1/0),E=E||0;var j,we;for(we=0;we<h.length&&(j=h.charCodeAt(we),j==9?E+=this.getScreenTabSize(E):j>=4352&&_e(j)?E+=2:E+=1,!(E>b));we++);return[E,we]},S.prototype.getRowLength=function(h){var b=1;return this.lineWidgets&&(b+=this.lineWidgets[h]&&this.lineWidgets[h].rowCount||0),!this.$useWrapMode||!this.$wrapData[h]?b:this.$wrapData[h].length+b},S.prototype.getRowLineCount=function(h){return!this.$useWrapMode||!this.$wrapData[h]?1:this.$wrapData[h].length+1},S.prototype.getRowWrapIndent=function(h){if(this.$useWrapMode){var b=this.screenToDocumentPosition(h,Number.MAX_VALUE),E=this.$wrapData[b.row];return E.length&&E[0]<b.column?E.indent:0}else return 0},S.prototype.getScreenLastRowColumn=function(h){var b=this.screenToDocumentPosition(h,Number.MAX_VALUE);return this.documentToScreenColumn(b.row,b.column)},S.prototype.getDocumentLastRowColumn=function(h,b){var E=this.documentToScreenRow(h,b);return this.getScreenLastRowColumn(E)},S.prototype.getDocumentLastRowColumnPosition=function(h,b){var E=this.documentToScreenRow(h,b);return this.screenToDocumentPosition(E,Number.MAX_VALUE/10)},S.prototype.getRowSplitData=function(h){if(this.$useWrapMode)return this.$wrapData[h]},S.prototype.getScreenTabSize=function(h){return this.$tabSize-(h%this.$tabSize|0)},S.prototype.screenToDocumentRow=function(h,b){return this.screenToDocumentPosition(h,b).row},S.prototype.screenToDocumentColumn=function(h,b){return this.screenToDocumentPosition(h,b).column},S.prototype.screenToDocumentPosition=function(h,b,E){if(h<0)return{row:0,column:0};var j,we=0,Ee=0,qe,at=0,ct=0,Ht=this.$screenRowCache,lt=this.$getRowCacheIndex(Ht,h),ut=Ht.length;if(ut&&lt>=0)var at=Ht[lt],we=this.$docRowCache[lt],Wt=h>Ht[ut-1];else var Wt=!ut;for(var Dt=this.getLength()-1,Vt=this.getNextFoldLine(we),hi=Vt?Vt.start.row:1/0;at<=h&&(ct=this.getRowLength(we),!(at+ct>h||we>=Dt));)at+=ct,we++,we>hi&&(we=Vt.end.row+1,Vt=this.getNextFoldLine(we,Vt),hi=Vt?Vt.start.row:1/0),Wt&&(this.$docRowCache.push(we),this.$screenRowCache.push(at));if(Vt&&Vt.start.row<=we)j=this.getFoldDisplayLine(Vt),we=Vt.start.row;else{if(at+ct<=h||we>Dt)return{row:Dt,column:this.getLine(Dt).length};j=this.getLine(we),Vt=null}var di=0,Jt=Math.floor(h-at);if(this.$useWrapMode){var gi=this.$wrapData[we];gi&&(qe=gi[Jt],Jt>0&&gi.length&&(di=gi.indent,Ee=gi[Jt-1]||gi[gi.length-1],j=j.substring(Ee)))}return E!==void 0&&this.$bidiHandler.isBidiRow(at+Jt,we,Jt)&&(b=this.$bidiHandler.offsetToCol(E)),Ee+=this.$getStringScreenWidth(j,b-di)[1],this.$useWrapMode&&Ee>=qe&&(Ee=qe-1),Vt?Vt.idxToPosition(Ee):{row:we,column:Ee}},S.prototype.documentToScreenPosition=function(h,b){if(typeof b>"u")var E=this.$clipPositionToDocument(h.row,h.column);else E=this.$clipPositionToDocument(h,b);h=E.row,b=E.column;var j=0,we=null,Ee=null;Ee=this.getFoldAt(h,b,1),Ee&&(h=Ee.start.row,b=Ee.start.column);var qe,at=0,ct=this.$docRowCache,Ht=this.$getRowCacheIndex(ct,h),lt=ct.length;if(lt&&Ht>=0)var at=ct[Ht],j=this.$screenRowCache[Ht],ut=h>ct[lt-1];else var ut=!lt;for(var Wt=this.getNextFoldLine(at),Dt=Wt?Wt.start.row:1/0;at<h;){if(at>=Dt){if(qe=Wt.end.row+1,qe>h)break;Wt=this.getNextFoldLine(qe,Wt),Dt=Wt?Wt.start.row:1/0}else qe=at+1;j+=this.getRowLength(at),at=qe,ut&&(this.$docRowCache.push(at),this.$screenRowCache.push(j))}var Vt="";Wt&&at>=Dt?(Vt=this.getFoldDisplayLine(Wt,h,b),we=Wt.start.row):(Vt=this.getLine(h).substring(0,b),we=h);var hi=0;if(this.$useWrapMode){var di=this.$wrapData[we];if(di){for(var Jt=0;Vt.length>=di[Jt];)j++,Jt++;Vt=Vt.substring(di[Jt-1]||0,Vt.length),hi=Jt>0?di.indent:0}}return this.lineWidgets&&this.lineWidgets[at]&&this.lineWidgets[at].rowsAbove&&(j+=this.lineWidgets[at].rowsAbove),{row:j,column:hi+this.$getStringScreenWidth(Vt)[0]}},S.prototype.documentToScreenColumn=function(h,b){return this.documentToScreenPosition(h,b).column},S.prototype.documentToScreenRow=function(h,b){return this.documentToScreenPosition(h,b).row},S.prototype.getScreenLength=function(){var h=0,b=null;if(this.$useWrapMode)for(var we=this.$wrapData.length,Ee=0,j=0,b=this.$foldData[j++],qe=b?b.start.row:1/0;Ee<we;){var at=this.$wrapData[Ee];h+=at?at.length+1:1,Ee++,Ee>qe&&(Ee=b.end.row+1,b=this.$foldData[j++],qe=b?b.start.row:1/0)}else{h=this.getLength();for(var E=this.$foldData,j=0;j<E.length;j++)b=E[j],h-=b.end.row-b.start.row}return this.lineWidgets&&(h+=this.$getWidgetScreenLength()),h},S.prototype.$setFontMetrics=function(h){this.$enableVarChar&&(this.$getStringScreenWidth=function(b,E,j){if(E===0)return[0,0];E||(E=1/0),j=j||0;var we,Ee;for(Ee=0;Ee<b.length&&(we=b.charAt(Ee),we===" "?j+=this.getScreenTabSize(j):j+=h.getCharacterWidth(we),!(j>E));Ee++);return[j,Ee]})},S.prototype.getPrecedingCharacter=function(){var h=this.selection.getCursor();if(h.column===0)return h.row===0?"":this.doc.getNewLineCharacter();var b=this.getLine(h.row);return b[h.column-1]},S.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()},S}();m.$uid=0,m.prototype.$modes=a.$modes,m.prototype.getValue=m.prototype.toString,m.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},m.prototype.$overwrite=!1,m.prototype.$mode=null,m.prototype.$modeId=null,m.prototype.$scrollTop=0,m.prototype.$scrollLeft=0,m.prototype.$wrapLimit=80,m.prototype.$useWrapMode=!1,m.prototype.$wrapLimitRange={min:null,max:null},m.prototype.lineWidgets=null,m.prototype.isFullWidth=_e,L.implement(m.prototype,u);var D=1,M=2,x=3,_=4,U=9,se=10,X=11,O=12;function _e(S){return S<4352?!1:S>=4352&&S<=4447||S>=4515&&S<=4519||S>=4602&&S<=4607||S>=9001&&S<=9002||S>=11904&&S<=11929||S>=11931&&S<=12019||S>=12032&&S<=12245||S>=12272&&S<=12283||S>=12288&&S<=12350||S>=12353&&S<=12438||S>=12441&&S<=12543||S>=12549&&S<=12589||S>=12593&&S<=12686||S>=12688&&S<=12730||S>=12736&&S<=12771||S>=12784&&S<=12830||S>=12832&&S<=12871||S>=12880&&S<=13054||S>=13056&&S<=19903||S>=19968&&S<=42124||S>=42128&&S<=42182||S>=43360&&S<=43388||S>=44032&&S<=55203||S>=55216&&S<=55238||S>=55243&&S<=55291||S>=63744&&S<=64255||S>=65040&&S<=65049||S>=65072&&S<=65106||S>=65108&&S<=65126||S>=65128&&S<=65131||S>=65281&&S<=65376||S>=65504&&S<=65510}d("./edit_session/folding").Folding.call(m.prototype),d("./edit_session/bracket_match").BracketMatch.call(m.prototype),a.defineOptions(m.prototype,"session",{wrap:{set:function(S){if(!S||S=="off"?S=!1:S=="free"?S=!0:S=="printMargin"?S=-1:typeof S=="string"&&(S=parseInt(S,10)||!1),this.$wrap!=S)if(this.$wrap=S,!S)this.setUseWrapMode(!1);else{var h=typeof S=="number"?S: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(S){S=S=="auto"?this.$mode.type!="text":S!="text",S!=this.$wrapAsCode&&(this.$wrapAsCode=S,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(S){this.$useWorker=S,this.$stopWorker(),S&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(S){S=parseInt(S),S>0&&this.$tabSize!==S&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=S,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(S){this.setFoldStyle(S)},handlesSet:!0},overwrite:{set:function(S){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(S){this.doc.setNewLineMode(S)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(S){this.setMode(S)},get:function(){return this.$modeId},handlesSet:!0}}),g.EditSession=m}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(d,g,J){var L=d("./lib/lang"),A=d("./lib/oop"),k=d("./range").Range,a=function(){function r(){this.$options={}}return r.prototype.set=function(i){return A.mixin(this.$options,i),this},r.prototype.getOptions=function(){return L.copyObject(this.$options)},r.prototype.setOptions=function(i){this.$options=i},r.prototype.find=function(i){var o=this.$options,t=this.$matchIterator(i,o);if(!t)return!1;var e=null;return t.forEach(function(n,c,f,m){return e=new k(n,c,f,m),c==m&&o.start&&o.start.start&&o.skipCurrent!=!1&&e.isEqual(o.start)?(e=null,!1):!0}),e},r.prototype.findAll=function(i){var o=this.$options;if(!o.needle)return[];this.$assembleRegExp(o);var t=o.range,e=t?i.getLines(t.start.row,t.end.row):i.doc.getAllLines(),n=[],c=o.re;if(o.$isMultiLine){var f=c.length,m=e.length-f,D;e:for(var M=c.offset||0;M<=m;M++){for(var x=0;x<f;x++)if(e[M+x].search(c[x])==-1)continue e;var _=e[M],U=e[M+f-1],se=_.length-_.match(c[0])[0].length,X=U.match(c[f-1])[0].length;D&&D.end.row===M&&D.end.column>se||(n.push(D=new k(M,se,M+f-1,X)),f>2&&(M=M+f-2))}}else for(var O=0;O<e.length;O++)for(var _e=L.getMatchOffsets(e[O],c),x=0;x<_e.length;x++){var S=_e[x];n.push(new k(O,S.offset,O,S.offset+S.length))}if(t){for(var h=t.start.column,b=t.end.column,O=0,x=n.length-1;O<x&&n[O].start.column<h&&n[O].start.row==0;)O++;for(var E=t.end.row-t.start.row;O<x&&n[x].end.column>b&&n[x].end.row==E;)x--;for(n=n.slice(O,x+1),O=0,x=n.length;O<x;O++)n[O].start.row+=t.start.row,n[O].end.row+=t.start.row}return n},r.prototype.replace=function(i,o){var t=this.$options,e=this.$assembleRegExp(t);if(t.$isMultiLine)return o;if(e){var n=e.exec(i);if(!n||n[0].length!=i.length)return null;if(t.regExp||(o=o.replace(/\$/g,"$$$$")),o=i.replace(e,o),t.preserveCase){o=o.split("");for(var c=Math.min(i.length,i.length);c--;){var f=i[c];f&&f.toLowerCase()!=f?o[c]=o[c].toUpperCase():o[c]=o[c].toLowerCase()}o=o.join("")}return o}},r.prototype.$assembleRegExp=function(i,o){if(i.needle instanceof RegExp)return i.re=i.needle;var t=i.needle;if(!i.needle)return i.re=!1;i.regExp||(t=L.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=!o&&/[\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},r.prototype.$assembleMultilineRegExp=function(i,o){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],o))}catch{return!1}return e},r.prototype.$matchIterator=function(i,o){var t=this.$assembleRegExp(o);if(!t)return!1;var e=o.backwards==!0,n=o.skipCurrent!=!1,c=t.unicode,f=o.range,m=o.start;m||(m=f?f[e?"end":"start"]:i.selection.getRange()),m.start&&(m=m[n!=e?"end":"start"]);var D=f?f.start.row:0,M=f?f.end.row:i.getLength()-1;if(e)var x=function(se){var X=m.row;if(!U(X,m.column,se)){for(X--;X>=D;X--)if(U(X,Number.MAX_VALUE,se))return;if(o.wrap!=!1){for(X=M,D=m.row;X>=D;X--)if(U(X,Number.MAX_VALUE,se))return}}};else var x=function(X){var O=m.row;if(!U(O,m.column,X)){for(O=O+1;O<=M;O++)if(U(O,0,X))return;if(o.wrap!=!1){for(O=D,M=m.row;O<=M;O++)if(U(O,0,X))return}}};if(o.$isMultiLine)var _=t.length,U=function(se,X,O){var _e=e?se-_+1:se;if(!(_e<0||_e+_>i.getLength())){var S=i.getLine(_e),h=S.search(t[0]);if(!(!e&&h<X||h===-1)){for(var b=1;b<_;b++)if(S=i.getLine(_e+b),S.search(t[b])==-1)return;var E=S.match(t[_-1])[0].length;if(!(e&&E>X)&&O(_e,h,_e+_-1,E))return!0}}};else if(e)var U=function(X,O,_e){var S=i.getLine(X),h=[],b,E=0;for(t.lastIndex=0;b=t.exec(S);){var j=b[0].length;if(E=b.index,!j){if(E>=S.length)break;t.lastIndex=E+=L.skipEmptyMatch(S,E,c)}if(b.index+j>O)break;h.push(b.index,j)}for(var we=h.length-1;we>=0;we-=2){var Ee=h[we-1],j=h[we];if(_e(X,Ee,X,Ee+j))return!0}};else var U=function(X,O,_e){var S=i.getLine(X),h,b;for(t.lastIndex=O;b=t.exec(S);){var E=b[0].length;if(h=b.index,_e(X,h,X,h+E))return!0;if(!E&&(t.lastIndex=h+=L.skipEmptyMatch(S,h,c),h>=S.length))return!1}};return{forEach:x}},r}();function u(r,i){var o=L.supportsLookbehind();function t(f,m){m===void 0&&(m=!0);var D=o&&i.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return D.test(f)||i.regExp?o&&i.$supportsUnicodeFlag?m?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var e=Array.from(r),n=e[0],c=e[e.length-1];return t(n)+r+t(c,!1)}g.Search=a}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(d,g,J){var L=this&&this.__extends||function(){var o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,c){n.__proto__=c}||function(n,c){for(var f in c)Object.prototype.hasOwnProperty.call(c,f)&&(n[f]=c[f])},o(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");o(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),A=d("../lib/keys"),k=d("../lib/useragent"),a=A.KEY_MODS,u=function(){function o(t,e){this.$init(t,e,!1)}return o.prototype.$init=function(t,e,n){this.platform=e||(k.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(t),this.$singleCommand=n},o.prototype.addCommand=function(t){this.commands[t.name]&&this.removeCommand(t),this.commands[t.name]=t,t.bindKey&&this._buildKeyHash(t)},o.prototype.removeCommand=function(t,e){var n=t&&(typeof t=="string"?t:t.name);t=this.commands[n],e||delete this.commands[n];var c=this.commandKeyBinding;for(var f in c){var m=c[f];if(m==t)delete c[f];else if(Array.isArray(m)){var D=m.indexOf(t);D!=-1&&(m.splice(D,1),m.length==1&&(c[f]=m[0]))}}},o.prototype.bindKey=function(t,e,n){if(typeof t=="object"&&t&&(n==null&&(n=t.position),t=t[this.platform]),!!t){if(typeof e=="function")return this.addCommand({exec:e,bindKey:t,name:e.name||t});t.split("|").forEach(function(c){var f="";if(c.indexOf(" ")!=-1){var m=c.split(/\s+/);c=m.pop(),m.forEach(function(x){var _=this.parseKeys(x),U=a[_.hashId]+_.key;f+=(f?" ":"")+U,this._addCommandToBinding(f,"chainKeys")},this),f+=" "}var D=this.parseKeys(c),M=a[D.hashId]+D.key;this._addCommandToBinding(f+M,e,n)},this)}},o.prototype._addCommandToBinding=function(t,e,n){var c=this.commandKeyBinding,f;if(!e)delete c[t];else if(!c[t]||this.$singleCommand)c[t]=e;else{Array.isArray(c[t])?(f=c[t].indexOf(e))!=-1&&c[t].splice(f,1):c[t]=[c[t]],typeof n!="number"&&(n=r(e));var m=c[t];for(f=0;f<m.length;f++){var D=m[f],M=r(D);if(M>n)break}m.splice(f,0,e)}},o.prototype.addCommands=function(t){t&&Object.keys(t).forEach(function(e){var n=t[e];if(n){if(typeof n=="string")return this.bindKey(n,e);typeof n=="function"&&(n={exec:n}),typeof n=="object"&&(n.name||(n.name=e),this.addCommand(n))}},this)},o.prototype.removeCommands=function(t){Object.keys(t).forEach(function(e){this.removeCommand(t[e])},this)},o.prototype.bindKeys=function(t){Object.keys(t).forEach(function(e){this.bindKey(e,t[e])},this)},o.prototype._buildKeyHash=function(t){this.bindKey(t.bindKey,t)},o.prototype.parseKeys=function(t){var e=t.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(M){return M}),n=e.pop(),c=A[n];if(A.FUNCTION_KEYS[c])n=A.FUNCTION_KEYS[c].toLowerCase();else if(e.length){if(e.length==1&&e[0]=="shift")return{key:n.toUpperCase(),hashId:-1}}else return{key:n,hashId:-1};for(var f=0,m=e.length;m--;){var D=A.KEY_MODS[e[m]];if(D==null)return typeof console<"u"&&console.error("invalid modifier "+e[m]+" in "+t),!1;f|=D}return{key:n,hashId:f}},o.prototype.findKeyCommand=function(t,e){var n=a[t]+e;return this.commandKeyBinding[n]},o.prototype.handleKeyboard=function(t,e,n,c){if(!(c<0)){var f=a[e]+n,m=this.commandKeyBinding[f];return t.$keyChain&&(t.$keyChain+=" "+f,m=this.commandKeyBinding[t.$keyChain]||m),m&&(m=="chainKeys"||m[m.length-1]=="chainKeys")?(t.$keyChain=t.$keyChain||f,{command:"null"}):(t.$keyChain&&((!e||e==4)&&n.length==1?t.$keyChain=t.$keyChain.slice(0,-f.length-1):(e==-1||c>0)&&(t.$keyChain="")),{command:m})}},o.prototype.getStatusText=function(t,e){return e.$keyChain||""},o}();function r(o){return typeof o=="object"&&o.bindKey&&o.bindKey.position||(o.isDefault?-100:0)}var i=function(o){L(t,o);function t(e,n){var c=o.call(this,e,n)||this;return c.$singleCommand=!0,c}return t}(u);i.call=function(o,t,e){u.prototype.$init.call(o,t,e,!0)},u.call=function(o,t,e){u.prototype.$init.call(o,t,e,!1)},g.HashHandler=i,g.MultiHashHandler=u}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(d,g,J){var L=this&&this.__extends||function(){var r=function(i,o){return r=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])},r(i,o)};return function(i,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");r(i,o);function t(){this.constructor=i}i.prototype=o===null?Object.create(o):(t.prototype=o.prototype,new t)}}(),A=d("../lib/oop"),k=d("../keyboard/hash_handler").MultiHashHandler,a=d("../lib/event_emitter").EventEmitter,u=function(r){L(i,r);function i(o,t){var e=r.call(this,t,o)||this;return e.byName=e.commands,e.setDefaultHandler("exec",function(n){return n.args?n.command.exec(n.editor,n.args,n.event,!1):n.command.exec(n.editor,{},n.event,!0)}),e}return i.prototype.exec=function(o,t,e){if(Array.isArray(o)){for(var n=o.length;n--;)if(this.exec(o[n],t,e))return!0;return!1}if(typeof o=="string"&&(o=this.commands[o]),!this.canExecute(o,t))return!1;var c={editor:t,command:o,args:e};return c.returnValue=this._emit("exec",c),this._signal("afterExec",c),c.returnValue!==!1},i.prototype.canExecute=function(o,t){return typeof o=="string"&&(o=this.commands[o]),!(!o||t&&t.$readOnly&&!o.readOnly||this.$checkCommandState!=!1&&o.isAvailable&&!o.isAvailable(t))},i.prototype.toggleRecording=function(o){if(!this.$inReplay)return o&&o._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(t){this.macro.push([t.command,t.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},i.prototype.replay=function(o){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(o);try{this.$inReplay=!0,this.macro.forEach(function(t){typeof t=="string"?this.exec(t,o):this.exec(t[0],o,t[1])},this)}finally{this.$inReplay=!1}}},i.prototype.trimMacro=function(o){return o.map(function(t){return typeof t[0]!="string"&&(t[0]=t[0].name),t[1]||(t=t[0]),t})},i}(k);A.implement(u.prototype,a),g.CommandManager=u}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(d,g,J){var L=d("../lib/lang"),A=d("../config"),k=d("../range").Range;function a(r,i){return{win:r,mac:i}}g.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(r){A.loadModule("ace/ext/settings_menu",function(i){i.init(r),r.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(r){A.loadModule("ace/ext/error_marker",function(i){i.showErrorMarker(r,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(r){A.loadModule("ace/ext/error_marker",function(i){i.showErrorMarker(r,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(r){r.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(r){r.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(r,i){typeof i=="number"&&!isNaN(i)&&r.gotoLine(i),r.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(r){r.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(r){r.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(r){r.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(r){r.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(r){r.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(r){r.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(r){r.session.foldAll(),r.session.unfold(r.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(r){r.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(r){r.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(r){r.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(r){r.selection.isEmpty()?r.selection.selectWord():r.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(r){r.selection.isEmpty()?r.selection.selectWord():r.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(r){A.loadModule("ace/ext/searchbox",function(i){i.Search(r)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(r){r.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(r){r.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(r){r.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(r){r.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(r,i){r.navigateUp(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(r){r.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(r){r.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(r){r.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(r,i){r.navigateDown(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(r){r.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(r){r.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(r){r.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(r){r.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(r){r.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(r,i){r.navigateLeft(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(r){r.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(r){r.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(r){r.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(r){r.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(r){r.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(r,i){r.navigateRight(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(r){r.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(r){r.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(r){r.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(r){r.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(r){r.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(r){r.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(r){r.renderer.scrollBy(0,-2*r.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(r){r.renderer.scrollBy(0,2*r.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(r){r.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(r){r.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(r){r.commands.toggleRecording(r)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(r){r.commands.replay(r)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(r){r.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(r){r.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(r){r.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(r){},readOnly:!0},{name:"cut",description:"Cut",exec:function(r){var i=r.$copyWithEmptySelection&&r.selection.isEmpty(),o=i?r.selection.getLineRange():r.selection.getRange();r._emit("cut",o),o.isEmpty()||r.session.remove(o),r.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(r,i){r.$handlePaste(i)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(r){r.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(r){r.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(r){r.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(r){r.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(r){r.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(r){r.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(r){r.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(r){A.loadModule("ace/ext/searchbox",function(i){i.Search(r,!0)})}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(r){r.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(r){r.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(r){r.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(r){r.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(r){r.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(r){r.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(r){r.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(r){r.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(r){if(r.selection.isEmpty())r.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(r){r.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(r){r.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(r){var i=r.selection.getRange();i.start.column=0,r.session.remove(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(r){var i=r.selection.getRange();i.end.column=Number.MAX_VALUE,r.session.remove(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(r){r.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(r){r.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(r){r.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(r){r.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(r){r.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(r){r.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(r,i){r.insert(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(r,i){r.insert(L.stringRepeat(i.text||"",i.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(r){r.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(r){r.transposeLetters()},multiSelectAction:function(r){r.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(r){r.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(r){r.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(r){r.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(r){var i=r.selection.getRange();i.start.column=i.end.column=0,i.end.row++,r.selection.setRange(i,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:a("Ctrl+F3","F3"),exec:function(r){r.openLink()}},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(r){for(var i=r.selection.isBackwards(),o=i?r.selection.getSelectionLead():r.selection.getSelectionAnchor(),t=i?r.selection.getSelectionAnchor():r.selection.getSelectionLead(),e=r.session.doc.getLine(o.row).length,n=r.session.doc.getTextRange(r.selection.getRange()),c=n.replace(/\n\s*/," ").length,f=r.session.doc.getLine(o.row),m=o.row+1;m<=t.row+1;m++){var D=L.stringTrimLeft(L.stringTrimRight(r.session.doc.getLine(m)));D.length!==0&&(D=" "+D),f+=D}t.row+1<r.session.doc.getLength()-1&&(f+=r.session.doc.getNewLineCharacter()),r.clearSelection(),r.session.doc.replace(new k(o.row,0,t.row+2,0),f),c>0?(r.selection.moveCursorTo(o.row,o.column),r.selection.selectTo(o.row,o.column+c)):(e=r.session.doc.getLine(o.row).length>e?e+1:e,r.selection.moveCursorTo(o.row,e))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(r){var i=r.session.doc.getLength()-1,o=r.session.doc.getLine(i).length,t=r.selection.rangeList.ranges,e=[];t.length<1&&(t=[r.selection.getRange()]);for(var n=0;n<t.length;n++)n==t.length-1&&(t[n].end.row===i&&t[n].end.column===o||e.push(new k(t[n].end.row,t[n].end.column,i,o))),n===0?t[n].start.row===0&&t[n].start.column===0||e.push(new k(0,0,t[n].start.row,t[n].start.column)):e.push(new k(t[n-1].end.row,t[n-1].end.column,t[n].start.row,t[n].start.column));r.exitMultiSelectMode(),r.clearSelection();for(var n=0;n<e.length;n++)r.selection.addRange(e[n],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(r){r.selection.clearSelection(),r.navigateLineEnd(),r.insert(`
202
- `)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(r){r.selection.clearSelection();var i=r.getCursorPosition();r.selection.moveTo(i.row-1,Number.MAX_VALUE),r.insert(`
203
- `),i.row===0&&r.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(r){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),r.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:a("F1","F1"),exec:function(r){r.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:a(null,null),exec:function(r){r.prompt({$type:"modes"})},readOnly:!0}];for(var u=1;u<9;u++)g.commands.push({name:"foldToLevel"+u,description:"Fold To Level "+u,level:u,exec:function(r){r.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(d,g,J){var L=d("../lib/keys"),A=d("../mouse/default_gutter_handler").GutterTooltip,k=function(){function u(r){this.editor=r,this.gutterLayer=r.renderer.$gutterLayer,this.element=r.renderer.$gutter,this.lines=r.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new A(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(r){if(this.annotationTooltip.isOpen){r.preventDefault(),r.keyCode===L.escape&&this.annotationTooltip.hideTooltip();return}if(r.target===this.element){if(r.keyCode!=L.enter)return;r.preventDefault();var i=this.editor.getCursorPosition().row;this.editor.isRowVisible(i)||this.editor.scrollToLine(i,!0,!0),setTimeout((function(){var o=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),t=this.$findNearestFoldWidget(o),e=this.$findNearestAnnotation(o);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-o)<Math.abs(t-o)){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(r),setTimeout((function(){this.editor._signal("gutterkeydown",new a(r,this))}).bind(this),10)},u.prototype.$handleGutterKeyboardInteraction=function(r){if(r.keyCode===L.tab){r.preventDefault();return}if(r.keyCode===L.escape){r.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(r.keyCode===L.up){switch(r.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(r.keyCode===L.down){switch(r.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(r.keyCode===L.left){r.preventDefault(),this.$switchLane("annotation");return}if(r.keyCode===L.right){r.preventDefault(),this.$switchLane("fold");return}if(r.keyCode===L.enter||r.keyCode===L.space){switch(r.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),r),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 o=this.lines.cells[this.activeRowIndex].element.childNodes[2],t=o.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(r){var i=this.editor.isRowFullyVisible(this.$rowIndexToRow(r)),o=this.$getFoldWidget(r).style.display!=="none";return i&&o},u.prototype.$isAnnotationVisible=function(r){var i=this.editor.isRowFullyVisible(this.$rowIndexToRow(r)),o=this.$getAnnotation(r).style.display!=="none";return i&&o},u.prototype.$getFoldWidget=function(r){var i=this.lines.get(r),o=i.element;return o.childNodes[1]},u.prototype.$getAnnotation=function(r){var i=this.lines.get(r),o=i.element;return o.childNodes[2]},u.prototype.$findNearestFoldWidget=function(r){if(this.$isFoldWidgetVisible(r))return r;for(var i=0;r-i>0||r+i<this.lines.getLength()-1;){if(i++,r-i>=0&&this.$isFoldWidgetVisible(r-i))return r-i;if(r+i<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(r+i))return r+i}return null},u.prototype.$findNearestAnnotation=function(r){if(this.$isAnnotationVisible(r))return r;for(var i=0;r-i>0||r+i<this.lines.getLength()-1;){if(i++,r-i>=0&&this.$isAnnotationVisible(r-i))return r-i;if(r+i<=this.lines.getLength()-1&&this.$isAnnotationVisible(r+i))return r+i}return null},u.prototype.$focusFoldWidget=function(r){if(r!=null){var i=this.$getFoldWidget(r);i.classList.add(this.editor.renderer.keyboardFocusClassName),i.focus()}},u.prototype.$focusAnnotation=function(r){if(r!=null){var i=this.$getAnnotation(r);i.classList.add(this.editor.renderer.keyboardFocusClassName),i.focus()}},u.prototype.$blurFoldWidget=function(r){var i=this.$getFoldWidget(r);i.classList.remove(this.editor.renderer.keyboardFocusClassName),i.blur()},u.prototype.$blurAnnotation=function(r){var i=this.$getAnnotation(r);i.classList.remove(this.editor.renderer.keyboardFocusClassName),i.blur()},u.prototype.$moveFoldWidgetUp=function(){for(var r=this.activeRowIndex;r>0;)if(r--,this.$isFoldWidgetVisible(r)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=r,this.$focusFoldWidget(this.activeRowIndex);return}},u.prototype.$moveFoldWidgetDown=function(){for(var r=this.activeRowIndex;r<this.lines.getLength()-1;)if(r++,this.$isFoldWidgetVisible(r)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=r,this.$focusFoldWidget(this.activeRowIndex);return}},u.prototype.$moveAnnotationUp=function(){for(var r=this.activeRowIndex;r>0;)if(r--,this.$isAnnotationVisible(r)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=r,this.$focusAnnotation(this.activeRowIndex);return}},u.prototype.$moveAnnotationDown=function(){for(var r=this.activeRowIndex;r<this.lines.getLength()-1;)if(r++,this.$isAnnotationVisible(r)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=r,this.$focusAnnotation(this.activeRowIndex);return}},u.prototype.$switchLane=function(r){switch(r){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 o=this.$findNearestFoldWidget(this.activeRowIndex);if(o==null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=o,this.$focusFoldWidget(this.activeRowIndex);break}},u.prototype.$rowIndexToRow=function(r){var i=this.lines.get(r);return i?i.row:null},u.prototype.$rowToRowIndex=function(r){for(var i=0;i<this.lines.getLength();i++){var o=this.lines.get(i);if(o.row==r)return i}return null},u}();g.GutterKeyboardHandler=k;var a=function(){function u(r,i){this.gutterKeyboardHandler=i,this.domEvent=r}return u.prototype.getKey=function(){return L.keyCodeToString(this.domEvent.keyCode)},u.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},u.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},u.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},u}();g.GutterKeyboardEvent=a}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys"],function(d,g,J){var L=this&&this.__values||function(S){var h=typeof Symbol=="function"&&Symbol.iterator,b=h&&S[h],E=0;if(b)return b.call(S);if(S&&typeof S.length=="number")return{next:function(){return S&&E>=S.length&&(S=void 0),{value:S&&S[E++],done:!S}}};throw new TypeError(h?"Object is not iterable.":"Symbol.iterator is not defined.")},A=d("./lib/oop"),k=d("./lib/dom"),a=d("./lib/lang"),u=d("./lib/useragent"),r=d("./keyboard/textinput").TextInput,i=d("./mouse/mouse_handler").MouseHandler,o=d("./mouse/fold_handler").FoldHandler,t=d("./keyboard/keybinding").KeyBinding,e=d("./edit_session").EditSession,n=d("./search").Search,c=d("./range").Range,f=d("./lib/event_emitter").EventEmitter,m=d("./commands/command_manager").CommandManager,D=d("./commands/default_commands").commands,M=d("./config"),x=d("./token_iterator").TokenIterator,_=d("./keyboard/gutter_handler").GutterKeyboardHandler,U=d("./config").nls,se=d("./clipboard"),X=d("./lib/keys"),O=function(){function S(h,b,E){this.session,this.$toDestroy=[];var j=h.getContainerElement();this.container=j,this.renderer=h,this.id="editor"+ ++S.$uid,this.commands=new m(u.isMac?"mac":"win",D),typeof document=="object"&&(this.textInput=new r(h.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new i(this),new o(this)),this.keyBinding=new t(this),this.$search=new n().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=a.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(we,Ee){Ee._$emitInputEvent.schedule(31)}),this.setSession(b||E&&E.session||new e("")),M.resetOptions(this),E&&this.setOptions(E),M._signal("editor",this)}return S.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},S.prototype.startOperation=function(h){this.session.startOperation(h)},S.prototype.endOperation=function(h){this.session.endOperation(h)},S.prototype.onStartOperation=function(h){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,h||(this.previousCommand=null)},S.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 b=this.curOp.command,E=b&&b.scrollIntoView;if(E){switch(E){case"center-animate":E="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var j=this.selection.getRange(),we=this.renderer.layerConfig;(j.start.row>=we.lastRow||j.end.row<=we.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}E=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},S.prototype.$historyTracker=function(h){if(this.$mergeUndoDeltas){var b=this.prevOp,E=this.$mergeableCommands,j=b.command&&h.command.name==b.command.name;if(h.command.name=="insertstring"){var we=h.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),j=j&&this.mergeNextCommand&&(!/\s/.test(we)||/\s/.test(b.args)),this.mergeNextCommand=!0}else j=j&&E.indexOf(h.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(j=!1),j?this.session.mergeUndoDeltas=!0:E.indexOf(h.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},S.prototype.setKeyboardHandler=function(h,b){if(h&&typeof h=="string"&&h!="ace"){this.$keybindingId=h;var E=this;M.loadModule(["keybinding",h],function(j){E.$keybindingId==h&&E.keyBinding.setKeyboardHandler(j&&j.handler),b&&b()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(h),b&&b()},S.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},S.prototype.setSession=function(h){if(this.session!=h){this.curOp&&this.endOperation(),this.curOp={};var b=this.session;if(b){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 E=this.session.getSelection();E.off("changeCursor",this.$onCursorChange),E.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:b}),this.curOp=null,b&&b._signal("changeEditor",{oldEditor:this}),b&&(b.$editor=null),h&&h._signal("changeEditor",{editor:this}),h&&(h.$editor=this),h&&!h.destroyed&&h.bgTokenizer.scheduleStart()}},S.prototype.getSession=function(){return this.session},S.prototype.setValue=function(h,b){return this.session.doc.setValue(h),b?b==1?this.navigateFileEnd():b==-1&&this.navigateFileStart():this.selectAll(),h},S.prototype.getValue=function(){return this.session.getValue()},S.prototype.getSelection=function(){return this.selection},S.prototype.resize=function(h){this.renderer.onResize(h)},S.prototype.setTheme=function(h,b){this.renderer.setTheme(h,b)},S.prototype.getTheme=function(){return this.renderer.getTheme()},S.prototype.setStyle=function(h){this.renderer.setStyle(h)},S.prototype.unsetStyle=function(h){this.renderer.unsetStyle(h)},S.prototype.getFontSize=function(){return this.getOption("fontSize")||k.computedStyle(this.container).fontSize},S.prototype.setFontSize=function(h){this.setOption("fontSize",h)},S.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var h=this;this.$highlightPending=!0,setTimeout(function(){h.$highlightPending=!1;var b=h.session;if(!(!b||b.destroyed)){b.$bracketHighlight&&(b.$bracketHighlight.markerIds.forEach(function(lt){b.removeMarker(lt)}),b.$bracketHighlight=null);var E=h.getCursorPosition(),j=h.getKeyboardHandler(),we=j&&j.$getDirectionForHighlight&&j.$getDirectionForHighlight(h),Ee=b.getMatchingBracketRanges(E,we);if(!Ee){var qe=new x(b,E.row,E.column),at=qe.getCurrentToken();if(at&&/\b(?:tag-open|tag-name)/.test(at.type)){var ct=b.getMatchingTags(E);ct&&(Ee=[ct.openTagName.isEmpty()?ct.openTag:ct.openTagName,ct.closeTagName.isEmpty()?ct.closeTag:ct.closeTagName])}}if(!Ee&&b.$mode.getMatching&&(Ee=b.$mode.getMatching(h.session)),!Ee){h.getHighlightIndentGuides()&&h.renderer.$textLayer.$highlightIndentGuide();return}var Ht="ace_bracket";Array.isArray(Ee)?Ee.length==1&&(Ht="ace_error_bracket"):Ee=[Ee],Ee.length==2&&(c.comparePoints(Ee[0].end,Ee[1].start)==0?Ee=[c.fromPoints(Ee[0].start,Ee[1].end)]:c.comparePoints(Ee[0].start,Ee[1].end)==0&&(Ee=[c.fromPoints(Ee[1].start,Ee[0].end)])),b.$bracketHighlight={ranges:Ee,markerIds:Ee.map(function(lt){return b.addMarker(lt,Ht,"text")})},h.getHighlightIndentGuides()&&h.renderer.$textLayer.$highlightIndentGuide()}},50)}},S.prototype.focus=function(){this.textInput.focus()},S.prototype.isFocused=function(){return this.textInput.isFocused()},S.prototype.blur=function(){this.textInput.blur()},S.prototype.onFocus=function(h){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",h))},S.prototype.onBlur=function(h){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",h))},S.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},S.prototype.onDocumentChange=function(h){var b=this.session.$useWrapMode,E=h.start.row==h.end.row?h.end.row:1/0;this.renderer.updateLines(h.start.row,E,b),this._signal("change",h),this.$cursorChange()},S.prototype.onTokenizerUpdate=function(h){var b=h.data;this.renderer.updateLines(b.first,b.last)},S.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},S.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},S.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},S.prototype.$updateHighlightActiveLine=function(){var h=this.getSession(),b;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(b=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(b=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(b=!1)),h.$highlightLineMarker&&!b)h.removeMarker(h.$highlightLineMarker.id),h.$highlightLineMarker=null;else if(!h.$highlightLineMarker&&b){var E=new c(b.row,b.column,b.row,1/0);E.id=h.addMarker(E,"ace_active-line","screenLine"),h.$highlightLineMarker=E}else b&&(h.$highlightLineMarker.start.row=b.row,h.$highlightLineMarker.end.row=b.row,h.$highlightLineMarker.start.column=b.column,h._signal("changeBackMarker"))},S.prototype.onSelectionChange=function(h){var b=this.session;if(b.$selectionMarker&&b.removeMarker(b.$selectionMarker),b.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var E=this.selection.getRange(),j=this.getSelectionStyle();b.$selectionMarker=b.addMarker(E,"ace_selection",j)}var we=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(we),this._signal("changeSelection")},S.prototype.$getSelectionHighLightRegexp=function(){var h=this.session,b=this.getSelectionRange();if(!(b.isEmpty()||b.isMultiLine())){var E=b.start.column,j=b.end.column,we=h.getLine(b.start.row),Ee=we.substring(E,j);if(!(Ee.length>5e3||!/[\w\d]/.test(Ee))){var qe=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:Ee}),at=we.substring(E-1,j+1);if(qe.test(at))return qe}}},S.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},S.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},S.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},S.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},S.prototype.onChangeMode=function(h){this.renderer.updateText(),this._emit("changeMode",h)},S.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},S.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},S.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},S.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},S.prototype.getCopyText=function(){var h=this.getSelectedText(),b=this.session.doc.getNewLineCharacter(),E=!1;if(!h&&this.$copyWithEmptySelection){E=!0;for(var j=this.selection.getAllRanges(),we=0;we<j.length;we++){var Ee=j[we];we&&j[we-1].start.row==Ee.start.row||(h+=this.session.getLine(Ee.start.row)+b)}}var qe={text:h};return this._signal("copy",qe),se.lineMode=E?qe.text:!1,qe.text},S.prototype.onCopy=function(){this.commands.exec("copy",this)},S.prototype.onCut=function(){this.commands.exec("cut",this)},S.prototype.onPaste=function(h,b){var E={text:h,event:b};this.commands.exec("paste",this,E)},S.prototype.$handlePaste=function(h){typeof h=="string"&&(h={text:h}),this._signal("paste",h);var b=h.text,E=b===se.lineMode,j=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)E?j.insert({row:this.selection.lead.row,column:0},b):this.insert(b);else if(E)this.selection.rangeList.ranges.forEach(function(Ht){j.insert({row:Ht.start.row,column:0},b)});else{var we=b.split(/\r\n|\r|\n/),Ee=this.selection.rangeList.ranges,qe=we.length==2&&(!we[0]||!we[1]);if(we.length!=Ee.length||qe)return this.commands.exec("insertstring",this,b);for(var at=Ee.length;at--;){var ct=Ee[at];ct.isEmpty()||j.remove(ct),j.insert(ct.start,we[at])}}},S.prototype.execCommand=function(h,b){return this.commands.exec(h,this,b)},S.prototype.insert=function(h,b){var E=this.session,j=E.getMode(),we=this.getCursorPosition();if(this.getBehavioursEnabled()&&!b){var Ee=j.transformAction(E.getState(we.row),"insertion",this,E,h);Ee&&(h!==Ee.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),h=Ee.text)}if(h==" "&&(h=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&h.indexOf(`
204
- `)==-1){var qe=c.fromPoints(we,we);qe.end.column+=h.length,this.session.remove(qe)}}else{var qe=this.getSelectionRange();we=this.session.remove(qe),this.clearSelection()}if(h==`
205
- `||h==`\r
206
- `){var lt=E.getLine(we.row);if(we.column>lt.search(/\S|$/)){var at=lt.substr(we.column).search(/\S|$/);E.doc.removeInLine(we.row,we.column,we.column+at)}}this.clearSelection();var ct=we.column,Ht=E.getState(we.row),lt=E.getLine(we.row),ut=j.checkOutdent(Ht,lt,h);if(E.insert(we,h),Ee&&Ee.selection&&(Ee.selection.length==2?this.selection.setSelectionRange(new c(we.row,ct+Ee.selection[0],we.row,ct+Ee.selection[1])):this.selection.setSelectionRange(new c(we.row+Ee.selection[0],Ee.selection[1],we.row+Ee.selection[2],Ee.selection[3]))),this.$enableAutoIndent){if(E.getDocument().isNewLine(h)){var Wt=j.getNextLineIndent(Ht,lt.slice(0,we.column),E.getTabString());E.insert({row:we.row+1,column:0},Wt)}ut&&j.autoOutdent(Ht,E,we.row)}},S.prototype.autoIndent=function(){for(var h=this.session,b=h.getMode(),E=this.selection.isEmpty()?[new c(0,0,h.doc.getLength()-1,0)]:this.selection.getAllRanges(),j="",we="",Ee="",qe=h.getTabString(),at=0;at<E.length;at++)for(var ct=E[at].start.row,Ht=E[at].end.row,lt=ct;lt<=Ht;lt++){lt>0&&(j=h.getState(lt-1),we=h.getLine(lt-1),Ee=b.getNextLineIndent(j,we,qe));var ut=h.getLine(lt),Wt=b.$getIndent(ut);if(Ee!==Wt){if(Wt.length>0){var Dt=new c(lt,0,lt,Wt.length);h.remove(Dt)}Ee.length>0&&h.insert({row:lt,column:0},Ee)}b.autoOutdent(j,h,lt)}},S.prototype.onTextInput=function(h,b){if(!b)return this.keyBinding.onTextInput(h);this.startOperation({command:{name:"insertstring"}});var E=this.applyComposition.bind(this,h,b);this.selection.rangeCount?this.forEachSelection(E):E(),this.endOperation()},S.prototype.applyComposition=function(h,b){if(b.extendLeft||b.extendRight){var E=this.selection.getRange();E.start.column-=b.extendLeft,E.end.column+=b.extendRight,E.start.column<0&&(E.start.row--,E.start.column+=this.session.getLine(E.start.row).length+1),this.selection.setRange(E),!h&&!E.isEmpty()&&this.remove()}if((h||!this.selection.isEmpty())&&this.insert(h,!0),b.restoreStart||b.restoreEnd){var E=this.selection.getRange();E.start.column-=b.restoreStart,E.end.column-=b.restoreEnd,this.selection.setRange(E)}},S.prototype.onCommandKey=function(h,b,E){return this.keyBinding.onCommandKey(h,b,E)},S.prototype.setOverwrite=function(h){this.session.setOverwrite(h)},S.prototype.getOverwrite=function(){return this.session.getOverwrite()},S.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},S.prototype.setScrollSpeed=function(h){this.setOption("scrollSpeed",h)},S.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},S.prototype.setDragDelay=function(h){this.setOption("dragDelay",h)},S.prototype.getDragDelay=function(){return this.getOption("dragDelay")},S.prototype.setSelectionStyle=function(h){this.setOption("selectionStyle",h)},S.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},S.prototype.setHighlightActiveLine=function(h){this.setOption("highlightActiveLine",h)},S.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},S.prototype.setHighlightGutterLine=function(h){this.setOption("highlightGutterLine",h)},S.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},S.prototype.setHighlightSelectedWord=function(h){this.setOption("highlightSelectedWord",h)},S.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},S.prototype.setAnimatedScroll=function(h){this.renderer.setAnimatedScroll(h)},S.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},S.prototype.setShowInvisibles=function(h){this.renderer.setShowInvisibles(h)},S.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},S.prototype.setDisplayIndentGuides=function(h){this.renderer.setDisplayIndentGuides(h)},S.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},S.prototype.setHighlightIndentGuides=function(h){this.renderer.setHighlightIndentGuides(h)},S.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},S.prototype.setShowPrintMargin=function(h){this.renderer.setShowPrintMargin(h)},S.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},S.prototype.setPrintMarginColumn=function(h){this.renderer.setPrintMarginColumn(h)},S.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},S.prototype.setReadOnly=function(h){this.setOption("readOnly",h)},S.prototype.getReadOnly=function(){return this.getOption("readOnly")},S.prototype.setBehavioursEnabled=function(h){this.setOption("behavioursEnabled",h)},S.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},S.prototype.setWrapBehavioursEnabled=function(h){this.setOption("wrapBehavioursEnabled",h)},S.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},S.prototype.setShowFoldWidgets=function(h){this.setOption("showFoldWidgets",h)},S.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},S.prototype.setFadeFoldWidgets=function(h){this.setOption("fadeFoldWidgets",h)},S.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},S.prototype.remove=function(h){this.selection.isEmpty()&&(h=="left"?this.selection.selectLeft():this.selection.selectRight());var b=this.getSelectionRange();if(this.getBehavioursEnabled()){var E=this.session,j=E.getState(b.start.row),we=E.getMode().transformAction(j,"deletion",this,E,b);if(b.end.column===0){var Ee=E.getTextRange(b);if(Ee[Ee.length-1]==`
207
- `){var qe=E.getLine(b.end.row);/^\s+$/.test(qe)&&(b.end.column=qe.length)}}we&&(b=we)}this.session.remove(b),this.clearSelection()},S.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},S.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},S.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},S.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()},S.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var h=this.getCursorPosition();this.insert(`
208
- `),this.moveCursorToPosition(h)},S.prototype.setGhostText=function(h,b){this.renderer.setGhostText(h,b)},S.prototype.removeGhostText=function(){this.renderer.removeGhostText()},S.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var h=this.getCursorPosition(),b=h.column;if(b!==0){var E=this.session.getLine(h.row),j,we;b<E.length?(j=E.charAt(b)+E.charAt(b-1),we=new c(h.row,b-1,h.row,b+1)):(j=E.charAt(b-1)+E.charAt(b-2),we=new c(h.row,b-2,h.row,b)),this.session.replace(we,j),this.session.selection.moveToPosition(we.end)}}},S.prototype.toLowerCase=function(){var h=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var b=this.getSelectionRange(),E=this.session.getTextRange(b);this.session.replace(b,E.toLowerCase()),this.selection.setSelectionRange(h)},S.prototype.toUpperCase=function(){var h=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var b=this.getSelectionRange(),E=this.session.getTextRange(b);this.session.replace(b,E.toUpperCase()),this.selection.setSelectionRange(h)},S.prototype.indent=function(){var h=this.session,b=this.getSelectionRange();if(b.start.row<b.end.row){var E=this.$getSelectedRows();h.indentRows(E.first,E.last," ");return}else if(b.start.column<b.end.column){var j=h.getTextRange(b);if(!/^\s+$/.test(j)){var E=this.$getSelectedRows();h.indentRows(E.first,E.last," ");return}}var we=h.getLine(b.start.row),Ee=b.start,qe=h.getTabSize(),at=h.documentToScreenColumn(Ee.row,Ee.column);if(this.session.getUseSoftTabs())var ct=qe-at%qe,Ht=a.stringRepeat(" ",ct);else{for(var ct=at%qe;we[b.start.column-1]==" "&&ct;)b.start.column--,ct--;this.selection.setSelectionRange(b),Ht=" "}return this.insert(Ht)},S.prototype.blockIndent=function(){var h=this.$getSelectedRows();this.session.indentRows(h.first,h.last," ")},S.prototype.blockOutdent=function(){var h=this.session.getSelection();this.session.outdentRows(h.getRange())},S.prototype.sortLines=function(){for(var h=this.$getSelectedRows(),b=this.session,E=[],j=h.first;j<=h.last;j++)E.push(b.getLine(j));E.sort(function(qe,at){return qe.toLowerCase()<at.toLowerCase()?-1:qe.toLowerCase()>at.toLowerCase()?1:0});for(var we=new c(0,0,0,0),j=h.first;j<=h.last;j++){var Ee=b.getLine(j);we.start.row=j,we.end.row=j,we.end.column=Ee.length,b.replace(we,E[j-h.first])}},S.prototype.toggleCommentLines=function(){var h=this.session.getState(this.getCursorPosition().row),b=this.$getSelectedRows();this.session.getMode().toggleCommentLines(h,this.session,b.first,b.last)},S.prototype.toggleBlockComment=function(){var h=this.getCursorPosition(),b=this.session.getState(h.row),E=this.getSelectionRange();this.session.getMode().toggleBlockComment(b,this.session,E,h)},S.prototype.getNumberAt=function(h,b){var E=/[\-]?[0-9]+(?:\.[0-9]+)?/g;E.lastIndex=0;for(var j=this.session.getLine(h);E.lastIndex<b;){var we=E.exec(j);if(we.index<=b&&we.index+we[0].length>=b){var Ee={value:we[0],start:we.index,end:we.index+we[0].length};return Ee}}return null},S.prototype.modifyNumber=function(h){var b=this.selection.getCursor().row,E=this.selection.getCursor().column,j=new c(b,E-1,b,E),we=this.session.getTextRange(j);if(!isNaN(parseFloat(we))&&isFinite(we)){var Ee=this.getNumberAt(b,E);if(Ee){var qe=Ee.value.indexOf(".")>=0?Ee.start+Ee.value.indexOf(".")+1:Ee.end,at=Ee.start+Ee.value.length-qe,ct=parseFloat(Ee.value);ct*=Math.pow(10,at),qe!==Ee.end&&E<qe?h*=Math.pow(10,Ee.end-E-1):h*=Math.pow(10,Ee.end-E),ct+=h,ct/=Math.pow(10,at);var Ht=ct.toFixed(at),lt=new c(b,Ee.start,b,Ee.end);this.session.replace(lt,Ht),this.moveCursorTo(b,Math.max(Ee.start+1,E+Ht.length-Ee.value.length))}}else this.toggleWord()},S.prototype.toggleWord=function(){var h=this.selection.getCursor().row,b=this.selection.getCursor().column;this.selection.selectWord();var E=this.getSelectedText(),j=this.selection.getWordRange().start.column,we=E.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),Ee=b-j-1;Ee<0&&(Ee=0);var qe=0,at=0,ct=this;E.match(/[A-Za-z0-9_]+/)&&we.forEach(function(Jt,gi){at=qe+Jt.length,Ee>=qe&&Ee<=at&&(E=Jt,ct.selection.clearSelection(),ct.moveCursorTo(h,qe+j),ct.selection.selectTo(h,at+j)),qe=at});for(var Ht=this.$toggleWordPairs,lt,ut=0;ut<Ht.length;ut++)for(var Wt=Ht[ut],Dt=0;Dt<=1;Dt++){var Vt=+!Dt,hi=E.match(new RegExp("^\\s?_?("+a.escapeRegExp(Wt[Dt])+")\\s?$","i"));if(hi){var di=E.match(new RegExp("([_]|^|\\s)("+a.escapeRegExp(hi[1])+")($|\\s)","g"));di&&(lt=E.replace(new RegExp(a.escapeRegExp(Wt[Dt]),"i"),function(Jt){var gi=Wt[Vt];return Jt.toUpperCase()==Jt?gi=gi.toUpperCase():Jt.charAt(0).toUpperCase()==Jt.charAt(0)&&(gi=gi.substr(0,0)+Wt[Vt].charAt(0).toUpperCase()+gi.substr(1)),gi}),this.insert(lt),lt="")}}},S.prototype.findLinkAt=function(h,b){var E,j,we=this.session.getLine(h),Ee=we.split(/((?:https?|ftp):\/\/[\S]+)/),qe=b;qe<0&&(qe=0);var at=0,ct=0,Ht;try{for(var lt=L(Ee),ut=lt.next();!ut.done;ut=lt.next()){var Wt=ut.value;if(ct=at+Wt.length,qe>=at&&qe<=ct&&Wt.match(/((?:https?|ftp):\/\/[\S]+)/)){Ht=Wt.replace(/[\s:.,'";}\]]+$/,"");break}at=ct}}catch(Dt){E={error:Dt}}finally{try{ut&&!ut.done&&(j=lt.return)&&j.call(lt)}finally{if(E)throw E.error}}return Ht},S.prototype.openLink=function(){var h=this.selection.getCursor(),b=this.findLinkAt(h.row,h.column);return b&&window.open(b,"_blank"),b!=null},S.prototype.removeLines=function(){var h=this.$getSelectedRows();this.session.removeFullLines(h.first,h.last),this.clearSelection()},S.prototype.duplicateSelection=function(){var h=this.selection,b=this.session,E=h.getRange(),j=h.isBackwards();if(E.isEmpty()){var we=E.start.row;b.duplicateLines(we,we)}else{var Ee=j?E.start:E.end,qe=b.insert(Ee,b.getTextRange(E));E.start=Ee,E.end=qe,h.setSelectionRange(E,j)}},S.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},S.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},S.prototype.moveText=function(h,b,E){return this.session.moveText(h,b,E)},S.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},S.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},S.prototype.$moveLines=function(h,b){var E,j,we=this.selection;if(!we.inMultiSelectMode||this.inVirtualSelectionMode){var Ee=we.toOrientedRange();E=this.$getSelectedRows(Ee),j=this.session.$moveLines(E.first,E.last,b?0:h),b&&h==-1&&(j=0),Ee.moveBy(j,0),we.fromOrientedRange(Ee)}else{var qe=we.rangeList.ranges;we.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var at=0,ct=0,Ht=qe.length,lt=0;lt<Ht;lt++){var ut=lt;qe[lt].moveBy(at,0),E=this.$getSelectedRows(qe[lt]);for(var Wt=E.first,Dt=E.last;++lt<Ht;){ct&&qe[lt].moveBy(ct,0);var Vt=this.$getSelectedRows(qe[lt]);if(b&&Vt.first!=Dt)break;if(!b&&Vt.first>Dt+1)break;Dt=Vt.last}for(lt--,at=this.session.$moveLines(Wt,Dt,b?0:h),b&&h==-1&&(ut=lt+1);ut<=lt;)qe[ut].moveBy(at,0),ut++;b||(at=0),ct+=at}we.fromOrientedRange(we.ranges[0]),we.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},S.prototype.$getSelectedRows=function(h){return h=(h||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(h.start.row),last:this.session.getRowFoldEnd(h.end.row)}},S.prototype.onCompositionStart=function(h){this.renderer.showComposition(h)},S.prototype.onCompositionUpdate=function(h){this.renderer.setCompositionText(h)},S.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},S.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},S.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},S.prototype.isRowVisible=function(h){return h>=this.getFirstVisibleRow()&&h<=this.getLastVisibleRow()},S.prototype.isRowFullyVisible=function(h){return h>=this.renderer.getFirstFullyVisibleRow()&&h<=this.renderer.getLastFullyVisibleRow()},S.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},S.prototype.$moveByPage=function(h,b){var E=this.renderer,j=this.renderer.layerConfig,we=h*Math.floor(j.height/j.lineHeight);b===!0?this.selection.$moveSelection(function(){this.moveCursorBy(we,0)}):b===!1&&(this.selection.moveCursorBy(we,0),this.selection.clearSelection());var Ee=E.scrollTop;E.scrollBy(0,we*j.lineHeight),b!=null&&E.scrollCursorIntoView(null,.5),E.animateScrolling(Ee)},S.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},S.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},S.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},S.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},S.prototype.scrollPageDown=function(){this.$moveByPage(1)},S.prototype.scrollPageUp=function(){this.$moveByPage(-1)},S.prototype.scrollToRow=function(h){this.renderer.scrollToRow(h)},S.prototype.scrollToLine=function(h,b,E,j){this.renderer.scrollToLine(h,b,E,j)},S.prototype.centerSelection=function(){var h=this.getSelectionRange(),b={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(b,.5)},S.prototype.getCursorPosition=function(){return this.selection.getCursor()},S.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},S.prototype.getSelectionRange=function(){return this.selection.getRange()},S.prototype.selectAll=function(){this.selection.selectAll()},S.prototype.clearSelection=function(){this.selection.clearSelection()},S.prototype.moveCursorTo=function(h,b){this.selection.moveCursorTo(h,b)},S.prototype.moveCursorToPosition=function(h){this.selection.moveCursorToPosition(h)},S.prototype.jumpToMatching=function(h,b){var E=this.getCursorPosition(),j=new x(this.session,E.row,E.column),we=j.getCurrentToken(),Ee=0;we&&we.type.indexOf("tag-name")!==-1&&(we=j.stepBackward());var qe=we||j.stepForward();if(qe){var at,ct=!1,Ht={},lt=E.column-qe.start,ut,Wt={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(qe.value.match(/[{}()\[\]]/g)){for(;lt<qe.value.length&&!ct;lt++)if(Wt[qe.value[lt]])switch(ut=Wt[qe.value[lt]]+"."+qe.type.replace("rparen","lparen"),isNaN(Ht[ut])&&(Ht[ut]=0),qe.value[lt]){case"(":case"[":case"{":Ht[ut]++;break;case")":case"]":case"}":Ht[ut]--,Ht[ut]===-1&&(at="bracket",ct=!0);break}}else qe.type.indexOf("tag-name")!==-1&&(isNaN(Ht[qe.value])&&(Ht[qe.value]=0),we.value==="<"&&Ee>1?Ht[qe.value]++:we.value==="</"&&Ht[qe.value]--,Ht[qe.value]===-1&&(at="tag",ct=!0));ct||(we=qe,Ee++,qe=j.stepForward(),lt=0)}while(qe&&!ct);if(at){var Dt,Vt;if(at==="bracket")Dt=this.session.getBracketRange(E),Dt||(Dt=new c(j.getCurrentTokenRow(),j.getCurrentTokenColumn()+lt-1,j.getCurrentTokenRow(),j.getCurrentTokenColumn()+lt-1),Vt=Dt.start,(b||Vt.row===E.row&&Math.abs(Vt.column-E.column)<2)&&(Dt=this.session.getBracketRange(Vt)));else if(at==="tag"){if(!qe||qe.type.indexOf("tag-name")===-1)return;if(Dt=new c(j.getCurrentTokenRow(),j.getCurrentTokenColumn()-2,j.getCurrentTokenRow(),j.getCurrentTokenColumn()-2),Dt.compare(E.row,E.column)===0){var hi=this.session.getMatchingTags(E);hi&&(hi.openTag.contains(E.row,E.column)?(Dt=hi.closeTag,Vt=Dt.start):(Dt=hi.openTag,hi.closeTag.start.row===E.row&&hi.closeTag.start.column===E.column?Vt=Dt.end:Vt=Dt.start))}Vt=Vt||Dt.start}Vt=Dt&&Dt.cursor||Vt,Vt&&(h?Dt&&b?this.selection.setRange(Dt):Dt&&Dt.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(Vt.row,Vt.column):this.selection.moveTo(Vt.row,Vt.column))}}},S.prototype.gotoLine=function(h,b,E){this.selection.clearSelection(),this.session.unfold({row:h-1,column:b||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(h-1,b||0),this.isRowFullyVisible(h-1)||this.scrollToLine(h-1,!0,E)},S.prototype.navigateTo=function(h,b){this.selection.moveTo(h,b)},S.prototype.navigateUp=function(h){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var b=this.selection.anchor.getPosition();return this.moveCursorToPosition(b)}this.selection.clearSelection(),this.selection.moveCursorBy(-h||-1,0)},S.prototype.navigateDown=function(h){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var b=this.selection.anchor.getPosition();return this.moveCursorToPosition(b)}this.selection.clearSelection(),this.selection.moveCursorBy(h||1,0)},S.prototype.navigateLeft=function(h){if(this.selection.isEmpty())for(h=h||1;h--;)this.selection.moveCursorLeft();else{var b=this.getSelectionRange().start;this.moveCursorToPosition(b)}this.clearSelection()},S.prototype.navigateRight=function(h){if(this.selection.isEmpty())for(h=h||1;h--;)this.selection.moveCursorRight();else{var b=this.getSelectionRange().end;this.moveCursorToPosition(b)}this.clearSelection()},S.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},S.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},S.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},S.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},S.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},S.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},S.prototype.replace=function(h,b){b&&this.$search.set(b);var E=this.$search.find(this.session),j=0;return E&&(this.$tryReplace(E,h)&&(j=1),this.selection.setSelectionRange(E),this.renderer.scrollSelectionIntoView(E.start,E.end)),j},S.prototype.replaceAll=function(h,b){b&&this.$search.set(b);var E=this.$search.findAll(this.session),j=0;if(!E.length)return j;var we=this.getSelectionRange();this.selection.moveTo(0,0);for(var Ee=E.length-1;Ee>=0;--Ee)this.$tryReplace(E[Ee],h)&&j++;return this.selection.setSelectionRange(we),j},S.prototype.$tryReplace=function(h,b){var E=this.session.getTextRange(h);return b=this.$search.replace(E,b),b!==null?(h.end=this.session.replace(h,b),h):null},S.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},S.prototype.find=function(h,b,E){b||(b={}),typeof h=="string"||h instanceof RegExp?b.needle=h:typeof h=="object"&&A.mixin(b,h);var j=this.selection.getRange();b.needle==null&&(h=this.session.getTextRange(j)||this.$search.$options.needle,h||(j=this.session.getWordRange(j.start.row,j.start.column),h=this.session.getTextRange(j)),this.$search.set({needle:h})),this.$search.set(b),b.start||this.$search.set({start:j});var we=this.$search.find(this.session);if(b.preventScroll)return we;if(we)return this.revealRange(we,E),we;b.backwards?j.start=j.end:j.end=j.start,this.selection.setRange(j)},S.prototype.findNext=function(h,b){this.find({skipCurrent:!0,backwards:!1},h,b)},S.prototype.findPrevious=function(h,b){this.find(h,{skipCurrent:!0,backwards:!0},b)},S.prototype.revealRange=function(h,b){this.session.unfold(h),this.selection.setSelectionRange(h);var E=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(h.start,h.end,.5),b!==!1&&this.renderer.animateScrolling(E)},S.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},S.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},S.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()},S.prototype.setAutoScrollEditorIntoView=function(h){if(h){var b,E=this,j=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var we=this.$scrollAnchor;we.style.cssText="position:absolute",this.container.insertBefore(we,this.container.firstChild);var Ee=this.on("changeSelection",function(){j=!0}),qe=this.renderer.on("beforeRender",function(){j&&(b=E.renderer.container.getBoundingClientRect())}),at=this.renderer.on("afterRender",function(){if(j&&b&&(E.isFocused()||E.searchBox&&E.searchBox.isFocused())){var ct=E.renderer,Ht=ct.$cursorLayer.$pixelPos,lt=ct.layerConfig,ut=Ht.top-lt.offset;Ht.top>=0&&ut+b.top<0?j=!0:Ht.top<lt.height&&Ht.top+b.top+lt.lineHeight>window.innerHeight?j=!1:j=null,j!=null&&(we.style.top=ut+"px",we.style.left=Ht.left+"px",we.style.height=lt.lineHeight+"px",we.scrollIntoView(j)),j=b=null}});this.setAutoScrollEditorIntoView=function(ct){ct||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",Ee),this.renderer.off("afterRender",at),this.renderer.off("beforeRender",qe))}}},S.prototype.$resetCursorStyle=function(){var h=this.$cursorStyle||"ace",b=this.renderer.$cursorLayer;b&&(b.setSmoothBlinking(/smooth/.test(h)),b.isBlinking=!this.$readOnly&&h!="wide",k.setCssClass(b.element,"ace_slim-cursors",/slim/.test(h)))},S.prototype.prompt=function(h,b,E){var j=this;M.loadModule("ace/ext/prompt",function(we){we.prompt(j,h,b,E)})},S}();O.$uid=0,O.prototype.curOp=null,O.prototype.prevOp={},O.prototype.$mergeableCommands=["backspace","del","insertstring"],O.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"],["&&","||"],["==","!="]],A.implement(O.prototype,f),M.defineOptions(O.prototype,"editor",{selectionStyle:{set:function(S){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:S})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(S){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(S){this.textInput.setReadOnly(S),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(S){this.textInput.setCopyWithEmptySelection(S)},initialValue:!1},cursorStyle:{set:function(S){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(S){this.setAutoScrollEditorIntoView(S)}},keyboardHandler:{set:function(S){this.setKeyboardHandler(S)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(S){this.session.setValue(S)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(S){this.setSession(S)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(S){this.renderer.$gutterLayer.setShowLineNumbers(S),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),S&&this.$relativeLineNumbers?_e.attach(this):_e.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(S){this.$showLineNumbers&&S?_e.attach(this):_e.detach(this)}},placeholder:{set:function(S){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),k.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),k.addCssClass(this.container,"ace_hasPlaceholder");var b=k.createElement("div");b.className="ace_placeholder",b.textContent=this.$placeholder||"",this.renderer.placeholderNode=b,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(S){var h={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(j){j.blur(),j.renderer.scroller.focus()},readOnly:!0},b=function(j){if(j.target==this.renderer.scroller&&j.keyCode===X.enter){j.preventDefault();var we=this.getCursorPosition().row;this.isRowVisible(we)||this.scrollToLine(we,!0,!0),this.focus()}},E;S?(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",U("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",U("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",b.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",U("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",U("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),E||(E=new _(this)),E.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",b.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),E&&E.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(S){this.$textInputAriaLabel=S},initialValue:""},enableMobileMenu:{set:function(S){this.$enableMobileMenu=S},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 _e={getText:function(S,h){return(Math.abs(S.selection.lead.row-h)||h+1+(h<9?"·":""))+""},getWidth:function(S,h,b){return Math.max(h.toString().length,(b.lastRow+1).toString().length,2)*b.characterWidth},update:function(S,h){h.renderer.$loop.schedule(h.renderer.CHANGE_GUTTER)},attach:function(S){S.renderer.$gutterLayer.$renderer=this,S.on("changeSelection",this.update),this.update(null,S)},detach:function(S){S.renderer.$gutterLayer.$renderer==this&&(S.renderer.$gutterLayer.$renderer=null),S.off("changeSelection",this.update),this.update(null,S)}};g.Editor=O}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(d,g,J){var L=d("../lib/dom"),A=function(){function k(a,u){this.element=a,this.canvasHeight=u||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return k.prototype.moveContainer=function(a){L.translate(this.element,0,-(a.firstRowScreen*a.lineHeight%this.canvasHeight)-a.offset*this.$offsetCoefficient)},k.prototype.pageChanged=function(a,u){return Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)!==Math.floor(u.firstRowScreen*u.lineHeight/this.canvasHeight)},k.prototype.computeLineTop=function(a,u,r){var i=u.firstRowScreen*u.lineHeight,o=Math.floor(i/this.canvasHeight),t=r.documentToScreenRow(a,0)*u.lineHeight;return t-o*this.canvasHeight},k.prototype.computeLineHeight=function(a,u,r){return u.lineHeight*r.getRowLineCount(a)},k.prototype.getLength=function(){return this.cells.length},k.prototype.get=function(a){return this.cells[a]},k.prototype.shift=function(){this.$cacheCell(this.cells.shift())},k.prototype.pop=function(){this.$cacheCell(this.cells.pop())},k.prototype.push=function(a){if(Array.isArray(a)){this.cells.push.apply(this.cells,a);for(var u=L.createFragment(this.element),r=0;r<a.length;r++)u.appendChild(a[r].element);this.element.appendChild(u)}else this.cells.push(a),this.element.appendChild(a.element)},k.prototype.unshift=function(a){if(Array.isArray(a)){this.cells.unshift.apply(this.cells,a);for(var u=L.createFragment(this.element),r=0;r<a.length;r++)u.appendChild(a[r].element);this.element.firstChild?this.element.insertBefore(u,this.element.firstChild):this.element.appendChild(u)}else this.cells.unshift(a),this.element.insertAdjacentElement("afterbegin",a.element)},k.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},k.prototype.$cacheCell=function(a){a&&(a.element.remove(),this.cellCache.push(a))},k.prototype.createCell=function(a,u,r,i){var o=this.cellCache.pop();if(!o){var t=L.createElement("div");i&&i(t),this.element.appendChild(t),o={element:t,text:"",row:a}}return o.row=a,o},k}();g.Lines=A}),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(d,g,J){var L=d("../lib/dom"),A=d("../lib/oop"),k=d("../lib/lang"),a=d("../lib/event_emitter").EventEmitter,u=d("./lines").Lines,r=d("../config").nls,i=function(){function t(e){this.element=L.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 c=e[n],f=c.row,m=this.$annotations[f];m||(m=this.$annotations[f]={text:[],type:[],displayText:[]});var D=c.text,M=c.text,x=c.type;D=D?k.escapeHTML(D):c.html||"",M=M||c.html||"",m.text.indexOf(D)===-1&&(m.text.push(D),m.type.push(x),m.displayText.push(M));var _=c.className;_?m.className=_:x==="error"?m.className=" ace_error":x==="security"&&!/\bace_error\b/.test(m.className)?m.className=" ace_security":x==="warning"&&!/\bace_(error|security)\b/.test(m.className)?m.className=" ace_warning":x==="info"&&!m.className?m.className=" ace_info":x==="hint"&&!m.className&&(m.className=" ace_hint")}},t.prototype.$updateAnnotations=function(e){if(this.$annotations.length){var n=e.start.row,c=e.end.row-n;if(c!==0)if(e.action=="remove")this.$annotations.splice(n,c+1,null);else{var f=new Array(c+1);f.unshift(n,1),this.$annotations.splice.apply(this.$annotations,f)}}},t.prototype.update=function(e){this.config=e;var n=this.session,c=e.firstRow,f=Math.min(e.lastRow+e.gutterOffset,n.getLength()-1);this.oldLastRow=f,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var m=n.getNextFoldLine(c),D=m?m.start.row:1/0,M=null,x=-1,_=c;;){if(_>D&&(_=m.end.row+1,m=n.getNextFoldLine(_,m),D=m?m.start.row:1/0),_>f){for(;this.$lines.getLength()>x+1;)this.$lines.pop();break}M=this.$lines.get(++x),M?M.row=_:(M=this.$lines.createCell(_,e,this.session,o),this.$lines.push(M)),this.$renderCell(M,e,m,_),_++}this._signal("afterRender"),this.$updateGutterWidth(e)},t.prototype.$updateGutterWidth=function(e){var n=this.session,c=n.gutterRenderer||this.$renderer,f=n.$firstLineNumber,m=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||n.$useWrapMode)&&(m=n.getLength()+f-1);var D=c?c.getWidth(n,m,e):m.toString().length*e.characterWidth,M=this.$padding||this.$computePadding();D+=M.left+M.right,D!==this.gutterWidth&&!isNaN(D)&&(this.gutterWidth=D,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",D))},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 c=0;c<n.length;c++){var f=n[c];if(f.row>=this.$cursorRow){if(f.row>this.$cursorRow){var m=this.session.getFoldLine(this.$cursorRow);if(c>0&&m&&m.start.row==n[c-1].row)f=n[c-1];else break}f.element.className="ace_gutter-active-line "+f.element.className,this.$cursorCell=f;break}}}}},t.prototype.scrollLines=function(e){var n=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(n,e))return this.update(e);this.$lines.moveContainer(e);var c=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),f=this.oldLastRow;if(this.oldLastRow=c,!n||f<e.firstRow)return this.update(e);if(c<n.firstRow)return this.update(e);if(n.firstRow<e.firstRow)for(var m=this.session.getFoldedRowCount(n.firstRow,e.firstRow-1);m>0;m--)this.$lines.shift();if(f>c)for(var m=this.session.getFoldedRowCount(c+1,f);m>0;m--)this.$lines.pop();e.firstRow<n.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,n.firstRow-1)),c>f&&this.$lines.push(this.$renderLines(e,f+1,c)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},t.prototype.$renderLines=function(e,n,c){for(var f=[],m=n,D=this.session.getNextFoldLine(m),M=D?D.start.row:1/0;m>M&&(m=D.end.row+1,D=this.session.getNextFoldLine(m,D),M=D?D.start.row:1/0),!(m>c);){var x=this.$lines.createCell(m,e,this.session,o);this.$renderCell(x,e,D,m),f.push(x),m++}return f},t.prototype.$renderCell=function(e,n,c,f){var m=e.element,D=this.session,M=m.childNodes[0],x=m.childNodes[1],_=m.childNodes[2],U=_.firstChild,se=D.$firstLineNumber,X=D.$breakpoints,O=D.$decorations,_e=D.gutterRenderer||this.$renderer,S=this.$showFoldWidgets&&D.foldWidgets,h=c?c.start.row:Number.MAX_VALUE,b=n.lineHeight+"px",E=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",j=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",we=(_e?_e.getText(D,f):f+se).toString();if(this.$highlightGutterLine&&(f==this.$cursorRow||c&&f<this.$cursorRow&&f>=h&&this.$cursorRow<=c.end.row)&&(E+="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)),X[f]&&(E+=X[f]),O[f]&&(E+=O[f]),this.$annotations[f]&&f!==h&&(E+=this.$annotations[f].className),S){var Ee=S[f];Ee==null&&(Ee=S[f]=D.getFoldWidget(f))}if(Ee){var qe="ace_fold-widget ace_"+Ee,at=Ee=="start"&&f==h&&f<c.end.row;if(at){qe+=" ace_closed";for(var ct="",Ht=!1,lt=f+1;lt<=c.end.row;lt++)if(this.$annotations[lt]){if(this.$annotations[lt].className===" ace_error"){Ht=!0,ct=" ace_error_fold";break}this.$annotations[lt].className===" ace_security"?(Ht=!0,ct=" ace_security_fold"):this.$annotations[lt].className===" ace_warning"&&ct!==" ace_security_fold"&&(Ht=!0,ct=" ace_warning_fold")}E+=ct}else qe+=" ace_open";x.className!=qe&&(x.className=qe),L.setStyle(x.style,"height",b),L.setStyle(x.style,"display","inline-block"),x.setAttribute("role","button"),x.setAttribute("tabindex","-1");var ut=D.getFoldWidgetRange(f);ut?x.setAttribute("aria-label",r("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[ut.start.row+1,ut.end.row+1])):c?x.setAttribute("aria-label",r("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[c.start.row+1,c.end.row+1])):x.setAttribute("aria-label",r("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[f+1])),at?(x.setAttribute("aria-expanded","false"),x.setAttribute("title",r("gutter.code-folding.closed.title","Unfold code"))):(x.setAttribute("aria-expanded","true"),x.setAttribute("title",r("gutter.code-folding.open.title","Fold code")))}else x&&(L.setStyle(x.style,"display","none"),x.setAttribute("tabindex","0"),x.removeAttribute("role"),x.removeAttribute("aria-label"));if(Ht&&this.$showFoldedAnnotations){_.className="ace_gutter_annotation",U.className=j,U.className+=ct,L.setStyle(U.style,"height",b),L.setStyle(_.style,"display","block"),L.setStyle(_.style,"height",b);var Wt;switch(ct){case" ace_error_fold":Wt=r("gutter.annotation.aria-label.error","Error, read annotations row $0",[we]);break;case" ace_security_fold":Wt=r("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[we]);break;case" ace_warning_fold":Wt=r("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[we]);break}_.setAttribute("aria-label",Wt),_.setAttribute("tabindex","-1"),_.setAttribute("role","button")}else if(this.$annotations[f]){_.className="ace_gutter_annotation",U.className=j,this.$useSvgGutterIcons?U.className+=this.$annotations[f].className:m.classList.add(this.$annotations[f].className.replace(" ","")),L.setStyle(U.style,"height",b),L.setStyle(_.style,"display","block"),L.setStyle(_.style,"height",b);var Wt;switch(this.$annotations[f].className){case" ace_error":Wt=r("gutter.annotation.aria-label.error","Error, read annotations row $0",[we]);break;case" ace_security":Wt=r("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[we]);break;case" ace_warning":Wt=r("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[we]);break;case" ace_info":Wt=r("gutter.annotation.aria-label.info","Info, read annotations row $0",[we]);break;case" ace_hint":Wt=r("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[we]);break}_.setAttribute("aria-label",Wt),_.setAttribute("tabindex","-1"),_.setAttribute("role","button")}else L.setStyle(_.style,"display","none"),_.removeAttribute("aria-label"),_.removeAttribute("role"),_.setAttribute("tabindex","0");return we!==M.data&&(M.data=we),m.className!=E&&(m.className=E),L.setStyle(e.element.style,"height",this.$lines.computeLineHeight(f,n,D)+"px"),L.setStyle(e.element.style,"top",this.$lines.computeLineTop(f,n,D)+"px"),e.text=we,_.style.display==="none"&&x.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?L.addCssClass(this.element,"ace_folding-enabled"):L.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=L.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(),c=this.element.getBoundingClientRect();if(e.x<n.left+c.left)return"markers";if(this.$showFoldWidgets&&e.x>c.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,A.implement(i.prototype,a);function o(t){var e=document.createTextNode("");t.appendChild(e);var n=L.createElement("span");t.appendChild(n);var c=L.createElement("span");t.appendChild(c);var f=L.createElement("span");return c.appendChild(f),t}g.Gutter=i}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(d,g,J){var L=d("../range").Range,A=d("../lib/dom"),k=function(){function u(r){this.element=A.createElement("div"),this.element.className="ace_layer ace_marker-layer",r.appendChild(this.element)}return u.prototype.setPadding=function(r){this.$padding=r},u.prototype.setSession=function(r){this.session=r},u.prototype.setMarkers=function(r){this.markers=r},u.prototype.elt=function(r,i){var o=this.i!=-1&&this.element.childNodes[this.i];o?this.i++:(o=document.createElement("div"),this.element.appendChild(o),this.i=-1),o.style.cssText=i,o.className=r},u.prototype.update=function(r){if(r){this.config=r,this.i=0;var i;for(var o in this.markers){var t=this.markers[o];if(!t.range){t.update(i,this,this.session,r);continue}var e=t.range.clipRows(r.firstRow,r.lastRow);if(!e.isEmpty())if(e=e.toScreenRange(this.session),t.renderer){var n=this.$getTop(e.start.row,r),c=this.$padding+e.start.column*r.characterWidth;t.renderer(i,e,c,n,r)}else t.type=="fullLine"?this.drawFullLineMarker(i,e,t.clazz,r):t.type=="screenLine"?this.drawScreenLineMarker(i,e,t.clazz,r):e.isMultiLine()?t.type=="text"?this.drawTextMarker(i,e,t.clazz,r):this.drawMultiLineMarker(i,e,t.clazz,r):this.drawSingleLineMarker(i,e,t.clazz+" ace_start ace_br15",r)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},u.prototype.$getTop=function(r,i){return(r-i.firstRowScreen)*i.lineHeight},u.prototype.drawTextMarker=function(r,i,o,t,e){for(var n=this.session,c=i.start.row,f=i.end.row,m=c,D=0,M=0,x=n.getScreenLastRowColumn(m),_=new L(m,i.start.column,m,M);m<=f;m++)_.start.row=_.end.row=m,_.start.column=m==c?i.start.column:n.getRowWrapIndent(m),_.end.column=x,D=M,M=x,x=m+1<f?n.getScreenLastRowColumn(m+1):m==f?0:i.end.column,this.drawSingleLineMarker(r,_,o+(m==c?" ace_start":"")+" ace_br"+a(m==c||m==c+1&&i.start.column,D<M,M>x,m==f),t,m==f?0:1,e)},u.prototype.drawMultiLineMarker=function(r,i,o,t,e){var n=this.$padding,c=t.lineHeight,f=this.$getTop(i.start.row,t),m=n+i.start.column*t.characterWidth;if(e=e||"",this.session.$bidiHandler.isBidiRow(i.start.row)){var D=i.clone();D.end.row=D.start.row,D.end.column=this.session.getLine(D.start.row).length,this.drawBidiSingleLineMarker(r,D,o+" ace_br1 ace_start",t,null,e)}else this.elt(o+" ace_br1 ace_start","height:"+c+"px;right:"+n+"px;top:"+f+"px;left:"+m+"px;"+(e||""));if(this.session.$bidiHandler.isBidiRow(i.end.row)){var D=i.clone();D.start.row=D.end.row,D.start.column=0,this.drawBidiSingleLineMarker(r,D,o+" ace_br12",t,null,e)}else{f=this.$getTop(i.end.row,t);var M=i.end.column*t.characterWidth;this.elt(o+" ace_br12","height:"+c+"px;width:"+M+"px;top:"+f+"px;left:"+n+"px;"+(e||""))}if(c=(i.end.row-i.start.row-1)*t.lineHeight,!(c<=0)){f=this.$getTop(i.start.row+1,t);var x=(i.start.column?1:0)|(i.end.column?0:8);this.elt(o+(x?" ace_br"+x:""),"height:"+c+"px;right:"+n+"px;top:"+f+"px;left:"+n+"px;"+(e||""))}},u.prototype.drawSingleLineMarker=function(r,i,o,t,e,n){if(this.session.$bidiHandler.isBidiRow(i.start.row))return this.drawBidiSingleLineMarker(r,i,o,t,e,n);var c=t.lineHeight,f=(i.end.column+(e||0)-i.start.column)*t.characterWidth,m=this.$getTop(i.start.row,t),D=this.$padding+i.start.column*t.characterWidth;this.elt(o,"height:"+c+"px;width:"+f+"px;top:"+m+"px;left:"+D+"px;"+(n||""))},u.prototype.drawBidiSingleLineMarker=function(r,i,o,t,e,n){var c=t.lineHeight,f=this.$getTop(i.start.row,t),m=this.$padding,D=this.session.$bidiHandler.getSelections(i.start.column,i.end.column);D.forEach(function(M){this.elt(o,"height:"+c+"px;width:"+(M.width+(e||0))+"px;top:"+f+"px;left:"+(m+M.left)+"px;"+(n||""))},this)},u.prototype.drawFullLineMarker=function(r,i,o,t,e){var n=this.$getTop(i.start.row,t),c=t.lineHeight;i.start.row!=i.end.row&&(c+=this.$getTop(i.end.row,t)-n),this.elt(o,"height:"+c+"px;top:"+n+"px;left:0;right:0;"+(e||""))},u.prototype.drawScreenLineMarker=function(r,i,o,t,e){var n=this.$getTop(i.start.row,t),c=t.lineHeight;this.elt(o,"height:"+c+"px;top:"+n+"px;left:0;right:0;"+(e||""))},u}();k.prototype.$padding=0;function a(u,r,i,o){return(u?1:0)|(r?2:0)|(i?4:0)|(o?8:0)}g.Marker=k}),ace.define("ace/layer/text_util",["require","exports","module"],function(d,g,J){var L=new Set(["text","rparen","lparen"]);g.isTextToken=function(A){return L.has(A)}}),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(d,g,J){var L=d("../lib/oop"),A=d("../lib/dom"),k=d("../lib/lang"),a=d("./lines").Lines,u=d("../lib/event_emitter").EventEmitter,r=d("../config").nls,i=d("./text_util").isTextToken,o=function(){function t(e){this.dom=A,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new a(this.element)}return t.prototype.$updateEolChar=function(){var e=this.session.doc,n=e.getNewLineCharacter()==`
209
- `&&e.getNewLineMode()!="windows",c=n?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=c)return this.EOL_CHAR=c,!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],c=1;c<e+1;c++)if(this.showTabs){var f=this.dom.createElement("span");f.className="ace_invisible ace_invisible_tab",f.textContent=k.stringRepeat(this.TAB_CHAR,c),n.push(f)}else n.push(this.dom.createTextNode(k.stringRepeat(" ",c),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var m="ace_indent-guide",D=this.showSpaces?" ace_invisible ace_invisible_space":"",M=this.showSpaces?k.stringRepeat(this.SPACE_CHAR,this.tabSize):k.stringRepeat(" ",this.tabSize),x=this.showTabs?" ace_invisible ace_invisible_tab":"",_=this.showTabs?k.stringRepeat(this.TAB_CHAR,this.tabSize):M,f=this.dom.createElement("span");f.className=m+D,f.textContent=M,this.$tabStrings[" "]=f;var f=this.dom.createElement("span");f.className=m+x,f.textContent=_,this.$tabStrings[" "]=f}},t.prototype.updateLines=function(e,n,c){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var f=Math.max(n,e.firstRow),m=Math.min(c,e.lastRow),D=this.element.childNodes,M=0,_=e.firstRow;_<f;_++){var U=this.session.getFoldLine(_);if(U)if(U.containsRow(f)){f=U.start.row;break}else _=U.end.row;M++}for(var x=!1,_=f,U=this.session.getNextFoldLine(_),se=U?U.start.row:1/0;_>se&&(_=U.end.row+1,U=this.session.getNextFoldLine(_,U),se=U?U.start.row:1/0),!(_>m);){var X=D[M++];if(X){this.dom.removeChildren(X),this.$renderLine(X,_,_==se?U:!1),x&&(X.style.top=this.$lines.computeLineTop(_,e,this.session)+"px");var O=e.lineHeight*this.session.getRowLength(_)+"px";X.style.height!=O&&(x=!0,X.style.height=O)}_++}if(x)for(;M<this.$lines.cells.length;){var _e=this.$lines.cells[M++];_e.element.style.top=this.$lines.computeLineTop(_e.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 c=e.lastRow,f=n?n.lastRow:-1;if(!n||f<e.firstRow)return this.update(e);if(c<n.firstRow)return this.update(e);if(!n||n.lastRow<e.firstRow)return this.update(e);if(e.lastRow<n.firstRow)return this.update(e);if(n.firstRow<e.firstRow)for(var m=this.session.getFoldedRowCount(n.firstRow,e.firstRow-1);m>0;m--)this.$lines.shift();if(n.lastRow>e.lastRow)for(var m=this.session.getFoldedRowCount(e.lastRow+1,n.lastRow);m>0;m--)this.$lines.pop();e.firstRow<n.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,n.firstRow-1)),e.lastRow>n.lastRow&&this.$lines.push(this.$renderLinesFragment(e,n.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},t.prototype.$renderLinesFragment=function(e,n,c){for(var f=[],m=n,D=this.session.getNextFoldLine(m),M=D?D.start.row:1/0;m>M&&(m=D.end.row+1,D=this.session.getNextFoldLine(m,D),M=D?D.start.row:1/0),!(m>c);){var x=this.$lines.createCell(m,e,this.session),_=x.element;this.dom.removeChildren(_),A.setStyle(_.style,"height",this.$lines.computeLineHeight(m,e,this.session)+"px"),A.setStyle(_.style,"top",this.$lines.computeLineTop(m,e,this.session)+"px"),this.$renderLine(_,m,m==M?D:!1),this.$useLineGroups()?_.className="ace_line_group":_.className="ace_line",f.push(x),m++}return f},t.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var n=e.firstRow,c=e.lastRow,f=this.$lines;f.getLength();)f.pop();f.push(this.$renderLinesFragment(e,n,c))},t.prototype.$renderToken=function(e,n,c,f){for(var m=this,D=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,M=this.dom.createFragment(this.element),x,_=0;x=D.exec(f);){var U=x[1],se=x[2],X=x[3],O=x[4],_e=x[5];if(!(!m.showSpaces&&se)){var S=_!=x.index?f.slice(_,x.index):"";if(_=x.index+x[0].length,S&&M.appendChild(this.dom.createTextNode(S,this.element)),U){var h=m.session.getScreenTabSize(n+x.index);M.appendChild(m.$tabStrings[h].cloneNode(!0)),n+=h-1}else if(se)if(m.showSpaces){var b=this.dom.createElement("span");b.className="ace_invisible ace_invisible_space",b.textContent=k.stringRepeat(m.SPACE_CHAR,se.length),M.appendChild(b)}else M.appendChild(this.dom.createTextNode(se,this.element));else if(X){var b=this.dom.createElement("span");b.className="ace_invisible ace_invisible_space ace_invalid",b.textContent=k.stringRepeat(m.SPACE_CHAR,X.length),M.appendChild(b)}else if(O){n+=1;var b=this.dom.createElement("span");b.style.width=m.config.characterWidth*2+"px",b.className=m.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",b.textContent=m.showSpaces?m.SPACE_CHAR:O,M.appendChild(b)}else if(_e){n+=1;var b=this.dom.createElement("span");b.style.width=m.config.characterWidth*2+"px",b.className="ace_cjk",b.textContent=_e,M.appendChild(b)}}}if(M.appendChild(this.dom.createTextNode(_?f.slice(_):f,this.element)),i(c.type))e.appendChild(M);else{var E="ace_"+c.type.replace(/\./g," ace_"),b=this.dom.createElement("span");c.type=="fold"&&(b.style.width=c.value.length*this.config.characterWidth+"px",b.setAttribute("title",r("inline-fold.closed.title","Unfold code"))),b.className=E,b.appendChild(M),e.appendChild(b)}return n+f.length},t.prototype.renderIndentGuide=function(e,n,c){var f=n.search(this.$indentGuideRe);if(f<=0||f>=c)return n;if(n[0]==" "){f-=f%this.tabSize;for(var m=f/this.tabSize,D=0;D<m;D++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),n.substr(f)}else if(n[0]==" "){for(var D=0;D<f;D++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),n.substr(f)}return this.$highlightIndentGuide(),n},t.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var e=this.session.doc.$lines;if(e){var n=this.session.selection.getCursor(),c=/^\s*/.exec(this.session.doc.getLine(n.row))[0].length,f=Math.floor(c/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:f,start:n.row};var m=this.session.$bracketHighlight;if(m){for(var D=this.session.$bracketHighlight.ranges,M=0;M<D.length;M++)if(n.row!==D[M].start.row){this.$highlightIndentGuideMarker.end=D[M].start.row+1,n.row>D[M].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 M=n.row+1;M<e.length;M++){var x=e[M],_=/^\s*/.exec(x)[0].length;if(x!==""&&(this.$highlightIndentGuideMarker.end=M,_<=c))break}}this.$renderHighlightIndentGuide()}}},t.prototype.$clearActiveIndentGuide=function(){var e=this.element.querySelectorAll(".ace_indent-guide-active");e.forEach(function(n){n.classList.remove("ace_indent-guide-active")})},t.prototype.$setIndentGuideActive=function(e,n){var c=this.session.doc.getLine(e.row);if(c!==""){var f=e.element;if(e.element.classList&&e.element.classList.contains("ace_line_group"))if(e.element.childNodes.length>0)f=e.element.childNodes[0];else return;var m=f.childNodes;if(m){var D=m[n-1];D&&D.classList&&D.classList.contains("ace_indent-guide")&&D.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 c=0;c<e.length;c++){var f=e[c];if(this.$highlightIndentGuideMarker.end&&f.row>=this.$highlightIndentGuideMarker.start+1){if(f.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(f,n)}}else for(var c=e.length-1;c>=0;c--){var f=e[c];if(this.$highlightIndentGuideMarker.end&&f.row<this.$highlightIndentGuideMarker.start){if(f.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(f,n)}}}},t.prototype.$createLineElement=function(e){var n=this.dom.createElement("div");return n.className="ace_line",n.style.height=this.config.lineHeight+"px",n},t.prototype.$renderWrappedLine=function(e,n,c){var f=0,m=0,D=c[0],M=0,x=this.$createLineElement();e.appendChild(x);for(var _=0;_<n.length;_++){var U=n[_],se=U.value;if(_==0&&this.displayIndentGuides){if(f=se.length,se=this.renderIndentGuide(x,se,D),!se)continue;f-=se.length}if(f+se.length<D)M=this.$renderToken(x,M,U,se),f+=se.length;else{for(;f+se.length>=D;)M=this.$renderToken(x,M,U,se.substring(0,D-f)),se=se.substring(D-f),f=D,x=this.$createLineElement(),e.appendChild(x),x.appendChild(this.dom.createTextNode(k.stringRepeat(" ",c.indent),this.element)),m++,M=0,D=c[m]||Number.MAX_VALUE;se.length!=0&&(f+=se.length,M=this.$renderToken(x,M,U,se))}}c[c.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(x,M,null,"",!0)},t.prototype.$renderSimpleLine=function(e,n){for(var c=0,f=0;f<n.length;f++){var m=n[f],D=m.value;if(!(f==0&&this.displayIndentGuides&&(D=this.renderIndentGuide(e,D),!D))){if(c+D.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,c,m,D);c=this.$renderToken(e,c,m,D)}}},t.prototype.$renderOverflowMessage=function(e,n,c,f,m){c&&this.$renderToken(e,n,c,f.slice(0,this.MAX_LINE_LENGTH-n));var D=this.dom.createElement("span");D.className="ace_inline_button ace_keyword ace_toggle_wrap",D.textContent=m?"<hide>":"<click to see more...>",e.appendChild(D)},t.prototype.$renderLine=function(e,n,c){if(!c&&c!=!1&&(c=this.session.getFoldLine(n)),c)var f=this.$getFoldLineTokens(n,c);else var f=this.session.getTokens(n);var m=e;if(f.length){var D=this.session.getRowSplitData(n);if(D&&D.length){this.$renderWrappedLine(e,f,D);var m=e.lastChild}else{var m=e;this.$useLineGroups()&&(m=this.$createLineElement(),e.appendChild(m)),this.$renderSimpleLine(m,f)}}else this.$useLineGroups()&&(m=this.$createLineElement(),e.appendChild(m));if(this.showEOL&&m){c&&(n=c.end.row);var M=this.dom.createElement("span");M.className="ace_invisible ace_invisible_eol",M.textContent=n==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,m.appendChild(M)}},t.prototype.$getFoldLineTokens=function(e,n){var c=this.session,f=[];function m(M,x,_){for(var U=0,se=0;se+M[U].value.length<x;)if(se+=M[U].value.length,U++,U==M.length)return;if(se!=x){var X=M[U].value.substring(x-se);X.length>_-x&&(X=X.substring(0,_-x)),f.push({type:M[U].type,value:X}),se=x+X.length,U+=1}for(;se<_&&U<M.length;){var X=M[U].value;X.length+se>_?f.push({type:M[U].type,value:X.substring(0,_-se)}):f.push(M[U]),se+=X.length,U+=1}}var D=c.getTokens(e);return n.walk(function(M,x,_,U,se){M!=null?f.push({type:"fold",value:M}):(se&&(D=c.getTokens(x)),D.length&&m(D,U,_))},n.end.row,this.session.getLine(n.end.row).length),f},t.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},t}();o.prototype.EOF_CHAR="¶",o.prototype.EOL_CHAR_LF="¬",o.prototype.EOL_CHAR_CRLF="¤",o.prototype.EOL_CHAR=o.prototype.EOL_CHAR_LF,o.prototype.TAB_CHAR="—",o.prototype.SPACE_CHAR="·",o.prototype.$padding=0,o.prototype.MAX_LINE_LENGTH=1e4,o.prototype.showInvisibles=!1,o.prototype.showSpaces=!1,o.prototype.showTabs=!1,o.prototype.showEOL=!1,o.prototype.displayIndentGuides=!0,o.prototype.$highlightIndentGuides=!0,o.prototype.$tabStrings=[],o.prototype.destroy={},o.prototype.onChangeTabSize=o.prototype.$computeTabString,L.implement(o.prototype,u),g.Text=o}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(d,g,J){var L=d("../lib/dom"),A=function(){function k(a){this.element=L.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),L.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return k.prototype.$updateOpacity=function(a){for(var u=this.cursors,r=u.length;r--;)L.setStyle(u[r].style,"opacity",a?"":"0")},k.prototype.$startCssAnimation=function(){for(var a=this.cursors,u=a.length;u--;)a[u].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&L.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},k.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,L.removeCssClass(this.element,"ace_animate-blinking")},k.prototype.setPadding=function(a){this.$padding=a},k.prototype.setSession=function(a){this.session=a},k.prototype.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},k.prototype.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},k.prototype.setSmoothBlinking=function(a){a!=this.smoothBlinking&&(this.smoothBlinking=a,L.setCssClass(this.element,"ace_smooth-blinking",a),this.$updateCursors(!0),this.restartTimer())},k.prototype.addCursor=function(){var a=L.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},k.prototype.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},k.prototype.hideCursor=function(){this.isVisible=!1,L.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},k.prototype.showCursor=function(){this.isVisible=!0,L.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},k.prototype.restartTimer=function(){var a=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,L.removeCssClass(this.element,"ace_smooth-blinking")),a(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&L.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),L.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var u=(function(){this.timeoutId=setTimeout(function(){a(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){a(!0),u()},this.blinkInterval),u()}},k.prototype.getPixelPosition=function(a,u){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var r=this.session.documentToScreenPosition(a),i=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,a.row)?this.session.$bidiHandler.getPosLeft(r.column):r.column*this.config.characterWidth),o=(r.row-(u?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:i,top:o}},k.prototype.isCursorInView=function(a,u){return a.top>=0&&a.top<u.maxHeight},k.prototype.update=function(a){this.config=a;var u=this.session.$selectionMarkers,r=0,i=0;(u===void 0||u.length===0)&&(u=[{cursor:null}]);for(var r=0,o=u.length;r<o;r++){var t=this.getPixelPosition(u[r].cursor,!0);if(!((t.top>a.height+a.offset||t.top<0)&&r>1)){var e=this.cursors[i++]||this.addCursor(),n=e.style;this.drawCursor?this.drawCursor(e,t,a,u[r],this.session):this.isCursorInView(t,a)?(L.setStyle(n,"display","block"),L.translate(e,t.left,t.top),L.setStyle(n,"width",Math.round(a.characterWidth)+"px"),L.setStyle(n,"height",a.lineHeight+"px")):L.setStyle(n,"display","none")}}for(;this.cursors.length>i;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=t,this.restartTimer()},k.prototype.$setOverwrite=function(a){a!=this.overwrite&&(this.overwrite=a,a?L.addCssClass(this.element,"ace_overwrite-cursors"):L.removeCssClass(this.element,"ace_overwrite-cursors"))},k.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},k}();A.prototype.$padding=0,A.prototype.drawCursor=null,g.Cursor=A}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(d,g,J){var L=this&&this.__extends||function(){var e=function(n,c){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,m){f.__proto__=m}||function(f,m){for(var D in m)Object.prototype.hasOwnProperty.call(m,D)&&(f[D]=m[D])},e(n,c)};return function(n,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");e(n,c);function f(){this.constructor=n}n.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),A=d("./lib/oop"),k=d("./lib/dom"),a=d("./lib/event"),u=d("./lib/event_emitter").EventEmitter,r=32768,i=function(){function e(n,c){this.element=k.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+c,this.inner=k.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),n.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addListener(this.element,"scroll",this.onScroll.bind(this)),a.addListener(this.element,"mousedown",a.preventDefault)}return e.prototype.setVisible=function(n){this.element.style.display=n?"":"none",this.isVisible=n,this.coeff=1},e}();A.implement(i.prototype,u);var o=function(e){L(n,e);function n(c,f){var m=e.call(this,c,"-v")||this;return m.scrollTop=0,m.scrollHeight=0,f.$scrollbarWidth=m.width=k.scrollbarWidth(c.ownerDocument),m.inner.style.width=m.element.style.width=(m.width||15)+5+"px",m.$minWidth=0,m}return n.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var c=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-c)/(this.coeff-c)}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(c){this.element.style.height=c+"px"},n.prototype.setScrollHeight=function(c){this.scrollHeight=c,c>r?(this.coeff=r/c,c=r):this.coeff!=1&&(this.coeff=1),this.inner.style.height=c+"px"},n.prototype.setScrollTop=function(c){this.scrollTop!=c&&(this.skipEvent=!0,this.scrollTop=c,this.element.scrollTop=c*this.coeff)},n}(i);o.prototype.setInnerHeight=o.prototype.setScrollHeight;var t=function(e){L(n,e);function n(c,f){var m=e.call(this,c,"-h")||this;return m.scrollLeft=0,m.height=f.$scrollbarWidth,m.inner.style.height=m.element.style.height=(m.height||15)+5+"px",m}return n.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},n.prototype.getHeight=function(){return this.isVisible?this.height:0},n.prototype.setWidth=function(c){this.element.style.width=c+"px"},n.prototype.setInnerWidth=function(c){this.inner.style.width=c+"px"},n.prototype.setScrollWidth=function(c){this.inner.style.width=c+"px"},n.prototype.setScrollLeft=function(c){this.scrollLeft!=c&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=c)},n}(i);g.ScrollBar=o,g.ScrollBarV=o,g.ScrollBarH=t,g.VScrollBar=o,g.HScrollBar=t}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(d,g,J){var L=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,f){c.__proto__=f}||function(c,f){for(var m in f)Object.prototype.hasOwnProperty.call(f,m)&&(c[m]=f[m])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function c(){this.constructor=e}e.prototype=n===null?Object.create(n):(c.prototype=n.prototype,new c)}}(),A=d("./lib/oop"),k=d("./lib/dom"),a=d("./lib/event"),u=d("./lib/event_emitter").EventEmitter;k.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 r=function(){function t(e,n){this.element=k.createElement("div"),this.element.className="ace_sb"+n,this.inner=k.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return t.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},t}();A.implement(r.prototype,u);var i=function(t){L(e,t);function e(n,c){var f=t.call(this,n,"-v")||this;return f.scrollTop=0,f.scrollHeight=0,f.parent=n,f.width=f.VScrollWidth,f.renderer=c,f.inner.style.width=f.element.style.width=(f.width||15)+"px",f.$minWidth=0,f}return e.prototype.onMouseDown=function(n,c){if(n==="mousedown"&&!(a.getButton(c)!==0||c.detail===2)){if(c.target===this.inner){var f=this,m=c.clientY,D=function(O){m=O.clientY},M=function(){clearInterval(se)},x=c.clientY,_=this.thumbTop,U=function(){if(m!==void 0){var O=f.scrollTopFromThumbTop(_+m-x);O!==f.scrollTop&&f._emit("scroll",{data:O})}};a.capture(this.inner,D,M);var se=setInterval(U,20);return a.preventDefault(c)}var X=c.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(X)}),a.preventDefault(c)}},e.prototype.getHeight=function(){return this.height},e.prototype.scrollTopFromThumbTop=function(n){var c=n*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return c=c>>0,c<0?c=0:c>this.pageHeight-this.viewHeight&&(c=this.pageHeight-this.viewHeight),c},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,c){this.pageHeight===n&&!c||(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}(r);i.prototype.setInnerHeight=i.prototype.setScrollHeight;var o=function(t){L(e,t);function e(n,c){var f=t.call(this,n,"-h")||this;return f.scrollLeft=0,f.scrollWidth=0,f.height=f.HScrollHeight,f.inner.style.height=f.element.style.height=(f.height||12)+"px",f.renderer=c,f}return e.prototype.onMouseDown=function(n,c){if(n==="mousedown"&&!(a.getButton(c)!==0||c.detail===2)){if(c.target===this.inner){var f=this,m=c.clientX,D=function(O){m=O.clientX},M=function(){clearInterval(se)},x=c.clientX,_=this.thumbLeft,U=function(){if(m!==void 0){var O=f.scrollLeftFromThumbLeft(_+m-x);O!==f.scrollLeft&&f._emit("scroll",{data:O})}};a.capture(this.inner,D,M);var se=setInterval(U,20);return a.preventDefault(c)}var X=c.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(X)}),a.preventDefault(c)}},e.prototype.getHeight=function(){return this.isVisible?this.height:0},e.prototype.scrollLeftFromThumbLeft=function(n){var c=n*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return c=c>>0,c<0?c=0:c>this.pageWidth-this.viewWidth&&(c=this.pageWidth-this.viewWidth),c},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,c){this.pageWidth===n&&!c||(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}(r);o.prototype.setInnerWidth=o.prototype.setScrollWidth,g.ScrollBar=i,g.ScrollBarV=i,g.ScrollBarH=o,g.VScrollBar=i,g.HScrollBar=o}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(d,g,J){var L=d("./lib/event"),A=function(){function k(a,u){this.onRender=a,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=u||window;var r=this;this._flush=function(i){r.pending=!1;var o=r.changes;if(o&&(L.blockIdle(100),r.changes=0,r.onRender(o)),r.changes){if(r.$recursionLimit--<0)return;r.schedule()}else r.$recursionLimit=2}}return k.prototype.schedule=function(a){this.changes=this.changes|a,this.changes&&!this.pending&&(L.nextFrame(this._flush),this.pending=!0)},k.prototype.clear=function(a){var u=this.changes;return this.changes=0,u},k}();g.RenderLoop=A}),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(d,g,J){var L=d("../lib/oop"),A=d("../lib/dom"),k=d("../lib/lang"),a=d("../lib/event"),u=d("../lib/useragent"),r=d("../lib/event_emitter").EventEmitter,i=512,o=typeof ResizeObserver=="function",t=200,e=function(){function n(c){this.el=A.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=A.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=A.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),c.appendChild(this.el),this.$measureNode.textContent=k.stringRepeat("X",i),this.$characterSize={width:0,height:0},o?this.$addObserver():this.checkForSizeChanges()}return n.prototype.$setMeasureNodeStyles=function(c,f){c.width=c.height="auto",c.left=c.top="0px",c.visibility="hidden",c.position="absolute",c.whiteSpace="pre",u.isIE<8?c["font-family"]="inherit":c.font="inherit",c.overflow=f?"hidden":"visible"},n.prototype.checkForSizeChanges=function(c){if(c===void 0&&(c=this.$measureSizes()),c&&(this.$characterSize.width!==c.width||this.$characterSize.height!==c.height)){this.$measureNode.style.fontWeight="bold";var f=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=c,this.charSizes=Object.create(null),this.allowBoldFonts=f&&f.width===c.width&&f.height===c.height,this._emit("changeCharacterSize",{data:c})}},n.prototype.$addObserver=function(){var c=this;this.$observer=new window.ResizeObserver(function(f){c.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},n.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var c=this;return this.$pollSizeChangesTimer=a.onIdle(function f(){c.checkForSizeChanges(),a.onIdle(f,500)},500)},n.prototype.setPolling=function(c){c?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},n.prototype.$measureSizes=function(c){var f={height:(c||this.$measureNode).clientHeight,width:(c||this.$measureNode).clientWidth/i};return f.width===0||f.height===0?null:f},n.prototype.$measureCharWidth=function(c){this.$main.textContent=k.stringRepeat(c,i);var f=this.$main.getBoundingClientRect();return f.width/i},n.prototype.getCharacterWidth=function(c){var f=this.charSizes[c];return f===void 0&&(f=this.charSizes[c]=this.$measureCharWidth(c)/this.$characterSize.width),f},n.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},n.prototype.$getZoom=function(c){return!c||!c.parentElement?1:(Number(window.getComputedStyle(c).zoom)||1)*this.$getZoom(c.parentElement)},n.prototype.$initTransformMeasureNodes=function(){var c=function(f,m){return["div",{style:"position: absolute;top:"+f+"px;left:"+m+"px;"}]};this.els=A.buildDom([c(0,0),c(t,0),c(0,t),c(t,t)],this.el)},n.prototype.transformCoordinates=function(c,f){if(c){var m=this.$getZoom(this.el);c=_(1/m,c)}function D(at,ct,Ht){var lt=at[1]*ct[0]-at[0]*ct[1];return[(-ct[1]*Ht[0]+ct[0]*Ht[1])/lt,(+at[1]*Ht[0]-at[0]*Ht[1])/lt]}function M(at,ct){return[at[0]-ct[0],at[1]-ct[1]]}function x(at,ct){return[at[0]+ct[0],at[1]+ct[1]]}function _(at,ct){return[at*ct[0],at*ct[1]]}this.els||this.$initTransformMeasureNodes();function U(at){var ct=at.getBoundingClientRect();return[ct.left,ct.top]}var se=U(this.els[0]),X=U(this.els[1]),O=U(this.els[2]),_e=U(this.els[3]),S=D(M(_e,X),M(_e,O),M(x(X,O),x(_e,se))),h=_(1+S[0],M(X,se)),b=_(1+S[1],M(O,se));if(f){var E=f,j=S[0]*E[0]/t+S[1]*E[1]/t+1,we=x(_(E[0],h),_(E[1],b));return x(_(1/j/t,we),se)}var Ee=M(c,se),qe=D(M(h,_(S[0],Ee)),M(b,_(S[1],Ee)),Ee);return _(t,qe)},n}();e.prototype.$characterSize={width:0,height:0},L.implement(e.prototype,r),g.FontMetrics=e}),ace.define("ace/css/editor-css",["require","exports","module"],function(d,g,J){J.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(d,g,J){var L=d("../lib/dom"),A=d("../lib/oop"),k=d("../lib/event_emitter").EventEmitter,a=function(){function u(r,i){this.canvas=L.createElement("canvas"),this.renderer=i,this.pixelRatio=1,this.maxHeight=i.layerConfig.maxHeight,this.lineHeight=i.layerConfig.lineHeight,this.canvasHeight=r.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=r.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)"},r.element.appendChild(this.canvas)}return u.prototype.$updateDecorators=function(r){var i=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(r){this.maxHeight=r.maxHeight,this.lineHeight=r.lineHeight,this.canvasHeight=r.height;var o=(r.lastRow+1)*this.lineHeight;o<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight}var t=this.canvas.getContext("2d");function e(_e,S){return _e.priority<S.priority?-1:_e.priority>S.priority?1:0}var n=this.renderer.session.$annotations;if(t.clearRect(0,0,this.canvas.width,this.canvas.height),n){var c={info:1,warning:2,error:3};n.forEach(function(_e){_e.priority=c[_e.type]||null}),n=n.sort(e);for(var f=this.renderer.session.$foldData,m=0;m<n.length;m++){var D=n[m].row,M=this.compensateFoldRows(D,f),x=Math.round((D-M)*this.lineHeight*this.heightRatio),_=Math.round((D-M)*this.lineHeight*this.heightRatio),U=Math.round(((D-M)*this.lineHeight+this.lineHeight)*this.heightRatio),se=U-_;if(se<this.minDecorationHeight){var X=(_+U)/2|0;X<this.halfMinDecorationHeight?X=this.halfMinDecorationHeight:X+this.halfMinDecorationHeight>this.canvasHeight&&(X=this.canvasHeight-this.halfMinDecorationHeight),_=Math.round(X-this.halfMinDecorationHeight),U=Math.round(X+this.halfMinDecorationHeight)}t.fillStyle=i[n[m].type]||null,t.fillRect(0,x,this.canvasWidth,U-_)}}var O=this.renderer.session.selection.getCursor();if(O){var M=this.compensateFoldRows(O.row,f),x=Math.round((O.row-M)*this.lineHeight*this.heightRatio);t.fillStyle="rgba(0, 0, 0, 0.5)",t.fillRect(0,x,this.canvasWidth,2)}},u.prototype.compensateFoldRows=function(r,i){var o=0;if(i&&i.length>0)for(var t=0;t<i.length;t++)r>i[t].start.row&&r<i[t].end.row?o+=r-i[t].start.row:r>=i[t].end.row&&(o+=i[t].end.row-i[t].start.row);return o},u}();A.implement(a.prototype,k),g.Decorator=a}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(d,g,J){var L=d("./lib/oop"),A=d("./lib/dom"),k=d("./lib/lang"),a=d("./config"),u=d("./layer/gutter").Gutter,r=d("./layer/marker").Marker,i=d("./layer/text").Text,o=d("./layer/cursor").Cursor,t=d("./scrollbar").HScrollBar,e=d("./scrollbar").VScrollBar,n=d("./scrollbar_custom").HScrollBar,c=d("./scrollbar_custom").VScrollBar,f=d("./renderloop").RenderLoop,m=d("./layer/font_metrics").FontMetrics,D=d("./lib/event_emitter").EventEmitter,M=d("./css/editor-css"),x=d("./layer/decorators").Decorator,_=d("./lib/useragent"),U=d("./layer/text_util").isTextToken;A.importCssString(M,"ace_editor.css",!1);var se=function(){function X(O,_e){var S=this;this.container=O||A.createElement("div"),A.addCssClass(this.container,"ace_editor"),A.HI_DPI&&A.addCssClass(this.container,"ace_hidpi"),this.setTheme(_e),a.get("useStrictCSP")==null&&a.set("useStrictCSP",!1),this.$gutter=A.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=A.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=A.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 r(this.content);var h=this.$textLayer=new i(this.content);this.canvas=h.element,this.$markerFront=new r(this.content),this.$cursorLayer=new o(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new e(this.container,this),this.scrollBarH=new t(this.container,this),this.scrollBarV.on("scroll",function(b){S.$scrollAnimation||S.session.setScrollTop(b.data-S.scrollMargin.top)}),this.scrollBarH.on("scroll",function(b){S.$scrollAnimation||S.session.setScrollLeft(b.data-S.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new m(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(b){S.updateCharacterSize(),S.onResize(!0,S.gutterWidth,S.$size.width,S.$size.height),S._signal("changeCharacterSize",b)}),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=!_.isIOS,this.$loop=new f(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),a.resetOptions(this),a._signal("renderer",this)}return X.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),A.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},X.prototype.setSession=function(O){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=O,O&&this.scrollMargin.top&&O.getScrollTop()<=0&&O.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(O),this.$markerBack.setSession(O),this.$markerFront.setSession(O),this.$gutterLayer.setSession(O),this.$textLayer.setSession(O),O&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},X.prototype.updateLines=function(O,_e,S){if(_e===void 0&&(_e=1/0),this.$changedLines?(this.$changedLines.firstRow>O&&(this.$changedLines.firstRow=O),this.$changedLines.lastRow<_e&&(this.$changedLines.lastRow=_e)):this.$changedLines={firstRow:O,lastRow:_e},this.$changedLines.lastRow<this.layerConfig.firstRow)if(S)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},X.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},X.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},X.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},X.prototype.updateFull=function(O){O?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},X.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},X.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},X.prototype.onResize=function(O,_e,S,h){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=O?1:0;var b=this.container;h||(h=b.clientHeight||b.scrollHeight),!h&&this.$maxLines&&this.lineHeight>1&&(!b.style.height||b.style.height=="0px")&&(b.style.height="1px",h=b.clientHeight||b.scrollHeight),S||(S=b.clientWidth||b.scrollWidth);var E=this.$updateCachedSize(O,_e,S,h);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!S&&!h)return this.resizing=0;O&&(this.$gutterLayer.$padding=null),O?this.$renderChanges(E|this.$changes,!0):this.$loop.schedule(E|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},X.prototype.$updateCachedSize=function(O,_e,S,h){h-=this.$extraHeight||0;var b=0,E=this.$size,j={width:E.width,height:E.height,scrollerHeight:E.scrollerHeight,scrollerWidth:E.scrollerWidth};if(h&&(O||E.height!=h)&&(E.height=h,b|=this.CHANGE_SIZE,E.scrollerHeight=E.height,this.$horizScroll&&(E.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(E.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",b=b|this.CHANGE_SCROLL),S&&(O||E.width!=S)){b|=this.CHANGE_SIZE,E.width=S,_e==null&&(_e=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=_e,A.setStyle(this.scrollBarH.element.style,"left",_e+"px"),A.setStyle(this.scroller.style,"left",_e+this.margin.left+"px"),E.scrollerWidth=Math.max(0,S-_e-this.scrollBarV.getWidth()-this.margin.h),A.setStyle(this.$gutter.style,"left",this.margin.left+"px");var we=this.scrollBarV.getWidth()+"px";A.setStyle(this.scrollBarH.element.style,"right",we),A.setStyle(this.scroller.style,"right",we),A.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(E.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||O)&&(b|=this.CHANGE_FULL)}return E.$dirty=!S||!h,b&&this._signal("resize",j),b},X.prototype.onGutterResize=function(O){var _e=this.$showGutter?O:0;_e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,_e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},X.prototype.adjustWrapLimit=function(){var O=this.$size.scrollerWidth-this.$padding*2,_e=Math.floor(O/this.characterWidth);return this.session.adjustWrapLimit(_e,this.$showPrintMargin&&this.$printMarginColumn)},X.prototype.setAnimatedScroll=function(O){this.setOption("animatedScroll",O)},X.prototype.getAnimatedScroll=function(){return this.$animatedScroll},X.prototype.setShowInvisibles=function(O){this.setOption("showInvisibles",O),this.session.$bidiHandler.setShowInvisibles(O)},X.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},X.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},X.prototype.setDisplayIndentGuides=function(O){this.setOption("displayIndentGuides",O)},X.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},X.prototype.setHighlightIndentGuides=function(O){this.setOption("highlightIndentGuides",O)},X.prototype.setShowPrintMargin=function(O){this.setOption("showPrintMargin",O)},X.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},X.prototype.setPrintMarginColumn=function(O){this.setOption("printMarginColumn",O)},X.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},X.prototype.getShowGutter=function(){return this.getOption("showGutter")},X.prototype.setShowGutter=function(O){return this.setOption("showGutter",O)},X.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},X.prototype.setFadeFoldWidgets=function(O){this.setOption("fadeFoldWidgets",O)},X.prototype.setHighlightGutterLine=function(O){this.setOption("highlightGutterLine",O)},X.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},X.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var O=A.createElement("div");O.className="ace_layer ace_print-margin-layer",this.$printMarginEl=A.createElement("div"),this.$printMarginEl.className="ace_print-margin",O.appendChild(this.$printMarginEl),this.content.insertBefore(O,this.content.firstChild)}var _e=this.$printMarginEl.style;_e.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",_e.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},X.prototype.getContainerElement=function(){return this.container},X.prototype.getMouseEventTarget=function(){return this.scroller},X.prototype.getTextAreaContainer=function(){return this.container},X.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var O=this.textarea.style,_e=this.$composition;if(!this.$keepTextAreaAtCursor&&!_e){A.translate(this.textarea,-100,0);return}var S=this.$cursorLayer.$pixelPos;if(S){_e&&_e.markerRange&&(S=this.$cursorLayer.getPixelPosition(_e.markerRange.start,!0));var h=this.layerConfig,b=S.top,E=S.left;b-=h.offset;var j=_e&&_e.useTextareaForIME||_.isMobile?this.lineHeight:1;if(b<0||b>h.height-j){A.translate(this.textarea,0,0);return}var we=1,Ee=this.$size.height-j;if(!_e)b+=this.lineHeight;else if(_e.useTextareaForIME){var qe=this.textarea.value;we=this.characterWidth*this.session.$getStringScreenWidth(qe)[0]}else b+=this.lineHeight+2;E-=this.scrollLeft,E>this.$size.scrollerWidth-we&&(E=this.$size.scrollerWidth-we),E+=this.gutterWidth+this.margin.left,A.setStyle(O,"height",j+"px"),A.setStyle(O,"width",we+"px"),A.translate(this.textarea,Math.min(E,this.$size.scrollerWidth-we),Math.min(b,Ee))}}},X.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},X.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},X.prototype.getLastFullyVisibleRow=function(){var O=this.layerConfig,_e=O.lastRow,S=this.session.documentToScreenRow(_e,0)*O.lineHeight;return S-this.session.getScrollTop()>O.height-O.lineHeight?_e-1:_e},X.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},X.prototype.setPadding=function(O){this.$padding=O,this.$textLayer.setPadding(O),this.$cursorLayer.setPadding(O),this.$markerFront.setPadding(O),this.$markerBack.setPadding(O),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},X.prototype.setScrollMargin=function(O,_e,S,h){var b=this.scrollMargin;b.top=O|0,b.bottom=_e|0,b.right=h|0,b.left=S|0,b.v=b.top+b.bottom,b.h=b.left+b.right,b.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-b.top),this.updateFull()},X.prototype.setMargin=function(O,_e,S,h){var b=this.margin;b.top=O|0,b.bottom=_e|0,b.right=h|0,b.left=S|0,b.v=b.top+b.bottom,b.h=b.left+b.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},X.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},X.prototype.setHScrollBarAlwaysVisible=function(O){this.setOption("hScrollBarAlwaysVisible",O)},X.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},X.prototype.setVScrollBarAlwaysVisible=function(O){this.setOption("vScrollBarAlwaysVisible",O)},X.prototype.$updateScrollBarV=function(){var O=this.layerConfig.maxHeight,_e=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(O-=(_e-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>O-_e&&(O=this.scrollTop+_e,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(O+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},X.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},X.prototype.freeze=function(){this.$frozen=!0},X.prototype.unfreeze=function(){this.$frozen=!1},X.prototype.$renderChanges=function(O,_e){if(this.$changes&&(O|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!O&&!_e){this.$changes|=O;return}if(this.$size.$dirty)return this.$changes|=O,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",O),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var S=this.layerConfig;if(O&this.CHANGE_FULL||O&this.CHANGE_SIZE||O&this.CHANGE_TEXT||O&this.CHANGE_LINES||O&this.CHANGE_SCROLL||O&this.CHANGE_H_SCROLL){if(O|=this.$computeLayerConfig()|this.$loop.clear(),S.firstRow!=this.layerConfig.firstRow&&S.firstRowScreen==this.layerConfig.firstRowScreen){var h=this.scrollTop+(S.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;h>0&&(this.scrollTop=h,O=O|this.CHANGE_SCROLL,O|=this.$computeLayerConfig()|this.$loop.clear())}S=this.layerConfig,this.$updateScrollBarV(),O&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),A.translate(this.content,-this.scrollLeft,-S.offset);var b=S.width+2*this.$padding+"px",E=S.minHeight+"px";A.setStyle(this.content.style,"width",b),A.setStyle(this.content.style,"height",E)}if(O&this.CHANGE_H_SCROLL&&(A.translate(this.content,-this.scrollLeft,-S.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),O&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(S),this.$showGutter&&this.$gutterLayer.update(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S),this.$markerBack.update(S),this.$markerFront.update(S),this.$cursorLayer.update(S),this.$moveTextAreaToCursor(),this._signal("afterRender",O);return}if(O&this.CHANGE_SCROLL){this.$changedLines=null,O&this.CHANGE_TEXT||O&this.CHANGE_LINES?this.$textLayer.update(S):this.$textLayer.scrollLines(S),this.$showGutter&&(O&this.CHANGE_GUTTER||O&this.CHANGE_LINES?this.$gutterLayer.update(S):this.$gutterLayer.scrollLines(S)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S),this.$markerBack.update(S),this.$markerFront.update(S),this.$cursorLayer.update(S),this.$moveTextAreaToCursor(),this._signal("afterRender",O);return}O&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(S),this.$showGutter&&this.$gutterLayer.update(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S)):O&this.CHANGE_LINES?((this.$updateLines()||O&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S)):O&this.CHANGE_TEXT||O&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S)):O&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S)),O&this.CHANGE_CURSOR&&(this.$cursorLayer.update(S),this.$moveTextAreaToCursor()),O&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(S),O&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(S),this._signal("afterRender",O)},X.prototype.$autosize=function(){var O=this.session.getScreenLength()*this.lineHeight,_e=this.$maxLines*this.lineHeight,S=Math.min(_e,Math.max((this.$minLines||1)*this.lineHeight,O))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(S+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&S>this.$maxPixelHeight&&(S=this.$maxPixelHeight);var h=S<=2*this.lineHeight,b=!h&&O>_e;if(S!=this.desiredHeight||this.$size.height!=this.desiredHeight||b!=this.$vScroll){b!=this.$vScroll&&(this.$vScroll=b,this.scrollBarV.setVisible(b));var E=this.container.clientWidth;this.container.style.height=S+"px",this.$updateCachedSize(!0,this.$gutterWidth,E,S),this.desiredHeight=S,this._signal("autosize")}},X.prototype.$computeLayerConfig=function(){var O=this.session,_e=this.$size,S=_e.height<=2*this.lineHeight,h=this.session.getScreenLength(),b=h*this.lineHeight,E=this.$getLongestLine(),j=!S&&(this.$hScrollBarAlwaysVisible||_e.scrollerWidth-E-2*this.$padding<0),we=this.$horizScroll!==j;we&&(this.$horizScroll=j,this.scrollBarH.setVisible(j));var Ee=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),S=_e.height<=2*this.lineHeight);var qe=_e.scrollerHeight+this.lineHeight,at=!this.$maxLines&&this.$scrollPastEnd?(_e.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;b+=at;var ct=this.scrollMargin;this.session.setScrollTop(Math.max(-ct.top,Math.min(this.scrollTop,b-_e.scrollerHeight+ct.bottom))),this.session.setScrollLeft(Math.max(-ct.left,Math.min(this.scrollLeft,E+2*this.$padding-_e.scrollerWidth+ct.right)));var Ht=!S&&(this.$vScrollBarAlwaysVisible||_e.scrollerHeight-b+at<0||this.scrollTop>ct.top),lt=Ee!==Ht;lt&&(this.$vScroll=Ht,this.scrollBarV.setVisible(Ht));var ut=this.scrollTop%this.lineHeight,Wt=Math.ceil(qe/this.lineHeight)-1,Dt=Math.max(0,Math.round((this.scrollTop-ut)/this.lineHeight)),Vt=Dt+Wt,hi,di,Jt=this.lineHeight;Dt=O.screenToDocumentRow(Dt,0);var gi=O.getFoldLine(Dt);gi&&(Dt=gi.start.row),hi=O.documentToScreenRow(Dt,0),di=O.getRowLength(Dt)*Jt,Vt=Math.min(O.screenToDocumentRow(Vt,0),O.getLength()-1),qe=_e.scrollerHeight+O.getRowLength(Vt)*Jt+di,ut=this.scrollTop-hi*Jt;var bi=0;return(this.layerConfig.width!=E||we)&&(bi=this.CHANGE_H_SCROLL),(we||lt)&&(bi|=this.$updateCachedSize(!0,this.gutterWidth,_e.width,_e.height),this._signal("scrollbarVisibilityChanged"),lt&&(E=this.$getLongestLine())),this.layerConfig={width:E,padding:this.$padding,firstRow:Dt,firstRowScreen:hi,lastRow:Vt,lineHeight:Jt,characterWidth:this.characterWidth,minHeight:qe,maxHeight:b,offset:ut,gutterOffset:Jt?Math.max(0,Math.ceil((ut+_e.height-_e.scrollerHeight)/Jt)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(E-this.$padding),bi},X.prototype.$updateLines=function(){if(this.$changedLines){var O=this.$changedLines.firstRow,_e=this.$changedLines.lastRow;this.$changedLines=null;var S=this.layerConfig;if(!(O>S.lastRow+1)&&!(_e<S.firstRow)){if(_e===1/0){this.$showGutter&&this.$gutterLayer.update(S),this.$textLayer.update(S);return}return this.$textLayer.updateLines(S,O,_e),!0}}},X.prototype.$getLongestLine=function(){var O=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(O+=1),this.$textLayer&&O>this.$textLayer.MAX_LINE_LENGTH&&(O=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(O*this.characterWidth))},X.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},X.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},X.prototype.addGutterDecoration=function(O,_e){this.$gutterLayer.addGutterDecoration(O,_e)},X.prototype.removeGutterDecoration=function(O,_e){this.$gutterLayer.removeGutterDecoration(O,_e)},X.prototype.updateBreakpoints=function(O){this._rows=O,this.$loop.schedule(this.CHANGE_GUTTER)},X.prototype.setAnnotations=function(O){this.$gutterLayer.setAnnotations(O),this.$loop.schedule(this.CHANGE_GUTTER)},X.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},X.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},X.prototype.showCursor=function(){this.$cursorLayer.showCursor()},X.prototype.scrollSelectionIntoView=function(O,_e,S){this.scrollCursorIntoView(O,S),this.scrollCursorIntoView(_e,S)},X.prototype.scrollCursorIntoView=function(O,_e,S){if(this.$size.scrollerHeight!==0){var h=this.$cursorLayer.getPixelPosition(O),b=h.left,E=h.top,j=S&&S.top||0,we=S&&S.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var Ee=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;Ee+j>E?(_e&&Ee+j>E+this.lineHeight&&(E-=_e*this.$size.scrollerHeight),E===0&&(E=-this.scrollMargin.top),this.session.setScrollTop(E)):Ee+this.$size.scrollerHeight-we<E+this.lineHeight&&(_e&&Ee+this.$size.scrollerHeight-we<E-this.lineHeight&&(E+=_e*this.$size.scrollerHeight),this.session.setScrollTop(E+this.lineHeight+we-this.$size.scrollerHeight));var qe=this.scrollLeft,at=2*this.layerConfig.characterWidth;b-at<qe?(b-=at,b<this.$padding+at&&(b=-this.scrollMargin.left),this.session.setScrollLeft(b)):(b+=at,qe+this.$size.scrollerWidth<b+this.characterWidth?this.session.setScrollLeft(Math.round(b+this.characterWidth-this.$size.scrollerWidth)):qe<=this.$padding&&b-qe<this.characterWidth&&this.session.setScrollLeft(0))}},X.prototype.getScrollTop=function(){return this.session.getScrollTop()},X.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},X.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},X.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},X.prototype.scrollToRow=function(O){this.session.setScrollTop(O*this.lineHeight)},X.prototype.alignCursor=function(O,_e){typeof O=="number"&&(O={row:O,column:0});var S=this.$cursorLayer.getPixelPosition(O),h=this.$size.scrollerHeight-this.lineHeight,b=S.top-h*(_e||0);return this.session.setScrollTop(b),b},X.prototype.$calcSteps=function(O,_e){var S=0,h=this.STEPS,b=[],E=function(j,we,Ee){return Ee*(Math.pow(j-1,3)+1)+we};for(S=0;S<h;++S)b.push(E(S/this.STEPS,O,_e-O));return b},X.prototype.scrollToLine=function(O,_e,S,h){var b=this.$cursorLayer.getPixelPosition({row:O,column:0}),E=b.top;_e&&(E-=this.$size.scrollerHeight/2);var j=this.scrollTop;this.session.setScrollTop(E),S!==!1&&this.animateScrolling(j,h)},X.prototype.animateScrolling=function(O,_e){var S=this.scrollTop;if(!this.$animatedScroll)return;var h=this;if(O==S)return;if(this.$scrollAnimation){var b=this.$scrollAnimation.steps;if(b.length&&(O=b[0],O==S))return}var E=h.$calcSteps(O,S);this.$scrollAnimation={from:O,to:S,steps:E},clearInterval(this.$timer),h.session.setScrollTop(E.shift()),h.session.$scrollTop=S;function j(){h.$timer=clearInterval(h.$timer),h.$scrollAnimation=null,h.$stopAnimation=!1,_e&&_e()}this.$timer=setInterval(function(){if(h.$stopAnimation){j();return}if(!h.session)return clearInterval(h.$timer);E.length?(h.session.setScrollTop(E.shift()),h.session.$scrollTop=S):S!=null?(h.session.$scrollTop=-1,h.session.setScrollTop(S),S=null):j()},10)},X.prototype.scrollToY=function(O){this.scrollTop!==O&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=O)},X.prototype.scrollToX=function(O){this.scrollLeft!==O&&(this.scrollLeft=O),this.$loop.schedule(this.CHANGE_H_SCROLL)},X.prototype.scrollTo=function(O,_e){this.session.setScrollTop(_e),this.session.setScrollLeft(O)},X.prototype.scrollBy=function(O,_e){_e&&this.session.setScrollTop(this.session.getScrollTop()+_e),O&&this.session.setScrollLeft(this.session.getScrollLeft()+O)},X.prototype.isScrollableBy=function(O,_e){if(_e<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||_e>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||O<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||O>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},X.prototype.pixelToScreenCoordinates=function(O,_e){var S;if(this.$hasCssTransforms){S={top:0,left:0};var h=this.$fontMetrics.transformCoordinates([O,_e]);O=h[1]-this.gutterWidth-this.margin.left,_e=h[0]}else S=this.scroller.getBoundingClientRect();var b=O+this.scrollLeft-S.left-this.$padding,E=b/this.characterWidth,j=Math.floor((_e+this.scrollTop-S.top)/this.lineHeight),we=this.$blockCursor?Math.floor(E):Math.round(E);return{row:j,column:we,side:E-we>0?1:-1,offsetX:b}},X.prototype.screenToTextCoordinates=function(O,_e){var S;if(this.$hasCssTransforms){S={top:0,left:0};var h=this.$fontMetrics.transformCoordinates([O,_e]);O=h[1]-this.gutterWidth-this.margin.left,_e=h[0]}else S=this.scroller.getBoundingClientRect();var b=O+this.scrollLeft-S.left-this.$padding,E=b/this.characterWidth,j=this.$blockCursor?Math.floor(E):Math.round(E),we=Math.floor((_e+this.scrollTop-S.top)/this.lineHeight);return this.session.screenToDocumentPosition(we,Math.max(j,0),b)},X.prototype.textToScreenCoordinates=function(O,_e){var S=this.scroller.getBoundingClientRect(),h=this.session.documentToScreenPosition(O,_e),b=this.$padding+(this.session.$bidiHandler.isBidiRow(h.row,O)?this.session.$bidiHandler.getPosLeft(h.column):Math.round(h.column*this.characterWidth)),E=h.row*this.lineHeight;return{pageX:S.left+b-this.scrollLeft,pageY:S.top+E-this.scrollTop}},X.prototype.visualizeFocus=function(){A.addCssClass(this.container,"ace_focus")},X.prototype.visualizeBlur=function(){A.removeCssClass(this.container,"ace_focus")},X.prototype.showComposition=function(O){this.$composition=O,O.cssText||(O.cssText=this.textarea.style.cssText),O.useTextareaForIME==null&&(O.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(A.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):O.markerId=this.session.addMarker(O.markerRange,"ace_composition_marker","text")},X.prototype.setCompositionText=function(O){var _e=this.session.selection.cursor;this.addToken(O,"composition_placeholder",_e.row,_e.column),this.$moveTextAreaToCursor()},X.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),A.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var O=this.session.selection.cursor;this.removeExtraToken(O.row,O.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},X.prototype.setGhostText=function(O,_e){var S=this.session.selection.cursor,h=_e||{row:S.row,column:S.column};this.removeGhostText();var b=this.$calculateWrappedTextChunks(O,h);this.addToken(b[0].text,"ghost_text",h.row,h.column),this.$ghostText={text:O,position:{row:h.row,column:h.column}};var E=A.createElement("div");if(b.length>1){var j=this.hideTokensAfterPosition(h.row,h.column),we;b.slice(1).forEach(function(lt){var ut=A.createElement("div"),Wt=A.createElement("span");Wt.className="ace_ghost_text",lt.wrapped&&(ut.className="ghost_text_line_wrapped"),lt.text.length===0&&(lt.text=" "),Wt.appendChild(A.createTextNode(lt.text)),ut.appendChild(Wt),E.appendChild(ut),we=ut}),j.forEach(function(lt){var ut=A.createElement("span");U(lt.type)||(ut.className="ace_"+lt.type.replace(/\./g," ace_")),ut.appendChild(A.createTextNode(lt.value)),we.appendChild(ut)}),this.$ghostTextWidget={el:E,row:h.row,column:h.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var Ee=this.$cursorLayer.getPixelPosition(h,!0),qe=this.container,at=qe.getBoundingClientRect().height,ct=b.length*this.lineHeight,Ht=ct<at-Ee.top;if(Ht)return;ct<at?this.scrollBy(0,(b.length-1)*this.lineHeight):this.scrollToRow(h.row)}},X.prototype.$calculateWrappedTextChunks=function(O,_e){var S=this.$size.scrollerWidth-this.$padding*2,h=Math.floor(S/this.characterWidth)-2;h=h<=0?60:h;for(var b=O.split(/\r?\n/),E=[],j=0;j<b.length;j++){var we=this.session.$getDisplayTokens(b[j],_e.column),Ee=this.session.$computeWrapSplits(we,h,this.session.$tabSize);if(Ee.length>0){var qe=0;Ee.push(b[j].length);for(var at=0;at<Ee.length;at++){var ct=b[j].slice(qe,Ee[at]);E.push({text:ct,wrapped:!0}),qe=Ee[at]}}else E.push({text:b[j],wrapped:!1})}return E},X.prototype.removeGhostText=function(){if(this.$ghostText){var O=this.$ghostText.position;this.removeExtraToken(O.row,O.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},X.prototype.addToken=function(O,_e,S,h){var b=this.session;b.bgTokenizer.lines[S]=null;var E={type:_e,value:O},j=b.getTokens(S);if(h==null||!j.length)j.push(E);else for(var we=0,Ee=0;Ee<j.length;Ee++){var qe=j[Ee];if(we+=qe.value.length,h<=we){var at=qe.value.length-(we-h),ct=qe.value.slice(0,at),Ht=qe.value.slice(at);j.splice(Ee,1,{type:qe.type,value:ct},E,{type:qe.type,value:Ht});break}}this.updateLines(S,S)},X.prototype.hideTokensAfterPosition=function(O,_e){for(var S=this.session.getTokens(O),h=0,b=!1,E=[],j=0;j<S.length;j++){var we=S[j];if(h+=we.value.length,we.type!=="ghost_text"){if(b){E.push({type:we.type,value:we.value}),we.type="hidden_token";continue}h===_e&&(b=!0)}}return this.updateLines(O,O),E},X.prototype.removeExtraToken=function(O,_e){this.session.bgTokenizer.lines[O]=null,this.updateLines(O,O)},X.prototype.setTheme=function(O,_e){var S=this;if(this.$themeId=O,S._dispatchEvent("themeChange",{theme:O}),!O||typeof O=="string"){var h=O||this.$options.theme.initialValue;a.loadModule(["theme",h],b)}else b(O);function b(E){if(S.$themeId!=O)return _e&&_e();if(!E||!E.cssClass)throw new Error("couldn't load module "+O+" or it didn't call define");E.$id&&(S.$themeId=E.$id),A.importCssString(E.cssText,E.cssClass,S.container),S.theme&&A.removeCssClass(S.container,S.theme.cssClass);var j="padding"in E?E.padding:"padding"in(S.theme||{})?4:S.$padding;S.$padding&&j!=S.$padding&&S.setPadding(j),S.$theme=E.cssClass,S.theme=E,A.addCssClass(S.container,E.cssClass),A.setCssClass(S.container,"ace_dark",E.isDark),S.$size&&(S.$size.width=0,S.$updateSizeAsync()),S._dispatchEvent("themeLoaded",{theme:E}),_e&&_e(),_.isSafari&&S.scroller&&(S.scroller.style.background="red",S.scroller.style.background="")}},X.prototype.getTheme=function(){return this.$themeId},X.prototype.setStyle=function(O,_e){A.setCssClass(this.container,O,_e!==!1)},X.prototype.unsetStyle=function(O){A.removeCssClass(this.container,O)},X.prototype.setCursorStyle=function(O){A.setStyle(this.scroller.style,"cursor",O)},X.prototype.setMouseCursor=function(O){A.setStyle(this.scroller.style,"cursor",O)},X.prototype.attachToShadowRoot=function(){A.importCssString(M,"ace_editor.css",this.container)},X.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},X.prototype.$updateCustomScrollbar=function(O){var _e=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,O===!0?(this.scrollBarV=new c(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(S){_e.$scrollAnimation||_e.session.setScrollTop(S.data-_e.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(S){_e.$scrollAnimation||_e.session.setScrollLeft(S.data-_e.scrollMargin.left)}),this.$scrollDecorator=new x(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(S){_e.$scrollAnimation||_e.session.setScrollTop(S.data-_e.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(S){_e.$scrollAnimation||_e.session.setScrollLeft(S.data-_e.scrollMargin.left)}))},X.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var O=this;this.$resizeTimer=k.delayedCall(function(){O.destroyed||O.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(_e){var S=_e[0].contentRect.width,h=_e[0].contentRect.height;Math.abs(O.$size.width-S)>1||Math.abs(O.$size.height-h)>1?O.$resizeTimer.delay():O.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},X}();se.prototype.CHANGE_CURSOR=1,se.prototype.CHANGE_MARKER=2,se.prototype.CHANGE_GUTTER=4,se.prototype.CHANGE_SCROLL=8,se.prototype.CHANGE_LINES=16,se.prototype.CHANGE_TEXT=32,se.prototype.CHANGE_SIZE=64,se.prototype.CHANGE_MARKER_BACK=128,se.prototype.CHANGE_MARKER_FRONT=256,se.prototype.CHANGE_FULL=512,se.prototype.CHANGE_H_SCROLL=1024,se.prototype.$changes=0,se.prototype.$padding=null,se.prototype.$frozen=!1,se.prototype.STEPS=8,L.implement(se.prototype,D),a.defineOptions(se.prototype,"renderer",{useResizeObserver:{set:function(X){!X&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):X&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(X){this.$textLayer.setShowInvisibles(X)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(X){typeof X=="number"&&(this.$printMarginColumn=X),this.$showPrintMargin=!!X,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(X){this.$gutter.style.display=X?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(X){this.$gutterLayer.$useSvgGutterIcons=X},initialValue:!1},showFoldedAnnotations:{set:function(X){this.$gutterLayer.$showFoldedAnnotations=X},initialValue:!1},fadeFoldWidgets:{set:function(X){A.setCssClass(this.$gutter,"ace_fade-fold-widgets",X)},initialValue:!1},showFoldWidgets:{set:function(X){this.$gutterLayer.setShowFoldWidgets(X),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(X){this.$textLayer.setDisplayIndentGuides(X)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(X){this.$textLayer.setHighlightIndentGuides(X)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(X){this.$gutterLayer.setHighlightGutterLine(X),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(X){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(X){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(X){typeof X=="number"&&(X=X+"px"),this.container.style.fontSize=X,this.updateFontSize()},initialValue:12},fontFamily:{set:function(X){this.container.style.fontFamily=X,this.updateFontSize()}},maxLines:{set:function(X){this.updateFull()}},minLines:{set:function(X){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(X){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(X){X=+X||0,this.$scrollPastEnd!=X&&(this.$scrollPastEnd=X,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(X){this.$gutterLayer.$fixedWidth=!!X,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(X){this.$updateCustomScrollbar(X)},initialValue:!1},theme:{set:function(X){this.setTheme(X)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!_.isMobile&&!_.isIE}}),g.VirtualRenderer=se}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(d,g,J){var L=d("../lib/oop"),A=d("../lib/net"),k=d("../lib/event_emitter").EventEmitter,a=d("../config");function u(t){var e="importScripts('"+A.qualifyURL(t)+"');";try{return new Blob([e],{type:"application/javascript"})}catch{var n=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,c=new n;return c.append(e),c.getBlob("application/javascript")}}function r(t){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var e=u(t),n=window.URL||window.webkitURL,c=n.createObjectURL(e);return new Worker(c)}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(){L.implement(this,k),this.$createWorkerFromOldConfig=function(t,e,n,c,f){if(d.nameToUrl&&!d.toUrl&&(d.toUrl=d.nameToUrl),a.get("packaged")||!d.toUrl)c=c||a.moduleUrl(e,"worker");else{var m=this.$normalizePath;c=c||m(d.toUrl("ace/worker/worker.js",null,"_"));var D={};t.forEach(function(M){D[M]=m(d.toUrl(M,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=r(c),f&&this.send("importScripts",f),this.$worker.postMessage({init:!0,tlns:D,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 A.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 c=this.callbackId++;this.callbacks[c]=n,e.push(c)}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 o=function(t,e,n){var c=null,f=!1,m=Object.create(k),D=[],M=new i({messageBuffer:D,terminate:function(){},postMessage:function(_){D.push(_),c&&(f?setTimeout(x):x())}});M.setEmitSync=function(_){f=_};var x=function(){var _=D.shift();_.command?c[_.command].apply(c,_.args):_.event&&m._signal(_.event,_.data)};return m.postMessage=function(_){M.onMessage({data:_})},m.callback=function(_,U){this.postMessage({type:"call",id:U,data:_})},m.emit=function(_,U){this.postMessage({type:"event",name:_,data:U})},a.loadModule(["worker",e],function(_){for(c=new _[n](m);D.length;)x()}),M};g.UIWorkerClient=o,g.WorkerClient=i,g.createWorker=r}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(d,g,J){var L=d("./range").Range,A=d("./lib/event_emitter").EventEmitter,k=d("./lib/oop"),a=function(){function u(r,i,o,t,e,n){var c=this;this.length=i,this.session=r,this.doc=r.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(){c.onCursorChange()})},this.$pos=o;var f=r.getUndoManager().$undoStack||r.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=f.length,this.setup(),r.selection.on("changeCursor",this.$onCursorChange)}return u.prototype.setup=function(){var r=this,i=this.doc,o=this.session;this.selectionBefore=o.selection.toJSON(),o.selection.inMultiSelectMode&&o.selection.toSingleRange(),this.pos=i.createAnchor(this.$pos.row,this.$pos.column);var t=this.pos;t.$insertRight=!0,t.detach(),t.markerId=o.addMarker(new L(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(),r.others.push(n)}),o.setUndoSelect(!1)},u.prototype.showOtherMarkers=function(){if(!this.othersActive){var r=this.session,i=this;this.othersActive=!0,this.others.forEach(function(o){o.markerId=r.addMarker(new L(o.row,o.column,o.row,o.column+i.length),i.othersClass,null,!1)})}},u.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var r=0;r<this.others.length;r++)this.session.removeMarker(this.others[r].markerId)}},u.prototype.onUpdate=function(r){if(this.$updating)return this.updateAnchors(r);var i=r;if(i.start.row===i.end.row&&i.start.row===this.pos.row){this.$updating=!0;var o=r.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(r),t&&(this.length+=o),t&&!this.session.$fromUndo){if(r.action==="insert")for(var n=this.others.length-1;n>=0;n--){var c=this.others[n],f={row:c.row,column:c.column+e};this.doc.insertMergedLines(f,r.lines)}else if(r.action==="remove")for(var n=this.others.length-1;n>=0;n--){var c=this.others[n],f={row:c.row,column:c.column+e};this.doc.remove(new L(f.row,f.column,f.row,f.column-o))}}this.$updating=!1,this.updateMarkers()}},u.prototype.updateAnchors=function(r){this.pos.onChange(r);for(var i=this.others.length;i--;)this.others[i].onChange(r);this.updateMarkers()},u.prototype.updateMarkers=function(){if(!this.$updating){var r=this,i=this.session,o=function(e,n){i.removeMarker(e.markerId),e.markerId=i.addMarker(new L(e.row,e.column,e.row,e.column+r.length),n,null,!1)};o(this.pos,this.mainClass);for(var t=this.others.length;t--;)o(this.others[t],this.othersClass)}},u.prototype.onCursorChange=function(r){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",r)):(this.hideOtherMarkers(),this._emit("cursorLeave",r))}},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 r=this.session.getUndoManager(),i=(r.$undoStack||r.$undostack).length-this.$undoStackDepth,o=0;o<i;o++)r.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},u}();k.implement(a.prototype,A),g.PlaceHolder=a}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(d,g,J){var L=d("../lib/event"),A=d("../lib/useragent");function k(u,r){return u.row==r.row&&u.column==r.column}function a(u){var r=u.domEvent,i=r.altKey,o=r.shiftKey,t=r.ctrlKey,e=u.getAccelKey(),n=u.getButton();if(t&&A.isMac&&(n=r.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 c=u.editor,f=c.selection,m=c.inMultiSelectMode,D=u.getDocumentPosition(),M=f.getCursor(),x=u.inSelection()||f.isEmpty()&&k(D,M),_=u.x,U=u.y,se=function(ct){_=ct.clientX,U=ct.clientY},X=c.session,O=c.renderer.pixelToScreenCoordinates(_,U),_e=O,S;if(c.$mouseHandler.$enableJumpToDef)t&&i||e&&i?S=o?"block":"add":i&&c.$blockSelectEnabled&&(S="block");else if(e&&!i){if(S="add",!m&&o)return}else i&&c.$blockSelectEnabled&&(S="block");if(S&&A.isMac&&r.ctrlKey&&c.$mouseHandler.cancelContextMenu(),S=="add"){if(!m&&x)return;if(!m){var h=f.toOrientedRange();c.addSelectionMarker(h)}var b=f.rangeList.rangeAtPoint(D);c.inVirtualSelectionMode=!0,o&&(b=null,h=f.ranges[0]||h,c.removeSelectionMarker(h)),c.once("mouseup",function(){var ct=f.toOrientedRange();b&&ct.isEmpty()&&k(b.cursor,ct.cursor)?f.substractPoint(ct.cursor):(o?f.substractPoint(h.cursor):h&&(c.removeSelectionMarker(h),f.addRange(h)),f.addRange(ct)),c.inVirtualSelectionMode=!1})}else if(S=="block"){u.stop(),c.inVirtualSelectionMode=!0;var E,j=[],we=function(){var ct=c.renderer.pixelToScreenCoordinates(_,U),Ht=X.screenToDocumentPosition(ct.row,ct.column,ct.offsetX);k(_e,ct)&&k(Ht,f.lead)||(_e=ct,c.selection.moveToPosition(Ht),c.renderer.scrollCursorIntoView(),c.removeSelectionMarkers(j),j=f.rectangularRangeBlock(_e,O),c.$mouseHandler.$clickSelection&&j.length==1&&j[0].isEmpty()&&(j[0]=c.$mouseHandler.$clickSelection.clone()),j.forEach(c.addSelectionMarker,c),c.updateSelectionMarkers())};m&&!e?f.toSingleRange():!m&&e&&(E=f.toOrientedRange(),c.addSelectionMarker(E)),o?O=X.documentToScreenPosition(f.lead):f.moveToPosition(D),_e={row:-1,column:-1};var Ee=function(ct){we(),clearInterval(at),c.removeSelectionMarkers(j),j.length||(j=[f.toOrientedRange()]),E&&(c.removeSelectionMarker(E),f.toSingleRange(E));for(var Ht=0;Ht<j.length;Ht++)f.addRange(j[Ht]);c.inVirtualSelectionMode=!1,c.$mouseHandler.$clickSelection=null},qe=we;L.capture(c.container,se,Ee);var at=setInterval(function(){qe()},20);return u.preventDefault()}}}g.onMouseDown=a}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(d,g,J){g.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(A){A.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(A){A.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(A){A.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(A){A.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(A){A.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(A){A.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(A){A.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(A){A.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(A){A.multiSelect.rangeCount>1?A.multiSelect.joinSelections():A.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(A){A.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(A){A.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(A){A.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],g.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(A){A.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(A){return A&&A.inMultiSelectMode}}];var L=d("../keyboard/hash_handler").HashHandler;g.keyboardHandler=new L(g.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(d,g,J){var L=d("./range_list").RangeList,A=d("./range").Range,k=d("./selection").Selection,a=d("./mouse/multi_select_handler").onMouseDown,u=d("./lib/event"),r=d("./lib/lang"),i=d("./commands/multi_select_commands");g.commands=i.defaultCommands.concat(i.multiSelectCommands);var o=d("./search").Search,t=new o;function e(M,x,_){return t.$options.wrap=!0,t.$options.needle=x,t.$options.backwards=_==-1,t.find(M)}var n=d("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(n.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(M,x){if(M){if(!this.inMultiSelectMode&&this.rangeCount===0){var _=this.toOrientedRange();if(this.rangeList.add(_),this.rangeList.add(M),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),x||this.fromOrientedRange(M);this.rangeList.removeAll(),this.rangeList.add(_),this.$onAddRange(_)}M.cursor||(M.cursor=M.end);var U=this.rangeList.add(M);return this.$onAddRange(M),U.length&&this.$onRemoveRange(U),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),x||this.fromOrientedRange(M)}},this.toSingleRange=function(M){M=M||this.ranges[0];var x=this.rangeList.removeAll();x.length&&this.$onRemoveRange(x),M&&this.fromOrientedRange(M)},this.substractPoint=function(M){var x=this.rangeList.substractPoint(M);if(x)return this.$onRemoveRange(x),x[0]},this.mergeOverlappingRanges=function(){var M=this.rangeList.merge();M.length&&this.$onRemoveRange(M)},this.$onAddRange=function(M){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(M),this._signal("addRange",{range:M})},this.$onRemoveRange=function(M){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var x=this.rangeList.ranges.pop();M.push(x),this.rangeCount=0}for(var _=M.length;_--;){var U=this.ranges.indexOf(M[_]);this.ranges.splice(U,1)}this._signal("removeRange",{ranges:M}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),x=x||this.ranges[0],x&&!x.isEqual(this.getRange())&&this.fromOrientedRange(x)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new L,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var M=this.ranges.length?this.ranges:[this.getRange()],x=[],_=0;_<M.length;_++){var U=M[_],se=U.start.row,X=U.end.row;if(se===X)x.push(U.clone());else{for(x.push(new A(se,U.start.column,se,this.session.getLine(se).length));++se<X;)x.push(this.getLineRange(se,!0));x.push(new A(X,0,X,U.end.column))}_==0&&!this.isBackwards()&&(x=x.reverse())}this.toSingleRange();for(var _=x.length;_--;)this.addRange(x[_])},this.joinSelections=function(){var M=this.rangeList.ranges,x=M[M.length-1],_=A.fromPoints(M[0].start,x.end);this.toSingleRange(),this.setSelectionRange(_,x.cursor==x.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var M=this.rangeList.ranges,x=M[M.length-1],_=A.fromPoints(M[0].start,x.end);this.toSingleRange(),this.setSelectionRange(_,x.cursor==x.start)}else{var U=this.session.documentToScreenPosition(this.cursor),se=this.session.documentToScreenPosition(this.anchor),X=this.rectangularRangeBlock(U,se);X.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(M,x,_){var U=[],se=M.column<x.column;if(se)var X=M.column,O=x.column,_e=M.offsetX,S=x.offsetX;else var X=x.column,O=M.column,_e=x.offsetX,S=M.offsetX;var h=M.row<x.row;if(h)var b=M.row,E=x.row;else var b=x.row,E=M.row;X<0&&(X=0),b<0&&(b=0),b==E&&(_=!0);for(var j,we=b;we<=E;we++){var Ee=A.fromPoints(this.session.screenToDocumentPosition(we,X,_e),this.session.screenToDocumentPosition(we,O,S));if(Ee.isEmpty()){if(j&&f(Ee.end,j))break;j=Ee.end}Ee.cursor=se?Ee.start:Ee.end,U.push(Ee)}if(h&&U.reverse(),!_){for(var qe=U.length-1;U[qe].isEmpty()&&qe>0;)qe--;if(qe>0)for(var at=0;U[at].isEmpty();)at++;for(var ct=qe;ct>=at;ct--)U[ct].isEmpty()&&U.splice(ct,1)}return U}}).call(k.prototype);var c=d("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(M){M.cursor||(M.cursor=M.end);var x=this.getSelectionStyle();return M.marker=this.session.addMarker(M,"ace_selection",x),this.session.$selectionMarkers.push(M),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,M},this.removeSelectionMarker=function(M){if(M.marker){this.session.removeMarker(M.marker);var x=this.session.$selectionMarkers.indexOf(M);x!=-1&&this.session.$selectionMarkers.splice(x,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(M){for(var x=this.session.$selectionMarkers,_=M.length;_--;){var U=M[_];if(U.marker){this.session.removeMarker(U.marker);var se=x.indexOf(U);se!=-1&&x.splice(se,1)}}this.session.selectionMarkerCount=x.length},this.$onAddRange=function(M){this.addSelectionMarker(M.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(M){this.removeSelectionMarkers(M.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(M){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(i.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(M){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(i.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(M){var x=M.command,_=M.editor;if(_.multiSelect){if(x.multiSelectAction)x.multiSelectAction=="forEach"?U=_.forEachSelection(x,M.args):x.multiSelectAction=="forEachLine"?U=_.forEachSelection(x,M.args,!0):x.multiSelectAction=="single"?(_.exitMultiSelectMode(),U=x.exec(_,M.args||{})):U=x.multiSelectAction(_,M.args||{});else{var U=x.exec(_,M.args||{});_.multiSelect.addRange(_.multiSelect.toOrientedRange()),_.multiSelect.mergeOverlappingRanges()}return U}},this.forEachSelection=function(M,x,_){if(!this.inVirtualSelectionMode){var U=_&&_.keepOrder,se=_==!0||_&&_.$byLines,X=this.session,O=this.selection,_e=O.rangeList,S=(U?O:_e).ranges,h;if(!S.length)return M.exec?M.exec(this,x||{}):M(this,x||{});var b=O._eventRegistry;O._eventRegistry={};var E=new k(X);this.inVirtualSelectionMode=!0;for(var j=S.length;j--;){if(se)for(;j>0&&S[j].start.row==S[j-1].end.row;)j--;E.fromOrientedRange(S[j]),E.index=j,this.selection=X.selection=E;var we=M.exec?M.exec(this,x||{}):M(this,x||{});!h&&we!==void 0&&(h=we),E.toOrientedRange(S[j])}E.detach(),this.selection=X.selection=O,this.inVirtualSelectionMode=!1,O._eventRegistry=b,O.mergeOverlappingRanges(),O.ranges[0]&&O.fromOrientedRange(O.ranges[0]);var Ee=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),Ee&&Ee.from==Ee.to&&this.renderer.animateScrolling(Ee.from),h}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var M="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var x=this.multiSelect.rangeList.ranges,_=[],U=0;U<x.length;U++)_.push(this.session.getTextRange(x[U]));var se=this.session.getDocument().getNewLineCharacter();M=_.join(se),M.length==(_.length-1)*se.length&&(M="")}else this.selection.isEmpty()||(M=this.session.getTextRange(this.getSelectionRange()));return M},this.$checkMultiselectChange=function(M,x){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var _=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&x==this.multiSelect.anchor)return;var U=x==this.multiSelect.anchor?_.cursor==_.start?_.end:_.start:_.cursor;U.row!=x.row||this.session.$clipPositionToDocument(U.row,U.column).column!=x.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(M,x,_){if(x=x||{},x.needle=M||x.needle,x.needle==null){var U=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();x.needle=this.session.getTextRange(U)}this.$search.set(x);var se=this.$search.findAll(this.session);if(!se.length)return 0;var X=this.multiSelect;_||X.toSingleRange(se[0]);for(var O=se.length;O--;)X.addRange(se[O],!0);return U&&X.rangeList.rangeAtPoint(U.start)&&X.addRange(U,!0),se.length},this.selectMoreLines=function(M,x){var _=this.selection.toOrientedRange(),U=_.cursor==_.end,se=this.session.documentToScreenPosition(_.cursor);this.selection.$desiredColumn&&(se.column=this.selection.$desiredColumn);var X=this.session.screenToDocumentPosition(se.row+M,se.column);if(_.isEmpty())var _e=X;else var O=this.session.documentToScreenPosition(U?_.end:_.start),_e=this.session.screenToDocumentPosition(O.row+M,O.column);if(U){var S=A.fromPoints(X,_e);S.cursor=S.start}else{var S=A.fromPoints(_e,X);S.cursor=S.end}if(S.desiredColumn=se.column,!this.selection.inMultiSelectMode)this.selection.addRange(_);else if(x)var h=_.cursor;this.selection.addRange(S),h&&this.selection.substractPoint(h)},this.transposeSelections=function(M){for(var x=this.session,_=x.multiSelect,U=_.ranges,se=U.length;se--;){var X=U[se];if(X.isEmpty()){var O=x.getWordRange(X.start.row,X.start.column);X.start.row=O.start.row,X.start.column=O.start.column,X.end.row=O.end.row,X.end.column=O.end.column}}_.mergeOverlappingRanges();for(var _e=[],se=U.length;se--;){var X=U[se];_e.unshift(x.getTextRange(X))}M<0?_e.unshift(_e.pop()):_e.push(_e.shift());for(var se=U.length;se--;){var X=U[se],S=X.clone();x.replace(X,_e[se]),X.start.row=S.start.row,X.start.column=S.start.column}_.fromOrientedRange(_.ranges[0])},this.selectMore=function(M,x,_){var U=this.session,se=U.multiSelect,X=se.toOrientedRange();if(!(X.isEmpty()&&(X=U.getWordRange(X.start.row,X.start.column),X.cursor=M==-1?X.start:X.end,this.multiSelect.addRange(X),_))){var O=U.getTextRange(X),_e=e(U,O,M);_e&&(_e.cursor=M==-1?_e.start:_e.end,this.session.unfold(_e),this.multiSelect.addRange(_e),this.renderer.scrollCursorIntoView(null,.5)),x&&this.multiSelect.substractPoint(X.cursor)}},this.alignCursors=function(){var M=this.session,x=M.multiSelect,_=x.ranges,U=-1,se=_.filter(function(qe){if(qe.cursor.row==U)return!0;U=qe.cursor.row});if(!_.length||se.length==_.length-1){var X=this.selection.getRange(),O=X.start.row,_e=X.end.row,S=O==_e;if(S){var h=this.session.getLength(),b;do b=this.session.getLine(_e);while(/[=:]/.test(b)&&++_e<h);do b=this.session.getLine(O);while(/[=:]/.test(b)&&--O>0);O<0&&(O=0),_e>=h&&(_e=h-1)}var E=this.session.removeFullLines(O,_e);E=this.$reAlignText(E,S),this.session.insert({row:O,column:0},E.join(`
937
- `)+`
938
- `),S||(X.start.column=0,X.end.column=E[E.length-1].length),this.selection.setRange(X)}else{se.forEach(function(qe){x.substractPoint(qe.cursor)});var j=0,we=1/0,Ee=_.map(function(qe){var at=qe.cursor,ct=M.getLine(at.row),Ht=ct.substr(at.column).search(/\S/g);return Ht==-1&&(Ht=0),at.column>j&&(j=at.column),Ht<we&&(we=Ht),Ht});_.forEach(function(qe,at){var ct=qe.cursor,Ht=j-ct.column,lt=Ee[at]-we;Ht>lt?M.insert(ct,r.stringRepeat(" ",Ht-lt)):M.remove(new A(ct.row,ct.column,ct.row,ct.column-Ht+lt)),qe.start.column=qe.end.column=j,qe.start.row=qe.end.row=ct.row,qe.cursor=qe.end}),x.fromOrientedRange(_[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(M,x){var _=!0,U=!0,se,X,O;return M.map(function(E){var j=E.match(/(\s*)(.*?)(\s*)([=:].*)/);return j?se==null?(se=j[1].length,X=j[2].length,O=j[3].length,j):(se+X+O!=j[1].length+j[2].length+j[3].length&&(U=!1),se!=j[1].length&&(_=!1),se>j[1].length&&(se=j[1].length),X<j[2].length&&(X=j[2].length),O>j[3].length&&(O=j[3].length),j):[E]}).map(x?S:_?U?h:S:b);function _e(E){return r.stringRepeat(" ",E)}function S(E){return E[2]?_e(se)+E[2]+_e(X-E[2].length+O)+E[4].replace(/^([=:])\s+/,"$1 "):E[0]}function h(E){return E[2]?_e(se+X-E[2].length)+E[2]+_e(O)+E[4].replace(/^([=:])\s+/,"$1 "):E[0]}function b(E){return E[2]?_e(se)+E[2]+_e(O)+E[4].replace(/^([=:])\s+/,"$1 "):E[0]}}}).call(c.prototype);function f(M,x){return M.row==x.row&&M.column==x.column}g.onSessionChange=function(M){var x=M.session;x&&!x.multiSelect&&(x.$selectionMarkers=[],x.selection.$initRangeList(),x.multiSelect=x.selection),this.multiSelect=x&&x.multiSelect;var _=M.oldSession;_&&(_.multiSelect.off("addRange",this.$onAddRange),_.multiSelect.off("removeRange",this.$onRemoveRange),_.multiSelect.off("multiSelect",this.$onMultiSelect),_.multiSelect.off("singleSelect",this.$onSingleSelect),_.multiSelect.lead.off("change",this.$checkMultiselectChange),_.multiSelect.anchor.off("change",this.$checkMultiselectChange)),x&&(x.multiSelect.on("addRange",this.$onAddRange),x.multiSelect.on("removeRange",this.$onRemoveRange),x.multiSelect.on("multiSelect",this.$onMultiSelect),x.multiSelect.on("singleSelect",this.$onSingleSelect),x.multiSelect.lead.on("change",this.$checkMultiselectChange),x.multiSelect.anchor.on("change",this.$checkMultiselectChange)),x&&this.inMultiSelectMode!=x.selection.inMultiSelectMode&&(x.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function m(M){M.$multiselectOnSessionChange||(M.$onAddRange=M.$onAddRange.bind(M),M.$onRemoveRange=M.$onRemoveRange.bind(M),M.$onMultiSelect=M.$onMultiSelect.bind(M),M.$onSingleSelect=M.$onSingleSelect.bind(M),M.$multiselectOnSessionChange=g.onSessionChange.bind(M),M.$checkMultiselectChange=M.$checkMultiselectChange.bind(M),M.$multiselectOnSessionChange(M),M.on("changeSession",M.$multiselectOnSessionChange),M.on("mousedown",a),M.commands.addCommands(i.defaultCommands),D(M))}function D(M){if(!M.textInput)return;var x=M.textInput.getElement(),_=!1;u.addListener(x,"keydown",function(se){var X=se.keyCode==18&&!(se.ctrlKey||se.shiftKey||se.metaKey);M.$blockSelectEnabled&&X?_||(M.renderer.setMouseCursor("crosshair"),_=!0):_&&U()},M),u.addListener(x,"keyup",U,M),u.addListener(x,"blur",U,M);function U(se){_&&(M.renderer.setMouseCursor(""),_=!1)}}g.MultiSelect=m,d("./config").defineOptions(c.prototype,"editor",{enableMultiselect:{set:function(M){m(this),M?this.on("mousedown",a):this.off("mousedown",a)},value:!0},enableBlockSelect:{set:function(M){this.$blockSelectEnabled=M},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(d,g,J){var L=d("../../range").Range,A=g.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(k,a,u){var r=k.getLine(u);return this.foldingStartMarker.test(r)?"start":a=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(k,a,u){return null},this.indentationBlock=function(k,a,u){var r=/\S/,i=k.getLine(a),o=i.search(r);if(o!=-1){for(var t=u||i.length,e=k.getLength(),n=a,c=a;++a<e;){var f=k.getLine(a).search(r);if(f!=-1){if(f<=o){var m=k.getTokenAt(a,0);if(!m||m.type!=="string")break}c=a}}if(c>n){var D=k.getLine(c).length;return new L(n,t,c,D)}}},this.openingBracketBlock=function(k,a,u,r,i){var o={row:u,column:r+1},t=k.$findClosingBracket(a,o,i);if(t){var e=k.foldWidgets[t.row];return e==null&&(e=k.getFoldWidget(t.row)),e=="start"&&t.row>o.row&&(t.row--,t.column=k.getLine(t.row).length),L.fromPoints(o,t)}},this.closingBracketBlock=function(k,a,u,r,i){var o={row:u,column:r},t=k.$findOpeningBracket(a,o);if(t)return t.column++,o.column--,L.fromPoints(t,o)}}).call(A.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(d,g,J){var L=d("../lib/dom"),A=d("../range").Range,k=d("../config").nls;function a(r,i,o){for(var t=0,e=r.length-1;t<=e;){var n=t+e>>1,c=o(i,r[n]);if(c>0)t=n+1;else if(c<0)e=n-1;else return n}return-(t+1)}function u(r,i,o){var t=r.getAnnotations().sort(A.comparePoints);if(t.length){var e=a(t,{row:i,column:-1},A.comparePoints);e<0&&(e=-e-1),e>=t.length?e=o>0?0:t.length-1:e===0&&o<0&&(e=t.length-1);var n=t[e];if(!(!n||!o)){if(n.row===i){do n=t[e+=o];while(n&&n.row===i);if(!n)return t.slice()}var c=[];i=n.row;do c[o<0?"unshift":"push"](n),n=t[e+=o];while(n&&n.row==i);return c.length&&c}}}g.showErrorMarker=function(r,i){var o=r.session,t=r.getCursorPosition(),e=t.row,n=o.widgetManager.getWidgetsAtRow(e).filter(function(se){return se.type=="errorMarker"})[0];n?n.destroy():e-=i;var c=u(o,e,i),f;if(c){var m=c[0];t.column=(m.pos&&typeof m.column!="number"?m.pos.sc:m.column)||0,t.row=m.row,f=r.renderer.$gutterLayer.$annotations[t.row]}else{if(n)return;f={displayText:[k("error-marker.good-state","Looks good!")],className:"ace_ok"}}r.session.unfold(t.row),r.selection.moveToPosition(t);var D={row:t.row,fixedWidth:!0,coverGutter:!0,el:L.createElement("div"),type:"errorMarker"},M=D.el.appendChild(L.createElement("div")),x=D.el.appendChild(L.createElement("div"));x.className="error_widget_arrow "+f.className;var _=r.renderer.$cursorLayer.getPixelPosition(t).left;x.style.left=_+r.renderer.gutterWidth-5+"px",D.el.className="error_widget_wrapper",M.className="error_widget "+f.className,f.displayText.forEach(function(se,X){M.appendChild(L.createTextNode(se)),X<f.displayText.length-1&&M.appendChild(L.createElement("br"))}),M.appendChild(L.createElement("div"));var U=function(se,X,O){if(X===0&&(O==="esc"||O==="return"))return D.destroy(),{command:"null"}};D.destroy=function(){r.$mouseHandler.isMousePressed||(r.keyBinding.removeKeyboardHandler(U),o.widgetManager.removeLineWidget(D),r.off("changeSelection",D.destroy),r.off("changeSession",D.destroy),r.off("mouseup",D.destroy),r.off("change",D.destroy))},r.keyBinding.addKeyboardHandler(U),r.on("changeSelection",D.destroy),r.on("changeSession",D.destroy),r.on("mouseup",D.destroy),r.on("change",D.destroy),r.session.widgetManager.addLineWidget(D),D.el.onmousedown=r.focus.bind(r),r.renderer.scrollCursorIntoView(null,.5,{bottom:D.el.offsetHeight})},L.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(d,g,J){d("./loader_build")(g);var L=d("./lib/dom"),A=d("./range").Range,k=d("./editor").Editor,a=d("./edit_session").EditSession,u=d("./undomanager").UndoManager,r=d("./virtual_renderer").VirtualRenderer;d("./worker/worker_client"),d("./keyboard/hash_handler"),d("./placeholder"),d("./multi_select"),d("./mode/folding/fold_mode"),d("./theme/textmate"),d("./ext/error_marker"),g.config=d("./config"),g.edit=function(o,t){if(typeof o=="string"){var e=o;if(o=document.getElementById(e),!o)throw new Error("ace.edit can't find div #"+e)}if(o&&o.env&&o.env.editor instanceof k)return o.env.editor;var n="";if(o&&/input|textarea/i.test(o.tagName)){var c=o;n=c.value,o=L.createElement("pre"),c.parentNode.replaceChild(o,c)}else o&&(n=o.textContent,o.innerHTML="");var f=g.createEditSession(n),m=new k(new r(o),f,t),D={document:f,editor:m,onResize:m.resize.bind(m,null)};return c&&(D.textarea=c),m.on("destroy",function(){D.editor.container.env=null}),m.container.env=m.env=D,m},g.createEditSession=function(o,t){var e=new a(o,t);return e.setUndoManager(new u),e},g.Range=A,g.Editor=k,g.EditSession=a,g.UndoManager=u,g.VirtualRenderer=r;var i=g.config.version;g.version=i}),function(){ace.require(["ace/ace"],function(d){d&&(d.config.init(!0),d.define=ace.define);var g=function(){return this}();!g&&typeof window<"u"&&(g=window),!g&&typeof self<"u"&&(g=self),g.ace||(g.ace=d);for(var J in d)d.hasOwnProperty(J)&&(g.ace[J]=d[J]);g.ace.default=g.ace,p&&(p.exports=g.ace)})}()}(ace$1)),ace$1.exports}var aceExports=requireAce(),modeRuby={exports:{}},hasRequiredModeRuby;function requireModeRuby(){return hasRequiredModeRuby||(hasRequiredModeRuby=1,function(p,w){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(d,g,J){var L=d("../lib/oop"),A=d("./text_highlight_rules").TextHighlightRules,k=g.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};g.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},g.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},g.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var a=g.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},u=g.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},r=g.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},i=g.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},o=g.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},t=g.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},e=g.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},n=g.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},c=function(){var f="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|private_class_method|remove_method|undef_method",m="alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|__ENCODING__|prepend",D="true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION",M="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",x=this.$keywords=this.createKeywordMapper({keyword:m,"constant.language":D,"variable.language":M,"support.function":f,"invalid.deprecated":"debugger"},"identifier"),_=`\\\\(?: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})*})`,U={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};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:_},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:_},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/`/,next:"pop"},{defaultToken:"string"}]},{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(')/,push:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string.end",regex:/'/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/%[qwx]([(\[<{^|%])/,onMatch:function(se,X,O){O.length&&(O=[]);var _e=se[se.length-1];return O.unshift(_e,X),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(se,X,O){O.length&&(O=[]);var _e=se[se.length-1];return O.unshift(_e,X),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(se,X,O){O.length&&(O=[]);var _e=se[se.length-1];return O.unshift(_e,X),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(se,X,O){O.length&&(O=[]);var _e=se[se.length-1];return O.unshift(_e,X),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(se,X,O){O.length&&(O=[]);var _e=se[se.length-1];return O.unshift(_e,X),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)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},o,t,k,a,e,u,r,i,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:x,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(se,X,O){var _e=se[2]=="-"||se[2]=="~"?"indentedHeredoc":"heredoc",S=se.split(this.splitRegex);return O.push(_e,S[3]),[{type:"constant",value:S[1]},{type:"string",value:S[2]},{type:"support.class",value:S[3]},{type:"string",value:S[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(se,X,O){return se===O[1]?(O.shift(),O.shift(),this.next=O[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(se,X,O){return se===O[1]?(O.shift(),O.shift(),this.next=O[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(se,X){return X[0]==="heredoc"||X[0]==="indentedHeredoc"?X[0]:se}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(se,X,O){return this.next="",se=="}"&&O.length>1&&O[1]!="start"&&(O.shift(),this.next=O.shift()),this.token}},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:/[?:,;.]/}],comment:[{token:"comment.multiline",regex:"^=end(?=$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}],qStateWithInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(se,X,O){return O.length&&se===O[0]?(O.unshift(se,X),this.token):"string"}},{token:"constant.language.escape",regex:_},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(se,X,O){return O.length&&se===U[O[0]]?(O.shift(),this.next=O.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(se,X,O){return O.length&&se===O[0]?(O.unshift(se,X),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(se,X,O){return O.length&&se===U[O[0]]?(O.shift(),this.next=O.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(se,X,O){return O.length&&se===O[0]?(O.unshift(se,X),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(se,X,O){return O.length&&se===U[O[0]]?(O.shift(),this.next=O.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(se,X,O){return O.length&&se===O[0]?(O.unshift(se,X),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:_},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(se,X,O){return O.length&&se===U[O[0]]?(O.shift(),this.next=O.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(se,X,O){return O.length&&se===O[0]?(O.unshift(se,X),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(se,X,O){return O.length&&se[0]===U[O[0]]?(O.shift(),this.next=O.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()};L.inherits(c,A),g.RubyHighlightRules=c}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(d,g,J){var L=d("../range").Range,A=function(){};(function(){this.checkOutdent=function(k,a){return/^\s+$/.test(k)?/^\s*\}/.test(a):!1},this.autoOutdent=function(k,a){var u=k.getLine(a),r=u.match(/^(\s*\})/);if(!r)return 0;var i=r[1].length,o=k.findMatchingBracket({row:a,column:i});if(!o||o.row==a)return 0;var t=this.$getIndent(k.getLine(o.row));k.replace(new L(a,0,a,i-1),t)},this.$getIndent=function(k){return k.match(/^\s*/)[0]}}).call(A.prototype),g.MatchingBraceOutdent=A}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(d,g,J){var L=d("../../lib/oop"),A=d("./fold_mode").FoldMode,k=d("../../range").Range,a=d("../../token_iterator").TokenIterator,u=g.FoldMode=function(){};L.inherits(u,A),(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(r,i,o){var t=r.getLine(o),e=this.foldingStartMarker.test(t),n=this.foldingStopMarker.test(t);if(e&&!n){var c=t.match(this.foldingStartMarker);if(c[1]){if((c[1]=="if"||c[1]=="else"||c[1]=="while"||c[1]=="until"||c[1]=="unless")&&(c[1]=="else"&&/^\s*else\s*$/.test(t)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(t)===!1)||c[1]=="when"&&/\sthen\s/.test(t)===!0)return;if(r.getTokenAt(o,c.index+2).type==="keyword")return"start"}else if(!c[3]||r.getTokenAt(o,c.index+1).type==="comment.multiline")return"start"}if(i!="markbeginend"||!n||e&&n)return"";var c=t.match(this.foldingStopMarker);if(c[3]==="end"){if(r.getTokenAt(o,c.index+1).type==="keyword")return"end"}else if(!c[1]||r.getTokenAt(o,c.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(r,i,o){var t=r.doc.getLine(o),e=this.foldingStartMarker.exec(t);if(e)return e[1]||e[3]?this.rubyBlock(r,o,e.index+2):this.openingBracketBlock(r,"{",o,e.index);var e=this.foldingStopMarker.exec(t);if(e)return e[3]==="end"&&r.getTokenAt(o,e.index+1).type==="keyword"?this.rubyBlock(r,o,e.index+1):e[1]==="=end"&&r.getTokenAt(o,e.index+1).type==="comment.multiline"?this.rubyBlock(r,o,e.index+1):this.closingBracketBlock(r,"}",o,e.index+e[0].length)},this.rubyBlock=function(r,S,o,t){var e=new a(r,S,o),n=e.getCurrentToken();if(!(!n||n.type!="keyword"&&n.type!="comment.multiline")){var c=n.value,f=r.getLine(S);switch(n.value){case"if":case"unless":case"while":case"until":var m=new RegExp("^\\s*"+n.value);if(!m.test(f))return;var D=this.indentKeywords[c];break;case"when":if(/\sthen\s/.test(f))return;case"elsif":case"rescue":case"ensure":var D=1;break;case"else":var m=new RegExp("^\\s*"+n.value+"\\s*$");if(!m.test(f))return;var D=1;break;default:var D=this.indentKeywords[c]}var M=[c];if(D){var x=D===-1?r.getLine(S-1).length:r.getLine(S).length,_=S,U=[];if(U.push(e.getCurrentTokenRange()),e.step=D===-1?e.stepBackward:e.stepForward,n.type=="comment.multiline"){for(;n=e.step();)if(n.type==="comment.multiline"){if(D==1){if(x=6,n.value=="=end")break}else if(n.value=="=begin")break}}else for(;n=e.step();){var se=!1;if(n.type==="keyword"){var X=D*this.indentKeywords[n.value];switch(f=r.getLine(e.getCurrentTokenRow()),n.value){case"do":for(var O=e.$tokenIndex-1;O>=0;O--){var _e=e.$rowTokens[O];if(_e&&(_e.value=="while"||_e.value=="until"||_e.value=="for")){X=0;break}}break;case"else":var m=new RegExp("^\\s*"+n.value+"\\s*$");(!m.test(f)||c=="case")&&(X=0,se=!0);break;case"if":case"unless":case"while":case"until":var m=new RegExp("^\\s*"+n.value);m.test(f)||(X=0,se=!0);break;case"when":(/\sthen\s/.test(f)||c=="case")&&(X=0,se=!0)}if(X>0)M.unshift(n.value);else if(X<=0&&se===!1){if(M.shift(),!M.length&&((c=="while"||c=="until"||c=="for")&&n.value!="do"||n.value=="do"&&D==-1&&X!=0||n.value!="do"))break;X===0&&M.unshift(n.value)}}}if(!n)return null;if(t)return U.push(e.getCurrentTokenRange()),U;var S=e.getCurrentTokenRow();if(D===-1){if(n.type==="comment.multiline")var h=6;else var h=r.getLine(S).length;return new k(S,h,_-1,x)}return new k(_,x,S-1,r.getLine(S-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(d,g,J){var L=d("../lib/oop"),A=d("./text").Mode,k=d("./ruby_highlight_rules").RubyHighlightRules,a=d("./matching_brace_outdent").MatchingBraceOutdent,u=d("../range").Range,r=d("./folding/ruby").FoldMode,i=function(){this.HighlightRules=k,this.$outdent=new a,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new r,this.indentKeywords=this.foldingRules.indentKeywords};L.inherits(i,A),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(o,t,e){var n=this.$getIndent(t),c=this.getTokenizer().getLineTokens(t,o),f=c.tokens;if(f.length&&f[f.length-1].type=="comment")return n;if(o=="start"){var m=t.match(/^.*[\{\(\[]\s*$/),D=t.match(/^\s*(class|def|module)\s.*$/),M=t.match(/.*do(\s*|\s+\|.*\|\s*)$/),x=t.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(m||D||M||x)&&(n+=e)}return n},this.checkOutdent=function(o,t,e){return/^\s+(end|else|rescue|ensure)$/.test(t+e)||this.$outdent.checkOutdent(t,e)},this.autoOutdent=function(o,t,e){var n=t.getLine(e);if(/}/.test(n))return this.$outdent.autoOutdent(t,e);var c=this.$getIndent(n),f=t.getLine(e-1),m=this.$getIndent(f),D=t.getTabString();m.length<=c.length&&c.slice(-D.length)==D&&t.remove(new u(e,c.length-D.length,e,c.length))},this.getMatching=function(o,t,e){if(t==null){var n=o.selection.lead;e=n.column,t=n.row}var c=o.getTokenAt(t,e);if(c&&c.value in this.indentKeywords)return this.foldingRules.rubyBlock(o,t,e,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(i.prototype),g.Mode=i}),function(){ace.require(["ace/mode/ruby"],function(d){p&&(p.exports=d)})}()}(modeRuby)),modeRuby.exports}requireModeRuby();var themeTwilight={exports:{}},hasRequiredThemeTwilight;function requireThemeTwilight(){return hasRequiredThemeTwilight||(hasRequiredThemeTwilight=1,function(p,w){ace.define("ace/theme/twilight-css",["require","exports","module"],function(d,g,J){J.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(d,g,J){g.isDark=!0,g.cssClass="ace-twilight",g.cssText=d("./twilight-css");var L=d("../lib/dom");L.importCssString(g.cssText,g.cssClass,!1)}),function(){ace.require(["ace/theme/twilight"],function(d){p&&(p.exports=d)})}()}(themeTwilight)),themeTwilight.exports}requireThemeTwilight();var Zt=Object.defineProperty,Qt=(p,w,d)=>w in p?Zt(p,w,{enumerable:!0,configurable:!0,writable:!0,value:d}):p[w]=d,v=(p,w,d)=>Qt(p,typeof w!="symbol"?w+"":w,d);function gt(p,w){return function(){return p.apply(w,arguments)}}const{toString:Yt}=Object.prototype,{getPrototypeOf:$e}=Object,de=(p=>w=>{const d=Yt.call(w);return p[d]||(p[d]=d.slice(8,-1).toLowerCase())})(Object.create(null)),$=p=>(p=p.toLowerCase(),w=>de(w)===p),fe=p=>w=>typeof w===p,{isArray:K}=Array,Y=fe("undefined");function en(p){return p!==null&&!Y(p)&&p.constructor!==null&&!Y(p.constructor)&&N(p.constructor.isBuffer)&&p.constructor.isBuffer(p)}const bt=$("ArrayBuffer");function tn(p){let w;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?w=ArrayBuffer.isView(p):w=p&&p.buffer&&bt(p.buffer),w}const nn=fe("string"),N=fe("function"),yt=fe("number"),pe=p=>p!==null&&typeof p=="object",sn=p=>p===!0||p===!1,ce=p=>{if(de(p)!=="object")return!1;const w=$e(p);return(w===null||w===Object.prototype||Object.getPrototypeOf(w)===null)&&!(Symbol.toStringTag in p)&&!(Symbol.iterator in p)},rn=$("Date"),on=$("File"),cn=$("Blob"),an=$("FileList"),ln=p=>pe(p)&&N(p.pipe),un=p=>{let w;return p&&(typeof FormData=="function"&&p instanceof FormData||N(p.append)&&((w=de(p))==="formdata"||w==="object"&&N(p.toString)&&p.toString()==="[object FormData]"))},hn=$("URLSearchParams"),[dn,fn,pn,mn]=["ReadableStream","Request","Response","Headers"].map($),gn=p=>p.trim?p.trim():p.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ee(p,w,{allOwnKeys:d=!1}={}){if(p===null||typeof p>"u")return;let g,J;if(typeof p!="object"&&(p=[p]),K(p))for(g=0,J=p.length;g<J;g++)w.call(null,p[g],g,p);else{const L=d?Object.getOwnPropertyNames(p):Object.keys(p),A=L.length;let k;for(g=0;g<A;g++)k=L[g],w.call(null,p[k],k,p)}}function wt(p,w){w=w.toLowerCase();const d=Object.keys(p);let g=d.length,J;for(;g-- >0;)if(J=d[g],w===J.toLowerCase())return J;return null}const H=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,_t=p=>!Y(p)&&p!==H;function Oe(){const{caseless:p}=_t(this)&&this||{},w={},d=(g,J)=>{const L=p&&wt(w,J)||J;ce(w[L])&&ce(g)?w[L]=Oe(w[L],g):ce(g)?w[L]=Oe({},g):K(g)?w[L]=g.slice():w[L]=g};for(let g=0,J=arguments.length;g<J;g++)arguments[g]&&ee(arguments[g],d);return w}const bn=(p,w,d,{allOwnKeys:g}={})=>(ee(w,(J,L)=>{d&&N(J)?p[L]=gt(J,d):p[L]=J},{allOwnKeys:g}),p),yn=p=>(p.charCodeAt(0)===65279&&(p=p.slice(1)),p),wn=(p,w,d,g)=>{p.prototype=Object.create(w.prototype,g),p.prototype.constructor=p,Object.defineProperty(p,"super",{value:w.prototype}),d&&Object.assign(p.prototype,d)},_n=(p,w,d,g)=>{let J,L,A;const k={};if(w=w||{},p==null)return w;do{for(J=Object.getOwnPropertyNames(p),L=J.length;L-- >0;)A=J[L],(!g||g(A,p,w))&&!k[A]&&(w[A]=p[A],k[A]=!0);p=d!==!1&&$e(p)}while(p&&(!d||d(p,w))&&p!==Object.prototype);return w},En=(p,w,d)=>{p=String(p),(d===void 0||d>p.length)&&(d=p.length),d-=w.length;const g=p.indexOf(w,d);return g!==-1&&g===d},Sn=p=>{if(!p)return null;if(K(p))return p;let w=p.length;if(!yt(w))return null;const d=new Array(w);for(;w-- >0;)d[w]=p[w];return d},xn=(p=>w=>p&&w instanceof p)(typeof Uint8Array<"u"&&$e(Uint8Array)),Rn=(p,w)=>{const d=(p&&p[Symbol.iterator]).call(p);let g;for(;(g=d.next())&&!g.done;){const J=g.value;w.call(p,J[0],J[1])}},An=(p,w)=>{let d;const g=[];for(;(d=p.exec(w))!==null;)g.push(d);return g},Tn=$("HTMLFormElement"),On=p=>p.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(w,d,g){return d.toUpperCase()+g}),Je=(({hasOwnProperty:p})=>(w,d)=>p.call(w,d))(Object.prototype),Cn=$("RegExp"),Et=(p,w)=>{const d=Object.getOwnPropertyDescriptors(p),g={};ee(d,(J,L)=>{let A;(A=w(J,L,p))!==!1&&(g[L]=A||J)}),Object.defineProperties(p,g)},kn=p=>{Et(p,(w,d)=>{if(N(p)&&["arguments","caller","callee"].indexOf(d)!==-1)return!1;const g=p[d];if(N(g)){if(w.enumerable=!1,"writable"in w){w.writable=!1;return}w.set||(w.set=()=>{throw Error("Can not rewrite read-only method '"+d+"'")})}})},Nn=(p,w)=>{const d={},g=J=>{J.forEach(L=>{d[L]=!0})};return K(p)?g(p):g(String(p).split(w)),d},Pn=()=>{},In=(p,w)=>p!=null&&Number.isFinite(p=+p)?p:w,Se="abcdefghijklmnopqrstuvwxyz",We="0123456789",St={DIGIT:We,ALPHA:Se,ALPHA_DIGIT:Se+Se.toUpperCase()+We},Ln=(p=16,w=St.ALPHA_DIGIT)=>{let d="";const{length:g}=w;for(;p--;)d+=w[Math.random()*g|0];return d};function vn(p){return!!(p&&N(p.append)&&p[Symbol.toStringTag]==="FormData"&&p[Symbol.iterator])}const jn=p=>{const w=new Array(10),d=(g,J)=>{if(pe(g)){if(w.indexOf(g)>=0)return;if(!("toJSON"in g)){w[J]=g;const L=K(g)?[]:{};return ee(g,(A,k)=>{const a=d(A,J+1);!Y(a)&&(L[k]=a)}),w[J]=void 0,L}}return g};return d(p,0)},$n=$("AsyncFunction"),Fn=p=>p&&(pe(p)||N(p))&&N(p.then)&&N(p.catch),xt=((p,w)=>p?setImmediate:w?((d,g)=>(H.addEventListener("message",({source:J,data:L})=>{J===H&&L===d&&g.length&&g.shift()()},!1),J=>{g.push(J),H.postMessage(d,"*")}))(`axios@${Math.random()}`,[]):d=>setTimeout(d))(typeof setImmediate=="function",N(H.postMessage)),Un=typeof queueMicrotask<"u"?queueMicrotask.bind(H):typeof process<"u"&&process.nextTick||xt,l={isArray:K,isArrayBuffer:bt,isBuffer:en,isFormData:un,isArrayBufferView:tn,isString:nn,isNumber:yt,isBoolean:sn,isObject:pe,isPlainObject:ce,isReadableStream:dn,isRequest:fn,isResponse:pn,isHeaders:mn,isUndefined:Y,isDate:rn,isFile:on,isBlob:cn,isRegExp:Cn,isFunction:N,isStream:ln,isURLSearchParams:hn,isTypedArray:xn,isFileList:an,forEach:ee,merge:Oe,extend:bn,trim:gn,stripBOM:yn,inherits:wn,toFlatObject:_n,kindOf:de,kindOfTest:$,endsWith:En,toArray:Sn,forEachEntry:Rn,matchAll:An,isHTMLForm:Tn,hasOwnProperty:Je,hasOwnProp:Je,reduceDescriptors:Et,freezeMethods:kn,toObjectSet:Nn,toCamelCase:On,noop:Pn,toFiniteNumber:In,findKey:wt,global:H,isContextDefined:_t,ALPHABET:St,generateString:Ln,isSpecCompliantForm:vn,toJSONObject:jn,isAsyncFn:$n,isThenable:Fn,setImmediate:xt,asap:Un};function y(p,w,d,g,J){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=p,this.name="AxiosError",w&&(this.code=w),d&&(this.config=d),g&&(this.request=g),J&&(this.response=J,this.status=J.status?J.status:null)}l.inherits(y,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:l.toJSONObject(this.config),code:this.code,status:this.status}}});const Rt=y.prototype,At={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(p=>{At[p]={value:p}}),Object.defineProperties(y,At),Object.defineProperty(Rt,"isAxiosError",{value:!0}),y.from=(p,w,d,g,J,L)=>{const A=Object.create(Rt);return l.toFlatObject(p,A,function(k){return k!==Error.prototype},k=>k!=="isAxiosError"),y.call(A,p.message,w,d,g,J),A.cause=p,A.name=p.name,L&&Object.assign(A,L),A};const Dn=null;function Ce(p){return l.isPlainObject(p)||l.isArray(p)}function Tt(p){return l.endsWith(p,"[]")?p.slice(0,-2):p}function Ke(p,w,d){return p?p.concat(w).map(function(g,J){return g=Tt(g),!d&&J?"["+g+"]":g}).join(d?".":""):w}function qn(p){return l.isArray(p)&&!p.some(Ce)}const Bn=l.toFlatObject(l,{},null,function(p){return/^is[A-Z]/.test(p)});function me(p,w,d){if(!l.isObject(p))throw new TypeError("target must be an object");w=w||new FormData,d=l.toFlatObject(d,{metaTokens:!0,dots:!1,indexes:!1},!1,function(t,e){return!l.isUndefined(e[t])});const g=d.metaTokens,J=d.visitor||u,L=d.dots,A=d.indexes,k=(d.Blob||typeof Blob<"u"&&Blob)&&l.isSpecCompliantForm(w);if(!l.isFunction(J))throw new TypeError("visitor must be a function");function a(t){if(t===null)return"";if(l.isDate(t))return t.toISOString();if(!k&&l.isBlob(t))throw new y("Blob is not supported. Use a Buffer instead.");return l.isArrayBuffer(t)||l.isTypedArray(t)?k&&typeof Blob=="function"?new Blob([t]):Buffer.from(t):t}function u(t,e,n){let c=t;if(t&&!n&&typeof t=="object"){if(l.endsWith(e,"{}"))e=g?e:e.slice(0,-2),t=JSON.stringify(t);else if(l.isArray(t)&&qn(t)||(l.isFileList(t)||l.endsWith(e,"[]"))&&(c=l.toArray(t)))return e=Tt(e),c.forEach(function(f,m){!(l.isUndefined(f)||f===null)&&w.append(A===!0?Ke([e],m,L):A===null?e:e+"[]",a(f))}),!1}return Ce(t)?!0:(w.append(Ke(n,e,L),a(t)),!1)}const r=[],i=Object.assign(Bn,{defaultVisitor:u,convertValue:a,isVisitable:Ce});function o(t,e){if(!l.isUndefined(t)){if(r.indexOf(t)!==-1)throw Error("Circular reference detected in "+e.join("."));r.push(t),l.forEach(t,function(n,c){(!(l.isUndefined(n)||n===null)&&J.call(w,n,l.isString(c)?c.trim():c,e,i))===!0&&o(n,e?e.concat(c):[c])}),r.pop()}}if(!l.isObject(p))throw new TypeError("data must be an object");return o(p),w}function Ge(p){const w={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(p).replace(/[!'()~]|%20|%00/g,function(d){return w[d]})}function Fe(p,w){this._pairs=[],p&&me(p,this,w)}const Ot=Fe.prototype;Ot.append=function(p,w){this._pairs.push([p,w])},Ot.toString=function(p){const w=p?function(d){return p.call(this,d,Ge)}:Ge;return this._pairs.map(function(d){return w(d[0])+"="+w(d[1])},"").join("&")};function Mn(p){return encodeURIComponent(p).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ct(p,w,d){if(!w)return p;const g=d&&d.encode||Mn;l.isFunction(d)&&(d={serialize:d});const J=d&&d.serialize;let L;if(J?L=J(w,d):L=l.isURLSearchParams(w)?w.toString():new Fe(w,d).toString(g),L){const A=p.indexOf("#");A!==-1&&(p=p.slice(0,A)),p+=(p.indexOf("?")===-1?"?":"&")+L}return p}class Xe{constructor(){this.handlers=[]}use(w,d,g){return this.handlers.push({fulfilled:w,rejected:d,synchronous:g?g.synchronous:!1,runWhen:g?g.runWhen:null}),this.handlers.length-1}eject(w){this.handlers[w]&&(this.handlers[w]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(w){l.forEach(this.handlers,function(d){d!==null&&w(d)})}}const kt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Hn=typeof URLSearchParams<"u"?URLSearchParams:Fe,zn=typeof FormData<"u"?FormData:null,Vn=typeof Blob<"u"?Blob:null,Jn={isBrowser:!0,classes:{URLSearchParams:Hn,FormData:zn,Blob:Vn},protocols:["http","https","file","blob","url","data"]},Ue=typeof window<"u"&&typeof document<"u",ke=typeof navigator=="object"&&navigator||void 0,Wn=Ue&&(!ke||["ReactNative","NativeScript","NS"].indexOf(ke.product)<0),Kn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Gn=Ue&&window.location.href||"http://localhost",Xn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ue,hasStandardBrowserEnv:Wn,hasStandardBrowserWebWorkerEnv:Kn,navigator:ke,origin:Gn},Symbol.toStringTag,{value:"Module"})),T={...Xn,...Jn};function Zn(p,w){return me(p,new T.classes.URLSearchParams,Object.assign({visitor:function(d,g,J,L){return T.isNode&&l.isBuffer(d)?(this.append(g,d.toString("base64")),!1):L.defaultVisitor.apply(this,arguments)}},w))}function Qn(p){return l.matchAll(/\w+|\[(\w*)]/g,p).map(w=>w[0]==="[]"?"":w[1]||w[0])}function Yn(p){const w={},d=Object.keys(p);let g;const J=d.length;let L;for(g=0;g<J;g++)L=d[g],w[L]=p[L];return w}function Nt(p){function w(d,g,J,L){let A=d[L++];if(A==="__proto__")return!0;const k=Number.isFinite(+A),a=L>=d.length;return A=!A&&l.isArray(J)?J.length:A,a?(l.hasOwnProp(J,A)?J[A]=[J[A],g]:J[A]=g,!k):((!J[A]||!l.isObject(J[A]))&&(J[A]=[]),w(d,g,J[A],L)&&l.isArray(J[A])&&(J[A]=Yn(J[A])),!k)}if(l.isFormData(p)&&l.isFunction(p.entries)){const d={};return l.forEachEntry(p,(g,J)=>{w(Qn(g),J,d,0)}),d}return null}function es(p,w,d){if(l.isString(p))try{return(w||JSON.parse)(p),l.trim(p)}catch(g){if(g.name!=="SyntaxError")throw g}return(d||JSON.stringify)(p)}const te={transitional:kt,adapter:["xhr","http","fetch"],transformRequest:[function(p,w){const d=w.getContentType()||"",g=d.indexOf("application/json")>-1,J=l.isObject(p);if(J&&l.isHTMLForm(p)&&(p=new FormData(p)),l.isFormData(p))return g?JSON.stringify(Nt(p)):p;if(l.isArrayBuffer(p)||l.isBuffer(p)||l.isStream(p)||l.isFile(p)||l.isBlob(p)||l.isReadableStream(p))return p;if(l.isArrayBufferView(p))return p.buffer;if(l.isURLSearchParams(p))return w.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),p.toString();let L;if(J){if(d.indexOf("application/x-www-form-urlencoded")>-1)return Zn(p,this.formSerializer).toString();if((L=l.isFileList(p))||d.indexOf("multipart/form-data")>-1){const A=this.env&&this.env.FormData;return me(L?{"files[]":p}:p,A&&new A,this.formSerializer)}}return J||g?(w.setContentType("application/json",!1),es(p)):p}],transformResponse:[function(p){const w=this.transitional||te.transitional,d=w&&w.forcedJSONParsing,g=this.responseType==="json";if(l.isResponse(p)||l.isReadableStream(p))return p;if(p&&l.isString(p)&&(d&&!this.responseType||g)){const J=!(w&&w.silentJSONParsing)&&g;try{return JSON.parse(p)}catch(L){if(J)throw L.name==="SyntaxError"?y.from(L,y.ERR_BAD_RESPONSE,this,null,this.response):L}}return p}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:T.classes.FormData,Blob:T.classes.Blob},validateStatus:function(p){return p>=200&&p<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};l.forEach(["delete","get","head","post","put","patch"],p=>{te.headers[p]={}});const ts=l.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ns=p=>{const w={};let d,g,J;return p&&p.split(`
1102
- `).forEach(function(L){J=L.indexOf(":"),d=L.substring(0,J).trim().toLowerCase(),g=L.substring(J+1).trim(),!(!d||w[d]&&ts[d])&&(d==="set-cookie"?w[d]?w[d].push(g):w[d]=[g]:w[d]=w[d]?w[d]+", "+g:g)}),w},Ze=Symbol("internals");function Z(p){return p&&String(p).trim().toLowerCase()}function ae(p){return p===!1||p==null?p:l.isArray(p)?p.map(ae):String(p)}function ss(p){const w=Object.create(null),d=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let g;for(;g=d.exec(p);)w[g[1]]=g[2];return w}const rs=p=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(p.trim());function xe(p,w,d,g,J){if(l.isFunction(g))return g.call(this,w,d);if(J&&(w=d),!!l.isString(w)){if(l.isString(g))return w.indexOf(g)!==-1;if(l.isRegExp(g))return g.test(w)}}function is(p){return p.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(w,d,g)=>d.toUpperCase()+g)}function os(p,w){const d=l.toCamelCase(" "+w);["get","set","has"].forEach(g=>{Object.defineProperty(p,g+d,{value:function(J,L,A){return this[g].call(this,w,J,L,A)},configurable:!0})})}let C=class{constructor(p){p&&this.set(p)}set(p,w,d){const g=this;function J(A,k,a){const u=Z(k);if(!u)throw new Error("header name must be a non-empty string");const r=l.findKey(g,u);(!r||g[r]===void 0||a===!0||a===void 0&&g[r]!==!1)&&(g[r||k]=ae(A))}const L=(A,k)=>l.forEach(A,(a,u)=>J(a,u,k));if(l.isPlainObject(p)||p instanceof this.constructor)L(p,w);else if(l.isString(p)&&(p=p.trim())&&!rs(p))L(ns(p),w);else if(l.isHeaders(p))for(const[A,k]of p.entries())J(k,A,d);else p!=null&&J(w,p,d);return this}get(p,w){if(p=Z(p),p){const d=l.findKey(this,p);if(d){const g=this[d];if(!w)return g;if(w===!0)return ss(g);if(l.isFunction(w))return w.call(this,g,d);if(l.isRegExp(w))return w.exec(g);throw new TypeError("parser must be boolean|regexp|function")}}}has(p,w){if(p=Z(p),p){const d=l.findKey(this,p);return!!(d&&this[d]!==void 0&&(!w||xe(this,this[d],d,w)))}return!1}delete(p,w){const d=this;let g=!1;function J(L){if(L=Z(L),L){const A=l.findKey(d,L);A&&(!w||xe(d,d[A],A,w))&&(delete d[A],g=!0)}}return l.isArray(p)?p.forEach(J):J(p),g}clear(p){const w=Object.keys(this);let d=w.length,g=!1;for(;d--;){const J=w[d];(!p||xe(this,this[J],J,p,!0))&&(delete this[J],g=!0)}return g}normalize(p){const w=this,d={};return l.forEach(this,(g,J)=>{const L=l.findKey(d,J);if(L){w[L]=ae(g),delete w[J];return}const A=p?is(J):String(J).trim();A!==J&&delete w[J],w[A]=ae(g),d[A]=!0}),this}concat(...p){return this.constructor.concat(this,...p)}toJSON(p){const w=Object.create(null);return l.forEach(this,(d,g)=>{d!=null&&d!==!1&&(w[g]=p&&l.isArray(d)?d.join(", "):d)}),w}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([p,w])=>p+": "+w).join(`
1103
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(p){return p instanceof this?p:new this(p)}static concat(p,...w){const d=new this(p);return w.forEach(g=>d.set(g)),d}static accessor(p){const w=(this[Ze]=this[Ze]={accessors:{}}).accessors,d=this.prototype;function g(J){const L=Z(J);w[L]||(os(d,J),w[L]=!0)}return l.isArray(p)?p.forEach(g):g(p),this}};C.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),l.reduceDescriptors(C.prototype,({value:p},w)=>{let d=w[0].toUpperCase()+w.slice(1);return{get:()=>p,set(g){this[d]=g}}}),l.freezeMethods(C);function Re(p,w){const d=this||te,g=w||d,J=C.from(g.headers);let L=g.data;return l.forEach(p,function(A){L=A.call(d,L,J.normalize(),w?w.status:void 0)}),J.normalize(),L}function Pt(p){return!!(p&&p.__CANCEL__)}function G(p,w,d){y.call(this,p??"canceled",y.ERR_CANCELED,w,d),this.name="CanceledError"}l.inherits(G,y,{__CANCEL__:!0});function It(p,w,d){const g=d.config.validateStatus;!d.status||!g||g(d.status)?p(d):w(new y("Request failed with status code "+d.status,[y.ERR_BAD_REQUEST,y.ERR_BAD_RESPONSE][Math.floor(d.status/100)-4],d.config,d.request,d))}function cs(p){const w=/^([-+\w]{1,25})(:?\/\/|:)/.exec(p);return w&&w[1]||""}function as(p,w){p=p||10;const d=new Array(p),g=new Array(p);let J=0,L=0,A;return w=w!==void 0?w:1e3,function(k){const a=Date.now(),u=g[L];A||(A=a),d[J]=k,g[J]=a;let r=L,i=0;for(;r!==J;)i+=d[r++],r=r%p;if(J=(J+1)%p,J===L&&(L=(L+1)%p),a-A<w)return;const o=u&&a-u;return o?Math.round(i*1e3/o):void 0}}function ls(p,w){let d=0,g=1e3/w,J,L;const A=(k,a=Date.now())=>{d=a,J=null,L&&(clearTimeout(L),L=null),p.apply(null,k)};return[(...k)=>{const a=Date.now(),u=a-d;u>=g?A(k,a):(J=k,L||(L=setTimeout(()=>{L=null,A(J)},g-u)))},()=>J&&A(J)]}const ue=(p,w,d=3)=>{let g=0;const J=as(50,250);return ls(L=>{const A=L.loaded,k=L.lengthComputable?L.total:void 0,a=A-g,u=J(a),r=A<=k;g=A;const i={loaded:A,total:k,progress:k?A/k:void 0,bytes:a,rate:u||void 0,estimated:u&&k&&r?(k-A)/u:void 0,event:L,lengthComputable:k!=null,[w?"download":"upload"]:!0};p(i)},d)},Qe=(p,w)=>{const d=p!=null;return[g=>w[0]({lengthComputable:d,total:p,loaded:g}),w[1]]},Ye=p=>(...w)=>l.asap(()=>p(...w)),us=T.hasStandardBrowserEnv?((p,w)=>d=>(d=new URL(d,T.origin),p.protocol===d.protocol&&p.host===d.host&&(w||p.port===d.port)))(new URL(T.origin),T.navigator&&/(msie|trident)/i.test(T.navigator.userAgent)):()=>!0,hs=T.hasStandardBrowserEnv?{write(p,w,d,g,J,L){const A=[p+"="+encodeURIComponent(w)];l.isNumber(d)&&A.push("expires="+new Date(d).toGMTString()),l.isString(g)&&A.push("path="+g),l.isString(J)&&A.push("domain="+J),L===!0&&A.push("secure"),document.cookie=A.join("; ")},read(p){const w=document.cookie.match(new RegExp("(^|;\\s*)("+p+")=([^;]*)"));return w?decodeURIComponent(w[3]):null},remove(p){this.write(p,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function ds(p){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(p)}function fs(p,w){return w?p.replace(/\/?\/$/,"")+"/"+w.replace(/^\/+/,""):p}function Lt(p,w){return p&&!ds(w)?fs(p,w):w}const et=p=>p instanceof C?{...p}:p;function V(p,w){w=w||{};const d={};function g(u,r,i,o){return l.isPlainObject(u)&&l.isPlainObject(r)?l.merge.call({caseless:o},u,r):l.isPlainObject(r)?l.merge({},r):l.isArray(r)?r.slice():r}function J(u,r,i,o){if(l.isUndefined(r)){if(!l.isUndefined(u))return g(void 0,u,i,o)}else return g(u,r,i,o)}function L(u,r){if(!l.isUndefined(r))return g(void 0,r)}function A(u,r){if(l.isUndefined(r)){if(!l.isUndefined(u))return g(void 0,u)}else return g(void 0,r)}function k(u,r,i){if(i in w)return g(u,r);if(i in p)return g(void 0,u)}const a={url:L,method:L,data:L,baseURL:A,transformRequest:A,transformResponse:A,paramsSerializer:A,timeout:A,timeoutMessage:A,withCredentials:A,withXSRFToken:A,adapter:A,responseType:A,xsrfCookieName:A,xsrfHeaderName:A,onUploadProgress:A,onDownloadProgress:A,decompress:A,maxContentLength:A,maxBodyLength:A,beforeRedirect:A,transport:A,httpAgent:A,httpsAgent:A,cancelToken:A,socketPath:A,responseEncoding:A,validateStatus:k,headers:(u,r,i)=>J(et(u),et(r),i,!0)};return l.forEach(Object.keys(Object.assign({},p,w)),function(u){const r=a[u]||J,i=r(p[u],w[u],u);l.isUndefined(i)&&r!==k||(d[u]=i)}),d}const vt=p=>{const w=V({},p);let{data:d,withXSRFToken:g,xsrfHeaderName:J,xsrfCookieName:L,headers:A,auth:k}=w;w.headers=A=C.from(A),w.url=Ct(Lt(w.baseURL,w.url),p.params,p.paramsSerializer),k&&A.set("Authorization","Basic "+btoa((k.username||"")+":"+(k.password?unescape(encodeURIComponent(k.password)):"")));let a;if(l.isFormData(d)){if(T.hasStandardBrowserEnv||T.hasStandardBrowserWebWorkerEnv)A.setContentType(void 0);else if((a=A.getContentType())!==!1){const[u,...r]=a?a.split(";").map(i=>i.trim()).filter(Boolean):[];A.setContentType([u||"multipart/form-data",...r].join("; "))}}if(T.hasStandardBrowserEnv&&(g&&l.isFunction(g)&&(g=g(w)),g||g!==!1&&us(w.url))){const u=J&&L&&hs.read(L);u&&A.set(J,u)}return w},ps=typeof XMLHttpRequest<"u",ms=ps&&function(p){return new Promise(function(w,d){const g=vt(p);let J=g.data;const L=C.from(g.headers).normalize();let{responseType:A,onUploadProgress:k,onDownloadProgress:a}=g,u,r,i,o,t;function e(){o&&o(),t&&t(),g.cancelToken&&g.cancelToken.unsubscribe(u),g.signal&&g.signal.removeEventListener("abort",u)}let n=new XMLHttpRequest;n.open(g.method.toUpperCase(),g.url,!0),n.timeout=g.timeout;function c(){if(!n)return;const m=C.from("getAllResponseHeaders"in n&&n.getAllResponseHeaders()),D={data:!A||A==="text"||A==="json"?n.responseText:n.response,status:n.status,statusText:n.statusText,headers:m,config:p,request:n};It(function(M){w(M),e()},function(M){d(M),e()},D),n=null}"onloadend"in n?n.onloadend=c:n.onreadystatechange=function(){!n||n.readyState!==4||n.status===0&&!(n.responseURL&&n.responseURL.indexOf("file:")===0)||setTimeout(c)},n.onabort=function(){n&&(d(new y("Request aborted",y.ECONNABORTED,p,n)),n=null)},n.onerror=function(){d(new y("Network Error",y.ERR_NETWORK,p,n)),n=null},n.ontimeout=function(){let m=g.timeout?"timeout of "+g.timeout+"ms exceeded":"timeout exceeded";const D=g.transitional||kt;g.timeoutErrorMessage&&(m=g.timeoutErrorMessage),d(new y(m,D.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,p,n)),n=null},J===void 0&&L.setContentType(null),"setRequestHeader"in n&&l.forEach(L.toJSON(),function(m,D){n.setRequestHeader(D,m)}),l.isUndefined(g.withCredentials)||(n.withCredentials=!!g.withCredentials),A&&A!=="json"&&(n.responseType=g.responseType),a&&([i,t]=ue(a,!0),n.addEventListener("progress",i)),k&&n.upload&&([r,o]=ue(k),n.upload.addEventListener("progress",r),n.upload.addEventListener("loadend",o)),(g.cancelToken||g.signal)&&(u=m=>{n&&(d(!m||m.type?new G(null,p,n):m),n.abort(),n=null)},g.cancelToken&&g.cancelToken.subscribe(u),g.signal&&(g.signal.aborted?u():g.signal.addEventListener("abort",u)));const f=cs(g.url);if(f&&T.protocols.indexOf(f)===-1){d(new y("Unsupported protocol "+f+":",y.ERR_BAD_REQUEST,p));return}n.send(J||null)})},gs=(p,w)=>{const{length:d}=p=p?p.filter(Boolean):[];if(w||d){let g=new AbortController,J;const L=function(u){if(!J){J=!0,k();const r=u instanceof Error?u:this.reason;g.abort(r instanceof y?r:new G(r instanceof Error?r.message:r))}};let A=w&&setTimeout(()=>{A=null,L(new y(`timeout ${w} of ms exceeded`,y.ETIMEDOUT))},w);const k=()=>{p&&(A&&clearTimeout(A),A=null,p.forEach(u=>{u.unsubscribe?u.unsubscribe(L):u.removeEventListener("abort",L)}),p=null)};p.forEach(u=>u.addEventListener("abort",L));const{signal:a}=g;return a.unsubscribe=()=>l.asap(k),a}},bs=function*(p,w){let d=p.byteLength;if(d<w){yield p;return}let g=0,J;for(;g<d;)J=g+w,yield p.slice(g,J),g=J},ys=async function*(p,w){for await(const d of ws(p))yield*bs(d,w)},ws=async function*(p){if(p[Symbol.asyncIterator]){yield*p;return}const w=p.getReader();try{for(;;){const{done:d,value:g}=await w.read();if(d)break;yield g}}finally{await w.cancel()}},tt=(p,w,d,g)=>{const J=ys(p,w);let L=0,A,k=a=>{A||(A=!0,g&&g(a))};return new ReadableStream({async pull(a){try{const{done:u,value:r}=await J.next();if(u){k(),a.close();return}let i=r.byteLength;if(d){let o=L+=i;d(o)}a.enqueue(new Uint8Array(r))}catch(u){throw k(u),u}},cancel(a){return k(a),J.return()}},{highWaterMark:2})},ge=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",jt=ge&&typeof ReadableStream=="function",_s=ge&&(typeof TextEncoder=="function"?(p=>w=>p.encode(w))(new TextEncoder):async p=>new Uint8Array(await new Response(p).arrayBuffer())),$t=(p,...w)=>{try{return!!p(...w)}catch{return!1}},Es=jt&&$t(()=>{let p=!1;const w=new Request(T.origin,{body:new ReadableStream,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!w}),nt=64*1024,Ne=jt&&$t(()=>l.isReadableStream(new Response("").body)),he={stream:Ne&&(p=>p.body)};ge&&(p=>{["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!he[w]&&(he[w]=l.isFunction(p[w])?d=>d[w]():(d,g)=>{throw new y(`Response type '${w}' is not supported`,y.ERR_NOT_SUPPORT,g)})})})(new Response);const Ss=async p=>{if(p==null)return 0;if(l.isBlob(p))return p.size;if(l.isSpecCompliantForm(p))return(await new Request(T.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(l.isArrayBufferView(p)||l.isArrayBuffer(p))return p.byteLength;if(l.isURLSearchParams(p)&&(p=p+""),l.isString(p))return(await _s(p)).byteLength},xs=async(p,w)=>l.toFiniteNumber(p.getContentLength())??Ss(w),Rs=ge&&(async p=>{let{url:w,method:d,data:g,signal:J,cancelToken:L,timeout:A,onDownloadProgress:k,onUploadProgress:a,responseType:u,headers:r,withCredentials:i="same-origin",fetchOptions:o}=vt(p);u=u?(u+"").toLowerCase():"text";let t=gs([J,L&&L.toAbortSignal()],A),e;const n=t&&t.unsubscribe&&(()=>{t.unsubscribe()});let c;try{if(a&&Es&&d!=="get"&&d!=="head"&&(c=await xs(r,g))!==0){let x=new Request(w,{method:"POST",body:g,duplex:"half"}),_;if(l.isFormData(g)&&(_=x.headers.get("content-type"))&&r.setContentType(_),x.body){const[U,se]=Qe(c,ue(Ye(a)));g=tt(x.body,nt,U,se)}}l.isString(i)||(i=i?"include":"omit");const f="credentials"in Request.prototype;e=new Request(w,{...o,signal:t,method:d.toUpperCase(),headers:r.normalize().toJSON(),body:g,duplex:"half",credentials:f?i:void 0});let m=await fetch(e);const D=Ne&&(u==="stream"||u==="response");if(Ne&&(k||D&&n)){const x={};["status","statusText","headers"].forEach(X=>{x[X]=m[X]});const _=l.toFiniteNumber(m.headers.get("content-length")),[U,se]=k&&Qe(_,ue(Ye(k),!0))||[];m=new Response(tt(m.body,nt,U,()=>{se&&se(),n&&n()}),x)}u=u||"text";let M=await he[l.findKey(he,u)||"text"](m,p);return!D&&n&&n(),await new Promise((x,_)=>{It(x,_,{data:M,headers:C.from(m.headers),status:m.status,statusText:m.statusText,config:p,request:e})})}catch(f){throw n&&n(),f&&f.name==="TypeError"&&/fetch/i.test(f.message)?Object.assign(new y("Network Error",y.ERR_NETWORK,p,e),{cause:f.cause||f}):y.from(f,f&&f.code,p,e)}}),Pe={http:Dn,xhr:ms,fetch:Rs};l.forEach(Pe,(p,w)=>{if(p){try{Object.defineProperty(p,"name",{value:w})}catch{}Object.defineProperty(p,"adapterName",{value:w})}});const st=p=>`- ${p}`,As=p=>l.isFunction(p)||p===null||p===!1,Ft={getAdapter:p=>{p=l.isArray(p)?p:[p];const{length:w}=p;let d,g;const J={};for(let L=0;L<w;L++){d=p[L];let A;if(g=d,!As(d)&&(g=Pe[(A=String(d)).toLowerCase()],g===void 0))throw new y(`Unknown adapter '${A}'`);if(g)break;J[A||"#"+L]=g}if(!g){const L=Object.entries(J).map(([k,a])=>`adapter ${k} `+(a===!1?"is not supported by the environment":"is not available in the build"));let A=w?L.length>1?`since :
1104
- `+L.map(st).join(`
1105
- `):" "+st(L[0]):"as no adapter specified";throw new y("There is no suitable adapter to dispatch the request "+A,"ERR_NOT_SUPPORT")}return g},adapters:Pe};function Ae(p){if(p.cancelToken&&p.cancelToken.throwIfRequested(),p.signal&&p.signal.aborted)throw new G(null,p)}function rt(p){return Ae(p),p.headers=C.from(p.headers),p.data=Re.call(p,p.transformRequest),["post","put","patch"].indexOf(p.method)!==-1&&p.headers.setContentType("application/x-www-form-urlencoded",!1),Ft.getAdapter(p.adapter||te.adapter)(p).then(function(w){return Ae(p),w.data=Re.call(p,p.transformResponse,w),w.headers=C.from(w.headers),w},function(w){return Pt(w)||(Ae(p),w&&w.response&&(w.response.data=Re.call(p,p.transformResponse,w.response),w.response.headers=C.from(w.response.headers))),Promise.reject(w)})}const Ut="1.7.9",be={};["object","boolean","number","function","string","symbol"].forEach((p,w)=>{be[p]=function(d){return typeof d===p||"a"+(w<1?"n ":" ")+p}});const it={};be.transitional=function(p,w,d){function g(J,L){return"[Axios v"+Ut+"] Transitional option '"+J+"'"+L+(d?". "+d:"")}return(J,L,A)=>{if(p===!1)throw new y(g(L," has been removed"+(w?" in "+w:"")),y.ERR_DEPRECATED);return w&&!it[L]&&(it[L]=!0,console.warn(g(L," has been deprecated since v"+w+" and will be removed in the near future"))),p?p(J,L,A):!0}},be.spelling=function(p){return(w,d)=>(console.warn(`${d} is likely a misspelling of ${p}`),!0)};function Ts(p,w,d){if(typeof p!="object")throw new y("options must be an object",y.ERR_BAD_OPTION_VALUE);const g=Object.keys(p);let J=g.length;for(;J-- >0;){const L=g[J],A=w[L];if(A){const k=p[L],a=k===void 0||A(k,L,p);if(a!==!0)throw new y("option "+L+" must be "+a,y.ERR_BAD_OPTION_VALUE);continue}if(d!==!0)throw new y("Unknown option "+L,y.ERR_BAD_OPTION)}}const le={assertOptions:Ts,validators:be},F=le.validators;let z=class{constructor(p){this.defaults=p,this.interceptors={request:new Xe,response:new Xe}}async request(p,w){try{return await this._request(p,w)}catch(d){if(d instanceof Error){let g={};Error.captureStackTrace?Error.captureStackTrace(g):g=new Error;const J=g.stack?g.stack.replace(/^.+\n/,""):"";try{d.stack?J&&!String(d.stack).endsWith(J.replace(/^.+\n.+\n/,""))&&(d.stack+=`
1106
- `+J):d.stack=J}catch{}}throw d}}_request(p,w){typeof p=="string"?(w=w||{},w.url=p):w=p||{},w=V(this.defaults,w);const{transitional:d,paramsSerializer:g,headers:J}=w;d!==void 0&&le.assertOptions(d,{silentJSONParsing:F.transitional(F.boolean),forcedJSONParsing:F.transitional(F.boolean),clarifyTimeoutError:F.transitional(F.boolean)},!1),g!=null&&(l.isFunction(g)?w.paramsSerializer={serialize:g}:le.assertOptions(g,{encode:F.function,serialize:F.function},!0)),le.assertOptions(w,{baseUrl:F.spelling("baseURL"),withXsrfToken:F.spelling("withXSRFToken")},!0),w.method=(w.method||this.defaults.method||"get").toLowerCase();let L=J&&l.merge(J.common,J[w.method]);J&&l.forEach(["delete","get","head","post","put","patch","common"],t=>{delete J[t]}),w.headers=C.concat(L,J);const A=[];let k=!0;this.interceptors.request.forEach(function(t){typeof t.runWhen=="function"&&t.runWhen(w)===!1||(k=k&&t.synchronous,A.unshift(t.fulfilled,t.rejected))});const a=[];this.interceptors.response.forEach(function(t){a.push(t.fulfilled,t.rejected)});let u,r=0,i;if(!k){const t=[rt.bind(this),void 0];for(t.unshift.apply(t,A),t.push.apply(t,a),i=t.length,u=Promise.resolve(w);r<i;)u=u.then(t[r++],t[r++]);return u}i=A.length;let o=w;for(r=0;r<i;){const t=A[r++],e=A[r++];try{o=t(o)}catch(n){e.call(this,n);break}}try{u=rt.call(this,o)}catch(t){return Promise.reject(t)}for(r=0,i=a.length;r<i;)u=u.then(a[r++],a[r++]);return u}getUri(p){p=V(this.defaults,p);const w=Lt(p.baseURL,p.url);return Ct(w,p.params,p.paramsSerializer)}};l.forEach(["delete","get","head","options"],function(p){z.prototype[p]=function(w,d){return this.request(V(d||{},{method:p,url:w,data:(d||{}).data}))}}),l.forEach(["post","put","patch"],function(p){function w(d){return function(g,J,L){return this.request(V(L||{},{method:p,headers:d?{"Content-Type":"multipart/form-data"}:{},url:g,data:J}))}}z.prototype[p]=w(),z.prototype[p+"Form"]=w(!0)});let Os=class Wi{constructor(w){if(typeof w!="function")throw new TypeError("executor must be a function.");let d;this.promise=new Promise(function(J){d=J});const g=this;this.promise.then(J=>{if(!g._listeners)return;let L=g._listeners.length;for(;L-- >0;)g._listeners[L](J);g._listeners=null}),this.promise.then=J=>{let L;const A=new Promise(k=>{g.subscribe(k),L=k}).then(J);return A.cancel=function(){g.unsubscribe(L)},A},w(function(J,L,A){g.reason||(g.reason=new G(J,L,A),d(g.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(w){if(this.reason){w(this.reason);return}this._listeners?this._listeners.push(w):this._listeners=[w]}unsubscribe(w){if(!this._listeners)return;const d=this._listeners.indexOf(w);d!==-1&&this._listeners.splice(d,1)}toAbortSignal(){const w=new AbortController,d=g=>{w.abort(g)};return this.subscribe(d),w.signal.unsubscribe=()=>this.unsubscribe(d),w.signal}static source(){let w;return{token:new Wi(function(d){w=d}),cancel:w}}};function Cs(p){return function(w){return p.apply(null,w)}}function ks(p){return l.isObject(p)&&p.isAxiosError===!0}const Ie={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ie).forEach(([p,w])=>{Ie[w]=p});function qt(p){const w=new z(p),d=gt(z.prototype.request,w);return l.extend(d,z.prototype,w,{allOwnKeys:!0}),l.extend(d,w,null,{allOwnKeys:!0}),d.create=function(g){return qt(V(p,g))},d}const R=qt(te);R.Axios=z,R.CanceledError=G,R.CancelToken=Os,R.isCancel=Pt,R.VERSION=Ut,R.toFormData=me,R.AxiosError=y,R.Cancel=R.CanceledError,R.all=function(p){return Promise.all(p)},R.spread=Cs,R.isAxiosError=ks,R.mergeConfig=V,R.AxiosHeaders=C,R.formToJSON=p=>Nt(l.isHTMLForm(p)?new FormData(p):p),R.getAdapter=Ft.getAdapter,R.HttpStatusCode=Ie,R.default=R;const{Axios:Kr,AxiosError:Gr,CanceledError:Xr,isCancel:Zr,CancelToken:Qr,VERSION:Yr,all:ei,Cancel:ti,isAxiosError:ni,spread:si,toFormData:ri,AxiosHeaders:ii,HttpStatusCode:oi,formToJSON:ci,getAdapter:ai,mergeConfig:li}=R,De=R.create({baseURL:location.origin,timeout:6e4,params:{}});De.interceptors.response.use(p=>p,p=>{var w,d,g,J,L,A,k,a,u,r,i;if(p.response){if(p.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(e){e&&OpenC3Auth.setTokens()}),p.response.config.headers["Ignore-Errors"]&&p.response.config.headers["Ignore-Errors"].includes(p.response.status.toString()))return Promise.reject(p);let o=`HTTP ${p.response.status} - `;(w=p.response)!=null&&w.statusText&&(o+=`${p.response.statusText} `),(g=(d=p.response)==null?void 0:d.config)!=null&&g.data&&(o+=`${p.response.config.data} `),(L=(J=p.response)==null?void 0:J.data)!=null&&L.message?o+=`${p.response.data.message}`:(k=(A=p.response)==null?void 0:A.data)!=null&&k.exception?o+=`${p.response.data.exception}`:(r=(u=(a=p.response)==null?void 0:a.data)==null?void 0:u.error)!=null&&r.message?(p.response.data.error.class&&(o+=`${p.response.data.error.class} `),o+=`${p.response.data.error.message}`):o+=`${(i=p.response)==null?void 0:i.data}`;const{$cosmosNotify:t}=window;throw t&&t.serious({title:"Network error",body:o}),p}else throw p});const re=async function(p,w,{data:d,params:g={},headers:J,noAuth:L=!1,noScope:A=!1,onUploadProgress:k=!1}={}){if(!L){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}J.Authorization=localStorage.openc3Token}return J.manual=!0,!A&&!g.scope&&(g.scope=window.openc3Scope),De({method:p,url:w,data:d,params:g,headers:J,onUploadProgress:k})},Le={Accept:"application/json"},ot={...Le,"Content-Type":"application/json"},ui={get:function(p,{params:w,headers:d=Le,noScope:g,noAuth:J,onUploadProgress:L}={}){return re("get",p,{params:w,headers:d,noScope:g,noAuth:J,onUploadProgress:L})},put:function(p,{data:w,params:d,headers:g=ot,noScope:J,noAuth:L,onUploadProgress:A}={}){return re("put",p,{data:w,params:d,headers:g,noScope:J,noAuth:L,onUploadProgress:A})},post:function(p,{data:w,params:d,headers:g=ot,noScope:J,noAuth:L,onUploadProgress:A}={}){return re("post",p,{data:w,params:d,headers:g,noScope:J,noAuth:L,onUploadProgress:A})},delete:function(p,{params:w,headers:d=Le,noScope:g,noAuth:J,onUploadProgress:L}={}){return re("delete",p,{params:w,headers:d,noScope:g,noAuth:J,onUploadProgress:L})}};let ye=()=>({emit(p,...w){for(let d=this.events[p]||[],g=0,J=d.length;g<J;g++)d[g](...w)},events:{},on(p,w){var d;return((d=this.events)[p]||(d[p]=[])).push(w),()=>{var g;this.events[p]=(g=this.events[p])==null?void 0:g.filter(J=>w!==J)}}});class ne extends Error{constructor(w,d){w instanceof Error?(super(w.message),this.cause=w):super(w),this.reason=d,this.name="ReasonError"}}function Bt(p){return p?`{${Object.keys(p).sort().filter(w=>p[w]!==void 0).map(w=>{let d=JSON.stringify(p[w]);return`${JSON.stringify(w)}:${d}`}).join(",")}}`:""}class Is{constructor(w){this.channel=w,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",w=>{if(w.type==="info"){this._state||(this._state=this.stateFromInfo(w));return}this._state&&(w.type==="join"?this._state[w.id]=w.info:w.type==="leave"&&delete this._state[w.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(w=>w()),this.listeners.length=0}async join(w,d){if(!this._info)return this._info={id:w,info:d},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let w=await this.channel.perform("$presence:leave");return delete this._info,w}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let w=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(w),this._state}finally{delete this._promise}}stateFromInfo(w){return w.records.reduce((d,{id:g,info:J})=>(d[g]=J,d),{})}}const B=Symbol("state");class Mt{constructor(w={}){this.emitter=ye(),this.params=Object.freeze(w),this.presence=new Is(this),this.initialConnect=!0,this[B]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Bt({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[B]}attached(w){if(this.receiver){if(this.receiver!==w)throw Error("Already connected to a different receiver");return!1}return this.receiver=w,!0}connecting(){this[B]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[B]="connected";let w=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:w})):this.emit("connect",{reconnect:!0,restored:w})}restored(){if(this.state==="connected")throw Error("Already connected");this[B]="connected";let w=!0,d=!0;this.initialConnect=!1,this.emit("connect",{reconnect:d,restored:w})}disconnected(w){this.state==="disconnected"||this.state==="closed"||(this[B]="disconnected",this.presence.reset(),this.emit("disconnect",w))}closed(w){this.state!=="closed"&&(this[B]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",w))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(w,d){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,w,d)}async send(w){return this.perform(void 0,w)}async whisper(w){try{await this.perform("$whisper",w)}catch(d){let g=this.receiver?this.receiver.logger:null;g&&g.warn("whisper failed: ",d)}}receive(w,d){this.emit("message",w,d)}on(w,d){return this.emitter.on(w,d)}once(w,d){let g=this.emitter.on(w,(...J)=>{g(),d(...J)});return g}emit(w,...d){return this.emitter.emit(w,...d)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((w,d)=>{let g=[()=>delete this._pendingSubscribe];g.push(this.on("connect",()=>{g.forEach(J=>J()),w()})),g.push(this.on("close",J=>{g.forEach(L=>L()),d(J||new ne("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class Be extends Mt{constructor(w,d){super(d),this.channelId=w}set channelId(w){this._channelId=w}get channelId(){return this._channelId}}v(Be,"identifier","__ghost__");const Bs="$pubsub";class ve extends Mt{async perform(w,d){if(w.startsWith("$"))return super.perform(w,d);throw Error("not implemented")}}v(ve,"identifier",Bs);function Me(p){return ar.test(p)}const ar=/^-?[0-9]+$/;function Kt(p){return lr.test(p)}const lr=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Gt(p,w){const d=Number.parseFloat(p),g=String(d),J=ht(p),L=ht(g);return!!(J===L||(w==null?void 0:w.approx)===!0&&!Me(p)&&L.length>=14&&J.startsWith(L.substring(0,14)))}let Q=function(p){return p.underflow="underflow",p.overflow="overflow",p.truncate_integer="truncate_integer",p.truncate_float="truncate_float",p}({});function ur(p){if(Gt(p,{approx:!1}))return;if(Me(p))return Q.truncate_integer;const w=Number.parseFloat(p);return Number.isFinite(w)?w===0?Q.underflow:Q.truncate_float:Q.overflow}function ht(p){return p.replace(hr,"").replace(fr,"").replace(pr,"").replace(dr,"")}const hr=/[eE][+-]?\d+$/,dr=/^-?(0*)?/,fr=/\./,pr=/0+$/;class mr{constructor(w){if(v(this,"isLosslessNumber",!0),!Kt(w))throw new Error(`Invalid number (value: "${w}")`);this.value=w}valueOf(){const w=ur(this.value);if(w===void 0||w===Q.truncate_float)return Number.parseFloat(this.value);if(Me(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${w} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function gr(p){return p&&typeof p=="object"&&p.isLosslessNumber===!0||!1}function br(p){return new mr(p)}function yr(p,w){return He({"":p},"",p,w)}function He(p,w,d,g){return Array.isArray(d)?g.call(p,w,_r(d,g)):d&&typeof d=="object"&&!gr(d)?g.call(p,w,wr(d,g)):g.call(p,w,d)}function wr(p,w){for(const d of Object.keys(p)){const g=He(p,d,p[d],w);g!==void 0?p[d]=g:delete p[d]}return p}function _r(p,w){for(let d=0;d<p.length;d++)p[d]=He(p,String(d),p[d],w);return p}function Er(p,w){let d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:br,g=0;const J=k();return e(J),c(),w?yr(J,w):J;function L(){if(p.charCodeAt(g)===Or){g++,u();const b={};let E=!0;for(;g<p.length&&p.charCodeAt(g)!==ft;){E?E=!1:(o(),u());const j=g,we=r();if(we===void 0){D();return}u(),t();const Ee=k();if(Ee===void 0){X();return}Object.prototype.hasOwnProperty.call(b,we)&&!je(Ee,b[we])&&M(we,j+1),b[we]=Ee}return p.charCodeAt(g)!==ft&&x(),g++,b}}function A(){if(p.charCodeAt(g)===Cr){g++,u();const b=[];let E=!0;for(;g<p.length&&p.charCodeAt(g)!==pt;){E?E=!1:o();const j=k();n(j),b.push(j)}return p.charCodeAt(g)!==pt&&_(),g++,b}}function k(){u();const b=r()??i()??L()??A()??a("true",!0)??a("false",!1)??a("null",null);return u(),b}function a(b,E){if(p.slice(g,g+b.length)===b)return g+=b.length,E}function u(){for(;Sr(p.charCodeAt(g));)g++}function r(){if(p.charCodeAt(g)===Te){g++;let b="";for(;g<p.length&&p.charCodeAt(g)!==Te;){if(p.charCodeAt(g)===Tr){const E=p[g+1],j=Ar[E];j!==void 0?(b+=j,g++):E==="u"?ie(p.charCodeAt(g+2))&&ie(p.charCodeAt(g+3))&&ie(p.charCodeAt(g+4))&&ie(p.charCodeAt(g+5))?(b+=String.fromCharCode(Number.parseInt(p.slice(g+2,g+6),16)),g+=5):O(g):se(g)}else Rr(p.charCodeAt(g))?b+=p[g]:U(p[g]);g++}return m(),g++,b}}function i(){const b=g;if(p.charCodeAt(g)===mt&&(g++,f(b)),p.charCodeAt(g)===ze)g++;else if(xr(p.charCodeAt(g)))for(g++;oe(p.charCodeAt(g));)g++;if(p.charCodeAt(g)===$r)for(g++,f(b);oe(p.charCodeAt(g));)g++;if(p.charCodeAt(g)===Br||p.charCodeAt(g)===qr)for(g++,(p.charCodeAt(g)===mt||p.charCodeAt(g)===Lr)&&g++,f(b);oe(p.charCodeAt(g));)g++;if(g>b)return d(p.slice(b,g))}function o(){if(p.charCodeAt(g)!==jr)throw new SyntaxError(`Comma ',' expected after value ${h()}`);g++}function t(){if(p.charCodeAt(g)!==Fr)throw new SyntaxError(`Colon ':' expected after property name ${h()}`);g++}function e(b){if(b===void 0)throw new SyntaxError(`JSON value expected ${h()}`)}function n(b){if(b===void 0)throw new SyntaxError(`Array item expected ${h()}`)}function c(){if(g<p.length)throw new SyntaxError(`Expected end of input ${h()}`)}function f(b){if(!oe(p.charCodeAt(g))){const E=p.slice(b,g);throw new SyntaxError(`Invalid number '${E}', expecting a digit ${h()}`)}}function m(){if(p.charCodeAt(g)!==Te)throw new SyntaxError(`End of string '"' expected ${h()}`)}function D(){throw new SyntaxError(`Quoted object key expected ${h()}`)}function M(b,E){throw new SyntaxError(`Duplicate key '${b}' encountered at position ${E}`)}function x(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${h()}`)}function _(){throw new SyntaxError(`Array item or end of array ']' expected ${h()}`)}function U(b){throw new SyntaxError(`Invalid character '${b}' ${_e()}`)}function se(b){const E=p.slice(b,b+2);throw new SyntaxError(`Invalid escape character '${E}' ${_e()}`)}function X(){throw new SyntaxError(`Object value expected after ':' ${_e()}`)}function O(b){const E=p.slice(b,b+6);throw new SyntaxError(`Invalid unicode character '${E}' ${_e()}`)}function _e(){return`at position ${g}`}function S(){return g<p.length?`but got '${p[g]}'`:"but reached end of input"}function h(){return`${S()} ${_e()}`}}function Sr(p){return p===kr||p===Nr||p===Pr||p===Ir}function ie(p){return p>=ze&&p<=Ve||p>=Ur&&p<=Mr||p>=Dr&&p<=Hr}function oe(p){return p>=ze&&p<=Ve}function xr(p){return p>=vr&&p<=Ve}function Rr(p){return p>=32&&p<=1114111}function je(p,w){return p===w?!0:Array.isArray(p)&&Array.isArray(w)?p.length===w.length&&p.every((d,g)=>je(d,w[g])):dt(p)&&dt(w)?[...new Set([...Object.keys(p),...Object.keys(w)])].every(d=>je(p[d],w[d])):!1}function dt(p){return typeof p=="object"&&p!==null}const Ar={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
1107
- `,r:"\r",t:" "},Tr=92,Or=123,ft=125,Cr=91,pt=93,kr=32,Nr=10,Pr=9,Ir=13,Te=34,Lr=43,mt=45,ze=48,vr=49,Ve=57,jr=44,$r=46,Fr=58,Ur=65,Dr=97,qr=69,Br=101,Mr=70,Hr=102;function Xt(p,w,d,g){return J(p);function J(a,u){if(Array.isArray(g)){const r=g.find(i=>i.test(a));if(r){const i=r.stringify(a);if(typeof i!="string"||!Kt(i))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${i})`);return i}}if(typeof a=="boolean"||typeof a=="number"||typeof a=="string"||a===null||a instanceof Date||a instanceof Boolean||a instanceof Number||a instanceof String)return JSON.stringify(a);if(a!=null&&a.isLosslessNumber||typeof a=="bigint")return a.toString();if(Array.isArray(a))return L(a);if(a&&typeof a=="object")return A(a)}function L(a,u){if(a.length===0)return"[]";let r="[";for(let i=0;i<a.length;i++){const o=a[i];typeof o<"u"&&typeof o!="function"?r+=J(o):r+="null",i<a.length-1&&(r+=",")}return r+="]",r}function A(a,u){if(typeof a.toJSON=="function")return Xt(a.toJSON(),w,d,void 0);const r=Array.isArray(w)?w.map(String):Object.keys(a);if(r.length===0)return"{}";let i=!0,o="{";for(const t of r){const e=a[t];if(k(t,e)){i?i=!1:o+=",";const n=JSON.stringify(t);o+=`${n}:`,o+=J(e)}}return o+="}",o}function k(a,u){return typeof u<"u"&&typeof u!="function"&&typeof u!="symbol"}}function zr(p){return Gt(p)?parseFloat(p):BigInt(p)}class mi{constructor(){v(this,"id",1)}async exec(w,d,g={},J={},L=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return g.scope=window.openc3Scope,J.manual=!0,(await De.post("/openc3-api/api",{jsonrpc:"2.0",method:w,params:d,id:this.id,keyword_params:g},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...J},timeout:L,transformRequest:[(A,k)=>Xt(A)],transformResponse:[A=>Er(A,void 0,zr)]})).data.result}catch(A){let k=new Error;throw A.response?(k.name=A.response.data.error.data.class,k.message=A.response.data.error.data.message,k.object=A.response.data.error):A.request?(k.name="Request error",k.message="Request error, no response received"):k.name="Unknown error",k}}decode_openc3_type(w){if(w!==null&&typeof w=="object"&&w.json_class=="Float"&&w.raw){if(w.raw=="NaN")return NaN;if(w.raw=="Infinity")return 1/0;if(w.raw=="-Infinity")return-1/0}return null}encode_openc3_type(w){return Number.isNaN(w)?{json_class:"Float",raw:"NaN"}:w==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:w==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(w=>{w&&(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(w){return this.exec("set_offline_access",[w])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(w,d){return this.exec("map_target_to_interface",[w,d])}connect_interface(w,...d){return d.length>0?this.exec("connect_interface",[w,...d]):this.exec("connect_interface",[w])}disconnect_interface(w){return this.exec("disconnect_interface",[w])}interface_cmd(w,d,...g){return this.exec("interface_cmd",[w,d,...g])}get_all_router_info(){return this.exec("get_all_router_info",[])}connect_router(w){return this.exec("connect_router",[w])}disconnect_router(w){return this.exec("disconnect_router",[w])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(w){return this.exec("get_tlm_cnts",[w])}get_item(w,d,g){return this.exec("get_item",[w,d,g])}get_param(w,d,g){return this.exec("get_param",[w,d,g])}get_parameter(w,d,g){return this.exec("get_param",[w,d,g])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(w){return this.exec("set_limits_set",[w])}get_target(w){return this.exec("get_target",[w])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(w,d){return this.exec("get_tlm",[w,d])}get_telemetry(w,d){return this.exec("get_tlm",[w,d])}get_all_tlm(w){return this.exec("get_all_tlm",[w])}get_all_telemetry(w){return this.exec("get_all_tlm",[w])}get_all_tlm_names(w,d=!1){return this.exec("get_all_tlm_names",[w],{hidden:d})}get_all_telemetry_names(w){return this.exec("get_all_tlm_names",[w])}async get_tlm_packet(w,d,g,J=30){const L=await this.exec("get_tlm_packet",[w,d],{type:g,stale_time:J});if(L!=null){let A=L.length,k=null;for(let a=0;a<A;a++)k=this.decode_openc3_type(L[a][1]),k!==null&&(L[a][1]=k)}return L}get_packet_derived_items(w,d){return this.exec("get_packet_derived_items",[w,d])}get_tlm_buffer(w,d){return this.exec("get_tlm_buffer",[w,d])}async get_tlm_values(w,d=30,g=null){let J={stale_time:d};g!==null&&(J.cache_timeout=g);const L=await this.exec("get_tlm_values",[w],J,{},1e4);let A=L[0].length,k=null;for(let a=0;a<A;a++)k=this.decode_openc3_type(L[0][a]),k!==null&&(L[0][a]=k);return L}get_limits(w,d,g){return this.exec("get_limits",[w,d,g])}async tlm(w,d,g,J="CONVERTED"){let L=null;if(d===void 0)L=await this.exec("tlm",[w]);else if(g===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(d))L=await this.exec("tlm",[w],{type:d});else{let k=new Error;throw k.name="TypeError",k.message=`Invalid data type ${d}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,k}else L=await this.exec("tlm",[w,d,g],{type:J});let A=this.decode_openc3_type(L);return A!==null&&(L=A),L}async inject_tlm(w,d,g=null,J="CONVERTED"){await this.exec("inject_tlm",[w,d,g],{type:J})}set_tlm(w,d,g,J){return this.exec("set_tlm",[w,d,g],{type:J})}override_tlm(w,d,g,J){return this.exec("override_tlm",[w,d,g],{type:J})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(w,d,g,J){return this.exec("normalize_tlm",[w,d,g],{type:J})}get_all_cmds(w){return this.exec("get_all_cmds",[w])}get_all_commands(w){return this.exec("get_all_cmds",[w])}get_all_cmd_names(w,d=!1){return this.exec("get_all_cmd_names",[w],{hidden:d})}get_all_command_names(w){return this.exec("get_all_cmd_names",[w])}get_cmd(w,d){return this.exec("get_cmd",[w,d])}get_command(w,d){return this.exec("get_cmd",[w,d])}get_cmd_cnts(w){return this.exec("get_cmd_cnts",[w])}get_cmd_value(w,d,g,J="CONVERTED"){return this.exec("get_cmd_value",[w,d,g,J])}get_cmd_buffer(w,d){return this.exec("get_cmd_buffer",[w,d])}_cmd(w,d,g,J,L){let A=null;for(let k in J)Object.prototype.hasOwnProperty.call(J,k)&&(A=this.encode_openc3_type(J[k]),A!==null&&(J[k]=A));return this.exec(w,[d,g,J],{},L)}get_cmd_hazardous(w,d,g,J={}){return d===void 0?this.exec("get_cmd_hazardous",w,{},J):this._cmd("get_cmd_hazardous",w,d,g,J)}cmd(w,d,g,J={}){return d===void 0?this.exec("cmd",w,{},J):this._cmd("cmd",w,d,g,J)}cmd_no_range_check(w,d,g,J={}){return d===void 0?this.exec("cmd_no_range_check",w,{},J):this._cmd("cmd_no_range_check",w,d,g,J)}cmd_raw(w,d,g,J={}){return d===void 0?this.exec("cmd_raw",w,{},J):this._cmd("cmd_raw",w,d,g,J)}cmd_raw_no_range_check(w,d,g,J={}){return d===void 0?this.exec("cmd_raw_no_range_check",w,{},J):this._cmd("cmd_raw_no_range_check",w,d,g,J)}cmd_no_hazardous_check(w,d,g,J={}){return d===void 0?this.exec("cmd_no_hazardous_check",w,{},J):this._cmd("cmd_no_hazardous_check",w,d,g,J)}cmd_no_checks(w,d,g,J={}){return d===void 0?this.exec("cmd_no_checks",w,{},J):this._cmd("cmd_no_checks",w,d,g,J)}cmd_raw_no_hazardous_check(w,d,g,J={}){return d===void 0?this.exec("cmd_raw_no_hazardous_check",w,{},J):this._cmd("cmd_raw_no_hazardous_check",w,d,g,J)}cmd_raw_no_checks(w,d,g,J={}){return d===void 0?this.exec("cmd_raw_no_checks",w,{},J):this._cmd("cmd_raw_no_checks",w,d,g,J)}build_cmd(w,d,g){return d===void 0?this.exec("build_cmd",w):this._cmd("build_cmd",w,d,g)}build_command(w,d,g){return d===void 0?this.exec("build_cmd",w):this._cmd("build_cmd",w,d,g)}get_interface_names(){return this.exec("get_interface_names",[])}send_raw(w,d){return this.exec("send_raw",[w,d])}list_configs(w){return this.exec("list_configs",[w])}load_config(w,d){return this.exec("load_config",[w,d])}save_config(w,d,g){return this.exec("save_config",[w,d,g])}delete_config(w,d){return this.exec("delete_config",[w,d])}enable_limits(w,d,g){return this.exec("enable_limits",[w,d,g])}disable_limits(w,d,g){return this.exec("disable_limits",[w,d,g])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(w){return this.exec("get_overall_limits_state",[w])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(w){return this.exec("get_setting",[w])}get_settings(w){return this.exec("get_settings",w)}set_setting(w,d){return this.exec("set_setting",[w,d])}update_news(){return this.exec("update_news",[])}save_setting(w,d){return this.exec("set_setting",[w,d])}get_metrics(){return this.exec("get_metrics",[])}async hashString(w){if(window.isSecureContext){const d=new TextEncoder().encode(w),g=await crypto.subtle.digest("SHA-256",d),J=new Uint8Array(g);return Array.from(J).map(L=>L.toString(16).padStart(2,"0")).join("")}}}const Utilities={methods:{isFloat(p){return!!(/^\s*[-+]?\d*\.\d+\s*$/.test(p)||/^\s*[-+]?(\d+((\.\d+)?)|(\.\d+))[eE][-+]?\d+\s*$/.test(p))},isInt(p){return!!(/^\s*[-+]?\d+\s*$/.test(p)||/^\s*0[xX][\dabcdefABCDEF]+\s*$/.test(p))},isArray(p){return!!/^\s*\[.*\]\s*$/.test(p)},removeQuotes(p){if(p.length<2)return p;var w=p.charAt(0);if(w!=='"'&&w!=="'")return p;var d=p.charAt(p.length-1);return w!==d?p:p.slice(1,-1)},convertToString(p){var w=0,d="";if(Object.prototype.toString.call(p).slice(8,-1)==="Array"){var g=p.length;for(d="[ ",w=0;w<g;w++)Object.prototype.toString.call(p[w]).slice(8,-1)==="String"?d+='"'+p[w]+'"':d+=p[w],w!==g-1&&(d+=", ");d+=" ]"}else if(Object.prototype.toString.call(p).slice(8,-1)==="Object")if(p.json_class==="String"&&p.raw)for(d="0x",w=0;w<p.raw.length;w++){var J=p.raw[w].toString(16).toUpperCase();J.length<2&&(J="0"+J),d+=J}else p.json_class==="Float"&&p.raw&&(d=p.raw);else d=String(p);return d}}},_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(p=>({label:p,...this.states[p]})):null},hazardous(){var p,w;return((w=(p=Object.entries(this.states).find(([d,g])=>g.value===this.modelValue))==null?void 0:p.at(1))==null?void 0:w.hazardous)!==void 0},stateClass(){return this.hazardous?"hazardous mr-4":"mr-4"}},methods:{handleChange(p){this.$emit("update:modelValue",p)}}},_hoisted_1$1={key:1,class:"d-flex align-center"};function _sfc_render$1(p,w,d,g,J,L){const A=resolveComponent("v-text-field"),k=resolveComponent("v-select");return openBlock(),createElementBlock("div",null,[d.states?(openBlock(),createElementBlock("div",_hoisted_1$1,[createVNode(k,{items:L.stateOptions,"model-value":L.selectValue,"onUpdate:modelValue":L.handleChange,"item-title":"label",class:normalizeClass(L.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(A,{"model-value":L.stateValue,disabled:"","hide-details":"",density:"compact",variant:"outlined","min-width":"60px","data-test":"cmd-param-value"},null,8,["model-value"])])):(openBlock(),createBlock(A,{key:0,"model-value":L.textFieldValue,"onUpdate:modelValue":L.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$1,TargetPacketItemChooser:tt$1,CommandParameterEditor,TopBar:W,Openc3Screen:et$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:"",commandDescription:"",paramList:"",lastTargetName:"",lastCommandName:"",lastParamList:"",ignoreRangeChecks:!1,statesInHex:!1,showIgnoredParams:!1,cmdRaw:!1,ignoredParams:[],rows:[],interfaces:[],selectedInterface:"",rawCmdFile:null,status:"",history:"",hazardousCommand:"",displaySendHazardous:!1,displayErrorDialog:!1,displaySendRaw:!1,displayCriticalCmd:!1,criticalCmdUuid:null,criticalCmdString:null,criticalCmdUser:null,sendDisabled:!1,api:null,viewDetails:!1,contextMenuShown:!1,parameterName:"",reservedItemNames:[],x:0,y:0,contextMenuOptions:[{title:"Details",action:()=>{this.contextMenuShown=!1,this.viewDetails=!0}}],keywords:[],screenTarget:null,screenName:null,screenDefinition:null,screenCount:0}},computed:{menus:function(){return[{label:"Mode",items:[{label:"Ignore Range Checks",checkbox:!0,checked:this.ignoreRangeChecks,command:()=>{this.ignoreRangeChecks=!this.ignoreRangeChecks}},{label:"Display State Values in Hex",checkbox:!0,checked:this.statesInHex,command:()=>{this.statesInHex=!this.statesInHex}},{label:"Show Ignored Parameters",checkbox:!0,checked:this.showIgnoredParams,command:()=>{this.showIgnoredParams=!this.showIgnoredParams,this.updateCmdParams()}},{label:"Disable Parameter Conversions",checkbox:!0,checked:this.cmdRaw,command:()=>{this.cmdRaw=!this.cmdRaw.checked}}]}]}},created(){ui.get("/openc3-api/autocomplete/reserved-item-names").then(p=>{this.reservedItemNames=p.data}),this.api=new mi,this.$route.params.target&&this.$route.params.packet&&this.commandChanged({targetName:this.$route.params.target.toUpperCase(),packetName:this.$route.params.packet.toUpperCase()}),ui.get("/openc3-api/autocomplete/keywords/screen").then(p=>{this.keywords=p.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",p=>{if(p.key==="Enter"){p.preventDefault();let w=this.editor.session.getLine(this.editor.getCursorPosition().row);if(w==="")return;let d=w.indexOf('"'),g=w.lastIndexOf('"');w=w.substr(d+1,g-d-1),this.sendCmd(w)}})},beforeUnmount(){this.editor.destroy(),this.editor.container.remove()},methods:{showContextMenu(p,w){p.preventDefault(),this.parameterName=w.item.parameter_name,this.contextMenuShown=!1,this.x=p.clientX,this.y=p.clientY,this.$nextTick(()=>{this.contextMenuShown=!0})},convertToValue(param){if(param.val!==void 0&&param.states&&!this.cmdRaw)return Object.keys(param.states).find(p=>param.states[p].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 p=upcaseStr.slice(2);p.length%2!==0&&(p="0"+p);let w={json_class:"String",raw:[]};for(let d=0;d<p.length;d+=2){let g=p.charAt(d)+p.charAt(d+1);w.raw.push(parseInt(g,16))}return w}else return upcaseStr==="INFINITY"?1/0:upcaseStr==="-INFINITY"?-1/0:upcaseStr==="NAN"?NaN:this.isFloat(str)?parseFloat(str):this.isInt(str)?Number.isSafeInteger(Number(str))?parseInt(str):BigInt(str):this.isArray(str)?eval(str):str}else return quotesRemoved},commandChanged(p){(this.targetName!==p.targetName||this.commandName!==p.packetName)&&(this.targetName=p.targetName,this.commandName=p.packetName,this.sendDisabled===!1&&this.updateCmdParams(),this.$router.replace({name:"CommandSender",params:{target:this.targetName,packet:this.commandName}}).catch(w=>{}))},updateCmdParams(){this.sendDisabled=!0,this.ignoredParams=[],this.rows=[],this.api.get_target(this.targetName).then(p=>(this.ignoredParams=p.ignored_parameters,this.api.get_cmd(this.targetName,this.commandName)),p=>{this.displayError("getting ignored parameters",p),this.sendDisabled=!1}).then(p=>{if(p.items.forEach(w=>{if(!this.reservedItemNames.includes(w.name)&&(!this.ignoredParams.includes(w.name)||this.showIgnoredParams)){let d=w.default;!w.states&&w.data_type==="STRING"&&typeof w.default=="string"&&(d=`'${d}'`),w.required&&(d=""),w.format_string&&(d=sprintf(w.format_string,w.default));let g="N/A";w.minimum!=null&&w.maximum!=null&&(w.data_type==="FLOAT"&&(w.minimum<-1e6&&Number.isSafeInteger(w.minimum)&&(w.minimum=w.minimum.toExponential(3)),w.maximum>1e6&&Number.isSafeInteger(w.maximum)&&(w.maximum=w.maximum.toExponential(3))),g=`${w.minimum}..${w.maximum}`),this.rows.push({parameter_name:w.name,val:d,states:w.states,description:w.description,range:g,units:w.units,type:w.data_type})}}),p.screen)this.loadScreen(p.screen[0],p.screen[1]).then(w=>{this.screenTarget=p.screen[0],this.screenName=p.screen[1],this.screenDefinition=w.data,this.screenCount+=1});else{if(p.related_items){this.screenTarget="LOCAL",this.screenName="CMDSENDER";let w=`SCREEN AUTO AUTO 1.0
1108
- `;for(const d of p.related_items)w+=`LABELVALUE '${d[0]}' '${d[1]}' '${d[2]}' WITH_UNITS 20
1109
- `;this.screenDefinition=w}else this.screenTarget=null,this.screenName=null,this.screenDefinition=null;this.screenCount+=1}this.commandDescription=p.description,this.sendDisabled=!1,this.status=""},p=>{this.displayError("getting command parameters",p),this.sendDisabled=!1})},createParamList(){let p={};for(const w of this.rows)p[w.parameter_name]=this.convertToValue(w);return p},buildCmd(){this.sendCmd(this.targetName,this.commandName,this.createParamList())},sendCmd(p,w,d){this.lastTargetName=p,this.lastCommandName=w,this.lastParamList=d,this.sendDisabled=!0;let g=!1,J="";this.api.get_cmd_hazardous(p,w,d).then(L=>{if(g=L,g)w===void 0?this.hazardousCommand=p.split(" ").slice(0,2).join(" "):this.hazardousCommand=`${p} ${w}`,this.displaySendHazardous=!0;else{let A;this.cmdRaw?this.ignoreRangeChecks?(J="cmd_raw_no_range_check",A=this.api.cmd_raw_no_range_check(p,w,d,{"Ignore-Errors":"428"})):(J="cmd_raw",A=this.api.cmd_raw(p,w,d,{"Ignore-Errors":"428 500"})):this.ignoreRangeChecks?(J="cmd_no_range_check",A=this.api.cmd_no_range_check(p,w,d,{"Ignore-Errors":"428"})):(J="cmd",A=this.api.cmd(p,w,d,{"Ignore-Errors":"428 500"})),A.then(k=>{this.processCmdResponse(!0,p,w,J,k)},k=>{this.processCmdResponse(!1,p,w,J,k)})}},L=>{this.processCmdResponse(!1,p,w,J,L)})},sendHazardousCmd(){this.displaySendHazardous=!1;let p="",w="";this.cmdRaw?this.ignoreRangeChecks?(w="cmd_raw_no_range_check",p=this.api.cmd_raw_no_checks(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428"})):(w="cmd_raw",p=this.api.cmd_raw_no_hazardous_check(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428 500"})):this.ignoreRangeChecks?(w="cmd_no_range_check",p=this.api.cmd_no_checks(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428"})):(w="cmd",p=this.api.cmd_no_hazardous_check(this.lastTargetName,this.lastCommandName,this.lastParamList,{"Ignore-Errors":"428 500"})),p.then(d=>{this.processCmdResponse(!0,this.lastTargetName,this.lastCommandName,w,d)},d=>{this.processCmdResponse(!1,this.lastTargetName,this.lastCommandName,w,d)})},cancelHazardousCmd(){this.displaySendHazardous=!1,this.status="Hazardous command not sent",this.sendDisabled=!1},processCmdResponse(p,w,d,g,J){d===void 0&&([w,d]=w.split(" ").slice(0,2));let L="";if(p){L=`${g}("${J[0]} ${J[1]}`;let A=Object.keys(J[2]);if(A.length>0){L+=" with ";for(let k=0;k<A.length;k++){let a=A[k],u=this.convertToString(J[2][a]);typeof J[2][a]=="string"&&u.charAt(0)!=="'"&&u.charAt(0)!=='"'&&(u=`'${u}'`),L+=a+" "+u,k<A.length-1&&(L+=", ")}}if(L+='")',!this.history.includes(L)){let k=L;this.history.length!==0&&(k+=`
1110
- ${this.history}`),this.editor.setValue(k),this.editor.moveCursorTo(0,0)}if(L+=" sent.",this.status.includes(L)){let k=this.status.split("sent.");if(k[1].includes("(")){let a=parseInt(k[1].substr(2,k[1].indexOf(")")-2));L=k[0]+"sent. ("+(a+1)+")"}else L+=" (2)"}this.status=L}else{let A="sending "+w+" "+d;this.displayError(A,J,!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(p,w,d=!1){this.status=`Error ${p} due to ${w.name}`,w.message&&w.message!==""&&(this.status+=": ",this.status+=w.message),this.status.includes("CriticalCmdError")&&(this.status="Critical Command Queued For Approval"),d&&(w.message.includes("CriticalCmdError")?(this.criticalCmdUuid=w.object.data.instance_variables["@uuid"],this.criticalCmdString=w.object.data.instance_variables["@cmd_string"],this.criticalCmdUser=w.object.data.instance_variables["@username"],this.displayCriticalCmd=!0):this.displayErrorDialog=!0)},loadScreen(p,w){return ui.get("/openc3-api/screen/"+p+"/"+w,{headers:{Accept:"text/plain"}})}}},_hoisted_1={style:{padding:"10px"}},_hoisted_2={class:"pa-3"},_hoisted_3={ref:"editor",class:"editor","data-test":"sender-history"},_hoisted_4={class:"mx-1"},_hoisted_5=["textContent"],_hoisted_6={class:"openc3-yellow"},_hoisted_7={class:"mx-1"};function _sfc_render(p,w,d,g,J,L){const A=resolveComponent("top-bar"),k=resolveComponent("target-packet-item-chooser"),a=resolveComponent("v-spacer"),u=resolveComponent("v-text-field"),r=resolveComponent("v-card-title"),i=resolveComponent("command-parameter-editor"),o=resolveComponent("v-data-table"),t=resolveComponent("v-card"),e=resolveComponent("v-col"),n=resolveComponent("v-btn"),c=resolveComponent("v-tooltip"),f=resolveComponent("v-row"),m=resolveComponent("v-card-subtitle"),D=resolveComponent("openc3-screen"),M=resolveComponent("v-list-item-title"),x=resolveComponent("v-list-item"),_=resolveComponent("v-list"),U=resolveComponent("v-menu"),se=resolveComponent("details-dialog"),X=resolveComponent("critical-cmd-dialog"),O=resolveComponent("v-toolbar"),_e=resolveComponent("v-card-text"),S=resolveComponent("v-dialog"),h=resolveComponent("v-card-actions"),b=resolveComponent("v-select");return openBlock(),createElementBlock("div",null,[createVNode(A,{menus:L.menus,title:J.title},null,8,["menus","title"]),createVNode(t,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_1,[createVNode(k,{"initial-target-name":this.$route.params.target,"initial-packet-name":this.$route.params.packet,onOnSet:w[0]||(w[0]=E=>L.commandChanged(E)),onAddItem:w[1]||(w[1]=E=>L.buildCmd(E)),disabled:J.sendDisabled,"button-text":"Send",mode:"cmd"},null,8,["initial-target-name","initial-packet-name","disabled"])]),J.rows.length!==0?(openBlock(),createBlock(t,{key:0},{default:withCtx(()=>[createVNode(r,{class:"d-flex align-center justify-content-space-between"},{default:withCtx(()=>[w[12]||(w[12]=createTextVNode(" Parameters ")),createVNode(a),createVNode(u,{modelValue:J.search,"onUpdate:modelValue":w[2]||(w[2]=E=>J.search=E),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search"},null,8,["modelValue"])]),_:1}),createVNode(o,{headers:J.headers,items:J.rows,search:J.search,"items-per-page":-1,"hide-default-footer":"","multi-sort":"",density:"compact","onContextmenu:row":L.showContextMenu},{"item.val":withCtx(({item:E})=>[createVNode(i,{modelValue:E.val,"onUpdate:modelValue":j=>E.val=j,states:E.states,"states-in-hex":J.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(J.status),1)]),_:1}),w[26]||(w[26]=createElementVNode("div",{style:{height:"15px"}},null,-1)),createVNode(f,{"no-gutters":""},{default:withCtx(()=>[createVNode(e,{class:"pr-4"},{default:withCtx(()=>[createVNode(t,{class:"pb-2"},{default:withCtx(()=>[createVNode(m,null,{default:withCtx(()=>[createVNode(f,null,{default:withCtx(()=>[createVNode(e,{class:"pt-6"},{default:withCtx(()=>w[13]||(w[13]=[createTextVNode(" Editable Command History: (Pressing Enter on the line re-executes the command) ")])),_:1}),createVNode(e,null,{default:withCtx(()=>[createVNode(c,{location:"top"},{activator:withCtx(({props:E})=>[createElementVNode("div",mergeProps(E,{class:"float-right"}),[createVNode(n,{icon:"mdi-delete",variant:"text","data-test":"clear-history",onClick:L.clearHistory},null,8,["onClick"])],16)]),default:withCtx(()=>[w[14]||(w[14]=createElementVNode("span",null," Clear History ",-1))]),_:1})]),_:1})]),_:1})]),_:1}),createVNode(f,{"no-gutters":"",class:"mt-2 mb-2"},{default:withCtx(()=>[createVNode(e,null,{default:withCtx(()=>[createElementVNode("pre",_hoisted_3,null,512)]),_:1})]),_:1})]),_:1})]),_:1}),J.screenDefinition?(openBlock(),createBlock(e,{key:0,md:"auto"},{default:withCtx(()=>[createVNode(D,{target:J.screenTarget,screen:J.screenName,definition:J.screenDefinition,keywords:J.keywords,count:J.screenCount,showClose:!1},null,8,["target","screen","definition","keywords","count"])]),_:1})):createCommentVNode("",!0)]),_:1}),w[27]||(w[27]=createElementVNode("div",{style:{height:"15px"}},null,-1)),createVNode(U,{modelValue:J.contextMenuShown,"onUpdate:modelValue":w[3]||(w[3]=E=>J.contextMenuShown=E),target:[J.x,J.y]},{default:withCtx(()=>[createVNode(_,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(J.contextMenuOptions,(E,j)=>(openBlock(),createBlock(x,{key:j,onClick:withModifiers(E.action,["stop"])},{default:withCtx(()=>[createVNode(M,null,{default:withCtx(()=>[createTextVNode(toDisplayString(E.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),createVNode(se,{"target-name":J.targetName,"packet-name":J.commandName,"item-name":J.parameterName,type:"cmd",modelValue:J.viewDetails,"onUpdate:modelValue":w[4]||(w[4]=E=>J.viewDetails=E)},null,8,["target-name","packet-name","item-name","modelValue"]),createVNode(X,{uuid:J.criticalCmdUuid,cmdString:J.criticalCmdString,cmdUser:J.criticalCmdUser,modelValue:J.displayCriticalCmd,"onUpdate:modelValue":w[5]||(w[5]=E=>J.displayCriticalCmd=E)},null,8,["uuid","cmdString","cmdUser","modelValue"]),createVNode(S,{modelValue:J.displayErrorDialog,"onUpdate:modelValue":w[7]||(w[7]=E=>J.displayErrorDialog=E),"max-width":"600"},{default:withCtx(()=>[createVNode(t,null,{default:withCtx(()=>[createVNode(O,{height:"24"},{default:withCtx(()=>[createVNode(a),w[15]||(w[15]=createElementVNode("span",null," Error ",-1)),createVNode(a)]),_:1}),createVNode(_e,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_4,[createVNode(f,{class:"my-2"},{default:withCtx(()=>[createVNode(_e,null,{default:withCtx(()=>[createElementVNode("span",{textContent:toDisplayString(J.status)},null,8,_hoisted_5)]),_:1})]),_:1}),createVNode(f,null,{default:withCtx(()=>[createVNode(a),createVNode(n,{onClick:w[6]||(w[6]=E=>J.displayErrorDialog=!1),color:"primary","data-test":"error-dialog-ok"},{default:withCtx(()=>w[16]||(w[16]=[createTextVNode(" Ok ")])),_:1})]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"]),createVNode(S,{modelValue:J.displaySendHazardous,"onUpdate:modelValue":w[8]||(w[8]=E=>J.displaySendHazardous=E),"max-width":"600"},{default:withCtx(()=>[createVNode(t,null,{default:withCtx(()=>[createVNode(O,{height:"24"},{default:withCtx(()=>[createVNode(a),w[17]||(w[17]=createElementVNode("span",null," Hazardous Warning ",-1)),createVNode(a)]),_:1}),createVNode(_e,{class:"mt-6"},{default:withCtx(()=>[createTextVNode(" Warning: Command "+toDisplayString(J.hazardousCommand)+" is Hazardous. Send? ",1),w[18]||(w[18]=createElementVNode("br",null,null,-1)),createElementVNode("span",_hoisted_6," Description: "+toDisplayString(J.commandDescription),1)]),_:1}),createVNode(h,{class:"px-2"},{default:withCtx(()=>[createVNode(a),createVNode(n,{onClick:L.cancelHazardousCmd,variant:"outlined"},{default:withCtx(()=>w[19]||(w[19]=[createTextVNode(" Cancel ")])),_:1},8,["onClick"]),createVNode(n,{onClick:L.sendHazardousCmd,variant:"flat"},{default:withCtx(()=>w[20]||(w[20]=[createTextVNode(" Send ")])),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),createVNode(S,{modelValue:J.displaySendRaw,"onUpdate:modelValue":w[11]||(w[11]=E=>J.displaySendRaw=E),"max-width":"600"},{default:withCtx(()=>[createVNode(t,null,{default:withCtx(()=>[createVNode(O,{height:"24"},{default:withCtx(()=>[createVNode(a),w[21]||(w[21]=createElementVNode("span",null," Send Raw ",-1)),createVNode(a)]),_:1}),createVNode(_e,null,{default:withCtx(()=>[createElementVNode("div",_hoisted_7,[createVNode(f,{class:"my-2"},{default:withCtx(()=>[createVNode(e,null,{default:withCtx(()=>w[22]||(w[22]=[createTextVNode("Interface:")])),_:1}),createVNode(e,null,{default:withCtx(()=>[createVNode(b,{variant:"solo","hide-details":"",density:"compact",items:J.interfaces,"item-title":"label","item-value":"value",modelValue:J.selectedInterface,"onUpdate:modelValue":w[9]||(w[9]=E=>J.selectedInterface=E)},null,8,["items","modelValue"])]),_:1})]),_:1}),createVNode(f,{"no-gutters":""},{default:withCtx(()=>[createVNode(e,null,{default:withCtx(()=>w[23]||(w[23]=[createTextVNode("Filename:")])),_:1}),createVNode(e,null,{default:withCtx(()=>[createElementVNode("input",{type:"file",onChange:w[10]||(w[10]=E=>p.selectRawCmdFile(E))},null,32)]),_:1})]),_:1}),createVNode(f,null,{default:withCtx(()=>[createVNode(a),createVNode(n,{onClick:p.cancelRawCmd,variant:"outlined","data-test":"raw-cancel"},{default:withCtx(()=>w[24]||(w[24]=[createTextVNode(" Cancel ")])),_:1},8,["onClick"]),createVNode(n,{onClick:p.sendRawCmd,class:"bg-primary","data-test":"raw-ok"},{default:withCtx(()=>w[25]||(w[25]=[createTextVNode(" Ok ")])),_:1},8,["onClick"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"])])}const CommandSender=exports("default",_export_sfc(_sfc_main,[["render",_sfc_render],["__scopeId","data-v-b7ab1f82"]]))}}});