openc3-cosmos-tool-limitsmonitor 7.2.0 → 7.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 (95) hide show
  1. checksums.yaml +4 -4
  2. data/tools/limitsmonitor/{ArrayWidget-D1PArcGr-400791027cc4d28d3632.js → ArrayWidget-DMSm_P6c-758cfd44feebfe30b1e9.js} +2 -2
  3. data/tools/limitsmonitor/{ArrayplotWidget-DPUPy0qM-4986a1ea1ef56e8686fe.js → ArrayplotWidget-fdXLhGAl-e3e7143acc3764969eb8.js} +1 -1
  4. data/tools/limitsmonitor/{BarColumn-BpdscDQf-35b4ae46ea40ba6eac87.js → BarColumn-Bb305iCi-79a8ef39781f64eed269.js} +1 -1
  5. data/tools/limitsmonitor/{BlockWidget-_VUsK5T9-39f6af1b633dd73b7a8e.js → BlockWidget-Do3W6tZh-55e450760dca098564c5.js} +2 -2
  6. data/tools/limitsmonitor/{ButtonWidget-DE41o-cg-ab9c3ebc63e47ccacd95.js → ButtonWidget-DukCQt0F-2aab525a982d9af18352.js} +2 -2
  7. data/tools/limitsmonitor/CanvasWidget-BRdVWln5-9f7157d343603431edf8.js +1 -0
  8. data/tools/limitsmonitor/CanvasdotWidget-DV8PeDWz-9d294e7129956654497b.js +1 -0
  9. data/tools/limitsmonitor/{CanvasimageWidget-COv_Qnc8-cf7f9d214091eee59084.js → CanvasimageWidget-Czbq1GuF-f539316f0133f2bef6b5.js} +1 -1
  10. data/tools/limitsmonitor/{CanvasimagevalueWidget-BhuUqLOo-57f4e73a1af5378d3ab9.js → CanvasimagevalueWidget-DKt5JgEt-c5196e1871b66cf9d57c.js} +1 -1
  11. data/tools/limitsmonitor/CanvaslabelWidget-DW2I1ra1-c9c79d00047fa43f8198.js +1 -0
  12. data/tools/limitsmonitor/CanvaslabelvalueWidget-BhzvZVfD-aa0d4185d816f4865b21.js +1 -0
  13. data/tools/limitsmonitor/{CanvaslineWidget-D1K_6mAY-5eef588235d49c1c42bf.js → CanvaslineWidget-DsjY37tp-73c02d7eb6842bf59ee4.js} +1 -1
  14. data/tools/limitsmonitor/{CanvaslinevalueWidget-D4eaxWhR-ba03fa3c5c05e50d816e.js → CanvaslinevalueWidget-ihI97G8T-6f45568d902f0134ec2d.js} +1 -1
  15. data/tools/limitsmonitor/CheckbuttonWidget-B778Z-Zo-b3ae95bf21ca511e76d5.js +1 -0
  16. data/tools/limitsmonitor/ComboboxWidget-CuuvOL9K-862f7959f350ba49cdb0.js +1 -0
  17. data/tools/limitsmonitor/{DateWidget-DkNWx28s-c034abac0550f0ae841e.js → DateWidget-COvQTAeo-2a1d9352dc1f6b2b9134.js} +1 -1
  18. data/tools/limitsmonitor/{DetailsDialog-F4KgYM6m-99f16b4c0cd103cebe4d.js → DetailsDialog-DE7lK17G-9523ea864df66f3e37b8.js} +1 -1
  19. data/tools/limitsmonitor/{DynamicWidget-BuSbQVhf-c2433469a74318fe30f3.js → DynamicWidget-BuSbQVhf-0753353d5a9b32ed5e24.js} +1 -1
  20. data/tools/limitsmonitor/{FilechecksumWidget-DSfNEnDJ-7c61e5ae8d517c5788c9.js → FilechecksumWidget-DRnOt_UE-3e9b2eceec5b977e23ef.js} +1 -1
  21. data/tools/limitsmonitor/{FiledisplayWidget-D2cxMmrP-beb14f2cd124fc859fc3.js → FiledisplayWidget-26R46EjS-35b87dcf07a7d95cd83e.js} +1 -1
  22. data/tools/limitsmonitor/{FormatvalueWidget-6-bj_PJO-eaaa207a7419d38e5500.js → FormatvalueWidget-BxyscMJc-8302b4d5003f49a8185b.js} +1 -1
  23. data/tools/limitsmonitor/Graph-BKw7xw1a-820676b2302713d6d67b.js +1 -0
  24. data/tools/limitsmonitor/{GraphWidget-COXK3Dab-e98f9a1c9ba6e83f1aa3.js → GraphWidget-Cs9mvqUu-efd9e594ef7300c72bb5.js} +1 -1
  25. data/tools/limitsmonitor/{HorizontalWidget-C9UFBPsk-615f7e18b2fa8b12cfd4.js → HorizontalWidget-fWLFj7Kg-43f4c63ce87b9db74f2e.js} +1 -1
  26. data/tools/limitsmonitor/{HorizontalboxWidget-CWLfmRtr-9feaf86e99b232f286fa.js → HorizontalboxWidget-DEaXhKEz-8f75b9c9c74784f871f1.js} +1 -1
  27. data/tools/limitsmonitor/HorizontallineWidget-Bvu1QP3S-0df33b81905630850ce1.js +1 -0
  28. data/tools/limitsmonitor/{IframeWidget-Bn9eGzrq-9c2f9577a17909e38a53.js → IframeWidget-B143k4lo-769d74848916e51582f6.js} +1 -1
  29. data/tools/limitsmonitor/{ImageLoader-_gAudhVo-62c2ed958eb333a536c1.js → ImageLoader-BCpmQHIl-3d08c803417ff2eb7efa.js} +1 -1
  30. data/tools/limitsmonitor/{ImageviewerWidget-BUWhF32Z-512f2ed6139f449f32cf.js → ImageviewerWidget-CLrvr6dw-a9f4ee5861fddad31f58.js} +1 -1
  31. data/tools/limitsmonitor/{LabelWidget-BhzkN06D-879f024c11b660ee118b.js → LabelWidget-CA1bTX2B-503a07dc1e92e1246728.js} +1 -1
  32. data/tools/limitsmonitor/{LabelledWidget-vx8NvW1b-12d933e4ffaff922a2fa.js → LabelledWidget-BDhvr03J-57e6858f8977a2768dc1.js} +1 -1
  33. data/tools/limitsmonitor/{LabelprogressbarWidget-t5PvKuS4-507cc849018fe64d3f60.js → LabelprogressbarWidget-g7A5CE8S-7d88976db7d6246d16fd.js} +1 -1
  34. data/tools/limitsmonitor/LabelsparklineWidget-B27xXxWg-eba195b7c33281683bc6.js +1 -0
  35. data/tools/limitsmonitor/{LabelvalueWidget-Cbs1DBK2-eb95259251a8995558c5.js → LabelvalueWidget-DFn8o6LC-50a9865e818041e5c9a7.js} +1 -1
  36. data/tools/limitsmonitor/{LabelvaluedescWidget-B7OIOGc0-98065da10685719a70dd.js → LabelvaluedescWidget-BQpaxFaB-42c481ec4c983e508ff5.js} +1 -1
  37. data/tools/limitsmonitor/LabelvaluelimitsbarWidget-C-z96q8z-262fe4e7c88fcca1a21f.js +1 -0
  38. data/tools/limitsmonitor/LabelvaluelimitscolumnWidget-D2TMEv9O-340d375bcaf134252046.js +1 -0
  39. data/tools/limitsmonitor/{LabelvaluerangebarWidget-Pt_evm3v-658526bdbea98aa6336c.js → LabelvaluerangebarWidget-D99dZCjz-b47dd057dccec53dd507.js} +1 -1
  40. data/tools/limitsmonitor/{Layout-CKmC50QZ-73cee80023d9435e11da.js → Layout--_zNJWnw-28ebd6fb99cdd03f8b49.js} +1 -1
  41. data/tools/limitsmonitor/{LedWidget-D1lmNXpi-88f2a7caf9a460d704bc.js → LedWidget-D2uxHxe3-f3e4a9d7363ac51f7149.js} +1 -1
  42. data/tools/limitsmonitor/{LimitsBar-D5IZu7eX-c83defbeb54b6cfc8648.js → LimitsBar-DN1s8-MS-87bfe441f506b01bb80c.js} +1 -1
  43. data/tools/limitsmonitor/LimitsMonitor-939d997c957d6238d5e8.js +11 -0
  44. data/tools/limitsmonitor/{LimitsbarWidget-VpxQXE-e-1550e0d37fc190f68cb9.js → LimitsbarWidget-Cqhh7LKU-a1789aa61517526bcc09.js} +1 -1
  45. data/tools/limitsmonitor/{LimitscolorWidget-79P41CX7-9563cd9429c444ba0ef4.js → LimitscolorWidget-haGB4RbY-2fa17abea5f9c3e98dee.js} +1 -1
  46. data/tools/limitsmonitor/{LimitscolumnWidget-BFDXhJeZ-8998cb2a2a449a5300e6.js → LimitscolumnWidget-B1GdmlR_-9822570e890afde24370.js} +1 -1
  47. data/tools/limitsmonitor/{LinegraphWidget-VqkpOlws-2690117b6237093383c2.js → LinegraphWidget-COSOQ0uM-bbe31f4b114886e74712.js} +1 -1
  48. data/tools/limitsmonitor/{MatrixbycolumnsWidget--ihvirDP-1aa564b334b2bca31d04.js → MatrixbycolumnsWidget-coHlLETG-64183bbc0a247f2551a0.js} +1 -1
  49. data/tools/limitsmonitor/{OpenC3TimePicker-B0lAIU91-0172b8047df53a20c9a8.js → OpenC3TimePicker-B8Vu9GBz-2840b980fa4ee81bd205.js} +1 -1
  50. data/tools/limitsmonitor/{ProgressbarWidget-BIB3r9SL-b22b23a017f8b487b85c.js → ProgressbarWidget-D_yFssIZ-235f413989eea13e8daa.js} +1 -1
  51. data/tools/limitsmonitor/{RadiobuttonWidget-C5rxLM7K-5af958aa675329dfb400.js → RadiobuttonWidget-DL0jVTcb-ab3f38652aee1be60a35.js} +1 -1
  52. data/tools/limitsmonitor/{RadiogroupWidget-CciTCv1U-3241ca27dfb3e1b5c81b.js → RadiogroupWidget-2-td69IA-8b8e486e8b57afe77bed.js} +1 -1
  53. data/tools/limitsmonitor/{RangebarWidget-MPQYi2Km-efdc4e76bc2f89c883e7.js → RangebarWidget-i2mlnxys-91ae8bee9414bae8709f.js} +1 -1
  54. data/tools/limitsmonitor/{RollupWidget-CfjGAhzg-b61c7bfee6725f202c62.js → RollupWidget-BEJ2Icg1-7d1e13f221281dda7ce5.js} +1 -1
  55. data/tools/limitsmonitor/{ScrollwindowWidget-CupaygNN-c0d924e6d0e7b105cb24.js → ScrollwindowWidget-BU1cRpL8-06e05520339b779b4261.js} +1 -1
  56. data/tools/limitsmonitor/{SignalWidget-C-qecoTO-e941d3fd1446e9665ce9.js → SignalWidget-hiTkeem9-cee50ed98c4ed879dfe9.js} +1 -1
  57. data/tools/limitsmonitor/SpacerWidget-CBmzzS_X-f79cdc38c3247a117577.js +1 -0
  58. data/tools/limitsmonitor/SparklineWidget-CizRh6QR-8f36d6d0d14e9b0f305e.js +1 -0
  59. data/tools/limitsmonitor/{TabbookWidget-CXklff-l-44cc5fc242cdae28f3f4.js → TabbookWidget-CvL3Ozmx-128fcef17ed2c8d7806b.js} +1 -1
  60. data/tools/limitsmonitor/TextboxWidget-BtEwXzDO-cbf3f2de95e4c365c5ce.js +1 -0
  61. data/tools/limitsmonitor/TextfieldWidget-BDbb57HP-fd504ea1d7a4d99b047c.js +1 -0
  62. data/tools/limitsmonitor/TimeWidget-DzD8U8l8-8a00005bb155beb80051.js +1 -0
  63. data/tools/limitsmonitor/TitleWidget-CL53vf14-9ea9713e1084b2d6b33f.js +1 -0
  64. data/tools/limitsmonitor/{VWidget-oMbywhLA-85718f33edeb08e1e150.js → VWidget-5qOYva88-45447a85bf7f7f3e4fc1.js} +1 -1
  65. data/tools/limitsmonitor/ValueWidget-CAkuc_w_-fe817796128b0ef92a25.js +1 -0
  66. data/tools/limitsmonitor/ValuelimitsbarWidget-Y8sO05E1-d4a8c6bcef04142d2e5f.js +1 -0
  67. data/tools/limitsmonitor/{ValuelimitscolumnWidget-BVt6nLXq-4bacf2c800058cbbc5a4.js → ValuelimitscolumnWidget-iOjB_fCj-2e14a684190dfecbd460.js} +1 -1
  68. data/tools/limitsmonitor/{ValuerangebarWidget-uVZEI32U-9ae2932de717a0f1a3a2.js → ValuerangebarWidget-DsCoeAm6-b6746c170d00d5331090.js} +1 -1
  69. data/tools/limitsmonitor/{VerticalWidget-DlftYBjH-60b9591b4f0a132e1a8d.js → VerticalWidget-C6O0dhRU-1613f922f5d22944287f.js} +1 -1
  70. data/tools/limitsmonitor/{VerticalboxWidget-C7RrkfY0-64476f25b5e19b0885b3.js → VerticalboxWidget-B-CoqRJG-2c5328ad7974e365a15e.js} +1 -1
  71. data/tools/limitsmonitor/{Widget-D_HaosJK-cad59761cc9929d05ed1.js → Widget-CtYQauzA-b426b323af3e6d9eb01f.js} +1 -1
  72. data/tools/limitsmonitor/main-3f4adf203e54e3907c1d.js +1497 -0
  73. data/tools/limitsmonitor/main.js +1 -1
  74. metadata +72 -72
  75. data/tools/limitsmonitor/CanvasWidget-BEi8h3Mq-68eeaef2e593064f1b3b.js +0 -1
  76. data/tools/limitsmonitor/CanvasdotWidget-eZuMgkhL-224b35f28c1cee6bebbf.js +0 -1
  77. data/tools/limitsmonitor/CanvaslabelWidget-DtvbgeYH-14bc7362569406d89cba.js +0 -1
  78. data/tools/limitsmonitor/CanvaslabelvalueWidget-C_FRIeNb-7f329899b7a07e1eab53.js +0 -1
  79. data/tools/limitsmonitor/CheckbuttonWidget-ByxMDkiS-5f430af73175fe5208db.js +0 -1
  80. data/tools/limitsmonitor/ComboboxWidget-CAGxGv2r-fa7d7728ff40960a0982.js +0 -1
  81. data/tools/limitsmonitor/Graph-Cz0Ns1FD-458d3b3ff56b7f2f52b7.js +0 -1
  82. data/tools/limitsmonitor/HorizontallineWidget-DeFkOaYO-e3d95868298c39108931.js +0 -1
  83. data/tools/limitsmonitor/LabelsparklineWidget-CebbEH-j-3089b18cdd43379df5d5.js +0 -1
  84. data/tools/limitsmonitor/LabelvaluelimitsbarWidget-C57kf-oQ-750d1ff4d3d1a9cf8e5f.js +0 -1
  85. data/tools/limitsmonitor/LabelvaluelimitscolumnWidget-BRlNDEqp-0f4ed467df3ece4ce9f2.js +0 -1
  86. data/tools/limitsmonitor/LimitsMonitor-01b993d7a53cb284b983.js +0 -11
  87. data/tools/limitsmonitor/SpacerWidget-VVkOCb6N-03baa51755ea98050c5c.js +0 -1
  88. data/tools/limitsmonitor/SparklineWidget-Dsmn38z_-d452043105f69b70cde4.js +0 -1
  89. data/tools/limitsmonitor/TextboxWidget-CHs2VYIv-440f8fd6a73569d44751.js +0 -1
  90. data/tools/limitsmonitor/TextfieldWidget-CdANAW-6-2ef5fc5bbe335191148e.js +0 -1
  91. data/tools/limitsmonitor/TimeWidget-D0xT1wXR-7488c506361e77cf2e85.js +0 -1
  92. data/tools/limitsmonitor/TitleWidget-68NWCcXB-0f3f4ecc38383459c86a.js +0 -1
  93. data/tools/limitsmonitor/ValueWidget-B1aGUBP7-0812b73f73dcc59b379a.js +0 -1
  94. data/tools/limitsmonitor/ValuelimitsbarWidget-B7KcRjLS-a369a1c64f1c06fb65e1.js +0 -1
  95. data/tools/limitsmonitor/main-4c695d77b89b49cc35a4.js +0 -1497
@@ -0,0 +1,1497 @@
1
+ System.register(["vue","vue-router","pinia","single-spa","vuetify"],(function(Hn,lt){"use strict";var Rt,Pn,Co,Pt,gt,li,wr,Rf,Ef,Js,Pa,Il,Pr,ci,zo,Ll,Zs,Ol,Nl,Mf,If,Lf,pu,Of,Nf,Df,Pf,zf,gu,Ff,Bf,Wf,jf,Hf,mu,Uf;return{setters:[Mt=>{Rt=Mt.resolveComponent,Pn=Mt.openBlock,Co=Mt.createBlock,Pt=Mt.withCtx,gt=Mt.createVNode,li=Mt.createElementBlock,wr=Mt.createElementVNode,Rf=Mt.useCssVars,Ef=Mt.defineAsyncComponent,Js=Mt.h,Pa=Mt.normalizeStyle,Il=Mt.Fragment,Pr=Mt.createTextVNode,ci=Mt.toDisplayString,zo=Mt.createCommentVNode,Ll=Mt.withKeys,Zs=Mt.withModifiers,Ol=Mt.withDirectives,Nl=Mt.vShow,Mf=Mt.defineComponent,If=Mt.warn,Lf=Mt.inject,pu=Mt.computed,Of=Mt.shallowRef,Nf=Mt.watchEffect,Df=Mt.normalizeClass,Pf=Mt.getCurrentInstance,zf=Mt.provide,gu=Mt.createApp,Ff=Mt.mergeProps},Mt=>{Bf=Mt.createRouter,Wf=Mt.createWebHistory},Mt=>{jf=Mt.defineStore,Hf=Mt.createPinia},Mt=>{mu=Mt.getMountedApps},Mt=>{Uf=Mt.createVuetify}],execute:(function(){Hn({A:oa,H:Zr,J:Ya,X:Uu,Z:ia,c:ag,d:pg,e:sg,h:gg,j:ju,n:Ly,p:Br,r:_o,t:lg,u:mg});var Mt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Vf(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(m){return Object.getOwnPropertyDescriptor(t,m).enumerable}))),e.push.apply(e,r)}return e}function vs(t){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?Vf(Object(e),!0).forEach((function(r){bw(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Vf(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}function bw(t,n,e){return(n=(function(r){var m=(function(d,g){if(ys(d)!=="object"||d===null)return d;var w=d[Symbol.toPrimitive];if(w!==void 0){var u=w.call(d,g);if(ys(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(d)})(r,"string");return ys(m)==="symbol"?m:String(m)})(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function ys(t){return ys=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ys(t)}(function(t){if(t.CSS&&t.CSS.escape)return t.CSS.escape;var n=function(e){if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");for(var r,m=String(e),d=m.length,g=-1,w="",u=m.charCodeAt(0);++g<d;)(r=m.charCodeAt(g))!=0?w+=r>=1&&r<=31||r==127||g==0&&r>=48&&r<=57||g==1&&r>=48&&r<=57&&u==45?"\\"+r.toString(16)+" ":g==0&&d==1&&r==45||!(r>=128||r==45||r==95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122)?"\\"+m.charAt(g):m.charAt(g):w+="�";return w};t.CSS||(t.CSS={}),t.CSS.escape=n})(Mt);var ww={appOptions:null,template:null,Vue:null,createApp:null,handleInstance:null};function xw(t){if(ys(t)!=="object")throw new Error("single-spa-vue requires a configuration object");var n=vs(vs({},ww),t);if(!n.Vue&&!n.createApp)throw Error("single-spa-vue must be passed opts.Vue or opts.createApp");if(!n.appOptions)throw Error("single-spa-vue must be passed opts.appOptions");if(n.appOptions.el&&typeof n.appOptions.el!="string"&&!(n.appOptions.el instanceof HTMLElement))throw Error("single-spa-vue: appOptions.el must be a string CSS selector, an HTMLElement, or not provided at all. Was given ".concat(ys(n.appOptions.el)));n.createApp=n.createApp||n.Vue&&n.Vue.createApp;var e={};return{bootstrap:Cw.bind(null,n,e),mount:_w.bind(null,n,e),unmount:kw.bind(null,n,e),update:Aw.bind(null,n,e)}}function Cw(t){return t.loadRootComponent?t.loadRootComponent().then((function(n){return t.rootComponent=n})):Promise.resolve()}function _w(t,n,e){var r={};return Promise.resolve().then((function(){return(function(m,d){return typeof m.appOptions=="function"?m.appOptions(d):Promise.resolve(vs({},m.appOptions))})(t,e).then((function(m){var d;if(e.domElement&&!m.el&&(m.el=e.domElement),m.el)if(typeof m.el=="string"){if(!(d=document.querySelector(m.el)))throw Error("If appOptions.el is provided to single-spa-vue, the dom element must exist in the dom. Was provided as ".concat(m.el))}else(d=m.el).id||(d.id="single-spa-application:".concat(e.name)),m.el="#".concat(CSS.escape(d.id));else{var g="single-spa-application:".concat(e.name);m.el="#".concat(CSS.escape(g)),(d=document.getElementById(g))||((d=document.createElement("div")).id=g,document.body.appendChild(d))}if(!t.replaceMode&&(m.el=m.el+" .single-spa-container",!d.querySelector(".single-spa-container"))){var w=document.createElement("div");w.className="single-spa-container",d.appendChild(w)}r.domEl=d,m.render||m.template||!t.rootComponent||(m.render=function(f){return f(t.rootComponent)}),m.data||(m.data={});var u=m.data;if(m.data=function(){return vs(vs({},typeof u=="function"?u.call(this,this):u),e)},t.createApp){if(r.vueInstance=t.createApp(m),t.handleInstance)return Promise.resolve(t.handleInstance(r.vueInstance,e)).then((function(){return r.root=r.vueInstance.mount(m.el),n[e.name]=r,r.vueInstance}));r.root=r.vueInstance.mount(m.el)}else if(r.vueInstance=new t.Vue(m),r.vueInstance.bind&&(r.vueInstance=r.vueInstance.bind(r.vueInstance)),t.handleInstance)return Promise.resolve(t.handleInstance(r.vueInstance,e)).then((function(){return n[e.name]=r,r.vueInstance}));return n[e.name]=r,r.vueInstance}))}))}function Aw(t,n,e){return Promise.resolve().then((function(){var r=n[e.name],m=vs(vs({},t.appOptions.data||{}),e),d=r.root||r.vueInstance;for(var g in m)d[g]=m[g]}))}function kw(t,n,e){return Promise.resolve().then((function(){var r=n[e.name];t.createApp?r.vueInstance.unmount(r.domEl):(r.vueInstance.$destroy(),r.vueInstance.$el.innerHTML=""),delete r.vueInstance,r.domEl&&(r.domEl.innerHTML="",delete r.domEl)}))}const Sw=Hn("_",(t,n)=>{const e=t.__vccOpts||t;for(const[r,m]of n)e[r]=m;return e}),$w={};function Tw(t,n){const e=Rt("router-view"),r=Rt("v-app");return Pn(),Co(r,{id:"innerapp"},{default:Pt(()=>[gt(e)]),_:1})}const Rw=Sw($w,[["render",Tw]]),gD="modulepreload",mD=function(t){return"/"+t},vD={},ct=function(n,e,r){let m=Promise.resolve();function d(g){const w=new Event("vite:preloadError",{cancelable:!0});if(w.payload=g,window.dispatchEvent(w),!w.defaultPrevented)throw g}return m.then(g=>{for(const w of g||[])w.status==="rejected"&&d(w.reason);return n().catch(d)})},qf=function(t){!t.name!=="NotFound"&&(t.path=`/tools/limitsmonitor/${t.path.replace(/^\//,"")}`),t.children?.forEach(qf)},ts=Hn("i",(t,n)=>{const e=t.__vccOpts||t;for(const[r,m]of n)e[r]=m;return e}),Ew="/icons/customIcons.svg",vu={props:{icon:{type:String,default:null},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{iconSrc:function(){return Ew+"#"+this.icon}}},Gf=()=>{Rf(t=>({v4ccb3d08:t.color}))},Kf=vu.setup;vu.setup=Kf?(t,n)=>(Gf(),Kf(t,n)):Gf;const Mw={class:"cosmos-custom-icon"},Iw={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",focusable:"false"},Lw=["href"];function Ow(t,n,e,r,m,d){return Pn(),li("span",Mw,[(Pn(),li("svg",Iw,[wr("use",{href:d.iconSrc},null,8,Lw)]))])}const Nw=ts(vu,[["render",Ow],["__scopeId","data-v-54b83b01"]]);function Yf(t,n){return function(){return t.apply(n,arguments)}}const{toString:Dw}=Object.prototype,{getPrototypeOf:Xs}=Object,{iterator:za,toStringTag:Jf}=Symbol,Dl=(({hasOwnProperty:t})=>(n,e)=>t.call(n,e))(Object.prototype),Fa=(t,n)=>{let e=t;const r=[];for(;e!=null&&e!==Object.prototype;){if(r.indexOf(e)!==-1)return!1;if(r.push(e),Dl(e,n))return!0;e=Xs(e)}return!1},Pw=(t,n)=>t!=null&&Fa(t,n)?t[n]:void 0,yu=(t=>n=>{const e=Dw.call(n);return t[e]||(t[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),oo=t=>(t=t.toLowerCase(),n=>yu(n)===t),Pl=t=>n=>typeof n===t,{isArray:bs}=Array,Qs=Pl("undefined");function ea(t){return t!==null&&!Qs(t)&&t.constructor!==null&&!Qs(t.constructor)&&ui(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Zf=oo("ArrayBuffer");function zw(t){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(t):n=t&&t.buffer&&Zf(t.buffer),n}const Fw=Pl("string"),ui=Pl("function"),Xf=Pl("number"),ta=t=>t!==null&&typeof t=="object",Bw=t=>t===!0||t===!1,zl=t=>{if(!ta(t))return!1;const n=Xs(t);return(n===null||n===Object.prototype||Xs(n)===null)&&!Fa(t,Jf)&&!Fa(t,za)},Ww=t=>{if(!ta(t)||ea(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},jw=oo("Date"),Hw=oo("File"),Uw=t=>!!(t&&typeof t.uri<"u"),Vw=t=>t&&typeof t.getParts<"u",qw=oo("Blob"),Gw=oo("FileList"),Kw=t=>ta(t)&&ui(t.pipe);function Yw(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Qf=Yw(),ep=typeof Qf.FormData<"u"?Qf.FormData:void 0,Jw=t=>{if(!t)return!1;if(ep&&t instanceof ep)return!0;const n=Xs(t);if(!n||n===Object.prototype||!ui(t.append))return!1;const e=yu(t);return e==="formdata"||e==="object"&&ui(t.toString)&&t.toString()==="[object FormData]"},Zw=oo("URLSearchParams"),[Xw,Qw,ex,tx]=["ReadableStream","Request","Response","Headers"].map(oo),nx=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ba(t,n,{allOwnKeys:e=!1}={}){if(t===null||typeof t>"u")return;let r,m;if(typeof t!="object"&&(t=[t]),bs(t))for(r=0,m=t.length;r<m;r++)n.call(null,t[r],r,t);else{if(ea(t))return;const d=e?Object.getOwnPropertyNames(t):Object.keys(t),g=d.length;let w;for(r=0;r<g;r++)w=d[r],n.call(null,t[w],w,t)}}function tp(t,n){if(ea(t))return null;n=n.toLowerCase();const e=Object.keys(t);let r=e.length,m;for(;r-- >0;)if(m=e[r],n===m.toLowerCase())return m;return null}const ws=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,np=t=>!Qs(t)&&t!==ws;function bu(...t){const{caseless:n,skipUndefined:e}=np(this)&&this||{},r={},m=(d,g)=>{if(g==="__proto__"||g==="constructor"||g==="prototype")return;const w=n&&typeof g=="string"&&tp(r,g)||g,u=Dl(r,w)?r[w]:void 0;zl(u)&&zl(d)?r[w]=bu(u,d):zl(d)?r[w]=bu({},d):bs(d)?r[w]=d.slice():(!e||!Qs(d))&&(r[w]=d)};for(let d=0,g=t.length;d<g;d++){const w=t[d];if(!w||ea(w)||(Ba(w,m),typeof w!="object"||bs(w)))continue;const u=Object.getOwnPropertySymbols(w);for(let f=0;f<u.length;f++){const a=u[f];px.call(w,a)&&m(w[a],a)}}return r}const rx=(t,n,e,{allOwnKeys:r}={})=>(Ba(n,(m,d)=>{e&&ui(m)?Object.defineProperty(t,d,{__proto__:null,value:Yf(m,e),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,d,{__proto__:null,value:m,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),t),ix=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),ox=(t,n,e,r)=>{t.prototype=Object.create(n.prototype,r),Object.defineProperty(t.prototype,"constructor",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{__proto__:null,value:n.prototype}),e&&Object.assign(t.prototype,e)},sx=(t,n,e,r)=>{let m,d,g;const w={};if(n=n||{},t==null)return n;do{for(m=Object.getOwnPropertyNames(t),d=m.length;d-- >0;)g=m[d],(!r||r(g,t,n))&&!w[g]&&(n[g]=t[g],w[g]=!0);t=e!==!1&&Xs(t)}while(t&&(!e||e(t,n))&&t!==Object.prototype);return n},ax=(t,n,e)=>{t=String(t),(e===void 0||e>t.length)&&(e=t.length),e-=n.length;const r=t.indexOf(n,e);return r!==-1&&r===e},lx=t=>{if(!t)return null;if(bs(t))return t;let n=t.length;if(!Xf(n))return null;const e=new Array(n);for(;n-- >0;)e[n]=t[n];return e},cx=(t=>n=>t&&n instanceof t)(typeof Uint8Array<"u"&&Xs(Uint8Array)),ux=(t,n)=>{const e=(t&&t[za]).call(t);let r;for(;(r=e.next())&&!r.done;){const m=r.value;n.call(t,m[0],m[1])}},hx=(t,n)=>{let e;const r=[];for(;(e=t.exec(n))!==null;)r.push(e);return r},dx=oo("HTMLFormElement"),fx=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,e,r){return e.toUpperCase()+r}),{propertyIsEnumerable:px}=Object.prototype,gx=oo("RegExp"),rp=(t,n)=>{const e=Object.getOwnPropertyDescriptors(t),r={};Ba(e,(m,d)=>{let g;(g=n(m,d,t))!==!1&&(r[d]=g||m)}),Object.defineProperties(t,r)},mx=t=>{rp(t,(n,e)=>{if(ui(t)&&["arguments","caller","callee"].includes(e))return!1;const r=t[e];if(ui(r)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},vx=(t,n)=>{const e={},r=m=>{m.forEach(d=>{e[d]=!0})};return bs(t)?r(t):r(String(t).split(n)),e},yx=()=>{},bx=(t,n)=>t!=null&&Number.isFinite(t=+t)?t:n;function wx(t){return!!(t&&ui(t.append)&&t[Jf]==="FormData"&&t[za])}const xx=t=>{const n=new WeakSet,e=r=>{if(ta(r)){if(n.has(r))return;if(ea(r))return r;if(!("toJSON"in r)){n.add(r);const m=bs(r)?[]:{};return Ba(r,(d,g)=>{const w=e(d);!Qs(w)&&(m[g]=w)}),n.delete(r),m}}return r};return e(t)},Cx=oo("AsyncFunction"),_x=t=>t&&(ta(t)||ui(t))&&ui(t.then)&&ui(t.catch),ip=((t,n)=>t?setImmediate:n?((e,r)=>(ws.addEventListener("message",({source:m,data:d})=>{m===ws&&d===e&&r.length&&r.shift()()},!1),m=>{r.push(m),ws.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",ui(ws.postMessage)),Ax=typeof queueMicrotask<"u"?queueMicrotask.bind(ws):typeof process<"u"&&process.nextTick||ip,op=t=>t!=null&&ui(t[za]),kx=t=>t!=null&&Fa(t,za)&&op(t),ve={isArray:bs,isArrayBuffer:Zf,isBuffer:ea,isFormData:Jw,isArrayBufferView:zw,isString:Fw,isNumber:Xf,isBoolean:Bw,isObject:ta,isPlainObject:zl,isEmptyObject:Ww,isReadableStream:Xw,isRequest:Qw,isResponse:ex,isHeaders:tx,isUndefined:Qs,isDate:jw,isFile:Hw,isReactNativeBlob:Uw,isReactNative:Vw,isBlob:qw,isRegExp:gx,isFunction:ui,isStream:Kw,isURLSearchParams:Zw,isTypedArray:cx,isFileList:Gw,forEach:Ba,merge:bu,extend:rx,trim:nx,stripBOM:ix,inherits:ox,toFlatObject:sx,kindOf:yu,kindOfTest:oo,endsWith:ax,toArray:lx,forEachEntry:ux,matchAll:hx,isHTMLForm:dx,hasOwnProperty:Dl,hasOwnProp:Dl,hasOwnInPrototypeChain:Fa,getSafeProp:Pw,reduceDescriptors:rp,freezeMethods:mx,toObjectSet:vx,toCamelCase:fx,noop:yx,toFiniteNumber:bx,findKey:tp,global:ws,isContextDefined:np,isSpecCompliantForm:wx,toJSONObject:xx,isAsyncFn:Cx,isThenable:_x,setImmediate:ip,asap:Ax,isIterable:op,isSafeIterable:kx},Sx=ve.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"]),$x=t=>{const n={};let e,r,m;return t&&t.split(`
2
+ `).forEach(function(d){m=d.indexOf(":"),e=d.substring(0,m).trim().toLowerCase(),r=d.substring(m+1).trim(),!(!e||n[e]&&Sx[e])&&(e==="set-cookie"?n[e]?n[e].push(r):n[e]=[r]:n[e]=n[e]?n[e]+", "+r:r)}),n};function Tx(t){let n=0,e=t.length;for(;n<e;){const r=t.charCodeAt(n);if(r!==9&&r!==32)break;n+=1}for(;e>n;){const r=t.charCodeAt(e-1);if(r!==9&&r!==32)break;e-=1}return n===0&&e===t.length?t:t.slice(n,e)}const Rx=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Ex=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function wu(t,n){return ve.isArray(t)?t.map(e=>wu(e,n)):Tx(String(t).replace(n,""))}const Mx=t=>wu(t,Rx),Ix=t=>wu(t,Ex);function sp(t){const n=Object.create(null);return ve.forEach(t.toJSON(),(e,r)=>{n[r]=Ix(e)}),n}const ap=Symbol("internals");function Wa(t){return t&&String(t).trim().toLowerCase()}function Fl(t){return t===!1||t==null?t:ve.isArray(t)?t.map(Fl):Mx(String(t))}function Lx(t){const n=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=e.exec(t);)n[r[1]]=r[2];return n}const Ox=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function xu(t,n,e,r,m){if(ve.isFunction(r))return r.call(this,n,e);if(m&&(n=e),!!ve.isString(n)){if(ve.isString(r))return n.indexOf(r)!==-1;if(ve.isRegExp(r))return r.test(n)}}function Nx(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,e,r)=>e.toUpperCase()+r)}function Dx(t,n){const e=ve.toCamelCase(" "+n);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+e,{__proto__:null,value:function(m,d,g){return this[r].call(this,n,m,d,g)},configurable:!0})})}let zr=class{constructor(n){n&&this.set(n)}set(n,e,r){const m=this;function d(w,u,f){const a=Wa(u);if(!a)return;const s=ve.findKey(m,a);(!s||m[s]===void 0||f===!0||f===void 0&&m[s]!==!1)&&(m[s||u]=Fl(w))}const g=(w,u)=>ve.forEach(w,(f,a)=>d(f,a,u));if(ve.isPlainObject(n)||n instanceof this.constructor)g(n,e);else if(ve.isString(n)&&(n=n.trim())&&!Ox(n))g($x(n),e);else if(ve.isObject(n)&&ve.isSafeIterable(n)){let w=Object.create(null),u,f;for(const a of n){if(!ve.isArray(a))throw new TypeError("Object iterator must return a key-value pair");f=a[0],ve.hasOwnProp(w,f)?(u=w[f],w[f]=ve.isArray(u)?[...u,a[1]]:[u,a[1]]):w[f]=a[1]}g(w,e)}else n!=null&&d(e,n,r);return this}get(n,e){if(n=Wa(n),n){const r=ve.findKey(this,n);if(r){const m=this[r];if(!e)return m;if(e===!0)return Lx(m);if(ve.isFunction(e))return e.call(this,m,r);if(ve.isRegExp(e))return e.exec(m);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,e){if(n=Wa(n),n){const r=ve.findKey(this,n);return!!(r&&this[r]!==void 0&&(!e||xu(this,this[r],r,e)))}return!1}delete(n,e){const r=this;let m=!1;function d(g){if(g=Wa(g),g){const w=ve.findKey(r,g);w&&(!e||xu(r,r[w],w,e))&&(delete r[w],m=!0)}}return ve.isArray(n)?n.forEach(d):d(n),m}clear(n){const e=Object.keys(this);let r=e.length,m=!1;for(;r--;){const d=e[r];(!n||xu(this,this[d],d,n,!0))&&(delete this[d],m=!0)}return m}normalize(n){const e=this,r={};return ve.forEach(this,(m,d)=>{const g=ve.findKey(r,d);if(g){e[g]=Fl(m),delete e[d];return}const w=n?Nx(d):String(d).trim();w!==d&&delete e[d],e[w]=Fl(m),r[w]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const e=Object.create(null);return ve.forEach(this,(r,m)=>{r!=null&&r!==!1&&(e[m]=n&&ve.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,e])=>n+": "+e).join(`
3
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...e){const r=new this(n);return e.forEach(m=>r.set(m)),r}static accessor(n){const e=(this[ap]=this[ap]={accessors:{}}).accessors,r=this.prototype;function m(d){const g=Wa(d);e[g]||(Dx(r,d),e[g]=!0)}return ve.isArray(n)?n.forEach(m):m(n),this}};zr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ve.reduceDescriptors(zr.prototype,({value:t},n)=>{let e=n[0].toUpperCase()+n.slice(1);return{get:()=>t,set(r){this[e]=r}}}),ve.freezeMethods(zr);const Px="[REDACTED ****]";function zx(t){if(ve.hasOwnProp(t,"toJSON"))return!0;let n=Object.getPrototypeOf(t);for(;n&&n!==Object.prototype;){if(ve.hasOwnProp(n,"toJSON"))return!0;n=Object.getPrototypeOf(n)}return!1}function Fx(t,n){const e=new Set(n.map(d=>String(d).toLowerCase())),r=[],m=d=>{if(d===null||typeof d!="object"||ve.isBuffer(d))return d;if(r.indexOf(d)!==-1)return;d instanceof zr&&(d=d.toJSON()),r.push(d);let g;if(ve.isArray(d))g=[],d.forEach((w,u)=>{const f=m(w);ve.isUndefined(f)||(g[u]=f)});else{if(!ve.isPlainObject(d)&&zx(d))return r.pop(),d;g=Object.create(null);for(const[w,u]of Object.entries(d)){const f=e.has(w.toLowerCase())?Px:m(u);ve.isUndefined(f)||(g[w]=f)}}return r.pop(),g};return m(t)}let Xe=class gw extends Error{static from(n,e,r,m,d,g){const w=new gw(n.message,e||n.code,r,m,d);return Object.defineProperty(w,"cause",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),w.name=n.name,n.status!=null&&w.status==null&&(w.status=n.status),g&&Object.assign(w,g),w}constructor(n,e,r,m,d){super(n),Object.defineProperty(this,"message",{__proto__:null,value:n,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,e&&(this.code=e),r&&(this.config=r),m&&(this.request=m),d&&(this.response=d,this.status=d.status)}toJSON(){const n=this.config,e=n&&ve.hasOwnProp(n,"redact")?n.redact:void 0,r=ve.isArray(e)&&e.length>0?Fx(n,e):ve.toJSONObject(n);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:r,code:this.code,status:this.status}}};Xe.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Xe.ERR_BAD_OPTION="ERR_BAD_OPTION",Xe.ECONNABORTED="ECONNABORTED",Xe.ETIMEDOUT="ETIMEDOUT",Xe.ECONNREFUSED="ECONNREFUSED",Xe.ERR_NETWORK="ERR_NETWORK",Xe.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Xe.ERR_DEPRECATED="ERR_DEPRECATED",Xe.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Xe.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Xe.ERR_CANCELED="ERR_CANCELED",Xe.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Xe.ERR_INVALID_URL="ERR_INVALID_URL",Xe.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Bx=null,lp=100;function Cu(t){return ve.isPlainObject(t)||ve.isArray(t)}function cp(t){return ve.endsWith(t,"[]")?t.slice(0,-2):t}function _u(t,n,e){return t?t.concat(n).map(function(r,m){return r=cp(r),!e&&m?"["+r+"]":r}).join(e?".":""):n}function Wx(t){return ve.isArray(t)&&!t.some(Cu)}const jx=ve.toFlatObject(ve,{},null,function(t){return/^is[A-Z]/.test(t)});function Bl(t,n,e){if(!ve.isObject(t))throw new TypeError("target must be an object");n=n||new FormData,e=ve.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,x){return!ve.isUndefined(x[y])});const r=e.metaTokens,m=e.visitor||o,d=e.dots,g=e.indexes,w=e.Blob||typeof Blob<"u"&&Blob,u=e.maxDepth===void 0?lp:e.maxDepth,f=w&&ve.isSpecCompliantForm(n),a=[];if(!ve.isFunction(m))throw new TypeError("visitor must be a function");function s(y){if(y===null)return"";if(ve.isDate(y))return y.toISOString();if(ve.isBoolean(y))return y.toString();if(!f&&ve.isBlob(y))throw new Xe("Blob is not supported. Use a Buffer instead.");if(ve.isArrayBuffer(y)||ve.isTypedArray(y)){if(f&&typeof w=="function")return new w([y]);if(typeof Buffer<"u")return Buffer.from(y);throw new Xe("Blob is not supported. Use a Buffer instead.",Xe.ERR_NOT_SUPPORT)}return y}function c(y){if(y>u)throw new Xe("Object is too deeply nested ("+y+" levels). Max depth: "+u,Xe.ERR_FORM_DATA_DEPTH_EXCEEDED)}function h(y,x){if(u===1/0)return JSON.stringify(y);const E=[];return JSON.stringify(y,function($,_){if(!ve.isObject(_))return _;for(;E.length&&E[E.length-1]!==this;)E.pop();return E.push(_),c(x+E.length-1),_})}function o(y,x,E){let $=y;if(ve.isReactNative(n)&&ve.isReactNativeBlob(y))return n.append(_u(E,x,d),s(y)),!1;if(y&&!E&&typeof y=="object"){if(ve.endsWith(x,"{}"))x=r?x:x.slice(0,-2),y=h(y,1);else if(ve.isArray(y)&&Wx(y)||(ve.isFileList(y)||ve.endsWith(x,"[]"))&&($=ve.toArray(y)))return x=cp(x),$.forEach(function(_,C){!(ve.isUndefined(_)||_===null)&&n.append(g===!0?_u([x],C,d):g===null?x:x+"[]",s(_))}),!1}return Cu(y)?!0:(n.append(_u(E,x,d),s(y)),!1)}const l=Object.assign(jx,{defaultVisitor:o,convertValue:s,isVisitable:Cu});function p(y,x,E=0){if(!ve.isUndefined(y)){if(c(E),a.indexOf(y)!==-1)throw new Error("Circular reference detected in "+x.join("."));a.push(y),ve.forEach(y,function($,_){(!(ve.isUndefined($)||$===null)&&m.call(n,$,ve.isString(_)?_.trim():_,x,l))===!0&&p($,x?x.concat(_):[_],E+1)}),a.pop()}}if(!ve.isObject(t))throw new TypeError("data must be an object");return p(t),n}function up(t){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(e){return n[e]})}function Au(t,n){this._pairs=[],t&&Bl(t,this,n)}const hp=Au.prototype;hp.append=function(t,n){this._pairs.push([t,n])},hp.toString=function(t){const n=t?e=>t.call(this,e,up):up;return this._pairs.map(function(e){return n(e[0])+"="+n(e[1])},"").join("&")};function Hx(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function dp(t,n,e){if(!n)return t;t=t||"";const r=ve.isFunction(e)?{serialize:e}:e,m=ve.getSafeProp(r,"encode")||Hx,d=ve.getSafeProp(r,"serialize");let g;if(d?g=d(n,r):g=ve.isURLSearchParams(n)?n.toString():new Au(n,r).toString(m),g){const w=t.indexOf("#");w!==-1&&(t=t.slice(0,w)),t+=(t.indexOf("?")===-1?"?":"&")+g}return t}let fp=class{constructor(){this.handlers=[]}use(n,e,r){return this.handlers.push({fulfilled:n,rejected:e,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){ve.forEach(this.handlers,function(e){e!==null&&n(e)})}};const ku={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Ux=typeof URLSearchParams<"u"?URLSearchParams:Au,Vx=typeof FormData<"u"?FormData:null,qx=typeof Blob<"u"?Blob:null,Gx={isBrowser:!0,classes:{URLSearchParams:Ux,FormData:Vx,Blob:qx},protocols:["http","https","file","blob","url","data"]},Su=typeof window<"u"&&typeof document<"u",$u=typeof navigator=="object"&&navigator||void 0,Kx=Su&&(!$u||["ReactNative","NativeScript","NS"].indexOf($u.product)<0),Yx=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Jx=Su&&window.location.href||"http://localhost",Zx=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Su,hasStandardBrowserEnv:Kx,hasStandardBrowserWebWorkerEnv:Yx,navigator:$u,origin:Jx},Symbol.toStringTag,{value:"Module"})),kr={...Zx,...Gx};function Xx(t,n){return Bl(t,new kr.classes.URLSearchParams,{visitor:function(e,r,m,d){return kr.isNode&&ve.isBuffer(e)?(this.append(r,e.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)},...n})}const pp=lp;function gp(t){if(t>pp)throw new Xe("FormData field is too deeply nested ("+t+" levels). Max depth: "+pp,Xe.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Qx(t){const n=[],e=/\w+|\[(\w*)]/g;let r;for(;(r=e.exec(t))!==null;)gp(n.length),n.push(r[0]==="[]"?"":r[1]||r[0]);return n}function e1(t){const n={},e=Object.keys(t);let r;const m=e.length;let d;for(r=0;r<m;r++)d=e[r],n[d]=t[d];return n}function mp(t){function n(e,r,m,d){gp(d);let g=e[d++];if(g==="__proto__")return!0;const w=Number.isFinite(+g),u=d>=e.length;return g=!g&&ve.isArray(m)?m.length:g,u?(ve.hasOwnProp(m,g)?m[g]=ve.isArray(m[g])?m[g].concat(r):[m[g],r]:m[g]=r,!w):((!ve.hasOwnProp(m,g)||!ve.isObject(m[g]))&&(m[g]=[]),n(e,r,m[g],d)&&ve.isArray(m[g])&&(m[g]=e1(m[g])),!w)}if(ve.isFormData(t)&&ve.isFunction(t.entries)){const e={};return ve.forEachEntry(t,(r,m)=>{n(Qx(r),m,e,0)}),e}return null}const na=(t,n)=>t!=null&&ve.hasOwnProp(t,n)?t[n]:void 0;function t1(t,n,e){if(ve.isString(t))try{return(n||JSON.parse)(t),ve.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(t)}const ja={transitional:ku,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const e=n.getContentType()||"",r=e.indexOf("application/json")>-1,m=ve.isObject(t);if(m&&ve.isHTMLForm(t)&&(t=new FormData(t)),ve.isFormData(t))return r?JSON.stringify(mp(t)):t;if(ve.isArrayBuffer(t)||ve.isBuffer(t)||ve.isStream(t)||ve.isFile(t)||ve.isBlob(t)||ve.isReadableStream(t))return t;if(ve.isArrayBufferView(t))return t.buffer;if(ve.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let d;if(m){const g=na(this,"formSerializer");if(e.indexOf("application/x-www-form-urlencoded")>-1)return Xx(t,g).toString();if((d=ve.isFileList(t))||e.indexOf("multipart/form-data")>-1){const w=na(this,"env"),u=w&&w.FormData;return Bl(d?{"files[]":t}:t,u&&new u,g)}}return m||r?(n.setContentType("application/json",!1),t1(t)):t}],transformResponse:[function(t){const n=na(this,"transitional")||ja.transitional,e=n&&n.forcedJSONParsing,r=na(this,"responseType"),m=r==="json";if(ve.isResponse(t)||ve.isReadableStream(t))return t;if(t&&ve.isString(t)&&(e&&!r||m)){const d=!(n&&n.silentJSONParsing)&&m;try{return JSON.parse(t,na(this,"parseReviver"))}catch(g){if(d)throw g.name==="SyntaxError"?Xe.from(g,Xe.ERR_BAD_RESPONSE,this,null,na(this,"response")):g}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:kr.classes.FormData,Blob:kr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ve.forEach(["delete","get","head","post","put","patch","query"],t=>{ja.headers[t]={}});function Tu(t,n){const e=this||ja,r=n||e,m=zr.from(r.headers);let d=r.data;return ve.forEach(t,function(g){d=g.call(e,d,m.normalize(),n?n.status:void 0)}),m.normalize(),d}function vp(t){return!!(t&&t.__CANCEL__)}let Ha=class extends Xe{constructor(n,e,r){super(n??"canceled",Xe.ERR_CANCELED,e,r),this.name="CanceledError",this.__CANCEL__=!0}};function yp(t,n,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?t(e):n(new Xe("Request failed with status code "+e.status,e.status>=400&&e.status<500?Xe.ERR_BAD_REQUEST:Xe.ERR_BAD_RESPONSE,e.config,e.request,e))}function n1(t){const n=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return n&&n[1]||""}function r1(t,n){t=t||10;const e=new Array(t),r=new Array(t);let m=0,d=0,g;return n=n!==void 0?n:1e3,function(w){const u=Date.now(),f=r[d];g||(g=u),e[m]=w,r[m]=u;let a=d,s=0;for(;a!==m;)s+=e[a++],a=a%t;if(m=(m+1)%t,m===d&&(d=(d+1)%t),u-g<n)return;const c=f&&u-f;return c?Math.round(s*1e3/c):void 0}}function i1(t,n){let e=0,r=1e3/n,m,d;const g=(w,u=Date.now())=>{e=u,m=null,d&&(clearTimeout(d),d=null),t(...w)};return[(...w)=>{const u=Date.now(),f=u-e;f>=r?g(w,u):(m=w,d||(d=setTimeout(()=>{d=null,g(m)},r-f)))},()=>m&&g(m)]}const Wl=(t,n,e=3)=>{let r=0;const m=r1(50,250);return i1(d=>{if(!d||typeof d.loaded!="number")return;const g=d.loaded,w=d.lengthComputable?d.total:void 0,u=w!=null?Math.min(g,w):g,f=Math.max(0,u-r),a=m(f);r=Math.max(r,u);const s={loaded:u,total:w,progress:w?u/w:void 0,bytes:f,rate:a||void 0,estimated:a&&w?(w-u)/a:void 0,event:d,lengthComputable:w!=null,[n?"download":"upload"]:!0};t(s)},e)},bp=(t,n)=>{const e=t!=null;return[r=>n[0]({lengthComputable:e,total:t,loaded:r}),n[1]]},wp=t=>(...n)=>ve.asap(()=>t(...n)),o1=kr.hasStandardBrowserEnv?((t,n)=>e=>(e=new URL(e,kr.origin),t.protocol===e.protocol&&t.host===e.host&&(n||t.port===e.port)))(new URL(kr.origin),kr.navigator&&/(msie|trident)/i.test(kr.navigator.userAgent)):()=>!0,s1=kr.hasStandardBrowserEnv?{write(t,n,e,r,m,d,g){if(typeof document>"u")return;const w=[`${t}=${encodeURIComponent(n)}`];ve.isNumber(e)&&w.push(`expires=${new Date(e).toUTCString()}`),ve.isString(r)&&w.push(`path=${r}`),ve.isString(m)&&w.push(`domain=${m}`),d===!0&&w.push("secure"),ve.isString(g)&&w.push(`SameSite=${g}`),document.cookie=w.join("; ")},read(t){if(typeof document>"u")return null;const n=document.cookie.split(";");for(let e=0;e<n.length;e++){const r=n[e].replace(/^\s+/,""),m=r.indexOf("=");if(m!==-1&&r.slice(0,m)===t)try{return decodeURIComponent(r.slice(m+1))}catch{return r.slice(m+1)}}return null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function a1(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function l1(t,n){return n?t.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):t}const c1=/^https?:(?!\/\/)/i,u1=/[\t\n\r]/g;function h1(t){let n=0;for(;n<t.length&&t.charCodeAt(n)<=32;)n++;return t.slice(n)}function d1(t){return h1(t).replace(u1,"")}function xp(t,n){if(typeof t=="string"&&c1.test(d1(t)))throw new Xe('Invalid URL: missing "//" after protocol',Xe.ERR_INVALID_URL,n)}function Cp(t,n,e,r){xp(n,r);let m=!a1(n);return t&&(m||e===!1)?(xp(t,r),l1(t,n)):n}const _p=t=>t instanceof zr?{...t}:t;function xs(t,n){t=t||{},n=n||{};const e=Object.create(null);Object.defineProperty(e,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(a,s,c,h){return ve.isPlainObject(a)&&ve.isPlainObject(s)?ve.merge.call({caseless:h},a,s):ve.isPlainObject(s)?ve.merge({},s):ve.isArray(s)?s.slice():s}function m(a,s,c,h){if(ve.isUndefined(s)){if(!ve.isUndefined(a))return r(void 0,a,c,h)}else return r(a,s,c,h)}function d(a,s){if(!ve.isUndefined(s))return r(void 0,s)}function g(a,s){if(ve.isUndefined(s)){if(!ve.isUndefined(a))return r(void 0,a)}else return r(void 0,s)}function w(a){const s=ve.hasOwnProp(n,"transitional")?n.transitional:void 0;if(!ve.isUndefined(s))if(ve.isPlainObject(s)){if(ve.hasOwnProp(s,a))return s[a]}else return;const c=ve.hasOwnProp(t,"transitional")?t.transitional:void 0;if(ve.isPlainObject(c)&&ve.hasOwnProp(c,a))return c[a]}function u(a,s,c){if(ve.hasOwnProp(n,c))return r(a,s);if(ve.hasOwnProp(t,c))return r(void 0,a)}const f={url:d,method:d,data:d,baseURL:g,transformRequest:g,transformResponse:g,paramsSerializer:g,timeout:g,timeoutMessage:g,withCredentials:g,withXSRFToken:g,adapter:g,responseType:g,xsrfCookieName:g,xsrfHeaderName:g,onUploadProgress:g,onDownloadProgress:g,decompress:g,maxContentLength:g,maxBodyLength:g,beforeRedirect:g,transport:g,httpAgent:g,httpsAgent:g,cancelToken:g,socketPath:g,allowedSocketPaths:g,responseEncoding:g,validateStatus:u,headers:(a,s,c)=>m(_p(a),_p(s),c,!0)};return ve.forEach(Object.keys({...t,...n}),function(a){if(a==="__proto__"||a==="constructor"||a==="prototype")return;const s=ve.hasOwnProp(f,a)?f[a]:m,c=ve.hasOwnProp(t,a)?t[a]:void 0,h=ve.hasOwnProp(n,a)?n[a]:void 0,o=s(c,h,a);ve.isUndefined(o)&&s!==u||(e[a]=o)}),ve.hasOwnProp(n,"validateStatus")&&ve.isUndefined(n.validateStatus)&&w("validateStatusUndefinedResolves")===!1&&(ve.hasOwnProp(t,"validateStatus")?e.validateStatus=r(void 0,t.validateStatus):delete e.validateStatus),e}const f1=["content-type","content-length"];function p1(t,n,e){if(e!=="content-only"){t.set(n);return}Object.entries(n||{}).forEach(([r,m])=>{f1.includes(r.toLowerCase())&&t.set(r,m)})}const g1=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(n,e)=>String.fromCharCode(parseInt(e,16)));function Ap(t){const n=xs({},t),e=c=>ve.hasOwnProp(n,c)?n[c]:void 0,r=e("data");let m=e("withXSRFToken");const d=e("xsrfHeaderName"),g=e("xsrfCookieName");let w=e("headers");const u=e("auth"),f=e("baseURL"),a=e("allowAbsoluteUrls"),s=e("url");if(n.headers=w=zr.from(w),n.url=dp(Cp(f,s,a,n),e("params"),e("paramsSerializer")),u){const c=ve.getSafeProp(u,"username")||"",h=ve.getSafeProp(u,"password")||"";try{w.set("Authorization","Basic "+btoa(c+":"+(h?g1(h):"")))}catch(o){throw Xe.from(o,Xe.ERR_BAD_OPTION_VALUE,t)}}if(ve.isFormData(r)&&(kr.hasStandardBrowserEnv||kr.hasStandardBrowserWebWorkerEnv||ve.isReactNative(r)?w.setContentType(void 0):ve.isFunction(r.getHeaders)&&p1(w,r.getHeaders(),e("formDataHeaderPolicy"))),kr.hasStandardBrowserEnv&&(ve.isFunction(m)&&(m=m(n)),m===!0||m==null&&o1(n.url))){const c=d&&g&&s1.read(g);c&&w.set(d,c)}return n}const m1=typeof XMLHttpRequest<"u",v1=m1&&function(t){return new Promise(function(n,e){const r=Ap(t);let m=r.data;const d=zr.from(r.headers).normalize();let{responseType:g,onUploadProgress:w,onDownloadProgress:u}=r,f,a,s,c,h;function o(){c&&c(),h&&h(),r.cancelToken&&r.cancelToken.unsubscribe(f),r.signal&&r.signal.removeEventListener("abort",f)}let l=new XMLHttpRequest;l.open(r.method.toUpperCase(),r.url,!0),l.timeout=r.timeout;function p(){if(!l)return;const x=zr.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),E={data:!g||g==="text"||g==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:x,config:t,request:l};yp(function($){n($),o()},function($){e($),o()},E),l=null}"onloadend"in l?l.onloadend=p:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.startsWith("file:"))||setTimeout(p)},l.onabort=function(){l&&(e(new Xe("Request aborted",Xe.ECONNABORTED,t,l)),o(),l=null)},l.onerror=function(x){const E=x&&x.message?x.message:"Network Error",$=new Xe(E,Xe.ERR_NETWORK,t,l);$.event=x||null,e($),o(),l=null},l.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const E=r.transitional||ku;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),e(new Xe(x,E.clarifyTimeoutError?Xe.ETIMEDOUT:Xe.ECONNABORTED,t,l)),o(),l=null},m===void 0&&d.setContentType(null),"setRequestHeader"in l&&ve.forEach(sp(d),function(x,E){l.setRequestHeader(E,x)}),ve.isUndefined(r.withCredentials)||(l.withCredentials=!!r.withCredentials),g&&g!=="json"&&(l.responseType=r.responseType),u&&([s,h]=Wl(u,!0),l.addEventListener("progress",s)),w&&l.upload&&([a,c]=Wl(w),l.upload.addEventListener("progress",a),l.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(f=x=>{l&&(e(!x||x.type?new Ha(null,t,l):x),l.abort(),o(),l=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const y=n1(r.url);if(y&&!kr.protocols.includes(y)){e(new Xe("Unsupported protocol "+y+":",Xe.ERR_BAD_REQUEST,t)),o();return}l.send(m||null)})},y1=(t,n)=>{if(t=t?t.filter(Boolean):[],!n&&!t.length)return;const e=new AbortController;let r=!1;const m=function(u){if(!r){r=!0,g();const f=u instanceof Error?u:this.reason;e.abort(f instanceof Xe?f:new Ha(f instanceof Error?f.message:f))}};let d=n&&setTimeout(()=>{d=null,m(new Xe(`timeout of ${n}ms exceeded`,Xe.ETIMEDOUT))},n);const g=()=>{t&&(d&&clearTimeout(d),d=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(m):u.removeEventListener("abort",m)}),t=null)};t.forEach(u=>u.addEventListener("abort",m,{once:!0}));const{signal:w}=e;return w.unsubscribe=()=>ve.asap(g),w},b1=function*(t,n){let e=t.byteLength;if(e<n){yield t;return}let r=0,m;for(;r<e;)m=r+n,yield t.slice(r,m),r=m},w1=async function*(t,n){for await(const e of x1(t))yield*b1(e,n)},x1=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const n=t.getReader();try{for(;;){const{done:e,value:r}=await n.read();if(e)break;yield r}}finally{await n.cancel()}},kp=(t,n,e,r)=>{const m=w1(t,n);let d=0,g,w=u=>{g||(g=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:f,value:a}=await m.next();if(f){w(),u.close();return}let s=a.byteLength;if(e){let c=d+=s;e(c)}u.enqueue(new Uint8Array(a))}catch(f){throw w(f),f}},cancel(u){return w(u),m.return()}},{highWaterMark:2})},jl=t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102,C1=(t,n,e)=>n+2<e&&jl(t.charCodeAt(n+1))&&jl(t.charCodeAt(n+2));function _1(t){if(!t||typeof t!="string"||!t.startsWith("data:"))return 0;const n=t.indexOf(",");if(n<0)return 0;const e=t.slice(5,n),r=t.slice(n+1);if(/;base64/i.test(e)){let d=r.length;const g=r.length;for(let s=0;s<g;s++)if(r.charCodeAt(s)===37&&s+2<g){const c=r.charCodeAt(s+1),h=r.charCodeAt(s+2);jl(c)&&jl(h)&&(d-=2,s+=2)}let w=0,u=g-1;const f=s=>s>=2&&r.charCodeAt(s-2)===37&&r.charCodeAt(s-1)===51&&(r.charCodeAt(s)===68||r.charCodeAt(s)===100);u>=0&&(r.charCodeAt(u)===61?(w++,u--):f(u)&&(w++,u-=3)),w===1&&u>=0&&(r.charCodeAt(u)===61||f(u))&&w++;const a=Math.floor(d/4)*3-(w||0);return a>0?a:0}let m=0;for(let d=0,g=r.length;d<g;d++){const w=r.charCodeAt(d);if(w===37&&C1(r,d,g))m+=1,d+=2;else if(w<128)m+=1;else if(w<2048)m+=2;else if(w>=55296&&w<=56319&&d+1<g){const u=r.charCodeAt(d+1);u>=56320&&u<=57343?(m+=4,d++):m+=3}else m+=3}return m}const Ru="1.18.1",Sp=64*1024,{isFunction:Hl}=ve,A1=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(n,e)=>String.fromCharCode(parseInt(e,16))),$p=t=>{if(!ve.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},Tp=(t,...n)=>{try{return!!t(...n)}catch{return!1}},k1=t=>{const n=t.indexOf("://");let e=t;return n!==-1&&(e=e.slice(n+3)),e.includes("@")||e.includes(":")},S1=t=>{const n=ve.global!==void 0&&ve.global!==null?ve.global:globalThis,{ReadableStream:e,TextEncoder:r}=n;t=ve.merge.call({skipUndefined:!0},{Request:n.Request,Response:n.Response},t);const{fetch:m,Request:d,Response:g}=t,w=m?Hl(m):typeof fetch=="function",u=Hl(d),f=Hl(g);if(!w)return!1;const a=w&&Hl(e),s=w&&(typeof r=="function"?(y=>x=>y.encode(x))(new r):async y=>new Uint8Array(await new d(y).arrayBuffer())),c=u&&a&&Tp(()=>{let y=!1;const x=new d(kr.origin,{body:new e,method:"POST",get duplex(){return y=!0,"half"}}),E=x.headers.has("Content-Type");return x.body!=null&&x.body.cancel(),y&&!E}),h=f&&a&&Tp(()=>ve.isReadableStream(new g("").body)),o={stream:h&&(y=>y.body)};w&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!o[y]&&(o[y]=(x,E)=>{let $=x&&x[y];if($)return $.call(x);throw new Xe(`Response type '${y}' is not supported`,Xe.ERR_NOT_SUPPORT,E)})});const l=async y=>{if(y==null)return 0;if(ve.isBlob(y))return y.size;if(ve.isSpecCompliantForm(y))return(await new d(kr.origin,{method:"POST",body:y}).arrayBuffer()).byteLength;if(ve.isArrayBufferView(y)||ve.isArrayBuffer(y))return y.byteLength;if(ve.isURLSearchParams(y)&&(y=y+""),ve.isString(y))return(await s(y)).byteLength},p=async(y,x)=>ve.toFiniteNumber(y.getContentLength())??l(x);return async y=>{let{url:x,method:E,data:$,signal:_,cancelToken:C,timeout:L,onDownloadProgress:D,onUploadProgress:I,responseType:M,headers:W,withCredentials:z="same-origin",fetchOptions:O,maxContentLength:T,maxBodyLength:A}=Ap(y);const N=ve.isNumber(T)&&T>-1,B=ve.isNumber(A)&&A>-1,U=ie=>ve.hasOwnProp(y,ie)?y[ie]:void 0;let G=m||fetch;M=M?(M+"").toLowerCase():"text";let J=y1([_,C&&C.toAbortSignal()],L),Q=null;const le=J&&J.unsubscribe&&(()=>{J.unsubscribe()});let re,ce=null;const de=()=>new Xe("Request body larger than maxBodyLength limit",Xe.ERR_BAD_REQUEST,y,Q);try{let ie;const fe=U("auth");if(fe){const Me=ve.getSafeProp(fe,"username")||"",Tt=ve.getSafeProp(fe,"password")||"";ie={username:Me,password:Tt}}if(k1(x)){const Me=new URL(x,kr.origin);if(!ie&&(Me.username||Me.password)){const Tt=$p(Me.username),st=$p(Me.password);ie={username:Tt,password:st}}(Me.username||Me.password)&&(Me.username="",Me.password="",x=Me.href)}if(ie&&(W.delete("authorization"),W.set("Authorization","Basic "+btoa(A1((ie.username||"")+":"+(ie.password||""))))),N&&typeof x=="string"&&x.startsWith("data:")&&_1(x)>T)throw new Xe("maxContentLength size of "+T+" exceeded",Xe.ERR_BAD_RESPONSE,y,Q);if(B&&E!=="get"&&E!=="head"){const Me=await l($);if(typeof Me=="number"&&isFinite(Me)&&(re=Me,Me>A))throw de()}const $e=B&&(ve.isReadableStream($)||ve.isStream($)),Re=(Me,Tt,st)=>kp(Me,Sp,Xt=>{if(B&&Xt>A)throw ce=de();Tt&&Tt(Xt)},st);if(c&&E!=="get"&&E!=="head"&&(I||$e)){if(re=re??await p(W,$),re!==0||$e){let Me=new d(x,{method:"POST",body:$,duplex:"half"}),Tt;if(ve.isFormData($)&&(Tt=Me.headers.get("content-type"))&&W.setContentType(Tt),Me.body){const[st,Xt]=I&&bp(re,Wl(wp(I)))||[];$=Re(Me.body,st,Xt)}}}else if($e&&!u&&a&&E!=="get"&&E!=="head")$=Re($);else if($e&&u&&!c&&E!=="get"&&E!=="head")throw new Xe("Stream request bodies are not supported by the current fetch implementation",Xe.ERR_NOT_SUPPORT,y,Q);ve.isString(z)||(z=z?"include":"omit");const Ee=u&&"credentials"in d.prototype;if(ve.isFormData($)){const Me=W.getContentType();Me&&/^multipart\/form-data/i.test(Me)&&!/boundary=/i.test(Me)&&W.delete("content-type")}W.set("User-Agent","axios/"+Ru,!1);const Ue={...O,signal:J,method:E.toUpperCase(),headers:sp(W.normalize()),body:$,duplex:"half",credentials:Ee?z:void 0};Q=u&&new d(x,Ue);let He=await(u?G(Q,O):G(x,Ue));const Ge=zr.from(He.headers);if(N){const Me=ve.toFiniteNumber(Ge.getContentLength());if(Me!=null&&Me>T)throw new Xe("maxContentLength size of "+T+" exceeded",Xe.ERR_BAD_RESPONSE,y,Q)}const at=h&&(M==="stream"||M==="response");if(h&&He.body&&(D||N||at&&le)){const Me={};["status","statusText","headers"].forEach(zt=>{Me[zt]=He[zt]});const Tt=ve.toFiniteNumber(Ge.getContentLength()),[st,Xt]=D&&bp(Tt,Wl(wp(D),!0))||[];let dn=0;const Zn=zt=>{if(N&&(dn=zt,dn>T))throw new Xe("maxContentLength size of "+T+" exceeded",Xe.ERR_BAD_RESPONSE,y,Q);st&&st(zt)};He=new g(kp(He.body,Sp,Zn,()=>{Xt&&Xt(),le&&le()}),Me)}M=M||"text";let We=await o[ve.findKey(o,M)||"text"](He,y);if(N&&!h&&!at){let Me;if(We!=null&&(typeof We.byteLength=="number"?Me=We.byteLength:typeof We.size=="number"?Me=We.size:typeof We=="string"&&(Me=typeof r=="function"?new r().encode(We).byteLength:We.length)),typeof Me=="number"&&Me>T)throw new Xe("maxContentLength size of "+T+" exceeded",Xe.ERR_BAD_RESPONSE,y,Q)}return!at&&le&&le(),await new Promise((Me,Tt)=>{yp(Me,Tt,{data:We,headers:zr.from(He.headers),status:He.status,statusText:He.statusText,config:y,request:Q})})}catch(ie){if(le&&le(),J&&J.aborted&&J.reason instanceof Xe){const fe=J.reason;throw fe.config=y,Q&&(fe.request=Q),ie!==fe&&Object.defineProperty(fe,"cause",{__proto__:null,value:ie,writable:!0,enumerable:!1,configurable:!0}),fe}if(ce)throw Q&&!ce.request&&(ce.request=Q),ce;if(ie instanceof Xe)throw Q&&!ie.request&&(ie.request=Q),ie;if(ie&&ie.name==="TypeError"&&/Load failed|fetch/i.test(ie.message)){const fe=new Xe("Network Error",Xe.ERR_NETWORK,y,Q,ie&&ie.response);throw Object.defineProperty(fe,"cause",{__proto__:null,value:ie.cause||ie,writable:!0,enumerable:!1,configurable:!0}),fe}throw Xe.from(ie,ie&&ie.code,y,Q,ie&&ie.response)}}},$1=new Map,Rp=t=>{let n=t&&t.env||{};const{fetch:e,Request:r,Response:m}=n,d=[r,m,e];let g=d.length,w=g,u,f,a=$1;for(;w--;)u=d[w],f=a.get(u),f===void 0&&a.set(u,f=w?new Map:S1(n)),a=f;return f};Rp();const Eu={http:Bx,xhr:v1,fetch:{get:Rp}};ve.forEach(Eu,(t,n)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:n})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:n})}});const Ep=t=>`- ${t}`,T1=t=>ve.isFunction(t)||t===null||t===!1;function R1(t,n){t=ve.isArray(t)?t:[t];const{length:e}=t;let r,m;const d={};for(let g=0;g<e;g++){r=t[g];let w;if(m=r,!T1(r)&&(m=Eu[(w=String(r)).toLowerCase()],m===void 0))throw new Xe(`Unknown adapter '${w}'`);if(m&&(ve.isFunction(m)||(m=m.get(n))))break;d[w||"#"+g]=m}if(!m){const g=Object.entries(d).map(([u,f])=>`adapter ${u} `+(f===!1?"is not supported by the environment":"is not available in the build"));let w=e?g.length>1?`since :
4
+ `+g.map(Ep).join(`
5
+ `):" "+Ep(g[0]):"as no adapter specified";throw new Xe("There is no suitable adapter to dispatch the request "+w,Xe.ERR_NOT_SUPPORT)}return m}const Mp={getAdapter:R1,adapters:Eu};function Mu(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Ha(null,t)}function Ip(t){return Mu(t),t.headers=zr.from(t.headers),t.data=Tu.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Mp.getAdapter(t.adapter||ja.adapter,t)(t).then(function(n){Mu(t),t.response=n;try{n.data=Tu.call(t,t.transformResponse,n)}finally{delete t.response}return n.headers=zr.from(n.headers),n},function(n){if(!vp(n)&&(Mu(t),n&&n.response)){t.response=n.response;try{n.response.data=Tu.call(t,t.transformResponse,n.response)}finally{delete t.response}n.response.headers=zr.from(n.response.headers)}return Promise.reject(n)})}const Ul={};["object","boolean","number","function","string","symbol"].forEach((t,n)=>{Ul[t]=function(e){return typeof e===t||"a"+(n<1?"n ":" ")+t}});const Lp={};Ul.transitional=function(t,n,e){function r(m,d){return"[Axios v"+Ru+"] Transitional option '"+m+"'"+d+(e?". "+e:"")}return(m,d,g)=>{if(t===!1)throw new Xe(r(d," has been removed"+(n?" in "+n:"")),Xe.ERR_DEPRECATED);return n&&!Lp[d]&&(Lp[d]=!0,console.warn(r(d," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(m,d,g):!0}},Ul.spelling=function(t){return(n,e)=>(console.warn(`${e} is likely a misspelling of ${t}`),!0)};function E1(t,n,e){if(typeof t!="object"||t===null)throw new Xe("options must be an object",Xe.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let m=r.length;for(;m-- >0;){const d=r[m],g=Object.prototype.hasOwnProperty.call(n,d)?n[d]:void 0;if(g){const w=t[d],u=w===void 0||g(w,d,t);if(u!==!0)throw new Xe("option "+d+" must be "+u,Xe.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new Xe("Unknown option "+d,Xe.ERR_BAD_OPTION)}}const Vl={assertOptions:E1,validators:Ul},Fr=Vl.validators;let Cs=class{constructor(n){this.defaults=n||{},this.interceptors={request:new fp,response:new fp}}async request(n,e){try{return await this._request(n,e)}catch(r){if(r instanceof Error){let m={};Error.captureStackTrace?Error.captureStackTrace(m):m=new Error;const d=(()=>{if(!m.stack)return"";const g=m.stack.indexOf(`
6
+ `);return g===-1?"":m.stack.slice(g+1)})();try{if(!r.stack)r.stack=d;else if(d){const g=d.indexOf(`
7
+ `),w=g===-1?-1:d.indexOf(`
8
+ `,g+1),u=w===-1?"":d.slice(w+1);String(r.stack).endsWith(u)||(r.stack+=`
9
+ `+d)}}catch{}}throw r}}_request(n,e){typeof n=="string"?(e=e||{},e.url=n):e=n||{},e=xs(this.defaults,e);const{transitional:r,paramsSerializer:m,headers:d}=e;r!==void 0&&Vl.assertOptions(r,{silentJSONParsing:Fr.transitional(Fr.boolean),forcedJSONParsing:Fr.transitional(Fr.boolean),clarifyTimeoutError:Fr.transitional(Fr.boolean),legacyInterceptorReqResOrdering:Fr.transitional(Fr.boolean),advertiseZstdAcceptEncoding:Fr.transitional(Fr.boolean),validateStatusUndefinedResolves:Fr.transitional(Fr.boolean)},!1),m!=null&&(ve.isFunction(m)?e.paramsSerializer={serialize:m}:Vl.assertOptions(m,{encode:Fr.function,serialize:Fr.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Vl.assertOptions(e,{baseUrl:Fr.spelling("baseURL"),withXsrfToken:Fr.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let g=d&&ve.merge(d.common,d[e.method]);d&&ve.forEach(["delete","get","head","post","put","patch","query","common"],o=>{delete d[o]}),e.headers=zr.concat(g,d);const w=[];let u=!0;this.interceptors.request.forEach(function(o){if(typeof o.runWhen=="function"&&o.runWhen(e)===!1)return;u=u&&o.synchronous;const l=e.transitional||ku;l&&l.legacyInterceptorReqResOrdering?w.unshift(o.fulfilled,o.rejected):w.push(o.fulfilled,o.rejected)});const f=[];this.interceptors.response.forEach(function(o){f.push(o.fulfilled,o.rejected)});let a,s=0,c;if(!u){const o=[Ip.bind(this),void 0];for(o.unshift(...w),o.push(...f),c=o.length,a=Promise.resolve(e);s<c;)a=a.then(o[s++],o[s++]);return a}c=w.length;let h=e;for(;s<c;){const o=w[s++],l=w[s++];try{h=o(h)}catch(p){l.call(this,p);break}}try{a=Ip.call(this,h)}catch(o){return Promise.reject(o)}for(s=0,c=f.length;s<c;)a=a.then(f[s++],f[s++]);return a}getUri(n){n=xs(this.defaults,n);const e=Cp(n.baseURL,n.url,n.allowAbsoluteUrls,n);return dp(e,n.params,n.paramsSerializer)}};ve.forEach(["delete","get","head","options"],function(t){Cs.prototype[t]=function(n,e){return this.request(xs(e||{},{method:t,url:n,data:e&&ve.hasOwnProp(e,"data")?e.data:void 0}))}}),ve.forEach(["post","put","patch","query"],function(t){function n(e){return function(r,m,d){return this.request(xs(d||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:m}))}}Cs.prototype[t]=n(),t!=="query"&&(Cs.prototype[t+"Form"]=n(!0))});let M1=class mw{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(m){e=m});const r=this;this.promise.then(m=>{if(!r._listeners)return;let d=r._listeners.length;for(;d-- >0;)r._listeners[d](m);r._listeners=null}),this.promise.then=m=>{let d;const g=new Promise(w=>{r.subscribe(w),d=w}).then(m);return g.cancel=function(){r.unsubscribe(d)},g},n(function(m,d,g){r.reason||(r.reason=new Ha(m,d,g),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const e=this._listeners.indexOf(n);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const n=new AbortController,e=r=>{n.abort(r)};return this.subscribe(e),n.signal.unsubscribe=()=>this.unsubscribe(e),n.signal}static source(){let n;return{token:new mw(function(e){n=e}),cancel:n}}};function I1(t){return function(n){return t.apply(null,n)}}function L1(t){return ve.isObject(t)&&t.isAxiosError===!0}const Iu={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Iu).forEach(([t,n])=>{Iu[n]=t});function Op(t){const n=new Cs(t),e=Yf(Cs.prototype.request,n);return ve.extend(e,Cs.prototype,n,{allOwnKeys:!0}),ve.extend(e,n,null,{allOwnKeys:!0}),e.create=function(r){return Op(xs(t,r))},e}const Jn=Op(ja);Jn.Axios=Cs,Jn.CanceledError=Ha,Jn.CancelToken=M1,Jn.isCancel=vp,Jn.VERSION=Ru,Jn.toFormData=Bl,Jn.AxiosError=Xe,Jn.Cancel=Jn.CanceledError,Jn.all=function(t){return Promise.all(t)},Jn.spread=I1,Jn.isAxiosError=L1,Jn.mergeConfig=xs,Jn.AxiosHeaders=zr,Jn.formToJSON=t=>mp(ve.isHTMLForm(t)?new FormData(t):t),Jn.getAdapter=Mp.getAdapter,Jn.HttpStatusCode=Iu,Jn.default=Jn;const{Axios:yD,AxiosError:bD,CanceledError:wD,isCancel:xD,CancelToken:CD,VERSION:_D,all:AD,Cancel:kD,isAxiosError:SD,spread:$D,toFormData:TD,AxiosHeaders:RD,HttpStatusCode:ED,formToJSON:MD,getAdapter:ID,mergeConfig:LD,create:OD}=Jn,Lu=Jn.create({baseURL:location.origin,timeout:6e4,params:{}});Lu.interceptors.response.use(t=>t,t=>{if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(r){r&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let n=`HTTP ${t.response.status} - `;t.response?.statusText&&(n+=`${t.response.statusText} `),t.response?.config?.data&&(n+=`${t.response.config.data} `),t.response?.data?.message?n+=`${t.response.data.message}`:t.response?.data?.exception?n+=`${t.response.data.exception}`:t.response?.data?.error?.message?(t.response.data.error.class&&(n+=`${t.response.data.error.class} `),n+=`${t.response.data.error.message}`):n+=`${t.response?.data}`;const{$cosmosNotify:e}=window;throw e&&e.serious({title:"Network error",body:n}),t}else throw t});const ql=async function(t,n,{data:e,params:r={},headers:m,noAuth:d=!1,noScope:g=!1,onUploadProgress:w=!1}={}){if(!d){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}m.Authorization=localStorage.openc3Token}return m.manual=!0,!g&&!r.scope&&(r.scope=window.openc3Scope),Lu({method:t,url:n,data:e,params:r,headers:m,onUploadProgress:w})},Ou={Accept:"application/json"},Np={...Ou,"Content-Type":"application/json"},ND=Hn("D",{get:function(t,{params:n,headers:e=Ou,noScope:r,noAuth:m,onUploadProgress:d}={}){return ql("get",t,{params:n,headers:e,noScope:r,noAuth:m,onUploadProgress:d})},put:function(t,{data:n,params:e,headers:r=Np,noScope:m,noAuth:d,onUploadProgress:g}={}){return ql("put",t,{data:n,params:e,headers:r,noScope:m,noAuth:d,onUploadProgress:g})},post:function(t,{data:n,params:e,headers:r=Np,noScope:m,noAuth:d,onUploadProgress:g}={}){return ql("post",t,{data:n,params:e,headers:r,noScope:m,noAuth:d,onUploadProgress:g})},delete:function(t,{params:n,headers:e=Ou,noScope:r,noAuth:m,onUploadProgress:d}={}){return ql("delete",t,{params:n,headers:e,noScope:r,noAuth:m,onUploadProgress:d})}});let Gl=()=>({emit(t,...n){for(let e=this.events[t]||[],r=0,m=e.length;r<m;r++)e[r](...n)},events:{},on(t,n){return(this.events[t]||=[]).push(n),()=>{this.events[t]=this.events[t]?.filter(e=>n!==e)}}}),Ua=class extends Error{constructor(n,e){n instanceof Error?(super(n.message),this.cause=n):super(n),this.reason=e,this.name="ReasonError"}},Nu=class extends Ua{constructor(n){super("Rejected",n),this.name="SubscriptionRejectedError"}};class O1 extends Ua{constructor(n){super(n||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}let so=class extends Ua{constructor(n,e){e?super(n,e):super("Disconnected",n),this.name="DisconnectedError"}};class N1 extends so{constructor(n){super(n,"stale_connection"),this.name="StaleConnectionError"}}function Dp(t){return t?`{${Object.keys(t).sort().filter(n=>t[n]!==void 0).map(n=>{let e=JSON.stringify(t[n]);return`${JSON.stringify(n)}:${e}`}).join(",")}}`:""}class D1{constructor(n){this.channel=n,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",n=>{if(n.type==="info"){this._state||(this._state=this.stateFromInfo(n));return}this._state&&(n.type==="join"?this._state[n.id]=n.info:n.type==="leave"&&delete this._state[n.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(n=>n()),this.listeners.length=0}async join(n,e){if(!this._info)return this._info={id:String(n),info:e},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let n=await this.channel.perform("$presence:leave");return delete this._info,n}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let n=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(n),this._state}finally{delete this._promise}}stateFromInfo(n){return n.records.reduce((e,{id:r,info:m})=>(e[r]=m,e),{})}}const _s=Symbol("state");let Pp=class{constructor(n={}){this.emitter=Gl(),this.params=Object.freeze(n),this.presence=new D1(this),this.initialConnect=!0,this[_s]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Dp({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[_s]}attached(n){if(this.receiver){if(this.receiver!==n)throw Error("Already connected to a different receiver");return!1}return this.receiver=n,!0}connecting(){this[_s]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[_s]="connected";let n=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:n})):this.emit("connect",{reconnect:!0,restored:n})}restored(){if(this.state==="connected")throw Error("Already connected");this[_s]="connected";let n=!0,e=!0;this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:n})}disconnected(n){this.state==="disconnected"||this.state==="closed"||(this[_s]="disconnected",this.presence.reset(),this.emit("disconnect",n))}closed(n){this.state!=="closed"&&(this[_s]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",n))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(n,e){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,n,e)}async send(n){return this.perform(void 0,n)}async whisper(n){try{await this.perform("$whisper",n)}catch(e){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",e)}}receive(n,e){this.emit("message",n,e)}on(n,e){return this.emitter.on(n,e)}once(n,e){let r=this.emitter.on(n,(...m)=>{r(),e(...m)});return r}emit(n,...e){return this.emitter.emit(n,...e)}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((n,e)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(m=>m()),n()})),r.push(this.on("close",m=>{r.forEach(d=>d()),e(m||new Ua("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}};class P1{constructor(n){this.id=n,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(n){this.channels.includes(n)||this.channels.push(n)}remove(n){let e=this.channels.indexOf(n);e>-1&&this.channels.splice(e,1)}notify(n,...e){this.state=n==="restored"?"connected":n,e.length===1?this.channels.forEach(r=>r[n](e[0])):this.channels.forEach(r=>r[n]())}pending(n){this._checkIntent(n);let e=this._pendings[0];return!e||e.intent!==n?Promise.resolve():e.promise}ensureResubscribed(){this.disposed||(this.intent=void 0,this.ensureSubscribed())}ensureSubscribed(){if(this.intent!=="subscribed"){if(this.disposed)throw Error("Subscription is disposed");this.intent="subscribed",!this._mergeWithPending("unsubscribed")&&this.subscriber(this)}}maybeUnsubscribe(){this.disposed||this.intent==="unsubscribed"||this.channels.length>0||(this.intent="unsubscribed",this._mergeWithPending("subscribed"))||this.unsubscriber(this)}async acquire(n){this._checkIntent(n);let e,r={promise:new Promise(d=>{e=d}),intent:n,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),e(r)},canceled:!1,acquired:!1},m=this._pendingTop;return this._pendings.push(r),m&&await m.promise,this.gvl&&await this.gvl.acquire(r,n),r.acquired=!0,r}close(n){this.disposed=!0,this.intent=void 0,this.notify("closed",n)}_checkIntent(n){if(!(n==="unsubscribed"||n==="subscribed"))throw Error(`Unknown subscription intent: ${n}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(n){let e=this._pendingTop;return!e||e.acquired||e.intent!==n?!1:(this._pendings.pop(),e.canceled=!0,!0)}}let z1=class{constructor(){this.queue=[]}async acquire(n,e){e==="subscribed"&&(this.queue.push(n.promise.then(()=>{this.queue.splice(this.queue.indexOf(n),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}};class F1{constructor(n){n.concurrentSubscribes===!1&&(this.glv=new z1),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(n){return this._subscriptions[n]}create(n,{subscribe:e,unsubscribe:r}){let m=this._subscriptions[n]=new P1(n);return m.remoteId=this._localToRemote[n],m.subscriber=e,m.unsubscriber=r,m.gvl=this.glv,m}remove(n){delete this._subscriptions[n],delete this._localToRemote[n]}storeRemoteId(n,e){this._localToRemote[n]=e;let r=this.get(n);r&&(r.remoteId=e)}}class B1{constructor(n={}){this.subscriptions=new F1(n),this._pendingMessages=[],this._remoteToLocal={}}subscribe(n,e){this._remoteToLocal[e]=n,this.subscriptions.storeRemoteId(n,e),this.flush(e)}unsubscribe(n){let e=this.subscriptions.get(n);if(!e)return;let r=e.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(n)}transmit(n,e,r){let m=this._remoteToLocal[n];if(!m){this._pendingMessages.push([n,e,r]);return}let d=this.subscriptions.get(m);d&&d.channels.forEach(g=>{g.receive(e,r)})}notify(n,e,r){let m=this._remoteToLocal[n];if(!m)return;let d=this.subscriptions.get(m);d&&d.channels.forEach(g=>g.emit(e,r))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(n=>n.channels)}flush(n){let e=[];for(let r of this._pendingMessages)r[0]===n?this.transmit(r[0],r[1],r[2]):e.push(r);this._pendingMessages=e}}const zp={debug:0,info:1,warn:2,error:3};let Fp=class{constructor(n){this.level=n||"warn"}log(n,e,r){zp[n]<zp[this.level]||this.writeLogEntry(n,e,r)}writeLogEntry(){throw Error("Not implemented")}debug(n,e){this.log("debug",n,e)}info(n,e){this.log("info",n,e)}warn(n,e){this.log("warn",n,e)}error(n,e){this.log("error",n,e)}},Va=class extends Fp{writeLogEntry(){}};class W1{encode(n){return JSON.stringify(n)}decode(n){try{return JSON.parse(n)}catch{}}}let j1=0,Bp=class{constructor(n={}){let{logger:e}=n;this.logger=e||new Va,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=n.subscribeCooldownInterval||250,this.subscribeRetryInterval=n.subscribeRetryInterval||5e3}attached(n){this.cable=n}subscribe(n,e){let r={channel:n};e&&Object.assign(r,e);let m=Dp(r);if(this.pendingUnsubscriptions[m]){let g=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${g}`,m),new Promise(w=>{setTimeout(()=>{w(this.subscribe(n,e))},g)})}if(this.pendingSubscriptions[m])return this.logger.warn("subscription is already pending, skipping",m),Promise.reject(Error("Already subscribing"));let d=this.subscribeRetryInterval;return new Promise((g,w)=>{let u=++j1;this.pendingSubscriptions[m]={resolve:g,reject:w,id:u},this.cable.send(this.buildSubscribeRequest(m)),this.maybeRetrySubscribe(u,m,d)})}buildSubscribeRequest(n){return{command:"subscribe",identifier:n}}maybeRetrySubscribe(n,e,r){setTimeout(()=>{let m=this.pendingSubscriptions[e];m&&m.id===n&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,e),this.cable.send(this.buildSubscribeRequest(e)),this.maybeExpireSubscribe(n,e,r))},r)}maybeExpireSubscribe(n,e,r){setTimeout(()=>{let m=this.pendingSubscriptions[e];m&&m.id===n&&(delete this.pendingSubscriptions[e],m.reject(new O1(`Haven't received subscription ack in ${r*2}ms for ${e}`)))},r)}unsubscribe(n){return this.cable.send({command:"unsubscribe",identifier:n}),this.pendingUnsubscriptions[n]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[n]},this.subscribeCooldownInterval),Promise.resolve()}perform(n,e,r){return e==="$whisper"?this.whisper(n,r):(r||(r={}),r.action||=e,this.cable.send({command:"message",identifier:n,data:JSON.stringify(r)}),Promise.resolve())}whisper(n,e){return this.cable.send({command:"whisper",identifier:n,data:e}),Promise.resolve()}receive(n){if(typeof n!="object"){this.logger.error("unsupported message format",{message:n});return}let{type:e,identifier:r,message:m,reason:d,reconnect:g}=n;if(e==="ping")return this.cable.keepalive(n.message);if(this.cable.keepalive(),e==="welcome"){let w=n.sid;return w&&this.cable.setSessionId(w),this.cable.connected()}if(e==="disconnect"){let w=new so(d);this.reset(w),g===!1?this.cable.closed(w):this.cable.disconnected(w);return}if(e==="confirm_subscription"){let w=this.pendingSubscriptions[r];if(!w){this.logger.error("subscription not found, unsubscribing",{type:e,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],w.resolve(r)}if(e==="reject_subscription"){let w=this.pendingSubscriptions[r];return w?(delete this.pendingSubscriptions[r],w.reject(new Nu)):this.logger.error("subscription not found",{type:e,identifier:r})}if(m)return{identifier:r,message:m};this.logger.warn(`unknown message type: ${e}`,{message:n})}reset(n){for(let e in this.pendingSubscriptions)this.pendingSubscriptions[e].reject(n);this.pendingSubscriptions={}}recoverableClosure(){return!1}};const Wp=()=>Date.now()/1e3|0;class H1 extends Bp{constructor(n={}){super(n),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=n.historyTimestamp,this.disableSessionRecovery=n.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=Wp()),this.sessionId=void 0,this.sendPongs=n.pongs}reset(n){for(let e in this.pendingPresence)this.pendingPresence[e].reject(n);return this.pendingPresence={},super.reset()}receive(n){if(typeof n!="object"){this.logger.error("unsupported message format",{message:n});return}let{type:e,identifier:r,message:m}=n;if(e==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(n);if(e==="reject_subscription")return super.receive(n);if(e==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(n);if(e==="ping")return this.restoreSince&&(this.restoreSince=Wp()),this.sendPongs&&this.sendPong(),this.cable.keepalive(n.message);if(this.cable.keepalive(),e==="confirm_history"){this.logger.debug("history result received",n),this.cable.notify("history_received",r);return}if(e==="reject_history"){this.logger.warn("failed to retrieve history",n),this.cable.notify("history_not_found",r);return}if(e==="welcome"){if(this.disableSessionRecovery||(this.sessionId=n.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),n.restored){let d=n.restored_ids||Object.keys(this.subscriptionStreams);for(let g of d)this.cable.send({identifier:g,command:"history",history:this.historyRequestFor(g)}),this.presenceInfo[g]&&this.cable.send({identifier:g,command:"join",presence:this.presenceInfo[g]});return this.cable.restored(d)}return this.cable.connected(this.sessionId)}if(e==="presence"){let d=m.type;if(d==="info"){let g=this.pendingPresence[r];g&&(delete this.pendingPresence[r],g.resolve(m))}else if(d==="error"){let g=this.pendingPresence[r];g&&(delete this.pendingPresence[r],g.reject(new Error("failed to retrieve presence")))}return{type:e,identifier:r,message:m}}if(m){let d=this.trackStreamPosition(r,n.stream_id,n.epoch,n.offset);return{identifier:r,message:m,meta:d}}this.logger.warn(`unknown message type: ${e}`,{message:n})}perform(n,e,r){switch(e){case"$presence:join":return this.join(n,r);case"$presence:leave":return this.leave(n,r);case"$presence:info":return this.presence(n,r)}return super.perform(n,e,r)}unsubscribe(n){return delete this.presenceInfo[n],super.unsubscribe(n)}buildSubscribeRequest(n){let e=super.buildSubscribeRequest(n),r=this.historyRequestFor(n);r&&(e.history=r,this.pendingHistory[n]=!0);let m=this.presenceInfo[n];return m&&(e.presence=m),e}recoverableClosure(){return!!this.sessionId}historyRequestFor(n){let e={},r=!1;if(this.subscriptionStreams[n])for(let m of this.subscriptionStreams[n]){let d=this.streamsPositions[m];d&&(r=!0,e[m]=d)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:e}}trackStreamPosition(n,e,r,m){if(!(!e||!r))return this.subscriptionStreams[n]||(this.subscriptionStreams[n]=new Set),this.subscriptionStreams[n].add(e),this.streamsPositions[e]={epoch:r,offset:m},{stream:e,epoch:r,offset:m}}async sendPong(){await new Promise(n=>setTimeout(n,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(n,e){return this.presenceInfo[n]=e,this.cable.send({command:"join",identifier:n,presence:e}),Promise.resolve()}async leave(n,e){return delete this.presenceInfo[n],this.cable.send({command:"leave",identifier:n,presence:e}),Promise.resolve()}presence(n,e){return this.pendingPresence[n]?(this.logger.warn("presence is already pending, skipping",n),Promise.reject(Error("presence request is already pending"))):new Promise((r,m)=>{this.pendingPresence[n]={resolve:r,reject:m},this.cable.send({command:"presence",identifier:n,data:e})})}}class U1 extends Ua{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}let jp=class extends Pp{static identifier="__ghost__";constructor(n,e){super(e),this.channelId=n}set channelId(n){this._channelId=n}get channelId(){return this._channelId}};const V1="$pubsub";let Hp=class extends Pp{static identifier=V1;async perform(n,e){if(n.startsWith("$"))return super.perform(n,e);throw Error("not implemented")}};const As=Symbol("state");let q1=class{constructor({transport:t,protocol:n,encoder:e,logger:r,lazy:m,hubOptions:d,performFailures:g,transportConfigurator:w}){this.emitter=Gl(),this.transport=t,this.encoder=e,this.logger=r||new Va,this.protocol=n,this.performFailures=g||"throw",this.protocol.attached(this),this.hub=new B1(d||{}),this[As]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=w,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,m===!1&&this.connect().catch(()=>{})}get state(){return this[As]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let t=this.state==="idle";this[As]="connecting";let n=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:t}),await this.transport.open()}catch(e){this.handleClose(e)}return n}setSessionId(t){this.sessionId=t,this.transport.setParam("sid",t)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[As]="connected",this.recovering&&this.hub.subscriptions.all().forEach(n=>n.notify("disconnected",new so("recovery_failed"))),this.hub.subscriptions.all().forEach(n=>this._resubscribe(n));let t=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:t})):this.emit("connect",{reconnect:!0,restored:t})}restored(t){this.logger.info("connection recovered",{remoteIds:t}),this[As]="connected",this.hub.subscriptions.all().forEach(r=>{t&&r.remoteId&&t.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new so("recovery_failed")),this._resubscribe(r))});let n=!this.initialConnect,e=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:n,restored:e})}notify(t,n,e){n&&typeof n!="string"&&(e=n,n=void 0),n?this.hub.notify(n,"info",{type:t,data:e}):this.emit("info",{type:t,data:e})}handleClose(t){this.logger.debug("transport closed",{error:t}),this.disconnected(new so(t,"transport_closed"))}disconnected(t){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:t}),this[As]="disconnected",this.recovering=this.protocol.recoverableClosure(t),this.recovering?this.hub.subscriptions.all().forEach(n=>n.notify("connecting")):this.hub.subscriptions.all().forEach(n=>{n.notify("disconnected",t)}),this.protocol.reset(t),this.hub.close(),this.transport.close(),this.emit("disconnect",t))}closed(t){if(this.state==="closed"||this.state==="idle")return;let n;t&&(n=t instanceof so?t:new so(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[As]="closed";let e=n||new so("cable_closed");this.hub.subscriptions.all().forEach(r=>r.notify("disconnected",e)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",n)}disconnect(){this.closed()}handleIncoming(t){if(this.state==="closed"||this.state==="idle")return;let n=this.encoder.decode(t);if(n===void 0){this.logger.error("failed to decode message",{message:t});return}this.logger.debug("incoming data",n);let e=this.protocol.receive(n);if(e){this.logger.debug("processed incoming message",e);let{type:r,identifier:m,message:d,meta:g}=e;r?this.hub.notify(m,r,d):this.hub.transmit(m,d,g)}}send(t){if(this.state==="closed")throw Error("Cable is closed");let n=this.encoder.encode(t);if(n===void 0){this.logger.error("failed to encode message",{message:t});return}this.logger.debug("outgoing message",t),this.transport.send(n)}keepalive(t){this.emit("keepalive",t)}streamFrom(t){let n=new Hp({stream_name:t});return this.subscribe(n)}streamFromSigned(t){let n=new Hp({signed_stream_name:t});return this.subscribe(n)}subscribeTo(t,n){let e,r;return typeof t=="string"&&(r=t,t=jp),e=r?new t(r,n):new t(n),this.subscribe(e)}subscribe(t){if(!t.attached(this))return t;let n=t.identifier;t.connecting();let e=this.hub.subscriptions.get(n)||this.hub.subscriptions.create(n,{subscribe:r=>this._subscribe(r,t.channelId,t.params),unsubscribe:r=>this._unsubscribe(r)});return e.add(t),e.intent==="subscribed"&&e.state==="connected"&&t.connected(),e.ensureSubscribed(),t}async _resubscribe(t){t.intent!=="subscribed"||!t.channels[0]||(t.notify("connecting"),t.ensureResubscribed())}async _subscribe(t,n,e){let r=t.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r});return}this.logger.debug("acquiring subscribe lock",{identifier:r});let m=await t.acquire("subscribed");if(m.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:r}),m.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:r}),t.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),m.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r}),m.release();return}if(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),t.notify("connected"),m.release();return}let d={identifier:n,params:e};this.logger.debug("subscribing",d);try{let g=await this.protocol.subscribe(n,e);this.hub.subscribe(r,g),this.logger.debug("subscribed",{...d,remoteId:g}),t.notify("connected")}catch(g){if(g){if(g instanceof Nu&&this.logger.warn("rejected",d),g instanceof so){this.logger.debug("disconnected during subscription; will retry on connect",d),m.release();return}this.logger.error("failed to subscribe",{error:g,...d})}t.close(g),this.hub.unsubscribe(r)}m.release()}unsubscribe(t){let n=t.identifier,e=this.hub.subscriptions.get(n);if(!e)throw Error(`Subscription not found: ${n}`);e.remove(t),t.closed(),e.maybeUnsubscribe()}async _unsubscribe(t){let n=t.id;this.logger.debug("acquiring unsubscribe lock",{identifier:n});let e=await t.acquire("unsubscribed");if(e.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:n}),e.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:n}),t.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:n,intent:t.intent}),e.release();return}if(t.state==="disconnected"||t.state==="closed"){this.logger.debug(`already ${t.state} connected, skip unsubscribe command`,{identifier:n}),e.release();return}let r=t.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:r}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:n}),t.close(),this.hub.unsubscribe(n),e.release();return}try{await this.protocol.unsubscribe(r),this.logger.debug("unsubscribed remotely",{id:n})}catch(m){m&&(m instanceof so?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:n,error:m}):this.logger.error("unsubscribe failed",{id:n,error:m}))}t.intent==="unsubscribed"?(t.close(),this.hub.unsubscribe(n)):t.state="closed",e.release()}async perform(t,n,e){if(this.performFailures==="throw")return this._perform(t,n,e);try{return await this._perform(t,n,e)}catch(r){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:r});return}}async _perform(t,n,e){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new U1;let r=this.hub.subscriptions.get(t);if(!r)throw Error(`Subscription not found: ${t}`);if(await r.pending("subscribed"),r.intent!=="subscribed")throw Error(`Subscription is closed: ${t}`);let m=r.remoteId,d={id:m,action:n,payload:e};this.logger.debug("perform",d);try{let g=await this.protocol.perform(m,n,e);return g&&this.logger.debug("perform result",{message:g,request:d}),g}catch(g){throw this.logger.error("perform failed",{error:g,request:d}),g}}on(t,n){return this.emitter.on(t,n)}once(t,n){let e=this.emitter.on(t,(...r)=>{e(),n(...r)});return e}emit(t,...n){return this.emitter.emit(t,...n)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((t,n)=>{let e=[()=>delete this._pendingConnect];e.push(this.on("connect",()=>{e.forEach(r=>r()),t()})),e.push(this.on("close",r=>{e.forEach(m=>m()),n(r)})),e.push(this.on("disconnect",r=>{e.forEach(m=>m()),n(r)}))}),this._pendingConnect)}};const G1={maxMissingPings:2,maxReconnectAttempts:1/0},ra=()=>Date.now(),Up=(t,n)=>{n=n||{};let{backoffRate:e,jitterRatio:r,maxInterval:m}=n;return e=e||2,r===void 0&&(r=.5),d=>{let g=t*e**d,w=g*e,u=g+(w-g)*Math.random(),f=2*(Math.random()-.5)*r;return u=u*(1+f),m&&m<u&&(u=m),u}};let Vp=class{constructor({pingInterval:n,...e}){if(this.pingInterval=n,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${n}`);if(e=Object.assign({},G1,e),this.strategy=e.reconnectStrategy,!this.strategy)throw Error("Reconnect strategy must be provided");this.maxMissingPings=e.maxMissingPings,this.maxReconnectAttempts=e.maxReconnectAttempts,this.logger=e.logger||new Va,this.state="pending_connect",this.attempts=0,this.disconnectedAt=ra()}watch(n){this.target=n,this.initListeners()}reconnectNow(){return this.state==="connected"||this.state==="pending_connect"||this.state==="closed"?!1:(this.cancelReconnect(),this.state="pending_connect",this.target.connect().catch(n=>{this.logger.info("Failed at reconnecting: "+n)}),!0)}initListeners(){this.unbind=[],this.unbind.push(this.target.on("connect",()=>{this.attempts=0,this.pingedAt=ra(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=ra(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=ra(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=ra()})),this.unbind.push(()=>{this.cancelReconnect(),this.stopPolling()})}dispose(){delete this.target,this.unbind&&this.unbind.forEach(n=>n()),delete this.unbind}startPolling(){this.pollId&&clearTimeout(this.pollId);let n=this.pingInterval+(Math.random()-.5)*this.pingInterval*.5;this.pollId=setTimeout(()=>{this.checkStale(),this.state==="connected"&&this.startPolling()},n)}stopPolling(){this.pollId&&clearTimeout(this.pollId)}checkStale(){let n=ra()-this.pingedAt;n>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${n}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new N1))}scheduleReconnect(){if(this.attempts>=this.maxReconnectAttempts){this.target.close();return}let n=this.strategy(this.attempts);this.attempts++,this.logger.info(`Reconnecting in ${n}ms (${this.attempts} attempt)`),this.state="pending_reconnect",this.reconnnectId=setTimeout(()=>this.reconnectNow(),n)}cancelReconnect(){this.reconnnectId&&(clearTimeout(this.reconnnectId),delete this.reconnnectId)}};class K1{constructor(n,e={}){this.transports=n,this.transport=null,this.emitter=Gl(),this.unbind=[],this.logger=e.logger||new Va}displayName(){return"fallbacked transport"}async open(){for(let n=0;n<this.transports.length;n++){let e=this.transports[n];try{this.transport=e,this.resetListeners(),this.logger.debug(`Trying to connect via ${e.displayName()}`),await e.open(),this.logger.debug(`Connected via ${e.displayName()}`);return}catch(r){this.logger.debug(`Failed to connect via ${e.displayName()}: ${r.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(n){if(!this.transport)throw new Error("No transport is open");this.transport.send(n)}async close(){if(!this.transport)throw new Error("No transport is open");await this.transport.close(),this.transport=null}setURL(){throw new Error("Not implemented. Set URL for each transport separately")}setParam(n,e){this.transports.forEach(r=>{r.setParam(n,e)})}setToken(n,e){this.transports.forEach(r=>{r.setToken(n,e)})}on(n,e){return this.emitter.on(n,e)}once(n,e){let r=this.emitter.on(n,(...m)=>{r(),e(...m)});return r}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(n=>n()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",n=>{this.emitter.emit("data",n)}),this.transport.on("close",n=>{this.emitter.emit("close",n)}),this.transport.on("error",n=>{this.emitter.emit("error",n)}))}}class Y1{constructor(n,e={}){this.url=n;let r=e.websocketImplementation;if(r)this.Impl=r;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=Gl();let{format:m,subprotocol:d,authStrategy:g}=e;this.format=m||"text",this.connectionOptions=e.websocketOptions,this.authStrategy=g||"param",this.authProtocol="",this.subprotocol=d}displayName(){return"WebSocket("+this.url+")"}open(){let n=this.subprotocol;return this.authStrategy==="sub-protocol"&&(n=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,n,this.connectionOptions):this.ws=new this.Impl(this.url,n),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((e,r)=>{let m=[];m.push(this.once("open",()=>{m.forEach(d=>d()),e()})),m.push(this.once("close",()=>{m.forEach(d=>d()),r(Error("WS connection closed"))}))})}setURL(n){this.url=n}setParam(n,e){let r=new URL(this.url);r.searchParams.set(n,e);let m=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(m)}setToken(n,e="jid"){if(this.authStrategy==="param")this.setParam(e,n);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let r=`x-${e}`.toLowerCase();r=Object.keys(this.connectionOptions.headers).find(m=>m.toLowerCase()===r)||r,this.connectionOptions.headers[r]=n}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${n}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(n){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(n)}close(){this.ws?this.onclose():this.connected=!1}on(n,e){return this.emitter.on(n,e)}once(n,e){let r=this.emitter.on(n,(...m)=>{r(),e(...m)});return r}initListeners(){this.ws.onerror=n=>{this.connected&&this.emitter.emit("error",n.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=n=>{let e=n.data;this.format==="binary"&&(e=new Uint8Array(e)),this.emitter.emit("data",e)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}}class J1{constructor(n){this.channel=n}notify(n,...e){typeof this[n]=="function"&&this[n](...e)}perform(n,e={}){this.channel.perform(n,e)}send(n){this.channel.send(n)}whisper(n){return this.channel.whisper(n)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class Z1 extends jp{constructor(n,e,r){super(n,e),this.subscription=new J1(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:m})=>this.subscription.notify("connected",{reconnected:m})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",m=>this.subscription.notify("received",m)),this.on("close",m=>{m&&m instanceof Nu?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class X1{constructor(n){this.cable=n}create(n,e){let r,m;typeof n=="object"?(r=n.channel,delete n.channel,m=n):(r=n,m={});let d=new Z1(r,m,e);return d.subscription.notify("initialized"),this.cable.subscribe(d),d.subscription}findAll(n){return this.cable.hub.channels.filter(e=>e.identifier===n).map(e=>e.subscription)}}class Q1{constructor(n){this.cable=n,this.subscriptions=new X1(n)}send(n){return this.cable.send(n)}connect(){return this.cable.connect()}disconnect(){return this.cable.disconnect()}ensureActiveConnection(){return this.cable.connect()}}const qp={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function eC(t,n){if(typeof t=="object"&&typeof n>"u"&&(n=t,t=void 0),n=n||{},!t&&!n.transport)throw Error("URL or transport must be specified");n=Object.assign({},qp,n);let{protocol:e,websocketImplementation:r,websocketFormat:m,websocketOptions:d,websocketAuthStrategy:g,fallbacks:w,logLevel:u,logger:f,transport:a,encoder:s,lazy:c,monitor:h,pingInterval:o,reconnectStrategy:l,maxMissingPings:p,maxReconnectAttempts:y,subprotocol:x,tokenRefresher:E,historyTimestamp:$,protocolOptions:_,concurrentSubscribes:C,performFailures:L,transportConfigurator:D,auth:I}=n;if(f=f||new Va(u),typeof e=="string"){x=x||e;let z=e.substring(0,e.lastIndexOf("-")),O=e.substring(e.lastIndexOf("-")+1);if(_=_||{},z==="actioncable-v1")e=new Bp({logger:f,..._});else if(z==="actioncable-v1-ext")e=new H1({logger:f,historyTimestamp:$,..._});else throw Error(`Protocol is not supported yet: ${e}`);if(O==="json")s=s||new W1,m=m||"text";else if(O==="msgpack"){if(m="binary",!s)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(O==="protobuf"){if(m=m||"binary",!s)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${e}`)}if(!e)throw Error("Protocol must be specified");a=a||new Y1(t,{websocketImplementation:r,websocketOptions:d,subprotocol:x,authStrategy:g,format:m}),w&&(a=new K1([a,...w],{logger:f})),I&&I.token&&a.setToken(I.token,I.param||"jid"),l=l||Up(o),h!==!1&&(h=h||new Vp({pingInterval:o,reconnectStrategy:l,maxMissingPings:p,maxReconnectAttempts:y,logger:f}));let M={concurrentSubscribes:C},W=new q1({protocol:e,transport:a,encoder:s,logger:f,lazy:c,hubOptions:M,performFailures:L,transportConfigurator:D});return h&&(h.watch(W),W.monitor=h),E&&tC(W,async()=>{try{await E(a)}catch(z){return f.error("Failed to refresh authentication token: "+z),!1}return W.connect().catch(()=>{}),!0}),W}function tC(t,n){let e=!1;t.on("connect",()=>e=!1),t.on("close",async r=>{if(r){if(e){t.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(e=!0,await n())}})}class nC extends Fp{writeLogEntry(n,e,r){r?console[n](e,r):console[n](e)}}class rC extends Vp{watch(n){super.watch(n),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let n=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},e=m=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:m})},r=()=>this.disconnect(new so("page_frozen"));document.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",e,!1),window.addEventListener("online",e,!1),window.addEventListener("resume",e,!1),window.addEventListener("freeze",r,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",n,!1),window.removeEventListener("focus",e,!1),window.removeEventListener("online",e,!1),window.removeEventListener("resume",e,!1),window.removeEventListener("freeze",r,!1)})}}disconnect(n){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:n.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(n))}}const iC=["cable","action-cable"],oC="/cable",Kl=(t,n)=>{for(let e of iC){let r=t.head.querySelector(`meta[name='${e}-${n}']`);if(r)return r.getAttribute("content")}},Gp=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,sC=()=>{if(typeof document<"u"&&document.head){let t=Kl(document,"url");if(t)return Gp(t)}return Gp(oC)},aC=()=>{if(typeof document<"u"&&document.head){let t=Kl(document,"history-timestamp");if(t)return t|0}},lC=()=>{if(typeof document<"u"&&document.head)return Kl(document,"token")},cC=()=>{if(typeof document<"u"&&document.head)return Kl(document,"token-param")};function uC(t,n){typeof t=="object"&&typeof n>"u"&&(n=t,t=void 0),t=t||sC(),n=n||{},n.historyTimestamp||=aC();let e=lC();if(e){let f=cC();n.auth=Object.assign({token:e,param:f},n.auth||{})}n=Object.assign({},qp,n);let{logLevel:r,logger:m,pingInterval:d,reconnectStrategy:g,maxMissingPings:w,maxReconnectAttempts:u}=n;return m=n.logger=n.logger||new nC(r),g=n.reconnectStrategy=n.reconnectStrategy||Up(d),n.monitor!==!1&&(n.monitor=n.monitor||new rC({pingInterval:d,reconnectStrategy:g,maxMissingPings:w,maxReconnectAttempts:u,logger:m})),eC(t,n)}function hC(t,n){let e=uC(t,n);return new Q1(e)}class dC{constructor(n="/openc3-api/cable"){this._cable=null,this._url=n}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(n,e,r={},m={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(d=>{if(d&&OpenC3Auth.setTokens(),this._cable==null){const g=new URL(this._url,document.baseURI);g.searchParams.set("scope",e),this._cable=hC(g.href)}return this._cable.subscriptions.create({channel:n,token:localStorage.openc3Token,...m},r)})}recordPing(){}}Hn("I",dC),Hn("K",class{constructor(n,e,r="",m=""){this.keyword=n.keyword,this.parameters=n.parameters,this.filename=n.filename,this.line=n.line,this.lineNumber=n.lineNumber,this.message=e,this.usage=r,this.url=m}});function qa(t){return fC.test(t)}const fC=/^-?[0-9]+$/;function Kp(t){return pC.test(t)}const pC=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Yp(t,n){if(qa(t))return Number.isSafeInteger(Number.parseInt(t,10));const e=Number.parseFloat(t),r=String(e);if(t===r)return!0;const m=Jp(t),d=Jp(r);return!!(m===d||n?.approx===!0&&!qa(t)&&d.length>=14&&m.startsWith(d.substring(0,14)))}let Ga=(function(t){return t.underflow="underflow",t.overflow="overflow",t.truncate_integer="truncate_integer",t.truncate_float="truncate_float",t})({});function gC(t){if(Yp(t,{approx:!1}))return;if(qa(t))return Ga.truncate_integer;const n=Number.parseFloat(t);return Number.isFinite(n)?n===0?Ga.underflow:Ga.truncate_float:Ga.overflow}function Jp(t){const{start:n,end:e}=mC(t),r=t.substring(n,e),m=r.indexOf(".");return m===-1?r:r.substring(0,m)+r.substring(m+1)}function mC(t){let n=0;for(t[0]==="-"&&n++;t[n]==="0"||t[n]===".";)n++;let e=t.lastIndexOf("e");for(e===-1&&(e=t.lastIndexOf("E")),e===-1&&(e=t.length);(t[e-1]==="0"||t[e-1]===".")&&e>n;)e--;return{start:n,end:e}}class vC{isLosslessNumber=!0;constructor(n){if(!Kp(n))throw new Error(`Invalid number (value: "${n}")`);this.value=n}valueOf(){const n=gC(this.value);if(n===void 0||n===Ga.truncate_float)return Number.parseFloat(this.value);if(qa(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${n} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function yC(t){return t&&typeof t=="object"&&t.isLosslessNumber||!1}function bC(t){return new vC(t)}function wC(t,n){return Du({"":t},"",t,n)}function Du(t,n,e,r){return Array.isArray(e)?r.call(t,n,CC(e,r)):e&&typeof e=="object"&&!yC(e)?r.call(t,n,xC(e,r)):r.call(t,n,e)}function xC(t,n){for(const e of Object.keys(t)){const r=Du(t,e,t[e],n);r!==void 0?t[e]=r:delete t[e]}return t}function CC(t,n){for(let e=0;e<t.length;e++)t[e]=Du(t,String(e),t[e],n);return t}function _C(t,n,e){const r=typeof e=="function"?{parseNumber:e}:e,m=r?.parseNumber??bC,d=r?.onDuplicateKey??L;let g=0;const w=a();return y(w),E(),n?wC(w,n):w;function u(){if(t.charCodeAt(g)===RC){g++,c();const B={};let U=!0;for(;g<t.length&&t.charCodeAt(g)!==Xp;){U?U=!1:(l(),c());const G=g,J=h();if(J===void 0){C();return}c(),p();const Q=a();if(Q===void 0){z();return}if(Object.prototype.hasOwnProperty.call(B,J)&&!Pu(Q,B[J])){const le=d({key:J,position:G+1,oldValue:B[J],newValue:Q});le!==void 0&&(B[J]=le)}else B[J]=Q}return t.charCodeAt(g)!==Xp&&D(),g++,B}}function f(){if(t.charCodeAt(g)===EC){g++,c();const B=[];let U=!0;for(;g<t.length&&t.charCodeAt(g)!==Qp;){U?U=!1:l();const G=a();x(G),B.push(G)}return t.charCodeAt(g)!==Qp&&I(),g++,B}}function a(){c();const B=h()??o()??u()??f()??s("true",!0)??s("false",!1)??s("null",null);return c(),B}function s(B,U){if(t.slice(g,g+B.length)===B)return g+=B.length,U}function c(){for(;AC(t.charCodeAt(g));)g++}function h(){if(t.charCodeAt(g)===zu){g++;let B="";for(;g<t.length&&t.charCodeAt(g)!==zu;){if(t.charCodeAt(g)===TC){const U=t[g+1],G=$C[U];G!==void 0?(B+=G,g++):U==="u"?Yl(t.charCodeAt(g+2))&&Yl(t.charCodeAt(g+3))&&Yl(t.charCodeAt(g+4))&&Yl(t.charCodeAt(g+5))?(B+=String.fromCharCode(Number.parseInt(t.slice(g+2,g+6),16)),g+=5):O(g):W(g)}else SC(t.charCodeAt(g))?B+=t[g]:M(t[g]);g++}return _(),g++,B}}function o(){const B=g;if(t.charCodeAt(g)===eg&&(g++,$(B)),t.charCodeAt(g)===Fu)g++;else if(kC(t.charCodeAt(g)))for(g++;Jl(t.charCodeAt(g));)g++;if(t.charCodeAt(g)===zC)for(g++,$(B);Jl(t.charCodeAt(g));)g++;if(t.charCodeAt(g)===HC||t.charCodeAt(g)===jC)for(g++,(t.charCodeAt(g)===eg||t.charCodeAt(g)===NC)&&g++,$(B);Jl(t.charCodeAt(g));)g++;if(g>B)return m(t.slice(B,g))}function l(){if(t.charCodeAt(g)!==PC)throw new SyntaxError(`Comma ',' expected after value ${N()}`);g++}function p(){if(t.charCodeAt(g)!==FC)throw new SyntaxError(`Colon ':' expected after property name ${N()}`);g++}function y(B){if(B===void 0)throw new SyntaxError(`JSON value expected ${N()}`)}function x(B){if(B===void 0)throw new SyntaxError(`Array item expected ${N()}`)}function E(){if(g<t.length)throw new SyntaxError(`Expected end of input ${N()}`)}function $(B){if(!Jl(t.charCodeAt(g))){const U=t.slice(B,g);throw new SyntaxError(`Invalid number '${U}', expecting a digit ${N()}`)}}function _(){if(t.charCodeAt(g)!==zu)throw new SyntaxError(`End of string '"' expected ${N()}`)}function C(){throw new SyntaxError(`Quoted object key expected ${N()}`)}function L(B){let{key:U,position:G}=B;throw new SyntaxError(`Duplicate key '${U}' encountered at position ${G}`)}function D(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${N()}`)}function I(){throw new SyntaxError(`Array item or end of array ']' expected ${N()}`)}function M(B){throw new SyntaxError(`Invalid character '${B}' ${T()}`)}function W(B){const U=t.slice(B,B+2);throw new SyntaxError(`Invalid escape character '${U}' ${T()}`)}function z(){throw new SyntaxError(`Object value expected after ':' ${T()}`)}function O(B){const U=t.slice(B,B+6);throw new SyntaxError(`Invalid unicode character '${U}' ${T()}`)}function T(){return`at position ${g}`}function A(){return g<t.length?`but got '${t[g]}'`:"but reached end of input"}function N(){return`${A()} ${T()}`}}function AC(t){return t===MC||t===IC||t===LC||t===OC}function Yl(t){return t>=Fu&&t<=Bu||t>=BC&&t<=UC||t>=WC&&t<=VC}function Jl(t){return t>=Fu&&t<=Bu}function kC(t){return t>=DC&&t<=Bu}function SC(t){return t>=32&&t<=1114111}function Pu(t,n){return t===n?!0:Array.isArray(t)&&Array.isArray(n)?t.length===n.length&&t.every((e,r)=>Pu(e,n[r])):Zp(t)&&Zp(n)?[...new Set([...Object.keys(t),...Object.keys(n)])].every(e=>Pu(t[e],n[e])):!1}function Zp(t){return typeof t=="object"&&t!==null}const $C={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
10
+ `,r:"\r",t:" "},TC=92,RC=123,Xp=125,EC=91,Qp=93,MC=32,IC=10,LC=9,OC=13,zu=34,NC=43,eg=45,Fu=48,DC=49,Bu=57,PC=44,zC=46,FC=58,BC=65,WC=97,jC=69,HC=101,UC=70,VC=102;function tg(t,n,e,r){return m(t);function m(u,f){if(Array.isArray(r)){const a=r.find(s=>s.test(u));if(a){const s=a.stringify(u);if(typeof s!="string"||!Kp(s))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${s})`);return s}}if(typeof u=="boolean"||typeof u=="number"||typeof u=="string"||u===null||u instanceof Date||u instanceof Boolean||u instanceof Number||u instanceof String)return JSON.stringify(u);if(u?.isLosslessNumber||typeof u=="bigint")return u.toString();if(Array.isArray(u))return d(u);if(u&&typeof u=="object")return g(u)}function d(u,f){if(u.length===0)return"[]";let a="[";for(let s=0;s<u.length;s++){const c=u[s];typeof c<"u"&&typeof c!="function"?a+=m(c):a+="null",s<u.length-1&&(a+=",")}return a+="]",a}function g(u,f){if(typeof u.toJSON=="function")return tg(u.toJSON(),n,e,void 0);const a=Array.isArray(n)?n.map(String):Object.keys(u);if(a.length===0)return"{}";let s=!0,c="{";for(const h of a){const o=u[h];if(w(h,o)){s?s=!1:c+=",";const l=JSON.stringify(h);c+=`${l}:`,c+=m(o)}}return c+="}",c}function w(u,f){return typeof f<"u"&&typeof f!="function"&&typeof f!="symbol"}}function qC(t){return qa(t)&&!Yp(t)?BigInt(t):parseFloat(t)}class Ka{id=1;constructor(){}async exec(n,e,r={},m={},d=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,m.manual=!0,(await Lu.post("/openc3-api/api",{jsonrpc:"2.0",method:n,params:e,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...m},timeout:d,transformRequest:[(g,w)=>tg(g)],transformResponse:[g=>{try{return _C(g,void 0,qC)}catch{const w=typeof g=="string"?g.substring(0,200):String(g),u=new Error(`Server returned non-JSON response: ${w}`);throw u.name="ServerError",u}}]})).data.result}catch(g){let w=new Error;throw g.response?(w.name=g.response.data.error.data.class,w.message=g.response.data.error.data.message,w.object=g.response.data.error):g.request?(w.name="Request error",w.message="Request error, no response received"):w=g,w}}decode_openc3_type(n){if(n!==null&&typeof n=="object"&&n.json_class=="Float"&&n.raw){if(n.raw=="NaN")return NaN;if(n.raw=="Infinity")return 1/0;if(n.raw=="-Infinity")return-1/0}return null}encode_openc3_type(n){return Number.isNaN(n)?{json_class:"Float",raw:"NaN"}:n==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:n==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(n=>{n&&(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(n){return this.exec("set_offline_access",[n])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(n,e,r,m,d){return this.exec("map_target_to_interface",[n,e],{cmd_only:r,tlm_only:m,unmap_old:d})}unmap_target_from_interface(n,e,r,m){return this.exec("unmap_target_from_interface",[n,e],{cmd_only:r,tlm_only:m})}connect_interface(n,...e){return e.length>0?this.exec("connect_interface",[n,...e]):this.exec("connect_interface",[n])}disconnect_interface(n){return this.exec("disconnect_interface",[n])}interface_cmd(n,e,...r){return this.exec("interface_cmd",[n,e,...r])}interface_target_enable(n,e,r=!1,m=!1){return this.exec("interface_target_enable",[n,e],{cmd_only:r,tlm_only:m})}interface_target_disable(n,e,r=!1,m=!1){return this.exec("interface_target_disable",[n,e],{cmd_only:r,tlm_only:m})}interface_details(n){return this.exec("interface_details",[n])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(n,e,r,m,d){return this.exec("map_target_to_router",[n,e],{cmd_only:r,tlm_only:m,unmap_old:d})}unmap_target_from_router(n,e,r,m){return this.exec("unmap_target_from_router",[n,e],{cmd_only:r,tlm_only:m})}connect_router(n){return this.exec("connect_router",[n])}disconnect_router(n){return this.exec("disconnect_router",[n])}router_target_enable(n,e,r=!1,m=!1){return this.exec("router_target_enable",[n,e],{cmd_only:r,tlm_only:m})}router_target_disable(n,e,r=!1,m=!1){return this.exec("router_target_disable",[n,e],{cmd_only:r,tlm_only:m})}router_details(n){return this.exec("router_details",[n])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(n){return this.exec("get_tlm_cnts",[n])}get_item(n,e,r){return this.exec("get_item",[n,e,r])}get_param(n,e,r){return this.exec("get_param",[n,e,r])}get_parameter(n,e,r){return this.exec("get_param",[n,e,r])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(n){return this.exec("set_limits_set",[n])}delete_limits_set(n){return this.exec("delete_limits_set",[n])}get_target(n){return this.exec("get_target",[n])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(n,e){return this.exec("get_tlm",[n,e])}get_telemetry(n,e){return this.exec("get_tlm",[n,e])}get_all_tlm(n){return this.exec("get_all_tlm",[n])}get_all_telemetry(n){return this.exec("get_all_tlm",[n])}get_all_tlm_names(n,e=!1){return this.exec("get_all_tlm_names",[n],{hidden:e})}get_all_telemetry_names(n){return this.exec("get_all_tlm_names",[n])}get_all_tlm_item_names(n){return this.exec("get_all_tlm_item_names",[n])}async get_tlm_packet(n,e,r,m=30){const d=await this.exec("get_tlm_packet",[n,e],{type:r,stale_time:m});if(d!=null){let g=d.length,w=null;for(let u=0;u<g;u++)w=this.decode_openc3_type(d[u][1]),w!==null&&(d[u][1]=w)}return d}get_packet_derived_items(n,e){return this.exec("get_packet_derived_items",[n,e])}get_tlm_buffer(n,e){return this.exec("get_tlm_buffer",[n,e])}get_tlm_available(n){return this.exec("get_tlm_available",[n])}async get_tlm_values(n,e=30,r=null,m=null,d=null){let g={stale_time:e};r!==null&&(g.cache_timeout=r),m!==null&&(g.start_time=m.toISOString()),d!==null&&(g.end_time=d.toISOString());const w=await this.exec("get_tlm_values",[n],g,{},1e4);if(w&&w.length>0){let u=w.length,f=null;for(let a=0;a<u;a++)f=this.decode_openc3_type(w[a][0]),f!==null&&(w[a][0]=f)}return w}get_limits(n,e,r){return this.exec("get_limits",[n,e,r])}async tlm(n,e,r,m="CONVERTED"){let d=null;if(e===void 0)d=await this.exec("tlm",[n]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED"].includes(e))d=await this.exec("tlm",[n],{type:e});else{let w=new Error;throw w.name="TypeError",w.message=`Invalid data type ${e}. Valid options are RAW, CONVERTED or FORMATTED.`,w}else d=await this.exec("tlm",[n,e,r],{type:m});let g=this.decode_openc3_type(d);return g!==null&&(d=g),d}async inject_tlm(n,e,r=null,m="CONVERTED",d=!1){await this.exec("inject_tlm",[n,e,r],{type:m,stored:d})}set_tlm(n,e,r,m){return this.exec("set_tlm",[n,e,r],{type:m})}override_tlm(n,e,r,m){return this.exec("override_tlm",[n,e,r],{type:m})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(n,e,r,m){return this.exec("normalize_tlm",[n,e,r],{type:m})}get_all_cmds(n){return this.exec("get_all_cmds",[n])}get_all_commands(n){return this.exec("get_all_cmds",[n])}get_all_cmd_names(n,e=!1){return this.exec("get_all_cmd_names",[n],{hidden:e})}get_all_command_names(n){return this.exec("get_all_cmd_names",[n])}get_cmd(n,e){return this.exec("get_cmd",[n,e])}get_command(n,e){return this.exec("get_cmd",[n,e])}get_cmd_cnts(n){return this.exec("get_cmd_cnts",[n])}get_cmd_value(n,e,r,m="CONVERTED"){return this.exec("get_cmd_value",[n,e,r,m])}get_cmd_buffer(n,e){return this.exec("get_cmd_buffer",[n,e])}_cmd(n,e,r,m,d,g={}){let w=null;for(let u in m)Object.prototype.hasOwnProperty.call(m,u)&&(w=this.encode_openc3_type(m[u]),w!==null&&(m[u]=w));return this.exec(n,[e,r,m],g,d)}get_cmd_hazardous(n,e,r,m={}){return e===void 0?this.exec("get_cmd_hazardous",n,{},m):this._cmd("get_cmd_hazardous",n,e,r,m)}cmd(n,e,r,m={},d={}){return e===void 0?this.exec("cmd",n,d,m):this._cmd("cmd",n,e,r,m,d)}cmd_no_range_check(n,e,r,m={},d={}){return e===void 0?this.exec("cmd_no_range_check",n,d,m):this._cmd("cmd_no_range_check",n,e,r,m,d)}cmd_raw(n,e,r,m={},d={}){return e===void 0?this.exec("cmd_raw",n,d,m):this._cmd("cmd_raw",n,e,r,m,d)}cmd_raw_no_range_check(n,e,r,m={},d={}){return e===void 0?this.exec("cmd_raw_no_range_check",n,d,m):this._cmd("cmd_raw_no_range_check",n,e,r,m,d)}cmd_no_hazardous_check(n,e,r,m={},d={}){return e===void 0?this.exec("cmd_no_hazardous_check",n,d,m):this._cmd("cmd_no_hazardous_check",n,e,r,m,d)}cmd_no_checks(n,e,r,m={},d={}){return e===void 0?this.exec("cmd_no_checks",n,d,m):this._cmd("cmd_no_checks",n,e,r,m,d)}cmd_raw_no_hazardous_check(n,e,r,m={},d={}){return e===void 0?this.exec("cmd_raw_no_hazardous_check",n,d,m):this._cmd("cmd_raw_no_hazardous_check",n,e,r,m,d)}cmd_raw_no_checks(n,e,r,m={},d={}){return e===void 0?this.exec("cmd_raw_no_checks",n,d,m):this._cmd("cmd_raw_no_checks",n,e,r,m,d)}build_cmd(n,e,r,m={},d={}){return e===void 0?this.exec("build_cmd",n,d,m):this._cmd("build_cmd",n,e,r,m,d)}build_command(n,e,r,m={},d={}){return e===void 0?this.exec("build_cmd",n,d,m):this._cmd("build_cmd",n,e,r,m,d)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(n,e){return this.exec("send_raw",[n,e])}list_configs(n){return this.exec("list_configs",[n])}load_config(n,e){return this.exec("load_config",[n,e])}save_config(n,e,r){return this.exec("save_config",[n,e,r])}delete_config(n,e){return this.exec("delete_config",[n,e])}enable_limits(n,e,r){return this.exec("enable_limits",[n,e,r])}disable_limits(n,e,r){return this.exec("disable_limits",[n,e,r])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(n){return this.exec("get_overall_limits_state",[n])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(n,e){return this.exec("get_setting",[n],e)}get_settings(n,e){return this.exec("get_settings",n,e)}set_setting(n,e){return this.exec("set_setting",[n,e])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(n,e){return this.exec("set_setting",[n,e])}get_metrics(){return this.exec("get_metrics",[])}open_tab(n){window.open(n,"_blank")}async hashString(n){if(window.isSecureContext){const e=new TextEncoder().encode(n),r=await crypto.subtle.digest("SHA-256",e),m=new Uint8Array(r);return Array.from(m).map(d=>d.toString(16).padStart(2,"0")).join("")}}}Hn("F",Ka);const ng=6048e5,GC=864e5,Zl=6e4,Wu=36e5,KC=1e3,rg=Symbol.for("constructDateFrom");Hn({L:Zl,U:Wu,q:KC});function _o(t,n){return typeof t=="function"?t(n):t&&typeof t=="object"&&rg in t?t[rg](n):t instanceof Date?new t.constructor(n):new Date(n)}function Zr(t,n){return _o(n||t,t)}let YC={};function ia(){return YC}function oa(t,n){const e=ia(),r=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??e.weekStartsOn??e.locale?.options?.weekStartsOn??0,m=Zr(t,n?.in),d=m.getDay(),g=(d<r?7:0)+d-r;return m.setDate(m.getDate()-g),m.setHours(0,0,0,0),m}function Ya(t,n){return oa(t,{...n,weekStartsOn:1})}function ig(t,n){const e=Zr(t,n?.in),r=e.getFullYear(),m=_o(e,0);m.setFullYear(r+1,0,4),m.setHours(0,0,0,0);const d=Ya(m),g=_o(e,0);g.setFullYear(r,0,4),g.setHours(0,0,0,0);const w=Ya(g);return e.getTime()>=d.getTime()?r+1:e.getTime()>=w.getTime()?r:r-1}function ju(t){const n=Zr(t),e=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return e.setUTCFullYear(n.getFullYear()),+t-+e}function JC(t,...n){const e=_o.bind(null,n.find(r=>typeof r=="object"));return n.map(e)}function og(t,n){const e=Zr(t,n?.in);return e.setHours(0,0,0,0),e}function ZC(t,n,e){const[r,m]=JC(e?.in,t,n),d=og(r),g=og(m),w=+d-ju(d),u=+g-ju(g);return Math.round((w-u)/GC)}function XC(t,n){const e=ig(t,n),r=_o(t,0);return r.setFullYear(e,0,4),r.setHours(0,0,0,0),Ya(r)}function QC(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function sg(t){return!(!QC(t)&&typeof t!="number"||isNaN(+Zr(t)))}function e_(t,n){const e=Zr(t,n?.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}const t_={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},n_=(t,n,e)=>{let r;const m=t_[t];return typeof m=="string"?r=m:n===1?r=m.one:r=m.other.replace("{{count}}",n.toString()),e?.addSuffix?e.comparison&&e.comparison>0?"in "+r:r+" ago":r};function Hu(t){return(n={})=>{const e=n.width?String(n.width):t.defaultWidth;return t.formats[e]||t.formats[t.defaultWidth]}}const r_={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},i_={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},o_={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},s_={date:Hu({formats:r_,defaultWidth:"full"}),time:Hu({formats:i_,defaultWidth:"full"}),dateTime:Hu({formats:o_,defaultWidth:"full"})},a_={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},l_=(t,n,e,r)=>a_[t];function Ja(t){return(n,e)=>{const r=e?.context?String(e.context):"standalone";let m;if(r==="formatting"&&t.formattingValues){const g=t.defaultFormattingWidth||t.defaultWidth,w=e?.width?String(e.width):g;m=t.formattingValues[w]||t.formattingValues[g]}else{const g=t.defaultWidth,w=e?.width?String(e.width):t.defaultWidth;m=t.values[w]||t.values[g]}const d=t.argumentCallback?t.argumentCallback(n):n;return m[d]}}const c_={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},u_={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},h_={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},d_={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},f_={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},p_={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},g_=(t,n)=>{const e=Number(t),r=e%100;if(r>20||r<10)switch(r%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},m_={ordinalNumber:g_,era:Ja({values:c_,defaultWidth:"wide"}),quarter:Ja({values:u_,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Ja({values:h_,defaultWidth:"wide"}),day:Ja({values:d_,defaultWidth:"wide"}),dayPeriod:Ja({values:f_,defaultWidth:"wide",formattingValues:p_,defaultFormattingWidth:"wide"})};function Za(t){return(n,e={})=>{const r=e.width,m=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],d=n.match(m);if(!d)return null;const g=d[0],w=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],u=Array.isArray(w)?y_(w,s=>s.test(g)):v_(w,s=>s.test(g));let f;f=t.valueCallback?t.valueCallback(u):u,f=e.valueCallback?e.valueCallback(f):f;const a=n.slice(g.length);return{value:f,rest:a}}}function v_(t,n){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&n(t[e]))return e}function y_(t,n){for(let e=0;e<t.length;e++)if(n(t[e]))return e}function b_(t){return(n,e={})=>{const r=n.match(t.matchPattern);if(!r)return null;const m=r[0],d=n.match(t.parsePattern);if(!d)return null;let g=t.valueCallback?t.valueCallback(d[0]):d[0];g=e.valueCallback?e.valueCallback(g):g;const w=n.slice(m.length);return{value:g,rest:w}}}const w_=/^(\d+)(th|st|nd|rd)?/i,x_=/\d+/i,C_={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},__={any:[/^b/i,/^(a|c)/i]},A_={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},k_={any:[/1/i,/2/i,/3/i,/4/i]},S_={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},$_={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},T_={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},R_={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},E_={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},M_={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},I_={ordinalNumber:b_({matchPattern:w_,parsePattern:x_,valueCallback:t=>parseInt(t,10)}),era:Za({matchPatterns:C_,defaultMatchWidth:"wide",parsePatterns:__,defaultParseWidth:"any"}),quarter:Za({matchPatterns:A_,defaultMatchWidth:"wide",parsePatterns:k_,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Za({matchPatterns:S_,defaultMatchWidth:"wide",parsePatterns:$_,defaultParseWidth:"any"}),day:Za({matchPatterns:T_,defaultMatchWidth:"wide",parsePatterns:R_,defaultParseWidth:"any"}),dayPeriod:Za({matchPatterns:E_,defaultMatchWidth:"any",parsePatterns:M_,defaultParseWidth:"any"})},L_=Hn("G",{code:"en-US",formatDistance:n_,formatLong:s_,formatRelative:l_,localize:m_,match:I_,options:{weekStartsOn:0,firstWeekContainsDate:1}});function O_(t,n){const e=Zr(t,n?.in);return ZC(e,e_(e))+1}function ag(t,n){const e=Zr(t,n?.in),r=+Ya(e)-+XC(e);return Math.round(r/ng)+1}function Uu(t,n){const e=Zr(t,n?.in),r=e.getFullYear(),m=ia(),d=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??m.firstWeekContainsDate??m.locale?.options?.firstWeekContainsDate??1,g=_o(n?.in||t,0);g.setFullYear(r+1,0,d),g.setHours(0,0,0,0);const w=oa(g,n),u=_o(n?.in||t,0);u.setFullYear(r,0,d),u.setHours(0,0,0,0);const f=oa(u,n);return+e>=+w?r+1:+e>=+f?r:r-1}function N_(t,n){const e=ia(),r=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??e.firstWeekContainsDate??e.locale?.options?.firstWeekContainsDate??1,m=Uu(t,n),d=_o(n?.in||t,0);return d.setFullYear(m,0,r),d.setHours(0,0,0,0),oa(d,n)}function lg(t,n){const e=Zr(t,n?.in),r=+oa(e,n)-+N_(e,n);return Math.round(r/ng)+1}function hn(t,n){const e=t<0?"-":"",r=Math.abs(t).toString().padStart(n,"0");return e+r}const ns={y(t,n){const e=t.getFullYear(),r=e>0?e:1-e;return hn(n==="yy"?r%100:r,n.length)},M(t,n){const e=t.getMonth();return n==="M"?String(e+1):hn(e+1,2)},d(t,n){return hn(t.getDate(),n.length)},a(t,n){const e=t.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];default:return e==="am"?"a.m.":"p.m."}},h(t,n){return hn(t.getHours()%12||12,n.length)},H(t,n){return hn(t.getHours(),n.length)},m(t,n){return hn(t.getMinutes(),n.length)},s(t,n){return hn(t.getSeconds(),n.length)},S(t,n){const e=n.length,r=t.getMilliseconds(),m=Math.trunc(r*Math.pow(10,e-3));return hn(m,n.length)}},sa={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},cg={G:function(t,n,e){const r=t.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return e.era(r,{width:"abbreviated"});case"GGGGG":return e.era(r,{width:"narrow"});default:return e.era(r,{width:"wide"})}},y:function(t,n,e){if(n==="yo"){const r=t.getFullYear(),m=r>0?r:1-r;return e.ordinalNumber(m,{unit:"year"})}return ns.y(t,n)},Y:function(t,n,e,r){const m=Uu(t,r),d=m>0?m:1-m;if(n==="YY"){const g=d%100;return hn(g,2)}return n==="Yo"?e.ordinalNumber(d,{unit:"year"}):hn(d,n.length)},R:function(t,n){const e=ig(t);return hn(e,n.length)},u:function(t,n){const e=t.getFullYear();return hn(e,n.length)},Q:function(t,n,e){const r=Math.ceil((t.getMonth()+1)/3);switch(n){case"Q":return String(r);case"QQ":return hn(r,2);case"Qo":return e.ordinalNumber(r,{unit:"quarter"});case"QQQ":return e.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(r,{width:"narrow",context:"formatting"});default:return e.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,n,e){const r=Math.ceil((t.getMonth()+1)/3);switch(n){case"q":return String(r);case"qq":return hn(r,2);case"qo":return e.ordinalNumber(r,{unit:"quarter"});case"qqq":return e.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(r,{width:"narrow",context:"standalone"});default:return e.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,n,e){const r=t.getMonth();switch(n){case"M":case"MM":return ns.M(t,n);case"Mo":return e.ordinalNumber(r+1,{unit:"month"});case"MMM":return e.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(r,{width:"narrow",context:"formatting"});default:return e.month(r,{width:"wide",context:"formatting"})}},L:function(t,n,e){const r=t.getMonth();switch(n){case"L":return String(r+1);case"LL":return hn(r+1,2);case"Lo":return e.ordinalNumber(r+1,{unit:"month"});case"LLL":return e.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(r,{width:"narrow",context:"standalone"});default:return e.month(r,{width:"wide",context:"standalone"})}},w:function(t,n,e,r){const m=lg(t,r);return n==="wo"?e.ordinalNumber(m,{unit:"week"}):hn(m,n.length)},I:function(t,n,e){const r=ag(t);return n==="Io"?e.ordinalNumber(r,{unit:"week"}):hn(r,n.length)},d:function(t,n,e){return n==="do"?e.ordinalNumber(t.getDate(),{unit:"date"}):ns.d(t,n)},D:function(t,n,e){const r=O_(t);return n==="Do"?e.ordinalNumber(r,{unit:"dayOfYear"}):hn(r,n.length)},E:function(t,n,e){const r=t.getDay();switch(n){case"E":case"EE":case"EEE":return e.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(r,{width:"short",context:"formatting"});default:return e.day(r,{width:"wide",context:"formatting"})}},e:function(t,n,e,r){const m=t.getDay(),d=(m-r.weekStartsOn+8)%7||7;switch(n){case"e":return String(d);case"ee":return hn(d,2);case"eo":return e.ordinalNumber(d,{unit:"day"});case"eee":return e.day(m,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(m,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(m,{width:"short",context:"formatting"});default:return e.day(m,{width:"wide",context:"formatting"})}},c:function(t,n,e,r){const m=t.getDay(),d=(m-r.weekStartsOn+8)%7||7;switch(n){case"c":return String(d);case"cc":return hn(d,n.length);case"co":return e.ordinalNumber(d,{unit:"day"});case"ccc":return e.day(m,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(m,{width:"narrow",context:"standalone"});case"cccccc":return e.day(m,{width:"short",context:"standalone"});default:return e.day(m,{width:"wide",context:"standalone"})}},i:function(t,n,e){const r=t.getDay(),m=r===0?7:r;switch(n){case"i":return String(m);case"ii":return hn(m,n.length);case"io":return e.ordinalNumber(m,{unit:"day"});case"iii":return e.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(r,{width:"short",context:"formatting"});default:return e.day(r,{width:"wide",context:"formatting"})}},a:function(t,n,e){const r=t.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(r,{width:"narrow",context:"formatting"});default:return e.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,n,e){const r=t.getHours();let m;switch(r===12?m=sa.noon:r===0?m=sa.midnight:m=r/12>=1?"pm":"am",n){case"b":case"bb":return e.dayPeriod(m,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(m,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(m,{width:"narrow",context:"formatting"});default:return e.dayPeriod(m,{width:"wide",context:"formatting"})}},B:function(t,n,e){const r=t.getHours();let m;switch(r>=17?m=sa.evening:r>=12?m=sa.afternoon:r>=4?m=sa.morning:m=sa.night,n){case"B":case"BB":case"BBB":return e.dayPeriod(m,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(m,{width:"narrow",context:"formatting"});default:return e.dayPeriod(m,{width:"wide",context:"formatting"})}},h:function(t,n,e){if(n==="ho"){let r=t.getHours()%12;return r===0&&(r=12),e.ordinalNumber(r,{unit:"hour"})}return ns.h(t,n)},H:function(t,n,e){return n==="Ho"?e.ordinalNumber(t.getHours(),{unit:"hour"}):ns.H(t,n)},K:function(t,n,e){const r=t.getHours()%12;return n==="Ko"?e.ordinalNumber(r,{unit:"hour"}):hn(r,n.length)},k:function(t,n,e){let r=t.getHours();return r===0&&(r=24),n==="ko"?e.ordinalNumber(r,{unit:"hour"}):hn(r,n.length)},m:function(t,n,e){return n==="mo"?e.ordinalNumber(t.getMinutes(),{unit:"minute"}):ns.m(t,n)},s:function(t,n,e){return n==="so"?e.ordinalNumber(t.getSeconds(),{unit:"second"}):ns.s(t,n)},S:function(t,n){return ns.S(t,n)},X:function(t,n,e){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(n){case"X":return hg(r);case"XXXX":case"XX":return ks(r);default:return ks(r,":")}},x:function(t,n,e){const r=t.getTimezoneOffset();switch(n){case"x":return hg(r);case"xxxx":case"xx":return ks(r);default:return ks(r,":")}},O:function(t,n,e){const r=t.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+ug(r,":");default:return"GMT"+ks(r,":")}},z:function(t,n,e){const r=t.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+ug(r,":");default:return"GMT"+ks(r,":")}},t:function(t,n,e){const r=Math.trunc(+t/1e3);return hn(r,n.length)},T:function(t,n,e){return hn(+t,n.length)}};function ug(t,n=""){const e=t>0?"-":"+",r=Math.abs(t),m=Math.trunc(r/60),d=r%60;return d===0?e+String(m):e+String(m)+n+hn(d,2)}function hg(t,n){return t%60===0?(t>0?"-":"+")+hn(Math.abs(t)/60,2):ks(t,n)}function ks(t,n=""){const e=t>0?"-":"+",r=Math.abs(t),m=hn(Math.trunc(r/60),2),d=hn(r%60,2);return e+m+n+d}const dg=(t,n)=>{switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});default:return n.date({width:"full"})}},fg=(t,n)=>{switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});default:return n.time({width:"full"})}},D_=(t,n)=>{const e=t.match(/(P+)(p+)?/)||[],r=e[1],m=e[2];if(!m)return dg(t,n);let d;switch(r){case"P":d=n.dateTime({width:"short"});break;case"PP":d=n.dateTime({width:"medium"});break;case"PPP":d=n.dateTime({width:"long"});break;default:d=n.dateTime({width:"full"});break}return d.replace("{{date}}",dg(r,n)).replace("{{time}}",fg(m,n))},P_=Hn("o",{p:fg,P:D_}),z_=/^D+$/,F_=/^Y+$/,B_=["D","DD","YY","YYYY"];function pg(t){return z_.test(t)}function gg(t){return F_.test(t)}function mg(t,n,e){const r=W_(t,n,e);if(console.warn(r),B_.includes(t))throw new RangeError(r)}function W_(t,n,e){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${n}\`) for formatting ${r} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const j_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,H_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,U_=/^'([^]*?)'?$/,V_=/''/g,q_=/[a-zA-Z]/;function Ss(t,n,e){const r=ia(),m=e?.locale??r.locale??L_,d=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,g=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,w=Zr(t,e?.in);if(!sg(w))throw new RangeError("Invalid time value");let u=n.match(H_).map(a=>{const s=a[0];if(s==="p"||s==="P"){const c=P_[s];return c(a,m.formatLong)}return a}).join("").match(j_).map(a=>{if(a==="''")return{isToken:!1,value:"'"};const s=a[0];if(s==="'")return{isToken:!1,value:G_(a)};if(cg[s])return{isToken:!0,value:a};if(s.match(q_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+s+"`");return{isToken:!1,value:a}});m.localize.preprocessor&&(u=m.localize.preprocessor(w,u));const f={firstWeekContainsDate:d,weekStartsOn:g,locale:m};return u.map(a=>{if(!a.isToken)return a.value;const s=a.value;(!e?.useAdditionalWeekYearTokens&&gg(s)||!e?.useAdditionalDayOfYearTokens&&pg(s))&&mg(s,n,String(t));const c=cg[s[0]];return c(w,s,m.localize,f)}).join("")}function G_(t){const n=t.match(U_);return n?n[1].replace(V_,"'"):t}var rs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var vg={exports:{}},yg;function K_(){return yg||(yg=1,(function(t,n){(function(){var e="ace",r=(function(){return this})();!r&&typeof window<"u"&&(r=window);var m=function(a,s,c){if(typeof a!="string"){m.original?m.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(c=s),m.modules[a]||(m.payloads[a]=c,m.modules[a]=null)};m.modules={},m.payloads={};var d=function(a,s,c){if(typeof s=="string"){var h=u(a,s);if(h!=null)return c&&c(),h}else if(Object.prototype.toString.call(s)==="[object Array]"){for(var o=[],l=0,p=s.length;l<p;++l){var y=u(a,s[l]);if(y==null&&g.original)return;o.push(y)}return c&&c.apply(null,o)||!0}},g=function(a,s){var c=d("",a,s);return c==null&&g.original?g.original.apply(this,arguments):c},w=function(a,s){if(s.indexOf("!")!==-1){var c=s.split("!");return w(a,c[0])+"!"+w(a,c[1])}if(s.charAt(0)=="."){var h=a.split("/").slice(0,-1).join("/");for(s=h+"/"+s;s.indexOf(".")!==-1&&o!=s;){var o=s;s=s.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return s},u=function(a,s){s=w(a,s);var c=m.modules[s];if(!c){if(c=m.payloads[s],typeof c=="function"){var h={},o={id:s,uri:"",exports:h,packaged:!0},l=function(y,x){return d(s,y,x)},p=c(l,h,o);h=p||o.exports,m.modules[s]=h,delete m.payloads[s]}c=m.modules[s]=h||c}return c};function f(a){var s=r;r[a]||(r[a]={}),s=r[a],(!s.define||!s.define.packaged)&&(m.original=s.define,s.define=m,s.define.packaged=!0),(!s.require||!s.require.packaged)&&(g.original=s.require,s.require=g,s.require.packaged=!0)}f(e)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(e,r,m){function d(g,w,u){Object.defineProperty(g,w,{value:u,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||d(String.prototype,"startsWith",function(g,w){return w=w||0,this.lastIndexOf(g,w)===w}),String.prototype.endsWith||d(String.prototype,"endsWith",function(g,w){var u=this;(w===void 0||w>u.length)&&(w=u.length),w-=g.length;var f=u.indexOf(g,w);return f!==-1&&f===w}),String.prototype.repeat||d(String.prototype,"repeat",function(g){for(var w="",u=this;g>0;)g&1&&(w+=u),(g>>=1)&&(u+=u);return w}),String.prototype.includes||d(String.prototype,"includes",function(g,w){return this.indexOf(g,w)!=-1}),Object.assign||(Object.assign=function(g){if(g==null)throw new TypeError("Cannot convert undefined or null to object");for(var w=Object(g),u=1;u<arguments.length;u++){var f=arguments[u];f!=null&&Object.keys(f).forEach(function(a){w[a]=f[a]})}return w}),Object.values||(Object.values=function(g){return Object.keys(g).map(function(w){return g[w]})}),Array.prototype.find||d(Array.prototype,"find",function(g){for(var w=this.length,u=arguments[1],f=0;f<w;f++){var a=this[f];if(g.call(u,a,f,this))return a}}),Array.prototype.findIndex||d(Array.prototype,"findIndex",function(g){for(var w=this.length,u=arguments[1],f=0;f<w;f++){var a=this[f];if(g.call(u,a,f,this))return f}}),Array.prototype.includes||d(Array.prototype,"includes",function(g,w){return this.indexOf(g,w)!=-1}),Array.prototype.fill||d(Array.prototype,"fill",function(g){for(var w=this,u=w.length>>>0,f=arguments[1],a=f>>0,s=a<0?Math.max(u+a,0):Math.min(a,u),c=arguments[2],h=c===void 0?u:c>>0,o=h<0?Math.max(u+h,0):Math.min(h,u);s<o;)w[s]=g,s++;return w}),Array.of||d(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(e,r,m){e("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(e,r,m){r.deepCopy=function d(g){if(typeof g!="object"||!g)return g;var w;if(Array.isArray(g)){w=[];for(var u=0;u<g.length;u++)w[u]=d(g[u]);return w}if(Object.prototype.toString.call(g)!=="[object Object]")return g;w={};for(var u in g)w[u]=d(g[u]);return w}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(e,r,m){r.last=function(w){return w[w.length-1]},r.stringReverse=function(w){return w.split("").reverse().join("")},r.stringRepeat=function(w,u){for(var f="";u>0;)u&1&&(f+=w),(u>>=1)&&(w+=w);return f};var d=/^\s\s*/,g=/\s\s*$/;r.stringTrimLeft=function(w){return w.replace(d,"")},r.stringTrimRight=function(w){return w.replace(g,"")},r.copyObject=function(w){var u={};for(var f in w)u[f]=w[f];return u},r.copyArray=function(w){for(var u=[],f=0,a=w.length;f<a;f++)w[f]&&typeof w[f]=="object"?u[f]=this.copyObject(w[f]):u[f]=w[f];return u},r.deepCopy=e("./deep_copy").deepCopy,r.arrayToMap=function(w){for(var u={},f=0;f<w.length;f++)u[w[f]]=1;return u},r.createMap=function(w){var u=Object.create(null);for(var f in w)u[f]=w[f];return u},r.arrayRemove=function(w,u){for(var f=0;f<=w.length;f++)u===w[f]&&w.splice(f,1)},r.escapeRegExp=function(w){return w.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},r.escapeHTML=function(w){return(""+w).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},r.getMatchOffsets=function(w,u){var f=[];return w.replace(u,function(a){f.push({offset:arguments[arguments.length-2],length:a.length})}),f},r.deferredCall=function(w){var u=null,f=function(){u=null,w()},a=function(s){return a.cancel(),u=setTimeout(f,s||0),a};return a.schedule=a,a.call=function(){return this.cancel(),w(),a},a.cancel=function(){return clearTimeout(u),u=null,a},a.isPending=function(){return u},a},r.delayedCall=function(w,u){var f=null,a=function(){f=null,w()},s=function(c){f==null&&(f=setTimeout(a,c||u))};return s.delay=function(c){f&&clearTimeout(f),f=setTimeout(a,c||u)},s.schedule=s,s.call=function(){this.cancel(),w()},s.cancel=function(){f&&clearTimeout(f),f=null},s.isPending=function(){return f},s},r.sleep=function(w){return new Promise(function(u){setTimeout(u,w)})},r.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},r.skipEmptyMatch=function(w,u,f){return f&&w.codePointAt(u)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,r,m){r.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},r.getOS=function(){return r.isMac?r.OS.MAC:r.isLinux?r.OS.LINUX:r.OS.WINDOWS};var d=typeof navigator=="object"?navigator:{},g=(/mac|win|linux/i.exec(d.platform)||["other"])[0].toLowerCase(),w=d.userAgent||"",u=d.appName||"";r.isWin=g=="win",r.isMac=g=="mac",r.isLinux=g=="linux",r.isIE=u=="Microsoft Internet Explorer"||u.indexOf("MSAppHost")>=0?parseFloat((w.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((w.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=w.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(w.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(w.split(" Chrome/")[1])||void 0,r.isSafari=parseFloat(w.split(" Safari/")[1])&&!r.isChrome||void 0,r.isEdge=parseFloat(w.split(" Edge/")[1])||void 0,r.isAIR=w.indexOf("AdobeAIR")>=0,r.isAndroid=w.indexOf("Android")>=0,r.isChromeOS=w.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(w)&&!window.MSStream,r.isIOS&&(r.isMac=!0),r.isMobile=r.isIOS||r.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(e,r,m){var d=e("./useragent"),g="http://www.w3.org/1999/xhtml";r.buildDom=function c(h,o,l){if(typeof h=="string"&&h){var p=document.createTextNode(h);return o&&o.appendChild(p),p}if(!Array.isArray(h))return h&&h.appendChild&&o&&o.appendChild(h),h;if(typeof h[0]!="string"||!h[0]){for(var y=[],x=0;x<h.length;x++){var E=c(h[x],o,l);E&&y.push(E)}return y}var $=document.createElement(h[0]),_=h[1],C=1;_&&typeof _=="object"&&!Array.isArray(_)&&(C=2);for(var x=C;x<h.length;x++)c(h[x],$,l);return C==2&&Object.keys(_).forEach(function(L){var D=_[L];L==="class"?$.className=Array.isArray(D)?D.join(" "):D:typeof D=="function"||L=="value"||L[0]=="$"?$[L]=D:L==="ref"?l&&(l[D]=$):L==="style"?typeof D=="string"&&($.style.cssText=D):D!=null&&$.setAttribute(L,D)}),o&&o.appendChild($),$},r.getDocumentHead=function(c){return c||(c=document),c.head||c.getElementsByTagName("head")[0]||c.documentElement},r.createElement=function(c,h){return document.createElementNS?document.createElementNS(h||g,c):document.createElement(c)},r.removeChildren=function(c){c.innerHTML=""},r.createTextNode=function(c,h){var o=h?h.ownerDocument:document;return o.createTextNode(c)},r.createFragment=function(c){var h=c?c.ownerDocument:document;return h.createDocumentFragment()},r.hasCssClass=function(c,h){var o=(c.className+"").split(/\s+/g);return o.indexOf(h)!==-1},r.addCssClass=function(c,h){r.hasCssClass(c,h)||(c.className+=" "+h)},r.removeCssClass=function(c,h){for(var o=c.className.split(/\s+/g);;){var l=o.indexOf(h);if(l==-1)break;o.splice(l,1)}c.className=o.join(" ")},r.toggleCssClass=function(c,h){for(var o=c.className.split(/\s+/g),l=!0;;){var p=o.indexOf(h);if(p==-1)break;l=!1,o.splice(p,1)}return l&&o.push(h),c.className=o.join(" "),l},r.setCssClass=function(c,h,o){o?r.addCssClass(c,h):r.removeCssClass(c,h)},r.hasCssString=function(c,h){var o=0,l;if(h=h||document,l=h.querySelectorAll("style")){for(;o<l.length;)if(l[o++].id===c)return!0}},r.removeElementById=function(c,h){h=h||document,h.getElementById(c)&&h.getElementById(c).remove()};var w,u=[];r.useStrictCSP=function(c){w=c,c==!1?f():u||(u=[])};function f(){var c=u;u=null,c&&c.forEach(function(h){a(h[0],h[1])})}function a(c,h,o){if(!(typeof document>"u")){if(u){if(o)f();else if(o===!1)return u.push([c,h])}if(!w){var l=o;!o||!o.getRootNode?l=document:(l=o.getRootNode(),(!l||l==o)&&(l=document));var p=l.ownerDocument||l;if(h&&r.hasCssString(h,l))return null;h&&(c+=`
11
+ /*# sourceURL=ace/css/`+h+" */");var y=r.createElement("style");y.appendChild(p.createTextNode(c)),h&&(y.id=h),l==p&&(l=r.getDocumentHead(p)),l.insertBefore(y,l.firstChild)}}}if(r.importCssString=a,r.importCssStylsheet=function(c,h){r.buildDom(["link",{rel:"stylesheet",href:c}],r.getDocumentHead(h))},r.$fixPositionBug=function(c){var h=c.getBoundingClientRect();if(c.style.left){var o=parseFloat(c.style.left),l=+h.left;Math.abs(o-l)>1&&(c.style.left=2*o-l+"px")}if(c.style.right){var o=parseFloat(c.style.right),l=window.innerWidth-h.right;Math.abs(o-l)>1&&(c.style.right=2*o-l+"px")}if(c.style.top){var o=parseFloat(c.style.top),l=+h.top;Math.abs(o-l)>1&&(c.style.top=2*o-l+"px")}if(c.style.bottom){var o=parseFloat(c.style.bottom),l=window.innerHeight-h.bottom;Math.abs(o-l)>1&&(c.style.bottom=2*o-l+"px")}},r.scrollbarWidth=function(c){var h=r.createElement("ace_inner");h.style.width="100%",h.style.minWidth="0px",h.style.height="200px",h.style.display="block";var o=r.createElement("ace_outer"),l=o.style;l.position="absolute",l.left="-10000px",l.overflow="hidden",l.width="200px",l.minWidth="0px",l.height="150px",l.display="block",o.appendChild(h);var p=c&&c.documentElement||document&&document.documentElement;if(!p)return 0;p.appendChild(o);var y=h.offsetWidth;l.overflow="scroll";var x=h.offsetWidth;return y===x&&(x=o.clientWidth),p.removeChild(o),y-x},r.computedStyle=function(c,h){return window.getComputedStyle(c,"")||{}},r.setStyle=function(c,h,o){c[h]!==o&&(c[h]=o)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=d.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,d.isChromeOS&&(r.HI_DPI=!1),typeof document<"u"){var s=document.createElement("div");r.HI_DPI&&s.style.transform!==void 0&&(r.HAS_CSS_TRANSFORMS=!0),!d.isEdge&&typeof s.style.animationName<"u"&&(r.HAS_CSS_ANIMATION=!0),s=null}r.HAS_CSS_TRANSFORMS?r.translate=function(c,h,o){c.style.transform="translate("+Math.round(h)+"px, "+Math.round(o)+"px)"}:r.translate=function(c,h,o){c.style.top=Math.round(o)+"px",c.style.left=Math.round(h)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,r,m){var d=e("./dom");r.get=function(g,w){var u=new XMLHttpRequest;u.open("GET",g,!0),u.onreadystatechange=function(){u.readyState===4&&w(u.responseText)},u.send(null)},r.loadScript=function(g,w){var u=d.getDocumentHead(),f=document.createElement("script");f.src=g,u.appendChild(f),f.onload=f.onreadystatechange=function(a,s){(s||!f.readyState||f.readyState=="loaded"||f.readyState=="complete")&&(f=f.onload=f.onreadystatechange=null,s||w())}},r.qualifyURL=function(g){var w=document.createElement("a");return w.href=g,w.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,r,m){r.inherits=function(d,g){d.super_=g,d.prototype=Object.create(g.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}})},r.mixin=function(d,g){for(var w in g)d[w]=g[w];return d},r.implement=function(d,g){r.mixin(d,g)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,r,m){var d={},g=function(){this.propagationStopped=!0},w=function(){this.defaultPrevented=!0};d._emit=d._dispatchEvent=function(u,f){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var a=this._eventRegistry[u]||[],s=this._defaultHandlers[u];if(!(!a.length&&!s)){(typeof f!="object"||!f)&&(f={}),f.type||(f.type=u),f.stopPropagation||(f.stopPropagation=g),f.preventDefault||(f.preventDefault=w),a=a.slice();for(var c=0;c<a.length&&(a[c](f,this),!f.propagationStopped);c++);if(s&&!f.defaultPrevented)return s(f,this)}},d._signal=function(u,f){var a=(this._eventRegistry||{})[u];if(a){a=a.slice();for(var s=0;s<a.length;s++)a[s](f,this)}},d.once=function(u,f){var a=this;if(this.on(u,function s(){a.off(u,s),f.apply(null,arguments)}),!f)return new Promise(function(s){f=s})},d.setDefaultHandler=function(u,f){var a=this._defaultHandlers;if(a||(a=this._defaultHandlers={_disabled_:{}}),a[u]){var s=a[u],c=a._disabled_[u];c||(a._disabled_[u]=c=[]),c.push(s);var h=c.indexOf(f);h!=-1&&c.splice(h,1)}a[u]=f},d.removeDefaultHandler=function(u,f){var a=this._defaultHandlers;if(a){var s=a._disabled_[u];if(a[u]==f)s&&this.setDefaultHandler(u,s.pop());else if(s){var c=s.indexOf(f);c!=-1&&s.splice(c,1)}}},d.on=d.addEventListener=function(u,f,a){this._eventRegistry=this._eventRegistry||{};var s=this._eventRegistry[u];return s||(s=this._eventRegistry[u]=[]),s.indexOf(f)==-1&&s[a?"unshift":"push"](f),f},d.off=d.removeListener=d.removeEventListener=function(u,f){this._eventRegistry=this._eventRegistry||{};var a=this._eventRegistry[u];if(a){var s=a.indexOf(f);s!==-1&&a.splice(s,1)}},d.removeAllListeners=function(u){u||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[u]=void 0),this._defaultHandlers&&(this._defaultHandlers[u]=void 0)},r.EventEmitter=d}),ace.define("ace/lib/report_error",["require","exports","module"],function(e,r,m){r.reportError=function(d,g){var w=new Error(d);w.data=g,typeof console=="object"&&console.error&&console.error(w),setTimeout(function(){throw w})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(e,r,m){var d={"autocomplete.popup.aria-roledescription":"Autocomplete suggestions","autocomplete.popup.aria-label":"Autocomplete suggestions","autocomplete.popup.item.aria-roledescription":"item","autocomplete.loading":"Loading...","editor.scroller.aria-roledescription":"editor","editor.scroller.aria-label":"Editor content, press Enter to start editing, press Escape to exit","editor.gutter.aria-roledescription":"editor gutter","editor.gutter.aria-label":"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit","error-marker.good-state":"Looks good!","prompt.recently-used":"Recently used","prompt.other-commands":"Other commands","prompt.no-matching-commands":"No matching commands","search-box.find.placeholder":"Search for","search-box.find-all.text":"All","search-box.replace.placeholder":"Replace with","search-box.replace-next.text":"Replace","search-box.replace-all.text":"All","search-box.toggle-replace.title":"Toggle Replace mode","search-box.toggle-regexp.title":"RegExp Search","search-box.toggle-case.title":"CaseSensitive Search","search-box.toggle-whole-word.title":"Whole Word Search","search-box.toggle-in-selection.title":"Search In Selection","search-box.search-counter":"$0 of $1","text-input.aria-roledescription":"editor","text-input.aria-label":"Cursor at row $0","gutter.code-folding.range.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.closed.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.open.aria-label":"Toggle code folding, row $0","gutter.code-folding.closed.title":"Unfold code","gutter.code-folding.open.title":"Fold code","gutter.annotation.aria-label.error":"Error, read annotations row $0","gutter.annotation.aria-label.warning":"Warning, read annotations row $0","gutter.annotation.aria-label.info":"Info, read annotations row $0","inline-fold.closed.title":"Unfold code","gutter-tooltip.aria-label.error.singular":"error","gutter-tooltip.aria-label.error.plural":"errors","gutter-tooltip.aria-label.warning.singular":"warning","gutter-tooltip.aria-label.warning.plural":"warnings","gutter-tooltip.aria-label.info.singular":"information message","gutter-tooltip.aria-label.info.plural":"information messages","gutter.annotation.aria-label.security":"Security finding, read annotations row $0","gutter.annotation.aria-label.hint":"Suggestion, read annotations row $0","gutter-tooltip.aria-label.security.singular":"security finding","gutter-tooltip.aria-label.security.plural":"security findings","gutter-tooltip.aria-label.hint.singular":"suggestion","gutter-tooltip.aria-label.hint.plural":"suggestions","editor.tooltip.disable-editing":"Editing is disabled"};r.defaultEnglishMessages=d}),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(e,r,m){"no use strict";var d=e("./oop"),g=e("./event_emitter").EventEmitter,w=e("./report_error").reportError,u=e("./default_english_messages").defaultEnglishMessages,f={setOptions:function(o){Object.keys(o).forEach(function(l){this.setOption(l,o[l])},this)},getOptions:function(o){var l={};if(o)Array.isArray(o)||(o=Object.keys(o));else{var p=this.$options;o=Object.keys(p).filter(function(y){return!p[y].hidden})}return o.forEach(function(y){l[y]=this.getOption(y)},this),l},setOption:function(o,l){if(this["$"+o]!==l){var p=this.$options[o];if(!p)return a('misspelled option "'+o+'"');if(p.forwardTo)return this[p.forwardTo]&&this[p.forwardTo].setOption(o,l);p.handlesSet||(this["$"+o]=l),p&&p.set&&p.set.call(this,l)}},getOption:function(o){var l=this.$options[o];return l?l.forwardTo?this[l.forwardTo]&&this[l.forwardTo].getOption(o):l&&l.get?l.get.call(this):this["$"+o]:a('misspelled option "'+o+'"')}};function a(o){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var s,c,h=(function(){function o(){this.$defaultOptions={},s=u,c="dollarSigns"}return o.prototype.defineOptions=function(l,p,y){return l.$options||(this.$defaultOptions[p]=l.$options={}),Object.keys(y).forEach(function(x){var E=y[x];typeof E=="string"&&(E={forwardTo:E}),E.name||(E.name=x),l.$options[E.name]=E,"initialValue"in E&&(l["$"+E.name]=E.initialValue)}),d.implement(l,f),this},o.prototype.resetOptions=function(l){Object.keys(l.$options).forEach(function(p){var y=l.$options[p];"value"in y&&l.setOption(p,y.value)})},o.prototype.setDefaultValue=function(l,p,y){if(!l){for(l in this.$defaultOptions)if(this.$defaultOptions[l][p])break;if(!this.$defaultOptions[l][p])return!1}var x=this.$defaultOptions[l]||(this.$defaultOptions[l]={});x[p]&&(x.forwardTo?this.setDefaultValue(x.forwardTo,p,y):x[p].value=y)},o.prototype.setDefaultValues=function(l,p){Object.keys(p).forEach(function(y){this.setDefaultValue(l,y,p[y])},this)},o.prototype.setMessages=function(l,p){s=l,p&&p.placeholders&&(c=p.placeholders)},o.prototype.nls=function(l,p,y){s[l]||(a("No message found for the key '"+l+"' in messages with id "+s.$id+", trying to find a translation for the default string '"+p+"'."),s[p]||a("No message found for the default string '"+p+"' in the provided messages. Falling back to the default English message."));var x=s[l]||s[p]||p;return y&&(c==="dollarSigns"&&(x=x.replace(/\$(\$|[\d]+)/g,function(E,$){return $=="$"?"$":y[$]})),c==="curlyBrackets"&&(x=x.replace(/\{([^\}]+)\}/g,function(E,$){return y[$]}))),x},o})();h.prototype.warn=a,h.prototype.reportError=w,d.implement(h.prototype,g),r.AppConfig=h}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(e,r,m){m.exports=`.ace-tm .ace_gutter {
12
+ background: #f0f0f0;
13
+ color: #333;
14
+ }
15
+
16
+ .ace-tm .ace_print-margin {
17
+ width: 1px;
18
+ background: #e8e8e8;
19
+ }
20
+
21
+ .ace-tm .ace_fold {
22
+ background-color: #6B72E6;
23
+ }
24
+
25
+ .ace-tm {
26
+ background-color: #FFFFFF;
27
+ color: black;
28
+ }
29
+
30
+ .ace-tm .ace_cursor {
31
+ color: black;
32
+ }
33
+
34
+ .ace-tm .ace_invisible {
35
+ color: rgb(191, 191, 191);
36
+ }
37
+
38
+ .ace-tm .ace_storage,
39
+ .ace-tm .ace_keyword {
40
+ color: blue;
41
+ }
42
+
43
+ .ace-tm .ace_constant {
44
+ color: rgb(197, 6, 11);
45
+ }
46
+
47
+ .ace-tm .ace_constant.ace_buildin {
48
+ color: rgb(88, 72, 246);
49
+ }
50
+
51
+ .ace-tm .ace_constant.ace_language {
52
+ color: rgb(88, 92, 246);
53
+ }
54
+
55
+ .ace-tm .ace_constant.ace_library {
56
+ color: rgb(6, 150, 14);
57
+ }
58
+
59
+ .ace-tm .ace_invalid {
60
+ background-color: rgba(255, 0, 0, 0.1);
61
+ color: red;
62
+ }
63
+
64
+ .ace-tm .ace_support.ace_function {
65
+ color: rgb(60, 76, 114);
66
+ }
67
+
68
+ .ace-tm .ace_support.ace_constant {
69
+ color: rgb(6, 150, 14);
70
+ }
71
+
72
+ .ace-tm .ace_support.ace_type,
73
+ .ace-tm .ace_support.ace_class {
74
+ color: rgb(109, 121, 222);
75
+ }
76
+
77
+ .ace-tm .ace_keyword.ace_operator {
78
+ color: rgb(104, 118, 135);
79
+ }
80
+
81
+ .ace-tm .ace_string {
82
+ color: rgb(3, 106, 7);
83
+ }
84
+
85
+ .ace-tm .ace_comment {
86
+ color: rgb(76, 136, 107);
87
+ }
88
+
89
+ .ace-tm .ace_comment.ace_doc {
90
+ color: rgb(0, 102, 255);
91
+ }
92
+
93
+ .ace-tm .ace_comment.ace_doc.ace_tag {
94
+ color: rgb(128, 159, 191);
95
+ }
96
+
97
+ .ace-tm .ace_constant.ace_numeric {
98
+ color: rgb(0, 0, 205);
99
+ }
100
+
101
+ .ace-tm .ace_variable {
102
+ color: rgb(49, 132, 149);
103
+ }
104
+
105
+ .ace-tm .ace_xml-pe {
106
+ color: rgb(104, 104, 91);
107
+ }
108
+
109
+ .ace-tm .ace_entity.ace_name.ace_function {
110
+ color: #0000A2;
111
+ }
112
+
113
+
114
+ .ace-tm .ace_heading {
115
+ color: rgb(12, 7, 255);
116
+ }
117
+
118
+ .ace-tm .ace_list {
119
+ color:rgb(185, 6, 144);
120
+ }
121
+
122
+ .ace-tm .ace_meta.ace_tag {
123
+ color:rgb(0, 22, 142);
124
+ }
125
+
126
+ .ace-tm .ace_string.ace_regex {
127
+ color: rgb(255, 0, 0)
128
+ }
129
+
130
+ .ace-tm .ace_marker-layer .ace_selection {
131
+ background: rgb(181, 213, 255);
132
+ }
133
+ .ace-tm.ace_multiselect .ace_selection.ace_start {
134
+ box-shadow: 0 0 3px 0px white;
135
+ }
136
+ .ace-tm .ace_marker-layer .ace_step {
137
+ background: rgb(252, 255, 0);
138
+ }
139
+
140
+ .ace-tm .ace_marker-layer .ace_stack {
141
+ background: rgb(164, 229, 101);
142
+ }
143
+
144
+ .ace-tm .ace_marker-layer .ace_bracket {
145
+ margin: -1px 0 0 -1px;
146
+ border: 1px solid rgb(192, 192, 192);
147
+ }
148
+
149
+ .ace-tm .ace_marker-layer .ace_active-line {
150
+ background: rgba(0, 0, 0, 0.07);
151
+ }
152
+
153
+ .ace-tm .ace_gutter-active-line {
154
+ background-color : #dcdcdc;
155
+ }
156
+
157
+ .ace-tm .ace_marker-layer .ace_selected-word {
158
+ background: rgb(250, 250, 255);
159
+ border: 1px solid rgb(200, 200, 250);
160
+ }
161
+
162
+ .ace-tm .ace_indent-guide {
163
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
164
+ }
165
+
166
+ .ace-tm .ace_indent-guide-active {
167
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
168
+ }
169
+ `}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(e,r,m){r.isDark=!1,r.cssClass="ace-tm",r.cssText=e("./textmate-css"),r.$id="ace/theme/textmate";var d=e("../lib/dom");d.importCssString(r.cssText,r.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(e,r,m){"no use strict";var d=e("./lib/lang"),g=e("./lib/net"),w=e("./lib/dom"),u=e("./lib/app_config").AppConfig;m.exports=r=new u;var f={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};r.get=function(h){if(!f.hasOwnProperty(h))throw new Error("Unknown config key: "+h);return f[h]},r.set=function(h,o){if(f.hasOwnProperty(h))f[h]=o;else if(this.setDefaultValue("",h,o)==!1)throw new Error("Unknown config key: "+h);h=="useStrictCSP"&&w.useStrictCSP(o)},r.all=function(){return d.copyObject(f)},r.$modes={},r.moduleUrl=function(h,o){if(f.$moduleUrls[h])return f.$moduleUrls[h];var l=h.split("/");o=o||l[l.length-2]||"";var p=o=="snippets"?"/":"-",y=l[l.length-1];if(o=="worker"&&p=="-"){var x=new RegExp("^"+o+"[\\-_]|[\\-_]"+o+"$","g");y=y.replace(x,"")}(!y||y==o)&&l.length>1&&(y=l[l.length-2]);var E=f[o+"Path"];return E==null?E=f.basePath:p=="/"&&(o=p=""),E&&E.slice(-1)!="/"&&(E+="/"),E+o+p+y+this.get("suffix")},r.setModuleUrl=function(h,o){return f.$moduleUrls[h]=o};var a=function(h,o){if(h==="ace/theme/textmate"||h==="./theme/textmate")return o(null,e("./theme/textmate"));if(s)return s(h,o);console.error("loader is not configured")},s;r.setLoader=function(h){s=h},r.dynamicModules=Object.create(null),r.$loading={},r.$loaded={},r.loadModule=function(h,o){var l;if(Array.isArray(h))var p=h[0],y=h[1];else if(typeof h=="string")var y=h;var x=function(E){if(E&&!r.$loading[y])return o&&o(E);if(r.$loading[y]||(r.$loading[y]=[]),r.$loading[y].push(o),!(r.$loading[y].length>1)){var $=function(){a(y,function(_,C){C&&(r.$loaded[y]=C),r._emit("load.module",{name:y,module:C});var L=r.$loading[y];r.$loading[y]=null,L.forEach(function(D){D&&D(C)})})};if(!r.get("packaged"))return $();g.loadScript(r.moduleUrl(y,p),$),c()}};if(r.dynamicModules[y])r.dynamicModules[y]().then(function(E){E.default?x(E.default):x(E)});else{try{l=this.$require(y)}catch{}x(l||r.$loaded[y])}},r.$require=function(h){if(typeof m.require=="function"){var o="require";return m[o](h)}},r.setModuleLoader=function(h,o){r.dynamicModules[h]=o};var c=function(){!f.basePath&&!f.workerPath&&!f.modePath&&!f.themePath&&!Object.keys(f.$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"),c=function(){})};r.version="1.44.0"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(e,r,m){e("./lib/fixoldbrowsers");var d=e("./config");d.setLoader(function(f,a){e([f],function(s){a(null,s)})});var g=(function(){return this||typeof window<"u"&&window})();m.exports=function(f){d.init=w,d.$require=e,f.require=e},w(!0);function w(f){if(!(!g||!g.document)){d.set("packaged",f||e.packaged||m.packaged||g.define&&(void 0).packaged);var a={},s="",c=document.currentScript||document._currentScript,h=c&&c.ownerDocument||document;c&&c.src&&(s=c.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var o=h.getElementsByTagName("script"),l=0;l<o.length;l++){var p=o[l],y=p.src||p.getAttribute("src");if(y){for(var x=p.attributes,E=0,$=x.length;E<$;E++){var _=x[E];_.name.indexOf("data-ace-")===0&&(a[u(_.name.replace(/^data-ace-/,""))]=_.value)}var C=y.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);C&&(s=C[1])}}s&&(a.base=a.base||s,a.packaged=!0),a.basePath=a.base,a.workerPath=a.workerPath||a.base,a.modePath=a.modePath||a.base,a.themePath=a.themePath||a.base,delete a.base;for(var L in a)typeof a[L]<"u"&&d.set(L,a[L])}}function u(f){return f.replace(/-(.)/g,function(a,s){return s.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(e,r,m){var d=(function(){function g(w,u,f,a){this.start={row:w,column:u},this.end={row:f,column:a}}return g.prototype.isEqual=function(w){return this.start.row===w.start.row&&this.end.row===w.end.row&&this.start.column===w.start.column&&this.end.column===w.end.column},g.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},g.prototype.contains=function(w,u){return this.compare(w,u)==0},g.prototype.compareRange=function(w){var u,f=w.end,a=w.start;return u=this.compare(f.row,f.column),u==1?(u=this.compare(a.row,a.column),u==1?2:u==0?1:0):u==-1?-2:(u=this.compare(a.row,a.column),u==-1?-1:u==1?42:0)},g.prototype.comparePoint=function(w){return this.compare(w.row,w.column)},g.prototype.containsRange=function(w){return this.comparePoint(w.start)==0&&this.comparePoint(w.end)==0},g.prototype.intersects=function(w){var u=this.compareRange(w);return u==-1||u==0||u==1},g.prototype.isEnd=function(w,u){return this.end.row==w&&this.end.column==u},g.prototype.isStart=function(w,u){return this.start.row==w&&this.start.column==u},g.prototype.setStart=function(w,u){typeof w=="object"?(this.start.column=w.column,this.start.row=w.row):(this.start.row=w,this.start.column=u)},g.prototype.setEnd=function(w,u){typeof w=="object"?(this.end.column=w.column,this.end.row=w.row):(this.end.row=w,this.end.column=u)},g.prototype.inside=function(w,u){return this.compare(w,u)==0?!(this.isEnd(w,u)||this.isStart(w,u)):!1},g.prototype.insideStart=function(w,u){return this.compare(w,u)==0?!this.isEnd(w,u):!1},g.prototype.insideEnd=function(w,u){return this.compare(w,u)==0?!this.isStart(w,u):!1},g.prototype.compare=function(w,u){return!this.isMultiLine()&&w===this.start.row?u<this.start.column?-1:u>this.end.column?1:0:w<this.start.row?-1:w>this.end.row?1:this.start.row===w?u>=this.start.column?0:-1:this.end.row===w?u<=this.end.column?0:1:0},g.prototype.compareStart=function(w,u){return this.start.row==w&&this.start.column==u?-1:this.compare(w,u)},g.prototype.compareEnd=function(w,u){return this.end.row==w&&this.end.column==u?1:this.compare(w,u)},g.prototype.compareInside=function(w,u){return this.end.row==w&&this.end.column==u?1:this.start.row==w&&this.start.column==u?-1:this.compare(w,u)},g.prototype.clipRows=function(w,u){if(this.end.row>u)var f={row:u+1,column:0};else if(this.end.row<w)var f={row:w,column:0};if(this.start.row>u)var a={row:u+1,column:0};else if(this.start.row<w)var a={row:w,column:0};return g.fromPoints(a||this.start,f||this.end)},g.prototype.extend=function(w,u){var f=this.compare(w,u);if(f==0)return this;if(f==-1)var a={row:w,column:u};else var s={row:w,column:u};return g.fromPoints(a||this.start,s||this.end)},g.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},g.prototype.isMultiLine=function(){return this.start.row!==this.end.row},g.prototype.clone=function(){return g.fromPoints(this.start,this.end)},g.prototype.collapseRows=function(){return this.end.column==0?new g(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new g(this.start.row,0,this.end.row,0)},g.prototype.toScreenRange=function(w){var u=w.documentToScreenPosition(this.start),f=w.documentToScreenPosition(this.end);return new g(u.row,u.column,f.row,f.column)},g.prototype.moveBy=function(w,u){this.start.row+=w,this.start.column+=u,this.end.row+=w,this.end.column+=u},g})();d.fromPoints=function(g,w){return new d(g.row,g.column,w.row,w.column)},d.comparePoints=function(g,w){return g.row-w.row||g.column-w.column},r.Range=d}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,r,m){for(var d=e("./oop"),g={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:"*"}},w={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},u=0;u<10;u++)w["Digit"+u]=48+u,w["Numpad"+u]=96+u,g.PRINTABLE_KEYS[48+u]=""+u,g.FUNCTION_KEYS[96+u]="Numpad"+u;for(var u=65;u<91;u++){var f=String.fromCharCode(u+32);w["Key"+f.toUpperCase()]=u,g.PRINTABLE_KEYS[u]=f}for(var u=1;u<13;u++)w["F"+u]=111+u,g.FUNCTION_KEYS[111+u]="F"+u;var a={Shift:16,Control:17,Alt:18,Meta:224};for(var s in a)w[s]=w[s+"Left"]=w[s+"Right"]=a[s];r.$codeToKeyCode=w,g.PRINTABLE_KEYS[173]="-";for(var c in g.FUNCTION_KEYS){var h=g.FUNCTION_KEYS[c].toLowerCase();g[h]=parseInt(c,10)}for(var c in g.PRINTABLE_KEYS){var h=g.PRINTABLE_KEYS[c].toLowerCase();g[h]=parseInt(c,10)}d.mixin(g,g.MODIFIER_KEYS),d.mixin(g,g.PRINTABLE_KEYS),d.mixin(g,g.FUNCTION_KEYS),g.enter=g.return,g.escape=g.esc,g.del=g.delete,(function(){for(var o=["cmd","ctrl","alt","shift"],l=Math.pow(2,o.length);l--;)g.KEY_MODS[l]=o.filter(function(p){return l&g.KEY_MODS[p]}).join("-")+"-"})(),g.KEY_MODS[0]="",g.KEY_MODS[-1]="input-",d.mixin(r,g),r.default=r,r.keyCodeToString=function(o){var l=g[o];return typeof l!="string"&&(l=String.fromCharCode(o)),l.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,r,m){var d=e("./keys"),g=e("./useragent"),w=null,u=0,f;function a(){f=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return f={passive:!1},!0}})}catch{}}function s(){return f==null&&a(),f}function c(E,$,_){this.elem=E,this.type=$,this.callback=_}c.prototype.destroy=function(){o(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var h=r.addListener=function(E,$,_,C){E.addEventListener($,_,s()),C&&C.$toDestroy.push(new c(E,$,_))},o=r.removeListener=function(E,$,_){E.removeEventListener($,_,s())};r.stopEvent=function(E){return r.stopPropagation(E),r.preventDefault(E),!1},r.stopPropagation=function(E){E.stopPropagation&&E.stopPropagation()},r.preventDefault=function(E){E.preventDefault&&E.preventDefault()},r.getButton=function(E){return E.type=="dblclick"?0:E.type=="contextmenu"||g.isMac&&E.ctrlKey&&!E.altKey&&!E.shiftKey?2:E.button},r.capture=function(E,$,_){var C=E&&E.ownerDocument||document;function L(D){$&&$(D),_&&_(D),o(C,"mousemove",$),o(C,"mouseup",L),o(C,"dragstart",L)}return h(C,"mousemove",$),h(C,"mouseup",L),h(C,"dragstart",L),L},r.addMouseWheelListener=function(E,$,_){h(E,"wheel",function(C){var L=.15,D=C.deltaX||0,I=C.deltaY||0;switch(C.deltaMode){case C.DOM_DELTA_PIXEL:C.wheelX=D*L,C.wheelY=I*L;break;case C.DOM_DELTA_LINE:var M=15;C.wheelX=D*M,C.wheelY=I*M;break;case C.DOM_DELTA_PAGE:var W=150;C.wheelX=D*W,C.wheelY=I*W;break}$(C)},_)},r.addMultiMouseDownListener=function(E,$,_,C,L){var D=0,I,M,W,z={2:"dblclick",3:"tripleclick",4:"quadclick"};function O(T){if(r.getButton(T)!==0?D=0:T.detail>1?(D++,D>4&&(D=1)):D=1,g.isIE){var A=Math.abs(T.clientX-I)>5||Math.abs(T.clientY-M)>5;(!W||A)&&(D=1),W&&clearTimeout(W),W=setTimeout(function(){W=null},$[D-1]||600),D==1&&(I=T.clientX,M=T.clientY)}if(T._clicks=D,_[C]("mousedown",T),D>4)D=0;else if(D>1)return _[C](z[D],T)}Array.isArray(E)||(E=[E]),E.forEach(function(T){h(T,"mousedown",O,L)})};function l(E){return 0|(E.ctrlKey?1:0)|(E.altKey?2:0)|(E.shiftKey?4:0)|(E.metaKey?8:0)}r.getModifierString=function(E){return d.KEY_MODS[l(E)]};function p(E,$,_){var C=l($);if(!_&&$.code&&(_=d.$codeToKeyCode[$.code]||_),!g.isMac&&w){if($.getModifierState&&($.getModifierState("OS")||$.getModifierState("Win"))&&(C|=8),w.altGr)if((3&C)!=3)w.altGr=0;else return;if(_===18||_===17){var L=$.location;if(_===17&&L===1)w[_]==1&&(u=$.timeStamp);else if(_===18&&C===3&&L===2){var D=$.timeStamp-u;D<50&&(w.altGr=!0)}}}if(_ in d.MODIFIER_KEYS&&(_=-1),!(!C&&_===13&&$.location===3&&(E($,C,-_),$.defaultPrevented))){if(g.isChromeOS&&C&8){if(E($,C,_),$.defaultPrevented)return;C&=-9}return!C&&!(_ in d.FUNCTION_KEYS)&&!(_ in d.PRINTABLE_KEYS)?!1:E($,C,_)}}r.addCommandKeyListener=function(E,$,_){var C=null;h(E,"keydown",function(L){w[L.keyCode]=(w[L.keyCode]||0)+1;var D=p($,L,L.keyCode);return C=L.defaultPrevented,D},_),h(E,"keypress",function(L){C&&(L.ctrlKey||L.altKey||L.shiftKey||L.metaKey)&&(r.stopEvent(L),C=null)},_),h(E,"keyup",function(L){w[L.keyCode]=null},_),w||(y(),h(window,"focus",y))};function y(){w=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!g.isOldIE){var x=1;r.nextTick=function(E,$){$=$||window;var _="zero-timeout-message-"+x++,C=function(L){L.data==_&&(r.stopPropagation(L),o($,"message",C),E())};h($,"message",C),$.postMessage(_,"*")}}r.$idleBlocked=!1,r.onIdle=function(E,$){return setTimeout(function _(){r.$idleBlocked?setTimeout(_,100):E()},$)},r.$idleBlockId=null,r.blockIdle=function(E){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},E||100)},r.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),r.nextFrame?r.nextFrame=r.nextFrame.bind(window):r.nextFrame=function(E){setTimeout(E,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(e,r,m){var d;m.exports={lineMode:!1,pasteCancelled:function(){return d&&d>Date.now()-50?!0:d=!1},cancel:function(){d=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(e,r,m){var d=e("../lib/event"),g=e("../config").nls,w=e("../lib/useragent"),u=e("../lib/dom"),f=e("../lib/lang"),a=e("../clipboard"),s=w.isChrome<18,c=w.isIE,h=w.isChrome>63,o=400,l=e("../lib/keys"),p=l.KEY_MODS,y=w.isIOS,x=y?/\s/:/\n/,E=w.isMobile,$=(function(){function _(C,L){var D=this;this.host=L,this.text=u.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","off"),this.text.setAttribute("autocomplete","off"),this.text.setAttribute("autocorrect","off"),this.text.setAttribute("autocapitalize","off"),this.text.setAttribute("spellcheck","false"),this.text.style.opacity="0",C.insertBefore(this.text,C.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",E||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch{}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),d.addListener(this.text,"blur",function(I){D.ignoreFocusEvents||(L.onBlur(I),D.$isFocused=!1)},L),d.addListener(this.text,"focus",function(I){if(!D.ignoreFocusEvents){if(D.$isFocused=!0,w.isEdge)try{if(!document.hasFocus())return}catch{}L.onFocus(I),w.isEdge?setTimeout(D.resetSelection.bind(D)):D.resetSelection()}},L),this.$focusScroll=!1,L.on("beforeEndOperation",function(){var I=L.curOp,M=I&&I.command&&I.command.name;if(M!="insertstring"){var W=M&&(I.docChanged||I.selectionChanged);D.inComposition&&W&&(D.lastValue=D.text.value="",D.onCompositionEnd()),D.resetSelection()}}),L.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=y?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&L.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,d.addCommandKeyListener(this.text,function(I,M,W){if(!D.inComposition)return L.onCommandKey(I,M,W)},L),d.addListener(this.text,"select",this.onSelect.bind(this),L),d.addListener(this.text,"input",this.onInput.bind(this),L),d.addListener(this.text,"cut",this.onCut.bind(this),L),d.addListener(this.text,"copy",this.onCopy.bind(this),L),d.addListener(this.text,"paste",this.onPaste.bind(this),L),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&d.addListener(C,"keydown",function(I){if(!(w.isMac&&!I.metaKey||!I.ctrlKey))switch(I.keyCode){case 67:D.onCopy(I);break;case 86:D.onPaste(I);break;case 88:D.onCut(I);break}},L),this.syncComposition=f.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),d.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),L),d.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),L),d.addListener(this.text,"keyup",this.onKeyup.bind(this),L),d.addListener(this.text,"keydown",this.syncComposition.bind(this),L),d.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),L),this.closeTimeout,d.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),L),d.addListener(this.text,"mousedown",function(I){I.preventDefault(),D.onContextMenuClose()},L),d.addListener(L.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),L),d.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),L),y&&this.addIosSelectionHandler(C,L,this.text)}return _.prototype.addIosSelectionHandler=function(C,L,D){var I=this,M=null,W=!1;D.addEventListener("keydown",function(O){M&&clearTimeout(M),W=!0},!0),D.addEventListener("keyup",function(O){M=setTimeout(function(){W=!1},100)},!0);var z=function(O){if(document.activeElement===D&&!(W||I.inComposition||L.$mouseHandler.isMousePressed)&&!I.copied){var T=D.selectionStart,A=D.selectionEnd,N=null,B=0;if(T==0?N=l.up:T==1?N=l.home:A>I.lastSelectionEnd&&I.lastValue[A]==`
170
+ `?N=l.end:T<I.lastSelectionStart&&I.lastValue[T-1]==" "?(N=l.left,B=p.option):T<I.lastSelectionStart||T==I.lastSelectionStart&&I.lastSelectionEnd!=I.lastSelectionStart&&T==A?N=l.left:A>I.lastSelectionEnd&&I.lastValue.slice(0,A).split(`
171
+ `).length>2?N=l.down:A>I.lastSelectionEnd&&I.lastValue[A-1]==" "?(N=l.right,B=p.option):(A>I.lastSelectionEnd||A==I.lastSelectionEnd&&I.lastSelectionEnd!=I.lastSelectionStart&&T==A)&&(N=l.right),T!==A&&(B|=p.shift),N){var U=L.onCommandKey({},B,N);if(!U&&L.commands){N=l.keyCodeToString(N);var G=L.commands.findKeyCommand(B,N);G&&L.execCommand(G)}I.lastSelectionStart=T,I.lastSelectionEnd=A,I.resetSelection("")}}};document.addEventListener("selectionchange",z),L.on("destroy",function(){document.removeEventListener("selectionchange",z)})},_.prototype.onContextMenuClose=function(){var C=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){C.tempStyle&&(C.text.style.cssText=C.tempStyle,C.tempStyle=""),C.host.renderer.$isMousePressed=!1,C.host.renderer.$keepTextAreaAtCursor&&C.host.renderer.$moveTextAreaToCursor()},0)},_.prototype.$onContextMenu=function(C){this.host.textInput.onContextMenu(C),this.onContextMenuClose()},_.prototype.onKeyup=function(C){C.keyCode==27&&this.text.value.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},_.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},_.prototype.onCompositionStart=function(C){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){C.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var L=this.host.getSelectionRange();L.end.row=L.start.row,L.end.column=L.start.column,this.inComposition.markerRange=L,this.inComposition.selectionStart=this.lastSelectionStart,this.host.onCompositionStart(this.inComposition),this.inComposition.useTextareaForIME?(this.lastValue=this.text.value="",this.lastSelectionStart=0,this.lastSelectionEnd=0):(this.text.msGetInputContext&&(this.inComposition.context=this.text.msGetInputContext()),this.text.getInputContext&&(this.inComposition.context=this.text.getInputContext()))}},_.prototype.onCompositionUpdate=function(){if(!(!this.inComposition||!this.host.onCompositionUpdate||this.host.$readOnly)){if(this.commandMode)return this.cancelComposition();if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var C=this.text.value;this.sendText(C),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},_.prototype.onCompositionEnd=function(C){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),C&&this.onInput())},_.prototype.onCut=function(C){this.doCopy(C,!0)},_.prototype.onCopy=function(C){this.doCopy(C,!1)},_.prototype.onPaste=function(C){var L=this.handleClipboardData(C);a.pasteCancelled()||(typeof L=="string"?(L&&this.host.onPaste(L,C),w.isIE&&setTimeout(this.resetSelection),d.preventDefault(C)):(this.text.value="",this.pasted=!0))},_.prototype.doCopy=function(C,L){var D=this,I=this.host.getCopyText();if(!I)return d.preventDefault(C);this.handleClipboardData(C,I)?(y&&(this.resetSelection(I),this.copied=I,setTimeout(function(){D.copied=!1},10)),L?this.host.onCut():this.host.onCopy(),d.preventDefault(C)):(this.copied=!0,this.text.value=I,this.text.select(),setTimeout(function(){D.copied=!1,D.resetSelection(),L?D.host.onCut():D.host.onCopy()}))},_.prototype.handleClipboardData=function(C,L,D){var I=C.clipboardData||window.clipboardData;if(!(!I||s)){var M=c||D?"Text":"text/plain";try{return L?I.setData(M,L)!==!1:I.getData(M)}catch(W){if(!D)return this.handleClipboardData(W,L,!0)}}},_.prototype.onInput=function(C){if(this.inComposition)return this.onCompositionUpdate();if(C&&C.inputType){if(C.inputType=="historyUndo")return this.host.execCommand("undo");if(C.inputType=="historyRedo")return this.host.execCommand("redo")}var L=this.text.value,D=this.sendText(L,!0);(L.length>o+100||x.test(D)||E&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},_.prototype.sendText=function(C,L){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),C&&this.host.onPaste(C),this.pasted=!1,"";for(var D=this.text.selectionStart,I=this.text.selectionEnd,M=this.lastSelectionStart,W=this.lastValue.length-this.lastSelectionEnd,z=C,O=C.length-D,T=C.length-I,A=0;M>0&&this.lastValue[A]==C[A];)A++,M--;for(z=z.slice(A),A=1;W>0&&this.lastValue.length-A>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-A]==C[C.length-A];)A++,W--;O-=A-1,T-=A-1;var N=z.length-A+1;if(N<0&&(M=-N,N=0),z=z.slice(0,N),!L&&!z&&!O&&!M&&!W&&!T)return"";this.sendingText=!0;var B=!1;return w.isAndroid&&z==". "&&(z=" ",B=!0),z&&!M&&!W&&!O&&!T||this.commandMode?this.host.onTextInput(z):this.host.onTextInput(z,{extendLeft:M,extendRight:W,restoreStart:O,restoreEnd:T}),this.sendingText=!1,this.lastValue=C,this.lastSelectionStart=D,this.lastSelectionEnd=I,this.lastRestoreEnd=T,B?`
172
+ `:z},_.prototype.onSelect=function(C){var L=this;if(!this.inComposition){var D=function(I){return I.selectionStart===0&&I.selectionEnd>=L.lastValue.length&&I.value===L.lastValue&&L.lastValue&&I.selectionEnd!==L.lastSelectionEnd};this.copied?this.copied=!1:D(this.text)?(this.host.selectAll(),this.resetSelection()):E&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},_.prototype.$resetSelectionIOS=function(C){if(!(!this.$isFocused||this.copied&&!C||this.sendingText)){C||(C="");var L=`
173
+ ab`+C+`cde fg
174
+ `;L!=this.text.value&&(this.text.value=this.lastValue=L);var D=4,I=4+(C.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=D||this.lastSelectionEnd!=I)&&this.text.setSelectionRange(D,I),this.lastSelectionStart=D,this.lastSelectionEnd=I}},_.prototype.$resetSelection=function(){var C=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var L=0,D=0,I="",M=function(G,J){for(var Q=J,le=1;le<=G-C.rowStart&&le<2*C.numberOfExtraLines+1;le++)Q+=C.host.session.getLine(G-le).length+1;return Q};if(this.host.session){var W=this.host.selection,z=W.getRange(),O=W.cursor.row;O===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):O===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(O<this.rowStart-1||O>this.rowEnd+1)&&(this.rowStart=O>this.numberOfExtraLines?O-this.numberOfExtraLines:0,this.rowEnd=O>this.numberOfExtraLines?O+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var T=[],A=this.rowStart;A<=this.rowEnd;A++)T.push(this.host.session.getLine(A));if(I=T.join(`
175
+ `),L=M(z.start.row,z.start.column),D=M(z.end.row,z.end.column),z.start.row<this.rowStart){var N=this.host.session.getLine(this.rowStart-1);L=z.start.row<this.rowStart-1?0:L,D+=N.length+1,I=N+`
176
+ `+I}else if(z.end.row>this.rowEnd){var B=this.host.session.getLine(this.rowEnd+1);D=z.end.row>this.rowEnd+1?B.length:z.end.column,D+=I.length+1,I=I+`
177
+ `+B}else E&&O>0&&(I=`
178
+ `+I,D+=1,L+=1);I.length>o&&(L<o&&D<o?I=I.slice(0,o):(I=`
179
+ `,L==D?L=D=0:(L=0,D=1)));var U=I+`
180
+
181
+ `;U!=this.lastValue&&(this.text.value=this.lastValue=U,this.lastSelectionStart=this.lastSelectionEnd=U.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=D||this.lastSelectionStart!=L||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(L,D),this.lastSelectionStart=L,this.lastSelectionEnd=D}catch{}this.inComposition=!1}},_.prototype.setHost=function(C){this.host=C},_.prototype.setNumberOfExtraLines=function(C){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,C<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=C},_.prototype.setAriaLabel=function(){var C="";if(this.host.$textInputAriaLabel&&(C+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var L=this.host.session.selection.cursor.row;C+=g("text-input.aria-label","Cursor at row $0",[L+1])}this.text.setAttribute("aria-label",C)},_.prototype.setAriaOptions=function(C){C.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",C.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",C.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),C.role&&this.text.setAttribute("role",C.role),C.setLabel&&(this.text.setAttribute("aria-roledescription",g("text-input.aria-roledescription","editor")),this.setAriaLabel())},_.prototype.focus=function(){var C=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||h||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var L=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var D=this.text.getBoundingClientRect().top!=0}catch{return}var I=[];if(D)for(var M=this.text.parentElement;M&&M.nodeType==1;)I.push(M),M.setAttribute("ace_nocontext","true"),!M.parentElement&&M.getRootNode?M=M.getRootNode().host:M=M.parentElement;this.text.focus({preventScroll:!0}),D&&I.forEach(function(W){W.removeAttribute("ace_nocontext")}),setTimeout(function(){C.text.style.position="",C.text.style.top=="0px"&&(C.text.style.top=L)},0)},_.prototype.blur=function(){this.text.blur()},_.prototype.isFocused=function(){return this.$isFocused},_.prototype.setInputHandler=function(C){this.inputHandler=C},_.prototype.getInputHandler=function(){return this.inputHandler},_.prototype.getElement=function(){return this.text},_.prototype.setCommandMode=function(C){this.commandMode=C,this.text.readOnly=!1},_.prototype.setReadOnly=function(C){this.commandMode||(this.text.readOnly=C)},_.prototype.setCopyWithEmptySelection=function(C){},_.prototype.onContextMenu=function(C){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:C}),this.moveToMouse(C,!0)},_.prototype.moveToMouse=function(C,L){var D=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(L?"z-index:100000;":"")+(w.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var I=this.host.container.getBoundingClientRect(),M=u.computedStyle(this.host.container),W=I.top+(parseInt(M.borderTopWidth)||0),z=I.left+(parseInt(M.borderLeftWidth)||0),O=I.bottom-W-this.text.clientHeight-2,T=function(A){u.translate(D.text,A.clientX-z-2,Math.min(A.clientY-W-2,O))};T(C),C.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),w.isWin&&d.capture(this.host.container,T,this.onContextMenuClose.bind(this)))},_.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},_})();r.TextInput=$,r.$setUserAgentForTests=function(_,C){E=_,y=C}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,r,m){var d=e("../lib/useragent"),g=0,w=550,u=(function(){function s(c){c.$clickSelection=null;var h=c.editor;h.setDefaultHandler("mousedown",this.onMouseDown.bind(c)),h.setDefaultHandler("dblclick",this.onDoubleClick.bind(c)),h.setDefaultHandler("tripleclick",this.onTripleClick.bind(c)),h.setDefaultHandler("quadclick",this.onQuadClick.bind(c)),h.setDefaultHandler("mousewheel",this.onMouseWheel.bind(c));var o=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];o.forEach(function(l){c[l]=this[l]},this),c.selectByLines=this.extendSelectionBy.bind(c,"getLineRange"),c.selectByWords=this.extendSelectionBy.bind(c,"getWordRange")}return s.prototype.onMouseDown=function(c){var h=c.inSelection(),o=c.getDocumentPosition();this.mousedownEvent=c;var l=this.editor,p=c.getButton();if(p!==0){var y=l.getSelectionRange(),x=y.isEmpty();(x||p==1)&&l.selection.moveToPosition(o),p==2&&(l.textInput.onContextMenu(c.domEvent),d.isMozilla||c.preventDefault());return}if(this.mousedownEvent.time=Date.now(),h&&!l.isFocused()&&(l.focus(),this.$focusTimeout&&!this.$clickSelection&&!l.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(c);return}return this.captureMouse(c),this.startSelect(o,c.domEvent._clicks>1),c.preventDefault()},s.prototype.startSelect=function(c,h){c=c||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var o=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?o.selection.selectToPosition(c):h||o.selection.moveToPosition(c),h||this.select(),o.setStyle("ace_selecting"),this.setState("select"))},s.prototype.select=function(){var c,h=this.editor,o=h.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var l=this.$clickSelection.comparePoint(o);if(l==-1)c=this.$clickSelection.end;else if(l==1)c=this.$clickSelection.start;else{var p=a(this.$clickSelection,o,h.session);o=p.cursor,c=p.anchor}h.selection.setSelectionAnchor(c.row,c.column)}h.selection.selectToPosition(o),h.renderer.scrollCursorIntoView()},s.prototype.extendSelectionBy=function(c){var h,o=this.editor,l=o.renderer.screenToTextCoordinates(this.x,this.y),p=o.selection[c](l.row,l.column);if(this.$clickSelection){var y=this.$clickSelection.comparePoint(p.start),x=this.$clickSelection.comparePoint(p.end);if(y==-1&&x<=0)h=this.$clickSelection.end,(p.end.row!=l.row||p.end.column!=l.column)&&(l=p.start);else if(x==1&&y>=0)h=this.$clickSelection.start,(p.start.row!=l.row||p.start.column!=l.column)&&(l=p.end);else if(y==-1&&x==1)l=p.end,h=p.start;else{var E=a(this.$clickSelection,l,o.session);l=E.cursor,h=E.anchor}o.selection.setSelectionAnchor(h.row,h.column)}o.selection.selectToPosition(l),o.renderer.scrollCursorIntoView()},s.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},s.prototype.focusWait=function(){var c=f(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),h=Date.now();(c>g||h-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},s.prototype.onDoubleClick=function(c){var h=c.getDocumentPosition(),o=this.editor,l=o.session,p=l.getBracketRange(h);p?(p.isEmpty()&&(p.start.column--,p.end.column++),this.setState("select")):(p=o.selection.getWordRange(h.row,h.column),this.setState("selectByWords")),this.$clickSelection=p,this.select()},s.prototype.onTripleClick=function(c){var h=c.getDocumentPosition(),o=this.editor;this.setState("selectByLines");var l=o.getSelectionRange();l.isMultiLine()&&l.contains(h.row,h.column)?(this.$clickSelection=o.selection.getLineRange(l.start.row),this.$clickSelection.end=o.selection.getLineRange(l.end.row).end):this.$clickSelection=o.selection.getLineRange(h.row),this.select()},s.prototype.onQuadClick=function(c){var h=this.editor;h.selectAll(),this.$clickSelection=h.getSelectionRange(),this.setState("selectAll")},s.prototype.onMouseWheel=function(c){if(!c.getAccelKey()){c.getShiftKey()&&c.wheelY&&!c.wheelX&&(c.wheelX=c.wheelY,c.wheelY=0);var h=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var o=this.$lastScroll,l=c.domEvent.timeStamp,p=l-o.t,y=p?c.wheelX/p:o.vx,x=p?c.wheelY/p:o.vy;p<w&&(y=(y+o.vx)/2,x=(x+o.vy)/2);var E=Math.abs(y/x),$=!1;if(E>=1&&h.renderer.isScrollableBy(c.wheelX*c.speed,0)&&($=!0),E<=1&&h.renderer.isScrollableBy(0,c.wheelY*c.speed)&&($=!0),$)o.allowed=l;else if(l-o.allowed<w){var _=Math.abs(y)<=1.5*Math.abs(o.vx)&&Math.abs(x)<=1.5*Math.abs(o.vy);_?($=!0,o.allowed=l):o.allowed=0}if(o.t=l,o.vx=y,o.vy=x,$)return h.renderer.scrollBy(c.wheelX*c.speed,c.wheelY*c.speed),c.stop()}},s})();u.prototype.selectEnd=u.prototype.selectByLinesEnd,u.prototype.selectAllEnd=u.prototype.selectByLinesEnd,u.prototype.selectByWordsEnd=u.prototype.selectByLinesEnd,r.DefaultHandlers=u;function f(s,c,h,o){return Math.sqrt(Math.pow(h-s,2)+Math.pow(o-c,2))}function a(s,c,h){if(s.start.row==s.end.row)var o=2*c.column-s.start.column-s.end.column;else if(s.start.row==s.end.row-1&&!s.start.column&&!s.end.column)var o=3*c.column-2*h.getLine(s.start.row).length;else var o=2*c.row-s.start.row-s.end.row;return o<0?{cursor:s.start,anchor:s.end}:{cursor:s.end,anchor:s.start}}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,r,m){var d=e("../lib/event"),g=e("../lib/useragent"),w=(function(){function u(f,a){this.speed,this.wheelX,this.wheelY,this.domEvent=f,this.editor=a,this.x=this.clientX=f.clientX,this.y=this.clientY=f.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return u.prototype.stopPropagation=function(){d.stopPropagation(this.domEvent),this.propagationStopped=!0},u.prototype.preventDefault=function(){d.preventDefault(this.domEvent),this.defaultPrevented=!0},u.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},u.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},u.prototype.getGutterRow=function(){var f=this.getDocumentPosition().row,a=this.editor.session.documentToScreenRow(f,0),s=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return a-s},u.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var f=this.editor,a=f.getSelectionRange();if(a.isEmpty())this.$inSelection=!1;else{var s=this.getDocumentPosition();this.$inSelection=a.contains(s.row,s.column)}return this.$inSelection},u.prototype.getButton=function(){return d.getButton(this.domEvent)},u.prototype.getShiftKey=function(){return this.domEvent.shiftKey},u.prototype.getAccelKey=function(){return g.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},u})();r.MouseEvent=w}),ace.define("ace/lib/scroll",["require","exports","module"],function(e,r,m){r.preventParentScroll=function(d){d.stopPropagation();var g=d.currentTarget,w=g.scrollHeight>g.clientHeight;w||d.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(e,r,m){var d=this&&this.__extends||(function(){var l=function(p,y){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,E){x.__proto__=E}||function(x,E){for(var $ in E)Object.prototype.hasOwnProperty.call(E,$)&&(x[$]=E[$])},l(p,y)};return function(p,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");l(p,y);function x(){this.constructor=p}p.prototype=y===null?Object.create(y):(x.prototype=y.prototype,new x)}})(),g=this&&this.__values||function(l){var p=typeof Symbol=="function"&&Symbol.iterator,y=p&&l[p],x=0;if(y)return y.call(l);if(l&&typeof l.length=="number")return{next:function(){return l&&x>=l.length&&(l=void 0),{value:l&&l[x++],done:!l}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")},w=e("./lib/dom");e("./lib/event");var u=e("./range").Range,f=e("./lib/scroll").preventParentScroll,a="ace_tooltip",s=(function(){function l(p){this.isOpen=!1,this.$element=null,this.$parentNode=p}return l.prototype.$init=function(){return this.$element=w.createElement("div"),this.$element.className=a,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},l.prototype.getElement=function(){return this.$element||this.$init()},l.prototype.setText=function(p){this.getElement().textContent=p},l.prototype.setHtml=function(p){this.getElement().innerHTML=p},l.prototype.setPosition=function(p,y){this.getElement().style.left=p+"px",this.getElement().style.top=y+"px"},l.prototype.setClassName=function(p){w.addCssClass(this.getElement(),p)},l.prototype.setTheme=function(p){this.theme&&(this.theme.isDark&&w.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&w.removeCssClass(this.getElement(),this.theme.cssClass)),p.isDark&&w.addCssClass(this.getElement(),"ace_dark"),p.cssClass&&w.addCssClass(this.getElement(),p.cssClass),this.theme={isDark:p.isDark,cssClass:p.cssClass}},l.prototype.show=function(p,y,x){p!=null&&this.setText(p),y!=null&&x!=null&&this.setPosition(y,x),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},l.prototype.hide=function(p){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=a,this.isOpen=!1)},l.prototype.getHeight=function(){return this.getElement().offsetHeight},l.prototype.getWidth=function(){return this.getElement().offsetWidth},l.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},l})(),c=(function(){function l(){this.popups=[]}return l.prototype.addPopup=function(p){this.popups.push(p),this.updatePopups()},l.prototype.removePopup=function(p){var y=this.popups.indexOf(p);y!==-1&&(this.popups.splice(y,1),this.updatePopups())},l.prototype.updatePopups=function(){var p,y,x,E;this.popups.sort(function(z,O){return O.priority-z.priority});var $=[];try{for(var _=g(this.popups),C=_.next();!C.done;C=_.next()){var L=C.value,D=!0;try{for(var I=(x=void 0,g($)),M=I.next();!M.done;M=I.next()){var W=M.value;if(this.doPopupsOverlap(W,L)){D=!1;break}}}catch(z){x={error:z}}finally{try{M&&!M.done&&(E=I.return)&&E.call(I)}finally{if(x)throw x.error}}D?$.push(L):L.hide()}}catch(z){p={error:z}}finally{try{C&&!C.done&&(y=_.return)&&y.call(_)}finally{if(p)throw p.error}}},l.prototype.doPopupsOverlap=function(p,y){var x=p.getElement().getBoundingClientRect(),E=y.getElement().getBoundingClientRect();return x.left<E.right&&x.right>E.left&&x.top<E.bottom&&x.bottom>E.top},l})(),h=new c;r.popupManager=h,r.Tooltip=s;var o=(function(l){d(p,l);function p(y){y===void 0&&(y=document.body);var x=l.call(this,y)||this;x.timeout=void 0,x.lastT=0,x.idleTime=350,x.lastEvent=void 0,x.onMouseOut=x.onMouseOut.bind(x),x.onMouseMove=x.onMouseMove.bind(x),x.waitForHover=x.waitForHover.bind(x),x.hide=x.hide.bind(x);var E=x.getElement();return E.style.whiteSpace="pre-wrap",E.style.pointerEvents="auto",E.addEventListener("mouseout",x.onMouseOut),E.tabIndex=-1,E.addEventListener("blur",(function(){E.contains(document.activeElement)||this.hide()}).bind(x)),E.addEventListener("wheel",f),x}return p.prototype.addToEditor=function(y){y.on("mousemove",this.onMouseMove),y.on("mousedown",this.hide);var x=y.renderer.getMouseEventTarget();x&&typeof x.removeEventListener=="function"&&x.addEventListener("mouseout",this.onMouseOut,!0)},p.prototype.removeFromEditor=function(y){y.off("mousemove",this.onMouseMove),y.off("mousedown",this.hide);var x=y.renderer.getMouseEventTarget();x&&typeof x.removeEventListener=="function"&&x.removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},p.prototype.onMouseMove=function(y,x){this.lastEvent=y,this.lastT=Date.now();var E=x.$mouseHandler.isMousePressed;if(this.isOpen){var $=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains($.row,$.column)||E||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||E||(this.lastEvent=y,this.timeout=setTimeout(this.waitForHover,this.idleTime))},p.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var y=Date.now()-this.lastT;if(this.idleTime-y>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-y);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},p.prototype.isOutsideOfText=function(y){var x=y.editor,E=y.getDocumentPosition(),$=x.session.getLine(E.row);if(E.column==$.length){var _=x.renderer.pixelToScreenCoordinates(y.clientX,y.clientY),C=x.session.documentToScreenPosition(E.row,E.column);if(C.column!=_.column||C.row!=_.row)return!0}return!1},p.prototype.setDataProvider=function(y){this.$gatherData=y},p.prototype.showForRange=function(y,x,E,$){if(!($&&$!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var _=y.renderer;this.isOpen||(h.addPopup(this),this.$registerCloseEvents(),this.setTheme(_.theme)),this.isOpen=!0,this.range=u.fromPoints(x.start,x.end);var C=_.textToScreenCoordinates(x.start.row,x.start.column),L=_.scroller.getBoundingClientRect();C.pageX<L.left&&(C.pageX=L.left);var D=this.getElement();D.innerHTML="",D.appendChild(E),D.style.maxHeight="",D.style.display="block",this.$setPosition(y,C,!0,x),w.$fixPositionBug(D)}},p.prototype.$setPosition=function(y,x,E,$){var _=10;E&&this.addMarker($,y.session);var C=y.renderer,L=this.getElement(),D=L.offsetHeight,I=L.offsetWidth,M=x.pageY,W=x.pageX,z=window.innerHeight-M-C.lineHeight,O=this.$shouldPlaceAbove(D,M,z-_);L.style.maxHeight=(O?M:z)-_+"px",L.style.top=O?"":M+C.lineHeight+"px",L.style.bottom=O?window.innerHeight-M+"px":"",L.style.left=Math.min(W,window.innerWidth-I-_)+"px"},p.prototype.$shouldPlaceAbove=function(y,x,E){return!(x-y<0&&x<E)},p.prototype.addMarker=function(y,x){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=x,this.marker=x&&x.addMarker(y,"ace_highlight-marker","text")},p.prototype.hide=function(y){y&&this.$fromKeyboard&&y.type=="keydown"&&y.code=="Escape"||!y&&document.activeElement==this.getElement()||y&&y.target&&(y.type!="keydown"||y.ctrlKey||y.metaKey)&&this.$element.contains(y.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$fromKeyboard=!1,this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,h.removePopup(this)))},p.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},p.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},p.prototype.onMouseOut=function(y){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!y.relatedTarget||this.getElement().contains(y.relatedTarget)||y&&y.currentTarget.contains(y.relatedTarget)||y.relatedTarget.classList.contains("ace_content")||this.hide())},p})(s);r.HoverTooltip=o}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/mouse/mouse_event","ace/tooltip","ace/config","ace/range"],function(e,r,m){var d=this&&this.__extends||(function(){var o=function(l,p){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,x){y.__proto__=x}||function(y,x){for(var E in x)Object.prototype.hasOwnProperty.call(x,E)&&(y[E]=x[E])},o(l,p)};return function(l,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");o(l,p);function y(){this.constructor=l}l.prototype=p===null?Object.create(p):(y.prototype=p.prototype,new y)}})(),g=this&&this.__values||function(o){var l=typeof Symbol=="function"&&Symbol.iterator,p=l&&o[l],y=0;if(p)return p.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&y>=o.length&&(o=void 0),{value:o&&o[y++],done:!o}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")},w=e("../lib/dom"),u=e("./mouse_event").MouseEvent,f=e("../tooltip").HoverTooltip,a=e("../config").nls,s=e("../range").Range;function c(o){var l=o.editor,p=l.renderer.$gutterLayer;o.$tooltip=new h(l),o.$tooltip.addToEditor(l),o.$tooltip.setDataProvider(function(y,x){var E=y.getDocumentPosition().row;o.$tooltip.showTooltip(E)}),o.editor.setDefaultHandler("guttermousedown",function(y){if(!(!l.isFocused()||y.getButton()!=0)){var x=p.getRegion(y);if(x!="foldWidgets"){var E=y.getDocumentPosition().row,$=l.session.selection;if(y.getShiftKey())$.selectTo(E,0);else{if(y.domEvent.detail==2)return l.selectAll(),y.preventDefault();o.$clickSelection=l.selection.getLineRange(E)}return o.setState("selectByLines"),o.captureMouse(y),y.preventDefault()}}})}r.GutterHandler=c;var h=(function(o){d(l,o);function l(p){var y=o.call(this,p.container)||this;y.id="gt"+ ++l.$uid,y.editor=p,y.visibleTooltipRow;var x=y.getElement();return x.setAttribute("role","tooltip"),x.setAttribute("id",y.id),x.style.pointerEvents="auto",y.idleTime=50,y.onDomMouseMove=y.onDomMouseMove.bind(y),y.onDomMouseOut=y.onDomMouseOut.bind(y),y.setClassName("ace_gutter-tooltip"),y}return l.prototype.onDomMouseMove=function(p){var y=new u(p,this.editor);this.onMouseMove(y,this.editor)},l.prototype.onDomMouseOut=function(p){var y=new u(p,this.editor);this.onMouseOut(y)},l.prototype.addToEditor=function(p){var y=p.renderer.$gutter;y.addEventListener("mousemove",this.onDomMouseMove),y.addEventListener("mouseout",this.onDomMouseOut),o.prototype.addToEditor.call(this,p)},l.prototype.removeFromEditor=function(p){var y=p.renderer.$gutter;y.removeEventListener("mousemove",this.onDomMouseMove),y.removeEventListener("mouseout",this.onDomMouseOut),o.prototype.removeFromEditor.call(this,p)},l.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),o.prototype.destroy.call(this)},Object.defineProperty(l,"annotationLabels",{get:function(){return{error:{singular:a("gutter-tooltip.aria-label.error.singular","error"),plural:a("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:a("gutter-tooltip.aria-label.security.singular","security finding"),plural:a("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:a("gutter-tooltip.aria-label.warning.singular","warning"),plural:a("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:a("gutter-tooltip.aria-label.info.singular","information message"),plural:a("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:a("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:a("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),l.prototype.showTooltip=function(p){var y,x=this.editor.renderer.$gutterLayer,E=x.$annotations[p],$;E?$={displayText:Array.from(E.displayText),type:Array.from(E.type)}:$={displayText:[],type:[]};var _=x.session.getFoldLine(p);if(_&&x.$showFoldedAnnotations){for(var C={error:[],security:[],warning:[],info:[],hint:[]},L={error:1,security:2,warning:3,info:4,hint:5},D,I=p+1;I<=_.end.row;I++)if(x.$annotations[I])for(var M=0;M<x.$annotations[I].text.length;M++){var W=x.$annotations[I].type[M];C[W].push(x.$annotations[I].text[M]),(!D||L[W]<L[D])&&(D=W)}if(["error","security","warning"].includes(D)){var z="".concat(l.annotationsToSummaryString(C)," in folded code.");$.displayText.push(z),$.type.push(D+"_fold")}}if($.displayText.length===0)return this.hide();for(var O={error:[],security:[],warning:[],info:[],hint:[]},T=x.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",I=0;I<$.displayText.length;I++){var A=w.createElement("span"),N=w.createElement("span");(y=N.classList).add.apply(y,["ace_".concat($.type[I]),T]),N.setAttribute("aria-label","".concat(l.annotationLabels[$.type[I].replace("_fold","")].singular)),N.setAttribute("role","img"),N.appendChild(w.createTextNode(" ")),A.appendChild(N),A.appendChild(w.createTextNode($.displayText[I])),A.appendChild(w.createElement("br")),O[$.type[I].replace("_fold","")].push(A)}var B=w.createElement("span");O.error.forEach(function(J){return B.appendChild(J)}),O.security.forEach(function(J){return B.appendChild(J)}),O.warning.forEach(function(J){return B.appendChild(J)}),O.info.forEach(function(J){return B.appendChild(J)}),O.hint.forEach(function(J){return B.appendChild(J)}),B.setAttribute("aria-live","polite");var U=this.$findLinkedAnnotationNode(p);U&&U.setAttribute("aria-describedby",this.id);var G=s.fromPoints({row:p,column:0},{row:p,column:0});this.showForRange(this.editor,G,B),this.visibleTooltipRow=p,this.editor._signal("showGutterTooltip",this)},l.prototype.$setPosition=function(p,y,x,E){var $=this.$findCellByRow(E.start.row);if($){var _=$&&$.element,C=_&&_.querySelector(".ace_gutter_annotation");if(C){var L=C.getBoundingClientRect();if(L){var D={pageX:L.right,pageY:L.top};return o.prototype.$setPosition.call(this,p,D,!1,E)}}}},l.prototype.$shouldPlaceAbove=function(p,y,x){return x<p},l.prototype.$findLinkedAnnotationNode=function(p){var y=this.$findCellByRow(p);if(y){var x=y.element;if(x.childNodes.length>2)return x.childNodes[2]}},l.prototype.$findCellByRow=function(p){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(y){return y.row===p})},l.prototype.hide=function(p){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.visibleTooltipRow!=null){var y=this.$findLinkedAnnotationNode(this.visibleTooltipRow);y&&y.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),o.prototype.hide.call(this,p)}},l.annotationsToSummaryString=function(p){var y,x,E=[],$=["error","security","warning","info","hint"];try{for(var _=g($),C=_.next();!C.done;C=_.next()){var L=C.value;if(p[L].length){var D=p[L].length===1?l.annotationLabels[L].singular:l.annotationLabels[L].plural;E.push("".concat(p[L].length," ").concat(D))}}}catch(I){y={error:I}}finally{try{C&&!C.done&&(x=_.return)&&x.call(_)}finally{if(y)throw y.error}}return E.join(", ")},l.prototype.isOutsideOfText=function(p){var y=p.editor,x=y.renderer.$gutter.getBoundingClientRect();return!(p.clientX>=x.left&&p.clientX<=x.right&&p.clientY>=x.top&&p.clientY<=x.bottom)},l})(f);h.$uid=0,r.GutterTooltip=h}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,r,m){var d=e("../lib/dom"),g=e("../lib/event"),w=e("../lib/useragent"),u=200,f=200,a=5;function s(h){var o=h.editor,l=d.createElement("div");l.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",l.textContent=" ";var p=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];p.forEach(function(re){h[re]=this[re]},this),o.on("mousedown",this.onMouseDown.bind(h));var y=o.container,x,E,$,_,C,L,D=0,I,M,W,z,O;this.onDragStart=function(re){if(this.cancelDrag||!y.draggable){var ce=this;return setTimeout(function(){ce.startSelect(),ce.captureMouse(re)},0),re.preventDefault()}C=o.getSelectionRange();var de=re.dataTransfer;de.effectAllowed=o.getReadOnly()?"copy":"copyMove",o.container.appendChild(l),de.setDragImage&&de.setDragImage(l,0,0),setTimeout(function(){o.container.removeChild(l)}),de.clearData(),de.setData("Text",o.session.getTextRange()),M=!0,this.setState("drag")},this.onDragEnd=function(re){if(y.draggable=!1,M=!1,this.setState(null),!o.getReadOnly()){var ce=re.dataTransfer.dropEffect;!I&&ce=="move"&&o.session.remove(o.getSelectionRange()),o.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(re){if(!(o.getReadOnly()||!Q(re.dataTransfer)))return E=re.clientX,$=re.clientY,x||B(),D++,re.dataTransfer.dropEffect=I=le(re),g.preventDefault(re)},this.onDragOver=function(re){if(!(o.getReadOnly()||!Q(re.dataTransfer)))return E=re.clientX,$=re.clientY,x||(B(),D++),G!==null&&(G=null),re.dataTransfer.dropEffect=I=le(re),g.preventDefault(re)},this.onDragLeave=function(re){if(D--,D<=0&&x)return U(),I=null,g.preventDefault(re)},this.onDrop=function(re){if(L){var ce=re.dataTransfer;if(M)switch(I){case"move":C.contains(L.row,L.column)?C={start:L,end:L}:C=o.moveText(C,L);break;case"copy":C=o.moveText(C,L,!0);break}else{var de=ce.getData("Text");C={start:L,end:o.session.insert(L,de)},o.focus(),I=null}return U(),g.preventDefault(re)}},g.addListener(y,"dragstart",this.onDragStart.bind(h),o),g.addListener(y,"dragend",this.onDragEnd.bind(h),o),g.addListener(y,"dragenter",this.onDragEnter.bind(h),o),g.addListener(y,"dragover",this.onDragOver.bind(h),o),g.addListener(y,"dragleave",this.onDragLeave.bind(h),o),g.addListener(y,"drop",this.onDrop.bind(h),o);function T(re,ce){var de=Date.now(),ie=!ce||re.row!=ce.row,fe=!ce||re.column!=ce.column;if(!z||ie||fe)o.moveCursorToPosition(re),z=de,O={x:E,y:$};else{var $e=c(O.x,O.y,E,$);$e>a?z=null:de-z>=f&&(o.renderer.scrollCursorIntoView(),z=null)}}function A(re,ce){var de=Date.now(),ie=o.renderer.layerConfig.lineHeight,fe=o.renderer.layerConfig.characterWidth,$e=o.renderer.scroller.getBoundingClientRect(),Re={x:{left:E-$e.left,right:$e.right-E},y:{top:$-$e.top,bottom:$e.bottom-$}},Ee=Math.min(Re.x.left,Re.x.right),Ue=Math.min(Re.y.top,Re.y.bottom),He={row:re.row,column:re.column};Ee/fe<=2&&(He.column+=Re.x.left<Re.x.right?-3:2),Ue/ie<=1&&(He.row+=Re.y.top<Re.y.bottom?-1:1);var Ge=re.row!=He.row,at=re.column!=He.column,We=!ce||re.row!=ce.row;Ge||at&&!We?W?de-W>=u&&o.renderer.scrollCursorIntoView(He):W=de:W=null}function N(){var re=L;L=o.renderer.screenToTextCoordinates(E,$),T(L,re),A(L,re)}function B(){C=o.selection.toOrientedRange(),x=o.session.addMarker(C,"ace_selection",o.getSelectionStyle()),o.clearSelection(),o.isFocused()&&o.renderer.$cursorLayer.setBlinking(!1),clearInterval(_),N(),_=setInterval(N,20),D=0,g.addListener(document,"mousemove",J)}function U(){clearInterval(_),o.session.removeMarker(x),x=null,o.selection.fromOrientedRange(C),o.isFocused()&&!M&&o.$resetCursorStyle(),C=null,L=null,D=0,W=null,z=null,g.removeListener(document,"mousemove",J)}var G=null;function J(){G==null&&(G=setTimeout(function(){G!=null&&x&&U()},20))}function Q(re){var ce=re.types;return!ce||Array.prototype.some.call(ce,function(de){return de=="text/plain"||de=="Text"})}function le(re){var ce=["copy","copymove","all","uninitialized"],de=["move","copymove","linkmove","all","uninitialized"],ie=w.isMac?re.altKey:re.ctrlKey,fe="uninitialized";try{fe=re.dataTransfer.effectAllowed.toLowerCase()}catch{}var $e="none";return ie&&ce.indexOf(fe)>=0?$e="copy":de.indexOf(fe)>=0?$e="move":ce.indexOf(fe)>=0&&($e="copy"),$e}}(function(){this.dragWait=function(){var h=Date.now()-this.mousedownEvent.time;h>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var h=this.editor.container;h.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(h){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var h=this.editor,o=h.container;o.draggable=!0,h.renderer.$cursorLayer.setBlinking(!1),h.setStyle("ace_dragging");var l=w.isWin?"default":"move";h.renderer.setCursorStyle(l),this.setState("dragReady")},this.onMouseDrag=function(h){var o=this.editor.container;if(w.isIE&&this.state=="dragReady"){var l=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);l>3&&o.dragDrop()}if(this.state==="dragWait"){var l=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);l>0&&(o.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(h){if(this.$dragEnabled){this.mousedownEvent=h;var o=this.editor,l=h.inSelection(),p=h.getButton(),y=h.domEvent.detail||1;if(y===1&&p===0&&l){if(h.editor.inMultiSelectMode&&(h.getAccelKey()||h.getShiftKey()))return;this.mousedownEvent.time=Date.now();var x=h.domEvent.target||h.domEvent.srcElement;if("unselectable"in x&&(x.unselectable="on"),o.getDragDelay()){if(w.isWebKit){this.cancelDrag=!0;var E=o.container;E.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(h,this.onMouseDrag.bind(this)),h.defaultPrevented=!0}}}}).call(s.prototype);function c(h,o,l,p){return Math.sqrt(Math.pow(l-h,2)+Math.pow(p-o,2))}r.DragdropHandler=s}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(e,r,m){var d=e("./mouse_event").MouseEvent,g=e("../lib/event"),w=e("../lib/dom");r.addTouchListeners=function(u,f){var a="scroll",s,c,h,o,l,p,y=0,x,E=0,$=0,_=0,C,L;function D(){var T=window.navigator&&window.navigator.clipboard,A=!1,N=function(){var G=f.getCopyText(),J=f.session.getUndoManager().hasUndo();L.replaceChild(w.buildDom(A?["span",!G&&B("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],G&&B("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],G&&B("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],T&&B("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],J&&B("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],B("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],B("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),L.firstChild)},B=function(G){return f.commands.canExecute(G,f)},U=function(G){var J=G.target.getAttribute("action");if(J=="more"||!A)return A=!A,N();J=="paste"?T.readText().then(function(Q){f.execCommand(J,Q)}):J&&((J=="cut"||J=="copy")&&(T?T.writeText(f.getCopyText()):document.execCommand("copy")),f.execCommand(J)),L.firstChild.style.display="none",A=!1,J!="openCommandPalette"&&f.focus()};L=w.buildDom(["div",{class:"ace_mobile-menu",onclick:U},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],f.container),L.addEventListener("touchstart",function(G){a="menu",G.stopPropagation(),G.preventDefault(),f.textInput.focus()}),L.addEventListener("touchend",function(G){G.stopPropagation(),G.preventDefault(),U(G)})}function I(){if(!f.getOption("enableMobileMenu")){L&&M();return}L||D();var T=f.selection.cursor,A=f.renderer.textToScreenCoordinates(T.row,T.column),N=f.renderer.textToScreenCoordinates(0,0).pageX,B=f.renderer.scrollLeft,U=f.container.getBoundingClientRect();L.style.top=A.pageY-U.top-3+"px",A.pageX-U.left<U.width-70?(L.style.left="",L.style.right="10px"):(L.style.right="",L.style.left=N+B-U.left+"px"),L.style.display="",L.firstChild.style.display="none",f.on("input",M)}function M(T){L&&(L.style.display="none"),f.off("input",M)}function W(){l=null,clearTimeout(l);var T=f.selection.getRange(),A=T.contains(x.row,x.column);(T.isEmpty()||!A)&&(f.selection.moveToPosition(x),f.selection.selectWord()),a="wait",I()}function z(){l=null,clearTimeout(l),f.selection.moveToPosition(x);var T=E>=2?f.selection.getLineRange(x.row):f.session.getBracketRange(x);T&&!T.isEmpty()?f.selection.setRange(T):f.selection.selectWord(),a="wait"}g.addListener(u,"contextmenu",function(T){if(C){var A=f.textInput.getElement();A.focus()}},f),g.addListener(u,"touchstart",function(T){var A=T.touches;if(l||A.length>1){clearTimeout(l),l=null,h=-1,a="zoom";return}C=f.$mouseHandler.isMousePressed=!0;var N=f.renderer.layerConfig.lineHeight,B=f.renderer.layerConfig.lineHeight,U=T.timeStamp;o=U;var G=A[0],J=G.clientX,Q=G.clientY;Math.abs(s-J)+Math.abs(c-Q)>N&&(h=-1),s=T.clientX=J,c=T.clientY=Q,$=_=0;var le=new d(T,f);if(x=le.getDocumentPosition(),U-h<500&&A.length==1&&!y)E++,T.preventDefault(),T.button=0,z();else{E=0;var re=f.selection.cursor,ce=f.selection.isEmpty()?re:f.selection.anchor,de=f.renderer.$cursorLayer.getPixelPosition(re,!0),ie=f.renderer.$cursorLayer.getPixelPosition(ce,!0),fe=f.renderer.scroller.getBoundingClientRect(),$e=f.renderer.layerConfig.offset,Re=f.renderer.scrollLeft,Ee=function(Ge,at){return Ge=Ge/B,at=at/N-.75,Ge*Ge+at*at};if(T.clientX<fe.left){a="zoom";return}var Ue=Ee(T.clientX-fe.left-de.left+Re,T.clientY-fe.top-de.top+$e),He=Ee(T.clientX-fe.left-ie.left+Re,T.clientY-fe.top-ie.top+$e);Ue<3.5&&He<3.5&&(a=Ue>He?"cursor":"anchor"),He<3.5?a="anchor":Ue<3.5?a="cursor":a="scroll",l=setTimeout(W,450)}h=U},f),g.addListener(u,"touchend",function(T){C=f.$mouseHandler.isMousePressed=!1,p&&clearInterval(p),a=="zoom"?(a="",y=0):l?(f.selection.moveToPosition(x),y=0,I()):a=="scroll"?(O(),M()):I(),clearTimeout(l),l=null},f),g.addListener(u,"touchmove",function(T){l&&(clearTimeout(l),l=null);var A=T.touches;if(!(A.length>1||a=="zoom")){var N=A[0],B=s-N.clientX,U=c-N.clientY;if(a=="wait")if(B*B+U*U>4)a="cursor";else return T.preventDefault();s=N.clientX,c=N.clientY,T.clientX=N.clientX,T.clientY=N.clientY;var G=T.timeStamp,J=G-o;if(o=G,a=="scroll"){var Q=new d(T,f);Q.speed=1,Q.wheelX=B,Q.wheelY=U,10*Math.abs(B)<Math.abs(U)&&(B=0),10*Math.abs(U)<Math.abs(B)&&(U=0),J!=0&&($=B/J,_=U/J),f._emit("mousewheel",Q),Q.propagationStopped||($=_=0)}else{var le=new d(T,f),re=le.getDocumentPosition();a=="cursor"?f.selection.moveCursorToPosition(re):a=="anchor"&&f.selection.setSelectionAnchor(re.row,re.column),f.renderer.scrollCursorIntoView(re),T.preventDefault()}}},f);function O(){y+=60,p=setInterval(function(){y--<=0&&(clearInterval(p),p=null),Math.abs($)<.01&&($=0),Math.abs(_)<.01&&(_=0),y<20&&($=.9*$),y<20&&(_=.9*_);var T=f.session.getScrollTop();f.renderer.scrollBy(10*$,10*_),T==f.session.getScrollTop()&&(y=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(e,r,m){var d=e("../lib/event"),g=e("../lib/useragent"),w=e("./default_handlers").DefaultHandlers,u=e("./default_gutter_handler").GutterHandler,f=e("./mouse_event").MouseEvent,a=e("./dragdrop_handler").DragdropHandler,s=e("./touch_handler").addTouchListeners,c=e("../config"),h=(function(){function o(l){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var p=this;this.editor=l,new w(this),new u(this),new a(this);var y=function($){var _=!document.hasFocus||!document.hasFocus()||!l.isFocused()&&document.activeElement==(l.textInput&&l.textInput.getElement());_&&window.focus(),l.focus(),setTimeout(function(){l.isFocused()||l.focus()})},x=l.renderer.getMouseEventTarget();d.addListener(x,"click",this.onMouseEvent.bind(this,"click"),l),d.addListener(x,"mousemove",this.onMouseMove.bind(this,"mousemove"),l),d.addMultiMouseDownListener([x,l.renderer.scrollBarV&&l.renderer.scrollBarV.inner,l.renderer.scrollBarH&&l.renderer.scrollBarH.inner,l.textInput&&l.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",l),d.addMouseWheelListener(l.container,this.onMouseWheel.bind(this,"mousewheel"),l),s(l.container,l);var E=l.renderer.$gutter;d.addListener(E,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),l),d.addListener(E,"click",this.onMouseEvent.bind(this,"gutterclick"),l),d.addListener(E,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),l),d.addListener(E,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),l),d.addListener(x,"mousedown",y,l),d.addListener(E,"mousedown",y,l),g.isIE&&l.renderer.scrollBarV&&(d.addListener(l.renderer.scrollBarV.element,"mousedown",y,l),d.addListener(l.renderer.scrollBarH.element,"mousedown",y,l)),l.on("mousemove",function($){if(!(p.state||p.$dragDelay||!p.$dragEnabled)){var _=l.renderer.screenToTextCoordinates($.x,$.y),C=l.session.selection.getRange(),L=l.renderer;!C.isEmpty()&&C.insideStart(_.row,_.column)?L.setCursorStyle("default"):L.setCursorStyle("")}},l)}return o.prototype.onMouseEvent=function(l,p){this.editor.session&&this.editor._emit(l,new f(p,this.editor))},o.prototype.onMouseMove=function(l,p){var y=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!y||!y.length||this.editor._emit(l,new f(p,this.editor))},o.prototype.onMouseWheel=function(l,p){var y=new f(p,this.editor);y.speed=this.$scrollSpeed*2,y.wheelX=p.wheelX,y.wheelY=p.wheelY,this.editor._emit(l,y)},o.prototype.setState=function(l){this.state=l},o.prototype.captureMouse=function(l,p){this.x=l.x,this.y=l.y,this.isMousePressed=!0;var y=this.editor,x=this.editor.renderer;x.$isMousePressed=!0;var E=this,$=!0,_=function(M){if(M){if(g.isWebKit&&!M.which&&E.releaseMouse)return E.releaseMouse();E.x=M.clientX,E.y=M.clientY,p&&p(M),E.mouseEvent=new f(M,E.editor),E.$mouseMoved=!0}},C=function(M){y.off("beforeEndOperation",I),$=!1,y.session&&L(),E[E.state+"End"]&&E[E.state+"End"](M),E.state="",E.isMousePressed=x.$isMousePressed=!1,x.$keepTextAreaAtCursor&&x.$moveTextAreaToCursor(),E.$onCaptureMouseMove=E.releaseMouse=null,M&&E.onMouseEvent("mouseup",M),y.endOperation()},L=function(){E[E.state]&&E[E.state](),E.$mouseMoved=!1},D=function(){$&&(L(),d.nextFrame(D))};if(g.isOldIE&&l.domEvent.type=="dblclick")return setTimeout(function(){C(l)});var I=function(M){E.releaseMouse&&y.curOp.command.name&&y.curOp.selectionChanged&&(E[E.state+"End"]&&E[E.state+"End"](),E.state="",E.releaseMouse())};y.on("beforeEndOperation",I),y.startOperation({command:{name:"mouse"}}),E.$onCaptureMouseMove=_,E.releaseMouse=d.capture(this.editor.container,_,C),D()},o.prototype.cancelContextMenu=function(){var l=(function(p){p&&p.domEvent&&p.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",l),p&&p.domEvent&&d.stopEvent(p.domEvent))}).bind(this);setTimeout(l,10),this.editor.on("nativecontextmenu",l)},o.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse(),this.$tooltip&&this.$tooltip.destroy()},o})();h.prototype.releaseMouse=null,c.defineOptions(h.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:g.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0}}),r.MouseHandler=h}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(e,r,m){var d=e("../lib/dom"),g=(function(){function w(u){u.on("click",function(f){var a=f.getDocumentPosition(),s=u.session,c=s.getFoldAt(a.row,a.column,1);c&&(f.getAccelKey()?s.removeFold(c):s.expandFold(c),f.stop());var h=f.domEvent&&f.domEvent.target;h&&d.hasCssClass(h,"ace_inline_button")&&d.hasCssClass(h,"ace_toggle_wrap")&&(s.setOption("wrap",!s.getUseWrapMode()),u.renderer.scrollCursorIntoView())}),u.on("gutterclick",function(f){var a=u.renderer.$gutterLayer.getRegion(f);if(a=="foldWidgets"){var s=f.getDocumentPosition().row,c=u.session;c.foldWidgets&&c.foldWidgets[s]&&u.session.onFoldWidgetClick(s,f),u.isFocused()||u.focus(),f.stop()}}),u.on("gutterdblclick",function(f){var a=u.renderer.$gutterLayer.getRegion(f);if(a=="foldWidgets"){var s=f.getDocumentPosition().row,c=u.session,h=c.getParentFoldRangeData(s,!0),o=h.range||h.firstRange;if(o){s=o.start.row;var l=c.getFoldAt(s,c.getLine(s).length,1);l?c.removeFold(l):(c.addFold("...",o),u.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}f.stop()}})}return w})();r.FoldHandler=g}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,r,m){var d=e("../lib/keys"),g=e("../lib/event"),w=(function(){function u(f){this.$editor=f,this.$data={editor:f},this.$handlers=[],this.setDefaultHandler(f.commands)}return u.prototype.setDefaultHandler=function(f){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=f,this.addKeyboardHandler(f,0)},u.prototype.setKeyboardHandler=function(f){var a=this.$handlers;if(a[a.length-1]!=f){for(;a[a.length-1]&&a[a.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(a[a.length-1]);this.addKeyboardHandler(f,1)}},u.prototype.addKeyboardHandler=function(f,a){if(f){typeof f=="function"&&!f.handleKeyboard&&(f.handleKeyboard=f);var s=this.$handlers.indexOf(f);s!=-1&&this.$handlers.splice(s,1),a==null?this.$handlers.push(f):this.$handlers.splice(a,0,f),s==-1&&f.attach&&f.attach(this.$editor)}},u.prototype.removeKeyboardHandler=function(f){var a=this.$handlers.indexOf(f);return a==-1?!1:(this.$handlers.splice(a,1),f.detach&&f.detach(this.$editor),!0)},u.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},u.prototype.getStatusText=function(){var f=this.$data,a=f.editor;return this.$handlers.map(function(s){return s.getStatusText&&s.getStatusText(a,f)||""}).filter(Boolean).join(" ")},u.prototype.$callKeyboardHandlers=function(f,a,s,c){for(var h,o=!1,l=this.$editor.commands,p=this.$handlers.length;p--&&(h=this.$handlers[p].handleKeyboard(this.$data,f,a,s,c),!(!(!h||!h.command)&&(h.command=="null"?o=!0:o=l.exec(h.command,this.$editor,h.args,c),o&&c&&f!=-1&&h.passEvent!=!0&&h.command.passEvent!=!0&&g.stopEvent(c),o))););return!o&&f==-1&&(h={command:"insertstring"},o=l.exec("insertstring",this.$editor,a)),o&&this.$editor._signal&&this.$editor._signal("keyboardActivity",h),o},u.prototype.onCommandKey=function(f,a,s){var c=d.keyCodeToString(s);return this.$callKeyboardHandlers(a,c,s,f)},u.prototype.onTextInput=function(f){return this.$callKeyboardHandlers(-1,f)},u})();r.KeyBinding=w}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,r,m){var d=0,g=0,w=!1,u=!1,f=!1,a=[[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]],s=[[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]],c=0,h=1,o=0,l=1,p=2,y=3,x=4,E=5,$=6,_=7,C=8,L=9,D=10,I=11,M=12,W=13,z=14,O=15,T=16,A=17,N=18,B=[N,N,N,N,N,N,N,N,N,$,E,$,C,E,N,N,N,N,N,N,N,N,N,N,N,N,N,N,E,E,E,$,C,x,x,I,I,I,x,x,x,x,x,D,L,D,L,L,p,p,p,p,p,p,p,p,p,p,L,x,x,x,x,x,x,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,x,x,x,x,x,x,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,x,x,x,x,N,N,N,N,N,N,E,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,L,x,I,I,I,I,x,x,x,x,o,x,x,N,x,x,I,I,p,p,x,o,x,x,x,p,o,x,x,x,x,x],U=[C,C,C,C,C,C,C,C,C,C,C,N,N,N,o,l,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,C,E,W,z,O,T,A,L,I,I,I,I,I,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,L,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,C];function G(re,ce,de,ie){var fe=d?s:a,$e=null,Re=null,Ee=null,Ue=0,He=null,Ge=null,at=-1,We=null,Me=null,Tt=[];if(!ie)for(We=0,ie=[];We<de;We++)ie[We]=le(re[We]);for(g=d,w=!1,u=!1,f=!1,Me=0;Me<de;Me++){if($e=Ue,Tt[Me]=Re=Q(re,ie,Tt,Me),Ue=fe[$e][Re],He=Ue&240,Ue&=15,ce[Me]=Ee=fe[Ue][5],He>0)if(He==16){for(We=at;We<Me;We++)ce[We]=1;at=-1}else at=-1;if(Ge=fe[Ue][6],Ge)at==-1&&(at=Me);else if(at>-1){for(We=at;We<Me;We++)ce[We]=Ee;at=-1}ie[Me]==E&&(ce[Me]=0),g|=Ee}if(f){for(We=0;We<de;We++)if(ie[We]==$){ce[We]=d;for(var st=We-1;st>=0&&ie[st]==C;st--)ce[st]=d}}}function J(re,ce,de){if(!(g<re)){if(re==1&&d==h&&!u){de.reverse();return}for(var ie=de.length,fe=0,$e,Re,Ee,Ue;fe<ie;){if(ce[fe]>=re){for($e=fe+1;$e<ie&&ce[$e]>=re;)$e++;for(Re=fe,Ee=$e-1;Re<Ee;Re++,Ee--)Ue=de[Re],de[Re]=de[Ee],de[Ee]=Ue;fe=$e}fe++}}}function Q(re,ce,de,ie){var fe=ce[ie],$e,Re,Ee,Ue;switch(fe){case o:case l:w=!1;case x:case y:return fe;case p:return w?y:p;case _:return w=!0,l;case C:return x;case L:return ie<1||ie+1>=ce.length||($e=de[ie-1])!=p&&$e!=y||(Re=ce[ie+1])!=p&&Re!=y?x:(w&&(Re=y),Re==$e?Re:x);case D:return $e=ie>0?de[ie-1]:E,$e==p&&ie+1<ce.length&&ce[ie+1]==p?p:x;case I:if(ie>0&&de[ie-1]==p)return p;if(w)return x;for(Ue=ie+1,Ee=ce.length;Ue<Ee&&ce[Ue]==I;)Ue++;return Ue<Ee&&ce[Ue]==p?p:x;case M:for(Ee=ce.length,Ue=ie+1;Ue<Ee&&ce[Ue]==M;)Ue++;if(Ue<Ee){var He=re[ie],Ge=He>=1425&&He<=2303||He==64286;if($e=ce[Ue],Ge&&($e==l||$e==_))return l}return ie<1||($e=ce[ie-1])==E?x:de[ie-1];case E:return w=!1,u=!0,d;case $:return f=!0,x;case W:case z:case T:case A:case O:w=!1;case N:return x}}function le(re){var ce=re.charCodeAt(0),de=ce>>8;return de==0?ce>191?o:B[ce]:de==5?/[\u0591-\u05f4]/.test(re)?l:o:de==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(re)?M:/[\u0660-\u0669\u066b-\u066c]/.test(re)?y:ce==1642?I:/[\u06f0-\u06f9]/.test(re)?p:_:de==32&&ce<=8287?U[ce&255]:de==254&&ce>=65136?_:x}r.L=o,r.R=l,r.EN=p,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(re,ce,de){if(re.length<2)return{};var ie=re.split(""),fe=new Array(ie.length),$e=new Array(ie.length),Re=[];d=de?h:c,G(ie,Re,ie.length,ce);for(var Ee=0;Ee<fe.length;fe[Ee]=Ee,Ee++);J(2,Re,fe),J(1,Re,fe);for(var Ee=0;Ee<fe.length-1;Ee++)ce[Ee]===y?Re[Ee]=r.AN:Re[Ee]===l&&(ce[Ee]>_&&ce[Ee]<W||ce[Ee]===x||ce[Ee]===N)?Re[Ee]=r.ON_R:Ee>0&&ie[Ee-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ie[Ee])&&(Re[Ee-1]=Re[Ee]=r.R_H,Ee++);ie[ie.length-1]===r.DOT&&(Re[ie.length-1]=r.B),ie[0]==="‫"&&(Re[0]=r.RLE);for(var Ee=0;Ee<fe.length;Ee++)$e[Ee]=Re[fe[Ee]];return{logicalFromVisual:fe,bidiLevels:$e}},r.hasBidiCharacters=function(re,ce){for(var de=!1,ie=0;ie<re.length;ie++)ce[ie]=le(re.charAt(ie)),!de&&(ce[ie]==l||ce[ie]==_||ce[ie]==y)&&(de=!0);return de},r.getVisualFromLogicalIdx=function(re,ce){for(var de=0;de<ce.logicalFromVisual.length;de++)if(ce.logicalFromVisual[de]==re)return de;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(e,r,m){var d=e("./lib/bidiutil"),g=e("./lib/lang"),w=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,u=(function(){function f(a){this.session=a,this.bidiMap={},this.currentRow=null,this.bidiUtil=d,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=w.test(a.getValue())}return f.prototype.isBidiRow=function(a,s,c){return this.seenBidi?(a!==this.currentRow&&(this.currentRow=a,this.updateRowLine(s,c),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},f.prototype.onChange=function(a){this.seenBidi?this.currentRow=null:a.action=="insert"&&w.test(a.lines.join(`
182
+ `))&&(this.seenBidi=!0,this.currentRow=null)},f.prototype.getDocumentRow=function(){var a=0,s=this.session.$screenRowCache;if(s.length){var c=this.session.$getRowCacheIndex(s,this.currentRow);c>=0&&(a=this.session.$docRowCache[c])}return a},f.prototype.getSplitIndex=function(){var a=0,s=this.session.$screenRowCache;if(s.length)for(var c,h=this.session.$getRowCacheIndex(s,this.currentRow);this.currentRow-a>0&&(c=this.session.$getRowCacheIndex(s,this.currentRow-a-1),c===h);)h=c,a++;else a=this.currentRow;return a},f.prototype.updateRowLine=function(a,s){a===void 0&&(a=this.getDocumentRow());var c=a===this.session.getLength()-1,h=c?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(a),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var o=this.session.$wrapData[a];o&&(s===void 0&&(s=this.getSplitIndex()),s>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[d.L],this.line=s<o.length?this.line.substring(o[s-1],o[s]):this.line.substring(o[o.length-1])):this.line=this.line.substring(0,o[s]),s==o.length&&(this.line+=this.showInvisibles?h:d.DOT))}else this.line+=this.showInvisibles?h:d.DOT;var l=this.session,p=0,y;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(x,E){return x===" "||l.isFullWidth(x.charCodeAt(0))?(y=x===" "?l.getScreenTabSize(E+p):2,p+=y-1,g.stringRepeat(d.DOT,y)):x}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==d.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},f.prototype.updateBidiMap=function(){var a=[];d.hasBidiCharacters(this.line,a)||this.isRtlDir?this.bidiMap=d.doBidiReorder(this.line,a,this.isRtlDir):this.bidiMap={}},f.prototype.markAsDirty=function(){this.currentRow=null},f.prototype.updateCharacterWidths=function(a){if(this.characterWidth!==a.$characterSize.width){this.fontMetrics=a;var s=this.characterWidth=a.$characterSize.width,c=a.$measureCharWidth("ה");this.charWidths[d.L]=this.charWidths[d.EN]=this.charWidths[d.ON_R]=s,this.charWidths[d.R]=this.charWidths[d.AN]=c,this.charWidths[d.R_H]=c*.45,this.charWidths[d.B]=this.charWidths[d.RLE]=0,this.currentRow=null}},f.prototype.setShowInvisibles=function(a){this.showInvisibles=a,this.currentRow=null},f.prototype.setEolChar=function(a){this.EOL=a},f.prototype.setContentWidth=function(a){this.contentWidth=a},f.prototype.isRtlLine=function(a){return this.$isRtl?!0:a!=null?this.session.getLine(a).charAt(0)==this.RLE:this.isRtlDir},f.prototype.setRtlDirection=function(a,s){for(var c=a.getCursorPosition(),h=a.selection.getSelectionAnchor().row;h<=c.row;h++)!s&&a.session.getLine(h).charAt(0)===a.session.$bidiHandler.RLE?a.session.doc.removeInLine(h,0,1):s&&a.session.getLine(h).charAt(0)!==a.session.$bidiHandler.RLE&&a.session.doc.insert({column:0,row:h},a.session.$bidiHandler.RLE)},f.prototype.getPosLeft=function(a){a-=this.wrapIndent;var s=this.line.charAt(0)===this.RLE?1:0,c=a>s?this.session.getOverwrite()?a:a-1:s,h=d.getVisualFromLogicalIdx(c,this.bidiMap),o=this.bidiMap.bidiLevels,l=0;!this.session.getOverwrite()&&a<=s&&o[h]%2!==0&&h++;for(var p=0;p<h;p++)l+=this.charWidths[o[p]];return!this.session.getOverwrite()&&a>s&&o[h]%2===0&&(l+=this.charWidths[o[h]]),this.wrapIndent&&(l+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(l+=this.rtlLineOffset),l},f.prototype.getSelections=function(a,s){var c=this.bidiMap,h=c.bidiLevels,o,l=[],p=0,y=Math.min(a,s)-this.wrapIndent,x=Math.max(a,s)-this.wrapIndent,E=!1,$=!1,_=0;this.wrapIndent&&(p+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var C,L=0;L<h.length;L++)C=c.logicalFromVisual[L],o=h[L],E=C>=y&&C<x,E&&!$?_=p:!E&&$&&l.push({left:_,width:p-_}),p+=this.charWidths[o],$=E;if(E&&L===h.length&&l.push({left:_,width:p-_}),this.isRtlDir)for(var D=0;D<l.length;D++)l[D].left+=this.rtlLineOffset;return l},f.prototype.offsetToCol=function(c){this.isRtlDir&&(c-=this.rtlLineOffset);var s=0,c=Math.max(c,0),h=0,o=0,l=this.bidiMap.bidiLevels,p=this.charWidths[l[o]];for(this.wrapIndent&&(c-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);c>h+p/2;){if(h+=p,o===l.length-1){p=0;break}p=this.charWidths[l[++o]]}return o>0&&l[o-1]%2!==0&&l[o]%2===0?(c<h&&o--,s=this.bidiMap.logicalFromVisual[o]):o>0&&l[o-1]%2===0&&l[o]%2!==0?s=1+(c>h?this.bidiMap.logicalFromVisual[o]:this.bidiMap.logicalFromVisual[o-1]):this.isRtlDir&&o===l.length-1&&p===0&&l[o-1]%2===0||!this.isRtlDir&&o===0&&l[o]%2!==0?s=1+this.bidiMap.logicalFromVisual[o]:(o>0&&l[o-1]%2!==0&&p!==0&&o--,s=this.bidiMap.logicalFromVisual[o]),s===0&&this.isRtlDir&&s++,s+this.wrapIndent},f})();r.BidiHandler=u}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,r,m){var d=e("./lib/oop"),g=e("./lib/lang"),w=e("./lib/event_emitter").EventEmitter,u=e("./range").Range,f=(function(){function a(s){this.session=s,this.doc=s.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var c=this;this.cursor.on("change",function(h){c.$cursorChanged=!0,c.$silent||c._emit("changeCursor"),!c.$isEmpty&&!c.$silent&&c._emit("changeSelection"),!c.$keepDesiredColumnOnChange&&h.old.column!=h.value.column&&(c.$desiredColumn=null)}),this.anchor.on("change",function(){c.$anchorChanged=!0,!c.$isEmpty&&!c.$silent&&c._emit("changeSelection")})}return a.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},a.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},a.prototype.getCursor=function(){return this.lead.getPosition()},a.prototype.setAnchor=function(s,c){this.$isEmpty=!1,this.anchor.setPosition(s,c)},a.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},a.prototype.getSelectionLead=function(){return this.lead.getPosition()},a.prototype.isBackwards=function(){var s=this.anchor,c=this.lead;return s.row>c.row||s.row==c.row&&s.column>c.column},a.prototype.getRange=function(){var s=this.anchor,c=this.lead;return this.$isEmpty?u.fromPoints(c,c):this.isBackwards()?u.fromPoints(c,s):u.fromPoints(s,c)},a.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},a.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},a.prototype.setRange=function(s,c){var h=c?s.end:s.start,o=c?s.start:s.end;this.$setSelection(h.row,h.column,o.row,o.column)},a.prototype.$setSelection=function(s,c,h,o){if(!this.$silent){var l=this.$isEmpty,p=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(s,c),this.cursor.setPosition(h,o),this.$isEmpty=!u.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||l!=this.$isEmpty||p)&&this._emit("changeSelection")}},a.prototype.$moveSelection=function(s){var c=this.lead;this.$isEmpty&&this.setSelectionAnchor(c.row,c.column),s.call(this)},a.prototype.selectTo=function(s,c){this.$moveSelection(function(){this.moveCursorTo(s,c)})},a.prototype.selectToPosition=function(s){this.$moveSelection(function(){this.moveCursorToPosition(s)})},a.prototype.moveTo=function(s,c){this.clearSelection(),this.moveCursorTo(s,c)},a.prototype.moveToPosition=function(s){this.clearSelection(),this.moveCursorToPosition(s)},a.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},a.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},a.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},a.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},a.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},a.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},a.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},a.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},a.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},a.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},a.prototype.getWordRange=function(s,c){if(typeof c>"u"){var h=s||this.lead;s=h.row,c=h.column}return this.session.getWordRange(s,c)},a.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},a.prototype.selectAWord=function(){var s=this.getCursor(),c=this.session.getAWordRange(s.row,s.column);this.setSelectionRange(c)},a.prototype.getLineRange=function(s,c){var h=typeof s=="number"?s:this.lead.row,o,l=this.session.getFoldLine(h);return l?(h=l.start.row,o=l.end.row):o=h,c===!0?new u(h,0,o,this.session.getLine(o).length):new u(h,0,o+1,0)},a.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},a.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},a.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},a.prototype.wouldMoveIntoSoftTab=function(s,c,h){var o=s.column,l=s.column+c;return h<0&&(o=s.column-c,l=s.column),this.session.isTabStop(s)&&this.doc.getLine(s.row).slice(o,l).split(" ").length-1==c},a.prototype.moveCursorLeft=function(){var s=this.lead.getPosition(),c;if(c=this.session.getFoldAt(s.row,s.column,-1))this.moveCursorTo(c.start.row,c.start.column);else if(s.column===0)s.row>0&&this.moveCursorTo(s.row-1,this.doc.getLine(s.row-1).length);else{var h=this.session.getTabSize();this.wouldMoveIntoSoftTab(s,h,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-h):this.moveCursorBy(0,-1)}},a.prototype.moveCursorRight=function(){var s=this.lead.getPosition(),c;if(c=this.session.getFoldAt(s.row,s.column,1))this.moveCursorTo(c.end.row,c.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 h=this.session.getTabSize(),s=this.lead;this.wouldMoveIntoSoftTab(s,h,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,h):this.moveCursorBy(0,1)}},a.prototype.moveCursorLineStart=function(){var s=this.lead.row,c=this.lead.column,h=this.session.documentToScreenRow(s,c),o=this.session.screenToDocumentPosition(h,0),l=this.session.getDisplayLine(s,null,o.row,o.column),p=l.match(/^\s*/);p[0].length!=c&&!this.session.$useEmacsStyleLineStart&&(o.column+=p[0].length),this.moveCursorToPosition(o)},a.prototype.moveCursorLineEnd=function(){var s=this.lead,c=this.session.getDocumentLastRowColumnPosition(s.row,s.column);if(this.lead.column==c.column){var h=this.session.getLine(c.row);if(c.column==h.length){var o=h.search(/\s+$/);o>0&&(c.column=o)}}this.moveCursorTo(c.row,c.column)},a.prototype.moveCursorFileEnd=function(){var s=this.doc.getLength()-1,c=this.doc.getLine(s).length;this.moveCursorTo(s,c)},a.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},a.prototype.moveCursorLongWordRight=function(){var s=this.lead.row,c=this.lead.column,h=this.doc.getLine(s),o=h.substring(c);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var l=this.session.getFoldAt(s,c,1);if(l){this.moveCursorTo(l.end.row,l.end.column);return}if(this.session.nonTokenRe.exec(o)&&(c+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,o=h.substring(c)),c>=h.length){this.moveCursorTo(s,h.length),this.moveCursorRight(),s<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(o)&&(c+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(s,c)},a.prototype.moveCursorLongWordLeft=function(){var s=this.lead.row,c=this.lead.column,h;if(h=this.session.getFoldAt(s,c,-1)){this.moveCursorTo(h.start.row,h.start.column);return}var o=this.session.getFoldStringAt(s,c,-1);o==null&&(o=this.doc.getLine(s).substring(0,c));var l=g.stringReverse(o);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(l)&&(c-=this.session.nonTokenRe.lastIndex,l=l.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),c<=0){this.moveCursorTo(s,0),this.moveCursorLeft(),s>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(l)&&(c-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(s,c)},a.prototype.$shortWordEndIndex=function(s){var c=0,h,o=/\s/,l=this.session.tokenRe;if(l.lastIndex=0,this.session.tokenRe.exec(s))c=this.session.tokenRe.lastIndex;else{for(;(h=s[c])&&o.test(h);)c++;if(c<1){for(l.lastIndex=0;(h=s[c])&&!l.test(h);)if(l.lastIndex=0,c++,o.test(h))if(c>2){c--;break}else{for(;(h=s[c])&&o.test(h);)c++;if(c>2)break}}}return l.lastIndex=0,c},a.prototype.moveCursorShortWordRight=function(){var s=this.lead.row,c=this.lead.column,h=this.doc.getLine(s),o=h.substring(c),l=this.session.getFoldAt(s,c,1);if(l)return this.moveCursorTo(l.end.row,l.end.column);if(c==h.length){var p=this.doc.getLength();do s++,o=this.doc.getLine(s);while(s<p&&/^\s*$/.test(o));/^\s+/.test(o)||(o=""),c=0}var y=this.$shortWordEndIndex(o);this.moveCursorTo(s,c+y)},a.prototype.moveCursorShortWordLeft=function(){var s=this.lead.row,c=this.lead.column,h;if(h=this.session.getFoldAt(s,c,-1))return this.moveCursorTo(h.start.row,h.start.column);var o=this.session.getLine(s).substring(0,c);if(c===0){do s--,o=this.doc.getLine(s);while(s>0&&/^\s*$/.test(o));c=o.length,/\s+$/.test(o)||(o="")}var l=g.stringReverse(o),p=this.$shortWordEndIndex(l);return this.moveCursorTo(s,c-p)},a.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},a.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},a.prototype.moveCursorBy=function(s,c){var h=this.session.documentToScreenPosition(this.lead.row,this.lead.column),o;if(c===0&&(s!==0&&(this.session.$bidiHandler.isBidiRow(h.row,this.lead.row)?(o=this.session.$bidiHandler.getPosLeft(h.column),h.column=Math.round(o/this.session.$bidiHandler.charWidths[0])):o=h.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?h.column=this.$desiredColumn:this.$desiredColumn=h.column),s!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var l=this.session.lineWidgets[this.lead.row];s<0?s-=l.rowsAbove||0:s>0&&(s+=l.rowCount-(l.rowsAbove||0))}var p=this.session.screenToDocumentPosition(h.row+s,h.column,o);s!==0&&c===0&&p.row===this.lead.row&&(p.column,this.lead.column),this.moveCursorTo(p.row,p.column+c,c===0)},a.prototype.moveCursorToPosition=function(s){this.moveCursorTo(s.row,s.column)},a.prototype.moveCursorTo=function(s,c,h){var o=this.session.getFoldAt(s,c,1);o&&(s=o.start.row,c=o.start.column),this.$keepDesiredColumnOnChange=!0;var l=this.session.getLine(s);/[\uDC00-\uDFFF]/.test(l.charAt(c))&&l.charAt(c-1)&&(this.lead.row==s&&this.lead.column==c+1?c=c-1:c=c+1),this.lead.setPosition(s,c),this.$keepDesiredColumnOnChange=!1,h||(this.$desiredColumn=null)},a.prototype.moveCursorToScreen=function(s,c,h){var o=this.session.screenToDocumentPosition(s,c);this.moveCursorTo(o.row,o.column,h)},a.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},a.prototype.fromOrientedRange=function(s){this.setSelectionRange(s,s.cursor==s.start),this.$desiredColumn=s.desiredColumn||this.$desiredColumn},a.prototype.toOrientedRange=function(s){var c=this.getRange();return s?(s.start.column=c.start.column,s.start.row=c.start.row,s.end.column=c.end.column,s.end.row=c.end.row):s=c,s.cursor=this.isBackwards()?s.start:s.end,s.desiredColumn=this.$desiredColumn,s},a.prototype.getRangeOfMovements=function(s){var c=this.getCursor();try{s(this);var h=this.getCursor();return u.fromPoints(c,h)}catch{return u.fromPoints(c,c)}finally{this.moveCursorToPosition(c)}},a.prototype.toJSON=function(){if(this.rangeCount)var s=this.ranges.map(function(c){var h=c.clone();return h.isBackwards=c.cursor==c.start,h});else{var s=this.getRange();s.isBackwards=this.isBackwards()}return s},a.prototype.fromJSON=function(s){if(s.start==null)if(this.rangeList&&s.length>1){this.toSingleRange(s[0]);for(var c=s.length;c--;){var h=u.fromPoints(s[c].start,s[c].end);s[c].isBackwards&&(h.cursor=h.start),this.addRange(h,!0)}return}else s=s[0];this.rangeList&&this.toSingleRange(s),this.setSelectionRange(s,s.isBackwards)},a.prototype.isEqual=function(s){if((s.length||this.rangeCount)&&s.length!=this.rangeCount)return!1;if(!s.length||!this.ranges)return this.getRange().isEqual(s);for(var c=this.ranges.length;c--;)if(!this.ranges[c].isEqual(s[c]))return!1;return!0},a})();f.prototype.setSelectionAnchor=f.prototype.setAnchor,f.prototype.getSelectionAnchor=f.prototype.getAnchor,f.prototype.setSelectionRange=f.prototype.setRange,d.implement(f.prototype,w),r.Selection=f}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(e,r,m){var d=e("./lib/report_error").reportError,g=2e3,w=(function(){function u(f){this.splitRegex,this.states=f,this.regExps={},this.matchMappings={};for(var a in this.states){for(var s=this.states[a],c=[],h=0,o=this.matchMappings[a]={defaultToken:"text"},l="g",p=[],y=0;y<s.length;y++){var x=s[y];if(x.defaultToken&&(o.defaultToken=x.defaultToken),x.caseInsensitive&&l.indexOf("i")===-1&&(l+="i"),x.unicode&&l.indexOf("u")===-1&&(l+="u"),x.regex!=null){x.regex instanceof RegExp&&(x.regex=x.regex.toString().slice(1,-1));var E=x.regex,$=new RegExp("(?:("+E+")|(.))").exec("a").length-2;Array.isArray(x.token)?x.token.length==1||$==1?x.token=x.token[0]:$-1!=x.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:x,groupCount:$-1}),x.token=x.token[0]):(x.tokenArray=x.token,x.token=null,x.onMatch=this.$arrayTokens):typeof x.token=="function"&&!x.onMatch&&($>1?x.onMatch=this.$applyToken:x.onMatch=x.token),$>1&&(/\\\d/.test(x.regex)?E=x.regex.replace(/\\([0-9]+)/g,function(_,C){return"\\"+(parseInt(C,10)+h+1)}):($=1,E=this.removeCapturingGroups(x.regex)),!x.splitRegex&&typeof x.token!="string"&&p.push(x)),o[h]=y,h+=$,c.push(E),x.onMatch||(x.onMatch=null)}}c.length||(o[0]=0,c.push("$")),p.forEach(function(_){_.splitRegex=this.createSplitterRegexp(_.regex,l)},this),this.regExps[a]=new RegExp("("+c.join(")|(")+")|($)",l)}}return u.prototype.$setMaxTokenCount=function(f){g=f|0},u.prototype.$applyToken=function(f){var a=this.splitRegex.exec(f).slice(1),s=this.token.apply(this,a);if(typeof s=="string")return[{type:s,value:f}];for(var c=[],h=0,o=s.length;h<o;h++)a[h]&&(c[c.length]={type:s[h],value:a[h]});return c},u.prototype.$arrayTokens=function(f){if(!f)return[];var a=this.splitRegex.exec(f);if(!a)return"text";for(var s=[],c=this.tokenArray,h=0,o=c.length;h<o;h++)a[h+1]&&(s[s.length]={type:c[h],value:a[h+1]});return s},u.prototype.removeCapturingGroups=function(f){var a=f.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(s,c){return c?"(?:":s});return a},u.prototype.createSplitterRegexp=function(f,a){if(f.indexOf("(?=")!=-1){var s=0,c=!1,h={};f.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(o,l,p,y,x,E){return c?c=x!="]":x?c=!0:y?(s==h.stack&&(h.end=E+1,h.stack=-1),s--):p&&(s++,p.length!=1&&(h.stack=s,h.start=E)),o}),h.end!=null&&/^\)*$/.test(f.substr(h.end))&&(f=f.substring(0,h.start)+f.substr(h.end))}return f.charAt(0)!="^"&&(f="^"+f),f.charAt(f.length-1)!="$"&&(f+="$"),new RegExp(f,(a||"").replace("g",""))},u.prototype.getLineTokens=function(f,a){if(a&&typeof a!="string"){var s=a.slice(0);a=s[0],a==="#tmp"&&(s.shift(),a=s.shift())}else var s=[];var c=a||"start",h=this.states[c];h||(c="start",h=this.states[c]);var o=this.matchMappings[c],l=this.regExps[c];l.lastIndex=0;for(var p,y=[],x=0,E=0,$={type:null,value:""};p=l.exec(f);){var _=o.defaultToken,C=null,L=p[0],D=l.lastIndex;if(D-L.length>x){var I=f.substring(x,D-L.length);$.type==_?$.value+=I:($.type&&y.push($),$={type:_,value:I})}for(var M=0;M<p.length-2;M++)if(p[M+1]!==void 0){C=h[o[M]],C.onMatch?_=C.onMatch(L,c,s,f):_=C.token,C.next&&(typeof C.next=="string"?c=C.next:c=C.next(c,s),h=this.states[c],h||(this.reportError("state doesn't exist",c),c="start",h=this.states[c]),o=this.matchMappings[c],x=D,l=this.regExps[c],l.lastIndex=D),C.consumeLineEnd&&(x=D);break}if(L){if(typeof _=="string")(!C||C.merge!==!1)&&$.type===_?$.value+=L:($.type&&y.push($),$={type:_,value:L});else if(_){$.type&&y.push($),$={type:null,value:""};for(var M=0;M<_.length;M++)y.push(_[M])}}if(x==f.length)break;if(x=D,E++>g){for(E>2*f.length&&this.reportError("infinite loop with in ace tokenizer",{startState:a,line:f});x<f.length;)$.type&&y.push($),$={value:f.substring(x,x+=500),type:"overflow"};c="start",s=[];break}}return $.type&&y.push($),s.length>1&&s[0]!==c&&s.unshift("#tmp",c),{tokens:y,state:s.length?s:c}},u})();w.prototype.reportError=d,r.Tokenizer=w}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(e,r,m){var d=e("../lib/deep_copy").deepCopy,g;g=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(f,a){if(!a){for(var s in f)this.$rules[s]=f[s];return}for(var s in f){for(var c=f[s],h=0;h<c.length;h++){var o=c[h];(o.next||o.onMatch)&&(typeof o.next=="string"&&o.next.indexOf(a)!==0&&(o.next=a+o.next),o.nextState&&o.nextState.indexOf(a)!==0&&(o.nextState=a+o.nextState))}this.$rules[a+s]=c}},this.getRules=function(){return this.$rules},this.embedRules=function(f,a,s,c,h){var o=typeof f=="function"?new f().getRules():f;if(c)for(var l=0;l<c.length;l++)c[l]=a+c[l];else{c=[];for(var p in o)c.push(a+p)}if(this.addRules(o,a),s)for(var y=Array.prototype[h?"push":"unshift"],l=0;l<c.length;l++)y.apply(this.$rules[c[l]],d(s));this.$embeds||(this.$embeds=[]),this.$embeds.push(a)},this.getEmbeds=function(){return this.$embeds};var w=function(f,a){return(f!="start"||a.length)&&a.unshift(this.nextState,f),this.nextState},u=function(f,a){return a.shift(),a.shift()||"start"};this.normalizeRules=function(){var f=0,a=this.$rules;function s(c){var h=a[c];h.processed=!0;for(var o=0;o<h.length;o++){var l=h[o],p=null;Array.isArray(l)&&(p=l,l={}),!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var y=l.next||l.push;if(y&&Array.isArray(y)){var x=l.stateName;x||(x=l.token,typeof x!="string"&&(x=x[0]||""),a[x]&&(x+=f++)),a[x]=y,l.next=x,s(x)}else y=="pop"&&(l.next=u);if(l.push&&(l.nextState=l.next||l.push,l.next=w,delete l.push),l.rules)for(var E in l.rules)a[E]?a[E].push&&a[E].push.apply(a[E],l.rules[E]):a[E]=l.rules[E];var $=typeof l=="string"?l:l.include;if($&&($==="$self"&&($="start"),Array.isArray($)?p=$.map(function(C){return a[C]}):p=a[$]),p){var _=[o,1].concat(p);l.noEscape&&(_=_.filter(function(C){return!C.next})),h.splice.apply(h,_),o--}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}}Object.keys(a).forEach(s,this)},this.createKeywordMapper=function(f,a,s,c){var h=Object.create(null);return this.$keywordList=[],Object.keys(f).forEach(function(o){for(var l=f[o],p=l.split(c||"|"),y=p.length;y--;){var x=p[y];this.$keywordList.push(x),s&&(x=x.toLowerCase()),h[x]=o}},this),f=null,s?function(o){return h[o.toLowerCase()]||a}:function(o){return h[o]||a}},this.getKeywords=function(){return this.$keywords}}).call(g.prototype),r.TextHighlightRules=g}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,r,m){var d;d=function(){this.$behaviours={}},(function(){this.add=function(g,w,u){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[g]:this.$behaviours[g]={}}this.$behaviours[g][w]=u},this.addBehaviours=function(g){for(var w in g)for(var u in g[w])this.add(w,u,g[w][u])},this.remove=function(g){this.$behaviours&&this.$behaviours[g]&&delete this.$behaviours[g]},this.inherit=function(g,w){if(typeof g=="function")var u=new g().getBehaviours(w);else var u=g.getBehaviours(w);this.addBehaviours(u)},this.getBehaviours=function(g){if(g){for(var w={},u=0;u<g.length;u++)this.$behaviours[g[u]]&&(w[g[u]]=this.$behaviours[g[u]]);return w}else return this.$behaviours}}).call(d.prototype),r.Behaviour=d}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(e,r,m){var d=e("./range").Range,g=(function(){function w(u,f,a){this.$session=u,this.$row=f,this.$rowTokens=u.getTokens(f);var s=u.getTokenAt(f,a);this.$tokenIndex=s?s.index:-1}return w.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]},w.prototype.stepForward=function(){this.$tokenIndex+=1;for(var u;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,u||(u=this.$session.getLength()),this.$row>=u)return this.$row=u-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},w.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},w.prototype.getCurrentTokenRow=function(){return this.$row},w.prototype.getCurrentTokenColumn=function(){var u=this.$rowTokens,f=this.$tokenIndex,a=u[f].start;if(a!==void 0)return a;for(a=0;f>0;)f-=1,a+=u[f].value.length;return a},w.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},w.prototype.getCurrentTokenRange=function(){var u=this.$rowTokens[this.$tokenIndex],f=this.getCurrentTokenColumn();return new d(this.$row,f,this.$row,f+u.value.length)},w})();r.TokenIterator=g}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,r,m){var d=e("../../lib/oop"),g=e("../behaviour").Behaviour,w=e("../../token_iterator").TokenIterator,u=e("../../lib/lang"),f=["text","paren.rparen","rparen","paren","punctuation.operator"],a=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],s,c={},h={'"':'"',"'":"'"},o=function(y){var x=-1;if(y.multiSelect&&(x=y.selection.index,c.rangeCount!=y.multiSelect.rangeCount&&(c={rangeCount:y.multiSelect.rangeCount})),c[x])return s=c[x];s=c[x]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},l=function(y,x,E,$){var _=y.end.row-y.start.row;return{text:E+x+$,selection:[0,y.start.column+1,_,y.end.column+(_?0:1)]}},p;p=function(y){y=y||{},this.add("braces","insertion",function(x,E,$,_,C){var L=$.getCursorPosition(),D=_.doc.getLine(L.row);if(C=="{"){o($);var I=$.getSelectionRange(),M=_.doc.getTextRange(I),W=_.getTokenAt(L.row,L.column);if(M!==""&&M!=="{"&&$.getWrapBehavioursEnabled())return l(I,M,"{","}");if(W&&/(?:string)\.quasi|\.xml/.test(W.type)){var z=[/tag\-(?:open|name)/,/attribute\-name/];return z.some(function(G){return G.test(W.type)})||/(string)\.quasi/.test(W.type)&&W.value[L.column-W.start-1]!=="$"?void 0:(p.recordAutoInsert($,_,"}"),{text:"{}",selection:[1,1]})}else if(p.isSaneInsertion($,_))return/[\]\}\)]/.test(D[L.column])||$.inMultiSelectMode||y.braces?(p.recordAutoInsert($,_,"}"),{text:"{}",selection:[1,1]}):(p.recordMaybeInsert($,_,"{"),{text:"{",selection:[1,1]})}else if(C=="}"){o($);var O=D.substring(L.column,L.column+1);if(O=="}"){var T=_.$findOpeningBracket("}",{column:L.column+1,row:L.row});if(T!==null&&p.isAutoInsertedClosing(L,D,C))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(C==`
183
+ `||C==`\r
184
+ `){o($);var A="";p.isMaybeInsertedClosing(L,D)&&(A=u.stringRepeat("}",s.maybeInsertedBrackets),p.clearMaybeInsertedClosing());var O=D.substring(L.column,L.column+1);if(O==="}"){var N=_.findMatchingBracket({row:L.row,column:L.column+1},"}");if(!N)return null;var B=this.$getIndent(_.getLine(N.row))}else if(A)var B=this.$getIndent(D);else{p.clearMaybeInsertedClosing();return}var U=B+_.getTabString();return{text:`
185
+ `+U+`
186
+ `+B+A,selection:[1,U.length,1,U.length]}}else p.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(x,E,$,_,C){var L=_.doc.getTextRange(C);if(!C.isMultiLine()&&L=="{"){o($);var D=_.doc.getLine(C.start.row),I=D.substring(C.end.column,C.end.column+1);if(I=="}")return C.end.column++,C;s.maybeInsertedBrackets--}}),this.add("parens","insertion",function(x,E,$,_,C){if(C=="("){o($);var L=$.getSelectionRange(),D=_.doc.getTextRange(L);if(D!==""&&$.getWrapBehavioursEnabled())return l(L,D,"(",")");if(p.isSaneInsertion($,_))return p.recordAutoInsert($,_,")"),{text:"()",selection:[1,1]}}else if(C==")"){o($);var I=$.getCursorPosition(),M=_.doc.getLine(I.row),W=M.substring(I.column,I.column+1);if(W==")"){var z=_.$findOpeningBracket(")",{column:I.column+1,row:I.row});if(z!==null&&p.isAutoInsertedClosing(I,M,C))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(x,E,$,_,C){var L=_.doc.getTextRange(C);if(!C.isMultiLine()&&L=="("){o($);var D=_.doc.getLine(C.start.row),I=D.substring(C.start.column+1,C.start.column+2);if(I==")")return C.end.column++,C}}),this.add("brackets","insertion",function(x,E,$,_,C){if(C=="["){o($);var L=$.getSelectionRange(),D=_.doc.getTextRange(L);if(D!==""&&$.getWrapBehavioursEnabled())return l(L,D,"[","]");if(p.isSaneInsertion($,_))return p.recordAutoInsert($,_,"]"),{text:"[]",selection:[1,1]}}else if(C=="]"){o($);var I=$.getCursorPosition(),M=_.doc.getLine(I.row),W=M.substring(I.column,I.column+1);if(W=="]"){var z=_.$findOpeningBracket("]",{column:I.column+1,row:I.row});if(z!==null&&p.isAutoInsertedClosing(I,M,C))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(x,E,$,_,C){var L=_.doc.getTextRange(C);if(!C.isMultiLine()&&L=="["){o($);var D=_.doc.getLine(C.start.row),I=D.substring(C.start.column+1,C.start.column+2);if(I=="]")return C.end.column++,C}}),this.add("string_dquotes","insertion",function(x,E,$,_,C){var L=_.$mode.$quotes||h;if(C.length==1&&L[C]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(C)!=-1)return;o($);var D=C,I=$.getSelectionRange(),M=_.doc.getTextRange(I);if(M!==""&&(M.length!=1||!L[M])&&$.getWrapBehavioursEnabled())return l(I,M,D,D);if(!M){var W=$.getCursorPosition(),z=_.doc.getLine(W.row),O=z.substring(W.column-1,W.column),T=z.substring(W.column,W.column+1),A=_.getTokenAt(W.row,W.column),N=_.getTokenAt(W.row,W.column+1);if(O=="\\"&&A&&/escape/.test(A.type))return null;var B=A&&/string|escape/.test(A.type),U=!N||/string|escape/.test(N.type),G;if(T==D)G=B!==U,G&&/string\.end/.test(N.type)&&(G=!1);else{if(B&&!U||B&&U)return null;var J=_.$mode.tokenRe;J.lastIndex=0;var Q=J.test(O);J.lastIndex=0;var le=J.test(T),re=_.$mode.$pairQuotesAfter,ce=re&&re[D]&&re[D].test(O);if(!ce&&Q||le||T&&!/[\s;,.})\]\\]/.test(T))return null;var de=z[W.column-2];if(O==D&&(de==D||J.test(de)))return null;G=!0}return{text:G?D+D:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(x,E,$,_,C){var L=_.$mode.$quotes||h,D=_.doc.getTextRange(C);if(!C.isMultiLine()&&L.hasOwnProperty(D)){o($);var I=_.doc.getLine(C.start.row),M=I.substring(C.start.column+1,C.start.column+2);if(M==D)return C.end.column++,C}}),y.closeDocComment!==!1&&this.add("doc comment end","insertion",function(x,E,$,_,C){if(x==="doc-start"&&(C===`
187
+ `||C===`\r
188
+ `)&&$.selection.isEmpty()){var L=$.getCursorPosition();if(L.column===0)return;for(var D=_.doc.getLine(L.row),I=_.doc.getLine(L.row+1),M=_.getTokens(L.row),W=0,z=0;z<M.length;z++){W+=M[z].value.length;var O=M[z];if(W>=L.column){if(W===L.column){if(!/\.doc/.test(O.type))return;if(/\*\//.test(O.value)){var T=M[z+1];if(!T||!/\.doc/.test(T.type))return}}var A=L.column-(W-O.value.length),N=O.value.indexOf("*/"),B=O.value.indexOf("/**",N>-1?N+2:0);if(B!==-1&&A>B&&A<B+3||N!==-1&&B!==-1&&A>=N&&A<=B||!/\.doc/.test(O.type))return;break}}var U=this.$getIndent(D);if(/\s*\*/.test(I))return/^\s*\*/.test(D)?{text:C+U+"* ",selection:[1,2+U.length,1,2+U.length]}:{text:C+U+" * ",selection:[1,3+U.length,1,3+U.length]};if(/\/\*\*/.test(D.substring(0,L.column)))return{text:C+U+" * "+C+" "+U+"*/",selection:[1,4+U.length,1,4+U.length]}}})},p.isSaneInsertion=function(y,x){var E=y.getCursorPosition(),$=new w(x,E.row,E.column);if(!this.$matchTokenType($.getCurrentToken()||"text",f)){if(/[)}\]]/.test(y.session.getLine(E.row)[E.column]))return!0;var _=new w(x,E.row,E.column+1);if(!this.$matchTokenType(_.getCurrentToken()||"text",f))return!1}return $.stepForward(),$.getCurrentTokenRow()!==E.row||this.$matchTokenType($.getCurrentToken()||"text",a)},p.$matchTokenType=function(y,x){return x.indexOf(y.type||y)>-1},p.recordAutoInsert=function(y,x,E){var $=y.getCursorPosition(),_=x.doc.getLine($.row);this.isAutoInsertedClosing($,_,s.autoInsertedLineEnd[0])||(s.autoInsertedBrackets=0),s.autoInsertedRow=$.row,s.autoInsertedLineEnd=E+_.substr($.column),s.autoInsertedBrackets++},p.recordMaybeInsert=function(y,x,E){var $=y.getCursorPosition(),_=x.doc.getLine($.row);this.isMaybeInsertedClosing($,_)||(s.maybeInsertedBrackets=0),s.maybeInsertedRow=$.row,s.maybeInsertedLineStart=_.substr(0,$.column)+E,s.maybeInsertedLineEnd=_.substr($.column),s.maybeInsertedBrackets++},p.isAutoInsertedClosing=function(y,x,E){return s.autoInsertedBrackets>0&&y.row===s.autoInsertedRow&&E===s.autoInsertedLineEnd[0]&&x.substr(y.column)===s.autoInsertedLineEnd},p.isMaybeInsertedClosing=function(y,x){return s.maybeInsertedBrackets>0&&y.row===s.maybeInsertedRow&&x.substr(y.column)===s.maybeInsertedLineEnd&&x.substr(0,y.column)==s.maybeInsertedLineStart},p.popAutoInsertedClosing=function(){s.autoInsertedLineEnd=s.autoInsertedLineEnd.substr(1),s.autoInsertedBrackets--},p.clearMaybeInsertedClosing=function(){s&&(s.maybeInsertedBrackets=0,s.maybeInsertedRow=-1)},d.inherits(p,g),r.CstyleBehaviour=p}),ace.define("ace/unicode",["require","exports","module"],function(e,r,m){for(var d=[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],g=0,w=[],u=0;u<d.length;u+=2)w.push(g+=d[u]),d[u+1]&&w.push(45,g+=d[u+1]);r.wordChars=String.fromCharCode.apply(null,w)}),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(e,r,m){var d=e("../config"),g=e("../tokenizer").Tokenizer,w=e("./text_highlight_rules").TextHighlightRules,u=e("./behaviour/cstyle").CstyleBehaviour,f=e("../unicode"),a=e("../lib/lang"),s=e("../token_iterator").TokenIterator,c=e("../range").Range,h;h=function(){this.HighlightRules=w},(function(){this.$defaultBehaviour=new u,this.tokenRe=new RegExp("^["+f.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+f.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new g(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(o,l,p,y){var x=l.doc,E=!0,$=!0,_=1/0,C=l.getTabSize(),L=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var D=this.lineCommentStart.map(a.escapeRegExp).join("|"),I=this.lineCommentStart[0];else var D=a.escapeRegExp(this.lineCommentStart),I=this.lineCommentStart;D=new RegExp("^(\\s*)(?:"+D+") ?"),L=l.getUseSoftTabs();var M=function(G,J){var Q=G.match(D);if(Q){var le=Q[1].length,re=Q[0].length;!T(G,le,re)&&Q[0][re-1]==" "&&re--,x.removeInLine(J,le,re)}},W=I+" ",z=function(G,J){(!E||/\S/.test(G))&&(T(G,_,_)?x.insertInLine({row:J,column:_},W):x.insertInLine({row:J,column:_},I))},O=function(G,J){return D.test(G)},T=function(G,J,Q){for(var le=0;J--&&G.charAt(J)==" ";)le++;if(le%C!=0)return!1;for(var le=0;G.charAt(Q++)==" ";)le++;return C>2?le%C!=C-1:le%C==0}}else{if(!this.blockComment)return!1;var I=this.blockComment.start,A=this.blockComment.end,D=new RegExp("^(\\s*)(?:"+a.escapeRegExp(I)+")"),N=new RegExp("(?:"+a.escapeRegExp(A)+")\\s*$"),z=function(ce,de){O(ce,de)||(!E||/\S/.test(ce))&&(x.insertInLine({row:de,column:ce.length},A),x.insertInLine({row:de,column:_},I))},M=function(ce,de){var ie;(ie=ce.match(N))&&x.removeInLine(de,ce.length-ie[0].length,ce.length),(ie=ce.match(D))&&x.removeInLine(de,ie[1].length,ie[0].length)},O=function(ce,de){if(D.test(ce))return!0;for(var ie=l.getTokens(de),fe=0;fe<ie.length;fe++)if(ie[fe].type==="comment")return!0}}function B(G){for(var J=p;J<=y;J++)G(x.getLine(J),J)}var U=1/0;B(function(G,J){var Q=G.search(/\S/);Q!==-1?(Q<_&&(_=Q),$&&!O(G,J)&&($=!1)):U>G.length&&(U=G.length)}),_==1/0&&(_=U,E=!1,$=!1),L&&_%C!=0&&(_=Math.floor(_/C)*C),B($?M:z)},this.toggleBlockComment=function(o,l,p,y){var x=this.blockComment;if(x){!x.start&&x[0]&&(x=x[0]);var E=new s(l,y.row,y.column),$=E.getCurrentToken();l.selection;var _=l.selection.toOrientedRange(),C,L;if($&&/comment/.test($.type)){for(var D,I;$&&/comment/.test($.type);){var M=$.value.indexOf(x.start);if(M!=-1){var W=E.getCurrentTokenRow(),z=E.getCurrentTokenColumn()+M;D=new c(W,z,W,z+x.start.length);break}$=E.stepBackward()}for(var E=new s(l,y.row,y.column),$=E.getCurrentToken();$&&/comment/.test($.type);){var M=$.value.indexOf(x.end);if(M!=-1){var W=E.getCurrentTokenRow(),z=E.getCurrentTokenColumn()+M;I=new c(W,z,W,z+x.end.length);break}$=E.stepForward()}I&&l.remove(I),D&&(l.remove(D),C=D.start.row,L=-x.start.length)}else L=x.start.length,C=p.start.row,l.insert(p.end,x.end),l.insert(p.start,x.start);_.start.row==C&&(_.start.column+=L),_.end.row==C&&(_.end.column+=L),l.selection.fromOrientedRange(_)}},this.getNextLineIndent=function(o,l,p){return this.$getIndent(l)},this.checkOutdent=function(o,l,p){return!1},this.autoOutdent=function(o,l,p){},this.$getIndent=function(o){return o.match(/^\s*/)[0]},this.createWorker=function(o){return null},this.createModeDelegates=function(o){this.$embeds=[],this.$modes={};for(var l in o)if(o[l]){var p=o[l],y=p.prototype.$id,x=d.$modes[y];x||(d.$modes[y]=x=new p),d.$modes[l]||(d.$modes[l]=x),this.$embeds.push(l),this.$modes[l]=x}for(var E=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],$=function(L){(function(D){var I=E[L],M=D[I];D[E[L]]=function(){return this.$delegator(I,arguments,M)}})(_)},_=this,l=0;l<E.length;l++)$(l)},this.$delegator=function(o,l,p){var y=l[0]||"start";if(typeof y!="string"){if(Array.isArray(y[2])){var x=y[2][y[2].length-1],E=this.$modes[x];if(E)return E[o].apply(E,[y[1]].concat([].slice.call(l,1)))}y=y[0]||"start"}for(var $=0;$<this.$embeds.length;$++)if(this.$modes[this.$embeds[$]]){var _=y.split(this.$embeds[$]);if(!_[0]&&_[1]){l[0]=_[1];var E=this.$modes[this.$embeds[$]];return E[o].apply(E,l)}}var C=p.apply(this,l);return p?C:void 0},this.transformAction=function(o,l,p,y,x){if(this.$behaviour){var E=this.$behaviour.getBehaviours();for(var $ in E)if(E[$][l]){var _=E[$][l].apply(this,arguments);if(_)return _}}},this.getKeywords=function(o){if(!this.completionKeywords){var l=this.$tokenizer.rules,p=[];for(var y in l)for(var x=l[y],E=0,$=x.length;E<$;E++)if(typeof x[E].token=="string")/keyword|support|storage/.test(x[E].token)&&p.push(x[E].regex);else if(typeof x[E].token=="object"){for(var _=0,C=x[E].token.length;_<C;_++)if(/keyword|support|storage/.test(x[E].token[_])){var y=x[E].regex.match(/\(.+?\)/g)[_];p.push(y.substr(1,y.length-2))}}this.completionKeywords=p}return o?p.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(o,l,p,y){var x=this.$keywordList||this.$createKeywordList();return x.map(function(E){return{name:E,value:E,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(h.prototype),r.Mode=h}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(e,r,m){var d=e("./lib/dom"),g=(function(){function w(u){this.session=u,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 w.prototype.getRowLength=function(u){var f;return this.lineWidgets?f=this.lineWidgets[u]&&this.lineWidgets[u].rowCount||0:f=0,!this.$useWrapMode||!this.$wrapData[u]?1+f:this.$wrapData[u].length+1+f},w.prototype.$getWidgetScreenLength=function(){var u=0;return this.lineWidgets.forEach(function(f){f&&f.rowCount&&!f.hidden&&(u+=f.rowCount)}),u},w.prototype.$onChangeEditor=function(u){this.attach(u.editor)},w.prototype.attach=function(u){u&&u.widgetManager&&u.widgetManager!=this&&u.widgetManager.detach(),this.editor!=u&&(this.detach(),this.editor=u,u&&(u.widgetManager=this,u.renderer.on("beforeRender",this.measureWidgets),u.renderer.on("afterRender",this.renderWidgets)))},w.prototype.detach=function(u){var f=this.editor;if(f){this.editor=null,f.widgetManager=null,f.renderer.off("beforeRender",this.measureWidgets),f.renderer.off("afterRender",this.renderWidgets);var a=this.session.lineWidgets;a&&a.forEach(function(s){s&&s.el&&s.el.parentNode&&(s._inDocument=!1,s.el.parentNode.removeChild(s.el))})}},w.prototype.updateOnFold=function(u,f){var a=f.lineWidgets;if(!(!a||!u.action)){for(var s=u.data,c=s.start.row,h=s.end.row,o=u.action=="add",l=c+1;l<h;l++)a[l]&&(a[l].hidden=o);a[h]&&(o?a[c]?a[h].hidden=o:a[c]=a[h]:(a[c]==a[h]&&(a[c]=void 0),a[h].hidden=o))}},w.prototype.updateOnChange=function(u){var f=this.session.lineWidgets;if(f){var a=u.start.row,s=u.end.row-a;if(s!==0)if(u.action=="remove"){var c=f.splice(a+1,s);!f[a]&&c[c.length-1]&&(f[a]=c.pop()),c.forEach(function(o){o&&this.removeLineWidget(o)},this),this.$updateRows()}else{var h=new Array(s);f[a]&&f[a].column!=null&&u.start.column>f[a].column&&a++,h.unshift(a,0),f.splice.apply(f,h),this.$updateRows()}}},w.prototype.$updateRows=function(){var u=this.session.lineWidgets;if(u){var f=!0;u.forEach(function(a,s){if(a)for(f=!1,a.row=s;a.$oldWidget;)a.$oldWidget.row=s,a=a.$oldWidget}),f&&(this.session.lineWidgets=null)}},w.prototype.$registerLineWidget=function(u){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var f=this.session.lineWidgets[u.row];return f&&(u.$oldWidget=f,f.el&&f.el.parentNode&&(f.el.parentNode.removeChild(f.el),f._inDocument=!1)),this.session.lineWidgets[u.row]=u,u},w.prototype.addLineWidget=function(u){if(this.$registerLineWidget(u),u.session=this.session,!this.editor)return u;var f=this.editor.renderer;u.html&&!u.el&&(u.el=d.createElement("div"),u.el.innerHTML=u.html),u.text&&!u.el&&(u.el=d.createElement("div"),u.el.textContent=u.text),u.el&&(d.addCssClass(u.el,"ace_lineWidgetContainer"),u.className&&d.addCssClass(u.el,u.className),u.el.style.position="absolute",u.el.style.zIndex="5",f.container.appendChild(u.el),u._inDocument=!0,u.coverGutter||(u.el.style.zIndex="3"),u.pixelHeight==null&&(u.pixelHeight=u.el.offsetHeight)),u.rowCount==null&&(u.rowCount=u.pixelHeight/f.layerConfig.lineHeight);var a=this.session.getFoldAt(u.row,0);if(u.$fold=a,a){var s=this.session.lineWidgets;u.row==a.end.row&&!s[a.start.row]?s[a.start.row]=u:u.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:u.row}}}),this.$updateRows(),this.renderWidgets(null,f),this.onWidgetChanged(u),u},w.prototype.removeLineWidget=function(u){if(u._inDocument=!1,u.session=null,u.el&&u.el.parentNode&&u.el.parentNode.removeChild(u.el),u.editor&&u.editor.destroy)try{u.editor.destroy()}catch{}if(this.session.lineWidgets){var f=this.session.lineWidgets[u.row];if(f==u)this.session.lineWidgets[u.row]=u.$oldWidget,u.$oldWidget&&this.onWidgetChanged(u.$oldWidget);else for(;f;){if(f.$oldWidget==u){f.$oldWidget=u.$oldWidget;break}f=f.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:u.row}}}),this.$updateRows()},w.prototype.getWidgetsAtRow=function(u){for(var f=this.session.lineWidgets,a=f&&f[u],s=[];a;)s.push(a),a=a.$oldWidget;return s},w.prototype.onWidgetChanged=function(u){this.session._changedWidgets.push(u),this.editor&&this.editor.renderer.updateFull()},w.prototype.measureWidgets=function(u,f){var a=this.session._changedWidgets,s=f.layerConfig;if(!(!a||!a.length)){for(var c=1/0,h=0;h<a.length;h++){var o=a[h];if(!(!o||!o.el)&&o.session==this.session){if(!o._inDocument){if(this.session.lineWidgets[o.row]!=o)continue;o._inDocument=!0,f.container.appendChild(o.el)}o.h=o.el.offsetHeight,o.fixedWidth||(o.w=o.el.offsetWidth,o.screenWidth=Math.ceil(o.w/s.characterWidth));var l=o.h/s.lineHeight;o.coverLine&&(l-=this.session.getRowLineCount(o.row),l<0&&(l=0)),o.rowCount!=l&&(o.rowCount=l,o.row<c&&(c=o.row))}}c!=1/0&&(this.session._emit("changeFold",{data:{start:{row:c}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},w.prototype.renderWidgets=function(u,f){var a=f.layerConfig,s=this.session.lineWidgets;if(s){for(var c=Math.min(this.firstRow,a.firstRow),h=Math.max(this.lastRow,a.lastRow,s.length);c>0&&!s[c];)c--;this.firstRow=a.firstRow,this.lastRow=a.lastRow,f.$cursorLayer.config=a;for(var o=c;o<=h;o++){var l=s[o];if(!(!l||!l.el)){if(l.hidden){l.el.style.top=-100-(l.pixelHeight||0)+"px";continue}l._inDocument||(l._inDocument=!0,f.container.appendChild(l.el));var p=f.$cursorLayer.getPixelPosition({row:o,column:0},!0).top;l.coverLine||(p+=a.lineHeight*this.session.getRowLineCount(l.row)),l.el.style.top=p-a.offset+"px";var y=l.coverGutter?0:f.gutterWidth;l.fixedWidth||(y-=f.scrollLeft),l.el.style.left=y+"px",l.fullWidth&&l.screenWidth&&(l.el.style.minWidth=a.width+2*a.padding+"px"),l.fixedWidth?l.el.style.right=f.scrollBar.getWidth()+"px":l.el.style.right=""}}}},w})();r.LineWidgets=g}),ace.define("ace/apply_delta",["require","exports","module"],function(e,r,m){r.applyDelta=function(d,g,w){var u=g.start.row,f=g.start.column,a=d[u]||"";switch(g.action){case"insert":var s=g.lines;if(s.length===1)d[u]=a.substring(0,f)+g.lines[0]+a.substring(f);else{var c=[u,1].concat(g.lines);d.splice.apply(d,c),d[u]=a.substring(0,f)+d[u],d[u+g.lines.length-1]+=a.substring(f)}break;case"remove":var h=g.end.column,o=g.end.row;u===o?d[u]=a.substring(0,f)+a.substring(h):d.splice(u,o-u+1,a.substring(0,f)+d[o].substring(h));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,r,m){var d=e("./lib/oop"),g=e("./lib/event_emitter").EventEmitter,w=(function(){function a(s,c,h){this.$onChange=this.onChange.bind(this),this.attach(s),typeof c!="number"?this.setPosition(c.row,c.column):this.setPosition(c,h)}return a.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},a.prototype.getDocument=function(){return this.document},a.prototype.onChange=function(s){if(!(s.start.row==s.end.row&&s.start.row!=this.row)&&!(s.start.row>this.row)){var c=f(s,{row:this.row,column:this.column},this.$insertRight);this.setPosition(c.row,c.column,!0)}},a.prototype.setPosition=function(s,c,h){var o;if(h?o={row:s,column:c}:o=this.$clipPositionToDocument(s,c),!(this.row==o.row&&this.column==o.column)){var l={row:this.row,column:this.column};this.row=o.row,this.column=o.column,this._signal("change",{old:l,value:o})}},a.prototype.detach=function(){this.document.off("change",this.$onChange)},a.prototype.attach=function(s){this.document=s||this.document,this.document.on("change",this.$onChange)},a.prototype.$clipPositionToDocument=function(s,c){var h={};return s>=this.document.getLength()?(h.row=Math.max(0,this.document.getLength()-1),h.column=this.document.getLine(h.row).length):s<0?(h.row=0,h.column=0):(h.row=s,h.column=Math.min(this.document.getLine(h.row).length,Math.max(0,c))),c<0&&(h.column=0),h},a})();w.prototype.$insertRight=!1,d.implement(w.prototype,g);function u(a,s,c){var h=c?a.column<=s.column:a.column<s.column;return a.row<s.row||a.row==s.row&&h}function f(a,s,c){var h=a.action=="insert",o=(h?1:-1)*(a.end.row-a.start.row),l=(h?1:-1)*(a.end.column-a.start.column),p=a.start,y=h?p:a.end;return u(s,p,c)?{row:s.row,column:s.column}:u(y,s,!c)?{row:s.row+o,column:s.column+(s.row==y.row?l:0)}:{row:p.row,column:p.column}}r.Anchor=w}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,r,m){var d=e("./lib/oop"),g=e("./apply_delta").applyDelta,w=e("./lib/event_emitter").EventEmitter,u=e("./range").Range,f=e("./anchor").Anchor,a=(function(){function s(c){this.$lines=[""],c.length===0?this.$lines=[""]:Array.isArray(c)?this.insertMergedLines({row:0,column:0},c):this.insert({row:0,column:0},c)}return s.prototype.setValue=function(c){var h=this.getLength()-1;this.remove(new u(0,0,h,this.getLine(h).length)),this.insert({row:0,column:0},c||"")},s.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},s.prototype.createAnchor=function(c,h){return new f(this,c,h)},s.prototype.$detectNewLine=function(c){var h=c.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=h?h[1]:`
189
+ `,this._signal("changeNewLineMode")},s.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
190
+ `;case"unix":return`
191
+ `;default:return this.$autoNewLine||`
192
+ `}},s.prototype.setNewLineMode=function(c){this.$newLineMode!==c&&(this.$newLineMode=c,this._signal("changeNewLineMode"))},s.prototype.getNewLineMode=function(){return this.$newLineMode},s.prototype.isNewLine=function(c){return c==`\r
193
+ `||c=="\r"||c==`
194
+ `},s.prototype.getLine=function(c){return this.$lines[c]||""},s.prototype.getLines=function(c,h){return this.$lines.slice(c,h+1)},s.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},s.prototype.getLength=function(){return this.$lines.length},s.prototype.getTextRange=function(c){return this.getLinesForRange(c).join(this.getNewLineCharacter())},s.prototype.getLinesForRange=function(c){var h;if(c.start.row===c.end.row)h=[this.getLine(c.start.row).substring(c.start.column,c.end.column)];else{h=this.getLines(c.start.row,c.end.row),h[0]=(h[0]||"").substring(c.start.column);var o=h.length-1;c.end.row-c.start.row==o&&(h[o]=h[o].substring(0,c.end.column))}return h},s.prototype.insertLines=function(c,h){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(c,h)},s.prototype.removeLines=function(c,h){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(c,h)},s.prototype.insertNewLine=function(c){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(c,["",""])},s.prototype.insert=function(c,h){return this.getLength()<=1&&this.$detectNewLine(h),this.insertMergedLines(c,this.$split(h))},s.prototype.insertInLine=function(c,h){var o=this.clippedPos(c.row,c.column),l=this.pos(c.row,c.column+h.length);return this.applyDelta({start:o,end:l,action:"insert",lines:[h]},!0),this.clonePos(l)},s.prototype.clippedPos=function(c,h){var o=this.getLength();c===void 0?c=o:c<0?c=0:c>=o&&(c=o-1,h=void 0);var l=this.getLine(c);return h==null&&(h=l.length),h=Math.min(Math.max(h,0),l.length),{row:c,column:h}},s.prototype.clonePos=function(c){return{row:c.row,column:c.column}},s.prototype.pos=function(c,h){return{row:c,column:h}},s.prototype.$clipPosition=function(c){var h=this.getLength();return c.row>=h?(c.row=Math.max(0,h-1),c.column=this.getLine(h-1).length):(c.row=Math.max(0,c.row),c.column=Math.min(Math.max(c.column,0),this.getLine(c.row).length)),c},s.prototype.insertFullLines=function(c,h){c=Math.min(Math.max(c,0),this.getLength());var o=0;c<this.getLength()?(h=h.concat([""]),o=0):(h=[""].concat(h),c--,o=this.$lines[c].length),this.insertMergedLines({row:c,column:o},h)},s.prototype.insertMergedLines=function(c,h){var o=this.clippedPos(c.row,c.column),l={row:o.row+h.length-1,column:(h.length==1?o.column:0)+h[h.length-1].length};return this.applyDelta({start:o,end:l,action:"insert",lines:h}),this.clonePos(l)},s.prototype.remove=function(c){var h=this.clippedPos(c.start.row,c.start.column),o=this.clippedPos(c.end.row,c.end.column);return this.applyDelta({start:h,end:o,action:"remove",lines:this.getLinesForRange({start:h,end:o})}),this.clonePos(h)},s.prototype.removeInLine=function(c,h,o){var l=this.clippedPos(c,h),p=this.clippedPos(c,o);return this.applyDelta({start:l,end:p,action:"remove",lines:this.getLinesForRange({start:l,end:p})},!0),this.clonePos(l)},s.prototype.removeFullLines=function(c,h){c=Math.min(Math.max(0,c),this.getLength()-1),h=Math.min(Math.max(0,h),this.getLength()-1);var o=h==this.getLength()-1&&c>0,l=h<this.getLength()-1,p=o?c-1:c,y=o?this.getLine(p).length:0,x=l?h+1:h,E=l?0:this.getLine(x).length,$=new u(p,y,x,E),_=this.$lines.slice(c,h+1);return this.applyDelta({start:$.start,end:$.end,action:"remove",lines:this.getLinesForRange($)}),_},s.prototype.removeNewLine=function(c){c<this.getLength()-1&&c>=0&&this.applyDelta({start:this.pos(c,this.getLine(c).length),end:this.pos(c+1,0),action:"remove",lines:["",""]})},s.prototype.replace=function(c,h){if(c instanceof u||(c=u.fromPoints(c.start,c.end)),h.length===0&&c.isEmpty())return c.start;if(h==this.getTextRange(c))return c.end;this.remove(c);var o;return h?o=this.insert(c.start,h):o=c.start,o},s.prototype.applyDeltas=function(c){for(var h=0;h<c.length;h++)this.applyDelta(c[h])},s.prototype.revertDeltas=function(c){for(var h=c.length-1;h>=0;h--)this.revertDelta(c[h])},s.prototype.applyDelta=function(c,h){var o=c.action=="insert";(o?c.lines.length<=1&&!c.lines[0]:!u.comparePoints(c.start,c.end))||(o&&c.lines.length>2e4?this.$splitAndapplyLargeDelta(c,2e4):(g(this.$lines,c,h),this._signal("change",c)))},s.prototype.$safeApplyDelta=function(c){var h=this.$lines.length;(c.action=="remove"&&c.start.row<h&&c.end.row<h||c.action=="insert"&&c.start.row<=h)&&this.applyDelta(c)},s.prototype.$splitAndapplyLargeDelta=function(c,h){for(var o=c.lines,l=o.length-h+1,p=c.start.row,y=c.start.column,x=0,E=0;x<l;x=E){E+=h-1;var $=o.slice(x,E);$.push(""),this.applyDelta({start:this.pos(p+x,y),end:this.pos(p+E,y=0),action:c.action,lines:$},!0)}c.lines=o.slice(x),c.start.row=p+x,c.start.column=y,this.applyDelta(c,!0)},s.prototype.revertDelta=function(c){this.$safeApplyDelta({start:this.clonePos(c.start),end:this.clonePos(c.end),action:c.action=="insert"?"remove":"insert",lines:c.lines.slice()})},s.prototype.indexToPosition=function(c,h){for(var o=this.$lines||this.getAllLines(),l=this.getNewLineCharacter().length,p=h||0,y=o.length;p<y;p++)if(c-=o[p].length+l,c<0)return{row:p,column:c+o[p].length+l};return{row:y-1,column:c+o[y-1].length+l}},s.prototype.positionToIndex=function(c,h){for(var o=this.$lines||this.getAllLines(),l=this.getNewLineCharacter().length,p=0,y=Math.min(c.row,o.length),x=h||0;x<y;++x)p+=o[x].length+l;return p+c.column},s.prototype.$split=function(c){return c.split(/\r\n|\r|\n/)},s})();a.prototype.$autoNewLine="",a.prototype.$newLineMode="auto",d.implement(a.prototype,w),r.Document=a}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,r,m){var d=e("./lib/oop"),g=e("./lib/event_emitter").EventEmitter,w=(function(){function u(f,a){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=f;var s=this;this.$worker=function(){if(s.running){for(var c=new Date,h=s.currentLine,o=-1,l=s.doc,p=h;s.lines[h];)h++;var y=l.getLength(),x=0;for(s.running=!1;h<y;){s.$tokenizeRow(h),o=h;do h++;while(s.lines[h]);if(x++,x%5===0&&new Date-c>20){s.running=setTimeout(s.$worker,20);break}}s.currentLine=h,o==-1&&(o=h),p<=o&&s.fireUpdateEvent(p,o)}}}return u.prototype.setTokenizer=function(f){this.tokenizer=f,this.lines=[],this.states=[],this.start(0)},u.prototype.setDocument=function(f){this.doc=f,this.lines=[],this.states=[],this.stop()},u.prototype.fireUpdateEvent=function(f,a){var s={first:f,last:a};this._signal("update",{data:s})},u.prototype.start=function(f){this.currentLine=Math.min(f||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)},u.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},u.prototype.$updateOnChange=function(f){var a=f.start.row,s=f.end.row-a;if(s===0)this.lines[a]=null;else if(f.action=="remove")this.lines.splice(a,s+1,null),this.states.splice(a,s+1,null);else{var c=Array(s+1);c.unshift(a,1),this.lines.splice.apply(this.lines,c),this.states.splice.apply(this.states,c)}this.currentLine=Math.min(a,this.currentLine,this.doc.getLength()),this.stop()},u.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},u.prototype.getTokens=function(f){return this.lines[f]||this.$tokenizeRow(f)},u.prototype.getState=function(f){return this.currentLine==f&&this.$tokenizeRow(f),this.states[f]||"start"},u.prototype.$tokenizeRow=function(f){var a=this.doc.getLine(f),s=this.states[f-1],c=this.tokenizer.getLineTokens(a,s,f);return this.states[f]+""!=c.state+""?(this.states[f]=c.state,this.lines[f+1]=null,this.currentLine>f+1&&(this.currentLine=f+1)):this.currentLine==f&&(this.currentLine=f+1),this.lines[f]=c.tokens},u.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},u})();d.implement(w.prototype,g),r.BackgroundTokenizer=w}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(e,r,m){var d=e("./lib/lang"),g=e("./range").Range,w=(function(){function u(f,a,s){s===void 0&&(s="text"),this.setRegexp(f),this.clazz=a,this.type=s,this.docLen=0}return u.prototype.setRegexp=function(f){this.regExp+""!=f+""&&(this.regExp=f,this.cache=[])},u.prototype.update=function(f,a,s,c){if(this.regExp){for(var h=c.firstRow,o=c.lastRow,l={},p=s.$editor&&s.$editor.$search,y=p&&p.$isMultilineSearch(s.$editor.getLastSearchOptions()),x=h;x<=o;x++){var E=this.cache[x];if(E==null||s.getValue().length!=this.docLen){if(y){E=[];var $=p.$multiLineForward(s,this.regExp,x,o);if($){var _=$.endRow<=o?$.endRow-1:o;_>x&&(x=_),E.push(new g($.startRow,$.startCol,$.endRow,$.endCol))}E.length>this.MAX_RANGES&&(E=E.slice(0,this.MAX_RANGES))}else E=d.getMatchOffsets(s.getLine(x),this.regExp),E.length>this.MAX_RANGES&&(E=E.slice(0,this.MAX_RANGES)),E=E.map(function(I){return new g(x,I.offset,x,I.offset+I.length)});this.cache[x]=E.length?E:""}if(E.length!==0)for(var C=E.length;C--;){var L=E[C].toScreenRange(s),D=L.toString();l[D]||(l[D]=!0,a.drawSingleLineMarker(f,L,this.clazz,c))}}this.docLen=s.getValue().length}},u})();w.prototype.MAX_RANGES=500,r.SearchHighlight=w}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,r,m){var d=(function(){function _(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return _.prototype.addSession=function(C){this.$session=C},_.prototype.add=function(C,L,D){if(!this.$fromUndo&&C!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),L===!1||!this.lastDeltas){this.lastDeltas=[];var I=this.$undoStack.length;I>this.$undoDepth-1&&this.$undoStack.splice(0,I-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),C.id=this.$rev=++this.$maxRev}(C.action=="remove"||C.action=="insert")&&(this.$lastDelta=C),this.lastDeltas.push(C)}},_.prototype.addSelection=function(C,L){this.selections.push({value:C,rev:L||this.$rev})},_.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},_.prototype.markIgnored=function(C,L){L==null&&(L=this.$rev+1);for(var D=this.$undoStack,I=D.length;I--;){var M=D[I][0];if(M.id<=C)break;M.id<L&&(M.ignore=!0)}this.lastDeltas=null},_.prototype.getSelection=function(C,L){for(var D=this.selections,I=D.length;I--;){var M=D[I];if(M.rev<C)return L&&(M=D[I+1]),M}},_.prototype.getRevision=function(){return this.$rev},_.prototype.getDeltas=function(C,L){L==null&&(L=this.$rev+1);for(var D=this.$undoStack,I=null,M=0,W=D.length;W--;){var z=D[W][0];if(z.id<L&&!I&&(I=W+1),z.id<=C){M=W+1;break}}return D.slice(M,I)},_.prototype.getChangedRanges=function(C,L){L==null&&(L=this.$rev+1)},_.prototype.getChangedLines=function(C,L){L==null&&(L=this.$rev+1)},_.prototype.undo=function(C,L){this.lastDeltas=null;var D=this.$undoStack;if(g(D,D.length)){C||(C=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var I=D.pop(),M=null;return I&&(M=C.undoChanges(I,L),this.$redoStack.push(I),this.$syncRev()),this.$fromUndo=!1,M}},_.prototype.redo=function(C,L){if(this.lastDeltas=null,C||(C=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var D=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);$(this.$redoStack,D),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(W){W[0].id=++this.$maxRev},this)}var I=this.$redoStack.pop(),M=null;return I&&(M=C.redoChanges(I,L),this.$undoStack.push(I),this.$syncRev()),this.$fromUndo=!1,M},_.prototype.$syncRev=function(){var C=this.$undoStack,L=C[C.length-1],D=L&&L[0].id||0;this.$redoStackBaseRev=D,this.$rev=D},_.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},_.prototype.canUndo=function(){return this.$undoStack.length>0},_.prototype.canRedo=function(){return this.$redoStack.length>0},_.prototype.bookmark=function(C){C==null&&(C=this.$rev),this.mark=C},_.prototype.isAtBookmark=function(){return this.$rev===this.mark},_.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},_.prototype.fromJSON=function(C){this.reset(),this.$undoStack=C.$undoStack,this.$redoStack=C.$redoStack},_.prototype.$prettyPrint=function(C){return C?s(C):s(this.$undoStack)+`
195
+ ---
196
+ `+s(this.$redoStack)},_})();d.prototype.hasUndo=d.prototype.canUndo,d.prototype.hasRedo=d.prototype.canRedo,d.prototype.isClean=d.prototype.isAtBookmark,d.prototype.markClean=d.prototype.bookmark;function g(_,C){for(var L=C;L--;){var D=_[L];if(D&&!D[0].ignore){for(;L<C-1;){var I=o(_[L],_[L+1]);_[L]=I[0],_[L+1]=I[1],L++}return!0}}}var w=e("./range").Range,u=w.comparePoints;w.comparePoints;function f(_){return{row:_.row,column:_.column}}function a(_){return{start:f(_.start),end:f(_.end),action:_.action,lines:_.lines.slice()}}function s(_){if(_=_||this,Array.isArray(_))return _.map(s).join(`
197
+ `);var C="";return _.action?(C=_.action=="insert"?"+":"-",C+="["+_.lines+"]"):_.value&&(Array.isArray(_.value)?C=_.value.map(c).join(`
198
+ `):C=c(_.value)),_.start&&(C+=c(_)),(_.id||_.rev)&&(C+=" ("+(_.id||_.rev)+")"),C}function c(_){return _.start.row+":"+_.start.column+"=>"+_.end.row+":"+_.end.column}function h(_,C){var L=_.action=="insert",D=C.action=="insert";if(L&&D)if(u(C.start,_.end)>=0)p(C,_,-1);else if(u(C.start,_.start)<=0)p(_,C,1);else return null;else if(L&&!D)if(u(C.start,_.end)>=0)p(C,_,-1);else if(u(C.end,_.start)<=0)p(_,C,-1);else return null;else if(!L&&D)if(u(C.start,_.start)>=0)p(C,_,1);else if(u(C.start,_.start)<=0)p(_,C,1);else return null;else if(!L&&!D)if(u(C.start,_.start)>=0)p(C,_,1);else if(u(C.end,_.start)<=0)p(_,C,-1);else return null;return[C,_]}function o(_,C){for(var L=_.length;L--;)for(var D=0;D<C.length;D++)if(!h(_[L],C[D])){for(;L<_.length;){for(;D--;)h(C[D],_[L]);D=C.length,L++}return[_,C]}return _.selectionBefore=C.selectionBefore=_.selectionAfter=C.selectionAfter=null,[C,_]}function l(_,C){var L=_.action=="insert",D=C.action=="insert";if(L&&D)u(_.start,C.start)<0?p(C,_,1):p(_,C,1);else if(L&&!D)u(_.start,C.end)>=0?p(_,C,-1):(u(_.start,C.start)<=0||p(_,w.fromPoints(C.start,_.start),-1),p(C,_,1));else if(!L&&D)u(C.start,_.end)>=0?p(C,_,-1):(u(C.start,_.start)<=0||p(C,w.fromPoints(_.start,C.start),-1),p(_,C,1));else if(!L&&!D)if(u(C.start,_.end)>=0)p(C,_,-1);else if(u(C.end,_.start)<=0)p(_,C,-1);else{var I,M;return u(_.start,C.start)<0&&(I=_,_=x(_,C.start)),u(_.end,C.end)>0&&(M=x(_,C.end)),y(C.end,_.start,_.end,-1),M&&!I&&(_.lines=M.lines,_.start=M.start,_.end=M.end,M=_),[C,I,M].filter(Boolean)}return[C,_]}function p(_,C,L){y(_.start,C.start,C.end,L),y(_.end,C.start,C.end,L)}function y(_,C,L,D){_.row==(D==1?C:L).row&&(_.column+=D*(L.column-C.column)),_.row+=D*(L.row-C.row)}function x(_,C){var L=_.lines,D=_.end;_.end=f(C);var I=_.end.row-_.start.row,M=L.splice(I,L.length),W=I?C.column:C.column-_.start.column;L.push(M[0].substring(0,W)),M[0]=M[0].substr(W);var z={start:f(C),end:D,lines:M,action:_.action};return z}function E(_,C){C=a(C);for(var L=_.length;L--;){for(var D=_[L],I=0;I<D.length;I++){var M=D[I],W=l(M,C);C=W[0],W.length!=2&&(W[2]?(D.splice(I+1,1,W[1],W[2]),I++):W[1]||(D.splice(I,1),I--))}D.length||_.splice(L,1)}return _}function $(_,C){for(var L=0;L<C.length;L++)for(var D=C[L],I=0;I<D.length;I++)E(_,D[I])}r.UndoManager=d}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,r,m){var d=e("../range").Range,g=(function(){function w(u,f){this.foldData=u,Array.isArray(f)?this.folds=f:f=this.folds=[f];var a=f[f.length-1];this.range=new d(f[0].start.row,f[0].start.column,a.end.row,a.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(s){s.setFoldLine(this)},this)}return w.prototype.shiftRow=function(u){this.start.row+=u,this.end.row+=u,this.folds.forEach(function(f){f.start.row+=u,f.end.row+=u})},w.prototype.addFold=function(u){if(u.sameRow){if(u.start.row<this.startRow||u.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(u),this.folds.sort(function(f,a){return-f.range.compareEnd(a.start.row,a.start.column)}),this.range.compareEnd(u.start.row,u.start.column)>0?(this.end.row=u.end.row,this.end.column=u.end.column):this.range.compareStart(u.end.row,u.end.column)<0&&(this.start.row=u.start.row,this.start.column=u.start.column)}else if(u.start.row==this.end.row)this.folds.push(u),this.end.row=u.end.row,this.end.column=u.end.column;else if(u.end.row==this.start.row)this.folds.unshift(u),this.start.row=u.start.row,this.start.column=u.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");u.foldLine=this},w.prototype.containsRow=function(u){return u>=this.start.row&&u<=this.end.row},w.prototype.walk=function(u,f,a){var s=0,c=this.folds,h,o,l,p=!0;f==null&&(f=this.end.row,a=this.end.column);for(var y=0;y<c.length;y++){if(h=c[y],o=h.range.compareStart(f,a),o==-1){u(null,f,a,s,p);return}if(l=u(null,h.start.row,h.start.column,s,p),l=!l&&u(h.placeholder,h.start.row,h.start.column,s),l||o===0)return;p=!h.sameRow,s=h.end.column}u(null,f,a,s,p)},w.prototype.getNextFoldTo=function(u,f){for(var a,s,c=0;c<this.folds.length;c++){if(a=this.folds[c],s=a.range.compareEnd(u,f),s==-1)return{fold:a,kind:"after"};if(s===0)return{fold:a,kind:"inside"}}return null},w.prototype.addRemoveChars=function(u,f,a){var s=this.getNextFoldTo(u,f),c,h;if(s){if(c=s.fold,s.kind=="inside"&&c.start.column!=f&&c.start.row!=u)window.console&&window.console.log(u,f,c);else if(c.start.row==u){h=this.folds;var o=h.indexOf(c);for(o===0&&(this.start.column+=a),o;o<h.length;o++){if(c=h[o],c.start.column+=a,!c.sameRow)return;c.end.column+=a}this.end.column+=a}}},w.prototype.split=function(u,f){var a=this.getNextFoldTo(u,f);if(!a||a.kind=="inside")return null;var s=a.fold,c=this.folds,h=this.foldData,o=c.indexOf(s),l=c[o-1];this.end.row=l.end.row,this.end.column=l.end.column,c=c.splice(o,c.length-o);var p=new w(h,c);return h.splice(h.indexOf(this)+1,0,p),p},w.prototype.merge=function(u){for(var f=u.folds,a=0;a<f.length;a++)this.addFold(f[a]);var s=this.foldData;s.splice(s.indexOf(u),1)},w.prototype.toString=function(){var u=[this.range.toString()+": ["];return this.folds.forEach(function(f){u.push(" "+f.toString())}),u.push("]"),u.join(`
199
+ `)},w.prototype.idxToPosition=function(u){for(var f=0,a=0;a<this.folds.length;a++){var s=this.folds[a];if(u-=s.start.column-f,u<0)return{row:s.start.row,column:s.start.column+u};if(u-=s.placeholder.length,u<0)return s.start;f=s.end.column}return{row:this.end.row,column:this.end.column+u}},w})();r.FoldLine=g}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,r,m){var d=e("./range").Range,g=d.comparePoints,w=(function(){function u(){this.ranges=[],this.$bias=1}return u.prototype.pointIndex=function(f,a,s){for(var c=this.ranges,h=s||0;h<c.length;h++){var o=c[h],l=g(f,o.end);if(!(l>0)){var p=g(f,o.start);return l===0?a&&p!==0?-h-2:h:p>0||p===0&&!a?h:-h-1}}return-h-1},u.prototype.add=function(f){var a=!f.isEmpty(),s=this.pointIndex(f.start,a);s<0&&(s=-s-1);var c=this.pointIndex(f.end,a,s);return c<0?c=-c-1:c++,this.ranges.splice(s,c-s,f)},u.prototype.addList=function(f){for(var a=[],s=f.length;s--;)a.push.apply(a,this.add(f[s]));return a},u.prototype.substractPoint=function(f){var a=this.pointIndex(f);if(a>=0)return this.ranges.splice(a,1)},u.prototype.merge=function(){var f=[],a=this.ranges;a=a.sort(function(l,p){return g(l.start,p.start)});for(var s=a[0],c,h=1;h<a.length;h++){c=s,s=a[h];var o=g(c.end,s.start);o<0||o==0&&!c.isEmpty()&&!s.isEmpty()||(g(c.end,s.end)<0&&(c.end.row=s.end.row,c.end.column=s.end.column),a.splice(h,1),f.push(s),s=c,h--)}return this.ranges=a,f},u.prototype.contains=function(f,a){return this.pointIndex({row:f,column:a})>=0},u.prototype.containsPoint=function(f){return this.pointIndex(f)>=0},u.prototype.rangeAtPoint=function(f){var a=this.pointIndex(f);if(a>=0)return this.ranges[a]},u.prototype.clipRows=function(f,a){var s=this.ranges;if(s[0].start.row>a||s[s.length-1].start.row<f)return[];var c=this.pointIndex({row:f,column:0});c<0&&(c=-c-1);var h=this.pointIndex({row:a,column:0},c);h<0&&(h=-h-1);for(var o=[],l=c;l<h;l++)o.push(s[l]);return o},u.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},u.prototype.attach=function(f){this.session&&this.detach(),this.session=f,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},u.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},u.prototype.$onChange=function(f){for(var a=f.start,s=f.end,c=a.row,h=s.row,o=this.ranges,l=0,p=o.length;l<p;l++){var y=o[l];if(y.end.row>=c)break}if(f.action=="insert")for(var x=h-c,E=-a.column+s.column;l<p;l++){var y=o[l];if(y.start.row>c)break;if(y.start.row==c&&y.start.column>=a.column&&(y.start.column==a.column&&this.$bias<=0||(y.start.column+=E,y.start.row+=x)),y.end.row==c&&y.end.column>=a.column){if(y.end.column==a.column&&this.$bias<0)continue;y.end.column==a.column&&E>0&&l<p-1&&y.end.column>y.start.column&&y.end.column==o[l+1].start.column&&(y.end.column-=E),y.end.column+=E,y.end.row+=x}}else for(var x=c-h,E=a.column-s.column;l<p;l++){var y=o[l];if(y.start.row>h)break;y.end.row<h&&(c<y.end.row||c==y.end.row&&a.column<y.end.column)?(y.end.row=c,y.end.column=a.column):y.end.row==h?y.end.column<=s.column?(x||y.end.column>a.column)&&(y.end.column=a.column,y.end.row=a.row):(y.end.column+=E,y.end.row+=x):y.end.row>h&&(y.end.row+=x),y.start.row<h&&(c<y.start.row||c==y.start.row&&a.column<y.start.column)?(y.start.row=c,y.start.column=a.column):y.start.row==h?y.start.column<=s.column?(x||y.start.column>a.column)&&(y.start.column=a.column,y.start.row=a.row):(y.start.column+=E,y.start.row+=x):y.start.row>h&&(y.start.row+=x)}if(x!=0&&l<p)for(;l<p;l++){var y=o[l];y.start.row+=x,y.end.row+=x}},u})();w.prototype.comparePoints=g,r.RangeList=w}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(e,r,m){var d=this&&this.__extends||(function(){var c=function(h,o){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,p){l.__proto__=p}||function(l,p){for(var y in p)Object.prototype.hasOwnProperty.call(p,y)&&(l[y]=p[y])},c(h,o)};return function(h,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");c(h,o);function l(){this.constructor=h}h.prototype=o===null?Object.create(o):(l.prototype=o.prototype,new l)}})(),g=e("../range_list").RangeList,w=(function(c){d(h,c);function h(o,l){var p=c.call(this)||this;return p.foldLine=null,p.placeholder=l,p.range=o,p.start=o.start,p.end=o.end,p.sameRow=o.start.row==o.end.row,p.subFolds=p.ranges=[],p}return h.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},h.prototype.setFoldLine=function(o){this.foldLine=o,this.subFolds.forEach(function(l){l.setFoldLine(o)})},h.prototype.clone=function(){var o=this.range.clone(),l=new h(o,this.placeholder);return this.subFolds.forEach(function(p){l.subFolds.push(p.clone())}),l.collapseChildren=this.collapseChildren,l},h.prototype.addSubFold=function(o){if(!this.range.isEqual(o)){f(o,this.start);for(var l=o.start.row,p=o.start.column,y=0,x=-1;y<this.subFolds.length&&(x=this.subFolds[y].range.compare(l,p),x==1);y++);var E=this.subFolds[y],$=0;if(x==0){if(E.range.containsRange(o))return E.addSubFold(o);$=1}for(var l=o.range.end.row,p=o.range.end.column,_=y,x=-1;_<this.subFolds.length&&(x=this.subFolds[_].range.compare(l,p),x==1);_++);x==0&&_++;for(var C=this.subFolds.splice(y,_-y,o),L=x==0?C.length-1:C.length,D=$;D<L;D++)o.addSubFold(C[D]);return o.setFoldLine(this.foldLine),o}},h.prototype.restoreRange=function(o){return s(o,this.start)},h})(g);function u(c,h){c.row-=h.row,c.row==0&&(c.column-=h.column)}function f(c,h){u(c.start,h),u(c.end,h)}function a(c,h){c.row==0&&(c.column+=h.column),c.row+=h.row}function s(c,h){a(c.start,h),a(c.end,h)}r.Fold=w}),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(e,r,m){var d=e("../range").Range,g=e("./fold_line").FoldLine,w=e("./fold").Fold,u=e("../token_iterator").TokenIterator,f=e("../mouse/mouse_event").MouseEvent;function a(){this.getFoldAt=function(s,c,h){var o=this.getFoldLine(s);if(!o)return null;for(var l=o.folds,p=0;p<l.length;p++){var y=l[p].range;if(y.contains(s,c)){if(h==1&&y.isEnd(s,c)&&!y.isEmpty()||h==-1&&y.isStart(s,c)&&!y.isEmpty())continue;return l[p]}}},this.getFoldsInRange=function(s){var c=s.start,h=s.end,o=this.$foldData,l=[];c.column+=1,h.column-=1;for(var p=0;p<o.length;p++){var y=o[p].range.compareRange(s);if(y!=2){if(y==-2)break;for(var x=o[p].folds,E=0;E<x.length;E++){var $=x[E];if(y=$.range.compareRange(s),y==-2)break;if(y!=2){if(y==42)break;l.push($)}}}}return c.column-=1,h.column+=1,l},this.getFoldsInRangeList=function(s){if(Array.isArray(s)){var c=[];s.forEach(function(o){c=c.concat(this.getFoldsInRange(o))},this)}else var c=this.getFoldsInRange(s);return c},this.getAllFolds=function(){for(var s=[],c=this.$foldData,h=0;h<c.length;h++)for(var o=0;o<c[h].folds.length;o++)s.push(c[h].folds[o]);return s},this.getFoldStringAt=function(s,c,h,o){if(o=o||this.getFoldLine(s),!o)return null;for(var l={end:{column:0}},p,y,x=0;x<o.folds.length;x++){y=o.folds[x];var E=y.range.compareEnd(s,c);if(E==-1){p=this.getLine(y.start.row).substring(l.end.column,y.start.column);break}else if(E===0)return null;l=y}return p||(p=this.getLine(y.start.row).substring(l.end.column)),h==-1?p.substring(0,c-l.end.column):h==1?p.substring(c-l.end.column):p},this.getFoldLine=function(s,c){var h=this.$foldData,o=0;for(c&&(o=h.indexOf(c)),o==-1&&(o=0),o;o<h.length;o++){var l=h[o];if(l.start.row<=s&&l.end.row>=s)return l;if(l.end.row>s)return null}return null},this.getNextFoldLine=function(s,c){var h=this.$foldData,o=0;for(c&&(o=h.indexOf(c)),o==-1&&(o=0),o;o<h.length;o++){var l=h[o];if(l.end.row>=s)return l}return null},this.getFoldedRowCount=function(s,c){for(var h=this.$foldData,o=c-s+1,l=0;l<h.length;l++){var p=h[l],y=p.end.row,x=p.start.row;if(y>=c){x<c&&(x>=s?o-=c-x:o=0);break}else y>=s&&(x>=s?o-=y-x:o-=y-s+1)}return o},this.$addFoldLine=function(s){return this.$foldData.push(s),this.$foldData.sort(function(c,h){return c.start.row-h.start.row}),s},this.addFold=function(s,c){var h=this.$foldData,o=!1,l;s instanceof w?l=s:(l=new w(c,s),l.collapseChildren=c.collapseChildren),this.$clipRangeToDocument(l.range);var p=l.start.row,y=l.start.column,x=l.end.row,E=l.end.column,$=this.getFoldAt(p,y,1),_=this.getFoldAt(x,E,-1);if($&&_==$)return $.addSubFold(l);$&&!$.range.isStart(p,y)&&this.removeFold($),_&&!_.range.isEnd(x,E)&&this.removeFold(_);var C=this.getFoldsInRange(l.range);C.length>0&&(this.removeFolds(C),l.collapseChildren||C.forEach(function(M){l.addSubFold(M)}));for(var L=0;L<h.length;L++){var D=h[L];if(x==D.start.row){D.addFold(l),o=!0;break}else if(p==D.end.row){if(D.addFold(l),o=!0,!l.sameRow){var I=h[L+1];if(I&&I.start.row==x){D.merge(I);break}}break}else if(x<=D.start.row)break}return o||(D=this.$addFoldLine(new g(this.$foldData,l))),this.$useWrapMode?this.$updateWrapData(D.start.row,D.start.row):this.$updateRowLengthCache(D.start.row,D.start.row),this.$modified=!0,this._signal("changeFold",{data:l,action:"add"}),l},this.addFolds=function(s){s.forEach(function(c){this.addFold(c)},this)},this.removeFold=function(s){var c=s.foldLine,h=c.start.row,o=c.end.row,l=this.$foldData,p=c.folds;if(p.length==1)l.splice(l.indexOf(c),1);else if(c.range.isEnd(s.end.row,s.end.column))p.pop(),c.end.row=p[p.length-1].end.row,c.end.column=p[p.length-1].end.column;else if(c.range.isStart(s.start.row,s.start.column))p.shift(),c.start.row=p[0].start.row,c.start.column=p[0].start.column;else if(s.sameRow)p.splice(p.indexOf(s),1);else{var y=c.split(s.start.row,s.start.column);p=y.folds,p.shift(),y.start.row=p[0].start.row,y.start.column=p[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(h,o):this.$updateRowLengthCache(h,o)),this.$modified=!0,this._signal("changeFold",{data:s,action:"remove"})},this.removeFolds=function(s){for(var c=[],h=0;h<s.length;h++)c.push(s[h]);c.forEach(function(o){this.removeFold(o)},this),this.$modified=!0},this.expandFold=function(s){this.removeFold(s),s.subFolds.forEach(function(c){s.restoreRange(c),this.addFold(c)},this),s.collapseChildren>0&&this.foldAll(s.start.row+1,s.end.row,s.collapseChildren-1),s.subFolds=[]},this.expandFolds=function(s){s.forEach(function(c){this.expandFold(c)},this)},this.unfold=function(s,c){var h,o;if(s==null)h=new d(0,0,this.getLength(),0),c==null&&(c=!0);else if(typeof s=="number")h=new d(s,0,s,this.getLine(s).length);else if("row"in s)h=d.fromPoints(s,s);else{if(Array.isArray(s))return o=[],s.forEach(function(p){o=o.concat(this.unfold(p))},this),o;h=s}o=this.getFoldsInRangeList(h);for(var l=o;o.length==1&&d.comparePoints(o[0].start,h.start)<0&&d.comparePoints(o[0].end,h.end)>0;)this.expandFolds(o),o=this.getFoldsInRangeList(h);if(c!=!1?this.removeFolds(o):this.expandFolds(o),l.length)return l},this.isRowFolded=function(s,c){return!!this.getFoldLine(s,c)},this.getRowFoldEnd=function(s,c){var h=this.getFoldLine(s,c);return h?h.end.row:s},this.getRowFoldStart=function(s,c){var h=this.getFoldLine(s,c);return h?h.start.row:s},this.getFoldDisplayLine=function(s,c,h,o,l){o==null&&(o=s.start.row),l==null&&(l=0),c==null&&(c=s.end.row),h==null&&(h=this.getLine(c).length);var p=this.doc,y="";return s.walk(function(x,E,$,_){if(!(E<o)){if(E==o){if($<l)return;_=Math.max(l,_)}x!=null?y+=x:y+=p.getLine(E).substring(_,$)}},c,h),y},this.getDisplayLine=function(s,c,h,o){var l=this.getFoldLine(s);if(l)return this.getFoldDisplayLine(l,s,c,h,o);var p;return p=this.doc.getLine(s),p.substring(o||0,c||p.length)},this.$cloneFoldData=function(){var s=[];return s=this.$foldData.map(function(c){var h=c.folds.map(function(o){return o.clone()});return new g(s,h)}),s},this.toggleFold=function(s){var c=this.selection,h=c.getRange(),o,l;if(h.isEmpty()){var p=h.start;if(o=this.getFoldAt(p.row,p.column),o){this.expandFold(o);return}else if(s){var y=this.getFoldLine(p.row);y&&this.expandFolds(y.folds);return}else(l=this.findMatchingBracket(p))?h.comparePoint(l)==1?h.end=l:(h.start=l,h.start.column++,h.end.column--):(l=this.findMatchingBracket({row:p.row,column:p.column+1}))?(h.comparePoint(l)==1?h.end=l:h.start=l,h.start.column++):h=this.getCommentFoldRange(p.row,p.column)||h}else{var x=this.getFoldsInRange(h);if(s&&x.length){this.expandFolds(x);return}else x.length==1&&(o=x[0])}if(o||(o=this.getFoldAt(h.start.row,h.start.column)),o&&o.range.toString()==h.toString()){this.expandFold(o);return}var E="...";if(!h.isMultiLine()){if(E=this.getTextRange(h),E.length<4)return;E=E.trim().substring(0,2)+".."}this.addFold(E,h)},this.getCommentFoldRange=function(s,c,h){var o=new u(this,s,c),l=o.getCurrentToken(),p=l&&l.type;if(l&&/^comment|string/.test(p)){p=p.match(/comment|string/)[0],p=="comment"&&(p+="|doc-start|\\.doc");var y=new RegExp(p),x=new d;if(h!=1){do l=o.stepBackward();while(l&&y.test(l.type));l=o.stepForward()}x.start.row=o.getCurrentTokenRow(),x.start.column=o.getCurrentTokenColumn()+l.value.length,o=new u(this,s,c);var E=this.getState(o.$row);if(h!=-1){var $=-1;do if(l=o.stepForward(),$==-1){var _=this.getState(o.$row);E.toString()!==_.toString()&&($=o.$row)}else if(o.$row>$)break;while(l&&y.test(l.type));l=o.stepBackward()}else l=o.getCurrentToken();return x.end.row=o.getCurrentTokenRow(),x.end.column=o.getCurrentTokenColumn(),x.start.row==x.end.row&&x.start.column>x.end.column?void 0:x}},this.foldAll=function(s,c,h,o){h==null&&(h=1e5);var l=this.foldWidgets;if(l){c=c||this.getLength(),s=s||0;for(var p=s;p<c;p++)if(l[p]==null&&(l[p]=this.getFoldWidget(p)),l[p]=="start"&&!(o&&!o(p))){var y=this.getFoldWidgetRange(p);y&&y.isMultiLine()&&y.end.row<=c&&y.start.row>=s&&(p=y.end.row,y.collapseChildren=h,this.addFold("...",y))}}},this.foldToLevel=function(s){for(this.foldAll();s-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var s=this;this.foldAll(null,null,null,function(c){for(var h=s.getTokens(c),o=0;o<h.length;o++){var l=h[o];if(!(l.type=="text"&&/^\s+$/.test(l.value)))return!!/comment/.test(l.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(s){if(!this.$foldStyles[s])throw new Error("invalid fold style: "+s+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=s){this.$foldStyle=s,s=="manual"&&this.unfold();var c=this.$foldMode;this.$setFolding(null),this.$setFolding(c)}},this.$setFolding=function(s){if(this.$foldMode!=s){if(this.$foldMode=s,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!s||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=s.getFoldWidget.bind(s,this,this.$foldStyle),this.getFoldWidgetRange=s.getFoldWidgetRange.bind(s,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(s,c){var h=this.foldWidgets;if(!h||c&&h[s])return{};for(var o=s-1,l;o>=0;){var p=h[o];if(p==null&&(p=h[o]=this.getFoldWidget(o)),p=="start"){var y=this.getFoldWidgetRange(o);if(l||(l=y),y&&y.end.row>=s)break}o--}return{range:o!==-1&&y,firstRange:l}},this.onFoldWidgetClick=function(s,c){c instanceof f&&(c=c.domEvent);var h={children:c.shiftKey,all:c.ctrlKey||c.metaKey,siblings:c.altKey},o=this.$toggleFoldWidget(s,h);if(!o){var l=c.target||c.srcElement;l&&/ace_fold-widget/.test(l.className)&&(l.className+=" ace_invalid")}},this.$toggleFoldWidget=function(s,c){if(this.getFoldWidget){var h=this.getFoldWidget(s),o=this.getLine(s),l=h==="end"?-1:1,p=this.getFoldAt(s,l===-1?0:o.length,l);if(p)return c.children||c.all?this.removeFold(p):this.expandFold(p),p;var y=this.getFoldWidgetRange(s,!0);if(y&&!y.isMultiLine()&&(p=this.getFoldAt(y.start.row,y.start.column,1),p&&y.isEqual(p.range)))return this.removeFold(p),p;if(c.siblings){var x=this.getParentFoldRangeData(s);if(x.range)var E=x.range.start.row+1,$=x.range.end.row;this.foldAll(E,$,c.all?1e4:0)}else c.children?($=y?y.end.row:this.getLength(),this.foldAll(s+1,$,c.all?1e4:0)):y&&(c.all&&(y.collapseChildren=1e4),this.addFold("...",y));return y}},this.toggleFoldWidget=function(s){var c=this.selection.getCursor().row;c=this.getRowFoldStart(c);var h=this.$toggleFoldWidget(c,{});if(!h){var o=this.getParentFoldRangeData(c,!0);if(h=o.range||o.firstRange,h){c=h.start.row;var l=this.getFoldAt(c,this.getLine(c).length,1);l?this.removeFold(l):this.addFold("...",h)}}},this.updateFoldWidgets=function(s){var c=s.start.row,h=s.end.row-c;if(h===0)this.foldWidgets[c]=null;else if(s.action=="remove")this.foldWidgets.splice(c,h+1,null);else{var o=Array(h+1);o.unshift(c,1),this.foldWidgets.splice.apply(this.foldWidgets,o)}},this.tokenizerUpdateFoldWidgets=function(s){var c=s.data;c.first!=c.last&&this.foldWidgets.length>c.first&&this.foldWidgets.splice(c.first,this.foldWidgets.length)}}r.Folding=a}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,r,m){var d=e("../token_iterator").TokenIterator,g=e("../range").Range;function w(){this.findMatchingBracket=function(u,f){if(u.column==0)return null;var a=f||this.getLine(u.row).charAt(u.column-1);if(a=="")return null;var s=a.match(/([\(\[\{])|([\)\]\}])/);return s?s[1]?this.$findClosingBracket(s[1],u):this.$findOpeningBracket(s[2],u):null},this.getBracketRange=function(u){var f=this.getLine(u.row),a=!0,s,c=f.charAt(u.column-1),h=c&&c.match(/([\(\[\{])|([\)\]\}])/);if(h||(c=f.charAt(u.column),u={row:u.row,column:u.column+1},h=c&&c.match(/([\(\[\{])|([\)\]\}])/),a=!1),!h)return null;if(h[1]){var o=this.$findClosingBracket(h[1],u);if(!o)return null;s=g.fromPoints(u,o),a||(s.end.column++,s.start.column--),s.cursor=s.end}else{var o=this.$findOpeningBracket(h[2],u);if(!o)return null;s=g.fromPoints(o,u),a||(s.start.column++,s.end.column--),s.cursor=s.start}return s},this.getMatchingBracketRanges=function(u,f){var a=this.getLine(u.row),s=/([\(\[\{])|([\)\]\}])/,c=!f&&a.charAt(u.column-1),h=c&&c.match(s);if(h||(c=(f===void 0||f)&&a.charAt(u.column),u={row:u.row,column:u.column+1},h=c&&c.match(s)),!h)return null;var o=new g(u.row,u.column-1,u.row,u.column),l=h[1]?this.$findClosingBracket(h[1],u):this.$findOpeningBracket(h[2],u);if(!l)return[o];var p=new g(l.row,l.column,l.row,l.column+1);return[o,p]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(u,f,a){var s=this.$brackets[u],c=1,h=new d(this,f.row,f.column),o=h.getCurrentToken();if(o||(o=h.stepForward()),!!o){a||(a=new RegExp("(\\.?"+o.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var l=f.column-h.getCurrentTokenColumn()-2,p=o.value;;){for(;l>=0;){var y=p.charAt(l);if(y==s){if(c-=1,c==0)return{row:h.getCurrentTokenRow(),column:l+h.getCurrentTokenColumn()}}else y==u&&(c+=1);l-=1}do o=h.stepBackward();while(o&&!a.test(o.type));if(o==null)break;p=o.value,l=p.length-1}return null}},this.$findClosingBracket=function(u,f,a){var s=this.$brackets[u],c=1,h=new d(this,f.row,f.column),o=h.getCurrentToken();if(o||(o=h.stepForward()),!!o){a||(a=new RegExp("(\\.?"+o.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var l=f.column-h.getCurrentTokenColumn();;){for(var p=o.value,y=p.length;l<y;){var x=p.charAt(l);if(x==s){if(c-=1,c==0)return{row:h.getCurrentTokenRow(),column:l+h.getCurrentTokenColumn()}}else x==u&&(c+=1);l+=1}do o=h.stepForward();while(o&&!a.test(o.type));if(o==null)break;l=0}return null}},this.getMatchingTags=function(u){var f=new d(this,u.row,u.column),a=this.$findTagName(f);if(a){var s=f.stepBackward();return s.value==="<"?this.$findClosingTag(f,a):this.$findOpeningTag(f,a)}},this.$findTagName=function(u){var f=u.getCurrentToken(),a=!1,s=!1;if(f&&f.type.indexOf("tag-name")===-1)do s?f=u.stepBackward():f=u.stepForward(),f&&(f.value==="/>"?s=!0:f.type.indexOf("tag-name")!==-1&&(a=!0));while(f&&!a);return f},this.$findClosingTag=function(u,f){var a,s=f.value,c=f.value,h=0,o=new g(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1);f=u.stepForward();var l=new g(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+f.value.length),p=!1;do{if(a=f,a.type.indexOf("tag-close")!==-1&&!p){var y=new g(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1);p=!0}if(f=u.stepForward(),f){if(f.value===">"&&!p){var y=new g(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1);p=!0}if(f.type.indexOf("tag-name")!==-1){if(s=f.value,c===s){if(a.value==="<")h++;else if(a.value==="</"&&(h--,h<0)){u.stepBackward();var x=new g(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+2);f=u.stepForward();var E=new g(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+f.value.length);if(f.type.indexOf("tag-close")===-1&&(f=u.stepForward()),f&&f.value===">")var $=new g(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1);else return}}}else if(c===s&&f.value==="/>"&&(h--,h<0))var x=new g(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+2),E=x,$=E,y=new g(l.end.row,l.end.column,l.end.row,l.end.column+1)}}while(f&&h>=0);if(o&&y&&x&&$&&l&&E)return{openTag:new g(o.start.row,o.start.column,y.end.row,y.end.column),closeTag:new g(x.start.row,x.start.column,$.end.row,$.end.column),openTagName:l,closeTagName:E}},this.$findOpeningTag=function(u,f){var a=u.getCurrentToken(),s=f.value,c=0,h=u.getCurrentTokenRow(),o=u.getCurrentTokenColumn(),l=o+2,p=new g(h,o,h,l);u.stepForward();var y=new g(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+f.value.length);if(f.type.indexOf("tag-close")===-1&&(f=u.stepForward()),!(!f||f.value!==">")){var x=new g(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1);u.stepBackward(),u.stepBackward();do if(f=a,h=u.getCurrentTokenRow(),o=u.getCurrentTokenColumn(),l=o+f.value.length,a=u.stepBackward(),f){if(f.type.indexOf("tag-name")!==-1){if(s===f.value)if(a.value==="<"){if(c++,c>0){var E=new g(h,o,h,l),$=new g(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1);do f=u.stepForward();while(f&&f.value!==">");var _=new g(u.getCurrentTokenRow(),u.getCurrentTokenColumn(),u.getCurrentTokenRow(),u.getCurrentTokenColumn()+1)}}else a.value==="</"&&c--}else if(f.value==="/>"){for(var C=0,L=a;L;){if(L.type.indexOf("tag-name")!==-1&&L.value===s){c--;break}else if(L.value==="<")break;L=u.stepBackward(),C++}for(var D=0;D<C;D++)u.stepForward()}}while(a&&c<=0);if($&&_&&p&&x&&E&&y)return{openTag:new g($.start.row,$.start.column,_.end.row,_.end.column),closeTag:new g(p.start.row,p.start.column,x.end.row,x.end.column),openTagName:E,closeTagName:y}}}}r.BracketMatch=w}),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(e,r,m){var d=e("./lib/oop"),g=e("./lib/lang"),w=e("./bidihandler").BidiHandler,u=e("./config"),f=e("./lib/event_emitter").EventEmitter,a=e("./selection").Selection,s=e("./mode/text").Mode,c=e("./range").Range,h=e("./line_widgets").LineWidgets,o=e("./document").Document,l=e("./background_tokenizer").BackgroundTokenizer,p=e("./search_highlight").SearchHighlight,y=e("./undomanager").UndoManager,x=(function(){function z(O,T){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"+ ++z.$uid,this.$foldData.toString=function(){return this.join(`
200
+ `)},this.$gutterCustomWidgets={},this.bgTokenizer=new l(new s().getTokenizer(),this);var A=this;this.bgTokenizer.on("update",function(N){A._signal("tokenizerUpdate",N)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof O!="object"||!O.getLine)&&(O=new o(O)),this.setDocument(O),this.selection=new a(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new w(this),u.resetOptions(this),this.setMode(T),u._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return z.prototype.$initOperationListeners=function(){var O=this;this.curOp=null,this.on("change",function(){O.curOp||(O.startOperation(),O.curOp.selectionBefore=O.$lastSel),O.curOp.docChanged=!0},!0),this.on("changeSelection",function(){O.curOp||(O.startOperation(),O.curOp.selectionBefore=O.$lastSel),O.curOp.selectionChanged=!0},!0),this.$operationResetTimer=g.delayedCall(this.endOperation.bind(this,!0))},z.prototype.startOperation=function(O){if(this.curOp){if(!O||this.curOp.command)return;this.prevOp=this.curOp}O||(O={}),this.$operationResetTimer.schedule(),this.curOp={command:O.command||{},args:O.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",O)},z.prototype.endOperation=function(O){if(this.curOp){if(O&&O.returnValue===!1){this.curOp=null,this._signal("endOperation",O);return}if(O==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var T=this.selection.toJSON();this.curOp.selectionAfter=T,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(T),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",O)}},z.prototype.setDocument=function(O){this.doc&&this.doc.off("change",this.$onChange),this.doc=O,O.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},z.prototype.getDocument=function(){return this.doc},Object.defineProperty(z.prototype,"widgetManager",{get:function(){var O=new h(this);return this.widgetManager=O,this.$editor&&O.attach(this.$editor),O},set:function(O){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:O})},enumerable:!1,configurable:!0}),z.prototype.$resetRowCache=function(O){if(!O){this.$docRowCache=[],this.$screenRowCache=[];return}var T=this.$docRowCache.length,A=this.$getRowCacheIndex(this.$docRowCache,O)+1;T>A&&(this.$docRowCache.splice(A,T),this.$screenRowCache.splice(A,T))},z.prototype.$getRowCacheIndex=function(O,T){for(var A=0,N=O.length-1;A<=N;){var B=A+N>>1,U=O[B];if(T>U)A=B+1;else if(T<U)N=B-1;else return B}return A-1},z.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},z.prototype.onChangeFold=function(O){var T=O.data;this.$resetRowCache(T.start.row)},z.prototype.onChange=function(O){this.$modified=!0,this.$bidiHandler.onChange(O),this.$resetRowCache(O.start.row);var T=this.$updateInternalDataOnChange(O);!this.$fromUndo&&this.$undoManager&&(T&&T.length&&(this.$undoManager.add({action:"removeFolds",folds:T},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(O,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(O),this._signal("change",O)},z.prototype.onSelectionChange=function(){this._signal("changeSelection")},z.prototype.setValue=function(O){this.doc.setValue(O),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},z.fromJSON=function(O){typeof O=="string"&&(O=JSON.parse(O));var T=new y;T.$undoStack=O.history.$undoStack,T.$redoStack=O.history.$redoStack,T.mark=O.history.mark,T.$rev=O.history.rev;var A=new z(O.value);return O.folds.forEach(function(N){A.addFold("...",c.fromPoints(N.start,N.end))}),A.setAnnotations(O.annotations),A.setBreakpoints(O.breakpoints),A.setMode(O.mode),A.setScrollLeft(O.scrollLeft),A.setScrollTop(O.scrollTop),A.setUndoManager(T),A.selection.fromJSON(O.selection),A},z.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(O){return O.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},z.prototype.toString=function(){return this.doc.getValue()},z.prototype.getSelection=function(){return this.selection},z.prototype.getState=function(O){return this.bgTokenizer.getState(O)},z.prototype.getTokens=function(O){return this.bgTokenizer.getTokens(O)},z.prototype.getTokenAt=function(O,T){var A=this.bgTokenizer.getTokens(O),N,B=0;if(T==null){var U=A.length-1;B=this.getLine(O).length}else for(var U=0;U<A.length&&(B+=A[U].value.length,!(B>=T));U++);return N=A[U],N?(N.index=U,N.start=B-N.value.length,N):null},z.prototype.setUndoManager=function(O){if(this.$undoManager=O,this.$informUndoManager&&this.$informUndoManager.cancel(),O){var T=this;O.addSession(this),this.$syncInformUndoManager=function(){T.$informUndoManager.cancel(),T.mergeUndoDeltas=!1},this.$informUndoManager=g.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},z.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},z.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},z.prototype.getTabString=function(){return this.getUseSoftTabs()?g.stringRepeat(" ",this.getTabSize()):" "},z.prototype.setUseSoftTabs=function(O){this.setOption("useSoftTabs",O)},z.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},z.prototype.setTabSize=function(O){this.setOption("tabSize",O)},z.prototype.getTabSize=function(){return this.$tabSize},z.prototype.isTabStop=function(O){return this.$useSoftTabs&&O.column%this.$tabSize===0},z.prototype.setNavigateWithinSoftTabs=function(O){this.setOption("navigateWithinSoftTabs",O)},z.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},z.prototype.setOverwrite=function(O){this.setOption("overwrite",O)},z.prototype.getOverwrite=function(){return this.$overwrite},z.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},z.prototype.addGutterDecoration=function(O,T){this.$decorations[O]||(this.$decorations[O]=""),this.$decorations[O]+=" "+T,this._signal("changeBreakpoint",{})},z.prototype.removeGutterCustomWidget=function(O){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(O)},z.prototype.addGutterCustomWidget=function(O,T){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(O,T)},z.prototype.removeGutterDecoration=function(O,T){this.$decorations[O]=(this.$decorations[O]||"").replace(" "+T,""),this._signal("changeBreakpoint",{})},z.prototype.getBreakpoints=function(){return this.$breakpoints},z.prototype.setBreakpoints=function(O){this.$breakpoints=[];for(var T=0;T<O.length;T++)this.$breakpoints[O[T]]="ace_breakpoint";this._signal("changeBreakpoint",{})},z.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},z.prototype.setBreakpoint=function(O,T){T===void 0&&(T="ace_breakpoint"),T?this.$breakpoints[O]=T:delete this.$breakpoints[O],this._signal("changeBreakpoint",{})},z.prototype.clearBreakpoint=function(O){delete this.$breakpoints[O],this._signal("changeBreakpoint",{})},z.prototype.addMarker=function(O,T,A,N){var B=this.$markerId++,U={range:O,type:A||"line",renderer:typeof A=="function"?A:null,clazz:T,inFront:!!N,id:B};return N?(this.$frontMarkers[B]=U,this._signal("changeFrontMarker")):(this.$backMarkers[B]=U,this._signal("changeBackMarker")),B},z.prototype.addDynamicMarker=function(O,T){if(O.update){var A=this.$markerId++;return O.id=A,O.inFront=!!T,T?(this.$frontMarkers[A]=O,this._signal("changeFrontMarker")):(this.$backMarkers[A]=O,this._signal("changeBackMarker")),O}},z.prototype.removeMarker=function(O){var T=this.$frontMarkers[O]||this.$backMarkers[O];if(T){var A=T.inFront?this.$frontMarkers:this.$backMarkers;delete A[O],this._signal(T.inFront?"changeFrontMarker":"changeBackMarker")}},z.prototype.getMarkers=function(O){return O?this.$frontMarkers:this.$backMarkers},z.prototype.highlight=function(O){if(!this.$searchHighlight){var T=new p(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(T)}this.$searchHighlight.setRegexp(O)},z.prototype.highlightLines=function(O,T,A,N){typeof T!="number"&&(A=T,T=O),A||(A="ace_step");var B=new c(O,0,T,1/0);return B.id=this.addMarker(B,A,"fullLine",N),B},z.prototype.setAnnotations=function(O){this.$annotations=O,this._signal("changeAnnotation",{})},z.prototype.getAnnotations=function(){return this.$annotations||[]},z.prototype.clearAnnotations=function(){this.setAnnotations([])},z.prototype.$detectNewLine=function(O){var T=O.match(/^.*?(\r?\n)/m);T?this.$autoNewLine=T[1]:this.$autoNewLine=`
201
+ `},z.prototype.getWordRange=function(O,T){var A=this.getLine(O),N=!1;if(T>0&&(N=!!A.charAt(T-1).match(this.tokenRe)),N||(N=!!A.charAt(T).match(this.tokenRe)),N)var B=this.tokenRe;else if(/^\s+$/.test(A.slice(T-1,T+1)))var B=/\s/;else var B=this.nonTokenRe;var U=T;if(U>0){do U--;while(U>=0&&A.charAt(U).match(B));U++}for(var G=T;G<A.length&&A.charAt(G).match(B);)G++;return new c(O,U,O,G)},z.prototype.getAWordRange=function(O,T){for(var A=this.getWordRange(O,T),N=this.getLine(A.end.row);N.charAt(A.end.column).match(/[ \t]/);)A.end.column+=1;return A},z.prototype.setNewLineMode=function(O){this.doc.setNewLineMode(O)},z.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},z.prototype.setUseWorker=function(O){this.setOption("useWorker",O)},z.prototype.getUseWorker=function(){return this.$useWorker},z.prototype.onReloadTokenizer=function(O){var T=O.data;this.bgTokenizer.start(T.first),this._signal("tokenizerUpdate",O)},z.prototype.setMode=function(O,T){if(O&&typeof O=="object"){if(O.getTokenizer)return this.$onChangeMode(O);var A=O,N=A.path}else N=O||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new s),this.$modes[N]&&!A){this.$onChangeMode(this.$modes[N]),T&&T();return}this.$modeId=N,u.loadModule(["mode",N],(function(B){if(!this.destroyed){if(this.$modeId!==N)return T&&T();this.$modes[N]&&!A?this.$onChangeMode(this.$modes[N]):B&&B.Mode&&(B=new B.Mode(A),A||(this.$modes[N]=B,B.$id=N),this.$onChangeMode(B)),T&&T()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},z.prototype.$onChangeMode=function(O,T){if(T||(this.$modeId=O.$id),this.$mode!==O){var A=this.$mode;this.$mode=O,this.$stopWorker(),this.$useWorker&&this.$startWorker();var N=O.getTokenizer();if(N.on!==void 0){var B=this.onReloadTokenizer.bind(this);N.on("update",B)}this.bgTokenizer.setTokenizer(N),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=O.tokenRe,this.nonTokenRe=O.nonTokenRe,T||(O.attachToSession&&O.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(O.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:A,mode:O}))}},z.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},z.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(O){u.warn("Could not load worker",O),this.$worker=null}},z.prototype.getMode=function(){return this.$mode},z.prototype.setScrollTop=function(O){this.$scrollTop===O||isNaN(O)||(this.$scrollTop=O,this._signal("changeScrollTop",O))},z.prototype.getScrollTop=function(){return this.$scrollTop},z.prototype.setScrollLeft=function(O){this.$scrollLeft===O||isNaN(O)||(this.$scrollLeft=O,this._signal("changeScrollLeft",O))},z.prototype.getScrollLeft=function(){return this.$scrollLeft},z.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},z.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var O=0;return this.lineWidgets.forEach(function(T){T&&T.screenWidth>O&&(O=T.screenWidth)}),this.lineWidgetWidth=O},z.prototype.$computeWidth=function(O){if(this.$modified||O){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var T=this.doc.getAllLines(),A=this.$rowLengthCache,N=0,B=0,U=this.$foldData[B],G=U?U.start.row:1/0,J=T.length,Q=0;Q<J;Q++){if(Q>G){if(Q=U.end.row+1,Q>=J)break;U=this.$foldData[B++],G=U?U.start.row:1/0}A[Q]==null&&(A[Q]=this.$getStringScreenWidth(T[Q])[0]),A[Q]>N&&(N=A[Q])}this.screenWidth=N}},z.prototype.getLine=function(O){return this.doc.getLine(O)},z.prototype.getLines=function(O,T){return this.doc.getLines(O,T)},z.prototype.getLength=function(){return this.doc.getLength()},z.prototype.getTextRange=function(O){return this.doc.getTextRange(O||this.selection.getRange())},z.prototype.insert=function(O,T){return this.doc.insert(O,T)},z.prototype.remove=function(O){return this.doc.remove(O)},z.prototype.removeFullLines=function(O,T){return this.doc.removeFullLines(O,T)},z.prototype.undoChanges=function(O,T){if(O.length){this.$fromUndo=!0;for(var A=O.length-1;A!=-1;A--){var N=O[A];N.action=="insert"||N.action=="remove"?this.doc.revertDelta(N):N.folds&&this.addFolds(N.folds)}!T&&this.$undoSelect&&(O.selectionBefore?this.selection.fromJSON(O.selectionBefore):this.selection.setRange(this.$getUndoSelection(O,!0))),this.$fromUndo=!1}},z.prototype.redoChanges=function(O,T){if(O.length){this.$fromUndo=!0;for(var A=0;A<O.length;A++){var N=O[A];(N.action=="insert"||N.action=="remove")&&this.doc.$safeApplyDelta(N)}!T&&this.$undoSelect&&(O.selectionAfter?this.selection.fromJSON(O.selectionAfter):this.selection.setRange(this.$getUndoSelection(O,!1))),this.$fromUndo=!1}},z.prototype.setUndoSelect=function(O){this.$undoSelect=O},z.prototype.$getUndoSelection=function(O,T){function A(J){return T?J.action!=="insert":J.action==="insert"}for(var N,B,U=0;U<O.length;U++){var G=O[U];if(G.start){if(!N){A(G)?N=c.fromPoints(G.start,G.end):N=c.fromPoints(G.start,G.start);continue}A(G)?(B=G.start,N.compare(B.row,B.column)==-1&&N.setStart(B),B=G.end,N.compare(B.row,B.column)==1&&N.setEnd(B)):(B=G.start,N.compare(B.row,B.column)==-1&&(N=c.fromPoints(G.start,G.start)))}}return N},z.prototype.replace=function(O,T){return this.doc.replace(O,T)},z.prototype.moveText=function(O,T,A){var N=this.getTextRange(O),B=this.getFoldsInRange(O),U=c.fromPoints(T,T);if(!A){this.remove(O);var G=O.start.row-O.end.row,J=G?-O.end.column:O.start.column-O.end.column;J&&(U.start.row==O.end.row&&U.start.column>O.end.column&&(U.start.column+=J),U.end.row==O.end.row&&U.end.column>O.end.column&&(U.end.column+=J)),G&&U.start.row>=O.end.row&&(U.start.row+=G,U.end.row+=G)}if(U.end=this.insert(U.start,N),B.length){var Q=O.start,le=U.start,G=le.row-Q.row,J=le.column-Q.column;this.addFolds(B.map(function(de){return de=de.clone(),de.start.row==Q.row&&(de.start.column+=J),de.end.row==Q.row&&(de.end.column+=J),de.start.row+=G,de.end.row+=G,de}))}return U},z.prototype.indentRows=function(O,T,A){A=A.replace(/\t/g,this.getTabString());for(var N=O;N<=T;N++)this.doc.insertInLine({row:N,column:0},A)},z.prototype.outdentRows=function(O){for(var T=O.collapseRows(),A=new c(0,0,0,0),N=this.getTabSize(),B=T.start.row;B<=T.end.row;++B){var U=this.getLine(B);A.start.row=B,A.end.row=B;for(var G=0;G<N&&U.charAt(G)==" ";++G);G<N&&U.charAt(G)==" "?(A.start.column=G,A.end.column=G+1):(A.start.column=0,A.end.column=G),this.remove(A)}},z.prototype.$moveLines=function(O,T,A){if(O=this.getRowFoldStart(O),T=this.getRowFoldEnd(T),A<0){var N=this.getRowFoldStart(O+A);if(N<0)return 0;var B=N-O}else if(A>0){var N=this.getRowFoldEnd(T+A);if(N>this.doc.getLength()-1)return 0;var B=N-T}else{O=this.$clipRowToDocument(O),T=this.$clipRowToDocument(T);var B=T-O+1}var U=new c(O,0,T,Number.MAX_VALUE),G=this.getFoldsInRange(U).map(function(Q){return Q=Q.clone(),Q.start.row+=B,Q.end.row+=B,Q}),J=A==0?this.doc.getLines(O,T):this.doc.removeFullLines(O,T);return this.doc.insertFullLines(O+B,J),G.length&&this.addFolds(G),B},z.prototype.moveLinesUp=function(O,T){return this.$moveLines(O,T,-1)},z.prototype.moveLinesDown=function(O,T){return this.$moveLines(O,T,1)},z.prototype.duplicateLines=function(O,T){return this.$moveLines(O,T,0)},z.prototype.$clipRowToDocument=function(O){return Math.max(0,Math.min(O,this.doc.getLength()-1))},z.prototype.$clipColumnToRow=function(O,T){return T<0?0:Math.min(this.doc.getLine(O).length,T)},z.prototype.$clipPositionToDocument=function(O,T){if(T=Math.max(0,T),O<0)O=0,T=0;else{var A=this.doc.getLength();O>=A?(O=A-1,T=this.doc.getLine(A-1).length):T=Math.min(this.doc.getLine(O).length,T)}return{row:O,column:T}},z.prototype.$clipRangeToDocument=function(O){O.start.row<0?(O.start.row=0,O.start.column=0):O.start.column=this.$clipColumnToRow(O.start.row,O.start.column);var T=this.doc.getLength()-1;return O.end.row>T?(O.end.row=T,O.end.column=this.doc.getLine(T).length):O.end.column=this.$clipColumnToRow(O.end.row,O.end.column),O},z.prototype.setUseWrapMode=function(O){if(O!=this.$useWrapMode){if(this.$useWrapMode=O,this.$modified=!0,this.$resetRowCache(0),O){var T=this.getLength();this.$wrapData=Array(T),this.$updateWrapData(0,T-1)}this._signal("changeWrapMode")}},z.prototype.getUseWrapMode=function(){return this.$useWrapMode},z.prototype.setWrapLimitRange=function(O,T){(this.$wrapLimitRange.min!==O||this.$wrapLimitRange.max!==T)&&(this.$wrapLimitRange={min:O,max:T},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},z.prototype.adjustWrapLimit=function(O,T){var A=this.$wrapLimitRange;A.max<0&&(A={min:T,max:T});var N=this.$constrainWrapLimit(O,A.min,A.max);return N!=this.$wrapLimit&&N>1?(this.$wrapLimit=N,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},z.prototype.$constrainWrapLimit=function(O,T,A){return T&&(O=Math.max(T,O)),A&&(O=Math.min(A,O)),O},z.prototype.getWrapLimit=function(){return this.$wrapLimit},z.prototype.setWrapLimit=function(O){this.setWrapLimitRange(O,O)},z.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},z.prototype.$updateInternalDataOnChange=function(O){var T=this.$useWrapMode,A=O.action,N=O.start,B=O.end,U=N.row,G=B.row,J=G-U,Q=null;if(this.$updating=!0,J!=0)if(A==="remove"){this[T?"$wrapData":"$rowLengthCache"].splice(U,J);var le=this.$foldData;Q=this.getFoldsInRange(O),this.removeFolds(Q);var re=this.getFoldLine(B.row),ce=0;if(re){re.addRemoveChars(B.row,B.column,N.column-B.column),re.shiftRow(-J);var de=this.getFoldLine(U);de&&de!==re&&(de.merge(re),re=de),ce=le.indexOf(re)+1}for(ce;ce<le.length;ce++){var re=le[ce];re.start.row>=B.row&&re.shiftRow(-J)}G=U}else{var ie=Array(J);ie.unshift(U,0);var fe=T?this.$wrapData:this.$rowLengthCache;fe.splice.apply(fe,ie);var le=this.$foldData,re=this.getFoldLine(U),ce=0;if(re){var $e=re.range.compareInside(N.row,N.column);$e==0?(re=re.split(N.row,N.column),re&&(re.shiftRow(J),re.addRemoveChars(G,0,B.column-N.column))):$e==-1&&(re.addRemoveChars(U,0,B.column-N.column),re.shiftRow(J)),ce=le.indexOf(re)+1}for(ce;ce<le.length;ce++){var re=le[ce];re.start.row>=U&&re.shiftRow(J)}}else{J=Math.abs(O.start.column-O.end.column),A==="remove"&&(Q=this.getFoldsInRange(O),this.removeFolds(Q),J=-J);var re=this.getFoldLine(U);re&&re.addRemoveChars(U,N.column,J)}return T&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,T?this.$updateWrapData(U,G):this.$updateRowLengthCache(U,G),Q},z.prototype.$updateRowLengthCache=function(O,T){this.$rowLengthCache[O]=null,this.$rowLengthCache[T]=null},z.prototype.$updateWrapData=function(O,T){var A=this.doc.getAllLines(),N=this.getTabSize(),B=this.$wrapData,U=this.$wrapLimit,G,J,Q=O;for(T=Math.min(T,A.length-1);Q<=T;)J=this.getFoldLine(Q,J),J?(G=[],J.walk((function(le,re,ce,de){var ie;if(le!=null){ie=this.$getDisplayTokens(le,G.length),ie[0]=_;for(var fe=1;fe<ie.length;fe++)ie[fe]=C}else ie=this.$getDisplayTokens(A[re].substring(de,ce),G.length);G=G.concat(ie)}).bind(this),J.end.row,A[J.end.row].length+1),B[J.start.row]=this.$computeWrapSplits(G,U,N),Q=J.end.row+1):(G=this.$getDisplayTokens(A[Q]),B[Q]=this.$computeWrapSplits(G,U,N),Q++)},z.prototype.$computeWrapSplits=function(O,T,A){if(O.length==0)return[];var N=[],B=O.length,U=0,G=0,J=this.$wrapAsCode,Q=this.$indentedSoftWrap,le=T<=Math.max(2*A,8)||Q===!1?0:Math.floor(T/2);function re(){var $e=0;if(le===0)return $e;if(Q)for(var Re=0;Re<O.length;Re++){var Ee=O[Re];if(Ee==D)$e+=1;else if(Ee==I)$e+=A;else{if(Ee==M)continue;break}}return J&&Q!==!1&&($e+=A),Math.min($e,le)}function ce($e){for(var Re=$e-U,Ee=U;Ee<$e;Ee++){var Ue=O[Ee];(Ue===12||Ue===2)&&(Re-=1)}N.length||(de=re(),N.indent=de),G+=Re,N.push(G),U=$e}for(var de=0;B-U>T-de;){var ie=U+T-de;if(O[ie-1]>=D&&O[ie]>=D){ce(ie);continue}if(O[ie]==_||O[ie]==C){for(ie;ie!=U-1&&O[ie]!=_;ie--);if(ie>U){ce(ie);continue}for(ie=U+T,ie;ie<O.length&&O[ie]==C;ie++);if(ie==O.length)break;ce(ie);continue}for(var fe=Math.max(ie-(T-(T>>2)),U-1);ie>fe&&O[ie]<_;)ie--;if(J){for(;ie>fe&&O[ie]<_;)ie--;for(;ie>fe&&O[ie]==L;)ie--}else for(;ie>fe&&O[ie]<D;)ie--;if(ie>fe){ce(++ie);continue}ie=U+T,O[ie]==$&&ie--,ce(ie-de)}return N},z.prototype.$getDisplayTokens=function(O,T){var A=[],N;T=T||0;for(var B=0;B<O.length;B++){var U=O.charCodeAt(B);if(U==9){N=this.getScreenTabSize(A.length+T),A.push(I);for(var G=1;G<N;G++)A.push(M)}else U==32?A.push(D):U>39&&U<48||U>57&&U<64?A.push(L):U>=4352&&W(U)?A.push(E,$):A.push(E)}return A},z.prototype.$getStringScreenWidth=function(O,T,A){if(T==0)return[0,0];T==null&&(T=1/0),A=A||0;var N,B;for(B=0;B<O.length&&(N=O.charCodeAt(B),N==9?A+=this.getScreenTabSize(A):N>=4352&&W(N)?A+=2:A+=1,!(A>T));B++);return[A,B]},z.prototype.getRowLength=function(O){var T=1;return this.lineWidgets&&(T+=this.lineWidgets[O]&&this.lineWidgets[O].rowCount||0),!this.$useWrapMode||!this.$wrapData[O]?T:this.$wrapData[O].length+T},z.prototype.getRowLineCount=function(O){return!this.$useWrapMode||!this.$wrapData[O]?1:this.$wrapData[O].length+1},z.prototype.getRowWrapIndent=function(O){if(this.$useWrapMode){var T=this.screenToDocumentPosition(O,Number.MAX_VALUE),A=this.$wrapData[T.row];return A.length&&A[0]<T.column?A.indent:0}else return 0},z.prototype.getScreenLastRowColumn=function(O){var T=this.screenToDocumentPosition(O,Number.MAX_VALUE);return this.documentToScreenColumn(T.row,T.column)},z.prototype.getDocumentLastRowColumn=function(O,T){var A=this.documentToScreenRow(O,T);return this.getScreenLastRowColumn(A)},z.prototype.getDocumentLastRowColumnPosition=function(O,T){var A=this.documentToScreenRow(O,T);return this.screenToDocumentPosition(A,Number.MAX_VALUE/10)},z.prototype.getRowSplitData=function(O){if(this.$useWrapMode)return this.$wrapData[O]},z.prototype.getScreenTabSize=function(O){return this.$tabSize-(O%this.$tabSize|0)},z.prototype.screenToDocumentRow=function(O,T){return this.screenToDocumentPosition(O,T).row},z.prototype.screenToDocumentColumn=function(O,T){return this.screenToDocumentPosition(O,T).column},z.prototype.screenToDocumentPosition=function(O,T,A){if(O<0)return{row:0,column:0};var N,ce=0,B=0,U,re=0,G=0,J=this.$screenRowCache,Q=this.$getRowCacheIndex(J,O),le=J.length;if(le&&Q>=0)var re=J[Q],ce=this.$docRowCache[Q],de=O>J[le-1];else var de=!le;for(var ie=this.getLength()-1,fe=this.getNextFoldLine(ce),$e=fe?fe.start.row:1/0;re<=O&&(G=this.getRowLength(ce),!(re+G>O||ce>=ie));)re+=G,ce++,ce>$e&&(ce=fe.end.row+1,fe=this.getNextFoldLine(ce,fe),$e=fe?fe.start.row:1/0),de&&(this.$docRowCache.push(ce),this.$screenRowCache.push(re));if(fe&&fe.start.row<=ce)N=this.getFoldDisplayLine(fe),ce=fe.start.row;else{if(re+G<=O||ce>ie)return{row:ie,column:this.getLine(ie).length};N=this.getLine(ce),fe=null}var Re=0,Ee=Math.floor(O-re);if(this.$useWrapMode){var Ue=this.$wrapData[ce];Ue&&(U=Ue[Ee],Ee>0&&Ue.length&&(Re=Ue.indent,B=Ue[Ee-1]||Ue[Ue.length-1],N=N.substring(B)))}return A!==void 0&&this.$bidiHandler.isBidiRow(re+Ee,ce,Ee)&&(T=this.$bidiHandler.offsetToCol(A)),B+=this.$getStringScreenWidth(N,T-Re)[1],this.$useWrapMode&&B>=U&&(B=U-1),fe?fe.idxToPosition(B):{row:ce,column:B}},z.prototype.documentToScreenPosition=function(O,T){if(typeof T>"u")var A=this.$clipPositionToDocument(O.row,O.column);else A=this.$clipPositionToDocument(O,T);O=A.row,T=A.column;var re=0,N=null,B=null;B=this.getFoldAt(O,T,1),B&&(O=B.start.row,T=B.start.column);var U,le=0,G=this.$docRowCache,J=this.$getRowCacheIndex(G,O),Q=G.length;if(Q&&J>=0)var le=G[J],re=this.$screenRowCache[J],ce=O>G[Q-1];else var ce=!Q;for(var de=this.getNextFoldLine(le),ie=de?de.start.row:1/0;le<O;){if(le>=ie){if(U=de.end.row+1,U>O)break;de=this.getNextFoldLine(U,de),ie=de?de.start.row:1/0}else U=le+1;re+=this.getRowLength(le),le=U,ce&&(this.$docRowCache.push(le),this.$screenRowCache.push(re))}var fe="";de&&le>=ie?(fe=this.getFoldDisplayLine(de,O,T),N=de.start.row):(fe=this.getLine(O).substring(0,T),N=O);var $e=0;if(this.$useWrapMode){var Re=this.$wrapData[N];if(Re){for(var Ee=0;fe.length>=Re[Ee];)re++,Ee++;fe=fe.substring(Re[Ee-1]||0,fe.length),$e=Ee>0?Re.indent:0}}return this.lineWidgets&&this.lineWidgets[le]&&this.lineWidgets[le].rowsAbove&&(re+=this.lineWidgets[le].rowsAbove),{row:re,column:$e+this.$getStringScreenWidth(fe)[0]}},z.prototype.documentToScreenColumn=function(O,T){return this.documentToScreenPosition(O,T).column},z.prototype.documentToScreenRow=function(O,T){return this.documentToScreenPosition(O,T).row},z.prototype.getScreenLength=function(){var O=0,T=null;if(this.$useWrapMode)for(var A=this.$wrapData.length,N=0,B=0,T=this.$foldData[B++],U=T?T.start.row:1/0;N<A;){var G=this.$wrapData[N];O+=G?G.length+1:1,N++,N>U&&(N=T.end.row+1,T=this.$foldData[B++],U=T?T.start.row:1/0)}else{O=this.getLength();for(var J=this.$foldData,B=0;B<J.length;B++)T=J[B],O-=T.end.row-T.start.row}return this.lineWidgets&&(O+=this.$getWidgetScreenLength()),O},z.prototype.$setFontMetrics=function(O){this.$enableVarChar&&(this.$getStringScreenWidth=function(T,A,N){if(A===0)return[0,0];A||(A=1/0),N=N||0;var B,U;for(U=0;U<T.length&&(B=T.charAt(U),B===" "?N+=this.getScreenTabSize(N):N+=O.getCharacterWidth(B),!(N>A));U++);return[N,U]})},z.prototype.getPrecedingCharacter=function(){var O=this.selection.getCursor();if(O.column===0)return O.row===0?"":this.doc.getNewLineCharacter();var T=this.getLine(O.row);return T[O.column-1]},z.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()},z})();x.$uid=0,x.prototype.$modes=u.$modes,x.prototype.getValue=x.prototype.toString,x.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},x.prototype.$overwrite=!1,x.prototype.$mode=null,x.prototype.$modeId=null,x.prototype.$scrollTop=0,x.prototype.$scrollLeft=0,x.prototype.$wrapLimit=80,x.prototype.$useWrapMode=!1,x.prototype.$wrapLimitRange={min:null,max:null},x.prototype.lineWidgets=null,x.prototype.isFullWidth=W,d.implement(x.prototype,f);var E=1,$=2,_=3,C=4,L=9,D=10,I=11,M=12;function W(z){return z<4352?!1:z>=4352&&z<=4447||z>=4515&&z<=4519||z>=4602&&z<=4607||z>=9001&&z<=9002||z>=11904&&z<=11929||z>=11931&&z<=12019||z>=12032&&z<=12245||z>=12272&&z<=12283||z>=12288&&z<=12350||z>=12353&&z<=12438||z>=12441&&z<=12543||z>=12549&&z<=12589||z>=12593&&z<=12686||z>=12688&&z<=12730||z>=12736&&z<=12771||z>=12784&&z<=12830||z>=12832&&z<=12871||z>=12880&&z<=13054||z>=13056&&z<=19903||z>=19968&&z<=42124||z>=42128&&z<=42182||z>=43360&&z<=43388||z>=44032&&z<=55203||z>=55216&&z<=55238||z>=55243&&z<=55291||z>=63744&&z<=64255||z>=65040&&z<=65049||z>=65072&&z<=65106||z>=65108&&z<=65126||z>=65128&&z<=65131||z>=65281&&z<=65376||z>=65504&&z<=65510}e("./edit_session/folding").Folding.call(x.prototype),e("./edit_session/bracket_match").BracketMatch.call(x.prototype),u.defineOptions(x.prototype,"session",{wrap:{set:function(z){if(!z||z=="off"?z=!1:z=="free"?z=!0:z=="printMargin"?z=-1:typeof z=="string"&&(z=parseInt(z,10)||!1),this.$wrap!=z)if(this.$wrap=z,!z)this.setUseWrapMode(!1);else{var O=typeof z=="number"?z:null;this.setWrapLimitRange(O,O),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(z){z=z=="auto"?this.$mode.type!="text":z!="text",z!=this.$wrapAsCode&&(this.$wrapAsCode=z,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(z){this.$useWorker=z,this.$stopWorker(),z&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(z){z=parseInt(z),z>0&&this.$tabSize!==z&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=z,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(z){this.setFoldStyle(z)},handlesSet:!0},overwrite:{set:function(z){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(z){this.doc.setNewLineMode(z)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(z){this.setMode(z)},get:function(){return this.$modeId},handlesSet:!0}}),r.EditSession=x}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,r,m){var d=e("./lib/lang"),g=e("./lib/oop"),w=e("./range").Range,u=(function(){function c(){this.$options={}}return c.prototype.set=function(h){return g.mixin(this.$options,h),this},c.prototype.getOptions=function(){return d.copyObject(this.$options)},c.prototype.setOptions=function(h){this.$options=h},c.prototype.find=function(h){var o=this.$options,l=this.$matchIterator(h,o);if(!l)return!1;var p=null;return l.forEach(function(y,x,E,$){return p=new w(y,x,E,$),x==$&&o.start&&o.start.start&&o.skipCurrent!=!1&&p.isEqual(o.start)?(p=null,!1):!0}),p},c.prototype.findAll=function(h){var o=this.$options;if(!o.needle)return[];this.$assembleRegExp(o);var l=o.range,p=l?h.getLines(l.start.row,l.end.row):h.doc.getAllLines(),y=[],x=o.re;if(o.$isMultiLine){var E=x.length,$=p.length-E,_;e:for(var C=x.offset||0;C<=$;C++){for(var L=0;L<E;L++)if(p[C+L].search(x[L])==-1)continue e;var D=p[C],I=p[C+E-1],M=D.length-D.match(x[0])[0].length,W=I.match(x[E-1])[0].length;_&&_.end.row===C&&_.end.column>M||(y.push(_=new w(C,M,C+E-1,W)),E>2&&(C=C+E-2))}}else for(var z,O=0;O<p.length;O++)if(this.$isMultilineSearch(o)){var T=p.length-1;if(z=this.$multiLineForward(h,x,O,T),z){var A=z.endRow<=T?z.endRow-1:T;A>O&&(O=A),y.push(new w(z.startRow,z.startCol,z.endRow,z.endCol))}}else{z=d.getMatchOffsets(p[O],x);for(var L=0;L<z.length;L++){var N=z[L];y.push(new w(O,N.offset,O,N.offset+N.length))}}if(l){for(var B=l.start.column,U=l.end.column,O=0,L=y.length-1;O<L&&y[O].start.column<B&&y[O].start.row==0;)O++;for(var G=l.end.row-l.start.row;O<L&&y[L].end.column>U&&y[L].end.row==G;)L--;for(y=y.slice(O,L+1),O=0,L=y.length;O<L;O++)y[O].start.row+=l.start.row,y[O].end.row+=l.start.row}return y},c.prototype.parseReplaceString=function(h){for(var o={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},l="",p=0,y=h.length;p<y;p++){var x=h.charCodeAt(p);if(x===o.Backslash){if(p++,p>=y){l+="\\";break}var E=h.charCodeAt(p);switch(E){case o.Backslash:l+="\\";break;case o.n:l+=`
202
+ `;break;case o.t:l+=" ";break}continue}if(x===o.DollarSign){if(p++,p>=y){l+="$";break}var $=h.charCodeAt(p);if($===o.DollarSign){l+="$$";continue}if($===o.Digit0||$===o.Ampersand){l+="$&";continue}if(o.Digit1<=$&&$<=o.Digit9){l+="$"+h[p];continue}}l+=h[p]}return l||h},c.prototype.replace=function(h,o){var l=this.$options,p=this.$assembleRegExp(l);if(l.$isMultiLine)return o;if(p){var y=this.$isMultilineSearch(l);y&&(h=h.replace(/\r\n|\r|\n/g,`
203
+ `));var x=p.exec(h);if(!x||!y&&x[0].length!=h.length)return null;if(o=l.regExp?this.parseReplaceString(o):o.replace(/\$/g,"$$$$"),o=h.replace(p,o),l.preserveCase){o=o.split("");for(var E=Math.min(h.length,h.length);E--;){var $=h[E];$&&$.toLowerCase()!=$?o[E]=o[E].toUpperCase():o[E]=o[E].toLowerCase()}o=o.join("")}return o}},c.prototype.$assembleRegExp=function(h,o){if(h.needle instanceof RegExp)return h.re=h.needle;var l=h.needle;if(!h.needle)return h.re=!1;h.regExp||(l=d.escapeRegExp(l));var p=h.caseSensitive?"gm":"gmi";try{new RegExp(l,"u"),h.$supportsUnicodeFlag=!0,p+="u"}catch{h.$supportsUnicodeFlag=!1}if(h.wholeWord&&(l=f(l,h)),h.$isMultiLine=!o&&/[\n\r]/.test(l),h.$isMultiLine)return h.re=this.$assembleMultilineRegExp(l,p);try{var y=new RegExp(l,p)}catch{y=!1}return h.re=y},c.prototype.$assembleMultilineRegExp=function(h,o){for(var l=h.replace(/\r\n|\r|\n/g,`$
204
+ ^`).split(`
205
+ `),p=[],y=0;y<l.length;y++)try{p.push(new RegExp(l[y],o))}catch{return!1}return p},c.prototype.$isMultilineSearch=function(h){return h.re&&/\\r\\n|\\r|\\n/.test(h.re.source)&&h.regExp&&!h.$isMultiLine},c.prototype.$multiLineForward=function(h,o,l,p){for(var y,x=s(h,l),E=l;E<=p;){for(var $=0;$<x&&!(E>p);$++){var _=h.getLine(E++);y=y==null?_:y+`
206
+ `+_}var C=o.exec(y);if(o.lastIndex=0,C){var L=y.slice(0,C.index).split(`
207
+ `),D=C[0].split(`
208
+ `),I=l+L.length-1,M=L[L.length-1].length,W=I+D.length-1,z=D.length==1?M+D[0].length:D[D.length-1].length;return{startRow:I,startCol:M,endRow:W,endCol:z}}}return null},c.prototype.$multiLineBackward=function(h,o,l,p,y){for(var x,E=s(h,p),$=h.getLine(p).length-l,_=p;_>=y;){for(var C=0;C<E&&_>=y;C++){var L=h.getLine(_--);x=x==null?L:L+`
209
+ `+x}var D=a(x,o,$);if(D){var I=x.slice(0,D.index).split(`
210
+ `),M=D[0].split(`
211
+ `),W=_+I.length,z=I[I.length-1].length,O=W+M.length-1,T=M.length==1?z+M[0].length:M[M.length-1].length;return{startRow:W,startCol:z,endRow:O,endCol:T}}}return null},c.prototype.$matchIterator=function(h,o){var l=this.$assembleRegExp(o);if(!l)return!1;var p=this.$isMultilineSearch(o),y=this.$multiLineForward,x=this.$multiLineBackward,E=o.backwards==!0,$=o.skipCurrent!=!1,_=l.unicode,C=o.range,L=o.start;L||(L=C?C[E?"end":"start"]:h.selection.getRange()),L.start&&(L=L[$!=E?"end":"start"]);var D=C?C.start.row:0,I=C?C.end.row:h.getLength()-1;if(E)var M=function(O){var T=L.row;if(!z(T,L.column,O)){for(T--;T>=D;T--)if(z(T,Number.MAX_VALUE,O))return;if(o.wrap!=!1){for(T=I,D=L.row;T>=D;T--)if(z(T,Number.MAX_VALUE,O))return}}};else var M=function(O){var T=L.row;if(!z(T,L.column,O)){for(T=T+1;T<=I;T++)if(z(T,0,O))return;if(o.wrap!=!1){for(T=D,I=L.row;T<=I;T++)if(z(T,0,O))return}}};if(o.$isMultiLine)var W=l.length,z=function(O,T,A){var N=E?O-W+1:O;if(!(N<0||N+W>h.getLength())){var B=h.getLine(N),U=B.search(l[0]);if(!(!E&&U<T||U===-1)){for(var G=1;G<W;G++)if(B=h.getLine(N+G),B.search(l[G])==-1)return;var J=B.match(l[W-1])[0].length;if(!(E&&J>T)&&A(N,U,N+W-1,J))return!0}}};else if(E)var z=function(O,T,A){if(p){var N=x(h,l,T,O,D);if(!N)return!1;if(A(N.startRow,N.startCol,N.endRow,N.endCol))return!0}else{var B=h.getLine(O),U=[],G,J=0;for(l.lastIndex=0;G=l.exec(B);){var Q=G[0].length;if(J=G.index,!Q){if(J>=B.length)break;l.lastIndex=J+=d.skipEmptyMatch(B,J,_)}if(G.index+Q>T)break;U.push(G.index,Q)}for(var le=U.length-1;le>=0;le-=2){var re=U[le-1],Q=U[le];if(A(O,re,O,re+Q))return!0}}};else var z=function(O,T,A){if(l.lastIndex=T,p){var N=y(h,l,O,I);if(N){var B=N.endRow<=I?N.endRow-1:I;B>O&&(O=B)}if(!N)return!1;if(A(N.startRow,N.startCol,N.endRow,N.endCol))return!0}else for(var U=h.getLine(O),G,J;J=l.exec(U);){var Q=J[0].length;if(G=J.index,A(O,G,O,G+Q))return!0;if(!Q&&(l.lastIndex=G+=d.skipEmptyMatch(U,G,_),G>=U.length))return!1}};return{forEach:M}},c})();function f(c,h){var o=d.supportsLookbehind();function l(E,$){$===void 0&&($=!0);var _=o&&h.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return _.test(E)||h.regExp?o&&h.$supportsUnicodeFlag?$?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var p=Array.from(c),y=p[0],x=p[p.length-1];return l(y)+c+l(x,!1)}function a(c,h,o){for(var l=null,p=0;p<=c.length;){h.lastIndex=p;var y=h.exec(c);if(!y)break;var x=y.index+y[0].length;if(x>c.length-o)break;(!l||x>l.index+l[0].length)&&(l=y),p=y.index+1}return l}function s(c,h){var o=5e3,l={row:h,column:0},p=c.doc.positionToIndex(l),y=p+o,x=c.doc.indexToPosition(y),E=x.row;return E+1}r.Search=u}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,r,m){var d=this&&this.__extends||(function(){var c=function(h,o){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,p){l.__proto__=p}||function(l,p){for(var y in p)Object.prototype.hasOwnProperty.call(p,y)&&(l[y]=p[y])},c(h,o)};return function(h,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");c(h,o);function l(){this.constructor=h}h.prototype=o===null?Object.create(o):(l.prototype=o.prototype,new l)}})(),g=e("../lib/keys"),w=e("../lib/useragent"),u=g.KEY_MODS,f=(function(){function c(h,o){this.$init(h,o,!1)}return c.prototype.$init=function(h,o,l){this.platform=o||(w.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(h),this.$singleCommand=l},c.prototype.addCommand=function(h){this.commands[h.name]&&this.removeCommand(h),this.commands[h.name]=h,h.bindKey&&this._buildKeyHash(h)},c.prototype.removeCommand=function(h,o){var l=h&&(typeof h=="string"?h:h.name);h=this.commands[l],o||delete this.commands[l];var p=this.commandKeyBinding;for(var y in p){var x=p[y];if(x==h)delete p[y];else if(Array.isArray(x)){var E=x.indexOf(h);E!=-1&&(x.splice(E,1),x.length==1&&(p[y]=x[0]))}}},c.prototype.bindKey=function(h,o,l){if(typeof h=="object"&&h&&(l==null&&(l=h.position),h=h[this.platform]),!!h){if(typeof o=="function")return this.addCommand({exec:o,bindKey:h,name:o.name||h});h.split("|").forEach(function(p){var y="";if(p.indexOf(" ")!=-1){var x=p.split(/\s+/);p=x.pop(),x.forEach(function(_){var C=this.parseKeys(_),L=u[C.hashId]+C.key;y+=(y?" ":"")+L,this._addCommandToBinding(y,"chainKeys")},this),y+=" "}var E=this.parseKeys(p),$=u[E.hashId]+E.key;this._addCommandToBinding(y+$,o,l)},this)}},c.prototype._addCommandToBinding=function(h,o,l){var p=this.commandKeyBinding,y;if(!o)delete p[h];else if(!p[h]||this.$singleCommand)p[h]=o;else{Array.isArray(p[h])?(y=p[h].indexOf(o))!=-1&&p[h].splice(y,1):p[h]=[p[h]],typeof l!="number"&&(l=a(o));var x=p[h];for(y=0;y<x.length;y++){var E=x[y],$=a(E);if($>l)break}x.splice(y,0,o)}},c.prototype.addCommands=function(h){h&&Object.keys(h).forEach(function(o){var l=h[o];if(l){if(typeof l=="string")return this.bindKey(l,o);typeof l=="function"&&(l={exec:l}),typeof l=="object"&&(l.name||(l.name=o),this.addCommand(l))}},this)},c.prototype.removeCommands=function(h){Object.keys(h).forEach(function(o){this.removeCommand(h[o])},this)},c.prototype.bindKeys=function(h){Object.keys(h).forEach(function(o){this.bindKey(o,h[o])},this)},c.prototype._buildKeyHash=function(h){this.bindKey(h.bindKey,h)},c.prototype.parseKeys=function(h){var o=h.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function($){return $}),l=o.pop(),p=g[l];if(g.FUNCTION_KEYS[p])l=g.FUNCTION_KEYS[p].toLowerCase();else if(o.length){if(o.length==1&&o[0]=="shift")return{key:l.toUpperCase(),hashId:-1}}else return{key:l,hashId:-1};for(var y=0,x=o.length;x--;){var E=g.KEY_MODS[o[x]];if(E==null)return typeof console<"u"&&console.error("invalid modifier "+o[x]+" in "+h),!1;y|=E}return{key:l,hashId:y}},c.prototype.findKeyCommand=function(h,o){var l=u[h]+o;return this.commandKeyBinding[l]},c.prototype.handleKeyboard=function(h,o,l,p){if(!(p<0)){var y=u[o]+l,x=this.commandKeyBinding[y];return h.$keyChain&&(h.$keyChain+=" "+y,x=this.commandKeyBinding[h.$keyChain]||x),x&&(x=="chainKeys"||x[x.length-1]=="chainKeys")?(h.$keyChain=h.$keyChain||y,{command:"null"}):(h.$keyChain&&((!o||o==4)&&l.length==1?h.$keyChain=h.$keyChain.slice(0,-y.length-1):(o==-1||p>0)&&(h.$keyChain="")),{command:x})}},c.prototype.getStatusText=function(h,o){return o.$keyChain||""},c})();function a(c){return typeof c=="object"&&c.bindKey&&c.bindKey.position||(c.isDefault?-100:0)}var s=(function(c){d(h,c);function h(o,l){var p=c.call(this,o,l)||this;return p.$singleCommand=!0,p}return h})(f);s.call=function(c,h,o){f.prototype.$init.call(c,h,o,!0)},f.call=function(c,h,o){f.prototype.$init.call(c,h,o,!1)},r.HashHandler=s,r.MultiHashHandler=f}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,r,m){var d=this&&this.__extends||(function(){var a=function(s,c){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,o){h.__proto__=o}||function(h,o){for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&(h[l]=o[l])},a(s,c)};return function(s,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");a(s,c);function h(){this.constructor=s}s.prototype=c===null?Object.create(c):(h.prototype=c.prototype,new h)}})(),g=e("../lib/oop"),w=e("../keyboard/hash_handler").MultiHashHandler,u=e("../lib/event_emitter").EventEmitter,f=(function(a){d(s,a);function s(c,h){var o=a.call(this,h,c)||this;return o.byName=o.commands,o.setDefaultHandler("exec",function(l){return l.args?l.command.exec(l.editor,l.args,l.event,!1):l.command.exec(l.editor,{},l.event,!0)}),o}return s.prototype.exec=function(c,h,o){if(Array.isArray(c)){for(var l=c.length;l--;)if(this.exec(c[l],h,o))return!0;return!1}typeof c=="string"&&(c=this.commands[c]);var p={editor:h,command:c,args:o};return this.canExecute(c,h)?(p.returnValue=this._emit("exec",p),this._signal("afterExec",p),p.returnValue!==!1):(this._signal("commandUnavailable",p),!1)},s.prototype.canExecute=function(c,h){return typeof c=="string"&&(c=this.commands[c]),!(!c||h&&h.$readOnly&&!c.readOnly||this.$checkCommandState!=!1&&c.isAvailable&&!c.isAvailable(h))},s.prototype.toggleRecording=function(c){if(!this.$inReplay)return c&&c._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(h){this.macro.push([h.command,h.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},s.prototype.replay=function(c){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(c);try{this.$inReplay=!0,this.macro.forEach(function(h){typeof h=="string"?this.exec(h,c):this.exec(h[0],c,h[1])},this)}finally{this.$inReplay=!1}}},s.prototype.trimMacro=function(c){return c.map(function(h){return typeof h[0]!="string"&&(h[0]=h[0].name),h[1]||(h=h[0]),h})},s})(w);g.implement(f.prototype,u),r.CommandManager=f}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,r,m){var d=e("../lib/lang"),g=e("../config"),w=e("../range").Range;function u(a,s){return{win:a,mac:s}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:u("Ctrl-,","Command-,"),exec:function(a){g.loadModule("ace/ext/settings_menu",function(s){s.init(a),a.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:u("Alt-E","F4"),exec:function(a){g.loadModule("ace/ext/error_marker",function(s){s.showErrorMarker(a,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:u("Alt-Shift-E","Shift-F4"),exec:function(a){g.loadModule("ace/ext/error_marker",function(s){s.showErrorMarker(a,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:u("Ctrl-A","Command-A"),exec:function(a){a.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:u(null,"Ctrl-L"),exec:function(a){a.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:u("Ctrl-L","Command-L"),exec:function(a,s){typeof s=="number"&&!isNaN(s)&&a.gotoLine(s),a.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:u("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(a){a.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:u("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(a){a.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:u("F2","F2"),exec:function(a){a.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:u("Alt-F2","Alt-F2"),exec:function(a){a.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:u(null,"Ctrl-Command-Option-0"),exec:function(a){a.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:u(null,"Ctrl-Command-Option-0"),exec:function(a){a.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:u("Alt-0","Command-Option-0"),exec:function(a){a.session.foldAll(),a.session.unfold(a.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:u("Alt-Shift-0","Command-Option-Shift-0"),exec:function(a){a.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:u("Ctrl-K","Command-G"),exec:function(a){a.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:u("Ctrl-Shift-K","Command-Shift-G"),exec:function(a){a.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:u("Alt-K","Ctrl-G"),exec:function(a){a.selection.isEmpty()?a.selection.selectWord():a.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:u("Alt-Shift-K","Ctrl-Shift-G"),exec:function(a){a.selection.isEmpty()?a.selection.selectWord():a.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:u("Ctrl-F","Command-F"),exec:function(a){g.loadModule("ace/ext/searchbox",function(s){s.Search(a)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(a){a.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:u("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(a){a.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:u("Ctrl-Home","Command-Home|Command-Up"),exec:function(a){a.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:u("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(a){a.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:u("Up","Up|Ctrl-P"),exec:function(a,s){a.navigateUp(s.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:u("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(a){a.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:u("Ctrl-End","Command-End|Command-Down"),exec:function(a){a.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:u("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(a){a.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:u("Down","Down|Ctrl-N"),exec:function(a,s){a.navigateDown(s.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:u("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(a){a.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:u("Ctrl-Left","Option-Left"),exec:function(a){a.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:u("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(a){a.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:u("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(a){a.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:u("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(a){a.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:u("Left","Left|Ctrl-B"),exec:function(a,s){a.navigateLeft(s.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:u("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(a){a.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:u("Ctrl-Right","Option-Right"),exec:function(a){a.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:u("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(a){a.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:u("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(a){a.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:u("Shift-Right","Shift-Right"),exec:function(a){a.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:u("Right","Right|Ctrl-F"),exec:function(a,s){a.navigateRight(s.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(a){a.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:u(null,"Option-PageDown"),exec:function(a){a.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:u("PageDown","PageDown|Ctrl-V"),exec:function(a){a.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(a){a.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:u(null,"Option-PageUp"),exec:function(a){a.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(a){a.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:u("Ctrl-Up",null),exec:function(a){a.renderer.scrollBy(0,-2*a.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:u("Ctrl-Down",null),exec:function(a){a.renderer.scrollBy(0,2*a.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(a){a.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(a){a.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:u("Ctrl-Alt-E","Command-Option-E"),exec:function(a){a.commands.toggleRecording(a)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:u("Ctrl-Shift-E","Command-Shift-E"),exec:function(a){a.commands.replay(a)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:u("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(a){a.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:u("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(a){a.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:u("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(a){a.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:u(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(a){},readOnly:!0},{name:"cut",description:"Cut",exec:function(a){var s=a.$copyWithEmptySelection&&a.selection.isEmpty(),c=s?a.selection.getLineRange():a.selection.getRange();a._emit("cut",c),c.isEmpty()||a.session.remove(c),a.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(a,s){a.$handlePaste(s)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:u("Ctrl-D","Command-D"),exec:function(a){a.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:u("Ctrl-Shift-D","Command-Shift-D"),exec:function(a){a.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:u("Ctrl-Alt-S","Command-Alt-S"),exec:function(a){a.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:u("Ctrl-/","Command-/"),exec:function(a){a.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:u("Ctrl-Shift-/","Command-Shift-/"),exec:function(a){a.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:u("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(a){a.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:u("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(a){a.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:u("Ctrl-H","Command-Option-F"),exec:function(a){g.loadModule("ace/ext/searchbox",function(s){s.Search(a,!0)})}},{name:"undo",description:"Undo",bindKey:u("Ctrl-Z","Command-Z"),exec:function(a){a.undo()}},{name:"redo",description:"Redo",bindKey:u("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(a){a.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:u("Alt-Shift-Up","Command-Option-Up"),exec:function(a){a.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:u("Alt-Up","Option-Up"),exec:function(a){a.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:u("Alt-Shift-Down","Command-Option-Down"),exec:function(a){a.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:u("Alt-Down","Option-Down"),exec:function(a){a.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:u("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(a){a.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:u("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(a){a.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:u("Shift-Delete",null),exec:function(a){if(a.selection.isEmpty())a.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:u("Alt-Backspace","Command-Backspace"),exec:function(a){a.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:u("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(a){a.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:u("Ctrl-Shift-Backspace",null),exec:function(a){var s=a.selection.getRange();s.start.column=0,a.session.remove(s)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:u("Ctrl-Shift-Delete",null),exec:function(a){var s=a.selection.getRange();s.end.column=Number.MAX_VALUE,a.session.remove(s)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:u("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(a){a.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:u("Ctrl-Delete","Alt-Delete"),exec:function(a){a.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:u("Shift-Tab","Shift-Tab"),exec:function(a){a.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:u("Tab","Tab"),exec:function(a){a.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:u("Ctrl-[","Ctrl-["),exec:function(a){a.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:u("Ctrl-]","Ctrl-]"),exec:function(a){a.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(a,s){a.insert(s)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(a,s){a.insert(d.stringRepeat(s.text||"",s.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:u(null,"Ctrl-O"),exec:function(a){a.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:u("Alt-Shift-X","Ctrl-T"),exec:function(a){a.transposeLetters()},multiSelectAction:function(a){a.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:u("Ctrl-U","Ctrl-U"),exec:function(a){a.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:u("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(a){a.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:u(null,null),exec:function(a){a.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:u("Ctrl-Shift-L","Command-Shift-L"),exec:function(a){var s=a.selection.getRange();s.start.column=s.end.column=0,s.end.row++,a.selection.setRange(s,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:u("Ctrl+F3","F3"),exec:function(a){a.openLink()}},{name:"joinlines",description:"Join lines",bindKey:u(null,null),exec:function(a){for(var s=a.selection.isBackwards(),c=s?a.selection.getSelectionLead():a.selection.getSelectionAnchor(),h=s?a.selection.getSelectionAnchor():a.selection.getSelectionLead(),o=a.session.doc.getLine(c.row).length,l=a.session.doc.getTextRange(a.selection.getRange()),p=l.replace(/\n\s*/," ").length,y=a.session.doc.getLine(c.row),x=c.row+1;x<=h.row+1;x++){var E=d.stringTrimLeft(d.stringTrimRight(a.session.doc.getLine(x)));E.length!==0&&(E=" "+E),y+=E}h.row+1<a.session.doc.getLength()-1&&(y+=a.session.doc.getNewLineCharacter()),a.clearSelection(),a.session.doc.replace(new w(c.row,0,h.row+2,0),y),p>0?(a.selection.moveCursorTo(c.row,c.column),a.selection.selectTo(c.row,c.column+p)):(o=a.session.doc.getLine(c.row).length>o?o+1:o,a.selection.moveCursorTo(c.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:u(null,null),exec:function(a){var s=a.session.doc.getLength()-1,c=a.session.doc.getLine(s).length,h=a.selection.rangeList.ranges,o=[];h.length<1&&(h=[a.selection.getRange()]);for(var l=0;l<h.length;l++)l==h.length-1&&(h[l].end.row===s&&h[l].end.column===c||o.push(new w(h[l].end.row,h[l].end.column,s,c))),l===0?h[l].start.row===0&&h[l].start.column===0||o.push(new w(0,0,h[l].start.row,h[l].start.column)):o.push(new w(h[l-1].end.row,h[l-1].end.column,h[l].start.row,h[l].start.column));a.exitMultiSelectMode(),a.clearSelection();for(var l=0;l<o.length;l++)a.selection.addRange(o[l],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(a){a.selection.clearSelection(),a.navigateLineEnd(),a.insert(`
212
+ `)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(a){a.selection.clearSelection();var s=a.getCursorPosition();a.selection.moveTo(s.row-1,Number.MAX_VALUE),a.insert(`
213
+ `),s.row===0&&a.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(a){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),a.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:u("F1","F1"),exec:function(a){a.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:u(null,null),exec:function(a){a.prompt({$type:"modes"})},readOnly:!0}];for(var f=1;f<9;f++)r.commands.push({name:"foldToLevel"+f,description:"Fold To Level "+f,level:f,exec:function(a){a.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys"],function(e,r,m){var d=e("../lib/keys"),g=(function(){function u(f){this.editor=f,this.gutterLayer=f.renderer.$gutterLayer,this.element=f.renderer.$gutter,this.lines=f.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=this.editor.$mouseHandler.$tooltip}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(f){if(this.annotationTooltip.isOpen){f.preventDefault(),f.keyCode===d.escape&&this.annotationTooltip.hide();return}if(f.target===this.element){if(f.keyCode!=d.enter)return;f.preventDefault();var a=this.editor.getCursorPosition().row;this.editor.isRowVisible(a)||this.editor.scrollToLine(a,!0,!0),setTimeout((function(){var s=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),c=this.$findNearestFoldLaneWidget(s),h=this.$findNearestAnnotation(s);if(!(c===null&&h===null)){var o=this.$findClosestNumber(c,h,s);if(o===c)if(this.activeLane="fold",this.activeRowIndex=c,this.$isCustomWidgetVisible(c)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=h,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(f),setTimeout((function(){this.editor._signal("gutterkeydown",new w(f,this))}).bind(this),10)},u.prototype.$handleGutterKeyboardInteraction=function(f){if(f.keyCode===d.tab){f.preventDefault();return}if(f.keyCode===d.escape){f.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(f.keyCode===d.up){switch(f.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(f.keyCode===d.down){switch(f.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(f.keyCode===d.left){f.preventDefault(),this.$switchLane("annotation");return}if(f.keyCode===d.right){f.preventDefault(),this.$switchLane("fold");return}if(f.keyCode===d.enter||f.keyCode===d.space){switch(f.preventDefault(),this.activeLane){case"fold":var a=this.$rowIndexToRow(this.activeRowIndex),s=this.editor.session.$gutterCustomWidgets[a];if(s)s.callbacks&&s.callbacks.onClick&&s.callbacks.onClick(f,a);else if(this.gutterLayer.session.foldWidgets[a]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),f),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==a&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(a),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex)),this.annotationTooltip.$fromKeyboard=!0;break}return}},u.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hide()},u.prototype.$isFoldWidgetVisible=function(f){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(f)),s=this.$getFoldWidget(f).style.display!=="none";return a&&s},u.prototype.$isCustomWidgetVisible=function(f){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(f)),s=!!this.$getCustomWidget(f);return a&&s},u.prototype.$isAnnotationVisible=function(f){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(f)),s=this.$getAnnotation(f).style.display!=="none";return a&&s},u.prototype.$getFoldWidget=function(f){var a=this.lines.get(f),s=a.element;return s.childNodes[1]},u.prototype.$getCustomWidget=function(f){var a=this.lines.get(f),s=a.element;return s.childNodes[3]},u.prototype.$getAnnotation=function(f){var a=this.lines.get(f),s=a.element;return s.childNodes[2]},u.prototype.$findNearestFoldLaneWidget=function(f){if(this.$isCustomWidgetVisible(f)||this.$isFoldWidgetVisible(f))return f;for(var a=0;f-a>0||f+a<this.lines.getLength()-1;){if(a++,f-a>=0&&this.$isCustomWidgetVisible(f-a))return f-a;if(f+a<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(f+a))return f+a;if(f-a>=0&&this.$isFoldWidgetVisible(f-a))return f-a;if(f+a<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(f+a))return f+a}return null},u.prototype.$findNearestAnnotation=function(f){if(this.$isAnnotationVisible(f))return f;for(var a=0;f-a>0||f+a<this.lines.getLength()-1;){if(a++,f-a>=0&&this.$isAnnotationVisible(f-a))return f-a;if(f+a<=this.lines.getLength()-1&&this.$isAnnotationVisible(f+a))return f+a}return null},u.prototype.$focusFoldWidget=function(f){if(f!=null){var a=this.$getFoldWidget(f);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},u.prototype.$focusCustomWidget=function(f){if(f!=null){var a=this.$getCustomWidget(f);a&&(a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus())}},u.prototype.$focusAnnotation=function(f){if(f!=null){var a=this.$getAnnotation(f);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},u.prototype.$blurFoldWidget=function(f){var a=this.$getFoldWidget(f);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},u.prototype.$blurCustomWidget=function(f){var a=this.$getCustomWidget(f);a&&(a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur())},u.prototype.$blurAnnotation=function(f){var a=this.$getAnnotation(f);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},u.prototype.$moveFoldWidgetUp=function(){for(var f=this.activeRowIndex;f>0;)if(f--,this.$isFoldWidgetVisible(f)||this.$isCustomWidgetVisible(f)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=f,this.$isFoldWidgetVisible(f)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},u.prototype.$moveFoldWidgetDown=function(){for(var f=this.activeRowIndex;f<this.lines.getLength()-1;)if(f++,this.$isFoldWidgetVisible(f)||this.$isCustomWidgetVisible(f)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=f,this.$isFoldWidgetVisible(f)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},u.prototype.$moveAnnotationUp=function(){for(var f=this.activeRowIndex;f>0;)if(f--,this.$isAnnotationVisible(f)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=f,this.$focusAnnotation(this.activeRowIndex);return}},u.prototype.$moveAnnotationDown=function(){for(var f=this.activeRowIndex;f<this.lines.getLength()-1;)if(f++,this.$isAnnotationVisible(f)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=f,this.$focusAnnotation(this.activeRowIndex);return}},u.prototype.$findClosestNumber=function(f,a,s){return f===null?a:a===null||Math.abs(s-f)<=Math.abs(s-a)?f:a},u.prototype.$switchLane=function(f){switch(f){case"annotation":if(this.activeLane==="annotation")break;var a=this.$findNearestAnnotation(this.activeRowIndex);if(a==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=a,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var s=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(s===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=s,this.$isCustomWidgetVisible(s)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},u.prototype.$rowIndexToRow=function(f){var a=this.lines.get(f);return a?a.row:null},u.prototype.$rowToRowIndex=function(f){for(var a=0;a<this.lines.getLength();a++){var s=this.lines.get(a);if(s.row==f)return a}return null},u})();r.GutterKeyboardHandler=g;var w=(function(){function u(f,a){this.gutterKeyboardHandler=a,this.domEvent=f}return u.prototype.getKey=function(){return d.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})();r.GutterKeyboardEvent=w}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys","ace/lib/event","ace/tooltip"],function(e,r,m){var d=this&&this.__values||function(T){var A=typeof Symbol=="function"&&Symbol.iterator,N=A&&T[A],B=0;if(N)return N.call(T);if(T&&typeof T.length=="number")return{next:function(){return T&&B>=T.length&&(T=void 0),{value:T&&T[B++],done:!T}}};throw new TypeError(A?"Object is not iterable.":"Symbol.iterator is not defined.")},g=e("./lib/oop"),w=e("./lib/dom"),u=e("./lib/lang"),f=e("./lib/useragent"),a=e("./keyboard/textinput").TextInput,s=e("./mouse/mouse_handler").MouseHandler,c=e("./mouse/fold_handler").FoldHandler,h=e("./keyboard/keybinding").KeyBinding,o=e("./edit_session").EditSession,l=e("./search").Search,p=e("./range").Range,y=e("./lib/event_emitter").EventEmitter,x=e("./commands/command_manager").CommandManager,E=e("./commands/default_commands").commands,$=e("./config"),_=e("./token_iterator").TokenIterator,C=e("./keyboard/gutter_handler").GutterKeyboardHandler,L=e("./config").nls,D=e("./clipboard"),I=e("./lib/keys"),M=e("./lib/event"),W=e("./tooltip").HoverTooltip,z=(function(){function T(A,N,B){this.id="editor"+ ++T.$uid,this.session,this.$toDestroy=[];var U=A.getContainerElement();this.container=U,this.renderer=A,this.commands=new x(f.isMac?"mac":"win",E),typeof document=="object"&&(this.textInput=new a(A.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new s(this),new c(this)),this.keyBinding=new h(this),this.$search=new l().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=u.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(G,J){J._$emitInputEvent.schedule(31)}),this.setSession(N||B&&B.session||new o("")),$.resetOptions(this),B&&this.setOptions(B),$._signal("editor",this)}return T.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},T.prototype.startOperation=function(A){this.session.startOperation(A)},T.prototype.endOperation=function(A){this.session.endOperation(A)},T.prototype.onStartOperation=function(A){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,A||(this.previousCommand=null)},T.prototype.onEndOperation=function(A){if(this.curOp&&this.session){if(A&&A.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var N=this.curOp.command,B=N&&N.scrollIntoView;if(B){switch(B){case"center-animate":B="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var U=this.selection.getRange(),G=this.renderer.layerConfig;(U.start.row>=G.lastRow||U.end.row<=G.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}B=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},T.prototype.$historyTracker=function(A){if(this.$mergeUndoDeltas){var N=this.prevOp,B=this.$mergeableCommands,U=N.command&&A.command.name==N.command.name;if(A.command.name=="insertstring"){var G=A.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),U=U&&this.mergeNextCommand&&(!/\s/.test(G)||/\s/.test(N.args)),this.mergeNextCommand=!0}else U=U&&B.indexOf(A.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(U=!1),U?this.session.mergeUndoDeltas=!0:B.indexOf(A.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},T.prototype.setKeyboardHandler=function(A,N){if(A&&typeof A=="string"&&A!="ace"){this.$keybindingId=A;var B=this;$.loadModule(["keybinding",A],function(U){B.$keybindingId==A&&B.keyBinding.setKeyboardHandler(U&&U.handler),N&&N()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(A),N&&N()},T.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},T.prototype.setSession=function(A){if(this.session!=A){this.curOp&&this.endOperation(),this.curOp={};var N=this.session;if(N){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 B=this.session.getSelection();B.off("changeCursor",this.$onCursorChange),B.off("changeSelection",this.$onSelectionChange)}this.session=A,A?(this.$onDocumentChange=this.onDocumentChange.bind(this),A.on("change",this.$onDocumentChange),this.renderer.setSession(A),this.$onChangeMode=this.onChangeMode.bind(this),A.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),A.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),A.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),A.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),A.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),A.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=A.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(A)),this._signal("changeSession",{session:A,oldSession:N}),this.curOp=null,N&&N._signal("changeEditor",{oldEditor:this}),N&&(N.$editor=null),A&&A._signal("changeEditor",{editor:this}),A&&(A.$editor=this),A&&!A.destroyed&&A.bgTokenizer.scheduleStart()}},T.prototype.getSession=function(){return this.session},T.prototype.setValue=function(A,N){return this.session.doc.setValue(A),N?N==1?this.navigateFileEnd():N==-1&&this.navigateFileStart():this.selectAll(),A},T.prototype.getValue=function(){return this.session.getValue()},T.prototype.getSelection=function(){return this.selection},T.prototype.resize=function(A){this.renderer.onResize(A)},T.prototype.setTheme=function(A,N){this.renderer.setTheme(A,N)},T.prototype.getTheme=function(){return this.renderer.getTheme()},T.prototype.setStyle=function(A,N){this.renderer.setStyle(A,N)},T.prototype.unsetStyle=function(A){this.renderer.unsetStyle(A)},T.prototype.getFontSize=function(){return this.getOption("fontSize")||w.computedStyle(this.container).fontSize},T.prototype.setFontSize=function(A){this.setOption("fontSize",A)},T.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var A=this;this.$highlightPending=!0,setTimeout(function(){A.$highlightPending=!1;var N=A.session;if(!(!N||N.destroyed)){N.$bracketHighlight&&(N.$bracketHighlight.markerIds.forEach(function(de){N.removeMarker(de)}),N.$bracketHighlight=null);var B=A.getCursorPosition(),U=A.getKeyboardHandler(),G=U&&U.$getDirectionForHighlight&&U.$getDirectionForHighlight(A),J=N.getMatchingBracketRanges(B,G);if(!J){var Q=new _(N,B.row,B.column),le=Q.getCurrentToken();if(le&&/\b(?:tag-open|tag-name)/.test(le.type)){var re=N.getMatchingTags(B);re&&(J=[re.openTagName.isEmpty()?re.openTag:re.openTagName,re.closeTagName.isEmpty()?re.closeTag:re.closeTagName])}}if(!J&&N.$mode.getMatching&&(J=N.$mode.getMatching(A.session)),!J){A.getHighlightIndentGuides()&&A.renderer.$textLayer.$highlightIndentGuide();return}var ce="ace_bracket";Array.isArray(J)?J.length==1&&(ce="ace_error_bracket"):J=[J],J.length==2&&(p.comparePoints(J[0].end,J[1].start)==0?J=[p.fromPoints(J[0].start,J[1].end)]:p.comparePoints(J[0].start,J[1].end)==0&&(J=[p.fromPoints(J[1].start,J[0].end)])),N.$bracketHighlight={ranges:J,markerIds:J.map(function(de){return N.addMarker(de,ce,"text")})},A.getHighlightIndentGuides()&&A.renderer.$textLayer.$highlightIndentGuide()}},50)}},T.prototype.focus=function(){this.textInput.focus()},T.prototype.isFocused=function(){return this.textInput.isFocused()},T.prototype.blur=function(){this.textInput.blur()},T.prototype.onFocus=function(A){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",A))},T.prototype.onBlur=function(A){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",A))},T.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},T.prototype.onDocumentChange=function(A){var N=this.session.$useWrapMode,B=A.start.row==A.end.row?A.end.row:1/0;this.renderer.updateLines(A.start.row,B,N),this._signal("change",A),this.$cursorChange()},T.prototype.onTokenizerUpdate=function(A){var N=A.data;this.renderer.updateLines(N.first,N.last)},T.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},T.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},T.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},T.prototype.$updateHighlightActiveLine=function(){var A=this.getSession(),N;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(N=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(N=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(N=!1)),A.$highlightLineMarker&&!N)A.removeMarker(A.$highlightLineMarker.id),A.$highlightLineMarker=null;else if(!A.$highlightLineMarker&&N){var B=new p(N.row,N.column,N.row,1/0);B.id=A.addMarker(B,"ace_active-line","screenLine"),A.$highlightLineMarker=B}else N&&(A.$highlightLineMarker.start.row=N.row,A.$highlightLineMarker.end.row=N.row,A.$highlightLineMarker.start.column=N.column,A._signal("changeBackMarker"))},T.prototype.onSelectionChange=function(A){var N=this.session;if(N.$selectionMarker&&N.removeMarker(N.$selectionMarker),N.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var B=this.selection.getRange(),U=this.getSelectionStyle();N.$selectionMarker=N.addMarker(B,"ace_selection",U)}var G=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(G),this._signal("changeSelection")},T.prototype.$getSelectionHighLightRegexp=function(){var A=this.session,N=this.getSelectionRange();if(!(N.isEmpty()||N.isMultiLine())){var B=N.start.column,U=N.end.column,G=A.getLine(N.start.row),J=G.substring(B,U);if(!(J.length>5e3||!/[\w\d]/.test(J))){var Q=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:J}),le=G.substring(B-1,U+1);if(Q.test(le))return Q}}},T.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},T.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},T.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},T.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},T.prototype.onChangeMode=function(A){this.renderer.updateText(),this._emit("changeMode",A)},T.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},T.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},T.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},T.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},T.prototype.getCopyText=function(){var A=this.getSelectedText(),N=this.session.doc.getNewLineCharacter(),B=!1;if(!A&&this.$copyWithEmptySelection){B=!0;for(var U=this.selection.getAllRanges(),G=0;G<U.length;G++){var J=U[G];G&&U[G-1].start.row==J.start.row||(A+=this.session.getLine(J.start.row)+N)}}var Q={text:A};return this._signal("copy",Q),D.lineMode=B?Q.text:!1,Q.text},T.prototype.onCopy=function(){this.commands.exec("copy",this)},T.prototype.onCut=function(){this.commands.exec("cut",this)},T.prototype.onPaste=function(A,N){var B={text:A,event:N};this.commands.exec("paste",this,B)},T.prototype.$handlePaste=function(A){typeof A=="string"&&(A={text:A}),this._signal("paste",A);var N=A.text,B=N===D.lineMode,U=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)B?U.insert({row:this.selection.lead.row,column:0},N):this.insert(N);else if(B)this.selection.rangeList.ranges.forEach(function(ce){U.insert({row:ce.start.row,column:0},N)});else{var G=N.split(/\r\n|\r|\n/),J=this.selection.rangeList.ranges,Q=G.length==2&&(!G[0]||!G[1]);if(G.length!=J.length||Q)return this.commands.exec("insertstring",this,N);for(var le=J.length;le--;){var re=J[le];re.isEmpty()||U.remove(re),U.insert(re.start,G[le])}}},T.prototype.execCommand=function(A,N){return this.commands.exec(A,this,N)},T.prototype.insert=function(A,N){var B=this.session,U=B.getMode(),G=this.getCursorPosition();if(this.getBehavioursEnabled()&&!N){var J=U.transformAction(B.getState(G.row),"insertion",this,B,A);J&&(A!==J.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),A=J.text)}if(A==" "&&(A=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&A.indexOf(`
214
+ `)==-1){var Q=p.fromPoints(G,G);Q.end.column+=A.length,this.session.remove(Q)}}else{var Q=this.getSelectionRange();G=this.session.remove(Q),this.clearSelection()}if(A==`
215
+ `||A==`\r
216
+ `){var de=B.getLine(G.row);if(G.column>de.search(/\S|$/)){var le=de.substr(G.column).search(/\S|$/);B.doc.removeInLine(G.row,G.column,G.column+le)}}this.clearSelection();var re=G.column,ce=B.getState(G.row),de=B.getLine(G.row),ie=U.checkOutdent(ce,de,A);if(B.insert(G,A),J&&J.selection&&(J.selection.length==2?this.selection.setSelectionRange(new p(G.row,re+J.selection[0],G.row,re+J.selection[1])):this.selection.setSelectionRange(new p(G.row+J.selection[0],J.selection[1],G.row+J.selection[2],J.selection[3]))),this.$enableAutoIndent){if(B.getDocument().isNewLine(A)){var fe=U.getNextLineIndent(ce,de.slice(0,G.column),B.getTabString());B.insert({row:G.row+1,column:0},fe)}ie&&U.autoOutdent(ce,B,G.row)}},T.prototype.autoIndent=function(){for(var A=this.session,N=A.getMode(),B=this.selection.isEmpty()?[new p(0,0,A.doc.getLength()-1,0)]:this.selection.getAllRanges(),U="",G="",J="",Q=A.getTabString(),le=0;le<B.length;le++)for(var re=B[le].start.row,ce=B[le].end.row,de=re;de<=ce;de++){de>0&&(U=A.getState(de-1),G=A.getLine(de-1),J=N.getNextLineIndent(U,G,Q));var ie=A.getLine(de),fe=N.$getIndent(ie);if(J!==fe){if(fe.length>0){var $e=new p(de,0,de,fe.length);A.remove($e)}J.length>0&&A.insert({row:de,column:0},J)}N.autoOutdent(U,A,de)}},T.prototype.onTextInput=function(A,N){if(!N)return this.keyBinding.onTextInput(A);this.startOperation({command:{name:"insertstring"}});var B=this.applyComposition.bind(this,A,N);this.selection.rangeCount?this.forEachSelection(B):B(),this.endOperation()},T.prototype.applyComposition=function(A,N){if(N.extendLeft||N.extendRight){var B=this.selection.getRange();B.start.column-=N.extendLeft,B.end.column+=N.extendRight,B.start.column<0&&(B.start.row--,B.start.column+=this.session.getLine(B.start.row).length+1),this.selection.setRange(B),!A&&!B.isEmpty()&&this.remove()}if((A||!this.selection.isEmpty())&&this.insert(A,!0),N.restoreStart||N.restoreEnd){var B=this.selection.getRange();B.start.column-=N.restoreStart,B.end.column-=N.restoreEnd,this.selection.setRange(B)}},T.prototype.onCommandKey=function(A,N,B){return this.keyBinding.onCommandKey(A,N,B)},T.prototype.setOverwrite=function(A){this.session.setOverwrite(A)},T.prototype.getOverwrite=function(){return this.session.getOverwrite()},T.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},T.prototype.setScrollSpeed=function(A){this.setOption("scrollSpeed",A)},T.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},T.prototype.setDragDelay=function(A){this.setOption("dragDelay",A)},T.prototype.getDragDelay=function(){return this.getOption("dragDelay")},T.prototype.setSelectionStyle=function(A){this.setOption("selectionStyle",A)},T.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},T.prototype.setHighlightActiveLine=function(A){this.setOption("highlightActiveLine",A)},T.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},T.prototype.setHighlightGutterLine=function(A){this.setOption("highlightGutterLine",A)},T.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},T.prototype.setHighlightSelectedWord=function(A){this.setOption("highlightSelectedWord",A)},T.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},T.prototype.setAnimatedScroll=function(A){this.renderer.setAnimatedScroll(A)},T.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},T.prototype.setShowInvisibles=function(A){this.renderer.setShowInvisibles(A)},T.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},T.prototype.setDisplayIndentGuides=function(A){this.renderer.setDisplayIndentGuides(A)},T.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},T.prototype.setHighlightIndentGuides=function(A){this.renderer.setHighlightIndentGuides(A)},T.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},T.prototype.setShowPrintMargin=function(A){this.renderer.setShowPrintMargin(A)},T.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},T.prototype.setPrintMarginColumn=function(A){this.renderer.setPrintMarginColumn(A)},T.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},T.prototype.setReadOnly=function(A){this.setOption("readOnly",A)},T.prototype.getReadOnly=function(){return this.getOption("readOnly")},T.prototype.setBehavioursEnabled=function(A){this.setOption("behavioursEnabled",A)},T.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},T.prototype.setWrapBehavioursEnabled=function(A){this.setOption("wrapBehavioursEnabled",A)},T.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},T.prototype.setShowFoldWidgets=function(A){this.setOption("showFoldWidgets",A)},T.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},T.prototype.setFadeFoldWidgets=function(A){this.setOption("fadeFoldWidgets",A)},T.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},T.prototype.remove=function(A){this.selection.isEmpty()&&(A=="left"?this.selection.selectLeft():this.selection.selectRight());var N=this.getSelectionRange();if(this.getBehavioursEnabled()){var B=this.session,U=B.getState(N.start.row),G=B.getMode().transformAction(U,"deletion",this,B,N);if(N.end.column===0){var J=B.getTextRange(N);if(J[J.length-1]==`
217
+ `){var Q=B.getLine(N.end.row);/^\s+$/.test(Q)&&(N.end.column=Q.length)}}G&&(N=G)}this.session.remove(N),this.clearSelection()},T.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},T.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},T.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},T.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var A=this.getSelectionRange();A.start.column==A.end.column&&A.start.row==A.end.row&&(A.end.column=0,A.end.row++),this.session.remove(A),this.clearSelection()},T.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var A=this.getCursorPosition();this.insert(`
218
+ `),this.moveCursorToPosition(A)},T.prototype.setGhostText=function(A,N){this.renderer.setGhostText(A,N)},T.prototype.removeGhostText=function(){this.renderer.removeGhostText()},T.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var A=this.getCursorPosition(),N=A.column;if(N!==0){var B=this.session.getLine(A.row),U,G;N<B.length?(U=B.charAt(N)+B.charAt(N-1),G=new p(A.row,N-1,A.row,N+1)):(U=B.charAt(N-1)+B.charAt(N-2),G=new p(A.row,N-2,A.row,N)),this.session.replace(G,U),this.session.selection.moveToPosition(G.end)}}},T.prototype.toLowerCase=function(){var A=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var N=this.getSelectionRange(),B=this.session.getTextRange(N);this.session.replace(N,B.toLowerCase()),this.selection.setSelectionRange(A)},T.prototype.toUpperCase=function(){var A=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var N=this.getSelectionRange(),B=this.session.getTextRange(N);this.session.replace(N,B.toUpperCase()),this.selection.setSelectionRange(A)},T.prototype.indent=function(){var A=this.session,N=this.getSelectionRange();if(N.start.row<N.end.row){var B=this.$getSelectedRows();A.indentRows(B.first,B.last," ");return}else if(N.start.column<N.end.column){var U=A.getTextRange(N);if(!/^\s+$/.test(U)){var B=this.$getSelectedRows();A.indentRows(B.first,B.last," ");return}}var G=A.getLine(N.start.row),J=N.start,Q=A.getTabSize(),le=A.documentToScreenColumn(J.row,J.column);if(this.session.getUseSoftTabs())var re=Q-le%Q,ce=u.stringRepeat(" ",re);else{for(var re=le%Q;G[N.start.column-1]==" "&&re;)N.start.column--,re--;this.selection.setSelectionRange(N),ce=" "}return this.insert(ce)},T.prototype.blockIndent=function(){var A=this.$getSelectedRows();this.session.indentRows(A.first,A.last," ")},T.prototype.blockOutdent=function(){var A=this.session.getSelection();this.session.outdentRows(A.getRange())},T.prototype.sortLines=function(){for(var A=this.$getSelectedRows(),N=this.session,B=[],U=A.first;U<=A.last;U++)B.push(N.getLine(U));B.sort(function(Q,le){return Q.toLowerCase()<le.toLowerCase()?-1:Q.toLowerCase()>le.toLowerCase()?1:0});for(var G=new p(0,0,0,0),U=A.first;U<=A.last;U++){var J=N.getLine(U);G.start.row=U,G.end.row=U,G.end.column=J.length,N.replace(G,B[U-A.first])}},T.prototype.toggleCommentLines=function(){var A=this.session.getState(this.getCursorPosition().row),N=this.$getSelectedRows();this.session.getMode().toggleCommentLines(A,this.session,N.first,N.last)},T.prototype.toggleBlockComment=function(){var A=this.getCursorPosition(),N=this.session.getState(A.row),B=this.getSelectionRange();this.session.getMode().toggleBlockComment(N,this.session,B,A)},T.prototype.getNumberAt=function(A,N){var B=/[\-]?[0-9]+(?:\.[0-9]+)?/g;B.lastIndex=0;for(var U=this.session.getLine(A);B.lastIndex<N;){var G=B.exec(U);if(G.index<=N&&G.index+G[0].length>=N){var J={value:G[0],start:G.index,end:G.index+G[0].length};return J}}return null},T.prototype.modifyNumber=function(A){var N=this.selection.getCursor().row,B=this.selection.getCursor().column,U=new p(N,B-1,N,B),G=this.session.getTextRange(U);if(!isNaN(parseFloat(G))&&isFinite(G)){var J=this.getNumberAt(N,B);if(J){var Q=J.value.indexOf(".")>=0?J.start+J.value.indexOf(".")+1:J.end,le=J.start+J.value.length-Q,re=parseFloat(J.value);re*=Math.pow(10,le),Q!==J.end&&B<Q?A*=Math.pow(10,J.end-B-1):A*=Math.pow(10,J.end-B),re+=A,re/=Math.pow(10,le);var ce=re.toFixed(le),de=new p(N,J.start,N,J.end);this.session.replace(de,ce),this.moveCursorTo(N,Math.max(J.start+1,B+ce.length-J.value.length))}}else this.toggleWord()},T.prototype.toggleWord=function(){var A=this.selection.getCursor().row,N=this.selection.getCursor().column;this.selection.selectWord();var B=this.getSelectedText(),U=this.selection.getWordRange().start.column,G=B.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),J=N-U-1;J<0&&(J=0);var Q=0,le=0,re=this;B.match(/[A-Za-z0-9_]+/)&&G.forEach(function(He,Ge){le=Q+He.length,J>=Q&&J<=le&&(B=He,re.selection.clearSelection(),re.moveCursorTo(A,Q+U),re.selection.selectTo(A,le+U)),Q=le});for(var ce=this.$toggleWordPairs,de,ie=0;ie<ce.length;ie++)for(var fe=ce[ie],$e=0;$e<=1;$e++){var Re=+!$e,Ee=B.match(new RegExp("^\\s?_?("+u.escapeRegExp(fe[$e])+")\\s?$","i"));if(Ee){var Ue=B.match(new RegExp("([_]|^|\\s)("+u.escapeRegExp(Ee[1])+")($|\\s)","g"));Ue&&(de=B.replace(new RegExp(u.escapeRegExp(fe[$e]),"i"),function(He){var Ge=fe[Re];return He.toUpperCase()==He?Ge=Ge.toUpperCase():He.charAt(0).toUpperCase()==He.charAt(0)&&(Ge=Ge.substr(0,0)+fe[Re].charAt(0).toUpperCase()+Ge.substr(1)),Ge}),this.insert(de),de="")}}},T.prototype.findLinkAt=function(A,N){var B,U,G=this.session.getLine(A),J=G.split(/((?:https?|ftp):\/\/[\S]+)/),Q=N;Q<0&&(Q=0);var le=0,re=0,ce;try{for(var de=d(J),ie=de.next();!ie.done;ie=de.next()){var fe=ie.value;if(re=le+fe.length,Q>=le&&Q<=re&&fe.match(/((?:https?|ftp):\/\/[\S]+)/)){ce=fe.replace(/[\s:.,'";}\]]+$/,"");break}le=re}}catch($e){B={error:$e}}finally{try{ie&&!ie.done&&(U=de.return)&&U.call(de)}finally{if(B)throw B.error}}return ce},T.prototype.openLink=function(){var A=this.selection.getCursor(),N=this.findLinkAt(A.row,A.column);return N&&window.open(N,"_blank"),N!=null},T.prototype.removeLines=function(){var A=this.$getSelectedRows();this.session.removeFullLines(A.first,A.last),this.clearSelection()},T.prototype.duplicateSelection=function(){var A=this.selection,N=this.session,B=A.getRange(),U=A.isBackwards();if(B.isEmpty()){var G=B.start.row;N.duplicateLines(G,G)}else{var J=U?B.start:B.end,Q=N.insert(J,N.getTextRange(B));B.start=J,B.end=Q,A.setSelectionRange(B,U)}},T.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},T.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},T.prototype.moveText=function(A,N,B){return this.session.moveText(A,N,B)},T.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},T.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},T.prototype.$moveLines=function(A,N){var B,U,G=this.selection;if(!G.inMultiSelectMode||this.inVirtualSelectionMode){var J=G.toOrientedRange();B=this.$getSelectedRows(J),U=this.session.$moveLines(B.first,B.last,N?0:A),N&&A==-1&&(U=0),J.moveBy(U,0),G.fromOrientedRange(J)}else{var Q=G.rangeList.ranges;G.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var le=0,re=0,ce=Q.length,de=0;de<ce;de++){var ie=de;Q[de].moveBy(le,0),B=this.$getSelectedRows(Q[de]);for(var fe=B.first,$e=B.last;++de<ce;){re&&Q[de].moveBy(re,0);var Re=this.$getSelectedRows(Q[de]);if(N&&Re.first!=$e||!N&&Re.first>$e+1)break;$e=Re.last}for(de--,le=this.session.$moveLines(fe,$e,N?0:A),N&&A==-1&&(ie=de+1);ie<=de;)Q[ie].moveBy(le,0),ie++;N||(le=0),re+=le}G.fromOrientedRange(G.ranges[0]),G.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},T.prototype.$getSelectedRows=function(A){return A=(A||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(A.start.row),last:this.session.getRowFoldEnd(A.end.row)}},T.prototype.onCompositionStart=function(A){this.renderer.showComposition(A)},T.prototype.onCompositionUpdate=function(A){this.renderer.setCompositionText(A)},T.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},T.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},T.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},T.prototype.isRowVisible=function(A){return A>=this.getFirstVisibleRow()&&A<=this.getLastVisibleRow()},T.prototype.isRowFullyVisible=function(A){return A>=this.renderer.getFirstFullyVisibleRow()&&A<=this.renderer.getLastFullyVisibleRow()},T.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},T.prototype.$moveByPage=function(A,N){var B=this.renderer,U=this.renderer.layerConfig,G=A*Math.floor(U.height/U.lineHeight);N===!0?this.selection.$moveSelection(function(){this.moveCursorBy(G,0)}):N===!1&&(this.selection.moveCursorBy(G,0),this.selection.clearSelection());var J=B.scrollTop;B.scrollBy(0,G*U.lineHeight),N!=null&&B.scrollCursorIntoView(null,.5),B.animateScrolling(J)},T.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},T.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},T.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},T.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},T.prototype.scrollPageDown=function(){this.$moveByPage(1)},T.prototype.scrollPageUp=function(){this.$moveByPage(-1)},T.prototype.scrollToRow=function(A){this.renderer.scrollToRow(A)},T.prototype.scrollToLine=function(A,N,B,U){this.renderer.scrollToLine(A,N,B,U)},T.prototype.centerSelection=function(){var A=this.getSelectionRange(),N={row:Math.floor(A.start.row+(A.end.row-A.start.row)/2),column:Math.floor(A.start.column+(A.end.column-A.start.column)/2)};this.renderer.alignCursor(N,.5)},T.prototype.getCursorPosition=function(){return this.selection.getCursor()},T.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},T.prototype.getSelectionRange=function(){return this.selection.getRange()},T.prototype.selectAll=function(){this.selection.selectAll()},T.prototype.clearSelection=function(){this.selection.clearSelection()},T.prototype.moveCursorTo=function(A,N){this.selection.moveCursorTo(A,N)},T.prototype.moveCursorToPosition=function(A){this.selection.moveCursorToPosition(A)},T.prototype.jumpToMatching=function(A,N){var B=this.getCursorPosition(),U=new _(this.session,B.row,B.column),G=U.getCurrentToken(),J=0;G&&G.type.indexOf("tag-name")!==-1&&(G=U.stepBackward());var Q=G||U.stepForward();if(Q){var le,re=!1,ce={},de=B.column-Q.start,ie,fe={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(Q.value.match(/[{}()\[\]]/g)){for(;de<Q.value.length&&!re;de++)if(fe[Q.value[de]])switch(ie=fe[Q.value[de]]+"."+Q.type.replace("rparen","lparen"),isNaN(ce[ie])&&(ce[ie]=0),Q.value[de]){case"(":case"[":case"{":ce[ie]++;break;case")":case"]":case"}":ce[ie]--,ce[ie]===-1&&(le="bracket",re=!0);break}}else Q.type.indexOf("tag-name")!==-1&&(isNaN(ce[Q.value])&&(ce[Q.value]=0),G.value==="<"&&J>1?ce[Q.value]++:G.value==="</"&&ce[Q.value]--,ce[Q.value]===-1&&(le="tag",re=!0));re||(G=Q,J++,Q=U.stepForward(),de=0)}while(Q&&!re);if(le){var $e,Re;if(le==="bracket")$e=this.session.getBracketRange(B),$e||($e=new p(U.getCurrentTokenRow(),U.getCurrentTokenColumn()+de-1,U.getCurrentTokenRow(),U.getCurrentTokenColumn()+de-1),Re=$e.start,(N||Re.row===B.row&&Math.abs(Re.column-B.column)<2)&&($e=this.session.getBracketRange(Re)));else if(le==="tag"){if(!Q||Q.type.indexOf("tag-name")===-1)return;if($e=new p(U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2,U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2),$e.compare(B.row,B.column)===0){var Ee=this.session.getMatchingTags(B);Ee&&(Ee.openTag.contains(B.row,B.column)?($e=Ee.closeTag,Re=$e.start):($e=Ee.openTag,Ee.closeTag.start.row===B.row&&Ee.closeTag.start.column===B.column?Re=$e.end:Re=$e.start))}Re=Re||$e.start}Re=$e&&$e.cursor||Re,Re&&(A?$e&&N?this.selection.setRange($e):$e&&$e.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(Re.row,Re.column):this.selection.moveTo(Re.row,Re.column))}}},T.prototype.gotoLine=function(A,N,B){this.selection.clearSelection(),this.session.unfold({row:A-1,column:N||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(A-1,N||0),this.isRowFullyVisible(A-1)||this.scrollToLine(A-1,!0,B)},T.prototype.navigateTo=function(A,N){this.selection.moveTo(A,N)},T.prototype.navigateUp=function(A){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var N=this.selection.anchor.getPosition();return this.moveCursorToPosition(N)}this.selection.clearSelection(),this.selection.moveCursorBy(-A||-1,0)},T.prototype.navigateDown=function(A){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var N=this.selection.anchor.getPosition();return this.moveCursorToPosition(N)}this.selection.clearSelection(),this.selection.moveCursorBy(A||1,0)},T.prototype.navigateLeft=function(A){if(this.selection.isEmpty())for(A=A||1;A--;)this.selection.moveCursorLeft();else{var N=this.getSelectionRange().start;this.moveCursorToPosition(N)}this.clearSelection()},T.prototype.navigateRight=function(A){if(this.selection.isEmpty())for(A=A||1;A--;)this.selection.moveCursorRight();else{var N=this.getSelectionRange().end;this.moveCursorToPosition(N)}this.clearSelection()},T.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},T.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},T.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},T.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},T.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},T.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},T.prototype.replace=function(A,N){N&&this.$search.set(N);var B=this.$search.find(this.session),U=0;return B&&(this.$tryReplace(B,A)&&(U=1),this.selection.setSelectionRange(B),this.renderer.scrollSelectionIntoView(B.start,B.end)),U},T.prototype.replaceAll=function(A,N){N&&this.$search.set(N);var B=this.$search.findAll(this.session),U=0;if(!B.length)return U;var G=this.getSelectionRange();this.selection.moveTo(0,0);for(var J=B.length-1;J>=0;--J)this.$tryReplace(B[J],A)&&U++;return this.selection.setSelectionRange(G),U},T.prototype.$tryReplace=function(A,N){var B=this.session.getTextRange(A);return N=this.$search.replace(B,N),N!==null?(A.end=this.session.replace(A,N),A):null},T.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},T.prototype.find=function(A,N,B){N||(N={}),typeof A=="string"||A instanceof RegExp?N.needle=A:typeof A=="object"&&g.mixin(N,A);var U=this.selection.getRange();N.needle==null&&(A=this.session.getTextRange(U)||this.$search.$options.needle,A||(U=this.session.getWordRange(U.start.row,U.start.column),A=this.session.getTextRange(U)),this.$search.set({needle:A})),this.$search.set(N),N.start||this.$search.set({start:U});var G=this.$search.find(this.session);if(N.preventScroll)return G;if(G)return this.revealRange(G,B),G;N.backwards?U.start=U.end:U.end=U.start,this.selection.setRange(U)},T.prototype.findNext=function(A,N){this.find({skipCurrent:!0,backwards:!1},A,N)},T.prototype.findPrevious=function(A,N){this.find(A,{skipCurrent:!0,backwards:!0},N)},T.prototype.revealRange=function(A,N){this.session.unfold(A),this.selection.setSelectionRange(A);var B=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(A.start,A.end,.5),N!==!1&&this.renderer.animateScrolling(B)},T.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},T.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},T.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(A){A.destroy()}),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},T.prototype.setAutoScrollEditorIntoView=function(A){if(A){var N,B=this,U=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var G=this.$scrollAnchor;G.style.cssText="position:absolute",this.container.insertBefore(G,this.container.firstChild);var J=this.on("changeSelection",function(){U=!0}),Q=this.renderer.on("beforeRender",function(){U&&(N=B.renderer.container.getBoundingClientRect())}),le=this.renderer.on("afterRender",function(){if(U&&N&&(B.isFocused()||B.searchBox&&B.searchBox.isFocused())){var re=B.renderer,ce=re.$cursorLayer.$pixelPos,de=re.layerConfig,ie=ce.top-de.offset;ce.top>=0&&ie+N.top<0?U=!0:ce.top<de.height&&ce.top+N.top+de.lineHeight>window.innerHeight?U=!1:U=null,U!=null&&(G.style.top=ie+"px",G.style.left=ce.left+"px",G.style.height=de.lineHeight+"px",G.scrollIntoView(U)),U=N=null}});this.setAutoScrollEditorIntoView=function(re){re||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",J),this.renderer.off("afterRender",le),this.renderer.off("beforeRender",Q))}}},T.prototype.$resetCursorStyle=function(){var A=this.$cursorStyle||"ace",N=this.renderer.$cursorLayer;N&&(N.setSmoothBlinking(/smooth/.test(A)),N.isBlinking=!this.$readOnly&&A!="wide",w.setCssClass(N.element,"ace_slim-cursors",/slim/.test(A)))},T.prototype.prompt=function(A,N,B){var U=this;$.loadModule("ace/ext/prompt",function(G){G.prompt(U,A,N,B)})},Object.defineProperty(T.prototype,"hoverTooltip",{get:function(){return this.$hoverTooltip||(this.$hoverTooltip=new W(this.container))},set:function(A){this.$hoverTooltip&&this.$hoverTooltip.destroy(),this.$hoverTooltip=A},enumerable:!1,configurable:!0}),T})();z.$uid=0,z.prototype.curOp=null,z.prototype.prevOp={},z.prototype.$mergeableCommands=["backspace","del","insertstring"],z.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"],["&&","||"],["==","!="]],g.implement(z.prototype,y),$.defineOptions(z.prototype,"editor",{selectionStyle:{set:function(T){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:T})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(T){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(T){var A=this;if(this.textInput.setReadOnly(T),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(B){var U=!1;if(B&&B.type=="keydown"){if(B&&B.key&&!B.ctrlKey&&!B.metaKey&&(B.key==" "&&B.preventDefault(),U=B.key.length==1),!U)return}else B&&B.type!=="exec"&&(U=!0);if(U){var G=w.createElement("div");G.textContent=L("editor.tooltip.disable-editing","Editing is disabled"),A.hoverTooltip.isOpen||A.hoverTooltip.showForRange(A,A.getSelectionRange(),G)}else A.hoverTooltip&&A.hoverTooltip.isOpen&&A.hoverTooltip.hide()});var N=this.textInput.getElement();T?(M.addListener(N,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(M.removeListener(N,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback))}},initialValue:!1},copyWithEmptySelection:{set:function(T){this.textInput.setCopyWithEmptySelection(T)},initialValue:!1},cursorStyle:{set:function(T){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(T){this.setAutoScrollEditorIntoView(T)}},keyboardHandler:{set:function(T){this.setKeyboardHandler(T)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(T){this.session.setValue(T)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(T){this.setSession(T)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(T){this.renderer.$gutterLayer.setShowLineNumbers(T),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),T&&this.$relativeLineNumbers?O.attach(this):O.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(T){this.$showLineNumbers&&T?O.attach(this):O.detach(this)}},placeholder:{set:function(T){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var A=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(A&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),w.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!A&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),w.addCssClass(this.container,"ace_hasPlaceholder");var N=w.createElement("div");N.className="ace_placeholder",N.textContent=this.$placeholder||"",this.renderer.placeholderNode=N,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!A&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(T){var A={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(U){U.blur(),U.renderer.scroller.focus()},readOnly:!0},N=function(U){if(U.target==this.renderer.scroller&&U.keyCode===I.enter){U.preventDefault();var G=this.getCursorPosition().row;this.isRowVisible(G)||this.scrollToLine(G,!0,!0),this.focus()}},B;T?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(f.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",L("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",L("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",N.bind(this)),this.commands.addCommand(A),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",L("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",L("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),B||(B=new C(this)),B.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",N.bind(this)),this.commands.removeCommand(A),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),B&&B.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(T){this.$textInputAriaLabel=T},initialValue:""},enableMobileMenu:{set:function(T){this.$enableMobileMenu=T},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var O={getText:function(T,A){return(Math.abs(T.selection.lead.row-A)||A+1+(A<9?"·":""))+""},getWidth:function(T,A,N){return Math.max(A.toString().length,(N.lastRow+1).toString().length,2)*N.characterWidth},update:function(T,A){A.renderer.$loop.schedule(A.renderer.CHANGE_GUTTER)},attach:function(T){T.renderer.$gutterLayer.$renderer=this,T.on("changeSelection",this.update),this.update(null,T)},detach:function(T){T.renderer.$gutterLayer.$renderer==this&&(T.renderer.$gutterLayer.$renderer=null),T.off("changeSelection",this.update),this.update(null,T)}};r.Editor=z}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(e,r,m){var d=e("../lib/dom"),g=(function(){function w(u,f){this.element=u,this.canvasHeight=f||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return w.prototype.moveContainer=function(u){d.translate(this.element,0,-(u.firstRowScreen*u.lineHeight%this.canvasHeight)-u.offset*this.$offsetCoefficient)},w.prototype.pageChanged=function(u,f){return Math.floor(u.firstRowScreen*u.lineHeight/this.canvasHeight)!==Math.floor(f.firstRowScreen*f.lineHeight/this.canvasHeight)},w.prototype.computeLineTop=function(u,f,a){var s=f.firstRowScreen*f.lineHeight,c=Math.floor(s/this.canvasHeight),h=a.documentToScreenRow(u,0)*f.lineHeight;return h-c*this.canvasHeight},w.prototype.computeLineHeight=function(u,f,a){return f.lineHeight*a.getRowLineCount(u)},w.prototype.getLength=function(){return this.cells.length},w.prototype.get=function(u){return this.cells[u]},w.prototype.shift=function(){this.$cacheCell(this.cells.shift())},w.prototype.pop=function(){this.$cacheCell(this.cells.pop())},w.prototype.push=function(u){if(Array.isArray(u)){this.cells.push.apply(this.cells,u);for(var f=d.createFragment(this.element),a=0;a<u.length;a++)f.appendChild(u[a].element);this.element.appendChild(f)}else this.cells.push(u),this.element.appendChild(u.element)},w.prototype.unshift=function(u){if(Array.isArray(u)){this.cells.unshift.apply(this.cells,u);for(var f=d.createFragment(this.element),a=0;a<u.length;a++)f.appendChild(u[a].element);this.element.firstChild?this.element.insertBefore(f,this.element.firstChild):this.element.appendChild(f)}else this.cells.unshift(u),this.element.insertAdjacentElement("afterbegin",u.element)},w.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},w.prototype.$cacheCell=function(u){u&&(u.element.remove(),this.cellCache.push(u))},w.prototype.createCell=function(u,f,a,s){var c=this.cellCache.pop();if(!c){var h=d.createElement("div");s&&s(h),this.element.appendChild(h),c={element:h,text:"",row:u}}return c.row=u,c},w})();r.Lines=g}),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(e,r,m){var d=e("../lib/dom"),g=e("../lib/oop"),w=e("../lib/lang"),u=e("../lib/event_emitter").EventEmitter,f=e("./lines").Lines,a=e("../config").nls,s=(function(){function h(o){this.$showCursorMarker=null,this.element=d.createElement("div"),this.element.className="ace_layer ace_gutter-layer",o.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new f(this.element),this.$lines.$offsetCoefficient=1}return h.prototype.setSession=function(o){this.session&&this.session.off("change",this.$updateAnnotations),this.session=o,o&&o.on("change",this.$updateAnnotations)},h.prototype.addGutterDecoration=function(o,l){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(o,l)},h.prototype.removeGutterDecoration=function(o,l){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(o,l)},h.prototype.setAnnotations=function(o){this.$annotations=[];for(var l=0;l<o.length;l++){var p=o[l],y=p.row,x=this.$annotations[y];x||(x=this.$annotations[y]={text:[],type:[],displayText:[]});var E=p.text,$=p.text,_=p.type;E=E?w.escapeHTML(E):p.html||"",$=$||p.html||"",x.text.indexOf(E)===-1&&(x.text.push(E),x.type.push(_),x.displayText.push($));var C=p.className;C?x.className=C:_==="error"?x.className=" ace_error":_==="security"&&!/\bace_error\b/.test(x.className)?x.className=" ace_security":_==="warning"&&!/\bace_(error|security)\b/.test(x.className)?x.className=" ace_warning":_==="info"&&!x.className?x.className=" ace_info":_==="hint"&&!x.className&&(x.className=" ace_hint")}},h.prototype.$updateAnnotations=function(o){if(this.$annotations.length){var l=o.start.row,p=o.end.row-l;if(p!==0)if(o.action=="remove")this.$annotations.splice(l,p+1,null);else{var y=new Array(p+1);y.unshift(l,1),this.$annotations.splice.apply(this.$annotations,y)}}},h.prototype.update=function(o){this.config=o;var l=this.session,p=o.firstRow,y=Math.min(o.lastRow+o.gutterOffset,l.getLength()-1);this.oldLastRow=y,this.config=o,this.$lines.moveContainer(o),this.$updateCursorRow();for(var x=l.getNextFoldLine(p),E=x?x.start.row:1/0,$=null,_=-1,C=p;;){if(C>E&&(C=x.end.row+1,x=l.getNextFoldLine(C,x),E=x?x.start.row:1/0),C>y){for(;this.$lines.getLength()>_+1;)this.$lines.pop();break}$=this.$lines.get(++_),$?$.row=C:($=this.$lines.createCell(C,o,this.session,c),this.$lines.push($)),this.$renderCell($,o,x,C),C++}this._signal("afterRender"),this.$updateGutterWidth(o),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},h.prototype.$updateGutterWidth=function(o){var l=this.session,p=l.gutterRenderer||this.$renderer,y=l.$firstLineNumber,x=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||l.$useWrapMode)&&(x=l.getLength()+y-1);var E=p?p.getWidth(l,x,o):x.toString().length*o.characterWidth,$=this.$padding||this.$computePadding();E+=$.left+$.right,E!==this.gutterWidth&&!isNaN(E)&&(this.gutterWidth=E,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",E))},h.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var o=this.session.selection.getCursor();this.$cursorRow!==o.row&&(this.$cursorRow=o.row)}},h.prototype.updateLineHighlight=function(){if(this.$showCursorMarker&&this.$updateCursorMarker(),!!this.$highlightGutterLine){var o=this.session.selection.cursor.row;if(this.$cursorRow=o,!(this.$cursorCell&&this.$cursorCell.row==o)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var l=this.$lines.cells;this.$cursorCell=null;for(var p=0;p<l.length;p++){var y=l[p];if(y.row>=this.$cursorRow){if(y.row>this.$cursorRow){var x=this.session.getFoldLine(this.$cursorRow);if(p>0&&x&&x.start.row==l[p-1].row)y=l[p-1];else break}y.element.className="ace_gutter-active-line "+y.element.className,this.$cursorCell=y;break}}}}},h.prototype.$updateCursorMarker=function(){if(this.session){var o=this.session;this.$highlightElement||(this.$highlightElement=d.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var l=o.selection.cursor,p=this.config,y=this.$lines,x=p.firstRowScreen*p.lineHeight,E=Math.floor(x/y.canvasHeight),$=o.documentToScreenRow(l)*p.lineHeight,_=$-E*y.canvasHeight;d.setStyle(this.$highlightElement.style,"height",p.lineHeight+"px"),d.setStyle(this.$highlightElement.style,"top",_+"px")}},h.prototype.scrollLines=function(o){var l=this.config;if(this.config=o,this.$updateCursorRow(),this.$lines.pageChanged(l,o))return this.update(o);this.$lines.moveContainer(o);var p=Math.min(o.lastRow+o.gutterOffset,this.session.getLength()-1),y=this.oldLastRow;if(this.oldLastRow=p,!l||y<o.firstRow)return this.update(o);if(p<l.firstRow)return this.update(o);if(l.firstRow<o.firstRow)for(var x=this.session.getFoldedRowCount(l.firstRow,o.firstRow-1);x>0;x--)this.$lines.shift();if(y>p)for(var x=this.session.getFoldedRowCount(p+1,y);x>0;x--)this.$lines.pop();o.firstRow<l.firstRow&&this.$lines.unshift(this.$renderLines(o,o.firstRow,l.firstRow-1)),p>y&&this.$lines.push(this.$renderLines(o,y+1,p)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(o)},h.prototype.$renderLines=function(o,l,p){for(var y=[],x=l,E=this.session.getNextFoldLine(x),$=E?E.start.row:1/0;x>$&&(x=E.end.row+1,E=this.session.getNextFoldLine(x,E),$=E?E.start.row:1/0),!(x>p);){var _=this.$lines.createCell(x,o,this.session,c);this.$renderCell(_,o,E,x),y.push(_),x++}return y},h.prototype.$renderCell=function(o,l,p,y){var x=o.element,E=this.session,$=x.childNodes[0],_=x.childNodes[1],C=x.childNodes[2],L=x.childNodes[3],D=C.firstChild,I=E.$firstLineNumber,M=E.$breakpoints,W=E.$decorations,z=E.gutterRenderer||this.$renderer,O=this.$showFoldWidgets&&E.foldWidgets,T=p?p.start.row:Number.MAX_VALUE,A=l.lineHeight+"px",N=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",B=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",U=(z?z.getText(E,y):y+I).toString();if(this.$highlightGutterLine&&(y==this.$cursorRow||p&&y<this.$cursorRow&&y>=T&&this.$cursorRow<=p.end.row)&&(N+="ace_gutter-active-line ",this.$cursorCell!=o&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=o)),M[y]&&(N+=M[y]),W[y]&&(N+=W[y]),this.$annotations[y]&&y!==T&&(N+=this.$annotations[y].className),O){var G=O[y];G==null&&(G=O[y]=E.getFoldWidget(y))}if(G){var J="ace_fold-widget ace_"+G,Q=G=="start"&&y==T&&y<p.end.row;if(Q){J+=" ace_closed";for(var le="",re=!1,ce=y+1;ce<=p.end.row;ce++)if(this.$annotations[ce]){if(this.$annotations[ce].className===" ace_error"){re=!0,le=" ace_error_fold";break}this.$annotations[ce].className===" ace_security"?(re=!0,le=" ace_security_fold"):this.$annotations[ce].className===" ace_warning"&&le!==" ace_security_fold"&&(re=!0,le=" ace_warning_fold")}N+=le}else J+=" ace_open";_.className!=J&&(_.className=J),d.setStyle(_.style,"height",A),d.setStyle(_.style,"display","inline-block"),_.setAttribute("role","button"),_.setAttribute("tabindex","-1");var de=E.getFoldWidgetRange(y);de?_.setAttribute("aria-label",a("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[de.start.row+1,de.end.row+1])):p?_.setAttribute("aria-label",a("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[p.start.row+1,p.end.row+1])):_.setAttribute("aria-label",a("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[y+1])),Q?(_.setAttribute("aria-expanded","false"),_.setAttribute("title",a("gutter.code-folding.closed.title","Unfold code"))):(_.setAttribute("aria-expanded","true"),_.setAttribute("title",a("gutter.code-folding.open.title","Fold code")))}else _&&(d.setStyle(_.style,"display","none"),_.setAttribute("tabindex","0"),_.removeAttribute("role"),_.removeAttribute("aria-label"));var ie=this.session.$gutterCustomWidgets[y];if(ie?this.$addCustomWidget(y,ie,o):L&&this.$removeCustomWidget(y,o),re&&this.$showFoldedAnnotations){C.className="ace_gutter_annotation",D.className=B,D.className+=le,d.setStyle(D.style,"height",A),d.setStyle(C.style,"display","block"),d.setStyle(C.style,"height",A);var fe;switch(le){case" ace_error_fold":fe=a("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security_fold":fe=a("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning_fold":fe=a("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break}C.setAttribute("aria-label",fe),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else if(this.$annotations[y]){C.className="ace_gutter_annotation",D.className=B,this.$useSvgGutterIcons?D.className+=this.$annotations[y].className:x.classList.add(this.$annotations[y].className.replace(" ","")),d.setStyle(D.style,"height",A),d.setStyle(C.style,"display","block"),d.setStyle(C.style,"height",A);var fe;switch(this.$annotations[y].className){case" ace_error":fe=a("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security":fe=a("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning":fe=a("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break;case" ace_info":fe=a("gutter.annotation.aria-label.info","Info, read annotations row $0",[U]);break;case" ace_hint":fe=a("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[U]);break}C.setAttribute("aria-label",fe),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else d.setStyle(C.style,"display","none"),C.removeAttribute("aria-label"),C.removeAttribute("role"),C.setAttribute("tabindex","0");return U!==$.data&&($.data=U),x.className!=N&&(x.className=N),d.setStyle(o.element.style,"height",this.$lines.computeLineHeight(y,l,E)+"px"),d.setStyle(o.element.style,"top",this.$lines.computeLineTop(y,l,E)+"px"),o.text=U,C.style.display==="none"&&_.style.display==="none"&&!ie?o.element.setAttribute("aria-hidden",!0):o.element.setAttribute("aria-hidden",!1),o},h.prototype.setHighlightGutterLine=function(o){this.$highlightGutterLine=o,!o&&this.$highlightElement&&(this.$highlightElement.remove(),this.$highlightElement=null)},h.prototype.setShowLineNumbers=function(o){this.$renderer=!o&&{getWidth:function(){return 0},getText:function(){return""}}},h.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},h.prototype.setShowFoldWidgets=function(o){o?d.addCssClass(this.element,"ace_folding-enabled"):d.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=o,this.$padding=null},h.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},h.prototype.$hideFoldWidget=function(o,l){var p=l||this.$getGutterCell(o);if(p&&p.element){var y=p.element.childNodes[1];y&&d.setStyle(y.style,"display","none")}},h.prototype.$showFoldWidget=function(o,l){var p=l||this.$getGutterCell(o);if(p&&p.element){var y=p.element.childNodes[1];y&&this.session.foldWidgets&&this.session.foldWidgets[p.row]&&d.setStyle(y.style,"display","inline-block")}},h.prototype.$getGutterCell=function(o){var l=this.$lines.cells,p=0,y=l.length-1;if(!(o<l[0].row||o>l[y].row)){for(;p<=y;){var x=Math.floor((p+y)/2),E=l[x];if(E.row>o)y=x-1;else if(E.row<o)p=x+1;else return E}return E}},h.prototype.$addCustomWidget=function(o,l,p){var y=l.className,x=l.label,E=l.title,$=l.callbacks;this.session.$gutterCustomWidgets[o]={className:y,label:x,title:E,callbacks:$},this.$hideFoldWidget(o,p);var _=p||this.$getGutterCell(o);if(_&&_.element){var C=_.element.querySelector(".ace_custom-widget");C&&C.remove(),C=d.createElement("span"),C.className="ace_custom-widget ".concat(y),C.setAttribute("tabindex","-1"),C.setAttribute("role","button"),C.setAttribute("aria-label",x),C.setAttribute("title",E),d.setStyle(C.style,"display","inline-block"),d.setStyle(C.style,"height","inherit"),$&&$.onClick&&C.addEventListener("click",function(L){$.onClick(L,o),L.stopPropagation()}),_.element.appendChild(C)}},h.prototype.$removeCustomWidget=function(o,l){delete this.session.$gutterCustomWidgets[o],this.$showFoldWidget(o,l);var p=l||this.$getGutterCell(o);if(p&&p.element){var y=p.element.querySelector(".ace_custom-widget");y&&p.element.removeChild(y)}},h.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var o=d.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(o.borderLeftWidth)||0)+(parseInt(o.paddingLeft)||0)+1,this.$padding.right=(parseInt(o.borderRightWidth)||0)+(parseInt(o.paddingRight)||0),this.$padding},h.prototype.getRegion=function(o){var l=this.$padding||this.$computePadding(),p=this.element.getBoundingClientRect();if(o.x<l.left+p.left)return"markers";if(this.$showFoldWidgets&&o.x>p.right-l.right)return"foldWidgets"},h})();s.prototype.$fixedWidth=!1,s.prototype.$highlightGutterLine=!0,s.prototype.$renderer=void 0,s.prototype.$showLineNumbers=!0,s.prototype.$showFoldWidgets=!0,g.implement(s.prototype,u);function c(h){var o=document.createTextNode("");h.appendChild(o);var l=d.createElement("span");h.appendChild(l);var p=d.createElement("span");h.appendChild(p);var y=d.createElement("span");return p.appendChild(y),h}r.Gutter=s}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,r,m){var d=e("../range").Range,g=e("../lib/dom"),w=(function(){function f(a){this.element=g.createElement("div"),this.element.className="ace_layer ace_marker-layer",a.appendChild(this.element)}return f.prototype.setPadding=function(a){this.$padding=a},f.prototype.setSession=function(a){this.session=a},f.prototype.setMarkers=function(a){this.markers=a},f.prototype.elt=function(a,s){var c=this.i!=-1&&this.element.childNodes[this.i];c?this.i++:(c=document.createElement("div"),this.element.appendChild(c),this.i=-1),c.style.cssText=s,c.className=a},f.prototype.update=function(a){if(a){this.config=a,this.i=0;var s;for(var c in this.markers){var h=this.markers[c];if(!h.range){h.update(s,this,this.session,a);continue}var o=h.range.clipRows(a.firstRow,a.lastRow);if(!o.isEmpty())if(o=o.toScreenRange(this.session),h.renderer){var l=this.$getTop(o.start.row,a),p=this.$padding+o.start.column*a.characterWidth;h.renderer(s,o,p,l,a)}else h.type=="fullLine"?this.drawFullLineMarker(s,o,h.clazz,a):h.type=="screenLine"?this.drawScreenLineMarker(s,o,h.clazz,a):o.isMultiLine()?h.type=="text"?this.drawTextMarker(s,o,h.clazz,a):this.drawMultiLineMarker(s,o,h.clazz,a):this.drawSingleLineMarker(s,o,h.clazz+" ace_start ace_br15",a)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},f.prototype.$getTop=function(a,s){return(a-s.firstRowScreen)*s.lineHeight},f.prototype.drawTextMarker=function(a,s,c,h,o){for(var l=this.session,p=s.start.row,y=s.end.row,x=p,E=0,$=0,_=l.getScreenLastRowColumn(x),C=new d(x,s.start.column,x,$);x<=y;x++)C.start.row=C.end.row=x,C.start.column=x==p?s.start.column:l.getRowWrapIndent(x),C.end.column=_,E=$,$=_,_=x+1<y?l.getScreenLastRowColumn(x+1):x==y?0:s.end.column,this.drawSingleLineMarker(a,C,c+(x==p?" ace_start":"")+" ace_br"+u(x==p||x==p+1&&s.start.column,E<$,$>_,x==y),h,x==y?0:1,o)},f.prototype.drawMultiLineMarker=function(a,s,c,h,o){var l=this.$padding,p=h.lineHeight,y=this.$getTop(s.start.row,h),x=l+s.start.column*h.characterWidth;if(o=o||"",this.session.$bidiHandler.isBidiRow(s.start.row)){var E=s.clone();E.end.row=E.start.row,E.end.column=this.session.getLine(E.start.row).length,this.drawBidiSingleLineMarker(a,E,c+" ace_br1 ace_start",h,null,o)}else this.elt(c+" ace_br1 ace_start","height:"+p+"px;right:"+l+"px;top:"+y+"px;left:"+x+"px;"+(o||""));if(this.session.$bidiHandler.isBidiRow(s.end.row)){var E=s.clone();E.start.row=E.end.row,E.start.column=0,this.drawBidiSingleLineMarker(a,E,c+" ace_br12",h,null,o)}else{y=this.$getTop(s.end.row,h);var $=s.end.column*h.characterWidth;this.elt(c+" ace_br12","height:"+p+"px;width:"+$+"px;top:"+y+"px;left:"+l+"px;"+(o||""))}if(p=(s.end.row-s.start.row-1)*h.lineHeight,!(p<=0)){y=this.$getTop(s.start.row+1,h);var _=(s.start.column?1:0)|(s.end.column?0:8);this.elt(c+(_?" ace_br"+_:""),"height:"+p+"px;right:"+l+"px;top:"+y+"px;left:"+l+"px;"+(o||""))}},f.prototype.drawSingleLineMarker=function(a,s,c,h,o,l){if(this.session.$bidiHandler.isBidiRow(s.start.row))return this.drawBidiSingleLineMarker(a,s,c,h,o,l);var p=h.lineHeight,y=(s.end.column+(o||0)-s.start.column)*h.characterWidth,x=this.$getTop(s.start.row,h),E=this.$padding+s.start.column*h.characterWidth;this.elt(c,"height:"+p+"px;width:"+y+"px;top:"+x+"px;left:"+E+"px;"+(l||""))},f.prototype.drawBidiSingleLineMarker=function(a,s,c,h,o,l){var p=h.lineHeight,y=this.$getTop(s.start.row,h),x=this.$padding,E=this.session.$bidiHandler.getSelections(s.start.column,s.end.column);E.forEach(function($){this.elt(c,"height:"+p+"px;width:"+($.width+(o||0))+"px;top:"+y+"px;left:"+(x+$.left)+"px;"+(l||""))},this)},f.prototype.drawFullLineMarker=function(a,s,c,h,o){var l=this.$getTop(s.start.row,h),p=h.lineHeight;s.start.row!=s.end.row&&(p+=this.$getTop(s.end.row,h)-l),this.elt(c,"height:"+p+"px;top:"+l+"px;left:0;right:0;"+(o||""))},f.prototype.drawScreenLineMarker=function(a,s,c,h,o){var l=this.$getTop(s.start.row,h),p=h.lineHeight;this.elt(c,"height:"+p+"px;top:"+l+"px;left:0;right:0;"+(o||""))},f})();w.prototype.$padding=0;function u(f,a,s,c){return(f?1:0)|(a?2:0)|(s?4:0)|(c?8:0)}r.Marker=w}),ace.define("ace/layer/text_util",["require","exports","module"],function(e,r,m){var d=new Set(["text","rparen","lparen"]);r.isTextToken=function(g){return d.has(g)}}),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(e,r,m){var d=e("../lib/oop"),g=e("../lib/dom"),w=e("../lib/lang"),u=e("./lines").Lines,f=e("../lib/event_emitter").EventEmitter,a=e("../config").nls,s=e("./text_util").isTextToken,c=(function(){function h(o){this.dom=g,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",o.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new u(this.element)}return h.prototype.$updateEolChar=function(){var o=this.session.doc,l=o.getNewLineCharacter()==`
219
+ `&&o.getNewLineMode()!="windows",p=l?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=p)return this.EOL_CHAR=p,!0},h.prototype.setPadding=function(o){this.$padding=o,this.element.style.margin="0 "+o+"px"},h.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},h.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},h.prototype.$setFontMetrics=function(o){this.$fontMetrics=o,this.$fontMetrics.on("changeCharacterSize",(function(l){this._signal("changeCharacterSize",l)}).bind(this)),this.$pollSizeChanges()},h.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},h.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},h.prototype.setSession=function(o){this.session=o,o&&this.$computeTabString()},h.prototype.setShowInvisibles=function(o){return this.showInvisibles==o?!1:(this.showInvisibles=o,typeof o=="string"?(this.showSpaces=/tab/i.test(o),this.showTabs=/space/i.test(o),this.showEOL=/eol/i.test(o)):this.showSpaces=this.showTabs=this.showEOL=o,this.$computeTabString(),!0)},h.prototype.setDisplayIndentGuides=function(o){return this.displayIndentGuides==o?!1:(this.displayIndentGuides=o,this.$computeTabString(),!0)},h.prototype.setHighlightIndentGuides=function(o){return this.$highlightIndentGuides===o?!1:(this.$highlightIndentGuides=o,o)},h.prototype.$computeTabString=function(){var o=this.session.getTabSize();this.tabSize=o;for(var l=this.$tabStrings=[0],p=1;p<o+1;p++)if(this.showTabs){var y=this.dom.createElement("span");y.className="ace_invisible ace_invisible_tab",y.textContent=w.stringRepeat(this.TAB_CHAR,p),l.push(y)}else l.push(this.dom.createTextNode(w.stringRepeat(" ",p),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var x="ace_indent-guide",E=this.showSpaces?" ace_invisible ace_invisible_space":"",$=this.showSpaces?w.stringRepeat(this.SPACE_CHAR,this.tabSize):w.stringRepeat(" ",this.tabSize),_=this.showTabs?" ace_invisible ace_invisible_tab":"",C=this.showTabs?w.stringRepeat(this.TAB_CHAR,this.tabSize):$,y=this.dom.createElement("span");y.className=x+E,y.textContent=$,this.$tabStrings[" "]=y;var y=this.dom.createElement("span");y.className=x+_,y.textContent=C,this.$tabStrings[" "]=y}},h.prototype.updateLines=function(o,l,p){if(this.config.lastRow!=o.lastRow||this.config.firstRow!=o.firstRow)return this.update(o);this.config=o;for(var y=Math.max(l,o.firstRow),x=Math.min(p,o.lastRow),E=this.element.childNodes,$=0,_=o.firstRow;_<y;_++){var C=this.session.getFoldLine(_);if(C)if(C.containsRow(y)){y=C.start.row;break}else _=C.end.row;$++}for(var L=!1,_=y,C=this.session.getNextFoldLine(_),D=C?C.start.row:1/0;_>D&&(_=C.end.row+1,C=this.session.getNextFoldLine(_,C),D=C?C.start.row:1/0),!(_>x);){var I=E[$++];if(I){this.dom.removeChildren(I),this.$renderLine(I,_,_==D?C:!1),L&&(I.style.top=this.$lines.computeLineTop(_,o,this.session)+"px");var M=o.lineHeight*this.session.getRowLength(_)+"px";I.style.height!=M&&(L=!0,I.style.height=M)}_++}if(L)for(;$<this.$lines.cells.length;){var W=this.$lines.cells[$++];W.element.style.top=this.$lines.computeLineTop(W.row,o,this.session)+"px"}},h.prototype.scrollLines=function(o){var l=this.config;if(this.config=o,this.$lines.pageChanged(l,o))return this.update(o);this.$lines.moveContainer(o);var p=o.lastRow,y=l?l.lastRow:-1;if(!l||y<o.firstRow)return this.update(o);if(p<l.firstRow)return this.update(o);if(!l||l.lastRow<o.firstRow)return this.update(o);if(o.lastRow<l.firstRow)return this.update(o);if(l.firstRow<o.firstRow)for(var x=this.session.getFoldedRowCount(l.firstRow,o.firstRow-1);x>0;x--)this.$lines.shift();if(l.lastRow>o.lastRow)for(var x=this.session.getFoldedRowCount(o.lastRow+1,l.lastRow);x>0;x--)this.$lines.pop();o.firstRow<l.firstRow&&this.$lines.unshift(this.$renderLinesFragment(o,o.firstRow,l.firstRow-1)),o.lastRow>l.lastRow&&this.$lines.push(this.$renderLinesFragment(o,l.lastRow+1,o.lastRow)),this.$highlightIndentGuide()},h.prototype.$renderLinesFragment=function(o,l,p){for(var y=[],x=l,E=this.session.getNextFoldLine(x),$=E?E.start.row:1/0;x>$&&(x=E.end.row+1,E=this.session.getNextFoldLine(x,E),$=E?E.start.row:1/0),!(x>p);){var _=this.$lines.createCell(x,o,this.session),C=_.element;this.dom.removeChildren(C),g.setStyle(C.style,"height",this.$lines.computeLineHeight(x,o,this.session)+"px"),g.setStyle(C.style,"top",this.$lines.computeLineTop(x,o,this.session)+"px"),this.$renderLine(C,x,x==$?E:!1),this.$useLineGroups()?C.className="ace_line_group":C.className="ace_line",y.push(_),x++}return y},h.prototype.update=function(o){this.$lines.moveContainer(o),this.config=o;for(var l=o.firstRow,p=o.lastRow,y=this.$lines;y.getLength();)y.pop();y.push(this.$renderLinesFragment(o,l,p))},h.prototype.$renderToken=function(o,l,p,y){for(var x=this,E=/(\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,$=this.dom.createFragment(this.element),_,C=0;_=E.exec(y);){var L=_[1],D=_[2],I=_[3],M=_[4],W=_[5];if(!(!x.showSpaces&&D)){var z=C!=_.index?y.slice(C,_.index):"";if(C=_.index+_[0].length,z&&$.appendChild(this.dom.createTextNode(z,this.element)),L){var O=x.session.getScreenTabSize(l+_.index),T=x.$tabStrings[O].cloneNode(!0);T.charCount=1,$.appendChild(T),l+=O-1}else if(D)if(x.showSpaces){var A=this.dom.createElement("span");A.className="ace_invisible ace_invisible_space",A.textContent=w.stringRepeat(x.SPACE_CHAR,D.length),$.appendChild(A)}else $.appendChild(this.dom.createTextNode(D,this.element));else if(I){var A=this.dom.createElement("span");A.className="ace_invisible ace_invisible_space ace_invalid",A.textContent=w.stringRepeat(x.SPACE_CHAR,I.length),$.appendChild(A)}else if(M){l+=1;var A=this.dom.createElement("span");A.style.width=x.config.characterWidth*2+"px",A.className=x.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",A.textContent=x.showSpaces?x.SPACE_CHAR:M,$.appendChild(A)}else if(W){l+=1;var A=this.dom.createElement("span");A.style.width=x.config.characterWidth*2+"px",A.className="ace_cjk",A.textContent=W,$.appendChild(A)}}}if($.appendChild(this.dom.createTextNode(C?y.slice(C):y,this.element)),s(p.type))o.appendChild($);else{var N="ace_"+p.type.replace(/\./g," ace_"),A=this.dom.createElement("span");p.type=="fold"&&(A.style.width=p.value.length*this.config.characterWidth+"px",A.setAttribute("title",a("inline-fold.closed.title","Unfold code"))),A.className=N,A.appendChild($),o.appendChild(A)}return l+y.length},h.prototype.renderIndentGuide=function(o,l,p){var y=l.search(this.$indentGuideRe);if(y<=0||y>=p)return l;if(l[0]==" "){y-=y%this.tabSize;for(var x=y/this.tabSize,E=0;E<x;E++)o.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),l.substr(y)}else if(l[0]==" "){for(var E=0;E<y;E++){var $=this.$tabStrings[" "].cloneNode(!0);$.charCount=1,o.appendChild($)}return this.$highlightIndentGuide(),l.substr(y)}return this.$highlightIndentGuide(),l},h.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var o=this.session.doc.$lines;if(o){var l=this.session.selection.getCursor(),p=/^\s*/.exec(this.session.doc.getLine(l.row))[0].length,y=Math.floor(p/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:y,start:l.row};var x=this.session.$bracketHighlight;if(x){for(var E=this.session.$bracketHighlight.ranges,$=0;$<E.length;$++)if(l.row!==E[$].start.row){this.$highlightIndentGuideMarker.end=E[$].start.row+1,l.row>E[$].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&o[l.row]!==""&&l.column===o[l.row].length){this.$highlightIndentGuideMarker.dir=1;for(var $=l.row+1;$<o.length;$++){var _=o[$],C=/^\s*/.exec(_)[0].length;if(_!==""&&(this.$highlightIndentGuideMarker.end=$,C<=p))break}}this.$renderHighlightIndentGuide()}}},h.prototype.$clearActiveIndentGuide=function(){for(var o=this.element.querySelectorAll(".ace_indent-guide-active"),l=0;l<o.length;l++)o[l].classList.remove("ace_indent-guide-active")},h.prototype.$setIndentGuideActive=function(o,l){var p=this.session.doc.getLine(o.row);if(p!==""){var y=o.element;if(o.element.classList&&o.element.classList.contains("ace_line_group"))if(o.element.childNodes.length>0)y=o.element.childNodes[0];else return;var x=y.childNodes;if(x){var E=x[l-1];E&&E.classList&&E.classList.contains("ace_indent-guide")&&E.classList.add("ace_indent-guide-active")}}},h.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var o=this.$lines.cells;this.$clearActiveIndentGuide();var l=this.$highlightIndentGuideMarker.indentLevel;if(l!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var p=0;p<o.length;p++){var y=o[p];if(this.$highlightIndentGuideMarker.end&&y.row>=this.$highlightIndentGuideMarker.start+1){if(y.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(y,l)}}else for(var p=o.length-1;p>=0;p--){var y=o[p];if(this.$highlightIndentGuideMarker.end&&y.row<this.$highlightIndentGuideMarker.start){if(y.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(y,l)}}}},h.prototype.$createLineElement=function(o){var l=this.dom.createElement("div");return l.className="ace_line",l.style.height=this.config.lineHeight+"px",l},h.prototype.$renderWrappedLine=function(o,l,p){var y=0,x=0,E=p[0],$=0,_=this.$createLineElement();o.appendChild(_);for(var C=0;C<l.length;C++){var L=l[C],D=L.value;if(C==0&&this.displayIndentGuides){if(y=D.length,D=this.renderIndentGuide(_,D,E),!D)continue;y-=D.length}if(y+D.length<E)$=this.$renderToken(_,$,L,D),y+=D.length;else{for(;y+D.length>=E;){$=this.$renderToken(_,$,L,D.substring(0,E-y)),D=D.substring(E-y),y=E,_=this.$createLineElement(),o.appendChild(_);var I=this.dom.createTextNode(w.stringRepeat(" ",p.indent),this.element);I.charCount=0,_.appendChild(I),x++,$=0,E=p[x]||Number.MAX_VALUE}D.length!=0&&(y+=D.length,$=this.$renderToken(_,$,L,D))}}p[p.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(_,$,null,"",!0)},h.prototype.$renderSimpleLine=function(o,l){for(var p=0,y=0;y<l.length;y++){var x=l[y],E=x.value;if(!(y==0&&this.displayIndentGuides&&(E=this.renderIndentGuide(o,E),!E))){if(p+E.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(o,p,x,E);p=this.$renderToken(o,p,x,E)}}},h.prototype.$renderOverflowMessage=function(o,l,p,y,x){p&&this.$renderToken(o,l,p,y.slice(0,this.MAX_LINE_LENGTH-l));var E=this.dom.createElement("span");E.className="ace_inline_button ace_keyword ace_toggle_wrap",E.textContent=x?"<hide>":"<click to see more...>",o.appendChild(E)},h.prototype.$renderLine=function(o,l,p){if(!p&&p!=!1&&(p=this.session.getFoldLine(l)),p)var y=this.$getFoldLineTokens(l,p);else var y=this.session.getTokens(l);var x=o;if(y.length){var E=this.session.getRowSplitData(l);if(E&&E.length){this.$renderWrappedLine(o,y,E);var x=o.lastChild}else{var x=o;this.$useLineGroups()&&(x=this.$createLineElement(),o.appendChild(x)),this.$renderSimpleLine(x,y)}}else this.$useLineGroups()&&(x=this.$createLineElement(),o.appendChild(x));if(this.showEOL&&x){p&&(l=p.end.row);var $=this.dom.createElement("span");$.className="ace_invisible ace_invisible_eol",$.textContent=l==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,x.appendChild($)}},h.prototype.$getFoldLineTokens=function(o,l){var p=this.session,y=[];function x($,_,C){for(var L=0,D=0;D+$[L].value.length<_;)if(D+=$[L].value.length,L++,L==$.length)return;if(D!=_){var I=$[L].value.substring(_-D);I.length>C-_&&(I=I.substring(0,C-_)),y.push({type:$[L].type,value:I}),D=_+I.length,L+=1}for(;D<C&&L<$.length;){var I=$[L].value;I.length+D>C?y.push({type:$[L].type,value:I.substring(0,C-D)}):y.push($[L]),D+=I.length,L+=1}}var E=p.getTokens(o);return l.walk(function($,_,C,L,D){$!=null?y.push({type:"fold",value:$}):(D&&(E=p.getTokens(_)),E.length&&x(E,L,C))},l.end.row,this.session.getLine(l.end.row).length),y},h.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},h})();c.prototype.EOF_CHAR="¶",c.prototype.EOL_CHAR_LF="¬",c.prototype.EOL_CHAR_CRLF="¤",c.prototype.EOL_CHAR=c.prototype.EOL_CHAR_LF,c.prototype.TAB_CHAR="—",c.prototype.SPACE_CHAR="·",c.prototype.$padding=0,c.prototype.MAX_LINE_LENGTH=1e4,c.prototype.showInvisibles=!1,c.prototype.showSpaces=!1,c.prototype.showTabs=!1,c.prototype.showEOL=!1,c.prototype.displayIndentGuides=!0,c.prototype.$highlightIndentGuides=!0,c.prototype.$tabStrings=[],c.prototype.destroy={},c.prototype.onChangeTabSize=c.prototype.$computeTabString,d.implement(c.prototype,f),r.Text=c}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,r,m){var d=e("../lib/dom"),g=(function(){function w(u){this.element=d.createElement("div"),this.element.className="ace_layer ace_cursor-layer",u.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),d.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return w.prototype.$updateOpacity=function(u){for(var f=this.cursors,a=f.length;a--;)d.setStyle(f[a].style,"opacity",u?"":"0")},w.prototype.$startCssAnimation=function(){for(var u=this.cursors,f=u.length;f--;)u[f].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&d.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},w.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,d.removeCssClass(this.element,"ace_animate-blinking")},w.prototype.setPadding=function(u){this.$padding=u},w.prototype.setSession=function(u){this.session=u},w.prototype.setBlinking=function(u){u!=this.isBlinking&&(this.isBlinking=u,this.restartTimer())},w.prototype.setBlinkInterval=function(u){u!=this.blinkInterval&&(this.blinkInterval=u,this.restartTimer())},w.prototype.setSmoothBlinking=function(u){u!=this.smoothBlinking&&(this.smoothBlinking=u,d.setCssClass(this.element,"ace_smooth-blinking",u),this.$updateCursors(!0),this.restartTimer())},w.prototype.addCursor=function(){var u=d.createElement("div");return u.className="ace_cursor",this.element.appendChild(u),this.cursors.push(u),u},w.prototype.removeCursor=function(){if(this.cursors.length>1){var u=this.cursors.pop();return u.parentNode.removeChild(u),u}},w.prototype.hideCursor=function(){this.isVisible=!1,d.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},w.prototype.showCursor=function(){this.isVisible=!0,d.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},w.prototype.restartTimer=function(){var u=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,d.removeCssClass(this.element,"ace_smooth-blinking")),u(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&d.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),d.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var f=(function(){this.timeoutId=setTimeout(function(){u(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){u(!0),f()},this.blinkInterval),f()}},w.prototype.getPixelPosition=function(u,f){if(!this.config||!this.session)return{left:0,top:0};u||(u=this.session.selection.getCursor());var a=this.session.documentToScreenPosition(u),s=this.$padding+(this.session.$bidiHandler.isBidiRow(a.row,u.row)?this.session.$bidiHandler.getPosLeft(a.column):a.column*this.config.characterWidth),c=(a.row-(f?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:s,top:c}},w.prototype.isCursorInView=function(u,f){return u.top>=0&&u.top<f.maxHeight},w.prototype.update=function(u){this.config=u;var f=this.session.$selectionMarkers,a=0,s=0;(f===void 0||f.length===0)&&(f=[{cursor:null}]);for(var a=0,c=f.length;a<c;a++){var h=this.getPixelPosition(f[a].cursor,!0);if(!((h.top>u.height+u.offset||h.top<0)&&a>1)){var o=this.cursors[s++]||this.addCursor(),l=o.style;this.drawCursor?this.drawCursor(o,h,u,f[a],this.session):this.isCursorInView(h,u)?(d.setStyle(l,"display","block"),d.translate(o,h.left,h.top),d.setStyle(l,"width",Math.round(u.characterWidth)+"px"),d.setStyle(l,"height",u.lineHeight+"px")):d.setStyle(l,"display","none")}}for(;this.cursors.length>s;)this.removeCursor();var p=this.session.getOverwrite();this.$setOverwrite(p),this.$pixelPos=h,this.restartTimer()},w.prototype.$setOverwrite=function(u){u!=this.overwrite&&(this.overwrite=u,u?d.addCssClass(this.element,"ace_overwrite-cursors"):d.removeCssClass(this.element,"ace_overwrite-cursors"))},w.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},w})();g.prototype.$padding=0,g.prototype.drawCursor=null,r.Cursor=g}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,r,m){var d=this&&this.__extends||(function(){var o=function(l,p){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,x){y.__proto__=x}||function(y,x){for(var E in x)Object.prototype.hasOwnProperty.call(x,E)&&(y[E]=x[E])},o(l,p)};return function(l,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");o(l,p);function y(){this.constructor=l}l.prototype=p===null?Object.create(p):(y.prototype=p.prototype,new y)}})(),g=e("./lib/oop"),w=e("./lib/dom"),u=e("./lib/event"),f=e("./lib/event_emitter").EventEmitter,a=32768,s=(function(){function o(l,p){this.element=w.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+p,this.element.tabIndex=-1,this.inner=w.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),l.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,u.addListener(this.element,"scroll",this.onScroll.bind(this)),u.addListener(this.element,"mousedown",u.preventDefault)}return o.prototype.setVisible=function(l){this.element.style.display=l?"":"none",this.isVisible=l,this.coeff=1},o})();g.implement(s.prototype,f);var c=(function(o){d(l,o);function l(p,y){var x=o.call(this,p,"-v")||this;return x.scrollTop=0,x.scrollHeight=0,y.$scrollbarWidth=x.width=w.scrollbarWidth(p.ownerDocument),x.inner.style.width=x.element.style.width=(x.width||15)+5+"px",x.$minWidth=0,x}return l.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var p=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-p)/(this.coeff-p)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},l.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},l.prototype.setHeight=function(p){this.element.style.height=p+"px"},l.prototype.setScrollHeight=function(p){this.scrollHeight=p,p>a?(this.coeff=a/p,p=a):this.coeff!=1&&(this.coeff=1),this.inner.style.height=p+"px"},l.prototype.setScrollTop=function(p){this.scrollTop!=p&&(this.skipEvent=!0,this.scrollTop=p,this.element.scrollTop=p*this.coeff)},l})(s);c.prototype.setInnerHeight=c.prototype.setScrollHeight;var h=(function(o){d(l,o);function l(p,y){var x=o.call(this,p,"-h")||this;return x.scrollLeft=0,x.height=y.$scrollbarWidth,x.inner.style.height=x.element.style.height=(x.height||15)+5+"px",x}return l.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},l.prototype.getHeight=function(){return this.isVisible?this.height:0},l.prototype.setWidth=function(p){this.element.style.width=p+"px"},l.prototype.setInnerWidth=function(p){this.inner.style.width=p+"px"},l.prototype.setScrollWidth=function(p){this.inner.style.width=p+"px"},l.prototype.setScrollLeft=function(p){this.scrollLeft!=p&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=p)},l})(s);r.ScrollBar=c,r.ScrollBarV=c,r.ScrollBarH=h,r.VScrollBar=c,r.HScrollBar=h}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,r,m){var d=this&&this.__extends||(function(){var h=function(o,l){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,y){p.__proto__=y}||function(p,y){for(var x in y)Object.prototype.hasOwnProperty.call(y,x)&&(p[x]=y[x])},h(o,l)};return function(o,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");h(o,l);function p(){this.constructor=o}o.prototype=l===null?Object.create(l):(p.prototype=l.prototype,new p)}})(),g=e("./lib/oop"),w=e("./lib/dom"),u=e("./lib/event"),f=e("./lib/event_emitter").EventEmitter;w.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
220
+ position: absolute;
221
+ background: rgba(128, 128, 128, 0.6);
222
+ -moz-box-sizing: border-box;
223
+ box-sizing: border-box;
224
+ border: 1px solid #bbb;
225
+ border-radius: 2px;
226
+ z-index: 8;
227
+ }
228
+ .ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
229
+ position: absolute;
230
+ z-index: 6;
231
+ background: none;
232
+ overflow: hidden!important;
233
+ }
234
+ .ace_editor>.ace_sb-v {
235
+ z-index: 6;
236
+ right: 0;
237
+ top: 0;
238
+ width: 12px;
239
+ }
240
+ .ace_editor>.ace_sb-v div {
241
+ z-index: 8;
242
+ right: 0;
243
+ width: 100%;
244
+ }
245
+ .ace_editor>.ace_sb-h {
246
+ bottom: 0;
247
+ left: 0;
248
+ height: 12px;
249
+ }
250
+ .ace_editor>.ace_sb-h div {
251
+ bottom: 0;
252
+ height: 100%;
253
+ }
254
+ .ace_editor>.ace_sb_grabbed {
255
+ z-index: 8;
256
+ background: #000;
257
+ }`,"ace_scrollbar.css",!1);var a=(function(){function h(o,l){this.element=w.createElement("div"),this.element.className="ace_sb"+l,this.inner=w.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,o.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,u.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return h.prototype.setVisible=function(o){this.element.style.display=o?"":"none",this.isVisible=o,this.coeff=1},h})();g.implement(a.prototype,f);var s=(function(h){d(o,h);function o(l,p){var y=h.call(this,l,"-v")||this;return y.scrollTop=0,y.scrollHeight=0,y.parent=l,y.width=y.VScrollWidth,y.renderer=p,y.inner.style.width=y.element.style.width=(y.width||15)+"px",y.$minWidth=0,y}return o.prototype.onMouseDown=function(l,p){if(l==="mousedown"&&!(u.getButton(p)!==0||p.detail===2)){if(p.target===this.inner){var y=this,x=p.clientY,E=function(M){x=M.clientY},$=function(){clearInterval(D)},_=p.clientY,C=this.thumbTop,L=function(){if(x!==void 0){var M=y.scrollTopFromThumbTop(C+x-_);M!==y.scrollTop&&y._emit("scroll",{data:M})}};u.capture(this.inner,E,$);var D=setInterval(L,20);return u.preventDefault(p)}var I=p.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(I)}),u.preventDefault(p)}},o.prototype.getHeight=function(){return this.height},o.prototype.scrollTopFromThumbTop=function(l){var p=l*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return p=p>>0,p<0?p=0:p>this.pageHeight-this.viewHeight&&(p=this.pageHeight-this.viewHeight),p},o.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},o.prototype.setHeight=function(l){this.height=Math.max(0,l),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},o.prototype.setScrollHeight=function(l,p){this.pageHeight===l&&!p||(this.pageHeight=l,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})))},o.prototype.setScrollTop=function(l){this.scrollTop=l,l<0&&(l=0),this.thumbTop=l*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},o})(a);s.prototype.setInnerHeight=s.prototype.setScrollHeight;var c=(function(h){d(o,h);function o(l,p){var y=h.call(this,l,"-h")||this;return y.scrollLeft=0,y.scrollWidth=0,y.height=y.HScrollHeight,y.inner.style.height=y.element.style.height=(y.height||12)+"px",y.renderer=p,y}return o.prototype.onMouseDown=function(l,p){if(l==="mousedown"&&!(u.getButton(p)!==0||p.detail===2)){if(p.target===this.inner){var y=this,x=p.clientX,E=function(M){x=M.clientX},$=function(){clearInterval(D)},_=p.clientX,C=this.thumbLeft,L=function(){if(x!==void 0){var M=y.scrollLeftFromThumbLeft(C+x-_);M!==y.scrollLeft&&y._emit("scroll",{data:M})}};u.capture(this.inner,E,$);var D=setInterval(L,20);return u.preventDefault(p)}var I=p.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(I)}),u.preventDefault(p)}},o.prototype.getHeight=function(){return this.isVisible?this.height:0},o.prototype.scrollLeftFromThumbLeft=function(l){var p=l*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return p=p>>0,p<0?p=0:p>this.pageWidth-this.viewWidth&&(p=this.pageWidth-this.viewWidth),p},o.prototype.setWidth=function(l){this.width=Math.max(0,l),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},o.prototype.setScrollWidth=function(l,p){this.pageWidth===l&&!p||(this.pageWidth=l,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})))},o.prototype.setScrollLeft=function(l){this.scrollLeft=l,l<0&&(l=0),this.thumbLeft=l*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},o})(a);c.prototype.setInnerWidth=c.prototype.setScrollWidth,r.ScrollBar=s,r.ScrollBarV=s,r.ScrollBarH=c,r.VScrollBar=s,r.HScrollBar=c}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,r,m){var d=e("./lib/event"),g=(function(){function w(u,f){this.onRender=u,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=f||window;var a=this;this._flush=function(s){a.pending=!1;var c=a.changes;if(c&&(d.blockIdle(100),a.changes=0,a.onRender(c)),a.changes){if(a.$recursionLimit--<0)return;a.schedule()}else a.$recursionLimit=2}}return w.prototype.schedule=function(u){this.changes=this.changes|u,this.changes&&!this.pending&&(d.nextFrame(this._flush),this.pending=!0)},w.prototype.clear=function(u){var f=this.changes;return this.changes=0,f},w})();r.RenderLoop=g}),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(e,r,m){var d=e("../lib/oop"),g=e("../lib/dom"),w=e("../lib/lang"),u=e("../lib/event"),f=e("../lib/useragent"),a=e("../lib/event_emitter").EventEmitter,s=512,c=typeof ResizeObserver=="function",h=200,o=(function(){function l(p){this.el=g.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=g.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=g.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),p.appendChild(this.el),this.$measureNode.textContent=w.stringRepeat("X",s),this.$characterSize={width:0,height:0},c?this.$addObserver():this.checkForSizeChanges()}return l.prototype.$setMeasureNodeStyles=function(p,y){p.width=p.height="auto",p.left=p.top="0px",p.visibility="hidden",p.position="absolute",p.whiteSpace="pre",f.isIE<8?p["font-family"]="inherit":p.font="inherit",p.overflow=y?"hidden":"visible"},l.prototype.checkForSizeChanges=function(p){if(p===void 0&&(p=this.$measureSizes()),p&&(this.$characterSize.width!==p.width||this.$characterSize.height!==p.height)){this.$measureNode.style.fontWeight="bold";var y=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=p,this.charSizes=Object.create(null),this.allowBoldFonts=y&&y.width===p.width&&y.height===p.height,this._emit("changeCharacterSize",{data:p})}},l.prototype.$addObserver=function(){var p=this;this.$observer=new window.ResizeObserver(function(y){p.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},l.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var p=this;return this.$pollSizeChangesTimer=u.onIdle(function y(){p.checkForSizeChanges(),u.onIdle(y,500)},500)},l.prototype.setPolling=function(p){p?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},l.prototype.$measureSizes=function(p){var y={height:(p||this.$measureNode).clientHeight,width:(p||this.$measureNode).clientWidth/s};return y.width===0||y.height===0?null:y},l.prototype.$measureCharWidth=function(p){this.$main.textContent=w.stringRepeat(p,s);var y=this.$main.getBoundingClientRect();return y.width/s},l.prototype.getCharacterWidth=function(p){var y=this.charSizes[p];return y===void 0&&(y=this.charSizes[p]=this.$measureCharWidth(p)/this.$characterSize.width),y},l.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},l.prototype.$getZoom=function(p){return!p||!p.parentElement?1:(Number(window.getComputedStyle(p).zoom)||1)*this.$getZoom(p.parentElement)},l.prototype.$initTransformMeasureNodes=function(){var p=function(y,x){return["div",{style:"position: absolute;top:"+y+"px;left:"+x+"px;"}]};this.els=g.buildDom([p(0,0),p(h,0),p(0,h),p(h,h)],this.el)},l.prototype.transformCoordinates=function(p,y){if(p){var x=this.$getZoom(this.el);p=C(1/x,p)}function E(J,Q,le){var re=J[1]*Q[0]-J[0]*Q[1];return[(-Q[1]*le[0]+Q[0]*le[1])/re,(+J[1]*le[0]-J[0]*le[1])/re]}function $(J,Q){return[J[0]-Q[0],J[1]-Q[1]]}function _(J,Q){return[J[0]+Q[0],J[1]+Q[1]]}function C(J,Q){return[J*Q[0],J*Q[1]]}this.els||this.$initTransformMeasureNodes();function L(J){var Q=J.getBoundingClientRect();return[Q.left,Q.top]}var D=L(this.els[0]),I=L(this.els[1]),M=L(this.els[2]),W=L(this.els[3]),z=E($(W,I),$(W,M),$(_(I,M),_(W,D))),O=C(1+z[0],$(I,D)),T=C(1+z[1],$(M,D));if(y){var A=y,N=z[0]*A[0]/h+z[1]*A[1]/h+1,B=_(C(A[0],O),C(A[1],T));return _(C(1/N/h,B),D)}var U=$(p,D),G=E($(O,C(z[0],U)),$(T,C(z[1],U)),U);return C(h,G)},l})();o.prototype.$characterSize={width:0,height:0},d.implement(o.prototype,a),r.FontMetrics=o}),ace.define("ace/css/editor-css",["require","exports","module"],function(e,r,m){m.exports=`
258
+ .ace_br1 {border-top-left-radius : 3px;}
259
+ .ace_br2 {border-top-right-radius : 3px;}
260
+ .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
261
+ .ace_br4 {border-bottom-right-radius: 3px;}
262
+ .ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
263
+ .ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
264
+ .ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
265
+ .ace_br8 {border-bottom-left-radius : 3px;}
266
+ .ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
267
+ .ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
268
+ .ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
269
+ .ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
270
+ .ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
271
+ .ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
272
+ .ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
273
+
274
+
275
+ .ace_editor {
276
+ position: relative;
277
+ overflow: hidden;
278
+ padding: 0;
279
+ font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
280
+ direction: ltr;
281
+ text-align: left;
282
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
283
+ forced-color-adjust: none;
284
+ }
285
+
286
+ .ace_scroller {
287
+ position: absolute;
288
+ overflow: hidden;
289
+ top: 0;
290
+ bottom: 0;
291
+ background-color: inherit;
292
+ -ms-user-select: none;
293
+ -moz-user-select: none;
294
+ -webkit-user-select: none;
295
+ user-select: none;
296
+ cursor: text;
297
+ }
298
+
299
+ .ace_content {
300
+ position: absolute;
301
+ box-sizing: border-box;
302
+ min-width: 100%;
303
+ contain: style size layout;
304
+ font-variant-ligatures: no-common-ligatures;
305
+ }
306
+ .ace_invisible {
307
+ font-variant-ligatures: none;
308
+ }
309
+
310
+ .ace_keyboard-focus:focus {
311
+ box-shadow: inset 0 0 0 2px #5E9ED6;
312
+ outline: none;
313
+ }
314
+
315
+ .ace_dragging .ace_scroller:before{
316
+ position: absolute;
317
+ top: 0;
318
+ left: 0;
319
+ right: 0;
320
+ bottom: 0;
321
+ content: '';
322
+ background: rgba(250, 250, 250, 0.01);
323
+ z-index: 1000;
324
+ }
325
+ .ace_dragging.ace_dark .ace_scroller:before{
326
+ background: rgba(0, 0, 0, 0.01);
327
+ }
328
+
329
+ .ace_gutter {
330
+ position: absolute;
331
+ overflow : hidden;
332
+ width: auto;
333
+ top: 0;
334
+ bottom: 0;
335
+ left: 0;
336
+ cursor: default;
337
+ z-index: 4;
338
+ -ms-user-select: none;
339
+ -moz-user-select: none;
340
+ -webkit-user-select: none;
341
+ user-select: none;
342
+ contain: style size layout;
343
+ }
344
+
345
+ .ace_gutter-active-line {
346
+ position: absolute;
347
+ left: 0;
348
+ right: 0;
349
+ }
350
+
351
+ .ace_scroller.ace_scroll-left:after {
352
+ content: "";
353
+ position: absolute;
354
+ top: 0;
355
+ right: 0;
356
+ bottom: 0;
357
+ left: 0;
358
+ box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
359
+ pointer-events: none;
360
+ }
361
+
362
+ .ace_gutter-cell, .ace_gutter-cell_svg-icons {
363
+ position: absolute;
364
+ top: 0;
365
+ left: 0;
366
+ right: 0;
367
+ padding-left: 19px;
368
+ padding-right: 6px;
369
+ background-repeat: no-repeat;
370
+ }
371
+
372
+ .ace_gutter-cell_svg-icons .ace_gutter_annotation {
373
+ margin-left: -14px;
374
+ float: left;
375
+ }
376
+
377
+ .ace_gutter-cell .ace_gutter_annotation {
378
+ margin-left: -19px;
379
+ float: left;
380
+ }
381
+
382
+ .ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {
383
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");
384
+ background-repeat: no-repeat;
385
+ background-position: 2px center;
386
+ }
387
+
388
+ .ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
389
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");
390
+ background-repeat: no-repeat;
391
+ background-position: 2px center;
392
+ }
393
+
394
+ .ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
395
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
396
+ background-repeat: no-repeat;
397
+ background-position: 2px center;
398
+ }
399
+
400
+ .ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {
401
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
402
+ }
403
+
404
+ .ace_icon_svg.ace_error {
405
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
406
+ background-color: crimson;
407
+ }
408
+ .ace_icon_svg.ace_security {
409
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
410
+ background-color: crimson;
411
+ }
412
+ .ace_icon_svg.ace_warning {
413
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
414
+ background-color: darkorange;
415
+ }
416
+ .ace_icon_svg.ace_info {
417
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
418
+ background-color: royalblue;
419
+ }
420
+ .ace_icon_svg.ace_hint {
421
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
422
+ background-color: silver;
423
+ }
424
+
425
+ .ace_icon_svg.ace_error_fold {
426
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
427
+ background-color: crimson;
428
+ }
429
+ .ace_icon_svg.ace_security_fold {
430
+ -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
431
+ background-color: crimson;
432
+ }
433
+ .ace_icon_svg.ace_warning_fold {
434
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
435
+ background-color: darkorange;
436
+ }
437
+
438
+ .ace_scrollbar {
439
+ contain: strict;
440
+ position: absolute;
441
+ right: 0;
442
+ bottom: 0;
443
+ z-index: 6;
444
+ }
445
+
446
+ .ace_scrollbar-inner {
447
+ position: absolute;
448
+ cursor: text;
449
+ left: 0;
450
+ top: 0;
451
+ }
452
+
453
+ .ace_scrollbar-v{
454
+ overflow-x: hidden;
455
+ overflow-y: scroll;
456
+ top: 0;
457
+ }
458
+
459
+ .ace_scrollbar-h {
460
+ overflow-x: scroll;
461
+ overflow-y: hidden;
462
+ left: 0;
463
+ }
464
+
465
+ .ace_print-margin {
466
+ position: absolute;
467
+ height: 100%;
468
+ }
469
+
470
+ .ace_text-input {
471
+ position: absolute;
472
+ z-index: 0;
473
+ width: 0.5em;
474
+ height: 1em;
475
+ opacity: 0;
476
+ background: transparent;
477
+ -moz-appearance: none;
478
+ appearance: none;
479
+ border: none;
480
+ resize: none;
481
+ outline: none;
482
+ overflow: hidden;
483
+ font: inherit;
484
+ padding: 0 1px;
485
+ margin: 0 -1px;
486
+ contain: strict;
487
+ -ms-user-select: text;
488
+ -moz-user-select: text;
489
+ -webkit-user-select: text;
490
+ user-select: text;
491
+ /*with \`pre-line\` chrome inserts &nbsp; instead of space*/
492
+ white-space: pre!important;
493
+ }
494
+ .ace_text-input.ace_composition {
495
+ background: transparent;
496
+ color: inherit;
497
+ z-index: 1000;
498
+ opacity: 1;
499
+ }
500
+ .ace_composition_placeholder { color: transparent }
501
+ .ace_composition_marker {
502
+ border-bottom: 1px solid;
503
+ position: absolute;
504
+ border-radius: 0;
505
+ margin-top: 1px;
506
+ }
507
+
508
+ [ace_nocontext=true] {
509
+ transform: none!important;
510
+ filter: none!important;
511
+ clip-path: none!important;
512
+ mask : none!important;
513
+ contain: none!important;
514
+ perspective: none!important;
515
+ mix-blend-mode: initial!important;
516
+ z-index: auto;
517
+ }
518
+
519
+ .ace_layer {
520
+ z-index: 1;
521
+ position: absolute;
522
+ overflow: hidden;
523
+ /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
524
+ word-wrap: normal;
525
+ white-space: pre;
526
+ height: 100%;
527
+ width: 100%;
528
+ box-sizing: border-box;
529
+ /* setting pointer-events: auto; on node under the mouse, which changes
530
+ during scroll, will break mouse wheel scrolling in Safari */
531
+ pointer-events: none;
532
+ }
533
+
534
+ .ace_gutter-layer {
535
+ position: relative;
536
+ width: auto;
537
+ text-align: right;
538
+ pointer-events: auto;
539
+ height: 1000000px;
540
+ contain: style size layout;
541
+ }
542
+
543
+ .ace_text-layer {
544
+ font: inherit !important;
545
+ position: absolute;
546
+ height: 1000000px;
547
+ width: 1000000px;
548
+ contain: style size layout;
549
+ }
550
+
551
+ .ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
552
+ contain: style size layout;
553
+ position: absolute;
554
+ top: 0;
555
+ left: 0;
556
+ right: 0;
557
+ }
558
+
559
+ .ace_hidpi .ace_text-layer,
560
+ .ace_hidpi .ace_gutter-layer,
561
+ .ace_hidpi .ace_content,
562
+ .ace_hidpi .ace_gutter {
563
+ contain: strict;
564
+ }
565
+ .ace_hidpi .ace_text-layer > .ace_line,
566
+ .ace_hidpi .ace_text-layer > .ace_line_group {
567
+ contain: strict;
568
+ }
569
+
570
+ .ace_cjk {
571
+ display: inline-block;
572
+ text-align: center;
573
+ }
574
+
575
+ .ace_cursor-layer {
576
+ z-index: 4;
577
+ }
578
+
579
+ .ace_cursor {
580
+ z-index: 4;
581
+ position: absolute;
582
+ box-sizing: border-box;
583
+ border-left: 2px solid;
584
+ /* workaround for smooth cursor repaintng whole screen in chrome */
585
+ transform: translatez(0);
586
+ }
587
+
588
+ .ace_multiselect .ace_cursor {
589
+ border-left-width: 1px;
590
+ }
591
+
592
+ .ace_slim-cursors .ace_cursor {
593
+ border-left-width: 1px;
594
+ }
595
+
596
+ .ace_overwrite-cursors .ace_cursor {
597
+ border-left-width: 0;
598
+ border-bottom: 1px solid;
599
+ }
600
+
601
+ .ace_hidden-cursors .ace_cursor {
602
+ opacity: 0.2;
603
+ }
604
+
605
+ .ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
606
+ opacity: 0;
607
+ }
608
+
609
+ .ace_smooth-blinking .ace_cursor {
610
+ transition: opacity 0.18s;
611
+ }
612
+
613
+ .ace_animate-blinking .ace_cursor {
614
+ animation-duration: 1000ms;
615
+ animation-timing-function: step-end;
616
+ animation-name: blink-ace-animate;
617
+ animation-iteration-count: infinite;
618
+ }
619
+
620
+ .ace_animate-blinking.ace_smooth-blinking .ace_cursor {
621
+ animation-duration: 1000ms;
622
+ animation-timing-function: ease-in-out;
623
+ animation-name: blink-ace-animate-smooth;
624
+ }
625
+
626
+ @keyframes blink-ace-animate {
627
+ from, to { opacity: 1; }
628
+ 60% { opacity: 0; }
629
+ }
630
+
631
+ @keyframes blink-ace-animate-smooth {
632
+ from, to { opacity: 1; }
633
+ 45% { opacity: 1; }
634
+ 60% { opacity: 0; }
635
+ 85% { opacity: 0; }
636
+ }
637
+
638
+ .ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
639
+ position: absolute;
640
+ z-index: 3;
641
+ }
642
+
643
+ .ace_marker-layer .ace_selection {
644
+ position: absolute;
645
+ z-index: 5;
646
+ }
647
+
648
+ .ace_marker-layer .ace_bracket {
649
+ position: absolute;
650
+ z-index: 6;
651
+ }
652
+
653
+ .ace_marker-layer .ace_error_bracket {
654
+ position: absolute;
655
+ border-bottom: 1px solid #DE5555;
656
+ border-radius: 0;
657
+ }
658
+
659
+ .ace_marker-layer .ace_active-line {
660
+ position: absolute;
661
+ z-index: 2;
662
+ }
663
+
664
+ .ace_marker-layer .ace_selected-word {
665
+ position: absolute;
666
+ z-index: 4;
667
+ box-sizing: border-box;
668
+ }
669
+
670
+ .ace_line .ace_fold {
671
+ box-sizing: border-box;
672
+
673
+ display: inline-block;
674
+ height: 11px;
675
+ margin-top: -2px;
676
+ vertical-align: middle;
677
+
678
+ background-image:
679
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
680
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
681
+ background-repeat: no-repeat, repeat-x;
682
+ background-position: center center, top left;
683
+ color: transparent;
684
+
685
+ border: 1px solid black;
686
+ border-radius: 2px;
687
+
688
+ cursor: pointer;
689
+ pointer-events: auto;
690
+ }
691
+
692
+ .ace_dark .ace_fold {
693
+ }
694
+
695
+ .ace_fold:hover{
696
+ background-image:
697
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
698
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
699
+ }
700
+
701
+ .ace_tooltip {
702
+ background-color: #f5f5f5;
703
+ border: 1px solid gray;
704
+ border-radius: 1px;
705
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
706
+ color: black;
707
+ padding: 3px 4px;
708
+ position: fixed;
709
+ z-index: 999999;
710
+ box-sizing: border-box;
711
+ cursor: default;
712
+ white-space: pre-wrap;
713
+ word-wrap: break-word;
714
+ line-height: normal;
715
+ font-style: normal;
716
+ font-weight: normal;
717
+ letter-spacing: normal;
718
+ pointer-events: none;
719
+ overflow: auto;
720
+ max-width: min(33em, 66vw);
721
+ overscroll-behavior: contain;
722
+ }
723
+ .ace_tooltip pre {
724
+ white-space: pre-wrap;
725
+ }
726
+
727
+ .ace_tooltip.ace_dark {
728
+ background-color: #636363;
729
+ color: #fff;
730
+ }
731
+
732
+ .ace_tooltip:focus {
733
+ outline: 1px solid #5E9ED6;
734
+ }
735
+
736
+ .ace_icon {
737
+ display: inline-block;
738
+ width: 18px;
739
+ vertical-align: top;
740
+ }
741
+
742
+ .ace_icon_svg {
743
+ display: inline-block;
744
+ width: 12px;
745
+ vertical-align: top;
746
+ -webkit-mask-repeat: no-repeat;
747
+ -webkit-mask-size: 12px;
748
+ -webkit-mask-position: center;
749
+ }
750
+
751
+ .ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
752
+ padding-right: 13px;
753
+ }
754
+
755
+ .ace_fold-widget, .ace_custom-widget {
756
+ box-sizing: border-box;
757
+
758
+ margin: 0 -12px 0 1px;
759
+ display: none;
760
+ width: 11px;
761
+ vertical-align: top;
762
+
763
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
764
+ background-repeat: no-repeat;
765
+ background-position: center;
766
+
767
+ border-radius: 3px;
768
+
769
+ border: 1px solid transparent;
770
+ cursor: pointer;
771
+ pointer-events: auto;
772
+ }
773
+
774
+ .ace_custom-widget {
775
+ background: none;
776
+ }
777
+
778
+ .ace_folding-enabled .ace_fold-widget {
779
+ display: inline-block;
780
+ }
781
+
782
+ .ace_fold-widget.ace_end {
783
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
784
+ }
785
+
786
+ .ace_fold-widget.ace_closed {
787
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
788
+ }
789
+
790
+ .ace_fold-widget:hover {
791
+ border: 1px solid rgba(0, 0, 0, 0.3);
792
+ background-color: rgba(255, 255, 255, 0.2);
793
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
794
+ }
795
+
796
+ .ace_fold-widget:active {
797
+ border: 1px solid rgba(0, 0, 0, 0.4);
798
+ background-color: rgba(0, 0, 0, 0.05);
799
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
800
+ }
801
+ /**
802
+ * Dark version for fold widgets
803
+ */
804
+ .ace_dark .ace_fold-widget {
805
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
806
+ }
807
+ .ace_dark .ace_fold-widget.ace_end {
808
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
809
+ }
810
+ .ace_dark .ace_fold-widget.ace_closed {
811
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
812
+ }
813
+ .ace_dark .ace_fold-widget:hover {
814
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
815
+ background-color: rgba(255, 255, 255, 0.1);
816
+ }
817
+ .ace_dark .ace_fold-widget:active {
818
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
819
+ }
820
+
821
+ .ace_inline_button {
822
+ border: 1px solid lightgray;
823
+ display: inline-block;
824
+ margin: -1px 8px;
825
+ padding: 0 5px;
826
+ pointer-events: auto;
827
+ cursor: pointer;
828
+ }
829
+ .ace_inline_button:hover {
830
+ border-color: gray;
831
+ background: rgba(200,200,200,0.2);
832
+ display: inline-block;
833
+ pointer-events: auto;
834
+ }
835
+
836
+ .ace_fold-widget.ace_invalid {
837
+ background-color: #FFB4B4;
838
+ border-color: #DE5555;
839
+ }
840
+
841
+ .ace_fade-fold-widgets .ace_fold-widget {
842
+ transition: opacity 0.4s ease 0.05s;
843
+ opacity: 0;
844
+ }
845
+
846
+ .ace_fade-fold-widgets:hover .ace_fold-widget {
847
+ transition: opacity 0.05s ease 0.05s;
848
+ opacity:1;
849
+ }
850
+
851
+ .ace_underline {
852
+ text-decoration: underline;
853
+ }
854
+
855
+ .ace_bold {
856
+ font-weight: bold;
857
+ }
858
+
859
+ .ace_nobold .ace_bold {
860
+ font-weight: normal;
861
+ }
862
+
863
+ .ace_italic {
864
+ font-style: italic;
865
+ }
866
+
867
+
868
+ .ace_error-marker {
869
+ background-color: rgba(255, 0, 0,0.2);
870
+ position: absolute;
871
+ z-index: 9;
872
+ }
873
+
874
+ .ace_highlight-marker {
875
+ background-color: rgba(255, 255, 0,0.2);
876
+ position: absolute;
877
+ z-index: 8;
878
+ }
879
+
880
+ .ace_mobile-menu {
881
+ position: absolute;
882
+ line-height: 1.5;
883
+ border-radius: 4px;
884
+ -ms-user-select: none;
885
+ -moz-user-select: none;
886
+ -webkit-user-select: none;
887
+ user-select: none;
888
+ background: white;
889
+ box-shadow: 1px 3px 2px grey;
890
+ border: 1px solid #dcdcdc;
891
+ color: black;
892
+ }
893
+ .ace_dark > .ace_mobile-menu {
894
+ background: #333;
895
+ color: #ccc;
896
+ box-shadow: 1px 3px 2px grey;
897
+ border: 1px solid #444;
898
+
899
+ }
900
+ .ace_mobile-button {
901
+ padding: 2px;
902
+ cursor: pointer;
903
+ overflow: hidden;
904
+ }
905
+ .ace_mobile-button:hover {
906
+ background-color: #eee;
907
+ opacity:1;
908
+ }
909
+ .ace_mobile-button:active {
910
+ background-color: #ddd;
911
+ }
912
+
913
+ .ace_placeholder {
914
+ position: relative;
915
+ font-family: arial;
916
+ transform: scale(0.9);
917
+ transform-origin: left;
918
+ white-space: pre;
919
+ opacity: 0.7;
920
+ margin: 0 10px;
921
+ z-index: 1;
922
+ }
923
+
924
+ .ace_ghost_text {
925
+ opacity: 0.5;
926
+ font-style: italic;
927
+ }
928
+
929
+ .ace_ghost_text_container > div {
930
+ white-space: pre;
931
+ }
932
+
933
+ .ghost_text_line_wrapped::after {
934
+ content: "↩";
935
+ position: absolute;
936
+ }
937
+
938
+ .ace_lineWidgetContainer.ace_ghost_text {
939
+ margin: 0px 4px
940
+ }
941
+
942
+ .ace_screenreader-only {
943
+ position:absolute;
944
+ left:-10000px;
945
+ top:auto;
946
+ width:1px;
947
+ height:1px;
948
+ overflow:hidden;
949
+ }
950
+
951
+ .ace_hidden_token {
952
+ display: none;
953
+ }`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(e,r,m){var d=e("../lib/dom"),g=e("../lib/oop"),w=e("../lib/event_emitter").EventEmitter,u=(function(){function f(a,s){this.renderer=s,this.pixelRatio=1,this.maxHeight=s.layerConfig.maxHeight,this.lineHeight=s.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},this.setScrollBarV(a)}return f.prototype.$createCanvas=function(){this.canvas=d.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},f.prototype.setScrollBarV=function(a){this.$createCanvas(),this.scrollbarV=a,a.element.appendChild(this.canvas),this.setDimensions()},f.prototype.$updateDecorators=function(a){if(typeof this.canvas.getContext!="function")return;var s=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(a);var c=this.canvas.getContext("2d");function h(O,T){return O.priority<T.priority?-1:O.priority>T.priority?1:0}var o=this.renderer.session.$annotations;if(c.clearRect(0,0,this.canvas.width,this.canvas.height),o){var l={info:1,warning:2,error:3};o.forEach(function(O){O.priority=l[O.type]||null}),o=o.sort(h);for(var p=0;p<o.length;p++){var y=o[p].row,x=this.getVerticalOffsetForRow(y),E=x+this.lineHeight,$=Math.round(this.heightRatio*x),_=Math.round(this.heightRatio*E),C=Math.round(($+_)/2),L=_-C;L<this.halfMinDecorationHeight&&(L=this.halfMinDecorationHeight),C-L<0&&(C=L),C+L>this.canvasHeight&&(C=this.canvasHeight-L);var D=C-L,I=C+L,M=I-D;c.fillStyle=s[o[p].type]||null,c.fillRect(0,D,Math.round(this.oneZoneWidth-1),M)}}var W=this.renderer.session.selection.getCursor();if(W){var z=Math.round(this.getVerticalOffsetForRow(W.row)*this.heightRatio);c.fillStyle="rgba(0, 0, 0, 0.5)",c.fillRect(0,z,this.canvasWidth,2)}},f.prototype.getVerticalOffsetForRow=function(a){a=a|0;var s=this.renderer.session.documentToScreenRow(a,0)*this.lineHeight;return s},f.prototype.setDimensions=function(a){a=a||this.renderer.layerConfig,this.maxHeight=a.maxHeight,this.lineHeight=a.lineHeight,this.canvasHeight=a.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight},f.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},f.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},f})();g.implement(u.prototype,w),r.Decorator=u}),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(e,r,m){var d=e("./lib/oop"),g=e("./lib/dom"),w=e("./lib/lang"),u=e("./config"),f=e("./layer/gutter").Gutter,a=e("./layer/marker").Marker,s=e("./layer/text").Text,c=e("./layer/cursor").Cursor,h=e("./scrollbar").HScrollBar,o=e("./scrollbar").VScrollBar,l=e("./scrollbar_custom").HScrollBar,p=e("./scrollbar_custom").VScrollBar,y=e("./renderloop").RenderLoop,x=e("./layer/font_metrics").FontMetrics,E=e("./lib/event_emitter").EventEmitter,$=e("./css/editor-css"),_=e("./layer/decorators").Decorator,C=e("./lib/useragent"),L=e("./layer/text_util").isTextToken;g.importCssString($,"ace_editor.css",!1);var D=(function(){function I(M,W){var z=this;this.container=M||g.createElement("div"),g.addCssClass(this.container,"ace_editor"),g.HI_DPI&&g.addCssClass(this.container,"ace_hidpi"),this.setTheme(W),u.get("useStrictCSP")==null&&u.set("useStrictCSP",!1),this.$gutter=g.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=g.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=g.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new f(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new a(this.content);var O=this.$textLayer=new s(this.content);this.canvas=O.element,this.$markerFront=new a(this.content),this.$cursorLayer=new c(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new o(this.container,this),this.scrollBarH=new h(this.container,this),this.scrollBarV.on("scroll",function(T){z.$scrollAnimation||z.session.setScrollTop(T.data-z.scrollMargin.top)}),this.scrollBarH.on("scroll",function(T){z.$scrollAnimation||z.session.setScrollLeft(T.data-z.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new x(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(T){z.updateCharacterSize(),z.onResize(!0,z.gutterWidth,z.$size.width,z.$size.height),z._signal("changeCharacterSize",T)}),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=!C.isIOS,this.$loop=new y(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),u.resetOptions(this),u._signal("renderer",this)}return I.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(),g.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},I.prototype.setSession=function(M){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=M,M&&this.scrollMargin.top&&M.getScrollTop()<=0&&M.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(M),this.$markerBack.setSession(M),this.$markerFront.setSession(M),this.$gutterLayer.setSession(M),this.$textLayer.setSession(M),M&&(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))},I.prototype.updateLines=function(M,W,z){if(W===void 0&&(W=1/0),this.$changedLines?(this.$changedLines.firstRow>M&&(this.$changedLines.firstRow=M),this.$changedLines.lastRow<W&&(this.$changedLines.lastRow=W)):this.$changedLines={firstRow:M,lastRow:W},this.$changedLines.lastRow<this.layerConfig.firstRow)if(z)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},I.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},I.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},I.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},I.prototype.updateFull=function(M){M?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},I.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},I.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},I.prototype.onResize=function(M,W,z,O){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=M?1:0;var T=this.container;O||(O=T.clientHeight||T.scrollHeight),!O&&this.$maxLines&&this.lineHeight>1&&(!T.style.height||T.style.height=="0px")&&(T.style.height="1px",O=T.clientHeight||T.scrollHeight),z||(z=T.clientWidth||T.scrollWidth);var A=this.$updateCachedSize(M,W,z,O);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!z&&!O)return this.resizing=0;M&&(this.$gutterLayer.$padding=null),M?this.$renderChanges(A|this.$changes,!0):this.$loop.schedule(A|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},I.prototype.$updateCachedSize=function(M,W,z,O){O-=this.$extraHeight||0;var T=0,A=this.$size,N={width:A.width,height:A.height,scrollerHeight:A.scrollerHeight,scrollerWidth:A.scrollerWidth};if(O&&(M||A.height!=O)&&(A.height=O,T|=this.CHANGE_SIZE,A.scrollerHeight=A.height,this.$horizScroll&&(A.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(A.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",T=T|this.CHANGE_SCROLL),z&&(M||A.width!=z)){T|=this.CHANGE_SIZE,A.width=z,W==null&&(W=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=W,g.setStyle(this.scrollBarH.element.style,"left",W+"px"),g.setStyle(this.scroller.style,"left",W+this.margin.left+"px"),A.scrollerWidth=Math.max(0,z-W-this.scrollBarV.getWidth()-this.margin.h),g.setStyle(this.$gutter.style,"left",this.margin.left+"px");var B=this.scrollBarV.getWidth()+"px";g.setStyle(this.scrollBarH.element.style,"right",B),g.setStyle(this.scroller.style,"right",B),g.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(A.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||M)&&(T|=this.CHANGE_FULL)}return A.$dirty=!z||!O,T&&this._signal("resize",N),T},I.prototype.onGutterResize=function(M){var W=this.$showGutter?M:0;W!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,W,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()},I.prototype.adjustWrapLimit=function(){var M=this.$size.scrollerWidth-this.$padding*2,W=Math.floor(M/this.characterWidth);return this.session.adjustWrapLimit(W,this.$showPrintMargin&&this.$printMarginColumn)},I.prototype.setAnimatedScroll=function(M){this.setOption("animatedScroll",M)},I.prototype.getAnimatedScroll=function(){return this.$animatedScroll},I.prototype.setShowInvisibles=function(M){this.setOption("showInvisibles",M),this.session.$bidiHandler.setShowInvisibles(M)},I.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},I.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},I.prototype.setDisplayIndentGuides=function(M){this.setOption("displayIndentGuides",M)},I.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},I.prototype.setHighlightIndentGuides=function(M){this.setOption("highlightIndentGuides",M)},I.prototype.setShowPrintMargin=function(M){this.setOption("showPrintMargin",M)},I.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},I.prototype.setPrintMarginColumn=function(M){this.setOption("printMarginColumn",M)},I.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},I.prototype.getShowGutter=function(){return this.getOption("showGutter")},I.prototype.setShowGutter=function(M){return this.setOption("showGutter",M)},I.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},I.prototype.setFadeFoldWidgets=function(M){this.setOption("fadeFoldWidgets",M)},I.prototype.setHighlightGutterLine=function(M){this.setOption("highlightGutterLine",M)},I.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},I.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var M=g.createElement("div");M.className="ace_layer ace_print-margin-layer",this.$printMarginEl=g.createElement("div"),this.$printMarginEl.className="ace_print-margin",M.appendChild(this.$printMarginEl),this.content.insertBefore(M,this.content.firstChild)}var W=this.$printMarginEl.style;W.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",W.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},I.prototype.getContainerElement=function(){return this.container},I.prototype.getMouseEventTarget=function(){return this.scroller},I.prototype.getTextAreaContainer=function(){return this.container},I.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var M=this.textarea.style,W=this.$composition;if(!this.$keepTextAreaAtCursor&&!W){g.translate(this.textarea,-100,0);return}var z=this.$cursorLayer.$pixelPos;if(z){W&&W.markerRange&&(z=this.$cursorLayer.getPixelPosition(W.markerRange.start,!0));var O=this.layerConfig,T=z.top,A=z.left;T-=O.offset;var N=W&&W.useTextareaForIME||C.isMobile?this.lineHeight:1;if(T<0||T>O.height-N){g.translate(this.textarea,0,0);return}var B=1,U=this.$size.height-N;if(!W)T+=this.lineHeight;else if(W.useTextareaForIME){var G=this.textarea.value;B=this.characterWidth*this.session.$getStringScreenWidth(G)[0]}else T+=this.lineHeight+2;A-=this.scrollLeft,A>this.$size.scrollerWidth-B&&(A=this.$size.scrollerWidth-B),A+=this.gutterWidth+this.margin.left,g.setStyle(M,"height",N+"px"),g.setStyle(M,"width",B+"px"),g.translate(this.textarea,Math.min(A,this.$size.scrollerWidth-B),Math.min(T,U))}}},I.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},I.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},I.prototype.getLastFullyVisibleRow=function(){var M=this.layerConfig,W=M.lastRow,z=this.session.documentToScreenRow(W,0)*M.lineHeight;return z-this.session.getScrollTop()>M.height-M.lineHeight?W-1:W},I.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},I.prototype.setPadding=function(M){this.$padding=M,this.$textLayer.setPadding(M),this.$cursorLayer.setPadding(M),this.$markerFront.setPadding(M),this.$markerBack.setPadding(M),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},I.prototype.setScrollMargin=function(M,W,z,O){var T=this.scrollMargin;T.top=M|0,T.bottom=W|0,T.right=O|0,T.left=z|0,T.v=T.top+T.bottom,T.h=T.left+T.right,T.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-T.top),this.updateFull()},I.prototype.setMargin=function(M,W,z,O){var T=this.margin;T.top=M|0,T.bottom=W|0,T.right=O|0,T.left=z|0,T.v=T.top+T.bottom,T.h=T.left+T.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},I.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},I.prototype.setHScrollBarAlwaysVisible=function(M){this.setOption("hScrollBarAlwaysVisible",M)},I.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},I.prototype.setVScrollBarAlwaysVisible=function(M){this.setOption("vScrollBarAlwaysVisible",M)},I.prototype.$updateScrollBarV=function(){var M=this.layerConfig.maxHeight,W=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(M-=(W-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>M-W&&(M=this.scrollTop+W,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(M+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},I.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},I.prototype.freeze=function(){this.$frozen=!0},I.prototype.unfreeze=function(){this.$frozen=!1},I.prototype.$renderChanges=function(M,W){if(this.$changes&&(M|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!M&&!W){this.$changes|=M;return}if(this.$size.$dirty)return this.$changes|=M,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",M),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var z=this.layerConfig;if(M&this.CHANGE_FULL||M&this.CHANGE_SIZE||M&this.CHANGE_TEXT||M&this.CHANGE_LINES||M&this.CHANGE_SCROLL||M&this.CHANGE_H_SCROLL){if(M|=this.$computeLayerConfig()|this.$loop.clear(),z.firstRow!=this.layerConfig.firstRow&&z.firstRowScreen==this.layerConfig.firstRowScreen){var O=this.scrollTop+(z.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;O>0&&(this.scrollTop=O,M=M|this.CHANGE_SCROLL,M|=this.$computeLayerConfig()|this.$loop.clear())}z=this.layerConfig,this.$updateScrollBarV(),M&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),g.translate(this.content,-this.scrollLeft,-z.offset);var T=z.width+2*this.$padding+"px",A=z.minHeight+"px";g.setStyle(this.content.style,"width",T),g.setStyle(this.content.style,"height",A)}if(M&this.CHANGE_H_SCROLL&&(g.translate(this.content,-this.scrollLeft,-z.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),M&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(z),this.$showGutter&&this.$gutterLayer.update(z),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(z),this.$markerBack.update(z),this.$markerFront.update(z),this.$cursorLayer.update(z),this.$moveTextAreaToCursor(),this._signal("afterRender",M);return}if(M&this.CHANGE_SCROLL){this.$changedLines=null,M&this.CHANGE_TEXT||M&this.CHANGE_LINES?this.$textLayer.update(z):this.$textLayer.scrollLines(z),this.$showGutter&&(M&this.CHANGE_GUTTER||M&this.CHANGE_LINES?this.$gutterLayer.update(z):this.$gutterLayer.scrollLines(z)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(z),this.$markerBack.update(z),this.$markerFront.update(z),this.$cursorLayer.update(z),this.$moveTextAreaToCursor(),this._signal("afterRender",M);return}M&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(z),this.$showGutter&&this.$gutterLayer.update(z),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(z)):M&this.CHANGE_LINES?((this.$updateLines()||M&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(z),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(z)):M&this.CHANGE_TEXT||M&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(z),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(z)):M&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(z),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(z)),M&this.CHANGE_CURSOR&&(this.$cursorLayer.update(z),this.$moveTextAreaToCursor()),M&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(z),M&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(z),this._signal("afterRender",M)},I.prototype.$autosize=function(){var M=this.session.getScreenLength()*this.lineHeight,W=this.$maxLines*this.lineHeight,z=Math.min(W,Math.max((this.$minLines||1)*this.lineHeight,M))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(z+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&z>this.$maxPixelHeight&&(z=this.$maxPixelHeight);var O=z<=2*this.lineHeight,T=!O&&M>W;if(z!=this.desiredHeight||this.$size.height!=this.desiredHeight||T!=this.$vScroll){T!=this.$vScroll&&(this.$vScroll=T,this.scrollBarV.setVisible(T));var A=this.container.clientWidth;this.container.style.height=z+"px",this.$updateCachedSize(!0,this.$gutterWidth,A,z),this.desiredHeight=z,this._signal("autosize")}},I.prototype.$computeLayerConfig=function(){var M=this.session,W=this.$size,z=W.height<=2*this.lineHeight,O=this.session.getScreenLength(),T=O*this.lineHeight,A=this.$getLongestLine(),N=!z&&(this.$hScrollBarAlwaysVisible||W.scrollerWidth-A-2*this.$padding<0),B=this.$horizScroll!==N;B&&(this.$horizScroll=N,this.scrollBarH.setVisible(N));var U=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),z=W.height<=2*this.lineHeight);var G=W.scrollerHeight+this.lineHeight,J=!this.$maxLines&&this.$scrollPastEnd?(W.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;T+=J;var Q=this.scrollMargin;this.session.setScrollTop(Math.max(-Q.top,Math.min(this.scrollTop,T-W.scrollerHeight+Q.bottom))),this.session.setScrollLeft(Math.max(-Q.left,Math.min(this.scrollLeft,A+2*this.$padding-W.scrollerWidth+Q.right)));var le=!z&&(this.$vScrollBarAlwaysVisible||W.scrollerHeight-T+J<0||this.scrollTop>Q.top),re=U!==le;re&&(this.$vScroll=le,this.scrollBarV.setVisible(le));var ce=this.scrollTop%this.lineHeight,de=Math.ceil(G/this.lineHeight)-1,ie=Math.max(0,Math.round((this.scrollTop-ce)/this.lineHeight)),fe=ie+de,$e,Re,Ee=this.lineHeight;ie=M.screenToDocumentRow(ie,0);var Ue=M.getFoldLine(ie);Ue&&(ie=Ue.start.row),$e=M.documentToScreenRow(ie,0),Re=M.getRowLength(ie)*Ee,fe=Math.min(M.screenToDocumentRow(fe,0),M.getLength()-1),G=W.scrollerHeight+M.getRowLength(fe)*Ee+Re,ce=this.scrollTop-$e*Ee,ce<0&&$e>0&&($e=Math.max(0,$e+Math.floor(ce/Ee)),ce=this.scrollTop-$e*Ee);var He=0;return(this.layerConfig.width!=A||B)&&(He=this.CHANGE_H_SCROLL),(B||re)&&(He|=this.$updateCachedSize(!0,this.gutterWidth,W.width,W.height),this._signal("scrollbarVisibilityChanged"),re&&(A=this.$getLongestLine())),this.layerConfig={width:A,padding:this.$padding,firstRow:ie,firstRowScreen:$e,lastRow:fe,lineHeight:Ee,characterWidth:this.characterWidth,minHeight:G,maxHeight:T,offset:ce,gutterOffset:Ee?Math.max(0,Math.ceil((ce+W.height-W.scrollerHeight)/Ee)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(A-this.$padding),He},I.prototype.$updateLines=function(){if(this.$changedLines){var M=this.$changedLines.firstRow,W=this.$changedLines.lastRow;this.$changedLines=null;var z=this.layerConfig;if(!(M>z.lastRow+1)&&!(W<z.firstRow)){if(W===1/0){this.$showGutter&&this.$gutterLayer.update(z),this.$textLayer.update(z);return}return this.$textLayer.updateLines(z,M,W),!0}}},I.prototype.$getLongestLine=function(){var M=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(M+=1),this.$textLayer&&M>this.$textLayer.MAX_LINE_LENGTH&&(M=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(M*this.characterWidth))},I.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},I.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},I.prototype.addGutterDecoration=function(M,W){this.$gutterLayer.addGutterDecoration(M,W)},I.prototype.removeGutterDecoration=function(M,W){this.$gutterLayer.removeGutterDecoration(M,W)},I.prototype.updateBreakpoints=function(M){this._rows=M,this.$loop.schedule(this.CHANGE_GUTTER)},I.prototype.setAnnotations=function(M){this.$gutterLayer.setAnnotations(M),this.$loop.schedule(this.CHANGE_GUTTER)},I.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},I.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},I.prototype.showCursor=function(){this.$cursorLayer.showCursor()},I.prototype.scrollSelectionIntoView=function(M,W,z){this.scrollCursorIntoView(M,z),this.scrollCursorIntoView(W,z)},I.prototype.scrollCursorIntoView=function(M,W,z){if(this.$size.scrollerHeight!==0){var O=this.$cursorLayer.getPixelPosition(M),T=O.left,A=O.top,N=z&&z.top||0,B=z&&z.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var U=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;U+N>A?(W&&U+N>A+this.lineHeight&&(A-=W*this.$size.scrollerHeight),A===0&&(A=-this.scrollMargin.top),this.session.setScrollTop(A)):U+this.$size.scrollerHeight-B<A+this.lineHeight&&(W&&U+this.$size.scrollerHeight-B<A-this.lineHeight&&(A+=W*this.$size.scrollerHeight),this.session.setScrollTop(A+this.lineHeight+B-this.$size.scrollerHeight));var G=this.scrollLeft,J=2*this.layerConfig.characterWidth;T-J<G?(T-=J,T<this.$padding+J&&(T=-this.scrollMargin.left),this.session.setScrollLeft(T)):(T+=J,G+this.$size.scrollerWidth<T+this.characterWidth?this.session.setScrollLeft(Math.round(T+this.characterWidth-this.$size.scrollerWidth)):G<=this.$padding&&T-G<this.characterWidth&&this.session.setScrollLeft(0))}},I.prototype.getScrollTop=function(){return this.session.getScrollTop()},I.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},I.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},I.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},I.prototype.scrollToRow=function(M){this.session.setScrollTop(M*this.lineHeight)},I.prototype.alignCursor=function(M,W){typeof M=="number"&&(M={row:M,column:0});var z=this.$cursorLayer.getPixelPosition(M),O=this.$size.scrollerHeight-this.lineHeight,T=z.top-O*(W||0);return this.session.setScrollTop(T),T},I.prototype.$calcSteps=function(M,W){var z=0,O=this.STEPS,T=[],A=function(N,B,U){return U*(Math.pow(N-1,3)+1)+B};for(z=0;z<O;++z)T.push(A(z/this.STEPS,M,W-M));return T},I.prototype.scrollToLine=function(M,W,z,O){var T=this.$cursorLayer.getPixelPosition({row:M,column:0}),A=T.top;W&&(A-=this.$size.scrollerHeight/2);var N=this.scrollTop;this.session.setScrollTop(A),z!==!1&&this.animateScrolling(N,O)},I.prototype.animateScrolling=function(M,W){var z=this.scrollTop;if(!this.$animatedScroll)return;var O=this;if(M==z)return;if(this.$scrollAnimation){var T=this.$scrollAnimation.steps;if(T.length&&(M=T[0],M==z))return}var A=O.$calcSteps(M,z);this.$scrollAnimation={from:M,to:z,steps:A},clearInterval(this.$timer),O.session.setScrollTop(A.shift()),O.session.$scrollTop=z;function N(){O.$timer=clearInterval(O.$timer),O.$scrollAnimation=null,O.$stopAnimation=!1,W&&W()}this.$timer=setInterval(function(){if(O.$stopAnimation){N();return}if(!O.session)return clearInterval(O.$timer);A.length?(O.session.setScrollTop(A.shift()),O.session.$scrollTop=z):z!=null?(O.session.$scrollTop=-1,O.session.setScrollTop(z),z=null):N()},10)},I.prototype.scrollToY=function(M){this.scrollTop!==M&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=M)},I.prototype.scrollToX=function(M){this.scrollLeft!==M&&(this.scrollLeft=M),this.$loop.schedule(this.CHANGE_H_SCROLL)},I.prototype.scrollTo=function(M,W){this.session.setScrollTop(W),this.session.setScrollLeft(M)},I.prototype.scrollBy=function(M,W){W&&this.session.setScrollTop(this.session.getScrollTop()+W),M&&this.session.setScrollLeft(this.session.getScrollLeft()+M)},I.prototype.isScrollableBy=function(M,W){if(W<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||W>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||M<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||M>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},I.prototype.pixelToScreenCoordinates=function(M,W){var z;if(this.$hasCssTransforms){z={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([M,W]);M=O[1]-this.gutterWidth-this.margin.left,W=O[0]}else z=this.scroller.getBoundingClientRect();var T=M+this.scrollLeft-z.left-this.$padding,A=T/this.characterWidth,N=Math.floor((W+this.scrollTop-z.top)/this.lineHeight),B=this.$blockCursor?Math.floor(A):Math.round(A);return{row:N,column:B,side:A-B>0?1:-1,offsetX:T}},I.prototype.screenToTextCoordinates=function(M,W){var z;if(this.$hasCssTransforms){z={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([M,W]);M=O[1]-this.gutterWidth-this.margin.left,W=O[0]}else z=this.scroller.getBoundingClientRect();var T=M+this.scrollLeft-z.left-this.$padding,A=T/this.characterWidth,N=this.$blockCursor?Math.floor(A):Math.round(A),B=(W+this.scrollTop-z.top)/this.lineHeight;return this.session.screenToDocumentPosition(B,Math.max(N,0),T)},I.prototype.textToScreenCoordinates=function(M,W){var z=this.scroller.getBoundingClientRect(),O=this.session.documentToScreenPosition(M,W),T=this.$padding+(this.session.$bidiHandler.isBidiRow(O.row,M)?this.session.$bidiHandler.getPosLeft(O.column):Math.round(O.column*this.characterWidth)),A=O.row*this.lineHeight;return{pageX:z.left+T-this.scrollLeft,pageY:z.top+A-this.scrollTop}},I.prototype.visualizeFocus=function(){g.addCssClass(this.container,"ace_focus")},I.prototype.visualizeBlur=function(){g.removeCssClass(this.container,"ace_focus")},I.prototype.showComposition=function(M){this.$composition=M,M.cssText||(M.cssText=this.textarea.style.cssText),M.useTextareaForIME==null&&(M.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(g.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):M.markerId=this.session.addMarker(M.markerRange,"ace_composition_marker","text")},I.prototype.setCompositionText=function(M){var W=this.session.selection.cursor;this.addToken(M,"composition_placeholder",W.row,W.column),this.$moveTextAreaToCursor()},I.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),g.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var M=this.session.selection.cursor;this.removeExtraToken(M.row,M.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},I.prototype.setGhostText=function(M,W){var z=this.session.selection.cursor,O=W||{row:z.row,column:z.column};this.removeGhostText();var T=this.$calculateWrappedTextChunks(M,O);this.addToken(T[0].text,"ghost_text",O.row,O.column),this.$ghostText={text:M,position:{row:O.row,column:O.column}};var A=g.createElement("div");if(T.length>1){var N=this.hideTokensAfterPosition(O.row,O.column),B;T.slice(1).forEach(function(re){var ce=g.createElement("div"),de=g.createElement("span");de.className="ace_ghost_text",re.wrapped&&(ce.className="ghost_text_line_wrapped"),re.text.length===0&&(re.text=" "),de.appendChild(g.createTextNode(re.text)),ce.appendChild(de),A.appendChild(ce),B=ce}),N.forEach(function(re){var ce=g.createElement("span");L(re.type)||(ce.className="ace_"+re.type.replace(/\./g," ace_")),ce.appendChild(g.createTextNode(re.value)),B.appendChild(ce)}),this.$ghostTextWidget={el:A,row:O.row,column:O.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var U=this.$cursorLayer.getPixelPosition(O,!0),G=this.container,J=G.getBoundingClientRect().height,Q=T.length*this.lineHeight,le=Q<J-U.top;if(le)return;Q<J?this.scrollBy(0,(T.length-1)*this.lineHeight):this.scrollToRow(O.row)}},I.prototype.$calculateWrappedTextChunks=function(M,W){var z=this.$size.scrollerWidth-this.$padding*2,O=Math.floor(z/this.characterWidth)-2;O=O<=0?60:O;for(var T=M.split(/\r?\n/),A=[],N=0;N<T.length;N++){var B=this.session.$getDisplayTokens(T[N],W.column),U=this.session.$computeWrapSplits(B,O,this.session.$tabSize);if(U.length>0){var G=0;U.push(T[N].length);for(var J=0;J<U.length;J++){var Q=T[N].slice(G,U[J]);A.push({text:Q,wrapped:!0}),G=U[J]}}else A.push({text:T[N],wrapped:!1})}return A},I.prototype.removeGhostText=function(){if(this.$ghostText){var M=this.$ghostText.position;this.removeExtraToken(M.row,M.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},I.prototype.addToken=function(M,W,z,O){var T=this.session;T.bgTokenizer.lines[z]=null;var A={type:W,value:M},N=T.getTokens(z);if(O==null||!N.length)N.push(A);else for(var B=0,U=0;U<N.length;U++){var G=N[U];if(B+=G.value.length,O<=B){var J=G.value.length-(B-O),Q=G.value.slice(0,J),le=G.value.slice(J);N.splice(U,1,{type:G.type,value:Q},A,{type:G.type,value:le});break}}this.updateLines(z,z)},I.prototype.hideTokensAfterPosition=function(M,W){for(var z=this.session.getTokens(M),O=0,T=!1,A=[],N=0;N<z.length;N++){var B=z[N];if(O+=B.value.length,B.type!=="ghost_text"){if(T){A.push({type:B.type,value:B.value}),B.type="hidden_token";continue}O===W&&(T=!0)}}return this.updateLines(M,M),A},I.prototype.removeExtraToken=function(M,W){this.session.bgTokenizer.lines[M]=null,this.updateLines(M,M)},I.prototype.setTheme=function(M,W){var z=this;if(this.$themeId=M,z._dispatchEvent("themeChange",{theme:M}),!M||typeof M=="string"){var O=M||this.$options.theme.initialValue;u.loadModule(["theme",O],T)}else T(M);function T(A){if(z.$themeId!=M)return W&&W();if(!A||!A.cssClass)throw new Error("couldn't load module "+M+" or it didn't call define");A.$id&&(z.$themeId=A.$id),g.importCssString(A.cssText,A.cssClass,z.container),z.theme&&g.removeCssClass(z.container,z.theme.cssClass);var N="padding"in A?A.padding:"padding"in(z.theme||{})?4:z.$padding;if(z.$padding&&N!=z.$padding&&z.setPadding(N),z.$gutterLayer){var B=A.$showGutterCursorMarker;B&&!z.$gutterLayer.$showCursorMarker?z.$gutterLayer.$showCursorMarker="theme":!B&&z.$gutterLayer.$showCursorMarker=="theme"&&(z.$gutterLayer.$showCursorMarker=null)}z.$theme=A.cssClass,z.theme=A,g.addCssClass(z.container,A.cssClass),g.setCssClass(z.container,"ace_dark",A.isDark),z.$size&&(z.$size.width=0,z.$updateSizeAsync()),z._dispatchEvent("themeLoaded",{theme:A}),W&&W(),C.isSafari&&z.scroller&&(z.scroller.style.background="red",z.scroller.style.background="")}},I.prototype.getTheme=function(){return this.$themeId},I.prototype.setStyle=function(M,W){g.setCssClass(this.container,M,W!==!1)},I.prototype.unsetStyle=function(M){g.removeCssClass(this.container,M)},I.prototype.setCursorStyle=function(M){g.setStyle(this.scroller.style,"cursor",M)},I.prototype.setMouseCursor=function(M){g.setStyle(this.scroller.style,"cursor",M)},I.prototype.attachToShadowRoot=function(){g.importCssString($,"ace_editor.css",this.container)},I.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},I.prototype.$updateCustomScrollbar=function(M){var W=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),M===!0?(this.scrollBarV=new p(this.container,this),this.scrollBarH=new l(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(z){W.$scrollAnimation||W.session.setScrollTop(z.data-W.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(z){W.$scrollAnimation||W.session.setScrollLeft(z.data-W.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new _(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new o(this.container,this),this.scrollBarH=new h(this.container,this),this.scrollBarV.addEventListener("scroll",function(z){W.$scrollAnimation||W.session.setScrollTop(z.data-W.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(z){W.$scrollAnimation||W.session.setScrollLeft(z.data-W.scrollMargin.left)}))},I.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var M=this;this.$resizeTimer=w.delayedCall(function(){M.destroyed||M.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(W){var z=W[0].contentRect.width,O=W[0].contentRect.height;Math.abs(M.$size.width-z)>1||Math.abs(M.$size.height-O)>1?M.$resizeTimer.delay():M.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},I})();D.prototype.CHANGE_CURSOR=1,D.prototype.CHANGE_MARKER=2,D.prototype.CHANGE_GUTTER=4,D.prototype.CHANGE_SCROLL=8,D.prototype.CHANGE_LINES=16,D.prototype.CHANGE_TEXT=32,D.prototype.CHANGE_SIZE=64,D.prototype.CHANGE_MARKER_BACK=128,D.prototype.CHANGE_MARKER_FRONT=256,D.prototype.CHANGE_FULL=512,D.prototype.CHANGE_H_SCROLL=1024,D.prototype.$changes=0,D.prototype.$padding=null,D.prototype.$frozen=!1,D.prototype.STEPS=8,d.implement(D.prototype,E),u.defineOptions(D.prototype,"renderer",{useResizeObserver:{set:function(I){!I&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):I&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(I){this.$textLayer.setShowInvisibles(I)&&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(I){typeof I=="number"&&(this.$printMarginColumn=I),this.$showPrintMargin=!!I,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(I){this.$gutter.style.display=I?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(I){this.$gutterLayer.$useSvgGutterIcons=I},initialValue:!1},showFoldedAnnotations:{set:function(I){this.$gutterLayer.$showFoldedAnnotations=I},initialValue:!1},fadeFoldWidgets:{set:function(I){g.setCssClass(this.$gutter,"ace_fade-fold-widgets",I)},initialValue:!1},showFoldWidgets:{set:function(I){this.$gutterLayer.setShowFoldWidgets(I),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(I){this.$textLayer.setDisplayIndentGuides(I)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(I){this.$textLayer.setHighlightIndentGuides(I)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(I){this.$gutterLayer.setHighlightGutterLine(I),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(I){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(I){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(I){typeof I=="number"&&(I=I+"px"),this.container.style.fontSize=I,this.updateFontSize()},initialValue:12},fontFamily:{set:function(I){this.container.style.fontFamily=I,this.updateFontSize()}},maxLines:{set:function(I){this.updateFull()}},minLines:{set:function(I){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(I){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(I){I=+I||0,this.$scrollPastEnd!=I&&(this.$scrollPastEnd=I,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(I){this.$gutterLayer.$fixedWidth=!!I,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(I){this.$updateCustomScrollbar(I)},initialValue:!1},theme:{set:function(I){this.setTheme(I)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!C.isMobile&&!C.isIE}}),r.VirtualRenderer=D}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,r,m){var d=e("../lib/oop"),g=e("../lib/net"),w=e("../lib/event_emitter").EventEmitter,u=e("../config");function f(h){var o="importScripts('"+g.qualifyURL(h)+"');";try{return new Blob([o],{type:"application/javascript"})}catch{var l=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,p=new l;return p.append(o),p.getBlob("application/javascript")}}function a(h){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(u.get("loadWorkerFromBlob")){var o=f(h),l=window.URL||window.webkitURL,p=l.createObjectURL(o);return new Worker(p)}return new Worker(h)}var s=function(h){h.postMessage||(h=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=h,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(){d.implement(this,w),this.$createWorkerFromOldConfig=function(h,o,l,p,y){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),u.get("packaged")||!e.toUrl)p=p||u.moduleUrl(o,"worker");else{var x=this.$normalizePath;p=p||x(e.toUrl("ace/worker/worker.js",null,"_"));var E={};h.forEach(function($){E[$]=x(e.toUrl($,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=a(p),y&&this.send("importScripts",y),this.$worker.postMessage({init:!0,tlns:E,module:o,classname:l}),this.$worker},this.onMessage=function(h){var o=h.data;switch(o.type){case"event":this._signal(o.name,{data:o.data});break;case"call":var l=this.callbacks[o.id];l&&(l(o.data),delete this.callbacks[o.id]);break;case"error":this.reportError(o.data);break;case"log":window.console&&console.log&&console.log.apply(console,o.data);break}},this.reportError=function(h){window.console&&console.error&&console.error(h)},this.$normalizePath=function(h){return g.qualifyURL(h)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(h){h.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(h,o){this.$worker.postMessage({command:h,args:o})},this.call=function(h,o,l){if(l){var p=this.callbackId++;this.callbacks[p]=l,o.push(p)}this.send(h,o)},this.emit=function(h,o){try{o.data&&o.data.err&&(o.data.err={message:o.data.err.message,stack:o.data.err.stack,code:o.data.err.code}),this.$worker&&this.$worker.postMessage({event:h,data:{data:o.data}})}catch(l){console.error(l.stack)}},this.attachToDocument=function(h){this.$doc&&this.terminate(),this.$doc=h,this.call("setValue",[h.getValue()]),h.on("change",this.changeListener,!0)},this.changeListener=function(h){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),h.action=="insert"?this.deltaQueue.push(h.start,h.lines):this.deltaQueue.push(h.start,h.end)},this.$sendDeltaQueue=function(){var h=this.deltaQueue;h&&(this.deltaQueue=null,h.length>50&&h.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:h}))}}).call(s.prototype);var c=function(h,o,l){var p=null,y=!1,x=Object.create(w),E=[],$=new s({messageBuffer:E,terminate:function(){},postMessage:function(C){E.push(C),p&&(y?setTimeout(_):_())}});$.setEmitSync=function(C){y=C};var _=function(){var C=E.shift();C.command?p[C.command].apply(p,C.args):C.event&&x._signal(C.event,C.data)};return x.postMessage=function(C){$.onMessage({data:C})},x.callback=function(C,L){this.postMessage({type:"call",id:L,data:C})},x.emit=function(C,L){this.postMessage({type:"event",name:C,data:L})},u.loadModule(["worker",o],function(C){for(p=new C[l](x);E.length;)_()}),$};r.UIWorkerClient=c,r.WorkerClient=s,r.createWorker=a}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,r,m){var d=e("./range").Range,g=e("./lib/event_emitter").EventEmitter,w=e("./lib/oop"),u=(function(){function f(a,s,c,h,o,l){var p=this;this.length=s,this.session=a,this.doc=a.getDocument(),this.mainClass=o,this.othersClass=l,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=h,this.$onCursorChange=function(){setTimeout(function(){p.onCursorChange()})},this.$pos=c;var y=a.getUndoManager().$undoStack||a.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=y.length,this.setup(),a.selection.on("changeCursor",this.$onCursorChange)}return f.prototype.setup=function(){var a=this,s=this.doc,c=this.session;this.selectionBefore=c.selection.toJSON(),c.selection.inMultiSelectMode&&c.selection.toSingleRange(),this.pos=s.createAnchor(this.$pos.row,this.$pos.column);var h=this.pos;h.$insertRight=!0,h.detach(),h.markerId=c.addMarker(new d(h.row,h.column,h.row,h.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(o){var l=s.createAnchor(o.row,o.column);l.$insertRight=!0,l.detach(),a.others.push(l)}),c.setUndoSelect(!1)},f.prototype.showOtherMarkers=function(){if(!this.othersActive){var a=this.session,s=this;this.othersActive=!0,this.others.forEach(function(c){c.markerId=a.addMarker(new d(c.row,c.column,c.row,c.column+s.length),s.othersClass,null,!1)})}},f.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var a=0;a<this.others.length;a++)this.session.removeMarker(this.others[a].markerId)}},f.prototype.onUpdate=function(a){if(this.$updating)return this.updateAnchors(a);var s=a;if(s.start.row===s.end.row&&s.start.row===this.pos.row){this.$updating=!0;var c=a.action==="insert"?s.end.column-s.start.column:s.start.column-s.end.column,h=s.start.column>=this.pos.column&&s.start.column<=this.pos.column+this.length+1,o=s.start.column-this.pos.column;if(this.updateAnchors(a),h&&(this.length+=c),h&&!this.session.$fromUndo){if(a.action==="insert")for(var l=this.others.length-1;l>=0;l--){var p=this.others[l],y={row:p.row,column:p.column+o};this.doc.insertMergedLines(y,a.lines)}else if(a.action==="remove")for(var l=this.others.length-1;l>=0;l--){var p=this.others[l],y={row:p.row,column:p.column+o};this.doc.remove(new d(y.row,y.column,y.row,y.column-c))}}this.$updating=!1,this.updateMarkers()}},f.prototype.updateAnchors=function(a){this.pos.onChange(a);for(var s=this.others.length;s--;)this.others[s].onChange(a);this.updateMarkers()},f.prototype.updateMarkers=function(){if(!this.$updating){var a=this,s=this.session,c=function(o,l){s.removeMarker(o.markerId),o.markerId=s.addMarker(new d(o.row,o.column,o.row,o.column+a.length),l,null,!1)};c(this.pos,this.mainClass);for(var h=this.others.length;h--;)c(this.others[h],this.othersClass)}},f.prototype.onCursorChange=function(a){if(!(this.$updating||!this.session)){var s=this.session.selection.getCursor();s.row===this.pos.row&&s.column>=this.pos.column&&s.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",a)):(this.hideOtherMarkers(),this._emit("cursorLeave",a))}},f.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},f.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var a=this.session.getUndoManager(),s=(a.$undoStack||a.$undostack).length-this.$undoStackDepth,c=0;c<s;c++)a.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},f})();w.implement(u.prototype,g),r.PlaceHolder=u}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,r,m){var d=e("../lib/event"),g=e("../lib/useragent");function w(f,a){return f.row==a.row&&f.column==a.column}function u(f){var a=f.domEvent,s=a.altKey,c=a.shiftKey,h=a.ctrlKey,o=f.getAccelKey(),l=f.getButton();if(h&&g.isMac&&(l=a.button),f.editor.inMultiSelectMode&&l==2){f.editor.textInput.onContextMenu(f.domEvent);return}if(!h&&!s&&!o){l===0&&f.editor.inMultiSelectMode&&f.editor.exitMultiSelectMode();return}if(l===0){var p=f.editor,y=p.selection,x=p.inMultiSelectMode,E=f.getDocumentPosition(),$=y.getCursor(),_=f.inSelection()||y.isEmpty()&&w(E,$),C=f.x,L=f.y,D=function(Q){C=Q.clientX,L=Q.clientY},I=p.session,M=p.renderer.pixelToScreenCoordinates(C,L),W=M,z;if(p.$mouseHandler.$enableJumpToDef)h&&s||o&&s?z=c?"block":"add":s&&p.$blockSelectEnabled&&(z="block");else if(o&&!s){if(z="add",!x&&c)return}else s&&p.$blockSelectEnabled&&(z="block");if(z&&g.isMac&&a.ctrlKey&&p.$mouseHandler.cancelContextMenu(),z=="add"){if(!x&&_)return;if(!x){var O=y.toOrientedRange();p.addSelectionMarker(O)}var T=y.rangeList.rangeAtPoint(E);p.inVirtualSelectionMode=!0,c&&(T=null,O=y.ranges[0]||O,p.removeSelectionMarker(O)),p.once("mouseup",function(){var Q=y.toOrientedRange();T&&Q.isEmpty()&&w(T.cursor,Q.cursor)?y.substractPoint(Q.cursor):(c?y.substractPoint(O.cursor):O&&(p.removeSelectionMarker(O),y.addRange(O)),y.addRange(Q)),p.inVirtualSelectionMode=!1})}else if(z=="block"){f.stop(),p.inVirtualSelectionMode=!0;var A,N=[],B=function(){var Q=p.renderer.pixelToScreenCoordinates(C,L),le=I.screenToDocumentPosition(Q.row,Q.column,Q.offsetX);w(W,Q)&&w(le,y.lead)||(W=Q,p.selection.moveToPosition(le),p.renderer.scrollCursorIntoView(),p.removeSelectionMarkers(N),N=y.rectangularRangeBlock(W,M),p.$mouseHandler.$clickSelection&&N.length==1&&N[0].isEmpty()&&(N[0]=p.$mouseHandler.$clickSelection.clone()),N.forEach(p.addSelectionMarker,p),p.updateSelectionMarkers())};x&&!o?y.toSingleRange():!x&&o&&(A=y.toOrientedRange(),p.addSelectionMarker(A)),c?M=I.documentToScreenPosition(y.lead):y.moveToPosition(E),W={row:-1,column:-1};var U=function(Q){B(),clearInterval(J),p.removeSelectionMarkers(N),N.length||(N=[y.toOrientedRange()]),A&&(p.removeSelectionMarker(A),y.toSingleRange(A));for(var le=0;le<N.length;le++)y.addRange(N[le]);p.inVirtualSelectionMode=!1,p.$mouseHandler.$clickSelection=null},G=B;d.capture(p.container,D,U);var J=setInterval(function(){G()},20);return f.preventDefault()}}}r.onMouseDown=u}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,r,m){r.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(g){g.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(g){g.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(g){g.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(g){g.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(g){g.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(g){g.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(g){g.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(g){g.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(g){g.multiSelect.rangeCount>1?g.multiSelect.joinSelections():g.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(g){g.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(g){g.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(g){g.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],r.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(g){g.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(g){return g&&g.inMultiSelectMode}}];var d=e("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new d(r.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(e,r,m){var d=e("./range_list").RangeList,g=e("./range").Range,w=e("./selection").Selection,u=e("./mouse/multi_select_handler").onMouseDown,f=e("./lib/event"),a=e("./lib/lang"),s=e("./commands/multi_select_commands");r.commands=s.defaultCommands.concat(s.multiSelectCommands);var c=e("./search").Search,h=new c;function o($,_,C){return h.$options.wrap=!0,h.$options.needle=_,h.$options.backwards=C==-1,h.find($)}var l=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(l.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function($,_){if($){if(!this.inMultiSelectMode&&this.rangeCount===0){var C=this.toOrientedRange();if(this.rangeList.add(C),this.rangeList.add($),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),_||this.fromOrientedRange($);this.rangeList.removeAll(),this.rangeList.add(C),this.$onAddRange(C)}$.cursor||($.cursor=$.end);var L=this.rangeList.add($);return this.$onAddRange($),L.length&&this.$onRemoveRange(L),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),_||this.fromOrientedRange($)}},this.toSingleRange=function($){$=$||this.ranges[0];var _=this.rangeList.removeAll();_.length&&this.$onRemoveRange(_),$&&this.fromOrientedRange($)},this.substractPoint=function($){var _=this.rangeList.substractPoint($);if(_)return this.$onRemoveRange(_),_[0]},this.mergeOverlappingRanges=function(){var $=this.rangeList.merge();$.length&&this.$onRemoveRange($)},this.$onAddRange=function($){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift($),this._signal("addRange",{range:$})},this.$onRemoveRange=function($){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var _=this.rangeList.ranges.pop();$.push(_),this.rangeCount=0}for(var C=$.length;C--;){var L=this.ranges.indexOf($[C]);this.ranges.splice(L,1)}this._signal("removeRange",{ranges:$}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),_=_||this.ranges[0],_&&!_.isEqual(this.getRange())&&this.fromOrientedRange(_)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new d,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var $=this.ranges.length?this.ranges:[this.getRange()],_=[],C=0;C<$.length;C++){var L=$[C],D=L.start.row,I=L.end.row;if(D===I)_.push(L.clone());else{for(_.push(new g(D,L.start.column,D,this.session.getLine(D).length));++D<I;)_.push(this.getLineRange(D,!0));_.push(new g(I,0,I,L.end.column))}C==0&&!this.isBackwards()&&(_=_.reverse())}this.toSingleRange();for(var C=_.length;C--;)this.addRange(_[C])},this.joinSelections=function(){var $=this.rangeList.ranges,_=$[$.length-1],C=g.fromPoints($[0].start,_.end);this.toSingleRange(),this.setSelectionRange(C,_.cursor==_.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var $=this.rangeList.ranges,_=$[$.length-1],C=g.fromPoints($[0].start,_.end);this.toSingleRange(),this.setSelectionRange(C,_.cursor==_.start)}else{var L=this.session.documentToScreenPosition(this.cursor),D=this.session.documentToScreenPosition(this.anchor),I=this.rectangularRangeBlock(L,D);I.forEach(this.addRange,this)}},this.rectangularRangeBlock=function($,_,C){var L=[],D=$.column<_.column;if(D)var I=$.column,M=_.column,W=$.offsetX,z=_.offsetX;else var I=_.column,M=$.column,W=_.offsetX,z=$.offsetX;var O=$.row<_.row;if(O)var T=$.row,A=_.row;else var T=_.row,A=$.row;I<0&&(I=0),T<0&&(T=0),T==A&&(C=!0);for(var N,B=T;B<=A;B++){var U=g.fromPoints(this.session.screenToDocumentPosition(B,I,W),this.session.screenToDocumentPosition(B,M,z));if(U.isEmpty()){if(N&&y(U.end,N))break;N=U.end}U.cursor=D?U.start:U.end,L.push(U)}if(O&&L.reverse(),!C){for(var G=L.length-1;L[G].isEmpty()&&G>0;)G--;if(G>0)for(var J=0;L[J].isEmpty();)J++;for(var Q=G;Q>=J;Q--)L[Q].isEmpty()&&L.splice(Q,1)}return L}}).call(w.prototype);var p=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function($){$.cursor||($.cursor=$.end);var _=this.getSelectionStyle();return $.marker=this.session.addMarker($,"ace_selection",_),this.session.$selectionMarkers.push($),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,$},this.removeSelectionMarker=function($){if($.marker){this.session.removeMarker($.marker);var _=this.session.$selectionMarkers.indexOf($);_!=-1&&this.session.$selectionMarkers.splice(_,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function($){for(var _=this.session.$selectionMarkers,C=$.length;C--;){var L=$[C];if(L.marker){this.session.removeMarker(L.marker);var D=_.indexOf(L);D!=-1&&_.splice(D,1)}}this.session.selectionMarkerCount=_.length},this.$onAddRange=function($){this.addSelectionMarker($.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function($){this.removeSelectionMarkers($.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function($){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(s.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function($){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(s.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function($){var _=$.command,C=$.editor;if(C.multiSelect){if(_.multiSelectAction)_.multiSelectAction=="forEach"?L=C.forEachSelection(_,$.args):_.multiSelectAction=="forEachLine"?L=C.forEachSelection(_,$.args,!0):_.multiSelectAction=="single"?(C.exitMultiSelectMode(),L=_.exec(C,$.args||{})):L=_.multiSelectAction(C,$.args||{});else{var L=_.exec(C,$.args||{});C.multiSelect.addRange(C.multiSelect.toOrientedRange()),C.multiSelect.mergeOverlappingRanges()}return L}},this.forEachSelection=function($,_,C){if(!this.inVirtualSelectionMode){var L=C&&C.keepOrder,D=C==!0||C&&C.$byLines,I=this.session,M=this.selection,W=M.rangeList,z=(L?M:W).ranges,O;if(!z.length)return $.exec?$.exec(this,_||{}):$(this,_||{});var T=M._eventRegistry;M._eventRegistry={};var A=new w(I);this.inVirtualSelectionMode=!0;for(var N=z.length;N--;){if(D)for(;N>0&&z[N].start.row==z[N-1].end.row;)N--;A.fromOrientedRange(z[N]),A.index=N,this.selection=I.selection=A;var B=$.exec?$.exec(this,_||{}):$(this,_||{});!O&&B!==void 0&&(O=B),A.toOrientedRange(z[N])}A.detach(),this.selection=I.selection=M,this.inVirtualSelectionMode=!1,M._eventRegistry=T,M.mergeOverlappingRanges(),M.ranges[0]&&M.fromOrientedRange(M.ranges[0]);var U=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),U&&U.from==U.to&&this.renderer.animateScrolling(U.from),O}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var $="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var _=this.multiSelect.rangeList.ranges,C=[],L=0;L<_.length;L++)C.push(this.session.getTextRange(_[L]));var D=this.session.getDocument().getNewLineCharacter();$=C.join(D),$.length==(C.length-1)*D.length&&($="")}else this.selection.isEmpty()||($=this.session.getTextRange(this.getSelectionRange()));return $},this.$checkMultiselectChange=function($,_){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var C=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&_==this.multiSelect.anchor)return;var L=_==this.multiSelect.anchor?C.cursor==C.start?C.end:C.start:C.cursor;L.row!=_.row||this.session.$clipPositionToDocument(L.row,L.column).column!=_.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function($,_,C){if(_=_||{},_.needle=$||_.needle,_.needle==null){var L=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();_.needle=this.session.getTextRange(L)}this.$search.set(_);var D=this.$search.findAll(this.session);if(!D.length)return 0;var I=this.multiSelect;C||I.toSingleRange(D[0]);for(var M=D.length;M--;)I.addRange(D[M],!0);return L&&I.rangeList.rangeAtPoint(L.start)&&I.addRange(L,!0),D.length},this.selectMoreLines=function($,_){var C=this.selection.toOrientedRange(),L=C.cursor==C.end,D=this.session.documentToScreenPosition(C.cursor);this.selection.$desiredColumn&&(D.column=this.selection.$desiredColumn);var I=this.session.screenToDocumentPosition(D.row+$,D.column);if(C.isEmpty())var W=I;else var M=this.session.documentToScreenPosition(L?C.end:C.start),W=this.session.screenToDocumentPosition(M.row+$,M.column);if(L){var z=g.fromPoints(I,W);z.cursor=z.start}else{var z=g.fromPoints(W,I);z.cursor=z.end}if(z.desiredColumn=D.column,!this.selection.inMultiSelectMode)this.selection.addRange(C);else if(_)var O=C.cursor;this.selection.addRange(z),O&&this.selection.substractPoint(O)},this.transposeSelections=function($){for(var _=this.session,C=_.multiSelect,L=C.ranges,D=L.length;D--;){var I=L[D];if(I.isEmpty()){var M=_.getWordRange(I.start.row,I.start.column);I.start.row=M.start.row,I.start.column=M.start.column,I.end.row=M.end.row,I.end.column=M.end.column}}C.mergeOverlappingRanges();for(var W=[],D=L.length;D--;){var I=L[D];W.unshift(_.getTextRange(I))}$<0?W.unshift(W.pop()):W.push(W.shift());for(var D=L.length;D--;){var I=L[D],z=I.clone();_.replace(I,W[D]),I.start.row=z.start.row,I.start.column=z.start.column}C.fromOrientedRange(C.ranges[0])},this.selectMore=function($,_,C){var L=this.session,D=L.multiSelect,I=D.toOrientedRange();if(!(I.isEmpty()&&(I=L.getWordRange(I.start.row,I.start.column),I.cursor=$==-1?I.start:I.end,this.multiSelect.addRange(I),C))){var M=L.getTextRange(I),W=o(L,M,$);W&&(W.cursor=$==-1?W.start:W.end,this.session.unfold(W),this.multiSelect.addRange(W),this.renderer.scrollCursorIntoView(null,.5)),_&&this.multiSelect.substractPoint(I.cursor)}},this.alignCursors=function(){var $=this.session,_=$.multiSelect,C=_.ranges,L=-1,D=C.filter(function(G){if(G.cursor.row==L)return!0;L=G.cursor.row});if(!C.length||D.length==C.length-1){var I=this.selection.getRange(),M=I.start.row,W=I.end.row,z=M==W;if(z){var O=this.session.getLength(),T;do T=this.session.getLine(W);while(/[=:]/.test(T)&&++W<O);do T=this.session.getLine(M);while(/[=:]/.test(T)&&--M>0);M<0&&(M=0),W>=O&&(W=O-1)}var A=this.session.removeFullLines(M,W);A=this.$reAlignText(A,z),this.session.insert({row:M,column:0},A.join(`
954
+ `)+`
955
+ `),z||(I.start.column=0,I.end.column=A[A.length-1].length),this.selection.setRange(I)}else{D.forEach(function(G){_.substractPoint(G.cursor)});var N=0,B=1/0,U=C.map(function(G){var J=G.cursor,Q=$.getLine(J.row),le=Q.substr(J.column).search(/\S/g);return le==-1&&(le=0),J.column>N&&(N=J.column),le<B&&(B=le),le});C.forEach(function(G,J){var Q=G.cursor,le=N-Q.column,re=U[J]-B;le>re?$.insert(Q,a.stringRepeat(" ",le-re)):$.remove(new g(Q.row,Q.column,Q.row,Q.column-le+re)),G.start.column=G.end.column=N,G.start.row=G.end.row=Q.row,G.cursor=G.end}),_.fromOrientedRange(C[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function($,_){var C=!0,L=!0,D,I,M;return $.map(function(A){var N=A.match(/(\s*)(.*?)(\s*)([=:].*)/);return N?D==null?(D=N[1].length,I=N[2].length,M=N[3].length,N):(D+I+M!=N[1].length+N[2].length+N[3].length&&(L=!1),D!=N[1].length&&(C=!1),D>N[1].length&&(D=N[1].length),I<N[2].length&&(I=N[2].length),M>N[3].length&&(M=N[3].length),N):[A]}).map(_?z:C?L?O:z:T);function W(A){return a.stringRepeat(" ",A)}function z(A){return A[2]?W(D)+A[2]+W(I-A[2].length+M)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}function O(A){return A[2]?W(D+I-A[2].length)+A[2]+W(M)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}function T(A){return A[2]?W(D)+A[2]+W(M)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}}}).call(p.prototype);function y($,_){return $.row==_.row&&$.column==_.column}r.onSessionChange=function($){var _=$.session;_&&!_.multiSelect&&(_.$selectionMarkers=[],_.selection.$initRangeList(),_.multiSelect=_.selection),this.multiSelect=_&&_.multiSelect;var C=$.oldSession;C&&(C.multiSelect.off("addRange",this.$onAddRange),C.multiSelect.off("removeRange",this.$onRemoveRange),C.multiSelect.off("multiSelect",this.$onMultiSelect),C.multiSelect.off("singleSelect",this.$onSingleSelect),C.multiSelect.lead.off("change",this.$checkMultiselectChange),C.multiSelect.anchor.off("change",this.$checkMultiselectChange)),_&&(_.multiSelect.on("addRange",this.$onAddRange),_.multiSelect.on("removeRange",this.$onRemoveRange),_.multiSelect.on("multiSelect",this.$onMultiSelect),_.multiSelect.on("singleSelect",this.$onSingleSelect),_.multiSelect.lead.on("change",this.$checkMultiselectChange),_.multiSelect.anchor.on("change",this.$checkMultiselectChange)),_&&this.inMultiSelectMode!=_.selection.inMultiSelectMode&&(_.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function x($){$.$multiselectOnSessionChange||($.$onAddRange=$.$onAddRange.bind($),$.$onRemoveRange=$.$onRemoveRange.bind($),$.$onMultiSelect=$.$onMultiSelect.bind($),$.$onSingleSelect=$.$onSingleSelect.bind($),$.$multiselectOnSessionChange=r.onSessionChange.bind($),$.$checkMultiselectChange=$.$checkMultiselectChange.bind($),$.$multiselectOnSessionChange($),$.on("changeSession",$.$multiselectOnSessionChange),$.on("mousedown",u),$.commands.addCommands(s.defaultCommands),E($))}function E($){if(!$.textInput)return;var _=$.textInput.getElement(),C=!1;f.addListener(_,"keydown",function(D){var I=D.keyCode==18&&!(D.ctrlKey||D.shiftKey||D.metaKey);$.$blockSelectEnabled&&I?C||($.renderer.setMouseCursor("crosshair"),C=!0):C&&L()},$),f.addListener(_,"keyup",L,$),f.addListener(_,"blur",L,$);function L(D){C&&($.renderer.setMouseCursor(""),C=!1)}}r.MultiSelect=x,e("./config").defineOptions(p.prototype,"editor",{enableMultiselect:{set:function($){x(this),$?this.on("mousedown",u):this.off("mousedown",u)},value:!0},enableBlockSelect:{set:function($){this.$blockSelectEnabled=$},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,r,m){var d=e("../../range").Range,g=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(w,u,f){var a=w.getLine(f);return this.foldingStartMarker.test(a)?"start":u=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(a)?"end":""},this.getFoldWidgetRange=function(w,u,f){return null},this.indentationBlock=function(w,u,f){var a=/\S/,s=w.getLine(u),c=s.search(a);if(c!=-1){for(var h=f||s.length,o=w.getLength(),l=u,p=u;++u<o;){var y=w.getLine(u).search(a);if(y!=-1){if(y<=c){var x=w.getTokenAt(u,0);if(!x||x.type!=="string")break}p=u}}if(p>l){var E=w.getLine(p).length;return new d(l,h,p,E)}}},this.openingBracketBlock=function(w,u,f,a,s){var c={row:f,column:a+1},h=w.$findClosingBracket(u,c,s);if(h){var o=w.foldWidgets[h.row];return o==null&&(o=w.getFoldWidget(h.row)),o=="start"&&h.row>c.row&&(h.row--,h.column=w.getLine(h.row).length),d.fromPoints(c,h)}},this.closingBracketBlock=function(w,u,f,a,s){var c={row:f,column:a},h=w.$findOpeningBracket(u,c);if(h)return h.column++,c.column--,d.fromPoints(h,c)}}).call(g.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(e,r,m){var d=e("../lib/dom"),g=e("../range").Range,w=e("../config").nls;function u(a,s,c){for(var h=0,o=a.length-1;h<=o;){var l=h+o>>1,p=c(s,a[l]);if(p>0)h=l+1;else if(p<0)o=l-1;else return l}return-(h+1)}function f(a,s,c){var h=a.getAnnotations().sort(g.comparePoints);if(h.length){var o=u(h,{row:s,column:-1},g.comparePoints);o<0&&(o=-o-1),o>=h.length?o=c>0?0:h.length-1:o===0&&c<0&&(o=h.length-1);var l=h[o];if(!(!l||!c)){if(l.row===s){do l=h[o+=c];while(l&&l.row===s);if(!l)return h.slice()}var p=[];s=l.row;do p[c<0?"unshift":"push"](l),l=h[o+=c];while(l&&l.row==s);return p.length&&p}}}r.showErrorMarker=function(a,s){var c=a.session,h=a.getCursorPosition(),o=h.row,l=c.widgetManager.getWidgetsAtRow(o).filter(function(D){return D.type=="errorMarker"})[0];l?l.destroy():o-=s;var p=f(c,o,s),y;if(p){var x=p[0];h.column=(x.pos&&typeof x.column!="number"?x.pos.sc:x.column)||0,h.row=x.row,y=a.renderer.$gutterLayer.$annotations[h.row]}else{if(l)return;y={displayText:[w("error-marker.good-state","Looks good!")],className:"ace_ok"}}a.session.unfold(h.row),a.selection.moveToPosition(h);var E={row:h.row,fixedWidth:!0,coverGutter:!0,el:d.createElement("div"),type:"errorMarker"},$=E.el.appendChild(d.createElement("div")),_=E.el.appendChild(d.createElement("div"));_.className="error_widget_arrow "+y.className;var C=a.renderer.$cursorLayer.getPixelPosition(h).left;_.style.left=C+a.renderer.gutterWidth-5+"px",E.el.className="error_widget_wrapper",$.className="error_widget "+y.className,y.displayText.forEach(function(D,I){$.appendChild(d.createTextNode(D)),I<y.displayText.length-1&&$.appendChild(d.createElement("br"))}),$.appendChild(d.createElement("div"));var L=function(D,I,M){if(I===0&&(M==="esc"||M==="return"))return E.destroy(),{command:"null"}};E.destroy=function(){a.$mouseHandler.isMousePressed||(a.keyBinding.removeKeyboardHandler(L),c.widgetManager.removeLineWidget(E),a.off("changeSelection",E.destroy),a.off("changeSession",E.destroy),a.off("mouseup",E.destroy),a.off("change",E.destroy))},a.keyBinding.addKeyboardHandler(L),a.on("changeSelection",E.destroy),a.on("changeSession",E.destroy),a.on("mouseup",E.destroy),a.on("change",E.destroy),a.session.widgetManager.addLineWidget(E),E.el.onmousedown=a.focus.bind(a),a.renderer.scrollCursorIntoView(null,.5,{bottom:E.el.offsetHeight})},d.importCssString(`
956
+ .error_widget_wrapper {
957
+ background: inherit;
958
+ color: inherit;
959
+ border:none
960
+ }
961
+ .error_widget {
962
+ border-top: solid 2px;
963
+ border-bottom: solid 2px;
964
+ margin: 5px 0;
965
+ padding: 10px 40px;
966
+ white-space: pre-wrap;
967
+ }
968
+ .error_widget.ace_error, .error_widget_arrow.ace_error{
969
+ border-color: #ff5a5a
970
+ }
971
+ .error_widget.ace_warning, .error_widget_arrow.ace_warning{
972
+ border-color: #F1D817
973
+ }
974
+ .error_widget.ace_info, .error_widget_arrow.ace_info{
975
+ border-color: #5a5a5a
976
+ }
977
+ .error_widget.ace_ok, .error_widget_arrow.ace_ok{
978
+ border-color: #5aaa5a
979
+ }
980
+ .error_widget_arrow {
981
+ position: absolute;
982
+ border: solid 5px;
983
+ border-top-color: transparent!important;
984
+ border-right-color: transparent!important;
985
+ border-left-color: transparent!important;
986
+ top: -5px;
987
+ }
988
+ `,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(e,r,m){e("./loader_build")(r);var d=e("./lib/dom"),g=e("./range").Range,w=e("./editor").Editor,u=e("./edit_session").EditSession,f=e("./undomanager").UndoManager,a=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),r.config=e("./config"),r.edit=function(c,h){if(typeof c=="string"){var o=c;if(c=document.getElementById(o),!c)throw new Error("ace.edit can't find div #"+o)}if(c&&c.env&&c.env.editor instanceof w)return c.env.editor;var l="";if(c&&/input|textarea/i.test(c.tagName)){var p=c;l=p.value,c=d.createElement("pre"),p.parentNode.replaceChild(c,p)}else c&&(l=c.textContent,c.innerHTML="");var y=r.createEditSession(l),x=new w(new a(c),y,h),E={document:y,editor:x,onResize:x.resize.bind(x,null)};return p&&(E.textarea=p),x.on("destroy",function(){E.editor.container.env=null}),x.container.env=x.env=E,x},r.createEditSession=function(c,h){var o=new u(c,h);return o.setUndoManager(new f),o},r.Range=g,r.Editor=w,r.EditSession=u,r.UndoManager=f,r.VirtualRenderer=a;var s=r.config.version;r.version=s}),(function(){ace.require(["ace/ace"],function(e){e&&(e.config.init(!0),e.define=ace.define);var r=(function(){return this})();!r&&typeof window<"u"&&(r=window),!r&&typeof self<"u"&&(r=self),r.ace||(r.ace=e);for(var m in e)e.hasOwnProperty(m)&&(r.ace[m]=e[m]);r.ace.default=r.ace,t&&(t.exports=r.ace)})})()})(vg)),vg.exports}var PD=Hn("m",K_()),bg={exports:{}},wg;function Y_(){return wg||(wg=1,(function(t,n){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,m){var d=e("../lib/oop"),g=e("./text_highlight_rules").TextHighlightRules,w=r.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};r.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},r.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},r.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var u=r.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},f=r.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},a=r.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},s=r.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},c=r.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},h=r.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},o=r.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},l=r.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},p=function(){var y="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",x="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",E="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",$="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",_=this.$keywords=this.createKeywordMapper({keyword:x,"constant.language":E,"variable.language":$,"support.function":y,"invalid.deprecated":"debugger"},"identifier"),C=`\\\\(?: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})*})`,L={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};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:C},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:C},{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(D,I,M){M.length&&(M=[]);var W=D[D.length-1];return M.unshift(W,I),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(D,I,M){M.length&&(M=[]);var W=D[D.length-1];return M.unshift(W,I),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(D,I,M){M.length&&(M=[]);var W=D[D.length-1];return M.unshift(W,I),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(D,I,M){M.length&&(M=[]);var W=D[D.length-1];return M.unshift(W,I),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(D,I,M){M.length&&(M=[]);var W=D[D.length-1];return M.unshift(W,I),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},l,{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\\?(?:"+C+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},c,h,w,u,o,f,a,s,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:_,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(D,I,M){var W=D[2]=="-"||D[2]=="~"?"indentedHeredoc":"heredoc",z=D.split(this.splitRegex);return M.push(W,z[3]),[{type:"constant",value:z[1]},{type:"string",value:z[2]},{type:"support.class",value:z[3]},{type:"string",value:z[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(D,I,M){return D===M[1]?(M.shift(),M.shift(),this.next=M[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(D,I,M){return D===M[1]?(M.shift(),M.shift(),this.next=M[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(D,I){return I[0]==="heredoc"||I[0]==="indentedHeredoc"?I[0]:D}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(D,I,M){return this.next="",D=="}"&&M.length>1&&M[1]!="start"&&(M.shift(),this.next=M.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(D,I,M){return M.length&&D===M[0]?(M.unshift(D,I),this.token):"string"}},{token:"constant.language.escape",regex:C},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(D,I,M){return M.length&&D===L[M[0]]?(M.shift(),this.next=M.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(D,I,M){return M.length&&D===M[0]?(M.unshift(D,I),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(D,I,M){return M.length&&D===L[M[0]]?(M.shift(),this.next=M.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(D,I,M){return M.length&&D===M[0]?(M.unshift(D,I),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(D,I,M){return M.length&&D===L[M[0]]?(M.shift(),this.next=M.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(D,I,M){return M.length&&D===M[0]?(M.unshift(D,I),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:C},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(D,I,M){return M.length&&D===L[M[0]]?(M.shift(),this.next=M.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(D,I,M){return M.length&&D===M[0]?(M.unshift(D,I),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(D,I,M){return M.length&&D[0]===L[M[0]]?(M.shift(),this.next=M.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()};d.inherits(p,g),r.RubyHighlightRules=p}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,m){var d=e("../range").Range,g=function(){};(function(){this.checkOutdent=function(w,u){return/^\s+$/.test(w)?/^\s*\}/.test(u):!1},this.autoOutdent=function(w,u){var f=w.getLine(u),a=f.match(/^(\s*\})/);if(!a)return 0;var s=a[1].length,c=w.findMatchingBracket({row:u,column:s});if(!c||c.row==u)return 0;var h=this.$getIndent(w.getLine(c.row));w.replace(new d(u,0,u,s-1),h)},this.$getIndent=function(w){return w.match(/^\s*/)[0]}}).call(g.prototype),r.MatchingBraceOutdent=g}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,r,m){var d=e("../../lib/oop"),g=e("./fold_mode").FoldMode,w=e("../../range").Range,u=e("../../token_iterator").TokenIterator,f=r.FoldMode=function(){};d.inherits(f,g),(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(a,s,c){var h=a.getLine(c),o=this.foldingStartMarker.test(h),l=this.foldingStopMarker.test(h);if(o&&!l){var p=h.match(this.foldingStartMarker);if(p[1]){if((p[1]=="if"||p[1]=="else"||p[1]=="while"||p[1]=="until"||p[1]=="unless")&&(p[1]=="else"&&/^\s*else\s*$/.test(h)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(h)===!1)||p[1]=="when"&&/\sthen\s/.test(h)===!0)return;if(a.getTokenAt(c,p.index+2).type==="keyword")return"start"}else if(!p[3]||a.getTokenAt(c,p.index+1).type==="comment.multiline")return"start"}if(s!="markbeginend"||!l||o&&l)return"";var p=h.match(this.foldingStopMarker);if(p[3]==="end"){if(a.getTokenAt(c,p.index+1).type==="keyword")return"end"}else if(!p[1]||a.getTokenAt(c,p.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(a,s,c){var h=a.doc.getLine(c),o=this.foldingStartMarker.exec(h);if(o)return o[1]||o[3]?this.rubyBlock(a,c,o.index+2):this.openingBracketBlock(a,"{",c,o.index);var o=this.foldingStopMarker.exec(h);if(o)return o[3]==="end"&&a.getTokenAt(c,o.index+1).type==="keyword"?this.rubyBlock(a,c,o.index+1):o[1]==="=end"&&a.getTokenAt(c,o.index+1).type==="comment.multiline"?this.rubyBlock(a,c,o.index+1):this.closingBracketBlock(a,"}",c,o.index+o[0].length)},this.rubyBlock=function(a,s,c,h){var o=new u(a,s,c),l=o.getCurrentToken();if(!(!l||l.type!="keyword"&&l.type!="comment.multiline")){var p=l.value,y=a.getLine(s);switch(l.value){case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+l.value);if(!x.test(y))return;var E=this.indentKeywords[p];break;case"when":if(/\sthen\s/.test(y))return;case"elsif":case"rescue":case"ensure":var E=1;break;case"else":var x=new RegExp("^\\s*"+l.value+"\\s*$");if(!x.test(y))return;var E=1;break;default:var E=this.indentKeywords[p]}var $=[p];if(E){var _=E===-1?a.getLine(s-1).length:a.getLine(s).length,C=s,L=[];if(L.push(o.getCurrentTokenRange()),o.step=E===-1?o.stepBackward:o.stepForward,l.type=="comment.multiline"){for(;l=o.step();)if(l.type==="comment.multiline"){if(E==1){if(_=6,l.value=="=end")break}else if(l.value=="=begin")break}}else for(;l=o.step();){var D=!1;if(l.type==="keyword"){var I=E*this.indentKeywords[l.value];switch(y=a.getLine(o.getCurrentTokenRow()),l.value){case"do":for(var M=o.$tokenIndex-1;M>=0;M--){var W=o.$rowTokens[M];if(W&&(W.value=="while"||W.value=="until"||W.value=="for")){I=0;break}}break;case"else":var x=new RegExp("^\\s*"+l.value+"\\s*$");(!x.test(y)||p=="case")&&(I=0,D=!0);break;case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+l.value);x.test(y)||(I=0,D=!0);break;case"when":(/\sthen\s/.test(y)||p=="case")&&(I=0,D=!0)}if(I>0)$.unshift(l.value);else if(I<=0&&D===!1){if($.shift(),!$.length&&((p=="while"||p=="until"||p=="for")&&l.value!="do"||l.value=="do"&&E==-1&&I!=0||l.value!="do"))break;I===0&&$.unshift(l.value)}}}if(!l)return null;if(h)return L.push(o.getCurrentTokenRange()),L;var s=o.getCurrentTokenRow();if(E===-1){if(l.type==="comment.multiline")var z=6;else var z=a.getLine(s).length;return new w(s,z,C-1,_)}return new w(C,_,s-1,a.getLine(s-1).length)}}}}).call(f.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(e,r,m){var d=e("../lib/oop"),g=e("./text").Mode,w=e("./ruby_highlight_rules").RubyHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,f=e("../range").Range,a=e("./folding/ruby").FoldMode,s=function(){this.HighlightRules=w,this.$outdent=new u,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new a,this.indentKeywords=this.foldingRules.indentKeywords};d.inherits(s,g),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(c,h,o){var l=this.$getIndent(h),p=this.getTokenizer().getLineTokens(h,c),y=p.tokens;if(y.length&&y[y.length-1].type=="comment")return l;if(c=="start"){var x=h.match(/^.*[\{\(\[]\s*$/),E=h.match(/^\s*(class|def|module)\s.*$/),$=h.match(/.*do(\s*|\s+\|.*\|\s*)$/),_=h.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(x||E||$||_)&&(l+=o)}return l},this.checkOutdent=function(c,h,o){return/^\s+(end|else|rescue|ensure)$/.test(h+o)||this.$outdent.checkOutdent(h,o)},this.autoOutdent=function(c,h,o){var l=h.getLine(o);if(/}/.test(l))return this.$outdent.autoOutdent(h,o);var p=this.$getIndent(l),y=h.getLine(o-1),x=this.$getIndent(y),E=h.getTabString();x.length<=p.length&&p.slice(-E.length)==E&&h.remove(new f(o,p.length-E.length,o,p.length))},this.getMatching=function(c,h,o){if(h==null){var l=c.selection.lead;o=l.column,h=l.row}var p=c.getTokenAt(h,o);if(p&&p.value in this.indentKeywords)return this.foldingRules.rubyBlock(c,h,o,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(s.prototype),r.Mode=s}),(function(){ace.require(["ace/mode/ruby"],function(e){t&&(t.exports=e)})})()})(bg)),bg.exports}Y_();var xg={exports:{}},Cg;function J_(){return Cg||(Cg=1,(function(t,n){ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,m){var d=e("../lib/oop"),g=e("./text_highlight_rules").TextHighlightRules,w=function(){var u="and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield|async|await|nonlocal",f="True|False|None|NotImplemented|Ellipsis|__debug__",a="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|bin|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|apply|delattr|help|next|setattr|set|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern|ascii|breakpoint|bytes",s=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":a,"variable.language":"self|cls","constant.language":f,keyword:u},"identifier"),c="[uU]?",h="[rR]",o="[fF]",l="(?:[rR][fF]|[fF][rR])",p="(?:(?:[1-9]\\d*)|(?:0))",y="(?:0[oO]?[0-7]+)",x="(?:0[xX][\\dA-Fa-f]+)",E="(?:0[bB][01]+)",$="(?:"+p+"|"+y+"|"+x+"|"+E+")",_="(?:[eE][+-]?\\d+)",C="(?:\\.\\d+)",L="(?:\\d+)",D="(?:(?:"+L+"?"+C+")|(?:"+L+"\\.))",I="(?:(?:"+D+"|"+L+")"+_+")",M="(?:"+I+"|"+D+")",W=`\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})`;this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:c+'"{3}',next:"qqstring3"},{token:"string",regex:c+'"(?=.)',next:"qqstring"},{token:"string",regex:c+"'{3}",next:"qstring3"},{token:"string",regex:c+"'(?=.)",next:"qstring"},{token:"string",regex:h+'"{3}',next:"rawqqstring3"},{token:"string",regex:h+'"(?=.)',next:"rawqqstring"},{token:"string",regex:h+"'{3}",next:"rawqstring3"},{token:"string",regex:h+"'(?=.)",next:"rawqstring"},{token:"string",regex:o+'"{3}',next:"fqqstring3"},{token:"string",regex:o+'"(?=.)',next:"fqqstring"},{token:"string",regex:o+"'{3}",next:"fqstring3"},{token:"string",regex:o+"'(?=.)",next:"fqstring"},{token:"string",regex:l+'"{3}',next:"rfqqstring3"},{token:"string",regex:l+'"(?=.)',next:"rfqqstring"},{token:"string",regex:l+"'{3}",next:"rfqstring3"},{token:"string",regex:l+"'(?=.)",next:"rfqstring"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|@|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"punctuation",regex:",|:|;|\\->|\\+=|\\-=|\\*=|\\/=|\\/\\/=|%=|@=|&=|\\|=|^=|>>=|<<=|\\*\\*="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:["keyword","text","entity.name.function"],regex:"(def|class)(\\s+)([\\u00BF-\\u1FFF\\u2C00-\\uD7FF\\w]+)"},{token:"text",regex:"\\s+"},{include:"constants"}],qqstring3:[{token:"constant.language.escape",regex:W},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:W},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:W},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:W},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],rawqqstring3:[{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],rawqstring3:[{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],rawqqstring:[{token:"string",regex:"\\\\$",next:"rawqqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],rawqstring:[{token:"string",regex:"\\\\$",next:"rawqstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],fqqstring3:[{token:"constant.language.escape",regex:W},{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring3:[{token:"constant.language.escape",regex:W},{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqqstring:[{token:"constant.language.escape",regex:W},{token:"string",regex:"\\\\$",next:"fqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring:[{token:"constant.language.escape",regex:W},{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring3:[{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring3:[{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring:[{token:"string",regex:"\\\\$",next:"rfqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring:[{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstringParRules:[{token:"paren.lparen",regex:"[\\[\\(]"},{token:"paren.rparen",regex:"[\\]\\)]"},{token:"string",regex:"\\s+"},{token:"string",regex:"'[^']*'"},{token:"string",regex:'"[^"]*"'},{token:"function.support",regex:"(!s|!r|!a)"},{include:"constants"},{token:"paren.rparen",regex:"}",next:"pop"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"}],constants:[{token:"constant.numeric",regex:"(?:"+M+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:M},{token:"constant.numeric",regex:$+"[lL]\\b"},{token:"constant.numeric",regex:$+"\\b"},{token:["punctuation","function.support"],regex:"(\\.)([a-zA-Z_]+)\\b"},{token:s,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};d.inherits(w,g),r.PythonHighlightRules=w}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,r,m){var d=e("../../lib/oop"),g=e("./fold_mode").FoldMode,w=r.FoldMode=function(u){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+u+")(?:\\s*)(?:#.*)?$")};d.inherits(w,g),(function(){this.getFoldWidgetRange=function(u,f,a){var s=u.getLine(a),c=s.match(this.foldingStartMarker);if(c)return c[1]?this.openingBracketBlock(u,c[1],a,c.index):c[2]?this.indentationBlock(u,a,c.index+c[2].length):this.indentationBlock(u,a)}}).call(w.prototype)}),ace.define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"],function(e,r,m){var d=e("../lib/oop"),g=e("./text").Mode,w=e("./python_highlight_rules").PythonHighlightRules,u=e("./folding/pythonic").FoldMode,f=e("../range").Range,a=function(){this.HighlightRules=w,this.foldingRules=new u("\\:"),this.$behaviour=this.$defaultBehaviour};d.inherits(a,g),(function(){this.lineCommentStart="#",this.$pairQuotesAfter={"'":/[ruf]/i,'"':/[ruf]/i},this.getNextLineIndent=function(c,h,o){var l=this.$getIndent(h),p=this.getTokenizer().getLineTokens(h,c),y=p.tokens;if(y.length&&y[y.length-1].type=="comment")return l;if(c=="start"){var x=h.match(/^.*[\{\(\[:]\s*$/);x&&(l+=o)}return l};var s={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(c,h,o){if(o!==`\r
989
+ `&&o!=="\r"&&o!==`
990
+ `)return!1;var l=this.getTokenizer().getLineTokens(h.trim(),c).tokens;if(!l)return!1;do var p=l.pop();while(p&&(p.type=="comment"||p.type=="text"&&p.value.match(/^\s+$/)));return p?p.type=="keyword"&&s[p.value]:!1},this.autoOutdent=function(c,h,o){o+=1;var l=this.$getIndent(h.getLine(o)),p=h.getTabString();l.slice(-p.length)==p&&h.remove(new f(o,l.length-p.length,o,l.length))},this.$id="ace/mode/python",this.snippetFileId="ace/snippets/python"}).call(a.prototype),r.Mode=a}),(function(){ace.require(["ace/mode/python"],function(e){t&&(t.exports=e)})})()})(xg)),xg.exports}J_();var _g={exports:{}},Ag;function Z_(){return Ag||(Ag=1,(function(t,n){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,m){var d=e("../lib/oop"),g=e("./text_highlight_rules").TextHighlightRules,w=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};d.inherits(w,g),r.JsonHighlightRules=w}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,m){var d=e("../range").Range,g=function(){};(function(){this.checkOutdent=function(w,u){return/^\s+$/.test(w)?/^\s*\}/.test(u):!1},this.autoOutdent=function(w,u){var f=w.getLine(u),a=f.match(/^(\s*\})/);if(!a)return 0;var s=a[1].length,c=w.findMatchingBracket({row:u,column:s});if(!c||c.row==u)return 0;var h=this.$getIndent(w.getLine(c.row));w.replace(new d(u,0,u,s-1),h)},this.$getIndent=function(w){return w.match(/^\s*/)[0]}}).call(g.prototype),r.MatchingBraceOutdent=g}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,m){var d=e("../../lib/oop"),g=e("../../range").Range,w=e("./fold_mode").FoldMode,u=r.FoldMode=function(f){f&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+f.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+f.end)))};d.inherits(u,w),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(f,a,s){var c=f.getLine(s);if(this.singleLineBlockCommentRe.test(c)&&!this.startRegionRe.test(c)&&!this.tripleStarBlockCommentRe.test(c))return"";var h=this._getFoldWidgetBase(f,a,s);return!h&&this.startRegionRe.test(c)?"start":h},this.getFoldWidgetRange=function(f,a,s,c){var h=f.getLine(s);if(this.startRegionRe.test(h))return this.getCommentRegionBlock(f,h,s);var o=h.match(this.foldingStartMarker);if(o){var l=o.index;if(o[1])return this.openingBracketBlock(f,o[1],s,l);var p=f.getCommentFoldRange(s,l+o[0].length,1);return p&&!p.isMultiLine()&&(c?p=this.getSectionRange(f,s):a!="all"&&(p=null)),p}if(a!=="markbegin"){var o=h.match(this.foldingStopMarker);if(o){var l=o.index+o[0].length;return o[1]?this.closingBracketBlock(f,o[1],s,l):f.getCommentFoldRange(s,l,-1)}}},this.getSectionRange=function(f,a){var s=f.getLine(a),c=s.search(/\S/),h=a,o=s.length;a+=1;for(var l=a,p=f.getLength();++a<p;){s=f.getLine(a);var y=s.search(/\S/);if(y!==-1){if(c>y)break;var x=this.getFoldWidgetRange(f,"all",a);if(x){if(x.start.row<=h)break;if(x.isMultiLine())a=x.end.row;else if(c==y)break}l=a}}return new g(h,o,l,f.getLine(l).length)},this.getCommentRegionBlock=function(f,a,s){for(var c=a.search(/\s*$/),h=f.getLength(),o=s,l=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,p=1;++s<h;){a=f.getLine(s);var y=l.exec(a);if(y&&(y[1]?p--:p++,!p))break}var x=s;if(x>o)return new g(o,c,x,a.length)}}).call(u.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle","ace/worker/worker_client"],function(e,r,m){var d=e("../lib/oop"),g=e("./text").Mode,w=e("./json_highlight_rules").JsonHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,f=e("./folding/cstyle").FoldMode,a=e("../worker/worker_client").WorkerClient,s=function(){this.HighlightRules=w,this.$outdent=new u,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new f};d.inherits(s,g),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(c,h,o){var l=this.$getIndent(h);if(c=="start"){var p=h.match(/^.*[\{\(\[]\s*$/);p&&(l+=o)}return l},this.checkOutdent=function(c,h,o){return this.$outdent.checkOutdent(h,o)},this.autoOutdent=function(c,h,o){this.$outdent.autoOutdent(h,o)},this.createWorker=function(c){var h=new a(["ace"],"ace/mode/json_worker","JsonWorker");return h.attachToDocument(c.getDocument()),h.on("annotate",function(o){c.setAnnotations(o.data)}),h.on("terminate",function(){c.clearAnnotations()}),h},this.$id="ace/mode/json"}).call(s.prototype),r.Mode=s}),(function(){ace.require(["ace/mode/json"],function(e){t&&(t.exports=e)})})()})(_g)),_g.exports}Z_();var kg={exports:{}},Sg;function X_(){return Sg||(Sg=1,(function(t,n){ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,r,m){var d=e("../lib/oop");e("../lib/lang");var g=e("./text_highlight_rules").TextHighlightRules,w=r.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",u=r.supportFunction="rgb|rgba|url|attr|counter|counters",f=r.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",a=r.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",s=r.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=r.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=r.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",o=r.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",l=function(){var p=this.createKeywordMapper({"support.function":u,"support.constant":f,"support.type":w,"support.constant.color":a,"support.constant.fonts":s},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:o},{include:"url"},{token:p,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};d.inherits(l,g),r.CssHighlightRules=l}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,m){var d=e("../lib/oop"),g=e("./text_highlight_rules").TextHighlightRules,w=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},w.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};d.inherits(w,g),w.getTagRule=function(u){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},w.getStartRule=function(u){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:u}},w.getEndRule=function(u){return{token:"comment.doc",regex:"\\*\\/",next:u}},r.JsDocCommentHighlightRules=w}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,r,m){function d(){var c=a.replace("\\d","\\d\\-"),h={onMatch:function(l,p,y){var x=l.charAt(1)=="/"?2:1;return x==1?(p!=this.nextState?y.unshift(this.next,this.nextState,0):y.unshift(this.next),y[2]++):x==2&&p==this.nextState&&(y[1]--,(!y[1]||y[1]<0)&&(y.shift(),y.shift())),[{type:"meta.tag.punctuation."+(x==1?"":"end-")+"tag-open.xml",value:l.slice(0,x)},{type:"meta.tag.tag-name.xml",value:l.substr(x)}]},regex:"</?(?:"+c+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(h);var o={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[o,h,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(l,p,y){return p==y[0]&&y.shift(),l.length==2&&(y[0]==this.nextState&&y[1]--,(!y[1]||y[1]<0)&&y.splice(0,2)),this.next=y[0]||"start",[{type:this.token,value:l}]},nextState:"jsx"},o,g("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:c},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},h],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function g(c){return[{token:"comment",regex:/\/\*/,next:[u.getTagRule(),{token:"comment",regex:"\\*\\/",next:c||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[u.getTagRule(),{token:"comment",regex:"$|^",next:c||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var w=e("../lib/oop"),u=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,f=e("./text_highlight_rules").TextHighlightRules,a="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*",s=function(c){var h={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},o=this.createKeywordMapper(h,"identifier"),l="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",p="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",y="(function)(\\s*)(\\*?)",x={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(h).join("|")+"\\b)"+a+")(\\s*)(\\()"};this.$rules={no_regex:[u.getStartRule("doc-start"),g("no_regex"),x,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{include:"numeric_constants"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(=)(\\s*)"+y+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+a+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(:)(\\s*)"+y+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+y+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+l+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:o,regex:a},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:y+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:a},{regex:"",token:"empty",next:"no_regex"}],start:[u.getStartRule("doc-start"),g("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{include:"numeric_constants"},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[g("function_arguments"),{token:"variable.parameter",regex:a},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:p},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:p},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}],numeric_constants:[{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F_]+|[oO][0-7_]+|[bB][01_]+)\b/},{token:"constant.numeric",regex:/(?:\d[\d_]*(?:\.[\d_]*)?|\.\d[\d_]*)(?:[eE][+-]?\d+\b)?/}]},(!c||!c.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(E,$,_){if(this.next=E=="{"?this.nextState:"",E=="{"&&_.length)_.unshift("start",$);else if(E=="}"&&_.length&&(_.shift(),this.next=_.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return E=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:p},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+a+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!c||c.jsx!=0)&&d.call(this)),this.embedRules(u,"doc-",[u.getEndRule("no_regex")]),this.normalizeRules()};w.inherits(s,f),r.JavaScriptHighlightRules=s}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,m){var d=e("../lib/oop"),g=e("./text_highlight_rules").TextHighlightRules,w=function(u){var f="[_:a-zA-ZÀ-￿][-_:.a-zA-Z0-9À-￿]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+f+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"</"},{token:"text.tag-open.xml",regex:"<"},{include:"reference"},{defaultToken:"text.xml"}],processing_instruction:[{token:"entity.other.attribute-name.decl-attribute-name.xml",regex:f},{token:"keyword.operator.decl-attribute-equals.xml",regex:"="},{include:"whitespace"},{include:"string"},{token:"punctuation.xml-decl.xml",regex:"\\?>",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+f+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(</))((?:"+f+":)?"+f+")",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:f},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===w&&this.normalizeRules()};(function(){this.embedTagRules=function(u,f,a){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+a+".tag-name.xml"],regex:"(<)("+a+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:f+"start"}]}),this.$rules[a+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(s,c,h){return h.splice(0),this.token}}],this.embedRules(u,f,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+a+".tag-name.xml"],regex:"(</)("+a+"(?=\\s|>|$))",next:a+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(g.prototype),d.inherits(w,g),r.XmlHighlightRules=w}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,r,m){var d=e("../lib/oop"),g=e("../lib/lang"),w=e("./css_highlight_rules").CssHighlightRules,u=e("./javascript_highlight_rules").JavaScriptHighlightRules,f=e("./xml_highlight_rules").XmlHighlightRules,a=g.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),s=function(){f.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(c,h){var o=a[h];return["meta.tag.punctuation."+(c=="<"?"":"end-")+"tag-open.xml","meta.tag"+(o?"."+o:"")+".tag-name.xml"]},regex:"(</?)([-_a-zA-Z0-9:.]+)",next:"tag_stuff"}],tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}),this.embedTagRules(w,"css-","style"),this.embedTagRules(new u({jsx:!1}).getRules(),"js-","script"),this.constructor===s&&this.normalizeRules()};d.inherits(s,f),r.HtmlHighlightRules=s}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(e,r,m){var d=e("../config").$modes,g=e("../lib/oop"),w=e("../lib/lang"),u=e("./text_highlight_rules").TextHighlightRules,f=e("./html_highlight_rules").HtmlHighlightRules,a=function(c){return"(?:[^"+w.escapeRegExp(c)+"\\\\]|\\\\.)*"},s=function(){f.call(this);var c={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(o,l,p,y){var x=o.match(/^(\s*)([`~]+)(.*)/),E=/[\w-]+|$/.exec(x[3])[0];return d[E]||(E=""),p.unshift("githubblock",[],[x[1],x[2],E],l),this.token},next:"githubblock"},h=[{token:"support.function",regex:".*",onMatch:function(o,l,p,y){var x=p[1],E=p[2][0],$=p[2][1],_=p[2][2],C=/^(\s*)(`+|~+)\s*$/.exec(o);if(C&&C[1].length<E.length+3&&C[2].length>=$.length&&C[2][0]==$[0])return p.splice(0,3),this.next=p.shift(),this.token;if(this.next="",_&&d[_]){var L=d[_].getTokenizer().getLineTokens(o,x.slice(0));return p[1]=L.state,L.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(o){return"markup.heading."+o.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},c,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+a("]")+")(\\]\\s*\\[)("+a("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+a("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+a('"')+'"\\s*)?(\\))'},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:`(<)((?:https?|ftp|dict):[^'">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)`}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},c,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:h}),this.normalizeRules()};g.inherits(s,u),r.MarkdownHighlightRules=s}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,r,m){var d=e("../../lib/oop"),g=e("./fold_mode").FoldMode,w=e("../../range").Range,u=r.FoldMode=function(){};d.inherits(u,g),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(f,a,s){var c=f.getLine(s);return this.foldingStartMarker.test(c)?c[0]=="`"&&f.bgTokenizer.getState(s)=="start"?"end":"start":""},this.getFoldWidgetRange=function(f,a,s){function c(D){return E=f.getTokens(D)[0],E&&E.type.lastIndexOf($,0)===0}function h(){var D=E.value[0];return D=="="?6:D=="-"?5:7-E.value.search(/[^#]|$/)}var o=f.getLine(s),l=o.length,p=f.getLength(),y=s,x=s;if(o.match(this.foldingStartMarker)){if(o[0]=="`"){if(f.bgTokenizer.getState(s)!=="start"){for(;++s<p&&(o=f.getLine(s),!(o[0]=="`"&o.substring(0,3)=="```")););return new w(y,l,s,0)}for(;s-- >0&&(o=f.getLine(s),!(o[0]=="`"&o.substring(0,3)=="```")););return new w(s,o.length,y,0)}var E,$="markup.heading";if(c(s)){for(var _=h();++s<p;)if(c(s)){var C=h();if(C>=_)break}if(x=s-(!E||["=","-"].indexOf(E.value[0])==-1?1:2),x>y)for(;x>y&&/^\s*$/.test(f.getLine(x));)x--;if(x>y){var L=f.getLine(x).length;return new w(y,l,x,L)}}}}}).call(u.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,m){var d=e("../range").Range,g=function(){};(function(){this.checkOutdent=function(w,u){return/^\s+$/.test(w)?/^\s*\}/.test(u):!1},this.autoOutdent=function(w,u){var f=w.getLine(u),a=f.match(/^(\s*\})/);if(!a)return 0;var s=a[1].length,c=w.findMatchingBracket({row:u,column:s});if(!c||c.row==u)return 0;var h=this.$getIndent(w.getLine(c.row));w.replace(new d(u,0,u,s-1),h)},this.$getIndent=function(w){return w.match(/^\s*/)[0]}}).call(g.prototype),r.MatchingBraceOutdent=g}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,r,m){function d(a,s){return a&&a.type.lastIndexOf(s+".xml")>-1}var g=e("../../lib/oop"),w=e("../behaviour").Behaviour,u=e("../../token_iterator").TokenIterator,f=function(){this.add("string_dquotes","insertion",function(a,s,c,h,o){if(o=='"'||o=="'"){var l=o,p=h.doc.getTextRange(c.getSelectionRange());if(p!==""&&p!=="'"&&p!='"'&&c.getWrapBehavioursEnabled())return{text:l+p+l,selection:!1};var y=c.getCursorPosition(),x=h.doc.getLine(y.row),E=x.substring(y.column,y.column+1),$=new u(h,y.row,y.column),_=$.getCurrentToken();if(E==l&&(d(_,"attribute-value")||d(_,"string")))return{text:"",selection:[1,1]};if(_||(_=$.stepBackward()),!_)return;for(;d(_,"tag-whitespace")||d(_,"whitespace");)_=$.stepBackward();var C=!E||E.match(/\s/);if(d(_,"attribute-equals")&&(C||E==">")||d(_,"decl-attribute-equals")&&(C||E=="?"))return{text:l+l,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(a,s,c,h,o){var l=h.doc.getTextRange(o);if(!o.isMultiLine()&&(l=='"'||l=="'")){var p=h.doc.getLine(o.start.row),y=p.substring(o.start.column+1,o.start.column+2);if(y==l)return o.end.column++,o}}),this.add("autoclosing","insertion",function(a,s,c,h,o){if(o==">"){var l=c.getSelectionRange().start,p=new u(h,l.row,l.column),y=p.getCurrentToken()||p.stepBackward();if(!y||!(d(y,"tag-name")||d(y,"tag-whitespace")||d(y,"attribute-name")||d(y,"attribute-equals")||d(y,"attribute-value"))||d(y,"reference.attribute-value"))return;if(d(y,"attribute-value")){var x=p.getCurrentTokenColumn()+y.value.length;if(l.column<x)return;if(l.column==x){var E=p.stepForward();if(E&&d(E,"attribute-value"))return;p.stepBackward()}}if(/^\s*>/.test(h.getLine(l.row).slice(l.column)))return;for(;!d(y,"tag-name");)if(y=p.stepBackward(),y.value=="<"){y=p.stepForward();break}var $=p.getCurrentTokenRow(),_=p.getCurrentTokenColumn();if(d(p.stepBackward(),"end-tag-open"))return;var C=y.value;return $==l.row&&(C=C.substring(0,l.column-_)),this.voidElements&&this.voidElements.hasOwnProperty(C.toLowerCase())?void 0:{text:"></"+C+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(a,s,c,h,o){if(o==`
991
+ `){var l=c.getCursorPosition(),p=h.getLine(l.row),y=new u(h,l.row,l.column),x=y.getCurrentToken();if(d(x,"")&&x.type.indexOf("tag-close")!==-1){if(x.value=="/>")return;for(;x&&x.type.indexOf("tag-name")===-1;)x=y.stepBackward();if(!x)return;var E=x.value,$=y.getCurrentTokenRow();if(x=y.stepBackward(),!x||x.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[E]||!this.voidElements){var _=h.getTokenAt(l.row,l.column+1),p=h.getLine($),C=this.$getIndent(p),L=C+h.getTabString();return _&&_.value==="</"?{text:`
992
+ `+L+`
993
+ `+C,selection:[1,L.length,1,L.length]}:{text:`
994
+ `+L}}}}})};g.inherits(f,w),r.XmlBehaviour=f}),ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function(e,r,m){var d=e("../../lib/oop"),g=e("../../token_iterator").TokenIterator,w=e("../behaviour/cstyle").CstyleBehaviour,u=e("../behaviour/xml").XmlBehaviour,f=function(){var a=new u({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(a),this.inherit(w),this.add("autoclosing-fragment","insertion",function(s,c,h,o,l){if(l==">"){var p=h.getSelectionRange().start,y=new g(o,p.row,p.column),x=y.getCurrentToken()||y.stepBackward();if(!x)return;if(x.value=="<")return{text:"></>",selection:[1,1]}}})};d.inherits(f,w),r.JavaScriptBehaviour=f}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,m){function d(s,c){return s&&s.type&&s.type.lastIndexOf(c+".xml")>-1}var g=e("../../lib/oop"),w=e("../../range").Range,u=e("./fold_mode").FoldMode,f=r.FoldMode=function(s,c){u.call(this),this.voidElements=s||{},this.optionalEndTags=g.mixin({},this.voidElements),c&&g.mixin(this.optionalEndTags,c)};g.inherits(f,u);var a=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(s,c,h){var o=this._getFirstTagInLine(s,h);return o?o.closing||!o.tagName&&o.selfClosing?c==="markbeginend"?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())||this._findEndTagInLine(s,h,o.tagName,o.end.column)?"":"start":this.getCommentFoldWidget(s,h)},this.getCommentFoldWidget=function(s,c){return/comment/.test(s.getState(c))&&/<!-/.test(s.getLine(c))?"start":""},this._getFirstTagInLine=function(s,c){for(var h=s.getTokens(c),o=new a,l=0;l<h.length;l++){var p=h[l];if(d(p,"tag-open")){if(o.end.column=o.start.column+p.value.length,o.closing=d(p,"end-tag-open"),p=h[++l],!p)return null;if(o.tagName=p.value,p.value===""){if(p=h[++l],!p)return null;o.tagName=p.value}for(o.end.column+=p.value.length,l++;l<h.length;l++)if(p=h[l],o.end.column+=p.value.length,d(p,"tag-close")){o.selfClosing=p.value=="/>";break}return o}if(d(p,"tag-close"))return o.selfClosing=p.value=="/>",o;o.start.column+=p.value.length}return null},this._findEndTagInLine=function(s,c,h,o){for(var l=s.getTokens(c),p=0,y=0;y<l.length;y++){var x=l[y];if(p+=x.value.length,!(p<o-1)&&d(x,"end-tag-open")&&(x=l[y+1],d(x,"tag-name")&&x.value===""&&(x=l[y+2]),x&&x.value==h))return!0}return!1},this.getFoldWidgetRange=function(s,c,h){var o=this._getFirstTagInLine(s,h);if(!o)return this.getCommentFoldWidget(s,h)&&s.getCommentFoldRange(h,s.getLine(h).length);var l=s.getMatchingTags({row:h,column:0});if(l)return new w(l.openTag.end.row,l.openTag.end.column,l.closeTag.start.row,l.closeTag.start.column)}}).call(f.prototype)}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,m){var d=e("../../lib/oop"),g=e("../../range").Range,w=e("./fold_mode").FoldMode,u=r.FoldMode=function(f){f&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+f.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+f.end)))};d.inherits(u,w),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(f,a,s){var c=f.getLine(s);if(this.singleLineBlockCommentRe.test(c)&&!this.startRegionRe.test(c)&&!this.tripleStarBlockCommentRe.test(c))return"";var h=this._getFoldWidgetBase(f,a,s);return!h&&this.startRegionRe.test(c)?"start":h},this.getFoldWidgetRange=function(f,a,s,c){var h=f.getLine(s);if(this.startRegionRe.test(h))return this.getCommentRegionBlock(f,h,s);var o=h.match(this.foldingStartMarker);if(o){var l=o.index;if(o[1])return this.openingBracketBlock(f,o[1],s,l);var p=f.getCommentFoldRange(s,l+o[0].length,1);return p&&!p.isMultiLine()&&(c?p=this.getSectionRange(f,s):a!="all"&&(p=null)),p}if(a!=="markbegin"){var o=h.match(this.foldingStopMarker);if(o){var l=o.index+o[0].length;return o[1]?this.closingBracketBlock(f,o[1],s,l):f.getCommentFoldRange(s,l,-1)}}},this.getSectionRange=function(f,a){var s=f.getLine(a),c=s.search(/\S/),h=a,o=s.length;a+=1;for(var l=a,p=f.getLength();++a<p;){s=f.getLine(a);var y=s.search(/\S/);if(y!==-1){if(c>y)break;var x=this.getFoldWidgetRange(f,"all",a);if(x){if(x.start.row<=h)break;if(x.isMultiLine())a=x.end.row;else if(c==y)break}l=a}}return new g(h,o,l,f.getLine(l).length)},this.getCommentRegionBlock=function(f,a,s){for(var c=a.search(/\s*$/),h=f.getLength(),o=s,l=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,p=1;++s<h;){a=f.getLine(s);var y=l.exec(a);if(y&&(y[1]?p--:p++,!p))break}var x=s;if(x>o)return new g(o,c,x,a.length)}}).call(u.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,r,m){var d=e("../../lib/oop"),g=e("./xml").FoldMode,w=e("./cstyle").FoldMode,u=r.FoldMode=function(f){f&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+f.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+f.end))),this.xmlFoldMode=new g};d.inherits(u,w),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(f,a,s){var c=this.getFoldWidgetBase(f,a,s);return c||this.xmlFoldMode.getFoldWidget(f,a,s)},this.getFoldWidgetRange=function(f,a,s,c){var h=this.getFoldWidgetRangeBase(f,a,s,c);return h||this.xmlFoldMode.getFoldWidgetRange(f,a,s)}}).call(u.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,r,m){var d=e("../lib/oop"),g=e("./text").Mode,w=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,f=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,s=e("./folding/javascript").FoldMode,c=function(){this.HighlightRules=w,this.$outdent=new u,this.$behaviour=new a,this.foldingRules=new s};d.inherits(c,g),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(h,o,l){var p=this.$getIndent(o),y=this.getTokenizer().getLineTokens(o,h),x=y.tokens,E=y.state;if(x.length&&x[x.length-1].type=="comment")return p;if(h=="start"||h=="no_regex"){var $=o.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);$&&(p+=l)}else if(h=="doc-start"&&(E=="start"||E=="no_regex"))return"";return p},this.checkOutdent=function(h,o,l){return this.$outdent.checkOutdent(o,l)},this.autoOutdent=function(h,o,l){this.$outdent.autoOutdent(o,l)},this.createWorker=function(h){var o=new f(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return o.attachToDocument(h.getDocument()),o.on("annotate",function(l){h.setAnnotations(l.data)}),o.on("terminate",function(){h.clearAnnotations()}),o},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(c.prototype),r.Mode=c}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,r,m){var d={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},g=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var w=document.createElement("c").style;for(var u in w)if(typeof w[u]=="string"){var f=u.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()});d.hasOwnProperty(f)||(d[f]=1)}}this.completionsDefined=!0},this.getCompletions=function(w,u,f,a){if(this.completionsDefined||this.defineCompletions(),w==="ruleset"||u.$mode.$id=="ace/mode/scss"){var s=u.getLine(f.row).substr(0,f.column),c=/\([^)]*$/.test(s);return c&&(s=s.substr(s.lastIndexOf("(")+1)),/:[^;]+$/.test(s)?this.getPropertyValueCompletions(w,u,f,a):this.getPropertyCompletions(w,u,f,a,c)}return[]},this.getPropertyCompletions=function(w,u,f,a,s){s=s||!1;var c=Object.keys(d);return c.map(function(h){return{caption:h,snippet:h+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(w,u,f,a){var s=u.getLine(f.row).substr(0,f.column),c=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!c)return[];var h=[];return c in d&&typeof d[c]=="object"&&(h=Object.keys(d[c])),h.map(function(o){return{caption:o,snippet:o,meta:"property value",score:1e6}})}}).call(g.prototype),r.CssCompletions=g}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,r,m){var d=e("../../lib/oop");e("../behaviour").Behaviour;var g=e("./cstyle").CstyleBehaviour,w=e("../../token_iterator").TokenIterator,u=function(){this.inherit(g),this.add("colon","insertion",function(f,a,s,c,h){if(h===":"&&s.selection.isEmpty()){var o=s.getCursorPosition(),l=new w(c,o.row,o.column),p=l.getCurrentToken();if(p&&p.value.match(/\s+/)&&(p=l.stepBackward()),p&&p.type==="support.type"){var y=c.doc.getLine(o.row),x=y.substring(o.column,o.column+1);if(x===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(y.substring(o.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(f,a,s,c,h){var o=c.doc.getTextRange(h);if(!h.isMultiLine()&&o===":"){var l=s.getCursorPosition(),p=new w(c,l.row,l.column),y=p.getCurrentToken();if(y&&y.value.match(/\s+/)&&(y=p.stepBackward()),y&&y.type==="support.type"){var x=c.doc.getLine(h.start.row),E=x.substring(h.end.column,h.end.column+1);if(E===";")return h.end.column++,h}}}),this.add("semicolon","insertion",function(f,a,s,c,h){if(h===";"&&s.selection.isEmpty()){var o=s.getCursorPosition(),l=c.doc.getLine(o.row),p=l.substring(o.column,o.column+1);if(p===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(f,a,s,c,h){if(h==="!"&&s.selection.isEmpty()){var o=s.getCursorPosition(),l=c.doc.getLine(o.row);if(/^\s*(;|}|$)/.test(l.substring(o.column)))return{text:"!important",selection:[10,10]}}})};d.inherits(u,g),r.CssBehaviour=u}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,r,m){var d=e("../lib/oop"),g=e("./text").Mode,w=e("./css_highlight_rules").CssHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,f=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,s=e("./behaviour/css").CssBehaviour,c=e("./folding/cstyle").FoldMode,h=function(){this.HighlightRules=w,this.$outdent=new u,this.$behaviour=new s,this.$completer=new a,this.foldingRules=new c};d.inherits(h,g),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(o,l,p){var y=this.$getIndent(l),x=this.getTokenizer().getLineTokens(l,o).tokens;if(x.length&&x[x.length-1].type=="comment")return y;var E=l.match(/^.*\{\s*$/);return E&&(y+=p),y},this.checkOutdent=function(o,l,p){return this.$outdent.checkOutdent(l,p)},this.autoOutdent=function(o,l,p){this.$outdent.autoOutdent(l,p)},this.getCompletions=function(o,l,p,y){return this.$completer.getCompletions(o,l,p,y)},this.createWorker=function(o){var l=new f(["ace"],"ace/mode/css_worker","Worker");return l.attachToDocument(o.getDocument()),l.on("annotate",function(p){o.setAnnotations(p.data)}),l.on("terminate",function(){o.clearAnnotations()}),l},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(h.prototype),r.Mode=h}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,r,m){var d=e("../../lib/oop"),g=e("./fold_mode").FoldMode,w=r.FoldMode=function(u,f){this.defaultMode=u,this.subModes=f};d.inherits(w,g),(function(){this.$getMode=function(u){typeof u!="string"&&(u=u[0]);for(var f in this.subModes)if(u.indexOf(f)===0)return this.subModes[f];return null},this.$tryMode=function(u,f,a,s){var c=this.$getMode(u);return c?c.getFoldWidget(f,a,s):""},this.getFoldWidget=function(u,f,a){return this.$tryMode(u.getState(a-1),u,f,a)||this.$tryMode(u.getState(a),u,f,a)||this.defaultMode.getFoldWidget(u,f,a)},this.getFoldWidgetRange=function(u,f,a){var s=this.$getMode(u.getState(a-1));return(!s||!s.getFoldWidget(u,f,a))&&(s=this.$getMode(u.getState(a))),(!s||!s.getFoldWidget(u,f,a))&&(s=this.defaultMode),s.getFoldWidgetRange(u,f,a)}}).call(w.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,r,m){var d=e("../../lib/oop"),g=e("./mixed").FoldMode,w=e("./xml").FoldMode,u=e("./cstyle").FoldMode,f=r.FoldMode=function(a,s){g.call(this,new w(a,s),{"js-":new u,"css-":new u})};d.inherits(f,g)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,r,m){function d(l,p){return l.type.lastIndexOf(p+".xml")>-1}function g(l,p){for(var y=new u(l,p.row,p.column),x=y.getCurrentToken();x&&!d(x,"tag-name");)x=y.stepBackward();if(x)return x.value}function w(l,p){for(var y=new u(l,p.row,p.column),x=y.getCurrentToken();x&&!d(x,"attribute-name");)x=y.stepBackward();if(x)return x.value}var u=e("../token_iterator").TokenIterator,f=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],a=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],s=f.concat(a),c={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,for:1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{for:1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,default:1},section:{},summary:{},u:{},ul:{},var:{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},h=Object.keys(c),o=function(){};(function(){this.getCompletions=function(l,p,y,x){var E=p.getTokenAt(y.row,y.column);if(!E)return[];if(d(E,"tag-name")||d(E,"tag-open")||d(E,"end-tag-open"))return this.getTagCompletions(l,p,y,x);if(d(E,"tag-whitespace")||d(E,"attribute-name"))return this.getAttributeCompletions(l,p,y,x);if(d(E,"attribute-value"))return this.getAttributeValueCompletions(l,p,y,x);var $=p.getLine(y.row).substr(0,y.column);return/&[a-z]*$/i.test($)?this.getHTMLEntityCompletions(l,p,y,x):[]},this.getTagCompletions=function(l,p,y,x){return h.map(function(E){return{value:E,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(l,p,y,x){var E=g(p,y);if(!E)return[];var $=s;return E in c&&($=$.concat(Object.keys(c[E]))),$.map(function(_){return{caption:_,snippet:_+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(l,p,y,x){var E=g(p,y),$=w(p,y);if(!E)return[];var _=[];return E in c&&$ in c[E]&&typeof c[E][$]=="object"&&(_=Object.keys(c[E][$])),_.map(function(C){return{caption:C,snippet:C,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(l,p,y,x){var E=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return E.map(function($){return{caption:$,snippet:$,meta:"html entity",score:1e6}})}}).call(o.prototype),r.HtmlCompletions=o}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,r,m){var d=e("../lib/oop"),g=e("../lib/lang"),w=e("./text").Mode,u=e("./javascript").Mode,f=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,s=e("./behaviour/xml").XmlBehaviour,c=e("./folding/html").FoldMode,h=e("./html_completions").HtmlCompletions,o=e("../worker/worker_client").WorkerClient,l=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],p=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],y=function(x){this.fragmentContext=x&&x.fragmentContext,this.HighlightRules=a,this.$behaviour=new s,this.$completer=new h,this.createModeDelegates({"js-":u,"css-":f}),this.foldingRules=new c(this.voidElements,g.arrayToMap(p))};d.inherits(y,w),(function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=g.arrayToMap(l),this.getNextLineIndent=function(x,E,$){return this.$getIndent(E)},this.checkOutdent=function(x,E,$){return!1},this.getCompletions=function(x,E,$,_){return this.$completer.getCompletions(x,E,$,_)},this.createWorker=function(x){if(this.constructor==y){var E=new o(["ace"],"ace/mode/html_worker","Worker");return E.attachToDocument(x.getDocument()),this.fragmentContext&&E.call("setOptions",[{context:this.fragmentContext}]),E.on("error",function($){x.setAnnotations($.data)}),E.on("terminate",function(){x.clearAnnotations()}),E}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(y.prototype),r.Mode=y}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,m){var d=e("../lib/oop"),g=e("./text_highlight_rules").TextHighlightRules,w=r.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set|function|declare|readonly",u=r.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",f=function(){var a=this.createKeywordMapper({keyword:w,"support.function.builtin":u,"invalid.deprecated":"debugger"},"identifier"),s="(?:(?:[1-9]\\d*)|(?:0))",c="(?:\\.\\d+)",h="(?:\\d+)",o="(?:(?:"+h+"?"+c+")|(?:"+h+"\\.))",l="(?:(?:"+o+"|"+h+"))",p="(?:"+l+"|"+o+")",y="(?:&"+h+")",x="[a-zA-Z_][a-zA-Z0-9_]*",E="(?:"+x+"(?==))",$="(?:\\$(?:SHLVL|\\$|\\!|\\?))",_="(?:"+x+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string.start",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$`"\\]|$)/},{include:"variables"},{token:"keyword.operator",regex:/`/},{token:"string.end",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:"\\$'",push:[{token:"constant.language.escape",regex:/\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"string",regex:"'",next:"pop"},{defaultToken:"string"}]},{regex:"<<<",token:"keyword.operator"},{stateName:"heredoc",regex:"(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",onMatch:function(C,L,D){var I=C[2]=="-"?"indentedHeredoc":"heredoc",M=C.split(this.splitRegex);return D.push(I,M[4]),[{type:"constant",value:M[1]},{type:"text",value:M[2]},{type:"string",value:M[3]},{type:"support.class",value:M[4]},{type:"string",value:M[5]}]},rules:{heredoc:[{onMatch:function(C,L,D){return C===D[1]?(D.shift(),D.shift(),this.next=D[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(C,L,D){return C===D[1]?(D.shift(),D.shift(),this.next=D[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(C,L){return L[0]==="heredoc"||L[0]==="indentedHeredoc"?L[0]:C}},{token:["keyword","text","text","text","variable"],regex:/(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/},{token:"variable.language",regex:$},{token:"variable",regex:E},{include:"variables"},{token:"support.function",regex:_},{token:"support.function",regex:y},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:p},{token:"constant.numeric",regex:s+"\\b"},{token:a,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"},{token:"punctuation.operator",regex:";"},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]]"},{token:"paren.rparen",regex:"[\\)\\}]",next:"pop"}],variables:[{token:"variable",regex:/(\$)(\w+)/},{token:["variable","paren.lparen"],regex:/(\$)(\()/,push:"start"},{token:["variable","paren.lparen","keyword.operator","variable","keyword.operator"],regex:/(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,push:"start"},{token:"variable",regex:/\$[*@#?\-$!0_]/},{token:["variable","paren.lparen"],regex:/(\$)(\{)/,push:"start"}]},this.normalizeRules()};d.inherits(f,g),r.ShHighlightRules=f}),ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"],function(e,r,m){var d=e("../lib/oop"),g=e("./text").Mode,w=e("./sh_highlight_rules").ShHighlightRules,u=e("../range").Range,f=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=w,this.foldingRules=new f,this.$behaviour=this.$defaultBehaviour};d.inherits(a,g),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(c,h,o){var l=this.$getIndent(h),p=this.getTokenizer().getLineTokens(h,c),y=p.tokens;if(y.length&&y[y.length-1].type=="comment")return l;if(c=="start"){var x=h.match(/^.*[\{\(\[:]\s*$/);x&&(l+=o)}return l};var s={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(c,h,o){if(o!==`\r
995
+ `&&o!=="\r"&&o!==`
996
+ `)return!1;var l=this.getTokenizer().getLineTokens(h.trim(),c).tokens;if(!l)return!1;do var p=l.pop();while(p&&(p.type=="comment"||p.type=="text"&&p.value.match(/^\s+$/)));return p?p.type=="keyword"&&s[p.value]:!1},this.autoOutdent=function(c,h,o){o+=1;var l=this.$getIndent(h.getLine(o)),p=h.getTabString();l.slice(-p.length)==p&&h.remove(new u(o,l.length-p.length,o,l.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}).call(a.prototype),r.Mode=a}),ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"],function(e,r,m){var d=e("../lib/oop"),g=e("../lib/lang"),w=e("./text").Mode,u=e("./xml_highlight_rules").XmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,a=e("./folding/xml").FoldMode,s=e("../worker/worker_client").WorkerClient,c=function(){this.HighlightRules=u,this.$behaviour=new f,this.foldingRules=new a};d.inherits(c,w),(function(){this.voidElements=g.arrayToMap([]),this.blockComment={start:"<!--",end:"-->"},this.createWorker=function(h){var o=new s(["ace"],"ace/mode/xml_worker","Worker");return o.attachToDocument(h.getDocument()),o.on("error",function(l){h.setAnnotations(l.data)}),o.on("terminate",function(){h.clearAnnotations()}),o},this.$id="ace/mode/xml"}).call(c.prototype),r.Mode=c}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"],function(e,r,m){var d=e("../lib/oop"),g=e("./behaviour/cstyle").CstyleBehaviour,w=e("./text").Mode,u=e("./markdown_highlight_rules").MarkdownHighlightRules,f=e("./folding/markdown").FoldMode,a=function(){this.HighlightRules=u,this.createModeDelegates({javascript:e("./javascript").Mode,html:e("./html").Mode,bash:e("./sh").Mode,sh:e("./sh").Mode,xml:e("./xml").Mode,css:e("./css").Mode}),this.foldingRules=new f,this.$behaviour=new g({braces:!0})};d.inherits(a,w),(function(){this.type="text",this.blockComment={start:"<!--",end:"-->"},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(s,c,h){if(s=="listblock"){var o=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(c);if(!o)return"";var l=o[2];return l||(l=parseInt(o[3],10)+1+"."),o[1]+l+o[4]}return this.$getIndent(c)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}).call(a.prototype),r.Mode=a}),(function(){ace.require(["ace/mode/markdown"],function(e){t&&(t.exports=e)})})()})(kg)),kg.exports}X_();var $g={exports:{}},Tg;function Q_(){return Tg||(Tg=1,(function(t,n){ace.define("ace/theme/twilight-css",["require","exports","module"],function(e,r,m){m.exports=`.ace-twilight .ace_gutter {
997
+ background: #232323;
998
+ color: #E2E2E2
999
+ }
1000
+
1001
+ .ace-twilight .ace_print-margin {
1002
+ width: 1px;
1003
+ background: #232323
1004
+ }
1005
+
1006
+ .ace-twilight {
1007
+ background-color: #141414;
1008
+ color: #F8F8F8
1009
+ }
1010
+
1011
+ .ace-twilight .ace_cursor {
1012
+ color: #A7A7A7
1013
+ }
1014
+
1015
+ .ace-twilight .ace_marker-layer .ace_selection {
1016
+ background: rgba(221, 240, 255, 0.20)
1017
+ }
1018
+
1019
+ .ace-twilight.ace_multiselect .ace_selection.ace_start {
1020
+ box-shadow: 0 0 3px 0px #141414;
1021
+ }
1022
+
1023
+ .ace-twilight .ace_marker-layer .ace_step {
1024
+ background: rgb(102, 82, 0)
1025
+ }
1026
+
1027
+ .ace-twilight .ace_marker-layer .ace_bracket {
1028
+ margin: -1px 0 0 -1px;
1029
+ border: 1px solid rgba(255, 255, 255, 0.25)
1030
+ }
1031
+
1032
+ .ace-twilight .ace_marker-layer .ace_active-line {
1033
+ background: rgba(255, 255, 255, 0.031)
1034
+ }
1035
+
1036
+ .ace-twilight .ace_gutter-active-line {
1037
+ background-color: rgba(255, 255, 255, 0.031)
1038
+ }
1039
+
1040
+ .ace-twilight .ace_marker-layer .ace_selected-word {
1041
+ border: 1px solid rgba(221, 240, 255, 0.20)
1042
+ }
1043
+
1044
+ .ace-twilight .ace_invisible {
1045
+ color: rgba(255, 255, 255, 0.25)
1046
+ }
1047
+
1048
+ .ace-twilight .ace_keyword,
1049
+ .ace-twilight .ace_meta {
1050
+ color: #CDA869
1051
+ }
1052
+
1053
+ .ace-twilight .ace_constant,
1054
+ .ace-twilight .ace_constant.ace_character,
1055
+ .ace-twilight .ace_constant.ace_character.ace_escape,
1056
+ .ace-twilight .ace_constant.ace_other,
1057
+ .ace-twilight .ace_heading,
1058
+ .ace-twilight .ace_markup.ace_heading,
1059
+ .ace-twilight .ace_support.ace_constant {
1060
+ color: #CF6A4C
1061
+ }
1062
+
1063
+ .ace-twilight .ace_invalid.ace_illegal {
1064
+ color: #F8F8F8;
1065
+ background-color: rgba(86, 45, 86, 0.75)
1066
+ }
1067
+
1068
+ .ace-twilight .ace_invalid.ace_deprecated {
1069
+ text-decoration: underline;
1070
+ font-style: italic;
1071
+ color: #D2A8A1
1072
+ }
1073
+
1074
+ .ace-twilight .ace_support {
1075
+ color: #9B859D
1076
+ }
1077
+
1078
+ .ace-twilight .ace_fold {
1079
+ background-color: #AC885B;
1080
+ border-color: #F8F8F8
1081
+ }
1082
+
1083
+ .ace-twilight .ace_support.ace_function {
1084
+ color: #DAD085
1085
+ }
1086
+
1087
+ .ace-twilight .ace_list,
1088
+ .ace-twilight .ace_markup.ace_list,
1089
+ .ace-twilight .ace_storage {
1090
+ color: #F9EE98
1091
+ }
1092
+
1093
+ .ace-twilight .ace_entity.ace_name.ace_function,
1094
+ .ace-twilight .ace_meta.ace_tag {
1095
+ color: #AC885B
1096
+ }
1097
+
1098
+ .ace-twilight .ace_string {
1099
+ color: #8F9D6A
1100
+ }
1101
+
1102
+ .ace-twilight .ace_string.ace_regexp {
1103
+ color: #E9C062
1104
+ }
1105
+
1106
+ .ace-twilight .ace_comment {
1107
+ font-style: italic;
1108
+ color: #5F5A60
1109
+ }
1110
+
1111
+ .ace-twilight .ace_variable {
1112
+ color: #7587A6
1113
+ }
1114
+
1115
+ .ace-twilight .ace_xml-pe {
1116
+ color: #494949
1117
+ }
1118
+
1119
+ .ace-twilight .ace_indent-guide {
1120
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y
1121
+ }
1122
+
1123
+ .ace-twilight .ace_indent-guide-active {
1124
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
1125
+ }
1126
+ `}),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],function(e,r,m){r.isDark=!0,r.cssClass="ace-twilight",r.cssText=e("./twilight-css");var d=e("../lib/dom");d.importCssString(r.cssText,r.cssClass,!1)}),(function(){ace.require(["ace/theme/twilight"],function(e){t&&(t.exports=e)})})()})($g)),$g.exports}Q_();var Rg={exports:{}},Eg;function eA(){return Eg||(Eg=1,(function(t,n){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(e,r,m){function d(C){var L=new Date().toLocaleString("en-us",C);return L.length==1?"0"+L:L}var g=e("./lib/dom"),w=e("./lib/oop"),u=e("./lib/event_emitter").EventEmitter,f=e("./lib/lang"),a=e("./range").Range,s=e("./range_list").RangeList,c=e("./keyboard/hash_handler").HashHandler,h=e("./tokenizer").Tokenizer,o=e("./clipboard"),l={CURRENT_WORD:function(C){return C.session.getTextRange(C.session.getWordRange())},SELECTION:function(C,L,D){var I=C.session.getTextRange();return D?I.replace(/\n\r?([ \t]*\S)/g,`
1127
+ `+D+"$1"):I},CURRENT_LINE:function(C){return C.session.getLine(C.getCursorPosition().row)},PREV_LINE:function(C){return C.session.getLine(C.getCursorPosition().row-1)},LINE_INDEX:function(C){return C.getCursorPosition().row},LINE_NUMBER:function(C){return C.getCursorPosition().row+1},SOFT_TABS:function(C){return C.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(C){return C.session.getTabSize()},CLIPBOARD:function(C){return o.getText&&o.getText()},FILENAME:function(C){return/[^/\\]*$/.exec(this.FILEPATH(C))[0]},FILENAME_BASE:function(C){return/[^/\\]*$/.exec(this.FILEPATH(C))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(C){return this.FILEPATH(C).replace(/[^/\\]*$/,"")},FILEPATH:function(C){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(C){var L=C.session.$mode||{};return L.blockComment&&L.blockComment.start||""},BLOCK_COMMENT_END:function(C){var L=C.session.$mode||{};return L.blockComment&&L.blockComment.end||""},LINE_COMMENT:function(C){var L=C.session.$mode||{};return L.lineCommentStart||""},CURRENT_YEAR:d.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:d.bind(null,{year:"2-digit"}),CURRENT_MONTH:d.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:d.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:d.bind(null,{month:"short"}),CURRENT_DATE:d.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:d.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:d.bind(null,{weekday:"short"}),CURRENT_HOUR:d.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:d.bind(null,{minute:"2-digit"}),CURRENT_SECOND:d.bind(null,{second:"2-digit"})};l.SELECTED_TEXT=l.SELECTION;var p=(function(){function C(){this.snippetMap={},this.snippetNameMap={},this.variables=l}return C.prototype.getTokenizer=function(){return C.$tokenizer||this.createTokenizer()},C.prototype.createTokenizer=function(){function L(M){return M=M.substr(1),/^\d+$/.test(M)?[{tabstopId:parseInt(M,10)}]:[{text:M}]}function D(M){return"(?:[^\\\\"+M+"]|\\\\.)"}var I={regex:"/("+D("/")+"+)/",onMatch:function(M,W,z){var O=z[0];return O.fmtString=!0,O.guard=M.slice(1,-1),O.flag="",""},next:"formatString"};return C.$tokenizer=new h({start:[{regex:/\\./,onMatch:function(M,W,z){var O=M[1];return(O=="}"&&z.length||"`$\\".indexOf(O)!=-1)&&(M=O),[M]}},{regex:/}/,onMatch:function(M,W,z){return[z.length?z.shift():M]}},{regex:/\$(?:\d+|\w+)/,onMatch:L},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(M,W,z){var O=L(M.substr(1));return z.unshift(O[0]),O},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+D("\\|")+"*\\|",onMatch:function(M,W,z){var O=M.slice(1,-1).replace(/\\[,|\\]|,/g,function(T){return T.length==2?T[1]:"\0"}).split("\0").map(function(T){return{value:T}});return z[0].choices=O,[O[0]]},next:"start"},I,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(M,W,z){return z.length&&z[0].expectElse?(z[0].expectElse=!1,z[0].ifEnd={elseEnd:z[0]},[z[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(M,W,z){var O=M[1];return O=="}"&&z.length||"`$\\".indexOf(O)!=-1?M=O:O=="n"?M=`
1128
+ `:O=="t"?M=" ":"ulULE".indexOf(O)!=-1&&(M={changeCase:O,local:O>"a"}),[M]}},{regex:"/\\w*}",onMatch:function(M,W,z){var O=z.shift();return O&&(O.flag=M.slice(1,-1)),this.next=O&&O.tabstopId?"start":"",[O||M]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(M,W,z){return[{text:M.slice(1)}]}},{regex:/\${\w+/,onMatch:function(M,W,z){var O={text:M.slice(2)};return z.unshift(O),[O]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(M,W,z){var O=z.shift();return this.next=O&&O.tabstopId?"start":"",[O||M]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(M,W,z){var O=z[0];return O.formatFunction=M.slice(2,-1),[z.shift()]},next:"formatString"},I,{regex:/:[\?\-+]?/,onMatch:function(M,W,z){M[1]=="+"&&(z[0].ifEnd=z[0]),M[1]=="?"&&(z[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),C.$tokenizer},C.prototype.tokenizeTmSnippet=function(L,D){return this.getTokenizer().getLineTokens(L,D).tokens.map(function(I){return I.value||I})},C.prototype.getVariableValue=function(L,D,I){if(/^\d+$/.test(D))return(this.variables.__||{})[D]||"";if(/^[A-Z]\d+$/.test(D))return(this.variables[D[0]+"__"]||{})[D.substr(1)]||"";if(D=D.replace(/^TM_/,""),!this.variables.hasOwnProperty(D))return"";var M=this.variables[D];return typeof M=="function"&&(M=this.variables[D](L,D,I)),M??""},C.prototype.tmStrFormat=function(L,D,I){if(!D.fmt)return L;var M=D.flag||"",W=D.guard;W=new RegExp(W,M.replace(/[^gim]/g,""));var z=typeof D.fmt=="string"?this.tokenizeTmSnippet(D.fmt,"formatString"):D.fmt,O=this,T=L.replace(W,function(){var A=O.variables.__;O.variables.__=[].slice.call(arguments);for(var N=O.resolveVariables(z,I),B="E",U=0;U<N.length;U++){var G=N[U];if(typeof G=="object")if(N[U]="",G.changeCase&&G.local){var J=N[U+1];J&&typeof J=="string"&&(G.changeCase=="u"?N[U]=J[0].toUpperCase():N[U]=J[0].toLowerCase(),N[U+1]=J.substr(1))}else G.changeCase&&(B=G.changeCase);else B=="U"?N[U]=G.toUpperCase():B=="L"&&(N[U]=G.toLowerCase())}return O.variables.__=A,N.join("")});return T},C.prototype.tmFormatFunction=function(L,D,I){return D.formatFunction=="upcase"?L.toUpperCase():D.formatFunction=="downcase"?L.toLowerCase():L},C.prototype.resolveVariables=function(L,D){function I(B){var U=L.indexOf(B,O+1);U!=-1&&(O=U)}for(var M=[],W="",z=!0,O=0;O<L.length;O++){var T=L[O];if(typeof T=="string"){M.push(T),T==`
1129
+ `?(z=!0,W=""):z&&(W=/^\t*/.exec(T)[0],z=/\S/.test(T));continue}if(T){if(z=!1,T.fmtString){var A=L.indexOf(T,O+1);A==-1&&(A=L.length),T.fmt=L.slice(O+1,A),O=A}if(T.text){var N=this.getVariableValue(D,T.text,W)+"";T.fmtString&&(N=this.tmStrFormat(N,T,D)),T.formatFunction&&(N=this.tmFormatFunction(N,T,D)),N&&!T.ifEnd?(M.push(N),I(T)):!N&&T.ifEnd&&I(T.ifEnd)}else T.elseEnd?I(T.elseEnd):(T.tabstopId!=null||T.changeCase!=null)&&M.push(T)}}return M},C.prototype.getDisplayTextForSnippet=function(L,D){var I=y.call(this,L,D);return I.text},C.prototype.insertSnippetForSelection=function(L,D,I){I===void 0&&(I={});var M=y.call(this,L,D,I),W=L.getSelectionRange(),z=L.session.replace(W,M.text),O=new x(L),T=L.inVirtualSelectionMode&&L.selection.index;O.addTabstops(M.tabstops,W.start,z,T)},C.prototype.insertSnippet=function(L,D,I){I===void 0&&(I={});var M=this;if(L.inVirtualSelectionMode)return M.insertSnippetForSelection(L,D,I);L.forEachSelection(function(){M.insertSnippetForSelection(L,D,I)},null,{keepOrder:!0}),L.tabstopManager&&L.tabstopManager.tabNext()},C.prototype.$getScope=function(L){var D=L.session.$mode.$id||"";if(D=D.split("/").pop(),D==="html"||D==="php"){D==="php"&&!L.session.$mode.inlinePhp&&(D="html");var I=L.getCursorPosition(),M=L.session.getState(I.row);typeof M=="object"&&(M=M[0]),M.substring&&(M.substring(0,3)=="js-"?D="javascript":M.substring(0,4)=="css-"?D="css":M.substring(0,4)=="php-"&&(D="php"))}return D},C.prototype.getActiveScopes=function(L){var D=this.$getScope(L),I=[D],M=this.snippetMap;return M[D]&&M[D].includeScopes&&I.push.apply(I,M[D].includeScopes),I.push("_"),I},C.prototype.expandWithTab=function(L,D){var I=this,M=L.forEachSelection(function(){return I.expandSnippetForSelection(L,D)},null,{keepOrder:!0});return M&&L.tabstopManager&&L.tabstopManager.tabNext(),M},C.prototype.expandSnippetForSelection=function(L,D){var I=L.getCursorPosition(),M=L.session.getLine(I.row),W=M.substring(0,I.column),z=M.substr(I.column),O=this.snippetMap,T;return this.getActiveScopes(L).some(function(A){var N=O[A];return N&&(T=this.findMatchingSnippet(N,W,z)),!!T},this),T?(D&&D.dryRun||(L.session.doc.removeInLine(I.row,I.column-T.replaceBefore.length,I.column+T.replaceAfter.length),this.variables.M__=T.matchBefore,this.variables.T__=T.matchAfter,this.insertSnippetForSelection(L,T.content),this.variables.M__=this.variables.T__=null),!0):!1},C.prototype.findMatchingSnippet=function(L,D,I){for(var M=L.length;M--;){var W=L[M];if(!(W.startRe&&!W.startRe.test(D))&&!(W.endRe&&!W.endRe.test(I))&&!(!W.startRe&&!W.endRe))return W.matchBefore=W.startRe?W.startRe.exec(D):[""],W.matchAfter=W.endRe?W.endRe.exec(I):[""],W.replaceBefore=W.triggerRe?W.triggerRe.exec(D)[0]:"",W.replaceAfter=W.endTriggerRe?W.endTriggerRe.exec(I)[0]:"",W}},C.prototype.register=function(L,D){function I(A){return A&&!/^\^?\(.*\)\$?$|^\\b$/.test(A)&&(A="(?:"+A+")"),A||""}function M(A,N,B){return A=I(A),N=I(N),A=N+A,A&&A[A.length-1]!="$"&&(A+="$"),new RegExp(A)}function W(A){A.scope||(A.scope=D||"_"),D=A.scope,z[D]||(z[D]=[],O[D]={});var N=O[D];if(A.name){var B=N[A.name];B&&T.unregister(B),N[A.name]=A}z[D].push(A),A.prefix&&(A.tabTrigger=A.prefix),!A.content&&A.body&&(A.content=Array.isArray(A.body)?A.body.join(`
1130
+ `):A.body),A.tabTrigger&&!A.trigger&&(!A.guard&&/^\w/.test(A.tabTrigger)&&(A.guard="\\b"),A.trigger=f.escapeRegExp(A.tabTrigger)),!(!A.trigger&&!A.guard&&!A.endTrigger&&!A.endGuard)&&(A.startRe=M(A.trigger,A.guard),A.triggerRe=new RegExp(A.trigger),A.endRe=M(A.endTrigger,A.endGuard),A.endTriggerRe=new RegExp(A.endTrigger))}var z=this.snippetMap,O=this.snippetNameMap,T=this;L||(L=[]),Array.isArray(L)?L.forEach(W):Object.keys(L).forEach(function(A){W(L[A])}),this._signal("registerSnippets",{scope:D})},C.prototype.unregister=function(L,D){function I(z){var O=W[z.scope||D];if(O&&O[z.name]){delete O[z.name];var T=M[z.scope||D],A=T&&T.indexOf(z);A>=0&&T.splice(A,1)}}var M=this.snippetMap,W=this.snippetNameMap;L.content?I(L):Array.isArray(L)&&L.forEach(I)},C.prototype.parseSnippetFile=function(L){L=L.replace(/\r/g,"");for(var D=[],I={},M=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,W;W=M.exec(L);){if(W[1])try{I=JSON.parse(W[1]),D.push(I)}catch{}if(W[4])I.content=W[4].replace(/^\t/gm,""),D.push(I),I={};else{var z=W[2],O=W[3];if(z=="regex"){var T=/\/((?:[^\/\\]|\\.)*)|$/g;I.guard=T.exec(O)[1],I.trigger=T.exec(O)[1],I.endTrigger=T.exec(O)[1],I.endGuard=T.exec(O)[1]}else z=="snippet"?(I.tabTrigger=O.match(/^\S*/)[0],I.name||(I.name=O)):z&&(I[z]=O)}}return D},C.prototype.getSnippetByName=function(L,D){var I=this.snippetNameMap,M;return this.getActiveScopes(D).some(function(W){var z=I[W];return z&&(M=z[L]),!!M},this),M},C})();w.implement(p.prototype,u);var y=function(C,L,D){function I(ie){for(var fe=[],$e=0;$e<ie.length;$e++){var Re=ie[$e];if(typeof Re=="object"){if(N[Re.tabstopId])continue;var Ee=ie.lastIndexOf(Re,$e-1);Re=fe[Ee]||{tabstopId:Re.tabstopId}}fe[$e]=Re}return fe}D===void 0&&(D={});var M=C.getCursorPosition(),W=C.session.getLine(M.row),z=C.session.getTabString(),O=W.match(/^\s*/)[0];M.column<O.length&&(O=O.slice(0,M.column)),L=L.replace(/\r/g,"");var T=this.tokenizeTmSnippet(L);T=this.resolveVariables(T,C),T=T.map(function(ie){return ie==`
1131
+ `&&!D.excludeExtraIndent?ie+O:typeof ie=="string"?ie.replace(/\t/g,z):ie});var A=[];T.forEach(function(ie,fe){if(typeof ie=="object"){var $e=ie.tabstopId,Re=A[$e];if(Re||(Re=A[$e]=[],Re.index=$e,Re.value="",Re.parents={}),Re.indexOf(ie)===-1){ie.choices&&!Re.choices&&(Re.choices=ie.choices),Re.push(ie);var Ee=T.indexOf(ie,fe+1);if(Ee!==-1){var Ue=T.slice(fe+1,Ee),He=Ue.some(function(Ge){return typeof Ge=="object"});He&&!Re.value?Re.value=Ue:Ue.length&&(!Re.value||typeof Re.value!="string")&&(Re.value=Ue.join(""))}}}}),A.forEach(function(ie){ie.length=0});for(var N={},B=0;B<T.length;B++){var U=T[B];if(typeof U=="object"){var G=U.tabstopId,J=A[G],Q=T.indexOf(U,B+1);if(N[G]){N[G]===U&&(delete N[G],Object.keys(N).forEach(function(ie){J.parents[ie]=!0}));continue}N[G]=U;var le=J.value;typeof le!="string"?le=I(le):U.fmt&&(le=this.tmStrFormat(le,U,C)),T.splice.apply(T,[B+1,Math.max(0,Q-B)].concat(le,U)),J.indexOf(U)===-1&&J.push(U)}}var re=0,ce=0,de="";return T.forEach(function(ie){if(typeof ie=="string"){var fe=ie.split(`
1132
+ `);fe.length>1?(ce=fe[fe.length-1].length,re+=fe.length-1):ce+=ie.length,de+=ie}else ie&&(ie.start?ie.end={row:re,column:ce}:ie.start={row:re,column:ce})}),{text:de,tabstops:A,tokens:T}},x=(function(){function C(L){if(this.index=0,this.ranges=[],this.tabstops=[],L.tabstopManager)return L.tabstopManager;L.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=f.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(L)}return C.prototype.attach=function(L){this.$openTabstops=null,this.selectedTabstop=null,this.editor=L,this.session=L.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},C.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},C.prototype.onChange=function(L){for(var D=L.action[0]=="r",I=this.selectedTabstop||{},M=I.parents||{},W=this.tabstops.slice(),z=0;z<W.length;z++){var O=W[z],T=O==I||M[O.index];if(O.rangeList.$bias=T?0:1,L.action=="remove"&&O!==I){var A=O.parents&&O.parents[I.index],N=O.rangeList.pointIndex(L.start,A);N=N<0?-N-1:N+1;var B=O.rangeList.pointIndex(L.end,A);B=B<0?-B-1:B-1;for(var U=O.rangeList.ranges.slice(N,B),G=0;G<U.length;G++)this.removeRange(U[G])}O.rangeList.$onChange(L)}var J=this.session;!this.$inChange&&D&&J.getLength()==1&&!J.getValue()&&this.detach()},C.prototype.updateLinkedFields=function(){var L=this.selectedTabstop;if(!(!L||!L.hasLinkedRanges||!L.firstNonLinked)){this.$inChange=!0;for(var D=this.session,I=D.getTextRange(L.firstNonLinked),M=0;M<L.length;M++){var W=L[M];if(W.linked){var z=W.original,O=r.snippetManager.tmStrFormat(I,z,this.editor);D.replace(W,O)}}this.$inChange=!1}},C.prototype.onAfterExec=function(L){L.command&&!L.command.readOnly&&this.updateLinkedFields()},C.prototype.onChangeSelection=function(){if(this.editor){for(var L=this.editor.selection.lead,D=this.editor.selection.anchor,I=this.editor.selection.isEmpty(),M=0;M<this.ranges.length;M++)if(!this.ranges[M].linked){var W=this.ranges[M].contains(L.row,L.column),z=I||this.ranges[M].contains(D.row,D.column);if(W&&z)return}this.detach()}},C.prototype.onChangeSession=function(){this.detach()},C.prototype.tabNext=function(L){var D=this.tabstops.length,I=this.index+(L||1);I=Math.min(Math.max(I,1),D),I==D&&(I=0),this.selectTabstop(I),this.updateTabstopMarkers(),I===0&&this.detach()},C.prototype.selectTabstop=function(L){this.$openTabstops=null;var D=this.tabstops[this.index];if(D&&this.addTabstopMarkers(D),this.index=L,D=this.tabstops[this.index],!(!D||!D.length)){this.selectedTabstop=D;var I=D.firstNonLinked||D;if(D.choices&&(I.cursor=I.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(I);else{var M=this.editor.multiSelect;M.toSingleRange(I);for(var W=0;W<D.length;W++)D.hasLinkedRanges&&D[W].linked||M.addRange(D[W].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},C.prototype.addTabstops=function(L,D,I){var M=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!L[0]){var W=a.fromPoints(I,I);$(W.start,D),$(W.end,D),L[0]=[W],L[0].index=0}var z=this.index,O=[z+1,0],T=this.ranges,A=this.snippetId=(this.snippetId||0)+1;L.forEach(function(N,B){var U=this.$openTabstops[B]||N;U.snippetId=A;for(var G=0;G<N.length;G++){var J=N[G],Q=a.fromPoints(J.start,J.end||J.start);E(Q.start,D),E(Q.end,D),Q.original=J,Q.tabstop=U,T.push(Q),U!=N?U.unshift(Q):U[G]=Q,J.fmtString||U.firstNonLinked&&M?(Q.linked=!0,U.hasLinkedRanges=!0):U.firstNonLinked||(U.firstNonLinked=Q)}U.firstNonLinked||(U.hasLinkedRanges=!1),U===N&&(O.push(U),this.$openTabstops[B]=U),this.addTabstopMarkers(U),U.rangeList=U.rangeList||new s,U.rangeList.$bias=0,U.rangeList.addList(U)},this),O.length>2&&(this.tabstops.length&&O.push(O.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,O))},C.prototype.addTabstopMarkers=function(L){var D=this.session;L.forEach(function(I){I.markerId||(I.markerId=D.addMarker(I,"ace_snippet-marker","text"))})},C.prototype.removeTabstopMarkers=function(L){var D=this.session;L.forEach(function(I){D.removeMarker(I.markerId),I.markerId=null})},C.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var L=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&L--,this.tabstops.forEach(function(D){D.snippetId===L?this.addTabstopMarkers(D):this.removeTabstopMarkers(D)},this)}},C.prototype.removeRange=function(L){var D=L.tabstop.indexOf(L);D!=-1&&L.tabstop.splice(D,1),D=this.ranges.indexOf(L),D!=-1&&this.ranges.splice(D,1),D=L.tabstop.rangeList.ranges.indexOf(L),D!=-1&&L.tabstop.splice(D,1),this.session.removeMarker(L.markerId),L.tabstop.length||(D=this.tabstops.indexOf(L.tabstop),D!=-1&&this.tabstops.splice(D,1),this.tabstops.length||this.detach())},C})();x.prototype.keyboardHandler=new c,x.prototype.keyboardHandler.bindKeys({Tab:function(C){r.snippetManager&&r.snippetManager.expandWithTab(C)||(C.tabstopManager.tabNext(1),C.renderer.scrollCursorIntoView())},"Shift-Tab":function(C){C.tabstopManager.tabNext(-1),C.renderer.scrollCursorIntoView()},Esc:function(C){C.tabstopManager.detach()}});var E=function(C,L){C.row==0&&(C.column+=L.column),C.row+=L.row},$=function(C,L){C.row==L.row&&(C.column-=L.column),C.row-=L.row};g.importCssString(`
1133
+ .ace_snippet-marker {
1134
+ -moz-box-sizing: border-box;
1135
+ box-sizing: border-box;
1136
+ background: rgba(194, 193, 208, 0.09);
1137
+ border: 1px dotted rgba(211, 208, 235, 0.62);
1138
+ position: absolute;
1139
+ }`,"snippets.css",!1),r.snippetManager=new p;var _=e("./editor").Editor;(function(){this.insertSnippet=function(C,L){return r.snippetManager.insertSnippet(this,C,L)},this.expandSnippet=function(C){return r.snippetManager.expandWithTab(this,C)}}).call(_.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(e,r,m){var d=e("../virtual_renderer").VirtualRenderer,g=e("../editor").Editor,w=e("../range").Range,u=e("../lib/event"),f=e("../lib/lang"),a=e("../lib/dom"),s=e("../config").nls,c=e("./../lib/useragent"),h=function(E){return"suggest-aria-id:".concat(E)},o=c.isSafari?"menu":"listbox",l=c.isSafari?"menuitem":"option",p=c.isSafari?"aria-current":"aria-selected",y=function(E){var $=new d(E);$.$maxLines=4;var _=new g($);return _.setHighlightActiveLine(!1),_.setShowPrintMargin(!1),_.renderer.setShowGutter(!1),_.renderer.setHighlightGutterLine(!1),_.$mouseHandler.$focusTimeout=0,_.$highlightTagPending=!0,_},x=(function(){function E($){var _=a.createElement("div"),C=y(_);$&&$.appendChild(_),_.style.display="none",C.renderer.content.style.cursor="default",C.renderer.setStyle("ace_autocomplete"),C.renderer.$textLayer.element.setAttribute("role",o),C.renderer.$textLayer.element.setAttribute("aria-roledescription",s("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),C.renderer.$textLayer.element.setAttribute("aria-label",s("autocomplete.popup.aria-label","Autocomplete suggestions")),C.renderer.textarea.setAttribute("aria-hidden","true"),C.setOption("displayIndentGuides",!1),C.setOption("dragDelay",150);var L=function(){};C.focus=L,C.$isFocused=!0,C.renderer.$cursorLayer.restartTimer=L,C.renderer.$cursorLayer.element.style.opacity="0",C.renderer.$maxLines=8,C.renderer.$keepTextAreaAtCursor=!1,C.setHighlightActiveLine(!1),C.session.highlight(""),C.session.$searchHighlight.clazz="ace_highlight-marker",C.on("mousedown",function(T){var A=T.getDocumentPosition();C.selection.moveToPosition(A),M.start.row=M.end.row=A.row,T.stop()});var D,I=new w(-1,0,-1,1/0),M=new w(-1,0,-1,1/0);M.id=C.session.addMarker(M,"ace_active-line","fullLine"),C.setSelectOnHover=function(T){T?I.id&&(C.session.removeMarker(I.id),I.id=null):I.id=C.session.addMarker(I,"ace_line-hover","fullLine")},C.setSelectOnHover(!1),C.on("mousemove",function(T){if(!D){D=T;return}if(!(D.x==T.x&&D.y==T.y)){D=T,D.scrollTop=C.renderer.scrollTop,C.isMouseOver=!0;var A=D.getDocumentPosition().row;I.start.row!=A&&(I.id||C.setRow(A),z(A))}}),C.renderer.on("beforeRender",function(){if(D&&I.start.row!=-1){D.$pos=null;var T=D.getDocumentPosition().row;I.id||C.setRow(T),z(T,!0)}}),C.renderer.on("afterRender",function(){for(var T=C.renderer.$textLayer,A=T.config.firstRow,N=T.config.lastRow;A<=N;A++){var B=T.element.childNodes[A-T.config.firstRow];B.setAttribute("role",l),B.setAttribute("aria-roledescription",s("autocomplete.popup.item.aria-roledescription","item")),B.setAttribute("aria-setsize",C.data.length),B.setAttribute("aria-describedby","doc-tooltip"),B.setAttribute("aria-posinset",A+1);var U=C.getData(A);if(U){var G="".concat(U.caption||U.value).concat(U.meta?", ".concat(U.meta):"");B.setAttribute("aria-label",G)}var J=B.querySelectorAll(".ace_completion-highlight");J.forEach(function(Q){Q.setAttribute("role","mark")})}}),C.renderer.on("afterRender",function(){var T=C.getRow(),A=C.renderer.$textLayer,N=A.element.childNodes[T-A.config.firstRow],B=document.activeElement;if(N!==C.selectedNode&&C.selectedNode&&(a.removeCssClass(C.selectedNode,"ace_selected"),C.selectedNode.removeAttribute(p),C.selectedNode.removeAttribute("id")),B.removeAttribute("aria-activedescendant"),C.selectedNode=N,N){var U=h(T);a.addCssClass(N,"ace_selected"),N.id=U,A.element.setAttribute("aria-activedescendant",U),B.setAttribute("aria-activedescendant",U),N.setAttribute(p,"true")}});var W=function(){z(-1)},z=function(T,A){T!==I.start.row&&(I.start.row=I.end.row=T,A||C.session._emit("changeBackMarker"),C._emit("changeHoverMarker"))};C.getHoveredRow=function(){return I.start.row},u.addListener(C.container,"mouseout",function(){C.isMouseOver=!1,W()}),C.on("hide",W),C.on("changeSelection",W),C.session.doc.getLength=function(){return C.data.length},C.session.doc.getLine=function(T){var A=C.data[T];return typeof A=="string"?A:A&&A.value||""};var O=C.session.bgTokenizer;return O.$tokenizeRow=function(T){function A(ie,fe){ie&&B.push({type:(N.className||"")+(fe||""),value:ie})}var N=C.data[T],B=[];if(!N)return B;typeof N=="string"&&(N={value:N});for(var U=N.caption||N.value||N.name,G=U.toLowerCase(),J=(C.filterText||"").toLowerCase(),Q=0,le=0,re=0;re<=J.length;re++)if(re!=le&&(N.matchMask&1<<re||re==J.length)){var ce=J.slice(le,re);le=re;var de=G.indexOf(ce,Q);if(de==-1)continue;A(U.slice(Q,de),""),Q=de+ce.length,A(U.slice(de,Q),"completion-highlight")}return A(U.slice(Q,U.length),""),B.push({type:"completion-spacer",value:" "}),N.meta&&B.push({type:"completion-meta",value:N.meta}),N.message&&B.push({type:"completion-message",value:N.message}),B},O.$updateOnChange=L,O.start=L,C.session.$computeWidth=function(){return this.screenWidth=0},C.isOpen=!1,C.isTopdown=!1,C.autoSelect=!0,C.filterText="",C.isMouseOver=!1,C.data=[],C.setData=function(T,A){C.filterText=A||"",C.setValue(f.stringRepeat(`
1140
+ `,T.length),-1),C.data=T||[],C.setRow(0)},C.getData=function(T){return C.data[T]},C.getRow=function(){return M.start.row},C.setRow=function(T){T=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,T)),M.start.row!=T&&(C.selection.clearSelection(),M.start.row=M.end.row=T||0,C.session._emit("changeBackMarker"),C.moveCursorTo(T||0,0),C.isOpen&&C._signal("select"))},C.on("changeSelection",function(){C.isOpen&&C.setRow(C.selection.lead.row),C.renderer.scrollCursorIntoView()}),C.hide=function(){this.container.style.display="none",C.anchorPos=null,C.anchor=null,C.isOpen&&(C.isOpen=!1,this._signal("hide"))},C.tryShow=function(T,A,N,B){if(!B&&C.isOpen&&C.anchorPos&&C.anchor&&C.anchorPos.top===T.top&&C.anchorPos.left===T.left&&C.anchor===N)return!0;var U=this.container,G=this.renderer.scrollBar.width||10,J=window.innerHeight-G,Q=window.innerWidth-G,le=this.renderer,re=le.$maxLines*A*1.4,ce={top:0,bottom:0},de=J-T.top-3*this.$borderSize-A,ie=T.top-3*this.$borderSize;N||(ie<=de||de>=re?N="bottom":N="top"),N==="top"?(ce.bottom=T.top-this.$borderSize,ce.top=ce.bottom-re):N==="bottom"&&(ce.top=T.top+A+this.$borderSize,ce.bottom=ce.top+re);var fe=ce.top>=0&&ce.bottom<=J;if(!B&&!fe)return!1;fe?le.$maxPixelHeight=null:N==="top"?le.$maxPixelHeight=ie:le.$maxPixelHeight=de,N==="top"?(U.style.top="",U.style.bottom=J+G-ce.bottom+"px",C.isTopdown=!1):(U.style.top=ce.top+"px",U.style.bottom="",C.isTopdown=!0),U.style.display="";var $e=T.left;return $e+U.offsetWidth>Q&&($e=Q-U.offsetWidth),U.style.left=$e+"px",U.style.right="",a.$fixPositionBug(U),C.isOpen||(C.isOpen=!0,this._signal("show"),D=null),C.anchorPos=T,C.anchor=N,!0},C.show=function(T,A,N){this.tryShow(T,A,N?"bottom":void 0,!0)},C.goTo=function(T){var A=this.getRow(),N=this.session.getLength()-1;switch(T){case"up":A=A<=0?N:A-1;break;case"down":A=A>=N?-1:A+1;break;case"start":A=0;break;case"end":A=N}this.setRow(A)},C.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},C.$imageSize=0,C.$borderSize=1,C}return E})();a.importCssString(`
1141
+ .ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
1142
+ background-color: #CAD6FA;
1143
+ z-index: 1;
1144
+ }
1145
+ .ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
1146
+ background-color: #3a674e;
1147
+ }
1148
+ .ace_editor.ace_autocomplete .ace_line-hover {
1149
+ border: 1px solid #abbffe;
1150
+ margin-top: -1px;
1151
+ background: rgba(233,233,253,0.4);
1152
+ position: absolute;
1153
+ z-index: 2;
1154
+ }
1155
+ .ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
1156
+ border: 1px solid rgba(109, 150, 13, 0.8);
1157
+ background: rgba(58, 103, 78, 0.62);
1158
+ }
1159
+ .ace_completion-meta {
1160
+ opacity: 0.5;
1161
+ margin-left: 0.9em;
1162
+ }
1163
+ .ace_completion-message {
1164
+ margin-left: 0.9em;
1165
+ color: blue;
1166
+ }
1167
+ .ace_editor.ace_autocomplete .ace_completion-highlight{
1168
+ color: #2d69c7;
1169
+ }
1170
+ .ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
1171
+ color: #93ca12;
1172
+ }
1173
+ .ace_editor.ace_autocomplete {
1174
+ width: 300px;
1175
+ z-index: 200000;
1176
+ border: 1px lightgray solid;
1177
+ position: fixed;
1178
+ box-shadow: 2px 3px 5px rgba(0,0,0,.2);
1179
+ line-height: 1.4;
1180
+ background: #fefefe;
1181
+ color: #111;
1182
+ }
1183
+ .ace_dark.ace_editor.ace_autocomplete {
1184
+ border: 1px #484747 solid;
1185
+ box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
1186
+ line-height: 1.4;
1187
+ background: #25282c;
1188
+ color: #c1c1c1;
1189
+ }
1190
+ .ace_autocomplete .ace_text-layer {
1191
+ width: calc(100% - 8px);
1192
+ }
1193
+ .ace_autocomplete .ace_line {
1194
+ display: flex;
1195
+ align-items: center;
1196
+ }
1197
+ .ace_autocomplete .ace_line > * {
1198
+ min-width: 0;
1199
+ flex: 0 0 auto;
1200
+ }
1201
+ .ace_autocomplete .ace_line .ace_ {
1202
+ flex: 0 1 auto;
1203
+ overflow: hidden;
1204
+ text-overflow: ellipsis;
1205
+ }
1206
+ .ace_autocomplete .ace_completion-spacer {
1207
+ flex: 1;
1208
+ }
1209
+ .ace_autocomplete.ace_loading:after {
1210
+ content: "";
1211
+ position: absolute;
1212
+ top: 0px;
1213
+ height: 2px;
1214
+ width: 8%;
1215
+ background: blue;
1216
+ z-index: 100;
1217
+ animation: ace_progress 3s infinite linear;
1218
+ animation-delay: 300ms;
1219
+ transform: translateX(-100%) scaleX(1);
1220
+ }
1221
+ @keyframes ace_progress {
1222
+ 0% { transform: translateX(-100%) scaleX(1) }
1223
+ 50% { transform: translateX(625%) scaleX(2) }
1224
+ 100% { transform: translateX(1500%) scaleX(3) }
1225
+ }
1226
+ @media (prefers-reduced-motion) {
1227
+ .ace_autocomplete.ace_loading:after {
1228
+ transform: translateX(625%) scaleX(2);
1229
+ animation: none;
1230
+ }
1231
+ }
1232
+ `,"autocompletion.css",!1),r.AcePopup=x,r.$singleLineEditor=y,r.getAriaId=h}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(e,r,m){var d=(function(){function g(w){this.editor=w,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return g.prototype.setScreenReaderContent=function(w){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",(function(){var f=this.popup.getRow(),a=this.popup.renderer.$textLayer,s=a.element.childNodes[f-a.config.firstRow];if(s){for(var c="doc-tooltip ",h=0;h<this._lines.length;h++)c+="ace-inline-screenreader-line-".concat(h," ");s.setAttribute("aria-describedby",c)}}).bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=w.split(/\r\n|\r|\n/);var u=this.createCodeBlock();this.screenReaderDiv.appendChild(u)},g.prototype.destroy=function(){this.screenReaderDiv.remove()},g.prototype.createCodeBlock=function(){var w=document.createElement("pre");w.setAttribute("id","ace-inline-screenreader");for(var u=0;u<this._lines.length;u++){var f=document.createElement("code");f.setAttribute("id","ace-inline-screenreader-line-".concat(u));var a=document.createTextNode(this._lines[u]);f.appendChild(a),w.appendChild(f)}return w},g})();r.AceInlineScreenReader=d}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(e,r,m){var d=e("../snippets").snippetManager,g=e("./inline_screenreader").AceInlineScreenReader,w=(function(){function u(){this.editor=null}return u.prototype.show=function(f,a,s){if(s=s||"",f&&this.editor&&this.editor!==f&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!f||!a)return!1;this.inlineScreenReader||(this.inlineScreenReader=new g(f));var c=a.snippet?d.getDisplayTextForSnippet(f,a.snippet):a.value;return a.hideInlinePreview||!c||!c.startsWith(s)?!1:(this.editor=f,this.inlineScreenReader.setScreenReaderContent(c),c=c.slice(s.length),c===""?f.removeGhostText():f.setGhostText(c),!0)},u.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},u.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},u.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},u})();r.AceInline=w}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,r,m){r.parForEach=function(g,w,u){var f=0,a=g.length;a===0&&u();for(var s=0;s<a;s++)w(g[s],function(c,h){f++,f===a&&u(c,h)})};var d=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;r.retrievePrecedingIdentifier=function(g,w,u){u=u||d;for(var f=[],a=w-1;a>=0&&u.test(g[a]);a--)f.push(g[a]);return f.reverse().join("")},r.retrieveFollowingIdentifier=function(g,w,u){u=u||d;for(var f=[],a=w;a<g.length&&u.test(g[a]);a++)f.push(g[a]);return f},r.getCompletionPrefix=function(g){var w=g.getCursorPosition(),u=g.session.getLine(w.row),f;return g.completers.forEach((function(a){a.identifierRegexps&&a.identifierRegexps.forEach((function(s){!f&&s&&(f=this.retrievePrecedingIdentifier(u,w.column,s))}).bind(this))}).bind(this)),f||this.retrievePrecedingIdentifier(u,w.column)},r.triggerAutocomplete=function(g,u){var u=u??g.session.getPrecedingCharacter();return g.completers.some(function(f){if(f.triggerCharacters&&Array.isArray(f.triggerCharacters))return f.triggerCharacters.includes(u)})}}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event","ace/lib/scroll"],function(e,r,m){var d=e("./keyboard/hash_handler").HashHandler,g=e("./autocomplete/popup").AcePopup,w=e("./autocomplete/inline").AceInline,u=e("./autocomplete/popup").getAriaId,f=e("./autocomplete/util"),a=e("./lib/lang"),s=e("./lib/dom"),c=e("./snippets").snippetManager,h=e("./config"),o=e("./lib/event"),l=e("./lib/scroll").preventParentScroll,p=function($,_){_.completer&&_.completer.destroy()},y=(function(){function $(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new d,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=a.delayedCall((function(){this.updateCompletions(!0)}).bind(this)),this.tooltipTimer=a.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=a.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=a.delayedCall((function(){this.stickySelection=!0}).bind(this),this.stickySelectionDelay),this.$firstOpenTimer=a.delayedCall((function(){var _=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!_||this.editor.completers.length===0||(this.completions=new E($.completionsForLoading),this.openPopup(this.editor,_.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}).bind(this),this.stickySelectionDelay)}return Object.defineProperty($,"completionsForLoading",{get:function(){return[{caption:h.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),$.prototype.$init=function(){return this.popup=new g(this.parentNode||document.body||document.documentElement),this.popup.on("click",(function(_){this.insertMatch(),_.stop()}).bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),o.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},$.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new w,this.inlineRenderer},$.prototype.getPopup=function(){return this.popup||this.$init()},$.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},$.prototype.$seen=function(_){!this.hasSeen.has(_)&&_&&_.completer&&_.completer.onSeen&&typeof _.completer.onSeen=="function"&&(_.completer.onSeen(this.editor,_),this.hasSeen.add(_))},$.prototype.$onPopupChange=function(_){if(this.inlineRenderer&&this.inlineEnabled){var C=_?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(C),this.popup.isMouseOver&&this.setSelectOnHover){this.tooltipTimer.call(null,null);return}this.popupTimer.schedule(),this.tooltipTimer.schedule()}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},$.prototype.$updateGhostText=function(_){var C=this.base.row,L=this.base.column,D=this.editor.getCursorPosition().column,I=this.editor.session.getLine(C).slice(L,D);this.inlineRenderer.show(this.editor,_,I)?this.$seen(_):this.inlineRenderer.hide()},$.prototype.$onPopupRender=function(){var _=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var C=this.popup.getFirstVisibleRow();C<=this.popup.getLastVisibleRow();C++){var L=this.popup.getData(C);L&&(!_||L.hideInlinePreview)&&this.$seen(L)}},$.prototype.$onPopupShow=function(_){this.$onPopupChange(_),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},$.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var _=this.editor.container.parentNode,C=[];_;)C.push(_),_.addEventListener("scroll",this.onLayoutChange,{passive:!0}),_=_.parentNode;this.$elements=C}},$.prototype.unObserveLayoutChanges=function(){var _=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(C){C.removeEventListener("scroll",_.onLayoutChange,{passive:!0})}),this.$elements=null},$.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},$.prototype.$updatePopupPosition=function(){var _=this.editor,C=_.renderer,L=C.layerConfig.lineHeight,D=C.$cursorLayer.getPixelPosition(this.base,!0);D.left-=this.popup.getTextLeftOffset();var I=_.container.getBoundingClientRect();D.top+=I.top-C.layerConfig.offset,D.left+=I.left-_.renderer.scrollLeft,D.left+=C.gutterWidth;var M={top:D.top,left:D.left};C.$ghostText&&C.$ghostTextWidget&&this.base.row===C.$ghostText.position.row&&(M.top+=C.$ghostTextWidget.el.offsetHeight);var W=_.container.getBoundingClientRect().bottom-L,z=W<M.top?{top:W,left:M.left}:M;this.popup.tryShow(z,L,"bottom")||this.popup.tryShow(D,L,"top")||this.popup.show(D,L)},$.prototype.openPopup=function(_,C,L){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var D=this.popup.getRow(),I=this.popup.data[D];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:u(this.popup.getRow()),inline:this.inlineEnabled}),_.keyBinding.addKeyboardHandler(this.keyboardHandler);var M;this.stickySelection&&(M=this.popup.data.indexOf(I)),(!M||M===-1)&&(M=0),this.popup.setRow(this.autoSelect?M:-1),M===D&&I!==this.completions.filtered[M]&&this.$onPopupChange();var W=this.inlineRenderer&&this.inlineEnabled;if(M===D&&W){var z=this.popup.getData(this.popup.getRow());this.$updateGhostText(z)}L||(this.popup.setTheme(_.getTheme()),this.popup.setFontSize(_.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},$.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off("afterRender",this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},$.prototype.changeListener=function(_){var C=this.editor.selection.lead;(C.row!=this.base.row||C.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},$.prototype.blurListener=function(_){var C=document.activeElement,L=this.editor.textInput.getElement(),D=_.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(_.relatedTarget),I=this.popup&&this.popup.container;C!=L&&C.parentNode!=I&&!D&&C!=this.tooltipNode&&_.relatedTarget!=L&&this.detach()},$.prototype.mousedownListener=function(_){this.detach()},$.prototype.mousewheelListener=function(_){this.popup&&!this.popup.isMouseOver&&this.detach()},$.prototype.mouseOutListener=function(_){this.popup.isOpen&&this.$updatePopupPosition()},$.prototype.goTo=function(_){this.popup.goTo(_)},$.prototype.insertMatch=function(_,C){if(_||(_=this.popup.getData(this.popup.getRow())),!_)return!1;if(_.value==="")return this.detach();var L=this.completions,D=this.getCompletionProvider().insertMatch(this.editor,_,L.filterText,C);return this.completions==L&&this.detach(),D},$.prototype.showPopup=function(_,C){this.editor&&this.detach(),this.activated=!0,this.editor=_,_.completer!=this&&(_.completer&&_.completer.detach(),_.completer=this),_.on("changeSelection",this.changeListener),_.on("blur",this.blurListener),_.on("mousedown",this.mousedownListener),_.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,C)},$.prototype.getCompletionProvider=function(_){return this.completionProvider||(this.completionProvider=new x(_)),this.completionProvider},$.prototype.gatherCompletions=function(_,C){return this.getCompletionProvider().gatherCompletions(_,C)},$.prototype.updateCompletions=function(_,C){if(_&&this.base&&this.completions){var D=this.editor.getCursorPosition(),I=this.editor.session.getTextRange({start:this.base,end:D});if(I==this.completions.filterText)return;if(this.completions.setFilter(I),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==I&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,I,_);return}if(C&&C.matches){var D=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(D.row,D.column),this.base.$insertRight=!0,this.completions=new E(C.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",_)}var L=this.editor.getSession(),D=this.editor.getCursorPosition(),I=f.getCompletionPrefix(this.editor);this.base=L.doc.createAnchor(D.row,D.column-I.length),this.base.$insertRight=!0;var M={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:I,pos:D}).provideCompletions(this.editor,M,(function(W,z,O){var T=z.filtered,A=f.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),O){if(!T.length){var N=!this.autoShown&&this.emptyMessage;if(typeof N=="function"&&(N=this.emptyMessage(A)),N){var B=[{caption:N,value:""}];this.completions=new E(B),this.openPopup(this.editor,A,_),this.popup.renderer.setStyle("ace_loading",!1),this.popup.renderer.setStyle("ace_empty-message",!0);return}return this.detach()}if(T.length==1&&T[0].value==A&&!T[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&T.length==1)return this.insertMatch(T[0])}this.completions=!O&&this.showLoadingState?new E($.completionsForLoading.concat(T),z.filterText):z,this.openPopup(this.editor,A,_),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!O)}).bind(this)),this.showLoadingState&&!this.autoShown&&(!this.popup||!this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},$.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},$.prototype.updateDocTooltip=function(){var _=this.popup,C=this.completions&&this.completions.filtered,L=C&&(C[_.getHoveredRow()]||C[_.getRow()]),D=null;if(!L||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var I=this.editor.completers.length,M=0;M<I;M++){var W=this.editor.completers[M];if(W.getDocTooltip&&L.completerId===W.id){D=W.getDocTooltip(L);break}}if(!D&&typeof L!="string"&&(D=L),typeof D=="string"&&(D={docText:D}),!D||!D.docHTML&&!D.docText)return this.hideDocTooltip();this.showDocTooltip(D)},$.prototype.showDocTooltip=function(_){this.tooltipNode||(this.tooltipNode=s.createElement("div"),this.tooltipNode.style.margin="0",this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.style.overscrollBehavior="contain",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"),this.tooltipNode.addEventListener("wheel",l));var C=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(C.isDark?"ace_dark ":"")+(C.cssClass||"");var L=this.tooltipNode;_.docHTML?L.innerHTML=_.docHTML:_.docText&&(L.textContent=_.docText),L.parentNode||this.popup.container.appendChild(this.tooltipNode);var D=this.popup,I=D.container.getBoundingClientRect(),M=400,W=300,z=D.renderer.scrollBar.width||10,O=I.left,T=window.innerWidth-I.right-z,A=D.isTopdown?window.innerHeight-z-I.bottom:I.top,N=[Math.min(T/M,1),Math.min(O/M,1),Math.min(A/W,1)*.9],B=Math.max.apply(Math,N),U=L.style;U.display="block",B==N[0]||N[0]>=1?(U.left=I.right+1+"px",U.right="",U.maxWidth=M*B+"px",U.top=I.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-z-I.top,W)+"px"):B==N[1]||N[1]>=1?(U.right=window.innerWidth-I.left+"px",U.left="",U.maxWidth=M*B+"px",U.top=I.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-z-I.top,W)+"px"):B==N[2]&&(U.left=I.left+"px",U.right="",U.maxWidth=Math.min(M,window.innerWidth-I.left)+"px",D.isTopdown?(U.top=I.bottom+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-z-I.bottom,W)+"px"):(U.top="",U.bottom=window.innerHeight-I.top+"px",U.maxHeight=Math.min(I.top,W)+"px")),s.$fixPositionBug(L)},$.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var _=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==_&&this.editor.focus(),this.tooltipNode=null,_.parentNode&&_.parentNode.removeChild(_)}},$.prototype.onTooltipClick=function(_){for(var C=_.target;C&&C!=this.tooltipNode;){if(C.nodeName=="A"&&C.href){C.rel="noreferrer",C.target="_blank";break}C=C.parentNode}},$.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var _=this.popup.container;_&&_.parentNode&&_.parentNode.removeChild(_)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",p),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},$.for=function(_){return _.completer instanceof $||(_.completer&&(_.completer.destroy(),_.completer=null),h.get("sharedPopups")?($.$sharedInstance||($.$sharedInstance=new $),_.completer=$.$sharedInstance):(_.completer=new $,_.once("destroy",p))),_.completer},$})();y.prototype.commands={Up:function($){$.completer.goTo("up")},Down:function($){$.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function($){$.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function($){$.completer.goTo("end")},Esc:function($){$.completer.detach()},Return:function($){return $.completer.insertMatch()},"Shift-Return":function($){$.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function($){var _=$.completer.insertMatch();if(_||$.tabstopManager)return _;$.completer.goTo("down")},Backspace:function($){$.execCommand("backspace");var _=f.getCompletionPrefix($);!_&&$.completer&&$.completer.detach()},PageUp:function($){$.completer.popup.gotoPageUp()},PageDown:function($){$.completer.popup.gotoPageDown()}},y.startCommand={name:"startAutocomplete",exec:function($,_){var C=y.for($);C.autoInsert=!1,C.autoSelect=!0,C.autoShown=!1,C.showPopup($,_),C.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var x=(function(){function $(_){this.initialPosition=_,this.active=!0}return $.prototype.insertByIndex=function(_,C,L){return!this.completions||!this.completions.filtered?!1:this.insertMatch(_,this.completions.filtered[C],L)},$.prototype.insertMatch=function(_,C,L){if(!C)return!1;if(_.startOperation({command:{name:"insertMatch"}}),C.completer&&C.completer.insertMatch)C.completer.insertMatch(_,C);else{if(!this.completions)return!1;var D=this.completions.filterText.length,I=0;if(C.range&&C.range.start.row===C.range.end.row&&(D-=this.initialPosition.prefix.length,D+=this.initialPosition.pos.column-C.range.start.column,I+=C.range.end.column-this.initialPosition.pos.column),D||I){var M;_.selection.getAllRanges?M=_.selection.getAllRanges():M=[_.getSelectionRange()];for(var W=0,z;z=M[W];W++)z.start.column-=D,z.end.column+=I,_.session.remove(z)}C.snippet?c.insertSnippet(_,C.snippet):this.$insertString(_,C),C.completer&&C.completer.onInsert&&typeof C.completer.onInsert=="function"&&C.completer.onInsert(_,C),C.command&&C.command==="startAutocomplete"&&_.execCommand(C.command)}return _.endOperation(),!0},$.prototype.$insertString=function(_,C){var L=C.value||C;_.execCommand("insertstring",L)},$.prototype.gatherCompletions=function(_,C){var L=_.getSession(),D=_.getCursorPosition(),I=f.getCompletionPrefix(_),M=[];this.completers=_.completers;var W=_.completers.length;return _.completers.forEach(function(z,O){z.getCompletions(_,L,D,I,function(T,A){z.hideInlinePreview&&(A=A.map(function(N){return Object.assign(N,{hideInlinePreview:z.hideInlinePreview})})),!T&&A&&(M=M.concat(A)),C(null,{prefix:f.getCompletionPrefix(_),matches:M,finished:--W===0})})}),!0},$.prototype.provideCompletions=function(_,C,L){var D=(function(z){var O=z.prefix,T=z.matches;this.completions=new E(T),C.exactMatch&&(this.completions.exactMatch=!0),C.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(O),(z.finished||this.completions.filtered.length)&&L(null,this.completions,z.finished)}).bind(this),I=!0,M=null;if(this.gatherCompletions(_,(function(z,O){if(this.active){z&&(L(z,[],!0),this.detach());var T=O.prefix;if(T.indexOf(O.prefix)===0){if(I){M=O;return}D(O)}}}).bind(this)),I=!1,M){var W=M;M=null,D(W)}},$.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(_){typeof _.cancel=="function"&&_.cancel()})},$})(),E=(function(){function $(_,C){this.all=_,this.filtered=_,this.filterText=C||"",this.exactMatch=!1,this.ignoreCaption=!1}return $.prototype.setFilter=function(_){if(_.length>this.filterText&&_.lastIndexOf(this.filterText,0)===0)var C=this.filtered;else var C=this.all;this.filterText=_,C=this.filterCompletions(C,this.filterText),C=C.sort(function(D,I){return I.exactMatch-D.exactMatch||I.$score-D.$score||(D.caption||D.value).localeCompare(I.caption||I.value)});var L=null;C=C.filter(function(D){var I=D.snippet||D.caption||D.value;return I===L?!1:(L=I,!0)}),this.filtered=C},$.prototype.filterCompletions=function(_,C){var L=[],D=C.toUpperCase(),I=C.toLowerCase();e:for(var M=0,W;W=_[M];M++){if(W.skipFilter){W.$score=W.score,L.push(W);continue}var z=!this.ignoreCaption&&W.caption||W.value||W.snippet;if(z){var O=-1,T=0,A=0,N,B;if(this.exactMatch){if(C!==z.substr(0,C.length))continue e}else{var U=z.toLowerCase().indexOf(I);if(U>-1)A=U;else for(var G=0;G<C.length;G++){var J=z.indexOf(I[G],O+1),Q=z.indexOf(D[G],O+1);if(N=J>=0&&(Q<0||J<Q)?J:Q,N<0)continue e;B=N-O-1,B>0&&(O===-1&&(A+=10),A+=B,T|=1<<G),O=N}}W.matchMask=T,W.exactMatch=A?0:1,W.$score=(W.score||0)-A,L.push(W)}}return L},$})();r.Autocomplete=y,r.CompletionProvider=x,r.FilteredList=E}),ace.define("ace/marker_group",["require","exports","module"],function(e,r,m){var d=(function(){function g(w,u){u&&(this.markerType=u.markerType),this.markers=[],this.session=w,w.addDynamicMarker(this)}return g.prototype.getMarkerAtPosition=function(w){return this.markers.find(function(u){return u.range.contains(w.row,w.column)})},g.prototype.markersComparator=function(w,u){return w.range.start.row-u.range.start.row},g.prototype.setMarkers=function(w){this.markers=w.sort(this.markersComparator).slice(0,this.MAX_MARKERS),this.session._signal("changeBackMarker")},g.prototype.update=function(w,u,f,a){if(!(!this.markers||!this.markers.length))for(var s=a.firstRow,c=a.lastRow,h,o=0,l=0,p=0;p<this.markers.length;p++){var y=this.markers[p];if(!(y.range.end.row<s)&&!(y.range.start.row>c)&&(y.range.start.row===l?o++:(l=y.range.start.row,o=0),!(o>200))){var x=y.range.clipRows(s,c);if(!(x.start.row===x.end.row&&x.start.column===x.end.column)){var E=x.toScreenRange(f);if(E.isEmpty()){h=f.getNextFoldLine(x.end.row,h),h&&h.end.row>x.end.row&&(s=h.end.row);continue}this.markerType==="fullLine"?u.drawFullLineMarker(w,E,y.className,a):E.isMultiLine()?this.markerType==="line"?u.drawMultiLineMarker(w,E,y.className,a):u.drawTextMarker(w,E,y.className,a):u.drawSingleLineMarker(w,E,y.className+" ace_br15",a)}}}},g})();d.prototype.MAX_MARKERS=1e4,r.MarkerGroup=d}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(e,r,m){function d(f,a){var s=f.getTextRange(w.fromPoints({row:0,column:0},a));return s.split(u).length-1}function g(f,a){var s=d(f,a),c=f.getValue().split(u),h=Object.create(null),o=c[s];return c.forEach(function(l,p){if(!(!l||l===o)){var y=Math.abs(s-p),x=c.length-y;h[l]?h[l]=Math.max(x,h[l]):h[l]=x}}),h}var w=e("../range").Range,u=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;r.id="textCompleter",r.getCompletions=function(f,a,s,c,h){var o=g(a,s),l=Object.keys(o);h(null,l.map(function(p){return{caption:p,value:p,score:o[p],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/marker_group","ace/autocomplete/text_completer","ace/editor","ace/config"],function(e,r,m){var d=e("../snippets").snippetManager,g=e("../autocomplete").Autocomplete,w=e("../config"),u=e("../lib/lang"),f=e("../autocomplete/util"),a=e("../marker_group").MarkerGroup,s=e("../autocomplete/text_completer"),c={getCompletions:function(I,M,W,z,O){if(M.$mode.completer)return M.$mode.completer.getCompletions(I,M,W,z,O);var T=I.session.getState(W.row),A=M.$mode.getCompletions(T,M,W,z);A=A.map(function(N){return N.completerId=c.id,N}),O(null,A)},id:"keywordCompleter"},h=function(I){var M={};return I.replace(/\${(\d+)(:(.*?))?}/g,function(W,z,O,T){return M[z]=T||""}).replace(/\$(\d+?)/g,function(W,z){return M[z]})},o={getCompletions:function(I,M,W,z,O){var T=[],A=M.getTokenAt(W.row,W.column);A&&A.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?T.push("html-tag"):T=d.getActiveScopes(I);var N=d.snippetMap,B=[];T.forEach(function(U){for(var G=N[U]||[],J=G.length;J--;){var Q=G[J],le=Q.name||Q.tabTrigger;le&&B.push({caption:le,snippet:Q.content,meta:Q.tabTrigger&&!Q.name?Q.tabTrigger+"⇥ ":"snippet",completerId:o.id})}},this),O(null,B)},getDocTooltip:function(I){I.snippet&&!I.docHTML&&(I.docHTML=["<b>",u.escapeHTML(I.caption),"</b>","<hr></hr>",u.escapeHTML(h(I.snippet))].join(""))},id:"snippetCompleter"},l=[o,s,c];r.setCompleters=function(I){l.length=0,I&&l.push.apply(l,I)},r.addCompleter=function(I){l.push(I)},r.textCompleter=s,r.keyWordCompleter=c,r.snippetCompleter=o;var p={name:"expandSnippet",exec:function(I){return d.expandWithTab(I)},bindKey:"Tab"},y=function(I,M){x(M.session.$mode)},x=function(I){typeof I=="string"&&(I=w.$modes[I]),I&&(d.files||(d.files={}),E(I.$id,I.snippetFileId),I.modes&&I.modes.forEach(x))},E=function(I,M){!M||!I||d.files[I]||(d.files[I]={},w.loadModule(M,function(W){W&&(d.files[I]=W,!W.snippets&&W.snippetText&&(W.snippets=d.parseSnippetFile(W.snippetText)),d.register(W.snippets||[],W.scope),W.includeScopes&&(d.snippetMap[W.scope].includeScopes=W.includeScopes,W.includeScopes.forEach(function(z){x("ace/mode/"+z)})))}))},$=function(I){var M=I.editor,W=M.completer&&M.completer.activated;if(I.command.name==="backspace")W&&!f.getCompletionPrefix(M)&&M.completer.detach();else if(I.command.name==="insertstring"&&!W){_=I;var z=I.editor.$liveAutocompletionDelay;z?C.delay(z):L(I)}},_,C=u.delayedCall(function(){L(_)},0),L=function(I){var M=I.editor,W=f.getCompletionPrefix(M),z=I.args,O=f.triggerAutocomplete(M,z);if(W&&W.length>=M.$liveAutocompletionThreshold||O){var T=g.for(M);T.autoShown=!0,T.showPopup(M)}},D=e("../editor").Editor;e("../config").defineOptions(D.prototype,"editor",{enableBasicAutocompletion:{set:function(I){I?(g.for(this),this.completers||(this.completers=Array.isArray(I)?I:l),this.commands.addCommand(g.startCommand)):this.commands.removeCommand(g.startCommand)},value:!1},enableLiveAutocompletion:{set:function(I){I?(this.completers||(this.completers=Array.isArray(I)?I:l),this.commands.on("afterExec",$)):this.commands.off("afterExec",$)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(I){I?(this.commands.addCommand(p),this.on("changeMode",y),y(null,this)):(this.commands.removeCommand(p),this.off("changeMode",y))},value:!1}}),r.MarkerGroup=a}),(function(){ace.require(["ace/ext/language_tools"],function(e){t&&(t.exports=e)})})()})(Rg)),Rg.exports}eA();var Mg={exports:{}},Ig;function tA(){return Ig||(Ig=1,(function(t,n){ace.define("ace/ext/searchbox-css",["require","exports","module"],function(e,r,m){m.exports=`
1233
+
1234
+ /* ------------------------------------------------------------------------------------------
1235
+ * Editor Search Form
1236
+ * --------------------------------------------------------------------------------------- */
1237
+ .ace_search {
1238
+ background-color: #ddd;
1239
+ color: #666;
1240
+ border: 1px solid #cbcbcb;
1241
+ border-top: 0 none;
1242
+ overflow: hidden;
1243
+ margin: 0;
1244
+ padding: 4px 6px 0 4px;
1245
+ position: absolute;
1246
+ top: 0;
1247
+ z-index: 99;
1248
+ white-space: normal;
1249
+ }
1250
+ .ace_search.left {
1251
+ border-left: 0 none;
1252
+ border-radius: 0px 0px 5px 0px;
1253
+ left: 0;
1254
+ }
1255
+ .ace_search.right {
1256
+ border-radius: 0px 0px 0px 5px;
1257
+ border-right: 0 none;
1258
+ right: 0;
1259
+ }
1260
+
1261
+ .ace_search_form, .ace_replace_form {
1262
+ margin: 0 20px 4px 0;
1263
+ overflow: hidden;
1264
+ line-height: 1.9;
1265
+ }
1266
+ .ace_replace_form {
1267
+ margin-right: 0;
1268
+ }
1269
+ .ace_search_form.ace_nomatch {
1270
+ outline: 1px solid red;
1271
+ }
1272
+
1273
+ .ace_search_field {
1274
+ border-radius: 3px 0 0 3px;
1275
+ background-color: white;
1276
+ color: black;
1277
+ border: 1px solid #cbcbcb;
1278
+ border-right: 0 none;
1279
+ outline: 0;
1280
+ padding: 0;
1281
+ font-size: inherit;
1282
+ margin: 0;
1283
+ line-height: inherit;
1284
+ padding: 0 6px;
1285
+ min-width: 17em;
1286
+ vertical-align: top;
1287
+ min-height: 1.8em;
1288
+ box-sizing: content-box;
1289
+ }
1290
+ .ace_searchbtn {
1291
+ border: 1px solid #cbcbcb;
1292
+ line-height: inherit;
1293
+ display: inline-block;
1294
+ padding: 0 6px;
1295
+ background: #fff;
1296
+ border-right: 0 none;
1297
+ border-left: 1px solid #dcdcdc;
1298
+ cursor: pointer;
1299
+ margin: 0;
1300
+ position: relative;
1301
+ color: #666;
1302
+ }
1303
+ .ace_searchbtn:last-child {
1304
+ border-radius: 0 3px 3px 0;
1305
+ border-right: 1px solid #cbcbcb;
1306
+ }
1307
+ .ace_searchbtn:disabled {
1308
+ background: none;
1309
+ cursor: default;
1310
+ }
1311
+ .ace_searchbtn:hover {
1312
+ background-color: #eef1f6;
1313
+ }
1314
+ .ace_searchbtn.prev, .ace_searchbtn.next {
1315
+ padding: 0px 0.7em
1316
+ }
1317
+ .ace_searchbtn.prev:after, .ace_searchbtn.next:after {
1318
+ content: "";
1319
+ border: solid 2px #888;
1320
+ width: 0.5em;
1321
+ height: 0.5em;
1322
+ border-width: 2px 0 0 2px;
1323
+ display:inline-block;
1324
+ transform: rotate(-45deg);
1325
+ }
1326
+ .ace_searchbtn.next:after {
1327
+ border-width: 0 2px 2px 0 ;
1328
+ }
1329
+ .ace_searchbtn_close {
1330
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;
1331
+ border-radius: 50%;
1332
+ border: 0 none;
1333
+ color: #656565;
1334
+ cursor: pointer;
1335
+ font: 16px/16px Arial;
1336
+ padding: 0;
1337
+ height: 14px;
1338
+ width: 14px;
1339
+ top: 9px;
1340
+ right: 7px;
1341
+ position: absolute;
1342
+ }
1343
+ .ace_searchbtn_close:hover {
1344
+ background-color: #656565;
1345
+ background-position: 50% 100%;
1346
+ color: white;
1347
+ }
1348
+
1349
+ .ace_button {
1350
+ margin-left: 2px;
1351
+ cursor: pointer;
1352
+ -webkit-user-select: none;
1353
+ -moz-user-select: none;
1354
+ -o-user-select: none;
1355
+ -ms-user-select: none;
1356
+ user-select: none;
1357
+ overflow: hidden;
1358
+ opacity: 0.7;
1359
+ border: 1px solid rgba(100,100,100,0.23);
1360
+ padding: 1px;
1361
+ box-sizing: border-box!important;
1362
+ color: black;
1363
+ }
1364
+
1365
+ .ace_button:hover {
1366
+ background-color: #eee;
1367
+ opacity:1;
1368
+ }
1369
+ .ace_button:active {
1370
+ background-color: #ddd;
1371
+ }
1372
+
1373
+ .ace_button.checked {
1374
+ border-color: #3399ff;
1375
+ opacity:1;
1376
+ }
1377
+
1378
+ .ace_search_options{
1379
+ margin-bottom: 3px;
1380
+ text-align: right;
1381
+ -webkit-user-select: none;
1382
+ -moz-user-select: none;
1383
+ -o-user-select: none;
1384
+ -ms-user-select: none;
1385
+ user-select: none;
1386
+ clear: both;
1387
+ }
1388
+
1389
+ .ace_search_counter {
1390
+ float: left;
1391
+ font-family: arial;
1392
+ padding: 0 8px;
1393
+ }`}),ace.define("ace/ext/searchbox",["require","exports","module","ace/ext/searchbox","ace/ext/searchbox","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox-css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"],function(e,r,m){var d=e("../lib/dom"),g=e("../lib/lang"),w=e("../lib/event"),u=e("./searchbox-css"),f=e("../keyboard/hash_handler").HashHandler,a=e("../lib/keys"),s=e("../config").nls,c=999;d.importCssString(u,"ace_searchbox",!1);var h=(function(){function p(y,x,E){this.activeInput,this.element=d.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:s("search-box.find.placeholder","Search for"),spellcheck:"false"}],["span",{action:"findPrev",class:"ace_searchbtn prev"},"​"],["span",{action:"findNext",class:"ace_searchbtn next"},"​"],["span",{action:"findAll",class:"ace_searchbtn",title:"Alt-Enter"},s("search-box.find-all.text","All")]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:s("search-box.replace.placeholder","Replace with"),spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},s("search-box.replace-next.text","Replace")],["span",{action:"replaceAll",class:"ace_searchbtn"},s("search-box.replace-all.text","All")]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:s("search-box.toggle-replace.title","Toggle Replace mode"),style:"float:left;margin-top:-2px;padding:0 5px;"},"+"],["span",{class:"ace_search_counter"}],["span",{action:"toggleRegexpMode",class:"ace_button",title:s("search-box.toggle-regexp.title","RegExp Search")},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:s("search-box.toggle-case.title","CaseSensitive Search")},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:s("search-box.toggle-whole-word.title","Whole Word Search")},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:s("search-box.toggle-in-selection.title","Search In Selection")},"S"]]]),this.setSession=this.setSession.bind(this),this.$onEditorInput=this.onEditorInput.bind(this),this.$init(),this.setEditor(y),d.importCssString(u,"ace_searchbox",y.container),w.addListener(this.element,"touchstart",function($){$.stopPropagation()},y)}return p.prototype.setEditor=function(y){y.searchBox=this,y.renderer.scroller.appendChild(this.element),this.editor=y},p.prototype.setSession=function(y){this.searchRange=null,this.$syncOptions(!0)},p.prototype.onEditorInput=function(){this.find(!1,!1,!0)},p.prototype.$initElements=function(y){this.searchBox=y.querySelector(".ace_search_form"),this.replaceBox=y.querySelector(".ace_replace_form"),this.searchOption=y.querySelector("[action=searchInSelection]"),this.replaceOption=y.querySelector("[action=toggleReplace]"),this.regExpOption=y.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=y.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=y.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=y.querySelector(".ace_search_counter")},p.prototype.$init=function(){var y=this.element;this.$initElements(y);var x=this;w.addListener(y,"mousedown",function(E){setTimeout(function(){x.activeInput.focus()},0),w.stopPropagation(E)}),w.addListener(y,"click",function(E){var $=E.target||E.srcElement,_=$.getAttribute("action");_&&x[_]?x[_]():x.$searchBarKb.commands[_]&&x.$searchBarKb.commands[_].exec(x),w.stopPropagation(E)}),w.addCommandKeyListener(y,function(E,$,_){var C=a.keyCodeToString(_),L=x.$searchBarKb.findKeyCommand($,C);L&&L.exec&&(L.exec(x),w.stopEvent(E))}),this.$onChange=g.delayedCall(function(){x.find(!1,!1)}),w.addListener(this.searchInput,"input",function(){x.$onChange.schedule(20)}),w.addListener(this.searchInput,"focus",function(){x.activeInput=x.searchInput,x.searchInput.value&&x.highlight()}),w.addListener(this.replaceInput,"focus",function(){x.activeInput=x.replaceInput,x.searchInput.value&&x.highlight()})},p.prototype.setSearchRange=function(y){this.searchRange=y,y?this.searchRangeMarker=this.editor.session.addMarker(y,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},p.prototype.$syncOptions=function(y){d.setCssClass(this.replaceOption,"checked",this.searchRange),d.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",d.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),d.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),d.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var x=this.editor.getReadOnly();this.replaceOption.style.display=x?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!x?"":"none",this.find(!1,!1,y)},p.prototype.highlight=function(y){this.editor.session.highlight(y||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},p.prototype.find=function(y,x,E){if(this.editor.session){var $=this.editor.find(this.searchInput.value,{skipCurrent:y,backwards:x,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:E,range:this.searchRange}),_=!$&&this.searchInput.value;d.setCssClass(this.searchBox,"ace_nomatch",_),this.editor._emit("findSearchBox",{match:!_}),this.highlight(),this.updateCounter()}},p.prototype.updateCounter=function(){var y=this.editor,x=y.$search.$options.re,E=x.unicode,$=0,_=0;if(x){var C=this.searchRange?y.session.getTextRange(this.searchRange):y.getValue();y.$search.$isMultilineSearch(y.getLastSearchOptions())&&(C=C.replace(/\r\n|\r|\n/g,`
1394
+ `),y.session.doc.$autoNewLine=`
1395
+ `);var L=y.session.doc.positionToIndex(y.selection.anchor);this.searchRange&&(L-=y.session.doc.positionToIndex(this.searchRange.start));for(var D=x.lastIndex=0,I;(I=x.exec(C))&&($++,D=I.index,D<=L&&_++,!($>c||!I[0]&&(x.lastIndex=D+=g.skipEmptyMatch(C,D,E),D>=C.length))););}this.searchCounter.textContent=s("search-box.search-counter","$0 of $1",[_,$>c?c+"+":$])},p.prototype.findNext=function(){this.find(!0,!1)},p.prototype.findPrev=function(){this.find(!0,!0)},p.prototype.findAll=function(){var y=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),x=!y&&this.searchInput.value;d.setCssClass(this.searchBox,"ace_nomatch",x),this.editor._emit("findSearchBox",{match:!x}),this.highlight(),this.hide()},p.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},p.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},p.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},p.prototype.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.editor.off("input",this.$onEditorInput),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},p.prototype.show=function(y,x){this.active=!0,this.editor.on("changeSession",this.setSession),this.editor.on("input",this.$onEditorInput),this.element.style.display="",this.replaceOption.checked=x,this.editor.$search.$options.regExp&&(y=g.escapeRegExp(y)),y!=null&&(this.searchInput.value=y),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},p.prototype.isFocused=function(){var y=document.activeElement;return y==this.searchInput||y==this.replaceInput},p})(),o=new f;o.bindKeys({"Ctrl-f|Command-f":function(p){var y=p.isReplace=!p.isReplace;p.replaceBox.style.display=y?"":"none",p.replaceOption.checked=!1,p.$syncOptions(),p.searchInput.focus()},"Ctrl-H|Command-Option-F":function(p){p.editor.getReadOnly()||(p.replaceOption.checked=!0,p.$syncOptions(),p.replaceInput.focus())},"Ctrl-G|Command-G":function(p){p.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(p){p.findPrev()},esc:function(p){setTimeout(function(){p.hide()})},Return:function(p){p.activeInput==p.replaceInput&&p.replace(),p.findNext()},"Shift-Return":function(p){p.activeInput==p.replaceInput&&p.replace(),p.findPrev()},"Alt-Return":function(p){p.activeInput==p.replaceInput&&p.replaceAll(),p.findAll()},"Tab|Shift-Tab":function(p){(p.activeInput==p.replaceInput?p.searchInput:p.replaceInput).focus()}}),o.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(p){p.regExpOption.checked=!p.regExpOption.checked,p.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(p){p.caseSensitiveOption.checked=!p.caseSensitiveOption.checked,p.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(p){p.wholeWordOption.checked=!p.wholeWordOption.checked,p.$syncOptions()}},{name:"toggleReplace",exec:function(p){p.replaceOption.checked=!p.replaceOption.checked,p.$syncOptions()}},{name:"searchInSelection",exec:function(p){p.searchOption.checked=!p.searchRange,p.setSearchRange(p.searchOption.checked&&p.editor.getSelectionRange()),p.$syncOptions()}}]);var l=new f([{bindKey:"Esc",name:"closeSearchBar",exec:function(p){p.searchBox.hide()}}]);h.prototype.$searchBarKb=o,h.prototype.$closeSearchBarKb=l,r.SearchBox=h,r.Search=function(p,y){var x=p.searchBox||new h(p),E=p.session.selection.getRange(),$=E.isMultiLine()?"":p.session.getTextRange(E);x.show($,y)}}),(function(){ace.require(["ace/ext/searchbox"],function(e){t&&(t.exports=e)})})()})(Mg)),Mg.exports}tA();var Lg={exports:{}},Og;function nA(){return Og||(Og=1,(function(t,n){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(e,r,m){function d(f,a){function s(I,M,W){if(!(I.length<M)){var z=I.slice(0,M),O=I.slice(M),T=/^(?:(\s+)|(\S+)(\s+))/.exec(O),A=/(?:(\s+)|(\s+)(\S+))$/.exec(z),N=0,B=0;if(A&&!A[2]&&(N=M-A[1].length,B=M),T&&!T[2]&&(N||(N=M),B=M+T[1].length),N)return{start:N,end:B};if(A&&A[2]&&A.index>W)return{start:A.index,end:A.index+A[2].length};if(T&&T[2])return N=M+T[2].length,{start:N,end:N+T[3].length}}}for(var c=a.column||f.getOption("printMarginColumn"),h=a.allowMerge!=0,o=Math.min(a.startRow,a.endRow),l=Math.max(a.startRow,a.endRow),p=f.session;o<=l;){var y=p.getLine(o);if(y.length>c){var x=s(y,c,5);if(x){var E=/^\s*/.exec(y)[0];p.replace(new w(o,x.start,o,x.end),`
1396
+ `+E)}l++}else if(h&&/\S/.test(y)&&o!=l){var $=p.getLine(o+1);if($&&/\S/.test($)){var _=y.replace(/\s+$/,""),C=$.replace(/^\s+/,""),L=_+" "+C,x=s(L,c,5);if(x&&x.start>_.length||L.length<c){var D=new w(o,_.length,o+1,$.length-C.length);p.replace(D," "),o--,l--}else _.length<y.length&&p.remove(new w(o,_.length,o,y.length))}}o++}}function g(f){if(f.command.name=="insertstring"&&/\S/.test(f.args)){var a=f.editor,s=a.selection.cursor;if(s.column<=a.renderer.$printMarginColumn)return;var c=a.session.$undoManager.$lastDelta;d(a,{startRow:s.row,endRow:s.row,allowMerge:!1}),c!=a.session.$undoManager.$lastDelta&&a.session.markUndoGroup()}}var w=e("../range").Range,u=e("../editor").Editor;e("../config").defineOptions(u.prototype,"editor",{hardWrap:{set:function(f){f?this.commands.on("afterExec",g):this.commands.off("afterExec",g)},value:!1}}),r.hardWrap=d}),ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/mode/text","ace/ext/hardwrap","ace/multi_select"],function(e,r,m){function d(b){return{row:b.line,column:b.ch}}function g(b){return new ze(b.row,b.column)}function w(b,S,k){if(S.line===k.line&&S.ch>=k.ch-1){var P=b.getLine(S.line),F=P.charCodeAt(S.ch);55296<=F&&F<=55551&&(k.ch+=1)}return{start:S,end:k}}function u(b){b.setOption("disableInput",!0),b.setOption("showCursorWhenSelecting",!1),je.signal(b,"vim-mode-change",{mode:"normal"}),b.on("cursorActivity",Li),L(b),je.on(b.getInputField(),"paste",a(b))}function f(b){b.setOption("disableInput",!1),b.off("cursorActivity",Li),je.off(b.getInputField(),"paste",a(b)),b.state.vim=null,an&&clearTimeout(an)}function a(b){var S=b.state.vim;return S.onPasteFn||(S.onPasteFn=function(){S.insertMode||(b.setCursor(fe(b.getCursor(),0,1)),Kn.enterInsertMode(b,{},S))}),S.onPasteFn}function s(b,S){return S>=b.firstLine()&&S<=b.lastLine()}function c(b){return/^[a-z]$/.test(b)}function h(b){return"()[]{}".indexOf(b)!=-1}function o(b){return $a.test(b)}function l(b){return dt.test(b)}function p(b){return/^\s*$/.test(b)}function y(b){return".?!".indexOf(b)!=-1}function x(b,S){for(var k=0;k<S.length;k++)if(S[k]==b)return!0;return!1}function E(b,S,k,P,F){if(S===void 0&&!F)throw Error("defaultValue is required unless callback is provided");if(k||(k="string"),Vt[b]={type:k,defaultValue:S,callback:F},P)for(var j=0;j<P.length;j++)Vt[P[j]]=Vt[b];S&&$(b,S)}function $(b,S,k,P){var F=Vt[b];P=P||{};var j=P.scope;if(!F)return new Error("Unknown option: "+b);if(F.type=="boolean"){if(S&&S!==!0)return new Error("Invalid argument: "+b+"="+S);S!==!1&&(S=!0)}F.callback?(j!=="local"&&F.callback(S,void 0),j!=="global"&&k&&F.callback(S,k)):(j!=="local"&&(F.value=F.type=="boolean"?!!S:S),j!=="global"&&k&&(k.state.vim.options[b]={value:S}))}function _(b,S,k){var P=Vt[b];k=k||{};var F=k.scope;if(!P)return new Error("Unknown option: "+b);if(P.callback){var j=S&&P.callback(void 0,S);return F!=="global"&&j!==void 0?j:F!=="local"?P.callback():void 0}var j=F!=="global"&&S&&S.state.vim.options[b];return(j||F!=="local"&&P||{}).value}function C(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=Gn()}function L(b){return b.state.vim||(b.state.vim={inputState:new T,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeReturn:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{},expectLiteralNext:!1}),b.state.vim}function D(){qe={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:Ji(),macroModeState:new C,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new G({}),searchHistoryController:new J,exCommandHistoryController:new J};for(var b in Vt){var S=Vt[b];S.value=S.defaultValue}}function I(b){function S(Y){typeof Y=="string"?Ft.value=Y:Ft=null}if(b[0]=="<"){var k=b.toLowerCase().slice(1,-1),P=k.split("-");if(k=P.pop()||"",k=="lt")b="<";else if(k=="space")b=" ";else if(k=="cr")b=`
1397
+ `;else if(vo[k]){var F=Ft.value,j={key:vo[k],target:{value:F,selectionEnd:F.length,selectionStart:F.length}};Ft.onKeyDown&&Ft.onKeyDown(j,Ft.value,S),Ft&&Ft.onKeyUp&&Ft.onKeyUp(j,Ft.value,S);return}}if(b==`
1398
+ `){var q=Ft;Ft=null,q.onClose&&q.onClose(q.value)}else Ft.value=(Ft.value||"")+b}function M(b,S,k){var P=Zi;if(k){if(qr.indexOf(k)!=-1)return;qr.push(k),Zi=k.noremap!=0}try{for(var F=L(b),j=/<(?:[CSMA]-)*\w+>|./gi,q;q=j.exec(S);){var Y=q[0],X=F.insertMode;if(Ft){I(Y);continue}var oe=_t.handleKey(b,Y,"mapping");if(!oe&&X&&F.insertMode){if(Y[0]=="<"){var ue=Y.toLowerCase().slice(1,-1),we=ue.split("-");if(ue=we.pop()||"",ue=="lt")Y="<";else if(ue=="space")Y=" ";else if(ue=="cr")Y=`
1399
+ `;else{if(vo.hasOwnProperty(ue)){Y=vo[ue],Ho(b,Y);continue}Y=Y[0],j.lastIndex=q.index+1}}b.replaceSelection(Y)}}}finally{if(qr.pop(),Zi=qr.length?P:!1,!qr.length&&Ft){var Ae=Ft;Ft=null,mr(b,Ae)}}}function W(b,S){var k=b.key;if(!cr[k]){k.length>1&&k[0]=="n"&&(k=k.replace("Numpad","")),k=Gr[k]||k;var P="";if(b.ctrlKey&&(P+="C-"),b.altKey&&(P+="A-"),b.metaKey&&(P+="M-"),je.isMac&&b.altKey&&!b.metaKey&&!b.ctrlKey&&(P=P.slice(2)),(P||k.length>1)&&b.shiftKey&&(P+="S-"),S&&!S.expectLiteralNext&&k.length==1){if(Wn.keymap&&k in Wn.keymap)(Wn.remapCtrl!=0||!P)&&(k=Wn.keymap[k]);else if(k.charCodeAt(0)>255){var F=b.code&&b.code.slice(-1)||"";b.shiftKey||(F=F.toLowerCase()),F&&(k=F)}}return P+=k,P.length>1&&(P="<"+P+">"),P}}function z(b,S){Wn.string!==b&&(Wn=O(b)),Wn.remapCtrl=S}function O(b){function S(P){return P.split(/\\?(.)/).filter(Boolean)}var k={};return b?(b.split(/((?:[^\\,]|\\.)+),/).map(function(P){if(P){var F=P.split(/((?:[^\\;]|\\.)+);/);if(F.length==3){var j=S(F[1]),q=S(F[2]);if(j.length!==q.length)return;for(var Y=0;Y<j.length;++Y)k[j[Y]]=q[Y]}else if(F.length==1){var X=S(P);if(X.length%2!==0)return;for(var Y=0;Y<X.length;Y+=2)k[X[Y]]=X[Y+1]}}}),{keymap:k,string:b}):{keymap:k,string:""}}function T(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null,this.changeQueue=null}function A(b,S){b.state.vim.inputState=new T,b.state.vim.expectLiteralNext=!1,je.signal(b,"vim-command-done",S)}function N(){this.removed=[],this.inserted=""}function B(b,S,k){this.clear(),this.keyBuffer=[b||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!S,this.blockwise=!!k}function U(b,S){var k=qe.registerController.registers;if(!b||b.length!=1)throw Error("Register name must be 1 character");k[b]=S,Bs.push(b)}function G(b){this.registers=b,this.unnamedRegister=b['"']=new B,b["."]=new B,b[":"]=new B,b["/"]=new B,b["+"]=new B}function J(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function Q(b,S){On[b]=S}function le(b,S){for(var k=[],P=0;P<S;P++)k.push(b);return k}function re(b,S){us[b]=S}function ce(b,S){Kn[b]=S}function de(b,S,k){var P=b.state.vim,F=P.insertMode||P.visualMode,j=Math.min(Math.max(b.firstLine(),S.line),b.lastLine()),q=b.getLine(j),Y=q.length-1+ +!!F,X=Math.min(Math.max(0,S.ch),Y),oe=q.charCodeAt(X);if(56320<=oe&&oe<=57343){var ue=1;k&&k.line==j&&k.ch>X&&(ue=-1),X+=ue,X>Y&&(X-=2)}return new ze(j,X)}function ie(b){var S={};for(var k in b)b.hasOwnProperty(k)&&(S[k]=b[k]);return S}function fe(b,S,k){return typeof S=="object"&&(k=S.ch,S=S.line),new ze(b.line+S,b.ch+k)}function $e(b,S,k,P){P.operator&&(k="operatorPending");for(var F,j=[],q=[],Y=Zi?S.length-Uo:0,X=Y;X<S.length;X++){var oe=S[X];k=="insert"&&oe.context!="insert"||oe.context&&oe.context!=k||P.operator&&oe.type=="action"||!(F=Re(b,oe.keys))||(F=="partial"&&j.push(oe),F=="full"&&q.push(oe))}return{partial:j.length&&j,full:q.length&&q}}function Re(b,S){var k=S.slice(-11)=="<character>",P=S.slice(-10)=="<register>";if(k||P){var F=S.length-(k?11:10),j=b.slice(0,F),q=S.slice(0,F);return j==q&&b.length>F?"full":q.indexOf(j)==0?"partial":!1}return b==S?"full":S.indexOf(b)==0?"partial":!1}function Ee(b){var S=/^.*(<[^>]+>)$/.exec(b),k=S?S[1]:b.slice(-1);if(k.length>1)switch(k){case"<CR>":k=`
1400
+ `;break;case"<Space>":k=" ";break;default:k=""}return k}function Ue(b,S,k){return function(){for(var P=0;P<k;P++)S(b)}}function He(b){return new ze(b.line,b.ch)}function Ge(b,S){return b.ch==S.ch&&b.line==S.line}function at(b,S){return b.line<S.line?!0:b.line==S.line&&b.ch<S.ch}function We(b,S){return arguments.length>2&&(S=We.apply(void 0,Array.prototype.slice.call(arguments,1))),at(b,S)?b:S}function Me(b,S){return arguments.length>2&&(S=Me.apply(void 0,Array.prototype.slice.call(arguments,1))),at(b,S)?S:b}function Tt(b,S,k){var P=at(b,S),F=at(S,k);return P&&F}function st(b,S){return b.getLine(S).length}function Xt(b){return b.trim?b.trim():b.replace(/^\s+|\s+$/g,"")}function dn(b){return b.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function Zn(b,S,k){var P=st(b,S),F=new Array(k-P+1).join(" ");b.setCursor(new ze(S,P)),b.replaceRange(F,b.getCursor())}function zt(b,S){var k=[],P=b.listSelections(),F=He(b.clipPos(S)),j=!Ge(S,F),q=b.getCursor("head"),Y=mt(P,q),X=Ge(P[Y].head,P[Y].anchor),oe=P.length-1,ue=oe-Y>Y?oe:0,we=P[ue].anchor,Ae=Math.min(we.line,F.line),be=Math.max(we.line,F.line),Ce=we.ch,Pe=F.ch,Ne=P[ue].head.ch-Ce,Ze=Pe-Ce;Ne>0&&Ze<=0?(Ce++,j||Pe--):Ne<0&&Ze>=0?(Ce--,X||Pe++):Ne<0&&Ze==-1&&(Ce--,Pe++);for(var ft=Ae;ft<=be;ft++){var rt={anchor:new ze(ft,Ce),head:new ze(ft,Pe)};k.push(rt)}return b.setSelections(k),S.ch=Pe,we.ch=Ce,we}function kn(b,S,k){for(var P=[],F=0;F<k;F++){var j=fe(S,F,0);P.push({anchor:j,head:j})}b.setSelections(P,0)}function mt(b,S,k){for(var P=0;P<b.length;P++){var F=Ge(b[P].anchor,S),j=Ge(b[P].head,S);if(F||j)return P}return-1}function Ye(b,S){var k=S.lastSelection,P=function(){var j=b.listSelections(),q=j[0],Y=j[j.length-1],X=at(q.anchor,q.head)?q.anchor:q.head,oe=at(Y.anchor,Y.head)?Y.head:Y.anchor;return[X,oe]},F=function(){var j=b.getCursor(),q=b.getCursor(),Y=k.visualBlock;if(Y){var X=Y.width,oe=Y.height;q=new ze(j.line+oe,j.ch+X);for(var ue=[],we=j.line;we<q.line;we++){var Ae=new ze(we,j.ch),be=new ze(we,q.ch),Ce={anchor:Ae,head:be};ue.push(Ce)}b.setSelections(ue)}else{var Pe=k.anchorMark.find(),Ne=k.headMark.find(),Ze=Ne.line-Pe.line,ft=Ne.ch-Pe.ch;q={line:q.line+Ze,ch:Ze?q.ch:ft+q.ch},k.visualLine&&(j=new ze(j.line,0),q=new ze(q.line,st(b,q.line))),b.setSelection(j,q)}return[j,q]};return S.visualMode?P():F()}function Ot(b,S){var k=S.sel.anchor,P=S.sel.head;S.lastPastedText&&(P=b.posFromIndex(b.indexFromPos(k)+S.lastPastedText.length),S.lastPastedText=null),S.lastSelection={anchorMark:b.setBookmark(k),headMark:b.setBookmark(P),anchor:He(k),head:He(P),visualMode:S.visualMode,visualLine:S.visualLine,visualBlock:S.visualBlock}}function Sn(b,S,k,P){var F=b.state.vim.sel,j=P?S:F.head,q=P?S:F.anchor,Y;return at(k,S)&&(Y=k,k=S,S=Y),at(j,q)?(j=We(S,j),q=Me(q,k)):(q=We(S,q),j=Me(j,k),j=fe(j,0,-1),j.ch==-1&&j.line!=b.firstLine()&&(j=new ze(j.line-1,st(b,j.line-1)))),[q,j]}function zn(b,S,F){var P=b.state.vim;S=S||P.sel;var F=F||P.visualLine?"line":P.visualBlock?"block":"char",j=Un(b,S,F);b.setSelections(j.ranges,j.primary)}function Un(b,S,k,P){var F=He(S.head),j=He(S.anchor);if(k=="char"){var q=!P&&!at(S.head,S.anchor)?1:0,Y=at(S.head,S.anchor)?1:0;return F=fe(S.head,0,q),j=fe(S.anchor,0,Y),{ranges:[{anchor:j,head:F}],primary:0}}if(k=="line"){if(at(S.head,S.anchor))F.ch=0,j.ch=st(b,j.line);else{j.ch=0;var X=b.lastLine();F.line>X&&(F.line=X),F.ch=st(b,F.line)}return{ranges:[{anchor:j,head:F}],primary:0}}if(k=="block"){var oe=Math.min(j.line,F.line),ue=j.ch,we=Math.max(j.line,F.line),Ae=F.ch;ue<Ae?Ae+=1:ue+=1;for(var be=we-oe+1,Ce=F.line==oe?0:be-1,Pe=[],Ne=0;Ne<be;Ne++)Pe.push({anchor:new ze(oe+Ne,ue),head:new ze(oe+Ne,Ae)});return{ranges:Pe,primary:Ce}}}function Fn(b){var S=b.getCursor("head");return b.getSelection().length==1&&(S=We(S,b.getCursor("anchor"))),S}function mn(b,S){var k=b.state.vim;S!==!1&&b.setCursor(de(b,k.sel.head)),Ot(b,k),k.visualMode=!1,k.visualLine=!1,k.visualBlock=!1,k.insertMode||je.signal(b,"vim-mode-change",{mode:"normal"})}function En(b,S,k){var P=b.getRange(S,k);if(/\n\s*$/.test(P)){var F=P.split(`
1401
+ `);F.pop();for(var j,j=F.pop();F.length>0&&j&&p(j);j=F.pop())k.line--,k.ch=0;j?(k.line--,k.ch=st(b,k.line)):k.ch=0}}function Xn(b,S,k){S.ch=0,k.ch=0,k.line++}function tn(b){if(!b)return 0;var S=b.search(/\S/);return S==-1?b.length:S}function Vn(b,S,k){var P=S.inclusive,F=S.innerWord,j=S.bigWord,q=S.noSymbol,Y=S.multiline,X=k||Fn(b),oe=b.getLine(X.line),ue=oe,we=X.line,Ae=we,be=X.ch,Ce,Pe=q?Vo[0]:Yi[0];if(F&&/\s/.test(oe.charAt(be)))Pe=function(Rn){return/\s/.test(Rn)};else{for(;!Pe(oe.charAt(be));)if(be++,be>=oe.length){if(!Y)return null;be--,Ce=Ti(b,X,!0,j,!0);break}j?Pe=Yi[0]:(Pe=Vo[0],Pe(oe.charAt(be))||(Pe=Vo[1]))}for(var Ne=be,Ze=be;Pe(oe.charAt(Ze))&&Ze>=0;)Ze--;if(Ze++,Ce)Ne=Ce.to,Ae=Ce.line,ue=b.getLine(Ae),!ue&&Ne==0&&Ne++;else for(;Pe(oe.charAt(Ne))&&Ne<oe.length;)Ne++;if(P){var ft=Ne,rt=X.ch<=Ze&&/\s/.test(oe.charAt(X.ch));if(!rt)for(;/\s/.test(ue.charAt(Ne))&&Ne<ue.length;)Ne++;if(ft==Ne||rt){for(var ot=Ze;/\s/.test(oe.charAt(Ze-1))&&Ze>0;)Ze--;!Ze&&!rt&&(Ze=ot)}}return{start:new ze(we,Ze),end:new ze(Ae,Ne)}}function $i(b,S,k){var P=S;if(!je.findMatchingTag||!je.findEnclosingTag)return{start:P,end:P};var F=je.findMatchingTag(b,S)||je.findEnclosingTag(b,S);return!F||!F.open||!F.close?{start:P,end:P}:k?{start:F.open.from,end:F.close.to}:{start:F.open.to,end:F.close.from}}function ti(b,S,k){Ge(S,k)||qe.jumpList.add(b,S,k)}function sr(b,S){qe.lastCharacterSearch.increment=b,qe.lastCharacterSearch.forward=S.forward,qe.lastCharacterSearch.selectedCharacter=S.selectedCharacter}function qn(b,S,k,P){var F=He(b.getCursor()),j=k?1:-1,q=k?b.lineCount():-1,Y=F.ch,X=F.line,oe=b.getLine(X),ue={lineText:oe,nextCh:oe.charAt(Y),lastCh:null,index:Y,symb:P,reverseSymb:(k?{")":"(","}":"{"}:{"(":")","{":"}"})[P],forward:k,depth:0,curMoveThrough:!1},we=Ni[P];if(!we)return F;var Ae=Di[we].init,be=Di[we].isComplete;for(Ae&&Ae(ue);X!==q&&S;){if(ue.index+=j,ue.nextCh=ue.lineText.charAt(ue.index),!ue.nextCh){if(X+=j,ue.lineText=b.getLine(X)||"",j>0)ue.index=0;else{var Ce=ue.lineText.length;ue.index=Ce>0?Ce-1:0}ue.nextCh=ue.lineText.charAt(ue.index)}be(ue)&&(F.line=X,F.ch=ue.index,S--)}return ue.nextCh||ue.curMoveThrough?new ze(X,ue.index):F}function Ti(b,S,k,P,F){var j=S.line,q=S.ch,Y=b.getLine(j),X=k?1:-1,oe=P?Yi:Vo;if(F&&Y==""){if(j+=X,Y=b.getLine(j),!s(b,j))return null;q=k?0:Y.length}for(;;){if(F&&Y=="")return{from:0,to:0,line:j};for(var ue=X>0?Y.length:-1,we=ue,Ae=ue;q!=ue;){for(var be=!1,Ce=0;Ce<oe.length&&!be;++Ce)if(oe[Ce](Y.charAt(q))){for(we=q;q!=ue&&oe[Ce](Y.charAt(q));)q+=X;if(Ae=q,be=we!=Ae,we==S.ch&&j==S.line&&Ae==we+X)continue;return{from:Math.min(we,Ae+1),to:Math.max(we,Ae),line:j}}be||(q+=X)}if(j+=X,!s(b,j))return null;Y=b.getLine(j),q=X>0?0:Y.length}}function gr(b,S,k,P,F,j){var q=He(S),Y=[];(P&&!F||!P&&F)&&k++;for(var X=!P||!F,oe=0;oe<k;oe++){var ue=Ti(b,S,P,j,X);if(!ue){var we=st(b,b.lastLine());Y.push(P?{line:b.lastLine(),from:we,to:we}:{line:0,from:0,to:0});break}Y.push(ue),S=new ze(ue.line,P?ue.to-1:ue.from)}var Ae=Y.length!=k,be=Y[0],Ce=Y.pop();return P&&!F?(!Ae&&(be.from!=q.ch||be.line!=q.line)&&(Ce=Y.pop()),new ze(Ce.line,Ce.from)):P&&F?new ze(Ce.line,Ce.to-1):!P&&F?(!Ae&&(be.to!=q.ch||be.line!=q.line)&&(Ce=Y.pop()),new ze(Ce.line,Ce.to)):new ze(Ce.line,Ce.from)}function Hi(b,S,k,P,F){var j=S,q=new ze(j.line+k.repeat-1,1/0),Y=b.clipPos(q);return Y.ch--,F||(P.lastHPos=1/0,P.lastHSPos=b.charCoords(Y,"div").left),q}function Ri(b,S,k,P,F){for(var j=F||b.getCursor(),q=j.ch,Y,X=0;X<S;X++){var oe=b.getLine(j.line);if(Y=$o(q,oe,P,k),Y==-1)return null;q=Y}return new ze(b.getCursor().line,Y)}function ls(b,S){var k=b.getCursor().line;return de(b,new ze(k,S-1))}function Cr(b,S,k,P){!x(k,Lo)&&!on.test(k)||(S.marks[k]&&S.marks[k].clear(),S.marks[k]=b.setBookmark(P))}function $o(b,S,k,P,F){var j;return P?(j=S.indexOf(k,b+1),j!=-1):(j=S.lastIndexOf(k,b-1),j!=-1),j}function Er(b,S,k,P,F){function j(Ze){return!/\S/.test(b.getLine(Ze))}function q(Ze,ft,rt){return rt?j(Ze)!=j(Ze+ft):!j(Ze)&&j(Ze+ft)}function Y(Ze){P=P>0?1:-1;var ft=b.ace.session.getFoldLine(Ze);ft&&Ze+P>ft.start.row&&Ze+P<ft.end.row&&(P=(P>0?ft.end.row:ft.start.row)-Ze)}var X=S.line,oe=b.firstLine(),ue=b.lastLine(),we,Ae,be=X;if(P){for(;oe<=be&&be<=ue&&k>0;)Y(be),q(be,P)&&k--,be+=P;return new ze(be,0)}var Ce=b.state.vim;if(Ce.visualLine&&q(X,1,!0)){var Pe=Ce.sel.anchor;q(Pe.line,-1,!0)&&(!F||Pe.line!=X)&&(X+=1)}var Ne=j(X);for(be=X;be<=ue&&k;be++)q(be,1,!0)&&(!F||j(be)!=Ne)&&k--;for(Ae=new ze(be,0),be>ue&&!Ne?Ne=!0:F=!1,be=X;be>oe&&!((!F||j(be)==Ne||be==X)&&q(be,-1,!0));be--);return we=new ze(be,0),{start:we,end:Ae}}function di(b,S,k,P,F){function j(oe){oe.pos+oe.dir<0||oe.pos+oe.dir>=oe.line.length?oe.line=null:oe.pos+=oe.dir}function q(oe,ue,we,Ae){var be=oe.getLine(ue),Ce={line:be,ln:ue,pos:we,dir:Ae};if(Ce.line==="")return{ln:Ce.ln,pos:Ce.pos};var Pe=Ce.pos;for(j(Ce);Ce.line!==null;){if(Pe=Ce.pos,y(Ce.line[Ce.pos])){if(!F)return{ln:Ce.ln,pos:Ce.pos+1};for(j(Ce);Ce.line!==null&&p(Ce.line[Ce.pos]);)Pe=Ce.pos,j(Ce);return{ln:Ce.ln,pos:Pe+1}}j(Ce)}return{ln:Ce.ln,pos:Pe+1}}function Y(oe,ue,we,Ae){var be=oe.getLine(ue),Ce={line:be,ln:ue,pos:we,dir:Ae};if(Ce.line==="")return{ln:Ce.ln,pos:Ce.pos};var Pe=Ce.pos;for(j(Ce);Ce.line!==null;){if(!p(Ce.line[Ce.pos])&&!y(Ce.line[Ce.pos]))Pe=Ce.pos;else if(y(Ce.line[Ce.pos]))return F?p(Ce.line[Ce.pos+1])?{ln:Ce.ln,pos:Ce.pos+1}:{ln:Ce.ln,pos:Pe}:{ln:Ce.ln,pos:Pe};j(Ce)}return Ce.line=be,F&&p(Ce.line[Ce.pos])?{ln:Ce.ln,pos:Ce.pos}:{ln:Ce.ln,pos:Pe}}for(var X={ln:S.line,pos:S.ch};k>0;)P<0?X=Y(b,X.ln,X.pos,P):X=q(b,X.ln,X.pos,P),k--;return new ze(X.ln,X.pos)}function ni(b,S,k,P){function F(X,oe){if(oe.pos+oe.dir<0||oe.pos+oe.dir>=oe.line.length){if(oe.ln+=oe.dir,!s(X,oe.ln)){oe.line=null,oe.ln=null,oe.pos=null;return}oe.line=X.getLine(oe.ln),oe.pos=oe.dir>0?0:oe.line.length-1}else oe.pos+=oe.dir}function j(X,oe,ue,we){var Ne=X.getLine(oe),Ae=Ne==="",be={line:Ne,ln:oe,pos:ue,dir:we},Ce={ln:be.ln,pos:be.pos},Pe=be.line==="";for(F(X,be);be.line!==null;){if(Ce.ln=be.ln,Ce.pos=be.pos,be.line===""&&!Pe)return{ln:be.ln,pos:be.pos};if(Ae&&be.line!==""&&!p(be.line[be.pos]))return{ln:be.ln,pos:be.pos};y(be.line[be.pos])&&!Ae&&(be.pos===be.line.length-1||p(be.line[be.pos+1]))&&(Ae=!0),F(X,be)}var Ne=X.getLine(Ce.ln);Ce.pos=0;for(var Ze=Ne.length-1;Ze>=0;--Ze)if(!p(Ne[Ze])){Ce.pos=Ze;break}return Ce}function q(X,oe,ue,we){var Pe=X.getLine(oe),Ae={line:Pe,ln:oe,pos:ue,dir:we},be={ln:Ae.ln,pos:null},Ce=Ae.line==="";for(F(X,Ae);Ae.line!==null;){if(Ae.line===""&&!Ce)return be.pos!==null?be:{ln:Ae.ln,pos:Ae.pos};if(!(!y(Ae.line[Ae.pos])||be.pos===null||Ae.ln===be.ln&&Ae.pos+1===be.pos))return be;Ae.line!==""&&!p(Ae.line[Ae.pos])&&(Ce=!1,be={ln:Ae.ln,pos:Ae.pos}),F(X,Ae)}var Pe=X.getLine(be.ln);be.pos=0;for(var Ne=0;Ne<Pe.length;++Ne)if(!p(Pe[Ne])){be.pos=Ne;break}return be}for(var Y={ln:S.line,pos:S.ch};k>0;)P<0?Y=q(b,Y.ln,Y.pos,P):Y=j(b,Y.ln,Y.pos,P),k--;return new ze(Y.ln,Y.pos)}function $n(b,S,k,P){var F=S,j,q,Y={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[k],X={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[k],oe=b.getLine(F.line).charAt(F.ch),ue=oe===X?1:0;if(j=b.scanForBracket(new ze(F.line,F.ch+ue),-1,void 0,{bracketRegex:Y}),q=b.scanForBracket(new ze(F.line,F.ch+ue),1,void 0,{bracketRegex:Y}),!j||!q)return null;if(j=j.pos,q=q.pos,j.line==q.line&&j.ch>q.ch||j.line>q.line){var we=j;j=q,q=we}return P?q.ch+=1:j.ch+=1,{start:j,end:q}}function Hr(b,S,k,P){var F=He(S),j=b.getLine(F.line),q=j.split(""),Y,X,oe,ue,we=q.indexOf(k);if(F.ch<we)F.ch=we;else if(we<F.ch&&q[F.ch]==k){var Ae=/string/.test(b.getTokenTypeAt(fe(S,0,1))),be=/string/.test(b.getTokenTypeAt(S)),Ce=Ae&&!be;Ce||(X=F.ch,--F.ch)}if(q[F.ch]==k&&!X)Y=F.ch+1;else for(oe=F.ch;oe>-1&&!Y;oe--)q[oe]==k&&(Y=oe+1);if(Y&&!X)for(oe=Y,ue=q.length;oe<ue&&!X;oe++)q[oe]==k&&(X=oe);return!Y||!X?{start:F,end:F}:(P&&(--Y,++X),{start:new ze(F.line,Y),end:new ze(F.line,X)})}function Ur(){}function Tn(b){var S=b.state.vim;return S.searchState_||(S.searchState_=new Ur)}function Qn(b){return Ei(b,"/")}function fi(b){return Mi(b,"/")}function Ei(b,S){var k=Mi(b,S)||[];if(!k.length)return[];var P=[];if(k[0]===0){for(var F=0;F<k.length;F++)typeof k[F]=="number"&&P.push(b.substring(k[F]+1,k[F+1]));return P}}function Mi(b,S){S||(S="/");for(var k=!1,P=[],F=0;F<b.length;F++){var j=b.charAt(F);!k&&j==S&&P.push(F),k=!k&&j=="\\"}return P}function cs(b){for(var S="|(){",k="}",P=!1,F=[],j=-1;j<b.length;j++){var q=b.charAt(j)||"",Y=b.charAt(j+1)||"",X=Y&&S.indexOf(Y)!=-1;P?((q!=="\\"||!X)&&F.push(q),P=!1):q==="\\"?(P=!0,Y&&k.indexOf(Y)!=-1&&(X=!0),(!X||Y==="\\")&&F.push(q)):(F.push(q),X&&Y!=="\\"&&F.push("\\"))}return F.join("")}function zs(b){for(var S=!1,k=[],P=-1;P<b.length;P++){var F=b.charAt(P)||"",j=b.charAt(P+1)||"";Xi[F+j]?(k.push(Xi[F+j]),P++):S?(k.push(F),S=!1):F==="\\"?(S=!0,o(j)||j==="$"?k.push("$"):j!=="/"&&j!=="\\"&&k.push("\\")):(F==="$"&&k.push("$"),k.push(F),j==="/"&&k.push("\\"))}return k.join("")}function fn(b){for(var S=new je.StringStream(b),k=[];!S.eol();){for(;S.peek()&&S.peek()!="\\";)k.push(S.next());var P=!1;for(var F in Ws)if(S.match(F,!0)){P=!0,k.push(Ws[F]);break}P||k.push(S.next())}return k.join("")}function _r(b,S,k){var P=qe.registerController.getRegister("/");if(P.setText(b),b instanceof RegExp)return b;var F=fi(b),j,q;if(!F.length)j=b;else{j=b.substring(0,F[0]);var Y=b.substring(F[0]);q=Y.indexOf("i")!=-1}if(!j)return null;_("pcre")||(j=cs(j)),k&&(S=/^[^A-Z]*$/.test(j));var X=new RegExp(j,S||q?"im":"m");return X}function pi(b){typeof b=="string"&&(b=document.createElement(b));for(var S,k=1;k<arguments.length;k++)if(S=arguments[k])if(typeof S!="object"&&(S=document.createTextNode(S)),S.nodeType)b.appendChild(S);else for(var P in S)Object.prototype.hasOwnProperty.call(S,P)&&(P[0]==="$"?b.style[P.slice(1)]=S[P]:b.setAttribute(P,S[P]));return b}function Nt(b,S){var k=pi("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},S);b.openNotification?b.openNotification(k,{bottom:!0,duration:5e3}):alert(k.innerText)}function To(b,S){return pi("div",{$display:"flex"},pi("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},b,pi("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),S&&pi("span",{$color:"#888"},S))}function mr(b,S){if(qr.length){S.value||(S.value=""),Ft=S;return}var k=To(S.prefix,S.desc);if(b.openDialog)b.openDialog(k,S.onClose,{onKeyDown:S.onKeyDown,onKeyUp:S.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:S.value});else{var P="";typeof S.prefix!="string"&&S.prefix&&(P+=S.prefix.textContent),S.desc&&(P+=" "+S.desc),S.onClose(prompt(P,""))}}function Mn(b,S){if(b instanceof RegExp&&S instanceof RegExp){for(var k=["global","multiline","ignoreCase","source"],P=0;P<k.length;P++){var F=k[P];if(b[F]!==S[F])return!1}return!0}return!1}function vn(b,S,k,P){if(S){var F=Tn(b),j=_r(S,!!k,!!P);if(j)return ho(b,j),Mn(j,F.getQuery())||F.setQuery(j),j}}function In(b){if(b.source.charAt(0)=="^")var S=!0;return{token:function(k){if(S&&!k.sol()){k.skipToEnd();return}var P=k.match(b,!1);if(P)return P[0].length==0?(k.next(),"searching"):!k.sol()&&(k.backUp(1),!b.exec(k.next()+P[0]))?(k.next(),null):(k.match(b),"searching");for(;!k.eol()&&(k.next(),!k.match(b,!1)););},query:b}}function ho(b,S){clearTimeout(an);var k=Tn(b);k.highlightTimeout=an,an=setTimeout(function(){if(b.state.vim){var P=Tn(b);P.highlightTimeout=null;var F=P.getOverlay();(!F||S!=F.query)&&(F&&b.removeOverlay(F),F=In(S),b.addOverlay(F),b.showMatchesOnScrollbar&&(P.getScrollbarAnnotate()&&P.getScrollbarAnnotate().clear(),P.setScrollbarAnnotate(b.showMatchesOnScrollbar(S))),P.setOverlay(F))}},50)}function er(b,S,k,P){return P===void 0&&(P=1),b.operation(function(){for(var F=b.getCursor(),j=b.getSearchCursor(k,F),q=0;q<P;q++){var Y=j.find(S);if(q==0&&Y&&Ge(j.from(),F)){var X=S?j.from():j.to();Y=j.find(S),Y&&!Y[0]&&Ge(j.from(),X)&&b.getLine(X.line).length==X.ch&&(Y=j.find(S))}if(!Y&&(j=b.getSearchCursor(k,S?new ze(b.lastLine()):new ze(b.firstLine(),0)),!j.find(S)))return}return j.from()})}function Mr(b,S,k,P,F){return P===void 0&&(P=1),b.operation(function(){var j=b.getCursor(),q=b.getSearchCursor(k,j),Y=q.find(!S);!F.visualMode&&Y&&Ge(q.from(),j)&&q.find(!S);for(var X=0;X<P;X++)if(Y=q.find(S),!Y&&(q=b.getSearchCursor(k,S?new ze(b.lastLine()):new ze(b.firstLine(),0)),!q.find(S)))return;return[q.from(),q.to()]})}function gi(b){var S=Tn(b);S.highlightTimeout&&(clearTimeout(S.highlightTimeout),S.highlightTimeout=null),b.removeOverlay(Tn(b).getOverlay()),S.setOverlay(null),S.getScrollbarAnnotate()&&(S.getScrollbarAnnotate().clear(),S.setScrollbarAnnotate(null))}function ri(b,S,k){return typeof b!="number"&&(b=b.line),S instanceof Array?x(b,S):typeof k=="number"?b>=S&&b<=k:b==S}function Ui(b){var S=b.ace.renderer;return{top:S.getFirstFullyVisibleRow(),bottom:S.getLastFullyVisibleRow()}}function ii(b,S,k){if(k=="'"||k=="`")return qe.jumpList.find(b,-1)||new ze(0,0);if(k==".")return Vi(b);var P=S.marks[k];return P&&P.find()}function Vi(b){if(b.getLastEditEnd)return b.getLastEditEnd();for(var S=b.doc.history.done,k=S.length;k--;)if(S[k].changes)return He(S[k].changes[0].to)}function fo(b,S,k,P,F,j,q,Y,X){function oe(){b.operation(function(){for(;!Pe;)ue(),Ae();be()})}function ue(){var rt=b.getRange(j.from(),j.to()),ot=rt.replace(q,Y),Rn=j.to().line;j.replace(ot),Ze=j.to().line,F+=Ze-Rn,ft=Ze<Rn}function we(){var rt=Ne&&He(j.to()),ot=j.findNext();return ot&&!ot[0]&&rt&&Ge(j.from(),rt)&&(ot=j.findNext()),ot}function Ae(){for(;we()&&ri(j.from(),P,F);)if(!(!k&&j.from().line==Ze&&!ft)){b.scrollIntoView(j.from(),30),b.setSelection(j.from(),j.to()),Ne=j.from(),Pe=!1;return}Pe=!0}function be(rt){if(rt&&rt(),b.focus(),Ne){b.setCursor(Ne);var ot=b.state.vim;ot.exMode=!1,ot.lastHPos=ot.lastHSPos=Ne.ch}X&&X()}function Ce(rt,ot,Rn){je.e_stop(rt);var kt=W(rt);switch(kt){case"y":ue(),Ae();break;case"n":Ae();break;case"a":var Zt=X;X=void 0,b.operation(oe),X=Zt;break;case"l":ue();case"q":case"<Esc>":case"<C-c>":case"<C-[>":be(Rn)}return Pe&&be(Rn),!0}b.state.vim.exMode=!0;var Pe=!1,Ne,Ze,ft;if(Ae(),Pe){Nt(b,"No matches for "+q.source);return}if(!S){oe(),X&&X();return}mr(b,{prefix:pi("span","replace with ",pi("strong",Y)," (y/n/a/q/l)"),onKeyDown:Ce})}function ar(b,S){var k=b.state.vim,P=qe.macroModeState,F=qe.registerController.getRegister("."),j=P.isPlaying,q=P.lastInsertModeChanges;j||(b.off("change",Ro),k.insertEnd&&k.insertEnd.clear(),k.insertEnd=null,je.off(b.getInputField(),"keydown",Ki)),!j&&k.insertModeRepeat>1&&(jo(b,k,k.insertModeRepeat-1,!0),k.lastEditInputState.repeatOverride=k.insertModeRepeat),delete k.insertModeRepeat,k.insertMode=!1,S||b.setCursor(b.getCursor().line,b.getCursor().ch-1),b.setOption("keyMap","vim"),b.setOption("disableInput",!0),b.toggleOverwrite(!1),F.setText(q.changes.join("")),je.signal(b,"vim-mode-change",{mode:"normal"}),P.isRecording&&pn(P)}function qi(b){Bn.unshift(b)}function Gi(b,S,k,P,F){var j={keys:b,type:S};j[S]=k,j[S+"Args"]=P;for(var q in F)j[q]=F[q];qi(j)}function mi(b,S,k,P){var F=qe.registerController.getRegister(P);if(P==":"){F.keyBuffer[0]&&Kr.processCommand(b,F.keyBuffer[0]),k.isPlaying=!1;return}var j=F.keyBuffer,q=0;k.isPlaying=!0,k.replaySearchQueries=F.searchQueries.slice(0);for(var Y=0;Y<j.length;Y++)for(var X=j[Y],oe,ue;X;)if(oe=/<\w+-.+?>|<\w+>|./.exec(X),ue=oe[0],X=X.substring(oe.index+ue.length),_t.handleKey(b,ue,"macro"),S.insertMode){var we=F.insertModeChanges[q++].changes;qe.macroModeState.lastInsertModeChanges.changes=we,po(b,we,1),ar(b)}k.isPlaying=!1}function Ii(b,S){if(!b.isPlaying){var k=b.latestRegister,P=qe.registerController.getRegister(k);P&&P.pushText(S)}}function pn(b){if(!b.isPlaying){var S=b.latestRegister,k=qe.registerController.getRegister(S);k&&k.pushInsertModeChanges&&k.pushInsertModeChanges(b.lastInsertModeChanges)}}function Wo(b,S){if(!b.isPlaying){var k=b.latestRegister,P=qe.registerController.getRegister(k);P&&P.pushSearchQuery&&P.pushSearchQuery(S)}}function Ro(b,S){var k=qe.macroModeState,P=k.lastInsertModeChanges;if(!k.isPlaying)for(var F=b.state.vim;S;){if(P.expectCursorActivityForChange=!0,P.ignoreCount>1)P.ignoreCount--;else if(S.origin=="+input"||S.origin=="paste"||S.origin===void 0){var j=b.listSelections().length;j>1&&(P.ignoreCount=j);var q=S.text.join(`
1402
+ `);if(P.maybeReset&&(P.changes=[],P.maybeReset=!1),q)if(b.state.overwrite&&!/\n/.test(q))P.changes.push([q]);else{if(q.length>1){var Y=F&&F.insertEnd&&F.insertEnd.find(),X=b.getCursor();if(Y&&Y.line==X.line){var oe=Y.ch-X.ch;oe>0&&oe<q.length&&(P.changes.push([q,oe]),q="")}}q&&P.changes.push(q)}}S=S.next}}function Li(b){var S=b.state.vim;if(S.insertMode){var k=qe.macroModeState;if(k.isPlaying)return;var P=k.lastInsertModeChanges;P.expectCursorActivityForChange?P.expectCursorActivityForChange=!1:(P.maybeReset=!0,S.insertEnd&&S.insertEnd.clear(),S.insertEnd=b.setBookmark(b.getCursor(),{insertLeft:!0}))}else b.curOp.isVimOp||Eo(b,S)}function Eo(b,S,k){var P=b.getCursor("anchor"),F=b.getCursor("head");if(S.visualMode&&!b.somethingSelected()?mn(b,!1):!S.visualMode&&!S.insertMode&&b.somethingSelected()&&(S.visualMode=!0,S.visualLine=!1,je.signal(b,"vim-mode-change",{mode:"visual"})),S.visualMode){var j=at(F,P)?0:-1,q=at(F,P)?-1:0;F=fe(F,0,j),P=fe(P,0,q),S.sel={anchor:P,head:F},Cr(b,S,"<",We(F,P)),Cr(b,S,">",Me(F,P))}else!S.insertMode&&!k&&(S.lastHPos=b.getCursor().ch)}function Mo(b,S){this.keyName=b,this.key=S.key,this.ctrlKey=S.ctrlKey,this.altKey=S.altKey,this.metaKey=S.metaKey,this.shiftKey=S.shiftKey}function Ki(b){var S=qe.macroModeState,k=S.lastInsertModeChanges,P=je.keyName?je.keyName(b):b.key;P&&(P.indexOf("Delete")!=-1||P.indexOf("Backspace")!=-1)&&(k.maybeReset&&(k.changes=[],k.maybeReset=!1),k.changes.push(new Mo(P,b)))}function jo(b,S,k,P){function F(){Y?Oi.processAction(b,S,S.lastEditActionCommand):Oi.evalInput(b,S)}function j(ue){if(q.lastInsertModeChanges.changes.length>0){ue=S.lastEditActionCommand?ue:1;var we=q.lastInsertModeChanges;po(b,we.changes,ue)}}var q=qe.macroModeState;q.isPlaying=!0;var Y=!!S.lastEditActionCommand,X=S.inputState;if(S.inputState=S.lastEditInputState,Y&&S.lastEditActionCommand.interlaceInsertRepeat)for(var oe=0;oe<k;oe++)F(),j(1);else P||F(),j(k);S.inputState=X,S.insertMode&&!P&&ar(b),q.isPlaying=!1}function Ho(b,S){je.lookupKey(S,"vim-insert",function(k){return typeof k=="string"?je.commands[k](b):k(b),!0})}function po(b,S,k){var P=b.getCursor("head"),F=qe.macroModeState.lastInsertModeChanges.visualBlock;F&&(kn(b,P,F+1),k=b.listSelections().length,b.setCursor(P));for(var j=0;j<k;j++){F&&b.setCursor(fe(P,j,0));for(var q=0;q<S.length;q++){var Y=S[q];if(Y instanceof Mo)Ho(b,Y.keyName);else if(typeof Y=="string")b.replaceSelection(Y);else{var X=b.getCursor(),oe=fe(X,0,Y[0].length-(Y[1]||0));b.replaceRange(Y[0],X,Y[1]?X:oe),b.setCursor(oe)}}}F&&b.setCursor(fe(P,0,1))}function go(b,S,k,P){S.length>1&&S[0]=="n"&&(S=S.replace("numpad","")),S=Oo[S]||S;var F="";if(k.ctrlKey&&(F+="C-"),k.altKey&&(F+="A-"),(F||S.length>1)&&k.shiftKey&&(F+="S-"),P&&!P.expectLiteralNext&&S.length==1){if(Wn.keymap&&S in Wn.keymap)(Wn.remapCtrl!==!1||!F)&&(S=Wn.keymap[S]);else if(S.charCodeAt(0)>255){var j=k.code&&k.code.slice(-1)||"";k.shiftKey||(j=j.toLowerCase()),j&&(S=j)}}return F+=S,F.length>1&&(F="<"+F+">"),F}function vi(b){var S=new b.constructor;return Object.keys(b).forEach(function(k){if(k!="insertEnd"){var P=b[k];Array.isArray(P)?P=P.slice():P&&typeof P=="object"&&P.constructor!=Object&&(P=vi(P)),S[k]=P}}),b.sel&&(S.sel={head:b.sel.head&&He(b.sel.head),anchor:b.sel.anchor&&He(b.sel.anchor)}),S}function ne(b,S,k){var P=!1,F=_t.maybeInitVimState_(b),j=F.visualBlock||F.wasInVisualBlock,q=b.ace.inMultiSelectMode;if(F.wasInVisualBlock&&!q?F.wasInVisualBlock=!1:q&&F.visualBlock&&(F.wasInVisualBlock=!0),S=="<Esc>"&&!F.insertMode&&!F.visualMode&&q)b.ace.exitMultiSelectMode();else if(j||!q||b.ace.inVirtualSelectionMode)P=_t.handleKey(b,S,k);else{var Y=vi(F),X=F.inputState.changeQueueList||[];b.operation(function(){b.curOp.isVimOp=!0;var oe=0;b.ace.forEachSelection(function(){var ue=b.ace.selection;b.state.vim.lastHPos=ue.$desiredColumn==null?ue.lead.column:ue.$desiredColumn,b.state.vim.inputState.changeQueue=X[oe];var we=b.getCursor("head"),Ae=b.getCursor("anchor"),be=at(we,Ae)?0:-1,Ce=at(we,Ae)?-1:0;we=fe(we,0,be),Ae=fe(Ae,0,Ce),b.state.vim.sel.head=we,b.state.vim.sel.anchor=Ae,P=Lr(b,S,k),ue.$desiredColumn=b.state.vim.lastHPos==-1?null:b.state.vim.lastHPos,b.ace.inVirtualSelectionMode&&(X[oe]=b.state.vim.inputState.changeQueue),b.virtualSelectionMode()&&(b.state.vim=vi(Y)),oe++}),b.curOp.cursorActivity&&!P&&(b.curOp.cursorActivity=!1),F.status=b.state.vim.status,b.state.vim=F,F.inputState.changeQueueList=X,F.inputState.changeQueue=null},!0)}return P&&!F.visualMode&&!F.insert&&F.visualMode!=b.somethingSelected()&&Eo(b,F,!0),P}function Se(b,S){S.off("beforeEndOperation",Se);var k=S.state.cm.vimCmd;k&&S.execCommand(k.exec?k:k.name,k.args),S.curOp=S.prevOp}var Le=e("../range").Range,et=e("../lib/event_emitter").EventEmitter,vt=e("../lib/dom"),Gt=e("../lib/oop"),Jt=e("../lib/keys"),Vr=e("../lib/event"),lr=e("../search").Search,Ln=e("../lib/useragent"),Ir=e("../search_highlight").SearchHighlight,xn=e("../commands/multi_select_commands"),Sa=e("../mode/text").Mode.prototype.tokenRe,Io=e("../ext/hardwrap").hardWrap;e("../multi_select");var je=function(b){this.ace=b,this.state={},this.marks={},this.options={},this.$uid=0,this.onChange=this.onChange.bind(this),this.onSelectionChange=this.onSelectionChange.bind(this),this.onBeforeEndOperation=this.onBeforeEndOperation.bind(this),this.ace.on("change",this.onChange),this.ace.on("changeSelection",this.onSelectionChange),this.ace.on("beforeEndOperation",this.onBeforeEndOperation)};je.Pos=function(b,S){if(!(this instanceof ze))return new ze(b,S);this.line=b,this.ch=S},je.defineOption=function(b,S,k){},je.commands={redo:function(b){b.ace.redo()},undo:function(b){b.ace.undo()},newlineAndIndent:function(b){b.ace.insert(`
1403
+ `)},goLineLeft:function(b){b.ace.selection.moveCursorLineStart()},goLineRight:function(b){b.ace.selection.moveCursorLineEnd()}},je.keyMap={},je.addClass=je.rmClass=function(){},je.e_stop=je.e_preventDefault=Vr.stopEvent,je.keyName=function(b){var S=Jt[b.keyCode]||b.key||"";return S.length==1&&(S=S.toUpperCase()),S=Vr.getModifierString(b).replace(/(^|-)\w/g,function(k){return k.toUpperCase()})+S,S},je.keyMap.default=function(b){return function(S){var k=S.ace.commands.commandKeyBinding[b.toLowerCase()];return k&&S.ace.execCommand(k)!==!1}},je.lookupKey=function b(S,k,P){k||(k="default"),typeof k=="string"&&(k=je.keyMap[k]||je.keyMap.default);var F=typeof k=="function"?k(S):k[S];if(F===!1)return"nothing";if(F==="...")return"multi";if(F!=null&&P(F))return"handled";if(k.fallthrough){if(!Array.isArray(k.fallthrough))return b(S,k.fallthrough,P);for(var j=0;j<k.fallthrough.length;j++){var q=b(S,k.fallthrough[j],P);if(q)return q}}},je.findMatchingTag=function(b,S){return b.findMatchingTag(S)},je.findEnclosingTag=function(b,S){},je.signal=function(b,S,k){return b._signal(S,k)},je.on=Vr.addListener,je.off=Vr.removeListener,je.isWordChar=function(b){return b<""?/^\w$/.test(b):(Sa.lastIndex=0,Sa.test(b))},(function(){Gt.implement(je.prototype,et),this.destroy=function(){this.ace.off("change",this.onChange),this.ace.off("changeSelection",this.onSelectionChange),this.ace.off("beforeEndOperation",this.onBeforeEndOperation),this.removeOverlay()},this.virtualSelectionMode=function(){return this.ace.inVirtualSelectionMode&&this.ace.selection.index},this.onChange=function(k){this.$lineHandleChanges&&this.$lineHandleChanges.push(k);var P={text:k.action[0]=="i"?k.lines:[]},F=this.curOp=this.curOp||{};F.changeHandlers||(F.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),F.lastChange?F.lastChange.next=F.lastChange=P:F.lastChange=F.change=P,this.$updateMarkers(k)},this.onSelectionChange=function(){var k=this.curOp=this.curOp||{};k.cursorActivityHandlers||(k.cursorActivityHandlers=this._eventRegistry.cursorActivity&&this._eventRegistry.cursorActivity.slice()),this.curOp.cursorActivity=!0,this.ace.inMultiSelectMode&&this.ace.keyBinding.removeKeyboardHandler(xn.keyboardHandler)},this.operation=function(k,P){if(!P&&this.curOp||P&&this.curOp&&this.curOp.force)return k();if((P||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),!this.ace.curOp){var F=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var j=this.curOp=this.curOp||{};this.curOp.force=P;var q=k();return this.ace.curOp&&this.ace.curOp.command.name=="vim"&&(this.state.dialog&&(this.ace.curOp.command.scrollIntoView=this.ace.curOp.vimDialogScroll),this.ace.endOperation(),!j.cursorActivity&&!j.lastChange&&F&&(this.ace.prevOp=F)),(P||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),q},this.onBeforeEndOperation=function(){var k=this.curOp;k&&(k.change&&this.signal("change",k.change,k),k&&k.cursorActivity&&this.signal("cursorActivity",null,k),this.curOp=null)},this.signal=function(k,P,F){var j=F?F[k+"Handlers"]:(this._eventRegistry||{})[k];if(j){j=j.slice();for(var q=0;q<j.length;q++)j[q](this,P)}},this.firstLine=function(){return 0},this.lastLine=function(){return this.ace.session.getLength()-1},this.lineCount=function(){return this.ace.session.getLength()},this.setCursor=function(k,P){typeof k=="object"&&(P=k.ch,k=k.line);var F=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:k,column:P}),this.ace.selection.moveTo(k,P),F&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(k){var P=this.ace.selection,F=k=="anchor"?P.isEmpty()?P.lead:P.anchor:k=="head"||!k?P.lead:P.getRange()[k];return g(F)},this.listSelections=function(k){var P=this.ace.multiSelect.rangeList.ranges;return!P.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:P.map(function(F){return{anchor:this.clipPos(g(F.cursor==F.end?F.start:F.end)),head:this.clipPos(g(F.cursor))}},this)},this.setSelections=function(k,P){var F=this.ace.multiSelect,j=k.map(function(oe){var ue=d(oe.anchor),we=d(oe.head),Ae=Le.comparePoints(ue,we)<0?new Le.fromPoints(ue,we):new Le.fromPoints(we,ue);return Ae.cursor=Le.comparePoints(Ae.start,we)?Ae.end:Ae.start,Ae});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(j[0]);return}P?j[P]&&j.push(j.splice(P,1)[0]):j=j.reverse(),F.toSingleRange(j[0].clone());for(var q=this.ace.session,Y=0;Y<j.length;Y++){var X=q.$clipRangeToDocument(j[Y]);F.addRange(X)}},this.setSelection=function(k,P,F){var j=this.ace.selection;j.moveTo(k.line,k.ch),j.selectTo(P.line,P.ch),F&&F.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(k){return!this.ace.selection.isEmpty()},this.clipPos=function(k){var P=this.ace.session.$clipPositionToDocument(k.line,k.ch);return g(P)},this.foldCode=function(k){this.ace.session.$toggleFoldWidget(k.line,{})},this.markText=function(k){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(k){var P=k.action=="insert",F=k.start,j=k.end,q=(j.row-F.row)*(P?1:-1),Y=(j.column-F.column)*(P?1:-1);P&&(j=F);for(var X in this.marks){var oe=this.marks[X],ue=Le.comparePoints(oe,F);if(!(ue<0)){if(ue===0&&P)if(!oe.$insertRight)ue=1;else{if(oe.bias!=1){oe.bias=-1;continue}ue=1}var we=P?ue:Le.comparePoints(oe,j);if(we>0){oe.row+=q,oe.column+=oe.row==j.row?Y:0;continue}!P&&we<=0&&(oe.row=F.row,oe.column=F.column,we===0&&(oe.bias=1))}}};var b=function(k,P,F,j){this.cm=k,this.id=P,this.row=F,this.column=j,k.marks[this.id]=this};b.prototype.clear=function(){delete this.cm.marks[this.id]},b.prototype.find=function(){return g(this)},this.setBookmark=function(k,P){var F=new b(this,this.$uid++,k.line,k.ch);return(!P||!P.insertLeft)&&(F.$insertRight=!0),this.marks[F.id]=F,F},this.moveH=function(k,P){if(P=="char"){var F=this.ace.selection;F.clearSelection(),F.moveCursorBy(0,k)}},this.findPosV=function(k,P,F,j){if(F=="page"){var q=this.ace.renderer,Y=q.layerConfig;P*=Math.floor(Y.height/Y.lineHeight),F="line"}if(F=="line"){var X=this.ace.session.documentToScreenPosition(k.line,k.ch);j!=null&&(X.column=j),X.row+=P,X.row=Math.min(Math.max(0,X.row),this.ace.session.getScreenLength()-1);var oe=this.ace.session.screenToDocumentPosition(X.row,X.column);return g(oe)}debugger},this.charCoords=function(k,P){if(P=="div"||!P){var F=this.ace.session.documentToScreenPosition(k.line,k.ch);return{left:F.column,top:F.row}}if(P=="local"){var j=this.ace.renderer,F=this.ace.session.documentToScreenPosition(k.line,k.ch),q=j.layerConfig.lineHeight,Y=j.layerConfig.characterWidth,X=q*F.row;return{left:F.column*Y,top:X,bottom:X+q}}},this.coordsChar=function(k,P){var F=this.ace.renderer;if(P=="local"){var j=Math.max(0,Math.floor(k.top/F.lineHeight)),q=Math.max(0,Math.floor(k.left/F.characterWidth)),Y=F.session.screenToDocumentPosition(j,q);return g(Y)}if(P=="div")throw"not implemented"},this.getSearchCursor=function(k,P,F){var j=!1,q=!1;k instanceof RegExp&&!k.global&&(j=!k.ignoreCase,k=k.source,q=!0),k=="\\n"&&(k=`
1404
+ `,q=!1);var Y=new lr;P.ch==null&&(P.ch=Number.MAX_VALUE);var X={row:P.line,column:P.ch},oe=this,ue=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(we){Y.setOptions({needle:k,caseSensitive:j,wrap:!1,backwards:we,regExp:q,start:ue||X});var Ae=Y.find(oe.ace.session);return ue=Ae,ue&&[!ue.isEmpty()]},from:function(){return ue&&g(ue.start)},to:function(){return ue&&g(ue.end)},replace:function(we){ue&&(ue.end=oe.ace.session.doc.replace(ue,we))}}},this.scrollTo=function(k,P){var F=this.ace.renderer,j=F.layerConfig,q=j.maxHeight;q-=(F.$size.scrollerHeight-F.lineHeight)*F.$scrollPastEnd,P!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(P,q))),k!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(k,j.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(k,P){if(k){var F=this.ace.renderer,j={top:0,bottom:P};F.scrollCursorIntoView(d(k),F.lineHeight*2/F.$size.scrollerHeight,j)}},this.getLine=function(k){return this.ace.session.getLine(k)},this.getRange=function(k,P){return this.ace.session.getTextRange(new Le(k.line,k.ch,P.line,P.ch))},this.replaceRange=function(k,P,F){F||(F=P);var j=new Le(P.line,P.ch,F.line,F.ch);return this.ace.session.$clipRangeToDocument(j),this.ace.session.replace(j,k)},this.replaceSelection=this.replaceSelections=function(k){var P=Array.isArray(k)&&k,F=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(F.getRange(),P?k[0]||"":k);return}F.inVirtualSelectionMode=!0;var j=F.rangeList.ranges;j.length||(j=[this.ace.multiSelect.getRange()]);for(var q=j.length;q--;)this.ace.session.replace(j[q],P?k[q]||"":k);F.inVirtualSelectionMode=!1},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map(function(k){return this.getRange(k.anchor,k.head)},this)},this.getInputField=function(){return this.ace.textInput.getElement()},this.getWrapperElement=function(){return this.ace.container};var S={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(k,P){switch(this.state[k]=P,k){case"indentWithTabs":k=S[k],P=!P;break;case"keyMap":this.state.$keyMap=P;return;default:k=S[k]}k&&this.ace.setOption(k,P)},this.getOption=function(k){var P,F=S[k];switch(F&&(P=this.ace.getOption(F)),k){case"indentWithTabs":return k=S[k],!P;case"keyMap":return this.state.$keyMap||"vim"}return F?P:this.state[k]},this.toggleOverwrite=function(k){return this.state.overwrite=k,this.ace.setOverwrite(k)},this.addOverlay=function(k){if(!this.$searchHighlight||!this.$searchHighlight.session){var P=new Ir(null,"ace_highlight-marker","text"),F=this.ace.session.addDynamicMarker(P);P.id=F.id,P.session=this.ace.session,P.destroy=function(q){P.session.off("change",P.updateOnChange),P.session.off("changeEditor",P.destroy),P.session.removeMarker(P.id),P.session=null},P.updateOnChange=function(q){var Y=q.start.row;Y==q.end.row?P.cache[Y]=void 0:P.cache.splice(Y,P.cache.length)},P.session.on("changeEditor",P.destroy),P.session.on("change",P.updateOnChange)}var j=new RegExp(k.query.source,"gmi");this.$searchHighlight=k.highlight=P,this.$searchHighlight.setRegexp(j),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(k){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var k=this.ace.renderer,P=k.layerConfig;return{left:k.scrollLeft,top:k.scrollTop,height:P.maxHeight,width:P.width,clientHeight:P.height,clientWidth:P.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(k){return this.ace.setValue(k,-1)},this.getTokenTypeAt=function(k){var P=this.ace.session.getTokenAt(k.line,k.ch);return P&&/comment|string/.test(P.type)?"string":""},this.findMatchingBracket=function(k){var P=this.ace.session.findMatchingBracket(d(k));return{to:P&&g(P)}},this.findMatchingTag=function(k){var P=this.ace.session.getMatchingTags(d(k));if(P)return{open:{from:g(P.openTag.start),to:g(P.openTag.end)},close:{from:g(P.closeTag.start),to:g(P.closeTag.end)}}},this.indentLine=function(k,P){P===!0?this.ace.session.indentRows(k,k," "):P===!1&&this.ace.session.outdentRows(new Le(k,0,k,0))},this.indexFromPos=function(k){return this.ace.session.doc.positionToIndex(d(k))},this.posFromIndex=function(k){return g(this.ace.session.doc.indexToPosition(k))},this.focus=function(k){return this.ace.textInput.focus()},this.blur=function(k){return this.ace.blur()},this.defaultTextHeight=function(k){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(k,P,F,j){var q=j.bracketRegex.source,Y=/paren|text|operator|tag/;if(P==1)var X=this.ace.session.$findClosingBracket(q.slice(1,2),d(k),Y);else{var X=this.ace.session.$findOpeningBracket(q.slice(-2,-1),{row:k.line,column:k.ch+1},Y);!X&&j.bracketRegex&&j.bracketRegex.test(this.getLine(k.line)[k.ch-1])&&(X={row:k.line,column:k.ch-1})}return X&&{pos:g(X)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(k){if(je.commands.hasOwnProperty(k))return je.commands[k](this);if(k=="indentAuto")return this.ace.execCommand("autoindent");console.log(k+" is not implemented")},this.getLineNumber=function(k){var P=this.$lineHandleChanges;if(!P)return null;for(var F=k.row,j=0;j<P.length;j++){var q=P[j];if(q.start.row!=q.end.row){if(q.action[0]=="i")q.start.row<F&&(F+=q.end.row-q.start.row);else if(q.start.row<F){if(F<q.end.row||F==q.end.row&&q.start.column>0)return null;F-=q.end.row-q.start.row}}}return F},this.getLineHandle=function(k){return this.$lineHandleChanges||(this.$lineHandleChanges=[]),{text:this.ace.session.getLine(k),row:k}},this.releaseLineHandles=function(){this.$lineHandleChanges=void 0},this.getLastEditEnd=function(){var k=this.ace.session.$undoManager;if(k&&k.$lastDelta)return g(k.$lastDelta.end)}}).call(je.prototype);var Fs=je.StringStream=function(b,S){this.pos=this.start=0,this.string=b,this.tabSize=S||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};Fs.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(b){var S=this.string.charAt(this.pos);if(typeof b=="string")var k=S==b;else var k=S&&(b.test?b.test(S):b(S));if(k)return++this.pos,S},eatWhile:function(b){for(var S=this.pos;this.eat(b););return this.pos>S},eatSpace:function(){for(var b=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>b},skipToEnd:function(){this.pos=this.string.length},skipTo:function(b){var S=this.string.indexOf(b,this.pos);if(S>-1)return this.pos=S,!0},backUp:function(b){this.pos-=b},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(b,S,k){if(typeof b!="string"){var P=this.string.slice(this.pos).match(b);return P&&P.index>0?null:(P&&S!==!1&&(this.pos+=P[0].length),P)}var F=function(q){return k?q.toLowerCase():q},j=this.string.substr(this.pos,b.length);if(F(j)==F(b))return S!==!1&&(this.pos+=b.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(b,S){this.lineStart+=b;try{return S()}finally{this.lineStart-=b}}},je.defineExtension=function(b,S){je.prototype[b]=S},vt.importCssString(`.normal-mode .ace_cursor{
1405
+ border: none;
1406
+ background-color: rgba(255,0,0,0.5);
1407
+ }
1408
+ .normal-mode .ace_hidden-cursors .ace_cursor{
1409
+ background-color: transparent;
1410
+ border: 1px solid red;
1411
+ opacity: 0.7
1412
+ }
1413
+ .ace_dialog {
1414
+ position: absolute;
1415
+ left: 0; right: 0;
1416
+ background: inherit;
1417
+ z-index: 15;
1418
+ padding: .1em .8em;
1419
+ overflow: hidden;
1420
+ color: inherit;
1421
+ }
1422
+ .ace_dialog-top {
1423
+ border-bottom: 1px solid #444;
1424
+ top: 0;
1425
+ }
1426
+ .ace_dialog-bottom {
1427
+ border-top: 1px solid #444;
1428
+ bottom: 0;
1429
+ }
1430
+ .ace_dialog input {
1431
+ border: none;
1432
+ outline: none;
1433
+ background: transparent;
1434
+ width: 20em;
1435
+ color: inherit;
1436
+ font-family: monospace;
1437
+ }`,"vimMode",!1),(function(){function b(k,P,F){var j=k.ace.container,q;return q=j.appendChild(document.createElement("div")),F?q.className="ace_dialog ace_dialog-bottom":q.className="ace_dialog ace_dialog-top",typeof P=="string"?q.innerHTML=P:q.appendChild(P),q}function S(k,P){k.state.currentNotificationClose&&k.state.currentNotificationClose(),k.state.currentNotificationClose=P}je.defineExtension("openDialog",function(k,P,F){function j(we){if(typeof we=="string")oe.value=we;else{if(Y||we&&we.type=="blur"&&document.activeElement===oe)return;X.state.dialog==q&&(X.state.dialog=null,X.focus()),Y=!0,q.remove(),F.onClose&&F.onClose(q);var Ae=X;Ae.state.vim&&(Ae.state.vim.status=null,Ae.ace._signal("changeStatus"),Ae.ace.renderer.$loop.schedule(Ae.ace.renderer.CHANGE_CURSOR))}}if(!this.virtualSelectionMode()){F||(F={}),S(this,null);var q=b(this,k,F.bottom),Y=!1,X=this;this.state.dialog=q;var oe=q.getElementsByTagName("input")[0],ue;return oe?(F.value&&(oe.value=F.value,F.selectValueOnOpen!==!1&&oe.select()),F.onInput&&je.on(oe,"input",function(we){F.onInput(we,oe.value,j)}),F.onKeyUp&&je.on(oe,"keyup",function(we){F.onKeyUp(we,oe.value,j)}),je.on(oe,"keydown",function(we){F&&F.onKeyDown&&F.onKeyDown(we,oe.value,j)||(we.keyCode==13&&P(oe.value),(we.keyCode==27||F.closeOnEnter!==!1&&we.keyCode==13)&&(je.e_stop(we),j()))}),F.closeOnBlur!==!1&&je.on(oe,"blur",j),oe.focus()):(ue=q.getElementsByTagName("button")[0])&&(je.on(ue,"click",function(){j(),X.focus()}),F.closeOnBlur!==!1&&je.on(ue,"blur",j),ue.focus()),j}}),je.defineExtension("openNotification",function(k,P){function F(){q||(q=!0,clearTimeout(Y),j.remove())}if(!this.virtualSelectionMode()){S(this,F);var j=b(this,k,P&&P.bottom),q=!1,Y,X=P&&typeof P.duration<"u"?P.duration:5e3;return je.on(j,"click",function(oe){je.e_preventDefault(oe),F()}),X&&(Y=setTimeout(F,X)),F}})})();var ze=je.Pos,Bn=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"g<Up>",type:"keyToKey",toKeys:"gk"},{keys:"g<Down>",type:"keyToKey",toKeys:"gj"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h"},{keys:"<Del>",type:"keyToKey",toKeys:"x"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"keyToKey",toKeys:"i",context:"normal"},{keys:"<Ins>",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"g$",type:"motion",motion:"moveToEndOfDisplayLine"},{keys:"g^",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"g0",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"gq",type:"operator",operator:"hardWrap"},{keys:"gw",type:"operator",operator:"hardWrap",operatorArgs:{keepCursor:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-u>",type:"operatorMotion",operator:"delete",motion:"moveToStartOfLine",context:"insert"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-w>",type:"idle",context:"normal"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<register>",type:"action",action:"replayMacro"},{keys:"q<register>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<register>",type:"action",action:"setMark"},{keys:'"<register>',type:"action",action:"setRegister"},{keys:"<C-r><register>",type:"action",action:"insertRegister",context:"insert",isEdit:!0},{keys:"<C-o>",type:"action",action:"oneNormalCommand",context:"insert"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"<C-t>",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"<C-d>",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a<register>",type:"motion",motion:"textObjectManipulation"},{keys:"i<register>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],Uo=Bn.length,mo=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"omap",shortName:"om"},{name:"noremap",shortName:"no"},{name:"nnoremap",shortName:"nn"},{name:"vnoremap",shortName:"vn"},{name:"inoremap",shortName:"ino"},{name:"onoremap",shortName:"ono"},{name:"unmap"},{name:"mapclear",shortName:"mapc"},{name:"nmapclear",shortName:"nmapc"},{name:"vmapclear",shortName:"vmapc"},{name:"imapclear",shortName:"imapc"},{name:"omapclear",shortName:"omapc"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"startinsert",shortName:"start"},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"vglobal",shortName:"v"},{name:"delete",shortName:"d"},{name:"join",shortName:"j"},{name:"normal",shortName:"norm"},{name:"global",shortName:"g"}],Wn=O(""),$a=/[\d]/,Vo=[je.isWordChar,function(b){return b&&!je.isWordChar(b)&&!/\s/.test(b)}],Yi=[function(b){return/\S/.test(b)}],Lo=["<",">"],Bs=["-",'"',".",":","_","/","+"],on=/^\w$/,dt;try{dt=new RegExp("^[\\p{Lu}]$","u")}catch{dt=/^[A-Z]$/}var Vt={};E("filetype",void 0,"string",["ft"],function(b,S){if(S!==void 0){if(b===void 0){var k=S.getOption("mode");return k=="null"?"":k}var k=b==""?"null":b;S.setOption("mode",k)}}),E("textwidth",80,"number",["tw"],function(b,S){if(S!==void 0){if(b===void 0){var k=S.getOption("textwidth");return k}var P=Math.round(b);P>1&&S.setOption("textwidth",P)}});var Ji=function(){function b(X,oe,ue){function we(Pe){var Ne=++F%P,Ze=Y[Ne];Ze&&Ze.clear(),Y[Ne]=X.setBookmark(Pe)}var Ae=F%P,be=Y[Ae];if(be){var Ce=be.find();Ce&&!Ge(Ce,oe)&&we(oe)}else we(oe);we(ue),j=F,q=F-P+1,q<0&&(q=0)}function S(X,oe){F+=oe,F>j?F=j:F<q&&(F=q);var ue=Y[(P+F)%P];if(ue&&!ue.find()){var we=oe>0?1:-1,Ae,be=X.getCursor();do if(F+=we,ue=Y[(P+F)%P],ue&&(Ae=ue.find())&&!Ge(be,Ae))break;while(F<j&&F>q)}return ue}function k(X,oe){var ue=F,we=S(X,oe);return F=ue,we&&we.find()}var P=100,F=-1,j=0,q=0,Y=new Array(P);return{cachedCursor:void 0,add:b,find:k,move:S}},Gn=function(b){return b?{changes:b.changes,expectCursorActivityForChange:b.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};C.prototype={exitMacroRecordMode:function(){var b=qe.macroModeState;b.onRecordingDone&&b.onRecordingDone(),b.onRecordingDone=void 0,b.isRecording=!1},enterMacroRecordMode:function(b,S){var k=qe.registerController.getRegister(S);if(k){if(k.clear(),this.latestRegister=S,b.openDialog){var P=pi("span",{class:"cm-vim-message"},"recording @"+S);this.onRecordingDone=b.openDialog(P,null,{bottom:!0})}this.isRecording=!0}}};var qe,Cn,_t={enterVimMode:u,leaveVimMode:f,buildKeyMap:function(){},getRegisterController:function(){return qe.registerController},resetVimGlobalState_:D,getVimGlobalState_:function(){return qe},maybeInitVimState_:L,suppressErrorLogging:!1,InsertModeKey:Mo,map:function(b,S,k){Kr.map(b,S,k)},unmap:function(b,S){return Kr.unmap(b,S)},noremap:function(b,S,k){Kr.map(b,S,k,!0)},mapclear:function(b){var S=Bn.length,k=Uo,P=Bn.slice(0,S-k);if(Bn=Bn.slice(S-k),b)for(var F=P.length-1;F>=0;F--){var j=P[F];if(b!==j.context)if(j.context)this._mapCommand(j);else{var q=["normal","insert","visual"];for(var Y in q)if(q[Y]!==b){var X={};for(var oe in j)X[oe]=j[oe];X.context=q[Y],this._mapCommand(X)}}}},langmap:z,vimKeyFromEvent:W,setOption:$,getOption:_,defineOption:E,defineEx:function(b,S,k){if(!S)S=b;else if(b.indexOf(S)!==0)throw new Error('(Vim.defineEx) "'+S+'" is not a prefix of "'+b+'", command not registered');vr[b]=k,Kr.commandMap_[S]={name:b,shortName:S,type:"api"}},handleKey:function(b,S,k){var P=this.findKey(b,S,k);if(typeof P=="function")return P()},multiSelectHandleKey:ne,findKey:function(b,S,k){function P(){var oe=qe.macroModeState;if(oe.isRecording){if(S=="q")return oe.exitMacroRecordMode(),A(b),!0;k!="mapping"&&Ii(oe,S)}}function F(){if(S=="<Esc>"){if(Y.visualMode)mn(b);else{if(!Y.insertMode)return;ar(b)}return A(b),!0}}function j(){if(F())return!0;Y.inputState.keyBuffer.push(S);var oe=Y.inputState.keyBuffer.join(""),ue=S.length==1,we=Oi.matchCommand(oe,Bn,Y.inputState,"insert"),Ae=Y.inputState.changeQueue;if(we.type=="none")return A(b),!1;if(we.type=="partial"){if(we.expectLiteralNext&&(Y.expectLiteralNext=!0),Cn&&window.clearTimeout(Cn),Cn=ue&&window.setTimeout(function(){Y.insertMode&&Y.inputState.keyBuffer.length&&A(b)},_("insertModeEscKeysTimeout")),ue){var be=b.listSelections();(!Ae||Ae.removed.length!=be.length)&&(Ae=Y.inputState.changeQueue=new N),Ae.inserted+=S;for(var Ce=0;Ce<be.length;Ce++){var Pe=We(be[Ce].anchor,be[Ce].head),Ne=Me(be[Ce].anchor,be[Ce].head),Ze=b.getRange(Pe,b.state.overwrite?fe(Ne,0,1):Ne);Ae.removed[Ce]=(Ae.removed[Ce]||"")+Ze}}return!ue}if(Y.expectLiteralNext=!1,Cn&&window.clearTimeout(Cn),we.command&&Ae){for(var be=b.listSelections(),Ce=0;Ce<be.length;Ce++){var ft=be[Ce].head;b.replaceRange(Ae.removed[Ce]||"",fe(ft,0,-Ae.inserted.length),ft,"+input")}qe.macroModeState.lastInsertModeChanges.changes.pop()}return we.command||A(b),we.command}function q(){if(P()||F())return!0;Y.inputState.keyBuffer.push(S);var oe=Y.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(oe))return!0;var ue=/^(\d*)(.*)$/.exec(oe);if(!ue)return A(b),!1;var we=Y.visualMode?"visual":"normal",Ae=ue[2]||ue[1];Y.inputState.operatorShortcut&&Y.inputState.operatorShortcut.slice(-1)==Ae&&(Ae=Y.inputState.operatorShortcut);var be=Oi.matchCommand(Ae,Bn,Y.inputState,we);return be.type=="none"?(A(b),!1):be.type=="partial"?(be.expectLiteralNext&&(Y.expectLiteralNext=!0),!0):be.type=="clear"?(A(b),!0):(Y.expectLiteralNext=!1,Y.inputState.keyBuffer.length=0,ue=/^(\d*)(.*)$/.exec(oe),ue[1]&&ue[1]!="0"&&Y.inputState.pushRepeatDigit(ue[1]),be.command)}var Y=L(b),X;return Y.insertMode?X=j():X=q(),X===!1?!Y.insertMode&&S.length===1?function(){return!0}:void 0:X===!0?function(){return!0}:function(){if(!((X.operator||X.isEdit)&&b.getOption("readOnly")))return b.operation(function(){b.curOp.isVimOp=!0;try{X.type=="keyToKey"?M(b,X.toKeys,X):Oi.processCommand(b,Y,X)}catch(oe){throw b.state.vim=void 0,L(b),_t.suppressErrorLogging||console.log(oe),oe}return!0})}},handleEx:function(b,S){Kr.processCommand(b,S)},defineMotion:Q,defineAction:ce,defineOperator:re,mapCommand:Gi,_mapCommand:qi,defineRegister:U,exitVisualMode:mn,exitInsertMode:ar},qr=[],Zi=!1,Ft,Gr={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},cr={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},vo={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(Gr)).forEach(function(b){vo[(Gr[b]||"").toLowerCase()]=vo[b.toLowerCase()]=b}),E("langmap",void 0,"string",["lmap"],function(b,S){if(b===void 0)return Wn.string;z(b)}),T.prototype.pushRepeatDigit=function(b){this.operator?this.motionRepeat=this.motionRepeat.concat(b):this.prefixRepeat=this.prefixRepeat.concat(b)},T.prototype.getRepeat=function(){var b=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(b=1,this.prefixRepeat.length>0&&(b*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(b*=parseInt(this.motionRepeat.join(""),10))),b},B.prototype={setText:function(b,S,k){this.keyBuffer=[b||""],this.linewise=!!S,this.blockwise=!!k},pushText:function(b,S){S&&(this.linewise||this.keyBuffer.push(`
1438
+ `),this.linewise=!0),this.keyBuffer.push(b)},pushInsertModeChanges:function(b){this.insertModeChanges.push(Gn(b))},pushSearchQuery:function(b){this.searchQueries.push(b)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},G.prototype={pushText:function(b,S,k,P,F){if(b!=="_"){P&&k.charAt(k.length-1)!==`
1439
+ `&&(k+=`
1440
+ `);var j=this.isValidRegister(b)?this.getRegister(b):null;if(!j){switch(S){case"yank":this.registers[0]=new B(k,P,F);break;case"delete":case"change":k.indexOf(`
1441
+ `)==-1?this.registers["-"]=new B(k,P):(this.shiftNumericRegisters_(),this.registers[1]=new B(k,P))}this.unnamedRegister.setText(k,P,F);return}var q=l(b);q?j.pushText(k,P):j.setText(k,P,F),b==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(k),this.unnamedRegister.setText(j.toString(),P)}},getRegister:function(b){return this.isValidRegister(b)?(b=b.toLowerCase(),this.registers[b]||(this.registers[b]=new B),this.registers[b]):this.unnamedRegister},isValidRegister:function(b){return b&&(x(b,Bs)||on.test(b))},shiftNumericRegisters_:function(){for(var b=9;b>=2;b--)this.registers[b]=this.getRegister(""+(b-1))}},J.prototype={nextMatch:function(b,S){var k=this.historyBuffer,P=S?-1:1;this.initialPrefix===null&&(this.initialPrefix=b);for(var F=this.iterator+P;S?F>=0:F<k.length;F+=P)for(var j=k[F],q=0;q<=j.length;q++)if(this.initialPrefix==j.substring(0,q))return this.iterator=F,j;if(F>=k.length)return this.iterator=k.length,this.initialPrefix;if(F<0)return b},pushInput:function(b){var S=this.historyBuffer.indexOf(b);S>-1&&this.historyBuffer.splice(S,1),b.length&&this.historyBuffer.push(b)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var Oi={matchCommand:function(b,S,k,P){var F=$e(b,S,P,k);if(!F.full&&!F.partial)return{type:"none"};if(!F.full&&F.partial)return{type:"partial",expectLiteralNext:F.partial.length==1&&F.partial[0].keys.slice(-11)=="<character>"};for(var j,q=0;q<F.full.length;q++){var Y=F.full[q];j||(j=Y)}if(j.keys.slice(-11)=="<character>"||j.keys.slice(-10)=="<register>"){var X=Ee(b);if(!X||X.length>1)return{type:"clear"};k.selectedCharacter=X}return{type:"full",command:j}},processCommand:function(b,S,k){switch(S.inputState.repeatOverride=k.repeatOverride,k.type){case"motion":this.processMotion(b,S,k);break;case"operator":this.processOperator(b,S,k);break;case"operatorMotion":this.processOperatorMotion(b,S,k);break;case"action":this.processAction(b,S,k);break;case"search":this.processSearch(b,S,k);break;case"ex":case"keyToEx":this.processEx(b,S,k);break}},processMotion:function(b,S,k){S.inputState.motion=k.motion,S.inputState.motionArgs=ie(k.motionArgs),this.evalInput(b,S)},processOperator:function(b,S,k){var P=S.inputState;if(P.operator){if(P.operator==k.operator){P.motion="expandToLine",P.motionArgs={linewise:!0},this.evalInput(b,S);return}A(b)}P.operator=k.operator,P.operatorArgs=ie(k.operatorArgs),k.keys.length>1&&(P.operatorShortcut=k.keys),k.exitVisualBlock&&(S.visualBlock=!1,zn(b)),S.visualMode&&this.evalInput(b,S)},processOperatorMotion:function(b,S,k){var P=S.visualMode,F=ie(k.operatorMotionArgs);F&&P&&F.visualLine&&(S.visualLine=!0),this.processOperator(b,S,k),P||this.processMotion(b,S,k)},processAction:function(b,S,k){var P=S.inputState,F=P.getRepeat(),j=!!F,q=ie(k.actionArgs)||{};P.selectedCharacter&&(q.selectedCharacter=P.selectedCharacter),k.operator&&this.processOperator(b,S,k),k.motion&&this.processMotion(b,S,k),(k.motion||k.operator)&&this.evalInput(b,S),q.repeat=F||1,q.repeatIsExplicit=j,q.registerName=P.registerName,A(b),S.lastMotion=null,k.isEdit&&this.recordLastEdit(S,P,k),Kn[k.action](b,q,S)},processSearch:function(b,S,k){function P(Ne,Ze,ft){qe.searchHistoryController.pushInput(Ne),qe.searchHistoryController.reset();try{vn(b,Ne,Ze,ft)}catch{Nt(b,"Invalid regex: "+Ne),A(b);return}Oi.processMotion(b,S,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:k.searchArgs.toJumplist}})}function F(Ne){P(Ne,!0,!0);var Ze=qe.macroModeState;Ze.isRecording&&Wo(Ze,Ne)}function j(Ne,Ze,ft){var rt=W(Ne),ot,Rn;rt=="<Up>"||rt=="<Down>"?(ot=rt=="<Up>",Rn=Ne.target?Ne.target.selectionEnd:0,Ze=qe.searchHistoryController.nextMatch(Ze,ot)||"",ft(Ze),Rn&&Ne.target&&(Ne.target.selectionEnd=Ne.target.selectionStart=Math.min(Rn,Ne.target.value.length))):rt&&rt!="<Left>"&&rt!="<Right>"&&qe.searchHistoryController.reset();var kt;try{kt=vn(b,Ze,!0,!0)}catch{}kt?b.scrollIntoView(er(b,!Y,kt),30):(gi(b),b.scrollTo(we.left,we.top))}function q(Ne,Ze,ft){var rt=W(Ne);rt=="<Esc>"||rt=="<C-c>"||rt=="<C-[>"||rt=="<BS>"&&Ze==""?(qe.searchHistoryController.pushInput(Ze),qe.searchHistoryController.reset(),vn(b,ue),gi(b),b.scrollTo(we.left,we.top),je.e_stop(Ne),A(b),ft(),b.focus()):rt=="<Up>"||rt=="<Down>"?je.e_stop(Ne):rt=="<C-u>"&&(je.e_stop(Ne),ft(""))}if(b.getSearchCursor){var Y=k.searchArgs.forward,X=k.searchArgs.wholeWordOnly;Tn(b).setReversed(!Y);var oe=Y?"/":"?",ue=Tn(b).getQuery(),we=b.getScrollInfo();switch(k.searchArgs.querySrc){case"prompt":var Ae=qe.macroModeState;if(Ae.isPlaying){var Pe=Ae.replaySearchQueries.shift();P(Pe,!0,!1)}else mr(b,{onClose:F,prefix:oe,desc:"(JavaScript regexp)",onKeyUp:j,onKeyDown:q});break;case"wordUnderCursor":var be=Vn(b,{noSymbol:!0}),Ce=!0;if(be||(be=Vn(b,{noSymbol:!1}),Ce=!1),!be){Nt(b,"No word under cursor"),A(b);return}var Pe=b.getLine(be.start.line).substring(be.start.ch,be.end.ch);Ce&&X?Pe="\\b"+Pe+"\\b":Pe=dn(Pe),qe.jumpList.cachedCursor=b.getCursor(),b.setCursor(be.start),P(Pe,!0,!1)}}},processEx:function(b,S,k){function P(j){qe.exCommandHistoryController.pushInput(j),qe.exCommandHistoryController.reset(),Kr.processCommand(b,j),b.state.vim&&A(b)}function F(j,q,Y){var X=W(j),oe,ue;(X=="<Esc>"||X=="<C-c>"||X=="<C-[>"||X=="<BS>"&&q=="")&&(qe.exCommandHistoryController.pushInput(q),qe.exCommandHistoryController.reset(),je.e_stop(j),A(b),Y(),b.focus()),X=="<Up>"||X=="<Down>"?(je.e_stop(j),oe=X=="<Up>",ue=j.target?j.target.selectionEnd:0,q=qe.exCommandHistoryController.nextMatch(q,oe)||"",Y(q),ue&&j.target&&(j.target.selectionEnd=j.target.selectionStart=Math.min(ue,j.target.value.length))):X=="<C-u>"?(je.e_stop(j),Y("")):X&&X!="<Left>"&&X!="<Right>"&&qe.exCommandHistoryController.reset()}k.type=="keyToEx"?Kr.processCommand(b,k.exArgs.input):S.visualMode?mr(b,{onClose:P,prefix:":",value:"'<,'>",onKeyDown:F,selectValueOnOpen:!1}):mr(b,{onClose:P,prefix:":",onKeyDown:F})},evalInput:function(b,S){var k=S.inputState,P=k.motion,F=k.motionArgs||{},j=k.operator,q=k.operatorArgs||{},Y=k.registerName,X=S.sel,oe=He(S.visualMode?de(b,X.head):b.getCursor("head")),ue=He(S.visualMode?de(b,X.anchor):b.getCursor("anchor")),we=He(oe),Ae=He(ue),be,Ce,Pe;if(j&&this.recordLastEdit(S,k),k.repeatOverride!==void 0?Pe=k.repeatOverride:Pe=k.getRepeat(),Pe>0&&F.explicitRepeat?F.repeatIsExplicit=!0:(F.noRepeat||!F.explicitRepeat&&Pe===0)&&(Pe=1,F.repeatIsExplicit=!1),k.selectedCharacter&&(F.selectedCharacter=q.selectedCharacter=k.selectedCharacter),F.repeat=Pe,A(b),P){var Ne=On[P](b,oe,F,S,k);if(S.lastMotion=On[P],!Ne)return;if(F.toJumplist){!j&&b.ace.curOp!=null&&(b.ace.curOp.command.scrollIntoView="center-animate");var Ze=qe.jumpList,ft=Ze.cachedCursor;ft?(ti(b,ft,Ne),delete Ze.cachedCursor):ti(b,oe,Ne)}Ne instanceof Array?(Ce=Ne[0],be=Ne[1]):be=Ne,be||(be=He(oe)),S.visualMode?((!S.visualBlock||be.ch!==1/0)&&(be=de(b,be,we)),Ce&&(Ce=de(b,Ce)),Ce=Ce||Ae,X.anchor=Ce,X.head=be,zn(b),Cr(b,S,"<",at(Ce,be)?Ce:be),Cr(b,S,">",at(Ce,be)?be:Ce)):j||(b.ace.curOp&&(b.ace.curOp.vimDialogScroll="center-animate"),be=de(b,be,we),b.setCursor(be.line,be.ch))}if(j){if(q.lastSel){Ce=Ae;var rt=q.lastSel,ot=Math.abs(rt.head.line-rt.anchor.line),Rn=Math.abs(rt.head.ch-rt.anchor.ch);rt.visualLine?be=new ze(Ae.line+ot,Ae.ch):rt.visualBlock?be=new ze(Ae.line+ot,Ae.ch+Rn):rt.head.line==rt.anchor.line?be=new ze(Ae.line,Ae.ch+Rn):be=new ze(Ae.line+ot,Ae.ch),S.visualMode=!0,S.visualLine=rt.visualLine,S.visualBlock=rt.visualBlock,X=S.sel={anchor:Ce,head:be},zn(b)}else S.visualMode&&(q.lastSel={anchor:He(X.anchor),head:He(X.head),visualBlock:S.visualBlock,visualLine:S.visualLine});var kt,Zt,It,St,ur;if(S.visualMode){kt=We(X.head,X.anchor),Zt=Me(X.head,X.anchor),It=S.visualLine||q.linewise,St=S.visualBlock?"block":It?"line":"char";var yr=w(b,kt,Zt);if(ur=Un(b,{anchor:yr.start,head:yr.end},St),It){var Nn=ur.ranges;if(St=="block")for(var V=0;V<Nn.length;V++)Nn[V].head.ch=st(b,Nn[V].head.line);else St=="line"&&(Nn[0].head=new ze(Nn[0].head.line+1,0))}}else{if(kt=He(Ce||Ae),Zt=He(be||we),at(Zt,kt)){var Z=kt;kt=Zt,Zt=Z}It=F.linewise||q.linewise,It?Xn(b,kt,Zt):F.forward&&En(b,kt,Zt),St="char";var se=!F.inclusive||It,yr=w(b,kt,Zt);ur=Un(b,{anchor:yr.start,head:yr.end},St,se)}b.setSelections(ur.ranges,ur.primary),S.lastMotion=null,q.repeat=Pe,q.registerName=Y,q.linewise=It;var ae=us[j](b,q,ur.ranges,Ae,be);S.visualMode&&mn(b,ae!=null),ae&&b.setCursor(ae)}},recordLastEdit:function(b,S,k){var P=qe.macroModeState;P.isPlaying||(b.lastEditInputState=S,b.lastEditActionCommand=k,P.lastInsertModeChanges.changes=[],P.lastInsertModeChanges.expectCursorActivityForChange=!1,P.lastInsertModeChanges.visualBlock=b.visualBlock?b.sel.head.line-b.sel.anchor.line:0)}},On={moveToTopLine:function(b,S,k){var P=Ui(b).top+k.repeat-1;return new ze(P,tn(b.getLine(P)))},moveToMiddleLine:function(b){var S=Ui(b),k=Math.floor((S.top+S.bottom)*.5);return new ze(k,tn(b.getLine(k)))},moveToBottomLine:function(b,S,k){var P=Ui(b).bottom-k.repeat+1;return new ze(P,tn(b.getLine(P)))},expandToLine:function(b,S,k){var P=S;return new ze(P.line+k.repeat-1,1/0)},findNext:function(b,S,k){var P=Tn(b),F=P.getQuery();if(F){var j=!k.forward;return j=P.isReversed()?!j:j,ho(b,F),er(b,j,F,k.repeat)}},findAndSelectNextInclusive:function(b,S,k,P,F){var j=Tn(b),q=j.getQuery();if(q){var Y=!k.forward;Y=j.isReversed()?!Y:Y;var X=Mr(b,Y,q,k.repeat,P);if(X){if(F.operator)return X;var oe=X[0],ue=new ze(X[1].line,X[1].ch-1);if(P.visualMode){(P.visualLine||P.visualBlock)&&(P.visualLine=!1,P.visualBlock=!1,je.signal(b,"vim-mode-change",{mode:"visual",subMode:""}));var we=P.sel.anchor;if(we)return j.isReversed()?k.forward?[we,oe]:[we,ue]:k.forward?[we,ue]:[we,oe]}else P.visualMode=!0,P.visualLine=!1,P.visualBlock=!1,je.signal(b,"vim-mode-change",{mode:"visual",subMode:""});return Y?[ue,oe]:[oe,ue]}}},goToMark:function(b,S,k,P){var F=ii(b,P,k.selectedCharacter);return F?k.linewise?{line:F.line,ch:tn(b.getLine(F.line))}:F:null},moveToOtherHighlightedEnd:function(b,S,k,P){if(P.visualBlock&&k.sameLine){var F=P.sel;return[de(b,new ze(F.anchor.line,F.head.ch)),de(b,new ze(F.head.line,F.anchor.ch))]}return[P.sel.head,P.sel.anchor]},jumpToMark:function(b,S,k,P){for(var F=S,j=0;j<k.repeat;j++){var q=F;for(var Y in P.marks)if(c(Y)){var X=P.marks[Y].find(),oe=k.forward?at(X,q):at(q,X);if(!oe&&!(k.linewise&&X.line==q.line)){var ue=Ge(q,F),we=k.forward?Tt(q,X,F):Tt(F,X,q);(ue||we)&&(F=X)}}}return k.linewise&&(F=new ze(F.line,tn(b.getLine(F.line)))),F},moveByCharacters:function(b,S,k){var P=S,F=k.repeat,j=k.forward?P.ch+F:P.ch-F;return new ze(P.line,j)},moveByLines:function(b,S,k,P){var F=S,j=F.ch;switch(P.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:j=P.lastHPos;break;default:P.lastHPos=j}var q=k.repeat+(k.repeatOffset||0),Y=k.forward?F.line+q:F.line-q,X=b.firstLine(),oe=b.lastLine();if(Y<X&&F.line==X)return this.moveToStartOfLine(b,S,k,P);if(Y>oe&&F.line==oe)return Hi(b,S,k,P,!0);var ue=b.ace.session.getFoldLine(Y);return ue&&(k.forward?Y>ue.start.row&&(Y=ue.end.row+1):Y=ue.start.row),k.toFirstChar&&(j=tn(b.getLine(Y)),P.lastHPos=j),P.lastHSPos=b.charCoords(new ze(Y,j),"div").left,new ze(Y,j)},moveByDisplayLines:function(b,S,k,P){var F=S;switch(P.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:P.lastHSPos=b.charCoords(F,"div").left}var j=k.repeat,X=b.findPosV(F,k.forward?j:-j,"line",P.lastHSPos);if(X.hitSide)if(k.forward)var q=b.charCoords(X,"div"),Y={top:q.top+8,left:P.lastHSPos},X=b.coordsChar(Y,"div");else{var oe=b.charCoords(new ze(b.firstLine(),0),"div");oe.left=P.lastHSPos,X=b.coordsChar(oe,"div")}return P.lastHPos=X.ch,X},moveByPage:function(b,S,k){var P=S,F=k.repeat;return b.findPosV(P,k.forward?F:-F,"page")},moveByParagraph:function(b,S,k){var P=k.forward?1:-1;return Er(b,S,k.repeat,P)},moveBySentence:function(b,S,k){var P=k.forward?1:-1;return ni(b,S,k.repeat,P)},moveByScroll:function(b,S,k,P){var F=b.getScrollInfo(),j=null,q=k.repeat;q||(q=F.clientHeight/(2*b.defaultTextHeight()));var Y=b.charCoords(S,"local");if(k.repeat=q,j=On.moveByDisplayLines(b,S,k,P),!j)return null;var X=b.charCoords(j,"local");return b.scrollTo(null,F.top+X.top-Y.top),j},moveByWords:function(b,S,k){return gr(b,S,k.repeat,!!k.forward,!!k.wordEnd,!!k.bigWord)},moveTillCharacter:function(b,S,k){var P=k.repeat,F=Ri(b,P,k.forward,k.selectedCharacter,S),j=k.forward?-1:1;return sr(j,k),F?(F.ch+=j,F):null},moveToCharacter:function(b,S,k){var P=k.repeat;return sr(0,k),Ri(b,P,k.forward,k.selectedCharacter,S)||S},moveToSymbol:function(b,S,k){var P=k.repeat;return qn(b,P,k.forward,k.selectedCharacter)||S},moveToColumn:function(b,S,k,P){var F=k.repeat;return P.lastHPos=F-1,P.lastHSPos=b.charCoords(S,"div").left,ls(b,F)},moveToEol:function(b,S,k,P){return Hi(b,S,k,P,!1)},moveToFirstNonWhiteSpaceCharacter:function(b,S){var k=S;return new ze(k.line,tn(b.getLine(k.line)))},moveToMatchedSymbol:function(b,S){for(var k=S,P=k.line,F=k.ch,j=b.getLine(P),q;F<j.length;F++)if(q=j.charAt(F),q&&h(q)){var Y=b.getTokenTypeAt(new ze(P,F+1));if(Y!=="string"&&Y!=="comment")break}if(F<j.length){var X=/[<>]/.test(j[F])?/[(){}[\]<>]/:/[(){}[\]]/,oe=b.findMatchingBracket(new ze(P,F+1),{bracketRegex:X});return oe.to}return k},moveToStartOfLine:function(b,S){return new ze(S.line,0)},moveToLineOrEdgeOfDocument:function(b,S,k){var P=k.forward?b.lastLine():b.firstLine();return k.repeatIsExplicit&&(P=k.repeat-b.getOption("firstLineNumber")),new ze(P,tn(b.getLine(P)))},moveToStartOfDisplayLine:function(b){return b.execCommand("goLineLeft"),b.getCursor()},moveToEndOfDisplayLine:function(b){b.execCommand("goLineRight");var S=b.getCursor();return S.sticky=="before"&&S.ch--,S},textObjectManipulation:function(b,S,k,P){var F={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},j={"'":!0,'"':!0,"`":!0},q=k.selectedCharacter;q=="b"?q="(":q=="B"&&(q="{");var Y=!k.textObjectInner,X,oe;if(F[q]){if(oe=!0,X=$n(b,S,q,Y),!X){var ue=b.getSearchCursor(new RegExp("\\"+q,"g"),S);ue.find()&&(X=$n(b,ue.from(),q,Y))}}else if(j[q])oe=!0,X=Hr(b,S,q,Y);else if(q==="W"||q==="w")for(var we=k.repeat||1;we-- >0;){var Ae=Vn(b,{inclusive:Y,innerWord:!Y,bigWord:q==="W",noSymbol:q==="W",multiline:!0},X&&X.end);Ae&&(X||(X=Ae),X.end=Ae.end)}else if(q==="p")if(X=Er(b,S,k.repeat,0,Y),k.linewise=!0,P.visualMode)P.visualLine||(P.visualLine=!0);else{var be=P.inputState.operatorArgs;be&&(be.linewise=!0),X.end.line--}else if(q==="t")X=$i(b,S,Y);else if(q==="s"){var Ce=b.getLine(S.line);S.ch>0&&y(Ce[S.ch])&&(S.ch-=1);var Pe=di(b,S,k.repeat,1,Y),Ne=di(b,S,k.repeat,-1,Y);p(b.getLine(Ne.line)[Ne.ch])&&p(b.getLine(Pe.line)[Pe.ch-1])&&(Ne={line:Ne.line,ch:Ne.ch+1}),X={start:Ne,end:Pe}}return X?b.state.vim.visualMode?Sn(b,X.start,X.end,oe):[X.start,X.end]:null},repeatLastCharacterSearch:function(b,S,k){var P=qe.lastCharacterSearch,F=k.repeat,j=k.forward===P.forward,q=(P.increment?1:0)*(j?-1:1);b.moveH(-q,"char"),k.inclusive=!!j;var Y=Ri(b,F,j,P.selectedCharacter);return Y?(Y.ch+=q,Y):(b.moveH(q,"char"),S)}},us={change:function(b,S,k){var P,F,j=b.state.vim,q=k[0].anchor,Y=k[0].head;if(j.visualMode)if(S.fullLine)Y.ch=Number.MAX_VALUE,Y.line--,b.setSelection(q,Y),F=b.getSelection(),b.replaceSelection(""),P=q;else{F=b.getSelection();var X=le("",k.length);b.replaceSelections(X),P=We(k[0].head,k[0].anchor)}else{F=b.getRange(q,Y);var oe=j.lastEditInputState||{};if(oe.motion=="moveByWords"&&!p(F)){var ue=/\s+$/.exec(F);ue&&oe.motionArgs&&oe.motionArgs.forward&&(Y=fe(Y,0,-ue[0].length),F=F.slice(0,-ue[0].length))}S.linewise&&(q=new ze(q.line,tn(b.getLine(q.line))),Y.line>q.line&&(Y=new ze(Y.line-1,Number.MAX_VALUE))),b.replaceRange("",q,Y),P=q}qe.registerController.pushText(S.registerName,"change",F,S.linewise,k.length>1),Kn.enterInsertMode(b,{head:P},b.state.vim)},delete:function(b,S,k){var P,F,j=b.state.vim;if(j.visualBlock){F=b.getSelection();var q=le("",k.length);b.replaceSelections(q),P=We(k[0].head,k[0].anchor)}else{var Y=k[0].anchor,X=k[0].head;S.linewise&&X.line!=b.firstLine()&&Y.line==b.lastLine()&&Y.line==X.line-1&&(Y.line==b.firstLine()?Y.ch=0:Y=new ze(Y.line-1,st(b,Y.line-1))),F=b.getRange(Y,X),b.replaceRange("",Y,X),P=Y,S.linewise&&(P=On.moveToFirstNonWhiteSpaceCharacter(b,Y))}return qe.registerController.pushText(S.registerName,"delete",F,S.linewise,j.visualBlock),de(b,P)},indent:function(b,S,k){var P=b.state.vim,F=P.visualMode?S.repeat:1;if(P.visualBlock){for(var j=b.getOption("tabSize"),q=b.getOption("indentWithTabs")?" ":" ".repeat(j),Y,X=k.length-1;X>=0;X--)if(Y=We(k[X].anchor,k[X].head),S.indentRight)b.replaceRange(q.repeat(F),Y,Y);else{for(var oe=b.getLine(Y.line),ue=0,we=0;we<F;we++){var Ae=oe[Y.ch+ue];if(Ae==" ")ue++;else{if(Ae!=" ")break;ue++;for(var be=1;be<q.length&&(Ae=oe[Y.ch+ue],Ae===" ");be++)ue++}}b.replaceRange("",Y,fe(Y,0,ue))}return Y}if(b.indentMore)for(var we=0;we<F;we++)S.indentRight?b.indentMore():b.indentLess();else{var Ce=k[0].anchor.line,Pe=P.visualBlock?k[k.length-1].anchor.line:k[0].head.line;S.linewise&&Pe--;for(var X=Ce;X<=Pe;X++)for(var we=0;we<F;we++)b.indentLine(X,S.indentRight)}return On.moveToFirstNonWhiteSpaceCharacter(b,k[0].anchor)},indentAuto:function(b,S,k){return b.execCommand("indentAuto"),On.moveToFirstNonWhiteSpaceCharacter(b,k[0].anchor)},hardWrap:function(b,S,k,P,F){if(b.hardWrap){var j=k[0].anchor.line,q=k[0].head.line;S.linewise&&q--;var Y=b.hardWrap({from:j,to:q});return Y>j&&S.linewise&&Y--,S.keepCursor?P:new ze(Y,0)}},changeCase:function(b,S,k,P,F){for(var j=b.getSelections(),q=[],Y=S.toLower,X=0;X<j.length;X++){var oe=j[X],ue="";if(Y===!0)ue=oe.toLowerCase();else if(Y===!1)ue=oe.toUpperCase();else for(var we=0;we<oe.length;we++){var Ae=oe.charAt(we);ue+=l(Ae)?Ae.toLowerCase():Ae.toUpperCase()}q.push(ue)}return b.replaceSelections(q),S.shouldMoveCursor?F:!b.state.vim.visualMode&&S.linewise&&k[0].anchor.line+1==k[0].head.line?On.moveToFirstNonWhiteSpaceCharacter(b,P):S.linewise?P:We(k[0].anchor,k[0].head)},yank:function(b,S,k,P){var F=b.state.vim,j=b.getSelection(),q=F.visualMode?We(F.sel.anchor,F.sel.head,k[0].head,k[0].anchor):P;return qe.registerController.pushText(S.registerName,"yank",j,S.linewise,F.visualBlock),q}},Kn={jumpListWalk:function(b,S,k){if(!k.visualMode){var P=S.repeat,F=S.forward,j=qe.jumpList,q=j.move(b,F?P:-P),Y=q?q.find():void 0;Y=Y||b.getCursor(),b.setCursor(Y),b.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(b,S,k){if(!k.visualMode){var P=S.repeat||1,F=b.defaultTextHeight(),j=b.getScrollInfo().top,q=F*P,Y=S.forward?j+q:j-q,X=He(b.getCursor()),oe=b.charCoords(X,"local");if(S.forward)Y>oe.top?(X.line+=(Y-oe.top)/F,X.line=Math.ceil(X.line),b.setCursor(X),oe=b.charCoords(X,"local"),b.scrollTo(null,oe.top)):b.scrollTo(null,Y);else{var ue=Y+b.getScrollInfo().clientHeight;ue<oe.bottom?(X.line-=(oe.bottom-ue)/F,X.line=Math.floor(X.line),b.setCursor(X),oe=b.charCoords(X,"local"),b.scrollTo(null,oe.bottom-b.getScrollInfo().clientHeight)):b.scrollTo(null,Y)}}},scrollToCursor:function(b,S){var k=b.getCursor().line,P=b.charCoords(new ze(k,0),"local"),F=b.getScrollInfo().clientHeight,j=P.top;switch(S.position){case"center":j=P.bottom-F/2;break;case"bottom":var q=new ze(k,b.getLine(k).length-1),Y=b.charCoords(q,"local"),X=Y.bottom-j;j=j-F+X}b.scrollTo(null,j)},replayMacro:function(b,S,k){var P=S.selectedCharacter,F=S.repeat,j=qe.macroModeState;for(P=="@"?P=j.latestRegister:j.latestRegister=P;F--;)mi(b,k,j,P)},enterMacroRecordMode:function(b,S){var k=qe.macroModeState,P=S.selectedCharacter;qe.registerController.isValidRegister(P)&&k.enterMacroRecordMode(b,P)},toggleOverwrite:function(b){b.state.overwrite?(b.toggleOverwrite(!1),b.setOption("keyMap","vim-insert"),je.signal(b,"vim-mode-change",{mode:"insert"})):(b.toggleOverwrite(!0),b.setOption("keyMap","vim-replace"),je.signal(b,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(b,S,k){if(!b.getOption("readOnly")){k.insertMode=!0,k.insertModeRepeat=S&&S.repeat||1;var P=S?S.insertAt:null,F=k.sel,j=S.head||b.getCursor("head"),q=b.listSelections().length;if(P=="eol")j=new ze(j.line,st(b,j.line));else if(P=="bol")j=new ze(j.line,0);else if(P=="charAfter"){var Y=w(b,j,fe(j,0,1));j=Y.end}else if(P=="firstNonBlank"){var Y=w(b,j,On.moveToFirstNonWhiteSpaceCharacter(b,j));j=Y.end}else if(P=="startOfSelectedArea"){if(!k.visualMode)return;k.visualBlock?(j=new ze(Math.min(F.head.line,F.anchor.line),Math.min(F.head.ch,F.anchor.ch)),q=Math.abs(F.head.line-F.anchor.line)+1):F.head.line<F.anchor.line?j=F.head:j=new ze(F.anchor.line,0)}else if(P=="endOfSelectedArea"){if(!k.visualMode)return;k.visualBlock?(j=new ze(Math.min(F.head.line,F.anchor.line),Math.max(F.head.ch,F.anchor.ch)+1),q=Math.abs(F.head.line-F.anchor.line)+1):F.head.line>=F.anchor.line?j=fe(F.head,0,1):j=new ze(F.anchor.line,0)}else if(P=="inplace"){if(k.visualMode)return}else P=="lastEdit"&&(j=Vi(b)||j);b.setOption("disableInput",!1),S&&S.replace?(b.toggleOverwrite(!0),b.setOption("keyMap","vim-replace"),je.signal(b,"vim-mode-change",{mode:"replace"})):(b.toggleOverwrite(!1),b.setOption("keyMap","vim-insert"),je.signal(b,"vim-mode-change",{mode:"insert"})),qe.macroModeState.isPlaying||(b.on("change",Ro),k.insertEnd&&k.insertEnd.clear(),k.insertEnd=b.setBookmark(j,{insertLeft:!0}),je.on(b.getInputField(),"keydown",Ki)),k.visualMode&&mn(b),kn(b,j,q)}},toggleVisualMode:function(b,S,k){var P=S.repeat,F=b.getCursor(),j;if(k.visualMode)k.visualLine^S.linewise||k.visualBlock^S.blockwise?(k.visualLine=!!S.linewise,k.visualBlock=!!S.blockwise,je.signal(b,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""}),zn(b)):mn(b);else{k.visualMode=!0,k.visualLine=!!S.linewise,k.visualBlock=!!S.blockwise,j=de(b,new ze(F.line,F.ch+P-1));var q=w(b,F,j);k.sel={anchor:q.start,head:q.end},je.signal(b,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""}),zn(b),Cr(b,k,"<",We(F,j)),Cr(b,k,">",Me(F,j))}},reselectLastSelection:function(b,S,k){var P=k.lastSelection;if(k.visualMode&&Ot(b,k),P){var F=P.anchorMark.find(),j=P.headMark.find();if(!F||!j)return;k.sel={anchor:F,head:j},k.visualMode=!0,k.visualLine=P.visualLine,k.visualBlock=P.visualBlock,zn(b),Cr(b,k,"<",We(F,j)),Cr(b,k,">",Me(F,j)),je.signal(b,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""})}},joinLines:function(b,S,k){var P,F;if(k.visualMode){if(P=b.getCursor("anchor"),F=b.getCursor("head"),at(F,P)){var j=F;F=P,P=j}F.ch=st(b,F.line)-1}else{var q=Math.max(S.repeat,2);P=b.getCursor(),F=de(b,new ze(P.line+q-1,1/0))}for(var Y=0,X=P.line;X<F.line;X++){Y=st(b,P.line);var oe="",ue=0;if(!S.keepSpaces){var we=b.getLine(P.line+1);ue=we.search(/\S/),ue==-1?ue=we.length:oe=" "}b.replaceRange(oe,new ze(P.line,Y),new ze(P.line+1,ue))}var Ae=de(b,new ze(P.line,Y));k.visualMode&&mn(b,!1),b.setCursor(Ae)},newLineAndEnterInsertMode:function(b,S,k){k.insertMode=!0;var P=He(b.getCursor());if(P.line===b.firstLine()&&!S.after)b.replaceRange(`
1442
+ `,new ze(b.firstLine(),0)),b.setCursor(b.firstLine(),0);else{P.line=S.after?P.line:P.line-1,P.ch=st(b,P.line),b.setCursor(P);var F=je.commands.newlineAndIndentContinueComment||je.commands.newlineAndIndent;F(b)}this.enterInsertMode(b,{repeat:S.repeat},k)},paste:function(b,S,k){var P=this,F=qe.registerController.getRegister(S.registerName),j=function(){var q=F.toString();P.continuePaste(b,S,k,q,F)};S.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(q){P.continuePaste(b,S,k,q,F)},function(){j()}):j()},continuePaste:function(b,S,k,P,F){var j=He(b.getCursor());if(P){if(S.matchIndent){var q=b.getOption("tabSize"),Y=function(Nn){var V=Nn.split(" ").length-1,Z=Nn.split(" ").length-1;return V*q+Z*1},X=b.getLine(b.getCursor().line),oe=Y(X.match(/^\s*/)[0]),ue=P.replace(/\n$/,""),we=P!==ue,Ae=Y(P.match(/^\s*/)[0]),P=ue.replace(/^\s*/gm,function(Nn){var V=oe+(Y(Nn)-Ae);if(V<0)return"";if(b.getOption("indentWithTabs")){var Z=Math.floor(V/q);return Array(Z+1).join(" ")}return Array(V+1).join(" ")});P+=we?`
1443
+ `:""}if(S.repeat>1)var P=Array(S.repeat+1).join(P);var be=F.linewise,Ce=F.blockwise;if(Ce){P=P.split(`
1444
+ `),be&&P.pop();for(var Pe=0;Pe<P.length;Pe++)P[Pe]=P[Pe]==""?" ":P[Pe];j.ch+=S.after?1:0,j.ch=Math.min(st(b,j.line),j.ch)}else be?k.visualMode?P=k.visualLine?P.slice(0,-1):`
1445
+ `+P.slice(0,P.length-1)+`
1446
+ `:S.after?(P=`
1447
+ `+P.slice(0,P.length-1),j.ch=st(b,j.line)):j.ch=0:j.ch+=S.after?1:0;var Ne;if(k.visualMode){k.lastPastedText=P;var Ze,ft=Ye(b,k),rt=ft[0],ot=ft[1],Rn=b.getSelection(),kt=b.listSelections(),Zt=new Array(kt.length).join("1").split("1");k.lastSelection&&(Ze=k.lastSelection.headMark.find()),qe.registerController.unnamedRegister.setText(Rn),Ce?(b.replaceSelections(Zt),ot=new ze(rt.line+P.length-1,rt.ch),b.setCursor(rt),zt(b,ot),b.replaceSelections(P),Ne=rt):k.visualBlock?(b.replaceSelections(Zt),b.setCursor(rt),b.replaceRange(P,rt,rt),Ne=rt):(b.replaceRange(P,rt,ot),Ne=b.posFromIndex(b.indexFromPos(rt)+P.length-1)),Ze&&(k.lastSelection.headMark=b.setBookmark(Ze)),be&&(Ne.ch=0)}else if(Ce){b.setCursor(j);for(var Pe=0;Pe<P.length;Pe++){var It=j.line+Pe;It>b.lastLine()&&b.replaceRange(`
1448
+ `,new ze(It,0));var St=st(b,It);St<j.ch&&Zn(b,It,j.ch)}b.setCursor(j),zt(b,new ze(j.line+P.length-1,j.ch)),b.replaceSelections(P),Ne=j}else if(b.replaceRange(P,j),be){var It=S.after?j.line+1:j.line;Ne=new ze(It,tn(b.getLine(It)))}else Ne=He(j),/\n/.test(P)||(Ne.ch+=P.length-(S.after?1:0));k.visualMode&&mn(b,!1),b.setCursor(Ne)}},undo:function(b,S){b.operation(function(){Ue(b,je.commands.undo,S.repeat)(),b.setCursor(de(b,b.getCursor("start")))})},redo:function(b,S){Ue(b,je.commands.redo,S.repeat)()},setRegister:function(b,S,k){k.inputState.registerName=S.selectedCharacter},insertRegister:function(b,S,k){var P=S.selectedCharacter,F=qe.registerController.getRegister(P),j=F&&F.toString();j&&b.replaceSelection(j)},oneNormalCommand:function(b,S,k){ar(b,!0),k.insertModeReturn=!0,je.on(b,"vim-command-done",function P(){k.visualMode||(k.insertModeReturn&&(k.insertModeReturn=!1,k.insertMode||Kn.enterInsertMode(b,{},k)),je.off(b,"vim-command-done",P))})},setMark:function(b,S,k){var P=S.selectedCharacter;Cr(b,k,P,b.getCursor())},replace:function(b,S,k){var P=S.selectedCharacter,F=b.getCursor(),j,q,Y=b.listSelections();if(k.visualMode)F=b.getCursor("start"),q=b.getCursor("end");else{var X=b.getLine(F.line);j=F.ch+S.repeat,j>X.length&&(j=X.length),q=new ze(F.line,j)}var oe=w(b,F,q);if(F=oe.start,q=oe.end,P==`
1449
+ `)k.visualMode||b.replaceRange("",F,q),(je.commands.newlineAndIndentContinueComment||je.commands.newlineAndIndent)(b);else{var ue=b.getRange(F,q);if(ue=ue.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,P),ue=ue.replace(/[^\n]/g,P),k.visualBlock){var we=new Array(b.getOption("tabSize")+1).join(" ");ue=b.getSelection(),ue=ue.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,P),ue=ue.replace(/\t/g,we).replace(/[^\n]/g,P).split(`
1450
+ `),b.replaceSelections(ue)}else b.replaceRange(ue,F,q);k.visualMode?(F=at(Y[0].anchor,Y[0].head)?Y[0].anchor:Y[0].head,b.setCursor(F),mn(b,!1)):b.setCursor(fe(q,0,-1))}},incrementNumberToken:function(b,S){for(var k=b.getCursor(),P=b.getLine(k.line),F=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,j,q,Y,X;(j=F.exec(P))!==null&&(q=j.index,Y=q+j[0].length,!(k.ch<Y)););if(!(!S.backtrack&&Y<=k.ch)&&j){var oe=j[2]||j[4],ue=j[3]||j[5],we=S.increase?1:-1,Ae={"0b":2,0:8,"":10,"0x":16}[oe.toLowerCase()],be=parseInt(j[1]+ue,Ae)+we*S.repeat;X=be.toString(Ae);var Ce=oe?new Array(ue.length-X.length+1+j[1].length).join("0"):"";X.charAt(0)==="-"?X="-"+oe+Ce+X.substr(1):X=oe+Ce+X;var Pe=new ze(k.line,q),Ne=new ze(k.line,Y);b.replaceRange(X,Pe,Ne),b.setCursor(new ze(k.line,q+X.length-1))}},repeatLastEdit:function(b,S,k){var P=k.lastEditInputState;if(P){var F=S.repeat;F&&S.repeatIsExplicit?k.lastEditInputState.repeatOverride=F:F=k.lastEditInputState.repeatOverride||F,jo(b,k,F,!1)}},indent:function(b,S){b.indentLine(b.getCursor().line,S.indentRight)},exitInsertMode:ar},Ni={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},Di={bracket:{isComplete:function(b){if(b.nextCh===b.symb){if(b.depth++,b.depth>=1)return!0}else b.nextCh===b.reverseSymb&&b.depth--;return!1}},section:{init:function(b){b.curMoveThrough=!0,b.symb=(b.forward?"]":"[")===b.symb?"{":"}"},isComplete:function(b){return b.index===0&&b.nextCh===b.symb}},comment:{isComplete:function(b){var S=b.lastCh==="*"&&b.nextCh==="/";return b.lastCh=b.nextCh,S}},method:{init:function(b){b.symb=b.symb==="m"?"{":"}",b.reverseSymb=b.symb==="{"?"}":"{"},isComplete:function(b){return b.nextCh===b.symb}},preprocess:{init:function(b){b.index=0},isComplete:function(b){if(b.nextCh==="#"){var S=b.lineText.match(/^#(\w+)/)[1];if(S==="endif"){if(b.forward&&b.depth===0)return!0;b.depth++}else if(S==="if"){if(!b.forward&&b.depth===0)return!0;b.depth--}if(S==="else"&&b.depth===0)return!0}return!1}}};E("pcre",!0,"boolean"),Ur.prototype={getQuery:function(){return qe.query},setQuery:function(b){qe.query=b},getOverlay:function(){return this.searchOverlay},setOverlay:function(b){this.searchOverlay=b},isReversed:function(){return qe.isReversed},setReversed:function(b){qe.isReversed=b},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(b){this.annotate=b}};var Xi={"\\n":`
1451
+ `,"\\r":"\r","\\t":" "},Ws={"\\/":"/","\\\\":"\\","\\n":`
1452
+ `,"\\r":"\r","\\t":" ","\\&":"&"},an=0,Ta=function(){this.buildCommandMap_()};Ta.prototype={processCommand:function(b,S,k){var P=this;b.operation(function(){b.curOp.isVimOp=!0,P._processCommand(b,S,k)})},_processCommand:function(b,S,k){var P=b.state.vim,F=qe.registerController.getRegister(":"),j=F.toString(),q=new je.StringStream(S);F.setText(S);var Y=k||{};Y.input=S;try{this.parseInput_(b,q,Y)}catch(ue){throw Nt(b,ue.toString()),ue}P.visualMode&&mn(b);var X,oe;if(!Y.commandName)Y.line!==void 0&&(oe="move");else if(X=this.matchCommand_(Y.commandName),X){if(oe=X.name,X.excludeFromCommandHistory&&F.setText(j),this.parseCommandArgs_(q,Y,X),X.type=="exToKey"){M(b,X.toKeys,X);return}if(X.type=="exToEx"){this.processCommand(b,X.toInput);return}}if(!oe){Nt(b,'Not an editor command ":'+S+'"');return}try{vr[oe](b,Y),(!X||!X.possiblyAsync)&&Y.callback&&Y.callback()}catch(ue){throw Nt(b,ue.toString()),ue}},parseInput_:function(b,S,k){if(S.eatWhile(":"),S.eat("%")?(k.line=b.firstLine(),k.lineEnd=b.lastLine()):(k.line=this.parseLineSpec_(b,S),k.line!==void 0&&S.eat(",")&&(k.lineEnd=this.parseLineSpec_(b,S))),k.line==null)if(b.state.vim.visualMode){var P=ii(b,b.state.vim,"<");k.selectionLine=P&&P.line,P=ii(b,b.state.vim,">"),k.selectionLineEnd=P&&P.line}else k.selectionLine=b.getCursor().line;else k.selectionLine=k.line,k.selectionLineEnd=k.lineEnd;var F=S.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return F?k.commandName=F[1]:k.commandName=S.match(/.*/)[0],k},parseLineSpec_:function(b,S){var k=S.match(/^(\d+)/);if(k)return parseInt(k[1],10)-1;switch(S.next()){case".":return this.parseLineSpecOffset_(S,b.getCursor().line);case"$":return this.parseLineSpecOffset_(S,b.lastLine());case"'":var P=S.next(),F=ii(b,b.state.vim,P);if(!F)throw new Error("Mark not set");return this.parseLineSpecOffset_(S,F.line);case"-":case"+":return S.backUp(1),this.parseLineSpecOffset_(S,b.getCursor().line);default:return S.backUp(1),void 0}},parseLineSpecOffset_:function(b,S){var k=b.match(/^([+-])?(\d+)/);if(k){var P=parseInt(k[2],10);k[1]=="-"?S-=P:S+=P}return S},parseCommandArgs_:function(b,S,k){if(!b.eol()){S.argString=b.match(/.*/)[0];var P=k.argDelimiter||/\s+/,F=Xt(S.argString).split(P);F.length&&F[0]&&(S.args=F)}},matchCommand_:function(b){for(var S=b.length;S>0;S--){var k=b.substring(0,S);if(this.commandMap_[k]){var P=this.commandMap_[k];if(P.name.indexOf(b)===0)return P}}return null},buildCommandMap_:function(){this.commandMap_={};for(var b=0;b<mo.length;b++){var S=mo[b],k=S.shortName||S.name;this.commandMap_[k]=S}},map:function(b,S,k,P){if(b!=":"&&b.charAt(0)==":"){if(k)throw Error("Mode not supported for ex mappings");var F=b.substring(1);S!=":"&&S.charAt(0)==":"?this.commandMap_[F]={name:F,type:"exToEx",toInput:S.substring(1),user:!0}:this.commandMap_[F]={name:F,type:"exToKey",toKeys:S,user:!0}}else{var j={keys:b,type:"keyToKey",toKeys:S,noremap:!!P};k&&(j.context=k),Bn.unshift(j)}},unmap:function(b,S){if(b!=":"&&b.charAt(0)==":"){if(S)throw Error("Mode not supported for ex mappings");var k=b.substring(1);if(this.commandMap_[k]&&this.commandMap_[k].user)return delete this.commandMap_[k],!0}else for(var P=b,F=0;F<Bn.length;F++)if(P==Bn[F].keys&&Bn[F].context===S)return Bn.splice(F,1),!0}};var vr={colorscheme:function(b,S){if(!S.args||S.args.length<1){Nt(b,b.getOption("theme"));return}b.setOption("theme",S.args[0])},map:function(b,S,k,P){var F=S.args;if(!F||F.length<2){b&&Nt(b,"Invalid mapping: "+S.input);return}Kr.map(F[0],F[1],k,P)},imap:function(b,S){this.map(b,S,"insert")},nmap:function(b,S){this.map(b,S,"normal")},vmap:function(b,S){this.map(b,S,"visual")},omap:function(b,S){this.map(b,S,"operatorPending")},noremap:function(b,S){this.map(b,S,void 0,!0)},inoremap:function(b,S){this.map(b,S,"insert",!0)},nnoremap:function(b,S){this.map(b,S,"normal",!0)},vnoremap:function(b,S){this.map(b,S,"visual",!0)},onoremap:function(b,S){this.map(b,S,"operatorPending",!0)},unmap:function(b,S,k){var P=S.args;(!P||P.length<1||!Kr.unmap(P[0],k))&&b&&Nt(b,"No such mapping: "+S.input)},mapclear:function(b,S){_t.mapclear()},imapclear:function(b,S){_t.mapclear("insert")},nmapclear:function(b,S){_t.mapclear("normal")},vmapclear:function(b,S){_t.mapclear("visual")},omapclear:function(b,S){_t.mapclear("operatorPending")},move:function(b,S){Oi.processCommand(b,b.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:S.line+1})},set:function(b,S){var k=S.args,P=S.setCfg||{};if(!k||k.length<1){b&&Nt(b,"Invalid mapping: "+S.input);return}var F=k[0].split("="),j=F[0],q=F[1],Y=!1,X=!1;if(j.charAt(j.length-1)=="?"){if(q)throw Error("Trailing characters: "+S.argString);j=j.substring(0,j.length-1),Y=!0}else j.charAt(j.length-1)=="!"&&(j=j.substring(0,j.length-1),X=!0);q===void 0&&j.substring(0,2)=="no"&&(j=j.substring(2),q=!1);var oe=Vt[j]&&Vt[j].type=="boolean";if(oe&&(X?q=!_(j,b,P):q==null&&(q=!0)),!oe&&q===void 0||Y){var ue=_(j,b,P);ue instanceof Error?Nt(b,ue.message):ue===!0||ue===!1?Nt(b," "+(ue?"":"no")+j):Nt(b," "+j+"="+ue)}else{var we=$(j,q,b,P);we instanceof Error&&Nt(b,we.message)}},setlocal:function(b,S){S.setCfg={scope:"local"},this.set(b,S)},setglobal:function(b,S){S.setCfg={scope:"global"},this.set(b,S)},registers:function(b,S){var k=S.args,P=qe.registerController.registers,F=`----------Registers----------
1453
+
1454
+ `;if(k){var j;k=k.join("");for(var q=0;q<k.length;q++)if(j=k.charAt(q),!!qe.registerController.isValidRegister(j)){var Y=P[j]||new B;F+='"'+j+" "+Y.toString()+`
1455
+ `}}else for(var j in P){var X=P[j].toString();X.length&&(F+='"'+j+" "+X+`
1456
+ `)}Nt(b,F)},sort:function(b,S){function k(){if(S.argString){var It=new je.StringStream(S.argString);if(It.eat("!")&&(j=!0),It.eol())return;if(!It.eatSpace())return"Invalid arguments";var St=It.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!St&&!It.eol())return"Invalid arguments";if(St[1]){q=St[1].indexOf("i")!=-1,Y=St[1].indexOf("u")!=-1;var ur=St[1].indexOf("d")!=-1||St[1].indexOf("n")!=-1&&1,yr=St[1].indexOf("x")!=-1&&1,Nn=St[1].indexOf("o")!=-1&&1;if(ur+yr+Nn>1)return"Invalid arguments";X=ur&&"decimal"||yr&&"hex"||Nn&&"octal"}St[2]&&(oe=new RegExp(St[2].substr(1,St[2].length-2),q?"i":""))}}function P(It,St){if(j){var ur;ur=It,It=St,St=ur}q&&(It=It.toLowerCase(),St=St.toLowerCase());var yr=X&&Ne.exec(It),Nn=X&&Ne.exec(St);return yr?(yr=parseInt((yr[1]+yr[2]).toLowerCase(),Ze),Nn=parseInt((Nn[1]+Nn[2]).toLowerCase(),Ze),yr-Nn):It<St?-1:1}function F(It,St){if(j){var ur;ur=It,It=St,St=ur}return q&&(It[0]=It[0].toLowerCase(),St[0]=St[0].toLowerCase()),It[0]<St[0]?-1:1}var j,q,Y,X,oe,ue=k();if(ue){Nt(b,ue+": "+S.argString);return}var we=S.line||b.firstLine(),Ae=S.lineEnd||S.line||b.lastLine();if(we!=Ae){var be=new ze(we,0),Ce=new ze(Ae,st(b,Ae)),Pe=b.getRange(be,Ce).split(`
1457
+ `),Ne=oe||(X=="decimal"?/(-?)([\d]+)/:X=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:X=="octal"?/([0-7]+)/:null),Ze=X=="decimal"?10:X=="hex"?16:X=="octal"?8:null,ft=[],rt=[];if(X||oe)for(var ot=0;ot<Pe.length;ot++){var Rn=oe?Pe[ot].match(oe):null;Rn&&Rn[0]!=""?ft.push(Rn):!oe&&Ne.exec(Pe[ot])?ft.push(Pe[ot]):rt.push(Pe[ot])}else rt=Pe;if(ft.sort(oe?F:P),oe)for(var ot=0;ot<ft.length;ot++)ft[ot]=ft[ot].input;else X||rt.sort(P);if(Pe=j?ft.concat(rt):rt.concat(ft),Y){var kt=Pe,Zt;Pe=[];for(var ot=0;ot<kt.length;ot++)kt[ot]!=Zt&&Pe.push(kt[ot]),Zt=kt[ot]}b.replaceRange(Pe.join(`
1458
+ `),be,Ce)}},vglobal:function(b,S){this.global(b,S)},normal:function(b,S){var k=S.argString;if(k&&k[0]=="!"&&(k=k.slice(1),Zi=!0),k=k.trimStart(),!k){Nt(b,"Argument is required.");return}var P=S.line;if(typeof P=="number")for(var F=isNaN(S.lineEnd)?P:S.lineEnd,j=P;j<=F;j++)b.setCursor(j,0),M(b,S.argString.trimStart()),b.state.vim.insertMode&&ar(b,!0);else M(b,S.argString.trimStart()),b.state.vim.insertMode&&ar(b,!0)},global:function(b,S){var k=S.argString;if(!k){Nt(b,"Regular Expression missing from global");return}var P=S.commandName[0]==="v";k[0]==="!"&&S.commandName[0]==="g"&&(P=!0,k=k.slice(1));var F=S.line!==void 0?S.line:b.firstLine(),j=S.lineEnd||S.line||b.lastLine(),q=Qn(k),Y=k,X;if(q.length&&(Y=q[0],X=q.slice(1,q.length).join("/")),Y)try{vn(b,Y,!0,!0)}catch{Nt(b,"Invalid regex: "+Y);return}for(var oe=Tn(b).getQuery(),ue=[],we=F;we<=j;we++){var Ae=b.getLine(we),be=oe.test(Ae);be!==P&&ue.push(X?b.getLineHandle(we):Ae)}if(!X){Nt(b,ue.join(`
1459
+ `));return}var Ce=0,Pe=function(){if(Ce<ue.length){var Ne=ue[Ce++],Ze=b.getLineNumber(Ne);if(Ze==null){Pe();return}var ft=Ze+1+X;Kr.processCommand(b,ft,{callback:Pe})}else b.releaseLineHandles&&b.releaseLineHandles()};Pe()},substitute:function(b,S){if(!b.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var k=S.argString,P=k?Ei(k,k[0]):[],F,j="",q,Y,X,oe=!1,ue=!1;if(P.length)F=P[0],_("pcre")&&F!==""&&(F=new RegExp(F).source),j=P[1],j!==void 0&&(_("pcre")?j=fn(j.replace(/([^\\])&/g,"$1$$&")):j=zs(j),qe.lastSubstituteReplacePart=j),q=P[2]?P[2].split(" "):[];else if(k&&k.length){Nt(b,"Substitutions should be of the form :s/pattern/replace/");return}if(q&&(Y=q[0],X=parseInt(q[1]),Y&&(Y.indexOf("c")!=-1&&(oe=!0),Y.indexOf("g")!=-1&&(ue=!0),_("pcre")?F=F+"/"+Y:F=F.replace(/\//g,"\\/")+"/"+Y)),F)try{vn(b,F,!0,!0)}catch{Nt(b,"Invalid regex: "+F);return}if(j=j||qe.lastSubstituteReplacePart,j===void 0){Nt(b,"No previous substitute regular expression");return}var we=Tn(b),Ae=we.getQuery(),be=S.line!==void 0?S.line:b.getCursor().line,Ce=S.lineEnd||be;be==b.firstLine()&&Ce==b.lastLine()&&(Ce=1/0),X&&(be=Ce,Ce=be+X-1);var Pe=de(b,new ze(be,0)),Ne=b.getSearchCursor(Ae,Pe);fo(b,oe,ue,be,Ce,Ne,Ae,j,S.callback)},startinsert:function(b,S){M(b,S.argString=="!"?"A":"i",{})},redo:je.commands.redo,undo:je.commands.undo,write:function(b){je.commands.save?je.commands.save(b):b.save&&b.save()},nohlsearch:function(b){gi(b)},yank:function(b){var S=He(b.getCursor()),k=S.line,P=b.getLine(k);qe.registerController.pushText("0","yank",P,!0,!0)},delete:function(b,S){var k=S.selectionLine,P=isNaN(S.selectionLineEnd)?k:S.selectionLineEnd;us.delete(b,{linewise:!0},[{anchor:new ze(k,0),head:new ze(P+1,0)}])},join:function(b,S){var k=S.selectionLine,P=isNaN(S.selectionLineEnd)?k:S.selectionLineEnd;b.setCursor(new ze(k,0)),Kn.joinLines(b,{repeat:P-k},b.state.vim)},delmarks:function(b,S){if(!S.argString||!Xt(S.argString)){Nt(b,"Argument required");return}for(var k=b.state.vim,P=new je.StringStream(Xt(S.argString));!P.eol();){P.eatSpace();var F=P.pos;if(!P.match(/[a-zA-Z]/,!1)){Nt(b,"Invalid argument: "+S.argString.substring(F));return}var j=P.next();if(P.match("-",!0)){if(!P.match(/[a-zA-Z]/,!1)){Nt(b,"Invalid argument: "+S.argString.substring(F));return}var q=j,Y=P.next();if(!(c(q)&&c(Y)||l(q)&&l(Y))){Nt(b,"Invalid argument: "+q+"-");return}var X=q.charCodeAt(0),oe=Y.charCodeAt(0);if(X>=oe){Nt(b,"Invalid argument: "+S.argString.substring(F));return}for(var ue=0;ue<=oe-X;ue++){var we=String.fromCharCode(X+ue);delete k.marks[we]}}else delete k.marks[j]}}},Kr=new Ta;E("insertModeEscKeysTimeout",200,"number"),je.Vim=_t;var Oo={return:"CR",backspace:"BS",delete:"Del",esc:"Esc",left:"Left",right:"Right",up:"Up",down:"Down",space:"Space",insert:"Ins",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",enter:"CR"},Lr=_t.handleKey.bind(_t);_t.handleKey=function(b,S,k){return b.operation(function(){return Lr(b,S,k)},!0)},D(),r.CodeMirror=je;var yi=_t.maybeInitVimState_;r.handler={$id:"ace/keyboard/vim",drawCursor:function(b,S,k,P,F){var j=this.state.vim||{},q=k.characterWidth,Y=k.lineHeight,X=S.top,oe=S.left;if(!j.insertMode){var ue=P.cursor?Le.comparePoints(P.cursor,P.start)<=0:F.selection.isBackwards()||F.selection.isEmpty();!ue&&oe>q&&(oe-=q)}!j.insertMode&&j.status&&(Y/=2,X+=Y),vt.translate(b,oe,X),vt.setStyle(b.style,"width",q+"px"),vt.setStyle(b.style,"height",Y+"px")},$getDirectionForHighlight:function(b){var S=b.state.cm,k=yi(S);if(!k.insertMode)return b.session.selection.isBackwards()||b.session.selection.isEmpty()},handleKeyboard:function(b,S,k,P,F){var j=b.editor,q=j.state.cm,Y=yi(q);if(P!=-1){if(Y.insertMode||(S==-1?(k.charCodeAt(0)>255&&b.inputKey&&(k=b.inputKey,k&&b.inputHash==4&&(k=k.toUpperCase())),b.inputChar=k):S==4||S==0?b.inputKey==k&&b.inputHash==S&&b.inputChar?(k=b.inputChar,S=-1):(b.inputChar=null,b.inputKey=k,b.inputHash=S):b.inputChar=b.inputKey=null),q.state.overwrite&&Y.insertMode&&k=="backspace"&&S==0)return{command:"gotoleft"};if(k=="c"&&S==1&&!Ln.isMac&&j.getCopyText())return j.once("copy",function(){Y.insertMode?j.selection.clearSelection():q.operation(function(){mn(q)})}),{command:"null",passEvent:!0};if(k=="esc"&&!Y.insertMode&&!Y.visualMode&&!q.ace.inMultiSelectMode){var X=Tn(q),oe=X.getOverlay();oe&&q.removeOverlay(oe)}if(S==-1||S&1||S===0&&k.length>1){var ue=Y.insertMode,we=go(S,k,F||{},Y);Y.status==null&&(Y.status="");var Ae=ne(q,we,"user");return Y=yi(q),Ae&&Y.status!=null?Y.status+=we:Y.status==null&&(Y.status=""),q._signal("changeStatus"),!Ae&&(S!=-1||ue)?void 0:{command:"null",passEvent:!Ae}}}},attach:function(b){function S(){var P=yi(k).insertMode;k.ace.renderer.setStyle("normal-mode",!P),b.textInput.setCommandMode(!P),b.renderer.$keepTextAreaAtCursor=P,b.renderer.$blockCursor=!P}b.state||(b.state={});var k=new je(b);b.state.cm=k,b.$vimModeHandler=this,u(k),yi(k).status=null,k.on("vim-command-done",function(){k.virtualSelectionMode()||(yi(k).status=null,k.ace._signal("changeStatus"),k.ace.session.markUndoGroup())}),k.on("changeStatus",function(){k.ace.renderer.updateCursor(),k.ace._signal("changeStatus")}),k.on("vim-mode-change",function(){k.virtualSelectionMode()||(S(),k._signal("changeStatus"))}),S(),b.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(k)},detach:function(b){var S=b.state.cm;f(S),S.destroy(),b.state.cm=null,b.$vimModeHandler=null,b.renderer.$cursorLayer.drawCursor=null,b.renderer.setStyle("normal-mode",!1),b.textInput.setCommandMode(!1),b.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(b){var S=b.state.cm,k=yi(S);if(k.insertMode)return"INSERT";var P="";return k.visualMode&&(P+="VISUAL",k.visualLine&&(P+=" LINE"),k.visualBlock&&(P+=" BLOCK")),k.status&&(P+=(P?" ":"")+k.status),P}},_t.defineOption({name:"wrap",set:function(b,S){S&&S.ace.setOption("wrap",b)},type:"boolean"},!1),_t.defineEx("write","w",function(){console.log(":write is not implemented")}),Bn.push({keys:"zc",type:"action",action:"fold",actionArgs:{open:!1}},{keys:"zC",type:"action",action:"fold",actionArgs:{open:!1,all:!0}},{keys:"zo",type:"action",action:"fold",actionArgs:{open:!0}},{keys:"zO",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"za",type:"action",action:"fold",actionArgs:{toggle:!0}},{keys:"zA",type:"action",action:"fold",actionArgs:{toggle:!0,all:!0}},{keys:"zf",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"zd",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"<C-A-k>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAbove"}},{keys:"<C-A-j>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelow"}},{keys:"<C-A-S-k>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAboveSkipCurrent"}},{keys:"<C-A-S-j>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelowSkipCurrent"}},{keys:"<C-A-h>",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreBefore"}},{keys:"<C-A-l>",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreAfter"}},{keys:"<C-A-S-h>",type:"action",action:"aceCommand",actionArgs:{name:"selectNextBefore"}},{keys:"<C-A-S-l>",type:"action",action:"aceCommand",actionArgs:{name:"selectNextAfter"}}),Bn.push({keys:"gq",type:"operator",operator:"hardWrap"}),_t.defineOperator("hardWrap",function(b,S,k,P,F){var j=k[0].anchor.line,q=k[0].head.line;return S.linewise&&q--,Io(b.ace,{startRow:j,endRow:q}),ze(q,0)}),E("textwidth",void 0,"number",["tw"],function(b,S){if(S!==void 0){if(b===void 0){var k=S.ace.getOption("printMarginColumn");return k}var P=Math.round(b);P>1&&S.ace.setOption("printMarginColumn",P)}}),Kn.aceCommand=function(b,S,k){b.vimCmd=S,b.ace.inVirtualSelectionMode?b.ace.on("beforeEndOperation",Se):Se(null,b.ace)},Kn.fold=function(b,S,k){b.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(S.all?2:0)+(S.open?1:0)])},Uo=Bn.length,r.handler.defaultKeymap=Bn,r.handler.actions=Kn,r.Vim=_t}),(function(){ace.require(["ace/keyboard/vim"],function(e){t&&(t.exports=e)})})()})(Lg)),Lg.exports}nA();var Ng={},Dg;function rA(){return Dg||(Dg=1,(function(t){(function(){var n={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 e(w){return m(g(w),arguments)}function r(w,u){return e.apply(null,[w].concat(u||[]))}function m(w,u){var f=1,a=w.length,s,c="",h,o,l,p,y,x,E,$;for(h=0;h<a;h++)if(typeof w[h]=="string")c+=w[h];else if(typeof w[h]=="object"){if(l=w[h],l.keys)for(s=u[f],o=0;o<l.keys.length;o++){if(s==null)throw new Error(e('[sprintf] Cannot access property "%s" of undefined value "%s"',l.keys[o],l.keys[o-1]));s=s[l.keys[o]]}else l.param_no?s=u[l.param_no]:s=u[f++];if(n.not_type.test(l.type)&&n.not_primitive.test(l.type)&&s instanceof Function&&(s=s()),n.numeric_arg.test(l.type)&&typeof s!="number"&&isNaN(s))throw new TypeError(e("[sprintf] expecting number but found %T",s));switch(n.number.test(l.type)&&(E=s>=0),l.type){case"b":s=parseInt(s,10).toString(2);break;case"c":s=String.fromCharCode(parseInt(s,10));break;case"d":case"i":s=parseInt(s,10);break;case"j":s=JSON.stringify(s,null,l.width?parseInt(l.width):0);break;case"e":s=l.precision?parseFloat(s).toExponential(l.precision):parseFloat(s).toExponential();break;case"f":s=l.precision?parseFloat(s).toFixed(l.precision):parseFloat(s);break;case"g":s=l.precision?String(Number(s.toPrecision(l.precision))):parseFloat(s);break;case"o":s=(parseInt(s,10)>>>0).toString(8);break;case"s":s=String(s),s=l.precision?s.substring(0,l.precision):s;break;case"t":s=String(!!s),s=l.precision?s.substring(0,l.precision):s;break;case"T":s=Object.prototype.toString.call(s).slice(8,-1).toLowerCase(),s=l.precision?s.substring(0,l.precision):s;break;case"u":s=parseInt(s,10)>>>0;break;case"v":s=s.valueOf(),s=l.precision?s.substring(0,l.precision):s;break;case"x":s=(parseInt(s,10)>>>0).toString(16);break;case"X":s=(parseInt(s,10)>>>0).toString(16).toUpperCase();break}n.json.test(l.type)?c+=s:(n.number.test(l.type)&&(!E||l.sign)?($=E?"+":"-",s=s.toString().replace(n.sign,"")):$="",y=l.pad_char?l.pad_char==="0"?"0":l.pad_char.charAt(1):" ",x=l.width-($+s).length,p=l.width&&x>0?y.repeat(x):"",c+=l.align?$+s+p:y==="0"?$+p+s:p+$+s)}return c}var d=Object.create(null);function g(w){if(d[w])return d[w];for(var u=w,f,a=[],s=0;u;){if((f=n.text.exec(u))!==null)a.push(f[0]);else if((f=n.modulo.exec(u))!==null)a.push("%");else if((f=n.placeholder.exec(u))!==null){if(f[2]){s|=1;var c=[],h=f[2],o=[];if((o=n.key.exec(h))!==null)for(c.push(o[1]);(h=h.substring(o[0].length))!=="";)if((o=n.key_access.exec(h))!==null)c.push(o[1]);else if((o=n.index_access.exec(h))!==null)c.push(o[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");f[2]=c}else s|=2;if(s===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");a.push({placeholder:f[0],param_no:f[1],keys:f[2],sign:f[3],pad_char:f[4],align:f[5],width:f[6],precision:f[7],type:f[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");u=u.substring(f[0].length)}return d[w]=a}t.sprintf=e,t.vsprintf=r,typeof window<"u"&&(window.sprintf=e,window.vsprintf=r)})()})(Ng)),Ng}rA();var Ql={exports:{}},iA=Ql.exports,Pg;function oA(){return Pg||(Pg=1,(function(t,n){(function(){var e,r="4.18.1",m=200,d="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",g="Expected a function",w="Invalid `variable` option passed into `_.template`",u="Invalid `imports` option passed into `_.template`",f="__lodash_hash_undefined__",a=500,s="__lodash_placeholder__",c=1,h=2,o=4,l=1,p=2,y=1,x=2,E=4,$=8,_=16,C=32,L=64,D=128,I=256,M=512,W=30,z="...",O=800,T=16,A=1,N=2,B=3,U=1/0,G=9007199254740991,J=17976931348623157e292,Q=NaN,le=4294967295,re=le-1,ce=le>>>1,de=[["ary",D],["bind",y],["bindKey",x],["curry",$],["curryRight",_],["flip",M],["partial",C],["partialRight",L],["rearg",I]],ie="[object Arguments]",fe="[object Array]",$e="[object AsyncFunction]",Re="[object Boolean]",Ee="[object Date]",Ue="[object DOMException]",He="[object Error]",Ge="[object Function]",at="[object GeneratorFunction]",We="[object Map]",Me="[object Number]",Tt="[object Null]",st="[object Object]",Xt="[object Promise]",dn="[object Proxy]",Zn="[object RegExp]",zt="[object Set]",kn="[object String]",mt="[object Symbol]",Ye="[object Undefined]",Ot="[object WeakMap]",Sn="[object WeakSet]",zn="[object ArrayBuffer]",Un="[object DataView]",Fn="[object Float32Array]",mn="[object Float64Array]",En="[object Int8Array]",Xn="[object Int16Array]",tn="[object Int32Array]",Vn="[object Uint8Array]",$i="[object Uint8ClampedArray]",ti="[object Uint16Array]",sr="[object Uint32Array]",qn=/\b__p \+= '';/g,Ti=/\b(__p \+=) '' \+/g,gr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Hi=/&(?:amp|lt|gt|quot|#39);/g,Ri=/[&<>"']/g,ls=RegExp(Hi.source),Cr=RegExp(Ri.source),$o=/<%-([\s\S]+?)%>/g,Er=/<%([\s\S]+?)%>/g,di=/<%=([\s\S]+?)%>/g,ni=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$n=/^\w*$/,Hr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ur=/[\\^$.*+?()[\]{}|]/g,Tn=RegExp(Ur.source),Qn=/^\s+/,fi=/\s/,Ei=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Mi=/\{\n\/\* \[wrapped with (.+)\] \*/,cs=/,? & /,zs=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fn=/[()=,{}\[\]\/\s]/,_r=/\\(\\)?/g,pi=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Nt=/\w*$/,To=/^[-+]0x[0-9a-f]+$/i,mr=/^0b[01]+$/i,Mn=/^\[object .+?Constructor\]$/,vn=/^0o[0-7]+$/i,In=/^(?:0|[1-9]\d*)$/,ho=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,er=/($^)/,Mr=/['\n\r\u2028\u2029\\]/g,gi="\\ud800-\\udfff",ri="\\u0300-\\u036f",Ui="\\ufe20-\\ufe2f",ii="\\u20d0-\\u20ff",Vi=ri+Ui+ii,fo="\\u2700-\\u27bf",ar="a-z\\xdf-\\xf6\\xf8-\\xff",qi="\\xac\\xb1\\xd7\\xf7",Gi="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",mi="\\u2000-\\u206f",Ii=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",pn="A-Z\\xc0-\\xd6\\xd8-\\xde",Wo="\\ufe0e\\ufe0f",Ro=qi+Gi+mi+Ii,Li="['’]",Eo="["+gi+"]",Mo="["+Ro+"]",Ki="["+Vi+"]",jo="\\d+",Ho="["+fo+"]",po="["+ar+"]",go="[^"+gi+Ro+jo+fo+ar+pn+"]",vi="\\ud83c[\\udffb-\\udfff]",ne="(?:"+Ki+"|"+vi+")",Se="[^"+gi+"]",Le="(?:\\ud83c[\\udde6-\\uddff]){2}",et="[\\ud800-\\udbff][\\udc00-\\udfff]",vt="["+pn+"]",Gt="\\u200d",Jt="(?:"+po+"|"+go+")",Vr="(?:"+vt+"|"+go+")",lr="(?:"+Li+"(?:d|ll|m|re|s|t|ve))?",Ln="(?:"+Li+"(?:D|LL|M|RE|S|T|VE))?",Ir=ne+"?",xn="["+Wo+"]?",Sa="(?:"+Gt+"(?:"+[Se,Le,et].join("|")+")"+xn+Ir+")*",Io="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",je="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Fs=xn+Ir+Sa,ze="(?:"+[Ho,Le,et].join("|")+")"+Fs,Bn="(?:"+[Se+Ki+"?",Ki,Le,et,Eo].join("|")+")",Uo=RegExp(Li,"g"),mo=RegExp(Ki,"g"),Wn=RegExp(vi+"(?="+vi+")|"+Bn+Fs,"g"),$a=RegExp([vt+"?"+po+"+"+lr+"(?="+[Mo,vt,"$"].join("|")+")",Vr+"+"+Ln+"(?="+[Mo,vt+Jt,"$"].join("|")+")",vt+"?"+Jt+"+"+lr,vt+"+"+Ln,je,Io,jo,ze].join("|"),"g"),Vo=RegExp("["+Gt+gi+Vi+Wo+"]"),Yi=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Lo=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Bs=-1,on={};on[Fn]=on[mn]=on[En]=on[Xn]=on[tn]=on[Vn]=on[$i]=on[ti]=on[sr]=!0,on[ie]=on[fe]=on[zn]=on[Re]=on[Un]=on[Ee]=on[He]=on[Ge]=on[We]=on[Me]=on[st]=on[Zn]=on[zt]=on[kn]=on[Ot]=!1;var dt={};dt[ie]=dt[fe]=dt[zn]=dt[Un]=dt[Re]=dt[Ee]=dt[Fn]=dt[mn]=dt[En]=dt[Xn]=dt[tn]=dt[We]=dt[Me]=dt[st]=dt[Zn]=dt[zt]=dt[kn]=dt[mt]=dt[Vn]=dt[$i]=dt[ti]=dt[sr]=!0,dt[He]=dt[Ge]=dt[Ot]=!1;var Vt={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Ji={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Gn={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},qe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Cn=parseFloat,_t=parseInt,qr=typeof rs=="object"&&rs&&rs.Object===Object&&rs,Zi=typeof self=="object"&&self&&self.Object===Object&&self,Ft=qr||Zi||Function("return this")(),Gr=n&&!n.nodeType&&n,cr=Gr&&!0&&t&&!t.nodeType&&t,vo=cr&&cr.exports===Gr,Oi=vo&&qr.process,On=(function(){try{var me=cr&&cr.require&&cr.require("util").types;return me||Oi&&Oi.binding&&Oi.binding("util")}catch{}})(),us=On&&On.isArrayBuffer,Kn=On&&On.isDate,Ni=On&&On.isMap,Di=On&&On.isRegExp,Xi=On&&On.isSet,Ws=On&&On.isTypedArray;function an(me,Te,ke){switch(ke.length){case 0:return me.call(Te);case 1:return me.call(Te,ke[0]);case 2:return me.call(Te,ke[0],ke[1]);case 3:return me.call(Te,ke[0],ke[1],ke[2])}return me.apply(Te,ke)}function Ta(me,Te,ke,Je){for(var pt=-1,$t=me==null?0:me.length;++pt<$t;){var nn=me[pt];Te(Je,nn,ke(nn),me)}return Je}function vr(me,Te){for(var ke=-1,Je=me==null?0:me.length;++ke<Je&&Te(me[ke],ke,me)!==!1;);return me}function Kr(me,Te){for(var ke=me==null?0:me.length;ke--&&Te(me[ke],ke,me)!==!1;);return me}function Oo(me,Te){for(var ke=-1,Je=me==null?0:me.length;++ke<Je;)if(!Te(me[ke],ke,me))return!1;return!0}function Lr(me,Te){for(var ke=-1,Je=me==null?0:me.length,pt=0,$t=[];++ke<Je;){var nn=me[ke];Te(nn,ke,me)&&($t[pt++]=nn)}return $t}function yi(me,Te){var ke=me==null?0:me.length;return!!ke&&we(me,Te,0)>-1}function b(me,Te,ke){for(var Je=-1,pt=me==null?0:me.length;++Je<pt;)if(ke(Te,me[Je]))return!0;return!1}function S(me,Te){for(var ke=-1,Je=me==null?0:me.length,pt=Array(Je);++ke<Je;)pt[ke]=Te(me[ke],ke,me);return pt}function k(me,Te){for(var ke=-1,Je=Te.length,pt=me.length;++ke<Je;)me[pt+ke]=Te[ke];return me}function P(me,Te,ke,Je){var pt=-1,$t=me==null?0:me.length;for(Je&&$t&&(ke=me[++pt]);++pt<$t;)ke=Te(ke,me[pt],pt,me);return ke}function F(me,Te,ke,Je){var pt=me==null?0:me.length;for(Je&&pt&&(ke=me[--pt]);pt--;)ke=Te(ke,me[pt],pt,me);return ke}function j(me,Te){for(var ke=-1,Je=me==null?0:me.length;++ke<Je;)if(Te(me[ke],ke,me))return!0;return!1}var q=Pe("length");function Y(me){return me.split("")}function X(me){return me.match(zs)||[]}function oe(me,Te,ke){var Je;return ke(me,function(pt,$t,nn){if(Te(pt,$t,nn))return Je=$t,!1}),Je}function ue(me,Te,ke,Je){for(var pt=me.length,$t=ke+(Je?1:-1);Je?$t--:++$t<pt;)if(Te(me[$t],$t,me))return $t;return-1}function we(me,Te,ke){return Te===Te?At(me,Te,ke):ue(me,be,ke)}function Ae(me,Te,ke,Je){for(var pt=ke-1,$t=me.length;++pt<$t;)if(Je(me[pt],Te))return pt;return-1}function be(me){return me!==me}function Ce(me,Te){var ke=me==null?0:me.length;return ke?rt(me,Te)/ke:Q}function Pe(me){return function(Te){return Te==null?e:Te[me]}}function Ne(me){return function(Te){return me==null?e:me[Te]}}function Ze(me,Te,ke,Je,pt){return pt(me,function($t,nn,Wt){ke=Je?(Je=!1,$t):Te(ke,$t,nn,Wt)}),ke}function ft(me,Te){var ke=me.length;for(me.sort(Te);ke--;)me[ke]=me[ke].value;return me}function rt(me,Te){for(var ke,Je=-1,pt=me.length;++Je<pt;){var $t=Te(me[Je]);$t!==e&&(ke=ke===e?$t:ke+$t)}return ke}function ot(me,Te){for(var ke=-1,Je=Array(me);++ke<me;)Je[ke]=Te(ke);return Je}function Rn(me,Te){return S(Te,function(ke){return[ke,me[ke]]})}function kt(me){return me&&me.slice(0,yt(me)+1).replace(Qn,"")}function Zt(me){return function(Te){return me(Te)}}function It(me,Te){return S(Te,function(ke){return me[ke]})}function St(me,Te){return me.has(Te)}function ur(me,Te){for(var ke=-1,Je=me.length;++ke<Je&&we(Te,me[ke],0)>-1;);return ke}function yr(me,Te){for(var ke=me.length;ke--&&we(Te,me[ke],0)>-1;);return ke}function Nn(me,Te){for(var ke=me.length,Je=0;ke--;)me[ke]===Te&&++Je;return Je}var V=Ne(Vt),Z=Ne(Ji);function se(me){return"\\"+qe[me]}function ae(me,Te){return me==null?e:me[Te]}function ge(me){return Vo.test(me)}function _e(me){return Yi.test(me)}function Ie(me){for(var Te,ke=[];!(Te=me.next()).done;)ke.push(Te.value);return ke}function Be(me){var Te=-1,ke=Array(me.size);return me.forEach(function(Je,pt){ke[++Te]=[pt,Je]}),ke}function Ve(me,Te){return function(ke){return me(Te(ke))}}function Ke(me,Te){for(var ke=-1,Je=me.length,pt=0,$t=[];++ke<Je;){var nn=me[ke];(nn===Te||nn===s)&&(me[ke]=s,$t[pt++]=ke)}return $t}function tt(me){var Te=-1,ke=Array(me.size);return me.forEach(function(Je){ke[++Te]=Je}),ke}function it(me){var Te=-1,ke=Array(me.size);return me.forEach(function(Je){ke[++Te]=[Je,Je]}),ke}function At(me,Te,ke){for(var Je=ke-1,pt=me.length;++Je<pt;)if(me[Je]===Te)return Je;return-1}function Qt(me,Te,ke){for(var Je=ke+1;Je--;)if(me[Je]===Te)return Je;return Je}function Bt(me){return ge(me)?wn(me):q(me)}function Ct(me){return ge(me)?Dn(me):Y(me)}function yt(me){for(var Te=me.length;Te--&&fi.test(me.charAt(Te)););return Te}var ht=Ne(Gn);function wn(me){for(var Te=Wn.lastIndex=0;Wn.test(me);)++Te;return Te}function Dn(me){return me.match(Wn)||[]}function hr(me){return me.match($a)||[]}var ln=(function me(Te){Te=Te==null?Ft:gn.defaults(Ft.Object(),Te,gn.pick(Ft,Lo));var ke=Te.Array,Je=Te.Date,pt=Te.Error,$t=Te.Function,nn=Te.Math,Wt=Te.Object,bi=Te.RegExp,Or=Te.String,_n=Te.TypeError,Qi=ke.prototype,Nr=$t.prototype,qo=Wt.prototype,Oc=Te["__core-js_shared__"],Nc=Nr.toString,cn=qo.hasOwnProperty,hM=0,kb=(function(){var i=/[^.]+$/.exec(Oc&&Oc.keys&&Oc.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})(),Dc=qo.toString,dM=Nc.call(Wt),fM=Ft._,pM=bi("^"+Nc.call(cn).replace(Ur,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Pc=vo?Te.Buffer:e,hs=Te.Symbol,zc=Te.Uint8Array,Sb=Pc?Pc.allocUnsafe:e,Fc=Ve(Wt.getPrototypeOf,Wt),$b=Wt.create,Tb=qo.propertyIsEnumerable,Bc=Qi.splice,Rb=hs?hs.isConcatSpreadable:e,yl=hs?hs.iterator:e,js=hs?hs.toStringTag:e,Wc=(function(){try{var i=Gs(Wt,"defineProperty");return i({},"",{}),i}catch{}})(),gM=Te.clearTimeout!==Ft.clearTimeout&&Te.clearTimeout,mM=Je&&Je.now!==Ft.Date.now&&Je.now,vM=Te.setTimeout!==Ft.setTimeout&&Te.setTimeout,jc=nn.ceil,Hc=nn.floor,Od=Wt.getOwnPropertySymbols,yM=Pc?Pc.isBuffer:e,Eb=Te.isFinite,bM=Qi.join,wM=Ve(Wt.keys,Wt),br=nn.max,Yr=nn.min,xM=Je.now,CM=Te.parseInt,Mb=nn.random,_M=Qi.reverse,Nd=Gs(Te,"DataView"),bl=Gs(Te,"Map"),Dd=Gs(Te,"Promise"),Ra=Gs(Te,"Set"),wl=Gs(Te,"WeakMap"),xl=Gs(Wt,"create"),Uc=wl&&new wl,Ea={},AM=Ks(Nd),kM=Ks(bl),SM=Ks(Dd),$M=Ks(Ra),TM=Ks(wl),Vc=hs?hs.prototype:e,Cl=Vc?Vc.valueOf:e,Ib=Vc?Vc.toString:e;function ee(i){if(Yn(i)&&!Et(i)&&!(i instanceof qt)){if(i instanceof eo)return i;if(cn.call(i,"__wrapped__"))return L0(i)}return new eo(i)}var Ma=(function(){function i(){}return function(v){if(!jn(v))return{};if($b)return $b(v);i.prototype=v;var R=new i;return i.prototype=e,R}})();function qc(){}function eo(i,v){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!v,this.__index__=0,this.__values__=e}ee.templateSettings={escape:$o,evaluate:Er,interpolate:di,variable:"",imports:{_:ee}},ee.prototype=qc.prototype,ee.prototype.constructor=ee,eo.prototype=Ma(qc.prototype),eo.prototype.constructor=eo;function qt(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=le,this.__views__=[]}function RM(){var i=new qt(this.__wrapped__);return i.__actions__=wi(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=wi(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=wi(this.__views__),i}function EM(){if(this.__filtered__){var i=new qt(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function MM(){var i=this.__wrapped__.value(),v=this.__dir__,R=Et(i),H=v<0,K=R?i.length:0,te=HI(0,K,this.__views__),he=te.start,pe=te.end,xe=pe-he,Oe=H?pe:he-1,De=this.__iteratees__,Fe=De.length,nt=0,ut=Yr(xe,this.__takeCount__);if(!R||!H&&K==xe&&ut==xe)return n0(i,this.__actions__);var xt=[];e:for(;xe--&&nt<ut;){Oe+=v;for(var Dt=-1,bt=i[Oe];++Dt<Fe;){var Ht=De[Dt],Kt=Ht.iteratee,Fi=Ht.type,ai=Kt(bt);if(Fi==N)bt=ai;else if(!ai){if(Fi==A)continue e;break e}}xt[nt++]=bt}return xt}qt.prototype=Ma(qc.prototype),qt.prototype.constructor=qt;function Hs(i){var v=-1,R=i==null?0:i.length;for(this.clear();++v<R;){var H=i[v];this.set(H[0],H[1])}}function IM(){this.__data__=xl?xl(null):{},this.size=0}function LM(i){var v=this.has(i)&&delete this.__data__[i];return this.size-=v?1:0,v}function OM(i){var v=this.__data__;if(xl){var R=v[i];return R===f?e:R}return cn.call(v,i)?v[i]:e}function NM(i){var v=this.__data__;return xl?v[i]!==e:cn.call(v,i)}function DM(i,v){var R=this.__data__;return this.size+=this.has(i)?0:1,R[i]=xl&&v===e?f:v,this}Hs.prototype.clear=IM,Hs.prototype.delete=LM,Hs.prototype.get=OM,Hs.prototype.has=NM,Hs.prototype.set=DM;function Go(i){var v=-1,R=i==null?0:i.length;for(this.clear();++v<R;){var H=i[v];this.set(H[0],H[1])}}function PM(){this.__data__=[],this.size=0}function zM(i){var v=this.__data__,R=Gc(v,i);if(R<0)return!1;var H=v.length-1;return R==H?v.pop():Bc.call(v,R,1),--this.size,!0}function FM(i){var v=this.__data__,R=Gc(v,i);return R<0?e:v[R][1]}function BM(i){return Gc(this.__data__,i)>-1}function WM(i,v){var R=this.__data__,H=Gc(R,i);return H<0?(++this.size,R.push([i,v])):R[H][1]=v,this}Go.prototype.clear=PM,Go.prototype.delete=zM,Go.prototype.get=FM,Go.prototype.has=BM,Go.prototype.set=WM;function Ko(i){var v=-1,R=i==null?0:i.length;for(this.clear();++v<R;){var H=i[v];this.set(H[0],H[1])}}function jM(){this.size=0,this.__data__={hash:new Hs,map:new(bl||Go),string:new Hs}}function HM(i){var v=ou(this,i).delete(i);return this.size-=v?1:0,v}function UM(i){return ou(this,i).get(i)}function VM(i){return ou(this,i).has(i)}function qM(i,v){var R=ou(this,i),H=R.size;return R.set(i,v),this.size+=R.size==H?0:1,this}Ko.prototype.clear=jM,Ko.prototype.delete=HM,Ko.prototype.get=UM,Ko.prototype.has=VM,Ko.prototype.set=qM;function Us(i){var v=-1,R=i==null?0:i.length;for(this.__data__=new Ko;++v<R;)this.add(i[v])}function GM(i){return this.__data__.set(i,f),this}function KM(i){return this.__data__.has(i)}Us.prototype.add=Us.prototype.push=GM,Us.prototype.has=KM;function yo(i){var v=this.__data__=new Go(i);this.size=v.size}function YM(){this.__data__=new Go,this.size=0}function JM(i){var v=this.__data__,R=v.delete(i);return this.size=v.size,R}function ZM(i){return this.__data__.get(i)}function XM(i){return this.__data__.has(i)}function QM(i,v){var R=this.__data__;if(R instanceof Go){var H=R.__data__;if(!bl||H.length<m-1)return H.push([i,v]),this.size=++R.size,this;R=this.__data__=new Ko(H)}return R.set(i,v),this.size=R.size,this}yo.prototype.clear=YM,yo.prototype.delete=JM,yo.prototype.get=ZM,yo.prototype.has=XM,yo.prototype.set=QM;function Lb(i,v){var R=Et(i),H=!R&&Ys(i),K=!R&&!H&&ms(i),te=!R&&!H&&!K&&Na(i),he=R||H||K||te,pe=he?ot(i.length,Or):[],xe=pe.length;for(var Oe in i)(v||cn.call(i,Oe))&&!(he&&(Oe=="length"||K&&(Oe=="offset"||Oe=="parent")||te&&(Oe=="buffer"||Oe=="byteLength"||Oe=="byteOffset")||Zo(Oe,xe)))&&pe.push(Oe);return pe}function Ob(i){var v=i.length;return v?i[Gd(0,v-1)]:e}function eI(i,v){return su(wi(i),Vs(v,0,i.length))}function tI(i){return su(wi(i))}function Pd(i,v,R){(R!==e&&!wo(i[v],R)||R===e&&!(v in i))&&No(i,v,R)}function _l(i,v,R){var H=i[v];(!(cn.call(i,v)&&wo(H,R))||R===e&&!(v in i))&&No(i,v,R)}function Gc(i,v){for(var R=i.length;R--;)if(wo(i[R][0],v))return R;return-1}function nI(i,v,R,H){return ds(i,function(K,te,he){v(H,K,R(K),he)}),H}function Nb(i,v){return i&&Po(v,Ar(v),i)}function rI(i,v){return i&&Po(v,Ci(v),i)}function No(i,v,R){v=="__proto__"&&Wc?Wc(i,v,{configurable:!0,enumerable:!0,value:R,writable:!0}):i[v]=R}function zd(i,v){for(var R=-1,H=v.length,K=ke(H),te=i==null;++R<H;)K[R]=te?e:wf(i,v[R]);return K}function Vs(i,v,R){return i===i&&(R!==e&&(i=i<=R?i:R),v!==e&&(i=i>=v?i:v)),i}function to(i,v,R,H,K,te){var he,pe=v&c,xe=v&h,Oe=v&o;if(R&&(he=K?R(i,H,K,te):R(i)),he!==e)return he;if(!jn(i))return i;var De=Et(i);if(De){if(he=VI(i),!pe)return wi(i,he)}else{var Fe=Jr(i),nt=Fe==Ge||Fe==at;if(ms(i))return o0(i,pe);if(Fe==st||Fe==ie||nt&&!K){if(he=xe||nt?{}:A0(i),!pe)return xe?OI(i,rI(he,i)):LI(i,Nb(he,i))}else{if(!dt[Fe])return K?i:{};he=qI(i,Fe,pe)}}te||(te=new yo);var ut=te.get(i);if(ut)return ut;te.set(i,he),Q0(i)?i.forEach(function(bt){he.add(to(bt,v,R,bt,i,te))}):Z0(i)&&i.forEach(function(bt,Ht){he.set(Ht,to(bt,v,R,Ht,i,te))});var xt=Oe?xe?of:rf:xe?Ci:Ar,Dt=De?e:xt(i);return vr(Dt||i,function(bt,Ht){Dt&&(Ht=bt,bt=i[Ht]),_l(he,Ht,to(bt,v,R,Ht,i,te))}),he}function iI(i){var v=Ar(i);return function(R){return Db(R,i,v)}}function Db(i,v,R){var H=R.length;if(i==null)return!H;for(i=Wt(i);H--;){var K=R[H],te=v[K],he=i[K];if(he===e&&!(K in i)||!te(he))return!1}return!0}function Pb(i,v,R){if(typeof i!="function")throw new _n(g);return El(function(){i.apply(e,R)},v)}function Al(i,v,R,H){var K=-1,te=yi,he=!0,pe=i.length,xe=[],Oe=v.length;if(!pe)return xe;R&&(v=S(v,Zt(R))),H?(te=b,he=!1):v.length>=m&&(te=St,he=!1,v=new Us(v));e:for(;++K<pe;){var De=i[K],Fe=R==null?De:R(De);if(De=H||De!==0?De:0,he&&Fe===Fe){for(var nt=Oe;nt--;)if(v[nt]===Fe)continue e;xe.push(De)}else te(v,Fe,H)||xe.push(De)}return xe}var ds=u0(Do),zb=u0(Bd,!0);function oI(i,v){var R=!0;return ds(i,function(H,K,te){return R=!!v(H,K,te),R}),R}function Kc(i,v,R){for(var H=-1,K=i.length;++H<K;){var te=i[H],he=v(te);if(he!=null&&(pe===e?he===he&&!zi(he):R(he,pe)))var pe=he,xe=te}return xe}function sI(i,v,R,H){var K=i.length;for(R=Lt(R),R<0&&(R=-R>K?0:K+R),H=H===e||H>K?K:Lt(H),H<0&&(H+=K),H=R>H?0:tw(H);R<H;)i[R++]=v;return i}function Fb(i,v){var R=[];return ds(i,function(H,K,te){v(H,K,te)&&R.push(H)}),R}function Dr(i,v,R,H,K){var te=-1,he=i.length;for(R||(R=KI),K||(K=[]);++te<he;){var pe=i[te];v>0&&R(pe)?v>1?Dr(pe,v-1,R,H,K):k(K,pe):H||(K[K.length]=pe)}return K}var Fd=h0(),Bb=h0(!0);function Do(i,v){return i&&Fd(i,v,Ar)}function Bd(i,v){return i&&Bb(i,v,Ar)}function Yc(i,v){return Lr(v,function(R){return Xo(i[R])})}function qs(i,v){v=ps(v,i);for(var R=0,H=v.length;i!=null&&R<H;)i=i[bo(v[R++])];return R&&R==H?i:e}function Wb(i,v,R){var H=v(i);return Et(i)?H:k(H,R(i))}function oi(i){return i==null?i===e?Ye:Tt:js&&js in Wt(i)?jI(i):tL(i)}function Wd(i,v){return i>v}function aI(i,v){return i!=null&&cn.call(i,v)}function lI(i,v){return i!=null&&v in Wt(i)}function cI(i,v,R){return i>=Yr(v,R)&&i<br(v,R)}function jd(i,v,R){for(var H=R?b:yi,K=i[0].length,te=i.length,he=te,pe=ke(te),xe=1/0,Oe=[];he--;){var De=i[he];he&&v&&(De=S(De,Zt(v))),xe=Yr(De.length,xe),pe[he]=!R&&(v||K>=120&&De.length>=120)?new Us(he&&De):e}De=i[0];var Fe=-1,nt=pe[0];e:for(;++Fe<K&&Oe.length<xe;){var ut=De[Fe],xt=v?v(ut):ut;if(ut=R||ut!==0?ut:0,!(nt?St(nt,xt):H(Oe,xt,R))){for(he=te;--he;){var Dt=pe[he];if(!(Dt?St(Dt,xt):H(i[he],xt,R)))continue e}nt&&nt.push(xt),Oe.push(ut)}}return Oe}function uI(i,v,R,H){return Do(i,function(K,te,he){v(H,R(K),te,he)}),H}function kl(i,v,R){v=ps(v,i),i=T0(i,v);var H=i==null?i:i[bo(ro(v))];return H==null?e:an(H,i,R)}function jb(i){return Yn(i)&&oi(i)==ie}function hI(i){return Yn(i)&&oi(i)==zn}function dI(i){return Yn(i)&&oi(i)==Ee}function Sl(i,v,R,H,K){return i===v?!0:i==null||v==null||!Yn(i)&&!Yn(v)?i!==i&&v!==v:fI(i,v,R,H,Sl,K)}function fI(i,v,R,H,K,te){var he=Et(i),pe=Et(v),xe=he?fe:Jr(i),Oe=pe?fe:Jr(v);xe=xe==ie?st:xe,Oe=Oe==ie?st:Oe;var De=xe==st,Fe=Oe==st,nt=xe==Oe;if(nt&&ms(i)){if(!ms(v))return!1;he=!0,De=!1}if(nt&&!De)return te||(te=new yo),he||Na(i)?x0(i,v,R,H,K,te):BI(i,v,xe,R,H,K,te);if(!(R&l)){var ut=De&&cn.call(i,"__wrapped__"),xt=Fe&&cn.call(v,"__wrapped__");if(ut||xt){var Dt=ut?i.value():i,bt=xt?v.value():v;return te||(te=new yo),K(Dt,bt,R,H,te)}}return nt?(te||(te=new yo),WI(i,v,R,H,K,te)):!1}function pI(i){return Yn(i)&&Jr(i)==We}function Hd(i,v,R,H){var K=R.length,te=K,he=!H;if(i==null)return!te;for(i=Wt(i);K--;){var pe=R[K];if(he&&pe[2]?pe[1]!==i[pe[0]]:!(pe[0]in i))return!1}for(;++K<te;){pe=R[K];var xe=pe[0],Oe=i[xe],De=pe[1];if(he&&pe[2]){if(Oe===e&&!(xe in i))return!1}else{var Fe=new yo;if(H)var nt=H(Oe,De,xe,i,v,Fe);if(!(nt===e?Sl(De,Oe,l|p,H,Fe):nt))return!1}}return!0}function Hb(i){if(!jn(i)||JI(i))return!1;var v=Xo(i)?pM:Mn;return v.test(Ks(i))}function gI(i){return Yn(i)&&oi(i)==Zn}function mI(i){return Yn(i)&&Jr(i)==zt}function vI(i){return Yn(i)&&du(i.length)&&!!on[oi(i)]}function Ub(i){return typeof i=="function"?i:i==null?_i:typeof i=="object"?Et(i)?Gb(i[0],i[1]):qb(i):fw(i)}function Ud(i){if(!Rl(i))return wM(i);var v=[];for(var R in Wt(i))cn.call(i,R)&&R!="constructor"&&v.push(R);return v}function yI(i){if(!jn(i))return eL(i);var v=Rl(i),R=[];for(var H in i)H=="constructor"&&(v||!cn.call(i,H))||R.push(H);return R}function Vd(i,v){return i<v}function Vb(i,v){var R=-1,H=xi(i)?ke(i.length):[];return ds(i,function(K,te,he){H[++R]=v(K,te,he)}),H}function qb(i){var v=af(i);return v.length==1&&v[0][2]?S0(v[0][0],v[0][1]):function(R){return R===i||Hd(R,i,v)}}function Gb(i,v){return cf(i)&&k0(v)?S0(bo(i),v):function(R){var H=wf(R,i);return H===e&&H===v?xf(R,i):Sl(v,H,l|p)}}function Jc(i,v,R,H,K){i!==v&&Fd(v,function(te,he){if(K||(K=new yo),jn(te))bI(i,v,he,R,Jc,H,K);else{var pe=H?H(hf(i,he),te,he+"",i,v,K):e;pe===e&&(pe=te),Pd(i,he,pe)}},Ci)}function bI(i,v,R,H,K,te,he){var pe=hf(i,R),xe=hf(v,R),Oe=he.get(xe);if(Oe){Pd(i,R,Oe);return}var De=te?te(pe,xe,R+"",i,v,he):e,Fe=De===e;if(Fe){var nt=Et(xe),ut=!nt&&ms(xe),xt=!nt&&!ut&&Na(xe);De=xe,nt||ut||xt?Et(pe)?De=pe:tr(pe)?De=wi(pe):ut?(Fe=!1,De=o0(xe,!0)):xt?(Fe=!1,De=s0(xe,!0)):De=[]:Ml(xe)||Ys(xe)?(De=pe,Ys(pe)?De=nw(pe):(!jn(pe)||Xo(pe))&&(De=A0(xe))):Fe=!1}Fe&&(he.set(xe,De),K(De,xe,H,te,he),he.delete(xe)),Pd(i,R,De)}function Kb(i,v){var R=i.length;if(R)return v+=v<0?R:0,Zo(v,R)?i[v]:e}function Yb(i,v,R){v.length?v=S(v,function(te){return Et(te)?function(he){return qs(he,te.length===1?te[0]:te)}:te}):v=[_i];var H=-1;v=S(v,Zt(wt()));var K=Vb(i,function(te,he,pe){var xe=S(v,function(Oe){return Oe(te)});return{criteria:xe,index:++H,value:te}});return ft(K,function(te,he){return II(te,he,R)})}function wI(i,v){return Jb(i,v,function(R,H){return xf(i,H)})}function Jb(i,v,R){for(var H=-1,K=v.length,te={};++H<K;){var he=v[H],pe=qs(i,he);R(pe,he)&&$l(te,ps(he,i),pe)}return te}function xI(i){return function(v){return qs(v,i)}}function qd(i,v,R,H){var K=H?Ae:we,te=-1,he=v.length,pe=i;for(i===v&&(v=wi(v)),R&&(pe=S(i,Zt(R)));++te<he;)for(var xe=0,Oe=v[te],De=R?R(Oe):Oe;(xe=K(pe,De,xe,H))>-1;)pe!==i&&Bc.call(pe,xe,1),Bc.call(i,xe,1);return i}function Zb(i,v){for(var R=i?v.length:0,H=R-1;R--;){var K=v[R];if(R==H||K!==te){var te=K;Zo(K)?Bc.call(i,K,1):Jd(i,K)}}return i}function Gd(i,v){return i+Hc(Mb()*(v-i+1))}function CI(i,v,R,H){for(var K=-1,te=br(jc((v-i)/(R||1)),0),he=ke(te);te--;)he[H?te:++K]=i,i+=R;return he}function Kd(i,v){var R="";if(!i||v<1||v>G)return R;do v%2&&(R+=i),v=Hc(v/2),v&&(i+=i);while(v);return R}function jt(i,v){return df($0(i,v,_i),i+"")}function _I(i){return Ob(Da(i))}function AI(i,v){var R=Da(i);return su(R,Vs(v,0,R.length))}function $l(i,v,R,H){if(!jn(i))return i;v=ps(v,i);for(var K=-1,te=v.length,he=te-1,pe=i;pe!=null&&++K<te;){var xe=bo(v[K]),Oe=R;if(xe==="__proto__"||xe==="constructor"||xe==="prototype")return i;if(K!=he){var De=pe[xe];Oe=H?H(De,xe,pe):e,Oe===e&&(Oe=jn(De)?De:Zo(v[K+1])?[]:{})}_l(pe,xe,Oe),pe=pe[xe]}return i}var Xb=Uc?function(i,v){return Uc.set(i,v),i}:_i,kI=Wc?function(i,v){return Wc(i,"toString",{configurable:!0,enumerable:!1,value:_f(v),writable:!0})}:_i;function SI(i){return su(Da(i))}function no(i,v,R){var H=-1,K=i.length;v<0&&(v=-v>K?0:K+v),R=R>K?K:R,R<0&&(R+=K),K=v>R?0:R-v>>>0,v>>>=0;for(var te=ke(K);++H<K;)te[H]=i[H+v];return te}function $I(i,v){var R;return ds(i,function(H,K,te){return R=v(H,K,te),!R}),!!R}function Zc(i,v,R){var H=0,K=i==null?H:i.length;if(typeof v=="number"&&v===v&&K<=ce){for(;H<K;){var te=H+K>>>1,he=i[te];he!==null&&!zi(he)&&(R?he<=v:he<v)?H=te+1:K=te}return K}return Yd(i,v,_i,R)}function Yd(i,v,R,H){var K=0,te=i==null?0:i.length;if(te===0)return 0;v=R(v);for(var he=v!==v,pe=v===null,xe=zi(v),Oe=v===e;K<te;){var De=Hc((K+te)/2),Fe=R(i[De]),nt=Fe!==e,ut=Fe===null,xt=Fe===Fe,Dt=zi(Fe);if(he)var bt=H||xt;else Oe?bt=xt&&(H||nt):pe?bt=xt&&nt&&(H||!ut):xe?bt=xt&&nt&&!ut&&(H||!Dt):ut||Dt?bt=!1:bt=H?Fe<=v:Fe<v;bt?K=De+1:te=De}return Yr(te,re)}function Qb(i,v){for(var R=-1,H=i.length,K=0,te=[];++R<H;){var he=i[R],pe=v?v(he):he;if(!R||!wo(pe,xe)){var xe=pe;te[K++]=he===0?0:he}}return te}function e0(i){return typeof i=="number"?i:zi(i)?Q:+i}function Pi(i){if(typeof i=="string")return i;if(Et(i))return S(i,Pi)+"";if(zi(i))return Ib?Ib.call(i):"";var v=i+"";return v=="0"&&1/i==-U?"-0":v}function fs(i,v,R){var H=-1,K=yi,te=i.length,he=!0,pe=[],xe=pe;if(R)he=!1,K=b;else if(te>=m){var Oe=v?null:zI(i);if(Oe)return tt(Oe);he=!1,K=St,xe=new Us}else xe=v?[]:pe;e:for(;++H<te;){var De=i[H],Fe=v?v(De):De;if(De=R||De!==0?De:0,he&&Fe===Fe){for(var nt=xe.length;nt--;)if(xe[nt]===Fe)continue e;v&&xe.push(Fe),pe.push(De)}else K(xe,Fe,R)||(xe!==pe&&xe.push(Fe),pe.push(De))}return pe}function Jd(i,v){v=ps(v,i);var R=-1,H=v.length;if(!H)return!0;for(;++R<H;){var K=bo(v[R]);if(K==="__proto__"&&!cn.call(i,"__proto__")||(K==="constructor"||K==="prototype")&&R<H-1)return!1}var te=T0(i,v);return te==null||delete te[bo(ro(v))]}function t0(i,v,R,H){return $l(i,v,R(qs(i,v)),H)}function Xc(i,v,R,H){for(var K=i.length,te=H?K:-1;(H?te--:++te<K)&&v(i[te],te,i););return R?no(i,H?0:te,H?te+1:K):no(i,H?te+1:0,H?K:te)}function n0(i,v){var R=i;return R instanceof qt&&(R=R.value()),P(v,function(H,K){return K.func.apply(K.thisArg,k([H],K.args))},R)}function Zd(i,v,R){var H=i.length;if(H<2)return H?fs(i[0]):[];for(var K=-1,te=ke(H);++K<H;)for(var he=i[K],pe=-1;++pe<H;)pe!=K&&(te[K]=Al(te[K]||he,i[pe],v,R));return fs(Dr(te,1),v,R)}function r0(i,v,R){for(var H=-1,K=i.length,te=v.length,he={};++H<K;){var pe=H<te?v[H]:e;R(he,i[H],pe)}return he}function Xd(i){return tr(i)?i:[]}function Qd(i){return typeof i=="function"?i:_i}function ps(i,v){return Et(i)?i:cf(i,v)?[i]:I0(un(i))}var TI=jt;function gs(i,v,R){var H=i.length;return R=R===e?H:R,!v&&R>=H?i:no(i,v,R)}var i0=gM||function(i){return Ft.clearTimeout(i)};function o0(i,v){if(v)return i.slice();var R=i.length,H=Sb?Sb(R):new i.constructor(R);return i.copy(H),H}function ef(i){var v=new i.constructor(i.byteLength);return new zc(v).set(new zc(i)),v}function RI(i,v){var R=v?ef(i.buffer):i.buffer;return new i.constructor(R,i.byteOffset,i.byteLength)}function EI(i){var v=new i.constructor(i.source,Nt.exec(i));return v.lastIndex=i.lastIndex,v}function MI(i){return Cl?Wt(Cl.call(i)):{}}function s0(i,v){var R=v?ef(i.buffer):i.buffer;return new i.constructor(R,i.byteOffset,i.length)}function a0(i,v){if(i!==v){var R=i!==e,H=i===null,K=i===i,te=zi(i),he=v!==e,pe=v===null,xe=v===v,Oe=zi(v);if(!pe&&!Oe&&!te&&i>v||te&&he&&xe&&!pe&&!Oe||H&&he&&xe||!R&&xe||!K)return 1;if(!H&&!te&&!Oe&&i<v||Oe&&R&&K&&!H&&!te||pe&&R&&K||!he&&K||!xe)return-1}return 0}function II(i,v,R){for(var H=-1,K=i.criteria,te=v.criteria,he=K.length,pe=R.length;++H<he;){var xe=a0(K[H],te[H]);if(xe){if(H>=pe)return xe;var Oe=R[H];return xe*(Oe=="desc"?-1:1)}}return i.index-v.index}function l0(i,v,R,H){for(var K=-1,te=i.length,he=R.length,pe=-1,xe=v.length,Oe=br(te-he,0),De=ke(xe+Oe),Fe=!H;++pe<xe;)De[pe]=v[pe];for(;++K<he;)(Fe||K<te)&&(De[R[K]]=i[K]);for(;Oe--;)De[pe++]=i[K++];return De}function c0(i,v,R,H){for(var K=-1,te=i.length,he=-1,pe=R.length,xe=-1,Oe=v.length,De=br(te-pe,0),Fe=ke(De+Oe),nt=!H;++K<De;)Fe[K]=i[K];for(var ut=K;++xe<Oe;)Fe[ut+xe]=v[xe];for(;++he<pe;)(nt||K<te)&&(Fe[ut+R[he]]=i[K++]);return Fe}function wi(i,v){var R=-1,H=i.length;for(v||(v=ke(H));++R<H;)v[R]=i[R];return v}function Po(i,v,R,H){var K=!R;R||(R={});for(var te=-1,he=v.length;++te<he;){var pe=v[te],xe=H?H(R[pe],i[pe],pe,R,i):e;xe===e&&(xe=i[pe]),K?No(R,pe,xe):_l(R,pe,xe)}return R}function LI(i,v){return Po(i,lf(i),v)}function OI(i,v){return Po(i,C0(i),v)}function Qc(i,v){return function(R,H){var K=Et(R)?Ta:nI,te=v?v():{};return K(R,i,wt(H,2),te)}}function Ia(i){return jt(function(v,R){var H=-1,K=R.length,te=K>1?R[K-1]:e,he=K>2?R[2]:e;for(te=i.length>3&&typeof te=="function"?(K--,te):e,he&&si(R[0],R[1],he)&&(te=K<3?e:te,K=1),v=Wt(v);++H<K;){var pe=R[H];pe&&i(v,pe,H,te)}return v})}function u0(i,v){return function(R,H){if(R==null)return R;if(!xi(R))return i(R,H);for(var K=R.length,te=v?K:-1,he=Wt(R);(v?te--:++te<K)&&H(he[te],te,he)!==!1;);return R}}function h0(i){return function(v,R,H){for(var K=-1,te=Wt(v),he=H(v),pe=he.length;pe--;){var xe=he[i?pe:++K];if(R(te[xe],xe,te)===!1)break}return v}}function NI(i,v,R){var H=v&y,K=Tl(i);function te(){var he=this&&this!==Ft&&this instanceof te?K:i;return he.apply(H?R:this,arguments)}return te}function d0(i){return function(v){v=un(v);var R=ge(v)?Ct(v):e,H=R?R[0]:v.charAt(0),K=R?gs(R,1).join(""):v.slice(1);return H[i]()+K}}function La(i){return function(v){return P(hw(uw(v).replace(Uo,"")),i,"")}}function Tl(i){return function(){var v=arguments;switch(v.length){case 0:return new i;case 1:return new i(v[0]);case 2:return new i(v[0],v[1]);case 3:return new i(v[0],v[1],v[2]);case 4:return new i(v[0],v[1],v[2],v[3]);case 5:return new i(v[0],v[1],v[2],v[3],v[4]);case 6:return new i(v[0],v[1],v[2],v[3],v[4],v[5]);case 7:return new i(v[0],v[1],v[2],v[3],v[4],v[5],v[6])}var R=Ma(i.prototype),H=i.apply(R,v);return jn(H)?H:R}}function DI(i,v,R){var H=Tl(i);function K(){for(var te=arguments.length,he=ke(te),pe=te,xe=Oa(K);pe--;)he[pe]=arguments[pe];var Oe=te<3&&he[0]!==xe&&he[te-1]!==xe?[]:Ke(he,xe);if(te-=Oe.length,te<R)return v0(i,v,eu,K.placeholder,e,he,Oe,e,e,R-te);var De=this&&this!==Ft&&this instanceof K?H:i;return an(De,this,he)}return K}function f0(i){return function(v,R,H){var K=Wt(v);if(!xi(v)){var te=wt(R,3);v=Ar(v),R=function(pe){return te(K[pe],pe,K)}}var he=i(v,R,H);return he>-1?K[te?v[he]:he]:e}}function p0(i){return Jo(function(v){var R=v.length,H=R,K=eo.prototype.thru;for(i&&v.reverse();H--;){var te=v[H];if(typeof te!="function")throw new _n(g);if(K&&!he&&iu(te)=="wrapper")var he=new eo([],!0)}for(H=he?H:R;++H<R;){te=v[H];var pe=iu(te),xe=pe=="wrapper"?sf(te):e;xe&&uf(xe[0])&&xe[1]==(D|$|C|I)&&!xe[4].length&&xe[9]==1?he=he[iu(xe[0])].apply(he,xe[3]):he=te.length==1&&uf(te)?he[pe]():he.thru(te)}return function(){var Oe=arguments,De=Oe[0];if(he&&Oe.length==1&&Et(De))return he.plant(De).value();for(var Fe=0,nt=R?v[Fe].apply(this,Oe):De;++Fe<R;)nt=v[Fe].call(this,nt);return nt}})}function eu(i,v,R,H,K,te,he,pe,xe,Oe){var De=v&D,Fe=v&y,nt=v&x,ut=v&($|_),xt=v&M,Dt=nt?e:Tl(i);function bt(){for(var Ht=arguments.length,Kt=ke(Ht),Fi=Ht;Fi--;)Kt[Fi]=arguments[Fi];if(ut)var ai=Oa(bt),Bi=Nn(Kt,ai);if(H&&(Kt=l0(Kt,H,K,ut)),te&&(Kt=c0(Kt,te,he,ut)),Ht-=Bi,ut&&Ht<Oe){var nr=Ke(Kt,ai);return v0(i,v,eu,bt.placeholder,R,Kt,nr,pe,xe,Oe-Ht)}var xo=Fe?R:this,es=nt?xo[i]:i;return Ht=Kt.length,pe?Kt=nL(Kt,pe):xt&&Ht>1&&Kt.reverse(),De&&xe<Ht&&(Kt.length=xe),this&&this!==Ft&&this instanceof bt&&(es=Dt||Tl(es)),es.apply(xo,Kt)}return bt}function g0(i,v){return function(R,H){return uI(R,i,v(H),{})}}function tu(i,v){return function(R,H){var K;if(R===e&&H===e)return v;if(R!==e&&(K=R),H!==e){if(K===e)return H;typeof R=="string"||typeof H=="string"?(R=Pi(R),H=Pi(H)):(R=e0(R),H=e0(H)),K=i(R,H)}return K}}function tf(i){return Jo(function(v){return v=S(v,Zt(wt())),jt(function(R){var H=this;return i(v,function(K){return an(K,H,R)})})})}function nu(i,v){v=v===e?" ":Pi(v);var R=v.length;if(R<2)return R?Kd(v,i):v;var H=Kd(v,jc(i/Bt(v)));return ge(v)?gs(Ct(H),0,i).join(""):H.slice(0,i)}function PI(i,v,R,H){var K=v&y,te=Tl(i);function he(){for(var pe=-1,xe=arguments.length,Oe=-1,De=H.length,Fe=ke(De+xe),nt=this&&this!==Ft&&this instanceof he?te:i;++Oe<De;)Fe[Oe]=H[Oe];for(;xe--;)Fe[Oe++]=arguments[++pe];return an(nt,K?R:this,Fe)}return he}function m0(i){return function(v,R,H){return H&&typeof H!="number"&&si(v,R,H)&&(R=H=e),v=Qo(v),R===e?(R=v,v=0):R=Qo(R),H=H===e?v<R?1:-1:Qo(H),CI(v,R,H,i)}}function ru(i){return function(v,R){return typeof v=="string"&&typeof R=="string"||(v=io(v),R=io(R)),i(v,R)}}function v0(i,v,R,H,K,te,he,pe,xe,Oe){var De=v&$,Fe=De?he:e,nt=De?e:he,ut=De?te:e,xt=De?e:te;v|=De?C:L,v&=~(De?L:C),v&E||(v&=-4);var Dt=[i,v,K,ut,Fe,xt,nt,pe,xe,Oe],bt=R.apply(e,Dt);return uf(i)&&R0(bt,Dt),bt.placeholder=H,E0(bt,i,v)}function nf(i){var v=nn[i];return function(R,H){if(R=io(R),H=H==null?0:Yr(Lt(H),292),H&&Eb(R)){var K=(un(R)+"e").split("e"),te=v(K[0]+"e"+(+K[1]+H));return K=(un(te)+"e").split("e"),+(K[0]+"e"+(+K[1]-H))}return v(R)}}var zI=Ra&&1/tt(new Ra([,-0]))[1]==U?function(i){return new Ra(i)}:Sf;function y0(i){return function(v){var R=Jr(v);return R==We?Be(v):R==zt?it(v):Rn(v,i(v))}}function Yo(i,v,R,H,K,te,he,pe){var xe=v&x;if(!xe&&typeof i!="function")throw new _n(g);var Oe=H?H.length:0;if(Oe||(v&=-97,H=K=e),he=he===e?he:br(Lt(he),0),pe=pe===e?pe:Lt(pe),Oe-=K?K.length:0,v&L){var De=H,Fe=K;H=K=e}var nt=xe?e:sf(i),ut=[i,v,R,H,K,De,Fe,te,he,pe];if(nt&&QI(ut,nt),i=ut[0],v=ut[1],R=ut[2],H=ut[3],K=ut[4],pe=ut[9]=ut[9]===e?xe?0:i.length:br(ut[9]-Oe,0),!pe&&v&($|_)&&(v&=-25),!v||v==y)var xt=NI(i,v,R);else v==$||v==_?xt=DI(i,v,pe):(v==C||v==(y|C))&&!K.length?xt=PI(i,v,R,H):xt=eu.apply(e,ut);var Dt=nt?Xb:R0;return E0(Dt(xt,ut),i,v)}function b0(i,v,R,H){return i===e||wo(i,qo[R])&&!cn.call(H,R)?v:i}function w0(i,v,R,H,K,te){return jn(i)&&jn(v)&&(te.set(v,i),Jc(i,v,e,w0,te),te.delete(v)),i}function FI(i){return Ml(i)?e:i}function x0(i,v,R,H,K,te){var he=R&l,pe=i.length,xe=v.length;if(pe!=xe&&!(he&&xe>pe))return!1;var Oe=te.get(i),De=te.get(v);if(Oe&&De)return Oe==v&&De==i;var Fe=-1,nt=!0,ut=R&p?new Us:e;for(te.set(i,v),te.set(v,i);++Fe<pe;){var xt=i[Fe],Dt=v[Fe];if(H)var bt=he?H(Dt,xt,Fe,v,i,te):H(xt,Dt,Fe,i,v,te);if(bt!==e){if(bt)continue;nt=!1;break}if(ut){if(!j(v,function(Ht,Kt){if(!St(ut,Kt)&&(xt===Ht||K(xt,Ht,R,H,te)))return ut.push(Kt)})){nt=!1;break}}else if(!(xt===Dt||K(xt,Dt,R,H,te))){nt=!1;break}}return te.delete(i),te.delete(v),nt}function BI(i,v,R,H,K,te,he){switch(R){case Un:if(i.byteLength!=v.byteLength||i.byteOffset!=v.byteOffset)return!1;i=i.buffer,v=v.buffer;case zn:return!(i.byteLength!=v.byteLength||!te(new zc(i),new zc(v)));case Re:case Ee:case Me:return wo(+i,+v);case He:return i.name==v.name&&i.message==v.message;case Zn:case kn:return i==v+"";case We:var pe=Be;case zt:var xe=H&l;if(pe||(pe=tt),i.size!=v.size&&!xe)return!1;var Oe=he.get(i);if(Oe)return Oe==v;H|=p,he.set(i,v);var De=x0(pe(i),pe(v),H,K,te,he);return he.delete(i),De;case mt:if(Cl)return Cl.call(i)==Cl.call(v)}return!1}function WI(i,v,R,H,K,te){var he=R&l,pe=rf(i),xe=pe.length,Oe=rf(v),De=Oe.length;if(xe!=De&&!he)return!1;for(var Fe=xe;Fe--;){var nt=pe[Fe];if(!(he?nt in v:cn.call(v,nt)))return!1}var ut=te.get(i),xt=te.get(v);if(ut&&xt)return ut==v&&xt==i;var Dt=!0;te.set(i,v),te.set(v,i);for(var bt=he;++Fe<xe;){nt=pe[Fe];var Ht=i[nt],Kt=v[nt];if(H)var Fi=he?H(Kt,Ht,nt,v,i,te):H(Ht,Kt,nt,i,v,te);if(!(Fi===e?Ht===Kt||K(Ht,Kt,R,H,te):Fi)){Dt=!1;break}bt||(bt=nt=="constructor")}if(Dt&&!bt){var ai=i.constructor,Bi=v.constructor;ai!=Bi&&"constructor"in i&&"constructor"in v&&!(typeof ai=="function"&&ai instanceof ai&&typeof Bi=="function"&&Bi instanceof Bi)&&(Dt=!1)}return te.delete(i),te.delete(v),Dt}function Jo(i){return df($0(i,e,D0),i+"")}function rf(i){return Wb(i,Ar,lf)}function of(i){return Wb(i,Ci,C0)}var sf=Uc?function(i){return Uc.get(i)}:Sf;function iu(i){for(var v=i.name+"",R=Ea[v],H=cn.call(Ea,v)?R.length:0;H--;){var K=R[H],te=K.func;if(te==null||te==i)return K.name}return v}function Oa(i){var v=cn.call(ee,"placeholder")?ee:i;return v.placeholder}function wt(){var i=ee.iteratee||Af;return i=i===Af?Ub:i,arguments.length?i(arguments[0],arguments[1]):i}function ou(i,v){var R=i.__data__;return YI(v)?R[typeof v=="string"?"string":"hash"]:R.map}function af(i){for(var v=Ar(i),R=v.length;R--;){var H=v[R],K=i[H];v[R]=[H,K,k0(K)]}return v}function Gs(i,v){var R=ae(i,v);return Hb(R)?R:e}function jI(i){var v=cn.call(i,js),R=i[js];try{i[js]=e;var H=!0}catch{}var K=Dc.call(i);return H&&(v?i[js]=R:delete i[js]),K}var lf=Od?function(i){return i==null?[]:(i=Wt(i),Lr(Od(i),function(v){return Tb.call(i,v)}))}:$f,C0=Od?function(i){for(var v=[];i;)k(v,lf(i)),i=Fc(i);return v}:$f,Jr=oi;(Nd&&Jr(new Nd(new ArrayBuffer(1)))!=Un||bl&&Jr(new bl)!=We||Dd&&Jr(Dd.resolve())!=Xt||Ra&&Jr(new Ra)!=zt||wl&&Jr(new wl)!=Ot)&&(Jr=function(i){var v=oi(i),R=v==st?i.constructor:e,H=R?Ks(R):"";if(H)switch(H){case AM:return Un;case kM:return We;case SM:return Xt;case $M:return zt;case TM:return Ot}return v});function HI(i,v,R){for(var H=-1,K=R.length;++H<K;){var te=R[H],he=te.size;switch(te.type){case"drop":i+=he;break;case"dropRight":v-=he;break;case"take":v=Yr(v,i+he);break;case"takeRight":i=br(i,v-he);break}}return{start:i,end:v}}function UI(i){var v=i.match(Mi);return v?v[1].split(cs):[]}function _0(i,v,R){v=ps(v,i);for(var H=-1,K=v.length,te=!1;++H<K;){var he=bo(v[H]);if(!(te=i!=null&&R(i,he)))break;i=i[he]}return te||++H!=K?te:(K=i==null?0:i.length,!!K&&du(K)&&Zo(he,K)&&(Et(i)||Ys(i)))}function VI(i){var v=i.length,R=new i.constructor(v);return v&&typeof i[0]=="string"&&cn.call(i,"index")&&(R.index=i.index,R.input=i.input),R}function A0(i){return typeof i.constructor=="function"&&!Rl(i)?Ma(Fc(i)):{}}function qI(i,v,R){var H=i.constructor;switch(v){case zn:return ef(i);case Re:case Ee:return new H(+i);case Un:return RI(i,R);case Fn:case mn:case En:case Xn:case tn:case Vn:case $i:case ti:case sr:return s0(i,R);case We:return new H;case Me:case kn:return new H(i);case Zn:return EI(i);case zt:return new H;case mt:return MI(i)}}function GI(i,v){var R=v.length;if(!R)return i;var H=R-1;return v[H]=(R>1?"& ":"")+v[H],v=v.join(R>2?", ":" "),i.replace(Ei,`{
1460
+ /* [wrapped with `+v+`] */
1461
+ `)}function KI(i){return Et(i)||Ys(i)||!!(Rb&&i&&i[Rb])}function Zo(i,v){var R=typeof i;return v=v??G,!!v&&(R=="number"||R!="symbol"&&In.test(i))&&i>-1&&i%1==0&&i<v}function si(i,v,R){if(!jn(R))return!1;var H=typeof v;return(H=="number"?xi(R)&&Zo(v,R.length):H=="string"&&v in R)?wo(R[v],i):!1}function cf(i,v){if(Et(i))return!1;var R=typeof i;return R=="number"||R=="symbol"||R=="boolean"||i==null||zi(i)?!0:$n.test(i)||!ni.test(i)||v!=null&&i in Wt(v)}function YI(i){var v=typeof i;return v=="string"||v=="number"||v=="symbol"||v=="boolean"?i!=="__proto__":i===null}function uf(i){var v=iu(i),R=ee[v];if(typeof R!="function"||!(v in qt.prototype))return!1;if(i===R)return!0;var H=sf(R);return!!H&&i===H[0]}function JI(i){return!!kb&&kb in i}var ZI=Oc?Xo:Tf;function Rl(i){var v=i&&i.constructor,R=typeof v=="function"&&v.prototype||qo;return i===R}function k0(i){return i===i&&!jn(i)}function S0(i,v){return function(R){return R==null?!1:R[i]===v&&(v!==e||i in Wt(R))}}function XI(i){var v=uu(i,function(H){return R.size===a&&R.clear(),H}),R=v.cache;return v}function QI(i,v){var R=i[1],H=v[1],K=R|H,te=K<(y|x|D),he=H==D&&R==$||H==D&&R==I&&i[7].length<=v[8]||H==(D|I)&&v[7].length<=v[8]&&R==$;if(!(te||he))return i;H&y&&(i[2]=v[2],K|=R&y?0:E);var pe=v[3];if(pe){var xe=i[3];i[3]=xe?l0(xe,pe,v[4]):pe,i[4]=xe?Ke(i[3],s):v[4]}return pe=v[5],pe&&(xe=i[5],i[5]=xe?c0(xe,pe,v[6]):pe,i[6]=xe?Ke(i[5],s):v[6]),pe=v[7],pe&&(i[7]=pe),H&D&&(i[8]=i[8]==null?v[8]:Yr(i[8],v[8])),i[9]==null&&(i[9]=v[9]),i[0]=v[0],i[1]=K,i}function eL(i){var v=[];if(i!=null)for(var R in Wt(i))v.push(R);return v}function tL(i){return Dc.call(i)}function $0(i,v,R){return v=br(v===e?i.length-1:v,0),function(){for(var H=arguments,K=-1,te=br(H.length-v,0),he=ke(te);++K<te;)he[K]=H[v+K];K=-1;for(var pe=ke(v+1);++K<v;)pe[K]=H[K];return pe[v]=R(he),an(i,this,pe)}}function T0(i,v){return v.length<2?i:qs(i,no(v,0,-1))}function nL(i,v){for(var R=i.length,H=Yr(v.length,R),K=wi(i);H--;){var te=v[H];i[H]=Zo(te,R)?K[te]:e}return i}function hf(i,v){if(!(v==="constructor"&&typeof i[v]=="function")&&v!="__proto__")return i[v]}var R0=M0(Xb),El=vM||function(i,v){return Ft.setTimeout(i,v)},df=M0(kI);function E0(i,v,R){var H=v+"";return df(i,GI(H,rL(UI(H),R)))}function M0(i){var v=0,R=0;return function(){var H=xM(),K=T-(H-R);if(R=H,K>0){if(++v>=O)return arguments[0]}else v=0;return i.apply(e,arguments)}}function su(i,v){var R=-1,H=i.length,K=H-1;for(v=v===e?H:v;++R<v;){var te=Gd(R,K),he=i[te];i[te]=i[R],i[R]=he}return i.length=v,i}var I0=XI(function(i){var v=[];return i.charCodeAt(0)===46&&v.push(""),i.replace(Hr,function(R,H,K,te){v.push(K?te.replace(_r,"$1"):H||R)}),v});function bo(i){if(typeof i=="string"||zi(i))return i;var v=i+"";return v=="0"&&1/i==-U?"-0":v}function Ks(i){if(i!=null){try{return Nc.call(i)}catch{}try{return i+""}catch{}}return""}function rL(i,v){return vr(de,function(R){var H="_."+R[0];v&R[1]&&!yi(i,H)&&i.push(H)}),i.sort()}function L0(i){if(i instanceof qt)return i.clone();var v=new eo(i.__wrapped__,i.__chain__);return v.__actions__=wi(i.__actions__),v.__index__=i.__index__,v.__values__=i.__values__,v}function iL(i,v,R){(R?si(i,v,R):v===e)?v=1:v=br(Lt(v),0);var H=i==null?0:i.length;if(!H||v<1)return[];for(var K=0,te=0,he=ke(jc(H/v));K<H;)he[te++]=no(i,K,K+=v);return he}function oL(i){for(var v=-1,R=i==null?0:i.length,H=0,K=[];++v<R;){var te=i[v];te&&(K[H++]=te)}return K}function sL(){var i=arguments.length;if(!i)return[];for(var v=ke(i-1),R=arguments[0],H=i;H--;)v[H-1]=arguments[H];return k(Et(R)?wi(R):[R],Dr(v,1))}var aL=jt(function(i,v){return tr(i)?Al(i,Dr(v,1,tr,!0)):[]}),lL=jt(function(i,v){var R=ro(v);return tr(R)&&(R=e),tr(i)?Al(i,Dr(v,1,tr,!0),wt(R,2)):[]}),cL=jt(function(i,v){var R=ro(v);return tr(R)&&(R=e),tr(i)?Al(i,Dr(v,1,tr,!0),e,R):[]});function uL(i,v,R){var H=i==null?0:i.length;return H?(v=R||v===e?1:Lt(v),no(i,v<0?0:v,H)):[]}function hL(i,v,R){var H=i==null?0:i.length;return H?(v=R||v===e?1:Lt(v),v=H-v,no(i,0,v<0?0:v)):[]}function dL(i,v){return i&&i.length?Xc(i,wt(v,3),!0,!0):[]}function fL(i,v){return i&&i.length?Xc(i,wt(v,3),!0):[]}function pL(i,v,R,H){var K=i==null?0:i.length;return K?(R&&typeof R!="number"&&si(i,v,R)&&(R=0,H=K),sI(i,v,R,H)):[]}function O0(i,v,R){var H=i==null?0:i.length;if(!H)return-1;var K=R==null?0:Lt(R);return K<0&&(K=br(H+K,0)),ue(i,wt(v,3),K)}function N0(i,v,R){var H=i==null?0:i.length;if(!H)return-1;var K=H-1;return R!==e&&(K=Lt(R),K=R<0?br(H+K,0):Yr(K,H-1)),ue(i,wt(v,3),K,!0)}function D0(i){var v=i==null?0:i.length;return v?Dr(i,1):[]}function gL(i){var v=i==null?0:i.length;return v?Dr(i,U):[]}function mL(i,v){var R=i==null?0:i.length;return R?(v=v===e?1:Lt(v),Dr(i,v)):[]}function vL(i){for(var v=-1,R=i==null?0:i.length,H={};++v<R;){var K=i[v];No(H,K[0],K[1])}return H}function P0(i){return i&&i.length?i[0]:e}function yL(i,v,R){var H=i==null?0:i.length;if(!H)return-1;var K=R==null?0:Lt(R);return K<0&&(K=br(H+K,0)),we(i,v,K)}function bL(i){var v=i==null?0:i.length;return v?no(i,0,-1):[]}var wL=jt(function(i){var v=S(i,Xd);return v.length&&v[0]===i[0]?jd(v):[]}),xL=jt(function(i){var v=ro(i),R=S(i,Xd);return v===ro(R)?v=e:R.pop(),R.length&&R[0]===i[0]?jd(R,wt(v,2)):[]}),CL=jt(function(i){var v=ro(i),R=S(i,Xd);return v=typeof v=="function"?v:e,v&&R.pop(),R.length&&R[0]===i[0]?jd(R,e,v):[]});function _L(i,v){return i==null?"":bM.call(i,v)}function ro(i){var v=i==null?0:i.length;return v?i[v-1]:e}function AL(i,v,R){var H=i==null?0:i.length;if(!H)return-1;var K=H;return R!==e&&(K=Lt(R),K=K<0?br(H+K,0):Yr(K,H-1)),v===v?Qt(i,v,K):ue(i,be,K,!0)}function kL(i,v){return i&&i.length?Kb(i,Lt(v)):e}var SL=jt(z0);function z0(i,v){return i&&i.length&&v&&v.length?qd(i,v):i}function $L(i,v,R){return i&&i.length&&v&&v.length?qd(i,v,wt(R,2)):i}function TL(i,v,R){return i&&i.length&&v&&v.length?qd(i,v,e,R):i}var RL=Jo(function(i,v){var R=i==null?0:i.length,H=zd(i,v);return Zb(i,S(v,function(K){return Zo(K,R)?+K:K}).sort(a0)),H});function EL(i,v){var R=[];if(!(i&&i.length))return R;var H=-1,K=[],te=i.length;for(v=wt(v,3);++H<te;){var he=i[H];v(he,H,i)&&(R.push(he),K.push(H))}return Zb(i,K),R}function ff(i){return i==null?i:_M.call(i)}function ML(i,v,R){var H=i==null?0:i.length;return H?(R&&typeof R!="number"&&si(i,v,R)?(v=0,R=H):(v=v==null?0:Lt(v),R=R===e?H:Lt(R)),no(i,v,R)):[]}function IL(i,v){return Zc(i,v)}function LL(i,v,R){return Yd(i,v,wt(R,2))}function OL(i,v){var R=i==null?0:i.length;if(R){var H=Zc(i,v);if(H<R&&wo(i[H],v))return H}return-1}function NL(i,v){return Zc(i,v,!0)}function DL(i,v,R){return Yd(i,v,wt(R,2),!0)}function PL(i,v){var R=i==null?0:i.length;if(R){var H=Zc(i,v,!0)-1;if(wo(i[H],v))return H}return-1}function zL(i){return i&&i.length?Qb(i):[]}function FL(i,v){return i&&i.length?Qb(i,wt(v,2)):[]}function BL(i){var v=i==null?0:i.length;return v?no(i,1,v):[]}function WL(i,v,R){return i&&i.length?(v=R||v===e?1:Lt(v),no(i,0,v<0?0:v)):[]}function jL(i,v,R){var H=i==null?0:i.length;return H?(v=R||v===e?1:Lt(v),v=H-v,no(i,v<0?0:v,H)):[]}function HL(i,v){return i&&i.length?Xc(i,wt(v,3),!1,!0):[]}function UL(i,v){return i&&i.length?Xc(i,wt(v,3)):[]}var VL=jt(function(i){return fs(Dr(i,1,tr,!0))}),qL=jt(function(i){var v=ro(i);return tr(v)&&(v=e),fs(Dr(i,1,tr,!0),wt(v,2))}),GL=jt(function(i){var v=ro(i);return v=typeof v=="function"?v:e,fs(Dr(i,1,tr,!0),e,v)});function KL(i){return i&&i.length?fs(i):[]}function YL(i,v){return i&&i.length?fs(i,wt(v,2)):[]}function JL(i,v){return v=typeof v=="function"?v:e,i&&i.length?fs(i,e,v):[]}function pf(i){if(!(i&&i.length))return[];var v=0;return i=Lr(i,function(R){if(tr(R))return v=br(R.length,v),!0}),ot(v,function(R){return S(i,Pe(R))})}function F0(i,v){if(!(i&&i.length))return[];var R=pf(i);return v==null?R:S(R,function(H){return an(v,e,H)})}var ZL=jt(function(i,v){return tr(i)?Al(i,v):[]}),XL=jt(function(i){return Zd(Lr(i,tr))}),QL=jt(function(i){var v=ro(i);return tr(v)&&(v=e),Zd(Lr(i,tr),wt(v,2))}),eO=jt(function(i){var v=ro(i);return v=typeof v=="function"?v:e,Zd(Lr(i,tr),e,v)}),tO=jt(pf);function nO(i,v){return r0(i||[],v||[],_l)}function rO(i,v){return r0(i||[],v||[],$l)}var iO=jt(function(i){var v=i.length,R=v>1?i[v-1]:e;return R=typeof R=="function"?(i.pop(),R):e,F0(i,R)});function B0(i){var v=ee(i);return v.__chain__=!0,v}function oO(i,v){return v(i),i}function au(i,v){return v(i)}var sO=Jo(function(i){var v=i.length,R=v?i[0]:0,H=this.__wrapped__,K=function(te){return zd(te,i)};return v>1||this.__actions__.length||!(H instanceof qt)||!Zo(R)?this.thru(K):(H=H.slice(R,+R+(v?1:0)),H.__actions__.push({func:au,args:[K],thisArg:e}),new eo(H,this.__chain__).thru(function(te){return v&&!te.length&&te.push(e),te}))});function aO(){return B0(this)}function lO(){return new eo(this.value(),this.__chain__)}function cO(){this.__values__===e&&(this.__values__=ew(this.value()));var i=this.__index__>=this.__values__.length,v=i?e:this.__values__[this.__index__++];return{done:i,value:v}}function uO(){return this}function hO(i){for(var v,R=this;R instanceof qc;){var H=L0(R);H.__index__=0,H.__values__=e,v?K.__wrapped__=H:v=H;var K=H;R=R.__wrapped__}return K.__wrapped__=i,v}function dO(){var i=this.__wrapped__;if(i instanceof qt){var v=i;return this.__actions__.length&&(v=new qt(this)),v=v.reverse(),v.__actions__.push({func:au,args:[ff],thisArg:e}),new eo(v,this.__chain__)}return this.thru(ff)}function fO(){return n0(this.__wrapped__,this.__actions__)}var pO=Qc(function(i,v,R){cn.call(i,R)?++i[R]:No(i,R,1)});function gO(i,v,R){var H=Et(i)?Oo:oI;return R&&si(i,v,R)&&(v=e),H(i,wt(v,3))}function mO(i,v){var R=Et(i)?Lr:Fb;return R(i,wt(v,3))}var vO=f0(O0),yO=f0(N0);function bO(i,v){return Dr(lu(i,v),1)}function wO(i,v){return Dr(lu(i,v),U)}function xO(i,v,R){return R=R===e?1:Lt(R),Dr(lu(i,v),R)}function W0(i,v){var R=Et(i)?vr:ds;return R(i,wt(v,3))}function j0(i,v){var R=Et(i)?Kr:zb;return R(i,wt(v,3))}var CO=Qc(function(i,v,R){cn.call(i,R)?i[R].push(v):No(i,R,[v])});function _O(i,v,R,H){i=xi(i)?i:Da(i),R=R&&!H?Lt(R):0;var K=i.length;return R<0&&(R=br(K+R,0)),fu(i)?R<=K&&i.indexOf(v,R)>-1:!!K&&we(i,v,R)>-1}var AO=jt(function(i,v,R){var H=-1,K=typeof v=="function",te=xi(i)?ke(i.length):[];return ds(i,function(he){te[++H]=K?an(v,he,R):kl(he,v,R)}),te}),kO=Qc(function(i,v,R){No(i,R,v)});function lu(i,v){var R=Et(i)?S:Vb;return R(i,wt(v,3))}function SO(i,v,R,H){return i==null?[]:(Et(v)||(v=v==null?[]:[v]),R=H?e:R,Et(R)||(R=R==null?[]:[R]),Yb(i,v,R))}var $O=Qc(function(i,v,R){i[R?0:1].push(v)},function(){return[[],[]]});function TO(i,v,R){var H=Et(i)?P:Ze,K=arguments.length<3;return H(i,wt(v,4),R,K,ds)}function RO(i,v,R){var H=Et(i)?F:Ze,K=arguments.length<3;return H(i,wt(v,4),R,K,zb)}function EO(i,v){var R=Et(i)?Lr:Fb;return R(i,hu(wt(v,3)))}function MO(i){var v=Et(i)?Ob:_I;return v(i)}function IO(i,v,R){(R?si(i,v,R):v===e)?v=1:v=Lt(v);var H=Et(i)?eI:AI;return H(i,v)}function LO(i){var v=Et(i)?tI:SI;return v(i)}function OO(i){if(i==null)return 0;if(xi(i))return fu(i)?Bt(i):i.length;var v=Jr(i);return v==We||v==zt?i.size:Ud(i).length}function NO(i,v,R){var H=Et(i)?j:$I;return R&&si(i,v,R)&&(v=e),H(i,wt(v,3))}var DO=jt(function(i,v){if(i==null)return[];var R=v.length;return R>1&&si(i,v[0],v[1])?v=[]:R>2&&si(v[0],v[1],v[2])&&(v=[v[0]]),Yb(i,Dr(v,1),[])}),cu=mM||function(){return Ft.Date.now()};function PO(i,v){if(typeof v!="function")throw new _n(g);return i=Lt(i),function(){if(--i<1)return v.apply(this,arguments)}}function H0(i,v,R){return v=R?e:v,v=i&&v==null?i.length:v,Yo(i,D,e,e,e,e,v)}function U0(i,v){var R;if(typeof v!="function")throw new _n(g);return i=Lt(i),function(){return--i>0&&(R=v.apply(this,arguments)),i<=1&&(v=e),R}}var gf=jt(function(i,v,R){var H=y;if(R.length){var K=Ke(R,Oa(gf));H|=C}return Yo(i,H,v,R,K)}),V0=jt(function(i,v,R){var H=y|x;if(R.length){var K=Ke(R,Oa(V0));H|=C}return Yo(v,H,i,R,K)});function q0(i,v,R){v=R?e:v;var H=Yo(i,$,e,e,e,e,e,v);return H.placeholder=q0.placeholder,H}function G0(i,v,R){v=R?e:v;var H=Yo(i,_,e,e,e,e,e,v);return H.placeholder=G0.placeholder,H}function K0(i,v,R){var H,K,te,he,pe,xe,Oe=0,De=!1,Fe=!1,nt=!0;if(typeof i!="function")throw new _n(g);v=io(v)||0,jn(R)&&(De=!!R.leading,Fe="maxWait"in R,te=Fe?br(io(R.maxWait)||0,v):te,nt="trailing"in R?!!R.trailing:nt);function ut(nr){var xo=H,es=K;return H=K=e,Oe=nr,he=i.apply(es,xo),he}function xt(nr){return Oe=nr,pe=El(Ht,v),De?ut(nr):he}function Dt(nr){var xo=nr-xe,es=nr-Oe,pw=v-xo;return Fe?Yr(pw,te-es):pw}function bt(nr){var xo=nr-xe,es=nr-Oe;return xe===e||xo>=v||xo<0||Fe&&es>=te}function Ht(){var nr=cu();if(bt(nr))return Kt(nr);pe=El(Ht,Dt(nr))}function Kt(nr){return pe=e,nt&&H?ut(nr):(H=K=e,he)}function Fi(){pe!==e&&i0(pe),Oe=0,H=xe=K=pe=e}function ai(){return pe===e?he:Kt(cu())}function Bi(){var nr=cu(),xo=bt(nr);if(H=arguments,K=this,xe=nr,xo){if(pe===e)return xt(xe);if(Fe)return i0(pe),pe=El(Ht,v),ut(xe)}return pe===e&&(pe=El(Ht,v)),he}return Bi.cancel=Fi,Bi.flush=ai,Bi}var zO=jt(function(i,v){return Pb(i,1,v)}),FO=jt(function(i,v,R){return Pb(i,io(v)||0,R)});function BO(i){return Yo(i,M)}function uu(i,v){if(typeof i!="function"||v!=null&&typeof v!="function")throw new _n(g);var R=function(){var H=arguments,K=v?v.apply(this,H):H[0],te=R.cache;if(te.has(K))return te.get(K);var he=i.apply(this,H);return R.cache=te.set(K,he)||te,he};return R.cache=new(uu.Cache||Ko),R}uu.Cache=Ko;function hu(i){if(typeof i!="function")throw new _n(g);return function(){var v=arguments;switch(v.length){case 0:return!i.call(this);case 1:return!i.call(this,v[0]);case 2:return!i.call(this,v[0],v[1]);case 3:return!i.call(this,v[0],v[1],v[2])}return!i.apply(this,v)}}function WO(i){return U0(2,i)}var jO=TI(function(i,v){v=v.length==1&&Et(v[0])?S(v[0],Zt(wt())):S(Dr(v,1),Zt(wt()));var R=v.length;return jt(function(H){for(var K=-1,te=Yr(H.length,R);++K<te;)H[K]=v[K].call(this,H[K]);return an(i,this,H)})}),mf=jt(function(i,v){var R=Ke(v,Oa(mf));return Yo(i,C,e,v,R)}),Y0=jt(function(i,v){var R=Ke(v,Oa(Y0));return Yo(i,L,e,v,R)}),HO=Jo(function(i,v){return Yo(i,I,e,e,e,v)});function UO(i,v){if(typeof i!="function")throw new _n(g);return v=v===e?v:Lt(v),jt(i,v)}function VO(i,v){if(typeof i!="function")throw new _n(g);return v=v==null?0:br(Lt(v),0),jt(function(R){var H=R[v],K=gs(R,0,v);return H&&k(K,H),an(i,this,K)})}function qO(i,v,R){var H=!0,K=!0;if(typeof i!="function")throw new _n(g);return jn(R)&&(H="leading"in R?!!R.leading:H,K="trailing"in R?!!R.trailing:K),K0(i,v,{leading:H,maxWait:v,trailing:K})}function GO(i){return H0(i,1)}function KO(i,v){return mf(Qd(v),i)}function YO(){if(!arguments.length)return[];var i=arguments[0];return Et(i)?i:[i]}function JO(i){return to(i,o)}function ZO(i,v){return v=typeof v=="function"?v:e,to(i,o,v)}function XO(i){return to(i,c|o)}function QO(i,v){return v=typeof v=="function"?v:e,to(i,c|o,v)}function eN(i,v){return v==null||Db(i,v,Ar(v))}function wo(i,v){return i===v||i!==i&&v!==v}var tN=ru(Wd),nN=ru(function(i,v){return i>=v}),Ys=jb((function(){return arguments})())?jb:function(i){return Yn(i)&&cn.call(i,"callee")&&!Tb.call(i,"callee")},Et=ke.isArray,rN=us?Zt(us):hI;function xi(i){return i!=null&&du(i.length)&&!Xo(i)}function tr(i){return Yn(i)&&xi(i)}function iN(i){return i===!0||i===!1||Yn(i)&&oi(i)==Re}var ms=yM||Tf,oN=Kn?Zt(Kn):dI;function sN(i){return Yn(i)&&i.nodeType===1&&!Ml(i)}function aN(i){if(i==null)return!0;if(xi(i)&&(Et(i)||typeof i=="string"||typeof i.splice=="function"||ms(i)||Na(i)||Ys(i)))return!i.length;var v=Jr(i);if(v==We||v==zt)return!i.size;if(Rl(i))return!Ud(i).length;for(var R in i)if(cn.call(i,R))return!1;return!0}function lN(i,v){return Sl(i,v)}function cN(i,v,R){R=typeof R=="function"?R:e;var H=R?R(i,v):e;return H===e?Sl(i,v,e,R):!!H}function vf(i){if(!Yn(i))return!1;var v=oi(i);return v==He||v==Ue||typeof i.message=="string"&&typeof i.name=="string"&&!Ml(i)}function uN(i){return typeof i=="number"&&Eb(i)}function Xo(i){if(!jn(i))return!1;var v=oi(i);return v==Ge||v==at||v==$e||v==dn}function J0(i){return typeof i=="number"&&i==Lt(i)}function du(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=G}function jn(i){var v=typeof i;return i!=null&&(v=="object"||v=="function")}function Yn(i){return i!=null&&typeof i=="object"}var Z0=Ni?Zt(Ni):pI;function hN(i,v){return i===v||Hd(i,v,af(v))}function dN(i,v,R){return R=typeof R=="function"?R:e,Hd(i,v,af(v),R)}function fN(i){return X0(i)&&i!=+i}function pN(i){if(ZI(i))throw new pt(d);return Hb(i)}function gN(i){return i===null}function mN(i){return i==null}function X0(i){return typeof i=="number"||Yn(i)&&oi(i)==Me}function Ml(i){if(!Yn(i)||oi(i)!=st)return!1;var v=Fc(i);if(v===null)return!0;var R=cn.call(v,"constructor")&&v.constructor;return typeof R=="function"&&R instanceof R&&Nc.call(R)==dM}var yf=Di?Zt(Di):gI;function vN(i){return J0(i)&&i>=-G&&i<=G}var Q0=Xi?Zt(Xi):mI;function fu(i){return typeof i=="string"||!Et(i)&&Yn(i)&&oi(i)==kn}function zi(i){return typeof i=="symbol"||Yn(i)&&oi(i)==mt}var Na=Ws?Zt(Ws):vI;function yN(i){return i===e}function bN(i){return Yn(i)&&Jr(i)==Ot}function wN(i){return Yn(i)&&oi(i)==Sn}var xN=ru(Vd),CN=ru(function(i,v){return i<=v});function ew(i){if(!i)return[];if(xi(i))return fu(i)?Ct(i):wi(i);if(yl&&i[yl])return Ie(i[yl]());var v=Jr(i),R=v==We?Be:v==zt?tt:Da;return R(i)}function Qo(i){if(!i)return i===0?i:0;if(i=io(i),i===U||i===-U){var v=i<0?-1:1;return v*J}return i===i?i:0}function Lt(i){var v=Qo(i),R=v%1;return v===v?R?v-R:v:0}function tw(i){return i?Vs(Lt(i),0,le):0}function io(i){if(typeof i=="number")return i;if(zi(i))return Q;if(jn(i)){var v=typeof i.valueOf=="function"?i.valueOf():i;i=jn(v)?v+"":v}if(typeof i!="string")return i===0?i:+i;i=kt(i);var R=mr.test(i);return R||vn.test(i)?_t(i.slice(2),R?2:8):To.test(i)?Q:+i}function nw(i){return Po(i,Ci(i))}function _N(i){return i?Vs(Lt(i),-G,G):i===0?i:0}function un(i){return i==null?"":Pi(i)}var AN=Ia(function(i,v){if(Rl(v)||xi(v)){Po(v,Ar(v),i);return}for(var R in v)cn.call(v,R)&&_l(i,R,v[R])}),rw=Ia(function(i,v){Po(v,Ci(v),i)}),iw=Ia(function(i,v,R,H){Po(v,Ci(v),i,H)}),bf=Ia(function(i,v,R,H){Po(v,Ar(v),i,H)}),kN=Jo(zd);function SN(i,v){var R=Ma(i);return v==null?R:Nb(R,v)}var $N=jt(function(i,v){i=Wt(i);var R=-1,H=v.length,K=H>2?v[2]:e;for(K&&si(v[0],v[1],K)&&(H=1);++R<H;)for(var te=v[R],he=Ci(te),pe=-1,xe=he.length;++pe<xe;){var Oe=he[pe],De=i[Oe];(De===e||wo(De,qo[Oe])&&!cn.call(i,Oe))&&(i[Oe]=te[Oe])}return i}),TN=jt(function(i){return i.push(e,w0),an(ow,e,i)});function RN(i,v){return oe(i,wt(v,3),Do)}function EN(i,v){return oe(i,wt(v,3),Bd)}function MN(i,v){return i==null?i:Fd(i,wt(v,3),Ci)}function IN(i,v){return i==null?i:Bb(i,wt(v,3),Ci)}function LN(i,v){return i&&Do(i,wt(v,3))}function ON(i,v){return i&&Bd(i,wt(v,3))}function NN(i){return i==null?[]:Yc(i,Ar(i))}function DN(i){return i==null?[]:Yc(i,Ci(i))}function wf(i,v,R){var H=i==null?e:qs(i,v);return H===e?R:H}function PN(i,v){return i!=null&&_0(i,v,aI)}function xf(i,v){return i!=null&&_0(i,v,lI)}var zN=g0(function(i,v,R){v!=null&&typeof v.toString!="function"&&(v=Dc.call(v)),i[v]=R},_f(_i)),FN=g0(function(i,v,R){v!=null&&typeof v.toString!="function"&&(v=Dc.call(v)),cn.call(i,v)?i[v].push(R):i[v]=[R]},wt),BN=jt(kl);function Ar(i){return xi(i)?Lb(i):Ud(i)}function Ci(i){return xi(i)?Lb(i,!0):yI(i)}function WN(i,v){var R={};return v=wt(v,3),Do(i,function(H,K,te){No(R,v(H,K,te),H)}),R}function jN(i,v){var R={};return v=wt(v,3),Do(i,function(H,K,te){No(R,K,v(H,K,te))}),R}var HN=Ia(function(i,v,R){Jc(i,v,R)}),ow=Ia(function(i,v,R,H){Jc(i,v,R,H)}),UN=Jo(function(i,v){var R={};if(i==null)return R;var H=!1;v=S(v,function(te){return te=ps(te,i),H||(H=te.length>1),te}),Po(i,of(i),R),H&&(R=to(R,c|h|o,FI));for(var K=v.length;K--;)Jd(R,v[K]);return R});function VN(i,v){return sw(i,hu(wt(v)))}var qN=Jo(function(i,v){return i==null?{}:wI(i,v)});function sw(i,v){if(i==null)return{};var R=S(of(i),function(H){return[H]});return v=wt(v),Jb(i,R,function(H,K){return v(H,K[0])})}function GN(i,v,R){v=ps(v,i);var H=-1,K=v.length;for(K||(K=1,i=e);++H<K;){var te=i==null?e:i[bo(v[H])];te===e&&(H=K,te=R),i=Xo(te)?te.call(i):te}return i}function KN(i,v,R){return i==null?i:$l(i,v,R)}function YN(i,v,R,H){return H=typeof H=="function"?H:e,i==null?i:$l(i,v,R,H)}var aw=y0(Ar),lw=y0(Ci);function JN(i,v,R){var H=Et(i),K=H||ms(i)||Na(i);if(v=wt(v,4),R==null){var te=i&&i.constructor;K?R=H?new te:[]:jn(i)?R=Xo(te)?Ma(Fc(i)):{}:R={}}return(K?vr:Do)(i,function(he,pe,xe){return v(R,he,pe,xe)}),R}function ZN(i,v){return i==null?!0:Jd(i,v)}function XN(i,v,R){return i==null?i:t0(i,v,Qd(R))}function QN(i,v,R,H){return H=typeof H=="function"?H:e,i==null?i:t0(i,v,Qd(R),H)}function Da(i){return i==null?[]:It(i,Ar(i))}function e2(i){return i==null?[]:It(i,Ci(i))}function t2(i,v,R){return R===e&&(R=v,v=e),R!==e&&(R=io(R),R=R===R?R:0),v!==e&&(v=io(v),v=v===v?v:0),Vs(io(i),v,R)}function n2(i,v,R){return v=Qo(v),R===e?(R=v,v=0):R=Qo(R),i=io(i),cI(i,v,R)}function r2(i,v,R){if(R&&typeof R!="boolean"&&si(i,v,R)&&(v=R=e),R===e&&(typeof v=="boolean"?(R=v,v=e):typeof i=="boolean"&&(R=i,i=e)),i===e&&v===e?(i=0,v=1):(i=Qo(i),v===e?(v=i,i=0):v=Qo(v)),i>v){var H=i;i=v,v=H}if(R||i%1||v%1){var K=Mb();return Yr(i+K*(v-i+Cn("1e-"+((K+"").length-1))),v)}return Gd(i,v)}var i2=La(function(i,v,R){return v=v.toLowerCase(),i+(R?cw(v):v)});function cw(i){return Cf(un(i).toLowerCase())}function uw(i){return i=un(i),i&&i.replace(ho,V).replace(mo,"")}function o2(i,v,R){i=un(i),v=Pi(v);var H=i.length;R=R===e?H:Vs(Lt(R),0,H);var K=R;return R-=v.length,R>=0&&i.slice(R,K)==v}function s2(i){return i=un(i),i&&Cr.test(i)?i.replace(Ri,Z):i}function a2(i){return i=un(i),i&&Tn.test(i)?i.replace(Ur,"\\$&"):i}var l2=La(function(i,v,R){return i+(R?"-":"")+v.toLowerCase()}),c2=La(function(i,v,R){return i+(R?" ":"")+v.toLowerCase()}),u2=d0("toLowerCase");function h2(i,v,R){i=un(i),v=Lt(v);var H=v?Bt(i):0;if(!v||H>=v)return i;var K=(v-H)/2;return nu(Hc(K),R)+i+nu(jc(K),R)}function d2(i,v,R){i=un(i),v=Lt(v);var H=v?Bt(i):0;return v&&H<v?i+nu(v-H,R):i}function f2(i,v,R){i=un(i),v=Lt(v);var H=v?Bt(i):0;return v&&H<v?nu(v-H,R)+i:i}function p2(i,v,R){return R||v==null?v=0:v&&(v=+v),CM(un(i).replace(Qn,""),v||0)}function g2(i,v,R){return(R?si(i,v,R):v===e)?v=1:v=Lt(v),Kd(un(i),v)}function m2(){var i=arguments,v=un(i[0]);return i.length<3?v:v.replace(i[1],i[2])}var v2=La(function(i,v,R){return i+(R?"_":"")+v.toLowerCase()});function y2(i,v,R){return R&&typeof R!="number"&&si(i,v,R)&&(v=R=e),R=R===e?le:R>>>0,R?(i=un(i),i&&(typeof v=="string"||v!=null&&!yf(v))&&(v=Pi(v),!v&&ge(i))?gs(Ct(i),0,R):i.split(v,R)):[]}var b2=La(function(i,v,R){return i+(R?" ":"")+Cf(v)});function w2(i,v,R){return i=un(i),R=R==null?0:Vs(Lt(R),0,i.length),v=Pi(v),i.slice(R,R+v.length)==v}function x2(i,v,R){var H=ee.templateSettings;R&&si(i,v,R)&&(v=e),i=un(i),v=bf({},v,H,b0);var K=bf({},v.imports,H.imports,b0),te=Ar(K),he=It(K,te);vr(te,function(bt){if(fn.test(bt))throw new pt(u)});var pe,xe,Oe=0,De=v.interpolate||er,Fe="__p += '",nt=bi((v.escape||er).source+"|"+De.source+"|"+(De===di?pi:er).source+"|"+(v.evaluate||er).source+"|$","g"),ut="//# sourceURL="+(cn.call(v,"sourceURL")?(v.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Bs+"]")+`
1462
+ `;i.replace(nt,function(bt,Ht,Kt,Fi,ai,Bi){return Kt||(Kt=Fi),Fe+=i.slice(Oe,Bi).replace(Mr,se),Ht&&(pe=!0,Fe+=`' +
1463
+ __e(`+Ht+`) +
1464
+ '`),ai&&(xe=!0,Fe+=`';
1465
+ `+ai+`;
1466
+ __p += '`),Kt&&(Fe+=`' +
1467
+ ((__t = (`+Kt+`)) == null ? '' : __t) +
1468
+ '`),Oe=Bi+bt.length,bt}),Fe+=`';
1469
+ `;var xt=cn.call(v,"variable")&&v.variable;if(!xt)Fe=`with (obj) {
1470
+ `+Fe+`
1471
+ }
1472
+ `;else if(fn.test(xt))throw new pt(w);Fe=(xe?Fe.replace(qn,""):Fe).replace(Ti,"$1").replace(gr,"$1;"),Fe="function("+(xt||"obj")+`) {
1473
+ `+(xt?"":`obj || (obj = {});
1474
+ `)+"var __t, __p = ''"+(pe?", __e = _.escape":"")+(xe?`, __j = Array.prototype.join;
1475
+ function print() { __p += __j.call(arguments, '') }
1476
+ `:`;
1477
+ `)+Fe+`return __p
1478
+ }`;var Dt=dw(function(){return $t(te,ut+"return "+Fe).apply(e,he)});if(Dt.source=Fe,vf(Dt))throw Dt;return Dt}function C2(i){return un(i).toLowerCase()}function _2(i){return un(i).toUpperCase()}function A2(i,v,R){if(i=un(i),i&&(R||v===e))return kt(i);if(!i||!(v=Pi(v)))return i;var H=Ct(i),K=Ct(v),te=ur(H,K),he=yr(H,K)+1;return gs(H,te,he).join("")}function k2(i,v,R){if(i=un(i),i&&(R||v===e))return i.slice(0,yt(i)+1);if(!i||!(v=Pi(v)))return i;var H=Ct(i),K=yr(H,Ct(v))+1;return gs(H,0,K).join("")}function S2(i,v,R){if(i=un(i),i&&(R||v===e))return i.replace(Qn,"");if(!i||!(v=Pi(v)))return i;var H=Ct(i),K=ur(H,Ct(v));return gs(H,K).join("")}function $2(i,v){var R=W,H=z;if(jn(v)){var K="separator"in v?v.separator:K;R="length"in v?Lt(v.length):R,H="omission"in v?Pi(v.omission):H}i=un(i);var te=i.length;if(ge(i)){var he=Ct(i);te=he.length}if(R>=te)return i;var pe=R-Bt(H);if(pe<1)return H;var xe=he?gs(he,0,pe).join(""):i.slice(0,pe);if(K===e)return xe+H;if(he&&(pe+=xe.length-pe),yf(K)){if(i.slice(pe).search(K)){var Oe,De=xe;for(K.global||(K=bi(K.source,un(Nt.exec(K))+"g")),K.lastIndex=0;Oe=K.exec(De);)var Fe=Oe.index;xe=xe.slice(0,Fe===e?pe:Fe)}}else if(i.indexOf(Pi(K),pe)!=pe){var nt=xe.lastIndexOf(K);nt>-1&&(xe=xe.slice(0,nt))}return xe+H}function T2(i){return i=un(i),i&&ls.test(i)?i.replace(Hi,ht):i}var R2=La(function(i,v,R){return i+(R?" ":"")+v.toUpperCase()}),Cf=d0("toUpperCase");function hw(i,v,R){return i=un(i),v=R?e:v,v===e?_e(i)?hr(i):X(i):i.match(v)||[]}var dw=jt(function(i,v){try{return an(i,e,v)}catch(R){return vf(R)?R:new pt(R)}}),E2=Jo(function(i,v){return vr(v,function(R){R=bo(R),No(i,R,gf(i[R],i))}),i});function M2(i){var v=i==null?0:i.length,R=wt();return i=v?S(i,function(H){if(typeof H[1]!="function")throw new _n(g);return[R(H[0]),H[1]]}):[],jt(function(H){for(var K=-1;++K<v;){var te=i[K];if(an(te[0],this,H))return an(te[1],this,H)}})}function I2(i){return iI(to(i,c))}function _f(i){return function(){return i}}function L2(i,v){return i==null||i!==i?v:i}var O2=p0(),N2=p0(!0);function _i(i){return i}function Af(i){return Ub(typeof i=="function"?i:to(i,c))}function D2(i){return qb(to(i,c))}function P2(i,v){return Gb(i,to(v,c))}var z2=jt(function(i,v){return function(R){return kl(R,i,v)}}),F2=jt(function(i,v){return function(R){return kl(i,R,v)}});function kf(i,v,R){var H=Ar(v),K=Yc(v,H);R==null&&!(jn(v)&&(K.length||!H.length))&&(R=v,v=i,i=this,K=Yc(v,Ar(v)));var te=!(jn(R)&&"chain"in R)||!!R.chain,he=Xo(i);return vr(K,function(pe){var xe=v[pe];i[pe]=xe,he&&(i.prototype[pe]=function(){var Oe=this.__chain__;if(te||Oe){var De=i(this.__wrapped__),Fe=De.__actions__=wi(this.__actions__);return Fe.push({func:xe,args:arguments,thisArg:i}),De.__chain__=Oe,De}return xe.apply(i,k([this.value()],arguments))})}),i}function B2(){return Ft._===this&&(Ft._=fM),this}function Sf(){}function W2(i){return i=Lt(i),jt(function(v){return Kb(v,i)})}var j2=tf(S),H2=tf(Oo),U2=tf(j);function fw(i){return cf(i)?Pe(bo(i)):xI(i)}function V2(i){return function(v){return i==null?e:qs(i,v)}}var q2=m0(),G2=m0(!0);function $f(){return[]}function Tf(){return!1}function K2(){return{}}function Y2(){return""}function J2(){return!0}function Z2(i,v){if(i=Lt(i),i<1||i>G)return[];var R=le,H=Yr(i,le);v=wt(v),i-=le;for(var K=ot(H,v);++R<i;)v(R);return K}function X2(i){return Et(i)?S(i,bo):zi(i)?[i]:wi(I0(un(i)))}function Q2(i){var v=++hM;return un(i)+v}var eD=tu(function(i,v){return i+v},0),tD=nf("ceil"),nD=tu(function(i,v){return i/v},1),rD=nf("floor");function iD(i){return i&&i.length?Kc(i,_i,Wd):e}function oD(i,v){return i&&i.length?Kc(i,wt(v,2),Wd):e}function sD(i){return Ce(i,_i)}function aD(i,v){return Ce(i,wt(v,2))}function lD(i){return i&&i.length?Kc(i,_i,Vd):e}function cD(i,v){return i&&i.length?Kc(i,wt(v,2),Vd):e}var uD=tu(function(i,v){return i*v},1),hD=nf("round"),dD=tu(function(i,v){return i-v},0);function fD(i){return i&&i.length?rt(i,_i):0}function pD(i,v){return i&&i.length?rt(i,wt(v,2)):0}return ee.after=PO,ee.ary=H0,ee.assign=AN,ee.assignIn=rw,ee.assignInWith=iw,ee.assignWith=bf,ee.at=kN,ee.before=U0,ee.bind=gf,ee.bindAll=E2,ee.bindKey=V0,ee.castArray=YO,ee.chain=B0,ee.chunk=iL,ee.compact=oL,ee.concat=sL,ee.cond=M2,ee.conforms=I2,ee.constant=_f,ee.countBy=pO,ee.create=SN,ee.curry=q0,ee.curryRight=G0,ee.debounce=K0,ee.defaults=$N,ee.defaultsDeep=TN,ee.defer=zO,ee.delay=FO,ee.difference=aL,ee.differenceBy=lL,ee.differenceWith=cL,ee.drop=uL,ee.dropRight=hL,ee.dropRightWhile=dL,ee.dropWhile=fL,ee.fill=pL,ee.filter=mO,ee.flatMap=bO,ee.flatMapDeep=wO,ee.flatMapDepth=xO,ee.flatten=D0,ee.flattenDeep=gL,ee.flattenDepth=mL,ee.flip=BO,ee.flow=O2,ee.flowRight=N2,ee.fromPairs=vL,ee.functions=NN,ee.functionsIn=DN,ee.groupBy=CO,ee.initial=bL,ee.intersection=wL,ee.intersectionBy=xL,ee.intersectionWith=CL,ee.invert=zN,ee.invertBy=FN,ee.invokeMap=AO,ee.iteratee=Af,ee.keyBy=kO,ee.keys=Ar,ee.keysIn=Ci,ee.map=lu,ee.mapKeys=WN,ee.mapValues=jN,ee.matches=D2,ee.matchesProperty=P2,ee.memoize=uu,ee.merge=HN,ee.mergeWith=ow,ee.method=z2,ee.methodOf=F2,ee.mixin=kf,ee.negate=hu,ee.nthArg=W2,ee.omit=UN,ee.omitBy=VN,ee.once=WO,ee.orderBy=SO,ee.over=j2,ee.overArgs=jO,ee.overEvery=H2,ee.overSome=U2,ee.partial=mf,ee.partialRight=Y0,ee.partition=$O,ee.pick=qN,ee.pickBy=sw,ee.property=fw,ee.propertyOf=V2,ee.pull=SL,ee.pullAll=z0,ee.pullAllBy=$L,ee.pullAllWith=TL,ee.pullAt=RL,ee.range=q2,ee.rangeRight=G2,ee.rearg=HO,ee.reject=EO,ee.remove=EL,ee.rest=UO,ee.reverse=ff,ee.sampleSize=IO,ee.set=KN,ee.setWith=YN,ee.shuffle=LO,ee.slice=ML,ee.sortBy=DO,ee.sortedUniq=zL,ee.sortedUniqBy=FL,ee.split=y2,ee.spread=VO,ee.tail=BL,ee.take=WL,ee.takeRight=jL,ee.takeRightWhile=HL,ee.takeWhile=UL,ee.tap=oO,ee.throttle=qO,ee.thru=au,ee.toArray=ew,ee.toPairs=aw,ee.toPairsIn=lw,ee.toPath=X2,ee.toPlainObject=nw,ee.transform=JN,ee.unary=GO,ee.union=VL,ee.unionBy=qL,ee.unionWith=GL,ee.uniq=KL,ee.uniqBy=YL,ee.uniqWith=JL,ee.unset=ZN,ee.unzip=pf,ee.unzipWith=F0,ee.update=XN,ee.updateWith=QN,ee.values=Da,ee.valuesIn=e2,ee.without=ZL,ee.words=hw,ee.wrap=KO,ee.xor=XL,ee.xorBy=QL,ee.xorWith=eO,ee.zip=tO,ee.zipObject=nO,ee.zipObjectDeep=rO,ee.zipWith=iO,ee.entries=aw,ee.entriesIn=lw,ee.extend=rw,ee.extendWith=iw,kf(ee,ee),ee.add=eD,ee.attempt=dw,ee.camelCase=i2,ee.capitalize=cw,ee.ceil=tD,ee.clamp=t2,ee.clone=JO,ee.cloneDeep=XO,ee.cloneDeepWith=QO,ee.cloneWith=ZO,ee.conformsTo=eN,ee.deburr=uw,ee.defaultTo=L2,ee.divide=nD,ee.endsWith=o2,ee.eq=wo,ee.escape=s2,ee.escapeRegExp=a2,ee.every=gO,ee.find=vO,ee.findIndex=O0,ee.findKey=RN,ee.findLast=yO,ee.findLastIndex=N0,ee.findLastKey=EN,ee.floor=rD,ee.forEach=W0,ee.forEachRight=j0,ee.forIn=MN,ee.forInRight=IN,ee.forOwn=LN,ee.forOwnRight=ON,ee.get=wf,ee.gt=tN,ee.gte=nN,ee.has=PN,ee.hasIn=xf,ee.head=P0,ee.identity=_i,ee.includes=_O,ee.indexOf=yL,ee.inRange=n2,ee.invoke=BN,ee.isArguments=Ys,ee.isArray=Et,ee.isArrayBuffer=rN,ee.isArrayLike=xi,ee.isArrayLikeObject=tr,ee.isBoolean=iN,ee.isBuffer=ms,ee.isDate=oN,ee.isElement=sN,ee.isEmpty=aN,ee.isEqual=lN,ee.isEqualWith=cN,ee.isError=vf,ee.isFinite=uN,ee.isFunction=Xo,ee.isInteger=J0,ee.isLength=du,ee.isMap=Z0,ee.isMatch=hN,ee.isMatchWith=dN,ee.isNaN=fN,ee.isNative=pN,ee.isNil=mN,ee.isNull=gN,ee.isNumber=X0,ee.isObject=jn,ee.isObjectLike=Yn,ee.isPlainObject=Ml,ee.isRegExp=yf,ee.isSafeInteger=vN,ee.isSet=Q0,ee.isString=fu,ee.isSymbol=zi,ee.isTypedArray=Na,ee.isUndefined=yN,ee.isWeakMap=bN,ee.isWeakSet=wN,ee.join=_L,ee.kebabCase=l2,ee.last=ro,ee.lastIndexOf=AL,ee.lowerCase=c2,ee.lowerFirst=u2,ee.lt=xN,ee.lte=CN,ee.max=iD,ee.maxBy=oD,ee.mean=sD,ee.meanBy=aD,ee.min=lD,ee.minBy=cD,ee.stubArray=$f,ee.stubFalse=Tf,ee.stubObject=K2,ee.stubString=Y2,ee.stubTrue=J2,ee.multiply=uD,ee.nth=kL,ee.noConflict=B2,ee.noop=Sf,ee.now=cu,ee.pad=h2,ee.padEnd=d2,ee.padStart=f2,ee.parseInt=p2,ee.random=r2,ee.reduce=TO,ee.reduceRight=RO,ee.repeat=g2,ee.replace=m2,ee.result=GN,ee.round=hD,ee.runInContext=me,ee.sample=MO,ee.size=OO,ee.snakeCase=v2,ee.some=NO,ee.sortedIndex=IL,ee.sortedIndexBy=LL,ee.sortedIndexOf=OL,ee.sortedLastIndex=NL,ee.sortedLastIndexBy=DL,ee.sortedLastIndexOf=PL,ee.startCase=b2,ee.startsWith=w2,ee.subtract=dD,ee.sum=fD,ee.sumBy=pD,ee.template=x2,ee.times=Z2,ee.toFinite=Qo,ee.toInteger=Lt,ee.toLength=tw,ee.toLower=C2,ee.toNumber=io,ee.toSafeInteger=_N,ee.toString=un,ee.toUpper=_2,ee.trim=A2,ee.trimEnd=k2,ee.trimStart=S2,ee.truncate=$2,ee.unescape=T2,ee.uniqueId=Q2,ee.upperCase=R2,ee.upperFirst=Cf,ee.each=W0,ee.eachRight=j0,ee.first=P0,kf(ee,(function(){var i={};return Do(ee,function(v,R){cn.call(ee.prototype,R)||(i[R]=v)}),i})(),{chain:!1}),ee.VERSION=r,vr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){ee[i].placeholder=ee}),vr(["drop","take"],function(i,v){qt.prototype[i]=function(R){R=R===e?1:br(Lt(R),0);var H=this.__filtered__&&!v?new qt(this):this.clone();return H.__filtered__?H.__takeCount__=Yr(R,H.__takeCount__):H.__views__.push({size:Yr(R,le),type:i+(H.__dir__<0?"Right":"")}),H},qt.prototype[i+"Right"]=function(R){return this.reverse()[i](R).reverse()}}),vr(["filter","map","takeWhile"],function(i,v){var R=v+1,H=R==A||R==B;qt.prototype[i]=function(K){var te=this.clone();return te.__iteratees__.push({iteratee:wt(K,3),type:R}),te.__filtered__=te.__filtered__||H,te}}),vr(["head","last"],function(i,v){var R="take"+(v?"Right":"");qt.prototype[i]=function(){return this[R](1).value()[0]}}),vr(["initial","tail"],function(i,v){var R="drop"+(v?"":"Right");qt.prototype[i]=function(){return this.__filtered__?new qt(this):this[R](1)}}),qt.prototype.compact=function(){return this.filter(_i)},qt.prototype.find=function(i){return this.filter(i).head()},qt.prototype.findLast=function(i){return this.reverse().find(i)},qt.prototype.invokeMap=jt(function(i,v){return typeof i=="function"?new qt(this):this.map(function(R){return kl(R,i,v)})}),qt.prototype.reject=function(i){return this.filter(hu(wt(i)))},qt.prototype.slice=function(i,v){i=Lt(i);var R=this;return R.__filtered__&&(i>0||v<0)?new qt(R):(i<0?R=R.takeRight(-i):i&&(R=R.drop(i)),v!==e&&(v=Lt(v),R=v<0?R.dropRight(-v):R.take(v-i)),R)},qt.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},qt.prototype.toArray=function(){return this.take(le)},Do(qt.prototype,function(i,v){var R=/^(?:filter|find|map|reject)|While$/.test(v),H=/^(?:head|last)$/.test(v),K=ee[H?"take"+(v=="last"?"Right":""):v],te=H||/^find/.test(v);K&&(ee.prototype[v]=function(){var he=this.__wrapped__,pe=H?[1]:arguments,xe=he instanceof qt,Oe=pe[0],De=xe||Et(he),Fe=function(Ht){var Kt=K.apply(ee,k([Ht],pe));return H&&nt?Kt[0]:Kt};De&&R&&typeof Oe=="function"&&Oe.length!=1&&(xe=De=!1);var nt=this.__chain__,ut=!!this.__actions__.length,xt=te&&!nt,Dt=xe&&!ut;if(!te&&De){he=Dt?he:new qt(this);var bt=i.apply(he,pe);return bt.__actions__.push({func:au,args:[Fe],thisArg:e}),new eo(bt,nt)}return xt&&Dt?i.apply(this,pe):(bt=this.thru(Fe),xt?H?bt.value()[0]:bt.value():bt)})}),vr(["pop","push","shift","sort","splice","unshift"],function(i){var v=Qi[i],R=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",H=/^(?:pop|shift)$/.test(i);ee.prototype[i]=function(){var K=arguments;if(H&&!this.__chain__){var te=this.value();return v.apply(Et(te)?te:[],K)}return this[R](function(he){return v.apply(Et(he)?he:[],K)})}}),Do(qt.prototype,function(i,v){var R=ee[v];if(R){var H=R.name+"";cn.call(Ea,H)||(Ea[H]=[]),Ea[H].push({name:v,func:R})}}),Ea[eu(e,x).name]=[{name:"wrapper",func:e}],qt.prototype.clone=RM,qt.prototype.reverse=EM,qt.prototype.value=MM,ee.prototype.at=sO,ee.prototype.chain=aO,ee.prototype.commit=lO,ee.prototype.next=cO,ee.prototype.plant=hO,ee.prototype.reverse=dO,ee.prototype.toJSON=ee.prototype.valueOf=ee.prototype.value=fO,ee.prototype.first=ee.prototype.head,yl&&(ee.prototype[yl]=uO),ee}),gn=ln();cr?((cr.exports=gn)._=gn,Gr._=gn):Ft._=gn}).call(iA)})(Ql,Ql.exports)),Ql.exports}var sA=oA();Hn("b",Xl(sA)).debounce(function(){this.rebuildDisplayText()},300);var zg={exports:{}},Fg;function aA(){return Fg||(Fg=1,(function(t,n){(function(){ace.require(["ace/mode/text"],function(e){t&&(t.exports=e)})})()})(zg)),zg.exports}aA();const lA=!0,dr="u-",cA="uplot",uA=dr+"hz",hA=dr+"vt",dA=dr+"title",fA=dr+"wrap",pA=dr+"under",gA=dr+"over",mA=dr+"axis",$s=dr+"off",vA=dr+"select",yA=dr+"cursor-x",bA=dr+"cursor-y",wA=dr+"cursor-pt",xA=dr+"legend",CA=dr+"live",_A=dr+"inline",AA=dr+"series",kA=dr+"marker",Bg=dr+"label",SA=dr+"value",Xa="width",Qa="height",el="top",Wg="bottom",aa="left",Vu="right",qu="#000",jg=qu+"0",Gu="mousemove",Hg="mousedown",Ku="mouseup",Ug="mouseenter",Vg="mouseleave",qg="dblclick",$A="resize",TA="scroll",Gg="change",ec="dppxchange",Yu="--",la=typeof window<"u",Ju=la?document:null,ca=la?window:null,RA=la?navigator:null;let rn,tc;function Zu(){let t=devicePixelRatio;rn!=t&&(rn=t,tc&&eh(Gg,tc,Zu),tc=matchMedia(`(min-resolution: ${rn-.001}dppx) and (max-resolution: ${rn+.001}dppx)`),Ts(Gg,tc,Zu),ca.dispatchEvent(new CustomEvent(ec)))}function Ai(t,n){if(n!=null){let e=t.classList;!e.contains(n)&&e.add(n)}}function Xu(t,n){let e=t.classList;e.contains(n)&&e.remove(n)}function An(t,n,e){t.style[n]=e+"px"}function ao(t,n,e,r){let m=Ju.createElement(t);return n!=null&&Ai(m,n),e?.insertBefore(m,r),m}function Wi(t,n){return ao("div",t,n)}const Kg=new WeakMap;function Ao(t,n,e,r,m){let d="translate("+n+"px,"+e+"px)",g=Kg.get(t);d!=g&&(t.style.transform=d,Kg.set(t,d),n<0||e<0||n>r||e>m?Ai(t,$s):Xu(t,$s))}const Yg=new WeakMap;function Jg(t,n,e){let r=n+e,m=Yg.get(t);r!=m&&(Yg.set(t,r),t.style.background=n,t.style.borderColor=e)}const Zg=new WeakMap;function Xg(t,n,e,r){let m=n+""+e,d=Zg.get(t);m!=d&&(Zg.set(t,m),t.style.height=e+"px",t.style.width=n+"px",t.style.marginLeft=r?-n/2+"px":0,t.style.marginTop=r?-e/2+"px":0)}const Qu={passive:!0},EA={...Qu,capture:!0};function Ts(t,n,e,r){n.addEventListener(t,e,r?EA:Qu)}function eh(t,n,e,r){n.removeEventListener(t,e,Qu)}la&&Zu();function lo(t,n,e,r){let m;e=e||0,r=r||n.length-1;let d=r<=2147483647;for(;r-e>1;)m=d?e+r>>1:Si((e+r)/2),n[m]<t?e=m:r=m;return t-n[e]<=n[r]-t?e:r}function Qg(t){return(n,e,r)=>{let m=-1,d=-1;for(let g=e;g<=r;g++)if(t(n[g])){m=g;break}for(let g=r;g>=e;g--)if(t(n[g])){d=g;break}return[m,d]}}const em=t=>t!=null,tm=t=>t!=null&&t>0,nc=Qg(em),MA=Qg(tm);function IA(t,n,e,r=0,m=!1){let d=m?MA:nc,g=m?tm:em;[n,e]=d(t,n,e);let w=t[n],u=t[n];if(n>-1)if(r==1)w=t[n],u=t[e];else if(r==-1)w=t[e],u=t[n];else for(let f=n;f<=e;f++){let a=t[f];g(a)&&(a<w?w=a:a>u&&(u=a))}return[w??yn,u??-yn]}function rc(t,n,e,r){let m=im(t),d=im(n);t==n&&(m==-1?(t*=e,n/=e):(t/=e,n*=e));let g=e==10?Fo:om,w=m==1?Si:ji,u=d==1?ji:Si,f=w(g(fr(t))),a=u(g(fr(n))),s=ua(e,f),c=ua(e,a);return e==10&&(f<0&&(s=bn(s,-f)),a<0&&(c=bn(c,-a))),r||e==2?(t=s*m,n=c*d):(t=dm(t,s),n=sc(n,c)),[t,n]}function th(t,n,e,r){let m=rc(t,n,e,r);return t==0&&(m[0]=0),n==0&&(m[1]=0),m}const nh=.1,nm={mode:3,pad:nh},tl={pad:0,soft:null,mode:0},LA={min:tl,max:tl};function ic(t,n,e,r){return ac(e)?rm(t,n,e):(tl.pad=e,tl.soft=r?0:null,tl.mode=r?3:0,rm(t,n,LA))}function en(t,n){return t??n}function OA(t,n,e){for(n=en(n,0),e=en(e,t.length-1);n<=e;){if(t[n]!=null)return!0;n++}return!1}function rm(t,n,e){let r=e.min,m=e.max,d=en(r.pad,0),g=en(m.pad,0),w=en(r.hard,-yn),u=en(m.hard,yn),f=en(r.soft,yn),a=en(m.soft,-yn),s=en(r.mode,0),c=en(m.mode,0),h=n-t,o=Fo(h),l=Xr(fr(t),fr(n)),p=Fo(l),y=fr(p-o);(h<1e-24||y>10)&&(h=0,(t==0||n==0)&&(h=1e-24,s==2&&f!=yn&&(d=0),c==2&&a!=-yn&&(g=0)));let x=h||l||1e3,E=Fo(x),$=ua(10,Si(E)),_=x*(h==0?t==0?.1:1:d),C=bn(dm(t-_,$/10),24),L=t>=f&&(s==1||s==3&&C<=f||s==2&&C>=f)?f:yn,D=Xr(w,C<L&&t>=L?L:co(L,C)),I=x*(h==0?n==0?.1:1:g),M=bn(sc(n+I,$/10),24),W=n<=a&&(c==1||c==3&&M>=a||c==2&&M<=a)?a:-yn,z=co(u,M>W&&n<=W?W:Xr(W,M));return D==z&&D==0&&(z=100),[D,z]}const NA=new Intl.NumberFormat(la?RA.language:"en-US"),rh=t=>NA.format(t),ki=Math,oc=ki.PI,fr=ki.abs,Si=ki.floor,pr=ki.round,ji=ki.ceil,co=ki.min,Xr=ki.max,ua=ki.pow,im=ki.sign,Fo=ki.log10,om=ki.log2,DA=(t,n=1)=>ki.sinh(t)*n,ih=(t,n=1)=>ki.asinh(t/n),yn=1/0;function sm(t){return(Fo((t^t>>31)-(t>>31))|0)+1}function oh(t,n,e){return co(Xr(t,n),e)}function am(t){return typeof t=="function"}function Ut(t){return am(t)?t:()=>t}const PA=()=>{},lm=t=>t,cm=(t,n)=>n,zA=t=>null,um=t=>!0,hm=(t,n)=>t==n,FA=/\.\d*?(?=9{6,}|0{6,})/gm,Rs=t=>{if(pm(t)||is.has(t))return t;const n=`${t}`,e=n.match(FA);if(e==null)return t;let r=e[0].length-1;if(n.indexOf("e-")!=-1){let[m,d]=n.split("e");return+`${Rs(m)}e${d}`}return bn(t,r)};function Es(t,n){return Rs(bn(Rs(t/n))*n)}function sc(t,n){return Rs(ji(Rs(t/n))*n)}function dm(t,n){return Rs(Si(Rs(t/n))*n)}function bn(t,n=0){if(pm(t))return t;let e=10**n,r=t*e*(1+Number.EPSILON);return pr(r)/e}const is=new Map;function fm(t){return((""+t).split(".")[1]||"").length}function nl(t,n,e,r){let m=[],d=r.map(fm);for(let g=n;g<e;g++){let w=fr(g),u=bn(ua(t,g),w);for(let f=0;f<r.length;f++){let a=t==10?+`${r[f]}e${g}`:r[f]*u,s=(g>=0?0:w)+(g>=d[f]?0:d[f]),c=t==10?a:bn(a,s);m.push(c),is.set(c,s)}}return m}const rl={},sh=[],ha=[null,null],os=Array.isArray,pm=Number.isInteger,BA=t=>t===void 0;function gm(t){return typeof t=="string"}function ac(t){let n=!1;if(t!=null){let e=t.constructor;n=e==null||e==Object}return n}function WA(t){return t!=null&&typeof t=="object"}const jA=Object.getPrototypeOf(Uint8Array),mm="__proto__";function da(t,n=ac){let e;if(os(t)){let r=t.find(m=>m!=null);if(os(r)||n(r)){e=Array(t.length);for(let m=0;m<t.length;m++)e[m]=da(t[m],n)}else e=t.slice()}else if(t instanceof jA)e=t.slice();else if(n(t)){e={};for(let r in t)r!=mm&&(e[r]=da(t[r],n))}else e=t;return e}function rr(t){let n=arguments;for(let e=1;e<n.length;e++){let r=n[e];for(let m in r)m!=mm&&(ac(t[m])?rr(t[m],da(r[m])):t[m]=da(r[m]))}return t}const HA=0,UA=1,VA=2;function qA(t,n,e){for(let r=0,m,d=-1;r<n.length;r++){let g=n[r];if(g>d){for(m=g-1;m>=0&&t[m]==null;)t[m--]=null;for(m=g+1;m<e&&t[m]==null;)t[d=m++]=null}}}function GA(t,n){if(JA(t)){let g=t[0].slice();for(let w=1;w<t.length;w++)g.push(...t[w].slice(1));return ZA(g[0])||(g=YA(g)),g}let e=new Set;for(let g=0;g<t.length;g++){let w=t[g][0],u=w.length;for(let f=0;f<u;f++)e.add(w[f])}let r=[Array.from(e).sort((g,w)=>g-w)],m=r[0].length,d=new Map;for(let g=0;g<m;g++)d.set(r[0][g],g);for(let g=0;g<t.length;g++){let w=t[g],u=w[0];for(let f=1;f<w.length;f++){let a=w[f],s=Array(m).fill(void 0),c=n?n[g][f]:UA,h=[];for(let o=0;o<a.length;o++){let l=a[o],p=d.get(u[o]);l===null?c!=HA&&(s[p]=l,c==VA&&h.push(p)):s[p]=l}qA(s,h,m),r.push(s)}}return r}const KA=typeof queueMicrotask>"u"?t=>Promise.resolve().then(t):queueMicrotask;function YA(t){let n=t[0],e=n.length,r=Array(e);for(let d=0;d<r.length;d++)r[d]=d;r.sort((d,g)=>n[d]-n[g]);let m=[];for(let d=0;d<t.length;d++){let g=t[d],w=Array(e);for(let u=0;u<e;u++)w[u]=g[r[u]];m.push(w)}return m}function JA(t){let n=t[0][0],e=n.length;for(let r=1;r<t.length;r++){let m=t[r][0];if(m.length!=e)return!1;if(m!=n){for(let d=0;d<e;d++)if(m[d]!=n[d])return!1}}return!0}function ZA(t,n=100){const e=t.length;if(e<=1)return!0;let r=0,m=e-1;for(;r<=m&&t[r]==null;)r++;for(;m>=r&&t[m]==null;)m--;if(m<=r)return!0;const d=Xr(1,Si((m-r+1)/n));for(let g=t[r],w=r+d;w<=m;w+=d){const u=t[w];if(u!=null){if(u<=g)return!1;g=u}}return!0}const vm=["January","February","March","April","May","June","July","August","September","October","November","December"],ym=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function bm(t){return t.slice(0,3)}const XA=ym.map(bm),QA=vm.map(bm),ek={MMMM:vm,MMM:QA,WWWW:ym,WWW:XA};function il(t){return(t<10?"0":"")+t}function tk(t){return(t<10?"00":t<100?"0":"")+t}const nk={YYYY:t=>t.getFullYear(),YY:t=>(t.getFullYear()+"").slice(2),MMMM:(t,n)=>n.MMMM[t.getMonth()],MMM:(t,n)=>n.MMM[t.getMonth()],MM:t=>il(t.getMonth()+1),M:t=>t.getMonth()+1,DD:t=>il(t.getDate()),D:t=>t.getDate(),WWWW:(t,n)=>n.WWWW[t.getDay()],WWW:(t,n)=>n.WWW[t.getDay()],HH:t=>il(t.getHours()),H:t=>t.getHours(),h:t=>{let n=t.getHours();return n==0?12:n>12?n-12:n},AA:t=>t.getHours()>=12?"PM":"AM",aa:t=>t.getHours()>=12?"pm":"am",a:t=>t.getHours()>=12?"p":"a",mm:t=>il(t.getMinutes()),m:t=>t.getMinutes(),ss:t=>il(t.getSeconds()),s:t=>t.getSeconds(),fff:t=>tk(t.getMilliseconds())};function ah(t,n){n=n||ek;let e=[],r=/\{([a-z]+)\}|[^{]+/gi,m;for(;m=r.exec(t);)e.push(m[0][0]=="{"?nk[m[1]]:m[0]);return d=>{let g="";for(let w=0;w<e.length;w++)g+=typeof e[w]=="string"?e[w]:e[w](d,n);return g}}const rk=new Intl.DateTimeFormat().resolvedOptions().timeZone;function ik(t,n){let e;return n=="UTC"||n=="Etc/UTC"?e=new Date(+t+t.getTimezoneOffset()*6e4):n==rk?e=t:(e=new Date(t.toLocaleString("en-US",{timeZone:n})),e.setMilliseconds(t.getMilliseconds())),e}const wm=t=>t%1==0,lc=[1,2,2.5,5],ok=nl(10,-32,0,lc),xm=nl(10,0,32,lc),sk=xm.filter(wm),Ms=ok.concat(xm),lh=`
1479
+ `,Cm="{YYYY}",_m=lh+Cm,Am="{M}/{D}",ol=lh+Am,cc=ol+"/{YY}",km="{aa}",ak="{h}:{mm}",fa=ak+km,Sm=lh+fa,$m=":{ss}",sn=null;function Tm(t){let n=t*1e3,e=n*60,r=e*60,m=r*24,d=m*30,g=m*365,w=(t==1?nl(10,0,3,lc).filter(wm):nl(10,-3,0,lc)).concat([n,n*5,n*10,n*15,n*30,e,e*5,e*10,e*15,e*30,r,r*2,r*3,r*4,r*6,r*8,r*12,m,m*2,m*3,m*4,m*5,m*6,m*7,m*8,m*9,m*10,m*15,d,d*2,d*3,d*4,d*6,g,g*2,g*5,g*10,g*25,g*50,g*100]);const u=[[g,Cm,sn,sn,sn,sn,sn,sn,1],[m*28,"{MMM}",_m,sn,sn,sn,sn,sn,1],[m,Am,_m,sn,sn,sn,sn,sn,1],[r,"{h}"+km,cc,sn,ol,sn,sn,sn,1],[e,fa,cc,sn,ol,sn,sn,sn,1],[n,$m,cc+" "+fa,sn,ol+" "+fa,sn,Sm,sn,1],[t,$m+".{fff}",cc+" "+fa,sn,ol+" "+fa,sn,Sm,sn,1]];function f(a){return(s,c,h,o,l,p)=>{let y=[],x=l>=g,E=l>=d&&l<g,$=a(h),_=bn($*t,3),C=ch($.getFullYear(),x?0:$.getMonth(),E||x?1:$.getDate()),L=bn(C*t,3);if(E||x){let D=E?l/d:0,I=x?l/g:0,M=_==L?_:bn(ch(C.getFullYear()+I,C.getMonth()+D,1)*t,3),W=new Date(pr(M/t)),z=W.getFullYear(),O=W.getMonth();for(let T=0;M<=o;T++){let A=ch(z+I*T,O+D*T,1),N=A-a(bn(A*t,3));M=bn((+A+N)*t,3),M<=o&&y.push(M)}}else{let D=l>=m?m:l,I=Si(h)-Si(_),M=L+I+sc(_-L,D);y.push(M);let W=a(M),z=W.getHours()+W.getMinutes()/e+W.getSeconds()/r,O=l/r,T=s.axes[c]._space,A=p/T;for(;M=bn(M+l,t==1?0:3),!(M>o);)if(O>1){let N=Si(bn(z+O,6))%24,B=a(M).getHours()-N;B>1&&(B=-1),M-=B*r,z=(z+O)%24;let U=y[y.length-1];bn((M-U)/l,3)*A>=.7&&y.push(M)}else y.push(M)}return y}}return[w,u,f]}const[lk,ck,uk]=Tm(1),[hk,dk,fk]=Tm(.001);nl(2,-53,53,[1]);function Rm(t,n){return t.map(e=>e.map((r,m)=>m==0||m==8||r==null?r:n(m==1||e[8]==0?r:e[1]+r)))}function Em(t,n){return(e,r,m,d,g)=>{let w=n.find(o=>g>=o[0])||n[n.length-1],u,f,a,s,c,h;return r.map(o=>{let l=t(o),p=l.getFullYear(),y=l.getMonth(),x=l.getDate(),E=l.getHours(),$=l.getMinutes(),_=l.getSeconds(),C=p!=u&&w[2]||y!=f&&w[3]||x!=a&&w[4]||E!=s&&w[5]||$!=c&&w[6]||_!=h&&w[7]||w[1];return u=p,f=y,a=x,s=E,c=$,h=_,C(l)})}}function pk(t,n){let e=ah(n);return(r,m,d,g,w)=>m.map(u=>e(t(u)))}function ch(t,n,e){return new Date(t,n,e)}function Mm(t,n){return n(t)}const gk="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function Im(t,n){return(e,r,m,d)=>d==null?Yu:n(t(r))}function mk(t,n){let e=t.series[n];return e.width?e.stroke(t,n):e.points.width?e.points.stroke(t,n):null}function vk(t,n){return t.series[n].fill(t,n)}const yk={show:!0,live:!0,isolate:!1,mount:PA,markers:{show:!0,width:2,stroke:mk,fill:vk,dash:"solid"},idx:null,idxs:null,values:[]};function bk(t,n){let e=t.cursor.points,r=Wi(),m=e.size(t,n);An(r,Xa,m),An(r,Qa,m);let d=m/-2;An(r,"marginLeft",d),An(r,"marginTop",d);let g=e.width(t,n,m);return g&&An(r,"borderWidth",g),r}function wk(t,n){let e=t.series[n].points;return e._fill||e._stroke}function xk(t,n){let e=t.series[n].points;return e._stroke||e._fill}function Ck(t,n){return t.series[n].points.size}const uh=[0,0];function _k(t,n,e){return uh[0]=n,uh[1]=e,uh}function uc(t,n,e,r=!0){return m=>{m.button==0&&(!r||m.target==n)&&e(m)}}function hh(t,n,e,r=!0){return m=>{(!r||m.target==n)&&e(m)}}const Ak={show:!0,x:!0,y:!0,lock:!1,move:_k,points:{one:!1,show:bk,size:Ck,width:0,stroke:xk,fill:wk},bind:{mousedown:uc,mouseup:uc,click:uc,dblclick:uc,mousemove:hh,mouseleave:hh,mouseenter:hh},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(t,n)=>{n.stopPropagation(),n.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(t,n,e,r,m)=>r-m,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},Lm={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},dh=rr({},Lm,{filter:cm}),Om=rr({},dh,{size:10}),Nm=rr({},Lm,{show:!1}),fh='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',Dm="bold "+fh,Pm=1.5,zm={show:!0,scale:"x",stroke:qu,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Dm,side:2,grid:dh,ticks:Om,border:Nm,font:fh,lineGap:Pm,rotate:0},kk="Value",Sk="Time",Fm={show:!0,scale:"x",auto:!1,sorted:1,min:yn,max:-yn,idxs:[]};function $k(t,n,e,r,m){return n.map(d=>d==null?"":rh(d))}function Tk(t,n,e,r,m,d,g){let w=[],u=is.get(m)||0;e=g?e:bn(sc(e,m),u);for(let f=e;f<=r;f=bn(f+m,u))w.push(Object.is(f,-0)?0:f);return w}function ph(t,n,e,r,m,d,g){const w=[],u=t.scales[t.axes[n].scale].log,f=u==10?Fo:om,a=Si(f(e));m=ua(u,a),u==10&&(m=Ms[lo(m,Ms)]);let s=e,c=m*u;u==10&&(c=Ms[lo(c,Ms)]);do w.push(s),s=s+m,u==10&&!is.has(s)&&(s=bn(s,is.get(m))),s>=c&&(m=s,c=m*u,u==10&&(c=Ms[lo(c,Ms)]));while(s<=r);return w}function Rk(t,n,e,r,m,d,g){let w=t.scales[t.axes[n].scale].asinh,u=r>w?ph(t,n,Xr(w,e),r,m):[w],f=r>=0&&e<=0?[0]:[];return(e<-w?ph(t,n,Xr(w,-r),-e,m):[w]).reverse().map(a=>-a).concat(f,u)}const Bm=/./,Ek=/[12357]/,Mk=/[125]/,Wm=/1/,gh=(t,n,e,r)=>t.map((m,d)=>n==4&&m==0||d%r==0&&e.test(m.toExponential()[m<0?1:0])?m:null);function Ik(t,n,e,r,m){let d=t.axes[e],g=d.scale,w=t.scales[g],u=t.valToPos,f=d._space,a=u(10,g),s=u(9,g)-a>=f?Bm:u(7,g)-a>=f?Ek:u(5,g)-a>=f?Mk:Wm;if(s==Wm){let c=fr(u(1,g)-a);if(c<f)return gh(n.slice().reverse(),w.distr,s,ji(f/c)).reverse()}return gh(n,w.distr,s,1)}function Lk(t,n,e,r,m){let d=t.axes[e],g=d.scale,w=d._space,u=t.valToPos,f=fr(u(1,g)-u(2,g));return f<w?gh(n.slice().reverse(),3,Bm,ji(w/f)).reverse():n}function Ok(t,n,e,r){return r==null?Yu:n==null?"":rh(n)}const jm={show:!0,scale:"y",stroke:qu,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Dm,side:3,grid:dh,ticks:Om,border:Nm,font:fh,lineGap:Pm,rotate:0};function Nk(t,n){let e=3+(t||1)*2;return bn(e*n,3)}function Dk(t,n){let{scale:e,idxs:r}=t.series[0],m=t._data[0],d=t.valToPos(m[r[0]],e,!0),g=t.valToPos(m[r[1]],e,!0),w=fr(g-d),u=t.series[n],f=w/(u.points.space*rn);return r[1]-r[0]<=f}const Hm={scale:null,auto:!0,sorted:0,min:yn,max:-yn},Um=(t,n,e,r,m)=>m,Vm={show:!0,auto:!0,sorted:0,gaps:Um,alpha:1,facets:[rr({},Hm,{scale:"x"}),rr({},Hm,{scale:"y"})]},qm={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:Um,alpha:1,points:{show:Dk,filter:null},values:null,min:yn,max:-yn,idxs:[],path:null,clip:null};function Pk(t,n,e,r,m){return e/10}const Gm={time:lA,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},zk=rr({},Gm,{time:!1,ori:1}),Km={};function Ym(t,n){let e=Km[t];return e||(e={key:t,plots:[],sub(r){e.plots.push(r)},unsub(r){e.plots=e.plots.filter(m=>m!=r)},pub(r,m,d,g,w,u,f){for(let a=0;a<e.plots.length;a++)e.plots[a]!=m&&e.plots[a].pub(r,m,d,g,w,u,f)}},t!=null&&(Km[t]=e)),e}const pa=1,mh=2;function Is(t,n,e){const r=t.mode,m=t.series[n],d=r==2?t._data[n]:t._data,g=t.scales,w=t.bbox;let u=d[0],f=r==2?d[1]:d[n],a=r==2?g[m.facets[0].scale]:g[t.series[0].scale],s=r==2?g[m.facets[1].scale]:g[m.scale],c=w.left,h=w.top,o=w.width,l=w.height,p=t.valToPosH,y=t.valToPosV;return a.ori==0?e(m,u,f,a,s,p,y,c,h,o,l,dc,ga,pc,Xm,ev):e(m,u,f,a,s,y,p,h,c,l,o,fc,ma,bh,Qm,tv)}function vh(t,n){let e=0,r=0,m=en(t.bands,sh);for(let d=0;d<m.length;d++){let g=m[d];g.series[0]==n?e=g.dir:g.series[1]==n&&(g.dir==1?r|=1:r|=2)}return[e,r==1?-1:r==2?1:r==3?2:0]}function Fk(t,n,e,r,m){let d=t.mode,g=t.series[n],w=d==2?g.facets[1].scale:g.scale,u=t.scales[w];return m==-1?u.min:m==1?u.max:u.distr==3?u.dir==1?u.min:u.max:0}function Bo(t,n,e,r,m,d){return Is(t,n,(g,w,u,f,a,s,c,h,o,l,p)=>{let y=g.pxRound;const x=f.dir*(f.ori==0?1:-1),E=f.ori==0?ga:ma;let $,_;x==1?($=e,_=r):($=r,_=e);let C=y(s(w[$],f,l,h)),L=y(c(u[$],a,p,o)),D=y(s(w[_],f,l,h)),I=y(c(d==1?a.max:a.min,a,p,o)),M=new Path2D(m);return E(M,D,I),E(M,C,I),E(M,C,L),M})}function hc(t,n,e,r,m,d){let g=null;if(t.length>0){g=new Path2D;const w=n==0?pc:bh;let u=e;for(let s=0;s<t.length;s++){let c=t[s];if(c[1]>c[0]){let h=c[0]-u;h>0&&w(g,u,r,h,r+d),u=c[1]}}let f=e+m-u,a=10;f>0&&w(g,u,r-a/2,f,r+d+a)}return g}function Bk(t,n,e){let r=t[t.length-1];r&&r[0]==n?r[1]=e:t.push([n,e])}function yh(t,n,e,r,m,d,g){let w=[],u=t.length;for(let f=m==1?e:r;f>=e&&f<=r;f+=m)if(n[f]===null){let a=f,s=f;if(m==1)for(;++f<=r&&n[f]===null;)s=f;else for(;--f>=e&&n[f]===null;)s=f;let c=d(t[a]),h=s==a?c:d(t[s]),o=a-m;c=g<=0&&o>=0&&o<u?d(t[o]):c;let l=s+m;h=g>=0&&l>=0&&l<u?d(t[l]):h,h>=c&&w.push([c,h])}return w}function Jm(t){return t==0?lm:t==1?pr:n=>Es(n,t)}function Zm(t){let n=t==0?dc:fc,e=t==0?(m,d,g,w,u,f)=>{m.arcTo(d,g,w,u,f)}:(m,d,g,w,u,f)=>{m.arcTo(g,d,u,w,f)},r=t==0?(m,d,g,w,u)=>{m.rect(d,g,w,u)}:(m,d,g,w,u)=>{m.rect(g,d,u,w)};return(m,d,g,w,u,f=0,a=0)=>{f==0&&a==0?r(m,d,g,w,u):(f=co(f,w/2,u/2),a=co(a,w/2,u/2),n(m,d+f,g),e(m,d+w,g,d+w,g+u,f),e(m,d+w,g+u,d,g+u,a),e(m,d,g+u,d,g,a),e(m,d,g,d+w,g,f),m.closePath())}}const dc=(t,n,e)=>{t.moveTo(n,e)},fc=(t,n,e)=>{t.moveTo(e,n)},ga=(t,n,e)=>{t.lineTo(n,e)},ma=(t,n,e)=>{t.lineTo(e,n)},pc=Zm(0),bh=Zm(1),Xm=(t,n,e,r,m,d)=>{t.arc(n,e,r,m,d)},Qm=(t,n,e,r,m,d)=>{t.arc(e,n,r,m,d)},ev=(t,n,e,r,m,d,g)=>{t.bezierCurveTo(n,e,r,m,d,g)},tv=(t,n,e,r,m,d,g)=>{t.bezierCurveTo(e,n,m,r,g,d)};function nv(t){return(n,e,r,m,d)=>Is(n,e,(g,w,u,f,a,s,c,h,o,l,p)=>{let{pxRound:y,points:x}=g,E,$;f.ori==0?(E=dc,$=Xm):(E=fc,$=Qm);const _=bn(x.width*rn,3);let C=(x.size-x.width)/2*rn,L=bn(C*2,3),D=new Path2D,I=new Path2D,{left:M,top:W,width:z,height:O}=n.bbox;pc(I,M-L,W-L,z+L*2,O+L*2);const T=A=>{if(u[A]!=null){let N=y(s(w[A],f,l,h)),B=y(c(u[A],a,p,o));E(D,N+C,B),$(D,N,B,C,0,oc*2)}};if(d)d.forEach(T);else for(let A=r;A<=m;A++)T(A);return{stroke:_>0?D:null,fill:D,clip:I,flags:pa|mh}})}function rv(t){return(n,e,r,m,d,g)=>{r!=m&&(d!=r&&g!=r&&t(n,e,r),d!=m&&g!=m&&t(n,e,m),t(n,e,g))}}const Wk=rv(ga),jk=rv(ma);function iv(t){const n=en(t?.alignGaps,0);return(e,r,m,d)=>Is(e,r,(g,w,u,f,a,s,c,h,o,l,p)=>{[m,d]=nc(u,m,d);let y=g.pxRound,x=z=>y(s(z,f,l,h)),E=z=>y(c(z,a,p,o)),$,_;f.ori==0?($=ga,_=Wk):($=ma,_=jk);const C=f.dir*(f.ori==0?1:-1),L={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:pa},D=L.stroke;let I=!1;if(d-m>=l*4){let z=le=>e.posToVal(le,f.key,!0),O=null,T=null,A,N,B,U=x(w[C==1?m:d]),G=x(w[m]),J=x(w[d]),Q=z(C==1?G+1:J-1);for(let le=C==1?m:d;le>=m&&le<=d;le+=C){let re=w[le],ce=(C==1?re<Q:re>Q)?U:x(re),de=u[le];ce==U?de!=null?(N=de,O==null?($(D,ce,E(N)),A=O=T=N):N<O?O=N:N>T&&(T=N)):de===null&&(I=!0):(O!=null&&_(D,U,E(O),E(T),E(A),E(N)),de!=null?(N=de,$(D,ce,E(N)),O=T=A=N):(O=T=null,de===null&&(I=!0)),U=ce,Q=z(U+C))}O!=null&&O!=T&&B!=U&&_(D,U,E(O),E(T),E(A),E(N))}else for(let z=C==1?m:d;z>=m&&z<=d;z+=C){let O=u[z];O===null?I=!0:O!=null&&$(D,x(w[z]),E(O))}let[M,W]=vh(e,r);if(g.fill!=null||M!=0){let z=L.fill=new Path2D(D),O=g.fillTo(e,r,g.min,g.max,M),T=E(O),A=x(w[m]),N=x(w[d]);C==-1&&([N,A]=[A,N]),$(z,N,T),$(z,A,T)}if(!g.spanGaps){let z=[];I&&z.push(...yh(w,u,m,d,C,x,n)),L.gaps=z=g.gaps(e,r,m,d,z),L.clip=hc(z,f.ori,h,o,l,p)}return W!=0&&(L.band=W==2?[Bo(e,r,m,d,D,-1),Bo(e,r,m,d,D,1)]:Bo(e,r,m,d,D,W)),L})}function Hk(t){const n=en(t.align,1),e=en(t.ascDesc,!1),r=en(t.alignGaps,0),m=en(t.extend,!1);return(d,g,w,u)=>Is(d,g,(f,a,s,c,h,o,l,p,y,x,E)=>{[w,u]=nc(s,w,u);let $=f.pxRound,{left:_,width:C}=d.bbox,L=J=>$(o(J,c,x,p)),D=J=>$(l(J,h,E,y)),I=c.ori==0?ga:ma;const M={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:pa},W=M.stroke,z=c.dir*(c.ori==0?1:-1);let O=D(s[z==1?w:u]),T=L(a[z==1?w:u]),A=T,N=T;m&&n==-1&&(N=_,I(W,N,O)),I(W,T,O);for(let J=z==1?w:u;J>=w&&J<=u;J+=z){let Q=s[J];if(Q==null)continue;let le=L(a[J]),re=D(Q);n==1?I(W,le,O):I(W,A,re),I(W,le,re),O=re,A=le}let B=A;m&&n==1&&(B=_+C,I(W,B,O));let[U,G]=vh(d,g);if(f.fill!=null||U!=0){let J=M.fill=new Path2D(W),Q=f.fillTo(d,g,f.min,f.max,U),le=D(Q);I(J,B,le),I(J,N,le)}if(!f.spanGaps){let J=[];J.push(...yh(a,s,w,u,z,L,r));let Q=f.width*rn/2,le=e||n==1?Q:-Q,re=e||n==-1?-Q:Q;J.forEach(ce=>{ce[0]+=le,ce[1]+=re}),M.gaps=J=f.gaps(d,g,w,u,J),M.clip=hc(J,c.ori,p,y,x,E)}return G!=0&&(M.band=G==2?[Bo(d,g,w,u,W,-1),Bo(d,g,w,u,W,1)]:Bo(d,g,w,u,W,G)),M})}function ov(t,n,e,r,m,d,g=yn){if(t.length>1){let w=null;for(let u=0,f=1/0;u<t.length;u++)if(n[u]!==void 0){if(w!=null){let a=fr(t[u]-t[w]);a<f&&(f=a,g=fr(e(t[u],r,m,d)-e(t[w],r,m,d)))}w=u}}return g}function Uk(t){t=t||rl;const n=en(t.size,[.6,yn,1]),e=t.align||0,r=t.gap||0;let m=t.radius;m=m==null?[0,0]:typeof m=="number"?[m,0]:m;const d=Ut(m),g=1-n[0],w=en(n[1],yn),u=en(n[2],1),f=en(t.disp,rl),a=en(t.each,h=>{}),{fill:s,stroke:c}=f;return(h,o,l,p)=>Is(h,o,(y,x,E,$,_,C,L,D,I,M,W)=>{let z=y.pxRound,O=e,T=r*rn,A=w*rn,N=u*rn,B,U;$.ori==0?[B,U]=d(h,o):[U,B]=d(h,o);const G=$.dir*($.ori==0?1:-1);let J=$.ori==0?pc:bh,Q=$.ori==0?a:(Ye,Ot,Sn,zn,Un,Fn,mn)=>{a(Ye,Ot,Sn,Un,zn,mn,Fn)},le=en(h.bands,sh).find(Ye=>Ye.series[0]==o),re=le!=null?le.dir:0,ce=y.fillTo(h,o,y.min,y.max,re),de=z(L(ce,_,W,I)),ie,fe,$e,Re=M,Ee=z(y.width*rn),Ue=!1,He=null,Ge=null,at=null,We=null;s!=null&&(Ee==0||c!=null)&&(Ue=!0,He=s.values(h,o,l,p),Ge=new Map,new Set(He).forEach(Ye=>{Ye!=null&&Ge.set(Ye,new Path2D)}),Ee>0&&(at=c.values(h,o,l,p),We=new Map,new Set(at).forEach(Ye=>{Ye!=null&&We.set(Ye,new Path2D)})));let{x0:Me,size:Tt}=f;if(Me!=null&&Tt!=null){O=1,x=Me.values(h,o,l,p),Me.unit==2&&(x=x.map(Ot=>h.posToVal(D+Ot*M,$.key,!0)));let Ye=Tt.values(h,o,l,p);Tt.unit==2?fe=Ye[0]*M:fe=C(Ye[0],$,M,D)-C(0,$,M,D),Re=ov(x,E,C,$,M,D,Re),$e=Re-fe+T}else Re=ov(x,E,C,$,M,D,Re),$e=Re*g+T,fe=Re-$e;$e<1&&($e=0),Ee>=fe/2&&(Ee=0),$e<5&&(z=lm);let st=$e>0,Xt=Re-$e-(st?Ee:0);fe=z(oh(Xt,N,A)),ie=(O==0?fe/2:O==G?0:fe)-O*G*((O==0?T/2:0)+(st?Ee/2:0));const dn={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},Zn=Ue?null:new Path2D;let zt=null;if(le!=null)zt=h.data[le.series[1]];else{let{y0:Ye,y1:Ot}=f;Ye!=null&&Ot!=null&&(E=Ot.values(h,o,l,p),zt=Ye.values(h,o,l,p))}let kn=B*fe,mt=U*fe;for(let Ye=G==1?l:p;Ye>=l&&Ye<=p;Ye+=G){let Ot=E[Ye];if(Ot==null)continue;if(zt!=null){let tn=zt[Ye]??0;if(Ot-tn==0)continue;de=L(tn,_,W,I)}let Sn=$.distr!=2||f!=null?x[Ye]:Ye,zn=C(Sn,$,M,D),Un=L(en(Ot,ce),_,W,I),Fn=z(zn-ie),mn=z(Xr(Un,de)),En=z(co(Un,de)),Xn=mn-En;if(Ot!=null){let tn=Ot<0?mt:kn,Vn=Ot<0?kn:mt;Ue?(Ee>0&&at[Ye]!=null&&J(We.get(at[Ye]),Fn,En+Si(Ee/2),fe,Xr(0,Xn-Ee),tn,Vn),He[Ye]!=null&&J(Ge.get(He[Ye]),Fn,En+Si(Ee/2),fe,Xr(0,Xn-Ee),tn,Vn)):J(Zn,Fn,En+Si(Ee/2),fe,Xr(0,Xn-Ee),tn,Vn),Q(h,o,Ye,Fn-Ee/2,En,fe+Ee,Xn)}}return Ee>0?dn.stroke=Ue?We:Zn:Ue||(dn._fill=y.width==0?y._fill:y._stroke??y._fill,dn.width=0),dn.fill=Ue?Ge:Zn,dn})}function Vk(t,n){const e=en(n?.alignGaps,0);return(r,m,d,g)=>Is(r,m,(w,u,f,a,s,c,h,o,l,p,y)=>{[d,g]=nc(f,d,g);let x=w.pxRound,E=B=>x(c(B,a,p,o)),$=B=>x(h(B,s,y,l)),_,C,L;a.ori==0?(_=dc,L=ga,C=ev):(_=fc,L=ma,C=tv);const D=a.dir*(a.ori==0?1:-1);let I=E(u[D==1?d:g]),M=I,W=[],z=[];for(let B=D==1?d:g;B>=d&&B<=g;B+=D)if(f[B]!=null){let U=u[B],G=E(U);W.push(M=G),z.push($(f[B]))}const O={stroke:t(W,z,_,L,C,x),fill:null,clip:null,band:null,gaps:null,flags:pa},T=O.stroke;let[A,N]=vh(r,m);if(w.fill!=null||A!=0){let B=O.fill=new Path2D(T),U=w.fillTo(r,m,w.min,w.max,A),G=$(U);L(B,M,G),L(B,I,G)}if(!w.spanGaps){let B=[];B.push(...yh(u,f,d,g,D,E,e)),O.gaps=B=w.gaps(r,m,d,g,B),O.clip=hc(B,a.ori,o,l,p,y)}return N!=0&&(O.band=N==2?[Bo(r,m,d,g,T,-1),Bo(r,m,d,g,T,1)]:Bo(r,m,d,g,T,N)),O})}function qk(t){return Vk(Gk,t)}function Gk(t,n,e,r,m,d){const g=t.length;if(g<2)return null;const w=new Path2D;if(e(w,t[0],n[0]),g==2)r(w,t[1],n[1]);else{let u=Array(g),f=Array(g-1),a=Array(g-1),s=Array(g-1);for(let c=0;c<g-1;c++)a[c]=n[c+1]-n[c],s[c]=t[c+1]-t[c],f[c]=a[c]/s[c];u[0]=f[0];for(let c=1;c<g-1;c++)f[c]===0||f[c-1]===0||f[c-1]>0!=f[c]>0?u[c]=0:(u[c]=3*(s[c-1]+s[c])/((2*s[c]+s[c-1])/f[c-1]+(s[c]+2*s[c-1])/f[c]),isFinite(u[c])||(u[c]=0));u[g-1]=f[g-2];for(let c=0;c<g-1;c++)m(w,t[c]+s[c]/3,n[c]+u[c]*s[c]/3,t[c+1]-s[c]/3,n[c+1]-u[c+1]*s[c]/3,t[c+1],n[c+1])}return w}const wh=new Set;function sv(){for(let t of wh)t.syncRect(!0)}la&&(Ts($A,ca,sv),Ts(TA,ca,sv,!0),Ts(ec,ca,()=>{Br.pxRatio=rn}));const Kk=iv(),Yk=nv();function av(t,n,e,r){return(r?[t[0],t[1]].concat(t.slice(2)):[t[0]].concat(t.slice(1))).map((m,d)=>xh(m,d,n,e))}function Jk(t,n){return t.map((e,r)=>r==0?{}:rr({},n,e))}function xh(t,n,e,r){return rr({},n==0?e:r,t)}function lv(t,n,e){return n==null?ha:[n,e]}const Zk=lv;function Xk(t,n,e){return n==null?ha:ic(n,e,nh,!0)}function cv(t,n,e,r){return n==null?ha:rc(n,e,t.scales[r].log,!1)}const Qk=cv;function uv(t,n,e,r){return n==null?ha:th(n,e,t.scales[r].log,!1)}const eS=uv;function tS(t,n,e,r,m){let d=Xr(sm(t),sm(n)),g=n-t,w=lo(m/r*g,e);do{let u=e[w],f=r*u/g;if(f>=m&&d+(u<5?is.get(u):0)<=17)return[u,f]}while(++w<e.length);return[0,0]}function hv(t){let n,e;return t=t.replace(/(\d+)px/,(r,m)=>(n=pr((e=+m)*rn))+"px"),[t,n,e]}function nS(t){t.show&&[t.font,t.labelFont].forEach(n=>{let e=bn(n[2]*rn,1);n[0]=n[0].replace(/[0-9.]+px/,e+"px"),n[1]=e})}function Br(t,n,e){const r={mode:en(t.mode,1)},m=r.mode;function d(V,Z,se,ae){let ge=Z.valToPct(V);return ae+se*(Z.dir==-1?1-ge:ge)}function g(V,Z,se,ae){let ge=Z.valToPct(V);return ae+se*(Z.dir==-1?ge:1-ge)}function w(V,Z,se,ae){return Z.ori==0?d(V,Z,se,ae):g(V,Z,se,ae)}r.valToPosH=d,r.valToPosV=g;let u=!1;r.status=0;const f=r.root=Wi(cA);if(t.id!=null&&(f.id=t.id),Ai(f,t.class),t.title){let V=Wi(dA,f);V.textContent=t.title}const a=ao("canvas"),s=r.ctx=a.getContext("2d"),c=Wi(fA,f);Ts("click",c,V=>{V.target===o&&(dt!=Yi||Vt!=Lo)&&Gn.click(r,V)},!0);const h=r.under=Wi(pA,c);c.appendChild(a);const o=r.over=Wi(gA,c);t=da(t);const l=+en(t.pxAlign,1),p=Jm(l);(t.plugins||[]).forEach(V=>{V.opts&&(t=V.opts(r,t)||t)});const y=t.ms||.001,x=r.series=m==1?av(t.series||[],Fm,qm,!1):Jk(t.series||[null],Vm),E=r.axes=av(t.axes||[],zm,jm,!0),$=r.scales={},_=r.bands=t.bands||[];_.forEach(V=>{V.fill=Ut(V.fill||null),V.dir=en(V.dir,-1)});const C=m==2?x[1].facets[0].scale:x[0].scale,L={axes:Vr,series:jo},D=(t.drawOrder||["axes","series"]).map(V=>L[V]);function I(V){const Z=V.distr==3?se=>Fo(se>0?se:V.clamp(r,se,V.min,V.max,V.key)):V.distr==4?se=>ih(se,V.asinh):V.distr==100?se=>V.fwd(se):se=>se;return se=>{let ae=Z(se),{_min:ge,_max:_e}=V,Ie=_e-ge;return(ae-ge)/Ie}}function M(V){let Z=$[V];if(Z==null){let se=(t.scales||rl)[V]||rl;if(se.from!=null){M(se.from);let ae=rr({},$[se.from],se,{key:V});ae.valToPct=I(ae),$[V]=ae}else{Z=$[V]=rr({},V==C?Gm:zk,se),Z.key=V;let ae=Z.time,ge=Z.range,_e=os(ge);if((V!=C||m==2&&!ae)&&(_e&&(ge[0]==null||ge[1]==null)&&(ge={min:ge[0]==null?nm:{mode:1,hard:ge[0],soft:ge[0]},max:ge[1]==null?nm:{mode:1,hard:ge[1],soft:ge[1]}},_e=!1),!_e&&ac(ge))){let Ie=ge;ge=(Be,Ve,Ke)=>Ve==null?ha:ic(Ve,Ke,Ie)}Z.range=Ut(ge||(ae?Zk:V==C?Z.distr==3?Qk:Z.distr==4?eS:lv:Z.distr==3?cv:Z.distr==4?uv:Xk)),Z.auto=Ut(_e?!1:Z.auto),Z.clamp=Ut(Z.clamp||Pk),Z._min=Z._max=null,Z.valToPct=I(Z)}}}M("x"),M("y"),m==1&&x.forEach(V=>{M(V.scale)}),E.forEach(V=>{M(V.scale)});for(let V in t.scales)M(V);const W=$[C],z=W.distr;let O,T;W.ori==0?(Ai(f,uA),O=d,T=g):(Ai(f,hA),O=g,T=d);const A={};for(let V in $){let Z=$[V];(Z.min!=null||Z.max!=null)&&(A[V]={min:Z.min,max:Z.max},Z.min=Z.max=null)}const N=t.tzDate||(V=>new Date(pr(V/y))),B=t.fmtDate||ah,U=y==1?uk(N):fk(N),G=Em(N,Rm(y==1?ck:dk,B)),J=Im(N,Mm(gk,B)),Q=[],le=r.legend=rr({},yk,t.legend),re=r.cursor=rr({},Ak,{drag:{y:m==2}},t.cursor),ce=le.show,de=re.show,ie=le.markers;le.idxs=Q,ie.width=Ut(ie.width),ie.dash=Ut(ie.dash),ie.stroke=Ut(ie.stroke),ie.fill=Ut(ie.fill);let fe,$e,Re,Ee=[],Ue=[],He,Ge=!1,at={};if(le.live){const V=x[1]?x[1].values:null;Ge=V!=null,He=Ge?V(r,1,0):{_:0};for(let Z in He)at[Z]=Yu}if(ce)if(fe=ao("table",xA,f),Re=ao("tbody",null,fe),le.mount(r,fe),Ge){$e=ao("thead",null,fe,Re);let V=ao("tr",null,$e);ao("th",null,V);for(var We in He)ao("th",Bg,V).textContent=We}else Ai(fe,_A),le.live&&Ai(fe,CA);const Me={show:!0},Tt={show:!1};function st(V,Z){if(Z==0&&(Ge||!le.live||m==2))return ha;let se=[],ae=ao("tr",AA,Re,Re.childNodes[Z]);Ai(ae,V.class),V.show||Ai(ae,$s);let ge=ao("th",null,ae);if(ie.show){let Be=Wi(kA,ge);if(Z>0){let Ve=ie.width(r,Z);Ve&&(Be.style.border=Ve+"px "+ie.dash(r,Z)+" "+ie.stroke(r,Z)),Be.style.background=ie.fill(r,Z)}}let _e=Wi(Bg,ge);V.label instanceof HTMLElement?_e.appendChild(V.label):_e.textContent=V.label,Z>0&&(ie.show||(_e.style.color=V.width>0?ie.stroke(r,Z):ie.fill(r,Z)),dn("click",ge,Be=>{if(re._lock)return;ni(Be);let Ve=x.indexOf(V);if((Be.ctrlKey||Be.metaKey)!=le.isolate){let Ke=x.some((tt,it)=>it>0&&it!=Ve&&tt.show);x.forEach((tt,it)=>{it>0&&cr(it,Ke?it==Ve?Me:Tt:Me,!0,kt.setSeries)})}else cr(Ve,{show:!V.show},!0,kt.setSeries)},!1),Ur&&dn(Ug,ge,Be=>{re._lock||(ni(Be),cr(x.indexOf(V),Xi,!0,kt.setSeries))},!1));for(var Ie in He){let Be=ao("td",SA,ae);Be.textContent="--",se.push(Be)}return[ae,se]}const Xt=new Map;function dn(V,Z,se,ae=!0){const ge=Xt.get(Z)||{},_e=re.bind[V](r,Z,se,ae);_e&&(Ts(V,Z,ge[V]=_e),Xt.set(Z,ge))}function Zn(V,Z,se){const ae=Xt.get(Z)||{};for(let ge in ae)(V==null||ge==V)&&(eh(ge,Z,ae[ge]),delete ae[ge]);V==null&&Xt.delete(Z)}let zt=0,kn=0,mt=0,Ye=0,Ot=0,Sn=0,zn=Ot,Un=Sn,Fn=mt,mn=Ye,En=0,Xn=0,tn=0,Vn=0;r.bbox={};let $i=!1,ti=!1,sr=!1,qn=!1,Ti=!1,gr=!1;function Hi(V,Z,se){(se||V!=r.width||Z!=r.height)&&Ri(V,Z),lr(!1),sr=!0,ti=!0,Io()}function Ri(V,Z){r.width=zt=mt=V,r.height=kn=Ye=Z,Ot=Sn=0,Er(),di();let se=r.bbox;En=se.left=Es(Ot*rn,.5),Xn=se.top=Es(Sn*rn,.5),tn=se.width=Es(mt*rn,.5),Vn=se.height=Es(Ye*rn,.5)}const ls=3;function Cr(){let V=!1,Z=0;for(;!V;){Z++;let se=Gt(Z),ae=Jt(Z);V=Z==ls||se&&ae,V||(Ri(r.width,r.height),ti=!0)}}function $o({width:V,height:Z}){Hi(V,Z)}r.setSize=$o;function Er(){let V=!1,Z=!1,se=!1,ae=!1;E.forEach((ge,_e)=>{if(ge.show&&ge._show){let{side:Ie,_size:Be}=ge,Ve=Ie%2,Ke=ge.label!=null?ge.labelSize:0,tt=Be+Ke;tt>0&&(Ve?(mt-=tt,Ie==3?(Ot+=tt,ae=!0):se=!0):(Ye-=tt,Ie==0?(Sn+=tt,V=!0):Z=!0))}}),_r[0]=V,_r[1]=se,_r[2]=Z,_r[3]=ae,mt-=mr[1]+mr[3],Ot+=mr[3],Ye-=mr[2]+mr[0],Sn+=mr[0]}function di(){let V=Ot+mt,Z=Sn+Ye,se=Ot,ae=Sn;function ge(_e,Ie){switch(_e){case 1:return V+=Ie,V-Ie;case 2:return Z+=Ie,Z-Ie;case 3:return se-=Ie,se+Ie;case 0:return ae-=Ie,ae+Ie}}E.forEach((_e,Ie)=>{if(_e.show&&_e._show){let Be=_e.side;_e._pos=ge(Be,_e._size),_e.label!=null&&(_e._lpos=ge(Be,_e.labelSize))}})}if(re.dataIdx==null){let V=re.hover,Z=V.skip=new Set(V.skip??[]);Z.add(void 0);let se=V.prox=Ut(V.prox),ae=V.bias??=0;re.dataIdx=(ge,_e,Ie,Be)=>{if(_e==0)return Ie;let Ve=Ie,Ke=se(ge,_e,Ie,Be)??yn,tt=Ke>=0&&Ke<yn,it=W.ori==0?mt:Ye,At=re.left,Qt=n[0],Bt=n[_e];if(Z.has(Bt[Ie])){Ve=null;let Ct=null,yt=null,ht;if(ae==0||ae==-1)for(ht=Ie;Ct==null&&ht-- >0;)Z.has(Bt[ht])||(Ct=ht);if(ae==0||ae==1)for(ht=Ie;yt==null&&ht++<Bt.length;)Z.has(Bt[ht])||(yt=ht);if(Ct!=null||yt!=null)if(tt){let wn=Ct==null?-1/0:O(Qt[Ct],W,it,0),Dn=yt==null?1/0:O(Qt[yt],W,it,0),hr=At-wn,ln=Dn-At;hr<=ln?hr<=Ke&&(Ve=Ct):ln<=Ke&&(Ve=yt)}else Ve=yt==null?Ct:Ct==null?yt:Ie-Ct<=yt-Ie?Ct:yt}else tt&&fr(At-O(Qt[Ie],W,it,0))>Ke&&(Ve=null);return Ve}}const ni=V=>{re.event=V};re.idxs=Q,re._lock=!1;let $n=re.points;$n.show=Ut($n.show),$n.size=Ut($n.size),$n.stroke=Ut($n.stroke),$n.width=Ut($n.width),$n.fill=Ut($n.fill);const Hr=r.focus=rr({},t.focus||{alpha:.3},re.focus),Ur=Hr.prox>=0,Tn=Ur&&$n.one;let Qn=[],fi=[],Ei=[];function Mi(V,Z){let se=$n.show(r,Z);if(se instanceof HTMLElement)return Ai(se,wA),Ai(se,V.class),Ao(se,-10,-10,mt,Ye),o.insertBefore(se,Qn[Z]),se}function cs(V,Z){if(m==1||Z>0){let se=m==1&&$[V.scale].time,ae=V.value;V.value=se?gm(ae)?Im(N,Mm(ae,B)):ae||J:ae||Ok,V.label=V.label||(se?Sk:kk)}if(Tn||Z>0){V.width=V.width==null?1:V.width,V.paths=V.paths||Kk||zA,V.fillTo=Ut(V.fillTo||Fk),V.pxAlign=+en(V.pxAlign,l),V.pxRound=Jm(V.pxAlign),V.stroke=Ut(V.stroke||null),V.fill=Ut(V.fill||null),V._stroke=V._fill=V._paths=V._focus=null;let se=Nk(Xr(1,V.width),1),ae=V.points=rr({},{size:se,width:Xr(1,se*.2),stroke:V.stroke,space:se*2,paths:Yk,_stroke:null,_fill:null},V.points);ae.show=Ut(ae.show),ae.filter=Ut(ae.filter),ae.fill=Ut(ae.fill),ae.stroke=Ut(ae.stroke),ae.paths=Ut(ae.paths),ae.pxAlign=V.pxAlign}if(ce){let se=st(V,Z);Ee.splice(Z,0,se[0]),Ue.splice(Z,0,se[1]),le.values.push(null)}if(de){Q.splice(Z,0,null);let se=null;Tn?Z==0&&(se=Mi(V,Z)):Z>0&&(se=Mi(V,Z)),Qn.splice(Z,0,se),fi.splice(Z,0,0),Ei.splice(Z,0,0)}ot("addSeries",Z)}function zs(V,Z){Z=Z??x.length,V=m==1?xh(V,Z,Fm,qm):xh(V,Z,{},Vm),x.splice(Z,0,V),cs(x[Z],Z)}r.addSeries=zs;function fn(V){if(x.splice(V,1),ce){le.values.splice(V,1),Ue.splice(V,1);let Z=Ee.splice(V,1)[0];Zn(null,Z.firstChild),Z.remove()}de&&(Q.splice(V,1),Qn.splice(V,1)[0].remove(),fi.splice(V,1),Ei.splice(V,1)),ot("delSeries",V)}r.delSeries=fn;const _r=[!1,!1,!1,!1];function pi(V,Z){if(V._show=V.show,V.show){let se=V.side%2,ae=$[V.scale];ae==null&&(V.scale=se?x[1].scale:C,ae=$[V.scale]);let ge=ae.time;V.size=Ut(V.size),V.space=Ut(V.space),V.rotate=Ut(V.rotate),os(V.incrs)&&V.incrs.forEach(Ie=>{!is.has(Ie)&&is.set(Ie,fm(Ie))}),V.incrs=Ut(V.incrs||(ae.distr==2?sk:ge?y==1?lk:hk:Ms)),V.splits=Ut(V.splits||(ge&&ae.distr==1?U:ae.distr==3?ph:ae.distr==4?Rk:Tk)),V.stroke=Ut(V.stroke),V.grid.stroke=Ut(V.grid.stroke),V.ticks.stroke=Ut(V.ticks.stroke),V.border.stroke=Ut(V.border.stroke);let _e=V.values;V.values=os(_e)&&!os(_e[0])?Ut(_e):ge?os(_e)?Em(N,Rm(_e,B)):gm(_e)?pk(N,_e):_e||G:_e||$k,V.filter=Ut(V.filter||(ae.distr>=3&&ae.log==10?Ik:ae.distr==3&&ae.log==2?Lk:cm)),V.font=hv(V.font),V.labelFont=hv(V.labelFont),V._size=V.size(r,null,Z,0),V._space=V._rotate=V._incrs=V._found=V._splits=V._values=null,V._size>0&&(_r[Z]=!0,V._el=Wi(mA,c))}}function Nt(V,Z,se,ae){let[ge,_e,Ie,Be]=se,Ve=Z%2,Ke=0;return Ve==0&&(Be||_e)&&(Ke=Z==0&&!ge||Z==2&&!Ie?pr(zm.size/3):0),Ve==1&&(ge||Ie)&&(Ke=Z==1&&!_e||Z==3&&!Be?pr(jm.size/2):0),Ke}const To=r.padding=(t.padding||[Nt,Nt,Nt,Nt]).map(V=>Ut(en(V,Nt))),mr=r._padding=To.map((V,Z)=>V(r,Z,_r,0));let Mn,vn=null,In=null;const ho=m==1?x[0].idxs:null;let er=null,Mr=!1;function gi(V,Z){if(n=V??[],r.data=r._data=n,m==2){Mn=0;for(let se=1;se<x.length;se++)Mn+=n[se][0].length}else{n.length==0&&(r.data=r._data=n=[[]]),er=n[0],Mn=er.length;let se=n;if(z==2){se=n.slice();let ae=se[0]=Array(Mn);for(let ge=0;ge<Mn;ge++)ae[ge]=ge}r._data=n=se}if(lr(!0),ot("setData"),z==2&&(sr=!0),Z!==!1){let se=W;se.auto(r,Mr)?ri():Gr(C,se.min,se.max),qn=qn||re.left>=0,gr=!0,Io()}}r.setData=gi;function ri(){Mr=!0;let V,Z;m==1&&(Mn>0?(vn=ho[0]=0,In=ho[1]=Mn-1,V=n[0][vn],Z=n[0][In],z==2?(V=vn,Z=In):V==Z&&(z==3?[V,Z]=rc(V,V,W.log,!1):z==4?[V,Z]=th(V,V,W.log,!1):W.time?Z=V+pr(86400/y):[V,Z]=ic(V,Z,nh,!0))):(vn=ho[0]=V=null,In=ho[1]=Z=null)),Gr(C,V,Z)}let Ui,ii,Vi,fo,ar,qi,Gi,mi,Ii,pn;function Wo(V,Z,se,ae,ge,_e){V??=jg,se??=sh,ae??="butt",ge??=jg,_e??="round",V!=Ui&&(s.strokeStyle=Ui=V),ge!=ii&&(s.fillStyle=ii=ge),Z!=Vi&&(s.lineWidth=Vi=Z),_e!=ar&&(s.lineJoin=ar=_e),ae!=qi&&(s.lineCap=qi=ae),se!=fo&&s.setLineDash(fo=se)}function Ro(V,Z,se,ae){Z!=ii&&(s.fillStyle=ii=Z),V!=Gi&&(s.font=Gi=V),se!=mi&&(s.textAlign=mi=se),ae!=Ii&&(s.textBaseline=Ii=ae)}function Li(V,Z,se,ae,ge=0){if(ae.length>0&&V.auto(r,Mr)&&(Z==null||Z.min==null)){let _e=en(vn,0),Ie=en(In,ae.length-1),Be=se.min==null?IA(ae,_e,Ie,ge,V.distr==3):[se.min,se.max];V.min=co(V.min,se.min=Be[0]),V.max=Xr(V.max,se.max=Be[1])}}const Eo={min:null,max:null};function Mo(){for(let ae in $){let ge=$[ae];A[ae]==null&&(ge.min==null||A[C]!=null&&ge.auto(r,Mr))&&(A[ae]=Eo)}for(let ae in $){let ge=$[ae];A[ae]==null&&ge.from!=null&&A[ge.from]!=null&&(A[ae]=Eo)}A[C]!=null&&lr(!0);let V={};for(let ae in A){let ge=A[ae];if(ge!=null){let _e=V[ae]=da($[ae],WA);if(ge.min!=null)rr(_e,ge);else if(ae!=C||m==2)if(Mn==0&&_e.from==null){let Ie=_e.range(r,null,null,ae);_e.min=Ie[0],_e.max=Ie[1]}else _e.min=yn,_e.max=-yn}}if(Mn>0){x.forEach((ae,ge)=>{if(m==1){let _e=ae.scale,Ie=A[_e];if(Ie==null)return;let Be=V[_e];if(ge==0){let Ve=Be.range(r,Be.min,Be.max,_e);Be.min=Ve[0],Be.max=Ve[1],vn=lo(Be.min,n[0]),In=lo(Be.max,n[0]),In-vn>1&&(n[0][vn]<Be.min&&vn++,n[0][In]>Be.max&&In--),ae.min=er[vn],ae.max=er[In]}else ae.show&&ae.auto&&Li(Be,Ie,ae,n[ge],ae.sorted);ae.idxs[0]=vn,ae.idxs[1]=In}else if(ge>0&&ae.show&&ae.auto){let[_e,Ie]=ae.facets,Be=_e.scale,Ve=Ie.scale,[Ke,tt]=n[ge],it=V[Be],At=V[Ve];it!=null&&Li(it,A[Be],_e,Ke,_e.sorted),At!=null&&Li(At,A[Ve],Ie,tt,Ie.sorted),ae.min=Ie.min,ae.max=Ie.max}});for(let ae in V){let ge=V[ae],_e=A[ae];if(ge.from==null&&(_e==null||_e.min==null)){let Ie=ge.range(r,ge.min==yn?null:ge.min,ge.max==-yn?null:ge.max,ae);ge.min=Ie[0],ge.max=Ie[1]}}}for(let ae in V){let ge=V[ae];if(ge.from!=null){let _e=V[ge.from];if(_e.min==null)ge.min=ge.max=null;else{let Ie=ge.range(r,_e.min,_e.max,ae);ge.min=Ie[0],ge.max=Ie[1]}}}let Z={},se=!1;for(let ae in V){let ge=V[ae],_e=$[ae];if(_e.min!=ge.min||_e.max!=ge.max){_e.min=ge.min,_e.max=ge.max;let Ie=_e.distr;_e._min=Ie==3?Fo(_e.min):Ie==4?ih(_e.min,_e.asinh):Ie==100?_e.fwd(_e.min):_e.min,_e._max=Ie==3?Fo(_e.max):Ie==4?ih(_e.max,_e.asinh):Ie==100?_e.fwd(_e.max):_e.max,Z[ae]=se=!0}}if(se){x.forEach((ae,ge)=>{m==2?ge>0&&Z.y&&(ae._paths=null):Z[ae.scale]&&(ae._paths=null)});for(let ae in Z)sr=!0,ot("setScale",ae);de&&re.left>=0&&(qn=gr=!0)}for(let ae in A)A[ae]=null}function Ki(V){let Z=oh(vn-1,0,Mn-1),se=oh(In+1,0,Mn-1);for(;V[Z]==null&&Z>0;)Z--;for(;V[se]==null&&se<Mn-1;)se++;return[Z,se]}function jo(){if(Mn>0){let V=x.some(Z=>Z._focus)&&pn!=Hr.alpha;V&&(s.globalAlpha=pn=Hr.alpha),x.forEach((Z,se)=>{if(se>0&&Z.show&&(Ho(se,!1),Ho(se,!0),Z._paths==null)){let ae=pn;pn!=Z.alpha&&(s.globalAlpha=pn=Z.alpha);let ge=m==2?[0,n[se][0].length-1]:Ki(n[se]);Z._paths=Z.paths(r,se,ge[0],ge[1]),pn!=ae&&(s.globalAlpha=pn=ae)}}),x.forEach((Z,se)=>{if(se>0&&Z.show){let ae=pn;pn!=Z.alpha&&(s.globalAlpha=pn=Z.alpha),Z._paths!=null&&po(se,!1);{let ge=Z._paths!=null?Z._paths.gaps:null,_e=Z.points.show(r,se,vn,In,ge),Ie=Z.points.filter(r,se,_e,ge);(_e||Ie)&&(Z.points._paths=Z.points.paths(r,se,vn,In,Ie),po(se,!0))}pn!=ae&&(s.globalAlpha=pn=ae),ot("drawSeries",se)}}),V&&(s.globalAlpha=pn=1)}}function Ho(V,Z){let se=Z?x[V].points:x[V];se._stroke=se.stroke(r,V),se._fill=se.fill(r,V)}function po(V,Z){let se=Z?x[V].points:x[V],{stroke:ae,fill:ge,clip:_e,flags:Ie,_stroke:Be=se._stroke,_fill:Ve=se._fill,_width:Ke=se.width}=se._paths;Ke=bn(Ke*rn,3);let tt=null,it=Ke%2/2;Z&&Ve==null&&(Ve=Ke>0?"#fff":Be);let At=se.pxAlign==1&&it>0;if(At&&s.translate(it,it),!Z){let Qt=En-Ke/2,Bt=Xn-Ke/2,Ct=tn+Ke,yt=Vn+Ke;tt=new Path2D,tt.rect(Qt,Bt,Ct,yt)}Z?ne(Be,Ke,se.dash,se.cap,Ve,ae,ge,Ie,_e):go(V,Be,Ke,se.dash,se.cap,Ve,ae,ge,Ie,tt,_e),At&&s.translate(-it,-it)}function go(V,Z,se,ae,ge,_e,Ie,Be,Ve,Ke,tt){let it=!1;Ve!=0&&_.forEach((At,Qt)=>{if(At.series[0]==V){let Bt=x[At.series[1]],Ct=n[At.series[1]],yt=(Bt._paths||rl).band;os(yt)&&(yt=At.dir==1?yt[0]:yt[1]);let ht,wn=null;Bt.show&&yt&&OA(Ct,vn,In)?(wn=At.fill(r,Qt)||_e,ht=Bt._paths.clip):yt=null,ne(Z,se,ae,ge,wn,Ie,Be,Ve,Ke,tt,ht,yt),it=!0}}),it||ne(Z,se,ae,ge,_e,Ie,Be,Ve,Ke,tt)}const vi=pa|mh;function ne(V,Z,se,ae,ge,_e,Ie,Be,Ve,Ke,tt,it){Wo(V,Z,se,ae,ge),(Ve||Ke||it)&&(s.save(),Ve&&s.clip(Ve),Ke&&s.clip(Ke)),it?(Be&vi)==vi?(s.clip(it),tt&&s.clip(tt),Le(ge,Ie),Se(V,_e,Z)):Be&mh?(Le(ge,Ie),s.clip(it),Se(V,_e,Z)):Be&pa&&(s.save(),s.clip(it),tt&&s.clip(tt),Le(ge,Ie),s.restore(),Se(V,_e,Z)):(Le(ge,Ie),Se(V,_e,Z)),(Ve||Ke||it)&&s.restore()}function Se(V,Z,se){se>0&&(Z instanceof Map?Z.forEach((ae,ge)=>{s.strokeStyle=Ui=ge,s.stroke(ae)}):Z!=null&&V&&s.stroke(Z))}function Le(V,Z){Z instanceof Map?Z.forEach((se,ae)=>{s.fillStyle=ii=ae,s.fill(se)}):Z!=null&&V&&s.fill(Z)}function et(V,Z,se,ae){let ge=E[V],_e;if(ae<=0)_e=[0,0];else{let Ie=ge._space=ge.space(r,V,Z,se,ae),Be=ge._incrs=ge.incrs(r,V,Z,se,ae,Ie);_e=tS(Z,se,Be,ae,Ie)}return ge._found=_e}function vt(V,Z,se,ae,ge,_e,Ie,Be,Ve,Ke){let tt=Ie%2/2;l==1&&s.translate(tt,tt),Wo(Be,Ie,Ve,Ke,Be),s.beginPath();let it,At,Qt,Bt,Ct=ge+(ae==0||ae==3?-_e:_e);se==0?(At=ge,Bt=Ct):(it=ge,Qt=Ct);for(let yt=0;yt<V.length;yt++)Z[yt]!=null&&(se==0?it=Qt=V[yt]:At=Bt=V[yt],s.moveTo(it,At),s.lineTo(Qt,Bt));s.stroke(),l==1&&s.translate(-tt,-tt)}function Gt(V){let Z=!0;return E.forEach((se,ae)=>{if(!se.show)return;let ge=$[se.scale];if(ge.min==null){se._show&&(Z=!1,se._show=!1,lr(!1));return}else se._show||(Z=!1,se._show=!0,lr(!1));let _e=se.side,Ie=_e%2,{min:Be,max:Ve}=ge,[Ke,tt]=et(ae,Be,Ve,Ie==0?mt:Ye);if(tt==0)return;let it=ge.distr==2,At=se._splits=se.splits(r,ae,Be,Ve,Ke,tt,it),Qt=ge.distr==2?At.map(ht=>er[ht]):At,Bt=ge.distr==2?er[At[1]]-er[At[0]]:Ke,Ct=se._values=se.values(r,se.filter(r,Qt,ae,tt,Bt),ae,tt,Bt);se._rotate=_e==2?se.rotate(r,Ct,ae,tt):0;let yt=se._size;se._size=ji(se.size(r,Ct,ae,V)),yt!=null&&se._size!=yt&&(Z=!1)}),Z}function Jt(V){let Z=!0;return To.forEach((se,ae)=>{let ge=se(r,ae,_r,V);ge!=mr[ae]&&(Z=!1),mr[ae]=ge}),Z}function Vr(){for(let V=0;V<E.length;V++){let Z=E[V];if(!Z.show||!Z._show)continue;let se=Z.side,ae=se%2,ge,_e,Ie=Z.stroke(r,V),Be=se==0||se==3?-1:1,[Ve,Ke]=Z._found;if(Z.label!=null){let Or=Z.labelGap*Be,_n=pr((Z._lpos+Or)*rn);Ro(Z.labelFont[0],Ie,"center",se==2?el:Wg),s.save(),ae==1?(ge=_e=0,s.translate(_n,pr(Xn+Vn/2)),s.rotate((se==3?-oc:oc)/2)):(ge=pr(En+tn/2),_e=_n);let Qi=am(Z.label)?Z.label(r,V,Ve,Ke):Z.label;s.fillText(Qi,ge,_e),s.restore()}if(Ke==0)continue;let tt=$[Z.scale],it=ae==0?tn:Vn,At=ae==0?En:Xn,Qt=Z._splits,Bt=tt.distr==2?Qt.map(Or=>er[Or]):Qt,Ct=tt.distr==2?er[Qt[1]]-er[Qt[0]]:Ve,yt=Z.ticks,ht=Z.border,wn=yt.show?yt.size:0,Dn=pr(wn*rn),hr=pr((Z.alignTo==2?Z._size-wn-Z.gap:Z.gap)*rn),ln=Z._rotate*-oc/180,gn=p(Z._pos*rn),me=(Dn+hr)*Be,Te=gn+me;_e=ae==0?Te:0,ge=ae==1?Te:0;let ke=Z.font[0],Je=Z.align==1?aa:Z.align==2?Vu:ln>0?aa:ln<0?Vu:ae==0?"center":se==3?Vu:aa,pt=ln||ae==1?"middle":se==2?el:Wg;Ro(ke,Ie,Je,pt);let $t=Z.font[1]*Z.lineGap,nn=Qt.map(Or=>p(w(Or,tt,it,At))),Wt=Z._values;for(let Or=0;Or<Wt.length;Or++){let _n=Wt[Or];if(_n!=null){ae==0?ge=nn[Or]:_e=nn[Or],_n=""+_n;let Qi=_n.indexOf(`
1480
+ `)==-1?[_n]:_n.split(/\n/gm);for(let Nr=0;Nr<Qi.length;Nr++){let qo=Qi[Nr];ln?(s.save(),s.translate(ge,_e+Nr*$t),s.rotate(ln),s.fillText(qo,0,0),s.restore()):s.fillText(qo,ge,_e+Nr*$t)}}}yt.show&&vt(nn,yt.filter(r,Bt,V,Ke,Ct),ae,se,gn,Dn,bn(yt.width*rn,3),yt.stroke(r,V),yt.dash,yt.cap);let bi=Z.grid;bi.show&&vt(nn,bi.filter(r,Bt,V,Ke,Ct),ae,ae==0?2:1,ae==0?Xn:En,ae==0?Vn:tn,bn(bi.width*rn,3),bi.stroke(r,V),bi.dash,bi.cap),ht.show&&vt([gn],[1],ae==0?1:0,ae==0?1:2,ae==1?Xn:En,ae==1?Vn:tn,bn(ht.width*rn,3),ht.stroke(r,V),ht.dash,ht.cap)}ot("drawAxes")}function lr(V){x.forEach((Z,se)=>{se>0&&(Z._paths=null,V&&(m==1?(Z.min=null,Z.max=null):Z.facets.forEach(ae=>{ae.min=null,ae.max=null})))})}let Ln=!1,Ir=!1,xn=[];function Sa(){Ir=!1;for(let V=0;V<xn.length;V++)ot(...xn[V]);xn.length=0}function Io(){Ln||(KA(Fs),Ln=!0)}function je(V,Z=!1){Ln=!0,Ir=Z,V(r),Fs(),Z&&xn.length>0&&queueMicrotask(Sa)}r.batch=je;function Fs(){if($i&&(Mo(),$i=!1),sr&&(Cr(),sr=!1),ti){if(An(h,aa,Ot),An(h,el,Sn),An(h,Xa,mt),An(h,Qa,Ye),An(o,aa,Ot),An(o,el,Sn),An(o,Xa,mt),An(o,Qa,Ye),An(c,Xa,zt),An(c,Qa,kn),a.width=pr(zt*rn),a.height=pr(kn*rn),E.forEach(({_el:V,_show:Z,_size:se,_pos:ae,side:ge})=>{if(V!=null)if(Z){let _e=ge===3||ge===0?se:0,Ie=ge%2==1;An(V,Ie?"left":"top",ae-_e),An(V,Ie?"width":"height",se),An(V,Ie?"top":"left",Ie?Sn:Ot),An(V,Ie?"height":"width",Ie?Ye:mt),Xu(V,$s)}else Ai(V,$s)}),Ui=ii=Vi=ar=qi=Gi=mi=Ii=fo=null,pn=1,F(!0),Ot!=zn||Sn!=Un||mt!=Fn||Ye!=mn){lr(!1);let V=mt/Fn,Z=Ye/mn;if(de&&!qn&&re.left>=0){re.left*=V,re.top*=Z,mo&&Ao(mo,pr(re.left),0,mt,Ye),Wn&&Ao(Wn,0,pr(re.top),mt,Ye);for(let se=0;se<Qn.length;se++){let ae=Qn[se];ae!=null&&(fi[se]*=V,Ei[se]*=Z,Ao(ae,ji(fi[se]),ji(Ei[se]),mt,Ye))}}if(_t.show&&!Ti&&_t.left>=0&&_t.width>0){_t.left*=V,_t.width*=V,_t.top*=Z,_t.height*=Z;for(let se in Y)An(qr,se,_t[se])}zn=Ot,Un=Sn,Fn=mt,mn=Ye}ot("setSize"),ti=!1}zt>0&&kn>0&&(s.clearRect(0,0,a.width,a.height),ot("drawClear"),D.forEach(V=>V()),ot("draw")),_t.show&&Ti&&(Zi(_t),Ti=!1),de&&qn&&(k(null,!0,!1),qn=!1),le.show&&le.live&&gr&&(b(),gr=!1),u||(u=!0,r.status=1,ot("ready")),Mr=!1,Ln=!1}r.redraw=(V,Z)=>{sr=Z||!1,V!==!1?Gr(C,W.min,W.max):Io()};function ze(V,Z){let se=$[V];if(se.from==null){if(Mn==0){let ae=se.range(r,Z.min,Z.max,V);Z.min=ae[0],Z.max=ae[1]}if(Z.min>Z.max){let ae=Z.min;Z.min=Z.max,Z.max=ae}if(Mn>1&&Z.min!=null&&Z.max!=null&&Z.max-Z.min<1e-16)return;V==C&&se.distr==2&&Mn>0&&(Z.min=lo(Z.min,n[0]),Z.max=lo(Z.max,n[0]),Z.min==Z.max&&Z.max++),A[V]=Z,$i=!0,Io()}}r.setScale=ze;let Bn,Uo,mo,Wn,$a,Vo,Yi,Lo,Bs,on,dt,Vt,Ji=!1;const Gn=re.drag;let qe=Gn.x,Cn=Gn.y;de&&(re.x&&(Bn=Wi(yA,o)),re.y&&(Uo=Wi(bA,o)),W.ori==0?(mo=Bn,Wn=Uo):(mo=Uo,Wn=Bn),dt=re.left,Vt=re.top);const _t=r.select=rr({show:!0,over:!0,left:0,width:0,top:0,height:0},t.select),qr=_t.show?Wi(vA,_t.over?o:h):null;function Zi(V,Z){if(_t.show){for(let se in V)_t[se]=V[se],se in Y&&An(qr,se,V[se]);Z!==!1&&ot("setSelect")}}r.setSelect=Zi;function Ft(V){if(x[V].show)ce&&Xu(Ee[V],$s);else if(ce&&Ai(Ee[V],$s),de){let Z=Tn?Qn[0]:Qn[V];Z!=null&&Ao(Z,-10,-10,mt,Ye)}}function Gr(V,Z,se){ze(V,{min:Z,max:se})}function cr(V,Z,se,ae){Z.focus!=null&&Ws(V),Z.show!=null&&x.forEach((ge,_e)=>{_e>0&&(V==_e||V==null)&&(ge.show=Z.show,Ft(_e),m==2?(Gr(ge.facets[0].scale,null,null),Gr(ge.facets[1].scale,null,null)):Gr(ge.scale,null,null),Io())}),se!==!1&&ot("setSeries",V,Z),ae&&St("setSeries",r,V,Z)}r.setSeries=cr;function vo(V,Z){rr(_[V],Z)}function Oi(V,Z){V.fill=Ut(V.fill||null),V.dir=en(V.dir,-1),Z=Z??_.length,_.splice(Z,0,V)}function On(V){V==null?_.length=0:_.splice(V,1)}r.addBand=Oi,r.setBand=vo,r.delBand=On;function us(V,Z){x[V].alpha=Z,de&&Qn[V]!=null&&(Qn[V].style.opacity=Z),ce&&Ee[V]&&(Ee[V].style.opacity=Z)}let Kn,Ni,Di;const Xi={focus:!0};function Ws(V){if(V!=Di){let Z=V==null,se=Hr.alpha!=1;x.forEach((ae,ge)=>{if(m==1||ge>0){let _e=Z||ge==0||ge==V;ae._focus=Z?null:_e,se&&us(ge,_e?1:Hr.alpha)}}),Di=V,se&&Io()}}ce&&Ur&&dn(Vg,fe,V=>{re._lock||(ni(V),Di!=null&&cr(null,Xi,!0,kt.setSeries))});function an(V,Z,se){let ae=$[Z];se&&(V=V/rn-(ae.ori==1?Sn:Ot));let ge=mt;ae.ori==1&&(ge=Ye,V=ge-V),ae.dir==-1&&(V=ge-V);let _e=ae._min,Ie=ae._max,Be=V/ge,Ve=_e+(Ie-_e)*Be,Ke=ae.distr;return Ke==3?ua(10,Ve):Ke==4?DA(Ve,ae.asinh):Ke==100?ae.bwd(Ve):Ve}function Ta(V,Z){let se=an(V,C,Z);return lo(se,n[0],vn,In)}r.valToIdx=V=>lo(V,n[0]),r.posToIdx=Ta,r.posToVal=an,r.valToPos=(V,Z,se)=>$[Z].ori==0?d(V,$[Z],se?tn:mt,se?En:0):g(V,$[Z],se?Vn:Ye,se?Xn:0),r.setCursor=(V,Z,se)=>{dt=V.left,Vt=V.top,k(null,Z,se)};function vr(V,Z){An(qr,aa,_t.left=V),An(qr,Xa,_t.width=Z)}function Kr(V,Z){An(qr,el,_t.top=V),An(qr,Qa,_t.height=Z)}let Oo=W.ori==0?vr:Kr,Lr=W.ori==1?vr:Kr;function yi(){if(ce&&le.live)for(let V=m==2?1:0;V<x.length;V++){if(V==0&&Ge)continue;let Z=le.values[V],se=0;for(let ae in Z)Ue[V][se++].firstChild.nodeValue=Z[ae]}}function b(V,Z){if(V!=null&&(V.idxs?V.idxs.forEach((se,ae)=>{Q[ae]=se}):BA(V.idx)||Q.fill(V.idx),le.idx=Q[0]),ce&&le.live){for(let se=0;se<x.length;se++)(se>0||m==1&&!Ge)&&S(se,Q[se]);yi()}gr=!1,Z!==!1&&ot("setLegend")}r.setLegend=b;function S(V,Z){let se=x[V],ae=V==0&&z==2?er:n[V],ge;Ge?ge=se.values(r,V,Z)??at:(ge=se.value(r,Z==null?null:ae[Z],V,Z),ge=ge==null?at:{_:ge}),le.values[V]=ge}function k(V,Z,se){Bs=dt,on=Vt,[dt,Vt]=re.move(r,dt,Vt),re.left=dt,re.top=Vt,de&&(mo&&Ao(mo,pr(dt),0,mt,Ye),Wn&&Ao(Wn,0,pr(Vt),mt,Ye));let ae,ge=vn>In;Kn=yn,Ni=null;let _e=W.ori==0?mt:Ye,Ie=W.ori==1?mt:Ye;if(dt<0||Mn==0||ge){ae=re.idx=null;for(let Be=0;Be<x.length;Be++){let Ve=Qn[Be];Ve!=null&&Ao(Ve,-10,-10,mt,Ye)}Ur&&cr(null,Xi,!0,V==null&&kt.setSeries),le.live&&(Q.fill(ae),gr=!0)}else{let Be,Ve,Ke;m==1&&(Be=W.ori==0?dt:Vt,Ve=an(Be,C),ae=re.idx=lo(Ve,n[0],vn,In),Ke=O(n[0][ae],W,_e,0));let tt=-10,it=-10,At=0,Qt=0,Bt=!0,Ct="",yt="";for(let ht=m==2?1:0;ht<x.length;ht++){let wn=x[ht],Dn=Q[ht],hr=Dn==null?null:m==1?n[ht][Dn]:n[ht][1][Dn],ln=re.dataIdx(r,ht,ae,Ve),gn=ln==null?null:m==1?n[ht][ln]:n[ht][1][ln];if(gr=gr||gn!=hr||ln!=Dn,Q[ht]=ln,ht>0&&wn.show){let me=ln==null?-10:ln==ae?Ke:O(m==1?n[0][ln]:n[ht][0][ln],W,_e,0),Te=gn==null?-10:T(gn,m==1?$[wn.scale]:$[wn.facets[1].scale],Ie,0);if(Ur&&gn!=null){let ke=W.ori==1?dt:Vt,Je=fr(Hr.dist(r,ht,ln,Te,ke));if(Je<Kn){let pt=Hr.bias;if(pt!=0){let $t=an(ke,wn.scale),nn=gn>=0?1:-1,Wt=$t>=0?1:-1;Wt==nn&&(Wt==1?pt==1?gn>=$t:gn<=$t:pt==1?gn<=$t:gn>=$t)&&(Kn=Je,Ni=ht)}else Kn=Je,Ni=ht}}if(gr||Tn){let ke,Je;W.ori==0?(ke=me,Je=Te):(ke=Te,Je=me);let pt,$t,nn,Wt,bi,Or,_n=!0,Qi=$n.bbox;if(Qi!=null){_n=!1;let Nr=Qi(r,ht);nn=Nr.left,Wt=Nr.top,pt=Nr.width,$t=Nr.height}else nn=ke,Wt=Je,pt=$t=$n.size(r,ht);if(Or=$n.fill(r,ht),bi=$n.stroke(r,ht),Tn)ht==Ni&&Kn<=Hr.prox&&(tt=nn,it=Wt,At=pt,Qt=$t,Bt=_n,Ct=Or,yt=bi);else{let Nr=Qn[ht];Nr!=null&&(fi[ht]=nn,Ei[ht]=Wt,Xg(Nr,pt,$t,_n),Jg(Nr,Or,bi),Ao(Nr,ji(nn),ji(Wt),mt,Ye))}}}}if(Tn){let ht=Hr.prox,wn=Di==null?Kn<=ht:Kn>ht||Ni!=Di;if(gr||wn){let Dn=Qn[0];Dn!=null&&(fi[0]=tt,Ei[0]=it,Xg(Dn,At,Qt,Bt),Jg(Dn,Ct,yt),Ao(Dn,ji(tt),ji(it),mt,Ye))}}}if(_t.show&&Ji)if(V!=null){let[Be,Ve]=kt.scales,[Ke,tt]=kt.match,[it,At]=V.cursor.sync.scales,Qt=V.cursor.drag;if(qe=Qt._x,Cn=Qt._y,qe||Cn){let{left:Bt,top:Ct,width:yt,height:ht}=V.select,wn=V.scales[it].ori,Dn=V.posToVal,hr,ln,gn,me,Te,ke=Be!=null&&Ke(Be,it),Je=Ve!=null&&tt(Ve,At);ke&&qe?(wn==0?(hr=Bt,ln=yt):(hr=Ct,ln=ht),gn=$[Be],me=O(Dn(hr,it),gn,_e,0),Te=O(Dn(hr+ln,it),gn,_e,0),Oo(co(me,Te),fr(Te-me))):Oo(0,_e),Je&&Cn?(wn==1?(hr=Bt,ln=yt):(hr=Ct,ln=ht),gn=$[Ve],me=T(Dn(hr,At),gn,Ie,0),Te=T(Dn(hr+ln,At),gn,Ie,0),Lr(co(me,Te),fr(Te-me))):Lr(0,Ie)}else X()}else{let Be=fr(Bs-$a),Ve=fr(on-Vo);if(W.ori==1){let At=Be;Be=Ve,Ve=At}qe=Gn.x&&Be>=Gn.dist,Cn=Gn.y&&Ve>=Gn.dist;let Ke=Gn.uni;Ke!=null?qe&&Cn&&(qe=Be>=Ke,Cn=Ve>=Ke,!qe&&!Cn&&(Ve>Be?Cn=!0:qe=!0)):Gn.x&&Gn.y&&(qe||Cn)&&(qe=Cn=!0);let tt,it;qe&&(W.ori==0?(tt=Yi,it=dt):(tt=Lo,it=Vt),Oo(co(tt,it),fr(it-tt)),Cn||Lr(0,Ie)),Cn&&(W.ori==1?(tt=Yi,it=dt):(tt=Lo,it=Vt),Lr(co(tt,it),fr(it-tt)),qe||Oo(0,_e)),!qe&&!Cn&&(Oo(0,0),Lr(0,0))}if(Gn._x=qe,Gn._y=Cn,V==null){if(se){if(Zt!=null){let[Be,Ve]=kt.scales;kt.values[0]=Be!=null?an(W.ori==0?dt:Vt,Be):null,kt.values[1]=Ve!=null?an(W.ori==1?dt:Vt,Ve):null}St(Gu,r,dt,Vt,mt,Ye,ae)}if(Ur){let Be=se&&kt.setSeries,Ve=Hr.prox;Di==null?Kn<=Ve&&cr(Ni,Xi,!0,Be):Kn>Ve?cr(null,Xi,!0,Be):Ni!=Di&&cr(Ni,Xi,!0,Be)}}gr&&(le.idx=ae,b()),Z!==!1&&ot("setCursor")}let P=null;Object.defineProperty(r,"rect",{get(){return P==null&&F(!1),P}});function F(V=!1){V?P=null:(P=o.getBoundingClientRect(),ot("syncRect",P))}function j(V,Z,se,ae,ge,_e,Ie){re._lock||Ji&&V!=null&&V.movementX==0&&V.movementY==0||(q(V,Z,se,ae,ge,_e,Ie,!1,V!=null),V!=null?k(null,!0,!0):k(Z,!0,!1))}function q(V,Z,se,ae,ge,_e,Ie,Be,Ve){if(P==null&&F(!1),ni(V),V!=null)se=V.clientX-P.left,ae=V.clientY-P.top;else{if(se<0||ae<0){dt=-10,Vt=-10;return}let[Ke,tt]=kt.scales,it=Z.cursor.sync,[At,Qt]=it.values,[Bt,Ct]=it.scales,[yt,ht]=kt.match,wn=Z.axes[0].side%2==1,Dn=W.ori==0?mt:Ye,hr=W.ori==1?mt:Ye,ln=wn?_e:ge,gn=wn?ge:_e,me=wn?ae:se,Te=wn?se:ae;if(Bt!=null?se=yt(Ke,Bt)?w(At,$[Ke],Dn,0):-10:se=Dn*(me/ln),Ct!=null?ae=ht(tt,Ct)?w(Qt,$[tt],hr,0):-10:ae=hr*(Te/gn),W.ori==1){let ke=se;se=ae,ae=ke}}Ve&&(Z==null||Z.cursor.event.type==Gu)&&((se<=1||se>=mt-1)&&(se=Es(se,mt)),(ae<=1||ae>=Ye-1)&&(ae=Es(ae,Ye))),Be?($a=se,Vo=ae,[Yi,Lo]=re.move(r,se,ae)):(dt=se,Vt=ae)}const Y={width:0,height:0,left:0,top:0};function X(){Zi(Y,!1)}let oe,ue,we,Ae;function be(V,Z,se,ae,ge,_e,Ie){Ji=!0,qe=Cn=Gn._x=Gn._y=!1,q(V,Z,se,ae,ge,_e,Ie,!0,!1),V!=null&&(dn(Ku,Ju,Ce,!1),St(Hg,r,Yi,Lo,mt,Ye,null));let{left:Be,top:Ve,width:Ke,height:tt}=_t;oe=Be,ue=Ve,we=Ke,Ae=tt}function Ce(V,Z,se,ae,ge,_e,Ie){Ji=Gn._x=Gn._y=!1,q(V,Z,se,ae,ge,_e,Ie,!1,!0);let{left:Be,top:Ve,width:Ke,height:tt}=_t,it=Ke>0||tt>0,At=oe!=Be||ue!=Ve||we!=Ke||Ae!=tt;if(it&&At&&Zi(_t),Gn.setScale&&it&&At){let Qt=Be,Bt=Ke,Ct=Ve,yt=tt;if(W.ori==1&&(Qt=Ve,Bt=tt,Ct=Be,yt=Ke),qe&&Gr(C,an(Qt,C),an(Qt+Bt,C)),Cn)for(let ht in $){let wn=$[ht];ht!=C&&wn.from==null&&wn.min!=yn&&Gr(ht,an(Ct+yt,ht),an(Ct,ht))}X()}else re.lock&&(re._lock=!re._lock,k(Z,!0,V!=null));V!=null&&(Zn(Ku,Ju),St(Ku,r,dt,Vt,mt,Ye,null))}function Pe(V,Z,se,ae,ge,_e,Ie){if(re._lock)return;ni(V);let Be=Ji;if(Ji){let Ve=!0,Ke=!0,tt=10,it,At;W.ori==0?(it=qe,At=Cn):(it=Cn,At=qe),it&&At&&(Ve=dt<=tt||dt>=mt-tt,Ke=Vt<=tt||Vt>=Ye-tt),it&&Ve&&(dt=dt<Yi?0:mt),At&&Ke&&(Vt=Vt<Lo?0:Ye),k(null,!0,!0),Ji=!1}dt=-10,Vt=-10,Q.fill(null),k(null,!0,!0),Be&&(Ji=Be)}function Ne(V,Z,se,ae,ge,_e,Ie){re._lock||(ni(V),ri(),X(),V!=null&&St(qg,r,dt,Vt,mt,Ye,null))}function Ze(){E.forEach(nS),Hi(r.width,r.height,!0)}Ts(ec,ca,Ze);const ft={};ft.mousedown=be,ft.mousemove=j,ft.mouseup=Ce,ft.dblclick=Ne,ft.setSeries=(V,Z,se,ae)=>{let ge=kt.match[2];se=ge(r,Z,se),se!=-1&&cr(se,ae,!0,!1)},de&&(dn(Hg,o,be),dn(Gu,o,j),dn(Ug,o,V=>{ni(V),F(!1)}),dn(Vg,o,Pe),dn(qg,o,Ne),wh.add(r),r.syncRect=F);const rt=r.hooks=t.hooks||{};function ot(V,Z,se){Ir?xn.push([V,Z,se]):V in rt&&rt[V].forEach(ae=>{ae.call(null,r,Z,se)})}(t.plugins||[]).forEach(V=>{for(let Z in V.hooks)rt[Z]=(rt[Z]||[]).concat(V.hooks[Z])});const Rn=(V,Z,se)=>se,kt=rr({key:null,setSeries:!1,filters:{pub:um,sub:um},scales:[C,x[1]?x[1].scale:null],match:[hm,hm,Rn],values:[null,null]},re.sync);kt.match.length==2&&kt.match.push(Rn),re.sync=kt;const Zt=kt.key,It=Ym(Zt);function St(V,Z,se,ae,ge,_e,Ie){kt.filters.pub(V,Z,se,ae,ge,_e,Ie)&&It.pub(V,Z,se,ae,ge,_e,Ie)}It.sub(r);function ur(V,Z,se,ae,ge,_e,Ie){kt.filters.sub(V,Z,se,ae,ge,_e,Ie)&&ft[V](null,Z,se,ae,ge,_e,Ie)}r.pub=ur;function yr(){It.unsub(r),wh.delete(r),Xt.clear(),eh(ec,ca,Ze),f.remove(),fe?.remove(),ot("destroy")}r.destroy=yr;function Nn(){ot("init",t,n),gi(n||t.data,!1),A[C]?ze(C,A[C]):ri(),Ti=_t.show&&(_t.width>0||_t.height>0),qn=gr=!0,Hi(t.width,t.height)}return x.forEach(cs),E.forEach(pi),e?e instanceof HTMLElement?(e.appendChild(f),Nn()):e(r,Nn):Nn(),r}Br.assign=rr,Br.fmtNum=rh,Br.rangeNum=ic,Br.rangeLog=rc,Br.rangeAsinh=th,Br.orient=Is,Br.pxRatio=rn,Br.join=GA,Br.fmtDate=ah,Br.tzDate=ik,Br.sync=Ym;{Br.addGap=Bk,Br.clipGaps=hc;let t=Br.paths={points:nv};t.linear=iv,t.stepped=Hk,t.bars=Uk,t.spline=qk}var dv,fv;function rS(){return fv||(fv=1,dv=function(t,n,e,r,m){var d,g;if(r===void 0)r=0;else if(r=r|0,r<0||r>=t.length)throw new RangeError("invalid lower bound");if(m===void 0)m=t.length-1;else if(m=m|0,m<r||m>=t.length)throw new RangeError("invalid upper bound");for(;r<=m;)if(d=r+(m-r>>>1),g=+e(t[d],n,d,t),g<0)r=d+1;else if(g>0)m=d-1;else return d;return~r}),dv}var iS=rS();const FD=Hn("y",Xl(iS));var Ch,pv;function oS(){if(pv)return Ch;pv=1;function t(n,e,r){var m=-1,d=n.length;e<0&&(e=-e>d?0:d+e),r=r>d?d:r,r<0&&(r+=d),d=e>r?0:r-e>>>0,e>>>=0;for(var g=Array(d);++m<d;)g[m]=n[m+e];return g}return Ch=t,Ch}var _h,gv;function sS(){if(gv)return _h;gv=1;var t=oS();function n(e,r,m){var d=e.length;return m=m===void 0?d:m,!r&&m>=d?e:t(e,r,m)}return _h=n,_h}var Ah,mv;function vv(){if(mv)return Ah;mv=1;var t="\\ud800-\\udfff",n="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",m=n+e+r,d="\\ufe0e\\ufe0f",g="\\u200d",w=RegExp("["+g+t+m+d+"]");function u(f){return w.test(f)}return Ah=u,Ah}var kh,yv;function aS(){if(yv)return kh;yv=1;function t(n){return n.split("")}return kh=t,kh}var Sh,bv;function lS(){if(bv)return Sh;bv=1;var t="\\ud800-\\udfff",n="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",m=n+e+r,d="\\ufe0e\\ufe0f",g="["+t+"]",w="["+m+"]",u="\\ud83c[\\udffb-\\udfff]",f="(?:"+w+"|"+u+")",a="[^"+t+"]",s="(?:\\ud83c[\\udde6-\\uddff]){2}",c="[\\ud800-\\udbff][\\udc00-\\udfff]",h="\\u200d",o=f+"?",l="["+d+"]?",p="(?:"+h+"(?:"+[a,s,c].join("|")+")"+l+o+")*",y=l+o+p,x="(?:"+[a+w+"?",w,s,c,g].join("|")+")",E=RegExp(u+"(?="+u+")|"+x+y,"g");function $(_){return _.match(E)||[]}return Sh=$,Sh}var $h,wv;function cS(){if(wv)return $h;wv=1;var t=aS(),n=vv(),e=lS();function r(m){return n(m)?e(m):t(m)}return $h=r,$h}var Th,xv;function uS(){if(xv)return Th;xv=1;var t=typeof rs=="object"&&rs&&rs.Object===Object&&rs;return Th=t,Th}var Rh,Cv;function hS(){if(Cv)return Rh;Cv=1;var t=uS(),n=typeof self=="object"&&self&&self.Object===Object&&self,e=t||n||Function("return this")();return Rh=e,Rh}var Eh,_v;function Mh(){if(_v)return Eh;_v=1;var t=hS(),n=t.Symbol;return Eh=n,Eh}var Ih,Av;function dS(){if(Av)return Ih;Av=1;function t(n,e){for(var r=-1,m=n==null?0:n.length,d=Array(m);++r<m;)d[r]=e(n[r],r,n);return d}return Ih=t,Ih}var Lh,kv;function fS(){if(kv)return Lh;kv=1;var t=Array.isArray;return Lh=t,Lh}var Oh,Sv;function pS(){if(Sv)return Oh;Sv=1;var t=Mh(),n=Object.prototype,e=n.hasOwnProperty,r=n.toString,m=t?t.toStringTag:void 0;function d(g){var w=e.call(g,m),u=g[m];try{g[m]=void 0;var f=!0}catch{}var a=r.call(g);return f&&(w?g[m]=u:delete g[m]),a}return Oh=d,Oh}var Nh,$v;function gS(){if($v)return Nh;$v=1;var t=Object.prototype,n=t.toString;function e(r){return n.call(r)}return Nh=e,Nh}var Dh,Tv;function mS(){if(Tv)return Dh;Tv=1;var t=Mh(),n=pS(),e=gS(),r="[object Null]",m="[object Undefined]",d=t?t.toStringTag:void 0;function g(w){return w==null?w===void 0?m:r:d&&d in Object(w)?n(w):e(w)}return Dh=g,Dh}var Ph,Rv;function vS(){if(Rv)return Ph;Rv=1;function t(n){return n!=null&&typeof n=="object"}return Ph=t,Ph}var zh,Ev;function yS(){if(Ev)return zh;Ev=1;var t=mS(),n=vS(),e="[object Symbol]";function r(m){return typeof m=="symbol"||n(m)&&t(m)==e}return zh=r,zh}var Fh,Mv;function bS(){if(Mv)return Fh;Mv=1;var t=Mh(),n=dS(),e=fS(),r=yS(),m=t?t.prototype:void 0,d=m?m.toString:void 0;function g(w){if(typeof w=="string")return w;if(e(w))return n(w,g)+"";if(r(w))return d?d.call(w):"";var u=w+"";return u=="0"&&1/w==-1/0?"-0":u}return Fh=g,Fh}var Bh,Iv;function gc(){if(Iv)return Bh;Iv=1;var t=bS();function n(e){return e==null?"":t(e)}return Bh=n,Bh}var Wh,Lv;function wS(){if(Lv)return Wh;Lv=1;var t=sS(),n=vv(),e=cS(),r=gc();function m(d){return function(g){g=r(g);var w=n(g)?e(g):void 0,u=w?w[0]:g.charAt(0),f=w?t(w,1).join(""):g.slice(1);return u[d]()+f}}return Wh=m,Wh}var jh,Ov;function Nv(){if(Ov)return jh;Ov=1;var t=wS(),n=t("toUpperCase");return jh=n,jh}var xS=Nv();const CS=Xl(xS);var Hh,Dv;function _S(){if(Dv)return Hh;Dv=1;var t=gc(),n=Nv();function e(r){return n(t(r).toLowerCase())}return Hh=e,Hh}var Uh,Pv;function AS(){if(Pv)return Uh;Pv=1;function t(n,e,r,m){var d=-1,g=n==null?0:n.length;for(m&&g&&(r=n[++d]);++d<g;)r=e(r,n[d],d,n);return r}return Uh=t,Uh}var Vh,zv;function kS(){if(zv)return Vh;zv=1;function t(n){return function(e){return n?.[e]}}return Vh=t,Vh}var qh,Fv;function SS(){if(Fv)return qh;Fv=1;var t=kS(),n={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},e=t(n);return qh=e,qh}var Gh,Bv;function $S(){if(Bv)return Gh;Bv=1;var t=SS(),n=gc(),e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",m="\\ufe20-\\ufe2f",d="\\u20d0-\\u20ff",g=r+m+d,w="["+g+"]",u=RegExp(w,"g");function f(a){return a=n(a),a&&a.replace(e,t).replace(u,"")}return Gh=f,Gh}var Kh,Wv;function TS(){if(Wv)return Kh;Wv=1;var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function n(e){return e.match(t)||[]}return Kh=n,Kh}var Yh,jv;function RS(){if(jv)return Yh;jv=1;var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function n(e){return t.test(e)}return Yh=n,Yh}var Jh,Hv;function ES(){if(Hv)return Jh;Hv=1;var t="\\ud800-\\udfff",n="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",m=n+e+r,d="\\u2700-\\u27bf",g="a-z\\xdf-\\xf6\\xf8-\\xff",w="\\xac\\xb1\\xd7\\xf7",u="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",f="\\u2000-\\u206f",a=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",s="A-Z\\xc0-\\xd6\\xd8-\\xde",c="\\ufe0e\\ufe0f",h=w+u+f+a,o="['’]",l="["+h+"]",p="["+m+"]",y="\\d+",x="["+d+"]",E="["+g+"]",$="[^"+t+h+y+d+g+s+"]",_="\\ud83c[\\udffb-\\udfff]",C="(?:"+p+"|"+_+")",L="[^"+t+"]",D="(?:\\ud83c[\\udde6-\\uddff]){2}",I="[\\ud800-\\udbff][\\udc00-\\udfff]",M="["+s+"]",W="\\u200d",z="(?:"+E+"|"+$+")",O="(?:"+M+"|"+$+")",T="(?:"+o+"(?:d|ll|m|re|s|t|ve))?",A="(?:"+o+"(?:D|LL|M|RE|S|T|VE))?",N=C+"?",B="["+c+"]?",U="(?:"+W+"(?:"+[L,D,I].join("|")+")"+B+N+")*",G="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",J="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Q=B+N+U,le="(?:"+[x,D,I].join("|")+")"+Q,re=RegExp([M+"?"+E+"+"+T+"(?="+[l,M,"$"].join("|")+")",O+"+"+A+"(?="+[l,M+z,"$"].join("|")+")",M+"?"+z+"+"+T,M+"+"+A,J,G,y,le].join("|"),"g");function ce(de){return de.match(re)||[]}return Jh=ce,Jh}var Zh,Uv;function MS(){if(Uv)return Zh;Uv=1;var t=TS(),n=RS(),e=gc(),r=ES();function m(d,g,w){return d=e(d),g=w?void 0:g,g===void 0?n(d)?r(d):t(d):d.match(g)||[]}return Zh=m,Zh}var Xh,Vv;function IS(){if(Vv)return Xh;Vv=1;var t=AS(),n=$S(),e=MS(),r="['’]",m=RegExp(r,"g");function d(g){return function(w){return t(e(n(w).replace(m,"")),g,"")}}return Xh=d,Xh}var Qh,qv;function LS(){if(qv)return Qh;qv=1;var t=_S(),n=IS(),e=n(function(r,m,d){return m=m.toLowerCase(),r+(d?t(m):m)});return Qh=e,Qh}var OS=LS();const NS=Xl(OS),DS=Object.assign({"./ArrayWidget.vue":()=>ct(()=>lt.import("./ArrayWidget-DMSm_P6c-758cfd44feebfe30b1e9.js"),void 0),"./ArrayplotWidget.vue":()=>ct(()=>lt.import("./ArrayplotWidget-fdXLhGAl-e3e7143acc3764969eb8.js"),void 0),"./BlockWidget.vue":()=>ct(()=>lt.import("./BlockWidget-Do3W6tZh-55e450760dca098564c5.js"),void 0),"./ButtonWidget.vue":()=>ct(()=>lt.import("./ButtonWidget-DukCQt0F-2aab525a982d9af18352.js"),void 0),"./CanvasWidget.vue":()=>ct(()=>lt.import("./CanvasWidget-BRdVWln5-9f7157d343603431edf8.js"),void 0),"./CanvasdotWidget.vue":()=>ct(()=>lt.import("./CanvasdotWidget-DV8PeDWz-9d294e7129956654497b.js"),void 0),"./CanvasimageWidget.vue":()=>ct(()=>lt.import("./CanvasimageWidget-Czbq1GuF-f539316f0133f2bef6b5.js"),void 0),"./CanvasimagevalueWidget.vue":()=>ct(()=>lt.import("./CanvasimagevalueWidget-DKt5JgEt-c5196e1871b66cf9d57c.js"),void 0),"./CanvaslabelWidget.vue":()=>ct(()=>lt.import("./CanvaslabelWidget-DW2I1ra1-c9c79d00047fa43f8198.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>ct(()=>lt.import("./CanvaslabelvalueWidget-BhzvZVfD-aa0d4185d816f4865b21.js"),void 0),"./CanvaslineWidget.vue":()=>ct(()=>lt.import("./CanvaslineWidget-DsjY37tp-73c02d7eb6842bf59ee4.js"),void 0),"./CanvaslinevalueWidget.vue":()=>ct(()=>lt.import("./CanvaslinevalueWidget-ihI97G8T-6f45568d902f0134ec2d.js"),void 0),"./CheckbuttonWidget.vue":()=>ct(()=>lt.import("./CheckbuttonWidget-B778Z-Zo-b3ae95bf21ca511e76d5.js"),void 0),"./ComboboxWidget.vue":()=>ct(()=>lt.import("./ComboboxWidget-CuuvOL9K-862f7959f350ba49cdb0.js"),void 0),"./DateWidget.vue":()=>ct(()=>lt.import("./DateWidget-COvQTAeo-2a1d9352dc1f6b2b9134.js"),void 0),"./DynamicWidget.vue":()=>ct(()=>lt.import("./DynamicWidget-BuSbQVhf-0753353d5a9b32ed5e24.js"),void 0),"./FilechecksumWidget.vue":()=>ct(()=>lt.import("./FilechecksumWidget-DRnOt_UE-3e9b2eceec5b977e23ef.js"),void 0),"./FiledisplayWidget.vue":()=>ct(()=>lt.import("./FiledisplayWidget-26R46EjS-35b87dcf07a7d95cd83e.js"),void 0),"./FormatvalueWidget.vue":()=>ct(()=>lt.import("./FormatvalueWidget-BxyscMJc-8302b4d5003f49a8185b.js"),void 0),"./HorizontalWidget.vue":()=>ct(()=>lt.import("./HorizontalWidget-fWLFj7Kg-43f4c63ce87b9db74f2e.js"),void 0),"./HorizontalboxWidget.vue":()=>ct(()=>lt.import("./HorizontalboxWidget-DEaXhKEz-8f75b9c9c74784f871f1.js"),void 0),"./HorizontallineWidget.vue":()=>ct(()=>lt.import("./HorizontallineWidget-Bvu1QP3S-0df33b81905630850ce1.js"),void 0),"./IframeWidget.vue":()=>ct(()=>lt.import("./IframeWidget-B143k4lo-769d74848916e51582f6.js"),void 0),"./ImageviewerWidget.vue":()=>ct(()=>lt.import("./ImageviewerWidget-CLrvr6dw-a9f4ee5861fddad31f58.js"),void 0),"./LabelWidget.vue":()=>ct(()=>lt.import("./LabelWidget-CA1bTX2B-503a07dc1e92e1246728.js"),void 0),"./LabelledWidget.vue":()=>ct(()=>lt.import("./LabelledWidget-BDhvr03J-57e6858f8977a2768dc1.js"),void 0),"./LabelprogressbarWidget.vue":()=>ct(()=>lt.import("./LabelprogressbarWidget-g7A5CE8S-7d88976db7d6246d16fd.js"),void 0),"./LabelsparklineWidget.vue":()=>ct(()=>lt.import("./LabelsparklineWidget-B27xXxWg-eba195b7c33281683bc6.js"),void 0),"./LabelvalueWidget.vue":()=>ct(()=>lt.import("./LabelvalueWidget-DFn8o6LC-50a9865e818041e5c9a7.js"),void 0),"./LabelvaluedescWidget.vue":()=>ct(()=>lt.import("./LabelvaluedescWidget-BQpaxFaB-42c481ec4c983e508ff5.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>ct(()=>lt.import("./LabelvaluelimitsbarWidget-C-z96q8z-262fe4e7c88fcca1a21f.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>ct(()=>lt.import("./LabelvaluelimitscolumnWidget-D2TMEv9O-340d375bcaf134252046.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>ct(()=>lt.import("./LabelvaluerangebarWidget-D99dZCjz-b47dd057dccec53dd507.js"),void 0),"./LedWidget.vue":()=>ct(()=>lt.import("./LedWidget-D2uxHxe3-f3e4a9d7363ac51f7149.js"),void 0),"./LimitsbarWidget.vue":()=>ct(()=>lt.import("./LimitsbarWidget-Cqhh7LKU-a1789aa61517526bcc09.js"),void 0),"./LimitscolorWidget.vue":()=>ct(()=>lt.import("./LimitscolorWidget-haGB4RbY-2fa17abea5f9c3e98dee.js"),void 0),"./LimitscolumnWidget.vue":()=>ct(()=>lt.import("./LimitscolumnWidget-B1GdmlR_-9822570e890afde24370.js"),void 0),"./LinegraphWidget.vue":()=>ct(()=>lt.import("./LinegraphWidget-COSOQ0uM-bbe31f4b114886e74712.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>ct(()=>lt.import("./MatrixbycolumnsWidget-coHlLETG-64183bbc0a247f2551a0.js"),void 0),"./ProgressbarWidget.vue":()=>ct(()=>lt.import("./ProgressbarWidget-D_yFssIZ-235f413989eea13e8daa.js"),void 0),"./RadiobuttonWidget.vue":()=>ct(()=>lt.import("./RadiobuttonWidget-DL0jVTcb-ab3f38652aee1be60a35.js"),void 0),"./RadiogroupWidget.vue":()=>ct(()=>lt.import("./RadiogroupWidget-2-td69IA-8b8e486e8b57afe77bed.js"),void 0),"./RangebarWidget.vue":()=>ct(()=>lt.import("./RangebarWidget-i2mlnxys-91ae8bee9414bae8709f.js"),void 0),"./RollupWidget.vue":()=>ct(()=>lt.import("./RollupWidget-BEJ2Icg1-7d1e13f221281dda7ce5.js"),void 0),"./ScrollwindowWidget.vue":()=>ct(()=>lt.import("./ScrollwindowWidget-BU1cRpL8-06e05520339b779b4261.js"),void 0),"./SignalWidget.vue":()=>ct(()=>lt.import("./SignalWidget-hiTkeem9-cee50ed98c4ed879dfe9.js"),void 0),"./SpacerWidget.vue":()=>ct(()=>lt.import("./SpacerWidget-CBmzzS_X-f79cdc38c3247a117577.js"),void 0),"./SparklineWidget.vue":()=>ct(()=>lt.import("./SparklineWidget-CizRh6QR-8f36d6d0d14e9b0f305e.js"),void 0),"./TabbookWidget.vue":()=>ct(()=>lt.import("./TabbookWidget-CvL3Ozmx-128fcef17ed2c8d7806b.js"),void 0),"./TextboxWidget.vue":()=>ct(()=>lt.import("./TextboxWidget-BtEwXzDO-cbf3f2de95e4c365c5ce.js"),void 0),"./TextfieldWidget.vue":()=>ct(()=>lt.import("./TextfieldWidget-BDbb57HP-fd504ea1d7a4d99b047c.js"),void 0),"./TimeWidget.vue":()=>ct(()=>lt.import("./TimeWidget-DzD8U8l8-8a00005bb155beb80051.js"),void 0),"./TitleWidget.vue":()=>ct(()=>lt.import("./TitleWidget-CL53vf14-9ea9713e1084b2d6b33f.js"),void 0),"./ValueWidget.vue":()=>ct(()=>lt.import("./ValueWidget-CAkuc_w_-fe817796128b0ef92a25.js"),void 0),"./ValuelimitsbarWidget.vue":()=>ct(()=>lt.import("./ValuelimitsbarWidget-Y8sO05E1-d4a8c6bcef04142d2e5f.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>ct(()=>lt.import("./ValuelimitscolumnWidget-iOjB_fCj-2e14a684190dfecbd460.js"),void 0),"./ValuerangebarWidget.vue":()=>ct(()=>lt.import("./ValuerangebarWidget-DsCoeAm6-b6746c170d00d5331090.js"),void 0),"./VerticalWidget.vue":()=>ct(()=>lt.import("./VerticalWidget-C6O0dhRU-1613f922f5d22944287f.js"),void 0),"./VerticalboxWidget.vue":()=>ct(()=>lt.import("./VerticalboxWidget-B-CoqRJG-2c5328ad7974e365a15e.js"),void 0)}),PS=Object.entries(DS).reduce((t,[n,e])=>{n=n.split("/").pop();const r=CS(NS(n.replace(/\.\w+$/,"")));return{...t,[r]:Ef(e)}},{}),BD=Hn("w",{components:PS});function Gv(t,n){return function(){return t.apply(n,arguments)}}const{toString:zS}=Object.prototype,{getPrototypeOf:va}=Object,{iterator:sl,toStringTag:Kv}=Symbol,mc=(({hasOwnProperty:t})=>(n,e)=>t.call(n,e))(Object.prototype),al=(t,n)=>{let e=t;const r=[];for(;e!=null&&e!==Object.prototype;){if(r.indexOf(e)!==-1)return!1;if(r.push(e),mc(e,n))return!0;e=va(e)}return!1},FS=(t,n)=>t!=null&&al(t,n)?t[n]:void 0,ed=(t=>n=>{const e=zS.call(n);return t[e]||(t[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),uo=t=>(t=t.toLowerCase(),n=>ed(n)===t),vc=t=>n=>typeof n===t,{isArray:Ls}=Array,ya=vc("undefined");function ba(t){return t!==null&&!ya(t)&&t.constructor!==null&&!ya(t.constructor)&&hi(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Yv=uo("ArrayBuffer");function BS(t){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(t):n=t&&t.buffer&&Yv(t.buffer),n}const WS=vc("string"),hi=vc("function"),Jv=vc("number"),wa=t=>t!==null&&typeof t=="object",jS=t=>t===!0||t===!1,yc=t=>{if(!wa(t))return!1;const n=va(t);return(n===null||n===Object.prototype||va(n)===null)&&!al(t,Kv)&&!al(t,sl)},HS=t=>{if(!wa(t)||ba(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},US=uo("Date"),VS=uo("File"),qS=t=>!!(t&&typeof t.uri<"u"),GS=t=>t&&typeof t.getParts<"u",KS=uo("Blob"),YS=uo("FileList"),JS=t=>wa(t)&&hi(t.pipe);function ZS(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Zv=ZS(),Xv=typeof Zv.FormData<"u"?Zv.FormData:void 0,XS=t=>{if(!t)return!1;if(Xv&&t instanceof Xv)return!0;const n=va(t);if(!n||n===Object.prototype||!hi(t.append))return!1;const e=ed(t);return e==="formdata"||e==="object"&&hi(t.toString)&&t.toString()==="[object FormData]"},QS=uo("URLSearchParams"),[e$,t$,n$,r$]=["ReadableStream","Request","Response","Headers"].map(uo),i$=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ll(t,n,{allOwnKeys:e=!1}={}){if(t===null||typeof t>"u")return;let r,m;if(typeof t!="object"&&(t=[t]),Ls(t))for(r=0,m=t.length;r<m;r++)n.call(null,t[r],r,t);else{if(ba(t))return;const d=e?Object.getOwnPropertyNames(t):Object.keys(t),g=d.length;let w;for(r=0;r<g;r++)w=d[r],n.call(null,t[w],w,t)}}function Qv(t,n){if(ba(t))return null;n=n.toLowerCase();const e=Object.keys(t);let r=e.length,m;for(;r-- >0;)if(m=e[r],n===m.toLowerCase())return m;return null}const Os=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ey=t=>!ya(t)&&t!==Os;function td(...t){const{caseless:n,skipUndefined:e}=ey(this)&&this||{},r={},m=(d,g)=>{if(g==="__proto__"||g==="constructor"||g==="prototype")return;const w=n&&typeof g=="string"&&Qv(r,g)||g,u=mc(r,w)?r[w]:void 0;yc(u)&&yc(d)?r[w]=td(u,d):yc(d)?r[w]=td({},d):Ls(d)?r[w]=d.slice():(!e||!ya(d))&&(r[w]=d)};for(let d=0,g=t.length;d<g;d++){const w=t[d];if(!w||ba(w)||(ll(w,m),typeof w!="object"||Ls(w)))continue;const u=Object.getOwnPropertySymbols(w);for(let f=0;f<u.length;f++){const a=u[f];m$.call(w,a)&&m(w[a],a)}}return r}const o$=(t,n,e,{allOwnKeys:r}={})=>(ll(n,(m,d)=>{e&&hi(m)?Object.defineProperty(t,d,{__proto__:null,value:Gv(m,e),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,d,{__proto__:null,value:m,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),t),s$=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),a$=(t,n,e,r)=>{t.prototype=Object.create(n.prototype,r),Object.defineProperty(t.prototype,"constructor",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{__proto__:null,value:n.prototype}),e&&Object.assign(t.prototype,e)},l$=(t,n,e,r)=>{let m,d,g;const w={};if(n=n||{},t==null)return n;do{for(m=Object.getOwnPropertyNames(t),d=m.length;d-- >0;)g=m[d],(!r||r(g,t,n))&&!w[g]&&(n[g]=t[g],w[g]=!0);t=e!==!1&&va(t)}while(t&&(!e||e(t,n))&&t!==Object.prototype);return n},c$=(t,n,e)=>{t=String(t),(e===void 0||e>t.length)&&(e=t.length),e-=n.length;const r=t.indexOf(n,e);return r!==-1&&r===e},u$=t=>{if(!t)return null;if(Ls(t))return t;let n=t.length;if(!Jv(n))return null;const e=new Array(n);for(;n-- >0;)e[n]=t[n];return e},h$=(t=>n=>t&&n instanceof t)(typeof Uint8Array<"u"&&va(Uint8Array)),d$=(t,n)=>{const e=(t&&t[sl]).call(t);let r;for(;(r=e.next())&&!r.done;){const m=r.value;n.call(t,m[0],m[1])}},f$=(t,n)=>{let e;const r=[];for(;(e=t.exec(n))!==null;)r.push(e);return r},p$=uo("HTMLFormElement"),g$=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,e,r){return e.toUpperCase()+r}),{propertyIsEnumerable:m$}=Object.prototype,v$=uo("RegExp"),ty=(t,n)=>{const e=Object.getOwnPropertyDescriptors(t),r={};ll(e,(m,d)=>{let g;(g=n(m,d,t))!==!1&&(r[d]=g||m)}),Object.defineProperties(t,r)},y$=t=>{ty(t,(n,e)=>{if(hi(t)&&["arguments","caller","callee"].includes(e))return!1;const r=t[e];if(hi(r)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},b$=(t,n)=>{const e={},r=m=>{m.forEach(d=>{e[d]=!0})};return Ls(t)?r(t):r(String(t).split(n)),e},w$=()=>{},x$=(t,n)=>t!=null&&Number.isFinite(t=+t)?t:n;function C$(t){return!!(t&&hi(t.append)&&t[Kv]==="FormData"&&t[sl])}const _$=t=>{const n=new WeakSet,e=r=>{if(wa(r)){if(n.has(r))return;if(ba(r))return r;if(!("toJSON"in r)){n.add(r);const m=Ls(r)?[]:{};return ll(r,(d,g)=>{const w=e(d);!ya(w)&&(m[g]=w)}),n.delete(r),m}}return r};return e(t)},A$=uo("AsyncFunction"),k$=t=>t&&(wa(t)||hi(t))&&hi(t.then)&&hi(t.catch),ny=((t,n)=>t?setImmediate:n?((e,r)=>(Os.addEventListener("message",({source:m,data:d})=>{m===Os&&d===e&&r.length&&r.shift()()},!1),m=>{r.push(m),Os.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",hi(Os.postMessage)),S$=typeof queueMicrotask<"u"?queueMicrotask.bind(Os):typeof process<"u"&&process.nextTick||ny,ry=t=>t!=null&&hi(t[sl]),$$=t=>t!=null&&al(t,sl)&&ry(t),ye={isArray:Ls,isArrayBuffer:Yv,isBuffer:ba,isFormData:XS,isArrayBufferView:BS,isString:WS,isNumber:Jv,isBoolean:jS,isObject:wa,isPlainObject:yc,isEmptyObject:HS,isReadableStream:e$,isRequest:t$,isResponse:n$,isHeaders:r$,isUndefined:ya,isDate:US,isFile:VS,isReactNativeBlob:qS,isReactNative:GS,isBlob:KS,isRegExp:v$,isFunction:hi,isStream:JS,isURLSearchParams:QS,isTypedArray:h$,isFileList:YS,forEach:ll,merge:td,extend:o$,trim:i$,stripBOM:s$,inherits:a$,toFlatObject:l$,kindOf:ed,kindOfTest:uo,endsWith:c$,toArray:u$,forEachEntry:d$,matchAll:f$,isHTMLForm:p$,hasOwnProperty:mc,hasOwnProp:mc,hasOwnInPrototypeChain:al,getSafeProp:FS,reduceDescriptors:ty,freezeMethods:y$,toObjectSet:b$,toCamelCase:g$,noop:w$,toFiniteNumber:x$,findKey:Qv,global:Os,isContextDefined:ey,isSpecCompliantForm:C$,toJSONObject:_$,isAsyncFn:A$,isThenable:k$,setImmediate:ny,asap:S$,isIterable:ry,isSafeIterable:$$},T$=ye.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"]),R$=t=>{const n={};let e,r,m;return t&&t.split(`
1481
+ `).forEach(function(d){m=d.indexOf(":"),e=d.substring(0,m).trim().toLowerCase(),r=d.substring(m+1).trim(),!(!e||n[e]&&T$[e])&&(e==="set-cookie"?n[e]?n[e].push(r):n[e]=[r]:n[e]=n[e]?n[e]+", "+r:r)}),n};function E$(t){let n=0,e=t.length;for(;n<e;){const r=t.charCodeAt(n);if(r!==9&&r!==32)break;n+=1}for(;e>n;){const r=t.charCodeAt(e-1);if(r!==9&&r!==32)break;e-=1}return n===0&&e===t.length?t:t.slice(n,e)}const M$=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),I$=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function nd(t,n){return ye.isArray(t)?t.map(e=>nd(e,n)):E$(String(t).replace(n,""))}const L$=t=>nd(t,M$),O$=t=>nd(t,I$);function iy(t){const n=Object.create(null);return ye.forEach(t.toJSON(),(e,r)=>{n[r]=O$(e)}),n}const oy=Symbol("internals");function cl(t){return t&&String(t).trim().toLowerCase()}function bc(t){return t===!1||t==null?t:ye.isArray(t)?t.map(bc):L$(String(t))}function N$(t){const n=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=e.exec(t);)n[r[1]]=r[2];return n}const D$=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function rd(t,n,e,r,m){if(ye.isFunction(r))return r.call(this,n,e);if(m&&(n=e),!!ye.isString(n)){if(ye.isString(r))return n.indexOf(r)!==-1;if(ye.isRegExp(r))return r.test(n)}}function P$(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,e,r)=>e.toUpperCase()+r)}function z$(t,n){const e=ye.toCamelCase(" "+n);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+e,{__proto__:null,value:function(m,d,g){return this[r].call(this,n,m,d,g)},configurable:!0})})}let Wr=class{constructor(n){n&&this.set(n)}set(n,e,r){const m=this;function d(w,u,f){const a=cl(u);if(!a)return;const s=ye.findKey(m,a);(!s||m[s]===void 0||f===!0||f===void 0&&m[s]!==!1)&&(m[s||u]=bc(w))}const g=(w,u)=>ye.forEach(w,(f,a)=>d(f,a,u));if(ye.isPlainObject(n)||n instanceof this.constructor)g(n,e);else if(ye.isString(n)&&(n=n.trim())&&!D$(n))g(R$(n),e);else if(ye.isObject(n)&&ye.isSafeIterable(n)){let w=Object.create(null),u,f;for(const a of n){if(!ye.isArray(a))throw new TypeError("Object iterator must return a key-value pair");f=a[0],ye.hasOwnProp(w,f)?(u=w[f],w[f]=ye.isArray(u)?[...u,a[1]]:[u,a[1]]):w[f]=a[1]}g(w,e)}else n!=null&&d(e,n,r);return this}get(n,e){if(n=cl(n),n){const r=ye.findKey(this,n);if(r){const m=this[r];if(!e)return m;if(e===!0)return N$(m);if(ye.isFunction(e))return e.call(this,m,r);if(ye.isRegExp(e))return e.exec(m);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,e){if(n=cl(n),n){const r=ye.findKey(this,n);return!!(r&&this[r]!==void 0&&(!e||rd(this,this[r],r,e)))}return!1}delete(n,e){const r=this;let m=!1;function d(g){if(g=cl(g),g){const w=ye.findKey(r,g);w&&(!e||rd(r,r[w],w,e))&&(delete r[w],m=!0)}}return ye.isArray(n)?n.forEach(d):d(n),m}clear(n){const e=Object.keys(this);let r=e.length,m=!1;for(;r--;){const d=e[r];(!n||rd(this,this[d],d,n,!0))&&(delete this[d],m=!0)}return m}normalize(n){const e=this,r={};return ye.forEach(this,(m,d)=>{const g=ye.findKey(r,d);if(g){e[g]=bc(m),delete e[d];return}const w=n?P$(d):String(d).trim();w!==d&&delete e[d],e[w]=bc(m),r[w]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const e=Object.create(null);return ye.forEach(this,(r,m)=>{r!=null&&r!==!1&&(e[m]=n&&ye.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,e])=>n+": "+e).join(`
1482
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...e){const r=new this(n);return e.forEach(m=>r.set(m)),r}static accessor(n){const e=(this[oy]=this[oy]={accessors:{}}).accessors,r=this.prototype;function m(d){const g=cl(d);e[g]||(z$(r,d),e[g]=!0)}return ye.isArray(n)?n.forEach(m):m(n),this}};Wr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ye.reduceDescriptors(Wr.prototype,({value:t},n)=>{let e=n[0].toUpperCase()+n.slice(1);return{get:()=>t,set(r){this[e]=r}}}),ye.freezeMethods(Wr);const F$="[REDACTED ****]";function B$(t){if(ye.hasOwnProp(t,"toJSON"))return!0;let n=Object.getPrototypeOf(t);for(;n&&n!==Object.prototype;){if(ye.hasOwnProp(n,"toJSON"))return!0;n=Object.getPrototypeOf(n)}return!1}function W$(t,n){const e=new Set(n.map(d=>String(d).toLowerCase())),r=[],m=d=>{if(d===null||typeof d!="object"||ye.isBuffer(d))return d;if(r.indexOf(d)!==-1)return;d instanceof Wr&&(d=d.toJSON()),r.push(d);let g;if(ye.isArray(d))g=[],d.forEach((w,u)=>{const f=m(w);ye.isUndefined(f)||(g[u]=f)});else{if(!ye.isPlainObject(d)&&B$(d))return r.pop(),d;g=Object.create(null);for(const[w,u]of Object.entries(d)){const f=e.has(w.toLowerCase())?F$:m(u);ye.isUndefined(f)||(g[w]=f)}}return r.pop(),g};return m(t)}let Qe=class vw extends Error{static from(n,e,r,m,d,g){const w=new vw(n.message,e||n.code,r,m,d);return Object.defineProperty(w,"cause",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),w.name=n.name,n.status!=null&&w.status==null&&(w.status=n.status),g&&Object.assign(w,g),w}constructor(n,e,r,m,d){super(n),Object.defineProperty(this,"message",{__proto__:null,value:n,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,e&&(this.code=e),r&&(this.config=r),m&&(this.request=m),d&&(this.response=d,this.status=d.status)}toJSON(){const n=this.config,e=n&&ye.hasOwnProp(n,"redact")?n.redact:void 0,r=ye.isArray(e)&&e.length>0?W$(n,e):ye.toJSONObject(n);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:r,code:this.code,status:this.status}}};Qe.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Qe.ERR_BAD_OPTION="ERR_BAD_OPTION",Qe.ECONNABORTED="ECONNABORTED",Qe.ETIMEDOUT="ETIMEDOUT",Qe.ECONNREFUSED="ECONNREFUSED",Qe.ERR_NETWORK="ERR_NETWORK",Qe.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Qe.ERR_DEPRECATED="ERR_DEPRECATED",Qe.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Qe.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Qe.ERR_CANCELED="ERR_CANCELED",Qe.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Qe.ERR_INVALID_URL="ERR_INVALID_URL",Qe.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const j$=null,sy=100;function id(t){return ye.isPlainObject(t)||ye.isArray(t)}function ay(t){return ye.endsWith(t,"[]")?t.slice(0,-2):t}function od(t,n,e){return t?t.concat(n).map(function(r,m){return r=ay(r),!e&&m?"["+r+"]":r}).join(e?".":""):n}function H$(t){return ye.isArray(t)&&!t.some(id)}const U$=ye.toFlatObject(ye,{},null,function(t){return/^is[A-Z]/.test(t)});function wc(t,n,e){if(!ye.isObject(t))throw new TypeError("target must be an object");n=n||new FormData,e=ye.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,x){return!ye.isUndefined(x[y])});const r=e.metaTokens,m=e.visitor||o,d=e.dots,g=e.indexes,w=e.Blob||typeof Blob<"u"&&Blob,u=e.maxDepth===void 0?sy:e.maxDepth,f=w&&ye.isSpecCompliantForm(n),a=[];if(!ye.isFunction(m))throw new TypeError("visitor must be a function");function s(y){if(y===null)return"";if(ye.isDate(y))return y.toISOString();if(ye.isBoolean(y))return y.toString();if(!f&&ye.isBlob(y))throw new Qe("Blob is not supported. Use a Buffer instead.");if(ye.isArrayBuffer(y)||ye.isTypedArray(y)){if(f&&typeof w=="function")return new w([y]);if(typeof Buffer<"u")return Buffer.from(y);throw new Qe("Blob is not supported. Use a Buffer instead.",Qe.ERR_NOT_SUPPORT)}return y}function c(y){if(y>u)throw new Qe("Object is too deeply nested ("+y+" levels). Max depth: "+u,Qe.ERR_FORM_DATA_DEPTH_EXCEEDED)}function h(y,x){if(u===1/0)return JSON.stringify(y);const E=[];return JSON.stringify(y,function($,_){if(!ye.isObject(_))return _;for(;E.length&&E[E.length-1]!==this;)E.pop();return E.push(_),c(x+E.length-1),_})}function o(y,x,E){let $=y;if(ye.isReactNative(n)&&ye.isReactNativeBlob(y))return n.append(od(E,x,d),s(y)),!1;if(y&&!E&&typeof y=="object"){if(ye.endsWith(x,"{}"))x=r?x:x.slice(0,-2),y=h(y,1);else if(ye.isArray(y)&&H$(y)||(ye.isFileList(y)||ye.endsWith(x,"[]"))&&($=ye.toArray(y)))return x=ay(x),$.forEach(function(_,C){!(ye.isUndefined(_)||_===null)&&n.append(g===!0?od([x],C,d):g===null?x:x+"[]",s(_))}),!1}return id(y)?!0:(n.append(od(E,x,d),s(y)),!1)}const l=Object.assign(U$,{defaultVisitor:o,convertValue:s,isVisitable:id});function p(y,x,E=0){if(!ye.isUndefined(y)){if(c(E),a.indexOf(y)!==-1)throw new Error("Circular reference detected in "+x.join("."));a.push(y),ye.forEach(y,function($,_){(!(ye.isUndefined($)||$===null)&&m.call(n,$,ye.isString(_)?_.trim():_,x,l))===!0&&p($,x?x.concat(_):[_],E+1)}),a.pop()}}if(!ye.isObject(t))throw new TypeError("data must be an object");return p(t),n}function ly(t){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(e){return n[e]})}function sd(t,n){this._pairs=[],t&&wc(t,this,n)}const cy=sd.prototype;cy.append=function(t,n){this._pairs.push([t,n])},cy.toString=function(t){const n=t?e=>t.call(this,e,ly):ly;return this._pairs.map(function(e){return n(e[0])+"="+n(e[1])},"").join("&")};function V$(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function uy(t,n,e){if(!n)return t;t=t||"";const r=ye.isFunction(e)?{serialize:e}:e,m=ye.getSafeProp(r,"encode")||V$,d=ye.getSafeProp(r,"serialize");let g;if(d?g=d(n,r):g=ye.isURLSearchParams(n)?n.toString():new sd(n,r).toString(m),g){const w=t.indexOf("#");w!==-1&&(t=t.slice(0,w)),t+=(t.indexOf("?")===-1?"?":"&")+g}return t}let hy=class{constructor(){this.handlers=[]}use(n,e,r){return this.handlers.push({fulfilled:n,rejected:e,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){ye.forEach(this.handlers,function(e){e!==null&&n(e)})}};const ad={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},q$=typeof URLSearchParams<"u"?URLSearchParams:sd,G$=typeof FormData<"u"?FormData:null,K$=typeof Blob<"u"?Blob:null,Y$={isBrowser:!0,classes:{URLSearchParams:q$,FormData:G$,Blob:K$},protocols:["http","https","file","blob","url","data"]},ld=typeof window<"u"&&typeof document<"u",cd=typeof navigator=="object"&&navigator||void 0,J$=ld&&(!cd||["ReactNative","NativeScript","NS"].indexOf(cd.product)<0),Z$=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",X$=ld&&window.location.href||"http://localhost",Q$=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ld,hasStandardBrowserEnv:J$,hasStandardBrowserWebWorkerEnv:Z$,navigator:cd,origin:X$},Symbol.toStringTag,{value:"Module"})),Sr={...Q$,...Y$};function eT(t,n){return wc(t,new Sr.classes.URLSearchParams,{visitor:function(e,r,m,d){return Sr.isNode&&ye.isBuffer(e)?(this.append(r,e.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)},...n})}const dy=sy;function fy(t){if(t>dy)throw new Qe("FormData field is too deeply nested ("+t+" levels). Max depth: "+dy,Qe.ERR_FORM_DATA_DEPTH_EXCEEDED)}function tT(t){const n=[],e=/\w+|\[(\w*)]/g;let r;for(;(r=e.exec(t))!==null;)fy(n.length),n.push(r[0]==="[]"?"":r[1]||r[0]);return n}function nT(t){const n={},e=Object.keys(t);let r;const m=e.length;let d;for(r=0;r<m;r++)d=e[r],n[d]=t[d];return n}function py(t){function n(e,r,m,d){fy(d);let g=e[d++];if(g==="__proto__")return!0;const w=Number.isFinite(+g),u=d>=e.length;return g=!g&&ye.isArray(m)?m.length:g,u?(ye.hasOwnProp(m,g)?m[g]=ye.isArray(m[g])?m[g].concat(r):[m[g],r]:m[g]=r,!w):((!ye.hasOwnProp(m,g)||!ye.isObject(m[g]))&&(m[g]=[]),n(e,r,m[g],d)&&ye.isArray(m[g])&&(m[g]=nT(m[g])),!w)}if(ye.isFormData(t)&&ye.isFunction(t.entries)){const e={};return ye.forEachEntry(t,(r,m)=>{n(tT(r),m,e,0)}),e}return null}const xa=(t,n)=>t!=null&&ye.hasOwnProp(t,n)?t[n]:void 0;function rT(t,n,e){if(ye.isString(t))try{return(n||JSON.parse)(t),ye.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(t)}const ul={transitional:ad,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const e=n.getContentType()||"",r=e.indexOf("application/json")>-1,m=ye.isObject(t);if(m&&ye.isHTMLForm(t)&&(t=new FormData(t)),ye.isFormData(t))return r?JSON.stringify(py(t)):t;if(ye.isArrayBuffer(t)||ye.isBuffer(t)||ye.isStream(t)||ye.isFile(t)||ye.isBlob(t)||ye.isReadableStream(t))return t;if(ye.isArrayBufferView(t))return t.buffer;if(ye.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let d;if(m){const g=xa(this,"formSerializer");if(e.indexOf("application/x-www-form-urlencoded")>-1)return eT(t,g).toString();if((d=ye.isFileList(t))||e.indexOf("multipart/form-data")>-1){const w=xa(this,"env"),u=w&&w.FormData;return wc(d?{"files[]":t}:t,u&&new u,g)}}return m||r?(n.setContentType("application/json",!1),rT(t)):t}],transformResponse:[function(t){const n=xa(this,"transitional")||ul.transitional,e=n&&n.forcedJSONParsing,r=xa(this,"responseType"),m=r==="json";if(ye.isResponse(t)||ye.isReadableStream(t))return t;if(t&&ye.isString(t)&&(e&&!r||m)){const d=!(n&&n.silentJSONParsing)&&m;try{return JSON.parse(t,xa(this,"parseReviver"))}catch(g){if(d)throw g.name==="SyntaxError"?Qe.from(g,Qe.ERR_BAD_RESPONSE,this,null,xa(this,"response")):g}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Sr.classes.FormData,Blob:Sr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ye.forEach(["delete","get","head","post","put","patch","query"],t=>{ul.headers[t]={}});function ud(t,n){const e=this||ul,r=n||e,m=Wr.from(r.headers);let d=r.data;return ye.forEach(t,function(g){d=g.call(e,d,m.normalize(),n?n.status:void 0)}),m.normalize(),d}function gy(t){return!!(t&&t.__CANCEL__)}let hl=class extends Qe{constructor(n,e,r){super(n??"canceled",Qe.ERR_CANCELED,e,r),this.name="CanceledError",this.__CANCEL__=!0}};function my(t,n,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?t(e):n(new Qe("Request failed with status code "+e.status,e.status>=400&&e.status<500?Qe.ERR_BAD_REQUEST:Qe.ERR_BAD_RESPONSE,e.config,e.request,e))}function iT(t){const n=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return n&&n[1]||""}function oT(t,n){t=t||10;const e=new Array(t),r=new Array(t);let m=0,d=0,g;return n=n!==void 0?n:1e3,function(w){const u=Date.now(),f=r[d];g||(g=u),e[m]=w,r[m]=u;let a=d,s=0;for(;a!==m;)s+=e[a++],a=a%t;if(m=(m+1)%t,m===d&&(d=(d+1)%t),u-g<n)return;const c=f&&u-f;return c?Math.round(s*1e3/c):void 0}}function sT(t,n){let e=0,r=1e3/n,m,d;const g=(w,u=Date.now())=>{e=u,m=null,d&&(clearTimeout(d),d=null),t(...w)};return[(...w)=>{const u=Date.now(),f=u-e;f>=r?g(w,u):(m=w,d||(d=setTimeout(()=>{d=null,g(m)},r-f)))},()=>m&&g(m)]}const xc=(t,n,e=3)=>{let r=0;const m=oT(50,250);return sT(d=>{if(!d||typeof d.loaded!="number")return;const g=d.loaded,w=d.lengthComputable?d.total:void 0,u=w!=null?Math.min(g,w):g,f=Math.max(0,u-r),a=m(f);r=Math.max(r,u);const s={loaded:u,total:w,progress:w?u/w:void 0,bytes:f,rate:a||void 0,estimated:a&&w?(w-u)/a:void 0,event:d,lengthComputable:w!=null,[n?"download":"upload"]:!0};t(s)},e)},vy=(t,n)=>{const e=t!=null;return[r=>n[0]({lengthComputable:e,total:t,loaded:r}),n[1]]},yy=t=>(...n)=>ye.asap(()=>t(...n)),aT=Sr.hasStandardBrowserEnv?((t,n)=>e=>(e=new URL(e,Sr.origin),t.protocol===e.protocol&&t.host===e.host&&(n||t.port===e.port)))(new URL(Sr.origin),Sr.navigator&&/(msie|trident)/i.test(Sr.navigator.userAgent)):()=>!0,lT=Sr.hasStandardBrowserEnv?{write(t,n,e,r,m,d,g){if(typeof document>"u")return;const w=[`${t}=${encodeURIComponent(n)}`];ye.isNumber(e)&&w.push(`expires=${new Date(e).toUTCString()}`),ye.isString(r)&&w.push(`path=${r}`),ye.isString(m)&&w.push(`domain=${m}`),d===!0&&w.push("secure"),ye.isString(g)&&w.push(`SameSite=${g}`),document.cookie=w.join("; ")},read(t){if(typeof document>"u")return null;const n=document.cookie.split(";");for(let e=0;e<n.length;e++){const r=n[e].replace(/^\s+/,""),m=r.indexOf("=");if(m!==-1&&r.slice(0,m)===t)try{return decodeURIComponent(r.slice(m+1))}catch{return r.slice(m+1)}}return null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function cT(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function uT(t,n){return n?t.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):t}const hT=/^https?:(?!\/\/)/i,dT=/[\t\n\r]/g;function fT(t){let n=0;for(;n<t.length&&t.charCodeAt(n)<=32;)n++;return t.slice(n)}function pT(t){return fT(t).replace(dT,"")}function by(t,n){if(typeof t=="string"&&hT.test(pT(t)))throw new Qe('Invalid URL: missing "//" after protocol',Qe.ERR_INVALID_URL,n)}function wy(t,n,e,r){by(n,r);let m=!cT(n);return t&&(m||e===!1)?(by(t,r),uT(t,n)):n}const xy=t=>t instanceof Wr?{...t}:t;function Ns(t,n){t=t||{},n=n||{};const e=Object.create(null);Object.defineProperty(e,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(a,s,c,h){return ye.isPlainObject(a)&&ye.isPlainObject(s)?ye.merge.call({caseless:h},a,s):ye.isPlainObject(s)?ye.merge({},s):ye.isArray(s)?s.slice():s}function m(a,s,c,h){if(ye.isUndefined(s)){if(!ye.isUndefined(a))return r(void 0,a,c,h)}else return r(a,s,c,h)}function d(a,s){if(!ye.isUndefined(s))return r(void 0,s)}function g(a,s){if(ye.isUndefined(s)){if(!ye.isUndefined(a))return r(void 0,a)}else return r(void 0,s)}function w(a){const s=ye.hasOwnProp(n,"transitional")?n.transitional:void 0;if(!ye.isUndefined(s))if(ye.isPlainObject(s)){if(ye.hasOwnProp(s,a))return s[a]}else return;const c=ye.hasOwnProp(t,"transitional")?t.transitional:void 0;if(ye.isPlainObject(c)&&ye.hasOwnProp(c,a))return c[a]}function u(a,s,c){if(ye.hasOwnProp(n,c))return r(a,s);if(ye.hasOwnProp(t,c))return r(void 0,a)}const f={url:d,method:d,data:d,baseURL:g,transformRequest:g,transformResponse:g,paramsSerializer:g,timeout:g,timeoutMessage:g,withCredentials:g,withXSRFToken:g,adapter:g,responseType:g,xsrfCookieName:g,xsrfHeaderName:g,onUploadProgress:g,onDownloadProgress:g,decompress:g,maxContentLength:g,maxBodyLength:g,beforeRedirect:g,transport:g,httpAgent:g,httpsAgent:g,cancelToken:g,socketPath:g,allowedSocketPaths:g,responseEncoding:g,validateStatus:u,headers:(a,s,c)=>m(xy(a),xy(s),c,!0)};return ye.forEach(Object.keys({...t,...n}),function(a){if(a==="__proto__"||a==="constructor"||a==="prototype")return;const s=ye.hasOwnProp(f,a)?f[a]:m,c=ye.hasOwnProp(t,a)?t[a]:void 0,h=ye.hasOwnProp(n,a)?n[a]:void 0,o=s(c,h,a);ye.isUndefined(o)&&s!==u||(e[a]=o)}),ye.hasOwnProp(n,"validateStatus")&&ye.isUndefined(n.validateStatus)&&w("validateStatusUndefinedResolves")===!1&&(ye.hasOwnProp(t,"validateStatus")?e.validateStatus=r(void 0,t.validateStatus):delete e.validateStatus),e}const gT=["content-type","content-length"];function mT(t,n,e){if(e!=="content-only"){t.set(n);return}Object.entries(n||{}).forEach(([r,m])=>{gT.includes(r.toLowerCase())&&t.set(r,m)})}const vT=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(n,e)=>String.fromCharCode(parseInt(e,16)));function Cy(t){const n=Ns({},t),e=c=>ye.hasOwnProp(n,c)?n[c]:void 0,r=e("data");let m=e("withXSRFToken");const d=e("xsrfHeaderName"),g=e("xsrfCookieName");let w=e("headers");const u=e("auth"),f=e("baseURL"),a=e("allowAbsoluteUrls"),s=e("url");if(n.headers=w=Wr.from(w),n.url=uy(wy(f,s,a,n),e("params"),e("paramsSerializer")),u){const c=ye.getSafeProp(u,"username")||"",h=ye.getSafeProp(u,"password")||"";try{w.set("Authorization","Basic "+btoa(c+":"+(h?vT(h):"")))}catch(o){throw Qe.from(o,Qe.ERR_BAD_OPTION_VALUE,t)}}if(ye.isFormData(r)&&(Sr.hasStandardBrowserEnv||Sr.hasStandardBrowserWebWorkerEnv||ye.isReactNative(r)?w.setContentType(void 0):ye.isFunction(r.getHeaders)&&mT(w,r.getHeaders(),e("formDataHeaderPolicy"))),Sr.hasStandardBrowserEnv&&(ye.isFunction(m)&&(m=m(n)),m===!0||m==null&&aT(n.url))){const c=d&&g&&lT.read(g);c&&w.set(d,c)}return n}const yT=typeof XMLHttpRequest<"u",bT=yT&&function(t){return new Promise(function(n,e){const r=Cy(t);let m=r.data;const d=Wr.from(r.headers).normalize();let{responseType:g,onUploadProgress:w,onDownloadProgress:u}=r,f,a,s,c,h;function o(){c&&c(),h&&h(),r.cancelToken&&r.cancelToken.unsubscribe(f),r.signal&&r.signal.removeEventListener("abort",f)}let l=new XMLHttpRequest;l.open(r.method.toUpperCase(),r.url,!0),l.timeout=r.timeout;function p(){if(!l)return;const x=Wr.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),E={data:!g||g==="text"||g==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:x,config:t,request:l};my(function($){n($),o()},function($){e($),o()},E),l=null}"onloadend"in l?l.onloadend=p:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.startsWith("file:"))||setTimeout(p)},l.onabort=function(){l&&(e(new Qe("Request aborted",Qe.ECONNABORTED,t,l)),o(),l=null)},l.onerror=function(x){const E=x&&x.message?x.message:"Network Error",$=new Qe(E,Qe.ERR_NETWORK,t,l);$.event=x||null,e($),o(),l=null},l.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const E=r.transitional||ad;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),e(new Qe(x,E.clarifyTimeoutError?Qe.ETIMEDOUT:Qe.ECONNABORTED,t,l)),o(),l=null},m===void 0&&d.setContentType(null),"setRequestHeader"in l&&ye.forEach(iy(d),function(x,E){l.setRequestHeader(E,x)}),ye.isUndefined(r.withCredentials)||(l.withCredentials=!!r.withCredentials),g&&g!=="json"&&(l.responseType=r.responseType),u&&([s,h]=xc(u,!0),l.addEventListener("progress",s)),w&&l.upload&&([a,c]=xc(w),l.upload.addEventListener("progress",a),l.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(f=x=>{l&&(e(!x||x.type?new hl(null,t,l):x),l.abort(),o(),l=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const y=iT(r.url);if(y&&!Sr.protocols.includes(y)){e(new Qe("Unsupported protocol "+y+":",Qe.ERR_BAD_REQUEST,t)),o();return}l.send(m||null)})},wT=(t,n)=>{if(t=t?t.filter(Boolean):[],!n&&!t.length)return;const e=new AbortController;let r=!1;const m=function(u){if(!r){r=!0,g();const f=u instanceof Error?u:this.reason;e.abort(f instanceof Qe?f:new hl(f instanceof Error?f.message:f))}};let d=n&&setTimeout(()=>{d=null,m(new Qe(`timeout of ${n}ms exceeded`,Qe.ETIMEDOUT))},n);const g=()=>{t&&(d&&clearTimeout(d),d=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(m):u.removeEventListener("abort",m)}),t=null)};t.forEach(u=>u.addEventListener("abort",m,{once:!0}));const{signal:w}=e;return w.unsubscribe=()=>ye.asap(g),w},xT=function*(t,n){let e=t.byteLength;if(e<n){yield t;return}let r=0,m;for(;r<e;)m=r+n,yield t.slice(r,m),r=m},CT=async function*(t,n){for await(const e of _T(t))yield*xT(e,n)},_T=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const n=t.getReader();try{for(;;){const{done:e,value:r}=await n.read();if(e)break;yield r}}finally{await n.cancel()}},_y=(t,n,e,r)=>{const m=CT(t,n);let d=0,g,w=u=>{g||(g=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:f,value:a}=await m.next();if(f){w(),u.close();return}let s=a.byteLength;if(e){let c=d+=s;e(c)}u.enqueue(new Uint8Array(a))}catch(f){throw w(f),f}},cancel(u){return w(u),m.return()}},{highWaterMark:2})},Cc=t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102,AT=(t,n,e)=>n+2<e&&Cc(t.charCodeAt(n+1))&&Cc(t.charCodeAt(n+2));function kT(t){if(!t||typeof t!="string"||!t.startsWith("data:"))return 0;const n=t.indexOf(",");if(n<0)return 0;const e=t.slice(5,n),r=t.slice(n+1);if(/;base64/i.test(e)){let d=r.length;const g=r.length;for(let s=0;s<g;s++)if(r.charCodeAt(s)===37&&s+2<g){const c=r.charCodeAt(s+1),h=r.charCodeAt(s+2);Cc(c)&&Cc(h)&&(d-=2,s+=2)}let w=0,u=g-1;const f=s=>s>=2&&r.charCodeAt(s-2)===37&&r.charCodeAt(s-1)===51&&(r.charCodeAt(s)===68||r.charCodeAt(s)===100);u>=0&&(r.charCodeAt(u)===61?(w++,u--):f(u)&&(w++,u-=3)),w===1&&u>=0&&(r.charCodeAt(u)===61||f(u))&&w++;const a=Math.floor(d/4)*3-(w||0);return a>0?a:0}let m=0;for(let d=0,g=r.length;d<g;d++){const w=r.charCodeAt(d);if(w===37&&AT(r,d,g))m+=1,d+=2;else if(w<128)m+=1;else if(w<2048)m+=2;else if(w>=55296&&w<=56319&&d+1<g){const u=r.charCodeAt(d+1);u>=56320&&u<=57343?(m+=4,d++):m+=3}else m+=3}return m}const hd="1.18.1",Ay=64*1024,{isFunction:_c}=ye,ST=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(n,e)=>String.fromCharCode(parseInt(e,16))),ky=t=>{if(!ye.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},Sy=(t,...n)=>{try{return!!t(...n)}catch{return!1}},$T=t=>{const n=t.indexOf("://");let e=t;return n!==-1&&(e=e.slice(n+3)),e.includes("@")||e.includes(":")},TT=t=>{const n=ye.global!==void 0&&ye.global!==null?ye.global:globalThis,{ReadableStream:e,TextEncoder:r}=n;t=ye.merge.call({skipUndefined:!0},{Request:n.Request,Response:n.Response},t);const{fetch:m,Request:d,Response:g}=t,w=m?_c(m):typeof fetch=="function",u=_c(d),f=_c(g);if(!w)return!1;const a=w&&_c(e),s=w&&(typeof r=="function"?(y=>x=>y.encode(x))(new r):async y=>new Uint8Array(await new d(y).arrayBuffer())),c=u&&a&&Sy(()=>{let y=!1;const x=new d(Sr.origin,{body:new e,method:"POST",get duplex(){return y=!0,"half"}}),E=x.headers.has("Content-Type");return x.body!=null&&x.body.cancel(),y&&!E}),h=f&&a&&Sy(()=>ye.isReadableStream(new g("").body)),o={stream:h&&(y=>y.body)};w&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!o[y]&&(o[y]=(x,E)=>{let $=x&&x[y];if($)return $.call(x);throw new Qe(`Response type '${y}' is not supported`,Qe.ERR_NOT_SUPPORT,E)})});const l=async y=>{if(y==null)return 0;if(ye.isBlob(y))return y.size;if(ye.isSpecCompliantForm(y))return(await new d(Sr.origin,{method:"POST",body:y}).arrayBuffer()).byteLength;if(ye.isArrayBufferView(y)||ye.isArrayBuffer(y))return y.byteLength;if(ye.isURLSearchParams(y)&&(y=y+""),ye.isString(y))return(await s(y)).byteLength},p=async(y,x)=>ye.toFiniteNumber(y.getContentLength())??l(x);return async y=>{let{url:x,method:E,data:$,signal:_,cancelToken:C,timeout:L,onDownloadProgress:D,onUploadProgress:I,responseType:M,headers:W,withCredentials:z="same-origin",fetchOptions:O,maxContentLength:T,maxBodyLength:A}=Cy(y);const N=ye.isNumber(T)&&T>-1,B=ye.isNumber(A)&&A>-1,U=ie=>ye.hasOwnProp(y,ie)?y[ie]:void 0;let G=m||fetch;M=M?(M+"").toLowerCase():"text";let J=wT([_,C&&C.toAbortSignal()],L),Q=null;const le=J&&J.unsubscribe&&(()=>{J.unsubscribe()});let re,ce=null;const de=()=>new Qe("Request body larger than maxBodyLength limit",Qe.ERR_BAD_REQUEST,y,Q);try{let ie;const fe=U("auth");if(fe){const Me=ye.getSafeProp(fe,"username")||"",Tt=ye.getSafeProp(fe,"password")||"";ie={username:Me,password:Tt}}if($T(x)){const Me=new URL(x,Sr.origin);if(!ie&&(Me.username||Me.password)){const Tt=ky(Me.username),st=ky(Me.password);ie={username:Tt,password:st}}(Me.username||Me.password)&&(Me.username="",Me.password="",x=Me.href)}if(ie&&(W.delete("authorization"),W.set("Authorization","Basic "+btoa(ST((ie.username||"")+":"+(ie.password||""))))),N&&typeof x=="string"&&x.startsWith("data:")&&kT(x)>T)throw new Qe("maxContentLength size of "+T+" exceeded",Qe.ERR_BAD_RESPONSE,y,Q);if(B&&E!=="get"&&E!=="head"){const Me=await l($);if(typeof Me=="number"&&isFinite(Me)&&(re=Me,Me>A))throw de()}const $e=B&&(ye.isReadableStream($)||ye.isStream($)),Re=(Me,Tt,st)=>_y(Me,Ay,Xt=>{if(B&&Xt>A)throw ce=de();Tt&&Tt(Xt)},st);if(c&&E!=="get"&&E!=="head"&&(I||$e)){if(re=re??await p(W,$),re!==0||$e){let Me=new d(x,{method:"POST",body:$,duplex:"half"}),Tt;if(ye.isFormData($)&&(Tt=Me.headers.get("content-type"))&&W.setContentType(Tt),Me.body){const[st,Xt]=I&&vy(re,xc(yy(I)))||[];$=Re(Me.body,st,Xt)}}}else if($e&&!u&&a&&E!=="get"&&E!=="head")$=Re($);else if($e&&u&&!c&&E!=="get"&&E!=="head")throw new Qe("Stream request bodies are not supported by the current fetch implementation",Qe.ERR_NOT_SUPPORT,y,Q);ye.isString(z)||(z=z?"include":"omit");const Ee=u&&"credentials"in d.prototype;if(ye.isFormData($)){const Me=W.getContentType();Me&&/^multipart\/form-data/i.test(Me)&&!/boundary=/i.test(Me)&&W.delete("content-type")}W.set("User-Agent","axios/"+hd,!1);const Ue={...O,signal:J,method:E.toUpperCase(),headers:iy(W.normalize()),body:$,duplex:"half",credentials:Ee?z:void 0};Q=u&&new d(x,Ue);let He=await(u?G(Q,O):G(x,Ue));const Ge=Wr.from(He.headers);if(N){const Me=ye.toFiniteNumber(Ge.getContentLength());if(Me!=null&&Me>T)throw new Qe("maxContentLength size of "+T+" exceeded",Qe.ERR_BAD_RESPONSE,y,Q)}const at=h&&(M==="stream"||M==="response");if(h&&He.body&&(D||N||at&&le)){const Me={};["status","statusText","headers"].forEach(zt=>{Me[zt]=He[zt]});const Tt=ye.toFiniteNumber(Ge.getContentLength()),[st,Xt]=D&&vy(Tt,xc(yy(D),!0))||[];let dn=0;const Zn=zt=>{if(N&&(dn=zt,dn>T))throw new Qe("maxContentLength size of "+T+" exceeded",Qe.ERR_BAD_RESPONSE,y,Q);st&&st(zt)};He=new g(_y(He.body,Ay,Zn,()=>{Xt&&Xt(),le&&le()}),Me)}M=M||"text";let We=await o[ye.findKey(o,M)||"text"](He,y);if(N&&!h&&!at){let Me;if(We!=null&&(typeof We.byteLength=="number"?Me=We.byteLength:typeof We.size=="number"?Me=We.size:typeof We=="string"&&(Me=typeof r=="function"?new r().encode(We).byteLength:We.length)),typeof Me=="number"&&Me>T)throw new Qe("maxContentLength size of "+T+" exceeded",Qe.ERR_BAD_RESPONSE,y,Q)}return!at&&le&&le(),await new Promise((Me,Tt)=>{my(Me,Tt,{data:We,headers:Wr.from(He.headers),status:He.status,statusText:He.statusText,config:y,request:Q})})}catch(ie){if(le&&le(),J&&J.aborted&&J.reason instanceof Qe){const fe=J.reason;throw fe.config=y,Q&&(fe.request=Q),ie!==fe&&Object.defineProperty(fe,"cause",{__proto__:null,value:ie,writable:!0,enumerable:!1,configurable:!0}),fe}if(ce)throw Q&&!ce.request&&(ce.request=Q),ce;if(ie instanceof Qe)throw Q&&!ie.request&&(ie.request=Q),ie;if(ie&&ie.name==="TypeError"&&/Load failed|fetch/i.test(ie.message)){const fe=new Qe("Network Error",Qe.ERR_NETWORK,y,Q,ie&&ie.response);throw Object.defineProperty(fe,"cause",{__proto__:null,value:ie.cause||ie,writable:!0,enumerable:!1,configurable:!0}),fe}throw Qe.from(ie,ie&&ie.code,y,Q,ie&&ie.response)}}},RT=new Map,$y=t=>{let n=t&&t.env||{};const{fetch:e,Request:r,Response:m}=n,d=[r,m,e];let g=d.length,w=g,u,f,a=RT;for(;w--;)u=d[w],f=a.get(u),f===void 0&&a.set(u,f=w?new Map:TT(n)),a=f;return f};$y();const dd={http:j$,xhr:bT,fetch:{get:$y}};ye.forEach(dd,(t,n)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:n})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:n})}});const Ty=t=>`- ${t}`,ET=t=>ye.isFunction(t)||t===null||t===!1;function MT(t,n){t=ye.isArray(t)?t:[t];const{length:e}=t;let r,m;const d={};for(let g=0;g<e;g++){r=t[g];let w;if(m=r,!ET(r)&&(m=dd[(w=String(r)).toLowerCase()],m===void 0))throw new Qe(`Unknown adapter '${w}'`);if(m&&(ye.isFunction(m)||(m=m.get(n))))break;d[w||"#"+g]=m}if(!m){const g=Object.entries(d).map(([u,f])=>`adapter ${u} `+(f===!1?"is not supported by the environment":"is not available in the build"));let w=e?g.length>1?`since :
1483
+ `+g.map(Ty).join(`
1484
+ `):" "+Ty(g[0]):"as no adapter specified";throw new Qe("There is no suitable adapter to dispatch the request "+w,Qe.ERR_NOT_SUPPORT)}return m}const Ry={getAdapter:MT,adapters:dd};function fd(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new hl(null,t)}function Ey(t){return fd(t),t.headers=Wr.from(t.headers),t.data=ud.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Ry.getAdapter(t.adapter||ul.adapter,t)(t).then(function(n){fd(t),t.response=n;try{n.data=ud.call(t,t.transformResponse,n)}finally{delete t.response}return n.headers=Wr.from(n.headers),n},function(n){if(!gy(n)&&(fd(t),n&&n.response)){t.response=n.response;try{n.response.data=ud.call(t,t.transformResponse,n.response)}finally{delete t.response}n.response.headers=Wr.from(n.response.headers)}return Promise.reject(n)})}const Ac={};["object","boolean","number","function","string","symbol"].forEach((t,n)=>{Ac[t]=function(e){return typeof e===t||"a"+(n<1?"n ":" ")+t}});const My={};Ac.transitional=function(t,n,e){function r(m,d){return"[Axios v"+hd+"] Transitional option '"+m+"'"+d+(e?". "+e:"")}return(m,d,g)=>{if(t===!1)throw new Qe(r(d," has been removed"+(n?" in "+n:"")),Qe.ERR_DEPRECATED);return n&&!My[d]&&(My[d]=!0,console.warn(r(d," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(m,d,g):!0}},Ac.spelling=function(t){return(n,e)=>(console.warn(`${e} is likely a misspelling of ${t}`),!0)};function IT(t,n,e){if(typeof t!="object"||t===null)throw new Qe("options must be an object",Qe.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let m=r.length;for(;m-- >0;){const d=r[m],g=Object.prototype.hasOwnProperty.call(n,d)?n[d]:void 0;if(g){const w=t[d],u=w===void 0||g(w,d,t);if(u!==!0)throw new Qe("option "+d+" must be "+u,Qe.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new Qe("Unknown option "+d,Qe.ERR_BAD_OPTION)}}const kc={assertOptions:IT,validators:Ac},jr=kc.validators;let Ds=class{constructor(n){this.defaults=n||{},this.interceptors={request:new hy,response:new hy}}async request(n,e){try{return await this._request(n,e)}catch(r){if(r instanceof Error){let m={};Error.captureStackTrace?Error.captureStackTrace(m):m=new Error;const d=(()=>{if(!m.stack)return"";const g=m.stack.indexOf(`
1485
+ `);return g===-1?"":m.stack.slice(g+1)})();try{if(!r.stack)r.stack=d;else if(d){const g=d.indexOf(`
1486
+ `),w=g===-1?-1:d.indexOf(`
1487
+ `,g+1),u=w===-1?"":d.slice(w+1);String(r.stack).endsWith(u)||(r.stack+=`
1488
+ `+d)}}catch{}}throw r}}_request(n,e){typeof n=="string"?(e=e||{},e.url=n):e=n||{},e=Ns(this.defaults,e);const{transitional:r,paramsSerializer:m,headers:d}=e;r!==void 0&&kc.assertOptions(r,{silentJSONParsing:jr.transitional(jr.boolean),forcedJSONParsing:jr.transitional(jr.boolean),clarifyTimeoutError:jr.transitional(jr.boolean),legacyInterceptorReqResOrdering:jr.transitional(jr.boolean),advertiseZstdAcceptEncoding:jr.transitional(jr.boolean),validateStatusUndefinedResolves:jr.transitional(jr.boolean)},!1),m!=null&&(ye.isFunction(m)?e.paramsSerializer={serialize:m}:kc.assertOptions(m,{encode:jr.function,serialize:jr.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),kc.assertOptions(e,{baseUrl:jr.spelling("baseURL"),withXsrfToken:jr.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let g=d&&ye.merge(d.common,d[e.method]);d&&ye.forEach(["delete","get","head","post","put","patch","query","common"],o=>{delete d[o]}),e.headers=Wr.concat(g,d);const w=[];let u=!0;this.interceptors.request.forEach(function(o){if(typeof o.runWhen=="function"&&o.runWhen(e)===!1)return;u=u&&o.synchronous;const l=e.transitional||ad;l&&l.legacyInterceptorReqResOrdering?w.unshift(o.fulfilled,o.rejected):w.push(o.fulfilled,o.rejected)});const f=[];this.interceptors.response.forEach(function(o){f.push(o.fulfilled,o.rejected)});let a,s=0,c;if(!u){const o=[Ey.bind(this),void 0];for(o.unshift(...w),o.push(...f),c=o.length,a=Promise.resolve(e);s<c;)a=a.then(o[s++],o[s++]);return a}c=w.length;let h=e;for(;s<c;){const o=w[s++],l=w[s++];try{h=o(h)}catch(p){l.call(this,p);break}}try{a=Ey.call(this,h)}catch(o){return Promise.reject(o)}for(s=0,c=f.length;s<c;)a=a.then(f[s++],f[s++]);return a}getUri(n){n=Ns(this.defaults,n);const e=wy(n.baseURL,n.url,n.allowAbsoluteUrls,n);return uy(e,n.params,n.paramsSerializer)}};ye.forEach(["delete","get","head","options"],function(t){Ds.prototype[t]=function(n,e){return this.request(Ns(e||{},{method:t,url:n,data:e&&ye.hasOwnProp(e,"data")?e.data:void 0}))}}),ye.forEach(["post","put","patch","query"],function(t){function n(e){return function(r,m,d){return this.request(Ns(d||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:m}))}}Ds.prototype[t]=n(),t!=="query"&&(Ds.prototype[t+"Form"]=n(!0))});let LT=class yw{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(m){e=m});const r=this;this.promise.then(m=>{if(!r._listeners)return;let d=r._listeners.length;for(;d-- >0;)r._listeners[d](m);r._listeners=null}),this.promise.then=m=>{let d;const g=new Promise(w=>{r.subscribe(w),d=w}).then(m);return g.cancel=function(){r.unsubscribe(d)},g},n(function(m,d,g){r.reason||(r.reason=new hl(m,d,g),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const e=this._listeners.indexOf(n);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const n=new AbortController,e=r=>{n.abort(r)};return this.subscribe(e),n.signal.unsubscribe=()=>this.unsubscribe(e),n.signal}static source(){let n;return{token:new yw(function(e){n=e}),cancel:n}}};function OT(t){return function(n){return t.apply(null,n)}}function NT(t){return ye.isObject(t)&&t.isAxiosError===!0}const pd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(pd).forEach(([t,n])=>{pd[n]=t});function Iy(t){const n=new Ds(t),e=Gv(Ds.prototype.request,n);return ye.extend(e,Ds.prototype,n,{allOwnKeys:!0}),ye.extend(e,n,null,{allOwnKeys:!0}),e.create=function(r){return Iy(Ns(t,r))},e}const ir=Hn("T",Iy(ul));ir.Axios=Ds,ir.CanceledError=hl,ir.CancelToken=LT,ir.isCancel=gy,ir.VERSION=hd,ir.toFormData=wc,ir.AxiosError=Qe,ir.Cancel=ir.CanceledError,ir.all=function(t){return Promise.all(t)},ir.spread=OT,ir.isAxiosError=NT,ir.mergeConfig=Ns,ir.AxiosHeaders=Wr,ir.formToJSON=t=>py(ye.isHTMLForm(t)?new FormData(t):t),ir.getAdapter=Ry.getAdapter,ir.HttpStatusCode=pd,ir.default=ir;const{Axios:WD,AxiosError:jD,CanceledError:HD,isCancel:UD,CancelToken:VD,VERSION:qD,all:GD,Cancel:KD,isAxiosError:YD,spread:JD,toFormData:ZD,AxiosHeaders:XD,HttpStatusCode:QD,formToJSON:eP,getAdapter:tP,mergeConfig:nP,create:rP}=ir;function Ly(){return Object.assign({},ia())}function DT(t,n,e){const r=Zr(t,e?.in);return r.setTime(r.getTime()+n*Zl),r}function PT(t,n){const e=()=>_o(n?.in,NaN),r=WT(t);let m;if(r.date){const u=jT(r.date,2);m=HT(u.restDateString,u.year)}if(!m||isNaN(+m))return e();const d=+m;let g=0,w;if(r.time&&(g=UT(r.time),isNaN(g)))return e();if(r.timezone){if(w=VT(r.timezone),isNaN(w))return e()}else{const u=new Date(d+g),f=Zr(0,n?.in);return f.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),f.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),f}return Zr(d+g+w,n?.in)}const Sc={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},zT=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,FT=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,BT=/^([+-])(\d{2})(?::?(\d{2}))?$/;function WT(t){const n={},e=t.split(Sc.dateTimeDelimiter);let r;if(e.length>2)return n;if(/:/.test(e[0])?r=e[0]:(n.date=e[0],r=e[1],Sc.timeZoneDelimiter.test(n.date)&&(n.date=t.split(Sc.timeZoneDelimiter)[0],r=t.substr(n.date.length,t.length))),r){const m=Sc.timezone.exec(r);m?(n.time=r.replace(m[1],""),n.timezone=m[1]):n.time=r}return n}function jT(t,n){const e=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+n)+"})|(\\d{2}|[+-]\\d{"+(2+n)+"})$)"),r=t.match(e);if(!r)return{year:NaN,restDateString:""};const m=r[1]?parseInt(r[1]):null,d=r[2]?parseInt(r[2]):null;return{year:d===null?m:d*100,restDateString:t.slice((r[1]||r[2]).length)}}function HT(t,n){if(n===null)return new Date(NaN);const e=t.match(zT);if(!e)return new Date(NaN);const r=!!e[4],m=dl(e[1]),d=dl(e[2])-1,g=dl(e[3]),w=dl(e[4]),u=dl(e[5])-1;if(r)return JT(n,w,u)?qT(n,w,u):new Date(NaN);{const f=new Date(0);return!KT(n,d,g)||!YT(n,m)?new Date(NaN):(f.setUTCFullYear(n,d,Math.max(m,g)),f)}}function dl(t){return t?parseInt(t):1}function UT(t){const n=t.match(FT);if(!n)return NaN;const e=gd(n[1]),r=gd(n[2]),m=gd(n[3]);return ZT(e,r,m)?e*Wu+r*Zl+m*1e3:NaN}function gd(t){return t&&parseFloat(t.replace(",","."))||0}function VT(t){if(t==="Z")return 0;const n=t.match(BT);if(!n)return 0;const e=n[1]==="+"?-1:1,r=parseInt(n[2]),m=n[3]&&parseInt(n[3])||0;return XT(r,m)?e*(r*Wu+m*Zl):NaN}function qT(t,n,e){const r=new Date(0);r.setUTCFullYear(t,0,4);const m=r.getUTCDay()||7,d=(n-1)*7+e+1-m;return r.setUTCDate(r.getUTCDate()+d),r}const GT=[31,null,31,30,31,30,31,31,30,31,30,31];function Oy(t){return t%400===0||t%4===0&&t%100!==0}function KT(t,n,e){return n>=0&&n<=11&&e>=1&&e<=(GT[n]||(Oy(t)?29:28))}function YT(t,n){return n>=1&&n<=(Oy(t)?366:365)}function JT(t,n,e){return n>=1&&n<=53&&e>=0&&e<=6}function ZT(t,n,e){return t===24?n===0&&e===0:e>=0&&e<60&&n>=0&&n<60&&t>=0&&t<25}function XT(t,n){return n>=0&&n<=59}function QT(t,n,e){return DT(t,-n,e)}function Ny(t,n,e){const r=Ly(),m=nR(t,e.timeZone,e.locale??r.locale);return"formatToParts"in m?eR(m,n):tR(m,n)}function eR(t,n){const e=t.formatToParts(n);for(let r=e.length-1;r>=0;--r)if(e[r].type==="timeZoneName")return e[r].value}function tR(t,n){const e=t.format(n).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(e);return r?r[0].substr(1):""}function nR(t,n,e){return new Intl.DateTimeFormat(e?[e.code,"en-US"]:void 0,{timeZone:n,timeZoneName:t})}function rR(t,n){const e=lR(n);return"formatToParts"in e?oR(e,t):sR(e,t)}const iR={year:0,month:1,day:2,hour:3,minute:4,second:5};function oR(t,n){try{const e=t.formatToParts(n),r=[];for(let m=0;m<e.length;m++){const d=iR[e[m].type];d!==void 0&&(r[d]=parseInt(e[m].value,10))}return r}catch(e){if(e instanceof RangeError)return[NaN];throw e}}function sR(t,n){const e=t.format(n),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(e);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}const md={},Dy=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),aR=Dy==="06/25/2014, 00:00:00"||Dy==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function lR(t){return md[t]||(md[t]=aR?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:t,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),md[t]}function Py(t,n,e,r,m,d,g){const w=new Date(0);return w.setUTCFullYear(t,n,e),w.setUTCHours(r,m,d,g),w}const zy=36e5,cR=6e4,vd={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function yd(t,n,e){if(!t)return 0;let r=vd.timezoneZ.exec(t);if(r)return 0;let m,d;if(r=vd.timezoneHH.exec(t),r)return m=parseInt(r[1],10),Fy(m)?-(m*zy):NaN;if(r=vd.timezoneHHMM.exec(t),r){m=parseInt(r[2],10);const g=parseInt(r[3],10);return Fy(m,g)?(d=Math.abs(m)*zy+g*cR,r[1]==="+"?-d:d):NaN}if(dR(t)){n=new Date(n||Date.now());const g=e?n:uR(n),w=bd(g,t);return-(e?w:hR(n,w,t))}return NaN}function uR(t){return Py(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())}function bd(t,n){const e=rR(t,n),r=Py(e[0],e[1]-1,e[2],e[3]%24,e[4],e[5],0).getTime();let m=t.getTime();const d=m%1e3;return m-=d>=0?d:1e3+d,r-m}function hR(t,n,e){let r=t.getTime()-n;const m=bd(new Date(r),e);if(n===m)return n;r-=m-n;const d=bd(new Date(r),e);return m===d?m:Math.max(m,d)}function Fy(t,n){return-23<=t&&t<=23&&(n==null||0<=n&&n<=59)}const By={};function dR(t){if(By[t])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:t}),By[t]=!0,!0}catch{return!1}}const fR=60*1e3,pR={X:function(t,n,e){const r=wd(e.timeZone,t);if(r===0)return"Z";switch(n){case"X":return Wy(r);case"XXXX":case"XX":return Ca(r);default:return Ca(r,":")}},x:function(t,n,e){const r=wd(e.timeZone,t);switch(n){case"x":return Wy(r);case"xxxx":case"xx":return Ca(r);default:return Ca(r,":")}},O:function(t,n,e){const r=wd(e.timeZone,t);switch(n){case"O":case"OO":case"OOO":return"GMT"+gR(r,":");default:return"GMT"+Ca(r,":")}},z:function(t,n,e){switch(n){case"z":case"zz":case"zzz":return Ny("short",t,e);default:return Ny("long",t,e)}}};function wd(t,n){const e=t?yd(t,n,!0)/fR:n?.getTimezoneOffset()??0;if(Number.isNaN(e))throw new RangeError("Invalid time zone specified: "+t);return e}function $c(t,n){const e=t<0?"-":"";let r=Math.abs(t).toString();for(;r.length<n;)r="0"+r;return e+r}function Ca(t,n=""){const e=t>0?"-":"+",r=Math.abs(t),m=$c(Math.floor(r/60),2),d=$c(Math.floor(r%60),2);return e+m+n+d}function Wy(t,n){return t%60===0?(t>0?"-":"+")+$c(Math.abs(t)/60,2):Ca(t,n)}function gR(t,n=""){const e=t>0?"-":"+",r=Math.abs(t),m=Math.floor(r/60),d=r%60;return d===0?e+String(m):e+String(m)+n+$c(d,2)}function jy(t){const n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+t-+n}const mR=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,xd=36e5,Hy=6e4,vR=2,Qr={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:mR};function Uy(t,n={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(t===null)return new Date(NaN);const e=n.additionalDigits==null?vR:Number(n.additionalDigits);if(e!==2&&e!==1&&e!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]")return new Date(t.getTime());if(typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]")return new Date(t);if(Object.prototype.toString.call(t)!=="[object String]")return new Date(NaN);const r=yR(t),{year:m,restDateString:d}=bR(r.date,e),g=wR(d,m);if(g===null||isNaN(g.getTime()))return new Date(NaN);if(g){const w=g.getTime();let u=0,f;if(r.time&&(u=xR(r.time),u===null||isNaN(u)))return new Date(NaN);if(r.timeZone||n.timeZone){if(f=yd(r.timeZone||n.timeZone,new Date(w+u)),isNaN(f))return new Date(NaN)}else f=jy(new Date(w+u)),f=jy(new Date(w+u+f));return new Date(w+u+f)}else return new Date(NaN)}function yR(t){const n={};let e=Qr.dateTimePattern.exec(t),r;if(e?(n.date=e[1],r=e[3]):(e=Qr.datePattern.exec(t),e?(n.date=e[1],r=e[2]):(n.date=null,r=t)),r){const m=Qr.timeZone.exec(r);m?(n.time=r.replace(m[1],""),n.timeZone=m[1].trim()):n.time=r}return n}function bR(t,n){if(t){const e=Qr.YYY[n],r=Qr.YYYYY[n];let m=Qr.YYYY.exec(t)||r.exec(t);if(m){const d=m[1];return{year:parseInt(d,10),restDateString:t.slice(d.length)}}if(m=Qr.YY.exec(t)||e.exec(t),m){const d=m[1];return{year:parseInt(d,10)*100,restDateString:t.slice(d.length)}}}return{year:null}}function wR(t,n){if(n===null)return null;let e,r,m;if(!t||!t.length)return e=new Date(0),e.setUTCFullYear(n),e;let d=Qr.MM.exec(t);if(d)return e=new Date(0),r=parseInt(d[1],10)-1,Gy(n,r)?(e.setUTCFullYear(n,r),e):new Date(NaN);if(d=Qr.DDD.exec(t),d){e=new Date(0);const g=parseInt(d[1],10);return AR(n,g)?(e.setUTCFullYear(n,0,g),e):new Date(NaN)}if(d=Qr.MMDD.exec(t),d){e=new Date(0),r=parseInt(d[1],10)-1;const g=parseInt(d[2],10);return Gy(n,r,g)?(e.setUTCFullYear(n,r,g),e):new Date(NaN)}if(d=Qr.Www.exec(t),d)return m=parseInt(d[1],10)-1,Ky(m)?Vy(n,m):new Date(NaN);if(d=Qr.WwwD.exec(t),d){m=parseInt(d[1],10)-1;const g=parseInt(d[2],10)-1;return Ky(m,g)?Vy(n,m,g):new Date(NaN)}return null}function xR(t){let n,e,r=Qr.HH.exec(t);if(r)return n=parseFloat(r[1].replace(",",".")),Cd(n)?n%24*xd:NaN;if(r=Qr.HHMM.exec(t),r)return n=parseInt(r[1],10),e=parseFloat(r[2].replace(",",".")),Cd(n,e)?n%24*xd+e*Hy:NaN;if(r=Qr.HHMMSS.exec(t),r){n=parseInt(r[1],10),e=parseInt(r[2],10);const m=parseFloat(r[3].replace(",","."));return Cd(n,e,m)?n%24*xd+e*Hy+m*1e3:NaN}return null}function Vy(t,n,e){n=n||0,e=e||0;const r=new Date(0);r.setUTCFullYear(t,0,4);const m=r.getUTCDay()||7,d=n*7+e+1-m;return r.setUTCDate(r.getUTCDate()+d),r}const CR=[31,28,31,30,31,30,31,31,30,31,30,31],_R=[31,29,31,30,31,30,31,31,30,31,30,31];function qy(t){return t%400===0||t%4===0&&t%100!==0}function Gy(t,n,e){if(n<0||n>11)return!1;if(e!=null){if(e<1)return!1;const r=qy(t);if(r&&e>_R[n]||!r&&e>CR[n])return!1}return!0}function AR(t,n){if(n<1)return!1;const e=qy(t);return!(e&&n>366||!e&&n>365)}function Ky(t,n){return!(t<0||t>52||n!=null&&(n<0||n>6))}function Cd(t,n,e){return!(t<0||t>=25||n!=null&&(n<0||n>=60)||e!=null&&(e<0||e>=60))}const kR=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function SR(t,n,e={}){n=String(n);const r=n.match(kR);if(r){const m=Uy(e.originalDate||t,e);n=r.reduce(function(d,g){if(g[0]==="'")return d;const w=d.indexOf(g),u=d[w-1]==="'",f=d.replace(g,"'"+pR[g[0]](m,g,e)+"'");return u?f.substring(0,w-1)+f.substring(w+1):f},n)}return Ss(t,n,e)}function $R(t,n,e){t=Uy(t,e);const r=yd(n,t,!0),m=new Date(t.getTime()-r),d=new Date(0);return d.setFullYear(m.getUTCFullYear(),m.getUTCMonth(),m.getUTCDate()),d.setHours(m.getUTCHours(),m.getUTCMinutes(),m.getUTCSeconds(),m.getUTCMilliseconds()),d}function Tc(t,n,e,r){return r={...r,timeZone:n,originalDate:t},SR($R(t,n,{timeZone:r.timeZone}),e,r)}const Rc="yyyy-MM-dd",Yy="HH:mm:ss.SSS",Jy="HH:mm:ss",Ec=`${Rc} ${Yy}`,Zy=`${Rc} ${Jy}`,iP=Hn("R",{methods:{parseDateTime(t,n){return t.includes(" ")&&(t=t.replace(" ","T")),n&&n==="UTC"&&(t+="Z"),Date.parse(t)},formatUtcToLocal(t,n){return Ss(!n||n==="local"?QT(t,t.getTimezoneOffset()):t,Ec)},formatDateTime(t,n){return!n||n==="local"?Ss(t,Ec):Tc(t,n,Ec)},formatDateTimeHMS(t,n){return!n||n==="local"?Ss(t,Zy):Tc(t,n,Zy)},formatDate:function(t,n){return!n||n==="local"?Ss(t,Rc):Tc(t,this.timeZone,Rc)},formatTime:function(t,n,e=Yy){return!n||n==="local"?Ss(t,e):Tc(t,this.timeZone,e)},formatTimeHMS:function(t,n){return this.formatTime(t,n,Jy)},formatTimestamp(t,n){return this.formatDateTime(PT(t),n)},formatSeconds(t,n){return this.formatDateTime(new Date(t*1e3),n)},formatNanoseconds(t,n){return this.formatDateTime(new Date(parseInt(t)/1e6),n)}}}),Xy=100,Qy=Hn("g",jf("app",{state:()=>({notifyHistory:[],namedWidgets:{},playback:{playbackMode:null,playbackDateTime:null,playbackStep:1,playbackLoading:0}}),getters:{namedWidget:t=>n=>t.namedWidgets[n]},actions:{notifyAddHistory(t){this.notifyHistory.length>=Xy&&(this.notifyHistory.length=Xy-1),this.notifyHistory.unshift(t)},notifyClearHistory(){this.notifyHistory=[]},setNamedWidget(t){Object.assign(this.namedWidgets,t)},clearNamedWidget(t){delete this.namedWidgets[t]},updatePlayback(t){Object.assign(this.playback,t)}}})),_a=Hf();_a.use(({store:t})=>{t.commit=(n,e)=>{typeof t[n]=="function"&&t[n](e)},t.dispatch=(n,e)=>{if(typeof t[n]=="function")return t[n](e)}});const TR=_a.install.bind(_a);_a.install=t=>{TR(t);const n=Qy(_a);t.config.globalProperties.$store={state:new Proxy({},{get(e,r){return n.$state}}),getters:new Proxy({},{get(e,r){if(r.includes("/")){const[,m]=r.split("/");return n[m]}return n[r]}}),commit(e,r){if(e.includes("/")){const[,m]=e.split("/");n[m]?.(r)}else n[e]?.(r)},dispatch(e,r){if(e.includes("/")){const[,m]=e.split("/");return n[m]?.(r)}else return n[e]?.(r)}}};const RR="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOAAAAAgCAYAAAALxXRVAAAAxHpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHjabVDbDcMwCPxnio5gc8TB4zhtKnWDjl8IJEranmReh84Are/Xk24OrkIyzdp6a8UgXToPC7QExmZrkc1uWJOy/FIn3gm2EswjUm3Zv9frIRBuWDSdhPSexHIluqS+fgnlz/CJPH6kUE8hcBA1BUasVVrX+bzCcuyW0HjkRvQ69k8+2/Uek/0D5hUVxSwgMQD8gTAsaGYBb6zmhxFeEWiK2UH+3WkHfQAmGFlDwtBoyQAAAYVpQ0NQSUNDIHByb2ZpbGUAAHicfZE9SMNQFIVPW7UiFRE7iIhkqE7WQUUcaxWKUCHUCq06mLz0D5o0JCkujoJrwcGfxaqDi7OuDq6CIPgD4uripOgiJd6XFFrEeOHxPs675/DefYC/Xmaq2REDVM0yUom4kMmuCsFXdGEE/fBhQmKmPieKSXjW1z31Ud1FeZZ335/Vq+RMBvgE4hjTDYt4g3hm09I57xOHWVFSiM+Jxw26IPEj12WX3zgXHPbzzLCRTs0Th4mFQhvLbcyKhko8TRxRVI3y/RmXFc5bnNVylTXvyV8Yymkry1ynNYwEFrEEEQJkVFFCGRaitGukmEjRedzDP+T4RXLJ5CqBkWMBFaiQHD/4H/yerZmfmnSTQnGg88W2P0aB4C7QqNn297FtN06AwDNwpbX8lTow+0l6raVFjoC+beDiuqXJe8DlDjD4pEuG5EgBWv58Hng/o2/KAgO3QM+aO7fmOU4fgDTNKnkDHBwCYwXKXvd4d3f73P7tac7vB5UicrQ0WLbfAAANemlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNC40LjAtRXhpdjIiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iCiAgICB4bWxuczpzdEV2dD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlRXZlbnQjIgogICAgeG1sbnM6R0lNUD0iaHR0cDovL3d3dy5naW1wLm9yZy94bXAvIgogICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iCiAgIHhtcE1NOkRvY3VtZW50SUQ9ImdpbXA6ZG9jaWQ6Z2ltcDozYjNlMzQ0NC03YTU4LTQxYjItYTZjYi0wMzljNWI3NjRmN2IiCiAgIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MGUxZjUyNzQtNTMyNC00MzE5LWE3MjYtOGQyNjJlNjI1Y2YwIgogICB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6ZDkzZGI3ODgtMmQwNi00NjdhLWI2OGItZWJlNmJiNGU1ODQ2IgogICBHSU1QOkFQST0iMi4wIgogICBHSU1QOlBsYXRmb3JtPSJNYWMgT1MiCiAgIEdJTVA6VGltZVN0YW1wPSIxNjg4MTUzMjA5MTAxNDUxIgogICBHSU1QOlZlcnNpb249IjIuMTAuMzQiCiAgIGRjOkZvcm1hdD0iaW1hZ2UvcG5nIgogICB0aWZmOk9yaWVudGF0aW9uPSIxIgogICB4bXA6Q3JlYXRvclRvb2w9IkdJTVAgMi4xMCIKICAgeG1wOk1ldGFkYXRhRGF0ZT0iMjAyMzowNjozMFQxMzoyNjo0OC0wNjowMCIKICAgeG1wOk1vZGlmeURhdGU9IjIwMjM6MDY6MzBUMTM6MjY6NDgtMDY6MDAiPgogICA8eG1wTU06SGlzdG9yeT4KICAgIDxyZGY6U2VxPgogICAgIDxyZGY6bGkKICAgICAgc3RFdnQ6YWN0aW9uPSJzYXZlZCIKICAgICAgc3RFdnQ6Y2hhbmdlZD0iLyIKICAgICAgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDozNWQ3MTYyZi0xYWQ1LTQwNWUtODAxOS03NmExMTI4MDI1YmYiCiAgICAgIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkdpbXAgMi4xMCAoTWFjIE9TKSIKICAgICAgc3RFdnQ6d2hlbj0iMjAyMy0wNi0zMFQxMzoyNjo0OS0wNjowMCIvPgogICAgPC9yZGY6U2VxPgogICA8L3htcE1NOkhpc3Rvcnk+CiAgPC9yZGY6RGVzY3JpcHRpb24+CiA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz5gv8dKAAAABmJLR0QA9QAHANj00CgxAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH5wYeExoxB4CzXgAAB65JREFUeNrtnF9sFNcVh78z6z8kEwgPTUVxTZqYh2lVbAKVKleuiuEJkGzIAzFSpEQukaoqQUUhiUiLSkRD2hQ1FYmqqnEtUqUK7UPBVozUBzBpUHkproGXrVqXAoKgKg/EZKFre+f0YcftFs967/zz7rrze5y999yd2fn2d8+9ZwZSpUqVKlWqVKmMpb9vcvT9zB90xF6RXo1UYWWllyAcfEzPjKL6ddy7oymEqcJKTBvmmrN7gR8bNt9v550fLG74KIUui3Vft2zN3Ywaf+bm1zTJ79+w4o8Stu/OO7ToNNsUtgJtqqwEEOEGMCEwIo2ceO9+rifx3TvGtdUt0CuwBaVNxRtfuYEwoXDSyjB0Ya1cW1QABoQvEoTa2XkG1W8kc7bygZw7tyFm+GKFsBYB3HmHFneKAyr0oxVmTYIryqDVxIG4QHxsTFcWXF5R2GV4Uw9kLL7/53Vyo+6noCHhAziYa85+L3CvTOZAYmcbIXYF+ACcxTgd7ZukpzBFVmFXRfgAFEthV2GKbN8kPVHHbx/TnhnXG9/0t4JdMy7Z9jHtqWsAI8AXGkI5e/YMIh8k4n5nz55JCL5FCWHfJ+x2lePAAyG6P+Aqx/s+YXfY8dec12fVZQhYGqL7UnUZWnNen61LAGOAL7wTJuGCIWMGgG9RQdg3SY8Lbxi53jxu6MIbYZywfUx7UN6MnrTzZi07oZSBbx9w6J7DN4BXgU7gyTLx3gXOAd+FYoJcopftvPNaVXLBkLlfCPgi54S1kAPuvENLYYpsSOfz06eZJhzTnPCxMV0545It43y3LTgsGYaXN/E3gFtTrNYCPS7sLdenwcKJIye8fPIpe3Sy90WBXkXbihDJhMJQ97Kh1x/Z8k4uEoBlnO8ysAX4C7AK+Caw3we+Q16bNmAUaAm7MKNdXRuYmRmN565r6A46/YwIX2gIawHAJ27xdpCcy3Rh5DfLecbI/f6kvuOLcFoyPF1ulbNjXFu1wFFVNvqNf/Er8kyUcxj87e82UtBB4OEyTa6Qkf7+HY+fjgKg3w1wyIPHzTVnLe9f5vkSCI8D+4C/em3EA/anwOrSQHbeMV6Fi8UFQ7hfTPCFgrDaAO68Q0thmquRpp7+d5qbaWRVJRfsGNdWd4arfvBdXC+bjAA+r6f8ILQaWBV2i8KD75RZuiObTCE0vciPAl/INWfFzjsuMAn8HPgOcB14ZRY+r/3ngM97brngeVuUGDHDV3c5oU6zLXb4vHxQp9lWqZlboNdvCikZnjZmvdj2tmFso2mn53xmKujg5ZNP2XEC2Af0z86v7byjwEcehF3ApVn4cs3Z5cCPvM+aIv1pRl0RDbjymQB8dQeht8letdhSnDnde5MeDuJcF9bKNQsOm8Q20ehk74vzTDv99LDXJzYA8RZWDuaas0tKIJwGrpbA91ngW/Ms0iysCwbomyB89QZhW1Vj69w2kmE48H+vXx8Nd25CcOc07RN0qrEb+FmuOdvkQeiWwLfEc8nX4vzFQrtg0H2/6cIvEoTvvxDqv16taQfUOavXCxp7trysVLOrnUHk18cvtplza1tSfcLM9RuBh8os6Ewn8suFccGgfWTJDiCb6N0t8uE/rCd3kypVSADfBfbYeee653rirYpi5527wCDF1dB479ugLhii6kW25m5i3dedGIRF+DYH3SdaaHmF1VWLLTq3za2p/11JN5FfH7/YZtNJmUiqTxAA9wHP23nn45JjnwEe9bYdAG4BR5OAMJCjhcwbE4OwTuDzNFHV2DK3jRaCV9L49pFw56YwlFQfUwB/CPzazjv/nD3g5Xw/AY4Aa7wtCrXzzk3gV8DmqrhghJrPRCCsL/gQGKlmbIWT9x5zYW/HuLaajtMxrq1eVUzF2CbqXjb0OnAlQJcrXp/YAPzQzjvXSuB7CHib4mrnZor7gF8tccKPKO4FLrwLxrB3GBuEdQYfgDRyAsFNgD5XGjlR8YbM+DrHUi1wNID7HcWnJK1M7Ip6ZMs7OTLSb36fSr/pb+4H4As+xwZzzdkvefDZFCtgSrcatgEvAV/2IFwNHPSJsz9RF4zofrFCWIfwAbx3P9dFGYydP2XQpBb0wlq5JjAwByplY/t5PTWfE3aMa2u5KhiBgSgP6vbvePw0GdlUwQmvBKmC8b7XXM1TjP1t4IuU32o4Afyd4sZ9pGLssv9u89WIhqj5rDjeiL0C9+4o4CwEfGkx9v95MXYJhHE9jgQxv6LCt0Y04tPusUEY0flq5Yn4vkl6XOV45LI0wbWE7ceWBdtMbx/THu9ZwOjua9F7cZ0MU4Mqe3HtvHO4zHS0qvCVzfMSfJLeeDpap9NOPx1bxrAFeyLlg4JrwZ6g8AFcXCfDCM/FkHs+V6vwVVyEiQHCRF7ONCcXjDH3Cw3hIoLvPxA+yBFL2A58GmbaaQnbjz3IkbDjX1ovb4lFLz6F1Qa6LRa9l9bLW7V8jStOLyJAmOyb0UodL8n3yJhAuAjhK3XCTBOOwICRGwquwECmCSeM8/k5YYPljW+eVw00WDi17HwVc8CIOeGCvJZQOzvPACSV+xnlhDHDl76WsLwW42sJ61ra1bVBu7o2VGXsEXuFvp/5pelzX6lSpUqVKlWqVKlSpUpVA/o34/Ptc3zCsREAAAAASUVORK5CYII=",ER={props:{status:{type:String,required:!0},large:{type:Boolean},small:{type:Boolean},scale:{type:Number,default:1}},computed:{icons:function(){return RR},scaleFactor:function(){return this.scale?this.scale:this.large?1:this.small?.3:.5},iconStyle:function(){const t=PR.indexOf(eb[this.status]),n=1-(t-1)*.05,e=224*this.scaleFactor*n,r=32*this.scaleFactor*n,m=32*this.scaleFactor*n;return[`background-image: url(${this.icons});`,`background-position-x: -${t*m}px;`,`background-size: ${e}px ${r}px;`,`height: ${m}px;`,`width: ${m}px;`,`padding-top: ${t-1}px;`].join("")}}};function MR(t,n,e,r,m,d){return Pn(),li("div",{style:Pa(d.iconStyle)},null,4)}const IR=ts(ER,[["render",MR]]),LR={props:{icon:{type:String,default:null},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{colorStyle:function(){return{"--iconColor":this.color}}}};function OR(t,n,e,r,m,d){const g=Rt("rux-icon");return Pn(),Co(g,{size:e.size,icon:e.icon,style:Pa(d.colorStyle)},null,8,["size","icon","style"])}const NR=ts(LR,[["render",OR],["__scopeId","data-v-bb4cd487"]]),eb={fatal:"critical",FATAL:"critical",error:"critical",ERROR:"critical",warn:"caution",WARN:"caution",info:"normal",INFO:"normal",debug:"off",DEBUG:"off",critical:"critical",CRITICAL:"critical",serious:"serious",SERIOUS:"serious",caution:"caution",CAUTION:"caution",normal:"normal",NORMAL:"normal",standby:"standby",STANDBY:"standby",off:"off",OFF:"OFF"},_d={fatal:"#ff69B4",critical:"#ff3838",serious:"#ffb302",caution:"#fce83a",normal:"#56f000",standby:"#2dccff",off:"#a4abb6"},DR=function(t){const n="#000000",e="#ffffff",r=_d[eb[t]];if(r){const m=+`0x${r.slice(1,3)}`,d=+`0x${r.slice(3,5)}`,g=+`0x${r.slice(5,7)}`;if((m*299+d*587+g*114)/1e3>128)return n}return e},PR=Object.keys(_d),zR={astro:{component:t=>Js(NR,{...t})},"astro-status":{component:t=>Js(IR,{...t,status:t.icon})}},FR={extras:{component:t=>Js(Nw,{...t})}},BR={props:{configKey:{type:String,default:null},modelValue:Boolean},emits:["update:modelValue","warning","success"],data(){return{configs:[],headers:[{title:"Configuration",value:"config"},{title:"Actions",value:"actions",align:"end",sortable:!1}],search:null,selectedRows:[]}},computed:{selectedItem:function(){return this.selectedRows.length?this.configs.find(t=>t.configId===this.selectedRows[0]):null},error:function(){return this.selectedItem===""||this.selectedItem===null?"Must select a config":null},show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},mounted(){let t=-1;new Ka().list_configs(this.configKey).then(n=>{this.configs=n.map(e=>(t+=1,{configId:t,config:e}))}).catch(n=>{this.$emit("warning",`Failed to connect to OpenC3. ${n}`)})},methods:{selectRow:function(t){this.selectedRows=[t.item.configId]},success:function(){this.selectedItem&&(this.$emit("success",this.selectedItem.config),this.show=!1,this.search=null,this.selectedRows=[])},cancel:function(){this.show=!1,this.search=null,this.selectedRows=[]},deleteConfig:function(t){this.$dialog.confirm(`Are you sure you want to delete: ${t.config}`,{okText:"Delete",cancelText:"Cancel"}).then(n=>{this.selectedItem?.config===t.config&&(this.selectedRows=[]),this.configs.splice(this.configs.indexOf(t),1),new Ka().delete_config(this.configKey,t.config)}).catch(n=>{n!==!0&&this.$emit("warning",`Failed to delete config ${t.config} Error: ${n}`)})}}},WR={class:"mt-4 pa-3"},jR=["textContent"];function HR(t,n,e,r,m,d){const g=Rt("v-spacer"),w=Rt("v-toolbar"),u=Rt("v-text-field"),f=Rt("v-row"),a=Rt("v-btn"),s=Rt("v-data-table"),c=Rt("v-card-text"),h=Rt("v-card-actions"),o=Rt("v-card"),l=Rt("v-dialog");return Pn(),Co(l,{modelValue:d.show,"onUpdate:modelValue":n[4]||(n[4]=p=>d.show=p),persistent:"",width:"600",onKeydown:Ll(d.cancel,["esc"])},{default:Pt(()=>[gt(o,null,{default:Pt(()=>[wr("form",{onSubmit:n[3]||(n[3]=Zs((...p)=>d.success&&d.success(...p),["prevent"]))},[gt(w,{height:"24"},{default:Pt(()=>[gt(g),n[5]||(n[5]=wr("span",null,"Open Configuration",-1)),gt(g)]),_:1}),gt(c,null,{default:Pt(()=>[wr("div",WR,[gt(f,{dense:""},{default:Pt(()=>[gt(u,{modelValue:m.search,"onUpdate:modelValue":n[0]||(n[0]=p=>m.search=p),label:"Search",type:"text","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","clear-icon":"mdi-close-circle-outline",autofocus:"","single-line":"","hide-details":"","data-test":"search"},null,8,["modelValue"])]),_:1}),gt(s,{modelValue:m.selectedRows,"onUpdate:modelValue":n[1]||(n[1]=p=>m.selectedRows=p),"show-select":"","select-strategy":"single","item-value":"configId",search:m.search,headers:m.headers,items:m.configs,"items-per-page":5,"items-per-page-options":[5],"onClick:row":n[2]||(n[2]=(p,y)=>d.selectRow(y))},{"item.actions":Pt(({item:p})=>[gt(a,{class:"mt-1",icon:"mdi-delete",variant:"text","data-test":"item-delete",onClick:y=>d.deleteConfig(p)},null,8,["onClick"])]),_:1},8,["modelValue","search","headers","items"]),gt(f,{dense:""},{default:Pt(()=>[Ol(wr("span",{class:"ma-2 text-red",textContent:ci(d.error)},null,8,jR),[[Nl,d.error]])]),_:1})])]),_:1}),gt(h,{class:"px-2"},{default:Pt(()=>[gt(g),gt(a,{variant:"outlined","data-test":"open-config-cancel-btn",onClick:d.cancel},{default:Pt(()=>[...n[6]||(n[6]=[Pr(" Cancel ",-1)])]),_:1},8,["onClick"]),gt(a,{variant:"flat",type:"submit","data-test":"open-config-submit-btn",disabled:!!d.error,onClick:Zs(d.success,["prevent"])},{default:Pt(()=>[...n[7]||(n[7]=[Pr(" Ok ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})],32)]),_:1})]),_:1},8,["modelValue","onKeydown"])}const oP=Hn("k",ts(BR,[["render",HR]])),UR={props:{configKey:{type:String,default:null},modelValue:Boolean},emits:["update:modelValue","warning","success"],data(){return{configName:"",configs:[],headers:[{title:"Configuration",value:"config"},{title:"Actions",value:"actions",align:"end",sortable:!1}],search:null,selectedRows:[]}},computed:{selectedItem:function(){return this.selectedRows.length?this.configs.find(t=>t.configId===this.selectedRows[0]):null},error:function(){return this.configName?/^[A-Za-z0-9_\-. ]+$/.test(this.configName)?null:"Config name must only contain letters, numbers, hyphens, underscores, spaces, and periods":"Config must have a name"},show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},watch:{selectedItem:function(t){t&&(this.configName=t.config)}},mounted(){let t=-1;new Ka().list_configs(this.configKey).then(n=>{this.configs=n.map(e=>(t+=1,{configId:t,config:e}))}).catch(n=>{this.$emit("warning",`Failed to connect to OpenC3. ${n}`)})},methods:{selectRow:function(t){this.selectedRows=[t.item.configId]},success:function(){this.$emit("success",this.configName),this.show=!1,this.search=null,this.selectedRows=[],this.configName=""},cancel:function(){this.show=!1,this.search=null,this.selectedRows=[],this.configName=""},deleteConfig:function(t){this.$dialog.confirm(`Are you sure you want to delete: ${t.config}`,{okText:"Delete",cancelText:"Cancel"}).then(n=>{this.selectedItem?.config===t.config&&(this.selectedRows=[],this.configName=""),this.configs.splice(this.configs.indexOf(t),1),new Ka().delete_config(this.configKey,t.config)}).catch(n=>{n!==!0&&this.$emit("warning",`Failed to delete config ${t.config} Error: ${n}`)})}}},VR={class:"mt-4 pa-3"},qR=["textContent"];function GR(t,n,e,r,m,d){const g=Rt("v-spacer"),w=Rt("v-toolbar"),u=Rt("v-text-field"),f=Rt("v-row"),a=Rt("v-btn"),s=Rt("v-data-table"),c=Rt("v-card-text"),h=Rt("v-card-actions"),o=Rt("v-card"),l=Rt("v-dialog");return Pn(),Co(l,{modelValue:d.show,"onUpdate:modelValue":n[5]||(n[5]=p=>d.show=p),persistent:"",width:"600",onKeydown:Ll(d.cancel,["esc"])},{default:Pt(()=>[gt(o,null,{default:Pt(()=>[wr("form",{onSubmit:n[4]||(n[4]=Zs((...p)=>d.success&&d.success(...p),["prevent"]))},[gt(w,{height:"24"},{default:Pt(()=>[gt(g),n[6]||(n[6]=wr("span",null,"Save Configuration",-1)),gt(g)]),_:1}),gt(c,null,{default:Pt(()=>[wr("div",VR,[gt(f,{dense:""},{default:Pt(()=>[gt(u,{modelValue:m.search,"onUpdate:modelValue":n[0]||(n[0]=p=>m.search=p),label:"search",type:"text","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","clear-icon":"mdi-close-circle-outline","single-line":"","hide-details":"","data-test":"search"},null,8,["modelValue"])]),_:1}),gt(s,{modelValue:m.selectedRows,"onUpdate:modelValue":n[1]||(n[1]=p=>m.selectedRows=p),"show-select":"","select-strategy":"single","item-value":"configId",search:m.search,headers:m.headers,items:m.configs,"items-per-page":5,"items-per-page-options":[5],"onClick:row":n[2]||(n[2]=(p,y)=>d.selectRow(y))},{"item.actions":Pt(({item:p})=>[gt(a,{class:"mt-1",icon:"mdi-delete",variant:"text","data-test":"item-delete",onClick:y=>d.deleteConfig(p)},null,8,["onClick"])]),_:1},8,["modelValue","search","headers","items"]),gt(f,{dense:""},{default:Pt(()=>[gt(u,{modelValue:m.configName,"onUpdate:modelValue":n[3]||(n[3]=p=>m.configName=p),"hide-details":"",autofocus:"",disabled:!!d.selectedItem,label:"Configuration Name","data-test":"name-input-save-config-dialog"},null,8,["modelValue","disabled"])]),_:1}),gt(f,{dense:""},{default:Pt(()=>[Ol(wr("span",{class:"ma-2 text-red",textContent:ci(d.error)},null,8,qR),[[Nl,d.error]])]),_:1})])]),_:1}),gt(h,{class:"px-2"},{default:Pt(()=>[gt(g),gt(a,{variant:"outlined",onClick:d.cancel},{default:Pt(()=>[...n[7]||(n[7]=[Pr(" Cancel ",-1)])]),_:1},8,["onClick"]),gt(a,{variant:"flat",type:"submit","data-test":"save-config-submit-btn",disabled:!!d.error,onClick:Zs(d.success,["prevent"])},{default:Pt(()=>[...n[8]||(n[8]=[Pr(" Ok ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})],32)]),_:1})]),_:1},8,["modelValue","onKeydown"])}const sP=Hn("a",ts(UR,[["render",GR]])),KR=50,YR=2e3,tb="single-spa:app-change",JR={data(){return{appsMounted:!1,show:!1,hideSpinner:!1,pollInterval:null}},computed:{showSpinner:function(){return!this.hideSpinner&&!this.show}},created(){window.addEventListener(tb,this.handleAppChange)},mounted(){this.pollForMountedApps(),setTimeout(()=>{this.appsMounted||(this.show=!0,this.pollInterval&&clearInterval(this.pollInterval))},YR)},unmounted(){window.removeEventListener(tb,this.handleAppChange),this.pollInterval&&clearInterval(this.pollInterval)},methods:{handleAppChange:function(t){this.show=!t.detail.appsByNewStatus.MOUNTED,this.hideSpinner=!0},pollForMountedApps:function(){this.pollInterval=setInterval(()=>{this.appsMounted=mu().length>0,mu().length>0&&(this.hideSpinner=!0,clearInterval(this.pollInterval))},KR)}}},ZR={class:"mx-1"},XR={key:1,class:"d-flex justify-center align-center"};function QR(t,n,e,r,m,d){const g=Rt("v-card-title"),w=Rt("v-card-text"),u=Rt("v-card"),f=Rt("v-progress-circular");return Pn(),li(Il,null,[m.show?(Pn(),Co(u,{key:0},{default:Pt(()=>[gt(g,null,{default:Pt(()=>[...n[0]||(n[0]=[Pr(" 404 Not Found ",-1)])]),_:1}),gt(w,{class:"d-flex align-center mt-3"},{default:Pt(()=>[n[1]||(n[1]=Pr(" The requested URL ",-1)),wr("code",ZR,ci(t.$route.fullPath),1),n[2]||(n[2]=Pr(" was not routable. ",-1)),n[3]||(n[3]=wr("span",{class:"text-h3 mx-1"}," 🦄 ",-1))]),_:1})]),_:1})):zo("",!0),d.showSpinner?(Pn(),li("div",XR,[gt(f,{indeterminate:""})])):zo("",!0)],64)}const nb=[{path:"/",name:"LimitsMonitor",component:()=>ct(()=>lt.import("./LimitsMonitor-939d997c957d6238d5e8.js"),void 0)},{path:"/:pathMatch(.*)*",name:"NotFound",component:ts(JR,[["render",QR]])}];nb.forEach(t=>qf(t));const eE=Bf({history:Wf(),routes:nb});function rb(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,r=Array(n);e<n;e++)r[e]=t[e];return r}function tE(t){if(Array.isArray(t))return t}function nE(t,n){var e=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(e!=null){var r,m,d,g,w=[],u=!0,f=!1;try{if(d=(e=e.call(t)).next,n!==0)for(;!(u=(r=d.call(e)).done)&&(w.push(r.value),w.length!==n);u=!0);}catch(a){f=!0,m=a}finally{try{if(!u&&e.return!=null&&(g=e.return(),Object(g)!==g))return}finally{if(f)throw m}}return w}}function rE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1489
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iE(t,n){return tE(t)||nE(t,n)||oE(t,n)||rE()}function oE(t,n){if(t){if(typeof t=="string")return rb(t,n);var e={}.toString.call(t).slice(8,-1);return e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set"?Array.from(t):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?rb(t,n):void 0}}const ib=Object.entries,ob=Object.setPrototypeOf,sE=Object.isFrozen,aE=Object.getPrototypeOf,lE=Object.getOwnPropertyDescriptor;let $r=Object.freeze,Tr=Object.seal,Aa=Object.create,sb=typeof Reflect<"u"&&Reflect,Ad=sb.apply,kd=sb.construct;$r||($r=function(t){return t}),Tr||(Tr=function(t){return t}),Ad||(Ad=function(t,n){for(var e=arguments.length,r=new Array(e>2?e-2:0),m=2;m<e;m++)r[m-2]=arguments[m];return t.apply(n,r)}),kd||(kd=function(t){for(var n=arguments.length,e=new Array(n>1?n-1:0),r=1;r<n;r++)e[r-1]=arguments[r];return new t(...e)});const fl=or(Array.prototype.forEach),cE=or(Array.prototype.lastIndexOf),ab=or(Array.prototype.pop),ka=or(Array.prototype.push),uE=or(Array.prototype.splice),ss=Array.isArray,pl=or(String.prototype.toLowerCase),Sd=or(String.prototype.toString),lb=or(String.prototype.match),gl=or(String.prototype.replace),cb=or(String.prototype.indexOf),hE=or(String.prototype.trim),dE=or(Number.prototype.toString),fE=or(Boolean.prototype.toString),ub=typeof BigInt>"u"?null:or(BigInt.prototype.toString),hb=typeof Symbol>"u"?null:or(Symbol.prototype.toString),xr=or(Object.prototype.hasOwnProperty),ml=or(Object.prototype.toString),Rr=or(RegExp.prototype.test),Ps=pE(TypeError);function or(t){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var e=arguments.length,r=new Array(e>1?e-1:0),m=1;m<e;m++)r[m-1]=arguments[m];return Ad(t,n,r)}}function pE(t){return function(){for(var n=arguments.length,e=new Array(n),r=0;r<n;r++)e[r]=arguments[r];return kd(t,e)}}function Yt(t,n){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:pl;if(ob&&ob(t,null),!ss(n))return t;let r=n.length;for(;r--;){let m=n[r];if(typeof m=="string"){const d=e(m);d!==m&&(sE(n)||(n[r]=d),m=d)}t[m]=!0}return t}function gE(t){for(let n=0;n<t.length;n++)xr(t,n)||(t[n]=null);return t}function ei(t){const n=Aa(null);for(const r of ib(t)){var e=iE(r,2);const m=e[0],d=e[1];xr(t,m)&&(ss(d)?n[m]=gE(d):d&&typeof d=="object"&&d.constructor===Object?n[m]=ei(d):n[m]=d)}return n}function mE(t){switch(typeof t){case"string":return t;case"number":return dE(t);case"boolean":return fE(t);case"bigint":return ub?ub(t):"0";case"symbol":return hb?hb(t):"Symbol()";case"undefined":return ml(t);case"function":case"object":{if(t===null)return ml(t);const n=t,e=ko(n,"toString");if(typeof e=="function"){const r=e(n);return typeof r=="string"?r:ml(r)}return ml(t)}default:return ml(t)}}function ko(t,n){for(;t!==null;){const r=lE(t,n);if(r){if(r.get)return or(r.get);if(typeof r.value=="function")return or(r.value)}t=aE(t)}function e(){return null}return e}function vE(t){try{return Rr(t,""),!0}catch{return!1}}const db=$r(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),$d=$r(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Td=$r(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),yE=$r(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Rd=$r(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),bE=$r(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),fb=$r(["#text"]),pb=$r(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Ed=$r(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),gb=$r(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Mc=$r(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),wE=Tr(/{{[\w\W]*|^[\w\W]*}}/g),xE=Tr(/<%[\w\W]*|^[\w\W]*%>/g),CE=Tr(/\${[\w\W]*/g),_E=Tr(/^data-[\-\w.\u00B7-\uFFFF]+$/),AE=Tr(/^aria-[\-\w]+$/),mb=Tr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),kE=Tr(/^(?:\w+script|data):/i),SE=Tr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),$E=Tr(/^html$/i),TE=Tr(/^[a-z][.\w]*(-[.\w]+)+$/i),vb=Tr(/<[/\w!]/g),RE=Tr(/<[/\w]/g),EE=Tr(/<\/no(script|embed|frames)/i),ME=Tr(/\/>/i),So={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},IE=function(){return typeof window>"u"?null:window},LE=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let e=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(e=n.getAttribute(r));const m="dompurify"+(e?"#"+e:"");try{return t.createPolicy(m,{createHTML(d){return d},createScriptURL(d){return d}})}catch{return console.warn("TrustedTypes policy "+m+" could not be created."),null}},yb=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},as=function(t,n,e,r){return xr(t,n)&&ss(t[n])?Yt(r.base?ei(r.base):{},t[n],r.transform):e};function bb(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:IE();const n=ne=>bb(ne);if(n.version="3.4.11",n.removed=[],!t||!t.document||t.document.nodeType!==So.document||!t.Element)return n.isSupported=!1,n;let e=t.document;const r=e,m=r.currentScript;t.DocumentFragment;const d=t.HTMLTemplateElement,g=t.Node,w=t.Element,u=t.NodeFilter;t.NamedNodeMap===void 0&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const a=t.DOMParser,s=t.trustedTypes,c=w.prototype,h=ko(c,"cloneNode"),o=ko(c,"remove"),l=ko(c,"nextSibling"),p=ko(c,"childNodes"),y=ko(c,"parentNode"),x=ko(c,"shadowRoot"),E=ko(c,"attributes"),$=g&&g.prototype?ko(g.prototype,"nodeType"):null,_=g&&g.prototype?ko(g.prototype,"nodeName"):null;if(typeof d=="function"){const ne=e.createElement("template");ne.content&&ne.content.ownerDocument&&(e=ne.content.ownerDocument)}let C,L="",D,I=!1,M=0;const W=function(){if(M>0)throw Ps('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},z=function(ne){W(),M++;try{return C.createHTML(ne)}finally{M--}},O=function(ne){W(),M++;try{return C.createScriptURL(ne)}finally{M--}},T=function(){return I||(D=LE(s,m),I=!0),D},A=e,N=A.implementation,B=A.createNodeIterator,U=A.createDocumentFragment,G=A.getElementsByTagName,J=r.importNode;let Q=yb();n.isSupported=typeof ib=="function"&&typeof y=="function"&&N&&N.createHTMLDocument!==void 0;const le=wE,re=xE,ce=CE,de=_E,ie=AE,fe=kE,$e=SE,Re=TE;let Ee=mb,Ue=null;const He=Yt({},[...db,...$d,...Td,...Rd,...fb]);let Ge=null;const at=Yt({},[...pb,...Ed,...gb,...Mc]);let We=Object.seal(Aa(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Me=null,Tt=null;const st=Object.seal(Aa(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Xt=!0,dn=!0,Zn=!1,zt=!0,kn=!1,mt=!0,Ye=!1,Ot=!1,Sn=null,zn=null,Un=!1,Fn=!1,mn=!1,En=!1,Xn=!0,tn=!1;const Vn="user-content-";let $i=!0,ti=!1,sr={},qn=null;const Ti=Yt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let gr=null;const Hi=Yt({},["audio","video","img","source","image","track"]);let Ri=null;const ls=Yt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Cr="http://www.w3.org/1998/Math/MathML",$o="http://www.w3.org/2000/svg",Er="http://www.w3.org/1999/xhtml";let di=Er,ni=!1,$n=null;const Hr=Yt({},[Cr,$o,Er],Sd),Ur=$r(["mi","mo","mn","ms","mtext"]);let Tn=Yt({},Ur);const Qn=$r(["annotation-xml"]);let fi=Yt({},Qn);const Ei=Yt({},["title","style","font","a","script"]);let Mi=null;const cs=["application/xhtml+xml","text/html"],zs="text/html";let fn=null,_r=null;const pi=e.createElement("form"),Nt=function(ne){return ne instanceof RegExp||ne instanceof Function},To=function(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(_r&&_r===ne)return;(!ne||typeof ne!="object")&&(ne={}),ne=ei(ne),Mi=cs.indexOf(ne.PARSER_MEDIA_TYPE)===-1?zs:ne.PARSER_MEDIA_TYPE,fn=Mi==="application/xhtml+xml"?Sd:pl,Ue=as(ne,"ALLOWED_TAGS",He,{transform:fn}),Ge=as(ne,"ALLOWED_ATTR",at,{transform:fn}),$n=as(ne,"ALLOWED_NAMESPACES",Hr,{transform:Sd}),Ri=as(ne,"ADD_URI_SAFE_ATTR",ls,{transform:fn,base:ls}),gr=as(ne,"ADD_DATA_URI_TAGS",Hi,{transform:fn,base:Hi}),qn=as(ne,"FORBID_CONTENTS",Ti,{transform:fn}),Me=as(ne,"FORBID_TAGS",ei({}),{transform:fn}),Tt=as(ne,"FORBID_ATTR",ei({}),{transform:fn}),sr=xr(ne,"USE_PROFILES")?ne.USE_PROFILES&&typeof ne.USE_PROFILES=="object"?ei(ne.USE_PROFILES):ne.USE_PROFILES:!1,Xt=ne.ALLOW_ARIA_ATTR!==!1,dn=ne.ALLOW_DATA_ATTR!==!1,Zn=ne.ALLOW_UNKNOWN_PROTOCOLS||!1,zt=ne.ALLOW_SELF_CLOSE_IN_ATTR!==!1,kn=ne.SAFE_FOR_TEMPLATES||!1,mt=ne.SAFE_FOR_XML!==!1,Ye=ne.WHOLE_DOCUMENT||!1,Fn=ne.RETURN_DOM||!1,mn=ne.RETURN_DOM_FRAGMENT||!1,En=ne.RETURN_TRUSTED_TYPE||!1,Un=ne.FORCE_BODY||!1,Xn=ne.SANITIZE_DOM!==!1,tn=ne.SANITIZE_NAMED_PROPS||!1,$i=ne.KEEP_CONTENT!==!1,ti=ne.IN_PLACE||!1,Ee=vE(ne.ALLOWED_URI_REGEXP)?ne.ALLOWED_URI_REGEXP:mb,di=typeof ne.NAMESPACE=="string"?ne.NAMESPACE:Er,Tn=xr(ne,"MATHML_TEXT_INTEGRATION_POINTS")&&ne.MATHML_TEXT_INTEGRATION_POINTS&&typeof ne.MATHML_TEXT_INTEGRATION_POINTS=="object"?ei(ne.MATHML_TEXT_INTEGRATION_POINTS):Yt({},Ur),fi=xr(ne,"HTML_INTEGRATION_POINTS")&&ne.HTML_INTEGRATION_POINTS&&typeof ne.HTML_INTEGRATION_POINTS=="object"?ei(ne.HTML_INTEGRATION_POINTS):Yt({},Qn);const Se=xr(ne,"CUSTOM_ELEMENT_HANDLING")&&ne.CUSTOM_ELEMENT_HANDLING&&typeof ne.CUSTOM_ELEMENT_HANDLING=="object"?ei(ne.CUSTOM_ELEMENT_HANDLING):Aa(null);if(We=Aa(null),xr(Se,"tagNameCheck")&&Nt(Se.tagNameCheck)&&(We.tagNameCheck=Se.tagNameCheck),xr(Se,"attributeNameCheck")&&Nt(Se.attributeNameCheck)&&(We.attributeNameCheck=Se.attributeNameCheck),xr(Se,"allowCustomizedBuiltInElements")&&typeof Se.allowCustomizedBuiltInElements=="boolean"&&(We.allowCustomizedBuiltInElements=Se.allowCustomizedBuiltInElements),Tr(We),kn&&(dn=!1),mn&&(Fn=!0),sr&&(Ue=Yt({},fb),Ge=Aa(null),sr.html===!0&&(Yt(Ue,db),Yt(Ge,pb)),sr.svg===!0&&(Yt(Ue,$d),Yt(Ge,Ed),Yt(Ge,Mc)),sr.svgFilters===!0&&(Yt(Ue,Td),Yt(Ge,Ed),Yt(Ge,Mc)),sr.mathMl===!0&&(Yt(Ue,Rd),Yt(Ge,gb),Yt(Ge,Mc))),st.tagCheck=null,st.attributeCheck=null,xr(ne,"ADD_TAGS")&&(typeof ne.ADD_TAGS=="function"?st.tagCheck=ne.ADD_TAGS:ss(ne.ADD_TAGS)&&(Ue===He&&(Ue=ei(Ue)),Yt(Ue,ne.ADD_TAGS,fn))),xr(ne,"ADD_ATTR")&&(typeof ne.ADD_ATTR=="function"?st.attributeCheck=ne.ADD_ATTR:ss(ne.ADD_ATTR)&&(Ge===at&&(Ge=ei(Ge)),Yt(Ge,ne.ADD_ATTR,fn))),xr(ne,"ADD_URI_SAFE_ATTR")&&ss(ne.ADD_URI_SAFE_ATTR)&&Yt(Ri,ne.ADD_URI_SAFE_ATTR,fn),xr(ne,"FORBID_CONTENTS")&&ss(ne.FORBID_CONTENTS)&&(qn===Ti&&(qn=ei(qn)),Yt(qn,ne.FORBID_CONTENTS,fn)),xr(ne,"ADD_FORBID_CONTENTS")&&ss(ne.ADD_FORBID_CONTENTS)&&(qn===Ti&&(qn=ei(qn)),Yt(qn,ne.ADD_FORBID_CONTENTS,fn)),$i&&(Ue["#text"]=!0),Ye&&Yt(Ue,["html","head","body"]),Ue.table&&(Yt(Ue,["tbody"]),delete Me.tbody),ne.TRUSTED_TYPES_POLICY){if(typeof ne.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ps('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof ne.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ps('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Le=C;C=ne.TRUSTED_TYPES_POLICY;try{L=z("")}catch(et){throw C=Le,et}}else ne.TRUSTED_TYPES_POLICY===null?(C=void 0,L=""):(C===void 0&&(C=T()),C&&typeof L=="string"&&(L=z("")));$r&&$r(ne),_r=ne},mr=Yt({},[...$d,...Td,...yE]),Mn=Yt({},[...Rd,...bE]),vn=function(ne,Se,Le){return Se.namespaceURI===Er?ne==="svg":Se.namespaceURI===Cr?ne==="svg"&&(Le==="annotation-xml"||Tn[Le]):!!mr[ne]},In=function(ne,Se,Le){return Se.namespaceURI===Er?ne==="math":Se.namespaceURI===$o?ne==="math"&&fi[Le]:!!Mn[ne]},ho=function(ne,Se,Le){return Se.namespaceURI===$o&&!fi[Le]||Se.namespaceURI===Cr&&!Tn[Le]?!1:!Mn[ne]&&(Ei[ne]||!mr[ne])},er=function(ne){let Se=y(ne);(!Se||!Se.tagName)&&(Se={namespaceURI:di,tagName:"template"});const Le=pl(ne.tagName),et=pl(Se.tagName);return $n[ne.namespaceURI]?ne.namespaceURI===$o?vn(Le,Se,et):ne.namespaceURI===Cr?In(Le,Se,et):ne.namespaceURI===Er?ho(Le,Se,et):!!(Mi==="application/xhtml+xml"&&$n[ne.namespaceURI]):!1},Mr=function(ne){ka(n.removed,{element:ne});try{y(ne).removeChild(ne)}catch{if(o(ne),!y(ne))throw Ps("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},gi=function(ne){const Se=p(ne);if(Se){const et=[];fl(Se,vt=>{ka(et,vt)}),fl(et,vt=>{try{o(vt)}catch{}})}const Le=E(ne);if(Le)for(let et=Le.length-1;et>=0;--et){const vt=Le[et],Gt=vt&&vt.name;if(typeof Gt=="string")try{ne.removeAttribute(Gt)}catch{}}},ri=function(ne,Se){try{ka(n.removed,{attribute:Se.getAttributeNode(ne),from:Se})}catch{ka(n.removed,{attribute:null,from:Se})}if(Se.removeAttribute(ne),ne==="is")if(Fn||mn)try{Mr(Se)}catch{}else try{Se.setAttribute(ne,"")}catch{}},Ui=function(ne){const Se=E(ne);if(Se)for(let Le=Se.length-1;Le>=0;--Le){const et=Se[Le],vt=et&&et.name;if(!(typeof vt!="string"||Ge[fn(vt)]))try{ne.removeAttribute(vt)}catch{}}},ii=function(ne){const Se=[ne];for(;Se.length>0;){const Le=Se.pop();($?$(Le):Le.nodeType)===So.element&&Ui(Le);const et=p(Le);if(et)for(let vt=et.length-1;vt>=0;--vt)Se.push(et[vt])}},Vi=function(ne){let Se=null,Le=null;if(Un)ne="<remove></remove>"+ne;else{const Gt=lb(ne,/^[\r\n\t ]+/);Le=Gt&&Gt[0]}Mi==="application/xhtml+xml"&&di===Er&&(ne='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+ne+"</body></html>");const et=C?z(ne):ne;if(di===Er)try{Se=new a().parseFromString(et,Mi)}catch{}if(!Se||!Se.documentElement){Se=N.createDocument(di,"template",null);try{Se.documentElement.innerHTML=ni?L:et}catch{}}const vt=Se.body||Se.documentElement;return ne&&Le&&vt.insertBefore(e.createTextNode(Le),vt.childNodes[0]||null),di===Er?G.call(Se,Ye?"html":"body")[0]:Ye?Se.documentElement:vt},fo=function(ne){return B.call(ne.ownerDocument||ne,ne,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},ar=function(ne){return ne=gl(ne,le," "),ne=gl(ne,re," "),ne=gl(ne,ce," "),ne},qi=function(ne){var Se;ne.normalize();const Le=B.call(ne.ownerDocument||ne,ne,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let et=Le.nextNode();for(;et;)et.data=ar(et.data),et=Le.nextNode();const vt=(Se=ne.querySelectorAll)===null||Se===void 0?void 0:Se.call(ne,"template");vt&&fl(vt,Gt=>{mi(Gt.content)&&qi(Gt.content)})},Gi=function(ne){const Se=_?_(ne):null;return typeof Se!="string"||fn(Se)!=="form"?!1:typeof ne.nodeName!="string"||typeof ne.textContent!="string"||typeof ne.removeChild!="function"||ne.attributes!==E(ne)||typeof ne.removeAttribute!="function"||typeof ne.setAttribute!="function"||typeof ne.namespaceURI!="string"||typeof ne.insertBefore!="function"||typeof ne.hasChildNodes!="function"||ne.nodeType!==$(ne)||ne.childNodes!==p(ne)},mi=function(ne){if(!$||typeof ne!="object"||ne===null)return!1;try{return $(ne)===So.documentFragment}catch{return!1}},Ii=function(ne){if(!$||typeof ne!="object"||ne===null)return!1;try{return typeof $(ne)=="number"}catch{return!1}};function pn(ne,Se,Le){ne.length!==0&&fl(ne,et=>{et.call(n,Se,Le,_r)})}const Wo=function(ne,Se){return!!(mt&&ne.hasChildNodes()&&!Ii(ne.firstElementChild)&&Rr(vb,ne.textContent)&&Rr(vb,ne.innerHTML)||mt&&ne.namespaceURI===Er&&Se==="style"&&Ii(ne.firstElementChild)||ne.nodeType===So.processingInstruction||mt&&ne.nodeType===So.comment&&Rr(RE,ne.data))},Ro=function(ne,Se){if(!Me[Se]&&Ki(Se)&&(We.tagNameCheck instanceof RegExp&&Rr(We.tagNameCheck,Se)||We.tagNameCheck instanceof Function&&We.tagNameCheck(Se)))return!1;if($i&&!qn[Se]){const Le=y(ne),et=p(ne);if(et&&Le){const vt=et.length;for(let Gt=vt-1;Gt>=0;--Gt){const Jt=ti?et[Gt]:h(et[Gt],!0);Le.insertBefore(Jt,l(ne))}}}return Mr(ne),!0},Li=function(ne){if(pn(Q.beforeSanitizeElements,ne,null),Gi(ne))return Mr(ne),!0;const Se=fn(_?_(ne):ne.nodeName);if(pn(Q.uponSanitizeElement,ne,{tagName:Se,allowedTags:Ue}),Wo(ne,Se))return Mr(ne),!0;if(Me[Se]||!(st.tagCheck instanceof Function&&st.tagCheck(Se))&&!Ue[Se])return Ro(ne,Se);if(($?$(ne):ne.nodeType)===So.element&&!er(ne)||(Se==="noscript"||Se==="noembed"||Se==="noframes")&&Rr(EE,ne.innerHTML))return Mr(ne),!0;if(kn&&ne.nodeType===So.text){const Le=ar(ne.textContent);ne.textContent!==Le&&(ka(n.removed,{element:ne.cloneNode()}),ne.textContent=Le)}return pn(Q.afterSanitizeElements,ne,null),!1},Eo=function(ne,Se,Le){if(Tt[Se]||Xn&&(Se==="id"||Se==="name")&&(Le in e||Le in pi))return!1;const et=Ge[Se]||st.attributeCheck instanceof Function&&st.attributeCheck(Se,ne);if(!(dn&&Rr(de,Se))&&!(Xt&&Rr(ie,Se))){if(et){if(!Ri[Se]&&!Rr(Ee,gl(Le,$e,""))&&!((Se==="src"||Se==="xlink:href"||Se==="href")&&ne!=="script"&&cb(Le,"data:")===0&&gr[ne])&&!(Zn&&!Rr(fe,gl(Le,$e,"")))&&Le)return!1}else if(!(Ki(ne)&&(We.tagNameCheck instanceof RegExp&&Rr(We.tagNameCheck,ne)||We.tagNameCheck instanceof Function&&We.tagNameCheck(ne))&&(We.attributeNameCheck instanceof RegExp&&Rr(We.attributeNameCheck,Se)||We.attributeNameCheck instanceof Function&&We.attributeNameCheck(Se,ne))||Se==="is"&&We.allowCustomizedBuiltInElements&&(We.tagNameCheck instanceof RegExp&&Rr(We.tagNameCheck,Le)||We.tagNameCheck instanceof Function&&We.tagNameCheck(Le))))return!1}return!0},Mo=Yt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ki=function(ne){return!Mo[pl(ne)]&&Rr(Re,ne)},jo=function(ne,Se,Le,et){if(C&&typeof s=="object"&&typeof s.getAttributeType=="function"&&!Le)switch(s.getAttributeType(ne,Se)){case"TrustedHTML":return z(et);case"TrustedScriptURL":return O(et)}return et},Ho=function(ne,Se,Le,et){try{Le?ne.setAttributeNS(Le,Se,et):ne.setAttribute(Se,et),Gi(ne)?Mr(ne):ab(n.removed)}catch{ri(Se,ne)}},po=function(ne){pn(Q.beforeSanitizeAttributes,ne,null);const Se=ne.attributes;if(!Se||Gi(ne))return;const Le={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ge,forceKeepAttr:void 0};let et=Se.length;const vt=fn(ne.nodeName);for(;et--;){const Gt=Se[et],Jt=Gt.name,Vr=Gt.namespaceURI,lr=Gt.value,Ln=fn(Jt),Ir=lr;let xn=Jt==="value"?Ir:hE(Ir);if(Le.attrName=Ln,Le.attrValue=xn,Le.keepAttr=!0,Le.forceKeepAttr=void 0,pn(Q.uponSanitizeAttribute,ne,Le),xn=Le.attrValue,tn&&(Ln==="id"||Ln==="name")&&cb(xn,Vn)!==0&&(ri(Jt,ne),xn=Vn+xn),mt&&Rr(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,xn)){ri(Jt,ne);continue}if(Ln==="attributename"&&lb(xn,"href")){ri(Jt,ne);continue}if(!Le.forceKeepAttr){if(!Le.keepAttr){ri(Jt,ne);continue}if(!zt&&Rr(ME,xn)){ri(Jt,ne);continue}if(kn&&(xn=ar(xn)),!Eo(vt,Ln,xn)){ri(Jt,ne);continue}xn=jo(vt,Ln,Vr,xn),xn!==Ir&&Ho(ne,Jt,Vr,xn)}}pn(Q.afterSanitizeAttributes,ne,null)},go=function(ne){let Se=null;const Le=fo(ne);for(pn(Q.beforeSanitizeShadowDOM,ne,null);Se=Le.nextNode();)if(pn(Q.uponSanitizeShadowNode,Se,null),Li(Se),po(Se),mi(Se.content)&&go(Se.content),($?$(Se):Se.nodeType)===So.element){const et=x(Se);mi(et)&&(vi(et),go(et))}pn(Q.afterSanitizeShadowDOM,ne,null)},vi=function(ne){const Se=[{node:ne,shadow:null}];for(;Se.length>0;){const Le=Se.pop();if(Le.shadow){go(Le.shadow);continue}const et=Le.node,vt=($?$(et):et.nodeType)===So.element,Gt=p(et);if(Gt)for(let Jt=Gt.length-1;Jt>=0;--Jt)Se.push({node:Gt[Jt],shadow:null});if(vt){const Jt=_?_(et):null;if(typeof Jt=="string"&&fn(Jt)==="template"){const Vr=et.content;mi(Vr)&&Se.push({node:Vr,shadow:null})}}if(vt){const Jt=x(et);mi(Jt)&&Se.push({node:null,shadow:Jt},{node:Jt,shadow:null})}}};return n.sanitize=function(ne){let Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Le=null,et=null,vt=null,Gt=null;if(ni=!ne,ni&&(ne="<!-->"),typeof ne!="string"&&!Ii(ne)&&(ne=mE(ne),typeof ne!="string"))throw Ps("dirty is not a string, aborting");if(!n.isSupported)return ne;Ot?(Ue=Sn,Ge=zn):To(Se),(Q.uponSanitizeElement.length>0||Q.uponSanitizeAttribute.length>0)&&(Ue=ei(Ue)),Q.uponSanitizeAttribute.length>0&&(Ge=ei(Ge)),n.removed=[];const Jt=ti&&typeof ne!="string"&&Ii(ne);if(Jt){const Ln=_?_(ne):ne.nodeName;if(typeof Ln=="string"){const Ir=fn(Ln);if(!Ue[Ir]||Me[Ir])throw Ps("root node is forbidden and cannot be sanitized in-place")}if(Gi(ne))throw Ps("root node is clobbered and cannot be sanitized in-place");try{vi(ne)}catch(Ir){throw gi(ne),Ir}}else if(Ii(ne))Le=Vi("<!---->"),et=Le.ownerDocument.importNode(ne,!0),et.nodeType===So.element&&et.nodeName==="BODY"||et.nodeName==="HTML"?Le=et:Le.appendChild(et),vi(et);else{if(!Fn&&!kn&&!Ye&&ne.indexOf("<")===-1)return C&&En?z(ne):ne;if(Le=Vi(ne),!Le)return Fn?null:En?L:""}Le&&Un&&Mr(Le.firstChild);const Vr=fo(Jt?ne:Le);try{for(;vt=Vr.nextNode();)Li(vt),po(vt),mi(vt.content)&&go(vt.content)}catch(Ln){throw Jt&&gi(ne),Ln}if(Jt)return fl(n.removed,Ln=>{Ln.element&&ii(Ln.element)}),kn&&qi(ne),ne;if(Fn){if(kn&&qi(Le),mn)for(Gt=U.call(Le.ownerDocument);Le.firstChild;)Gt.appendChild(Le.firstChild);else Gt=Le;return(Ge.shadowroot||Ge.shadowrootmode)&&(Gt=J.call(r,Gt,!0)),Gt}let lr=Ye?Le.outerHTML:Le.innerHTML;return Ye&&Ue["!doctype"]&&Le.ownerDocument&&Le.ownerDocument.doctype&&Le.ownerDocument.doctype.name&&Rr($E,Le.ownerDocument.doctype.name)&&(lr="<!DOCTYPE "+Le.ownerDocument.doctype.name+`>
1490
+ `+lr),kn&&(lr=ar(lr)),C&&En?z(lr):lr},n.setConfig=function(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};To(ne),Ot=!0,Sn=Ue,zn=Ge},n.clearConfig=function(){_r=null,Ot=!1,Sn=null,zn=null,C=D,L=""},n.isValidAttribute=function(ne,Se,Le){_r||To({});const et=fn(ne),vt=fn(Se);return Eo(et,vt,Le)},n.addHook=function(ne,Se){typeof Se=="function"&&xr(Q,ne)&&ka(Q[ne],Se)},n.removeHook=function(ne,Se){if(xr(Q,ne)){if(Se!==void 0){const Le=cE(Q[ne],Se);return Le===-1?void 0:uE(Q[ne],Le,1)[0]}return ab(Q[ne])}},n.removeHooks=function(ne){xr(Q,ne)&&(Q[ne]=[])},n.removeAllHooks=function(){Q=yb()},n}var OE=bb();const NE={dark:!0,colors:{primary:"#005A8F",secondary:"#4DACFF",tertiary:"#BBC1C9","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},DE={data:function(){return{show:!1,params:{title:"Title",text:"The text that is displayed",okText:"Ok",okClass:"primary",validateText:"CONFIRM",cancelText:"Cancel",html:!1},resolve:null,reject:null,validationText:null,rules:{required:t=>!!t||"Required.",match:t=>t===this.params.validateText||"Value mismatch."}}},computed:{dataTestOk:function(){return`confirm-dialog-${this.params.okText.toLowerCase()}`},dataTestCancel:function(){return`confirm-dialog-${this.params.cancelText.toLowerCase()}`},sanitizedText:function(){return OE.sanitize(this.params.text)}},methods:{dialog:function(t,n,e){this.params=t,this.show=!0,this.resolve=n,this.reject=e},ok:function(){(!this.params.validateText||this.params.validateText===this.validationText)&&(this.show=!1,this.resolve(!0),this.refresh())},cancel:function(){this.show=!1,this.reject(!0),this.refresh()},refresh:function(){this.validationText=""}}},PE=["innerHTML"],zE={key:2},FE={key:3,class:"validate mt-4"};function BE(t,n,e,r,m,d){const g=Rt("v-spacer"),w=Rt("v-toolbar"),u=Rt("v-icon"),f=Rt("v-text-field"),a=Rt("v-card-text"),s=Rt("v-btn"),c=Rt("v-card-actions"),h=Rt("v-card"),o=Rt("v-dialog"),l=Rt("v-app");return Pn(),Co(l,null,{default:Pt(()=>[gt(o,{modelValue:t.show,"onUpdate:modelValue":n[1]||(n[1]=p=>t.show=p),persistent:"",width:"600",onKeydown:Ll(d.cancel,["esc"])},{default:Pt(()=>[gt(h,null,{default:Pt(()=>[gt(w,{height:"24"},{default:Pt(()=>[gt(g),wr("span",null,ci(t.params.title),1),gt(g)]),_:1}),gt(a,{class:"mt-4 pa-3"},{default:Pt(()=>[t.params.validateText?(Pn(),Co(u,{key:0,class:"mr-2"},{default:Pt(()=>[...n[2]||(n[2]=[Pr(" mdi-alert ",-1)])]),_:1})):zo("",!0),t.params.html?(Pn(),li("span",{key:1,innerHTML:d.sanitizedText},null,8,PE)):(Pn(),li("span",zE,ci(d.sanitizedText),1)),t.params.validateText?(Pn(),li("div",FE,[Pr(" Enter "+ci(t.params.validateText)+" to confirm! ",1),gt(f,{modelValue:t.validationText,"onUpdate:modelValue":n[0]||(n[0]=p=>t.validationText=p),variant:"solo",density:"compact","single-line":"",rules:[t.rules.required,t.rules.match],"data-test":"confirm-dialog-validate"},null,8,["modelValue","rules"])])):zo("",!0)]),_:1}),gt(c,{class:"px-2"},{default:Pt(()=>[gt(g),t.params.cancelText?(Pn(),Co(s,{key:0,variant:"outlined","data-test":d.dataTestCancel,onClick:d.cancel},{default:Pt(()=>[Pr(ci(t.params.cancelText),1)]),_:1},8,["data-test","onClick"])):zo("",!0),gt(s,{variant:"flat",color:t.params.okClass,"data-test":d.dataTestOk,onClick:d.ok},{default:Pt(()=>[Pr(ci(t.params.okText),1)]),_:1},8,["color","data-test","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])]),_:1})}const WE=ts(DE,[["render",BE],["__scopeId","data-v-53691296"]]);class jE{constructor(){this.mounted=!1,this.$root=null}mount(){if(this.mounted)return;const n=window.Vue.createApp(WE);n.use(Id);const e=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(e),this.$root=n.mount(e),this.mounted=!0}open({title:n,text:e,okText:r,okClass:m,validateText:d,cancelText:g,html:w}){return this.mount(),new Promise((u,f)=>{this.$root.dialog({title:n,text:e,okText:r,okClass:m,validateText:d,cancelText:g,html:w},u,f)})}confirm(n,{okText:e="Ok",cancelText:r="Cancel",okClass:m="primary"}){return this.open({title:"Confirm",text:n,okText:e,okClass:m,validateText:null,cancelText:r,html:!1})}alert(n,{okText:e="Ok",html:r=!1,okClass:m="primary"}){return this.open({title:"Alert",text:n,okText:e,okClass:m,validateText:null,cancelText:null,html:r})}validate(n,{okText:e="Ok",validateText:r="CONFIRM",cancelText:m="Cancel",okClass:d="primary"}){return this.open({title:"Confirm",text:n,okText:e,okClass:d,validateText:r,cancelText:m,html:!1})}}const HE={install(t,n){const e=new jE;t.provide("dialog",e),t.config.globalProperties.hasOwnProperty("$dialog")||(t.config.globalProperties.$dialog=e)}},UE={data:function(){return{showToast:!1,expanded:!1,toastNotification:{title:"Title here",body:"This is the notification body",message:"Overall message here"},timeout:null,noToastPaths:["/login"]}},computed:{toastNotificationIcon:function(){return this.toastNotification.type==="notification"?"mdi-bell":"mdi-alert-box"},toastStyle:function(){return`
1491
+ --toast-bg-color:${_d[this.toastNotification.level]};
1492
+ --toast-fg-color:${DR(this.toastNotification.level)};
1493
+ `},contentStyle:function(){return`
1494
+ white-space: ${this.expanded?"normal":"nowrap"};
1495
+ overflow-x: ${this.expanded?"visible":"hidden"};
1496
+ text-overflow: ${this.expanded?"unset":"ellipsis"};
1497
+ `}},methods:{toast:function(t,n){this.noToastPaths.includes(window.location.pathname)||(n===void 0&&(n=5e3),this.toastNotification=t,this.showToast=!0,this.cancelAutohide(),n&&(this.timeout=setTimeout(()=>{this.hide()},n)))},hide:function(){this.cancelAutohide(),this.showToast=!1},cancelAutohide:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},expand:function(){this.cancelAutohide(),this.expanded=!0}}},VE={key:0,class:"text-subtitle-1 mr-1 notification-text"},qE={key:1,class:"text-body-2 notification-text"},GE={key:2,class:"text-body-2 notification-text"};function KE(t,n,e,r,m,d){const g=Rt("v-icon"),w=Rt("v-spacer"),u=Rt("v-btn"),f=Rt("v-sheet"),a=Rt("v-slide-y-transition");return Pn(),Co(a,null,{default:Pt(()=>[Ol(gt(f,{style:Pa(d.toastStyle),class:"toast-notification",onClick:d.expand},{default:Pt(()=>[gt(g,{class:"mr-1 notification-text"},{default:Pt(()=>[Pr(ci(d.toastNotificationIcon),1)]),_:1}),wr("div",{class:"toast-content",style:Pa(d.contentStyle)},[t.toastNotification.title?(Pn(),li("span",VE,[t.toastNotification.body||t.toastNotification.message?(Pn(),li(Il,{key:0},[Pr(ci(t.toastNotification.title)+": ",1)],64)):(Pn(),li(Il,{key:1},[Pr(ci(t.toastNotification.title),1)],64))])):zo("",!0),t.toastNotification.body?(Pn(),li("span",qE,ci(t.toastNotification.body),1)):zo("",!0),t.toastNotification.message?(Pn(),li("span",GE,ci(t.toastNotification.message),1)):zo("",!0)],4),gt(w),gt(u,{variant:"text",class:"notification-text",onClick:Zs(d.hide,["stop"])},{default:Pt(()=>[...n[0]||(n[0]=[Pr(" Dismiss ",-1)])]),_:1},8,["onClick"])]),_:1},8,["style","onClick"]),[[Nl,t.showToast]])]),_:1})}const YE=ts(UE,[["render",KE],["__scopeId","data-v-ef96840d"]]);class JE{constructor(n={}){this.store=null,this.mounted=!1,this.$root=null,window.$cosmosNotify?.$root?(this.mounted=!0,this.$root=window.$cosmosNotify.$root):window.$cosmosNotify=this}getStore(){return this.store||(this.store=Qy()),this.store}mount(){if(this.mounted)return;const n=gu(YE);n.use(Id);const e=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(e),this.$root=n.mount(e),this.mounted=!0}open({method:n,title:e,body:r,message:m,level:d,duration:g,type:w="alert",logToConsole:u=!1,saveToHistory:f=!0}){this.mount(),u&&console.log(m?`${d.toUpperCase()} - ${m}`:`${d.toUpperCase()} - ${e}: ${r}`),f&&this.getStore().notifyAddHistory({title:e,body:r,message:m,level:d}),this[n]({title:e,body:r,message:m,level:d,duration:g,type:w})}toast({title:n,body:e,message:r,level:m,duration:d,type:g}){this.$root.toast({title:n,body:e,message:r,level:m,type:g},d)}critical({title:n,body:e,message:r,type:m,duration:d,logToConsole:g,saveToHistory:w}){this.open({method:"toast",level:"critical",title:n,body:e,message:r,type:m,duration:d,logToConsole:g,saveToHistory:w})}FATAL(n){this.critical(n)}ERROR(n){this.critical(n)}serious({title:n,body:e,message:r,type:m,duration:d,logToConsole:g,saveToHistory:w}){this.open({method:"toast",level:"serious",title:n,body:e,message:r,type:m,duration:d,logToConsole:g,saveToHistory:w})}caution({title:n,body:e,message:r,type:m,duration:d,logToConsole:g,saveToHistory:w}){this.open({method:"toast",level:"caution",title:n,body:e,message:r,type:m,duration:d,logToConsole:g,saveToHistory:w})}WARN(n){this.caution(n)}normal({title:n,body:e,message:r,type:m,duration:d,logToConsole:g,saveToHistory:w}){this.open({method:"toast",level:"normal",title:n,body:e,message:r,type:m,duration:d,logToConsole:g,saveToHistory:w})}INFO(n){this.normal(n)}DEBUG(n){this.normal(n)}standby({title:n,body:e,message:r,type:m,duration:d,logToConsole:g,saveToHistory:w}){this.open({method:"toast",level:"standby",title:n,body:e,message:r,type:m,duration:d,logToConsole:g,saveToHistory:w})}off({title:n,body:e,message:r,type:m,duration:d,logToConsole:g,saveToHistory:w}){this.open({method:"toast",level:"off",title:n,body:e,message:r,type:m,duration:d,logToConsole:g,saveToHistory:w})}}const ZE={install(t,n){const e=new JE(n);t.provide("notify",e),t.config.globalProperties.hasOwnProperty("$notify")||(t.config.globalProperties.$notify=e)}};function XE(t){If(`Vuetify: ${t}`)}function wb(t){let n;return t!==null&&typeof t=="object"&&((n=Object.getPrototypeOf(t))===Object.prototype||n===null)}function QE(t,n){const e={};for(const r of n)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function xb(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=arguments.length>2?arguments[2]:void 0;const r={};for(const m in t)r[m]=t[m];for(const m in n){const d=t[m],g=n[m];if(wb(d)&&wb(g)){r[m]=xb(d,g,e);continue}if(e&&Array.isArray(d)&&Array.isArray(g)){r[m]=e(d,g);continue}r[m]=g}return r}function vl(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(vl.cache.has(t))return vl.cache.get(t);const n=t.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return vl.cache.set(t,n),n}vl.cache=new Map;function Cb(t,n){return e=>Object.keys(t).reduce((r,m)=>{const d=typeof t[m]=="object"&&t[m]!=null&&!Array.isArray(t[m])?t[m]:{type:t[m]};return e&&m in e?r[m]={...d,default:e[m]}:r[m]=d,n&&!r[m].source&&(r[m].source=n),r},{})}function _b(t,n){const e=Pf();if(!e)throw new Error(`[Vuetify] ${t} must be called from inside a setup function`);return e}function eM(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_b("injectSelf");const{provides:e}=n;if(e&&t in e)return e[t]}const Md=Symbol.for("vuetify:defaults");function Ab(){const t=Lf(Md);if(!t)throw new Error("[Vuetify] Could not find defaults instance");return t}function tM(t,n){return t.props&&(typeof t.props[n]<"u"||typeof t.props[vl(n)]<"u")}function nM(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ab();const r=_b("useDefaults");if(n=n??r.type.name??r.type.__name,!n)throw new Error("[Vuetify] Could not determine component name");const m=pu(()=>e.value?.[t._as??n]),d=new Proxy(t,{get(u,f){const a=Reflect.get(u,f);if(f==="class"||f==="style")return[m.value?.[f],a].filter(h=>h!=null);if(tM(r.vnode,f))return a;const s=m.value?.[f];if(s!==void 0)return s;const c=e.value?.global?.[f];return c!==void 0?c:a}}),g=Of();Nf(()=>{if(m.value){const u=Object.entries(m.value).filter(f=>{let[a]=f;return a.startsWith(a[0].toUpperCase())});g.value=u.length?Object.fromEntries(u):void 0}else g.value=void 0});function w(){const u=eM(Md,r);zf(Md,pu(()=>g.value?xb(u?.value??{},g.value):u?.value))}return{props:d,provideSubDefaults:w}}function Ic(t){if(t._setup=t._setup??t.setup,!t.name)return XE("The component is missing an explicit name, unable to generate default prop value"),t;if(t._setup){t.props=Cb(t.props??{},t.name)();const n=Object.keys(t.props).filter(e=>e!=="class"&&e!=="style");t.filterProps=function(e){return QE(e,n)},t.props._as=String,t.setup=function(e,r){const m=Ab();if(!m.value)return t._setup(e,r);const{props:d,provideSubDefaults:g}=nM(e,e._as??t.name,m),w=t._setup(d,r);return g(),w}}return t}function rM(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return n=>(t?Ic:Mf)(n)}const iM=[String,Function,Object,Array],Lc=Cb({icon:{type:iM},tag:{type:[String,Object,Function],required:!0}},"icon");rM()({name:"VComponentIcon",props:Lc(),setup(t,n){let{slots:e}=n;return()=>{const r=t.icon;return gt(t.tag,null,{default:()=>[t.icon?gt(r,null,null):e.default?.()]})}}}),Ic({name:"VSvgIcon",inheritAttrs:!1,props:Lc(),setup(t,n){let{attrs:e}=n;return()=>gt(t.tag,Ff(e,{style:null}),{default:()=>[wr("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(t.icon)?t.icon.map(r=>Array.isArray(r)?wr("path",{d:r[0],"fill-opacity":r[1]},null):wr("path",{d:r},null)):wr("path",{d:t.icon},null)])]})}}),Ic({name:"VLigatureIcon",props:Lc(),setup(t){return()=>gt(t.tag,null,{default:()=>[t.icon]})}});const oM=Ic({name:"VClassIcon",props:Lc(),setup(t){return()=>gt(t.tag,{class:Df(t.icon)},null)}}),sM={component:t=>Js(oM,{...t,class:"mdi"})},aM={dark:!0,colors:{primary:"#007ad0",secondary:"#4da3e0",tertiary:"#858585",surface:"#1f1f1f",background:"#161616","on-surface":"#d4d4d4","on-background":"#d4d4d4","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},lM={dark:!0,colors:{primary:"#5B52E0",secondary:"#8078F0",tertiary:"#7E8696",surface:"#24242F",background:"#1A1A24","on-surface":"#D0D4DC","on-background":"#D0D4DC","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},cM={dark:!0,colors:{primary:"#0097A7",secondary:"#26C6DA",tertiary:"#708090",surface:"#242D36",background:"#1A2027","on-surface":"#D4DCE4","on-background":"#D4DCE4","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},uM={dark:!0,colors:{primary:"#00897B",secondary:"#26A69A",tertiary:"#6E7680",surface:"#222428",background:"#181A1C","on-surface":"#D4D8DC","on-background":"#D4D8DC","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},Id=Uf({theme:{defaultTheme:"cosmosDark",themes:{cosmosDark:NE,cosmosDarkCobalt:aM,cosmosDarkIndigo:lM,cosmosDarkSlate:cM,cosmosDarkEmerald:uM}},defaults:{VCheckbox:{color:"secondary"},VCheckboxBtn:{color:"secondary"},VRadio:{color:"secondary"},VRadioGroup:{color:"secondary"},VSwitch:{color:"secondary"}},icons:{defaultSet:"mdi",sets:{mdi:sM,...zR,...FR}}}),Ld=xw({createApp:gu,appOptions:{render(){return Js(Rw,{})},el:"#openc3-tool"},handleInstance:t=>{t.use(eE),t.use(_a),t.use(Id),t.use(HE),t.use(ZE)}}),lP=Hn("f",Ld.bootstrap),cP=Hn("l",Ld.mount),uP=Hn("s",Ld.unmount)})}}));